{"type": "func", "start": 5370817056, "end": 5370817472, "name": "EditorUI::updateEditButtonColor", "pseudocode": "// \n// EditorUI::updateEditButtonColor from 0x140202a20 to 0x140202bc0 (416 bytes)\n// \n// 5 xrefs:\n// > EditorUI::activateScaleControl @ 0x140202cce\n// > EditorUI::deactivateScaleControl @ 0x140202e5e\n// > EditorUI::showTransformControl @ 0x14020339c\n// > EditorUI::deactivateTransformControl @ 0x140203577\n// > <???> @ 0x14091af3c\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:14 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall EditorUI::updateEditButtonColor(__int64 a1, __int64 a2, __int16 *a3)\n{\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  size_t v7; // r8\n  __int64 v8; // rbx\n  void *v9; // r8\n  _QWORD *v10; // rbx\n  __int64 v11; // rcx\n  __int64 v12; // rcx\n  __int64 v13; // rcx\n  __int16 v14; // [rsp+30h] [rbp-48h] BYREF\n  char v15; // [rsp+32h] [rbp-46h]\n  void *Block[2]; // [rsp+40h] [rbp-38h] BYREF\n  __m128i si128; // [rsp+50h] [rbp-28h]\n\n  if ( *(_QWORD *)(a1 + 864) )\n  {\n    v5 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8);\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_14003D230(Block, CString, v7);\n    v8 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 864), 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          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v9);\n    }\n    si128 = _mm_load_si128((const __m128i *)&Size);\n    LOBYTE(Block[0]) = 0;\n    if ( v8 )\n    {\n      v10 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 952LL))(v8);\n      v14 = *a3;\n      v15 = *((_BYTE *)a3 + 2);\n      v11 = v10[79];\n      if ( v11 )\n        (**(void (__fastcall ***)(__int64, __int16 *))(v11 + 368))(v11 + 368, &v14);\n      v12 = v10[80];\n      if ( v12 )\n        (**(void (__fastcall ***)(__int64, __int16 *))(v12 + 320))(v12 + 320, &v14);\n      v13 = v10[82];\n      if ( v13 || (v13 = v10[81]) != 0 )\n        (**(void (__fastcall ***)(__int64, __int16 *))(v13 + 320))(v13 + 320, &v14);\n    }\n  }\n}", "assembly": "; \n; EditorUI::updateEditButtonColor from 0x140202a20 to 0x140202bc0 (416 bytes)\n; \n; 5 xrefs:\n; > EditorUI::activateScaleControl @ 0x140202cce\n; > EditorUI::deactivateScaleControl @ 0x140202e5e\n; > EditorUI::showTransformControl @ 0x14020339c\n; > EditorUI::deactivateTransformControl @ 0x140203577\n; > <???> @ 0x14091af3c\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:14 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x140202a20\npush    rdi                                                            ; +0x5, 0x140202a25\nsub     rsp, 70h                                                       ; +0x6, 0x140202a26\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x140202a2a\nxor     rax, rsp                                                       ; +0x11, 0x140202a31\nmov     [rsp+78h+var_18], rax                                          ; +0x14, 0x140202a34\nmov     rdi, r8                                                        ; +0x19, 0x140202a39\nmov     rbx, rcx                                                       ; +0x1c, 0x140202a3c\ncmp     qword ptr [rcx+360h], 0                                        ; +0x1f, 0x140202a3f\njz      loc_140202BA5                                                  ; +0x27, 0x140202a47\nlea     rcx, word_1406ED6F8                                            ; +0x2d, 0x140202a4d\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x34, 0x140202a54\nmov     rcx, rax                                                       ; +0x3a, 0x140202a5a\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x3d, 0x140202a5d\nxorps   xmm0, xmm0                                                     ; +0x43, 0x140202a63\nmovups  xmmword ptr [rsp+78h+Block], xmm0                              ; +0x46, 0x140202a66\nxorps   xmm1, xmm1                                                     ; +0x4b, 0x140202a6b\nmovdqu  [rsp+78h+var_28], xmm1                                         ; +0x4e, 0x140202a6e\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x54, 0x140202a74\nnop     dword ptr [rax+rax+00h]                                        ; +0x5b, 0x140202a7b\ninc     r8                                                             ; +0x60, 0x140202a80\ncmp     byte ptr [rax+r8], 0                                           ; +0x63, 0x140202a83\njnz     short loc_140202A80                                            ; +0x68, 0x140202a88\nmov     rdx, rax                                                       ; +0x6a, 0x140202a8a\nlea     rcx, [rsp+78h+Block]                                           ; +0x6d, 0x140202a8d\ncall    sub_14003D230                                                  ; +0x72, 0x140202a92\nnop                                                                    ; +0x77, 0x140202a97\nlea     rdx, [rsp+78h+Block]                                           ; +0x78, 0x140202a98\nmov     rcx, [rbx+360h]                                                ; +0x7d, 0x140202a9d\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, 0x140202aa4\nmov     rbx, rax                                                       ; +0x8a, 0x140202aaa\nmov     rdx, qword ptr [rsp+78h+var_28+8]                              ; +0x8d, 0x140202aad\ncmp     rdx, 0Fh                                                       ; +0x92, 0x140202ab2\njbe     short loc_140202B03                                            ; +0x96, 0x140202ab6\ninc     rdx                                                            ; +0x98, 0x140202ab8\nmov     r8, [rsp+78h+Block]                                            ; +0x9b, 0x140202abb\nmov     rcx, r8                                                        ; +0xa0, 0x140202ac0\ncmp     rdx, 1000h                                                     ; +0xa3, 0x140202ac3\njb      short loc_140202AFB                                            ; +0xaa, 0x140202aca\nadd     rdx, 27h ; '''                                                 ; +0xac, 0x140202acc\nmov     r8, [r8-8]                                                     ; +0xb0, 0x140202ad0\nsub     rcx, r8                                                        ; +0xb4, 0x140202ad4\nsub     rcx, 8                                                         ; +0xb7, 0x140202ad7\ncmp     rcx, 1Fh                                                       ; +0xbb, 0x140202adb\njbe     short loc_140202AFB                                            ; +0xbf, 0x140202adf\nmov     [rsp+78h+Reserved], 0; Reserved                                ; +0xc1, 0x140202ae1\nxor     r9d, r9d; LineNo                                               ; +0xca, 0x140202aea\nxor     r8d, r8d; FileName                                             ; +0xcd, 0x140202aed\nxor     edx, edx; FunctionName                                         ; +0xd0, 0x140202af0\nxor     ecx, ecx; Expression                                           ; +0xd2, 0x140202af2\ncall    cs:_invoke_watson                                              ; +0xd4, 0x140202af4\ndb 0CCh                                                                ; +0xda, 0x140202afa\nmov     rcx, r8; Block                                                 ; +0xdb, 0x140202afb\ncall    j_j_free                                                       ; +0xde, 0x140202afe\nmovdqa  xmm0, cs:Size                                                  ; +0xe3, 0x140202b03\nmovdqu  [rsp+78h+var_28], xmm0                                         ; +0xeb, 0x140202b0b\nmov     byte ptr [rsp+78h+Block], 0                                    ; +0xf1, 0x140202b11\ntest    rbx, rbx                                                       ; +0xf6, 0x140202b16\njz      loc_140202BA5                                                  ; +0xf9, 0x140202b19\nmov     rax, [rbx]                                                     ; +0xff, 0x140202b1f\nmov     rcx, rbx                                                       ; +0x102, 0x140202b22\ncall    qword ptr [rax+3B8h]                                           ; +0x105, 0x140202b25\nmov     rbx, rax                                                       ; +0x10b, 0x140202b2b\nmovzx   ecx, word ptr [rdi]                                            ; +0x10e, 0x140202b2e\nmov     [rsp+78h+var_48], cx                                           ; +0x111, 0x140202b31\nmovzx   ecx, byte ptr [rdi+2]                                          ; +0x116, 0x140202b36\nmov     [rsp+78h+var_46], cl                                           ; +0x11a, 0x140202b3a\nmov     rcx, [rax+278h]                                                ; +0x11e, 0x140202b3e\ntest    rcx, rcx                                                       ; +0x125, 0x140202b45\njz      short loc_140202B5F                                            ; +0x128, 0x140202b48\nadd     rcx, 170h                                                      ; +0x12a, 0x140202b4a\nmov     rdx, [rcx]                                                     ; +0x131, 0x140202b51\nmov     r8, [rdx]                                                      ; +0x134, 0x140202b54\nlea     rdx, [rsp+78h+var_48]                                          ; +0x137, 0x140202b57\ncall    r8                                                             ; +0x13c, 0x140202b5c\nmov     rcx, [rbx+280h]                                                ; +0x13f, 0x140202b5f\ntest    rcx, rcx                                                       ; +0x146, 0x140202b66\njz      short loc_140202B7C                                            ; +0x149, 0x140202b69\nadd     rcx, 140h                                                      ; +0x14b, 0x140202b6b\nmov     rax, [rcx]                                                     ; +0x152, 0x140202b72\nlea     rdx, [rsp+78h+var_48]                                          ; +0x155, 0x140202b75\ncall    qword ptr [rax]                                                ; +0x15a, 0x140202b7a\nmov     rcx, [rbx+290h]                                                ; +0x15c, 0x140202b7c\ntest    rcx, rcx                                                       ; +0x163, 0x140202b83\njnz     short loc_140202B94                                            ; +0x166, 0x140202b86\nmov     rcx, [rbx+288h]                                                ; +0x168, 0x140202b88\ntest    rcx, rcx                                                       ; +0x16f, 0x140202b8f\njz      short loc_140202BA5                                            ; +0x172, 0x140202b92\nadd     rcx, 140h                                                      ; +0x174, 0x140202b94\nmov     rax, [rcx]                                                     ; +0x17b, 0x140202b9b\nlea     rdx, [rsp+78h+var_48]                                          ; +0x17e, 0x140202b9e\ncall    qword ptr [rax]                                                ; +0x183, 0x140202ba3\nmov     rcx, [rsp+78h+var_18]                                          ; +0x185, 0x140202ba5\nxor     rcx, rsp; StackCookie                                          ; +0x18a, 0x140202baa\ncall    __security_check_cookie                                        ; +0x18d, 0x140202bad\nmov     rbx, [rsp+78h+arg_18]                                          ; +0x192, 0x140202bb2\nadd     rsp, 70h                                                       ; +0x19a, 0x140202bba\npop     rdi                                                            ; +0x19e, 0x140202bbe\nretn                                                                   ; +0x19f, 0x140202bbf", "xrefs": ["EditorUI::activateScaleControl @ 0x140202cce", "EditorUI::deactivateScaleControl @ 0x140202e5e", "EditorUI::showTransformControl @ 0x14020339c", "EditorUI::deactivateTransformControl @ 0x140203577", "<???> @ 0x14091af3c"], "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"}