import os base = "/home/aria/kellogg_remake/extracted_pre/" names = ["A","B","C","D","E","F","G","H","I","J","K","L","N","O","BLUME","WOLKE", "VITAMIN","COCOPOPS","SMACKIES","FROSTIES","LOOPS","TONY","SMACKS","TOUCAN", "COCO","PLATFW1","KEYS","GAMEBAR","KROKO","BOSSNAKE","DRAGON","DOORS"] N = 128 headers = {} for nm in names: path = base+nm+".BOB" data = open(path,"rb").read() headers[nm] = data[:N] print(f"{nm:10s} size={len(data):6d} header={data[:N].hex()}") print() print("Per-byte-position constant analysis (position: set of distinct values, only show non-constant or show const marker):") for pos in range(N): vals = set(h[pos] for h in headers.values() if len(h) > pos) if len(vals) == 1: print(f"pos {pos:3d}: CONST 0x{next(iter(vals)):02x}") else: print(f"pos {pos:3d}: VARIES ({len(vals)} distinct)")