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>
113 lines
4.3 KiB
Python
113 lines
4.3 KiB
Python
"""DIMENSION 2 batch 3.
|
|
|
|
HYPOTHESES
|
|
H1 FUN_180028b50 is the Scaleform command registrar (CardsDiscardCard,
|
|
CardsDiscardCardList, CardsDiscardCardByRes, CardsSwapCards, CardsMoveCard,
|
|
RemoveFromTradePile, RemoveAllSoldFromTradePile). Each registration row
|
|
carries the C++ handler, which is the UI entry point for quick sell / move.
|
|
H2 FUN_1800394c0 is the Scaleform getter registrar (GetCardDuplicate,
|
|
GetTradePileResults, AddCardBackToTradePile). GetCardDuplicate's handler
|
|
reads the card field that createPack's duplicateItemIdList post-pass wrote.
|
|
H3 The int at row+8 of the action table 0x1802cb000 indexes the ut/%s/... URL
|
|
template array. Print that array so DiscardCard=0xf etc. can be resolved
|
|
rather than guessed from .rdata ordering.
|
|
H4 The request factories 0x180123cc0/cd0/ce0 (DiscardACard/DiscardCard/
|
|
DiscardCardByRes), 0x1801241f0 (MoveCard), 0x180124830 (SwapCard) build the
|
|
request objects; their serializers give the request body.
|
|
|
|
CONTROL: FutSquadSaveServerResponse -> 0x180171a60 (re-checked in this batch).
|
|
"""
|
|
import traceback, os
|
|
|
|
OUT = "/tmp/claude-1000/-home-alex-Documents-OpenFUT/8e521ca1-ca3e-4138-bb96-df1744dd1d30/scratchpad/packres"
|
|
|
|
|
|
def dump(name, text):
|
|
with open(os.path.join(OUT, name), "w") as f:
|
|
f.write(text)
|
|
print("[wrote %s %d chars]" % (name, len(text)))
|
|
|
|
|
|
def show(label, va, save=None):
|
|
s = dec(va)
|
|
print("-" * 74)
|
|
print("%s %#x len(src)=%d" % (label, va, len(s)))
|
|
print(s)
|
|
if save:
|
|
dump(save, s)
|
|
return s
|
|
|
|
|
|
try:
|
|
print("CONTROL FutSquadSaveServerResponse ->",
|
|
[hex(a) for a, v, e in class_deser("FutSquadSaveServerResponse")])
|
|
|
|
print("=" * 78)
|
|
print("SECTION 1 -- URL template pointer array (find the array that holds "
|
|
"0x18021e490 'ut/%s/item')")
|
|
tgt = 0x18021E490
|
|
for r in xrefs_to(tgt):
|
|
print(" xref to ut/%%s/item %#x %s %s %#x" % (r[0], r[1], r[2], r[3]))
|
|
# scan .data/.rdata for a qword equal to the auctionhouse template, then walk
|
|
for probe in (0x18021E308,):
|
|
import struct
|
|
hits = find_all(struct.pack("<Q", probe))
|
|
print(" qword-hits for auctionhouse template:", [hex(h) for h in hits])
|
|
for h in hits:
|
|
print(" --- array starting %#x ---" % h)
|
|
for i in range(60):
|
|
va = h + i * 8
|
|
try:
|
|
q = qword(va)
|
|
except Exception:
|
|
break
|
|
s = ""
|
|
if 0x1801E5000 <= q <= 0x180290000:
|
|
try:
|
|
s = rd_str(q, 60)
|
|
except Exception:
|
|
pass
|
|
print(" [%2d] %#x -> %#x %r" % (i, va, q, s))
|
|
|
|
print("=" * 78)
|
|
print("SECTION 2 -- Scaleform command registrar FUN_180028b50")
|
|
s = dec(0x180028B50)
|
|
print("len(src) =", len(s))
|
|
dump("d2_scaleform_cmd_registrar.txt", s)
|
|
for ln in s.splitlines():
|
|
if any(k in ln for k in ("Discard", "SwapCard", "MoveCard", "TradePile",
|
|
"Duplicate", "QuickSell", "Sell")):
|
|
print(" ", ln.strip())
|
|
|
|
print("=" * 78)
|
|
print("SECTION 3 -- Scaleform getter registrar FUN_1800394c0")
|
|
s = dec(0x1800394C0)
|
|
print("len(src) =", len(s))
|
|
dump("d2_scaleform_get_registrar.txt", s)
|
|
for ln in s.splitlines():
|
|
if any(k in ln for k in ("Duplicate", "TradePile", "Discard", "Sell")):
|
|
print(" ", ln.strip())
|
|
|
|
print("=" * 78)
|
|
print("SECTION 4 -- request factories")
|
|
for lbl, va in (("DiscardACard", 0x180123CC0), ("DiscardCard", 0x180123CD0),
|
|
("DiscardCardByRes", 0x180123CE0), ("MoveCard", 0x1801241F0),
|
|
("MoveCardByRes", 0x180124200), ("SwapCard", 0x180124830),
|
|
("ViewCards", 0x180124900)):
|
|
show("factory " + lbl, va)
|
|
|
|
print("=" * 78)
|
|
print("SECTION 5 -- FutDiscardCard response vtable 0x180220488")
|
|
for off, t, n in vtable(0x180220488, 12):
|
|
print(" +%#04x -> %#x %s" % (off, t, n))
|
|
print(" ctor/xrefs to vtable:")
|
|
for r in xrefs_to(0x180220488):
|
|
print(" ", hex(r[0]), r[1], r[2], hex(r[3]))
|
|
print(" xrefs to factory 0x180127160 / 0x180127630:")
|
|
for f in (0x180127160, 0x180127630):
|
|
for r in xrefs_to(f):
|
|
print(" ", hex(f), "<-", hex(r[0]), r[1], r[2], hex(r[3]))
|
|
|
|
except Exception:
|
|
traceback.print_exc()
|