//
// sub_1008F0640 from 0x1008f0640 to 0x1008f069f (95 bytes)
//
// 1 xrefs:
// > sub_1008EF050 @ 0x1008efb3a
//
// This function is hookable on this platform (idp: pc, 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 12:37:55 +0000
//
__int64 __fastcall sub_1008F0640(__int64 a1)
{
__int64 result; // rax
__int64 v2; // rax
if ( *(_DWORD *)(a1 + 1048) > 1u )
{
v2 = *(_QWORD *)(a1 + 1104);
if ( !v2 )
goto LABEL_7;
result = sub_1007FEF90(v2);
if ( (int)result >= 10 )
goto LABEL_7;
}
else
{
result = (unsigned int)(10 * *(_DWORD *)(a1 + 1052) + 10);
if ( *(_DWORD *)(a1 + 1112) > (int)result )
{
LABEL_7:
++*(_DWORD *)(a1 + 1052);
return sub_1008F0AC0(a1, 0, 0);
}
}
return result;
}