{"type": "func", "start": 5370817472, "end": 5370817997, "name": "EditorUI::activateScaleControl", "pseudocode": "// \n// EditorUI::activateScaleControl from 0x140202bc0 to 0x140202dcd (525 bytes)\n// \n// 7 xrefs:\n// > EditorUI::handleEditorAction @ 0x1401c4197\n// > EditorUI::createMoveMenu @ 0x1401f2b37\n// > EditorUI::createMoveMenu @ 0x1401f2c67\n// > <???> @ 0x1408a3f60\n// > <???> @ 0x1408a3f70\n// > <???> @ 0x14091af3c\n// > <???> @ 0x14091af48\n// \n// This function is hookable on this platform (idp: pc, 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 11:28:14 +0000\n// \n\nunsigned int __fastcall EditorUI::activateScaleControl(__int64 a1, __int64 a2)\n{\n  _QWORD *v3; // rbx\n  unsigned int result; // eax\n  __int64 v6; // rax\n  cocos2d::CCArray **v7; // rdi\n  __int64 **v8; // r12\n  int v9; // edi\n  int v10; // ebx\n  unsigned int v11; // eax\n  cocos2d::CCArray *v12; // rcx\n  __int64 v13; // rcx\n  cocos2d::CCPoint *GroupCenter; // rax\n  __int64 *v15; // rbx\n  __int64 v16; // rax\n  __int64 *v17; // rdi\n  __int64 v18; // rbx\n  __int64 v19; // rdx\n  __int16 v20; // [rsp+50h] [rbp+8h] BYREF\n  char v21; // [rsp+52h] [rbp+Ah]\n  char v22; // [rsp+60h] [rbp+18h] BYREF\n\n  v3 = (_QWORD *)(a1 + 1568);\n  result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944));\n  if ( result || *v3 )\n  {\n    v6 = EditorSFXManager::sharedState();\n    EditorSFXManager::playAction(v6, 189);\n    EditorUI::deactivateTransformControl(a1);\n    v7 = (cocos2d::CCArray **)(a1 + 944);\n    v8 = (__int64 **)(a1 + 832);\n    if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 832) + 344LL))(*(_QWORD *)(a1 + 832)) )\n    {\n      v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n      v10 = *(_DWORD *)(*(_QWORD *)(a1 + 832) + 592LL);\n      result = EditorUI::deactivateScaleControl(a1);\n      if ( v9 == v10 )\n        return result;\n      v7 = (cocos2d::CCArray **)(a1 + 944);\n      v3 = (_QWORD *)(a1 + 1568);\n      v8 = (__int64 **)(a1 + 832);\n    }\n    result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 832) + 344LL))(*(_QWORD *)(a1 + 832));\n    if ( (_BYTE)result )\n    {\n      if ( !*(_BYTE *)(a1 + 824) )\n        return result;\n    }\n    else\n    {\n      v7 = (cocos2d::CCArray **)(a1 + 944);\n    }\n    v20 = -22874;\n    v21 = -90;\n    v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n    EditorUI::updateEditButtonColor(a1, v11, &v20);\n    v12 = *v7;\n    *(_BYTE *)(a1 + 824) = 0;\n    if ( cocos2d::CCArray::count(v12) )\n      GroupCenter = EditorUI::getGroupCenter(v13, (cocos2d::CCPoint *)&v20, *v7, 0);\n    else\n      GroupCenter = (cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*v3 + 200LL))(*v3);\n    cocos2d::CCPoint::operator=(a1 + 816, GroupCenter);\n    v15 = *v8;\n    *((_DWORD *)v15 + 148) = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v22, 0.0, 40.0);\n    cocos2d::CCPoint::operator+(a1 + 816, &v20, v16);\n    (*(void (__fastcall **)(__int64 *, __int16 *))(**v8 + 184))(*v8, &v20);\n    v17 = *v8;\n    v18 = **v8;\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1512) + 4296LL) + 168LL))(*(_QWORD *)(*(_QWORD *)(a1 + 1512) + 4296LL));\n    (*(void (__fastcall **)(__int64 *))(v18 + 160))(v17);\n    LOBYTE(v19) = 1;\n    (*(void (__fastcall **)(__int64 *, __int64))(**v8 + 336))(*v8, v19);\n    return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a1 + 432) + 40LL))(a1 + 432);\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::activateScaleControl from 0x140202bc0 to 0x140202dcd (525 bytes)\n; \n; 7 xrefs:\n; > EditorUI::handleEditorAction @ 0x1401c4197\n; > EditorUI::createMoveMenu @ 0x1401f2b37\n; > EditorUI::createMoveMenu @ 0x1401f2c67\n; > <???> @ 0x1408a3f60\n; > <???> @ 0x1408a3f70\n; > <???> @ 0x14091af3c\n; > <???> @ 0x14091af48\n; \n; This function is hookable on this platform (idp: pc, 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 11:28:14 +0000\n; \npush    rbx                                                            ; +0x0, 0x140202bc0\npush    rbp                                                            ; +0x2, 0x140202bc2\npush    rsi                                                            ; +0x3, 0x140202bc3\npush    r14                                                            ; +0x4, 0x140202bc4\nsub     rsp, 28h                                                       ; +0x6, 0x140202bc6\nmov     rsi, rcx                                                       ; +0xa, 0x140202bca\nlea     rbx, [rcx+620h]                                                ; +0xd, 0x140202bcd\nmov     rcx, [rcx+3B0h]                                                ; +0x14, 0x140202bd4\nmov     r14, rdx                                                       ; +0x1b, 0x140202bdb\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1e, 0x140202bde\ntest    eax, eax                                                       ; +0x24, 0x140202be4\njnz     short loc_140202BF2                                            ; +0x26, 0x140202be6\ncmp     qword ptr [rbx], 0                                             ; +0x28, 0x140202be8\njz      loc_140202DC3                                                  ; +0x2c, 0x140202bec\nmov     [rsp+48h+arg_8], rdi                                           ; +0x32, 0x140202bf2\nmov     [rsp+48h+arg_18], r12                                          ; +0x37, 0x140202bf7\nmov     [rsp+48h+var_28], r15                                          ; +0x3c, 0x140202bfc\ncall    EditorSFXManager__sharedState                                  ; +0x41, 0x140202c01\nmov     rcx, rax                                                       ; +0x46, 0x140202c06\nmov     edx, 0BDh                                                      ; +0x49, 0x140202c09\ncall    EditorSFXManager__playAction                                   ; +0x4e, 0x140202c0e\nmov     rcx, rsi                                                       ; +0x53, 0x140202c13\ncall    EditorUI__deactivateTransformControl                           ; +0x56, 0x140202c16\nmov     rcx, [rsi+340h]                                                ; +0x5b, 0x140202c1b\nlea     rdi, [rsi+3B0h]                                                ; +0x62, 0x140202c22\nlea     r12, [rsi+340h]                                                ; +0x69, 0x140202c29\nmov     rax, [rcx]                                                     ; +0x70, 0x140202c30\ncall    qword ptr [rax+158h]                                           ; +0x73, 0x140202c33\ntest    al, al                                                         ; +0x79, 0x140202c39\njz      short loc_140202C7A                                            ; +0x7b, 0x140202c3b\nmov     rax, [r14]                                                     ; +0x7d, 0x140202c3d\nmov     rcx, r14                                                       ; +0x80, 0x140202c40\ncall    qword ptr [rax+38h]                                            ; +0x83, 0x140202c43\nmov     rcx, [rsi+340h]                                                ; +0x86, 0x140202c46\nmov     edi, eax                                                       ; +0x8d, 0x140202c4d\nmov     ebx, [rcx+250h]                                                ; +0x8f, 0x140202c4f\nmov     rcx, rsi                                                       ; +0x95, 0x140202c55\ncall    EditorUI__deactivateScaleControl                               ; +0x98, 0x140202c58\ncmp     edi, ebx                                                       ; +0x9d, 0x140202c5d\njz      loc_140202DB4                                                  ; +0x9f, 0x140202c5f\nlea     rdi, [rsi+3B0h]                                                ; +0xa5, 0x140202c65\nlea     rbx, [rsi+620h]                                                ; +0xac, 0x140202c6c\nlea     r12, [rsi+340h]                                                ; +0xb3, 0x140202c73\nmov     rcx, [rsi+340h]                                                ; +0xba, 0x140202c7a\nmov     rax, [rcx]                                                     ; +0xc1, 0x140202c81\ncall    qword ptr [rax+158h]                                           ; +0xc4, 0x140202c84\ntest    al, al                                                         ; +0xca, 0x140202c8a\njz      short loc_140202C9D                                            ; +0xcc, 0x140202c8c\ncmp     byte ptr [rsi+338h], 0                                         ; +0xce, 0x140202c8e\njz      loc_140202DB4                                                  ; +0xd5, 0x140202c95\njmp     short loc_140202CA4                                            ; +0xdb, 0x140202c9b\nlea     rdi, [rsi+3B0h]                                                ; +0xdd, 0x140202c9d\nmovzx   eax, cs:word_1407033DC                                         ; +0xe4, 0x140202ca4\nmov     rcx, r14                                                       ; +0xeb, 0x140202cab\nmov     [rsp+48h+arg_0], ax                                            ; +0xee, 0x140202cae\nmovzx   eax, cs:byte_1407033DE                                         ; +0xf3, 0x140202cb3\nmov     [rsp+48h+arg_2], al                                            ; +0xfa, 0x140202cba\nmov     rax, [r14]                                                     ; +0xfe, 0x140202cbe\ncall    qword ptr [rax+38h]                                            ; +0x101, 0x140202cc1\nlea     r8, [rsp+48h+arg_0]                                            ; +0x104, 0x140202cc4\nmov     rcx, rsi                                                       ; +0x109, 0x140202cc9\nmov     edx, eax                                                       ; +0x10c, 0x140202ccc\ncall    EditorUI__updateEditButtonColor                                ; +0x10e, 0x140202cce\nmov     rcx, [rdi]                                                     ; +0x113, 0x140202cd3\nmov     byte ptr [rsi+338h], 0                                         ; +0x116, 0x140202cd6\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x11d, 0x140202cdd\ntest    eax, eax                                                       ; +0x123, 0x140202ce3\njz      short loc_140202CF9                                            ; +0x125, 0x140202ce5\nmov     r8, [rdi]                                                      ; +0x127, 0x140202ce7\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x12a, 0x140202cea\nxor     r9d, r9d                                                       ; +0x12f, 0x140202cef\ncall    EditorUI__getGroupCenter                                       ; +0x132, 0x140202cf2\njmp     short loc_140202D05                                            ; +0x137, 0x140202cf7\nmov     rcx, [rbx]                                                     ; +0x139, 0x140202cf9\nmov     rax, [rcx]                                                     ; +0x13c, 0x140202cfc\ncall    qword ptr [rax+0C8h]                                           ; +0x13f, 0x140202cff\nmov     rdx, rax                                                       ; +0x145, 0x140202d05\nlea     rcx, [rsi+330h]                                                ; +0x148, 0x140202d08\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x14f, 0x140202d0f\nmov     rax, [r14]                                                     ; +0x155, 0x140202d15\nmov     rcx, r14                                                       ; +0x158, 0x140202d18\nmov     rbx, [r12]                                                     ; +0x15b, 0x140202d1b\ncall    qword ptr [rax+38h]                                            ; +0x15f, 0x140202d1f\nmovss   xmm2, cs:dword_140835674                                       ; +0x162, 0x140202d22\nlea     rcx, [rsp+48h+arg_10]                                          ; +0x16a, 0x140202d2a\nxorps   xmm1, xmm1                                                     ; +0x16f, 0x140202d2f\nmov     [rbx+250h], eax                                                ; +0x172, 0x140202d32\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x178, 0x140202d38\nmov     r8, rax                                                        ; +0x17e, 0x140202d3e\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x181, 0x140202d41\nlea     rcx, [rsi+330h]                                                ; +0x186, 0x140202d46\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x18d, 0x140202d4d\nmov     rcx, [r12]                                                     ; +0x193, 0x140202d53\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x197, 0x140202d57\nmov     rax, [rcx]                                                     ; +0x19c, 0x140202d5c\ncall    qword ptr [rax+0B8h]                                           ; +0x19f, 0x140202d5f\nmov     rax, [rsi+5E8h]                                                ; +0x1a5, 0x140202d65\nmov     rdi, [r12]                                                     ; +0x1ac, 0x140202d6c\nmov     rcx, [rax+10C8h]                                               ; +0x1b0, 0x140202d70\nmov     rbx, [rdi]                                                     ; +0x1b7, 0x140202d77\nmov     rax, [rcx]                                                     ; +0x1ba, 0x140202d7a\ncall    qword ptr [rax+0A8h]                                           ; +0x1bd, 0x140202d7d\nmovss   xmm1, cs:flt_140835080                                         ; +0x1c3, 0x140202d83\nmov     rcx, rdi                                                       ; +0x1cb, 0x140202d8b\ndivss   xmm1, xmm0                                                     ; +0x1ce, 0x140202d8e\ncall    qword ptr [rbx+0A0h]                                           ; +0x1d2, 0x140202d92\nmov     rcx, [r12]                                                     ; +0x1d8, 0x140202d98\nmov     dl, 1                                                          ; +0x1dc, 0x140202d9c\nmov     rax, [rcx]                                                     ; +0x1de, 0x140202d9e\ncall    qword ptr [rax+150h]                                           ; +0x1e1, 0x140202da1\nlea     rcx, [rsi+1B0h]                                                ; +0x1e7, 0x140202da7\nmov     rax, [rcx]                                                     ; +0x1ee, 0x140202dae\ncall    qword ptr [rax+28h]                                            ; +0x1f1, 0x140202db1\nmov     r12, [rsp+48h+arg_18]                                          ; +0x1f4, 0x140202db4\nmov     rdi, [rsp+48h+arg_8]                                           ; +0x1f9, 0x140202db9\nmov     r15, [rsp+48h+var_28]                                          ; +0x1fe, 0x140202dbe\nadd     rsp, 28h                                                       ; +0x203, 0x140202dc3\npop     r14                                                            ; +0x207, 0x140202dc7\npop     rsi                                                            ; +0x209, 0x140202dc9\npop     rbp                                                            ; +0x20a, 0x140202dca\npop     rbx                                                            ; +0x20b, 0x140202dcb\nretn                                                                   ; +0x20c, 0x140202dcc", "xrefs": ["EditorUI::handleEditorAction @ 0x1401c4197", "EditorUI::createMoveMenu @ 0x1401f2b37", "EditorUI::createMoveMenu @ 0x1401f2c67", "<???> @ 0x1408a3f60", "<???> @ 0x1408a3f70", "<???> @ 0x14091af3c", "<???> @ 0x14091af48"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}