"""D3: (a) the massinfo response-struct constructor, to read the DEFAULT of
+0x17c (the byte that vetoes tradingEnabled), and (b) Q3: every sibling property
publisher in the same table as FUN_18003e370, to see whether "List on Transfer
Market" has its own enable flag distinct from TO_TRADE_PILE.

(a) HYPOTHESIS: +0x17c is not written by any deserializer arm -- the
form-independent disp32 scan for 7c 01 00 00 found exactly one site inside
FUN_180174630 and it is the READ at 0x180174f12. So its value is whatever the
response struct's constructor leaves. Candidates for the constructor are the
non-deserializer slots of descriptor vtable 0x18022d000.
FALSIFIER: a constructor that memsets the whole struct to 0 makes +0x17c always
0, the veto never fires, and this whole lead dies.

(b) HYPOTHESIS: the publisher table at 0x1801f4c20 groups per-card Flash property
providers; one of the neighbours publishes the listing-panel enable flag.

CONTROL: FUN_18003e370 is in the same batch and must still come out publishing
the eight known names; FUN_18003e550 must still publish DURATION/START_PRICE/
ASKING_PRICE. Both are already established, so a deviation means the batch is
mis-addressed.
"""
import traceback

try:
    print("#" * 78)
    print("### (a) descriptor vtable 0x18022d000 non-deserializer slots")
    for slot in (0x00, 0x08, 0x10, 0x18, 0x48, 0x58, 0x68, 0x78, 0xa0, 0xa8, 0xb8):
        t = qword(0x18022D000 + slot)
        src = dec(t)
        print("=" * 78)
        print("### slot +%#05x -> %#x   len(src)=%d" % (slot, t, len(src)))
        print(src)

    print()
    print("#" * 78)
    print("### (b) sibling property publishers around 0x1801f4c20")
    SIBS = [0x18003de00, 0x18003e930, 0x18003ea90, 0x18003ecc0, 0x18003e4b0,
            0x18003e500, 0x18003e550, 0x18003e1a0, 0x18003e370, 0x18003ded0,
            0x18003ebf0, 0x18003e5f0]
    for a in SIBS:
        src = dec(a)
        print("=" * 78)
        print("### %#x  len(src)=%d" % (a, len(src)))
        print(src)
except Exception:
    traceback.print_exc()
