{"type": "func", "start": 6856420, "end": 6856720, "name": "EditorUI::updateEditButtonColor", "pseudocode": "// \n// EditorUI::updateEditButtonColor from 0x689ee4 to 0x68a010 (300 bytes)\n// \n// 5 xrefs:\n// > EditorUI::deactivateScaleControl @ 0x6955b8\n// > EditorUI::deactivateTransformControl @ 0x6969f4\n// > EditorUI::activateScaleControl @ 0x6b4b44\n// > EditorUI::activateTransformControl @ 0x6b65b0\n// > <???> @ 0x50280\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// local variable allocation has failed, the output may be wrong!\nvoid EditorUI::updateEditButtonColor(EditorUI *a1, int a2, cocos2d::ccColor3B a3)\n{\n  cocos2d::CCDictionary *m_editButtonDict; // x21\n  cocos2d::CCString *v4; // x0\n  char *CString; // x0\n  __int64 v6; // x20\n  char *v7; // x0\n  ButtonSprite *v8; // x0\n  unsigned int *v9; // x2\n  int v10; // w1\n  int v11; // [xsp+38h] [xbp+38h]\n  std::string v12; // [xsp+50h] [xbp+50h] BYREF\n\n  v11 = *(_DWORD *)&a3.r;\n  m_editButtonDict = a1->m_editButtonDict;\n  if ( m_editButtonDict )\n  {\n    v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", *(const char **)&a2);\n    CString = (char *)cocos2d::CCString::getCString(v4);\n    sub_D153B8((int)&v12, CString);\n    v6 = cocos2d::CCDictionary::objectForKey(m_editButtonDict, &v12);\n    v7 = (char *)v12.m_data.m_data - 24;\n    if ( (__int64 *)v12.m_data.m_data - 3 != &qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v9 = (unsigned int *)((char *)v12.m_data.m_data - 8);\n        do\n          v10 = __ldaxr(v9);\n        while ( __stlxr(v10 - 1, v9) );\n      }\n      else\n      {\n        v10 = *((_DWORD *)v12.m_data.m_data - 2);\n        *((_DWORD *)v12.m_data.m_data - 2) = v10 - 1;\n      }\n      if ( v10 <= 0 )\n        operator delete(v7);\n    }\n    if ( v6 )\n    {\n      v8 = (ButtonSprite *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 1056LL))(v6);\n      ButtonSprite::setColor(v8, (cocos2d::ccColor3B)v11);\n    }\n  }\n}", "assembly": "; \n; EditorUI::updateEditButtonColor from 0x689ee4 to 0x68a010 (300 bytes)\n; \n; 5 xrefs:\n; > EditorUI::deactivateScaleControl @ 0x6955b8\n; > EditorUI::deactivateTransformControl @ 0x6969f4\n; > EditorUI::activateScaleControl @ 0x6b4b44\n; > EditorUI::activateTransformControl @ 0x6b65b0\n; > <???> @ 0x50280\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\nSTP             X29, X30, [SP,#var_60]!                                ; +0x0, 0x689ee4\nMOV             X29, SP                                                ; +0x4, 0x689ee8\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0x8, 0x689eec\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x689ef0\nSTR             X21, [SP,#0x60+var_40]                                 ; +0x10, 0x689ef4\nSTR             X2, [X29,#0x60+var_28]                                 ; +0x14, 0x689ef8\nLDR             X21, [X0,#0x2E8]                                       ; +0x18, 0x689efc\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x689f00\nLDR             X0, [X0]                                               ; +0x20, 0x689f04\nSTR             X0, [X29,#0x60+var_8]                                  ; +0x24, 0x689f08\nCBZ             X21, loc_689F78                                        ; +0x28, 0x689f0c\nADRP            X0, #(aSongidI+8)@PAGE; \"%i\"                           ; +0x2c, 0x689f10\nADD             X20, X29, #0x60+var_10                                 ; +0x30, 0x689f14\nADD             X0, X0, #(aSongidI+8)@PAGEOFF; this                    ; +0x34, 0x689f18\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x38, 0x689f1c\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x3c, 0x689f20\nMOV             X1, X0; char *                                         ; +0x40, 0x689f24\nADD             X2, X29, #0x60+var_20                                  ; +0x44, 0x689f28\nMOV             X0, X20; int                                           ; +0x48, 0x689f2c\nBL              sub_D153B8                                             ; +0x4c, 0x689f30\nMOV             X0, X21                                                ; +0x50, 0x689f34\nMOV             X1, X20                                                ; +0x54, 0x689f38\nBL              _ZN7cocos2d12CCDictionary12objectForKeyERKSs; cocos2d::CCDictionary::objectForKey(std::string const&) ; +0x58, 0x689f3c\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x5c, 0x689f40\nLDR             X2, [X29,#0x60+var_10]                                 ; +0x60, 0x689f44\nMOV             X20, X0                                                ; +0x64, 0x689f48\nSUB             X0, X2, #0x18; p                                       ; +0x68, 0x689f4c\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x6c, 0x689f50\nCMP             X0, X1                                                 ; +0x70, 0x689f54\nB.NE            loc_689F9C                                             ; +0x74, 0x689f58\nCBZ             X20, loc_689F78                                        ; +0x78, 0x689f5c\nLDR             X1, [X20]                                              ; +0x7c, 0x689f60\nMOV             X0, X20                                                ; +0x80, 0x689f64\nLDR             X1, [X1,#0x420]                                        ; +0x84, 0x689f68\nBLR             X1                                                     ; +0x88, 0x689f6c\nLDR             X1, [X29,#0x60+var_28]                                 ; +0x8c, 0x689f70\nBL              _ZN12ButtonSprite8setColorEN7cocos2d10_ccColor3BE; ButtonSprite::setColor(cocos2d::_ccColor3B) ; +0x90, 0x689f74\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x94, 0x689f78\nLDR             X1, [X29,#0x60+var_8]                                  ; +0x98, 0x689f7c\nLDR             X0, [X19]                                              ; +0x9c, 0x689f80\nCMP             X1, X0                                                 ; +0xa0, 0x689f84\nB.NE            loc_689FE0                                             ; +0xa4, 0x689f88\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0xa8, 0x689f8c\nLDR             X21, [SP,#0x60+var_40]                                 ; +0xac, 0x689f90\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0xb0, 0x689f94\nRET                                                                    ; +0xb4, 0x689f98\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xb8, 0x689f9c\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xbc, 0x689fa0\nCBZ             X1, loc_689FD0                                         ; +0xc0, 0x689fa4\nSUB             X2, X2, #8                                             ; +0xc4, 0x689fa8\nLDAXR           W1, [X2]                                               ; +0xc8, 0x689fac\nSUB             W3, W1, #1                                             ; +0xcc, 0x689fb0\nSTLXR           W4, W3, [X2]                                           ; +0xd0, 0x689fb4\nCBNZ            W4, loc_689FAC                                         ; +0xd4, 0x689fb8\nCMP             W1, WZR                                                ; +0xd8, 0x689fbc\nB.GT            loc_689F5C                                             ; +0xdc, 0x689fc0\nADD             X1, X29, #0x60+var_18                                  ; +0xe0, 0x689fc4\nBL              j__ZdlPv; operator delete(void *)                      ; +0xe4, 0x689fc8\nB               loc_689F5C                                             ; +0xe8, 0x689fcc\nLDUR            W1, [X2,#-8]                                           ; +0xec, 0x689fd0\nSUB             W3, W1, #1                                             ; +0xf0, 0x689fd4\nSTUR            W3, [X2,#-8]                                           ; +0xf4, 0x689fd8\nB               loc_689FBC                                             ; +0xf8, 0x689fdc\nBL              .__stack_chk_fail                                      ; +0xfc, 0x689fe0\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x100, 0x689fe4\nMOV             X19, X0                                                ; +0x104, 0x689fe8\nLDR             X0, [X29,#0x60+var_10]                                 ; +0x108, 0x689fec\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x10c, 0x689ff0\nSUB             X0, X0, #0x18                                          ; +0x110, 0x689ff4\nCMP             X0, X1                                                 ; +0x114, 0x689ff8\nB.EQ            loc_68A008                                             ; +0x118, 0x689ffc\nADD             X1, X29, #0x60+var_18                                  ; +0x11c, 0x68a000\nBL              sub_6865FC                                             ; +0x120, 0x68a004\nMOV             X0, X19                                                ; +0x124, 0x68a008\nBL              _Unwind_Resume                                         ; +0x128, 0x68a00c", "xrefs": ["EditorUI::deactivateScaleControl @ 0x6955b8", "EditorUI::deactivateTransformControl @ 0x6969f4", "EditorUI::activateScaleControl @ 0x6b4b44", "EditorUI::activateTransformControl @ 0x6b65b0", "<???> @ 0x50280"], "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"}