//
// sub_D1BED0 from 0xd1bed0 to 0xd1bf3c (108 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
//
const wchar_t **__usercall sub_D1BED0@(const wchar_t **a1@, const wchar_t **a2@)
{
const wchar_t *v2; // x1
int v4; // w3
const wchar_t **v6; // [xsp+28h] [xbp+28h]
v2 = *a1;
v4 = *(*a1 - 2);
if ( (v4 & 0x80000000) == 0 && *a1 - 6 != (const wchar_t *)&qword_124B6D0 )
{
if ( v4 )
{
v6 = a2;
sub_D1B4BC(a1, 0, 0, 0);
v2 = *a1;
a2 = v6;
}
*((_DWORD *)v2 - 2) = -1;
}
*a2 = v2;
return a2;
}