{"type": "func", "start": 4723540, "end": 4723720, "name": "EditorUI::disableButton", "pseudocode": "// \n// EditorUI::disableButton from 0x481354 to 0x481408 (180 bytes)\n// \n// 1 xrefs:\n// > EditorUI::updateCreateMenu @ 0x48276c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:49:22 +0000\n// \n\nint __fastcall EditorUI::disableButton(int a1, int *a2, int a3, int a4)\n{\n  _DWORD *v5; // r4\n  int result; // r0\n  int (__fastcall *v7)(int, _DWORD *); // r2\n  int v8; // r4\n  int *v9; // [sp+4h] [bp-Ch] BYREF\n  _DWORD v10[2]; // [sp+8h] [bp-8h] BYREF\n\n  v9 = a2;\n  v10[0] = a3;\n  v10[1] = a4;\n  v5 = (_DWORD *)(*(int (__fastcall **)(int *))(*a2 + 536))(a2);\n  result = v5[136];\n  if ( result || (result = v5[137]) != 0 )\n  {\n    v7 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)result + 480);\n    LOWORD(v10[0]) = 32639;\n    BYTE2(v10[0]) = 127;\n    result = v7(result, v10);\n  }\n  if ( a2[101] >= 0 )\n  {\n    v8 = v5[135];\n    LOWORD(v9) = 32639;\n    BYTE2(v9) = 127;\n    LOWORD(v10[0]) = 25700;\n    BYTE2(v10[0]) = 127;\n    if ( *(_DWORD *)(v8 + 1084) == 1 && GameObject::isColorObject((GameObject *)v8) )\n    {\n      if ( *(_BYTE *)(v8 + 1584) )\n      {\n        LOWORD(v9) = v10[0];\n        BYTE2(v9) = BYTE2(v10[0]);\n      }\n    }\n    (*(void (__fastcall **)(int, int **))(*(_DWORD *)v8 + 748))(v8, &v9);\n    return (*(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v8 + 548))(v8, v10);\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::disableButton from 0x481354 to 0x481408 (180 bytes)\n; \n; 1 xrefs:\n; > EditorUI::updateCreateMenu @ 0x48276c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:49:22 +0000\n; \nPUSH            {R0-R6,LR}                                             ; +0x0, 0x481354\nMOV             R0, R1                                                 ; +0x2, 0x481356\nLDR             R5, =(__stack_chk_guard_ptr - 0x481360)                ; +0x4, 0x481358\nMOV             R6, R1                                                 ; +0x6, 0x48135a\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0x8, 0x48135c\nLDR             R5, [R5]; __stack_chk_guard                            ; +0xa, 0x48135e\nLDR             R3, [R5]                                               ; +0xc, 0x481360\nSTR             R3, [SP,#0x10+var_4]                                   ; +0xe, 0x481362\nLDR             R3, [R1]                                               ; +0x10, 0x481364\nLDR.W           R3, [R3,#0x218]                                        ; +0x12, 0x481366\nBLX             R3                                                     ; +0x16, 0x48136a\nMOV             R4, R0                                                 ; +0x18, 0x48136c\nLDR.W           R0, [R0,#0x220]                                        ; +0x1a, 0x48136e\nCBNZ            R0, loc_48137A                                         ; +0x1e, 0x481372\nLDR.W           R0, [R4,#0x224]                                        ; +0x20, 0x481374\nCBZ             R0, loc_481392                                         ; +0x24, 0x481378\nLDR             R3, [R0]                                               ; +0x26, 0x48137a\nADD             R1, SP, #0x10+var_8                                    ; +0x28, 0x48137c\nLDR.W           R2, [R3,#0x1E0]                                        ; +0x2a, 0x48137e\nMOVS            R3, #0x7F                                              ; +0x2e, 0x481382\nSTRB.W          R3, [SP,#0x10+var_8]                                   ; +0x30, 0x481384\nSTRB.W          R3, [SP,#0x10+var_8+1]                                 ; +0x34, 0x481388\nSTRB.W          R3, [SP,#0x10+var_8+2]                                 ; +0x38, 0x48138c\nBLX             R2                                                     ; +0x3c, 0x481390\nLDR.W           R3, [R6,#0x194]                                        ; +0x3e, 0x481392\nCMP             R3, #0                                                 ; +0x42, 0x481396\nBLT             loc_4813F8                                             ; +0x44, 0x481398\nLDR.W           R4, [R4,#0x21C]                                        ; +0x46, 0x48139a\nMOVS            R3, #0x7F                                              ; +0x4a, 0x48139e\nMOVS            R2, #0x64 ; 'd'                                        ; +0x4c, 0x4813a0\nSTRB.W          R3, [SP,#0x10+var_C]                                   ; +0x4e, 0x4813a2\nSTRB.W          R3, [SP,#0x10+var_C+1]                                 ; +0x52, 0x4813a6\nSTRB.W          R3, [SP,#0x10+var_A]                                   ; +0x56, 0x4813aa\nSTRB.W          R2, [SP,#0x10+var_8]                                   ; +0x5a, 0x4813ae\nSTRB.W          R2, [SP,#0x10+var_8+1]                                 ; +0x5e, 0x4813b2\nSTRB.W          R3, [SP,#0x10+var_8+2]                                 ; +0x62, 0x4813b6\nLDR.W           R3, [R4,#0x43C]                                        ; +0x66, 0x4813ba\nCMP             R3, #1                                                 ; +0x6a, 0x4813be\nBNE             loc_4813D0                                             ; +0x6c, 0x4813c0\nMOV             R0, R4; this                                           ; +0x6e, 0x4813c2\nBL              _ZN10GameObject13isColorObjectEv; GameObject::isColorObject(void) ; +0x70, 0x4813c4\nCBZ             R0, loc_4813D0                                         ; +0x74, 0x4813c8\nLDRB.W          R3, [R4,#0x630]                                        ; +0x76, 0x4813ca\nCBNZ            R3, loc_4813EA                                         ; +0x7a, 0x4813ce\nLDR             R3, [R4]                                               ; +0x7c, 0x4813d0\nMOV             R0, R4                                                 ; +0x7e, 0x4813d2\nADD             R1, SP, #0x10+var_C                                    ; +0x80, 0x4813d4\nLDR.W           R3, [R3,#0x2EC]                                        ; +0x82, 0x4813d6\nBLX             R3                                                     ; +0x86, 0x4813da\nLDR             R3, [R4]                                               ; +0x88, 0x4813dc\nMOV             R0, R4                                                 ; +0x8a, 0x4813de\nADD             R1, SP, #0x10+var_8                                    ; +0x8c, 0x4813e0\nLDR.W           R3, [R3,#0x224]                                        ; +0x8e, 0x4813e2\nBLX             R3                                                     ; +0x92, 0x4813e6\nB               loc_4813F8                                             ; +0x94, 0x4813e8\nLDR             R3, [SP,#0x10+var_8]                                   ; +0x96, 0x4813ea\nSTRH.W          R3, [SP,#0x10+var_C]                                   ; +0x98, 0x4813ec\nLSRS            R3, R3, #0x10                                          ; +0x9c, 0x4813f0\nSTRB.W          R3, [SP,#0x10+var_A]                                   ; +0x9e, 0x4813f2\nB               loc_4813D0                                             ; +0xa2, 0x4813f6\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xa4, 0x4813f8\nLDR             R3, [R5]                                               ; +0xa6, 0x4813fa\nCMP             R2, R3                                                 ; +0xa8, 0x4813fc\nBEQ             loc_481404                                             ; +0xaa, 0x4813fe\nBLX             __stack_chk_fail                                       ; +0xac, 0x481400\nADD             SP, SP, #0x10                                          ; +0xb0, 0x481404\nPOP             {R4-R6,PC}                                             ; +0xb2, 0x481406", "xrefs": ["EditorUI::updateCreateMenu @ 0x48276c"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}