//
// sub_180059F50 from 0x180059f50 to 0x18005a01b (203 bytes)
//
// 13 xrefs:
// > cocos2d::CCMenuItemImage::create @ 0x18005a618
// > cocos2d::CCMenuItemImage::create @ 0x18005a731
// > cocos2d::CCMenuItemImage::create @ 0x18005a829
// > cocos2d::CCMenuItemImage::create @ 0x18005a902
// > cocos2d::CCMenuItemImage::create @ 0x18005a607
// > cocos2d::CCMenuItemImage::create @ 0x18005a720
// > cocos2d::CCMenuItemImage::create @ 0x18005a818
// > cocos2d::CCMenuItemImage::create @ 0x18005a8f1
// > ??> @ 0x1800f7690
// > ??> @ 0x1800f7ad8
// > ??> @ 0x1800f8368
// > ??> @ 0x1800f87c8
// > ??> @ 0x1801b2c28
//
// 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
//
cocos2d::CCNodeRGBA *__fastcall sub_180059F50(cocos2d::CCNodeRGBA *this, char a2)
{
struct cocos2d::CCScriptEngineManager *v5; // rax
if ( (a2 & 2) != 0 )
{
`eh vector destructor iterator'(
this,
0x190u,
*((_QWORD *)this - 1),
(void (*)(void *))cocos2d::CCMenuItemSprite::~CCMenuItemSprite);
if ( (a2 & 1) != 0 )
j_j_j_free_0((char *)this - 8);
return (cocos2d::CCNodeRGBA *)((char *)this - 8);
}
else
{
this->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCNodeRGBA_vtbl *)&cocos2d::CCMenuItem::`vftable'{for `cocos2d::CCNode'};
this->cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&cocos2d::CCMenuItem::`vftable'{for `cocos2d::CCRGBAProtocol'};
if ( *((_DWORD *)this + 92) )
{
v5 = cocos2d::CCScriptEngineManager::sharedManager();
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)v5 + 24LL))(*(_QWORD *)v5, *((unsigned int *)this + 92));
*((_DWORD *)this + 92) = 0;
}
cocos2d::CCNodeRGBA::~CCNodeRGBA(this);
if ( (a2 & 1) != 0 )
j_j_free_0(this);
return this;
}
}