{"type": "func", "start": 4295157920, "end": 4295158187, "name": "EditorUI::enableButton", "pseudocode": "// \n// EditorUI::enableButton from 0x10002e8a0 to 0x10002e9ab (267 bytes)\n// \n// 0 xrefs:\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  __int64 v2; // rax\n  __int64 v3; // r14\n  __int64 v4; // rdi\n  GameObject *v5; // rbx\n  int m_objectID; // eax\n  __int16 v7; // [rsp+8h] [rbp-18h] BYREF\n  char v8; // [rsp+Ah] [rbp-16h]\n  __int16 v9; // [rsp+Ch] [rbp-14h] BYREF\n  char v10; // [rsp+Eh] [rbp-12h]\n\n  v2 = ((__int64 (__fastcall *)(CreateMenuItem *))a2->getNormalImage)(a2);\n  v3 = v2;\n  v4 = *(_QWORD *)(v2 + 640);\n  if ( v4 || (v4 = *(_QWORD *)(v2 + 648)) != 0 )\n    (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v4 + 944LL))(v4, &unk_100815540);\n  if ( a2->m_objectID >= 0 )\n  {\n    v5 = *(GameObject **)(v3 + 632);\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 0x10002e8a0 to 0x10002e9ab (267 bytes)\n; \n; 0 xrefs:\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    rbp                                                            ; +0x0, 0x10002e8a0\nmov     rbp, rsp                                                       ; +0x1, 0x10002e8a1\npush    r14                                                            ; +0x4, 0x10002e8a4\npush    rbx                                                            ; +0x6, 0x10002e8a6\nsub     rsp, 10h                                                       ; +0x7, 0x10002e8a7\nmov     rbx, rsi                                                       ; +0xb, 0x10002e8ab\nmov     rax, [rsi]                                                     ; +0xe, 0x10002e8ae\nmov     rdi, rsi                                                       ; +0x11, 0x10002e8b1\ncall    qword ptr [rax+420h]                                           ; +0x14, 0x10002e8b4\nmov     r14, rax                                                       ; +0x1a, 0x10002e8ba\nmov     rdi, [rax+280h]                                                ; +0x1d, 0x10002e8bd\ntest    rdi, rdi                                                       ; +0x24, 0x10002e8c4\njnz     short loc_10002E8D5                                            ; +0x27, 0x10002e8c7\nmov     rdi, [r14+288h]                                                ; +0x29, 0x10002e8c9\ntest    rdi, rdi                                                       ; +0x30, 0x10002e8d0\njz      short loc_10002E8E5                                            ; +0x33, 0x10002e8d3\nmov     rax, [rdi]                                                     ; +0x35, 0x10002e8d5\nlea     rsi, unk_100815540                                             ; +0x38, 0x10002e8d8\ncall    qword ptr [rax+3B0h]                                           ; +0x3f, 0x10002e8df\ncmp     dword ptr [rbx+210h], 0                                        ; +0x45, 0x10002e8e5\njs      loc_10002E9A2                                                  ; +0x4c, 0x10002e8ec\nmov     rbx, [r14+278h]                                                ; +0x52, 0x10002e8f2\nmov     [rbp+var_12], 0FFh                                             ; +0x59, 0x10002e8f9\nmov     [rbp+var_14], 0FFFFh                                           ; +0x5d, 0x10002e8fd\ncmp     dword ptr [rbx+4E0h], 1                                        ; +0x63, 0x10002e903\njnz     short loc_10002E92D                                            ; +0x6a, 0x10002e90a\nmov     rdi, rbx                                                       ; +0x6c, 0x10002e90c\ncall    GameObject__isColorObject                                      ; +0x6f, 0x10002e90f\ntest    al, al                                                         ; +0x74, 0x10002e914\njz      short loc_10002E92D                                            ; +0x76, 0x10002e916\ncmp     byte ptr [rbx+6E8h], 1                                         ; +0x78, 0x10002e918\njnz     short loc_10002E92D                                            ; +0x7f, 0x10002e91f\nmov     [rbp+var_12], 0FFh                                             ; +0x81, 0x10002e921\nmov     [rbp+var_14], 0C8C8h                                           ; +0x85, 0x10002e925\njmp     short loc_10002E978                                            ; +0x8b, 0x10002e92b\nmov     eax, [rbx+404h]                                                ; +0x8d, 0x10002e92d\ncmp     eax, 62Fh                                                      ; +0x93, 0x10002e933\njg      short loc_10002E951                                            ; +0x98, 0x10002e938\nlea     ecx, [rax-396h]                                                ; +0x9a, 0x10002e93a\ncmp     ecx, 2                                                         ; +0xa0, 0x10002e940\njb      short loc_10002E96E                                            ; +0xa3, 0x10002e943\nadd     eax, 0FFFFFAD1h                                                ; +0xa5, 0x10002e945\ncmp     eax, 2                                                         ; +0xaa, 0x10002e94a\njb      short loc_10002E96E                                            ; +0xad, 0x10002e94d\njmp     short loc_10002E95F                                            ; +0xaf, 0x10002e94f\ncmp     eax, 7DCh                                                      ; +0xb1, 0x10002e951\njz      short loc_10002E96E                                            ; +0xb6, 0x10002e956\ncmp     eax, 630h                                                      ; +0xb8, 0x10002e958\njz      short loc_10002E96E                                            ; +0xbd, 0x10002e95d\nmov     rdi, rbx                                                       ; +0xbf, 0x10002e95f\ncall    GameObject__getMainColorMode                                   ; +0xc2, 0x10002e962\ncmp     eax, 3F2h                                                      ; +0xc7, 0x10002e967\njnz     short loc_10002E978                                            ; +0xcc, 0x10002e96c\nmov     [rbp+var_12], 0                                                ; +0xce, 0x10002e96e\nmov     [rbp+var_14], 0                                                ; +0xd2, 0x10002e972\nmov     rax, [rbx]                                                     ; +0xd8, 0x10002e978\nlea     rsi, [rbp+var_14]                                              ; +0xdb, 0x10002e97b\nmov     rdi, rbx                                                       ; +0xdf, 0x10002e97f\ncall    qword ptr [rax+5C8h]                                           ; +0xe2, 0x10002e982\nmov     [rbp+var_16], 0FFh                                             ; +0xe8, 0x10002e988\nmov     [rbp+var_18], 0C8C8h                                           ; +0xec, 0x10002e98c\nmov     rax, [rbx]                                                     ; +0xf2, 0x10002e992\nlea     rsi, [rbp+var_18]                                              ; +0xf5, 0x10002e995\nmov     rdi, rbx                                                       ; +0xf9, 0x10002e999\ncall    qword ptr [rax+438h]                                           ; +0xfc, 0x10002e99c\nadd     rsp, 10h                                                       ; +0x102, 0x10002e9a2\npop     rbx                                                            ; +0x106, 0x10002e9a6\npop     r14                                                            ; +0x107, 0x10002e9a7\npop     rbp                                                            ; +0x109, 0x10002e9a9\nretn                                                                   ; +0x10a, 0x10002e9aa", "xrefs": [], "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"}