//
// cocos2d::CCMenuItemImage::create from 0x18005c640 to 0x18005c75d (285 bytes)
//
// 3 xrefs:
// > cocos2d::CCMenuItemImage::create @ 0x18005c85f
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bcf70
//
// 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
//
// Hidden C++ exception states: #wind=1
cocos2d::CCObject *__fastcall cocos2d::CCMenuItemImage::create(char *a1, char *a2, char *a3, __int64 a4, __int64 a5)
{
cocos2d::CCMenuItemSprite *v9; // rax
cocos2d::CCObject *v10; // rbx
unsigned int v11; // edi
unsigned int v12; // r12d
unsigned int v13; // esi
cocos2d::CCNodeRGBA *(__fastcall *v15)(cocos2d::CCNodeRGBA *, char); // r8
v9 = (cocos2d::CCMenuItemSprite *)sub_1800E4AC0(0x190u);
v10 = v9;
v11 = 0;
if ( v9 )
{
cocos2d::CCMenuItemSprite::CCMenuItemSprite(v9);
*(_QWORD *)v10 = &cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCNode'};
*((_QWORD *)v10 + 40) = &cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCRGBAProtocol'};
}
else
{
v10 = nullptr;
}
if ( v10 )
{
v12 = 0;
v13 = 0;
if ( a1 )
v11 = (unsigned int)cocos2d::CCSprite::create(a1);
if ( a2 )
v12 = (unsigned int)cocos2d::CCSprite::create(a2);
if ( a3 )
v13 = (unsigned int)cocos2d::CCSprite::create(a3);
if ( (unsigned __int8)cocos2d::CCMenuItemSprite::initWithNormalSprite((_DWORD)v10, v11, v12, v13, a4, a5) )
{
cocos2d::CCObject::autorelease(v10);
return v10;
}
v15 = *(cocos2d::CCNodeRGBA *(__fastcall **)(cocos2d::CCNodeRGBA *, char))(*(_QWORD *)v10 + 8LL);
if ( v15 == sub_18005BF40 )
sub_18005BF40(v10, 1);
else
v15(v10, 1);
}
return nullptr;
}