//
// sub_1003C6440 from 0x1003c6440 to 0x1003c64d1 (145 bytes)
//
// 0 xrefs:
//
// 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:29:34 +0000
//
__int64 __fastcall sub_1003C6440(__int64 a1)
{
int v1; // ecx
__int64 result; // rax
__int64 v3; // rcx
__int64 v5; // rdi
unsigned int v6; // r14d
v1 = 0;
if ( *(int *)(a1 + 728) > 0 )
v1 = *(_DWORD *)(a1 + 728);
result = 999;
if ( v1 < 999 )
result = (unsigned int)v1;
*(_DWORD *)(a1 + 728) = result;
v3 = *(_QWORD *)(a1 + 664);
if ( v3 )
{
*(_DWORD *)(v3 + 1680) = result;
}
else
{
v5 = *(_QWORD *)(a1 + 672);
if ( v5 )
{
result = sub_1007FEF90(v5);
if ( (_DWORD)result )
{
v6 = 0;
do
{
*(_DWORD *)(sub_1007FEFE0(*(_QWORD *)(a1 + 672), v6++) + 1680) = *(_DWORD *)(a1 + 728);
result = sub_1007FEF90(*(_QWORD *)(a1 + 672));
}
while ( v6 < (unsigned int)result );
}
}
}
return result;
}