//
// sub_1004FAAE0 from 0x1004faae0 to 0x1004fab5c (124 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
//
bool __fastcall sub_1004FAAE0(__int64 a1, __int64 a2)
{
int v4; // w8
int v5; // w21
_QWORD *v7; // x9
if ( a1 )
sub_100442B5C(a1, 0x13u);
v4 = *(_DWORD *)(a2 + 32);
v5 = v4 - 1;
*(_DWORD *)(a2 + 32) = v4 - 1;
if ( v4 == 1 )
{
v7 = *(_QWORD **)(a2 + 8);
*v7 = *(_QWORD *)a2;
*(_QWORD *)(*(_QWORD *)a2 + 8LL) = v7;
*(_QWORD *)a2 = a2;
*(_QWORD *)(a2 + 8) = a2;
if ( !a1 )
return v5 == 0;
goto LABEL_5;
}
if ( a1 )
LABEL_5:
sub_100442B7C(a1, 0x13u);
return v5 == 0;
}