{"type": "func", "start": 5370542832, "end": 5370543528, "name": "EditorUI::startFreeMoveTouch", "pseudocode": "// \n// EditorUI::startFreeMoveTouch from 0x1401bfaf0 to 0x1401bfda8 (696 bytes)\n// \n// 3 xrefs:\n// > EditorUI::finishTouchDelay @ 0x1401bfecd\n// > EditorUI::ccTouchBegan @ 0x1401c0311\n// > <???> @ 0x14091a660\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:02 +0000\n// \n\nvoid __fastcall EditorUI::startFreeMoveTouch(__int64 a1)\n{\n  _BYTE *v2; // rbx\n  _QWORD *v3; // r15\n  __int64 *v4; // r14\n  unsigned int v5; // esi\n  __int64 v6; // rcx\n  __int64 v7; // rcx\n  __int64 v8; // rax\n  cocos2d::CCArray *v9; // rcx\n  const struct cocos2d::CCPoint *v10; // rax\n  __int64 v11; // rax\n  __int64 v12; // rbx\n  __int64 v13; // rax\n  cocos2d::CCArray *v14; // rbx\n  struct cocos2d::CCObject *v15; // rax\n  __int64 v16; // rax\n  const struct cocos2d::CCPoint *v17; // rax\n  __int64 v18; // rcx\n  __int64 v19; // rax\n  __int64 v20; // rdx\n  cocos2d::CCArray **UndoObject; // rax\n  cocos2d::CCArray **v22; // rbx\n  cocos2d::CCObject *v23; // rcx\n  char v24; // [rsp+50h] [rbp+8h] BYREF\n  char v25; // [rsp+58h] [rbp+10h] BYREF\n\n  v2 = (_BYTE *)(a1 + 914);\n  v3 = (_QWORD *)(a1 + 1576);\n  *(_BYTE *)(a1 + 914) = 0;\n  v4 = (__int64 *)(a1 + 1512);\n  v5 = 0;\n  v6 = *(_QWORD *)(a1 + 1512);\n  *v3 = 0;\n  cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(v6 + 4296), &v24, a1 + 1520);\n  v8 = cocos2d::CCDirector::sharedDirector(v7);\n  if ( *(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 176LL))(v8) + 154) )\n  {\n    if ( !*(_QWORD *)(a1 + 1568) )\n    {\n      if ( !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) )\n        goto LABEL_6;\n      v2 = (_BYTE *)(a1 + 914);\n      v4 = (__int64 *)(a1 + 1512);\n    }\n    EditorUI::onDuplicate(a1, 0);\n    *(_BYTE *)(a1 + 737) = 1;\n    v3 = (_QWORD *)(a1 + 1576);\n  }\nLABEL_6:\n  v9 = *(cocos2d::CCArray **)(a1 + 944);\n  *(_BYTE *)(a1 + 1586) = 0;\n  if ( cocos2d::CCArray::count(v9) )\n  {\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, (const struct cocos2d::CCPoint *)&v24);\n    EditorUI::findSnapObject(a1, v10);\n  }\n  else if ( *(_QWORD *)(a1 + 1568) )\n  {\n    v12 = *v4;\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, (const struct cocos2d::CCPoint *)&v24);\n    v14 = (cocos2d::CCArray *)LevelEditorLayer::objectsAtPosition(v12, v13);\n    if ( cocos2d::CCArray::count(v14) )\n    {\n      while ( 1 )\n      {\n        v15 = cocos2d::CCArray::objectAtIndex(v14, v5);\n        if ( *((_DWORD *)v15 + 231) == *(_DWORD *)(*(_QWORD *)(a1 + 1568) + 924LL) )\n          break;\n        if ( ++v5 >= cocos2d::CCArray::count(v14) )\n          goto LABEL_16;\n      }\n      *(_QWORD *)(a1 + 1576) = v15;\n    }\nLABEL_16:\n    if ( !*(_QWORD *)(a1 + 1576) && (!*(_QWORD *)(a1 + 1568) || !*(_BYTE *)(a1 + 908)) )\n    {\n      *(_BYTE *)(a1 + 738) = 1;\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, (const struct cocos2d::CCPoint *)(a1 + 1520));\n      EditorUI::clickOnPosition(a1, v16);\n      if ( *(_BYTE *)(a1 + 914) )\n        *(_QWORD *)(a1 + 1576) = *(_QWORD *)(a1 + 1568);\n    }\n  }\n  else\n  {\n    *(_BYTE *)(a1 + 738) = 1;\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, (const struct cocos2d::CCPoint *)(a1 + 1520));\n    EditorUI::clickOnPosition(a1, v11);\n    if ( *v2 )\n      *v3 = *(_QWORD *)(a1 + 1568);\n  }\n  if ( *(_BYTE *)(a1 + 1586) && !*(_QWORD *)(a1 + 1576) && cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) )\n  {\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, (const struct cocos2d::CCPoint *)&v24);\n    EditorUI::findSnapObject(a1, v17);\n  }\n  v18 = *(_QWORD *)(a1 + 1576);\n  if ( v18 )\n  {\n    *(_BYTE *)(a1 + 913) = 1;\n    v19 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v18 + 200LL))(v18);\n    cocos2d::CCPoint::operator=(a1 + 936, v19);\n  }\n  cocos2d::CCPoint::operator=(a1 + 1552, &v24);\n  if ( !*(_BYTE *)(a1 + 737) )\n  {\n    UndoObject = EditorUI::createUndoObject(a1, v20, 1);\n    v22 = UndoObject;\n    if ( *(cocos2d::CCArray ***)(a1 + 728) != UndoObject )\n    {\n      if ( UndoObject )\n        cocos2d::CCObject::retain((cocos2d::CCObject *)UndoObject);\n      v23 = *(cocos2d::CCObject **)(a1 + 728);\n      if ( v23 )\n        cocos2d::CCObject::release(v23);\n      *(_QWORD *)(a1 + 728) = v22;\n    }\n  }\n}", "assembly": "; \n; EditorUI::startFreeMoveTouch from 0x1401bfaf0 to 0x1401bfda8 (696 bytes)\n; \n; 3 xrefs:\n; > EditorUI::finishTouchDelay @ 0x1401bfecd\n; > EditorUI::ccTouchBegan @ 0x1401c0311\n; > <???> @ 0x14091a660\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:02 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1401bfaf0\npush    rbp                                                            ; +0x5, 0x1401bfaf5\npush    rsi                                                            ; +0x6, 0x1401bfaf6\npush    rdi                                                            ; +0x7, 0x1401bfaf7\npush    r14                                                            ; +0x8, 0x1401bfaf8\npush    r15                                                            ; +0xa, 0x1401bfafa\nsub     rsp, 20h                                                       ; +0xc, 0x1401bfafc\nmov     rdi, rcx                                                       ; +0x10, 0x1401bfb00\nlea     rbx, [rcx+392h]                                                ; +0x13, 0x1401bfb03\nlea     r15, [rcx+628h]                                                ; +0x1a, 0x1401bfb0a\nmov     byte ptr [rbx], 0                                              ; +0x21, 0x1401bfb11\nlea     r14, [rcx+5E8h]                                                ; +0x24, 0x1401bfb14\nxor     esi, esi                                                       ; +0x2b, 0x1401bfb1b\nmov     rcx, [r14]                                                     ; +0x2d, 0x1401bfb1d\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x30, 0x1401bfb20\nmov     [r15], rsi                                                     ; +0x35, 0x1401bfb25\nlea     r8, [rdi+5F0h]                                                 ; +0x38, 0x1401bfb28\nmov     rcx, [rcx+10C8h]                                               ; +0x3f, 0x1401bfb2f\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x46, 0x1401bfb36\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x4c, 0x1401bfb3c\nmov     rcx, [rax]                                                     ; +0x52, 0x1401bfb42\nmov     rdx, [rcx+0B0h]                                                ; +0x55, 0x1401bfb45\nmov     rcx, rax                                                       ; +0x5c, 0x1401bfb4c\ncall    rdx                                                            ; +0x5f, 0x1401bfb4f\ncmp     [rax+9Ah], sil                                                 ; +0x61, 0x1401bfb51\njz      short loc_1401BFB9A                                            ; +0x68, 0x1401bfb58\ncmp     [rdi+620h], rsi                                                ; +0x6a, 0x1401bfb5a\njnz     short loc_1401BFB82                                            ; +0x71, 0x1401bfb61\nmov     rcx, [rdi+3B0h]                                                ; +0x73, 0x1401bfb63\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x7a, 0x1401bfb6a\ntest    eax, eax                                                       ; +0x80, 0x1401bfb70\njz      short loc_1401BFB9A                                            ; +0x82, 0x1401bfb72\nlea     rbx, [rdi+392h]                                                ; +0x84, 0x1401bfb74\nlea     r14, [rdi+5E8h]                                                ; +0x8b, 0x1401bfb7b\nxor     edx, edx                                                       ; +0x92, 0x1401bfb82\nmov     rcx, rdi                                                       ; +0x94, 0x1401bfb84\ncall    EditorUI__onDuplicate                                          ; +0x97, 0x1401bfb87\nmov     byte ptr [rdi+2E1h], 1                                         ; +0x9c, 0x1401bfb8c\nlea     r15, [rdi+628h]                                                ; +0xa3, 0x1401bfb93\nmov     rcx, [rdi+3B0h]                                                ; +0xaa, 0x1401bfb9a\nmov     [rdi+632h], sil                                                ; +0xb1, 0x1401bfba1\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xb8, 0x1401bfba8\nlea     rcx, [rsp+48h+arg_8]                                           ; +0xbe, 0x1401bfbae\ntest    eax, eax                                                       ; +0xc3, 0x1401bfbb3\njz      short loc_1401BFBD5                                            ; +0xc5, 0x1401bfbb5\nlea     rdx, [rsp+48h+arg_0]                                           ; +0xc7, 0x1401bfbb7\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xcc, 0x1401bfbbc\nxorps   xmm2, xmm2                                                     ; +0xd2, 0x1401bfbc2\nmov     rcx, rdi                                                       ; +0xd5, 0x1401bfbc5\nmov     rdx, rax                                                       ; +0xd8, 0x1401bfbc8\ncall    EditorUI__findSnapObject                                       ; +0xdb, 0x1401bfbcb\njmp     loc_1401BFCD0                                                  ; +0xe0, 0x1401bfbd0\ncmp     [rdi+620h], rsi                                                ; +0xe5, 0x1401bfbd5\njnz     short loc_1401BFC15                                            ; +0xec, 0x1401bfbdc\nlea     rdx, [rdi+5F0h]                                                ; +0xee, 0x1401bfbde\nmov     byte ptr [rdi+2E2h], 1                                         ; +0xf5, 0x1401bfbe5\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xfc, 0x1401bfbec\nmov     rdx, rax                                                       ; +0x102, 0x1401bfbf2\nmov     rcx, rdi                                                       ; +0x105, 0x1401bfbf5\ncall    EditorUI__clickOnPosition                                      ; +0x108, 0x1401bfbf8\ncmp     [rbx], sil                                                     ; +0x10d, 0x1401bfbfd\njz      loc_1401BFCD0                                                  ; +0x110, 0x1401bfc00\nmov     rax, [rdi+620h]                                                ; +0x116, 0x1401bfc06\nmov     [r15], rax                                                     ; +0x11d, 0x1401bfc0d\njmp     loc_1401BFCD0                                                  ; +0x120, 0x1401bfc10\nmov     rbx, [r14]                                                     ; +0x125, 0x1401bfc15\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x128, 0x1401bfc18\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x12d, 0x1401bfc1d\nmov     rdx, rax                                                       ; +0x133, 0x1401bfc23\nmov     rcx, rbx                                                       ; +0x136, 0x1401bfc26\ncall    LevelEditorLayer__objectsAtPosition                            ; +0x139, 0x1401bfc29\nmov     rcx, rax                                                       ; +0x13e, 0x1401bfc2e\nmov     rbx, rax                                                       ; +0x141, 0x1401bfc31\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x144, 0x1401bfc34\ntest    eax, eax                                                       ; +0x14a, 0x1401bfc3a\njz      short loc_1401BFC78                                            ; +0x14c, 0x1401bfc3c\nxchg    ax, ax                                                         ; +0x14e, 0x1401bfc3e\nmov     edx, esi                                                       ; +0x150, 0x1401bfc40\nmov     rcx, rbx                                                       ; +0x152, 0x1401bfc42\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x155, 0x1401bfc45\nmov     rcx, [rdi+620h]                                                ; +0x15b, 0x1401bfc4b\nmov     edx, [rcx+39Ch]                                                ; +0x162, 0x1401bfc52\ncmp     [rax+39Ch], edx                                                ; +0x168, 0x1401bfc58\njz      short loc_1401BFC71                                            ; +0x16e, 0x1401bfc5e\nmov     rcx, rbx                                                       ; +0x170, 0x1401bfc60\ninc     esi                                                            ; +0x173, 0x1401bfc63\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x175, 0x1401bfc65\ncmp     esi, eax                                                       ; +0x17b, 0x1401bfc6b\njb      short loc_1401BFC40                                            ; +0x17d, 0x1401bfc6d\njmp     short loc_1401BFC78                                            ; +0x17f, 0x1401bfc6f\nmov     [rdi+628h], rax                                                ; +0x181, 0x1401bfc71\ncmp     qword ptr [rdi+628h], 0                                        ; +0x188, 0x1401bfc78\njnz     short loc_1401BFCD0                                            ; +0x190, 0x1401bfc80\ncmp     qword ptr [rdi+620h], 0                                        ; +0x192, 0x1401bfc82\njz      short loc_1401BFC95                                            ; +0x19a, 0x1401bfc8a\ncmp     byte ptr [rdi+38Ch], 0                                         ; +0x19c, 0x1401bfc8c\njnz     short loc_1401BFCD0                                            ; +0x1a3, 0x1401bfc93\nlea     rdx, [rdi+5F0h]                                                ; +0x1a5, 0x1401bfc95\nmov     byte ptr [rdi+2E2h], 1                                         ; +0x1ac, 0x1401bfc9c\nlea     rcx, [rsp+48h+arg_8]                                           ; +0x1b3, 0x1401bfca3\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x1b8, 0x1401bfca8\nmov     rdx, rax                                                       ; +0x1be, 0x1401bfcae\nmov     rcx, rdi                                                       ; +0x1c1, 0x1401bfcb1\ncall    EditorUI__clickOnPosition                                      ; +0x1c4, 0x1401bfcb4\ncmp     byte ptr [rdi+392h], 0                                         ; +0x1c9, 0x1401bfcb9\njz      short loc_1401BFCD0                                            ; +0x1d0, 0x1401bfcc0\nmov     rax, [rdi+620h]                                                ; +0x1d2, 0x1401bfcc2\nmov     [rdi+628h], rax                                                ; +0x1d9, 0x1401bfcc9\ncmp     byte ptr [rdi+632h], 0                                         ; +0x1e0, 0x1401bfcd0\njz      short loc_1401BFD12                                            ; +0x1e7, 0x1401bfcd7\ncmp     qword ptr [rdi+628h], 0                                        ; +0x1e9, 0x1401bfcd9\njnz     short loc_1401BFD12                                            ; +0x1f1, 0x1401bfce1\nmov     rcx, [rdi+3B0h]                                                ; +0x1f3, 0x1401bfce3\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1fa, 0x1401bfcea\ntest    eax, eax                                                       ; +0x200, 0x1401bfcf0\njz      short loc_1401BFD12                                            ; +0x202, 0x1401bfcf2\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x204, 0x1401bfcf4\nlea     rcx, [rsp+48h+arg_8]                                           ; +0x209, 0x1401bfcf9\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x20e, 0x1401bfcfe\nxorps   xmm2, xmm2                                                     ; +0x214, 0x1401bfd04\nmov     rcx, rdi                                                       ; +0x217, 0x1401bfd07\nmov     rdx, rax                                                       ; +0x21a, 0x1401bfd0a\ncall    EditorUI__findSnapObject                                       ; +0x21d, 0x1401bfd0d\nmov     rcx, [rdi+628h]                                                ; +0x222, 0x1401bfd12\ntest    rcx, rcx                                                       ; +0x229, 0x1401bfd19\njz      short loc_1401BFD3E                                            ; +0x22c, 0x1401bfd1c\nmov     byte ptr [rdi+391h], 1                                         ; +0x22e, 0x1401bfd1e\nmov     rax, [rcx]                                                     ; +0x235, 0x1401bfd25\ncall    qword ptr [rax+0C8h]                                           ; +0x238, 0x1401bfd28\nmov     rdx, rax                                                       ; +0x23e, 0x1401bfd2e\nlea     rcx, [rdi+3A8h]                                                ; +0x241, 0x1401bfd31\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x248, 0x1401bfd38\nlea     rcx, [rdi+610h]                                                ; +0x24e, 0x1401bfd3e\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x255, 0x1401bfd45\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x25a, 0x1401bfd4a\ncmp     byte ptr [rdi+2E1h], 0                                         ; +0x260, 0x1401bfd50\njnz     short loc_1401BFD97                                            ; +0x267, 0x1401bfd57\nmov     r8b, 1                                                         ; +0x269, 0x1401bfd59\nmov     rcx, rdi                                                       ; +0x26c, 0x1401bfd5c\ncall    EditorUI__createUndoObject                                     ; +0x26f, 0x1401bfd5f\nmov     rbx, rax                                                       ; +0x274, 0x1401bfd64\ncmp     [rdi+2D8h], rax                                                ; +0x277, 0x1401bfd67\njz      short loc_1401BFD97                                            ; +0x27e, 0x1401bfd6e\ntest    rax, rax                                                       ; +0x280, 0x1401bfd70\njz      short loc_1401BFD7E                                            ; +0x283, 0x1401bfd73\nmov     rcx, rax                                                       ; +0x285, 0x1401bfd75\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x288, 0x1401bfd78\nmov     rcx, [rdi+2D8h]                                                ; +0x28e, 0x1401bfd7e\ntest    rcx, rcx                                                       ; +0x295, 0x1401bfd85\njz      short loc_1401BFD90                                            ; +0x298, 0x1401bfd88\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x29a, 0x1401bfd8a\nmov     [rdi+2D8h], rbx                                                ; +0x2a0, 0x1401bfd90\nmov     rbx, [rsp+48h+arg_10]                                          ; +0x2a7, 0x1401bfd97\nadd     rsp, 20h                                                       ; +0x2ac, 0x1401bfd9c\npop     r15                                                            ; +0x2b0, 0x1401bfda0\npop     r14                                                            ; +0x2b2, 0x1401bfda2\npop     rdi                                                            ; +0x2b4, 0x1401bfda4\npop     rsi                                                            ; +0x2b5, 0x1401bfda5\npop     rbp                                                            ; +0x2b6, 0x1401bfda6\nretn                                                                   ; +0x2b7, 0x1401bfda7", "xrefs": ["EditorUI::finishTouchDelay @ 0x1401bfecd", "EditorUI::ccTouchBegan @ 0x1401c0311", "<???> @ 0x14091a660"], "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"}