Mac D2COMP_FindCOFEntryByModeAndWeapon: __fastcc int * (ppCOFList, dwWeaponClassToken, nAnimMode)
Ghidra vmac 111 · 3c6740e
Mac body: ECX (EDI) is null-checked (line 0x4b0) and walked as the COF list; each entry's +0xc is compared with EDX (ESI) and its +0x4 with [EBP+8]; the matching node (or 0) is returned in EAX; plain RET. Windows twin D2COMP_FindCOFEntryByModeAndWeapon 0x005035f0 compares +0x4 with nAnimMode and +0xc with dwWeaponClassToken, so on Mac EDX is the weapon-class token and the stack slot is the anim mode.
Changes 1, applied together
Set prototype
mac 0x0003f3f8signatureundefined D2COMP_FindCOFEntryByModeAndWeapon(void)→int * D2COMP_FindCOFEntryByModeAndWeapon(int * * ppCOFList, uint32_t dwWeaponClassToken, int32_t nAnimMode)conventionunknown→__fastcc