afdbb364ca
A twelve-agent pass over the parts of pack opening we did not understand, run against
the live client (CardsDLL slide proven, not assumed) plus static CardsDLL. Findings
below survived an adversarial verification round that corrected several of them; where
a verifier and a finder disagreed, the verifier won.
THE HEADLINE IS A NEGATIVE, and it deletes work rather than creating it. There is no
pack-inventory endpoint in FIFA 17 and there never was. Proven three independent ways:
the 48-entry UTAS route template array at 0x18021df80, a regex for "ut/" over the whole
PE, and the 125-row client action table at 0x1802caa20, which is the complete set of
requests the client can originate. "Serve the pack inventory" comes off the backlog.
The unclaimed-pack tile and My Packs are two fields on responses we already build.
Corrections to ENDPOINT_MAP.md, both freeze-risky as written:
* duplicateItemIdList is an array of OBJECTS (element parser 0x180138e10: itemId
0x16d, duplicateItemId 0xeb, itemLoans 0x16f, duplicateItemLoans 0xed), not the
int list documented at :1095 and :218. Control that this is not a misread:
dreamSquads 0xe9 in FutMoveCard genuinely is a bare int array and parses with no
inner object loop. We serve [], so this is a docs bug today and a live freeze the
moment somebody implements it from the map as written.
* FutDiscardCardServerResponse is {"items":[{"id":N}],"totalCredits":N}. There is no
top-level id. :968-971 is wrong twice over.
packContentInfo is DECORATIVE. It is read only into a store-tile view model, and
nothing compares the declared counts against the delivered itemList, so open_pack()
does not have to honour the distribution.
The reveal is entirely CLIENT-SIDE. Walkout, tiering, colours and ordering are
arithmetic over fields we already send. Genuine outstanding server work reduces to
three items: duplicates, quick-sell credit, unopenedPacks.
Perishable intel captured: the real FIFA 17 retail pack catalogue, 41 SKUs with Origin
offer ids, recovered from the client heap as a parsed copy of data/store/storecfg.xml.
It is in no file on disk, only in a running process.
futmem/ is a standalone read-only Rust crate for this kind of work (maps, find,
strings, read). Read-only by construction: it opens /proc/<pid>/mem with File::open
and there is no code path in it that can write to another process, because a live game
session depends on that. Its own [workspace] table keeps it out of the parent
workspace. Chunked scanning overlaps by pattern_len-1 so a match spanning a chunk
boundary is still found.
utas_server.py gains FUT_PORT/FUT_LOG so a throwaway instance can be started without
bouncing the one the live client is using. Defaults unchanged (8099, /tmp/utas_server.log).
Noted for the record: this edit came from a research agent that had been told not to
touch server code. It is benign and useful, but it was out of scope.
Not committed: the doc proposes ENDPOINT_MAP.md changes as pasteable text rather than
applying them, and every proposed server change defaults off per the house rule.
Nothing in this commit changes a response the client sees.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
122 lines
4.7 KiB
Python
122 lines
4.7 KiB
Python
"""D5 finishing pass: CreatePack's URL/descriptor, the pack-record constructor
|
|
defaults, the generic HTTP-error path, and the FUT store service that picks the mode.
|
|
|
|
HYPOTHESES
|
|
H6: FUN_1801342d0 is the pack-record constructor and its stores give the DEFAULT
|
|
value of every pack field when the server omits the key (critical for Q4:
|
|
what an omitted purchaseLimit/quantity/state means).
|
|
H7: the CreatePack ServerCall's URL + body builders live in a static descriptor
|
|
like the CARDPACK one at 0x1801f0458; find it by scanning .rdata/.data for the
|
|
qword 0x180162530.
|
|
H8: FUN_1801844c0 (reached from the generic slot-12 HTTP handler FUN_18016c060)
|
|
maps an HTTP status/body to a FUT error code; that is the whole error path.
|
|
|
|
CONTROL: dec(0x180162880) must be the FutCreatePack deserializer (contains atom
|
|
0xbe / a SAX loop). Printed with its length.
|
|
"""
|
|
import traceback, os, struct
|
|
|
|
OUT = "/tmp/claude-1000/-home-alex-Documents-OpenFUT/8e521ca1-ca3e-4138-bb96-df1744dd1d30/scratchpad/packres"
|
|
|
|
def w(name, text):
|
|
p = os.path.join(OUT, name)
|
|
with open(p, "w") as f:
|
|
f.write(text)
|
|
print("WROTE %s (%d bytes)" % (p, len(text)))
|
|
|
|
try:
|
|
buf = []
|
|
def P(*a):
|
|
s = " ".join(str(x) for x in a)
|
|
print(s); buf.append(s)
|
|
|
|
s = dec(0x180162880)
|
|
P("CONTROL dec(0x180162880) len=%d sax=%s" % (len(s), "FUN_1801c7f10" in s))
|
|
|
|
P("")
|
|
P("=== scan for descriptor qwords ===")
|
|
for tgt, tag in ((0x180162530, "createpack_req_ser"),
|
|
(0x180162770, "createpack_resp_factory"),
|
|
(0x180123480, "packtypes_resp_factory"),
|
|
(0x1801756d0, "packquantities_?"),
|
|
(0x180126440, "purchaseitems_req_ser")):
|
|
pat = struct.pack("<Q", tgt)
|
|
hits = find_all(pat, (".rdata", ".data"))
|
|
P(" %s %#x -> %d hits: %s" % (tag, tgt, len(hits), ["%#x" % h for h in hits]))
|
|
for h in hits:
|
|
for j in range(-8, 6):
|
|
a = h + j * 8
|
|
try:
|
|
q = qword(a)
|
|
except Exception:
|
|
continue
|
|
f = fm.getFunctionAt(addr(q)) if 0x180000000 <= q < 0x181000000 else None
|
|
extra = ""
|
|
try:
|
|
raw = read_bytes(a, 8)
|
|
if raw[0] != 0 and all(32 <= b < 127 or b == 0 for b in raw):
|
|
extra = "ascii %r" % raw
|
|
except Exception:
|
|
pass
|
|
if f is None and 0x180000000 <= q < 0x181000000:
|
|
try:
|
|
t = rd_str(q, 40)
|
|
if t and all(32 <= ord(c) < 127 for c in t):
|
|
extra += " ->str %r" % t
|
|
except Exception:
|
|
pass
|
|
P(" %+3d %#x -> %#x %s %s" % (j, a, q, f.getName() if f else "", extra))
|
|
P(" ---")
|
|
|
|
P("")
|
|
P("=== url string xrefs ===")
|
|
for va, nm in ((0x18021e670, "ut/%s/store"),
|
|
(0x18021e860, "ut/v2/%s/store"),
|
|
(0x18021e650, "ut/%s/purchased"),
|
|
(0x18021de48, "/purchasegroup"),
|
|
(0x1802203e8, "/transaction"),
|
|
(0x180223110, "CREATEPACK"),
|
|
(0x18021f2f8, "PURCHASEITEMS")):
|
|
try:
|
|
xs = xrefs_to(va)
|
|
except Exception as e:
|
|
P(" %s ERR %s" % (nm, e)); continue
|
|
P(" %-18s %#x : %s" % (nm, va, [("%#x" % f, n) for f, t, n, e2 in xs]))
|
|
|
|
w("d5_q4_notes.txt", "\n".join(buf) + "\n")
|
|
|
|
TG = {
|
|
"pack_record_ctor_1801342d0": 0x1801342d0,
|
|
"pack_record_copy_1801340e0": 0x1801340e0,
|
|
"pack_helper_180133210": 0x180133210,
|
|
"pack_helper_18012c990": 0x18012c990,
|
|
"http_err_1801844c0": 0x1801844c0,
|
|
"storeservice_180199bf0": 0x180199bf0,
|
|
"purchase_ui_1800a5650": 0x1800a5650,
|
|
"purchase_ui_1800a5f90": 0x1800a5f90,
|
|
"packpile_1800dd300": 0x1800dd300,
|
|
"call_ctor_1801623d0": 0x1801623d0,
|
|
"call_ctor_1801263a0": 0x1801263a0,
|
|
"call_ctor_1801263f0": 0x1801263f0,
|
|
"vt9_180122420": 0x180122420,
|
|
"vt_18016ca60": 0x18016ca60,
|
|
"vt_18016c950": 0x18016c950,
|
|
"vt_1801631e0": 0x1801631e0,
|
|
"fp_store_18002dd40": 0x18002dd40,
|
|
"fp_store_18002ecb0": 0x18002ecb0,
|
|
"fp_store_18002fd40": 0x18002fd40,
|
|
"fp_store_18002fff0": 0x18002fff0,
|
|
"fp_store_18002dca0": 0x18002dca0,
|
|
}
|
|
for tag, va in sorted(TG.items()):
|
|
try:
|
|
src = dec(va)
|
|
except Exception as e:
|
|
src = "// ERR %s" % e
|
|
w("d5_q4_dec_%s.txt" % tag, "// %s %#x len=%d\n" % (tag, va, len(src)) + src)
|
|
|
|
w("d5_q4_notes.txt", "\n".join(buf) + "\n")
|
|
print("DONE")
|
|
except Exception:
|
|
traceback.print_exc()
|