{"type": "func", "start": 4295218608, "end": 4295218994, "name": "EditorUI::activateRotationControl", "pseudocode": "// \n// EditorUI::activateRotationControl from 0x10003d5b0 to 0x10003d732 (386 bytes)\n// \n// 6 xrefs:\n// > EditorUI::undoLastAction @ 0x10000c0cb\n// > EditorUI::redoLastAction @ 0x10000c12b\n// > EditorUI::toggleSpecialEditButtons @ 0x10002d8d7\n// > EditorUI::moveObjectCall_1 @ 0x10004a5fb\n// > EditorUI::keyDown @ 0x100050850\n// > EditorUI::createMoveMenu @ 0x10004778e\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 __fastcall EditorUI::activateRotationControl(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  __int64 v2; // rax\n  GJTransformControl *m_transformControl; // rax\n  GJTransformControlDelegate *m_delegate; // rdi\n  double v6; // xmm0_8\n  GJRotationControl *m_rotationControl; // r14\n  __int64 v8; // rax\n  GJRotationControl *v9; // r14\n  double v10; // xmm1_8\n  _QWORD v11[4]; // [rsp+0h] [rbp-20h] BYREF\n\n  v11[0] = v2;\n  if ( ((unsigned int)sub_100720070(a1->m_selectedObjects) || a1->m_selectedObject)\n    && (!((unsigned __int8 (__fastcall *)(GJRotationControl *, cocos2d::CCObject *))a1->m_rotationControl->isVisible)(\n           a1->m_rotationControl,\n           a2)\n     || a1->m_canActivateControls) )\n  {\n    if ( ((unsigned __int8 (__fastcall *)(GJTransformControl *))a1->m_transformControl->isVisible)(a1->m_transformControl) )\n    {\n      ((void (__fastcall *)(GJTransformControl *, _QWORD))a1->m_transformControl->setVisible)(a1->m_transformControl, 0);\n      m_transformControl = a1->m_transformControl;\n      if ( m_transformControl->m_touchID != -1 )\n      {\n        m_transformControl->m_touchID = -1;\n        m_delegate = m_transformControl->m_delegate;\n        if ( m_delegate )\n          ((void (__fastcall *)(GJTransformControlDelegate *))m_delegate->transformChangeEnded)(m_delegate);\n      }\n    }\n    EditorUI::updateEditButtonColor(a1, 31, (cocos2d::ccColor3B)-1);\n    a1->m_canActivateControls = 0;\n    if ( (unsigned int)sub_100720070(a1->m_selectedObjects) )\n    {\n      EditorUI::getGroupCenter((EditorUI *)v11, (cocos2d::CCArray *)0x1F, (bool)a1->m_selectedObjects);\n      v6 = sub_10028CC90(&a1->m_pivotPoint, v11);\n      ((void (__fastcall *)(GJRotationControl *, cocos2d::CCPoint *, double))a1->m_rotationControl->setPosition)(\n        a1->m_rotationControl,\n        &a1->m_pivotPoint,\n        v6);\n    }\n    else\n    {\n      m_rotationControl = a1->m_rotationControl;\n      v8 = ((__int64 (__fastcall *)(GameObject *))a1->m_selectedObject->getPosition)(a1->m_selectedObject);\n      ((void (__fastcall *)(GJRotationControl *, __int64))m_rotationControl->setPosition)(m_rotationControl, v8);\n    }\n    v9 = a1->m_rotationControl;\n    HIDWORD(v10) = 0;\n    *(float *)&v10 = 1.0\n                   / ((float (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getScale)(a1->m_editorLayer->m_objectLayer);\n    ((void (__fastcall *)(GJRotationControl *, double))v9->setScale)(v9, v10);\n    ((void (__fastcall *)(GJRotationControl *, __int64))a1->m_rotationControl->setVisible)(a1->m_rotationControl, 1);\n  }\n}", "assembly": "; \n; EditorUI::activateRotationControl from 0x10003d5b0 to 0x10003d732 (386 bytes)\n; \n; 6 xrefs:\n; > EditorUI::undoLastAction @ 0x10000c0cb\n; > EditorUI::redoLastAction @ 0x10000c12b\n; > EditorUI::toggleSpecialEditButtons @ 0x10002d8d7\n; > EditorUI::moveObjectCall_1 @ 0x10004a5fb\n; > EditorUI::keyDown @ 0x100050850\n; > EditorUI::createMoveMenu @ 0x10004778e\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    rbp                                                            ; +0x0, 0x10003d5b0\nmov     rbp, rsp                                                       ; +0x1, 0x10003d5b1\npush    r15                                                            ; +0x4, 0x10003d5b4\npush    r14                                                            ; +0x6, 0x10003d5b6\npush    rbx                                                            ; +0x8, 0x10003d5b8\npush    rax                                                            ; +0x9, 0x10003d5b9\nmov     rbx, rdi                                                       ; +0xa, 0x10003d5ba\nmov     rdi, [rdi+328h]                                                ; +0xd, 0x10003d5bd\ncall    sub_100720070                                                  ; +0x14, 0x10003d5c4\ntest    eax, eax                                                       ; +0x19, 0x10003d5c9\njnz     short loc_10003D5DB                                            ; +0x1b, 0x10003d5cb\ncmp     qword ptr [rbx+520h], 0                                        ; +0x1d, 0x10003d5cd\njz      loc_10003D727                                                  ; +0x25, 0x10003d5d5\nmov     rdi, [rbx+2A0h]                                                ; +0x2b, 0x10003d5db\nmov     rax, [rdi]                                                     ; +0x32, 0x10003d5e2\ncall    qword ptr [rax+150h]                                           ; +0x35, 0x10003d5e5\ntest    al, al                                                         ; +0x3b, 0x10003d5eb\njz      short loc_10003D5FC                                            ; +0x3d, 0x10003d5ed\ncmp     byte ptr [rbx+2B0h], 1                                         ; +0x3f, 0x10003d5ef\njnz     loc_10003D727                                                  ; +0x46, 0x10003d5f6\nmov     rdi, [rbx+2C0h]                                                ; +0x4c, 0x10003d5fc\nmov     rax, [rdi]                                                     ; +0x53, 0x10003d603\ncall    qword ptr [rax+150h]                                           ; +0x56, 0x10003d606\ntest    al, al                                                         ; +0x5c, 0x10003d60c\njz      short loc_10003D64E                                            ; +0x5e, 0x10003d60e\nmov     rdi, [rbx+2C0h]                                                ; +0x60, 0x10003d610\nmov     rax, [rdi]                                                     ; +0x67, 0x10003d617\nxor     esi, esi                                                       ; +0x6a, 0x10003d61a\ncall    qword ptr [rax+148h]                                           ; +0x6c, 0x10003d61c\nmov     rax, [rbx+2C0h]                                                ; +0x72, 0x10003d622\ncmp     dword ptr [rax+1B0h], 0FFFFFFFFh                               ; +0x79, 0x10003d629\njz      short loc_10003D64E                                            ; +0x80, 0x10003d630\nmov     dword ptr [rax+1B0h], 0FFFFFFFFh                               ; +0x82, 0x10003d632\nmov     rdi, [rax+1B8h]                                                ; +0x8c, 0x10003d63c\ntest    rdi, rdi                                                       ; +0x93, 0x10003d643\njz      short loc_10003D64E                                            ; +0x96, 0x10003d646\nmov     rax, [rdi]                                                     ; +0x98, 0x10003d648\ncall    qword ptr [rax+58h]                                            ; +0x9b, 0x10003d64b\nmov     rdi, rbx                                                       ; +0x9e, 0x10003d64e\nmov     esi, 1Fh                                                       ; +0xa1, 0x10003d651\nmov     edx, 0FFFFFFh                                                  ; +0xa6, 0x10003d656\ncall    EditorUI__updateEditButtonColor                                ; +0xab, 0x10003d65b\nmov     byte ptr [rbx+2B0h], 0                                         ; +0xb0, 0x10003d660\nmov     rdi, [rbx+328h]                                                ; +0xb7, 0x10003d667\ncall    sub_100720070                                                  ; +0xbe, 0x10003d66e\ntest    eax, eax                                                       ; +0xc3, 0x10003d673\njz      short loc_10003D6B3                                            ; +0xc5, 0x10003d675\nmov     rdx, [rbx+328h]                                                ; +0xc7, 0x10003d677\nlea     r14, [rbp+var_20]                                              ; +0xce, 0x10003d67e\nmov     rdi, r14                                                       ; +0xd2, 0x10003d682\nxor     ecx, ecx                                                       ; +0xd5, 0x10003d685\ncall    EditorUI__getGroupCenter                                       ; +0xd7, 0x10003d687\nlea     r15, [rbx+2A8h]                                                ; +0xdc, 0x10003d68c\nmov     rdi, r15                                                       ; +0xe3, 0x10003d693\nmov     rsi, r14                                                       ; +0xe6, 0x10003d696\ncall    sub_10028CC90                                                  ; +0xe9, 0x10003d699\nmov     rdi, [rbx+2A0h]                                                ; +0xee, 0x10003d69e\nmov     rax, [rdi]                                                     ; +0xf5, 0x10003d6a5\nmov     rsi, r15                                                       ; +0xf8, 0x10003d6a8\ncall    qword ptr [rax+0B8h]                                           ; +0xfb, 0x10003d6ab\njmp     short loc_10003D6D9                                            ; +0x101, 0x10003d6b1\nmov     r14, [rbx+2A0h]                                                ; +0x103, 0x10003d6b3\nmov     rdi, [rbx+520h]                                                ; +0x10a, 0x10003d6ba\nmov     rax, [rdi]                                                     ; +0x111, 0x10003d6c1\ncall    qword ptr [rax+0C0h]                                           ; +0x114, 0x10003d6c4\nmov     rcx, [r14]                                                     ; +0x11a, 0x10003d6ca\nmov     rdi, r14                                                       ; +0x11d, 0x10003d6cd\nmov     rsi, rax                                                       ; +0x120, 0x10003d6d0\ncall    qword ptr [rcx+0B8h]                                           ; +0x123, 0x10003d6d3\nmov     r14, [rbx+2A0h]                                                ; +0x129, 0x10003d6d9\nmov     rax, [rbx+4E8h]                                                ; +0x130, 0x10003d6e0\nmov     rdi, [rax+0EB8h]                                               ; +0x137, 0x10003d6e7\nmov     rax, [rdi]                                                     ; +0x13e, 0x10003d6ee\ncall    qword ptr [rax+0A8h]                                           ; +0x141, 0x10003d6f1\nmovss   xmm1, cs:alpha                                                 ; +0x147, 0x10003d6f7\ndivss   xmm1, xmm0                                                     ; +0x14f, 0x10003d6ff\nmov     rax, [r14]                                                     ; +0x153, 0x10003d703\nmov     rdi, r14                                                       ; +0x156, 0x10003d706\nmovaps  xmm0, xmm1                                                     ; +0x159, 0x10003d709\ncall    qword ptr [rax+0A0h]                                           ; +0x15c, 0x10003d70c\nmov     rdi, [rbx+2A0h]                                                ; +0x162, 0x10003d712\nmov     rax, [rdi]                                                     ; +0x169, 0x10003d719\nmov     esi, 1                                                         ; +0x16c, 0x10003d71c\ncall    qword ptr [rax+148h]                                           ; +0x171, 0x10003d721\nadd     rsp, 8                                                         ; +0x177, 0x10003d727\npop     rbx                                                            ; +0x17b, 0x10003d72b\npop     r14                                                            ; +0x17c, 0x10003d72c\npop     r15                                                            ; +0x17e, 0x10003d72e\npop     rbp                                                            ; +0x180, 0x10003d730\nretn                                                                   ; +0x181, 0x10003d731", "xrefs": ["EditorUI::undoLastAction @ 0x10000c0cb", "EditorUI::redoLastAction @ 0x10000c12b", "EditorUI::toggleSpecialEditButtons @ 0x10002d8d7", "EditorUI::moveObjectCall_1 @ 0x10004a5fb", "EditorUI::keyDown @ 0x100050850", "EditorUI::createMoveMenu @ 0x10004778e"], "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"}