{"type": "func", "start": 12593008, "end": 12593564, "name": "EditorUI::activateScaleControl", "pseudocode": "// \n// EditorUI::activateScaleControl from 0xc02770 to 0xc0299c (556 bytes)\n// \n// 5 xrefs:\n// > EditorUI::handleEditorAction @ 0xbd7dcc\n// > <???> @ 0x5d088\n// > EditorUI::createMoveMenu @ 0xbe1630\n// > EditorUI::createMoveMenu @ 0xbe16f0\n// > <???> @ 0x15422a8\n// \n// This function is hookable on this platform (idp: arm, 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 13:03:49 +0000\n// \n\n__int64 __fastcall EditorUI::activateScaleControl(cocos2d::CCArray **this, cocos2d::CCObject *a2)\n{\n  EditorSFXManager *v4; // x0\n  EditorSFXManager *v5; // x0\n  int v6; // w23\n  int v7; // w22\n  unsigned int v9; // w0\n  __int64 v10; // x0\n  __n128 v11; // q0\n  __int64 v12; // x24\n  __int64 v13; // x21\n  void (__fastcall *v14)(__int64, __int64 *); // x24\n  __int64 v15; // x21\n  void (__fastcall *v16)(__int64, float); // x22\n  float v17; // s0\n  _BYTE v18[8]; // [xsp+58h] [xbp+58h] BYREF\n  __int64 v19; // [xsp+60h] [xbp+60h] BYREF\n\n  v4 = (EditorSFXManager *)cocos2d::CCArray::count(*(this + 112));\n  if ( (_DWORD)v4 || (v4 = *(this + 187)) != nullptr )\n  {\n    v5 = (EditorSFXManager *)EditorSFXManager::sharedState(v4);\n    EditorSFXManager::playAction(v5, 189);\n    EditorUI::deactivateTransformControl((EditorUI *)this);\n    if ( !(*(unsigned __int8 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 98) + 352LL))(*(this + 98))\n      || (v6 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2),\n          v7 = *((_DWORD *)*(this + 98) + 148),\n          EditorUI::deactivateScaleControl((EditorUI *)this),\n          v6 != v7) )\n    {\n      if ( !(*(unsigned __int8 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 98) + 352LL))(*(this + 98))\n        || *((_BYTE *)this + 776) )\n      {\n        v9 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);\n        EditorUI::updateEditButtonColor((__int64)this, (const char *)v9, 10921638);\n        *((_BYTE *)this + 776) = 0;\n        if ( (unsigned int)cocos2d::CCArray::count(*(this + 112)) )\n        {\n          EditorUI::getGroupCenter((cocos2d::CCPoint *)&v19, *(this + 112), 0);\n          v11 = cocos2d::CCPoint::operator=(this + 96, &v19);\n        }\n        else\n        {\n          v10 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 187) + 192LL))(*(this + 187));\n          v11 = cocos2d::CCPoint::operator=(this + 96, v10);\n        }\n        v12 = (__int64)*(this + 98);\n        *(_DWORD *)(v12 + 592) = (*(__int64 (__fastcall **)(cocos2d::CCObject *, long double))(*(_QWORD *)a2 + 64LL))(\n                                   a2,\n                                   *(long double *)&v11);\n        v13 = (__int64)*(this + 98);\n        v14 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v13 + 184LL);\n        cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 0.0, 40.0);\n        cocos2d::CCPoint::operator+(&v19, this + 96);\n        v14(v13, &v19);\n        v15 = (__int64)*(this + 98);\n        v16 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 160LL);\n        v17 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)*(this + 180) + 490) + 168LL))(*((_QWORD *)*(this + 180)\n                                                                                             + 490));\n        v16(v15, 1.0 / v17);\n        (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 98) + 344LL))(*(this + 98), 1);\n        (*((void (__fastcall **)(cocos2d::CCArray **))*this + 169))(this);\n      }\n    }\n  }\n  return _stack_chk_guard;\n}", "assembly": "; \n; EditorUI::activateScaleControl from 0xc02770 to 0xc0299c (556 bytes)\n; \n; 5 xrefs:\n; > EditorUI::handleEditorAction @ 0xbd7dcc\n; > <???> @ 0x5d088\n; > EditorUI::createMoveMenu @ 0xbe1630\n; > EditorUI::createMoveMenu @ 0xbe16f0\n; > <???> @ 0x15422a8\n; \n; This function is hookable on this platform (idp: arm, 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 13:03:49 +0000\n; \nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0xc02770\nMOV             X29, SP                                                ; +0x4, 0xc02774\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x8, 0xc02778\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0xc0277c\nMOV             X19, X0                                                ; +0x10, 0xc02780\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x14, 0xc02784\nMOV             X21, X1                                                ; +0x18, 0xc02788\nLDR             X1, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0xc0278c\nSTP             X23, X24, [SP,#0x70+var_40]                            ; +0x20, 0xc02790\nLDR             X1, [X1]                                               ; +0x24, 0xc02794\nLDR             X0, [X0,#0x380]; this                                  ; +0x28, 0xc02798\nSTR             X1, [X29,#0x70+var_8]                                  ; +0x2c, 0xc0279c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x30, 0xc027a0\nCBNZ            W0, loc_C027B0                                         ; +0x34, 0xc027a4\nLDR             X0, [X19,#0x5D8]; this                                 ; +0x38, 0xc027a8\nCBZ             X0, loc_C02830                                         ; +0x3c, 0xc027ac\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x40, 0xc027b0\nMOV             W1, #0xBD; int                                         ; +0x44, 0xc027b4\nBL              _ZN16EditorSFXManager10playActionEi; EditorSFXManager::playAction(int) ; +0x48, 0xc027b8\nMOV             X0, X19; this                                          ; +0x4c, 0xc027bc\nBL              _ZN8EditorUI26deactivateTransformControlEv; EditorUI::deactivateTransformControl(void) ; +0x50, 0xc027c0\nLDR             X1, [X19,#0x310]                                       ; +0x54, 0xc027c4\nMOV             X0, X1                                                 ; +0x58, 0xc027c8\nLDR             X1, [X1]                                               ; +0x5c, 0xc027cc\nLDR             X1, [X1,#0x160]                                        ; +0x60, 0xc027d0\nBLR             X1                                                     ; +0x64, 0xc027d4\nUXTB            W0, W0                                                 ; +0x68, 0xc027d8\nCBZ             W0, loc_C0280C                                         ; +0x6c, 0xc027dc\nLDR             X1, [X21]                                              ; +0x70, 0xc027e0\nMOV             X0, X21                                                ; +0x74, 0xc027e4\nLDR             X1, [X1,#0x40]                                         ; +0x78, 0xc027e8\nBLR             X1                                                     ; +0x7c, 0xc027ec\nMOV             W23, W0                                                ; +0x80, 0xc027f0\nLDR             X1, [X19,#0x310]                                       ; +0x84, 0xc027f4\nMOV             X0, X19; this                                          ; +0x88, 0xc027f8\nLDR             W22, [X1,#0x250]                                       ; +0x8c, 0xc027fc\nBL              _ZN8EditorUI22deactivateScaleControlEv; EditorUI::deactivateScaleControl(void) ; +0x90, 0xc02800\nCMP             W23, W22                                               ; +0x94, 0xc02804\nB.EQ            loc_C02830                                             ; +0x98, 0xc02808\nLDR             X1, [X19,#0x310]                                       ; +0x9c, 0xc0280c\nMOV             X0, X1                                                 ; +0xa0, 0xc02810\nLDR             X1, [X1]                                               ; +0xa4, 0xc02814\nLDR             X1, [X1,#0x160]                                        ; +0xa8, 0xc02818\nBLR             X1                                                     ; +0xac, 0xc0281c\nUXTB            W0, W0                                                 ; +0xb0, 0xc02820\nCBZ             W0, loc_C02858                                         ; +0xb4, 0xc02824\nLDRB            W0, [X19,#0x308]                                       ; +0xb8, 0xc02828\nCBNZ            W0, loc_C02858                                         ; +0xbc, 0xc0282c\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xc0, 0xc02830\nLDR             X1, [X29,#0x70+var_8]                                  ; +0xc4, 0xc02834\nLDR             X0, [X20]                                              ; +0xc8, 0xc02838\nCMP             X1, X0                                                 ; +0xcc, 0xc0283c\nB.NE            loc_C02998                                             ; +0xd0, 0xc02840\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0xd4, 0xc02844\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0xd8, 0xc02848\nLDP             X23, X24, [SP,#0x70+var_40]                            ; +0xdc, 0xc0284c\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0xe0, 0xc02850\nRET                                                                    ; +0xe4, 0xc02854\nLDR             X1, [X21]                                              ; +0xe8, 0xc02858\nMOV             X0, X21                                                ; +0xec, 0xc0285c\nLDR             X1, [X1,#0x40]                                         ; +0xf0, 0xc02860\nBLR             X1                                                     ; +0xf4, 0xc02864\nMOV             W1, W0                                                 ; +0xf8, 0xc02868\nADRP            X2, #qword_119AAA8@PAGE                                ; +0xfc, 0xc0286c\nMOV             X0, X19                                                ; +0x100, 0xc02870\nLDR             X2, [X2,#qword_119AAA8@PAGEOFF]                        ; +0x104, 0xc02874\nBL              _ZN8EditorUI21updateEditButtonColorEiN7cocos2d10_ccColor3BE; EditorUI::updateEditButtonColor(int,cocos2d::_ccColor3B) ; +0x108, 0xc02878\nSTRB            WZR, [X19,#0x308]                                      ; +0x10c, 0xc0287c\nLDR             X0, [X19,#0x380]; this                                 ; +0x110, 0xc02880\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x114, 0xc02884\nCBNZ            W0, loc_C0296C                                         ; +0x118, 0xc02888\nLDR             X1, [X19,#0x5D8]                                       ; +0x11c, 0xc0288c\nADD             X23, X19, #0x300                                       ; +0x120, 0xc02890\nADD             X22, X29, #0x70+var_10                                 ; +0x124, 0xc02894\nMOV             X0, X1                                                 ; +0x128, 0xc02898\nLDR             X1, [X1]                                               ; +0x12c, 0xc0289c\nLDR             X1, [X1,#0xC0]                                         ; +0x130, 0xc028a0\nBLR             X1                                                     ; +0x134, 0xc028a4\nMOV             X1, X0                                                 ; +0x138, 0xc028a8\nMOV             X0, X23                                                ; +0x13c, 0xc028ac\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x140, 0xc028b0\nLDR             X1, [X21]                                              ; +0x144, 0xc028b4\nMOV             X0, X21                                                ; +0x148, 0xc028b8\nLDR             X24, [X19,#0x310]                                      ; +0x14c, 0xc028bc\nADD             X21, X29, #0x70+var_18                                 ; +0x150, 0xc028c0\nLDR             X1, [X1,#0x40]                                         ; +0x154, 0xc028c4\nBLR             X1                                                     ; +0x158, 0xc028c8\nSTR             W0, [X24,#0x250]                                       ; +0x15c, 0xc028cc\nSTR             X21, [X29,#0x70+var_28]                                ; +0x160, 0xc028d0\nMOV             X0, X21; this                                          ; +0x164, 0xc028d4\nLDR             X21, [X19,#0x310]                                      ; +0x168, 0xc028d8\nLDR             S1, flt_C0299C; float                                  ; +0x16c, 0xc028dc\nFMOV            S0, WZR; float                                         ; +0x170, 0xc028e0\nLDR             X2, [X21]                                              ; +0x174, 0xc028e4\nLDR             X24, [X2,#0xB8]                                        ; +0x178, 0xc028e8\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x17c, 0xc028ec\nLDR             X1, [X29,#0x70+var_28]                                 ; +0x180, 0xc028f0\nMOV             X8, X22                                                ; +0x184, 0xc028f4\nMOV             X0, X23                                                ; +0x188, 0xc028f8\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x18c, 0xc028fc\nMOV             X0, X21                                                ; +0x190, 0xc02900\nMOV             X1, X22                                                ; +0x194, 0xc02904\nBLR             X24                                                    ; +0x198, 0xc02908\nLDR             X21, [X19,#0x310]                                      ; +0x19c, 0xc0290c\nLDR             X0, [X19,#0x5A0]                                       ; +0x1a0, 0xc02910\nLDR             X2, [X21]                                              ; +0x1a4, 0xc02914\nLDR             X1, [X0,#0xF50]                                        ; +0x1a8, 0xc02918\nMOV             X0, X1                                                 ; +0x1ac, 0xc0291c\nLDR             X22, [X2,#0xA0]                                        ; +0x1b0, 0xc02920\nLDR             X1, [X1]                                               ; +0x1b4, 0xc02924\nLDR             X1, [X1,#0xA8]                                         ; +0x1b8, 0xc02928\nBLR             X1                                                     ; +0x1bc, 0xc0292c\nFMOV            S1, #1.0                                               ; +0x1c0, 0xc02930\nMOV             X0, X21                                                ; +0x1c4, 0xc02934\nFDIV            S0, S1, S0                                             ; +0x1c8, 0xc02938\nBLR             X22                                                    ; +0x1cc, 0xc0293c\nLDR             X2, [X19,#0x310]                                       ; +0x1d0, 0xc02940\nMOV             W1, #1                                                 ; +0x1d4, 0xc02944\nMOV             X0, X2                                                 ; +0x1d8, 0xc02948\nLDR             X2, [X2]                                               ; +0x1dc, 0xc0294c\nLDR             X2, [X2,#0x158]                                        ; +0x1e0, 0xc02950\nBLR             X2                                                     ; +0x1e4, 0xc02954\nLDR             X1, [X19]                                              ; +0x1e8, 0xc02958\nMOV             X0, X19                                                ; +0x1ec, 0xc0295c\nLDR             X1, [X1,#0x548]                                        ; +0x1f0, 0xc02960\nBLR             X1                                                     ; +0x1f4, 0xc02964\nB               loc_C02830                                             ; +0x1f8, 0xc02968\nADD             X22, X29, #0x70+var_10                                 ; +0x1fc, 0xc0296c\nLDR             X1, [X19,#0x380]; cocos2d::CCArray *                   ; +0x200, 0xc02970\nMOV             X0, X19; this                                          ; +0x204, 0xc02974\nMOV             X8, X22                                                ; +0x208, 0xc02978\nMOV             W2, #0; bool                                           ; +0x20c, 0xc0297c\nADD             X23, X19, #0x300                                       ; +0x210, 0xc02980\nBL              _ZN8EditorUI14getGroupCenterEPN7cocos2d7CCArrayEb; EditorUI::getGroupCenter(cocos2d::CCArray *,bool) ; +0x214, 0xc02984\nMOV             X0, X23                                                ; +0x218, 0xc02988\nMOV             X1, X22                                                ; +0x21c, 0xc0298c\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x220, 0xc02990\nB               loc_C028B4                                             ; +0x224, 0xc02994\nBL              .__stack_chk_fail                                      ; +0x228, 0xc02998", "xrefs": ["EditorUI::handleEditorAction @ 0xbd7dcc", "<???> @ 0x5d088", "EditorUI::createMoveMenu @ 0xbe1630", "EditorUI::createMoveMenu @ 0xbe16f0", "<???> @ 0x15422a8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}