//
// sub_1002FCA30 from 0x1002fca30 to 0x1002fcb7a (330 bytes)
//
// 1 xrefs:
// > GJEffectManager::saveToState @ 0x1002eee23
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall sub_1002FCA30(_QWORD *a1, char *a2, char *a3)
{
__int64 v6; // rsi
char *v7; // r12
__int128 v8; // xmm1
__int128 v9; // xmm2
char *v10; // r13
char *v11; // r13
void *v12; // rdi
__int64 v13[8]; // [rsp+0h] [rbp-40h] BYREF
v6 = a1[1];
if ( v6 )
{
__bzero(*a1, 8 * v6);
v7 = (char *)a1[2];
*((_OWORD *)a1 + 1) = 0;
if ( v7 )
{
while ( a2 != a3 )
{
*((_DWORD *)v7 + 4) = *((_DWORD *)a2 + 4);
v8 = *(_OWORD *)(a2 + 40);
v9 = *(_OWORD *)(a2 + 56);
*(_OWORD *)(v7 + 24) = *(_OWORD *)(a2 + 24);
*(_OWORD *)(v7 + 40) = v8;
*(_OWORD *)(v7 + 56) = v9;
*((_QWORD *)v7 + 9) = *((_QWORD *)a2 + 9);
if ( v7 != a2 )
sub_1000C51C0(
(char **)v7 + 10,
*((char **)a2 + 10),
*((_QWORD *)a2 + 11),
(__int64)(*((_QWORD *)a2 + 11) - *((_QWORD *)a2 + 10)) >> 2);
v7[104] = a2[104];
v10 = *(char **)v7;
sub_1002FCBD0(a1, v7);
a2 = *(char **)a2;
v7 = v10;
if ( !v10 )
goto LABEL_7;
}
do
{
v11 = *(char **)v7;
v12 = *((void **)v7 + 10);
if ( v12 )
{
*((_QWORD *)v7 + 11) = v12;
operator delete(v12);
}
operator delete(v7);
v7 = v11;
}
while ( v11 );
}
}
LABEL_7:
while ( a2 != a3 )
{
sub_1002FD110(v13, a1, a2 + 16);
sub_1002FCBD0(a1, v13[0]);
a2 = *(char **)a2;
}
}