{"type": "func", "start": 5369072592, "end": 5369072946, "name": "CCTextInputNode::ccTouchBegan", "pseudocode": "// \n// CCTextInputNode::ccTouchBegan from 0x140058bd0 to 0x140058d32 (354 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x14070d5a0\n// > <???> @ 0x1409104c0\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:25:41 +0000\n// \n\nchar __fastcall CCTextInputNode::ccTouchBegan(__int64 a1, __int64 a2)\n{\n  __int64 v2; // rdi\n  __int64 i; // rbx\n  __int64 v6; // rax\n  __int64 v7; // rax\n  __int64 v8; // rdx\n  __int64 v9; // rcx\n  __int64 v11; // rcx\n  float *v12; // rax\n  _BYTE v13[40]; // [rsp+30h] [rbp-28h] BYREF\n  char v14; // [rsp+60h] [rbp+8h] BYREF\n  char v15; // [rsp+78h] [rbp+20h] BYREF\n\n  v2 = a1 - 320;\n  if ( CCTextInputNode::isVisibleInTree(a1 - 320) )\n  {\n    cocos2d::CCTouch::getLocation(a2, &v14);\n    if ( v2 )\n    {\n      for ( i = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 504LL))(v2);\n            i;\n            i = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)i + 504LL))(i) )\n      {\n        v6 = _RTDynamicCast(\n               i,\n               0,\n               &cocos2d::CCNode `RTTI Type Descriptor',\n               &cocos2d::CCTouchClipper `RTTI Type Descriptor',\n               0);\n        if ( v6 )\n        {\n          if ( !(*(unsigned __int8 (__fastcall **)(__int64, char *))(*(_QWORD *)v6 + 8LL))(v6, &v14) )\n            return 0;\n        }\n      }\n    }\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)&v14);\n    if ( CCTextInputNode::containsTouchPoint(v2, v7) )\n    {\n      v9 = *(_QWORD *)(a1 + 336);\n      if ( v9 )\n      {\n        ScrollableContentLayer::handleTouchBegan(v9, a2);\nLABEL_10:\n        cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)&v14);\n        return 1;\n      }\n      v11 = *(_QWORD *)(a1 + 280);\n      if ( !v11 || (*(unsigned __int8 (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 40LL))(v11, v2) )\n      {\n        LOBYTE(v8) = 1;\n        (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 1032LL))(v2, v8);\n        cocos2d::CCRect::CCRect((cocos2d::CCRect *)v13, (const struct cocos2d::CCRect *)&unk_140909B68);\n        cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)&v14);\n        CCTextInputNode::updateCursorPosition(v2, v12);\n        goto LABEL_10;\n      }\n    }\n  }\n  return 0;\n}", "assembly": "; \n; CCTextInputNode::ccTouchBegan from 0x140058bd0 to 0x140058d32 (354 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x14070d5a0\n; > <???> @ 0x1409104c0\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:25:41 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140058bd0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140058bd5\npush    rsi                                                            ; +0xa, 0x140058bda\npush    rdi                                                            ; +0xb, 0x140058bdb\npush    r14                                                            ; +0xc, 0x140058bdc\nsub     rsp, 40h                                                       ; +0xe, 0x140058bde\nlea     rdi, [rcx-140h]                                                ; +0x12, 0x140058be2\nmov     rsi, rcx                                                       ; +0x19, 0x140058be9\nmov     rcx, rdi                                                       ; +0x1c, 0x140058bec\nmov     rbp, rdx                                                       ; +0x1f, 0x140058bef\ncall    CCTextInputNode__isVisibleInTree                               ; +0x22, 0x140058bf2\ntest    al, al                                                         ; +0x27, 0x140058bf7\njz      loc_140058D1D                                                  ; +0x29, 0x140058bf9\nlea     rdx, [rsp+58h+arg_0]                                           ; +0x2f, 0x140058bff\nmov     rcx, rbp                                                       ; +0x34, 0x140058c04\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x37, 0x140058c07\ntest    rdi, rdi                                                       ; +0x3d, 0x140058c0d\njz      short loc_140058C80                                            ; +0x40, 0x140058c10\nmov     rax, [rdi]                                                     ; +0x42, 0x140058c12\nmov     rcx, rdi                                                       ; +0x45, 0x140058c15\ncall    qword ptr [rax+1F8h]                                           ; +0x48, 0x140058c18\nmov     rbx, rax                                                       ; +0x4e, 0x140058c1e\ntest    rax, rax                                                       ; +0x51, 0x140058c21\njz      short loc_140058C80                                            ; +0x54, 0x140058c24\nxor     r14d, r14d                                                     ; +0x56, 0x140058c26\nnop     dword ptr [rax+00000000h]                                      ; +0x59, 0x140058c29\nlea     r9, ??_R0?AVCCTouchClipper@cocos2d@@@8; cocos2d::CCTouchClipper `RTTI Type Descriptor' ; +0x60, 0x140058c30\nmov     [rsp+58h+var_38], r14d                                         ; +0x67, 0x140058c37\nlea     r8, ??_R0?AVCCNode@cocos2d@@@8; cocos2d::CCNode `RTTI Type Descriptor' ; +0x6c, 0x140058c3c\nxor     edx, edx                                                       ; +0x73, 0x140058c43\nmov     rcx, rbx                                                       ; +0x75, 0x140058c45\ncall    __RTDynamicCast                                                ; +0x78, 0x140058c48\ntest    rax, rax                                                       ; +0x7d, 0x140058c4d\njz      short loc_140058C6C                                            ; +0x80, 0x140058c50\nmov     rcx, [rax]                                                     ; +0x82, 0x140058c52\nlea     rdx, [rsp+58h+arg_0]                                           ; +0x85, 0x140058c55\nmov     r8, [rcx+8]                                                    ; +0x8a, 0x140058c5a\nmov     rcx, rax                                                       ; +0x8e, 0x140058c5e\ncall    r8                                                             ; +0x91, 0x140058c61\ntest    al, al                                                         ; +0x94, 0x140058c64\njz      loc_140058D1D                                                  ; +0x96, 0x140058c66\nmov     rax, [rbx]                                                     ; +0x9c, 0x140058c6c\nmov     rcx, rbx                                                       ; +0x9f, 0x140058c6f\ncall    qword ptr [rax+1F8h]                                           ; +0xa2, 0x140058c72\nmov     rbx, rax                                                       ; +0xa8, 0x140058c78\ntest    rax, rax                                                       ; +0xab, 0x140058c7b\njnz     short loc_140058C30                                            ; +0xae, 0x140058c7e\nlea     rdx, [rsp+58h+arg_0]                                           ; +0xb0, 0x140058c80\nlea     rcx, [rsp+58h+arg_18]                                          ; +0xb5, 0x140058c85\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xba, 0x140058c8a\nmov     rdx, rax                                                       ; +0xc0, 0x140058c90\nmov     rcx, rdi                                                       ; +0xc3, 0x140058c93\ncall    CCTextInputNode__containsTouchPoint                            ; +0xc6, 0x140058c96\ntest    al, al                                                         ; +0xcb, 0x140058c9b\njz      short loc_140058D1D                                            ; +0xcd, 0x140058c9d\nmov     rcx, [rsi+150h]                                                ; +0xcf, 0x140058c9f\ntest    rcx, rcx                                                       ; +0xd6, 0x140058ca6\njz      short loc_140058CC7                                            ; +0xd9, 0x140058ca9\nmov     rdx, rbp                                                       ; +0xdb, 0x140058cab\ncall    ScrollableContentLayer__handleTouchBegan                       ; +0xde, 0x140058cae\nlea     rdx, [rsp+58h+arg_0]                                           ; +0xe3, 0x140058cb3\nlea     rcx, [rsp+58h+arg_18]                                          ; +0xe8, 0x140058cb8\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xed, 0x140058cbd\nmov     al, 1                                                          ; +0xf3, 0x140058cc3\njmp     short loc_140058D1F                                            ; +0xf5, 0x140058cc5\nmov     rcx, [rsi+118h]                                                ; +0xf7, 0x140058cc7\ntest    rcx, rcx                                                       ; +0xfe, 0x140058cce\njz      short loc_140058CE0                                            ; +0x101, 0x140058cd1\nmov     rax, [rcx]                                                     ; +0x103, 0x140058cd3\nmov     rdx, rdi                                                       ; +0x106, 0x140058cd6\ncall    qword ptr [rax+28h]                                            ; +0x109, 0x140058cd9\ntest    al, al                                                         ; +0x10c, 0x140058cdc\njz      short loc_140058D1D                                            ; +0x10e, 0x140058cde\nmov     rax, [rdi]                                                     ; +0x110, 0x140058ce0\nmov     dl, 1                                                          ; +0x113, 0x140058ce3\nmov     rcx, rdi                                                       ; +0x115, 0x140058ce5\ncall    qword ptr [rax+408h]                                           ; +0x118, 0x140058ce8\nlea     rdx, unk_140909B68                                             ; +0x11e, 0x140058cee\nlea     rcx, [rsp+58h+var_28]                                          ; +0x125, 0x140058cf5\ncall    cs:??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0x12a, 0x140058cfa\nlea     rdx, [rsp+58h+arg_0]                                           ; +0x130, 0x140058d00\nlea     rcx, [rsp+58h+arg_18]                                          ; +0x135, 0x140058d05\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x13a, 0x140058d0a\nmov     rdx, rax                                                       ; +0x140, 0x140058d10\nmov     rcx, rdi                                                       ; +0x143, 0x140058d13\ncall    CCTextInputNode__updateCursorPosition                          ; +0x146, 0x140058d16\njmp     short loc_140058CB3                                            ; +0x14b, 0x140058d1b\nxor     al, al                                                         ; +0x14d, 0x140058d1d\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x14f, 0x140058d1f\nmov     rbp, [rsp+58h+arg_10]                                          ; +0x154, 0x140058d24\nadd     rsp, 40h                                                       ; +0x159, 0x140058d29\npop     r14                                                            ; +0x15d, 0x140058d2d\npop     rdi                                                            ; +0x15f, 0x140058d2f\npop     rsi                                                            ; +0x160, 0x140058d30\nretn                                                                   ; +0x161, 0x140058d31", "xrefs": ["<???> @ 0x14070d5a0", "<???> @ 0x1409104c0"], "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"}