{"type": "func", "start": 7399376, "end": 7399624, "name": "EditorUI::updateEditButtonColor", "pseudocode": "// \n// EditorUI::updateEditButtonColor from 0x70e7d0 to 0x70e8c8 (248 bytes)\n// \n// 4 xrefs:\n// > EditorUI::deactivateScaleControl @ 0x70e944\n// > EditorUI::showTransformControl @ 0x70ea7c\n// > EditorUI::deactivateTransformControl @ 0x70eb72\n// > EditorUI::activateScaleControl @ 0x70eee0\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:57:42 +0000\n// \n\nvoid __fastcall EditorUI::updateEditButtonColor(int a1, const char *a2, int a3)\n{\n  int v3; // r7\n  cocos2d::CCString *v4; // r0\n  const char *CString; // r8\n  size_t v6; // r0\n  size_t v7; // r4\n  std::logic_error *exception; // r4\n  char *v9; // r3\n  unsigned int v10; // r0\n  char v11; // r6\n  int v12; // r4\n  _DWORD *v13; // r0\n  int v15; // [sp+8h] [bp-10h] BYREF\n  size_t v16; // [sp+Ch] [bp-Ch]\n  void *v17; // [sp+10h] [bp-8h]\n\n  v3 = *(_DWORD *)(a1 + 608);\n  if ( !v3 )\n    return;\n  v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", a2);\n  v15 = 0;\n  v16 = 0;\n  v17 = nullptr;\n  CString = (const char *)cocos2d::CCString::getCString(v4);\n  v6 = strlen(CString);\n  v7 = v6;\n  if ( v6 > 0xFFFFFFEF )\n  {\n    exception = (std::logic_error *)_cxa_allocate_exception(8u);\n    std::logic_error::logic_error(exception, \"basic_string\");\n    *(_DWORD *)exception = &off_D1546C;\n    _cxa_throw(\n      exception,\n      (struct type_info *)&`typeinfo for'std::length_error,\n      (void (*)(void *))std::length_error::~length_error);\n  }\n  if ( v6 > 0xA )\n  {\n    v10 = (v6 + 16) & 0xFFFFFFF0;\n    v15 = v10 | 1;\n    v16 = v7;\n    v9 = (char *)operator new(v10);\n    v17 = v9;\nLABEL_8:\n    v9 = (char *)memcpy(v9, CString, v7);\n    goto LABEL_9;\n  }\n  LOBYTE(v15) = 2 * v6;\n  v9 = (char *)&v15 + 1;\n  if ( v6 )\n    goto LABEL_8;\nLABEL_9:\n  v9[v7] = 0;\n  v11 = v15;\n  v12 = cocos2d::CCDictionary::objectForKey(v3, &v15);\n  if ( (v11 & 1) != 0 )\n    operator delete(v17);\n  if ( v12 )\n  {\n    v13 = (_DWORD *)(*(int (__fastcall **)(int))(*(_DWORD *)v12 + 536))(v12);\n    ButtonSprite::setColor(v13, a3);\n  }\n}", "assembly": "; \n; EditorUI::updateEditButtonColor from 0x70e7d0 to 0x70e8c8 (248 bytes)\n; \n; 4 xrefs:\n; > EditorUI::deactivateScaleControl @ 0x70e944\n; > EditorUI::showTransformControl @ 0x70ea7c\n; > EditorUI::deactivateTransformControl @ 0x70eb72\n; > EditorUI::activateScaleControl @ 0x70eee0\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:57:42 +0000\n; \nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x70e7d0\nSUB             SP, SP, #0x18                                          ; +0x4, 0x70e7d4\nLDR             R5, =(__stack_chk_guard_ptr - 0x70E7DE)                ; +0x6, 0x70e7d6\nSTR             R2, [SP,#0x18+var_14]                                  ; +0x8, 0x70e7d8\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xa, 0x70e7da\nLDR             R5, [R5]; __stack_chk_guard                            ; +0xc, 0x70e7dc\nLDR.W           R7, [R0,#0x260]                                        ; +0xe, 0x70e7de\nLDR             R3, [R5]                                               ; +0x12, 0x70e7e2\nSTR             R3, [SP,#0x18+var_4]                                   ; +0x14, 0x70e7e4\nCMP             R7, #0                                                 ; +0x16, 0x70e7e6\nBEQ             loc_70E8B6                                             ; +0x18, 0x70e7e8\nLDR             R0, =(aI - 0x70E7F0); \"%i\"                             ; +0x1a, 0x70e7ea\nADD             R0, PC; \"%i\"                                           ; +0x1c, 0x70e7ec\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x1e, 0x70e7ee\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x22, 0x70e7f2\nMOVS            R3, #0                                                 ; +0x26, 0x70e7f6\nSTR             R3, [SP,#0x18+var_10]                                  ; +0x28, 0x70e7f8\nSTR             R3, [SP,#0x18+var_C]                                   ; +0x2a, 0x70e7fa\nSTR             R3, [SP,#0x18+var_8]                                   ; +0x2c, 0x70e7fc\nMOV             R8, R0                                                 ; +0x2e, 0x70e7fe\nBLX             strlen                                                 ; +0x30, 0x70e800\nCMN.W           R0, #0x11                                              ; +0x34, 0x70e804\nMOV             R4, R0                                                 ; +0x38, 0x70e808\nBLS             loc_70E840                                             ; +0x3a, 0x70e80a\nMOVS            R0, #8; thrown_size                                    ; +0x3c, 0x70e80c\nBL              __cxa_allocate_exception                               ; +0x3e, 0x70e80e\nLDR             R1, =(aBasicString - 0x70E818); \"basic_string\"         ; +0x42, 0x70e812\nADD             R1, PC; \"basic_string\"                                 ; +0x44, 0x70e814\nMOV             R4, R0                                                 ; +0x46, 0x70e816\nBL              _ZNSt11logic_errorC2EPKc; std::logic_error::logic_error(char const*) ; +0x48, 0x70e818\nLDR             R3, =(_ZTVSt12length_error_ptr - 0x70E828)             ; +0x4c, 0x70e81c\nMOV             R0, R4; void *                                         ; +0x4e, 0x70e81e\nLDR             R1, =(_ZTISt12length_error_ptr - 0x70E82E)             ; +0x50, 0x70e820\nLDR             R2, =(_ZNSt12length_errorD1Ev_ptr - 0x70E834)          ; +0x52, 0x70e822\nADD             R3, PC; _ZTVSt12length_error_ptr                       ; +0x54, 0x70e824\nLDR             R3, [R3]; `vtable for'std::length_error ...            ; +0x56, 0x70e826\nADDS            R3, #8                                                 ; +0x58, 0x70e828\nADD             R1, PC; _ZTISt12length_error_ptr                       ; +0x5a, 0x70e82a\nLDR             R1, [R1]; lptinfo                                      ; +0x5c, 0x70e82c\nSTR             R3, [R4]                                               ; +0x5e, 0x70e82e\nADD             R2, PC; _ZNSt12length_errorD1Ev_ptr                    ; +0x60, 0x70e830\nLDR             R2, [R2]; std::length_error::~length_error() ; void (*)(void *) ; +0x62, 0x70e832\nBL              __cxa_throw                                            ; +0x64, 0x70e834\nMOV             R0, R4; void *                                         ; +0x68, 0x70e838\nBL              __cxa_free_exception                                   ; +0x6a, 0x70e83a\nB               loc_70E8B2                                             ; +0x6e, 0x70e83e\nCMP             R0, #0xA                                               ; +0x70, 0x70e840\nBHI             loc_70E852                                             ; +0x72, 0x70e842\nLSLS            R3, R0, #1                                             ; +0x74, 0x70e844\nSTRB.W          R3, [SP,#0x18+var_10]                                  ; +0x76, 0x70e846\nADD.W           R3, SP, #0x18+var_10+1                                 ; +0x7a, 0x70e84a\nCBZ             R0, loc_70E878                                         ; +0x7e, 0x70e84e\nB               loc_70E86C                                             ; +0x80, 0x70e850\nADD.W           R6, R0, #0x10                                          ; +0x82, 0x70e852\nBIC.W           R6, R6, #0xF                                           ; +0x86, 0x70e856\nMOV             R0, R6; unsigned int                                   ; +0x8a, 0x70e85a\nORR.W           R6, R6, #1                                             ; +0x8c, 0x70e85c\nBL              _Znwj; operator new(uint)                              ; +0x90, 0x70e860\nSTR             R6, [SP,#0x18+var_10]                                  ; +0x94, 0x70e864\nSTR             R4, [SP,#0x18+var_C]                                   ; +0x96, 0x70e866\nMOV             R3, R0                                                 ; +0x98, 0x70e868\nSTR             R0, [SP,#0x18+var_8]                                   ; +0x9a, 0x70e86a\nMOV             R0, R3; void *                                         ; +0x9c, 0x70e86c\nMOV             R1, R8; void *                                         ; +0x9e, 0x70e86e\nMOV             R2, R4; size_t                                         ; +0xa0, 0x70e870\nBLX             memcpy                                                 ; +0xa2, 0x70e872\nMOV             R3, R0                                                 ; +0xa6, 0x70e876\nMOVS            R2, #0                                                 ; +0xa8, 0x70e878\nMOV             R0, R7                                                 ; +0xaa, 0x70e87a\nSTRB            R2, [R3,R4]                                            ; +0xac, 0x70e87c\nADD             R1, SP, #0x18+var_10                                   ; +0xae, 0x70e87e\nLDRB.W          R6, [SP,#0x18+var_10]                                  ; +0xb0, 0x70e880\nBL              _ZN7cocos2d12CCDictionary12objectForKeyERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE; cocos2d::CCDictionary::objectForKey(std::string const&) ; +0xb4, 0x70e884\nLSLS            R2, R6, #0x1F                                          ; +0xb8, 0x70e888\nMOV             R4, R0                                                 ; +0xba, 0x70e88a\nBPL             loc_70E894                                             ; +0xbc, 0x70e88c\nLDR             R0, [SP,#0x18+var_8]; void *                           ; +0xbe, 0x70e88e\nBL              _ZdlPv; operator delete(void *)                        ; +0xc0, 0x70e890\nCBZ             R4, loc_70E8B6                                         ; +0xc4, 0x70e894\nLDR             R3, [R4]                                               ; +0xc6, 0x70e896\nMOV             R0, R4                                                 ; +0xc8, 0x70e898\nLDR.W           R3, [R3,#0x218]                                        ; +0xca, 0x70e89a\nBLX             R3                                                     ; +0xce, 0x70e89e\nLDR             R1, [SP,#0x18+var_14]                                  ; +0xd0, 0x70e8a0\nBL              _ZN12ButtonSprite8setColorEN7cocos2d10_ccColor3BE; ButtonSprite::setColor(cocos2d::_ccColor3B) ; +0xd2, 0x70e8a2\nB               loc_70E8B6                                             ; +0xd6, 0x70e8a6\nLSLS            R3, R6, #0x1F                                          ; +0xd8, 0x70e8a8\nBPL             loc_70E8B2                                             ; +0xda, 0x70e8aa\nLDR             R0, [SP,#0x18+var_8]; void *                           ; +0xdc, 0x70e8ac\nBL              _ZdlPv; operator delete(void *)                        ; +0xde, 0x70e8ae\nBL              __cxa_end_cleanup                                      ; +0xe2, 0x70e8b2\nLDR             R2, [SP,#0x18+var_4]                                   ; +0xe6, 0x70e8b6\nLDR             R3, [R5]                                               ; +0xe8, 0x70e8b8\nCMP             R2, R3                                                 ; +0xea, 0x70e8ba\nBEQ             loc_70E8C2                                             ; +0xec, 0x70e8bc\nBLX             __stack_chk_fail                                       ; +0xee, 0x70e8be\nADD             SP, SP, #0x18                                          ; +0xf2, 0x70e8c2\nPOP.W           {R4-R8,PC}                                             ; +0xf4, 0x70e8c4", "xrefs": ["EditorUI::deactivateScaleControl @ 0x70e944", "EditorUI::showTransformControl @ 0x70ea7c", "EditorUI::deactivateTransformControl @ 0x70eb72", "EditorUI::activateScaleControl @ 0x70eee0"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}