Mac DAMAGE_RollElementalDamageWithBonus: uint32_t __fastcall (pUnit, eUnitStat, eStat2, eStat1, nDamageAccum)
Each arg is matched to the Windows twin 0x0057a880's names by role. ECX = pUnit (Windows EDI; every stat read uses it). [EBP+8] = eStat2, the first stat read, <<8 then <8 early-out (Windows EAX). EDX = eUnitStat, the second stat read (Windows [EBP+8]). [EBP+0xc] = eStat1, the bonus stat with a -1 skip (Windows [EBP+0xc]). [EBP+0x10] = nDamageAccum, returned on the early-out and passed on (Windows [EBP+0x18]). Mac has no pct-bonus args; the bonus value goes to both slots of DAMAGE_RollPhysicalDamageRange. Callers in DAMAGE_CalculateOffensiveDamage (0x0027bfa5: ECX=pUnit, EDX=0x30, [ESP]=0x31, [ESP+4]=0x149, [ESP+8]=accum) store EAX back. Plain RET.
Changes 1, applied together
Set prototype
mac 0x0027c6b0signatureundefined DAMAGE_RollElementalDamageWithBonus(void)→uint32_t DAMAGE_RollElementalDamageWithBonus(D2UnitStrc* pUnit, eD2UnitStat eUnitStat, eD2UnitStat eStat2, eD2UnitStat eStat1, uint32_t nDamageAccum)conventionunknown→__fastcall