// // cocos2d::CCActionManager::addAction from 0x1800378e0 to 0x180037e29 (1353 bytes) // // 3 xrefs: // > cocos2d::CCNode::runAction @ 0x18000483e // > @ 0x1801438a8 // > @ 0x1801b0b64 // // 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 __fastcall cocos2d::CCActionManager::addAction( cocos2d::CCActionManager *this, struct cocos2d::CCAction *a2, struct cocos2d::CCNode *a3, char a4) { cocos2d::_hashElement *m_pTargets; // r10 struct cocos2d::CCAction *v7; // rdi __int64 v9; // r9 int v10; // edx int v11; // r8d unsigned int v12; // ecx int v13; // edx unsigned int v14; // r8d unsigned int v15; // ecx int v16; // edx __int64 v17; // r14 __int64 v18; // rcx _QWORD *v19; // r14 __int64 v20; // r14 int v21; // ebp cocos2d::_hashElement *v22; // rax _OWORD *v23; // rcx void *v24; // rcx void ***v25; // rsi void **v26; // rcx int v27; // edx unsigned int v28; // r15d unsigned int v29; // r13d int v30; // edx unsigned int v31; // r15d unsigned int v32; // r13d int v33; // edx unsigned int v34; // r13d __int64 v35; // rdx __int64 v36; // r8 __int64 v37; // rcx __int64 v38; // rcx char *v39; // rax char *v40; // r15 void **v41; // rdi unsigned int v42; // ebx unsigned int v43; // r11d void **i; // rax __int64 v45; // r9 __int64 v46; // r10 char *v47; // rcx unsigned int v48; // eax void **v49; // rcx int v51; // [rsp+70h] [rbp+18h] v51 = (int)a3; m_pTargets = this->m_pTargets; v7 = a2; if ( !m_pTargets ) goto LABEL_8; v9 = *((_QWORD *)m_pTargets + 5); v10 = (((BYTE1(a3) + ((BYTE2(a3) + (BYTE3(a3) << 8)) << 8)) << 8) + (unsigned __int8)a3 + 17973517) ^ 0x7F76D; v11 = (v10 << 8) ^ (-1622558010 - v10); v12 = (((((((BYTE1(v51) + ((BYTE2(v51) + (HIBYTE(v51) << 8)) << 8)) << 8) + (unsigned __int8)a3 + 17973517) ^ 0x7F76D) << 8) ^ (unsigned int)(-1622558010 - v10)) >> 13) ^ (-17973517 - v11 - v10); v13 = (v12 >> 12) ^ (v10 - v11 - v12); v14 = (v13 << 16) ^ (v11 - v13 - v12); v15 = (v14 >> 5) ^ (v12 - v14 - v13); v16 = (v15 >> 3) ^ (v13 - v14 - v15); v17 = *(_QWORD *)(*(_QWORD *)v9 + 16 * ((unsigned int)(*(_DWORD *)(v9 + 8) - 1) & (((unsigned __int64)((v16 << 10) ^ (v14 - v16 - v15)) >> 15) ^ (v15 - ((v16 << 10) ^ (v14 - v16 - v15)) - v16)))); if ( !v17 || (v18 = *(_QWORD *)(v9 + 32), (v19 = (_QWORD *)(v17 - v18)) == nullptr) ) { LABEL_8: v19 = calloc(0x60u, 1u); *((_BYTE *)v19 + 33) = a4; cocos2d::CCObject::retain(a3); v21 = 0; v19[1] = a3; v19[7] = 0; v19[10] = v19 + 1; *((_DWORD *)v19 + 22) = 4; v22 = this->m_pTargets; if ( v22 ) { v25 = (void ***)(v19 + 5); *(_QWORD *)(*(_QWORD *)(*((_QWORD *)v22 + 5) + 24LL) + 16LL) = v19; v19[6] = *(_QWORD *)(*((_QWORD *)this->m_pTargets + 5) + 24LL) - *(_QWORD *)(*((_QWORD *)this->m_pTargets + 5) + 32LL); *(_QWORD *)(*((_QWORD *)this->m_pTargets + 5) + 24LL) = v19 + 5; } else { this->m_pTargets = (cocos2d::_hashElement *)v19; v19[6] = 0; *((_QWORD *)this->m_pTargets + 5) = malloc(0x40u); v23 = *((_OWORD **)this->m_pTargets + 5); if ( !v23 ) goto LABEL_18; *v23 = 0; v23[1] = 0; v23[2] = 0; v23[3] = 0; *(_QWORD *)(*((_QWORD *)this->m_pTargets + 5) + 24LL) = (char *)this->m_pTargets + 40; *(_DWORD *)(*((_QWORD *)this->m_pTargets + 5) + 8LL) = 32; *(_DWORD *)(*((_QWORD *)this->m_pTargets + 5) + 12LL) = 5; *(_QWORD *)(*((_QWORD *)this->m_pTargets + 5) + 32LL) = 40; **((_QWORD **)this->m_pTargets + 5) = malloc(0x200u); v24 = **((void ***)this->m_pTargets + 5); if ( !v24 ) LABEL_18: exit(-1); memset(v24, 0, 0x200u); v25 = (void ***)(v19 + 5); *(_DWORD *)(*((_QWORD *)this->m_pTargets + 5) + 56LL) = -1609490463; } ++*(_DWORD *)(*((_QWORD *)this->m_pTargets + 5) + 16LL); v26 = *((void ***)this->m_pTargets + 5); *((_DWORD *)v19 + 23) = -17973517; *v25 = v26; v27 = (((*((unsigned __int8 *)v19 + 9) + ((*((unsigned __int8 *)v19 + 10) + (*((unsigned __int8 *)v19 + 11) << 8)) << 8)) << 8) + *((unsigned __int8 *)v19 + 8) + 17973517) ^ 0x7F76D; v28 = (v27 << 8) ^ (-1622558010 - v27); v29 = (v28 >> 13) ^ (-17973517 - v28 - v27); v30 = (v29 >> 12) ^ (v27 - v29 - v28); v31 = (v30 << 16) ^ (v28 - v29 - v30); v32 = (v31 >> 5) ^ (v29 - v31 - v30); v33 = (v32 >> 3) ^ (v30 - v32 - v31); v34 = (((v33 << 10) ^ (v31 - v32 - v33)) >> 15) ^ (v32 - ((v33 << 10) ^ (v31 - v32 - v33)) - v33); *((_DWORD *)v19 + 23) = v34; v35 = *((_QWORD *)this->m_pTargets + 5); v36 = 2LL * (v34 & (*(_DWORD *)(v35 + 8) - 1)); ++*(_DWORD *)(*(_QWORD *)v35 + 8 * v36 + 8); v19[9] = *(_QWORD *)(**((_QWORD **)this->m_pTargets + 5) + 8 * v36); v19[8] = 0; v37 = *(_QWORD *)(**((_QWORD **)this->m_pTargets + 5) + 8 * v36); if ( v37 ) *(_QWORD *)(v37 + 24) = v25; *(_QWORD *)(**((_QWORD **)this->m_pTargets + 5) + 8 * v36) = v25; v38 = **((_QWORD **)this->m_pTargets + 5); if ( *(_DWORD *)(v38 + 8 * v36 + 8) >= (unsigned int)(10 * (*(_DWORD *)(v38 + 8 * v36 + 12) + 1)) && *((_DWORD *)*v25 + 13) != 1 ) { v39 = (char *)malloc(16LL * (unsigned int)(2 * *((_DWORD *)*v25 + 2))); v40 = v39; if ( !v39 ) goto LABEL_18; v41 = *v25; v42 = 2 * *((_DWORD *)*v25 + 2); memset(v39, 0, 16LL * v42); v43 = 0; *((_DWORD *)v41 + 10) = (((v42 - 1) & (_DWORD)v41[2]) != 0) + (*((_DWORD *)v41 + 4) >> (*((_BYTE *)v41 + 12) + 1)); *((_DWORD *)*v25 + 11) = 0; for ( i = *v25; v43 < *((_DWORD *)*v25 + 2); ++v43 ) { v45 = *((_QWORD *)*i + 2 * v43); if ( v45 ) { do { v46 = *(_QWORD *)(v45 + 32); v47 = &v40[16 * (*(_DWORD *)(v45 + 52) & (2 * *((_DWORD *)*v25 + 2) - 1))]; v48 = *((_DWORD *)v47 + 2) + 1; *((_DWORD *)v47 + 2) = v48; if ( v48 > *((_DWORD *)*v25 + 10) ) { ++*((_DWORD *)*v25 + 11); *((_DWORD *)v47 + 3) = *((_DWORD *)v47 + 2) / *((_DWORD *)*v25 + 10); } *(_QWORD *)(v45 + 24) = 0; *(_QWORD *)(v45 + 32) = *(_QWORD *)v47; if ( *(_QWORD *)v47 ) *(_QWORD *)(*(_QWORD *)v47 + 24LL) = v45; *(_QWORD *)v47 = v45; v45 = v46; } while ( v46 ); } i = *v25; } free(*i); *((_DWORD *)*v25 + 2) *= 2; ++*((_DWORD *)*v25 + 3); **v25 = v40; v49 = *v25; if ( *((_DWORD *)*v25 + 11) > *((_DWORD *)*v25 + 4) >> 1 ) v21 = *((_DWORD *)v49 + 12) + 1; *((_DWORD *)v49 + 12) = v21; if ( *((_DWORD *)*v25 + 12) > 1u ) *((_DWORD *)*v25 + 13) = 1; } v7 = a2; goto LABEL_32; } while ( *((_DWORD *)v19 + 22) != 4 || *(_DWORD *)v19[10] != (_DWORD)a3 ) { v20 = v19[9]; if ( v20 ) { v19 = (_QWORD *)(v20 - v18); if ( v19 ) continue; } goto LABEL_8; } LABEL_32: if ( *v19 ) { if ( *(_DWORD *)*v19 == *(_DWORD *)(*v19 + 4LL) ) sub_18009D810(); } else { *v19 = sub_18009DC90(4u); } sub_18009D7E0(*v19, v7); sub_18009D5E0(*v19, v7); ((void (__fastcall *)(struct cocos2d::CCAction *, struct cocos2d::CCNode *))v7->startWithTarget)(v7, a3); }