//
// EditorUI::menuItemFromObjectString from 0x1401f1160 to 0x1401f1389 (553 bytes)
//
// 2 xrefs:
// > EditorUI::createCustomItems @ 0x1401f63c2
// > ??> @ 0x14091a9b4
//
// 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:28:07 +0000
//
// Hidden C++ exception states: #wind=2
char *__fastcall EditorUI::menuItemFromObjectString(__int64 a1, __int64 a2, int a3)
{
__int64 v6; // rax
__int64 v7; // rsi
float *v8; // rbx
__int64 v9; // rax
__int64 v10; // rdx
cocos2d::CCObject *v11; // rdi
__int64 v12; // r9
__int64 v13; // rax
__int64 v14; // rbx
__int64 v15; // rax
__int64 v16; // rdx
char *v17; // rbx
__int64 v19; // [rsp+30h] [rbp-98h]
void *v20; // [rsp+50h] [rbp-78h] BYREF
_BYTE v21[8]; // [rsp+58h] [rbp-70h] BYREF
_QWORD v22[5]; // [rsp+60h] [rbp-68h] BYREF
v22[4] = a2;
v6 = sub_14003F4F0((__int64)v22, a2);
v7 = EditorUI::spriteFromObjectString(a1, v6, 1u, 0, 100, nullptr, nullptr, 0);
v8 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 320LL))(v7);
v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 320LL))(v7);
v10 = *(_QWORD *)v7;
if ( *v8 <= *(float *)(v9 + 4) )
(*(__int64 (__fastcall **)(__int64))(v10 + 320))(v7);
else
(*(void (__fastcall **)(__int64))(v10 + 320))(v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 160LL))(v7);
v20 = operator new(0x2C8u);
v11 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v20);
if ( v11 )
{
if ( ButtonSprite::init((__int64 *)v11, v7, 32, v12, 32.0, 1065353216, v19, "GJ_button_04.png", 0, 0) )
{
cocos2d::CCObject::autorelease(v11);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v11 + 8LL))(v11, 1);
v11 = nullptr;
}
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, 0.0, -1.0);
v14 = v13;
v15 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 200LL))(v7);
cocos2d::CCPoint::operator+(v15, &v20, v14);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v7 + 184LL))(v7, &v20);
v17 = CreateMenuItem::create((__int64 *)v11, v16, a1, (__int64)EditorUI::onCreateButton);
*((_DWORD *)v17 + 138) = a3;
(*(void (__fastcall **)(char *))(*(_QWORD *)v17 + 160LL))(v17);
*((_DWORD *)v17 + 101) = 1063675494;
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1408), (struct cocos2d::CCObject *)v17);
sub_14003D310(a2);
return v17;
}