#!/usr/bin/env python3 """Read-only original body/contact Vec4 publication probe generator.""" import argparse,hashlib,json,struct from pathlib import Path from body_step_evidence import collect as body_collect from collision_response import header from checkpoint_script_state import find_case,read_va from pe_inspect import PE REA_ID='ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904' ROOT_BINDINGS=((0x2f8,0x4721e0),(0x2fc,0x472240),(0x310,0x472300),(0x314,0x472360)) ROOT_LEAVES=((0x4721e0,0x47220a),(0x472240,0x472264),(0x472300,0x47232a),(0x472360,0x472384)) SITES=((0x47a084,'ff90fc020000'),(0x47a123,'8b168d44244c508bceff92f8020000'), (0x47a13d,'ff9210030000'),(0x47a147,'d819dfe0f6c440'),(0x47a157,'d85904dfe0f6c440'), (0x47a168,'d85908dfe0f6c440'),(0x47a179,'d8590cdfe0f6c440'), (0x47a198,'c74424200050c3c6'),(0x47a1c4,'ff9014030000'),(0x47a235,'e856160000'), (0x47b80f,'ff9774030000'),(0x47b82e,'ff9770030000')) def collect(original): r=body_collect(original);pe=PE(find_case(Path(original),'Neutron.exe'));sites=[] for va,want in SITES: actual=read_va(pe,va,len(bytes.fromhex(want))).hex() if actual!=want:raise ValueError(f'Changed original publication site {va:#x}') sites.append(dict(va=hex(va),file_offset=hex(pe.offset(va-pe.base)),bytes=actual)) bindings=[] for slot,target in ROOT_BINDINGS: if struct.unpack('