//
// cocos2d::CCActionManager::addAction from 0x7bfec4 to 0x7c0228 (868 bytes)
//
// 22 xrefs:
// > CCCountdown::lapFinished @ 0x3c5392
// > sub_3CC57C @ 0x3cc5c6
// > CCCircleWave::init @ 0x3e55bc
// > CCCircleAlert::init @ 0x3e5746
// > CCAlertCircle::init @ 0x3e581c
// > CCLightStrip::init @ 0x3e6010
// > AppDelegate::applicationWillEnterForeground @ 0x3f6bfc
// > MenuLayer::FLAlert_Clicked @ 0x3f9d80
// > LoadingLayer::init @ 0x3fba98
// > LoadingLayer::loadAssets @ 0x3fc03a
// > GameManager::reloadAllStep4 @ 0x412f28
// > GameManager::reloadAllStep3 @ 0x412ffe
// > GameManager::resumeAudioDelayed @ 0x4141b6
// > GameManager::rewardedVideoHiddenDelayed @ 0x414212
// > GameManager::queueReloadMenu @ 0x414f04
// > GameManager::reloadAll @ 0x414f84
// > GameManager::reloadAllStep2 @ 0x415afe
// > GameLevelManager::handleItDelayed @ 0x4b4f8e
// > MusicDownloadManager::handleItDelayed @ 0x56cd52
// > GJAccountManager::handleItDelayed @ 0x58170e
// > GJMultiplayerManager::handleItDelayed @ 0x6412fa
// > cocos2d::CCNode::runAction @ 0x7c4c14
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:20 +0000
//
int __fastcall cocos2d::CCActionManager::addAction(
cocos2d::CCActionManager *this,
cocos2d::CCAction *a2,
cocos2d::CCNode *a3,
bool a4)
{
int v6; // r4
_DWORD *v9; // r7
int v10; // r1
unsigned int v11; // r2
unsigned int v12; // r3
int v13; // r1
unsigned int v14; // r2
unsigned int v15; // r3
int v16; // r1
_DWORD *v17; // r4
int v18; // r3
int v19; // r7
_DWORD *v20; // r0
_DWORD *v21; // r6
void *v22; // r0
int v23; // r0
int v24; // r2
int v25; // r1
unsigned int v26; // r2
unsigned int v27; // r3
int v28; // r1
unsigned int v29; // r2
unsigned int v30; // r3
unsigned int v31; // r1
unsigned int v32; // r2
_DWORD *v33; // r1
int v34; // r2
int v35; // r3
int v36; // r1
_DWORD *v37; // r3
int v38; // r2
int v40; // r2
int v41; // r6
size_t v42; // r7
char *v43; // r0
char *v44; // r9
unsigned int v45; // r2
int v46; // r3
unsigned int v47; // r2
unsigned int v48; // r3
unsigned int v49; // r6
int v50; // r3
_DWORD *i; // r7
_DWORD *v52; // r1
int v53; // r8
unsigned int v54; // r2
int v55; // r3
_DWORD *v56; // r3
unsigned int v57; // r1
unsigned int v58; // r2
bool v59; // cc
int v60; // r2
int v61; // r3
_DWORD *v62; // [sp+0h] [bp-1Ch]
_DWORD v63[3]; // [sp+10h] [bp-Ch] BYREF
v6 = *((_DWORD *)this + 13);
v63[0] = a3;
if ( v6 )
{
v9 = *(_DWORD **)(v6 + 20);
v10 = (LOBYTE(v63[0]) + 17973517 + (HIBYTE(v63[0]) << 24) + (BYTE2(v63[0]) << 16) + (BYTE1(v63[0]) << 8)) ^ 0x7F76D;
v11 = (-1622558010 - v10) ^ (v10 << 8);
v12 = (-17973517 - v10 - v11) ^ (v11 >> 13);
v13 = (v10 - v11 - v12) ^ (v12 >> 12);
v14 = (v11 - v12 - v13) ^ (v13 << 16);
v15 = (v12 - v13 - v14) ^ (v14 >> 5);
v16 = (v13 - v14 - v15) ^ (v15 >> 3);
v17 = *(_DWORD **)(*v9
+ 12
* (((v15 - v16 - ((v14 - v15 - v16) ^ (v16 << 10)))
^ (((v14 - v15 - v16) ^ (v16 << 10)) >> 15))
& (v9[1] - 1)));
if ( v17 )
v17 = (_DWORD *)((char *)v17 - v9[5]);
while ( v17 )
{
if ( v17[11] == 4 && !memcmp((const void *)v17[10], v63, 4u) )
goto LABEL_16;
v18 = v17[9];
if ( !v18 )
break;
v17 = (_DWORD *)(v18 - v9[5]);
}
}
v17 = calloc(0x34u, 1u);
*((_BYTE *)v17 + 17) = a4;
cocos2d::CCObject::retain(a3);
v19 = *((_DWORD *)this + 13);
v17[1] = a3;
v17[7] = 0;
v17[10] = v17 + 1;
v17[11] = 4;
if ( v19 )
{
*(_DWORD *)(*(_DWORD *)(*(_DWORD *)(v19 + 20) + 16) + 8) = v17;
v40 = *((_DWORD *)this + 13);
v17[6] = *(_DWORD *)(*(_DWORD *)(v40 + 20) + 16) - *(_DWORD *)(*(_DWORD *)(v40 + 20) + 20);
*(_DWORD *)(*(_DWORD *)(v40 + 20) + 16) = v17 + 5;
}
else
{
*((_DWORD *)this + 13) = v17;
v17[6] = 0;
v20 = malloc(0x2Cu);
v21 = v20;
v17[5] = v20;
if ( !v20 )
goto LABEL_17;
memset(v20, 0, 0x2Cu);
v21[4] = v17 + 5;
v21[1] = 32;
v21[2] = 5;
v21[5] = 20;
v22 = malloc(0x180u);
*v21 = v22;
if ( !v22 )
goto LABEL_17;
memset(v22, 0, 0x180u);
v21[10] = -1609490463;
}
++*(_DWORD *)(*(_DWORD *)(*((_DWORD *)this + 13) + 20) + 12);
v23 = *((_DWORD *)this + 13);
v24 = *((unsigned __int8 *)v17 + 4);
v17[5] = *(_DWORD *)(v23 + 20);
v25 = (v24
+ 17973517
+ (*((unsigned __int8 *)v17 + 7) << 24)
+ (*((unsigned __int8 *)v17 + 6) << 16)
+ (*((unsigned __int8 *)v17 + 5) << 8))
^ 0x7F76D;
v26 = (-1622558010 - v25) ^ (v25 << 8);
v27 = (-17973517 - v25 - v26) ^ (v26 >> 13);
v28 = (v25 - v26 - v27) ^ (v27 >> 12);
v29 = (v26 - v27 - v28) ^ (v28 << 16);
v30 = (v27 - v28 - v29) ^ (v29 >> 5);
v31 = v28 - v29 - v30;
v32 = (v30 - (v31 ^ (v30 >> 3)) - ((v29 - v30 - (v31 ^ (v30 >> 3))) ^ ((v31 ^ (v30 >> 3)) << 10)))
^ (((v29 - v30 - (v31 ^ (v30 >> 3))) ^ ((v31 ^ (v30 >> 3)) << 10)) >> 15);
v17[12] = v32;
v33 = *(_DWORD **)(v23 + 20);
v34 = 12 * (v32 & (v33[1] - 1));
++*(_DWORD *)(*v33 + v34 + 4);
v35 = *((_DWORD *)this + 13);
v17[9] = *(_DWORD *)(**(_DWORD **)(v35 + 20) + v34);
v17[8] = 0;
v36 = *(_DWORD *)(**(_DWORD **)(v35 + 20) + v34);
v37 = v17 + 5;
if ( v36 )
*(_DWORD *)(v36 + 12) = v37;
*(_DWORD *)(**(_DWORD **)(*((_DWORD *)this + 13) + 20) + v34) = v37;
v38 = v34 + **(_DWORD **)(*((_DWORD *)this + 13) + 20);
if ( *(_DWORD *)(v38 + 4) >= (unsigned int)(10 * *(_DWORD *)(v38 + 8) + 10) )
{
v41 = v17[5];
if ( *(_DWORD *)(v41 + 36) != 1 )
{
v42 = 24 * *(_DWORD *)(v41 + 4);
v43 = (char *)malloc(v42);
v44 = v43;
if ( v43 )
{
memset(v43, 0, v42);
v45 = *(_DWORD *)(v41 + 12);
v46 = (2 * *(_DWORD *)(v41 + 4) - 1) & v45;
v47 = v45 >> (*(_BYTE *)(v41 + 8) + 1);
if ( v46 )
v48 = v47 + 1;
else
v48 = v47;
*(_DWORD *)(v41 + 24) = v48;
v49 = 0;
*(_DWORD *)(v17[5] + 28) = 0;
while ( 1 )
{
v50 = v17[5];
if ( v49 >= *(_DWORD *)(v50 + 4) )
break;
for ( i = *(_DWORD **)(*(_DWORD *)v50 + 12 * v49); i; i = v62 )
{
v52 = (_DWORD *)v17[5];
v62 = (_DWORD *)i[4];
v53 = 12 * ((2 * v52[1] - 1) & i[7]);
v54 = *(_DWORD *)&v44[v53 + 4] + 1;
*(_DWORD *)&v44[v53 + 4] = v54;
if ( v54 > v52[6] )
{
++v52[7];
*(_DWORD *)&v44[v53 + 8] = *(_DWORD *)&v44[v53 + 4] / *(_DWORD *)(v17[5] + 24);
}
i[3] = 0;
i[4] = *(_DWORD *)&v44[v53];
v55 = *(_DWORD *)&v44[v53];
if ( v55 )
*(_DWORD *)(v55 + 12) = i;
*(_DWORD *)&v44[v53] = i;
}
++v49;
}
free(*(void **)v50);
*(_DWORD *)(v17[5] + 4) *= 2;
++*(_DWORD *)(v17[5] + 8);
*(_DWORD *)v17[5] = v44;
v56 = (_DWORD *)v17[5];
v57 = v56[3];
v58 = v56[7];
v59 = v58 > v57 >> 1;
if ( v58 <= v57 >> 1 )
v60 = 0;
else
v60 = v56[8];
if ( v59 )
++v60;
v56[8] = v60;
v61 = v17[5];
if ( *(_DWORD *)(v61 + 32) > 1u )
*(_DWORD *)(v61 + 36) = 1;
goto LABEL_16;
}
LABEL_17:
exit(-1);
}
}
LABEL_16:
cocos2d::CCActionManager::actionAllocWithHashElement((int)this, v17);
cocos2d::ccArrayContainsObject(*v17, a2);
cocos2d::ccArrayAppendObject(*v17, a2);
return (*(int (__fastcall **)(cocos2d::CCAction *, cocos2d::CCNode *, _DWORD))(*(_DWORD *)a2 + 44))(a2, a3, v63[1]);
}