//
// cocos2d::CCActionManager::removeAllActionsFromTarget from 0xac56a0 to 0xac5858 (440 bytes)
//
// 4 xrefs:
// > CCCountdown::startTimerWithSeconds @ 0x57478c
// > cocos2d::CCActionManager::removeAllActions @ 0xac587c
// > cocos2d::CCNode::stopAllActions @ 0xacd014
// > ??> @ 0x626e8
//
// 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; // x6
int v3; // w1
unsigned int v4; // w3
unsigned int v5; // w2
__int64 v6; // x20
int v7; // w1
unsigned int v8; // w3
unsigned int v9; // w2
int v10; // w1
__int64 v11; // x1
__int64 v12; // x19
__int64 v14; // x1
cocos2d::CCObject *v15; // x2
cocos2d::_ccArray *v16; // x1
cocos2d::_ccArray *v17; // x1
cocos2d::CCObject *v18; // [xsp+38h] [xbp+38h] BYREF
v18 = a2;
if ( a2 )
{
m_pTargets = a1->m_pTargets;
if ( m_pTargets )
{
v3 = ((unsigned __int8)v18 + 17973517 + (BYTE3(v18) << 24) + (BYTE2(v18) << 16) + (BYTE1(v18) << 8)) ^ 0x7F76D;
v4 = (-1622558010 - v3) ^ (v3 << 8);
v5 = (-17973517 - v3 - v4) ^ (v4 >> 13);
v6 = *((_QWORD *)m_pTargets + 5);
v7 = (v3 - v4 - v5) ^ (v5 >> 12);
v8 = (v4 - v5 - v7) ^ (v7 << 16);
v9 = (v5 - v7 - v8) ^ (v8 >> 5);
v10 = (v7 - v8 - v9) ^ (v9 >> 3);
v11 = *(_QWORD *)(*(_QWORD *)v6
+ 16LL
* (((v9 - v10 - ((v8 - v9 - v10) ^ (v10 << 10)))
^ (((v8 - v9 - v10) ^ (v10 << 10)) >> 15))
& (*(_DWORD *)(v6 + 8) - 1)));
if ( v11 )
v12 = v11 - *(_QWORD *)(v6 + 32);
else
v12 = 0;
while ( 1 )
{
if ( !v12 )
return;
if ( *(_DWORD *)(v12 + 88) == 4 && !memcmp(*(const void **)(v12 + 80), &v18, 4u) )
break;
v14 = *(_QWORD *)(v12 + 72);
if ( !v14 )
return;
v12 = v14 - *(_QWORD *)(v6 + 32);
}
if ( !(unsigned __int8)cocos2d::ccArrayContainsObject(*(cocos2d **)v12, *(cocos2d::_ccArray **)(v12 + 24), v15)
|| *(_BYTE *)(v12 + 32) )
{
cocos2d::ccArrayRemoveAllObjects(*(cocos2d **)v12, v16);
if ( (cocos2d::_hashElement *)v12 == a1->m_pCurrentTarget )
{
LABEL_16:
a1->m_bCurrentTargetSalvaged = 1;
return;
}
}
else
{
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(v12 + 24));
*(_BYTE *)(v12 + 32) = 1;
cocos2d::ccArrayRemoveAllObjects(*(cocos2d **)v12, v17);
if ( (cocos2d::_hashElement *)v12 == a1->m_pCurrentTarget )
goto LABEL_16;
}
cocos2d::CCActionManager::deleteHashElement(a1, (cocos2d::_hashElement *)v12);
}
}
}