{"type": "func", "start": 5370536976, "end": 5370537621, "name": "EditorUI::editHSV", "pseudocode": "// \n// EditorUI::editHSV from 0x1401be410 to 0x1401be695 (645 bytes)\n// \n// 4 xrefs:\n// > EditorUI::onEditColor @ 0x1401bdeb9\n// > EditorUI::handleEditorAction @ 0x1401c37a4\n// > EditorUI::checkLiveColorSelect @ 0x1401c9718\n// > <???> @ 0x14091a4d4\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\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall EditorUI::editHSV(_QWORD *a1)\n{\n  __int64 v2; // rdx\n  int SelectedObjects; // r13d\n  __int64 v4; // rcx\n  __int64 v5; // rcx\n  unsigned int *v6; // rbx\n  __int64 v7; // rcx\n  __int64 *v8; // rbx\n  __int64 *i; // rsi\n  __int64 v10; // rcx\n  char v11; // r14\n  __int16 v12; // bp\n  __int16 v13; // r15\n  char v14; // r12\n  __int64 v15; // rbx\n  _QWORD *v16; // rsi\n  _QWORD *v18; // [rsp+70h] [rbp+8h] BYREF\n  __int64 v19; // [rsp+78h] [rbp+10h] BYREF\n  __int64 v20; // [rsp+80h] [rbp+18h] BYREF\n\n  EditorUI::closeLiveHSVSelect(a1);\n  EditorUI::closeLiveColorSelect((__int64)a1);\n  SelectedObjects = 0;\n  v4 = a1[196];\n  if ( v4 )\n  {\n    *(_BYTE *)(v4 + 1141) = 0;\n    GameObject::updateObjectEditorColor(v4);\n  }\n  else\n  {\n    SelectedObjects = EditorUI::getSelectedObjects(a1, v2);\n    v5 = a1[118];\n    if ( v5 )\n    {\n      v6 = *(unsigned int **)(v5 + 56);\n      v7 = *v6;\n      if ( (_DWORD)v7 )\n      {\n        v8 = *((__int64 **)v6 + 2);\n        for ( i = &v8[v7 - 1]; v8 <= i; ++v8 )\n        {\n          v10 = *v8;\n          if ( !*v8 )\n            break;\n          *(_BYTE *)(v10 + 1141) = 0;\n          GameObject::updateObjectEditorColor(v10);\n        }\n      }\n    }\n  }\n  v18 = nullptr;\n  v19 = 0;\n  v20 = 0;\n  EditorUI::getEditColorTargets((__int64)a1, (__int64 *)&v18, &v19, &v20);\n  v11 = -1;\n  v12 = -1;\n  if ( v18 )\n  {\n    v13 = *((_WORD *)v18 + 36);\n    v14 = *((_BYTE *)v18 + 74);\n  }\n  else\n  {\n    v13 = -1;\n    v14 = -1;\n  }\n  if ( v19 )\n  {\n    v12 = *(_WORD *)(v19 + 72);\n    v11 = *(_BYTE *)(v19 + 74);\n  }\n  v15 = a1[196];\n  v16 = operator new(0x2E8u);\n  v18 = v16;\n  FLAlertLayer::FLAlertLayer((__int64)v16);\n  *v16 = &HSVLiveOverlay::`vftable';\n  v16[40] = &HSVLiveOverlay::`vftable';\n  v16[41] = &HSVLiveOverlay::`vftable';\n  v16[42] = &HSVLiveOverlay::`vftable';\n  v16[43] = &HSVLiveOverlay::`vftable';\n  v16[44] = &HSVLiveOverlay::`vftable';\n  v16[51] = &HSVLiveOverlay::`vftable';\n  v16[54] = &HSVLiveOverlay::`vftable';\n  v16[68] = &HSVLiveOverlay::`vftable';\n  v16[83] = &HSVLiveOverlay::`vftable';\n  v16[84] = 0;\n  v16[85] = 0;\n  v16[87] = 0;\n  v16[88] = 0;\n  *((_DWORD *)v16 + 178) = -1;\n  v16[90] = 0;\n  *((_WORD *)v16 + 364) = 0;\n  *((_BYTE *)v16 + 730) = 0;\n  LOWORD(v18) = v12;\n  BYTE2(v18) = v11;\n  LOWORD(v20) = v13;\n  BYTE2(v20) = v14;\n  if ( (unsigned __int8)HSVLiveOverlay::init((_DWORD)v16, v15, SelectedObjects, (unsigned int)&v20, (__int64)&v18) )\n  {\n    cocos2d::CCObject::autorelease((cocos2d::CCObject *)v16);\n  }\n  else\n  {\n    (*(void (__fastcall **)(_QWORD *, __int64))(*v16 + 8LL))(v16, 1);\n    v16 = nullptr;\n  }\n  a1[203] = v16;\n  v16[88] = a1 + 52;\n  *(_QWORD *)(a1[203] + 568LL) = a1;\n  return (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[203] + 1064LL))(a1[203]);\n}", "assembly": "; \n; EditorUI::editHSV from 0x1401be410 to 0x1401be695 (645 bytes)\n; \n; 4 xrefs:\n; > EditorUI::onEditColor @ 0x1401bdeb9\n; > EditorUI::handleEditorAction @ 0x1401c37a4\n; > EditorUI::checkLiveColorSelect @ 0x1401c9718\n; > <???> @ 0x14091a4d4\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; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x1401be410\npush    rbp                                                            ; +0x5, 0x1401be415\npush    rsi                                                            ; +0x6, 0x1401be416\npush    rdi                                                            ; +0x7, 0x1401be417\npush    r12                                                            ; +0x8, 0x1401be418\npush    r13                                                            ; +0xa, 0x1401be41a\npush    r14                                                            ; +0xc, 0x1401be41c\npush    r15                                                            ; +0xe, 0x1401be41e\nsub     rsp, 30h                                                       ; +0x10, 0x1401be420\nmov     rdi, rcx                                                       ; +0x14, 0x1401be424\ncall    EditorUI__closeLiveHSVSelect                                   ; +0x17, 0x1401be427\nmov     rcx, rdi                                                       ; +0x1c, 0x1401be42c\ncall    EditorUI__closeLiveColorSelect                                 ; +0x1f, 0x1401be42f\nxor     ebp, ebp                                                       ; +0x24, 0x1401be434\nmov     r13d, ebp                                                      ; +0x26, 0x1401be436\nmov     rcx, [rdi+620h]                                                ; +0x29, 0x1401be439\ntest    rcx, rcx                                                       ; +0x30, 0x1401be440\njz      short loc_1401BE453                                            ; +0x33, 0x1401be443\nmov     [rcx+475h], bpl                                                ; +0x35, 0x1401be445\ncall    GameObject__updateObjectEditorColor                            ; +0x3c, 0x1401be44c\njmp     short loc_1401BE4A2                                            ; +0x41, 0x1401be451\nmov     rcx, rdi                                                       ; +0x43, 0x1401be453\ncall    EditorUI__getSelectedObjects                                   ; +0x46, 0x1401be456\nmov     r13, rax                                                       ; +0x4b, 0x1401be45b\nmov     rcx, [rdi+3B0h]                                                ; +0x4e, 0x1401be45e\ntest    rcx, rcx                                                       ; +0x55, 0x1401be465\njz      short loc_1401BE4A2                                            ; +0x58, 0x1401be468\nmov     rbx, [rcx+38h]                                                 ; +0x5a, 0x1401be46a\nmov     ecx, [rbx]                                                     ; +0x5e, 0x1401be46e\ntest    ecx, ecx                                                       ; +0x60, 0x1401be470\njz      short loc_1401BE4A2                                            ; +0x62, 0x1401be472\nmov     rbx, [rbx+10h]                                                 ; +0x64, 0x1401be474\nlea     rsi, [rcx-1]                                                   ; +0x68, 0x1401be478\nlea     rsi, [rbx+rsi*8]                                               ; +0x6c, 0x1401be47c\ncmp     rbx, rsi                                                       ; +0x70, 0x1401be480\nja      short loc_1401BE4A2                                            ; +0x73, 0x1401be483\nmov     rcx, [rbx]                                                     ; +0x75, 0x1401be485\ntest    rcx, rcx                                                       ; +0x78, 0x1401be488\njz      short loc_1401BE4A2                                            ; +0x7b, 0x1401be48b\nmov     [rcx+475h], bpl                                                ; +0x7d, 0x1401be48d\ncall    GameObject__updateObjectEditorColor                            ; +0x84, 0x1401be494\nadd     rbx, 8                                                         ; +0x89, 0x1401be499\ncmp     rbx, rsi                                                       ; +0x8d, 0x1401be49d\njbe     short loc_1401BE485                                            ; +0x90, 0x1401be4a0\nmov     [rsp+68h+arg_0], rbp                                           ; +0x92, 0x1401be4a2\nmov     [rsp+68h+arg_8], rbp                                           ; +0x97, 0x1401be4a7\nmov     [rsp+68h+arg_10], rbp                                          ; +0x9c, 0x1401be4ac\nlea     r9, [rsp+68h+arg_10]                                           ; +0xa4, 0x1401be4b4\nlea     r8, [rsp+68h+arg_8]                                            ; +0xac, 0x1401be4bc\nlea     rdx, [rsp+68h+arg_0]                                           ; +0xb1, 0x1401be4c1\nmov     rcx, rdi                                                       ; +0xb6, 0x1401be4c6\ncall    EditorUI__getEditColorTargets                                  ; +0xb9, 0x1401be4c9\nmovzx   r14d, cs:byte_14070329E                                        ; +0xbe, 0x1401be4ce\nmovzx   ebp, cs:word_14070329C                                         ; +0xc6, 0x1401be4d6\nmov     rax, [rsp+68h+arg_0]                                           ; +0xcd, 0x1401be4dd\ntest    rax, rax                                                       ; +0xd2, 0x1401be4e2\njz      short loc_1401BE4F3                                            ; +0xd5, 0x1401be4e5\nmovzx   r15d, word ptr [rax+48h]                                       ; +0xd7, 0x1401be4e7\nmovzx   r12d, byte ptr [rax+4Ah]                                       ; +0xdc, 0x1401be4ec\njmp     short loc_1401BE4FB                                            ; +0xe1, 0x1401be4f1\nmovzx   r15d, bp                                                       ; +0xe3, 0x1401be4f3\nmovzx   r12d, r14b                                                     ; +0xe7, 0x1401be4f7\nmov     rax, [rsp+68h+arg_8]                                           ; +0xeb, 0x1401be4fb\ntest    rax, rax                                                       ; +0xf0, 0x1401be500\njz      short loc_1401BE50E                                            ; +0xf3, 0x1401be503\nmovzx   ebp, word ptr [rax+48h]                                        ; +0xf5, 0x1401be505\nmovzx   r14d, byte ptr [rax+4Ah]                                       ; +0xf9, 0x1401be509\nmov     rbx, [rdi+620h]                                                ; +0xfe, 0x1401be50e\nmov     ecx, 2E8h; Size                                                ; +0x105, 0x1401be515\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x10a, 0x1401be51a\nmov     rsi, rax                                                       ; +0x10f, 0x1401be51f\nmov     [rsp+68h+arg_0], rax                                           ; +0x112, 0x1401be522\nmov     rcx, rax                                                       ; +0x117, 0x1401be527\ncall    FLAlertLayer__FLAlertLayer                                     ; +0x11a, 0x1401be52a\nlea     rax, ??_7HSVLiveOverlay@@6B@; const HSVLiveOverlay::`vftable'  ; +0x11f, 0x1401be52f\nmov     [rsi], rax                                                     ; +0x126, 0x1401be536\nlea     rax, ??_7HSVLiveOverlay@@6B@_0; const HSVLiveOverlay::`vftable' ; +0x129, 0x1401be539\nmov     [rsi+140h], rax                                                ; +0x130, 0x1401be540\nlea     rax, ??_7HSVLiveOverlay@@6B@_1; const HSVLiveOverlay::`vftable' ; +0x137, 0x1401be547\nmov     [rsi+148h], rax                                                ; +0x13e, 0x1401be54e\nlea     rax, ??_7HSVLiveOverlay@@6B@_2; const HSVLiveOverlay::`vftable' ; +0x145, 0x1401be555\nmov     [rsi+150h], rax                                                ; +0x14c, 0x1401be55c\nlea     rax, ??_7HSVLiveOverlay@@6B@_3; const HSVLiveOverlay::`vftable' ; +0x153, 0x1401be563\nmov     [rsi+158h], rax                                                ; +0x15a, 0x1401be56a\nlea     rax, ??_7HSVLiveOverlay@@6B@_4; const HSVLiveOverlay::`vftable' ; +0x161, 0x1401be571\nmov     [rsi+160h], rax                                                ; +0x168, 0x1401be578\nlea     rax, ??_7HSVLiveOverlay@@6B@_5; const HSVLiveOverlay::`vftable' ; +0x16f, 0x1401be57f\nmov     [rsi+198h], rax                                                ; +0x176, 0x1401be586\nlea     rax, ??_7HSVLiveOverlay@@6B@_6; const HSVLiveOverlay::`vftable' ; +0x17d, 0x1401be58d\nmov     [rsi+1B0h], rax                                                ; +0x184, 0x1401be594\nlea     rax, ??_7HSVLiveOverlay@@6B@_7; const HSVLiveOverlay::`vftable' ; +0x18b, 0x1401be59b\nmov     [rsi+220h], rax                                                ; +0x192, 0x1401be5a2\nlea     rax, ??_7HSVLiveOverlay@@6B@_8; const HSVLiveOverlay::`vftable' ; +0x199, 0x1401be5a9\nmov     [rsi+298h], rax                                                ; +0x1a0, 0x1401be5b0\nxor     eax, eax                                                       ; +0x1a7, 0x1401be5b7\nmov     [rsi+2A0h], rax                                                ; +0x1a9, 0x1401be5b9\nmov     [rsi+2A8h], rax                                                ; +0x1b0, 0x1401be5c0\nmov     [rsi+2B8h], rax                                                ; +0x1b7, 0x1401be5c7\nmov     [rsi+2C0h], rax                                                ; +0x1be, 0x1401be5ce\nmov     dword ptr [rsi+2C8h], 0FFFFFFFFh                               ; +0x1c5, 0x1401be5d5\nmov     [rsi+2D0h], rax                                                ; +0x1cf, 0x1401be5df\nmov     [rsi+2D8h], ax                                                 ; +0x1d6, 0x1401be5e6\nmov     [rsi+2DAh], al                                                 ; +0x1dd, 0x1401be5ed\nmov     word ptr [rsp+68h+arg_0], bp                                   ; +0x1e3, 0x1401be5f3\nmov     byte ptr [rsp+68h+arg_0+2], r14b                               ; +0x1e8, 0x1401be5f8\nmov     word ptr [rsp+68h+arg_10], r15w                                ; +0x1ed, 0x1401be5fd\nmov     byte ptr [rsp+68h+arg_10+2], r12b                              ; +0x1f6, 0x1401be606\nlea     rax, [rsp+68h+arg_0]                                           ; +0x1fe, 0x1401be60e\nmov     [rsp+68h+var_48], rax                                          ; +0x203, 0x1401be613\nlea     r9, [rsp+68h+arg_10]                                           ; +0x208, 0x1401be618\nmov     r8, r13                                                        ; +0x210, 0x1401be620\nmov     rdx, rbx                                                       ; +0x213, 0x1401be623\nmov     rcx, rsi                                                       ; +0x216, 0x1401be626\ncall    HSVLiveOverlay__init                                           ; +0x219, 0x1401be629\nmov     rcx, rsi                                                       ; +0x21e, 0x1401be62e\ntest    al, al                                                         ; +0x221, 0x1401be631\njz      short loc_1401BE63D                                            ; +0x223, 0x1401be633\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x225, 0x1401be635\njmp     short loc_1401BE64A                                            ; +0x22b, 0x1401be63b\nmov     rax, [rsi]                                                     ; +0x22d, 0x1401be63d\nmov     edx, 1                                                         ; +0x230, 0x1401be640\ncall    qword ptr [rax+8]                                              ; +0x235, 0x1401be645\nxor     esi, esi                                                       ; +0x238, 0x1401be648\nmov     [rdi+658h], rsi                                                ; +0x23a, 0x1401be64a\nlea     rax, [rdi+1A0h]                                                ; +0x241, 0x1401be651\nmov     [rsi+2C0h], rax                                                ; +0x248, 0x1401be658\nmov     rax, [rdi+658h]                                                ; +0x24f, 0x1401be65f\nmov     [rax+238h], rdi                                                ; +0x256, 0x1401be666\nmov     rcx, [rdi+658h]                                                ; +0x25d, 0x1401be66d\nmov     rax, [rcx]                                                     ; +0x264, 0x1401be674\nmov     rbx, [rsp+68h+arg_18]                                          ; +0x267, 0x1401be677\nadd     rsp, 30h                                                       ; +0x26f, 0x1401be67f\npop     r15                                                            ; +0x273, 0x1401be683\npop     r14                                                            ; +0x275, 0x1401be685\npop     r13                                                            ; +0x277, 0x1401be687\npop     r12                                                            ; +0x279, 0x1401be689\npop     rdi                                                            ; +0x27b, 0x1401be68b\npop     rsi                                                            ; +0x27c, 0x1401be68c\npop     rbp                                                            ; +0x27d, 0x1401be68d\njmp     qword ptr [rax+428h]                                           ; +0x27e, 0x1401be68e", "xrefs": ["EditorUI::onEditColor @ 0x1401bdeb9", "EditorUI::handleEditorAction @ 0x1401c37a4", "EditorUI::checkLiveColorSelect @ 0x1401c9718", "<???> @ 0x14091a4d4"], "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"}