"""HYPOTHESIS: model+0x1fd2e (IS_TRADING_ENABLED) reads 0 either because the constructor defaults it to 0 (never set) or because FUN_18011dc50 ran and wrote 0. The disp32 scan found only 2 sites for 0x1fd2e, so the constructor must initialise it as part of a WIDER store (qword/xmm) whose displacement is lower. Find the model constructor via rip-refs to vtable 0x18021c2a0 and read the initialising store. CONTROL: +0x1fd3a/+0x1fd3d read 1 live; whatever store covers them must produce 1, so the same store decoded for 0x1fd2e is trustworthy. ALSO: locate the transfer-market refusal path (route literal, CARDS_CB_ERR_* xrefs). """ import traceback, struct try: VT = 0x18021c2a0 print("=== A. xrefs to model vtable %#x ===" % VT) for frm, typ, fn, ent in xrefs_to(VT): print(" %#x %-14s %-40s ent=%#x" % (frm, typ, fn, ent)) print("\n=== B. disp32 scan .text for displacements 0x1fd00..0x1fd60 ===") tb = None for b in mem.getBlocks(): if b.getName() == ".text": tstart = int(b.getStart().getOffset()) tlen = int(b.getEnd().getOffset()) - tstart + 1 tb = read_bytes(tstart, tlen) print(" .text len =", len(tb)) hitmap = {} for disp in range(0x1fd00, 0x1fd60): pat = struct.pack("