{"type": "func", "start": 5369842464, "end": 5369842972, "name": "EditorUI::activateScaleControl", "pseudocode": "// \n// EditorUI::activateScaleControl from 0x140114b20 to 0x140114d1c (508 bytes)\n// \n// 5 xrefs:\n// > EditorUI::createMoveMenu @ 0x14011bad1\n// > EditorUI::createMoveMenu @ 0x14011bbd1\n// > <???> @ 0x14066f5d0\n// > <???> @ 0x14066f5e0\n// > <???> @ 0x1406c9174\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::activateScaleControl(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  GameObject **p_m_selectedObject; // rbx\n  cocos2d::CCArray **p_m_selectedObjects; // rdi\n  GJScaleControl **p_m_scaleControl; // r12\n  int v7; // edi\n  int m_senderTag; // ebx\n  int v9; // eax\n  cocos2d::CCArray *v10; // rcx\n  EditorUI *v11; // rcx\n  const cocos2d::CCPoint *GroupCenter; // rax\n  GJScaleControl_vtbl *v13; // rbx\n  _BOOL8 v14; // rdx\n  cocos2d::ccColor3B v15; // [rsp+50h] [rbp+8h] BYREF\n  cocos2d::CCPoint v16; // [rsp+60h] [rbp+18h] BYREF\n\n  p_m_selectedObject = &a1->m_selectedObject;\n  if ( cocos2d::CCArray::count(a1->m_selectedObjects) || *p_m_selectedObject )\n  {\n    EditorUI::deactivateTransformControl(a1);\n    p_m_selectedObjects = &a1->m_selectedObjects;\n    p_m_scaleControl = &a1->m_scaleControl;\n    if ( a1->m_scaleControl->isVisible(a1->m_scaleControl) )\n    {\n      v7 = a2->getTag(a2);\n      m_senderTag = a1->m_scaleControl->m_senderTag;\n      EditorUI::deactivateScaleControl(a1);\n      if ( v7 == m_senderTag )\n        return;\n      p_m_selectedObjects = &a1->m_selectedObjects;\n      p_m_selectedObject = &a1->m_selectedObject;\n      p_m_scaleControl = &a1->m_scaleControl;\n    }\n    if ( a1->m_scaleControl->isVisible(a1->m_scaleControl) )\n    {\n      if ( !a1->m_canActivateControls )\n        return;\n    }\n    else\n    {\n      p_m_selectedObjects = &a1->m_selectedObjects;\n    }\n    *(_WORD *)&v15.r = -22874;\n    v15.b = -90;\n    v9 = a2->getTag(a2);\n    EditorUI::updateEditButtonColor(a1, v9, &v15);\n    v10 = *p_m_selectedObjects;\n    a1->m_canActivateControls = 0;\n    if ( cocos2d::CCArray::count(v10) )\n      GroupCenter = (const cocos2d::CCPoint *)EditorUI::getGroupCenter(\n                                                v11,\n                                                (cocos2d::CCArray *)&v15,\n                                                (bool)*p_m_selectedObjects);\n    else\n      GroupCenter = (*p_m_selectedObject)->getPosition_0(*p_m_selectedObject);\n    cocos2d::CCPoint::operator=(&a1->m_pivotPoint, GroupCenter);\n    (*p_m_scaleControl)->m_senderTag = a2->getTag(a2);\n    cocos2d::CCPoint::CCPoint(&v16, 0.0, 40.0);\n    cocos2d::CCPoint::operator+(&a1->m_pivotPoint, &v15);\n    (*p_m_scaleControl)->setPosition_0(*p_m_scaleControl, (const cocos2d::CCPoint *)&v15);\n    v13 = (*p_m_scaleControl)->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    a1->m_editorLayer->m_objectLayer->getScale(a1->m_editorLayer->m_objectLayer);\n    ((void (__fastcall *)(GJScaleControl *))v13->setScale_0)(*p_m_scaleControl);\n    LOBYTE(v14) = 1;\n    (*p_m_scaleControl)->setVisible(*p_m_scaleControl, v14);\n    a1->updateScaleControl(&a1->GJScaleControlDelegate);\n  }\n}", "assembly": "; \n; EditorUI::activateScaleControl from 0x140114b20 to 0x140114d1c (508 bytes)\n; \n; 5 xrefs:\n; > EditorUI::createMoveMenu @ 0x14011bad1\n; > EditorUI::createMoveMenu @ 0x14011bbd1\n; > <???> @ 0x14066f5d0\n; > <???> @ 0x14066f5e0\n; > <???> @ 0x1406c9174\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    rbx                                                            ; +0x0, 0x140114b20\npush    rbp                                                            ; +0x2, 0x140114b22\npush    rsi                                                            ; +0x3, 0x140114b23\npush    r15                                                            ; +0x4, 0x140114b24\nsub     rsp, 28h                                                       ; +0x6, 0x140114b26\nmov     rsi, rcx                                                       ; +0xa, 0x140114b2a\nlea     rbx, [rcx+538h]                                                ; +0xd, 0x140114b2d\nmov     rcx, [rcx+340h]                                                ; +0x14, 0x140114b34\nmov     r15, rdx                                                       ; +0x1b, 0x140114b3b\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1e, 0x140114b3e\ntest    eax, eax                                                       ; +0x24, 0x140114b44\njnz     short loc_140114B52                                            ; +0x26, 0x140114b46\ncmp     qword ptr [rbx], 0                                             ; +0x28, 0x140114b48\njz      loc_140114D12                                                  ; +0x2c, 0x140114b4c\nmov     [rsp+48h+arg_8], rdi                                           ; +0x32, 0x140114b52\nmov     rcx, rsi                                                       ; +0x37, 0x140114b57\nmov     [rsp+48h+arg_18], r12                                          ; +0x3a, 0x140114b5a\nmov     [rsp+48h+var_28], r14                                          ; +0x3f, 0x140114b5f\ncall    EditorUI__deactivateTransformControl                           ; +0x44, 0x140114b64\nmov     rcx, [rsi+2D0h]                                                ; +0x49, 0x140114b69\nlea     rdi, [rsi+340h]                                                ; +0x50, 0x140114b70\nlea     r12, [rsi+2D0h]                                                ; +0x57, 0x140114b77\nmov     rax, [rcx]                                                     ; +0x5e, 0x140114b7e\ncall    qword ptr [rax+148h]                                           ; +0x61, 0x140114b81\ntest    al, al                                                         ; +0x67, 0x140114b87\njz      short loc_140114BC8                                            ; +0x69, 0x140114b89\nmov     rax, [r15]                                                     ; +0x6b, 0x140114b8b\nmov     rcx, r15                                                       ; +0x6e, 0x140114b8e\ncall    qword ptr [rax+38h]                                            ; +0x71, 0x140114b91\nmov     rcx, [rsi+2D0h]                                                ; +0x74, 0x140114b94\nmov     edi, eax                                                       ; +0x7b, 0x140114b9b\nmov     ebx, [rcx+1F8h]                                                ; +0x7d, 0x140114b9d\nmov     rcx, rsi                                                       ; +0x83, 0x140114ba3\ncall    EditorUI__deactivateScaleControl                               ; +0x86, 0x140114ba6\ncmp     edi, ebx                                                       ; +0x8b, 0x140114bab\njz      loc_140114D03                                                  ; +0x8d, 0x140114bad\nlea     rdi, [rsi+340h]                                                ; +0x93, 0x140114bb3\nlea     rbx, [rsi+538h]                                                ; +0x9a, 0x140114bba\nlea     r12, [rsi+2D0h]                                                ; +0xa1, 0x140114bc1\nmov     rcx, [rsi+2D0h]                                                ; +0xa8, 0x140114bc8\nmov     rax, [rcx]                                                     ; +0xaf, 0x140114bcf\ncall    qword ptr [rax+148h]                                           ; +0xb2, 0x140114bd2\ntest    al, al                                                         ; +0xb8, 0x140114bd8\njz      short loc_140114BEB                                            ; +0xba, 0x140114bda\ncmp     byte ptr [rsi+2C8h], 0                                         ; +0xbc, 0x140114bdc\njz      loc_140114D03                                                  ; +0xc3, 0x140114be3\njmp     short loc_140114BF2                                            ; +0xc9, 0x140114be9\nlea     rdi, [rsi+340h]                                                ; +0xcb, 0x140114beb\nmovzx   eax, cs:word_140529A40                                         ; +0xd2, 0x140114bf2\nmov     rcx, r15                                                       ; +0xd9, 0x140114bf9\nmov     [rsp+48h+arg_0], ax                                            ; +0xdc, 0x140114bfc\nmovzx   eax, cs:byte_140529A42                                         ; +0xe1, 0x140114c01\nmov     [rsp+48h+arg_2], al                                            ; +0xe8, 0x140114c08\nmov     rax, [r15]                                                     ; +0xec, 0x140114c0c\ncall    qword ptr [rax+38h]                                            ; +0xef, 0x140114c0f\nlea     r8, [rsp+48h+arg_0]                                            ; +0xf2, 0x140114c12\nmov     rcx, rsi                                                       ; +0xf7, 0x140114c17\nmov     edx, eax                                                       ; +0xfa, 0x140114c1a\ncall    EditorUI__updateEditButtonColor                                ; +0xfc, 0x140114c1c\nmov     rcx, [rdi]                                                     ; +0x101, 0x140114c21\nmov     byte ptr [rsi+2C8h], 0                                         ; +0x104, 0x140114c24\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x10b, 0x140114c2b\ntest    eax, eax                                                       ; +0x111, 0x140114c31\njz      short loc_140114C47                                            ; +0x113, 0x140114c33\nmov     r8, [rdi]                                                      ; +0x115, 0x140114c35\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x118, 0x140114c38\nxor     r9d, r9d                                                       ; +0x11d, 0x140114c3d\ncall    EditorUI__getGroupCenter                                       ; +0x120, 0x140114c40\njmp     short loc_140114C53                                            ; +0x125, 0x140114c45\nmov     rcx, [rbx]                                                     ; +0x127, 0x140114c47\nmov     rax, [rcx]                                                     ; +0x12a, 0x140114c4a\ncall    qword ptr [rax+0C8h]                                           ; +0x12d, 0x140114c4d\nmov     rdx, rax                                                       ; +0x133, 0x140114c53\nlea     rcx, [rsi+2C0h]                                                ; +0x136, 0x140114c56\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x13d, 0x140114c5d\nmov     rax, [r15]                                                     ; +0x143, 0x140114c63\nmov     rcx, r15                                                       ; +0x146, 0x140114c66\ncall    qword ptr [rax+38h]                                            ; +0x149, 0x140114c69\nmov     rdx, [r12]                                                     ; +0x14c, 0x140114c6c\nlea     rcx, [rsp+48h+arg_10]                                          ; +0x150, 0x140114c70\nmovss   xmm2, cs:dword_1406231B0                                       ; +0x155, 0x140114c75\nxorps   xmm1, xmm1                                                     ; +0x15d, 0x140114c7d\nmov     [rdx+1F8h], eax                                                ; +0x160, 0x140114c80\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x166, 0x140114c86\nmov     r8, rax                                                        ; +0x16c, 0x140114c8c\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x16f, 0x140114c8f\nlea     rcx, [rsi+2C0h]                                                ; +0x174, 0x140114c94\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x17b, 0x140114c9b\nmov     rcx, [r12]                                                     ; +0x181, 0x140114ca1\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x185, 0x140114ca5\nmov     rax, [rcx]                                                     ; +0x18a, 0x140114caa\ncall    qword ptr [rax+0B8h]                                           ; +0x18d, 0x140114cad\nmov     rax, [rsi+500h]                                                ; +0x193, 0x140114cb3\nmov     rcx, [rax+0FE8h]                                               ; +0x19a, 0x140114cba\nmov     rax, [r12]                                                     ; +0x1a1, 0x140114cc1\nmov     rbx, [rax]                                                     ; +0x1a5, 0x140114cc5\nmov     rax, [rcx]                                                     ; +0x1a8, 0x140114cc8\ncall    qword ptr [rax+0A8h]                                           ; +0x1ab, 0x140114ccb\nmovss   xmm1, cs:flt_140622C24                                         ; +0x1b1, 0x140114cd1\nmov     rcx, [r12]                                                     ; +0x1b9, 0x140114cd9\ndivss   xmm1, xmm0                                                     ; +0x1bd, 0x140114cdd\ncall    qword ptr [rbx+0A0h]                                           ; +0x1c1, 0x140114ce1\nmov     rcx, [r12]                                                     ; +0x1c7, 0x140114ce7\nmov     dl, 1                                                          ; +0x1cb, 0x140114ceb\nmov     rax, [rcx]                                                     ; +0x1cd, 0x140114ced\ncall    qword ptr [rax+140h]                                           ; +0x1d0, 0x140114cf0\nlea     rcx, [rsi+1B0h]                                                ; +0x1d6, 0x140114cf6\nmov     rax, [rcx]                                                     ; +0x1dd, 0x140114cfd\ncall    qword ptr [rax+28h]                                            ; +0x1e0, 0x140114d00\nmov     r12, [rsp+48h+arg_18]                                          ; +0x1e3, 0x140114d03\nmov     rdi, [rsp+48h+arg_8]                                           ; +0x1e8, 0x140114d08\nmov     r14, [rsp+48h+var_28]                                          ; +0x1ed, 0x140114d0d\nadd     rsp, 28h                                                       ; +0x1f2, 0x140114d12\npop     r15                                                            ; +0x1f6, 0x140114d16\npop     rsi                                                            ; +0x1f8, 0x140114d18\npop     rbp                                                            ; +0x1f9, 0x140114d19\npop     rbx                                                            ; +0x1fa, 0x140114d1a\nretn                                                                   ; +0x1fb, 0x140114d1b", "xrefs": ["EditorUI::createMoveMenu @ 0x14011bad1", "EditorUI::createMoveMenu @ 0x14011bbd1", "<???> @ 0x14066f5d0", "<???> @ 0x14066f5e0", "<???> @ 0x1406c9174"], "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"}