//
// sub_1005D6EBC from 0x1005d6ebc to 0x1005d6f24 (104 bytes)
//
// 4 xrefs:
// > sub_1005D7928 @ 0x1005d7a38
// > sub_1005D7C3C @ 0x1005d7ca4
// > sub_1005D7C3C @ 0x1005d7d18
// > sub_1005D7C3C @ 0x1005d7d50
//
// 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_1005D6EBC(__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;
}