REDIVIVUS

Proposals / #700

Name target parameters of the 0x68 and 0x6C senders and type two client packet handlers

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

Ghidra v1799 · 2663303

Senders 0x68, 0x68_Ex and 0x6C: the byte at packet offset 0xa (0x68) or 6 (0x6C) is the target's unit type. MONSTER_SendUpdateToClient passes [pTarget] from GetTargetEx there, and the target GUID follows it. The 0x68 struct names that offset nTargetType. On 0x68 and 0x68_Ex the chosen first stack argument nTargetType looks wrong: it goes to offset 5, which the struct calls nMode, so this name has to differ. Handlers: ECX is the packet pointer, and the field offsets match D2GSPacketSrv0x50 and D2GSPacketSrv0x8A. Left generic: the other bParam* of these senders, which carry direction, life or distance depending on mode. Machine code only, not tested live.

Changes 8, applied together

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

    namebParam1→nTargetUnitType
  2. Rename variable win 0x0053b7f0 Stack[0xc]

    namebParam1→nTargetUnitType
  3. Rename variable win 0x0053b7f0 Stack[0x10]

    namedwParam→dwTargetGUID
  4. Rename variable win 0x0053baa0 Stack[0xc]

    namebParam1→nTargetUnitType
  5. Rename variable win 0x004a28a0 ECX

    namenParam→pPacket
  6. Retype variable win 0x004a28a0 ECX

    typeint32_t→D2GSPacketSrv0x50 *
  7. Rename variable win 0x004b3380 ECX

    namenParam→pPacket
  8. Retype variable win 0x004b3380 ECX

    typeint32_t→D2GSPacketSrv0x8A *