REDIVIVUS

Proposals / #800

Name generic parameters forwarded to named callee parameters (resubmit)

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

Ghidra v1809 · 41c2819

Resubmit of #698 with the name the review asked for, dropping what others have applied since. 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. SUNITNPC_RefreshNpcItem's ECX is the player unit: SUNITPROXY_GetPlayerProxyInventory uses its EDX only for the GUID matched against the proxy entry's nPlayerGUID, and the only caller passes the player. Its callee's own parameter names are swapped. PARTYSCREEN_SetMutualPlayerRelationship's ECX is the callee's SGAMEDATA * pGame. WndProc's parameter is nWParam, as on SMsgDispatchMessage.

Changes 12, 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→pPlayerUnit
  6. Rename variable win 0x004f9a80 Stack[0xc]

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

    namenParam→dwHashVal
  8. Rename variable win 0x005d40f0 EDX

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

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

    namenParam→nGoldAmount
  11. Rename variable win 0x005a5b30 ECX

    namenParam→pGame
  12. Retype variable win 0x005a5b30 ECX

    typeint32_t→SGAMEDATA *