//
// sub_10044CB4C from 0x10044cb4c to 0x10044cbf4 (168 bytes)
//
// 2 xrefs:
// > sub_10044D26C @ 0x10044d32c
// > sub_10044D26C @ 0x10044d33c
//
// 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
//
__int64 __fastcall sub_10044CB4C(__int64 a1)
{
__int64 v2; // x21
__int64 v3; // x20
int v4; // w22
__int64 v5; // x0
*(_BYTE *)(a1 + 24) = 1;
v2 = sub_1004B5DD4(*(_QWORD *)(a1 + 40));
if ( !(_DWORD)v2 )
{
v2 = sub_1004B5DD4(*(_QWORD *)(a1 + 48));
if ( !(_DWORD)v2 )
{
v3 = *(_QWORD *)(a1 + 32);
sub_1004B5C70(v3);
if ( *(int *)(a1 + 60) < 1 )
{
v2 = 0;
}
else
{
v4 = 0;
while ( 1 )
{
v5 = sub_1004B5DD4(*(_QWORD *)(a1 + 48));
if ( (_DWORD)v5 )
break;
if ( ++v4 >= *(_DWORD *)(a1 + 60) )
{
v2 = 0;
*(_DWORD *)(a1 + 60) = 0;
goto LABEL_10;
}
}
v2 = v5;
}
LABEL_10:
sub_1004B5CA0(v3);
}
}
return v2;
}