REDIVIVUS

Proposals / #1380

Recover the Mac unbounded wide-copy and append destination results

checked · by eejitgames · submitted 2026-11-07

Mac AppendToBuffer 002ba040 and STRING_CopyWideString 002ba10e still have undefined stored results after #1362's input edits were applied. Both complete native bodies return the original destination in full EAX. Append keeps that value independently of its advancing EDX working pointer; copy uses an ECX byte offset and never changes its EAX base. Three MAINMENU_LoadCreditsText call sites test the copy result in full EAX immediately after CALL. The Windows counterparts perform the same WORD loops and already return wide destination pointers. Recover WCHAR* results on these two Mac functions with their current WCHAR inputs and cdecl conventions. Evidence is the complete return-register dataflow, native result consumers and address-paired Windows bodies; no behavioral change or runtime-validation claim.

Changes 2, applied together

  1. Set prototype mac 0x002ba040

    signatureundefined AppendToBuffer(WCHAR * wszText1, WCHAR * wszText2)→WCHAR * AppendToBuffer(WCHAR * wszText1, WCHAR * wszText2)
    convention__cdecl
  2. Set prototype mac 0x002ba10e

    signatureundefined STRING_CopyWideString(WCHAR * wDestination, WCHAR * wSource)→WCHAR * STRING_CopyWideString(WCHAR * wDestination, WCHAR * wSource)
    convention__cdecl