REDIVIVUS

Proposals / #807

Recover Mac roster-name sort list-pointer contract

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

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

  1. Set prototype mac 0x00075402

    signatureundefined ROSTER_SortByName(char * pList)→D2RosterStrc * ROSTER_SortByName(char * pList)
    convention__fastcc
  2. Retype variable mac 0x00075402 ECX

    typechar *→D2RosterStrc *
  3. Retype variable mac 0x00075402 EBX

    typechar *→D2RosterStrc *
  4. Retype variable mac 0x00075402 Stack[-0x18]

    typechar *→D2RosterStrc *