REDIVIVUS

Proposals / #639

Type DAMAGE_ApplyDemonBonus's ESI parameter as the damage struct

applied · by dtchitt · submitted 2026-11-01, applied 2026-11-01

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

  1. Rename variable win 0x0057b630 ESI

    namenParam→pDamage
  2. Retype variable win 0x0057b630 ESI

    typeint32_t→D2DamageStrc *