import struct with open(r'C:\Users\wolff\Documents\SDKVita\PizzaTowerSAGE Vita\data.win', 'rb') as f: f.seek(8) # exactly after FORM and its size shdr_offset = 0 shdr_size = 0 while True: hdr = f.read(8) if len(hdr) < 8: break cname = hdr[:4].decode('ascii', errors='ignore') csize = struct.unpack('') continue f.seek(p) name_ptr = struct.unpack('