REDIVIVUS

Proposals / #628

Type the state-overlay helpers’ graphics-info arguments

applied · by Commit-Will · submitted 2026-11-01, applied 2026-11-01

Ghidra v1797 · 3bccb89

Both pGfxInfo scalars are D2GfxInfoStrc pointers. All three incoming call paths supply the unchanged GetGfxInfo return, which reads D2UnitStrc.pGfxInfo at +0x54. GFX_AddOverlayToUnit keeps it in EAX for 0x0046def0; GFX_RemoveOverlayFromUnit keeps it in EBX and pushes it for 0x0046df40; GFX_UpdateOverlayAnimations saves it in EBP-8, reloads EBX and pushes it for the other call to 0x0046df40. Complete targets (79/243 bytes) load graphics+0x2c, matching the existing pOverlayList field, then traverse overlay nodes. Complete callers, getter and all three switch tables were verified against original Windows PE bytes; CFG checks confirm each forwarded value. Retype only the two existing pGfxInfo slots (custom EAX and Stack[0x4]), preserving names, void returns, conventions and every other custom input. No overlay-node alias or runtime/byte-match benefit is claimed.

Changes 2, applied together

  1. Retype variable win 0x0046def0 EAX

    typeint32_t→D2GfxInfoStrc *
  2. Retype variable win 0x0046df40 Stack[0x4]

    typeint32_t→D2GfxInfoStrc *