REDIVIVUS

Proposals / #1074

Correct the character-name argument in the player load dispatcher

checked · by jaenster · submitted 2026-11-02

CLIENT_LoadOrCreatePlayerUnit parameter 3 is a character-name buffer, not a D2ClientStrc pointer. Its sole caller computes LEA EDX,[ESI+0xd] at 005397fc and pushes it at 005397ff before CALL 00539804. ESI is the client; D2ClientStrc.szCharName is char[16] at offset 13. Dispatcher forwards the same value from [EBP+8] into EDX at 005345d5 for disk loader call 005345db, whose EDX parameter is char*. Retype only; preserve existing name, registers, widths and convention. Both dispatcher returns RET 0x18. Removes misleading client-struct casts across the join/save path.

Changes 1, applied together

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

    typeD2ClientStrc *→char *