REDIVIVUS

Proposals / #698

Name generic parameters forwarded to named callee parameters, with four pointer types

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

Each parameter is passed unchanged to a callee parameter that already has a specific name, checked register by register and push by push in the machine code. Three also get a same-width pointer type, because the callee parameter they reach is a typed pointer: SUNITNPC_RefreshNpcItem's ECX and the two party handlers' ECX. WndProc's parameter is nWParam, as on SMsgDispatchMessage. The chosen name SUNITNPC_ReturnOne looks wrong: 00576f40 is only POP EBP and a tail JMP to ITEM_GiveGoldOrDrop with registers and stack untouched. Left alone as unsettled: INVENTORY_AutoPlaceItemInGrid's nParam2 (never read), ClickWithSkillOnUnitOrCoord's nParam (two different callee meanings), SSIGNATURE_RsaExportZeroPadded's nParam (both a length and an output size).

Changes 15, applied together

  1. Rename variable win 0x0063c4f0 Stack[0xc]

    namenParam→nBeltSlot
  2. Rename variable win 0x0056ede0 Stack[0x10]

    namenParam1→nX
  3. Rename variable win 0x0056ede0 Stack[0x14]

    namenParam2→nY
  4. Rename variable win 0x0057e270 Stack[0xc]

    namenParam→nSkillLevel
  5. Rename variable win 0x00576650 ECX

    namenParam1→pNpcUnit
  6. Retype variable win 0x00576650 ECX

    typeint32_t→D2UnitStrc *
  7. Rename variable win 0x004f9a80 Stack[0xc]

    namenParam→nWParam
  8. Rename variable win 0x006039c0 Stack[0x4]

    namenParam→dwHashVal
  9. Rename variable win 0x005d40f0 EDX

    namenParam→nInitSeed
  10. Rename variable win 0x00426050 Stack[0x8]

    namenParam→nByteCount
  11. Rename variable win 0x00576f40 Stack[0x4]

    namenParam→nGoldAmount
  12. Rename variable win 0x005a5be0 ECX

    namenParam→pGame
  13. Retype variable win 0x005a5be0 ECX

    typeint32_t→SGAMEDATA *
  14. Rename variable win 0x005a5b30 ECX

    namenParam→pGame
  15. Retype variable win 0x005a5b30 ECX

    typeint32_t→SGAMEDATA *