REDIVIVUS

Proposals / #799

Type three integer parameters as the pointer their callee takes (resubmit)

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

Ghidra v1809 · 41c2819

Resubmit of #685 without MESSAGE_RegisterWindowMessageHandlers: the review asks for hWnd there, and the checks refuse that name (issue #68). These three are typed as integers but hold a pointer, proven by the callee parameter they reach unchanged. Same width in each case. HUFFMAN_Constructor also returns the value, as a constructor does. SRP_ComputeServerProof's value is the output buffer of SHA1_Final. DropItem's value may be null and reaches QUEST_OnItemDropped's pPlayer; named pSourceUnit because DROP_SpawnGoldPiles passes its pUnit, which its plate says is not always a player.

Changes 6, applied together

  1. Rename variable win 0x0041f920 ECX

    namenParam→pEncoder
  2. Retype variable win 0x0041f920 ECX

    typeint32_t→D2CompressEncoderStrc *
  3. Rename variable win 0x00528480 Stack[0x10]

    namenParam→pHashOut
  4. Retype variable win 0x00528480 Stack[0x10]

    typeint32_t→uint8_t *
  5. Rename variable win 0x00558aa0 EDX

    namenParam→pSourceUnit
  6. Retype variable win 0x00558aa0 EDX

    typeint32_t→D2UnitStrc *