import struct data = open(r'C:/git/bt411/content/BTL4OPT.EXE','rb').read() pe = struct.unpack_from(' n: return False k, ch, t, ridx, mask, mid = struct.unpack_from('<6I', data, i) return (k in (0,1,3) and ch < 0x60 and t in (0,1) and (ridx < 0x100 or ridx == 0xffffffff) and mask != 0 and mid < 0x1000) found = 0 i = 0 while i < n - 8: cnt = struct.unpack_from('