{"type": "func", "start": 5369636576, "end": 5369636972, "name": "EditorUI::clickOnPosition", "pseudocode": "// \n// EditorUI::clickOnPosition from 0x1400e26e0 to 0x1400e286c (396 bytes)\n// \n// 8 xrefs:\n// > EditorUI::ccTouchBegan @ 0x140123b60\n// > EditorUI::ccTouchBegan @ 0x140123c28\n// > EditorUI::ccTouchMoved @ 0x1401244b3\n// > EditorUI::ccTouchEnded @ 0x1401251cb\n// > <???> @ 0x14066e568\n// > <???> @ 0x14066e57c\n// > <???> @ 0x14066e58c\n// > <???> @ 0x1406c8b8c\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::clickOnPosition(EditorUI *a1, cocos2d::CCPoint a2)\n{\n  struct cocos2d::CCPoint v3; // rax\n  cocos2d::CCObject *v4; // rdx\n  int m_selectedMode; // eax\n  cocos2d::CCPoint v6; // rax\n  GameObject *v7; // rax\n  cocos2d::CCPoint v8; // rax\n  GameObject *v9; // rax\n  GameObject *m_selectedObject; // rdx\n  GameObject *v11; // rdi\n  bool v12; // r8\n  cocos2d::CCPoint v13; // [rsp+30h] [rbp+8h] BYREF\n\n  if ( a1->m_toolbarHeight <= *(float *)(*(_QWORD *)&a2 + 4LL) )\n  {\n    v3 = cocos2d::CCNode::convertToNodeSpace(a1->m_editorLayer->m_objectLayer, &v13);\n    ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&a1->m_clickAtPosition, v3);\n    m_selectedMode = a1->m_selectedMode;\n    switch ( m_selectedMode )\n    {\n      case 1:\n        EditorUI::onDelete(a1, v4);\n        EditorUI::updateButtons(a1);\n        return;\n      case 2:\n        if ( !EditorUI::onCreate(a1) && !a1->m_swipeEnabled )\n        {\n          cocos2d::CCPoint::CCPoint(&v13, &a1->m_clickAtPosition);\n          v7 = LevelEditorLayer::objectAtPosition(a1->m_editorLayer, v6);\n          if ( v7 )\n          {\n            a1->m_selectedObjectIndex = v7->m_objectID;\n            EditorUI::updateCreateMenu(a1, 1);\n            EditorUI::updateButtons(a1);\n            return;\n          }\n        }\n        break;\n      case 3:\n        cocos2d::CCPoint::CCPoint(&v13, &a1->m_clickAtPosition);\n        v9 = LevelEditorLayer::objectAtPosition(a1->m_editorLayer, v8);\n        v11 = v9;\n        if ( v9 )\n        {\n          m_selectedObject = a1->m_selectedObject;\n          if ( !m_selectedObject || m_selectedObject->m_uniqueID != v9->m_uniqueID )\n          {\n            EditorUI::createUndoSelectObject(a1, 0);\n            EditorUI::selectObject(a1, v11, v12);\n          }\n        }\n        if ( a1->m_selectedMode == 3 )\n          LOBYTE(m_selectedObject) = 1;\n        else\n          m_selectedObject = nullptr;\n        a1->m_editButtonBar->setVisible(a1->m_editButtonBar, (bool)m_selectedObject);\n        EditorUI::updateObjectInfoLabel(a1);\n        a1->updateScaleControl(&a1->GJScaleControlDelegate);\n        break;\n    }\n    EditorUI::updateButtons(a1);\n  }\n}", "assembly": "; \n; EditorUI::clickOnPosition from 0x1400e26e0 to 0x1400e286c (396 bytes)\n; \n; 8 xrefs:\n; > EditorUI::ccTouchBegan @ 0x140123b60\n; > EditorUI::ccTouchBegan @ 0x140123c28\n; > EditorUI::ccTouchMoved @ 0x1401244b3\n; > EditorUI::ccTouchEnded @ 0x1401251cb\n; > <???> @ 0x14066e568\n; > <???> @ 0x14066e57c\n; > <???> @ 0x14066e58c\n; > <???> @ 0x1406c8b8c\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, 0x1400e26e0\nsub     rsp, 20h                                                       ; +0x2, 0x1400e26e2\nmovss   xmm0, dword ptr [rcx+318h]                                     ; +0x6, 0x1400e26e6\nmov     rbx, rcx                                                       ; +0xe, 0x1400e26ee\ncomiss  xmm0, dword ptr [rdx+4]                                        ; +0x11, 0x1400e26f1\nja      loc_1400E2866                                                  ; +0x15, 0x1400e26f5\nmov     rax, [rcx+500h]                                                ; +0x1b, 0x1400e26fb\nmov     r8, rdx                                                        ; +0x22, 0x1400e2702\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x25, 0x1400e2705\nmov     [rsp+28h+arg_8], rdi                                           ; +0x2a, 0x1400e270a\nmov     rcx, [rax+0FE8h]                                               ; +0x2f, 0x1400e270f\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x36, 0x1400e2716\nmov     rdx, rax                                                       ; +0x3c, 0x1400e271c\nlea     rcx, [rbx+530h]                                                ; +0x3f, 0x1400e271f\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x46, 0x1400e2726\nmov     eax, [rbx+4F8h]                                                ; +0x4c, 0x1400e272c\ncmp     eax, 1                                                         ; +0x52, 0x1400e2732\njnz     short loc_1400E2751                                            ; +0x55, 0x1400e2735\nmov     rcx, rbx                                                       ; +0x57, 0x1400e2737\ncall    EditorUI__onDelete                                             ; +0x5a, 0x1400e273a\nmov     rcx, rbx                                                       ; +0x5f, 0x1400e273f\nmov     rdi, [rsp+28h+arg_8]                                           ; +0x62, 0x1400e2742\nadd     rsp, 20h                                                       ; +0x67, 0x1400e2747\npop     rbx                                                            ; +0x6b, 0x1400e274b\njmp     EditorUI__updateButtons                                        ; +0x6c, 0x1400e274c\ncmp     eax, 2                                                         ; +0x71, 0x1400e2751\njnz     short loc_1400E27C4                                            ; +0x74, 0x1400e2754\nmov     rcx, rbx                                                       ; +0x76, 0x1400e2756\ncall    EditorUI__onCreate                                             ; +0x79, 0x1400e2759\ntest    al, al                                                         ; +0x7e, 0x1400e275e\njnz     loc_1400E2859                                                  ; +0x80, 0x1400e2760\ncmp     [rbx+31Ch], al                                                 ; +0x86, 0x1400e2766\njnz     loc_1400E2859                                                  ; +0x8c, 0x1400e276c\nlea     rdx, [rbx+530h]                                                ; +0x92, 0x1400e2772\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x99, 0x1400e2779\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x9e, 0x1400e277e\nmov     rcx, [rbx+500h]                                                ; +0xa4, 0x1400e2784\nmov     rdx, rax                                                       ; +0xab, 0x1400e278b\ncall    LevelEditorLayer__objectAtPosition                             ; +0xae, 0x1400e278e\ntest    rax, rax                                                       ; +0xb3, 0x1400e2793\njz      loc_1400E2859                                                  ; +0xb6, 0x1400e2796\nmov     eax, [rax+40Ch]                                                ; +0xbc, 0x1400e279c\nmov     dl, 1                                                          ; +0xc2, 0x1400e27a2\nmov     rcx, rbx                                                       ; +0xc4, 0x1400e27a4\nmov     [rbx+4D8h], eax                                                ; +0xc7, 0x1400e27a7\ncall    EditorUI__updateCreateMenu                                     ; +0xcd, 0x1400e27ad\nmov     rcx, rbx                                                       ; +0xd2, 0x1400e27b2\nmov     rdi, [rsp+28h+arg_8]                                           ; +0xd5, 0x1400e27b5\nadd     rsp, 20h                                                       ; +0xda, 0x1400e27ba\npop     rbx                                                            ; +0xde, 0x1400e27be\njmp     EditorUI__updateButtons                                        ; +0xdf, 0x1400e27bf\ncmp     eax, 3                                                         ; +0xe4, 0x1400e27c4\njnz     loc_1400E2859                                                  ; +0xe7, 0x1400e27c7\nlea     rdx, [rbx+530h]                                                ; +0xed, 0x1400e27cd\nlea     rcx, [rsp+28h+arg_0]                                           ; +0xf4, 0x1400e27d4\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xf9, 0x1400e27d9\nmov     rcx, [rbx+500h]                                                ; +0xff, 0x1400e27df\nmov     rdx, rax                                                       ; +0x106, 0x1400e27e6\ncall    LevelEditorLayer__objectAtPosition                             ; +0x109, 0x1400e27e9\nmov     rdi, rax                                                       ; +0x10e, 0x1400e27ee\ntest    rax, rax                                                       ; +0x111, 0x1400e27f1\njz      short loc_1400E2825                                            ; +0x114, 0x1400e27f4\nmov     rdx, [rbx+538h]                                                ; +0x116, 0x1400e27f6\ntest    rdx, rdx                                                       ; +0x11d, 0x1400e27fd\njz      short loc_1400E2810                                            ; +0x120, 0x1400e2800\nmov     ecx, [rax+39Ch]                                                ; +0x122, 0x1400e2802\ncmp     [rdx+39Ch], ecx                                                ; +0x128, 0x1400e2808\njz      short loc_1400E2825                                            ; +0x12e, 0x1400e280e\nxor     edx, edx                                                       ; +0x130, 0x1400e2810\nmov     rcx, rbx                                                       ; +0x132, 0x1400e2812\ncall    EditorUI__createUndoSelectObject                               ; +0x135, 0x1400e2815\nmov     rdx, rdi                                                       ; +0x13a, 0x1400e281a\nmov     rcx, rbx                                                       ; +0x13d, 0x1400e281d\ncall    EditorUI__selectObject                                         ; +0x140, 0x1400e2820\ncmp     dword ptr [rbx+4F8h], 3                                        ; +0x145, 0x1400e2825\nmov     rcx, [rbx+300h]                                                ; +0x14c, 0x1400e282c\nmov     rax, [rcx]                                                     ; +0x153, 0x1400e2833\njz      short loc_1400E283C                                            ; +0x156, 0x1400e2836\nxor     edx, edx                                                       ; +0x158, 0x1400e2838\njmp     short loc_1400E283E                                            ; +0x15a, 0x1400e283a\nmov     dl, 1                                                          ; +0x15c, 0x1400e283c\ncall    qword ptr [rax+140h]                                           ; +0x15e, 0x1400e283e\nmov     rcx, rbx                                                       ; +0x164, 0x1400e2844\ncall    EditorUI__updateObjectInfoLabel                                ; +0x167, 0x1400e2847\nlea     rcx, [rbx+1B0h]                                                ; +0x16c, 0x1400e284c\nmov     rax, [rcx]                                                     ; +0x173, 0x1400e2853\ncall    qword ptr [rax+28h]                                            ; +0x176, 0x1400e2856\nmov     rcx, rbx                                                       ; +0x179, 0x1400e2859\ncall    EditorUI__updateButtons                                        ; +0x17c, 0x1400e285c\nmov     rdi, [rsp+28h+arg_8]                                           ; +0x181, 0x1400e2861\nadd     rsp, 20h                                                       ; +0x186, 0x1400e2866\npop     rbx                                                            ; +0x18a, 0x1400e286a\nretn                                                                   ; +0x18b, 0x1400e286b", "xrefs": ["EditorUI::ccTouchBegan @ 0x140123b60", "EditorUI::ccTouchBegan @ 0x140123c28", "EditorUI::ccTouchMoved @ 0x1401244b3", "EditorUI::ccTouchEnded @ 0x1401251cb", "<???> @ 0x14066e568", "<???> @ 0x14066e57c", "<???> @ 0x14066e58c", "<???> @ 0x1406c8b8c"], "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"}