//
// cocos2d::CCSpawn::createWithVariableList from 0x1003a0010 to 0x1003a0228 (536 bytes)
//
// 1 xrefs:
// > sub_10039FF60 @ 0x10039ffeb
//
// 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:29:19 +0000
//
_OWORD *__fastcall cocos2d::CCSpawn::createWithVariableList(__int64 a1, unsigned int *a2)
{
unsigned __int64 v2; // rcx
__int64 *v3; // rax
__int64 v4; // r12
_OWORD *v5; // rbx
unsigned __int64 v6; // rcx
__int64 *v7; // rax
__int64 v8; // r15
__int64 *v9; // rax
_OWORD *v10; // r12
__int64 *v11; // rax
_OWORD *v12; // r12
if ( !a1 )
return nullptr;
v2 = *a2;
if ( v2 >= 0x29 )
{
v11 = *((__int64 **)a2 + 1);
*((_QWORD *)a2 + 1) = v11 + 1;
v4 = *v11;
if ( *v11 )
goto LABEL_4;
}
else
{
v3 = (__int64 *)(*((_QWORD *)a2 + 2) + v2);
*a2 = v2 + 8;
v4 = *v3;
if ( *v3 )
{
LABEL_4:
v5 = operator new(0x70u);
*v5 = 0;
v5[1] = 0;
v5[2] = 0;
v5[3] = 0;
v5[4] = 0;
v5[5] = 0;
v5[6] = 0;
cocos2d::CCAction::CCAction(v5);
*((_DWORD *)v5 + 20) = 0;
*(_QWORD *)v5 = off_100B321E0;
cocos2d::CCSpawn::initWithTwoActions(v5, a1, v4);
while ( 1 )
{
cocos2d::CCObject::autorelease(v5);
v6 = *a2;
if ( v6 > 0x28 )
{
v9 = *((__int64 **)a2 + 1);
*((_QWORD *)a2 + 1) = v9 + 1;
v8 = *v9;
if ( !*v9 )
return v5;
}
else
{
v7 = (__int64 *)(*((_QWORD *)a2 + 2) + v6);
*a2 = v6 + 8;
v8 = *v7;
if ( !*v7 )
return v5;
}
v10 = operator new(0x70u);
*v10 = 0;
v10[1] = 0;
v10[2] = 0;
v10[3] = 0;
v10[4] = 0;
v10[5] = 0;
v10[6] = 0;
cocos2d::CCAction::CCAction(v10);
*((_DWORD *)v10 + 20) = 0;
*(_QWORD *)v10 = off_100B321E0;
cocos2d::CCSpawn::initWithTwoActions(v10, v5, v8);
v5 = v10;
}
}
}
v12 = operator new(0x58u);
*v12 = 0;
v12[1] = 0;
v12[2] = 0;
v12[3] = 0;
v12[4] = 0;
*((_QWORD *)v12 + 10) = 0;
cocos2d::CCAction::CCAction(v12);
*((_DWORD *)v12 + 20) = 0;
*(_QWORD *)v12 = off_100B32548;
cocos2d::CCObject::autorelease(v12);
v5 = operator new(0x70u);
*v5 = 0;
v5[1] = 0;
v5[2] = 0;
v5[3] = 0;
v5[4] = 0;
v5[5] = 0;
v5[6] = 0;
cocos2d::CCAction::CCAction(v5);
*((_DWORD *)v5 + 20) = 0;
*(_QWORD *)v5 = off_100B321E0;
cocos2d::CCSpawn::initWithTwoActions(v5, a1, v12);
cocos2d::CCObject::autorelease(v5);
return v5;
}