{"type": "func", "start": 3786940, "end": 3787160, "name": "EditorUI::activateRotationControl", "pseudocode": "// \n// EditorUI::activateRotationControl from 0x39c8bc to 0x39c998 (220 bytes)\n// \n// 4 xrefs:\n// > EditorUI::toggleSpecialEditButtons @ 0x39cac0\n// > EditorUI::moveObjectCall @ 0x39f85a\n// > EditorUI::undoLastAction @ 0x3a476c\n// > EditorUI::redoLastAction @ 0x3a47aa\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::activateRotationControl(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  int v3; // r2\n  bool v4; // r3\n  GJRotationControl *m_rotationControl; // r5\n  void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7\n  const cocos2d::CCPoint *v7; // r0\n  GJRotationControl *v8; // r5\n  void (__fastcall *setScale)(cocos2d::CCNode *__hidden, float); // r7\n  float v10; // r0\n  cocos2d::CCPoint v11; // [sp+4h] [bp-Ch] BYREF\n\n  LODWORD(v11.x) = a2;\n  if ( (cocos2d::CCArray::count(a1->m_selectedObjects) || a1->m_selectedObject)\n    && (!((int (__fastcall *)(GJRotationControl *))a1->m_rotationControl->isVisible)(a1->m_rotationControl)\n     || a1->m_canActivateControls) )\n  {\n    EditorUI::deactivateTransformControl(a1);\n    a1->m_canActivateControls = 0;\n    if ( cocos2d::CCArray::count(a1->m_selectedObjects) )\n    {\n      EditorUI::getGroupCenter(&v11, a1, a1->m_selectedObjects, 0);\n      cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_pivotPoint, COERCE_FLOAT(&v11), v3, v4);\n      a1->m_rotationControl->setPosition(a1->m_rotationControl, &a1->m_pivotPoint);\n    }\n    else\n    {\n      m_rotationControl = a1->m_rotationControl;\n      setPosition = m_rotationControl->setPosition;\n      v7 = a1->m_selectedObject->getPosition(a1->m_selectedObject);\n      setPosition(m_rotationControl, v7);\n    }\n    v8 = a1->m_rotationControl;\n    setScale = v8->setScale;\n    v10 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getScale)(a1->m_editorLayer->m_objectLayer));\n    ((void (__fastcall *)(GJRotationControl *, _DWORD))setScale)(v8, 1.0 / v10);\n    a1->m_rotationControl->setVisible(a1->m_rotationControl, 1);\n  }\n}", "assembly": "; \n; EditorUI::activateRotationControl from 0x39c8bc to 0x39c998 (220 bytes)\n; \n; 4 xrefs:\n; > EditorUI::toggleSpecialEditButtons @ 0x39cac0\n; > EditorUI::moveObjectCall @ 0x39f85a\n; > EditorUI::undoLastAction @ 0x3a476c\n; > EditorUI::redoLastAction @ 0x3a47aa\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\nPUSH.W          {R0-R8,LR}                                             ; +0x0, 0x39c8bc\nMOV             R4, R0                                                 ; +0x4, 0x39c8c0\nLDR             R6, =(__stack_chk_guard_ptr - 0x39C8CC)                ; +0x6, 0x39c8c2\nLDR.W           R0, [R0,#0x260]; this                                  ; +0x8, 0x39c8c4\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xc, 0x39c8c8\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xe, 0x39c8ca\nLDR             R3, [R6]                                               ; +0x10, 0x39c8cc\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x12, 0x39c8ce\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x14, 0x39c8d0\nCBNZ            R0, loc_39C8DE                                         ; +0x18, 0x39c8d4\nLDR.W           R3, [R4,#0x374]                                        ; +0x1a, 0x39c8d6\nCMP             R3, #0                                                 ; +0x1e, 0x39c8da\nBEQ             loc_39C986                                             ; +0x20, 0x39c8dc\nLDR.W           R0, [R4,#0x204]                                        ; +0x22, 0x39c8de\nLDR             R3, [R0]                                               ; +0x26, 0x39c8e2\nLDR.W           R3, [R3,#0xA8]                                         ; +0x28, 0x39c8e4\nBLX             R3                                                     ; +0x2c, 0x39c8e8\nCBZ             R0, loc_39C8F4                                         ; +0x2e, 0x39c8ea\nLDRB.W          R3, [R4,#0x210]                                        ; +0x30, 0x39c8ec\nCMP             R3, #0                                                 ; +0x34, 0x39c8f0\nBEQ             loc_39C986                                             ; +0x36, 0x39c8f2\nMOV             R0, R4; this                                           ; +0x38, 0x39c8f4\nMOVS            R7, #0                                                 ; +0x3a, 0x39c8f6\nBL              _ZN8EditorUI26deactivateTransformControlEv; EditorUI::deactivateTransformControl(void) ; +0x3c, 0x39c8f8\nSTRB.W          R7, [R4,#0x210]                                        ; +0x40, 0x39c8fc\nLDR.W           R0, [R4,#0x260]; this                                  ; +0x44, 0x39c900\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x48, 0x39c904\nCBZ             R0, loc_39C936                                         ; +0x4c, 0x39c908\nADD.W           R8, SP, #0x10+var_C                                    ; +0x4e, 0x39c90a\nADD.W           R5, R4, #0x208                                         ; +0x52, 0x39c90e\nMOV             R3, R7                                                 ; +0x56, 0x39c912\nMOV             R1, R4; cocos2d::CCArray *                             ; +0x58, 0x39c914\nMOV             R0, R8; this                                           ; +0x5a, 0x39c916\nLDR.W           R2, [R4,#0x260]; cocos2d::CCArray *                    ; +0x5c, 0x39c918\nBL              _ZN8EditorUI14getGroupCenterEPN7cocos2d7CCArrayEb; EditorUI::getGroupCenter(cocos2d::CCArray *,bool) ; +0x60, 0x39c91c\nMOV             R1, R8                                                 ; +0x64, 0x39c920\nMOV             R0, R5                                                 ; +0x66, 0x39c922\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x68, 0x39c924\nLDR.W           R0, [R4,#0x204]                                        ; +0x6c, 0x39c928\nMOV             R1, R5                                                 ; +0x70, 0x39c92c\nLDR             R3, [R0]                                               ; +0x72, 0x39c92e\nLDR             R3, [R3,#0x5C]                                         ; +0x74, 0x39c930\nBLX             R3                                                     ; +0x76, 0x39c932\nB               loc_39C94E                                             ; +0x78, 0x39c934\nLDR.W           R5, [R4,#0x204]                                        ; +0x7a, 0x39c936\nLDR.W           R0, [R4,#0x374]                                        ; +0x7e, 0x39c93a\nLDR             R3, [R5]                                               ; +0x82, 0x39c93e\nLDR             R7, [R3,#0x5C]                                         ; +0x84, 0x39c940\nLDR             R3, [R0]                                               ; +0x86, 0x39c942\nLDR             R3, [R3,#0x60]                                         ; +0x88, 0x39c944\nBLX             R3                                                     ; +0x8a, 0x39c946\nMOV             R1, R0                                                 ; +0x8c, 0x39c948\nMOV             R0, R5                                                 ; +0x8e, 0x39c94a\nBLX             R7                                                     ; +0x90, 0x39c94c\nLDR.W           R5, [R4,#0x204]                                        ; +0x92, 0x39c94e\nLDR             R3, [R5]                                               ; +0x96, 0x39c952\nLDR             R7, [R3,#0x50]                                         ; +0x98, 0x39c954\nLDR.W           R3, [R4,#0x340]                                        ; +0x9a, 0x39c956\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x9e, 0x39c95a\nLDR             R3, [R0]                                               ; +0xa2, 0x39c95e\nLDR             R3, [R3,#0x54]                                         ; +0xa4, 0x39c960\nBLX             R3                                                     ; +0xa6, 0x39c962\nVMOV.F32        S15, #1.0                                              ; +0xa8, 0x39c964\nVMOV            S14, R0                                                ; +0xac, 0x39c968\nMOV             R0, R5                                                 ; +0xb0, 0x39c96c\nVDIV.F32        S15, S15, S14                                          ; +0xb2, 0x39c96e\nVMOV            R1, S15                                                ; +0xb6, 0x39c972\nBLX             R7                                                     ; +0xba, 0x39c976\nLDR.W           R0, [R4,#0x204]                                        ; +0xbc, 0x39c978\nMOVS            R1, #1                                                 ; +0xc0, 0x39c97c\nLDR             R3, [R0]                                               ; +0xc2, 0x39c97e\nLDR.W           R3, [R3,#0xA4]                                         ; +0xc4, 0x39c980\nBLX             R3                                                     ; +0xc8, 0x39c984\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xca, 0x39c986\nLDR             R3, [R6]                                               ; +0xcc, 0x39c988\nCMP             R2, R3                                                 ; +0xce, 0x39c98a\nBEQ             loc_39C992                                             ; +0xd0, 0x39c98c\nBLX             __stack_chk_fail                                       ; +0xd2, 0x39c98e\nADD             SP, SP, #0x10                                          ; +0xd6, 0x39c992\nPOP.W           {R4-R8,PC}                                             ; +0xd8, 0x39c994", "xrefs": ["EditorUI::toggleSpecialEditButtons @ 0x39cac0", "EditorUI::moveObjectCall @ 0x39f85a", "EditorUI::undoLastAction @ 0x3a476c", "EditorUI::redoLastAction @ 0x3a47aa"], "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"}