43557989f5
The subsystem that was fully greyed-out this morning now lists a card on the transfer
market: price screen, Submit, "your item is now up for trade", TRANSFER LIST 0/100,
auctionCount 1, and STORE.listings() holds the auction. Every step verified at the
instruction level first, then confirmed live. Three fixes, all behind flags, all off by
default until this run proved them.
1. WE WERE BANNING OUR OWN TRADING. userInfo.feature (atom 0x11c) is a RESTRICTION map,
not a grant; we sent feature={"trade":true}, which is a trade BAN. Verified in
q_feature_trade.py: FUN_18013ec10 parses feature/trade into userInfo+0x17c, and at
the massinfo END_OBJECT the client runs
cmp byte [rsi+0x17c],0 / jz skip / mov dword [rsi+0x50],0
feeding applier 0x18011dc91 -> IS_TRADING_ENABLED (model+0x1fd2e) = 0. It runs LAST
and unconditionally, which is why the gate read 0 all day regardless of /settings or
the Blaze config store. FUT_TRADING sends feature={} instead. Live: gate flipped
0 -> 1 on UT re-entry (model rebuilt, pointer changed, byte read 1).
2. TRANSFER LIST CAPACITY 0/0. pileSizeClientData (massinfo atom 0x227, parser
0x18013adb0) is the capacity, NOT the "MY CLUB counter" the old comment claimed.
Verified in q_pilesize_keys.py: exactly two storing arms, key 2 -> model+0x1fd1c
(TRADE_PILE_SIZE) and key 4 -> +0x1fd20 (watch list), every other key SKIP'd. The old
code would have sprayed the 246 club count into the capacity. FUT_PILESIZES sends
key 2 = 100, key 4 = 50. Live: capacity read 0 -> 100, header showed 0/100.
3. THE PRICE SCREEN FROZE THE CLIENT. GET marketdata/pricelimits was answered with an
OBJECT {minPrice,maxPrice}; the deser 0x180163ee0 reads a BARE TOP-LEVEL ARRAY
(root loop while tok != 0xd), so object-where-array desynced the SAX reader into the
0x1801c7f1a busy loop (confirmed live: utime climbing 227 ticks/s, core pinned).
Verified in q_pricelimits.py: element fields defId 0xcf, maxPrice 0x1c2, minPrice
0x1ca, all scalar ints. marketdata_route now returns a bare array, one element per
requested defId. Live: price screen opened and Submit succeeded.
Corrected along the way, all now in the code: two prior "trading root causes" from
earlier today were wrong (the Blaze IS_TRADING_ENABLED keys are output-only names, and
the applier is a virtual method at vtable+0x988, not unreachable). Those refutations are
recorded in blaze_responder_v3b.py and the doc.
Also lands the transfer-market recon doc (plan-2026-08-06-transfer-market.md) and the
market Ghidra query set.
Server-authoritative economy note: the 5% transfer fee and the price bands (currently a
150..15000 placeholder per defId) are not yet real; that is refinement, not a freeze.
The live-auction market SCREEN ("List on Transfer Market" browse) is a separate surface
still to do (P4 auction-counts route, P5 empty market bodies).
Live: 439 contract checks pass. Card listed and persisted, auctionCount 1.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
69 lines
2.9 KiB
Python
69 lines
2.9 KiB
Python
"""Final closer: is FUN_180173e00 (the massInfo callback) the ONLY route to the
|
|
capacity applier, and what is the constructor default of model+0x1fd1c?
|
|
|
|
If vt+0x998 has exactly one call site, then pileSizeClientData inside userMassInfo is
|
|
the ONLY way to set TRANSFER LIST capacity, and no other endpoint can be blamed or
|
|
used.
|
|
|
|
SEARCH FORM -- the trap that produced the "applier is unreachable" error before:
|
|
a virtual call is `ff /2` with a disp, and Ghidra does not resolve it, so a
|
|
direct-call/xref search finds NOTHING. I enumerate the ModRM byte myself for
|
|
disp32 form (ff 90..97 excluding 94 which needs SIB) over the whole .text.
|
|
CONTROL: the same scan for vt+0x988 (FUN_18011dc50) must reproduce the two known
|
|
sites 0x18011e21a and 0x180173f0b. If it does not, the scan is wrong and neither
|
|
result may be used.
|
|
|
|
Also: constructor default. I find the writers of 0x1fd1c by raw disp32 (0x1fd1c is
|
|
far too large for disp8, so the 4 literal bytes appear in every encoding) and print
|
|
each with its containing function -- the same form-independent search that located
|
|
the +0x1fd2e writer.
|
|
"""
|
|
import struct, traceback
|
|
|
|
try:
|
|
def sect(name):
|
|
for b in mem.getBlocks():
|
|
if b.getName() == name:
|
|
return int(b.getStart().getOffset()), int(b.getEnd().getOffset()) - int(b.getStart().getOffset()) + 1
|
|
TB, TS = sect(".text")
|
|
TEXT = read_bytes(TB, TS)
|
|
print("text len", len(TEXT))
|
|
|
|
def vcalls(slot):
|
|
"""every `call [reg+slot]` in disp32 form: ff 90..97 (skip 94=SIB) + imm32"""
|
|
out = []
|
|
d = struct.pack("<I", slot)
|
|
for modrm in list(range(0x90, 0x98)):
|
|
if modrm == 0x94:
|
|
continue
|
|
pat = bytes([0xFF, modrm]) + d
|
|
j = TEXT.find(pat)
|
|
while j != -1:
|
|
out.append((TB + j, modrm))
|
|
j = TEXT.find(pat, j + 1)
|
|
# rex-prefixed forms are identical bytes after the rex, which the scan above
|
|
# already lands on because it does not anchor to the rex byte
|
|
return sorted(out)
|
|
|
|
for slot, note in [(0x988, "CONTROL: gate applier FUN_18011dc50, known sites "
|
|
"0x18011e21a and 0x180173f0b"),
|
|
(0x998, "the CAPACITY applier FUN_18011dbf0"),
|
|
(0xa58, "TRADE_PILE_SIZE reader")]:
|
|
hits = vcalls(slot)
|
|
print("\n=== call [reg+%#x]: %d site(s) %s" % (slot, len(hits), note))
|
|
for a, m in hits:
|
|
f = fm.getFunctionContaining(addr(a))
|
|
print(" %#x modrm=%#x in %s" % (a, m, f.getName() if f else "?"))
|
|
|
|
print("\n\n=== raw disp32 scan: every reference to +0x1fd1c ===")
|
|
pat = struct.pack("<I", 0x1fd1c)
|
|
j = TEXT.find(pat)
|
|
while j != -1:
|
|
a = TB + j
|
|
f = fm.getFunctionContaining(addr(a))
|
|
print(" %#x in %s bytes[-6..+10]=%s"
|
|
% (a, f.getName() if f else "?", read_bytes(a - 6, 16).hex()))
|
|
j = TEXT.find(pat, j + 1)
|
|
except Exception:
|
|
traceback.print_exc()
|