//
// sub_D180B0 from 0xd180b0 to 0xd18124 (116 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
//
_QWORD *__usercall sub_D180B0@(int **a1@, _QWORD *a2@)
{
int *v2; // x1
int v4; // w3
_QWORD *v6; // [xsp+28h] [xbp+28h]
v2 = *a1;
v4 = *(*a1 - 2);
if ( (v4 & 0x80000000) == 0 && *a1 - 6 != (int *)&qword_124B6B0 )
{
if ( v4 )
{
v6 = a2;
sub_D174B8(a1, 0, 0, 0);
v2 = *a1;
a2 = v6;
}
*(v2 - 2) = -1;
}
*a2 = (char *)v2 + *((_QWORD *)v2 - 3);
return a2;
}