//
// sub_1005C7420 from 0x1005c7420 to 0x1005c75f2 (466 bytes)
//
// 6 xrefs:
// > PlayerCheckpoint::processState @ 0x1005da557
// > PlayerCheckpoint::processState @ 0x1005db70f
// > processGJGameStateFields @ 0x1005e23b9
// > processEffectManagerState @ 0x1005f2970
// > processEffectManagerState @ 0x1005f2a15
// > deserializeCheckpoint @ 0x1005f9682
//
// 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:48 +0000
//
void __fastcall sub_1005C7420(__int64 *a1, float *a2)
{
__int64 v3; // rax
__int64 v4; // rcx
__int64 v5; // rcx
int v6; // r14d
char *v7; // rdi
const char *v8; // rdi
_QWORD *v9; // rdi
_QWORD *v10; // r15
__int64 v11; // rsi
__int64 v12; // rcx
char *v13; // rdi
const char *v14; // rdi
void **v15; // rbx
void **v16; // r14
void *v17; // rdi
std::string v18; // [rsp+0h] [rbp-60h] BYREF
void *__p; // [rsp+18h] [rbp-48h] BYREF
void **v20; // [rsp+20h] [rbp-40h]
signed int v21; // [rsp+30h] [rbp-30h]
int v22[7]; // [rsp+44h] [rbp-1Ch] BYREF
memset(&v18, 0, sizeof(v18));
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=(&v18, (const std::string *)(v4 + 24 * v3));
}
sub_1005C67B0((__int64)&__p, (unsigned __int8 *)&v18, "|", a1[4]);
v5 = v21;
v6 = 0;
if ( v21 < (int)(-1431655765 * ((unsigned __int64)((char *)v20 - (_BYTE *)__p) >> 3)) )
{
++v21;
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 *)a2, 8 * v11);
*((_QWORD *)a2 + 3) = 0;
}
if ( v6 > 0 )
{
do
{
v22[0] = 0;
v12 = v21;
if ( v21 < (int)(-1431655765 * ((unsigned __int64)((char *)v20 - (_BYTE *)__p) >> 3)) )
{
++v21;
v13 = (char *)__p + 24 * v12;
if ( (*v13 & 1) != 0 )
v14 = *((const char **)v13 + 2);
else
v14 = v13 + 1;
v22[0] = atoi(v14);
}
sub_10001B800(a2, v22, v22, (__m128)0LL);
--v6;
}
while ( v6 );
}
v15 = (void **)__p;
if ( __p )
{
v16 = v20;
v17 = __p;
if ( v20 != __p )
{
do
{
if ( (*(_BYTE *)(v16 - 3) & 1) != 0 )
operator delete(*(v16 - 1));
v16 -= 3;
}
while ( v16 != v15 );
v17 = __p;
}
v20 = v15;
operator delete(v17);
}
if ( (*(_BYTE *)&v18.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v18.__r_.__value_.__l.__data_);
}