Recover Mac roster-name sort list-pointer contract
Ghidra vmac 110 · 9528519
Mac ROSTER_SortByName has undefined return and char* pList/pInsertAfter/pSorted metadata. These are whole D2RosterStrc nodes: complete native body follows and rewires pNext+128, compares first-member name+0 and explicitly returns the sorted nullable head in EAX. Sole caller builds member chains from typed gpRosterPlayers and stores returned EAX as the same member head before flattening through roster links. Type return/input/two selected pointer locals D2RosterStrc*, preserving every name and existing Mac fastcc ECX/EBX/Stack[-0x18] storage. Return-only prototype op leaves the old parameter declaration intact; separate storage retypes change pointer types. Full target/caller/import-thunk raw bytes(1037) independently match current assembly; all20 pointer-flow nodes, every return and caller route checked. No private-group/global/layout or alternate-sort change, Windows ABI, unknown arity, incidental-return or runtime/build claim.
Changes 4, applied together
Set prototype
mac 0x00075402signatureundefined ROSTER_SortByName(char * pList)→D2RosterStrc * ROSTER_SortByName(char * pList)convention__fastccRetype variable
mac 0x00075402 ECXtypechar *→D2RosterStrc *Retype variable
mac 0x00075402 EBXtypechar *→D2RosterStrc *Retype variable
mac 0x00075402 Stack[-0x18]typechar *→D2RosterStrc *