import struct, sys, io sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace') data = open('HAVOC_NOCD.EXE','rb').read() FO2VA = lambda fo: fo + 0x400C00 def show(start, length): for row in range(start, start + length, 16): chunk = data[row:row+16] ann = [] for j in range(len(chunk)): f = row + j try: if data[f] == 0xe8 and f+5 <= len(data): rel = struct.unpack_from(' 0 and data[fo-1] != 0xCC: fo -= 1 print("Function start: FO 0x%05x VA 0x%07x" % (fo, FO2VA(fo))) show(fo, min(32, 0x17A60 - fo + 32))