//
// sub_18005BF40 from 0x18005bf40 to 0x18005c00b (203 bytes)
//
// 13 xrefs:
// > cocos2d::CCMenuItemImage::create @ 0x18005c618
// > cocos2d::CCMenuItemImage::create @ 0x18005c731
// > cocos2d::CCMenuItemImage::create @ 0x18005c829
// > cocos2d::CCMenuItemImage::create @ 0x18005c902
// > cocos2d::CCMenuItemImage::create @ 0x18005c607
// > cocos2d::CCMenuItemImage::create @ 0x18005c720
// > cocos2d::CCMenuItemImage::create @ 0x18005c818
// > cocos2d::CCMenuItemImage::create @ 0x18005c8f1
// > ??> @ 0x1800fdb08
// > ??> @ 0x1800fdf60
// > ??> @ 0x1800fe810
// > ??> @ 0x1800fec80
// > ??> @ 0x1801bcec8
//
// 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
//
cocos2d::CCNodeRGBA *__fastcall sub_18005BF40(cocos2d::CCNodeRGBA *this, char a2)
{
struct cocos2d::CCScriptEngineManager *v5; // rax
if ( (a2 & 2) != 0 )
{
sub_1800E49F8(this, 400, *((_QWORD *)this - 1), cocos2d::CCMenuItemSprite::~CCMenuItemSprite);
if ( (a2 & 1) != 0 )
j_j_j_free_0((char *)this - 8);
return (cocos2d::CCNodeRGBA *)((char *)this - 8);
}
else
{
*(_QWORD *)this = &cocos2d::CCMenuItem::`vftable'{for `cocos2d::CCNode'};
*((_QWORD *)this + 40) = &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;
}
}