//
// EditorUI::enableButton from 0x10000d5a0 to 0x10000d6ab (267 bytes)
//
// 0 xrefs:
//
// 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:18:50 +0000
//
__int64 __fastcall EditorUI::enableButton(__int64 a1, int *a2)
{
__int64 result; // rax
__int64 v3; // r14
__int64 v4; // rdi
__int64 v5; // rbx
int v6; // 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]
result = (*(__int64 (__fastcall **)(int *))(*(_QWORD *)a2 + 1072LL))(a2);
v3 = result;
v4 = *(_QWORD *)(result + 640);
if ( v4 || (v4 = *(_QWORD *)(result + 648)) != 0 )
result = (*(__int64 (__fastcall **)(__int64, void *))(*(_QWORD *)v4 + 960LL))(v4, &unk_100A038D0);
if ( a2[132] >= 0 )
{
v5 = *(_QWORD *)(v3 + 632);
v10 = -1;
v9 = -1;
if ( *(_DWORD *)(v5 + 1248) == 1 && (unsigned __int8)GameObject::isColorObject(v5) && *(_BYTE *)(v5 + 1768) == 1 )
{
v10 = -1;
v9 = -14136;
LABEL_17:
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v5 + 1496LL))(v5, &v9);
v8 = -1;
v7 = -14136;
return (*(__int64 (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v5 + 1096LL))(v5, &v7);
}
v6 = *(_DWORD *)(v5 + 1028);
if ( v6 > 1583 )
{
if ( v6 == 2012 || v6 == 1584 )
goto LABEL_16;
}
else if ( (unsigned int)(v6 - 918) < 2 || (unsigned int)(v6 - 1327) < 2 )
{
goto LABEL_16;
}
if ( (unsigned int)GameObject::getMainColorMode(v5) != 1010 )
goto LABEL_17;
LABEL_16:
v10 = 0;
v9 = 0;
goto LABEL_17;
}
return result;
}