//
// EditorUI::disableButton from 0x481354 to 0x481408 (180 bytes)
//
// 1 xrefs:
// > EditorUI::updateCreateMenu @ 0x48276c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:49:22 +0000
//
int __fastcall EditorUI::disableButton(int a1, int *a2, int a3, int a4)
{
_DWORD *v5; // r4
int result; // r0
int (__fastcall *v7)(int, _DWORD *); // r2
int v8; // r4
int *v9; // [sp+4h] [bp-Ch] BYREF
_DWORD v10[2]; // [sp+8h] [bp-8h] BYREF
v9 = a2;
v10[0] = a3;
v10[1] = a4;
v5 = (_DWORD *)(*(int (__fastcall **)(int *))(*a2 + 536))(a2);
result = v5[136];
if ( result || (result = v5[137]) != 0 )
{
v7 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)result + 480);
LOWORD(v10[0]) = 32639;
BYTE2(v10[0]) = 127;
result = v7(result, v10);
}
if ( a2[101] >= 0 )
{
v8 = v5[135];
LOWORD(v9) = 32639;
BYTE2(v9) = 127;
LOWORD(v10[0]) = 25700;
BYTE2(v10[0]) = 127;
if ( *(_DWORD *)(v8 + 1084) == 1 && GameObject::isColorObject((GameObject *)v8) )
{
if ( *(_BYTE *)(v8 + 1584) )
{
LOWORD(v9) = v10[0];
BYTE2(v9) = BYTE2(v10[0]);
}
}
(*(void (__fastcall **)(int, int **))(*(_DWORD *)v8 + 748))(v8, &v9);
return (*(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v8 + 548))(v8, v10);
}
return result;
}