"""ESTABLISHED: model+0x1fd2e = (settings response+0x50 == 1), fed by deser case 0x336 = atom "tradingEnabled" as a configs[] type-string. The applier DOES run (model+0x1fd28=60 live and the applier is its only writer), so with configs:[] every field keeps the response-object CONSTRUCTOR DEFAULT. NOW: enumerate every CALLER of the trading gate accessor vt+0x270 (FUN_18011c670), form-independently, by scanning .text for all ff /2 encodings of call [reg+0x270], and decompile the market/tradepile surfaces. CONTROL: also scan for call [reg+0xa58] (TRADE_PILE_SIZE, known to be read by the publisher FUN_18000d550) -- if that scan finds FUN_18000d550 the scan form is good. """ import traceback, struct try: tstart = None for b in mem.getBlocks(): if b.getName() == ".text": tstart = int(b.getStart().getOffset()) tb = read_bytes(tstart, int(b.getEnd().getOffset()) - tstart + 1) print(".text len", len(tb)) def call_sites(slot): """all `call [reg+disp32]` (ff /2) with disp32 == slot""" out = [] d = struct.pack("