//
// sub_1005CB9A0 from 0x1005cb9a0 to 0x1005cba94 (244 bytes)
//
// 2 xrefs:
// > sub_1005CAAB4 @ 0x1005cae40
// > sub_1005CB7FC @ 0x1005cb948
//
// 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_1005CB9A0(__int64 *a1, __int64 a2)
{
__int64 v5; // x20
__int64 v6; // x0
__int64 v7; // x21
char **v8; // x0
void *v9; // [xsp+8h] [xbp-28h] BYREF
v9 = nullptr;
*a1 = 0;
if ( (unsigned int)sub_1005EB2A0(a2) == 64 )
return 1;
if ( (unsigned int)sub_1005EB2A0(a2) == 64 )
{
v5 = 0;
}
else
{
v6 = sub_1005F2974();
v5 = v6;
if ( !v6 )
{
v5 = 0;
goto LABEL_11;
}
sub_1005F2A68(v6, a2);
}
if ( !sub_1005FC318(v5, &unk_10083E180, &v9) || (v7 = sub_1005F2974(), (*a1 = v7) == 0) )
{
LABEL_11:
if ( v9 )
sub_1005FBA78(v9);
goto LABEL_13;
}
v8 = sub_10058AB9C(0x38Fu);
sub_1005F298C(v7, v8, 16, v9);
v9 = nullptr;
LABEL_13:
if ( v5 )
sub_1005F2980(v5);
return *a1 != 0;
}