//
// sub_10056CDD4 from 0x10056cdd4 to 0x10056cec4 (240 bytes)
//
// 6 xrefs:
// > sub_10056CA84 @ 0x10056cb40
// > sub_10056DB30 @ 0x10056def4
// > sub_10056DB30 @ 0x10056e068
// > sub_10056DB30 @ 0x10056e5e0
// > sub_10056DB30 @ 0x10056e930
// > sub_10056DB30 @ 0x10056eb14
//
// 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_10056CDD4(__int64 result)
{
__int64 v1; // x19
__int64 *v2; // x22
__int64 *v3; // x21
__int64 v4; // x20
__darwin_time_t v5; // x0
int v6; // w1
int v7; // w8
v1 = result;
v2 = **(__int64 ***)(result + 40);
while ( v2 )
{
v3 = v2;
v4 = *v2;
v2 = (__int64 *)v2[2];
if ( *(_DWORD *)(v4 + 24) == 1 )
{
*(_DWORD *)(v4 + 24) = 2;
sub_100566E18((_QWORD *)v4);
sub_10056BBA0(*(_QWORD *)(v1 + 40), v3, 0);
v5 = sub_100548F0C();
v7 = v6 + 1000;
if ( v6 + 1000 >= 1000000 )
{
++v5;
v7 = v6 - 999000;
}
if ( !*(_QWORD *)(v4 + 35472) && !*(_DWORD *)(v4 + 35480)
|| (result = sub_100548F34(v5, v7, *(_QWORD *)(v4 + 35472), *(_QWORD *)(v4 + 35480)), result <= 0) )
{
result = sub_10056C89C(v4, 1);
}
}
}
return result;
}