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>
117 lines
4.3 KiB
Python
117 lines
4.3 KiB
Python
"""D5 last pass: the endpoint table (call-id -> URL), CreatePack's URL builder,
|
|
who sets the CreatePack purchase MODE, and the PurchaseItems response defaults.
|
|
|
|
HYPOTHESES
|
|
H9: every FUT ServerCall carries a numeric id (CreatePack=0x4b, PurchaseItems=0x4c,
|
|
passed to FUN_18016be60) and a table near 0x18021e100 maps id -> URL format
|
|
string ("ut/%s/store", "ut/%s/purchased", ...).
|
|
H10: FUN_180124ad0 is CreatePack's URL builder and it emits the "store/transaction"
|
|
path we already see on the wire.
|
|
H11: the mode field at +0x20 of the CreatePack call (0=COINS,1=MTX,2=POINTS,4=preorder)
|
|
is set by whoever constructs it; callers of FUN_1801623d0 will show the choice.
|
|
|
|
CONTROL: dec(0x180162530) reprinted (known: writes packId/useCredits/usePreOrder/currency).
|
|
"""
|
|
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(0x180162530)
|
|
P("CONTROL dec(0x180162530) len=%d has_MTX=%s has_COINS=%s"
|
|
% (len(s), '"MTX"' in s, '"COINS"' in s))
|
|
|
|
P("")
|
|
P("=== endpoint table 0x18021e080..0x18021e900 ===")
|
|
a = 0x18021e080
|
|
while a < 0x18021e900:
|
|
try:
|
|
q = qword(a)
|
|
except Exception as e:
|
|
P(" %#x ERR %s" % (a, e)); a += 8; continue
|
|
f = fm.getFunctionAt(addr(q)) if 0x180000000 <= q < 0x181000000 else None
|
|
extra = ""
|
|
if 0x180000000 <= q < 0x181000000 and f is None:
|
|
try:
|
|
t = rd_str(q, 60)
|
|
if t and all(32 <= ord(c) < 127 for c in t):
|
|
extra = "->str %r" % t
|
|
except Exception:
|
|
pass
|
|
P(" %#x -> %#x %s %s" % (a, q, f.getName() if f else "", extra))
|
|
a += 8
|
|
|
|
P("")
|
|
P("=== createpack req vtable 0x180214d40..0x180214e10 ===")
|
|
a = 0x180214d40
|
|
while a < 0x180214e10:
|
|
q = qword(a)
|
|
f = fm.getFunctionAt(addr(q)) if 0x180000000 <= q < 0x181000000 else None
|
|
P(" +%03x %#x -> %#x %s" % (a - 0x180214d40, a, q, f.getName() if f else ""))
|
|
a += 8
|
|
|
|
P("")
|
|
for callee, tag in ((0x1801623d0, "createpack_call_ctor"),
|
|
(0x1801263a0, "purchaseitems_call_ctor"),
|
|
(0x18016be60, "servercall_base_ctor"),
|
|
(0x180124ad0, "maybe_createpack_url")):
|
|
try:
|
|
cs = callers(callee)
|
|
except Exception as e:
|
|
P("CALLERS %s ERR %s" % (tag, e)); continue
|
|
P("CALLERS of %-26s %#x : %s" % (tag, callee, [("%#x" % c, n) for c, n in cs][:30]))
|
|
try:
|
|
xs = xrefs_to(callee)
|
|
P(" xrefs: %s" % [("%#x" % f2, t, n) for f2, t, n, e2 in xs][:30])
|
|
except Exception:
|
|
pass
|
|
|
|
w("d5_q5_notes.txt", "\n".join(buf) + "\n")
|
|
|
|
TG = {"createpack_url_180124ad0": 0x180124ad0,
|
|
"createpack_x_180162c90": 0x180162c90,
|
|
"servercall_base_ctor_18016be60": 0x18016be60,
|
|
"purchaseitems_resp_ctor_18002d460": 0x18002d460,
|
|
"fp_18002ee50": 0x18002ee50,
|
|
"fp_18002ed20": 0x18002ed20,
|
|
"fp_18002f1b0": 0x18002f1b0,
|
|
"fp_18002f0b0": 0x18002f0b0,
|
|
"fp_18002f920": 0x18002f920,
|
|
"generic_180068320": 0x180068320,
|
|
"packtypes_url_180123430": 0x180123430}
|
|
for tag, va in sorted(TG.items()):
|
|
try:
|
|
src = dec(va)
|
|
except Exception as e:
|
|
src = "// ERR %s" % e
|
|
w("d5_q5_dec_%s.txt" % tag, "// %s %#x len=%d\n" % (tag, va, len(src)) + src)
|
|
|
|
# who constructs the createpack call -> the mode
|
|
ctor_callers = set()
|
|
for c, n in callers(0x1801623d0):
|
|
ctor_callers.add(int(c))
|
|
for frm, typ, fn, ent in xrefs_to(0x1801623d0):
|
|
if ent:
|
|
ctor_callers.add(int(ent))
|
|
txt = []
|
|
for e in sorted(ctor_callers):
|
|
src = dec(e)
|
|
txt.append("// ===== caller of createpack ctor %#x %s len=%d\n%s" % (e, fname(e), len(src), src))
|
|
w("d5_q5_createpack_callers.txt", "\n".join(txt) if txt else "// none found\n")
|
|
|
|
w("d5_q5_notes.txt", "\n".join(buf) + "\n")
|
|
print("DONE")
|
|
except Exception:
|
|
traceback.print_exc()
|