"""Q2 — the sold vocabulary: SoldBid / SoldBuyNow / SoldFromTradePile / sold, the coinsProcessed -> COINS_AWARDED path, and the route table (clear-sold?). """ print("=" * 78) print("== neighbourhood of SoldBid/SoldBuyNow (0x1802302cf) — read the whole table") print("=" * 78) a = 0x180230280 while a < 0x180230400: s = rd_str(a, 60) if s and len(s) > 1 and s.isprintable(): print(f" 0x{a:x} {s!r}") a += len(s.encode()) + 1 else: a += 1 print() print("=" * 78) print("== xrefs to each sold-ish string") print("=" * 78) for name, sa in (("sold@228bed", 0x180228BED), ("sold@22f524", 0x18022F524), ("SoldFromTradePile", 0x1801EFAF1), ("SoldBid", 0x1802302CF), ("SoldBuyNow", 0x1802302DF), ("SOLD@20a0c7", 0x18020A0C7)): xs = xrefs_to(sa) print(f" {name:20s} {len(xs)} xref(s)") for x in xs[:8]: print(f" from 0x{x[0]:x} {x[1]} in {x[2]} (entry 0x{x[3]:x})") print() print("=" * 78) print("== who reads record +0xbf (COINS_AWARDED) / +0xbe (INBOX) / +0xbd (IS_GLOW)") print("== i.e. the deserializer's coinsProcessed + the two computed flags") print("=" * 78) print("-- decoder for atom 0x2f4 (coinsProcessed): FUN_1800d7b50") print(dec(0x1800D7B50)) print() print("=" * 78) print("== route table 0x18021df80 — all 45 rows, looking for a clear/sold route") print("=" * 78) for i in range(48): ea = 0x18021DF80 + i * 8 try: p = qword(ea) except Exception: break s = "" if 0x180000000 < p < 0x180400000: s = rd_str(p, 120) print(f" [{i:2d}] 0x{ea:x} -> 0x{p:x} {s!r}")