//
// EditorUI::enableButton from 0x1003e6f30 to 0x1003e7064 (308 bytes)
//
// 1 xrefs:
// > EditorUI::updateCreateMenu @ 0x1003e6d00
//
// 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)
{
_QWORD *v3; // x20
__int64 v4; // x0
GameObject *v5; // x19
int m_objectID; // w8
__int16 v7; // [xsp+8h] [xbp-18h] BYREF
char v8; // [xsp+Ah] [xbp-16h]
__int16 v9; // [xsp+Ch] [xbp-14h] BYREF
char v10; // [xsp+Eh] [xbp-12h]
v3 = (_QWORD *)((__int64 (__fastcall *)(CreateMenuItem *))a2->getNormalImage)(a2);
v4 = v3[80];
if ( v4 || (v4 = v3[81]) != 0 )
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v4 + 944LL))(v4, &word_100647392);
if ( (a2->m_objectID & 0x80000000) == 0 )
{
v5 = (GameObject *)v3[79];
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;
}
}