//
// cocos2d::CCMenuItemImage::create from 0x18005c760 to 0x18005c848 (232 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bcf7c
//
// 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
struct cocos2d::CCMenuItemImage *__fastcall cocos2d::CCMenuItemImage::create(const char *a1, const char *a2)
{
cocos2d::CCMenuItemSprite *v4; // rax
cocos2d::CCObject *v5; // rbx
unsigned int v6; // r14d
unsigned int v7; // ebp
cocos2d::CCNodeRGBA *(__fastcall *v9)(cocos2d::CCNodeRGBA *, char); // r8
v4 = (cocos2d::CCMenuItemSprite *)sub_1800E4AC0(0x190u);
v5 = v4;
if ( v4 )
{
cocos2d::CCMenuItemSprite::CCMenuItemSprite(v4);
*(_QWORD *)v5 = &cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCNode'};
*((_QWORD *)v5 + 40) = &cocos2d::CCMenuItemImage::`vftable'{for `cocos2d::CCRGBAProtocol'};
}
else
{
v5 = nullptr;
}
if ( v5 )
{
v6 = 0;
v7 = 0;
if ( a1 )
v6 = (unsigned int)cocos2d::CCSprite::create(a1);
if ( a2 )
v7 = (unsigned int)cocos2d::CCSprite::create(a2);
if ( (unsigned __int8)cocos2d::CCMenuItemSprite::initWithNormalSprite((_DWORD)v5, v6, v7, 0, 0, 0) )
{
cocos2d::CCObject::autorelease(v5);
return v5;
}
v9 = *(cocos2d::CCNodeRGBA *(__fastcall **)(cocos2d::CCNodeRGBA *, char))(*(_QWORD *)v5 + 8LL);
if ( v9 == sub_18005BF40 )
sub_18005BF40(v5, 1);
else
v9(v5, 1);
}
return nullptr;
}