//
// cocos2d::CCActionManager::removeAllActionsFromTarget from 0x5b9974 to 0x5b9a5a (230 bytes)
//
// 3 xrefs:
// > CCCountdown::startTimerWithSeconds @ 0x2e573e
// > cocos2d::CCActionManager::removeAllActions @ 0x5b9a7a
// > cocos2d::CCNode::stopAllActions @ 0x5be1e2
//
// 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 cocos2d::CCActionManager::removeAllActionsFromTarget(cocos2d::CCActionManager *a1, cocos2d::CCObject *a2)
{
cocos2d::_hashElement *m_pTargets; // r1
_DWORD *v4; // r6
int v5; // r0
unsigned int v6; // r2
unsigned int v7; // r3
int v8; // r0
unsigned int v9; // r2
unsigned int v10; // r3
int v11; // r0
int v12; // r5
cocos2d::CCObject *v13; // r2
int v14; // r3
cocos2d::_ccArray *v15; // r1
cocos2d::CCObject *v16; // [sp+4h] [bp-8h] BYREF
v16 = a2;
if ( a2 )
{
m_pTargets = a1->m_pTargets;
if ( m_pTargets )
{
v4 = *((_DWORD **)m_pTargets + 5);
v5 = ((unsigned __int8)v16 + 17973517 + (HIBYTE(v16) << 24) + (BYTE2(v16) << 16) + (BYTE1(v16) << 8)) ^ 0x7F76D;
v6 = (-1622558010 - v5) ^ (v5 << 8);
v7 = (-17973517 - v5 - v6) ^ (v6 >> 13);
v8 = (v5 - v6 - v7) ^ (v7 >> 12);
v9 = (v6 - v7 - v8) ^ (v8 << 16);
v10 = (v7 - v8 - v9) ^ (v9 >> 5);
v11 = (v8 - v9 - v10) ^ (v10 >> 3);
v12 = *(_DWORD *)(*v4
+ 12
* (((v10 - v11 - ((v9 - v10 - v11) ^ (v11 << 10)))
^ (((v9 - v10 - v11) ^ (v11 << 10)) >> 15))
& (v4[1] - 1)));
if ( v12 )
v12 -= v4[5];
while ( v12 )
{
if ( *(_DWORD *)(v12 + 44) == 4 && !memcmp(*(const void **)(v12 + 40), &v16, 4u) )
{
if ( cocos2d::ccArrayContainsObject(*(cocos2d **)v12, *(cocos2d::_ccArray **)(v12 + 12), v13)
&& !*(_BYTE *)(v12 + 16) )
{
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(v12 + 12));
*(_BYTE *)(v12 + 16) = 1;
}
cocos2d::ccArrayRemoveAllObjects(*(cocos2d **)v12, v15);
if ( a1->m_pCurrentTarget == (cocos2d::_hashElement *)v12 )
a1->m_bCurrentTargetSalvaged = 1;
else
cocos2d::CCActionManager::deleteHashElement(a1, (cocos2d::_hashElement *)v12);
return;
}
v14 = *(_DWORD *)(v12 + 36);
if ( !v14 )
return;
v12 = v14 - v4[5];
}
}
}
}