//
// sub_1006FD024 from 0x1006fd024 to 0x1006fd08c (104 bytes)
//
// 4 xrefs:
// > sub_1006FDA90 @ 0x1006fdba0
// > sub_1006FDDA4 @ 0x1006fde0c
// > sub_1006FDDA4 @ 0x1006fde80
// > sub_1006FDDA4 @ 0x1006fdeb8
//
// 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:12:46 +0000
//
__int64 __fastcall sub_1006FD024(__int64 a1)
{
int v2; // w8
__int64 result; // x0
__int64 (__fastcall *v4)(__int64); // x8
v2 = *(_DWORD *)(a1 + 176);
if ( v2 )
{
result = 1;
LABEL_7:
++*(_DWORD *)(a1 + 172);
*(_DWORD *)(a1 + 176) = v2 + 1;
return result;
}
v4 = *(__int64 (__fastcall **)(__int64))(a1 + 112);
if ( !v4 )
{
v2 = 0;
result = 1;
goto LABEL_7;
}
result = v4(a1);
if ( (_DWORD)result )
{
v2 = *(_DWORD *)(a1 + 176);
goto LABEL_7;
}
return 0;
}