Mac SKILLS_HandleDualWieldWeaponSwap: __fastcc void (D2UnitStrc * pUnit, int * pSwapState)
Ghidra vmac 111 · 3c6740e
Mac body: EDX is saved and dereferenced first (CMP [EDX],0 - skip when a swap is in progress), so it is the swap-state pointer; ECX is the unit (its inventory at +0x60 is queried for the weapons in body locations 4 and 5, then the Attack skill is read and toggled); no [EBP+n] reads and a single plain RET. Windows twin SKILLS_HandleDualWieldWeaponSwap 0x004c6de0 is void (int * pSwapState, D2UnitStrc * pUnit); the Mac register order puts the unit first.
Changes 1, applied together
Set prototype
mac 0x0008356dsignatureundefined SKILLS_HandleDualWieldWeaponSwap(void)→void SKILLS_HandleDualWieldWeaponSwap(D2UnitStrc * pUnit, int * pSwapState)conventionunknown→__fastcc