//
// cocos2d::CCMenuItemSprite::unselected from 0x18005be50 to 0x18005bec8 (120 bytes)
//
// 4 xrefs:
// > ??> @ 0x1800f86d8
// > ??> @ 0x1800f8b38
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b2fc4
//
// 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
//
void __fastcall cocos2d::CCMenuItemSprite::unselected(cocos2d::CCMenuItemSprite *this, __int64 a2)
{
bool v2; // zf
__int64 v4; // rcx
cocos2d::CCNode *m_pNormalImage; // rcx
cocos2d::CCNode *m_pSelectedImage; // rcx
v2 = this->m_pNormalImage == nullptr;
this->m_bSelected = 0;
if ( !v2 || this->m_pSelectedImage )
{
v4 = *(_QWORD *)&this->m_nScriptTapHandler;
if ( v4 )
{
LOBYTE(a2) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 320LL))(v4, a2);
m_pNormalImage = this->m_pNormalImage;
if ( m_pNormalImage )
((void (__fastcall *)(cocos2d::CCNode *, _QWORD))m_pNormalImage->setVisible)(m_pNormalImage, 0);
m_pSelectedImage = this->m_pSelectedImage;
if ( m_pSelectedImage )
((void (__fastcall *)(cocos2d::CCNode *, _QWORD))m_pSelectedImage->setVisible)(m_pSelectedImage, 0);
}
}
}