//
// sub_1005BB82C from 0x1005bb82c to 0x1005bb8fc (208 bytes)
//
// 3 xrefs:
// > sub_1005BCFE8 @ 0x1005bd0e0
// > sub_1005BD8D4 @ 0x1005bdd74
// > sub_1006250BC @ 0x1006251e0
//
// 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
//
char *sub_1005BB82C()
{
void *v0; // x0
char *v1; // x0
char *v2; // x19
__int64 v3; // x0
void *v4; // x0
char *v5; // x0
v0 = sub_1005BB4F8();
v1 = (char *)sub_1005B7020((__int64)v0);
v2 = v1;
if ( !v1 )
return nullptr;
if ( !(unsigned int)sub_1005B7D38((__int64)v1) )
{
v3 = sub_1005E146C();
if ( (v3 & 0xFF000000) != 0x10000000 || (unsigned int)(v3 & 0xFFF) - 135 >= 2 )
goto LABEL_7;
sub_1005E1158(v3);
sub_1005B7278(v2);
v4 = sub_1005BB074();
v5 = (char *)sub_1005B7020((__int64)v4);
v2 = v5;
if ( !v5 )
return nullptr;
if ( !(unsigned int)sub_1005B7D38((__int64)v5) )
{
LABEL_7:
sub_1005B7278(v2);
return nullptr;
}
}
return v2;
}