//
// sub_1002F2BF0 from 0x1002f2bf0 to 0x1002f2cf2 (258 bytes)
//
// 3 xrefs:
// > GJEffectManager::getLoadedMoveOffset @ 0x1002e7cdd
// > GJEffectManager::saveToState @ 0x1002eecb1
// > GJEffectManager::loadFromState @ 0x1002ef332
//
// 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_1002F2BF0(_QWORD *a1, __int64 *a2, __int64 *a3)
{
__int64 v5; // rsi
char *v6; // r12
char *v7; // r13
char *v8; // r13
_OWORD *v9; // rax
v5 = a1[1];
if ( v5 )
{
__bzero(*a1, 8 * v5);
v6 = (char *)a1[2];
*((_OWORD *)a1 + 1) = 0;
if ( v6 )
{
while ( a2 != a3 )
{
*((_DWORD *)v6 + 4) = *((_DWORD *)a2 + 4);
*(_OWORD *)(v6 + 24) = *(_OWORD *)(a2 + 3);
v7 = *(char **)v6;
sub_1002F2D50(a1, v6);
a2 = (__int64 *)*a2;
v6 = v7;
if ( !v7 )
goto LABEL_9;
}
do
{
v8 = *(char **)v6;
operator delete(v6);
v6 = v8;
}
while ( v8 );
}
}
LABEL_9:
while ( a2 != a3 )
{
v9 = operator new(0x28u);
*(_QWORD *)v9 = 0;
v9[1] = *((_OWORD *)a2 + 1);
*((_QWORD *)v9 + 4) = a2[4];
*((_QWORD *)v9 + 1) = *((int *)v9 + 4);
sub_1002F2D50(a1, v9);
a2 = (__int64 *)*a2;
}
}