{"type": "func", "start": 4299058992, "end": 4299059300, "name": "EditorUI::enableButton", "pseudocode": "// \n// EditorUI::enableButton from 0x1003e6f30 to 0x1003e7064 (308 bytes)\n// \n// 1 xrefs:\n// > EditorUI::updateCreateMenu @ 0x1003e6d00\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 __fastcall EditorUI::enableButton(EditorUI *a1, CreateMenuItem *a2)\n{\n  _QWORD *v3; // x20\n  __int64 v4; // x0\n  GameObject *v5; // x19\n  int m_objectID; // w8\n  __int16 v7; // [xsp+8h] [xbp-18h] BYREF\n  char v8; // [xsp+Ah] [xbp-16h]\n  __int16 v9; // [xsp+Ch] [xbp-14h] BYREF\n  char v10; // [xsp+Eh] [xbp-12h]\n\n  v3 = (_QWORD *)((__int64 (__fastcall *)(CreateMenuItem *))a2->getNormalImage)(a2);\n  v4 = v3[80];\n  if ( v4 || (v4 = v3[81]) != 0 )\n    (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v4 + 944LL))(v4, &word_100647392);\n  if ( (a2->m_objectID & 0x80000000) == 0 )\n  {\n    v5 = (GameObject *)v3[79];\n    v10 = -1;\n    v9 = -1;\n    if ( v5->m_classType == Effect && GameObject::isColorObject(v5) && LOBYTE(v5[1].m_pobTexture) == 1 )\n    {\n      v10 = -1;\n      v9 = -14136;\nLABEL_17:\n      ((void (__fastcall *)(GameObject *, __int16 *))v5->setObjectColor)(v5, &v9);\n      v8 = -1;\n      v7 = -14136;\n      ((void (__fastcall *)(GameObject *, __int16 *))v5->setChildColor)(v5, &v7);\n      return;\n    }\n    m_objectID = v5->m_objectID;\n    if ( m_objectID > 1583 )\n    {\n      if ( m_objectID == 2012 || m_objectID == 1584 )\n        goto LABEL_16;\n    }\n    else if ( (unsigned int)(m_objectID - 918) < 2 || (unsigned int)(m_objectID - 1327) < 2 )\n    {\n      goto LABEL_16;\n    }\n    if ( GameObject::getMainColorMode(v5) != 1010 )\n      goto LABEL_17;\nLABEL_16:\n    v10 = 0;\n    v9 = 0;\n    goto LABEL_17;\n  }\n}", "assembly": "; \n; EditorUI::enableButton from 0x1003e6f30 to 0x1003e7064 (308 bytes)\n; \n; 1 xrefs:\n; > EditorUI::updateCreateMenu @ 0x1003e6d00\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\nSUB             SP, SP, #0x30                                          ; +0x0, 0x1003e6f30\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1003e6f34\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1003e6f38\nADD             X29, SP, #0x20                                         ; +0xc, 0x1003e6f3c\nMOV             X19, X1                                                ; +0x10, 0x1003e6f40\nLDR             X8, [X1]                                               ; +0x14, 0x1003e6f44\nLDR             X8, [X8,#0x420]                                        ; +0x18, 0x1003e6f48\nMOV             X0, X1                                                 ; +0x1c, 0x1003e6f4c\nBLR             X8                                                     ; +0x20, 0x1003e6f50\nMOV             X20, X0                                                ; +0x24, 0x1003e6f54\nLDR             X0, [X0,#0x280]                                        ; +0x28, 0x1003e6f58\nCBNZ            X0, loc_1003E6F68                                      ; +0x2c, 0x1003e6f5c\nLDR             X0, [X20,#0x288]                                       ; +0x30, 0x1003e6f60\nCBZ             X0, loc_1003E6F7C                                      ; +0x34, 0x1003e6f64\nLDR             X8, [X0]                                               ; +0x38, 0x1003e6f68\nLDR             X8, [X8,#0x3B0]                                        ; +0x3c, 0x1003e6f6c\nADRL            X1, word_100647392                                     ; +0x40, 0x1003e6f70\nBLR             X8                                                     ; +0x48, 0x1003e6f78\nLDR             W8, [X19,#0x210]                                       ; +0x4c, 0x1003e6f7c\nTBNZ            W8, #0x1F, loc_1003E7054                               ; +0x50, 0x1003e6f80\nLDR             X19, [X20,#0x278]                                      ; +0x54, 0x1003e6f84\nMOV             W8, #0xFFFFFFFF                                        ; +0x58, 0x1003e6f88\nSTRB            W8, [SP,#0x20+var_12]                                  ; +0x5c, 0x1003e6f8c\nSTRH            W8, [SP,#0x20+var_14]                                  ; +0x60, 0x1003e6f90\nLDR             W8, [X19,#0x4E0]                                       ; +0x64, 0x1003e6f94\nCMP             W8, #1                                                 ; +0x68, 0x1003e6f98\nB.NE            loc_1003E6FCC                                          ; +0x6c, 0x1003e6f9c\nMOV             X0, X19                                                ; +0x70, 0x1003e6fa0\nBL              GameObject__isColorObject                              ; +0x74, 0x1003e6fa4\nCBZ             W0, loc_1003E6FCC                                      ; +0x78, 0x1003e6fa8\nLDRB            W8, [X19,#0x6E8]                                       ; +0x7c, 0x1003e6fac\nCMP             W8, #1                                                 ; +0x80, 0x1003e6fb0\nB.NE            loc_1003E6FCC                                          ; +0x84, 0x1003e6fb4\nMOV             W8, #0xFF                                              ; +0x88, 0x1003e6fb8\nSTRB            W8, [SP,#0x20+var_12]                                  ; +0x8c, 0x1003e6fbc\nMOV             W8, #0xC8C8                                            ; +0x90, 0x1003e6fc0\nSTRH            W8, [SP,#0x20+var_14]                                  ; +0x94, 0x1003e6fc4\nB               loc_1003E701C                                          ; +0x98, 0x1003e6fc8\nLDR             W8, [X19,#0x404]                                       ; +0x9c, 0x1003e6fcc\nCMP             W8, #0x62F                                             ; +0xa0, 0x1003e6fd0\nB.GT            loc_1003E6FF4                                          ; +0xa4, 0x1003e6fd4\nSUB             W9, W8, #0x396                                         ; +0xa8, 0x1003e6fd8\nCMP             W9, #2                                                 ; +0xac, 0x1003e6fdc\nB.CC            loc_1003E7014                                          ; +0xb0, 0x1003e6fe0\nSUB             W8, W8, #0x52F                                         ; +0xb4, 0x1003e6fe4\nCMP             W8, #2                                                 ; +0xb8, 0x1003e6fe8\nB.CC            loc_1003E7014                                          ; +0xbc, 0x1003e6fec\nB               loc_1003E7004                                          ; +0xc0, 0x1003e6ff0\nCMP             W8, #0x7DC                                             ; +0xc4, 0x1003e6ff4\nB.EQ            loc_1003E7014                                          ; +0xc8, 0x1003e6ff8\nCMP             W8, #0x630                                             ; +0xcc, 0x1003e6ffc\nB.EQ            loc_1003E7014                                          ; +0xd0, 0x1003e7000\nMOV             X0, X19                                                ; +0xd4, 0x1003e7004\nBL              GameObject__getMainColorMode                           ; +0xd8, 0x1003e7008\nCMP             W0, #0x3F2                                             ; +0xdc, 0x1003e700c\nB.NE            loc_1003E701C                                          ; +0xe0, 0x1003e7010\nSTRB            WZR, [SP,#0x20+var_12]                                 ; +0xe4, 0x1003e7014\nSTRH            WZR, [SP,#0x20+var_14]                                 ; +0xe8, 0x1003e7018\nLDR             X8, [X19]                                              ; +0xec, 0x1003e701c\nLDR             X8, [X8,#0x5C8]                                        ; +0xf0, 0x1003e7020\nADD             X1, SP, #0x20+var_14                                   ; +0xf4, 0x1003e7024\nMOV             X0, X19                                                ; +0xf8, 0x1003e7028\nBLR             X8                                                     ; +0xfc, 0x1003e702c\nMOV             W8, #0xFF                                              ; +0x100, 0x1003e7030\nSTRB            W8, [SP,#0x20+var_16]                                  ; +0x104, 0x1003e7034\nMOV             W8, #0xC8C8                                            ; +0x108, 0x1003e7038\nSTRH            W8, [SP,#0x20+var_18]                                  ; +0x10c, 0x1003e703c\nLDR             X8, [X19]                                              ; +0x110, 0x1003e7040\nLDR             X8, [X8,#0x438]                                        ; +0x114, 0x1003e7044\nADD             X1, SP, #0x20+var_18                                   ; +0x118, 0x1003e7048\nMOV             X0, X19                                                ; +0x11c, 0x1003e704c\nBLR             X8                                                     ; +0x120, 0x1003e7050\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x124, 0x1003e7054\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x128, 0x1003e7058\nADD             SP, SP, #0x30 ; '0'                                    ; +0x12c, 0x1003e705c\nRET                                                                    ; +0x130, 0x1003e7060", "xrefs": ["EditorUI::updateCreateMenu @ 0x1003e6d00"], "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"}