Type DAMAGE_ApplyDemonBonus's ESI parameter as the damage struct
Ghidra v1799 · 2663303
ESI is a D2DamageStrc pointer, not an int: when the target is a demon, the function adds item_demondamage_percent to [ESI+0xc], which is dwEnDmgPct. This function has no references in the binary, so the claim rests on its body and on the same field being used that way in DAMAGE_CalculateOffensiveDamage.
Changes 2, applied together
Rename variable
win 0x0057b630 ESInamenParam→pDamageRetype variable
win 0x0057b630 ESItypeint32_t→D2DamageStrc *