//
// cocos2d::CCActionManager::removeActionByTag from 0x5b9c68 to 0x5b9d46 (222 bytes)
//
// 2 xrefs:
// > AppDelegate::applicationWillEnterForeground @ 0x307720
// > cocos2d::CCNode::stopActionByTag @ 0x5be21e
//
// 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::removeActionByTag(cocos2d::CCActionManager *a1, unsigned int a2, cocos2d::CCObject *a3)
{
cocos2d::_hashElement *m_pTargets; // r1
_DWORD *v6; // r7
int v7; // r0
unsigned int v8; // r2
unsigned int v9; // r3
int v10; // r0
unsigned int v11; // r2
unsigned int v12; // r3
int v13; // r0
int v14; // r6
int v15; // r3
unsigned int i; // r1
int v17; // r2
unsigned int v18; // [sp+4h] [bp-4h] BYREF
v18 = a2;
m_pTargets = a1->m_pTargets;
v18 = (unsigned int)a3;
if ( m_pTargets )
{
v6 = *((_DWORD **)m_pTargets + 5);
v7 = ((unsigned __int8)v18 + 17973517 + (HIBYTE(v18) << 24) + (BYTE2(v18) << 16) + (BYTE1(v18) << 8)) ^ 0x7F76D;
v8 = (-1622558010 - v7) ^ (v7 << 8);
v9 = (-17973517 - v7 - v8) ^ (v8 >> 13);
v10 = (v7 - v8 - v9) ^ (v9 >> 12);
v11 = (v8 - v9 - v10) ^ (v10 << 16);
v12 = (v9 - v10 - v11) ^ (v11 >> 5);
v13 = (v10 - v11 - v12) ^ (v12 >> 3);
v14 = *(_DWORD *)(*v6
+ 12
* (((v12 - v13 - ((v11 - v12 - v13) ^ (v13 << 10)))
^ (((v11 - v12 - v13) ^ (v13 << 10)) >> 15))
& (v6[1] - 1)));
if ( v14 )
v14 -= v6[5];
while ( v14 )
{
if ( *(_DWORD *)(v14 + 44) == 4 && !memcmp(*(const void **)(v14 + 40), &v18, 4u) )
{
for ( i = 0; i != **(_DWORD **)v14; ++i )
{
v17 = *(_DWORD *)(*(_DWORD *)(*(_DWORD *)v14 + 12) + 4 * i);
if ( *(_DWORD *)(v17 + 60) == a2 && *(_DWORD *)(v17 + 52) == v18 )
{
cocos2d::CCActionManager::removeActionAtIndex(a1, i, (cocos2d::_hashElement *)v14);
return;
}
}
return;
}
v15 = *(_DWORD *)(v14 + 36);
if ( !v15 )
return;
v14 = v15 - v6[5];
}
}
}