REDIVIVUS

Proposals / #631

SStrDup returns the allocated character buffer

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

Ghidra v1797 · 3bccb89

The complete 79-byte body returns a newly allocated NUL-terminated byte string, not uint*. It obtains the byte length from SStrLen, adds one at 00414343, allocates that many bytes, copies the original string including its NUL, and explicitly moves the destination pointer from EDI to EAX at 00414356. The NULL-input path explicitly returns EAX=0. Both exits RET 4; only one Stack[4] character pointer is read. All 12 direct callers consume the returned address; SFileOpenFileEx stores it in the existing char* szFilePath field at +0x10c. Set only the return pointee to char, keeping the same name, input type, standard stdcall and one stack slot. This is explicit returned-data provenance, not an incidental EAX or custom-convention inference. Static original-PE verification only.

Changes 1, applied together

  1. Set prototype win 0x00414310

    signatureuint * SStrDup(char * szText)→char * SStrDup(char * szText)
    convention__stdcall