REDIVIVUS

Proposals / #786

PLAYERSAVE_ByteToHexChar returns void (pszHexOut char *)

applied · by Nugwa628 · submitted 2026-11-01, applied 2026-11-02

Ghidra v1809 · f728564

Resubmission of #776 with pszHexOut as char *, as asked. Its only caller never reads EAX: after 00531e0a CALL 0x00531d60 the loop goes on (00531e0f ADD ESI,0x2 ... 00531e18 JNZ 0x00531e06) and EAX is next written, not read, at 00531e1d MOV EAX,ESI. The callee leaves no return value: the last stores are 00531dc3 MOV byte ptr [ECX],DL / 00531dc5 MOV byte ptr [ECX+0x1],AL (two ASCII hex digits for the hex-string builder), then the cookie check (00531dc8 MOV ECX,dword ptr [EBP-0x4]; 00531dcd CALL 0x00681a48) and 00531dd5 RET, with no EAX write. The declared int32_t return makes the generator emit an extra MOVZX EAX,DL. Recompiled with VC8 on main 14f0227: 00531d60 becomes a byte match, no function lost.

Changes 1, applied together

  1. Set prototype win 0x00531d60

    signatureint32_t PLAYERSAVE_ByteToHexChar(undefined * pszHexOut, uint8_t nByteValue)→void PLAYERSAVE_ByteToHexChar(char * pszHexOut, uint8_t nByteValue)
    convention__fastcall