REDIVIVUS

Proposals / #1374

Recover the Mac wide-character search helper's arguments and pointer result

checked · by eejitgames · submitted 2026-11-06

Mac002ba018 is declared undefined(void) with unknown convention, but native code takes a wide-text pointer and a16-bit character in two cdecl stack slots, returning the matched non-NUL element or NULL. All three callers pass WORD character literals and a text base, then use full EAX as an address. Recover WCHAR*(WCHAR*,WCHAR), using existing two-byte WCHAR. Windows005266c0 implements the same search with thiscall storage; retain the Mac stack ABI rather than copying that convention. No existing Mac parameters are named or typed.

Changes 1, applied together

  1. Set prototype mac 0x002ba018

    signatureundefined UNICODE_FindWideChar(void)→WCHAR * UNICODE_FindWideChar(WCHAR * wszText, WCHAR wCharToFind)
    conventionunknown→__cdecl