//
// CreateMenuItem::create from 0x1003e7360 to 0x1003e7418 (184 bytes)
//
// 3 xrefs:
// > EditorUI::getCreateMenuItemButton @ 0x1003e72f4
// > EditorUI::menuItemFromObjectString @ 0x1003e903c
// > EditorUI::getCreateBtn @ 0x1003ea4d4
//
// 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
//
CreateMenuItem *__fastcall CreateMenuItem::create(
cocos2d::CCNode *a1,
cocos2d::CCNode *a2,
cocos2d::CCObject *a3,
cocos2d::SEL_MenuHandler a4)
{
size_t adj; // x20
void (__cdecl *ptr)(cocos2d::CCObject *); // x21
char *v9; // x19
cocos2d::SEL_MenuHandler v11; // 0:x4.16
adj = a4.adj;
ptr = a4.ptr;
v9 = (char *)operator new(0x220u);
CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((CCMenuItemSpriteExtra *)v9);
*(_QWORD *)v9 = off_1008154B8;
*((_QWORD *)v9 + 40) = off_100815920;
*((_QWORD *)v9 + 65) = 0;
*((_QWORD *)v9 + 63) = 0;
*((_QWORD *)v9 + 64) = 0;
*(_QWORD *)(v9 + 532) = 0;
v11.ptr = ptr;
v11.adj = adj;
if ( CCMenuItemSpriteExtra::init((CCMenuItemSpriteExtra *)v9, a1, a2, a3, v11) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v9);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v9 + 16LL))(v9);
return nullptr;
}
return (CreateMenuItem *)v9;
}