REDIVIVUS

Proposals / #668

SFileLoadFileEx and Ex2 take a character filename

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

Ghidra v1797 · 3bccb89

Stack[8] is the input filename in both APIs, not uint*. Ex pushes it unchanged at 0041b69f. Ex2 loads the original slot into ECX at 0041af63, pushes that value at 0041afa2 for SFileOpenFileEx's filename argument, and separately passes the slot's address as the output handle. The slot is zeroed/reused only after the filename value has been saved. The complete open routine byte-tests and NUL-copies this input; its disk path is passed to CreateFileA. All four Ex callers forward their character filename input; Ex2 has only Ex and the five-argument wrapper as direct callers. Retype only these two input slots to char*, preserving existing parameter names, other arguments, uint32_t returns, stdcall and RET 0x1c/0x20. No handle-layout, custom-storage, API-table or Mac-pairing inference. Static original-PE proof only.

Changes 2, applied together

  1. Retype variable win 0x0041b680 Stack[0x8]

    typeuint *→char *
  2. Retype variable win 0x0041af60 Stack[0x8]

    typeuint *→char *