REDIVIVUS

Proposals / #776

PLAYERSAVE_ByteToHexChar returns void

rejected · by Nugwa628 · submitted 2026-11-01, rejected 2026-11-01

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, then the cookie check (00531dc8 MOV ECX,dword ptr [EBP-0x4]; 00531dcd CALL 0x00681a48) and 00531dd5 RET, with no MOVZX EAX. The declared int32_t return makes the generator emit 'return (uint32_t)byLowNibbleChar' (an extra MOVZX EAX,DL). The return type changes; pszHexOut is spelled uint8_t * (the 'undefined *' it has cannot be written back; those byte stores are its only uses, and the generator already emits it as uint8_t *). 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(uint8_t * pszHexOut, uint8_t nByteValue)
    convention__fastcall