{"type": "func", "start": 5369842064, "end": 5369842455, "name": "EditorUI::updateEditButtonColor", "pseudocode": "// \n// EditorUI::updateEditButtonColor from 0x140114990 to 0x140114b17 (391 bytes)\n// \n// 5 xrefs:\n// > EditorUI::activateScaleControl @ 0x140114c1c\n// > EditorUI::deactivateScaleControl @ 0x140114dc9\n// > EditorUI::activateTransformControl @ 0x14011524e\n// > EditorUI::deactivateTransformControl @ 0x1401153ef\n// > <???> @ 0x1406c9168\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\n// Hidden C++ exception states: #wind=1\nvoid EditorUI::updateEditButtonColor(EditorUI *a1, int a2, cocos2d::ccColor3B *a3)\n{\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  size_t v7; // r8\n  __int64 v8; // rbx\n  void *v9; // rcx\n  _QWORD *v10; // rbx\n  __int64 v11; // rcx\n  __int64 v12; // rcx\n  __int64 v13; // rcx\n  __int16 v14; // [rsp+20h] [rbp-48h] BYREF\n  GLubyte b; // [rsp+22h] [rbp-46h]\n  void *Block[2]; // [rsp+30h] [rbp-38h] BYREF\n  __m128i si128; // [rsp+40h] [rbp-28h]\n\n  if ( a1->m_editButtonDict )\n  {\n    v5 = cocos2d::CCString::createWithFormat(\"%i\", a2);\n    CString = cocos2d::CCString::getCString(v5);\n    *(_OWORD *)Block = 0;\n    si128 = 0;\n    v7 = -1;\n    do\n      ++v7;\n    while ( CString[v7] );\n    sub_14003A930(Block, CString, v7);\n    v8 = cocos2d::CCDictionary::objectForKey(a1->m_editButtonDict, Block);\n    if ( si128.m128i_i64[1] > 0xFuLL )\n    {\n      v9 = Block[0];\n      if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n      {\n        v9 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v9);\n    }\n    si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30);\n    LOBYTE(Block[0]) = 0;\n    if ( v8 )\n    {\n      v10 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 936LL))(v8);\n      v14 = *(_WORD *)&a3->r;\n      b = a3->b;\n      v11 = v10[78];\n      if ( v11 )\n        (**(void (__fastcall ***)(__int64, __int16 *))(v11 + 368))(v11 + 368, &v14);\n      v12 = v10[79];\n      if ( v12 )\n        (**(void (__fastcall ***)(__int64, __int16 *))(v12 + 320))(v12 + 320, &v14);\n      v13 = v10[81];\n      if ( v13 || (v13 = v10[80]) != 0 )\n        (**(void (__fastcall ***)(__int64, __int16 *))(v13 + 320))(v13 + 320, &v14);\n    }\n  }\n}", "assembly": "; \n; EditorUI::updateEditButtonColor from 0x140114990 to 0x140114b17 (391 bytes)\n; \n; 5 xrefs:\n; > EditorUI::activateScaleControl @ 0x140114c1c\n; > EditorUI::deactivateScaleControl @ 0x140114dc9\n; > EditorUI::activateTransformControl @ 0x14011524e\n; > EditorUI::deactivateTransformControl @ 0x1401153ef\n; > <???> @ 0x1406c9168\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\nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x140114990\npush    rdi                                                            ; +0x5, 0x140114995\nsub     rsp, 60h                                                       ; +0x6, 0x140114996\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x14011499a\nxor     rax, rsp                                                       ; +0x11, 0x1401149a1\nmov     [rsp+68h+var_18], rax                                          ; +0x14, 0x1401149a4\nmov     rdi, r8                                                        ; +0x19, 0x1401149a9\nmov     rbx, rcx                                                       ; +0x1c, 0x1401149ac\ncmp     qword ptr [rcx+2F0h], 0                                        ; +0x1f, 0x1401149af\njz      loc_140114AFC                                                  ; +0x27, 0x1401149b7\nlea     rcx, aI_11; \"%i\"                                               ; +0x2d, 0x1401149bd\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x34, 0x1401149c4\nmov     rcx, rax                                                       ; +0x3a, 0x1401149ca\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x3d, 0x1401149cd\nxorps   xmm0, xmm0                                                     ; +0x43, 0x1401149d3\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x46, 0x1401149d6\nxorps   xmm1, xmm1                                                     ; +0x4b, 0x1401149db\nmovdqu  [rsp+68h+var_28], xmm1                                         ; +0x4e, 0x1401149de\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x54, 0x1401149e4\nnop     dword ptr [rax+rax+00h]                                        ; +0x5b, 0x1401149eb\ninc     r8                                                             ; +0x60, 0x1401149f0\ncmp     byte ptr [rax+r8], 0                                           ; +0x63, 0x1401149f3\njnz     short loc_1401149F0                                            ; +0x68, 0x1401149f8\nmov     rdx, rax                                                       ; +0x6a, 0x1401149fa\nlea     rcx, [rsp+68h+Block]                                           ; +0x6d, 0x1401149fd\ncall    sub_14003A930                                                  ; +0x72, 0x140114a02\nnop                                                                    ; +0x77, 0x140114a07\nlea     rdx, [rsp+68h+Block]                                           ; +0x78, 0x140114a08\nmov     rcx, [rbx+2F0h]                                                ; +0x7d, 0x140114a0d\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0x84, 0x140114a14\nmov     rbx, rax                                                       ; +0x8a, 0x140114a1a\nmov     rdx, qword ptr [rsp+68h+var_28+8]                              ; +0x8d, 0x140114a1d\ncmp     rdx, 0Fh                                                       ; +0x92, 0x140114a22\njbe     short loc_140114A5D                                            ; +0x96, 0x140114a26\ninc     rdx                                                            ; +0x98, 0x140114a28\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x9b, 0x140114a2b\nmov     rax, rcx                                                       ; +0xa0, 0x140114a30\ncmp     rdx, 1000h                                                     ; +0xa3, 0x140114a33\njb      short loc_140114A58                                            ; +0xaa, 0x140114a3a\nadd     rdx, 27h ; '''                                                 ; +0xac, 0x140114a3c\nmov     rcx, [rcx-8]                                                   ; +0xb0, 0x140114a40\nsub     rax, rcx                                                       ; +0xb4, 0x140114a44\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xb7, 0x140114a47\ncmp     rax, 1Fh                                                       ; +0xbb, 0x140114a4b\njbe     short loc_140114A58                                            ; +0xbf, 0x140114a4f\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xc1, 0x140114a51\nalign 8                                                                ; +0xc7, 0x140114a57\ncall    j_j_free                                                       ; +0xc8, 0x140114a58\nmovdqa  xmm0, cs:xmmword_140623F30                                     ; +0xcd, 0x140114a5d\nmovdqu  [rsp+68h+var_28], xmm0                                         ; +0xd5, 0x140114a65\nmov     byte ptr [rsp+68h+Block], 0                                    ; +0xdb, 0x140114a6b\ntest    rbx, rbx                                                       ; +0xe0, 0x140114a70\njz      loc_140114AFC                                                  ; +0xe3, 0x140114a73\nmov     rax, [rbx]                                                     ; +0xe9, 0x140114a79\nmov     rcx, rbx                                                       ; +0xec, 0x140114a7c\ncall    qword ptr [rax+3A8h]                                           ; +0xef, 0x140114a7f\nmov     rbx, rax                                                       ; +0xf5, 0x140114a85\nmovzx   ecx, word ptr [rdi]                                            ; +0xf8, 0x140114a88\nmov     [rsp+68h+var_48], cx                                           ; +0xfb, 0x140114a8b\nmovzx   ecx, byte ptr [rdi+2]                                          ; +0x100, 0x140114a90\nmov     [rsp+68h+var_46], cl                                           ; +0x104, 0x140114a94\nmov     rcx, [rax+270h]                                                ; +0x108, 0x140114a98\ntest    rcx, rcx                                                       ; +0x10f, 0x140114a9f\njz      short loc_140114AB6                                            ; +0x112, 0x140114aa2\nadd     rcx, 170h                                                      ; +0x114, 0x140114aa4\nmov     r8, [rcx]                                                      ; +0x11b, 0x140114aab\nlea     rdx, [rsp+68h+var_48]                                          ; +0x11e, 0x140114aae\ncall    qword ptr [r8]                                                 ; +0x123, 0x140114ab3\nmov     rcx, [rbx+278h]                                                ; +0x126, 0x140114ab6\ntest    rcx, rcx                                                       ; +0x12d, 0x140114abd\njz      short loc_140114AD3                                            ; +0x130, 0x140114ac0\nadd     rcx, 140h                                                      ; +0x132, 0x140114ac2\nmov     rax, [rcx]                                                     ; +0x139, 0x140114ac9\nlea     rdx, [rsp+68h+var_48]                                          ; +0x13c, 0x140114acc\ncall    qword ptr [rax]                                                ; +0x141, 0x140114ad1\nmov     rcx, [rbx+288h]                                                ; +0x143, 0x140114ad3\ntest    rcx, rcx                                                       ; +0x14a, 0x140114ada\njnz     short loc_140114AEB                                            ; +0x14d, 0x140114add\nmov     rcx, [rbx+280h]                                                ; +0x14f, 0x140114adf\ntest    rcx, rcx                                                       ; +0x156, 0x140114ae6\njz      short loc_140114AFC                                            ; +0x159, 0x140114ae9\nadd     rcx, 140h                                                      ; +0x15b, 0x140114aeb\nmov     rax, [rcx]                                                     ; +0x162, 0x140114af2\nlea     rdx, [rsp+68h+var_48]                                          ; +0x165, 0x140114af5\ncall    qword ptr [rax]                                                ; +0x16a, 0x140114afa\nmov     rcx, [rsp+68h+var_18]                                          ; +0x16c, 0x140114afc\nxor     rcx, rsp; StackCookie                                          ; +0x171, 0x140114b01\ncall    __security_check_cookie                                        ; +0x174, 0x140114b04\nmov     rbx, [rsp+68h+arg_18]                                          ; +0x179, 0x140114b09\nadd     rsp, 60h                                                       ; +0x181, 0x140114b11\npop     rdi                                                            ; +0x185, 0x140114b15\nretn                                                                   ; +0x186, 0x140114b16", "xrefs": ["EditorUI::activateScaleControl @ 0x140114c1c", "EditorUI::deactivateScaleControl @ 0x140114dc9", "EditorUI::activateTransformControl @ 0x14011524e", "EditorUI::deactivateTransformControl @ 0x1401153ef", "<???> @ 0x1406c9168"], "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"}