REDIVIVUS

Proposals / #1592

Mac CreateDirectory: BOOL __cdecl (char* szPathName, void* pSecurityAttributes) Win32 shim

checked · by KierTaylor · submitted 2026-11-08

This is the Mac Win32-shim CreateDirectory(A). [EBP+8] -> EBX = the path (converted to an FSSpec via 0x0002c71b and created with DirCreate). The second arg is never read but is kept because callers pass it: WriteErrorLog 0x00010977 stores [ESP]=path, [ESP+4]=0 (NULL security attributes) and then tests EAX. It returns ESI (1 on success, 0 on failure; 0xffffffd0 = dupFNErr is handled) via MOV EAX,ESI at 0x000227e6. This matches Win32 BOOL CreateDirectoryA(LPCSTR, LPSECURITY_ATTRIBUTES).

Changes 1, applied together

  1. Set prototype mac 0x000226f8

    signatureundefined CreateDirectory(void)→BOOL CreateDirectory(char* szPathName, void* pSecurityAttributes)
    conventionunknown→__cdecl