{"type": "func", "start": 7038228, "end": 7038696, "name": "EditorUI::activateTransformControl", "pseudocode": "// \n// EditorUI::activateTransformControl from 0x6b6514 to 0x6b66e8 (468 bytes)\n// \n// 4 xrefs:\n// > EditorUI::keyDown @ 0x6c5cd0\n// > <???> @ 0x968e8\n// > EditorUI::createMoveMenu @ 0x68b760\n// > <???> @ 0x122d230\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\nvoid EditorUI::activateTransformControl(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  cocos2d::CCPoint *p_m_pivotPoint; // x22\n  GJTransformControl *m_transformControl; // x23\n  float v5; // s0\n  GJTransformControl *v6; // x19\n  __int64 v7; // x0\n  float v8; // s0\n  float v9; // s1\n  __int64 v10; // [xsp+40h] [xbp+40h] BYREF\n  cocos2d::CCPoint GroupCenter; // 0:kr00_8.8\n  cocos2d::CCPoint v12; // 0:s0.4,4:s1.4\n\n  if ( (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) || a1->m_selectedObject )\n  {\n    EditorUI::deactivateScaleControl(a1);\n    EditorUI::deactivateRotationControl(a1);\n    if ( a1->m_transformControl->isVisible(a1->m_transformControl) )\n    {\n      EditorUI::deactivateTransformControl(a1);\n    }\n    else if ( !a1->m_transformControl->isVisible(a1->m_transformControl) || a1->m_canActivateControls )\n    {\n      a1->m_transformState.m_transformReset = 1;\n      EditorUI::updateEditButtonColor(a1, 31, (cocos2d::ccColor3B)-5855578);\n      a1->m_canActivateControls = 0;\n      p_m_pivotPoint = &a1->m_pivotPoint;\n      if ( (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) )\n      {\n        GroupCenter = EditorUI::getGroupCenter(a1, a1->m_selectedObjects, 0);\n        cocos2d::CCPoint::operator=(&a1->m_pivotPoint, GroupCenter.x, GroupCenter.y);\n      }\n      else\n      {\n        v8 = ((float (__fastcall *)(GameObject *))a1->m_selectedObject->getPosition)(a1->m_selectedObject);\n        cocos2d::CCPoint::operator=(&a1->m_pivotPoint, v8, v9);\n      }\n      a1->m_transformControl->setPosition(a1->m_transformControl, p_m_pivotPoint);\n      m_transformControl = a1->m_transformControl;\n      v5 = a1->m_editorLayer->m_objectLayer->getScale(a1->m_editorLayer->m_objectLayer);\n      GJTransformControl::scaleButtons(m_transformControl, 1.0 / v5);\n      a1->m_transformControl->setVisible(a1->m_transformControl, 1);\n      v6 = a1->m_transformControl;\n      v7 = (__int64)v6->getPosition(v6);\n      cocos2d::CCPoint::operator-(&v10, p_m_pivotPoint, v7);\n      GJTransformControl::updateAnchorSprite(v6, v12);\n    }\n  }\n}", "assembly": "; \n; EditorUI::activateTransformControl from 0x6b6514 to 0x6b66e8 (468 bytes)\n; \n; 4 xrefs:\n; > EditorUI::keyDown @ 0x6c5cd0\n; > <???> @ 0x968e8\n; > EditorUI::createMoveMenu @ 0x68b760\n; > <???> @ 0x122d230\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_50]!                                ; +0x0, 0x6b6514\nMOV             X29, SP                                                ; +0x4, 0x6b6518\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x6b651c\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x6b6520\nMOV             X19, X0                                                ; +0x10, 0x6b6524\nLDR             X0, [X0,#0x338]; this                                  ; +0x14, 0x6b6528\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x18, 0x6b652c\nLDR             X1, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x6b6530\nSTR             X23, [SP,#0x50+var_20]                                 ; +0x20, 0x6b6534\nLDR             X1, [X1]                                               ; +0x24, 0x6b6538\nSTR             X1, [X29,#0x50+var_8]                                  ; +0x28, 0x6b653c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2c, 0x6b6540\nCBNZ            W0, loc_6B6550                                         ; +0x30, 0x6b6544\nLDR             X0, [X19,#0x530]                                       ; +0x34, 0x6b6548\nCBZ             X0, loc_6B6678                                         ; +0x38, 0x6b654c\nMOV             X0, X19; this                                          ; +0x3c, 0x6b6550\nBL              _ZN8EditorUI22deactivateScaleControlEv; EditorUI::deactivateScaleControl(void) ; +0x40, 0x6b6554\nMOV             X0, X19; this                                          ; +0x44, 0x6b6558\nBL              _ZN8EditorUI25deactivateRotationControlEv; EditorUI::deactivateRotationControl(void) ; +0x48, 0x6b655c\nLDR             X1, [X19,#0x2D0]                                       ; +0x4c, 0x6b6560\nMOV             X0, X1                                                 ; +0x50, 0x6b6564\nLDR             X1, [X1]                                               ; +0x54, 0x6b6568\nLDR             X1, [X1,#0x150]                                        ; +0x58, 0x6b656c\nBLR             X1                                                     ; +0x5c, 0x6b6570\nUXTB            W0, W0                                                 ; +0x60, 0x6b6574\nCBNZ            W0, loc_6B66AC                                         ; +0x64, 0x6b6578\nLDR             X1, [X19,#0x2D0]                                       ; +0x68, 0x6b657c\nMOV             X0, X1                                                 ; +0x6c, 0x6b6580\nLDR             X1, [X1]                                               ; +0x70, 0x6b6584\nLDR             X1, [X1,#0x150]                                        ; +0x74, 0x6b6588\nBLR             X1                                                     ; +0x78, 0x6b658c\nUXTB            W0, W0                                                 ; +0x7c, 0x6b6590\nCBNZ            W0, loc_6B66A0                                         ; +0x80, 0x6b6594\nMOV             W2, #1                                                 ; +0x84, 0x6b6598\nSTRB            W2, [X19,#0x224]                                       ; +0x88, 0x6b659c\nADRP            X2, #qword_EC62F0@PAGE                                 ; +0x8c, 0x6b65a0\nMOV             X0, X19                                                ; +0x90, 0x6b65a4\nMOV             W1, #0x1F                                              ; +0x94, 0x6b65a8\nLDR             X2, [X2,#qword_EC62F0@PAGEOFF]                         ; +0x98, 0x6b65ac\nBL              _ZN8EditorUI21updateEditButtonColorEiN7cocos2d10_ccColor3BE; EditorUI::updateEditButtonColor(int,cocos2d::_ccColor3B) ; +0x9c, 0x6b65b0\nSTRB            WZR, [X19,#0x2C0]                                      ; +0xa0, 0x6b65b4\nLDR             X0, [X19,#0x338]; this                                 ; +0xa4, 0x6b65b8\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xa8, 0x6b65bc\nCBZ             W0, loc_6B66B8                                         ; +0xac, 0x6b65c0\nADD             X21, X29, #0x50+var_10                                 ; +0xb0, 0x6b65c4\nLDR             X1, [X19,#0x338]; cocos2d::CCArray *                   ; +0xb4, 0x6b65c8\nMOV             X0, X19; this                                          ; +0xb8, 0x6b65cc\nMOV             X8, X21                                                ; +0xbc, 0x6b65d0\nMOV             W2, #0; bool                                           ; +0xc0, 0x6b65d4\nADD             X22, X19, #0x2B8                                       ; +0xc4, 0x6b65d8\nBL              _ZN8EditorUI14getGroupCenterEPN7cocos2d7CCArrayEb; EditorUI::getGroupCenter(cocos2d::CCArray *,bool) ; +0xc8, 0x6b65dc\nMOV             X0, X22                                                ; +0xcc, 0x6b65e0\nMOV             X1, X21                                                ; +0xd0, 0x6b65e4\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xd4, 0x6b65e8\nLDR             X2, [X19,#0x2D0]                                       ; +0xd8, 0x6b65ec\nMOV             X1, X22                                                ; +0xdc, 0x6b65f0\nMOV             X0, X2                                                 ; +0xe0, 0x6b65f4\nLDR             X2, [X2]                                               ; +0xe4, 0x6b65f8\nLDR             X2, [X2,#0xB8]                                         ; +0xe8, 0x6b65fc\nBLR             X2                                                     ; +0xec, 0x6b6600\nLDR             X23, [X19,#0x2D0]                                      ; +0xf0, 0x6b6604\nLDR             X0, [X19,#0x4F8]                                       ; +0xf4, 0x6b6608\nLDR             X1, [X0,#0x1030]                                       ; +0xf8, 0x6b660c\nMOV             X0, X1                                                 ; +0xfc, 0x6b6610\nLDR             X1, [X1]                                               ; +0x100, 0x6b6614\nLDR             X1, [X1,#0xA8]                                         ; +0x104, 0x6b6618\nBLR             X1                                                     ; +0x108, 0x6b661c\nFMOV            S1, #1.0                                               ; +0x10c, 0x6b6620\nMOV             X0, X23; this                                          ; +0x110, 0x6b6624\nFDIV            S0, S1, S0; float                                      ; +0x114, 0x6b6628\nBL              _ZN18GJTransformControl12scaleButtonsEf; GJTransformControl::scaleButtons(float) ; +0x118, 0x6b662c\nLDR             X2, [X19,#0x2D0]                                       ; +0x11c, 0x6b6630\nMOV             W1, #1                                                 ; +0x120, 0x6b6634\nMOV             X0, X2                                                 ; +0x124, 0x6b6638\nLDR             X2, [X2]                                               ; +0x128, 0x6b663c\nLDR             X2, [X2,#0x148]                                        ; +0x12c, 0x6b6640\nBLR             X2                                                     ; +0x130, 0x6b6644\nLDR             X19, [X19,#0x2D0]                                      ; +0x134, 0x6b6648\nMOV             X0, X19                                                ; +0x138, 0x6b664c\nLDR             X1, [X19]                                              ; +0x13c, 0x6b6650\nLDR             X1, [X1,#0xC0]                                         ; +0x140, 0x6b6654\nBLR             X1                                                     ; +0x144, 0x6b6658\nMOV             X1, X0                                                 ; +0x148, 0x6b665c\nMOV             X8, X21                                                ; +0x14c, 0x6b6660\nMOV             X0, X22                                                ; +0x150, 0x6b6664\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0x154, 0x6b6668\nMOV             X0, X19                                                ; +0x158, 0x6b666c\nMOV             X1, X21                                                ; +0x15c, 0x6b6670\nBL              _ZN18GJTransformControl18updateAnchorSpriteEN7cocos2d7CCPointE; GJTransformControl::updateAnchorSprite(cocos2d::CCPoint) ; +0x160, 0x6b6674\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x164, 0x6b6678\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x168, 0x6b667c\nLDR             X0, [X20]                                              ; +0x16c, 0x6b6680\nCMP             X1, X0                                                 ; +0x170, 0x6b6684\nB.NE            loc_6B66E4                                             ; +0x174, 0x6b6688\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x178, 0x6b668c\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0x17c, 0x6b6690\nLDR             X23, [SP,#0x50+var_20]                                 ; +0x180, 0x6b6694\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x184, 0x6b6698\nRET                                                                    ; +0x188, 0x6b669c\nLDRB            W0, [X19,#0x2C0]                                       ; +0x18c, 0x6b66a0\nCBNZ            W0, loc_6B6598                                         ; +0x190, 0x6b66a4\nB               loc_6B6678                                             ; +0x194, 0x6b66a8\nMOV             X0, X19; this                                          ; +0x198, 0x6b66ac\nBL              _ZN8EditorUI26deactivateTransformControlEv; EditorUI::deactivateTransformControl(void) ; +0x19c, 0x6b66b0\nB               loc_6B6678                                             ; +0x1a0, 0x6b66b4\nLDR             X1, [X19,#0x530]                                       ; +0x1a4, 0x6b66b8\nADD             X22, X19, #0x2B8                                       ; +0x1a8, 0x6b66bc\nADD             X21, X29, #0x50+var_10                                 ; +0x1ac, 0x6b66c0\nMOV             X0, X1                                                 ; +0x1b0, 0x6b66c4\nLDR             X1, [X1]                                               ; +0x1b4, 0x6b66c8\nLDR             X1, [X1,#0xC0]                                         ; +0x1b8, 0x6b66cc\nBLR             X1                                                     ; +0x1bc, 0x6b66d0\nMOV             X1, X0                                                 ; +0x1c0, 0x6b66d4\nMOV             X0, X22                                                ; +0x1c4, 0x6b66d8\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x1c8, 0x6b66dc\nB               loc_6B65EC                                             ; +0x1cc, 0x6b66e0\nBL              .__stack_chk_fail                                      ; +0x1d0, 0x6b66e4", "xrefs": ["EditorUI::keyDown @ 0x6c5cd0", "<???> @ 0x968e8", "EditorUI::createMoveMenu @ 0x68b760", "<???> @ 0x122d230"], "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"}