//
// cocos2d::CCMenuItem::activate from 0x1003a7df0 to 0x1003a7e5c (108 bytes)
//
// 6 xrefs:
// > CCMenuItemToggler::activate @ 0x10001f119
// > CCMenuItemSpriteExtra::activate @ 0x100263493
// > ??> @ 0x100b14640
// > ??> @ 0x100b33bd0
// > ??> @ 0x100b34a80
// > ??> @ 0x100b34f90
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:29:22 +0000
//
__int64 __fastcall cocos2d::CCMenuItem::activate(__int64 a1)
{
__int64 result; // rax
__int64 v3; // rdi
_QWORD *v4; // rdi
_QWORD *v5; // rax
if ( *(_BYTE *)(a1 + 339) == 1 )
{
v3 = *(_QWORD *)(a1 + 344);
if ( v3 )
{
result = *(_QWORD *)(a1 + 352);
if ( result )
{
v4 = (_QWORD *)(*(_QWORD *)(a1 + 360) + v3);
if ( (result & 1) != 0 )
result = *(_QWORD *)(*v4 + result - 1);
result = ((__int64 (__fastcall *)(_QWORD *, __int64))result)(v4, a1);
}
}
if ( *(_DWORD *)(a1 + 300) )
{
v5 = cocos2d::CCScriptEngineManager::sharedManager();
return (*(__int64 (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*v5 + 80LL))(*v5, a1);
}
}
return result;
}