//
// CCMenuItemSpriteExtra::activate from 0x140044db0 to 0x140044eb7 (263 bytes)
//
// 3 xrefs:
// > ??> @ 0x14052ec78
// > ??> @ 0x1405539b8
// > ??> @ 0x1406c468c
//
// 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
//
// Hidden C++ exception states: #wind=2
void CCMenuItemSpriteExtra::activate(CCMenuItemSpriteExtra *a1)
{
bool *p_m_animationEnabled; // rdx
size_t v3; // r8
int v4; // r8d
int v5; // r9d
int v6; // ecx
__int128 v7; // [rsp+30h] [rbp-28h] BYREF
__int64 v8; // [rsp+40h] [rbp-18h]
__int64 v9; // [rsp+48h] [rbp-10h]
FMODAudioEngine *v10; // [rsp+68h] [rbp+10h]
if ( a1->m_bEnabled )
{
cocos2d::CCNode::stopAllActions(a1);
if ( !LODWORD(a1->m_duration) )
((void (__fastcall *)(CCMenuItemSpriteExtra *))a1->setScale_0)(a1);
if ( *((_QWORD *)&a1->m_activateSound.m_data.m_bigStorage + 1) )
{
p_m_animationEnabled = &a1->m_animationEnabled;
if ( a1->m_activateSound.m_data.m_size > 0xF )
p_m_animationEnabled = *(bool **)p_m_animationEnabled;
v7 = 0;
v8 = 0;
v9 = 0;
v3 = -1;
do
++v3;
while ( p_m_animationEnabled[v3] );
sub_14003A930(&v7, p_m_animationEnabled, v3);
v6 = qword_1406C2E88;
if ( !qword_1406C2E88 )
{
v10 = (FMODAudioEngine *)operator new(0x888u);
qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);
v6 = qword_1406C2E88;
}
FMODAudioEngine::playEffect(v6, (unsigned int)&v7, v4, v5, LODWORD(a1->m_baseScale));
}
cocos2d::CCMenuItem::activate(a1);
}
}