//
// cocos2d::CCMenuItem::activate from 0x7dd69e to 0x7dd6ec (78 bytes)
//
// 5 xrefs:
// > CCMenuExtra::fireSelectedItem @ 0x3c6468
// > CCMenuItemSpriteExtra::activate @ 0x3c69be
// > CCMenuItemToggler::activate @ 0x3c6c0a
// > cocos2d::CCMenuItemToggle::activate @ 0x7dd71c
// > cocos2d::CCMenuItemLabel::activate @ 0x7dd740
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:00:46 +0000
//
int __fastcall cocos2d::CCMenuItem::activate(int this, int a2)
{
_DWORD *v2; // r4
char *v3; // r2
int v4; // r3
int v5; // r3
int v6; // r0
_DWORD *v7; // r0
v2 = (_DWORD *)this;
if ( *(_BYTE *)(this + 279) )
{
this = *(_DWORD *)(this + 280);
if ( this )
{
v3 = (char *)v2[71];
v4 = v2[72];
if ( v3 || (a2 = v4 << 31, (v4 & 1) != 0) )
{
v5 = v4 >> 1;
if ( (v2[72] & 1) != 0 )
a2 = *(_DWORD *)(this + v5);
v6 = this + v5;
if ( (v2[72] & 1) != 0 )
v3 = *(char **)&v3[a2];
this = ((int (__fastcall *)(int, _DWORD *))v3)(v6, v2);
}
}
if ( v2[63] )
{
v7 = (_DWORD *)cocos2d::CCScriptEngineManager::sharedManager((cocos2d::CCScriptEngineManager *)this);
return (*(int (__fastcall **)(_DWORD, _DWORD *))(*(_DWORD *)*v7 + 40))(*v7, v2);
}
}
return this;
}