REDIVIVUS

Proposals / #813

Recover Mac arena-score sort list pointers

applied · by Commit-Will · submitted 2026-11-02, applied 2026-11-02

Ghidra vmac 110 · 9528519

Mac ROSTER_SortByArenaScore has undefined return, int pList and undefined4 pInsertAfter/pSorted. Full own122-byte body takes the list head in ECX, follows/rewires existing D2RosterStrc.pNext+128, compares nArenaScore+24 and explicitly returns nullable sorted head in full EAX. Type return/input/two selected locals D2RosterStrc*, preserving every name and existing Mac fastcc ECX/ESI/Stack[-0x14] storage. Complete prototype keeps exactly one4-byte ECX formal and same convention; no rename/custom-ABI workaround. Sole caller constructs member lists from typed gpRosterPlayers and stores result as the same member head before flattening roster links. Fresh target/caller raw memory(1013bytes) matches separate target and immutable recorded caller assembly; all18 pointer-flow nodes/every return/caller route verified. No calls in target, sibling-body analogy, private-group/global/layout/input-count or score-field edit. Static Mac database proof, no runtime/build claim.

Changes 3, applied together

  1. Set prototype mac 0x00075490

    signatureundefined ROSTER_SortByArenaScore(int pList)→D2RosterStrc * ROSTER_SortByArenaScore(D2RosterStrc * pList)
    convention__fastcc
  2. Retype variable mac 0x00075490 ESI

    typeundefined4→D2RosterStrc *
  3. Retype variable mac 0x00075490 Stack[-0x14]

    typeundefined4→D2RosterStrc *