//
// sub_778CC4 from 0x778cc4 to 0x778d20 (92 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
_DWORD *__fastcall sub_778CC4(const wchar_t *a1, const wchar_t *a2)
{
int v2; // r4
unsigned int v4; // r6
unsigned int *v5; // r0
unsigned int *v6; // r8
_DWORD *v7; // r7
if ( a1 == a2 )
return &unk_ACDDB8;
v2 = (char *)a2 - (char *)a1;
v4 = a2 - a1;
v5 = sub_777768(v4, 0);
v6 = v5;
v7 = v5 + 3;
if ( v4 == 1 )
v5[3] = *a1;
else
wmemcpy((wchar_t *)v5 + 3, a1, v2 >> 2);
if ( v6 != (unsigned int *)&unk_ACDDAC )
{
*v6 = v4;
v6[2] = 0;
*(unsigned int *)((char *)v6 + v2 + 12) = 0;
}
return v7;
}