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>
92 lines
4.3 KiB
Python
92 lines
4.3 KiB
Python
"""D3 run 5: the response objects' own virtuals, and who sizes the pack reveal.
|
|
|
|
SETTLED SO FAR
|
|
Pack record (0x158 bytes) lifecycle inside CardsDLL is a CLOSED graph:
|
|
0x1801234e0 root deser -> 0x18013af30 element deser -> ctor 0x1801342d0,
|
|
push_back 0x180132180 (-> uninit_copy 0x180133210, copy-assign 0x1801340e0),
|
|
stack copy destroyed by 0x1801232a0; vector freed by 0x180123200, whose only
|
|
caller is the response object's scalar_deleting_destructor 0x1801233e0.
|
|
Nothing else in .text constructs, copies or destroys one.
|
|
FutStoreGetPackTypesServerResponse vtable = 0x18021dd68 (referenced only by its
|
|
ctor 0x180123030). Pack vector at obj+0x28/0x30/0x38, timestamp obj+0x5c.
|
|
FutCreatePackServerResponse vtable = 0x180228260, deser 0x180162880:
|
|
numberItems(0x1dd) -> obj+0x28 (raw 8-byte store), itemList(0x16e) -> vector
|
|
obj+0x30/0x38/0x40 with 0x18-byte elements, purchasedPackId(0x264) -> obj+0x70.
|
|
|
|
THIS RUN
|
|
A. Decompile every class-specific virtual of both response objects. The two
|
|
classes share slots +0x10..+0x38 and +0x48..+0x68 (generic base) but differ at
|
|
+0x00 and +0x40, so +0x40 is where per-class behaviour lives.
|
|
B. Find the RPC/command strings STOREPACKTYPES and CREATEPACK and their xrefs, to
|
|
reach the code that consumes each response.
|
|
C. Ask directly whether the reveal is sized from numberItems (obj+0x28) or from
|
|
the itemList vector length: enumerate readers of the CreatePack object.
|
|
CONTROL for B: the string "CREATEPACK" is written into the pack record by its own
|
|
ctor at rec+0xd8, so at least that xref must come back; if the string search
|
|
returns nothing at all the search is broken.
|
|
"""
|
|
import traceback, sys, os
|
|
|
|
OUT = "/tmp/claude-1000/-home-alex-Documents-OpenFUT/8e521ca1-ca3e-4138-bb96-df1744dd1d30/scratchpad/packres/"
|
|
os.makedirs(OUT, exist_ok=True)
|
|
|
|
|
|
def dump(tag, va, path, echo=True):
|
|
src = dec(va)
|
|
hdr = "%s %#x fname=%s len(src)=%d (FULL, NOT TRUNCATED)" % (
|
|
tag, va, fname(va), len(src))
|
|
if echo:
|
|
print("=" * 78)
|
|
print(hdr)
|
|
print("=" * 78)
|
|
print(src)
|
|
with open(path, "w") as fh:
|
|
fh.write("// " + hdr + "\n" + src)
|
|
return src
|
|
|
|
|
|
try:
|
|
print("### A. CLASS-SPECIFIC VIRTUALS")
|
|
for va, tag in ((0x180123030, "FutStoreGetPackTypes ctor"),
|
|
(0x1801233e0, "FutStoreGetPackTypes scalar_deleting_dtor"),
|
|
(0x1801233a0, "FutStoreGetPackTypes vtbl+0x40"),
|
|
(0x180123100, "0x158-stride helper near store class"),
|
|
(0x180122420, "shared vtbl+0x20"),
|
|
(0x180162420, "FutCreatePack ctor"),
|
|
(0x1801624e0, "FutCreatePack scalar_deleting_dtor"),
|
|
(0x1801624a0, "FutCreatePack vtbl+0x40"),
|
|
(0x18014c990, "0x158 ADD (unclassified)")):
|
|
try:
|
|
dump(tag, va, OUT + "d3_v_%x.txt" % va, echo=True)
|
|
print(" callers: %s" % [(hex(a), n) for a, n in callers(va)])
|
|
except Exception as e:
|
|
print(" !! %s: %s" % (tag, e))
|
|
|
|
print("\n### B. COMMAND STRINGS")
|
|
for s in (b"STOREPACKTYPES\x00", b"CREATEPACK\x00", b"V2STORE\x00",
|
|
b"STOREPACKQUANTITIES\x00", b"PURCHASEDITEMS\x00"):
|
|
hits = find_all(s)
|
|
print(" %-24s hits=%s" % (s.decode(errors="replace").strip("\x00"),
|
|
[hex(x) for x in hits]))
|
|
for h in hits:
|
|
for frm, typ, fn, ent in xrefs_to(h):
|
|
print(" xref %#x %s in %s" % (frm, typ, fn))
|
|
|
|
print("\n### C. WHO READS THE RESPONSE OBJECTS")
|
|
for vt, nm in ((0x18021dd68, "FutStoreGetPackTypes vtable"),
|
|
(0x180228260, "FutCreatePack vtable")):
|
|
print(" xrefs to %s %#x:" % (nm, vt))
|
|
for frm, typ, fn, ent in xrefs_to(vt):
|
|
print(" %#x %s %s" % (frm, typ, fn))
|
|
|
|
print("\n### C2. every .text reference to the two vtable ADDRESSES as immediates")
|
|
for vt in (0x18021dd68, 0x180228260):
|
|
pat = vt.to_bytes(8, "little")
|
|
for h in find_all(pat, blocks=(".text", ".rdata", ".data")):
|
|
f = fm.getFunctionContaining(addr(h))
|
|
print(" vtbl %#x embedded at %#x in %s"
|
|
% (vt, h, f.getName() if f else "(data)"))
|
|
except Exception:
|
|
traceback.print_exc()
|
|
sys.stdout.flush()
|