//
// sub_D1C5C0 from 0xd1c5c0 to 0xd1c660 (160 bytes)
//
// 1 xrefs:
// > sub_D01328 @ 0xd013d0
//
// 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
//
__int64 *__fastcall sub_D1C5C0(__int64 *result, unsigned __int64 a2, wchar_t a3)
{
__int64 *v4; // x21
void *v6; // x20
unsigned __int64 *v7; // x0
unsigned __int64 *v8; // x22
v4 = result;
if ( a2 )
{
v7 = sub_D1B424(a2, 0);
v8 = v7;
v6 = v7 + 3;
if ( a2 == 1 )
*((_DWORD *)v7 + 6) = a3;
else
wmemset((wchar_t *)v7 + 6, a3, a2);
result = &qword_124B6D0;
if ( v8 != (unsigned __int64 *)&qword_124B6D0 )
{
result = (__int64 *)((char *)v8 + 4 * a2);
*((_DWORD *)v8 + 4) = 0;
*v8 = a2;
*((_DWORD *)result + 6) = 0;
}
}
else
{
v6 = &unk_124B6E8;
}
*v4 = (__int64)v6;
return result;
}