//
// sub_1005CD5A0 from 0x1005cd5a0 to 0x1005cd682 (226 bytes)
//
// 1 xrefs:
// > sub_1005CCE30 @ 0x1005cd0bd
//
// 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:32:51 +0000
//
void __fastcall sub_1005CD5A0(__int64 *a1, __int64 a2)
{
int v3; // r12d
__int64 v4; // r15
int v5; // r13d
__int64 v6; // rax
__int64 v7; // rdi
int v8; // eax
__int64 v9; // rdi
__int64 v10; // rax
int v11; // r13d
__int64 v12; // rdi
const char *v13; // rdi
v3 = *((_DWORD *)a1 + 6);
v4 = *a1;
v5 = -1431655765 * ((unsigned __int64)(a1[1] - *a1) >> 3);
if ( v3 < v5 )
{
v6 = v3++;
*((_DWORD *)a1 + 6) = v3;
v7 = v4 + 24 * v6;
if ( (*(_BYTE *)v7 & 1) != 0 )
{
v8 = atoi(*(const char **)(v7 + 16));
if ( !v8 )
goto LABEL_9;
}
else
{
v8 = atoi((const char *)(v7 + 1));
if ( !v8 )
goto LABEL_9;
}
v9 = a1[4];
if ( v9 )
{
v10 = sub_1001446A0(v9, v8);
v3 = *((_DWORD *)a1 + 6);
v4 = *a1;
v11 = -1431655765 * ((unsigned __int64)(a1[1] - *a1) >> 3);
*(_QWORD *)a2 = v10;
if ( v3 >= v11 )
return;
goto LABEL_10;
}
}
LABEL_9:
*(_QWORD *)a2 = 0;
if ( v3 >= v5 )
return;
LABEL_10:
*((_DWORD *)a1 + 6) = v3 + 1;
v12 = v4 + 24LL * v3;
if ( (*(_BYTE *)v12 & 1) != 0 )
v13 = *(const char **)(v12 + 16);
else
v13 = (const char *)(v12 + 1);
*(double *)(a2 + 8) = strtod(v13, nullptr);
}