Recover Mac arena-score sort list pointers
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
Set prototype
mac 0x00075490signatureundefined ROSTER_SortByArenaScore(int pList)→D2RosterStrc * ROSTER_SortByArenaScore(D2RosterStrc * pList)convention__fastccRetype variable
mac 0x00075490 ESItypeundefined4→D2RosterStrc *Retype variable
mac 0x00075490 Stack[-0x14]typeundefined4→D2RosterStrc *