{"type": "func", "start": 6442542176, "end": 6442542646, "name": "cocos2d::extension::CCTableView::ccTouchBegan", "pseudocode": "// \n// cocos2d::extension::CCTableView::ccTouchBegan from 0x180016460 to 0x180016636 (470 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x180028850\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004a908\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\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; // rbx\n  signed int v12; // ebp\n  float *v13; // rax\n  int v14; // eax\n  char *v15; // rbx\n  unsigned int v16; // edx\n  __int64 *v17; // rax\n  __int64 *v18; // r8\n  __int64 *v19; // 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) + 328LL))((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) + 304LL))(*((_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_9;\n      if ( v14 < 0 )\n        v16 = 0;\n      if ( (int)v16 <= v12 )\n      {\nLABEL_9:\n        if ( v16 != -1 )\n        {\n          v17 = **((__int64 ***)this + 34);\n          v18 = v17;\n          v19 = (__int64 *)v17[1];\n          while ( !*((_BYTE *)v19 + 25) )\n          {\n            if ( *((_DWORD *)v19 + 7) >= v16 )\n            {\n              v18 = v19;\n              v19 = (__int64 *)*v19;\n            }\n            else\n            {\n              v19 = (__int64 *)v19[2];\n            }\n          }\n          if ( !*((_BYTE *)v18 + 25) && v16 >= *((_DWORD *)v18 + 7) && v18 != v17 )\n          {\n            v20 = cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(\n                    *((cocos2d::extension::CCArrayForObjectSorting **)this + 38),\n                    v16);\n            if ( v20 )\n              v15 = (char *)v20 - 320;\n          }\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    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 0x180016460 to 0x180016636 (470 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x180028850\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004a908\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\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x180016460\npush    rbp                                                            ; +0x5, 0x180016465\npush    rsi                                                            ; +0x6, 0x180016466\npush    rdi                                                            ; +0x7, 0x180016467\nsub     rsp, 30h                                                       ; +0x8, 0x180016468\nlea     rsi, [rcx-140h]                                                ; +0xc, 0x18001646c\nmov     rdi, rcx                                                       ; +0x13, 0x180016473\nmov     rax, [rsi]                                                     ; +0x16, 0x180016476\nmov     rcx, rsi                                                       ; +0x19, 0x180016479\nmov     rbp, r8                                                        ; +0x1c, 0x18001647c\nmov     rbx, rdx                                                       ; +0x1f, 0x18001647f\ncall    qword ptr [rax+148h]                                           ; +0x22, 0x180016482\ntest    al, al                                                         ; +0x28, 0x180016488\njnz     short loc_180016499                                            ; +0x2a, 0x18001648a\nmov     rbx, [rsp+48h+arg_10]                                          ; +0x2c, 0x18001648c\nadd     rsp, 30h                                                       ; +0x31, 0x180016491\npop     rdi                                                            ; +0x35, 0x180016495\npop     rsi                                                            ; +0x36, 0x180016496\npop     rbp                                                            ; +0x37, 0x180016497\nretn                                                                   ; +0x38, 0x180016498\nmov     r8, rbp; struct cocos2d::CCEvent *                             ; +0x39, 0x180016499\nmov     [rsp+48h+arg_8], r14                                           ; +0x3c, 0x18001649c\nmov     rdx, rbx; struct cocos2d::CCTouch *                            ; +0x41, 0x1800164a1\nmov     rcx, rdi; this                                                 ; +0x44, 0x1800164a4\ncall    ?ccTouchBegan@CCScrollView@extension@cocos2d@@UEAA_NPEAVCCTouch@3@PEAVCCEvent@3@@Z; cocos2d::extension::CCScrollView::ccTouchBegan(cocos2d::CCTouch *,cocos2d::CCEvent *) ; +0x47, 0x1800164a7\nmov     rcx, [rdi+0B8h]                                                ; +0x4c, 0x1800164ac\nmovzx   r14d, al                                                       ; +0x53, 0x1800164b3\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x57, 0x1800164b7\ncmp     eax, 1                                                         ; +0x5d, 0x1800164bd\njnz     loc_1800165F6                                                  ; +0x60, 0x1800164c0\nlea     rcx, [rsp+48h+arg_0]                                           ; +0x66, 0x1800164c6\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x6b, 0x1800164cb\nmov     rcx, [rdi+80h]                                                 ; +0x71, 0x1800164d1\nlea     rdx, [rsp+48h+arg_18]                                          ; +0x78, 0x1800164d8\nmov     r8, rbx                                                        ; +0x7d, 0x1800164dd\ncall    cs:?convertTouchToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@PEAVCCTouch@2@@Z; cocos2d::CCNode::convertTouchToNodeSpace(cocos2d::CCTouch *) ; +0x80, 0x1800164e0\nmov     rdx, rax                                                       ; +0x86, 0x1800164e6\nlea     rcx, [rsp+48h+arg_0]                                           ; +0x89, 0x1800164e9\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x8e, 0x1800164ee\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x94, 0x1800164f4\nlea     rcx, [rsp+48h+arg_18]                                          ; +0x99, 0x1800164f9\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x9e, 0x1800164fe\nmov     rcx, [rsi+280h]                                                ; +0xa4, 0x180016504\nmov     rdx, rsi                                                       ; +0xab, 0x18001650b\nmov     rbx, rax                                                       ; +0xae, 0x18001650e\nmov     r8, [rcx]                                                      ; +0xb1, 0x180016511\ncall    qword ptr [r8+20h]                                             ; +0xb4, 0x180016514\ncmp     dword ptr [rsi+248h], 0                                        ; +0xb8, 0x180016518\nlea     ebp, [rax-1]                                                   ; +0xbf, 0x18001651f\njnz     short loc_180016543                                            ; +0xc2, 0x180016522\nmov     rcx, [rsi+1C0h]                                                ; +0xc4, 0x180016524\nmov     rdx, [rcx]                                                     ; +0xcb, 0x18001652b\ncall    qword ptr [rdx+130h]                                           ; +0xce, 0x18001652e\nmovss   xmm0, dword ptr [rax+4]                                        ; +0xd4, 0x180016534\nsubss   xmm0, dword ptr [rbx+4]                                        ; +0xd9, 0x180016539\nmovss   dword ptr [rbx+4], xmm0                                        ; +0xde, 0x18001653e\nmov     rdx, rbx                                                       ; +0xe3, 0x180016543\nlea     rcx, [rsp+48h+var_28]                                          ; +0xe6, 0x180016546\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xeb, 0x18001654b\nmov     rdx, rax                                                       ; +0xf1, 0x180016551\nmov     rcx, rsi                                                       ; +0xf4, 0x180016554\ncall    ?__indexFromOffset@CCTableView@extension@cocos2d@@IEAAHVCCPoint@3@@Z; cocos2d::extension::CCTableView::__indexFromOffset(cocos2d::CCPoint) ; +0xf7, 0x180016557\nxor     ebx, ebx                                                       ; +0xfc, 0x18001655c\nmov     edx, eax                                                       ; +0xfe, 0x18001655e\ncmp     eax, 0FFFFFFFFh                                                ; +0x100, 0x180016560\njz      short loc_180016572                                            ; +0x103, 0x180016563\ntest    eax, eax                                                       ; +0x105, 0x180016565\ncmovs   edx, ebx; unsigned int                                         ; +0x107, 0x180016567\ncmp     edx, ebp                                                       ; +0x10a, 0x18001656a\njg      loc_180016619                                                  ; +0x10c, 0x18001656c\ncmp     edx, 0FFFFFFFFh                                                ; +0x112, 0x180016572\njz      loc_180016619                                                  ; +0x115, 0x180016575\nmov     rax, [rdi+110h]                                                ; +0x11b, 0x18001657b\nmov     rax, [rax]                                                     ; +0x122, 0x180016582\nmov     r8, rax                                                        ; +0x125, 0x180016585\nmov     rcx, [rax+8]                                                   ; +0x128, 0x180016588\ncmp     [rcx+19h], bl                                                  ; +0x12c, 0x18001658c\njnz     short loc_1800165A7                                            ; +0x12f, 0x18001658f\ncmp     [rcx+1Ch], edx                                                 ; +0x131, 0x180016591\njnb     short loc_18001659C                                            ; +0x134, 0x180016594\nmov     rcx, [rcx+10h]                                                 ; +0x136, 0x180016596\njmp     short loc_1800165A2                                            ; +0x13a, 0x18001659a\nmov     r8, rcx                                                        ; +0x13c, 0x18001659c\nmov     rcx, [rcx]                                                     ; +0x13f, 0x18001659f\ncmp     [rcx+19h], bl                                                  ; +0x142, 0x1800165a2\njz      short loc_180016591                                            ; +0x145, 0x1800165a5\ncmp     [r8+19h], bl                                                   ; +0x147, 0x1800165a7\njnz     short loc_1800165D0                                            ; +0x14b, 0x1800165ab\ncmp     edx, [r8+1Ch]                                                  ; +0x14d, 0x1800165ad\njb      short loc_1800165D0                                            ; +0x151, 0x1800165b1\ncmp     r8, rax                                                        ; +0x153, 0x1800165b3\njz      short loc_1800165D0                                            ; +0x156, 0x1800165b6\nmov     rcx, [rdi+130h]; this                                          ; +0x158, 0x1800165b8\ncall    ?objectWithObjectID@CCArrayForObjectSorting@extension@cocos2d@@QEAAPEAVCCSortableObject@23@I@Z; cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(uint) ; +0x15f, 0x1800165bf\ntest    rax, rax                                                       ; +0x164, 0x1800165c4\njz      short loc_1800165D0                                            ; +0x167, 0x1800165c7\nlea     rbx, [rax-140h]                                                ; +0x169, 0x1800165c9\nmov     [rdi+100h], rbx                                                ; +0x170, 0x1800165d0\ntest    rbx, rbx                                                       ; +0x177, 0x1800165d7\njz      short loc_180016620                                            ; +0x17a, 0x1800165da\nmov     rcx, [rdi+148h]                                                ; +0x17c, 0x1800165dc\ntest    rcx, rcx                                                       ; +0x183, 0x1800165e3\njz      short loc_180016620                                            ; +0x186, 0x1800165e6\nmov     rax, [rcx]                                                     ; +0x188, 0x1800165e8\nmov     r8, rbx                                                        ; +0x18b, 0x1800165eb\nmov     rdx, rsi                                                       ; +0x18e, 0x1800165ee\ncall    qword ptr [rax+20h]                                            ; +0x191, 0x1800165f1\njmp     short loc_180016620                                            ; +0x194, 0x1800165f4\nmov     r8, [rdi+100h]                                                 ; +0x196, 0x1800165f6\ntest    r8, r8                                                         ; +0x19d, 0x1800165fd\njz      short loc_180016620                                            ; +0x1a0, 0x180016600\nmov     rcx, [rdi+148h]                                                ; +0x1a2, 0x180016602\ntest    rcx, rcx                                                       ; +0x1a9, 0x180016609\njz      short loc_180016617                                            ; +0x1ac, 0x18001660c\nmov     rax, [rcx]                                                     ; +0x1ae, 0x18001660e\nmov     rdx, rsi                                                       ; +0x1b1, 0x180016611\ncall    qword ptr [rax+28h]                                            ; +0x1b4, 0x180016614\nxor     ebx, ebx                                                       ; +0x1b7, 0x180016617\nmov     [rdi+100h], rbx                                                ; +0x1b9, 0x180016619\nmov     rbx, [rsp+48h+arg_10]                                          ; +0x1c0, 0x180016620\nmovzx   eax, r14b                                                      ; +0x1c5, 0x180016625\nmov     r14, [rsp+48h+arg_8]                                           ; +0x1c9, 0x180016629\nadd     rsp, 30h                                                       ; +0x1ce, 0x18001662e\npop     rdi                                                            ; +0x1d2, 0x180016632\npop     rsi                                                            ; +0x1d3, 0x180016633\npop     rbp                                                            ; +0x1d4, 0x180016634\nretn                                                                   ; +0x1d5, 0x180016635", "xrefs": ["<???> @ 0x180028850", "<???> @ 0x18002fdf8", "<???> @ 0x18004a908"], "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"}