//
// sub_D1E10C from 0xd1e10c to 0xd1e1e4 (216 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
//
wchar_t *__fastcall sub_D1E10C(wchar_t *result, const wchar_t *a2, const wchar_t *a3)
{
_QWORD *v4; // x24
signed __int64 v5; // x19
unsigned __int64 v6; // x23
wchar_t *v7; // x0
wchar_t *v8; // x22
_QWORD *v9; // x21
v4 = result;
if ( a2 == a3 )
{
*(_QWORD *)result = &unk_124B6E8;
}
else
{
if ( !a2 && a3 )
sub_D138D8("basic_string::_S_construct null not valid");
v5 = (char *)a3 - (char *)a2;
v6 = a3 - a2;
v7 = (wchar_t *)sub_D1B424(v6, 0);
v8 = v7;
v9 = v7 + 6;
if ( v6 == 1 )
{
result = (wchar_t *)*(unsigned int *)a2;
v8[6] = (int)result;
}
else
{
result = wmemcpy(v7 + 6, a2, v6);
}
if ( v8 != (wchar_t *)&qword_124B6D0 )
{
v8[4] = 0;
*(_QWORD *)v8 = v6;
*(wchar_t *)((char *)v8 + v5 + 24) = 0;
}
*v4 = v9;
}
return result;
}