//
// cocos2d::CCActionManager::getActionByTag from 0x180037f80 to 0x1800380a6 (294 bytes)
//
// 2 xrefs:
// > cocos2d::CCNode::getActionByTag @ 0x1800032ca
// > ??> @ 0x1801438a8
//
// 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
//
struct cocos2d::CCAction *__fastcall cocos2d::CCActionManager::getActionByTag(
cocos2d::CCActionManager *this,
int a2,
struct cocos2d::CCObject *a3)
{
cocos2d::_hashElement *m_pTargets; // r11
int v4; // r9d
__int64 v6; // r11
int v7; // edx
int v8; // r8d
unsigned int v9; // ecx
int v10; // edx
unsigned int v11; // r8d
unsigned int v12; // ecx
int v13; // edx
__int64 v14; // rax
__int64 v15; // rdx
struct cocos2d::CCAction *result; // rax
__int64 v17; // rax
cocos2d::CCAction_vtbl *v18; // r8
unsigned int copyWithZone; // edx
__int64 v20; // rcx
bool (__stdcall *isEqual)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *); // r8
int v22; // [rsp+18h] [rbp+18h]
m_pTargets = this->m_pTargets;
v4 = (int)a3;
v22 = (int)a3;
if ( !m_pTargets )
return nullptr;
v6 = *((_QWORD *)m_pTargets + 5);
v7 = (((BYTE1(a3) + ((BYTE2(a3) + (BYTE3(a3) << 8)) << 8)) << 8) + (unsigned __int8)a3 + 17973517) ^ 0x7F76D;
v8 = (v7 << 8) ^ (-1622558010 - v7);
v9 = (((((((BYTE1(v22) + ((BYTE2(v22) + (HIBYTE(v22) << 8)) << 8)) << 8) + (unsigned __int8)v4 + 17973517) ^ 0x7F76D) << 8)
^ (unsigned int)(-1622558010 - v7)) >> 13)
^ (-17973517 - v8 - v7);
v10 = (v9 >> 12) ^ (v7 - v8 - v9);
v11 = (v10 << 16) ^ (v8 - v10 - v9);
v12 = (v11 >> 5) ^ (v9 - v11 - v10);
v13 = (v12 >> 3) ^ (v10 - v11 - v12);
v14 = *(_QWORD *)(*(_QWORD *)v6
+ 16
* ((unsigned int)(*(_DWORD *)(v6 + 8) - 1)
& (((unsigned __int64)((v13 << 10) ^ (v11 - v13 - v12)) >> 15)
^ (v12 - ((v13 << 10) ^ (v11 - v13 - v12)) - v13))));
if ( !v14 )
return nullptr;
v15 = *(_QWORD *)(v6 + 32);
result = (struct cocos2d::CCAction *)(v14 - v15);
if ( !result )
return nullptr;
while ( result[1].m_uID != 4
|| result[1].copyWithZone != (cocos2d::CCObject *(__stdcall *)(cocos2d::CCAction *__hidden, cocos2d::CCZone *))v4 )
{
v17 = *(_QWORD *)&result->m_nTag;
if ( !v17 )
return nullptr;
result = (struct cocos2d::CCAction *)(v17 - v15);
if ( !result )
return result;
}
v18 = result->__vftable;
if ( !result->__vftable )
return nullptr;
copyWithZone = (unsigned int)v18->copyWithZone;
v20 = 0;
if ( !LODWORD(v18->copyWithZone) )
return nullptr;
isEqual = v18->isEqual;
while ( 1 )
{
result = *((struct cocos2d::CCAction **)isEqual + v20);
if ( result->m_nTag == a2 )
break;
v20 = (unsigned int)(v20 + 1);
if ( (unsigned int)v20 >= copyWithZone )
return nullptr;
}
return result;
}