{"type": "func", "start": 6442541264, "end": 6442541739, "name": "cocos2d::extension::CCTableView::ccTouchBegan", "pseudocode": "// \n// cocos2d::extension::CCTableView::ccTouchBegan from 0x1800160d0 to 0x1800162ab (475 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x18002aef8\n// > <???> @ 0x180032408\n// > <???> @ 0x18004c830\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:15:41 +0000\n// \n\n__int64 __fastcall cocos2d::extension::CCTableView::ccTouchBegan(\n        cocos2d::extension::CCTableView *this,\n        struct cocos2d::CCTouch *a2,\n        struct cocos2d::CCEvent *a3)\n{\n  char *v3; // rsi\n  __int64 result; // rax\n  unsigned __int8 v8; // r14\n  __int64 v9; // rax\n  float *v10; // rax\n  float *v11; // rdi\n  signed int v12; // ebp\n  float *v13; // rax\n  int v14; // eax\n  char *v15; // rdi\n  unsigned int v16; // edx\n  __int64 *v17; // rax\n  __int64 *v18; // r8\n  __int64 *i; // rcx\n  struct cocos2d::extension::CCSortableObject *v20; // rax\n  __int64 v21; // rcx\n  __int64 v22; // rcx\n  char v23[40]; // [rsp+20h] [rbp-28h] BYREF\n  char v24; // [rsp+50h] [rbp+8h] BYREF\n  char v25; // [rsp+68h] [rbp+20h] BYREF\n\n  v3 = (char *)this - 320;\n  result = (*(__int64 (__fastcall **)(char *))(*((_QWORD *)this - 40) + 344LL))((char *)this - 320);\n  if ( (_BYTE)result )\n  {\n    v8 = cocos2d::extension::CCScrollView::ccTouchBegan(this, a2, a3);\n    if ( cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 23)) == 1 )\n    {\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v24);\n      v9 = cocos2d::CCNode::convertTouchToNodeSpace(*((_QWORD *)this + 16), &v25, a2);\n      cocos2d::CCPoint::operator=(&v24, v9);\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, (const struct cocos2d::CCPoint *)&v24);\n      v11 = v10;\n      v12 = (*(__int64 (__fastcall **)(_QWORD, char *))(**((_QWORD **)v3 + 80) + 32LL))(*((_QWORD *)v3 + 80), v3) - 1;\n      if ( !*((_DWORD *)v3 + 146) )\n        v11[1] = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)v3 + 56) + 320LL))(*((_QWORD *)v3 + 56))\n                          + 4)\n               - v11[1];\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, (const struct cocos2d::CCPoint *)v11);\n      v14 = cocos2d::extension::CCTableView::__indexFromOffset((__int64)v3, v13);\n      v15 = nullptr;\n      v16 = v14;\n      if ( v14 == -1 )\n        goto LABEL_16;\n      if ( v14 < 0 )\n        v16 = 0;\n      if ( (int)v16 <= v12 )\n      {\nLABEL_16:\n        if ( v16 != -1 )\n        {\n          v17 = **((__int64 ***)this + 34);\n          v18 = v17;\n          for ( i = (__int64 *)v17[1]; !*((_BYTE *)i + 25); i = (__int64 *)*i )\n          {\n            if ( *((_DWORD *)i + 7) >= v16 )\n              v18 = i;\n            else\n              i += 2;\n          }\n          if ( !*((_BYTE *)v18 + 25) && v16 >= *((_DWORD *)v18 + 7) )\n          {\n            if ( v18 == v17 )\n              goto LABEL_20;\n            v20 = cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(\n                    *((cocos2d::extension::CCArrayForObjectSorting **)this + 38),\n                    v16);\n            if ( v20 )\n            {\n              v15 = (char *)v20 - 320;\nLABEL_20:\n              *((_QWORD *)this + 32) = v15;\n              if ( v15 )\n              {\n                v21 = *((_QWORD *)this + 41);\n                if ( v21 )\n                  (*(void (__fastcall **)(__int64, char *, char *))(*(_QWORD *)v21 + 32LL))(v21, v3, v15);\n              }\n              return v8;\n            }\n          }\n        }\n      }\n    }\n    else\n    {\n      if ( !*((_QWORD *)this + 32) )\n        return v8;\n      v22 = *((_QWORD *)this + 41);\n      if ( v22 )\n        (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v22 + 40LL))(v22, v3);\n    }\n    *((_QWORD *)this + 32) = 0;\n    return v8;\n  }\n  return result;\n}", "assembly": "; \n; cocos2d::extension::CCTableView::ccTouchBegan from 0x1800160d0 to 0x1800162ab (475 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x18002aef8\n; > <???> @ 0x180032408\n; > <???> @ 0x18004c830\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:15:41 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1800160d0\npush    rbp                                                            ; +0x5, 0x1800160d5\npush    rsi                                                            ; +0x6, 0x1800160d6\npush    rdi                                                            ; +0x7, 0x1800160d7\nsub     rsp, 30h                                                       ; +0x8, 0x1800160d8\nlea     rsi, [rcx-140h]                                                ; +0xc, 0x1800160dc\nmov     rbx, rcx                                                       ; +0x13, 0x1800160e3\nmov     rax, [rsi]                                                     ; +0x16, 0x1800160e6\nmov     rcx, rsi                                                       ; +0x19, 0x1800160e9\nmov     rbp, r8                                                        ; +0x1c, 0x1800160ec\nmov     rdi, rdx                                                       ; +0x1f, 0x1800160ef\ncall    qword ptr [rax+158h]                                           ; +0x22, 0x1800160f2\ntest    al, al                                                         ; +0x28, 0x1800160f8\njnz     short loc_180016109                                            ; +0x2a, 0x1800160fa\nmov     rbx, [rsp+48h+arg_10]                                          ; +0x2c, 0x1800160fc\nadd     rsp, 30h                                                       ; +0x31, 0x180016101\npop     rdi                                                            ; +0x35, 0x180016105\npop     rsi                                                            ; +0x36, 0x180016106\npop     rbp                                                            ; +0x37, 0x180016107\nretn                                                                   ; +0x38, 0x180016108\nmov     r8, rbp; struct cocos2d::CCEvent *                             ; +0x39, 0x180016109\nmov     [rsp+48h+arg_8], r14                                           ; +0x3c, 0x18001610c\nmov     rdx, rdi; struct cocos2d::CCTouch *                            ; +0x41, 0x180016111\nmov     rcx, rbx; this                                                 ; +0x44, 0x180016114\ncall    ?ccTouchBegan@CCScrollView@extension@cocos2d@@UEAA_NPEAVCCTouch@3@PEAVCCEvent@3@@Z; cocos2d::extension::CCScrollView::ccTouchBegan(cocos2d::CCTouch *,cocos2d::CCEvent *) ; +0x47, 0x180016117\nmov     rcx, [rbx+0B8h]                                                ; +0x4c, 0x18001611c\nmovzx   r14d, al                                                       ; +0x53, 0x180016123\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x57, 0x180016127\ncmp     eax, 1                                                         ; +0x5d, 0x18001612d\njnz     loc_18001626B                                                  ; +0x60, 0x180016130\nlea     rcx, [rsp+48h+arg_0]                                           ; +0x66, 0x180016136\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x6b, 0x18001613b\nmov     rcx, [rbx+80h]                                                 ; +0x71, 0x180016141\nlea     rdx, [rsp+48h+arg_18]                                          ; +0x78, 0x180016148\nmov     r8, rdi                                                        ; +0x7d, 0x18001614d\ncall    cs:?convertTouchToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@PEAVCCTouch@2@@Z; cocos2d::CCNode::convertTouchToNodeSpace(cocos2d::CCTouch *) ; +0x80, 0x180016150\nmov     rdx, rax                                                       ; +0x86, 0x180016156\nlea     rcx, [rsp+48h+arg_0]                                           ; +0x89, 0x180016159\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x8e, 0x18001615e\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x94, 0x180016164\nlea     rcx, [rsp+48h+arg_18]                                          ; +0x99, 0x180016169\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x9e, 0x18001616e\nmov     rcx, [rsi+280h]                                                ; +0xa4, 0x180016174\nmov     rdi, rax                                                       ; +0xab, 0x18001617b\nmov     rdx, [rcx]                                                     ; +0xae, 0x18001617e\nmov     r8, [rdx+20h]                                                  ; +0xb1, 0x180016181\nmov     rdx, rsi                                                       ; +0xb5, 0x180016185\ncall    r8                                                             ; +0xb8, 0x180016188\ncmp     dword ptr [rsi+248h], 0                                        ; +0xbb, 0x18001618b\nlea     ebp, [rax-1]                                                   ; +0xc2, 0x180016192\njnz     short loc_1800161B6                                            ; +0xc5, 0x180016195\nmov     rcx, [rsi+1C0h]                                                ; +0xc7, 0x180016197\nmov     rdx, [rcx]                                                     ; +0xce, 0x18001619e\ncall    qword ptr [rdx+140h]                                           ; +0xd1, 0x1800161a1\nmovss   xmm0, dword ptr [rax+4]                                        ; +0xd7, 0x1800161a7\nsubss   xmm0, dword ptr [rdi+4]                                        ; +0xdc, 0x1800161ac\nmovss   dword ptr [rdi+4], xmm0                                        ; +0xe1, 0x1800161b1\nmov     rdx, rdi                                                       ; +0xe6, 0x1800161b6\nlea     rcx, [rsp+48h+var_28]                                          ; +0xe9, 0x1800161b9\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xee, 0x1800161be\nmov     rdx, rax                                                       ; +0xf4, 0x1800161c4\nmov     rcx, rsi                                                       ; +0xf7, 0x1800161c7\ncall    ?__indexFromOffset@CCTableView@extension@cocos2d@@IEAAHVCCPoint@3@@Z; cocos2d::extension::CCTableView::__indexFromOffset(cocos2d::CCPoint) ; +0xfa, 0x1800161ca\nxor     edi, edi                                                       ; +0xff, 0x1800161cf\nmov     edx, eax                                                       ; +0x101, 0x1800161d1\ncmp     eax, 0FFFFFFFFh                                                ; +0x103, 0x1800161d3\njz      short loc_1800161E5                                            ; +0x106, 0x1800161d6\ntest    eax, eax                                                       ; +0x108, 0x1800161d8\ncmovs   edx, edi; unsigned int                                         ; +0x10a, 0x1800161da\ncmp     edx, ebp                                                       ; +0x10d, 0x1800161dd\njg      loc_18001628E                                                  ; +0x10f, 0x1800161df\ncmp     edx, 0FFFFFFFFh                                                ; +0x115, 0x1800161e5\njz      loc_18001628E                                                  ; +0x118, 0x1800161e8\nmov     rax, [rbx+110h]                                                ; +0x11e, 0x1800161ee\nmov     rax, [rax]                                                     ; +0x125, 0x1800161f5\nmov     r8, rax                                                        ; +0x128, 0x1800161f8\nmov     rcx, [rax+8]                                                   ; +0x12b, 0x1800161fb\ncmp     [rcx+19h], dil                                                 ; +0x12f, 0x1800161ff\njnz     short loc_18001621C                                            ; +0x133, 0x180016203\ncmp     [rcx+1Ch], edx                                                 ; +0x135, 0x180016205\njnb     short loc_180016210                                            ; +0x138, 0x180016208\nadd     rcx, 10h                                                       ; +0x13a, 0x18001620a\njmp     short loc_180016213                                            ; +0x13e, 0x18001620e\nmov     r8, rcx                                                        ; +0x140, 0x180016210\nmov     rcx, [rcx]                                                     ; +0x143, 0x180016213\ncmp     [rcx+19h], dil                                                 ; +0x146, 0x180016216\njz      short loc_180016205                                            ; +0x14a, 0x18001621a\ncmp     [r8+19h], dil                                                  ; +0x14c, 0x18001621c\njnz     short loc_18001628E                                            ; +0x150, 0x180016220\ncmp     edx, [r8+1Ch]                                                  ; +0x152, 0x180016222\njb      short loc_18001628E                                            ; +0x156, 0x180016226\ncmp     r8, rax                                                        ; +0x158, 0x180016228\njz      short loc_180016245                                            ; +0x15b, 0x18001622b\nmov     rcx, [rbx+130h]; this                                          ; +0x15d, 0x18001622d\ncall    ?objectWithObjectID@CCArrayForObjectSorting@extension@cocos2d@@QEAAPEAVCCSortableObject@23@I@Z; cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(uint) ; +0x164, 0x180016234\ntest    rax, rax                                                       ; +0x169, 0x180016239\njz      short loc_18001628E                                            ; +0x16c, 0x18001623c\nlea     rdi, [rax-140h]                                                ; +0x16e, 0x18001623e\nmov     [rbx+100h], rdi                                                ; +0x175, 0x180016245\ntest    rdi, rdi                                                       ; +0x17c, 0x18001624c\njz      short loc_180016295                                            ; +0x17f, 0x18001624f\nmov     rcx, [rbx+148h]                                                ; +0x181, 0x180016251\ntest    rcx, rcx                                                       ; +0x188, 0x180016258\njz      short loc_180016295                                            ; +0x18b, 0x18001625b\nmov     rax, [rcx]                                                     ; +0x18d, 0x18001625d\nmov     r8, rdi                                                        ; +0x190, 0x180016260\nmov     rdx, rsi                                                       ; +0x193, 0x180016263\ncall    qword ptr [rax+20h]                                            ; +0x196, 0x180016266\njmp     short loc_180016295                                            ; +0x199, 0x180016269\nmov     r8, [rbx+100h]                                                 ; +0x19b, 0x18001626b\ntest    r8, r8                                                         ; +0x1a2, 0x180016272\njz      short loc_180016295                                            ; +0x1a5, 0x180016275\nmov     rcx, [rbx+148h]                                                ; +0x1a7, 0x180016277\ntest    rcx, rcx                                                       ; +0x1ae, 0x18001627e\njz      short loc_18001628C                                            ; +0x1b1, 0x180016281\nmov     rax, [rcx]                                                     ; +0x1b3, 0x180016283\nmov     rdx, rsi                                                       ; +0x1b6, 0x180016286\ncall    qword ptr [rax+28h]                                            ; +0x1b9, 0x180016289\nxor     edi, edi                                                       ; +0x1bc, 0x18001628c\nmov     [rbx+100h], rdi                                                ; +0x1be, 0x18001628e\nmov     rbx, [rsp+48h+arg_10]                                          ; +0x1c5, 0x180016295\nmovzx   eax, r14b                                                      ; +0x1ca, 0x18001629a\nmov     r14, [rsp+48h+arg_8]                                           ; +0x1ce, 0x18001629e\nadd     rsp, 30h                                                       ; +0x1d3, 0x1800162a3\npop     rdi                                                            ; +0x1d7, 0x1800162a7\npop     rsi                                                            ; +0x1d8, 0x1800162a8\npop     rbp                                                            ; +0x1d9, 0x1800162a9\nretn                                                                   ; +0x1da, 0x1800162aa", "xrefs": ["<???> @ 0x18002aef8", "<???> @ 0x180032408", "<???> @ 0x18004c830"], "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"}