{"type": "func", "start": 6442890944, "end": 6442891374, "name": "cocos2d::CCEGLViewProtocol::getSetOfTouchesEndOrCancel", "pseudocode": "// \n// cocos2d::CCEGLViewProtocol::getSetOfTouchesEndOrCancel from 0x18006b6c0 to 0x18006b86e (430 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCEGLViewProtocol::handleTouchesCancel @ 0x18006bbfc\n// > cocos2d::CCEGLViewProtocol::handleTouchesEnd @ 0x18006bc9c\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3df8\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 __fastcall cocos2d::CCEGLViewProtocol::getSetOfTouchesEndOrCancel(\n        cocos2d::CCEGLViewProtocol *this,\n        struct cocos2d::CCSet *a2,\n        int a3,\n        char *a4,\n        float *const a5,\n        float *const a6,\n        double a7)\n{\n  cocos2d::CCSet *v7; // rbx\n  cocos2d::CCEGLViewProtocol *v8; // r15\n  __int64 v9; // r12\n  float *v10; // rdi\n  __int64 v11; // rsi\n  signed __int64 v12; // rax\n  signed __int64 v13; // r13\n  __int64 v14; // r14\n  float v15; // xmm7_4\n  float v16; // xmm6_4\n  struct cocos2d::CCObject *v17; // rax\n  struct cocos2d::CCObject *v18; // rbp\n  __int64 v19; // rax\n  __int64 v20; // rbx\n  float v21; // xmm6_4\n  float v22; // xmm7_4\n  bool v23; // zf\n  __int64 v24; // rcx\n  float *v27; // [rsp+B0h] [rbp+28h]\n\n  v7 = a2;\n  v8 = this;\n  v9 = a3;\n  if ( a3 > 0 )\n  {\n    v10 = a6;\n    v11 = 0;\n    v12 = (char *)a5 - (char *)a6;\n    v27 = (float *)((char *)a5 - (char *)a6);\n    v13 = a4 - (char *)a6;\n    do\n    {\n      v14 = *(int *)((char *)v10 + v13);\n      v15 = *(float *)((char *)v10 + v12);\n      v16 = *v10;\n      v17 = cocos2d::CCDictionary::objectForKey(&unk_1801A8430, v14);\n      v18 = v17;\n      if ( v17 )\n      {\n        v19 = SLODWORD(v17[1].__vftable);\n        v20 = qword_1801A8480[v19];\n        if ( !v20 )\n          return;\n        v21 = (float)(v16 - v8->m_obViewPortRect.origin.y) / v8->m_fScaleY;\n        v22 = (float)(v15 - v8->m_obViewPortRect.origin.x) / v8->m_fScaleX;\n        *(_DWORD *)(v20 + 56) = v19;\n        cocos2d::CCSize::operator=((_DWORD *)(v20 + 80), (_DWORD *)(v20 + 72));\n        v23 = *(_BYTE *)(v20 + 60) == 0;\n        *(float *)(v20 + 72) = v22;\n        *(float *)(v20 + 76) = v21;\n        if ( v23 )\n        {\n          cocos2d::CCSize::operator=((_DWORD *)(v20 + 64), (_DWORD *)(v20 + 72));\n          *(_BYTE *)(v20 + 60) = 1;\n        }\n        *(double *)(v20 + 88) = a7;\n        cocos2d::CCSet::addObject(a2, (struct cocos2d::CCObject *)v20);\n        cocos2d::CCObject::release((cocos2d::CCObject *)v20);\n        v24 = SLODWORD(v18[1].__vftable);\n        qword_1801A8480[v24] = 0;\n        if ( (unsigned int)v24 <= 4 )\n          dword_1801A84A8 &= ~(1 << v24);\n        cocos2d::CCDictionary::removeObjectForKey(&unk_1801A8430, v14);\n        v8 = this;\n      }\n      v12 = (signed __int64)v27;\n      ++v11;\n      ++v10;\n    }\n    while ( v11 < v9 );\n    v7 = a2;\n  }\n  cocos2d::CCSet::count(v7);\n}", "assembly": "; \n; cocos2d::CCEGLViewProtocol::getSetOfTouchesEndOrCancel from 0x18006b6c0 to 0x18006b86e (430 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCEGLViewProtocol::handleTouchesCancel @ 0x18006bbfc\n; > cocos2d::CCEGLViewProtocol::handleTouchesEnd @ 0x18006bc9c\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3df8\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, 0x18006b6c0\nmov     [rsp+arg_8], rdx                                               ; +0x5, 0x18006b6c5\nmov     [rsp+arg_0], rcx                                               ; +0xa, 0x18006b6ca\npush    rbp                                                            ; +0xf, 0x18006b6cf\npush    rsi                                                            ; +0x10, 0x18006b6d0\npush    rdi                                                            ; +0x11, 0x18006b6d1\npush    r12                                                            ; +0x12, 0x18006b6d2\npush    r13                                                            ; +0x14, 0x18006b6d4\npush    r14                                                            ; +0x16, 0x18006b6d6\npush    r15                                                            ; +0x18, 0x18006b6d8\nsub     rsp, 50h                                                       ; +0x1a, 0x18006b6da\nmovaps  [rsp+88h+var_48], xmm6                                         ; +0x1e, 0x18006b6de\nmov     r13, r9                                                        ; +0x23, 0x18006b6e3\nmovaps  [rsp+88h+var_58], xmm7                                         ; +0x26, 0x18006b6e6\nmov     rbx, rdx                                                       ; +0x2b, 0x18006b6eb\nmovaps  [rsp+88h+var_68], xmm8                                         ; +0x2e, 0x18006b6ee\nmov     r15, rcx                                                       ; +0x34, 0x18006b6f4\nmovsxd  r12, r8d                                                       ; +0x37, 0x18006b6f7\ntest    r8d, r8d                                                       ; +0x3a, 0x18006b6fa\njle     loc_18006B83E                                                  ; +0x3d, 0x18006b6fd\nmov     rdi, [rsp+88h+arg_28]                                          ; +0x43, 0x18006b703\nlea     rbx, qword_1801A8480                                           ; +0x4b, 0x18006b70b\nmov     rax, [rsp+88h+arg_20]                                          ; +0x52, 0x18006b712\nxor     esi, esi                                                       ; +0x5a, 0x18006b71a\nmovsd   xmm8, [rsp+88h+arg_30]                                         ; +0x5c, 0x18006b71c\nsub     rax, rdi                                                       ; +0x66, 0x18006b726\nmov     [rsp+88h+arg_20], rax                                          ; +0x69, 0x18006b729\nsub     r13, rdi                                                       ; +0x71, 0x18006b731\nnop     dword ptr [rax+00h]                                            ; +0x74, 0x18006b734\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x78, 0x18006b738\nmovsxd  r14, dword ptr [rdi+r13]                                       ; +0x80, 0x18006b740\nlea     rcx, unk_1801A8430; this                                       ; +0x84, 0x18006b744\nmovss   xmm7, dword ptr [rax+rdi]                                      ; +0x8b, 0x18006b74b\nmov     rdx, r14; __int64                                              ; +0x90, 0x18006b750\nmovss   xmm6, dword ptr [rdi]                                          ; +0x93, 0x18006b753\ncall    ?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x97, 0x18006b757\nmov     rbp, rax                                                       ; +0x9c, 0x18006b75c\ntest    rax, rax                                                       ; +0x9f, 0x18006b75f\njz      loc_18006B81E                                                  ; +0xa2, 0x18006b762\nmovsxd  rax, dword ptr [rax+38h]                                       ; +0xa8, 0x18006b768\nmov     rbx, [rbx+rax*8]                                               ; +0xac, 0x18006b76c\ntest    rbx, rbx                                                       ; +0xb0, 0x18006b770\njz      loc_18006B846                                                  ; +0xb3, 0x18006b773\nsubss   xmm6, dword ptr [r15+24h]                                      ; +0xb9, 0x18006b779\nsubss   xmm7, dword ptr [r15+20h]                                      ; +0xbf, 0x18006b77f\nlea     rcx, [rbx+50h]                                                 ; +0xc5, 0x18006b785\nlea     rdx, [rbx+48h]                                                 ; +0xc9, 0x18006b789\ndivss   xmm6, dword ptr [r15+68h]                                      ; +0xcd, 0x18006b78d\ndivss   xmm7, dword ptr [r15+64h]                                      ; +0xd3, 0x18006b793\nmov     [rbx+38h], eax                                                 ; +0xd9, 0x18006b799\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0xdc, 0x18006b79c\ncmp     byte ptr [rbx+3Ch], 0                                          ; +0xe1, 0x18006b7a1\nmovss   dword ptr [rbx+48h], xmm7                                      ; +0xe5, 0x18006b7a5\nmovss   dword ptr [rbx+4Ch], xmm6                                      ; +0xea, 0x18006b7aa\njnz     short loc_18006B7C2                                            ; +0xef, 0x18006b7af\nlea     rcx, [rbx+40h]                                                 ; +0xf1, 0x18006b7b1\nlea     rdx, [rbx+48h]                                                 ; +0xf5, 0x18006b7b5\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0xf9, 0x18006b7b9\nmov     byte ptr [rbx+3Ch], 1                                          ; +0xfe, 0x18006b7be\nmov     rcx, [rsp+88h+arg_8]; this                                     ; +0x102, 0x18006b7c2\nmov     rdx, rbx; struct cocos2d::CCObject *                           ; +0x10a, 0x18006b7ca\nmovsd   qword ptr [rbx+58h], xmm8                                      ; +0x10d, 0x18006b7cd\ncall    ?addObject@CCSet@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCSet::addObject(cocos2d::CCObject *) ; +0x113, 0x18006b7d3\nmov     rcx, rbx; this                                                 ; +0x118, 0x18006b7d8\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x11b, 0x18006b7db\nmovsxd  rcx, dword ptr [rbp+38h]                                       ; +0x120, 0x18006b7e0\nlea     rbx, qword_1801A8480                                           ; +0x124, 0x18006b7e4\nmov     qword ptr [rbx+rcx*8], 0                                       ; +0x12b, 0x18006b7eb\ncmp     ecx, 4                                                         ; +0x133, 0x18006b7f3\nja      short loc_18006B807                                            ; +0x136, 0x18006b7f6\nmov     eax, 1                                                         ; +0x138, 0x18006b7f8\nshl     eax, cl                                                        ; +0x13d, 0x18006b7fd\nnot     eax                                                            ; +0x13f, 0x18006b7ff\nand     cs:dword_1801A84A8, eax                                        ; +0x141, 0x18006b801\nmov     rdx, r14; __int64                                              ; +0x147, 0x18006b807\nlea     rcx, unk_1801A8430; this                                       ; +0x14a, 0x18006b80a\ncall    ?removeObjectForKey@CCDictionary@cocos2d@@QEAAX_J@Z; cocos2d::CCDictionary::removeObjectForKey(__int64) ; +0x151, 0x18006b811\nmov     r15, [rsp+88h+arg_0]                                           ; +0x156, 0x18006b816\nmov     rax, [rsp+88h+arg_20]                                          ; +0x15e, 0x18006b81e\ninc     rsi                                                            ; +0x166, 0x18006b826\nadd     rdi, 4                                                         ; +0x169, 0x18006b829\ncmp     rsi, r12                                                       ; +0x16d, 0x18006b82d\njl      loc_18006B740                                                  ; +0x170, 0x18006b830\nmov     rbx, [rsp+88h+arg_8]                                           ; +0x176, 0x18006b836\nmov     rcx, rbx; this                                                 ; +0x17e, 0x18006b83e\ncall    ?count@CCSet@cocos2d@@QEAAHXZ; cocos2d::CCSet::count(void)     ; +0x181, 0x18006b841\nmov     rbx, [rsp+88h+arg_10]                                          ; +0x186, 0x18006b846\nmovaps  xmm6, [rsp+88h+var_48]                                         ; +0x18e, 0x18006b84e\nmovaps  xmm7, [rsp+88h+var_58]                                         ; +0x193, 0x18006b853\nmovaps  xmm8, [rsp+88h+var_68]                                         ; +0x198, 0x18006b858\nadd     rsp, 50h                                                       ; +0x19e, 0x18006b85e\npop     r15                                                            ; +0x1a2, 0x18006b862\npop     r14                                                            ; +0x1a4, 0x18006b864\npop     r13                                                            ; +0x1a6, 0x18006b866\npop     r12                                                            ; +0x1a8, 0x18006b868\npop     rdi                                                            ; +0x1aa, 0x18006b86a\npop     rsi                                                            ; +0x1ab, 0x18006b86b\npop     rbp                                                            ; +0x1ac, 0x18006b86c\nretn                                                                   ; +0x1ad, 0x18006b86d", "xrefs": ["cocos2d::CCEGLViewProtocol::handleTouchesCancel @ 0x18006bbfc", "cocos2d::CCEGLViewProtocol::handleTouchesEnd @ 0x18006bc9c", "<???> @ 0x1801438a8", "<???> @ 0x1801b3df8"], "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"}