""" va_to_raw.py [count] Maps a virtual address to file offset using the PE section table, and optionally dumps `count` bytes from the file at that offset. """ import struct, sys path = sys.argv[1] va = int(sys.argv[2], 0) n = int(sys.argv[3]) if len(sys.argv) > 3 else 64 with open(path, "rb") as f: d = f.read() # DOS header e_lfanew = struct.unpack_from("