//
// EditorUI::enableButton from 0x10002e8a0 to 0x10002e9ab (267 bytes)
//
// 0 xrefs:
//
// 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
//
void __fastcall EditorUI::enableButton(EditorUI *a1, CreateMenuItem *a2)
{
__int64 v2; // rax
__int64 v3; // r14
__int64 v4; // rdi
GameObject *v5; // rbx
int m_objectID; // eax
__int16 v7; // [rsp+8h] [rbp-18h] BYREF
char v8; // [rsp+Ah] [rbp-16h]
__int16 v9; // [rsp+Ch] [rbp-14h] BYREF
char v10; // [rsp+Eh] [rbp-12h]
v2 = ((__int64 (__fastcall *)(CreateMenuItem *))a2->getNormalImage)(a2);
v3 = v2;
v4 = *(_QWORD *)(v2 + 640);
if ( v4 || (v4 = *(_QWORD *)(v2 + 648)) != 0 )
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v4 + 944LL))(v4, &unk_100815540);
if ( a2->m_objectID >= 0 )
{
v5 = *(GameObject **)(v3 + 632);
v10 = -1;
v9 = -1;
if ( v5->m_classType == Effect && GameObject::isColorObject(v5) && LOBYTE(v5[1].m_pobTexture) == 1 )
{
v10 = -1;
v9 = -14136;
LABEL_17:
((void (__fastcall *)(GameObject *, __int16 *))v5->setObjectColor)(v5, &v9);
v8 = -1;
v7 = -14136;
((void (__fastcall *)(GameObject *, __int16 *))v5->setChildColor)(v5, &v7);
return;
}
m_objectID = v5->m_objectID;
if ( m_objectID > 1583 )
{
if ( m_objectID == 2012 || m_objectID == 1584 )
goto LABEL_16;
}
else if ( (unsigned int)(m_objectID - 918) < 2 || (unsigned int)(m_objectID - 1327) < 2 )
{
goto LABEL_16;
}
if ( GameObject::getMainColorMode(v5) != 1010 )
goto LABEL_17;
LABEL_16:
v10 = 0;
v9 = 0;
goto LABEL_17;
}
}