{"type": "func", "start": 5368965984, "end": 5368966385, "name": "BoomScrollLayer::ccTouchEnded", "pseudocode": "// \n// BoomScrollLayer::ccTouchEnded from 0x14003eb60 to 0x14003ecf1 (401 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x14052b6a0\n// > <???> @ 0x140661de8\n// > <???> @ 0x140661e1c\n// > <???> @ 0x1406c40e0\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 BoomScrollLayer::ccTouchEnded(BoomScrollLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  cocos2d::CCDirector *v4; // rax\n  struct cocos2d::CCPoint v5; // rax\n  float v6; // xmm6_4\n  int m_pScheduler_high; // edi\n  double v8; // xmm2_8\n  float v9; // xmm0_4\n  float v10; // xmm1_4\n  float v11; // xmm2_4\n  const struct cocos2d::CCPoint *v12; // rax\n  cocos2d::CCPoint v13; // rdx\n  cocos2d::CCArray *v14; // rcx\n  float v15; // [rsp+50h] [rbp+8h] BYREF\n  cocos2d::CCPoint v16; // [rsp+58h] [rbp+10h] BYREF\n\n  if ( *(cocos2d::CCTouch **)&a1->m_sTransform.b == a2 )\n  {\n    *(_QWORD *)&a1->m_sTransform.b = 0;\n    cocos2d::CCTouch::getLocationInView(a2);\n    v4 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector();\n    v5 = cocos2d::CCDirector::convertToGL(v4, &v16);\n    ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v15, v5);\n    v6 = v15 - a1->m_obAnchorPoint.x;\n    m_pScheduler_high = HIDWORD(a1->m_pScheduler);\n    v8 = sub_14003CF30() - *(double *)&a1->m_sTransform.ty;\n    if ( v8 == 0.0 )\n      v9 = *((float *)&a1->m_pGrid + 1) + 1.0;\n    else\n      v9 = fabs(v6) / v8;\n    a1->m_obAnchorPoint.y = v9;\n    v10 = *(float *)&a1->m_pUserObject;\n    v11 = fabs(v6);\n    if ( v11 >= v10 || v9 > *(float *)&a1->m_pGrid && v11 >= (float)(v10 * 0.25) )\n    {\n      v12 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1->m_sInverse.d + 200LL))(*(_QWORD *)&a1->m_sInverse.d);\n      cocos2d::CCPoint::CCPoint(&v16, v12);\n      m_pScheduler_high = BoomScrollLayer::pageNumberForPosition((BoomScrollLayer *)((char *)a1 - 320), v13);\n      if ( m_pScheduler_high == HIDWORD(a1->m_pScheduler) )\n      {\n        if ( v6 < 0.0\n          && (LOBYTE(a1->m_obContentSize.width)\n           || (!LOBYTE(a1->m_sAdditionalTransform.d)\n             ? (v14 = *(cocos2d::CCArray **)&a1->m_sTransform.d)\n             : (v14 = *(cocos2d::CCArray **)&a1->m_sAdditionalTransform.b),\n               m_pScheduler_high < (int)(cocos2d::CCArray::count(v14) - 1))) )\n        {\n          ++m_pScheduler_high;\n        }\n        else if ( v6 > 0.0 && (LOBYTE(a1->m_obContentSize.width) || m_pScheduler_high > 0) )\n        {\n          --m_pScheduler_high;\n        }\n      }\n    }\n    BoomScrollLayer::moveToPage((BoomScrollLayer *)((char *)a1 - 320), m_pScheduler_high);\n  }\n}", "assembly": "; \n; BoomScrollLayer::ccTouchEnded from 0x14003eb60 to 0x14003ecf1 (401 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x14052b6a0\n; > <???> @ 0x140661de8\n; > <???> @ 0x140661e1c\n; > <???> @ 0x1406c40e0\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\npush    rbx                                                            ; +0x0, 0x14003eb60\nsub     rsp, 40h                                                       ; +0x2, 0x14003eb62\nmov     rax, rdx                                                       ; +0x6, 0x14003eb66\nmov     rbx, rcx                                                       ; +0x9, 0x14003eb69\ncmp     [rcx+90h], rdx                                                 ; +0xc, 0x14003eb6c\njnz     loc_14003ECEB                                                  ; +0x13, 0x14003eb73\nmov     qword ptr [rcx+90h], 0                                         ; +0x19, 0x14003eb79\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x24, 0x14003eb84\nmov     rcx, rax                                                       ; +0x29, 0x14003eb89\nmov     [rsp+48h+arg_10], rdi                                          ; +0x2c, 0x14003eb8c\nmovaps  [rsp+48h+var_18], xmm6                                         ; +0x31, 0x14003eb91\ncall    cs:?getLocationInView@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocationInView(void) ; +0x36, 0x14003eb96\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x3c, 0x14003eb9c\nmov     rcx, rax                                                       ; +0x42, 0x14003eba2\nlea     r8, [rsp+48h+arg_0]                                            ; +0x45, 0x14003eba5\nlea     rdx, [rsp+48h+arg_8]                                           ; +0x4a, 0x14003ebaa\ncall    cs:?convertToGL@CCDirector@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCDirector::convertToGL(cocos2d::CCPoint const &) ; +0x4f, 0x14003ebaf\nmov     rdx, rax                                                       ; +0x55, 0x14003ebb5\nlea     rcx, [rsp+48h+arg_0]                                           ; +0x58, 0x14003ebb8\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x5d, 0x14003ebbd\nmovss   xmm6, [rsp+48h+arg_0]                                          ; +0x63, 0x14003ebc3\nsubss   xmm6, dword ptr [rbx+64h]                                      ; +0x69, 0x14003ebc9\nmov     edi, [rbx+104h]                                                ; +0x6e, 0x14003ebce\ncall    sub_14003CF30                                                  ; +0x74, 0x14003ebd4\nmovss   xmm3, dword ptr cs:xmmword_1406243C0                           ; +0x79, 0x14003ebd9\nmovaps  xmm2, xmm0                                                     ; +0x81, 0x14003ebe1\nsubsd   xmm2, qword ptr [rbx+0A0h]                                     ; +0x84, 0x14003ebe4\nxorps   xmm1, xmm1                                                     ; +0x8c, 0x14003ebec\nucomisd xmm2, xmm1                                                     ; +0x8f, 0x14003ebef\njp      short loc_14003EC09                                            ; +0x93, 0x14003ebf3\njnz     short loc_14003EC09                                            ; +0x95, 0x14003ebf5\nmovss   xmm0, dword ptr [rbx+0CCh]                                     ; +0x97, 0x14003ebf7\naddss   xmm0, cs:flt_140622C24                                         ; +0x9f, 0x14003ebff\njmp     short loc_14003EC1A                                            ; +0xa7, 0x14003ec07\nmovaps  xmm0, xmm6                                                     ; +0xa9, 0x14003ec09\nandps   xmm0, xmm3                                                     ; +0xac, 0x14003ec0c\ncvtps2pd xmm1, xmm0                                                    ; +0xaf, 0x14003ec0f\ndivsd   xmm1, xmm2                                                     ; +0xb2, 0x14003ec12\ncvtpd2ps xmm0, xmm1                                                    ; +0xb6, 0x14003ec16\nmovaps  xmm2, xmm6                                                     ; +0xba, 0x14003ec1a\nmovss   dword ptr [rbx+68h], xmm0                                      ; +0xbd, 0x14003ec1d\nmovss   xmm1, dword ptr [rbx+0E8h]                                     ; +0xc2, 0x14003ec22\nandps   xmm2, xmm3                                                     ; +0xca, 0x14003ec2a\ncomiss  xmm2, xmm1                                                     ; +0xcd, 0x14003ec2d\njnb     short loc_14003EC50                                            ; +0xd0, 0x14003ec30\ncomiss  xmm0, dword ptr [rbx+0C8h]                                     ; +0xd2, 0x14003ec32\njbe     loc_14003ECD3                                                  ; +0xd9, 0x14003ec39\nmulss   xmm1, cs:dword_140622A88                                       ; +0xdf, 0x14003ec3f\ncomiss  xmm2, xmm1                                                     ; +0xe7, 0x14003ec47\njb      loc_14003ECD3                                                  ; +0xea, 0x14003ec4a\nmov     rcx, [rbx+0B0h]                                                ; +0xf0, 0x14003ec50\nmov     rax, [rcx]                                                     ; +0xf7, 0x14003ec57\ncall    qword ptr [rax+0C8h]                                           ; +0xfa, 0x14003ec5a\nmov     rdx, rax                                                       ; +0x100, 0x14003ec60\nlea     rcx, [rsp+48h+arg_8]                                           ; +0x103, 0x14003ec63\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x108, 0x14003ec68\nlea     rcx, [rbx-140h]                                                ; +0x10e, 0x14003ec6e\ncall    BoomScrollLayer__pageNumberForPosition                         ; +0x115, 0x14003ec75\nmov     edi, eax                                                       ; +0x11a, 0x14003ec7a\ncmp     eax, [rbx+104h]                                                ; +0x11c, 0x14003ec7c\njnz     short loc_14003ECD3                                            ; +0x122, 0x14003ec82\nmovaps  [rsp+48h+var_28], xmm7                                         ; +0x124, 0x14003ec84\nxorps   xmm7, xmm7                                                     ; +0x129, 0x14003ec89\ncomiss  xmm7, xmm6                                                     ; +0x12c, 0x14003ec8c\njbe     short loc_14003ECBD                                            ; +0x12f, 0x14003ec8f\ncmp     byte ptr [rbx+6Ch], 0                                          ; +0x131, 0x14003ec91\njnz     short loc_14003ECB9                                            ; +0x135, 0x14003ec95\ncmp     byte ptr [rbx+80h], 0                                          ; +0x137, 0x14003ec97\njz      short loc_14003ECA6                                            ; +0x13e, 0x14003ec9e\nmov     rcx, [rbx+78h]                                                 ; +0x140, 0x14003eca0\njmp     short loc_14003ECAD                                            ; +0x144, 0x14003eca4\nmov     rcx, [rbx+98h]                                                 ; +0x146, 0x14003eca6\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x14d, 0x14003ecad\ndec     eax                                                            ; +0x153, 0x14003ecb3\ncmp     edi, eax                                                       ; +0x155, 0x14003ecb5\njge     short loc_14003ECBD                                            ; +0x157, 0x14003ecb7\ninc     edi                                                            ; +0x159, 0x14003ecb9\njmp     short loc_14003ECCE                                            ; +0x15b, 0x14003ecbb\ncomiss  xmm6, xmm7                                                     ; +0x15d, 0x14003ecbd\njbe     short loc_14003ECCE                                            ; +0x160, 0x14003ecc0\ncmp     byte ptr [rbx+6Ch], 0                                          ; +0x162, 0x14003ecc2\njnz     short loc_14003ECCC                                            ; +0x166, 0x14003ecc6\ntest    edi, edi                                                       ; +0x168, 0x14003ecc8\njle     short loc_14003ECCE                                            ; +0x16a, 0x14003ecca\ndec     edi                                                            ; +0x16c, 0x14003eccc\nmovaps  xmm7, [rsp+48h+var_28]                                         ; +0x16e, 0x14003ecce\nlea     rcx, [rbx-140h]                                                ; +0x173, 0x14003ecd3\nmov     edx, edi                                                       ; +0x17a, 0x14003ecda\ncall    BoomScrollLayer__moveToPage                                    ; +0x17c, 0x14003ecdc\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0x181, 0x14003ece1\nmov     rdi, [rsp+48h+arg_10]                                          ; +0x186, 0x14003ece6\nadd     rsp, 40h                                                       ; +0x18b, 0x14003eceb\npop     rbx                                                            ; +0x18f, 0x14003ecef\nretn                                                                   ; +0x190, 0x14003ecf0", "xrefs": ["<???> @ 0x14052b6a0", "<???> @ 0x140661de8", "<???> @ 0x140661e1c", "<???> @ 0x1406c40e0"], "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"}