REDIVIVUS

Proposals / #685

Type four integer parameters as the pointer or handle their callee takes

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

These four are typed as integers but hold a pointer or window handle, proven by the callee parameter they reach unchanged. Same width in each case, so only the type and name change. HUFFMAN_Constructor also returns the value, as a constructor does. MESSAGE_RegisterWindowMessageHandlers halts if it is null; the name is pWindow because the checks refuse the callee's hWnd. SRP_ComputeServerProof's value is the output buffer of SHA1_Final. DropItem's value may be null and reaches QUEST_OnItemDropped's pPlayer, but it is named pSourceUnit because DROP_SpawnGoldPiles passes its pUnit, and that function's plate says the unit is not always a player.

Changes 8, applied together

  1. Rename variable win 0x0041f920 ECX

    namenParam→pEncoder
  2. Retype variable win 0x0041f920 ECX

    typeint32_t→D2CompressEncoderStrc *
  3. Rename variable win 0x00451e70 ECX

    namenParam→pWindow
  4. Retype variable win 0x00451e70 ECX

    typeuint32_t→HWND
  5. Rename variable win 0x00528480 Stack[0x10]

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

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

    namenParam→pSourceUnit
  8. Retype variable win 0x00558aa0 EDX

    typeint32_t→D2UnitStrc *