//
// sub_1005D2E30 from 0x1005d2e30 to 0x1005d2f8c (348 bytes)
//
// 1 xrefs:
// > sub_1005D2914 @ 0x1005d2a0c
//
// 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_1005D2E30(__int64 a1, __int64 a2, _DWORD *a3)
{
__int64 *v6; // x0
__int64 *v7; // x19
__int64 v8; // x22
_QWORD *v9; // x0
__int64 v10; // x22
__int64 v11; // x2
*a3 = 0;
v6 = (__int64 *)sub_1005ABAC8();
v7 = v6;
v8 = 0;
if ( v6 )
{
sub_1005ABC90((__int64)v6);
v9 = sub_1005ABDFC(v7);
v10 = (__int64)v9;
if ( v9 )
{
if ( (unsigned int)sub_1005AB128((__int64)v9, 1) )
{
if ( (int)sub_1005AB460(a2, v10) <= 0 )
*a3 |= 1u;
if ( sub_1005AAFFC(v10, *(_QWORD *)(a1 + 8)) )
{
if ( (unsigned int)sub_1005AE934(v10, 1u) )
{
if ( (sub_1005AB460(a2, v10) & 0x80000000) == 0 )
*a3 |= 2u;
v11 = *(_QWORD *)(a1 + 64);
if ( v11 )
{
if ( !(unsigned int)sub_1005A9298(v10, a2, v11, *(_QWORD *)(a1 + 8)) )
{
v8 = 0;
goto LABEL_22;
}
if ( *(_DWORD *)(v10 + 8) != 1 || **(_QWORD **)v10 != 1 || *(_DWORD *)(v10 + 16) )
*a3 |= 4u;
}
v8 = 1;
}
else
{
v8 = 0;
}
}
else
{
v8 = 0;
}
}
else
{
v8 = 0;
}
}
else
{
v8 = 0;
}
LABEL_22:
sub_1005ABD78((__int64)v7);
sub_1005ABB2C((void **)v7);
}
return v8;
}