{"type": "func", "start": 3654652, "end": 3654832, "name": "EditorUI::disableButton", "pseudocode": "// \n// EditorUI::disableButton from 0x37c3fc to 0x37c4b0 (180 bytes)\n// \n// 1 xrefs:\n// > EditorUI::updateCreateMenu @ 0x37df7c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid EditorUI::disableButton(EditorUI *a1, CreateMenuItem *a2)\n{\n  cocos2d::CCNode *v3; // r4\n  unsigned int m_nTag; // r0\n  void (__fastcall *v5)(unsigned int, __int16 *); // r2\n  int m_nLuaID; // r4\n  CreateMenuItem *v7; // [sp+4h] [bp-Ch] BYREF\n  __int16 v8; // [sp+8h] [bp-8h] BYREF\n  char v9; // [sp+Ah] [bp-6h]\n\n  v7 = a2;\n  v3 = a2->getNormalImage(a2);\n  m_nTag = v3[2].m_nTag;\n  if ( m_nTag || (m_nTag = v3[2].m_uReference) != 0 )\n  {\n    v5 = *(void (__fastcall **)(unsigned int, __int16 *))(*(_DWORD *)m_nTag + 472);\n    v8 = 32639;\n    v9 = 127;\n    v5(m_nTag, &v8);\n  }\n  if ( a2->m_objectID >= 0 )\n  {\n    m_nLuaID = v3[2].m_nLuaID;\n    LOWORD(v7) = 32639;\n    BYTE2(v7) = 127;\n    v8 = 25700;\n    v9 = 127;\n    if ( *(_DWORD *)(m_nLuaID + 1076) == 1 && GameObject::isColorObject((GameObject *)m_nLuaID) )\n    {\n      if ( *(_BYTE *)(m_nLuaID + 1576) )\n      {\n        LOWORD(v7) = v8;\n        BYTE2(v7) = v9;\n      }\n    }\n    (*(void (__fastcall **)(int, CreateMenuItem **))(*(_DWORD *)m_nLuaID + 740))(m_nLuaID, &v7);\n    (*(void (__fastcall **)(int, __int16 *))(*(_DWORD *)m_nLuaID + 540))(m_nLuaID, &v8);\n  }\n}", "assembly": "; \n; EditorUI::disableButton from 0x37c3fc to 0x37c4b0 (180 bytes)\n; \n; 1 xrefs:\n; > EditorUI::updateCreateMenu @ 0x37df7c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH            {R0-R6,LR}                                             ; +0x0, 0x37c3fc\nMOV             R0, R1                                                 ; +0x2, 0x37c3fe\nLDR             R5, =(__stack_chk_guard_ptr - 0x37C408)                ; +0x4, 0x37c400\nMOV             R6, R1                                                 ; +0x6, 0x37c402\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0x8, 0x37c404\nLDR             R5, [R5]; __stack_chk_guard                            ; +0xa, 0x37c406\nLDR             R3, [R5]                                               ; +0xc, 0x37c408\nSTR             R3, [SP,#0x10+var_4]                                   ; +0xe, 0x37c40a\nLDR             R3, [R1]                                               ; +0x10, 0x37c40c\nLDR.W           R3, [R3,#0x210]                                        ; +0x12, 0x37c40e\nBLX             R3                                                     ; +0x16, 0x37c412\nMOV             R4, R0                                                 ; +0x18, 0x37c414\nLDR.W           R0, [R0,#0x21C]                                        ; +0x1a, 0x37c416\nCBNZ            R0, loc_37C422                                         ; +0x1e, 0x37c41a\nLDR.W           R0, [R4,#0x220]                                        ; +0x20, 0x37c41c\nCBZ             R0, loc_37C43A                                         ; +0x24, 0x37c420\nLDR             R3, [R0]                                               ; +0x26, 0x37c422\nADD             R1, SP, #0x10+var_8                                    ; +0x28, 0x37c424\nLDR.W           R2, [R3,#0x1D8]                                        ; +0x2a, 0x37c426\nMOVS            R3, #0x7F                                              ; +0x2e, 0x37c42a\nSTRB.W          R3, [SP,#0x10+var_8]                                   ; +0x30, 0x37c42c\nSTRB.W          R3, [SP,#0x10+var_8+1]                                 ; +0x34, 0x37c430\nSTRB.W          R3, [SP,#0x10+var_8+2]                                 ; +0x38, 0x37c434\nBLX             R2                                                     ; +0x3c, 0x37c438\nLDR.W           R3, [R6,#0x178]                                        ; +0x3e, 0x37c43a\nCMP             R3, #0                                                 ; +0x42, 0x37c43e\nBLT             loc_37C4A0                                             ; +0x44, 0x37c440\nLDR.W           R4, [R4,#0x218]                                        ; +0x46, 0x37c442\nMOVS            R3, #0x7F                                              ; +0x4a, 0x37c446\nMOVS            R2, #0x64 ; 'd'                                        ; +0x4c, 0x37c448\nSTRB.W          R3, [SP,#0x10+var_C]                                   ; +0x4e, 0x37c44a\nSTRB.W          R3, [SP,#0x10+var_C+1]                                 ; +0x52, 0x37c44e\nSTRB.W          R3, [SP,#0x10+var_A]                                   ; +0x56, 0x37c452\nSTRB.W          R2, [SP,#0x10+var_8]                                   ; +0x5a, 0x37c456\nSTRB.W          R2, [SP,#0x10+var_8+1]                                 ; +0x5e, 0x37c45a\nSTRB.W          R3, [SP,#0x10+var_8+2]                                 ; +0x62, 0x37c45e\nLDR.W           R3, [R4,#0x434]                                        ; +0x66, 0x37c462\nCMP             R3, #1                                                 ; +0x6a, 0x37c466\nBNE             loc_37C478                                             ; +0x6c, 0x37c468\nMOV             R0, R4; this                                           ; +0x6e, 0x37c46a\nBL              _ZN10GameObject13isColorObjectEv; GameObject::isColorObject(void) ; +0x70, 0x37c46c\nCBZ             R0, loc_37C478                                         ; +0x74, 0x37c470\nLDRB.W          R3, [R4,#0x628]                                        ; +0x76, 0x37c472\nCBNZ            R3, loc_37C492                                         ; +0x7a, 0x37c476\nLDR             R3, [R4]                                               ; +0x7c, 0x37c478\nMOV             R0, R4                                                 ; +0x7e, 0x37c47a\nADD             R1, SP, #0x10+var_C                                    ; +0x80, 0x37c47c\nLDR.W           R3, [R3,#0x2E4]                                        ; +0x82, 0x37c47e\nBLX             R3                                                     ; +0x86, 0x37c482\nLDR             R3, [R4]                                               ; +0x88, 0x37c484\nMOV             R0, R4                                                 ; +0x8a, 0x37c486\nADD             R1, SP, #0x10+var_8                                    ; +0x8c, 0x37c488\nLDR.W           R3, [R3,#0x21C]                                        ; +0x8e, 0x37c48a\nBLX             R3                                                     ; +0x92, 0x37c48e\nB               loc_37C4A0                                             ; +0x94, 0x37c490\nLDR             R3, [SP,#0x10+var_8]                                   ; +0x96, 0x37c492\nSTRH.W          R3, [SP,#0x10+var_C]                                   ; +0x98, 0x37c494\nLSRS            R3, R3, #0x10                                          ; +0x9c, 0x37c498\nSTRB.W          R3, [SP,#0x10+var_A]                                   ; +0x9e, 0x37c49a\nB               loc_37C478                                             ; +0xa2, 0x37c49e\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xa4, 0x37c4a0\nLDR             R3, [R5]                                               ; +0xa6, 0x37c4a2\nCMP             R2, R3                                                 ; +0xa8, 0x37c4a4\nBEQ             loc_37C4AC                                             ; +0xaa, 0x37c4a6\nBLX             __stack_chk_fail                                       ; +0xac, 0x37c4a8\nADD             SP, SP, #0x10                                          ; +0xb0, 0x37c4ac\nPOP             {R4-R6,PC}                                             ; +0xb2, 0x37c4ae", "xrefs": ["EditorUI::updateCreateMenu @ 0x37df7c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}