Mac SELECT_GetDistanceSquared: __fastcc int32_t (D2UnitStrc * pUnit, D2UnitStrc * pUnit2)
Ghidra vmac 111 · 3c6740e
Mac body: ECX (EBX) and EDX (EDI) are each passed to the unit X and Y coordinate getters; it returns (x1-x2)^2 + (y1-y2)^2 in EAX; no stack arguments, plain RET. Windows twin SELECT_GetDistanceSquared 0x004673c0 is int32_t (D2UnitStrc * pUnit, D2UnitStrc * pUnit2); same order on Mac (ECX, EDX).
Changes 1, applied together
Set prototype
mac 0x0007b9fesignatureundefined SELECT_GetDistanceSquared(void)→int32_t SELECT_GetDistanceSquared(D2UnitStrc * pUnit, D2UnitStrc * pUnit2)conventionunknown→__fastcc