REDIVIVUS

Proposals / #1073

Type the missile hit-check damage parameter as D2DamageStrc pointer

checked · by jaenster · submitted 2026-11-02

At 005d7c52-005d7c5a the caller copies 0x1c dwords (112 bytes) into sDamage at EBP-0x78; 005d7c5c-005d7c5f passes its address as parameter 6 to 0056e6f0 (call 005d7c75). Callee loads that pointer from EBP+0x14 at 0056e70f/0056e727 and accesses word +4 at 0056e712/0056e71a/0056e71e/0056e72a, matching D2DamageStrc.wResultFlags. Both returns purge 0x14; ECX/EDX inputs and all other parameter widths remain unchanged. Fixes integer casts in this function and its sole caller; no measured ASM percentage gain claimed.

Changes 1, applied together

  1. Retype variable win 0x0056e6f0 Stack[0x10]

    typeuint32_t→D2DamageStrc *