{"type": "func", "start": 4295410240, "end": 4295410817, "name": "CCTextInputNode::ccTouchBegan", "pseudocode": "// \n// CCTextInputNode::ccTouchBegan from 0x10006c240 to 0x10006c481 (577 bytes)\n// \n// 2 xrefs:\n// > sub_10006C4A0 @ 0x10006c4ac\n// > <???> @ 0x100aba1b0\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 12:19:45 +0000\n// \n\nchar __fastcall CCTextInputNode::ccTouchBegan(__int64 a1, __int64 a2)\n{\n  __int64 v3; // rax\n  __int64 v4; // r14\n  __int64 v5; // rax\n  const void *v6; // r15\n  void *v7; // rax\n  __int64 v8; // rsi\n  __int64 v9; // rax\n  double v10; // xmm0_8\n  double v11; // xmm2_8\n  double v12; // xmm3_8\n  double v13; // xmm1_8\n  __int64 v14; // rdi\n  __int64 v15; // rdi\n  _BYTE v17[8]; // [rsp+8h] [rbp-68h] BYREF\n  float v18; // [rsp+10h] [rbp-60h] BYREF\n  _BYTE v19[16]; // [rsp+18h] [rbp-58h] BYREF\n  __int64 v20; // [rsp+28h] [rbp-48h]\n  float v21; // [rsp+30h] [rbp-40h] BYREF\n  float v22; // [rsp+34h] [rbp-3Ch]\n  _DWORD v23[2]; // [rsp+38h] [rbp-38h] BYREF\n  _BYTE v24[48]; // [rsp+40h] [rbp-30h] BYREF\n\n  if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 352LL))(a1) )\n  {\n    v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 512LL))(a1);\n    if ( v3 )\n    {\n      v4 = v3;\n      while ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v4 + 352LL))(v4) )\n      {\n        v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 512LL))(v4);\n        if ( !v4 )\n          goto LABEL_6;\n      }\n      return 0;\n    }\nLABEL_6:\n    v20 = a2;\n    cocos2d::CCTouch::getLocation((__int64)v24, a2);\n    v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 512LL))(a1);\n    if ( v5 )\n    {\n      v6 = (const void *)v5;\n      do\n      {\n        v7 = __dynamic_cast(\n               v6,\n               (const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,\n               (const struct __class_type_info *)&`typeinfo for'cocos2d::CCTouchClipper,\n               -2);\n        if ( v7 )\n        {\n          if ( !(*(unsigned __int8 (__fastcall **)(void *, _BYTE *))(*(_QWORD *)v7 + 16LL))(v7, v24) )\n            return 0;\n        }\n        v6 = (const void *)(*(__int64 (__fastcall **)(const void *))(*(_QWORD *)v6 + 512LL))(v6);\n      }\n      while ( v6 );\n    }\n    sub_1002782D0(v17, v24);\n    cocos2d::CCNode::convertToNodeSpace(&v18, a1, v17);\n    v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1);\n    sub_100278630(&v21, v8);\n    v9 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 576) + 304LL))(*(_QWORD *)(a1 + 576));\n    sub_1002782D0(v23, v9);\n    *(_QWORD *)&v10 = v23[0] ^ 0x8000000080000000LL;\n    *(_QWORD *)&v11 = *(unsigned int *)(a1 + 628);\n    *(_QWORD *)&v12 = *(unsigned int *)(a1 + 632);\n    *(float *)&v10 = (float)(*(float *)&v10 * v21) - *(float *)&v11;\n    *(_QWORD *)&v13 = v23[1] ^ 0x8000000080000000LL;\n    *(float *)&v13 = (float)(*(float *)&v13 * v22) - *(float *)&v12;\n    *(float *)&v11 = (float)(*(float *)&v11 + *(float *)&v11) + v21;\n    *(float *)&v12 = (float)(*(float *)&v12 + *(float *)&v12) + v22;\n    sub_100278270(v19, v10, v13, v11, v12);\n    if ( (unsigned __int8)sub_100278940(v19, &v18) )\n    {\n      v14 = *(_QWORD *)(a1 + 640);\n      if ( v14 )\n      {\n        ScrollableContentLayer::handleTouchBegan(v14, v20);\nLABEL_18:\n        sub_1002782D0(v19, v24);\n        return 1;\n      }\n      v15 = *(_QWORD *)(a1 + 584);\n      if ( !v15 || (*(unsigned __int8 (__fastcall **)(__int64, __int64))(*(_QWORD *)v15 + 40LL))(v15, a1) )\n      {\n        (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1160LL))(a1, 1);\n        sub_1002782D0(&v18, v24);\n        sub_1002787F0(v19, &unk_100BE1030);\n        CCTextInputNode::updateCursorPosition(a1, &v18);\n        goto LABEL_18;\n      }\n    }\n  }\n  return 0;\n}", "assembly": "; \n; CCTextInputNode::ccTouchBegan from 0x10006c240 to 0x10006c481 (577 bytes)\n; \n; 2 xrefs:\n; > sub_10006C4A0 @ 0x10006c4ac\n; > <???> @ 0x100aba1b0\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 12:19:45 +0000\n; \npush    rbp                                                            ; +0x0, 0x10006c240\nmov     rbp, rsp                                                       ; +0x1, 0x10006c241\npush    r15                                                            ; +0x4, 0x10006c244\npush    r14                                                            ; +0x6, 0x10006c246\npush    r13                                                            ; +0x8, 0x10006c248\npush    r12                                                            ; +0xa, 0x10006c24a\npush    rbx                                                            ; +0xc, 0x10006c24c\nsub     rsp, 48h                                                       ; +0xd, 0x10006c24d\nmov     r15, rsi                                                       ; +0x11, 0x10006c251\nmov     rbx, rdi                                                       ; +0x14, 0x10006c254\nmov     rax, [rdi]                                                     ; +0x17, 0x10006c257\ncall    qword ptr [rax+160h]                                           ; +0x1a, 0x10006c25a\ntest    al, al                                                         ; +0x20, 0x10006c260\njz      loc_10006C470                                                  ; +0x22, 0x10006c262\nmov     rax, [rbx]                                                     ; +0x28, 0x10006c268\nmov     rdi, rbx                                                       ; +0x2b, 0x10006c26b\ncall    qword ptr [rax+200h]                                           ; +0x2e, 0x10006c26e\ntest    rax, rax                                                       ; +0x34, 0x10006c274\njz      short loc_10006C2A8                                            ; +0x37, 0x10006c277\nmov     r14, rax                                                       ; +0x39, 0x10006c279\nnop     dword ptr [rax+00h]                                            ; +0x3c, 0x10006c27c\nmov     rax, [r14]                                                     ; +0x40, 0x10006c280\nmov     rdi, r14                                                       ; +0x43, 0x10006c283\ncall    qword ptr [rax+160h]                                           ; +0x46, 0x10006c286\ntest    al, al                                                         ; +0x4c, 0x10006c28c\njz      loc_10006C470                                                  ; +0x4e, 0x10006c28e\nmov     rax, [r14]                                                     ; +0x54, 0x10006c294\nmov     rdi, r14                                                       ; +0x57, 0x10006c297\ncall    qword ptr [rax+200h]                                           ; +0x5a, 0x10006c29a\nmov     r14, rax                                                       ; +0x60, 0x10006c2a0\ntest    rax, rax                                                       ; +0x63, 0x10006c2a3\njnz     short loc_10006C280                                            ; +0x66, 0x10006c2a6\nlea     rdi, [rbp+var_30]                                              ; +0x68, 0x10006c2a8\nmov     [rbp+var_48], r15                                              ; +0x6c, 0x10006c2ac\nmov     rsi, r15                                                       ; +0x70, 0x10006c2b0\ncall    cocos2d__CCTouch__getLocation                                  ; +0x73, 0x10006c2b3\nmov     rax, [rbx]                                                     ; +0x78, 0x10006c2b8\nmov     rdi, rbx                                                       ; +0x7b, 0x10006c2bb\ncall    qword ptr [rax+200h]                                           ; +0x7e, 0x10006c2be\ntest    rax, rax                                                       ; +0x84, 0x10006c2c4\njz      short loc_10006C323                                            ; +0x87, 0x10006c2c7\nmov     r15, rax                                                       ; +0x89, 0x10006c2c9\nlea     r12, _ZTIN7cocos2d6CCNodeE; `typeinfo for'cocos2d::CCNode      ; +0x8c, 0x10006c2cc\nmov     r13, cs:__ZTIN7cocos2d14CCTouchClipperE_ptr                    ; +0x93, 0x10006c2d3\nlea     r14, [rbp+var_30]                                              ; +0x9a, 0x10006c2da\njmp     short loc_10006C2F4                                            ; +0x9e, 0x10006c2de\nmov     rax, [r15]                                                     ; +0xa0, 0x10006c2e0\nmov     rdi, r15                                                       ; +0xa3, 0x10006c2e3\ncall    qword ptr [rax+200h]                                           ; +0xa6, 0x10006c2e6\nmov     r15, rax                                                       ; +0xac, 0x10006c2ec\ntest    rax, rax                                                       ; +0xaf, 0x10006c2ef\njz      short loc_10006C323                                            ; +0xb2, 0x10006c2f2\nmov     rdi, r15; lpsrc                                                ; +0xb4, 0x10006c2f4\nmov     rsi, r12; lpstype                                              ; +0xb7, 0x10006c2f7\nmov     rdx, r13; lpdtype                                              ; +0xba, 0x10006c2fa\nmov     rcx, 0FFFFFFFFFFFFFFFEh; s2d                                   ; +0xbd, 0x10006c2fd\ncall    ___dynamic_cast                                                ; +0xc4, 0x10006c304\ntest    rax, rax                                                       ; +0xc9, 0x10006c309\njz      short loc_10006C2E0                                            ; +0xcc, 0x10006c30c\nmov     rcx, [rax]                                                     ; +0xce, 0x10006c30e\nmov     rdi, rax                                                       ; +0xd1, 0x10006c311\nmov     rsi, r14                                                       ; +0xd4, 0x10006c314\ncall    qword ptr [rcx+10h]                                            ; +0xd7, 0x10006c317\ntest    al, al                                                         ; +0xda, 0x10006c31a\njnz     short loc_10006C2E0                                            ; +0xdc, 0x10006c31c\njmp     loc_10006C470                                                  ; +0xde, 0x10006c31e\nlea     r14, [rbp+var_68]                                              ; +0xe3, 0x10006c323\nlea     rsi, [rbp+var_30]                                              ; +0xe7, 0x10006c327\nmov     rdi, r14                                                       ; +0xeb, 0x10006c32b\ncall    sub_1002782D0                                                  ; +0xee, 0x10006c32e\nlea     r15, [rbp+var_60]                                              ; +0xf3, 0x10006c333\nmov     rdi, r15                                                       ; +0xf7, 0x10006c337\nmov     rsi, rbx                                                       ; +0xfa, 0x10006c33a\nmov     rdx, r14                                                       ; +0xfd, 0x10006c33d\ncall    cocos2d__CCNode__convertToNodeSpace                            ; +0x100, 0x10006c340\nmov     rax, [rbx]                                                     ; +0x105, 0x10006c345\nmov     rdi, rbx                                                       ; +0x108, 0x10006c348\ncall    qword ptr [rax+148h]                                           ; +0x10b, 0x10006c34b\nlea     rdi, [rbp+var_40]                                              ; +0x111, 0x10006c351\nmov     rsi, rax                                                       ; +0x115, 0x10006c355\ncall    sub_100278630                                                  ; +0x118, 0x10006c358\nmov     rdi, [rbx+240h]                                                ; +0x11d, 0x10006c35d\nmov     rax, [rdi]                                                     ; +0x124, 0x10006c364\ncall    qword ptr [rax+130h]                                           ; +0x127, 0x10006c367\nlea     rdi, [rbp+var_38]                                              ; +0x12d, 0x10006c36d\nmov     rsi, rax                                                       ; +0x131, 0x10006c371\ncall    sub_1002782D0                                                  ; +0x134, 0x10006c374\nmovaps  xmm4, cs:xmmword_100A035F0                                     ; +0x139, 0x10006c379\nmovss   xmm0, [rbp+var_38]                                             ; +0x140, 0x10006c380\nmovss   xmm1, [rbp+var_34]                                             ; +0x145, 0x10006c385\nxorps   xmm0, xmm4                                                     ; +0x14a, 0x10006c38a\nmovss   xmm5, [rbp+var_40]                                             ; +0x14d, 0x10006c38d\nmovss   xmm6, [rbp+var_3C]                                             ; +0x152, 0x10006c392\nmulss   xmm0, xmm5                                                     ; +0x157, 0x10006c397\nmovss   xmm2, dword ptr [rbx+274h]                                     ; +0x15b, 0x10006c39b\nmovss   xmm3, dword ptr [rbx+278h]                                     ; +0x163, 0x10006c3a3\nsubss   xmm0, xmm2                                                     ; +0x16b, 0x10006c3ab\nxorps   xmm1, xmm4                                                     ; +0x16f, 0x10006c3af\nmulss   xmm1, xmm6                                                     ; +0x172, 0x10006c3b2\nsubss   xmm1, xmm3                                                     ; +0x176, 0x10006c3b6\naddss   xmm2, xmm2                                                     ; +0x17a, 0x10006c3ba\naddss   xmm2, xmm5                                                     ; +0x17e, 0x10006c3be\naddss   xmm3, xmm3                                                     ; +0x182, 0x10006c3c2\naddss   xmm3, xmm6                                                     ; +0x186, 0x10006c3c6\nlea     r14, [rbp+var_58]                                              ; +0x18a, 0x10006c3ca\nmov     rdi, r14                                                       ; +0x18e, 0x10006c3ce\ncall    sub_100278270                                                  ; +0x191, 0x10006c3d1\nmov     rdi, r14                                                       ; +0x196, 0x10006c3d6\nmov     rsi, r15                                                       ; +0x199, 0x10006c3d9\ncall    sub_100278940                                                  ; +0x19c, 0x10006c3dc\ntest    al, al                                                         ; +0x1a1, 0x10006c3e1\njz      loc_10006C470                                                  ; +0x1a3, 0x10006c3e3\nmov     rdi, [rbx+280h]                                                ; +0x1a9, 0x10006c3e9\ntest    rdi, rdi                                                       ; +0x1b0, 0x10006c3f0\njz      short loc_10006C408                                            ; +0x1b3, 0x10006c3f3\nmov     rsi, [rbp+var_48]                                              ; +0x1b5, 0x10006c3f5\ncall    ScrollableContentLayer__handleTouchBegan                       ; +0x1b9, 0x10006c3f9\nlea     rdi, [rbp+var_58]                                              ; +0x1be, 0x10006c3fe\nlea     rsi, [rbp+var_30]                                              ; +0x1c2, 0x10006c402\njmp     short loc_10006C467                                            ; +0x1c6, 0x10006c406\nmov     rdi, [rbx+248h]                                                ; +0x1c8, 0x10006c408\ntest    rdi, rdi                                                       ; +0x1cf, 0x10006c40f\njz      short loc_10006C421                                            ; +0x1d2, 0x10006c412\nmov     rax, [rdi]                                                     ; +0x1d4, 0x10006c414\nmov     rsi, rbx                                                       ; +0x1d7, 0x10006c417\ncall    qword ptr [rax+28h]                                            ; +0x1da, 0x10006c41a\ntest    al, al                                                         ; +0x1dd, 0x10006c41d\njz      short loc_10006C470                                            ; +0x1df, 0x10006c41f\nmov     rax, [rbx]                                                     ; +0x1e1, 0x10006c421\nmov     rdi, rbx                                                       ; +0x1e4, 0x10006c424\nmov     esi, 1                                                         ; +0x1e7, 0x10006c427\ncall    qword ptr [rax+488h]                                           ; +0x1ec, 0x10006c42c\nlea     r14, [rbp+var_60]                                              ; +0x1f2, 0x10006c432\nlea     r15, [rbp+var_30]                                              ; +0x1f6, 0x10006c436\nmov     rdi, r14                                                       ; +0x1fa, 0x10006c43a\nmov     rsi, r15                                                       ; +0x1fd, 0x10006c43d\ncall    sub_1002782D0                                                  ; +0x200, 0x10006c440\nlea     rsi, unk_100BE1030                                             ; +0x205, 0x10006c445\nlea     rdi, [rbp+var_58]                                              ; +0x20c, 0x10006c44c\ncall    sub_1002787F0                                                  ; +0x210, 0x10006c450\nmov     rdi, rbx                                                       ; +0x215, 0x10006c455\nmov     rsi, r14                                                       ; +0x218, 0x10006c458\ncall    CCTextInputNode__updateCursorPosition                          ; +0x21b, 0x10006c45b\nlea     rdi, [rbp+var_58]                                              ; +0x220, 0x10006c460\nmov     rsi, r15                                                       ; +0x224, 0x10006c464\ncall    sub_1002782D0                                                  ; +0x227, 0x10006c467\nmov     al, 1                                                          ; +0x22c, 0x10006c46c\njmp     short loc_10006C472                                            ; +0x22e, 0x10006c46e\nxor     eax, eax                                                       ; +0x230, 0x10006c470\nadd     rsp, 48h                                                       ; +0x232, 0x10006c472\npop     rbx                                                            ; +0x236, 0x10006c476\npop     r12                                                            ; +0x237, 0x10006c477\npop     r13                                                            ; +0x239, 0x10006c479\npop     r14                                                            ; +0x23b, 0x10006c47b\npop     r15                                                            ; +0x23d, 0x10006c47d\npop     rbp                                                            ; +0x23f, 0x10006c47f\nretn                                                                   ; +0x240, 0x10006c480", "xrefs": ["sub_10006C4A0 @ 0x10006c4ac", "<???> @ 0x100aba1b0"], "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"}