REDIVIVUS

Proposals / #618

Type SELECT_FindTargetInFacingDirection’s skill record input

applied · by Commit-Will · submitted 2026-11-01, applied 2026-11-01

Ghidra v1797 · 3bccb89

The Stack[0x4] pSkillsTxt input is a D2SkillsTxt pointer. Sole caller SKILL_ValidateTarget calls GetSkillsTxt, stores its unchanged D2SkillStrc.pRecord result in EBP-4, reloads it into ECX, then PUSH ECX at 0x004679c0 before the directional call. No pointer adjustment occurs. Complete callee consumes this stack input only through BYTE[row+6] at 0x0046774a with gadwBitMasks[4]=16, matching the existing D2SkillsTxt.TargetableOnly bit. Its player input remains in custom EBX; both exits use RET 4. Retype only pSkillsTxt int to D2SkillsTxt*, preserving all names, return type, convention and the other custom argument slot. Complete target, sole caller and getter byte ranges were independently checked against the original Windows PE, including the target’s seven-byte alignment NOP. No runtime or byte-match gain is claimed.

Changes 1, applied together

  1. Retype variable win 0x00467660 Stack[0x4]

    typeint→D2SkillsTxt *