//
// sub_1005B7988 from 0x1005b7988 to 0x1005b79d8 (80 bytes)
//
// 3 xrefs:
// > sub_1005BFAE4 @ 0x1005bfb08
// > sub_1005C2214 @ 0x1005c222c
// > sub_1005C3264 @ 0x1005c32c8
//
// 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_1005B7988(__int64 *a1)
{
_QWORD *v2; // x0
_QWORD *v3; // x19
if ( !a1 )
return nullptr;
v2 = sub_1005B7020(*a1);
v3 = v2;
if ( !v2 )
return nullptr;
if ( !(unsigned int)sub_1005B73D0((__int64)v2, (__int64)a1) )
{
sub_1005B7118(v3);
return nullptr;
}
return v3;
}