//
// cocos2d::CCMenuItemSprite::selected from 0x18005d520 to 0x18005d5ce (174 bytes)
//
// 6 xrefs:
// > ??> @ 0x1800feb88
// > ??> @ 0x1800feff8
// > ??> @ 0x1801420b8
// > ??> @ 0x1801420c8
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bd0d8
//
// 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 11:21:49 +0000
//
void __fastcall cocos2d::CCMenuItemSprite::selected(cocos2d::CCMenuItemSprite *this, __int64 a2)
{
bool v2; // zf
char *v4; // rsi
__int64 v5; // rcx
_QWORD *v6; // r14
__int64 v7; // rcx
void (__fastcall *v8)(__int64, __int64); // r8
__int64 v9; // rdx
v2 = *((_QWORD *)this + 48) == 0;
*((_BYTE *)this + 344) = 1;
if ( !v2 || *((_QWORD *)this + 49) )
{
v4 = (char *)this + 384;
if ( *((_QWORD *)this + 47) )
{
v5 = *((_QWORD *)this + 49);
v6 = (_QWORD *)((char *)this + 384);
if ( v5 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 336LL))(v5, 0);
v6 = v4;
}
v7 = *((_QWORD *)this + 47);
v8 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 336LL);
if ( *((_QWORD *)this + 48) )
{
v8(v7, 0);
LOBYTE(v9) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*v6 + 336LL))(*v6, v9);
}
else
{
LOBYTE(a2) = 1;
v8(v7, a2);
}
}
}
}