//
// EditorUI::menuItemFromObjectString from 0x100638ef0 to 0x1006390a0 (432 bytes)
//
// 1 xrefs:
// > EditorUI::createCustomItems @ 0x100638648
//
// 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 12:34:39 +0000
//
char *__fastcall EditorUI::menuItemFromObjectString(__int64 a1, __int128 *a2, int a3)
{
__int64 v4; // r15
__int64 v5; // rax
_BOOL8 v6; // rbx
__int64 v7; // rax
char *v8; // r12
unsigned __int64 *v9; // r13
__int64 v10; // r14
char *v11; // rbx
double v13; // [rsp+18h] [rbp-68h] BYREF
unsigned __int64 v14; // [rsp+20h] [rbp-60h] BYREF
__int64 v15; // [rsp+28h] [rbp-58h]
__int128 v16; // [rsp+30h] [rbp-50h] BYREF
void *__p; // [rsp+40h] [rbp-40h]
int v18; // [rsp+50h] [rbp-30h]
float v19; // [rsp+54h] [rbp-2Ch]
if ( (*(_BYTE *)a2 & 1) != 0 )
{
sub_10001AD30(&v16, *((const void **)a2 + 2), *((_QWORD *)a2 + 1));
}
else
{
__p = *((void **)a2 + 2);
v16 = *a2;
}
v4 = EditorUI::spriteFromObjectString(a1, (unsigned __int8 *)&v16, 1u, 0, 100, 0, 0.0, 0, 0);
v18 = a3;
v15 = a1;
if ( (v16 & 1) != 0 )
operator delete(__p);
v19 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 328LL))(v4);
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 328LL))(v4);
v6 = v19 <= *(float *)(v5 + 4);
v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 328LL))(v4);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v4 + 160LL))(v4, 40.0 / *(float *)(v7 + 4 * v6));
v8 = ButtonSprite::create(v4, 32, 0, 1u, (int)"GJ_button_04.png", 0, 32.0, 1.0, 0.0);
v9 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 192LL))(v4);
sub_100278250((float *)&v14, 0.0, -1.0);
sub_100278350(&v13, v9, &v14);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v4 + 184LL))(v4, &v13);
v10 = v15;
v11 = CreateMenuItem::create((__int64)v8, 0, v15, (__int64)EditorUI::onCreateButton, 0);
*((_DWORD *)v11 + 132) = v18;
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v11 + 160LL))(v11, 0.89999998);
*((_DWORD *)v11 + 101) = 1063675494;
sub_1007FEBF0(*(_QWORD *)(v10 + 1360), v11);
return v11;
}