//
// CCMenuItemSpriteExtra::activate from 0x100263350 to 0x1002634ac (348 bytes)
//
// 3 xrefs:
// > ??> @ 0x100aeff78
// > ??> @ 0x100af5b48
// > ??> @ 0x100b7fba0
//
// 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:27:32 +0000
//
void __fastcall CCMenuItemSpriteExtra::activate(__int64 a1, double a2)
{
unsigned int v2; // eax
__int64 v3; // r14
const char *v4; // r15
size_t v5; // rax
size_t v6; // r12
char *v7; // r13
size_t v8; // r14
__int64 v9; // [rsp+8h] [rbp-48h]
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
if ( *(_BYTE *)(a1 + 339) == 1 )
{
cocos2d::CCNode::stopAllActions(a1);
if ( *(_DWORD *)(a1 + 484) )
{
v2 = *(unsigned __int8 *)(a1 + 416);
if ( (v2 & 1) == 0 )
goto LABEL_4;
}
else
{
*(_QWORD *)&a2 = *(unsigned int *)(a1 + 404);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)a1 + 160LL))(a1, *(float *)&a2);
v2 = *(unsigned __int8 *)(a1 + 416);
if ( (v2 & 1) == 0 )
{
LABEL_4:
if ( !(v2 >> 1) )
goto LABEL_21;
goto LABEL_8;
}
}
if ( !*(_QWORD *)(a1 + 424) )
{
LABEL_21:
cocos2d::CCMenuItem::activate(a1);
return;
}
LABEL_8:
v3 = FMODAudioEngine::sharedEngine(a2);
if ( (*(_BYTE *)(a1 + 416) & 1) != 0 )
v4 = *(const char **)(a1 + 432);
else
v4 = (const char *)(a1 + 417);
v5 = strlen(v4);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v6 = v5;
if ( v5 >= 0x17 )
{
v9 = v3;
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
__p = v7;
__dst[0] = v8 + 1;
v3 = v9;
__dst[1] = v6;
}
else
{
LOBYTE(__dst[0]) = 2 * v5;
v7 = (char *)__dst + 1;
if ( !v5 )
{
LABEL_19:
v7[v6] = 0;
FMODAudioEngine::playEffect(v3, __dst, 1.0, 0.0, *(float *)(a1 + 412));
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
goto LABEL_21;
}
}
memmove(v7, v4, v6);
goto LABEL_19;
}
}