//
// sub_1005CCE30 from 0x1005cce30 to 0x1005cd136 (774 bytes)
//
// 1 xrefs:
// > processGJGameStateFields @ 0x1005e255f
//
// 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:50 +0000
//
void __fastcall sub_1005CCE30(__int64 *a1, float *a2)
{
float *v2; // r15
__int64 v3; // rax
__int64 v4; // rcx
__int64 v5; // rcx
int v6; // r12d
char *v7; // rdi
const char *v8; // rdi
_QWORD *v9; // rdi
_QWORD *v10; // rbx
__int64 v11; // rsi
__int64 v12; // rcx
char *v13; // rdi
const char *v14; // rdi
float *v15; // r14
char *v16; // r12
signed int v17; // ebx
char *v18; // r13
signed int v19; // r15d
__int64 v20; // rax
char *v21; // rdi
int v22; // eax
__int64 v23; // rax
signed int v24; // r15d
char *v25; // rdi
const char *v26; // rdi
void **v27; // rbx
void **v28; // r14
void *v29; // rdi
int *v30; // [rsp+8h] [rbp-88h] BYREF
std::string v31; // [rsp+10h] [rbp-80h] BYREF
int v32; // [rsp+34h] [rbp-5Ch]
void *__p; // [rsp+38h] [rbp-58h] BYREF
void **v34; // [rsp+40h] [rbp-50h]
signed int v35; // [rsp+50h] [rbp-40h]
__int64 v36; // [rsp+58h] [rbp-38h]
int v37; // [rsp+60h] [rbp-30h] BYREF
v2 = a2;
memset(&v31, 0, sizeof(v31));
v3 = *((int *)a1 + 6);
v4 = *a1;
if ( (int)v3 < (int)(-1431655765 * ((unsigned __int64)(a1[1] - *a1) >> 3)) )
{
*((_DWORD *)a1 + 6) = v3 + 1;
std::string::operator=(&v31, (const std::string *)(v4 + 24 * v3));
}
sub_1005C67B0((__int64)&__p, (unsigned __int8 *)&v31, "|", a1[4]);
v5 = v35;
v6 = 0;
if ( v35 < (int)(-1431655765 * ((unsigned __int64)((char *)v34 - (_BYTE *)__p) >> 3)) )
{
++v35;
v7 = (char *)__p + 24 * v5;
if ( (*v7 & 1) != 0 )
v8 = *((const char **)v7 + 2);
else
v8 = v7 + 1;
v6 = atoi(v8);
}
if ( *((_QWORD *)a2 + 3) )
{
v9 = *((_QWORD **)a2 + 2);
if ( v9 )
{
do
{
v10 = (_QWORD *)*v9;
operator delete(v9);
v9 = v10;
}
while ( v10 );
}
*((_QWORD *)a2 + 2) = 0;
v11 = *((_QWORD *)a2 + 1);
if ( v11 )
__bzero(*(_QWORD *)v2, 8 * v11);
*((_QWORD *)v2 + 3) = 0;
}
if ( v6 > 0 )
{
do
{
v37 = 0;
v12 = v35;
if ( v35 < (int)(-1431655765 * ((unsigned __int64)((char *)v34 - (_BYTE *)__p) >> 3)) )
{
++v35;
v13 = (char *)__p + 24 * v12;
if ( (*v13 & 1) != 0 )
v14 = *((const char **)v13 + 2);
else
v14 = v13 + 1;
v37 = atoi(v14);
}
v32 = v6;
v30 = &v37;
v15 = v2;
v16 = sub_100153130(v2, &v37, (__int64)&unk_100A0D5BE, &v30);
v17 = v35;
v18 = (char *)__p;
v19 = -1431655765 * ((unsigned __int64)((char *)v34 - (_BYTE *)__p) >> 3);
if ( v35 < v19 )
{
v20 = v35;
v17 = ++v35;
v21 = (char *)__p + 24 * v20;
if ( (*v21 & 1) != 0 )
{
v22 = atoi(*((const char **)v21 + 2));
if ( !v22 )
goto LABEL_28;
}
else
{
v22 = atoi(v21 + 1);
if ( !v22 )
goto LABEL_28;
}
if ( v36 )
{
v23 = sub_1001446A0(v36, v22);
v17 = v35;
v18 = (char *)__p;
v24 = -1431655765 * ((unsigned __int64)((char *)v34 - (_BYTE *)__p) >> 3);
*((_QWORD *)v16 + 3) = v23;
if ( v17 < v24 )
goto LABEL_29;
goto LABEL_33;
}
}
LABEL_28:
*((_QWORD *)v16 + 3) = 0;
if ( v17 < v19 )
{
LABEL_29:
v35 = v17 + 1;
v25 = &v18[24 * v17];
if ( (*v25 & 1) != 0 )
v26 = *((const char **)v25 + 2);
else
v26 = v25 + 1;
*((double *)v16 + 4) = strtod(v26, nullptr);
}
LABEL_33:
sub_1005CD5A0(&__p, v16 + 40);
v6 = v32 - 1;
v2 = v15;
}
while ( v32 != 1 );
}
v27 = (void **)__p;
if ( __p )
{
v28 = v34;
v29 = __p;
if ( v34 != __p )
{
do
{
if ( (*(_BYTE *)(v28 - 3) & 1) != 0 )
operator delete(*(v28 - 1));
v28 -= 3;
}
while ( v28 != v27 );
v29 = __p;
}
v34 = v27;
operator delete(v29);
}
if ( (*(_BYTE *)&v31.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v31.__r_.__value_.__l.__data_);
}