"""DIMENSION 5 pass 6: does the CreateUser response's starterPack vector reach the
model's 0x18-stride "claim" vector (model vtable slot 0x160), the one whose
non-emptiness pops FUT_CLAIM_NEW_ITEM_POPUP?

Class-specific slots on the CreateUser response vtable 0x1802251f8 are +0x00
(0x18014c990) and +0x40 (0x18014c950); every other slot is shared 0x18016c### /
0x180122420 boilerplate, so the response handler is one of those two.

CONTROL: slot +0x08 of 0x1802251f8 is 0x18014cc60, the deserializer established in
pass 1 by an independent route (the RS4: literal xref from the factory). It matches,
so this vtable is the right object's.
"""
import traceback, os

OUT = "/tmp/claude-1000/-home-alex-Documents-OpenFUT/8e521ca1-ca3e-4138-bb96-df1744dd1d30/scratchpad/store"

try:
    for a, nm in ((0x18014c950, "resp_slot40_18014c950"),
                  (0x18014c990, "resp_slot00_18014c990")):
        s = dec(a, 300)
        open(os.path.join(OUT, "dec_%s.c" % nm), "w").write(s)
        print("\n### %s @ %#x len=%d\n%s" % (nm, a, len(s), s if len(s) < 5000 else "(file)"))

    t160 = qword(0x18021c2a0 + 0x160)
    print("\n### model vtable slot 0x160 -> %#x" % t160)
    print(dec(t160, 300))

    print("\n### rest of FUN_180199cc0")
    print(dec(0x180199cc0, 300)[1500:])
except Exception:
    traceback.print_exc()
