//
// sub_1005F8BA8 from 0x1005f8ba8 to 0x1005f8be0 (56 bytes)
//
// 1 xrefs:
// > sub_1005F5624 @ 0x1005f56ec
//
// 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 *__fastcall sub_1005F8BA8(_QWORD *result, __int64 a2)
{
__int64 v2; // x9
__int64 v3; // x8
if ( result )
{
if ( *result )
{
v2 = *(_QWORD *)(a2 + 32);
if ( v2 )
{
if ( (*(_BYTE *)(v2 + 8) & 2) != 0 )
{
v3 = *result + *(int *)(v2 + 32);
if ( v3 )
{
*(_QWORD *)v3 = 0;
*(_QWORD *)(v3 + 8) = 0;
*(_DWORD *)(v3 + 16) = 1;
}
}
}
}
}
return result;
}