//
// sub_1005733D4 from 0x1005733d4 to 0x1005734b0 (220 bytes)
//
// 5 xrefs:
// > sub_10054E568 @ 0x10054e570
// > sub_10054E57C @ 0x10054e5b4
// > sub_1005732DC @ 0x100573300
// > sub_100573310 @ 0x100573334
// > sub_100573344 @ 0x100573354
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:08:19 +0000
//
__int64 __fastcall sub_1005733D4(__int64 a1)
{
__int64 v2; // x20
__int64 v3; // x21
__int64 i; // x22
__int64 v5; // x0
__int64 v6; // x0
v2 = *(_QWORD *)(a1 + 40);
sub_1005DBDD8(v2);
if ( *(_BYTE *)(a1 + 720) )
{
v3 = 0;
LABEL_10:
sub_1005DBE08(v2);
return v3;
}
for ( i = 0; i != 512; i += 16 )
{
if ( *(unsigned __int8 *)(a1 + i + 724) != 255 )
{
v5 = *(_QWORD *)(a1 + 24);
if ( v5 )
{
v6 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 64LL))(v5, a1);
if ( (_DWORD)v6 )
{
v3 = v6;
goto LABEL_10;
}
}
}
}
*(_BYTE *)(a1 + 720) = 1;
v3 = sub_10061C068(*(_QWORD *)(a1 + 32));
if ( (_DWORD)v3 )
goto LABEL_10;
sub_1005DBE08(v2);
v3 = sub_100572CB4(a1 + 1240);
if ( !(_DWORD)v3 )
return sub_100572CB4(a1 + 1312);
return v3;
}