{"type": "func", "start": 5370535664, "end": 5370536317, "name": "EditorUI::getEditColorTargets", "pseudocode": "// \n// EditorUI::getEditColorTargets from 0x1401bdef0 to 0x1401be17d (653 bytes)\n// \n// 4 xrefs:\n// > EditorUI::updateEditColorButton @ 0x1401bddc9\n// > EditorUI::editColor @ 0x1401be1ab\n// > EditorUI::editHSV @ 0x1401be4c9\n// > <???> @ 0x14091a4a4\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:01 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nint __fastcall EditorUI::getEditColorTargets(__int64 a1, __int64 *a2, __int64 *a3, __int64 *a4)\n{\n  int v7; // edi\n  int v8; // ebx\n  __int64 ColorAction; // rax\n  int *v10; // rdx\n  int v11; // ecx\n  int *v12; // rcx\n  char v13; // r9\n  unsigned int *v14; // r8\n  __int64 *v15; // r8\n  __int64 *v16; // r10\n  __int64 v17; // rcx\n  int *v18; // rax\n  int v19; // edx\n  int v20; // ecx\n  int v21; // eax\n  __int64 v22; // rax\n  __int64 v23; // rax\n  void *v25; // [rsp+40h] [rbp+8h]\n  void *v26; // [rsp+40h] [rbp+8h]\n\n  v7 = -1;\n  v8 = -1;\n  ColorAction = *(_QWORD *)(a1 + 1568);\n  if ( !ColorAction )\n  {\n    LODWORD(ColorAction) = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944));\n    if ( !(_DWORD)ColorAction )\n      goto LABEL_49;\n    v7 = -2;\n    v8 = -2;\n    v13 = 0;\n    ColorAction = *(_QWORD *)(a1 + 944);\n    if ( !ColorAction )\n      goto LABEL_49;\n    v14 = *(unsigned int **)(ColorAction + 56);\n    ColorAction = *v14;\n    if ( !(_DWORD)ColorAction )\n      goto LABEL_49;\n    v15 = *((__int64 **)v14 + 2);\n    v16 = &v15[ColorAction - 1];\n    if ( v15 > v16 )\n      goto LABEL_49;\n    while ( 1 )\n    {\n      v17 = *v15;\n      if ( !*v15 )\n        goto LABEL_41;\n      v18 = *(int **)(v17 + 1104);\n      v19 = v18[1];\n      if ( !v19 )\n        break;\n      v21 = *v18;\n      if ( v19 == v21 || !v21 )\n        v21 = v19;\n      if ( v7 == -2 )\n      {\n        v7 = v21;\n      }\n      else if ( v7 != v21 )\n      {\n        v13 = 1;\n      }\n      ColorAction = *(_QWORD *)(v17 + 1112);\n      if ( ColorAction )\n      {\n        v20 = *(_DWORD *)(ColorAction + 4);\n        if ( v20 )\n          goto LABEL_33;\n      }\nLABEL_39:\n      if ( v13 )\n        goto LABEL_49;\n      if ( ++v15 > v16 )\n        goto LABEL_41;\n    }\n    ColorAction = *(_QWORD *)(v17 + 1112);\n    if ( !ColorAction || !*(_DWORD *)(ColorAction + 4) )\n      goto LABEL_49;\n    v20 = *(_DWORD *)(ColorAction + 4);\nLABEL_33:\n    LODWORD(ColorAction) = *(_DWORD *)ColorAction;\n    if ( v20 == (_DWORD)ColorAction || !(_DWORD)ColorAction )\n      LODWORD(ColorAction) = v20;\n    if ( v8 == -2 )\n    {\n      v8 = ColorAction;\n    }\n    else if ( v8 != (_DWORD)ColorAction )\n    {\n      goto LABEL_49;\n    }\n    goto LABEL_39;\n  }\n  if ( *(_DWORD *)(ColorAction + 1256) == 1\n    && (*(_BYTE *)(ColorAction + 1262) || *(_DWORD *)(ColorAction + 1036) == 1006) )\n  {\n    *a4 = ColorAction;\n  }\n  else\n  {\n    v10 = *(int **)(ColorAction + 1104);\n    v11 = v10[1];\n    if ( v11 )\n    {\n      v7 = *v10;\n      if ( v11 == *v10 || !v7 )\n        v7 = v10[1];\n    }\n    v12 = *(int **)(ColorAction + 1112);\n    if ( v12 )\n    {\n      LODWORD(ColorAction) = v12[1];\n      if ( (_DWORD)ColorAction )\n      {\n        v8 = *v12;\n        if ( (_DWORD)ColorAction == *v12 || !v8 )\n          v8 = v12[1];\n      }\n    }\nLABEL_41:\n    if ( v7 >= 0 )\n    {\n      v22 = qword_14090BFD0;\n      if ( !qword_14090BFD0 )\n      {\n        v25 = operator new(0x6E8u);\n        qword_14090BFD0 = GameManager::GameManager(v25);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n        v22 = qword_14090BFD0;\n      }\n      ColorAction = GJEffectManager::getColorAction(\n                      *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v22 + 568) + 3528LL) + 320LL),\n                      (unsigned int)v7);\n      *a2 = ColorAction;\n    }\n    if ( v8 >= 0 )\n    {\n      v23 = qword_14090BFD0;\n      if ( !qword_14090BFD0 )\n      {\n        v26 = operator new(0x6E8u);\n        qword_14090BFD0 = GameManager::GameManager(v26);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n        v23 = qword_14090BFD0;\n      }\n      ColorAction = GJEffectManager::getColorAction(\n                      *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v23 + 568) + 3528LL) + 320LL),\n                      (unsigned int)v8);\n      *a3 = ColorAction;\n    }\n  }\nLABEL_49:\n  if ( !*a2 )\n  {\n    ColorAction = *a3;\n    if ( *a3 )\n    {\n      *a2 = ColorAction;\n      *a3 = 0;\n    }\n  }\n  return ColorAction;\n}", "assembly": "; \n; EditorUI::getEditColorTargets from 0x1401bdef0 to 0x1401be17d (653 bytes)\n; \n; 4 xrefs:\n; > EditorUI::updateEditColorButton @ 0x1401bddc9\n; > EditorUI::editColor @ 0x1401be1ab\n; > EditorUI::editHSV @ 0x1401be4c9\n; > <???> @ 0x14091a4a4\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:01 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401bdef0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1401bdef5\npush    rdi                                                            ; +0xa, 0x1401bdefa\npush    r14                                                            ; +0xb, 0x1401bdefb\npush    r15                                                            ; +0xd, 0x1401bdefd\nsub     rsp, 20h                                                       ; +0xf, 0x1401bdeff\nmov     r14, r8                                                        ; +0x13, 0x1401bdf03\nmov     r15, rdx                                                       ; +0x16, 0x1401bdf06\nmov     rsi, rcx                                                       ; +0x19, 0x1401bdf09\nmov     edi, 0FFFFFFFFh                                                ; +0x1c, 0x1401bdf0c\nmov     ebx, edi                                                       ; +0x21, 0x1401bdf11\nmov     rax, [rcx+620h]                                                ; +0x23, 0x1401bdf13\ntest    rax, rax                                                       ; +0x2a, 0x1401bdf1a\njz      short loc_1401BDF8F                                            ; +0x2d, 0x1401bdf1d\ncmp     dword ptr [rax+4E8h], 1                                        ; +0x2f, 0x1401bdf1f\njnz     short loc_1401BDF45                                            ; +0x36, 0x1401bdf26\ncmp     byte ptr [rax+4EEh], 0                                         ; +0x38, 0x1401bdf28\njnz     short loc_1401BDF3D                                            ; +0x3f, 0x1401bdf2f\ncmp     dword ptr [rax+40Ch], 3EEh                                     ; +0x41, 0x1401bdf31\njnz     short loc_1401BDF45                                            ; +0x4b, 0x1401bdf3b\nmov     [r9], rax                                                      ; +0x4d, 0x1401bdf3d\njmp     loc_1401BE151                                                  ; +0x50, 0x1401bdf40\nmov     rdx, [rax+450h]                                                ; +0x55, 0x1401bdf45\nmov     ecx, [rdx+4]                                                   ; +0x5c, 0x1401bdf4c\ntest    ecx, ecx                                                       ; +0x5f, 0x1401bdf4f\njz      short loc_1401BDF5F                                            ; +0x61, 0x1401bdf51\nmov     edi, [rdx]                                                     ; +0x63, 0x1401bdf53\ncmp     ecx, edi                                                       ; +0x65, 0x1401bdf55\njz      short loc_1401BDF5D                                            ; +0x67, 0x1401bdf57\ntest    edi, edi                                                       ; +0x69, 0x1401bdf59\njnz     short loc_1401BDF5F                                            ; +0x6b, 0x1401bdf5b\nmov     edi, ecx                                                       ; +0x6d, 0x1401bdf5d\nmov     rcx, [rax+458h]                                                ; +0x6f, 0x1401bdf5f\ntest    rcx, rcx                                                       ; +0x76, 0x1401bdf66\njz      loc_1401BE08D                                                  ; +0x79, 0x1401bdf69\nmov     eax, [rcx+4]                                                   ; +0x7f, 0x1401bdf6f\ntest    eax, eax                                                       ; +0x82, 0x1401bdf72\njz      loc_1401BE08D                                                  ; +0x84, 0x1401bdf74\nmov     ebx, [rcx]                                                     ; +0x8a, 0x1401bdf7a\ncmp     eax, ebx                                                       ; +0x8c, 0x1401bdf7c\njz      short loc_1401BDF88                                            ; +0x8e, 0x1401bdf7e\ntest    ebx, ebx                                                       ; +0x90, 0x1401bdf80\njnz     loc_1401BE08D                                                  ; +0x92, 0x1401bdf82\nmov     ebx, eax                                                       ; +0x98, 0x1401bdf88\njmp     loc_1401BE08D                                                  ; +0x9a, 0x1401bdf8a\nmov     rcx, [rcx+3B0h]                                                ; +0x9f, 0x1401bdf8f\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa6, 0x1401bdf96\ntest    eax, eax                                                       ; +0xac, 0x1401bdf9c\njz      loc_1401BE151                                                  ; +0xae, 0x1401bdf9e\nmov     edi, 0FFFFFFFEh                                                ; +0xb4, 0x1401bdfa4\nmov     ebx, edi                                                       ; +0xb9, 0x1401bdfa9\nxor     r9b, r9b                                                       ; +0xbb, 0x1401bdfab\nmov     rax, [rsi+3B0h]                                                ; +0xbe, 0x1401bdfae\ntest    rax, rax                                                       ; +0xc5, 0x1401bdfb5\njz      loc_1401BE151                                                  ; +0xc8, 0x1401bdfb8\nmov     r8, [rax+38h]                                                  ; +0xce, 0x1401bdfbe\nmov     eax, [r8]                                                      ; +0xd2, 0x1401bdfc2\ntest    eax, eax                                                       ; +0xd5, 0x1401bdfc5\njz      loc_1401BE151                                                  ; +0xd7, 0x1401bdfc7\nmov     r8, [r8+10h]                                                   ; +0xdd, 0x1401bdfcd\nlea     r10, [rax-1]                                                   ; +0xe1, 0x1401bdfd1\nlea     r10, [r8+r10*8]                                                ; +0xe5, 0x1401bdfd5\ncmp     r8, r10                                                        ; +0xe9, 0x1401bdfd9\nja      loc_1401BE151                                                  ; +0xec, 0x1401bdfdc\nmov     r11d, 1                                                        ; +0xf2, 0x1401bdfe2\nnop     dword ptr [rax+rax+00000000h]                                  ; +0xf8, 0x1401bdfe8\nmov     rcx, [r8]                                                      ; +0x100, 0x1401bdff0\ntest    rcx, rcx                                                       ; +0x103, 0x1401bdff3\njz      loc_1401BE08D                                                  ; +0x106, 0x1401bdff6\nmov     rax, [rcx+450h]                                                ; +0x10c, 0x1401bdffc\nmov     edx, [rax+4]                                                   ; +0x113, 0x1401be003\ntest    edx, edx                                                       ; +0x116, 0x1401be006\njnz     short loc_1401BE028                                            ; +0x118, 0x1401be008\nmov     rax, [rcx+458h]                                                ; +0x11a, 0x1401be00a\ntest    rax, rax                                                       ; +0x121, 0x1401be011\njz      loc_1401BE151                                                  ; +0x124, 0x1401be014\ncmp     [rax+4], edx                                                   ; +0x12a, 0x1401be01a\njz      loc_1401BE151                                                  ; +0x12d, 0x1401be01d\nmov     ecx, [rax+4]                                                   ; +0x133, 0x1401be023\njmp     short loc_1401BE05A                                            ; +0x136, 0x1401be026\nmov     eax, [rax]                                                     ; +0x138, 0x1401be028\ncmp     edx, eax                                                       ; +0x13a, 0x1401be02a\njz      short loc_1401BE032                                            ; +0x13c, 0x1401be02c\ntest    eax, eax                                                       ; +0x13e, 0x1401be02e\njnz     short loc_1401BE034                                            ; +0x140, 0x1401be030\nmov     eax, edx                                                       ; +0x142, 0x1401be032\ncmp     edi, 0FFFFFFFEh                                                ; +0x144, 0x1401be034\njnz     short loc_1401BE03D                                            ; +0x147, 0x1401be037\nmov     edi, eax                                                       ; +0x149, 0x1401be039\njmp     short loc_1401BE047                                            ; +0x14b, 0x1401be03b\nmovzx   r9d, r9b                                                       ; +0x14d, 0x1401be03d\ncmp     edi, eax                                                       ; +0x151, 0x1401be041\ncmovnz  r9d, r11d                                                      ; +0x153, 0x1401be043\nmov     rax, [rcx+458h]                                                ; +0x157, 0x1401be047\ntest    rax, rax                                                       ; +0x15e, 0x1401be04e\njz      short loc_1401BE077                                            ; +0x161, 0x1401be051\nmov     ecx, [rax+4]                                                   ; +0x163, 0x1401be053\ntest    ecx, ecx                                                       ; +0x166, 0x1401be056\njz      short loc_1401BE077                                            ; +0x168, 0x1401be058\nmov     eax, [rax]                                                     ; +0x16a, 0x1401be05a\ncmp     ecx, eax                                                       ; +0x16c, 0x1401be05c\njz      short loc_1401BE064                                            ; +0x16e, 0x1401be05e\ntest    eax, eax                                                       ; +0x170, 0x1401be060\njnz     short loc_1401BE066                                            ; +0x172, 0x1401be062\nmov     eax, ecx                                                       ; +0x174, 0x1401be064\ncmp     ebx, 0FFFFFFFEh                                                ; +0x176, 0x1401be066\njnz     short loc_1401BE06F                                            ; +0x179, 0x1401be069\nmov     ebx, eax                                                       ; +0x17b, 0x1401be06b\njmp     short loc_1401BE077                                            ; +0x17d, 0x1401be06d\ncmp     ebx, eax                                                       ; +0x17f, 0x1401be06f\njnz     loc_1401BE151                                                  ; +0x181, 0x1401be071\ntest    r9b, r9b                                                       ; +0x187, 0x1401be077\njnz     loc_1401BE151                                                  ; +0x18a, 0x1401be07a\nadd     r8, 8                                                          ; +0x190, 0x1401be080\ncmp     r8, r10                                                        ; +0x194, 0x1401be084\njbe     loc_1401BDFF0                                                  ; +0x197, 0x1401be087\ntest    edi, edi                                                       ; +0x19d, 0x1401be08d\njs      short loc_1401BE0EF                                            ; +0x19f, 0x1401be08f\nmov     rax, cs:qword_14090BFD0                                        ; +0x1a1, 0x1401be091\ntest    rax, rax                                                       ; +0x1a8, 0x1401be098\njnz     short loc_1401BE0D0                                            ; +0x1ab, 0x1401be09b\nmov     ecx, 6E8h; Size                                                ; +0x1ad, 0x1401be09d\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1b2, 0x1401be0a2\nmov     [rsp+38h+arg_0], rax                                           ; +0x1b7, 0x1401be0a7\nmov     rcx, rax                                                       ; +0x1bc, 0x1401be0ac\ncall    GameManager__GameManager                                       ; +0x1bf, 0x1401be0af\nnop                                                                    ; +0x1c4, 0x1401be0b4\nmov     cs:qword_14090BFD0, rax                                        ; +0x1c5, 0x1401be0b5\nmov     rcx, [rax]                                                     ; +0x1cc, 0x1401be0bc\nmov     r8, [rcx+48h]                                                  ; +0x1cf, 0x1401be0bf\nmov     rcx, rax                                                       ; +0x1d3, 0x1401be0c3\ncall    r8                                                             ; +0x1d6, 0x1401be0c6\nmov     rax, cs:qword_14090BFD0                                        ; +0x1d9, 0x1401be0c9\nmov     rax, [rax+238h]                                                ; +0x1e0, 0x1401be0d0\nmov     rcx, [rax+0DC8h]                                               ; +0x1e7, 0x1401be0d7\nmov     edx, edi                                                       ; +0x1ee, 0x1401be0de\nmov     rcx, [rcx+140h]                                                ; +0x1f0, 0x1401be0e0\ncall    GJEffectManager__getColorAction                                ; +0x1f7, 0x1401be0e7\nmov     [r15], rax                                                     ; +0x1fc, 0x1401be0ec\ntest    ebx, ebx                                                       ; +0x1ff, 0x1401be0ef\njs      short loc_1401BE151                                            ; +0x201, 0x1401be0f1\nmov     rax, cs:qword_14090BFD0                                        ; +0x203, 0x1401be0f3\ntest    rax, rax                                                       ; +0x20a, 0x1401be0fa\njnz     short loc_1401BE132                                            ; +0x20d, 0x1401be0fd\nmov     ecx, 6E8h; Size                                                ; +0x20f, 0x1401be0ff\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x214, 0x1401be104\nmov     [rsp+38h+arg_0], rax                                           ; +0x219, 0x1401be109\nmov     rcx, rax                                                       ; +0x21e, 0x1401be10e\ncall    GameManager__GameManager                                       ; +0x221, 0x1401be111\nnop                                                                    ; +0x226, 0x1401be116\nmov     cs:qword_14090BFD0, rax                                        ; +0x227, 0x1401be117\nmov     rcx, [rax]                                                     ; +0x22e, 0x1401be11e\nmov     r8, [rcx+48h]                                                  ; +0x231, 0x1401be121\nmov     rcx, rax                                                       ; +0x235, 0x1401be125\ncall    r8                                                             ; +0x238, 0x1401be128\nmov     rax, cs:qword_14090BFD0                                        ; +0x23b, 0x1401be12b\nmov     rax, [rax+238h]                                                ; +0x242, 0x1401be132\nmov     rcx, [rax+0DC8h]                                               ; +0x249, 0x1401be139\nmov     edx, ebx                                                       ; +0x250, 0x1401be140\nmov     rcx, [rcx+140h]                                                ; +0x252, 0x1401be142\ncall    GJEffectManager__getColorAction                                ; +0x259, 0x1401be149\nmov     [r14], rax                                                     ; +0x25e, 0x1401be14e\ncmp     qword ptr [r15], 0                                             ; +0x261, 0x1401be151\njnz     short loc_1401BE169                                            ; +0x265, 0x1401be155\nmov     rax, [r14]                                                     ; +0x267, 0x1401be157\ntest    rax, rax                                                       ; +0x26a, 0x1401be15a\njz      short loc_1401BE169                                            ; +0x26d, 0x1401be15d\nmov     [r15], rax                                                     ; +0x26f, 0x1401be15f\nmov     qword ptr [r14], 0                                             ; +0x272, 0x1401be162\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x279, 0x1401be169\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x27e, 0x1401be16e\nadd     rsp, 20h                                                       ; +0x283, 0x1401be173\npop     r15                                                            ; +0x287, 0x1401be177\npop     r14                                                            ; +0x289, 0x1401be179\npop     rdi                                                            ; +0x28b, 0x1401be17b\nretn                                                                   ; +0x28c, 0x1401be17c", "xrefs": ["EditorUI::updateEditColorButton @ 0x1401bddc9", "EditorUI::editColor @ 0x1401be1ab", "EditorUI::editHSV @ 0x1401be4c9", "<???> @ 0x14091a4a4"], "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"}