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>
126 lines
6.0 KiB
Python
126 lines
6.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
q_pack_inv_2 -- DIMENSION 1 (pack inventory) pass 2.
|
|
|
|
HYPOTHESES
|
|
(a) FUN_18014cc60 really is the FutCreateUserServerResponse deserializer, so its
|
|
atom->type mapping (bonusPacks=BOOL, login=OBJECT->userInfo deser,
|
|
starterPack=ARRAY-of-ITEM) supersedes ENDPOINT_MAP.md's typing.
|
|
(b) userInfo.unopenedPacks pushes (preOrderPacks+recoveredPacks) into a global
|
|
model through singleton FUN_18011a830 -> vtbl[0x4e0]. That setter's member is
|
|
readable by a UI surface; find the setter, the member offset, and the readers.
|
|
(c) atom 0x20d "packList" is a real key somewhere. If any deserializer dispatches
|
|
on it, that is the pack-inventory response we have never modelled.
|
|
(d) ut/%s/purchased (FutGetPurchasedItemsServerResponse) is the only route that
|
|
lists already-owned-but-unrevealed things.
|
|
|
|
CONTROLS
|
|
* class_deser on FULL class names must return the three known-good deserializers:
|
|
FutSquadSaveServerResponse -> 0x180171a60
|
|
FutSquadListServerResponse -> 0x180172140
|
|
FutCreateMatchServerResponse -> 0x180120380
|
|
(pass 1 called class_deser("FutSquadSave") and got nothing -- the literal is the
|
|
FULL name, there is no bare "FutSquadSave\\0" in the image. Not a harness bug.)
|
|
* The atom-immediate scanner is controlled with atom 0x2cd (squad), which MUST be
|
|
found inside FUN_18014cc60, and 0x35e (unopenedPacks) inside FUN_18013ec10.
|
|
* Every decompile prints len(src) first and is dumped whole.
|
|
"""
|
|
import struct
|
|
import traceback
|
|
|
|
OUT = "/tmp/claude-1000/-home-alex-Documents-OpenFUT/8e521ca1-ca3e-4138-bb96-df1744dd1d30/scratchpad/packres"
|
|
|
|
ATOM_NAMES = {
|
|
0x5d: "bonusPacks", 0xbc: "count", 0x1a5: "login", 0x20c: "packContentInfo",
|
|
0x20d: "packList", 0x24b: "preOrderPacks", 0x262: "purchased",
|
|
0x27b: "recoveredPacks", 0x2cd: "squad", 0x2e5: "starterPack",
|
|
0x35d: "unopened", 0x35e: "unopenedPacks", 0x36d: "userData",
|
|
}
|
|
|
|
try:
|
|
print("########## CONTROL BLOCK ##########")
|
|
want = {"FutSquadSaveServerResponse": 0x180171a60,
|
|
"FutSquadListServerResponse": 0x180172140,
|
|
"FutCreateMatchServerResponse": 0x180120380}
|
|
for nm, w in want.items():
|
|
got = sorted(set(x[0] for x in class_deser(nm)))
|
|
print("CONTROL class_deser(%-32s) -> %s expect %#x %s"
|
|
% (nm, [hex(g) for g in got], w, "PASS" if w in got else "FAIL"))
|
|
|
|
print("\n--- class_deser on the classes this dimension needs ---")
|
|
for nm in ("FutCreateUserServerResponse", "FutGetPurchasedItemsServerResponse",
|
|
"FutStoreGetPackTypesServerResponse", "FutGetUserInfoServerResponse",
|
|
"FutStoreVoucherRefreshResponse", "FutGetUserActionServerResponse",
|
|
"FutUpdateUserActionServerResponse"):
|
|
got = sorted(set(x[0] for x in class_deser(nm)))
|
|
print(" %-42s -> %s" % (nm, [hex(g) for g in got]))
|
|
|
|
print("\n########## ATOM IMMEDIATE SCAN (.text) ##########")
|
|
print("(a hit is a 32-bit LE immediate equal to the atom; noisy by nature, so")
|
|
print(" only functions that ALSO call the FNV hasher 0x180180d00 are flagged HOT)")
|
|
hashers = set()
|
|
for (fr, ty, fn, en) in xrefs_to(0x180180d00):
|
|
if en:
|
|
hashers.add(en)
|
|
print("functions calling FNV 0x180180d00: %d" % len(hashers))
|
|
for atom in sorted(ATOM_NAMES):
|
|
pat = struct.pack("<I", atom)
|
|
hits = find_all(pat, blocks=(".text",))
|
|
fns = {}
|
|
for h in hits:
|
|
f = fm.getFunctionContaining(addr(h))
|
|
if f is None:
|
|
continue
|
|
e = int(f.getEntryPoint().getOffset())
|
|
fns.setdefault(e, 0)
|
|
fns[e] += 1
|
|
hot = [(e, c) for e, c in fns.items() if e in hashers]
|
|
print("\natom %#x %-16s : %d raw immediates, %d functions, %d HOT (parser-like)"
|
|
% (atom, ATOM_NAMES[atom], len(hits), len(fns), len(hot)))
|
|
for e, c in sorted(hot):
|
|
f = fm.getFunctionContaining(addr(e))
|
|
print(" HOT %#x %-40s x%d" % (e, f.getName(), c))
|
|
|
|
print("\n########## unopenedPacks CONSUMER CHAIN ##########")
|
|
src = dec(0x18011a830)
|
|
print("--- FUN_18011a830 (model singleton getter) len=%d" % len(src))
|
|
print(src)
|
|
open(OUT + "/d1_singleton_18011a830.txt", "w").write(src)
|
|
|
|
# find the vtable that singleton objects use: look at callers of 18011a830
|
|
# that then call [vtbl+0x4e0]; the deser at 0x18013ec10 does exactly that.
|
|
print("\n--- callers of FUN_18011a830 : %d" % len(xrefs_to(0x18011a830)))
|
|
for (fr, ty, fn, en) in xrefs_to(0x18011a830):
|
|
print(" %#x %-10s %s @%#x" % (fr, ty, fn, en))
|
|
|
|
print("\n########## FUN_180142470 (CreateUser userData handler) ##########")
|
|
s2 = dec(0x180142470)
|
|
print("len=%d" % len(s2))
|
|
print(s2)
|
|
open(OUT + "/d1_userdata_180142470.txt", "w").write(s2)
|
|
|
|
print("\n########## STRING XREFS ##########")
|
|
STRS = {
|
|
0x18021e650: "ut/%s/purchased", 0x18021de48: "/purchasegroup",
|
|
0x18021e670: "ut/%s/store", 0x1801ec008: "mypacks",
|
|
0x180231cb0: "packList", 0x18022fdc8: "unopened",
|
|
0x18022fdd8: "unopenedPacks", 0x18022f698: "starterPack",
|
|
0x180230490: "bonusPacks", 0x180232020: "preOrderPacks",
|
|
0x1802322e0: "recoveredPacks", 0x1802099c8: "CentralUnclaimedPack",
|
|
0x1802099e0: "CentralUnclaimedPack2", 0x1801eecd0: "futopenpackanimviewmodel",
|
|
0x180231ca0: "packContentInfo", 0x180231c98: "packId",
|
|
0x1801f0560: "{items:{pack:[...]}}", 0x180200748: "starting_pack_opened",
|
|
0x18021f2b8: "PurchasedItems", 0x18021f308: "StorePackTypes",
|
|
0x18021f328: "StorePackQuantities", 0x1801ef798: "GetPurchasedItems",
|
|
0x1801f4e48: "PurchasePack", 0x18021cf50: "FUT Purchased Items",
|
|
}
|
|
for va in sorted(STRS):
|
|
xr = xrefs_to(va)
|
|
print("\n%#x %-26r : %d refs (%r)" % (va, STRS[va], len(xr), rd_str(va, 90)))
|
|
for (fr, ty, fn, en) in xr[:12]:
|
|
print(" %#x %-10s %s @%#x" % (fr, ty, fn, en))
|
|
|
|
print("\nDONE q_pack_inv_2")
|
|
except Exception:
|
|
traceback.print_exc()
|