{"type": "func", "start": 5370536320, "end": 5370536649, "name": "EditorUI::editColor", "pseudocode": "// \n// EditorUI::editColor from 0x1401be180 to 0x1401be2c9 (329 bytes)\n// \n// 4 xrefs:\n// > EditorUI::onEditColor @ 0x1401bdecb\n// > EditorUI::handleEditorAction @ 0x1401c37b8\n// > EditorUI::checkLiveColorSelect @ 0x1401c96fb\n// > <???> @ 0x14091a4b0\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:28:02 +0000\n// \n\nunsigned int __fastcall EditorUI::editColor(__int64 a1)\n{\n  unsigned int v1; // ebx\n  unsigned int result; // eax\n  __int64 v4; // rsi\n  __int64 v5; // rdx\n  __int64 v6; // r8\n  __int64 v7; // rcx\n  _QWORD *v8; // rax\n  _QWORD *v9; // rcx\n  __int64 v10; // rax\n  __int64 v11; // rcx\n  struct cocos2d::CCObject *v12; // rax\n  __int64 v13; // [rsp+48h] [rbp+10h] BYREF\n  __int64 v14; // [rsp+50h] [rbp+18h] BYREF\n  __int64 v15; // [rsp+58h] [rbp+20h] BYREF\n\n  v1 = 0;\n  v14 = 0;\n  v13 = 0;\n  v15 = 0;\n  result = EditorUI::getEditColorTargets(a1, &v14, &v13, &v15);\n  v4 = v15;\n  if ( v14 || v13 || v15 )\n  {\n    EditorUI::closeLiveColorSelect(a1);\n    EditorUI::closeLiveHSVSelect(a1);\n    *(_QWORD *)(a1 + 1616) = 0;\n    if ( v4 )\n    {\n      v5 = 0;\n      v6 = v4;\n      v7 = 0;\n    }\n    else\n    {\n      v5 = v13;\n      v6 = 0;\n      v7 = v14;\n    }\n    v8 = ColorSelectLiveOverlay::create(v7, v5, v6);\n    *(_QWORD *)(a1 + 1616) = v8;\n    v9 = v8;\n    v10 = a1 + 416;\n    if ( !a1 )\n      v10 = 0;\n    v9[92] = v10;\n    *(_QWORD *)(*(_QWORD *)(a1 + 1616) + 568LL) = a1;\n    result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1616) + 1064LL))(*(_QWORD *)(a1 + 1616));\n    if ( !v4 )\n    {\n      v11 = *(_QWORD *)(a1 + 1568);\n      if ( v11 )\n      {\n        *(_BYTE *)(v11 + 1141) = 0;\n        return GameObject::updateObjectEditorColor(v11);\n      }\n      else\n      {\n        result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944));\n        if ( result )\n        {\n          result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944));\n          if ( result )\n          {\n            do\n            {\n              v12 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 944), v1);\n              *((_BYTE *)v12 + 1141) = 0;\n              GameObject::updateObjectEditorColor(v12);\n              ++v1;\n              result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944));\n            }\n            while ( v1 < result );\n          }\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::editColor from 0x1401be180 to 0x1401be2c9 (329 bytes)\n; \n; 4 xrefs:\n; > EditorUI::onEditColor @ 0x1401bdecb\n; > EditorUI::handleEditorAction @ 0x1401c37b8\n; > EditorUI::checkLiveColorSelect @ 0x1401c96fb\n; > <???> @ 0x14091a4b0\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:28:02 +0000\n; \npush    rbx                                                            ; +0x0, 0x1401be180\npush    rsi                                                            ; +0x2, 0x1401be182\npush    rdi                                                            ; +0x3, 0x1401be183\nsub     rsp, 20h                                                       ; +0x4, 0x1401be184\nxor     ebx, ebx                                                       ; +0x8, 0x1401be188\nlea     r9, [rsp+38h+arg_18]                                           ; +0xa, 0x1401be18a\nlea     r8, [rsp+38h+arg_8]                                            ; +0xf, 0x1401be18f\nmov     [rsp+38h+arg_10], rbx                                          ; +0x14, 0x1401be194\nlea     rdx, [rsp+38h+arg_10]                                          ; +0x19, 0x1401be199\nmov     [rsp+38h+arg_8], rbx                                           ; +0x1e, 0x1401be19e\nmov     [rsp+38h+arg_18], rbx                                          ; +0x23, 0x1401be1a3\nmov     rdi, rcx                                                       ; +0x28, 0x1401be1a8\ncall    EditorUI__getEditColorTargets                                  ; +0x2b, 0x1401be1ab\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x30, 0x1401be1b0\ncmp     [rsp+38h+arg_10], rbx                                          ; +0x35, 0x1401be1b5\njnz     short loc_1401BE1CC                                            ; +0x3a, 0x1401be1ba\ncmp     [rsp+38h+arg_8], rbx                                           ; +0x3c, 0x1401be1bc\njnz     short loc_1401BE1CC                                            ; +0x41, 0x1401be1c1\ntest    rsi, rsi                                                       ; +0x43, 0x1401be1c3\njz      loc_1401BE2C1                                                  ; +0x46, 0x1401be1c6\nmov     rcx, rdi                                                       ; +0x4c, 0x1401be1cc\ncall    EditorUI__closeLiveColorSelect                                 ; +0x4f, 0x1401be1cf\nmov     rcx, rdi                                                       ; +0x54, 0x1401be1d4\ncall    EditorUI__closeLiveHSVSelect                                   ; +0x57, 0x1401be1d7\nmov     [rdi+650h], rbx                                                ; +0x5c, 0x1401be1dc\ntest    rsi, rsi                                                       ; +0x63, 0x1401be1e3\njz      short loc_1401BE1F1                                            ; +0x66, 0x1401be1e6\nxor     edx, edx                                                       ; +0x68, 0x1401be1e8\nmov     r8, rsi                                                        ; +0x6a, 0x1401be1ea\nxor     ecx, ecx                                                       ; +0x6d, 0x1401be1ed\njmp     short loc_1401BE1FE                                            ; +0x6f, 0x1401be1ef\nmov     rdx, [rsp+38h+arg_8]                                           ; +0x71, 0x1401be1f1\nxor     r8d, r8d                                                       ; +0x76, 0x1401be1f6\nmov     rcx, [rsp+38h+arg_10]                                          ; +0x79, 0x1401be1f9\ncall    ColorSelectLiveOverlay__create                                 ; +0x7e, 0x1401be1fe\nmov     [rdi+650h], rax                                                ; +0x83, 0x1401be203\nmov     rcx, rax                                                       ; +0x8a, 0x1401be20a\ntest    rdi, rdi                                                       ; +0x8d, 0x1401be20d\nlea     rax, [rdi+1A0h]                                                ; +0x90, 0x1401be210\ncmovz   rax, rbx                                                       ; +0x97, 0x1401be217\nmov     [rcx+2E0h], rax                                                ; +0x9b, 0x1401be21b\nmov     rax, [rdi+650h]                                                ; +0xa2, 0x1401be222\nmov     [rax+238h], rdi                                                ; +0xa9, 0x1401be229\nmov     rcx, [rdi+650h]                                                ; +0xb0, 0x1401be230\nmov     rax, [rcx]                                                     ; +0xb7, 0x1401be237\ncall    qword ptr [rax+428h]                                           ; +0xba, 0x1401be23a\ntest    rsi, rsi                                                       ; +0xc0, 0x1401be240\njnz     short loc_1401BE2C1                                            ; +0xc3, 0x1401be243\nmov     rcx, [rdi+620h]                                                ; +0xc5, 0x1401be245\ntest    rcx, rcx                                                       ; +0xcc, 0x1401be24c\njz      short loc_1401BE263                                            ; +0xcf, 0x1401be24f\nmov     [rcx+475h], bl                                                 ; +0xd1, 0x1401be251\nadd     rsp, 20h                                                       ; +0xd7, 0x1401be257\npop     rdi                                                            ; +0xdb, 0x1401be25b\npop     rsi                                                            ; +0xdc, 0x1401be25c\npop     rbx                                                            ; +0xdd, 0x1401be25d\njmp     GameObject__updateObjectEditorColor                            ; +0xde, 0x1401be25e\nmov     rcx, [rdi+3B0h]                                                ; +0xe3, 0x1401be263\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xea, 0x1401be26a\ntest    eax, eax                                                       ; +0xf0, 0x1401be270\njz      short loc_1401BE2C1                                            ; +0xf2, 0x1401be272\nmov     rcx, [rdi+3B0h]                                                ; +0xf4, 0x1401be274\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xfb, 0x1401be27b\ntest    eax, eax                                                       ; +0x101, 0x1401be281\njz      short loc_1401BE2C1                                            ; +0x103, 0x1401be283\nnop     word ptr [rax+rax+00000000h]                                   ; +0x105, 0x1401be285\nmov     rcx, [rdi+3B0h]                                                ; +0x110, 0x1401be290\nmov     edx, ebx                                                       ; +0x117, 0x1401be297\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x119, 0x1401be299\nmov     rcx, rax                                                       ; +0x11f, 0x1401be29f\nmov     byte ptr [rax+475h], 0                                         ; +0x122, 0x1401be2a2\ncall    GameObject__updateObjectEditorColor                            ; +0x129, 0x1401be2a9\nmov     rcx, [rdi+3B0h]                                                ; +0x12e, 0x1401be2ae\ninc     ebx                                                            ; +0x135, 0x1401be2b5\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x137, 0x1401be2b7\ncmp     ebx, eax                                                       ; +0x13d, 0x1401be2bd\njb      short loc_1401BE290                                            ; +0x13f, 0x1401be2bf\nadd     rsp, 20h                                                       ; +0x141, 0x1401be2c1\npop     rdi                                                            ; +0x145, 0x1401be2c5\npop     rsi                                                            ; +0x146, 0x1401be2c6\npop     rbx                                                            ; +0x147, 0x1401be2c7\nretn                                                                   ; +0x148, 0x1401be2c8", "xrefs": ["EditorUI::onEditColor @ 0x1401bdecb", "EditorUI::handleEditorAction @ 0x1401c37b8", "EditorUI::checkLiveColorSelect @ 0x1401c96fb", "<???> @ 0x14091a4b0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}