REDIVIVUS

Proposals / #722

Type SOUNDHDR_BuildSoundPath output as a character buffer

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

Ghidra v1804 · 39698f0

EDX pszOutPath is a NUL-terminated byte-string destination. The complete322-byte function saves the base in EDI, copies DATA\LOCAL or DATA\GLOBAL including its NUL, scans one byte at a time, appends \MUSIC\ or \SFX\, then copies a NUL-terminated sounds-row filename with DWORD copies and a byte remainder. Both incoming callers pass an80-byte stack buffer: EBP-0x5c from SOUNDHDR_LoadSoundFile and EBP-0x58 from SOUND_PlaySoundWithPanning. They then pass those same addresses to existing char* filename consumers. Complete target and both caller ranges match original Windows bytes, and CFG analysis proves each LEA is the sole EDX definition reaching its call. Retype only pszOutPath undefined4* to char*, preserving its chosen name, EDX storage, ECX sound ID, fastcall and void return. The sole physical normal exit is bare RET00482851. No sound-ID validity, buffer-extent change or runtime/build benefit is claimed.

Changes 1, applied together

  1. Retype variable win 0x00482710 EDX

    typeundefined4 *→char *