"""Check an .exe's CodeView debug info to see what PDB GUID + age it expects. Used to verify whether a candidate acclient.exe matches our acclient.pdb without running the binary. Usage: py tools/pdb-extract/check_exe_pdb.py """ import struct import sys import uuid def main(): if len(sys.argv) < 2: print("usage: check_exe_pdb.py ") sys.exit(1) with open(sys.argv[1], "rb") as f: data = f.read() # DOS header -> e_lfanew @ offset 0x3C points to PE header pe_off = struct.unpack_from(" linker UTC: {ts.isoformat()}") # Optional header — magic indicates 32 vs 64 bit opt_off = pe_off + 24 magic = struct.unpack_from("= 24: cv = data[ptr:ptr + sz] sig = cv[:4] print(f" cv signature = {sig!r}") if sig == b"RSDS": guid_bytes = cv[4:20] age = struct.unpack_from("