{"type": "func", "start": 4298796912, "end": 4298797671, "name": "BoomScrollLayer::ccTouchMoved", "pseudocode": "// \n// BoomScrollLayer::ccTouchMoved from 0x1003a6f70 to 0x1003a7267 (759 bytes)\n// \n// 2 xrefs:\n// > sub_1003A7270 @ 0x1003a727c\n// > <???> @ 0x100927538\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 BoomScrollLayer::ccTouchMoved(BoomScrollLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  cocos2d::CCDirector *v5; // rax\n  BoomScrollLayerDelegate *m_delegate; // rdi\n  float *v7; // rax\n  float *v8; // rax\n  __m128 v9; // xmm1\n  __m128 v10; // xmm0\n  int v11; // r14d\n  float *v12; // rax\n  float v13; // xmm0_4\n  int m_uIndexInArray; // xmm1_4\n  ExtendedLayer *m_extendedLayer; // rbx\n  cocos2d::CCTouch v16; // [rsp-60h] [rbp-60h] BYREF\n\n  if ( a1->m_touch == a2 && !*((_BYTE *)&a1->m_clippingRect + 16) )\n  {\n    cocos2d::CCTouch::getLocationInView(&v16);\n    v5 = cocos2d::CCDirector::sharedDirector();\n    cocos2d::CCDirector::convertToGL((cocos2d::CCDirector *)&v16.m_uUnknown, (const cocos2d::CCPoint *)v5);\n    sub_10028CC90(&v16, (double *)&v16.m_uUnknown);\n    if ( a1->m_touchType == 1 )\n      goto LABEL_10;\n    if ( fabs(*(float *)&v16.__vftable - a1->m_touchX) >= a1->m_minimumTouchLengthToSlide )\n    {\n      cocos2d::CCNode::stopActionByTag(a1->m_extendedLayer, 2);\n      a1->m_pageMoving = 0;\n      a1->m_touchType = 1;\n      a1->m_touchX = *(float *)&v16.__vftable;\n      if ( a1->m_cancelAndStealTouch )\n        BoomScrollLayer::cancelAndStoleTouch(a1, a2, a3);\n      m_delegate = a1->m_delegate;\n      if ( m_delegate )\n        ((void (__fastcall *)(BoomScrollLayerDelegate *, BoomScrollLayer *))m_delegate->scrollLayerScrollingStarted)(\n          m_delegate,\n          a1);\n    }\n    if ( a1->m_touchType == 1 )\n    {\nLABEL_10:\n      *(float *)&v16.m_nZOrder = (float)-a1->m_page;\n      v7 = (float *)((__int64 (__fastcall *)(BoomScrollLayer *))a1->getContentSize)(a1);\n      *(float *)&v16.m_nZOrder = (float)((float)((float)(*v7 - a1->m_pageOffset) * *(float *)&v16.m_nZOrder)\n                                       + *(float *)&v16.__vftable)\n                               - a1->m_touchX;\n      sub_10028CBE0((float *)&v16.m_uUnknown, *(float *)&v16.m_nZOrder, 0.0);\n      *(__m128 *)&v16.m_uID = _mm_xor_ps(\n                                (__m128)*(unsigned int *)((__int64 (__fastcall *)(ExtendedLayer *))a1->m_extendedLayer->getPosition)(a1->m_extendedLayer),\n                                (__m128)xmmword_1008150B0);\n      v8 = (float *)((__int64 (__fastcall *)(BoomScrollLayer *))a1->getContentSize)(a1);\n      v9 = *(__m128 *)&v16.m_uID;\n      v9.f32[0] = *(float *)&v16.m_uID / (float)(*v8 - a1->m_pageOffset);\n      v10 = _mm_round_ss((__m128)0LL, v9, 10);\n      v11 = ((float)(_mm_cvtepi32_ps(_mm_cvttps_epi32(v10)).f32[0] - v9.f32[0]) < 0.5) + (int)v10.f32[0] - 1;\n      if ( !a1->m_looped )\n      {\n        if ( v11 <= 0 )\n          v11 = 0;\n        if ( (int)(sub_100720070(*((_QWORD *)&a1->m_dynamicObjects + 4 * !a1->m_dynamic)) - 1) <= v11 )\n          v11 = sub_100720070(*((_QWORD *)&a1->m_dynamicObjects + 4 * !a1->m_dynamic)) - 1;\n      }\n      *(float *)&v16.m_uID = (float)-v11;\n      v12 = (float *)((__int64 (__fastcall *)(BoomScrollLayer *))a1->getContentSize)(a1);\n      v13 = (float)(*v12 - a1->m_pageOffset) * *(float *)&v16.m_uID;\n      v16.m_uID = 0;\n      sub_10028CBE0((float *)&v16.m_uUnknown, v13, 0.0);\n      *(float *)&m_uIndexInArray = *(float *)&v16.m_nZOrder - *(float *)&v16.m_uUnknown;\n      *(float *)&v16.m_uIndexInArray = *(float *)&v16.m_nZOrder - *(float *)&v16.m_uUnknown;\n      if ( !v11 && *(float *)&m_uIndexInArray > 0.0\n        || v11 == (unsigned int)sub_100720070(*((_QWORD *)&a1->m_dynamicObjects + 4 * !a1->m_dynamic)) - 1\n        && (m_uIndexInArray = v16.m_uIndexInArray, *(float *)&v16.m_uIndexInArray < 0.0) )\n      {\n        *(float *)&v16.m_uID = a1->m_width * *(float *)&m_uIndexInArray;\n        cocos2d::CCDirector::sharedDirector();\n        cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v16.m_uUnknown);\n        *(float *)&v16.m_uID = *(float *)&v16.m_uIndexInArray\n                             - (float)(*(float *)&v16.m_uID / *(float *)&v16.m_uUnknown);\n      }\n      m_extendedLayer = a1->m_extendedLayer;\n      sub_10028CBE0((float *)&v16.m_uUnknown, *(float *)&v16.m_nZOrder - *(float *)&v16.m_uID, 0.0);\n      ((void (__fastcall *)(ExtendedLayer *, int *))m_extendedLayer->setPosition)(m_extendedLayer, &v16.m_uUnknown);\n    }\n  }\n}", "assembly": "; \n; BoomScrollLayer::ccTouchMoved from 0x1003a6f70 to 0x1003a7267 (759 bytes)\n; \n; 2 xrefs:\n; > sub_1003A7270 @ 0x1003a727c\n; > <???> @ 0x100927538\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\ncmp     [rdi+1D0h], rsi                                                ; +0x0, 0x1003a6f70\njz      short loc_1003A6F7A                                            ; +0x7, 0x1003a6f77\nretn                                                                   ; +0x9, 0x1003a6f79\npush    rbp                                                            ; +0xa, 0x1003a6f7a\nmov     rbp, rsp                                                       ; +0xb, 0x1003a6f7b\npush    r15                                                            ; +0xe, 0x1003a6f7e\npush    r14                                                            ; +0x10, 0x1003a6f80\npush    r13                                                            ; +0x12, 0x1003a6f82\npush    r12                                                            ; +0x14, 0x1003a6f84\npush    rbx                                                            ; +0x16, 0x1003a6f86\nsub     rsp, 38h                                                       ; +0x17, 0x1003a6f87\nmov     rbx, rdi                                                       ; +0x1b, 0x1003a6f8b\ncmp     byte ptr [rdi+26Ch], 0                                         ; +0x1e, 0x1003a6f8e\njnz     loc_1003A7258                                                  ; +0x25, 0x1003a6f95\nmov     r14, rdx                                                       ; +0x2b, 0x1003a6f9b\nlea     r12, [rbp-58h]                                                 ; +0x2e, 0x1003a6f9e\nmov     rdi, r12                                                       ; +0x32, 0x1003a6fa2\nmov     r15, rsi                                                       ; +0x35, 0x1003a6fa5\ncall    cocos2d__CCTouch__getLocationInView                            ; +0x38, 0x1003a6fa8\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x3d, 0x1003a6fad\nlea     r13, [rbp-34h]                                                 ; +0x42, 0x1003a6fb2\nmov     rdi, r13                                                       ; +0x46, 0x1003a6fb6\nmov     rsi, rax                                                       ; +0x49, 0x1003a6fb9\nmov     rdx, r12                                                       ; +0x4c, 0x1003a6fbc\ncall    cocos2d__CCDirector__convertToGL                               ; +0x4f, 0x1003a6fbf\nmov     rdi, r12                                                       ; +0x54, 0x1003a6fc4\nmov     rsi, r13                                                       ; +0x57, 0x1003a6fc7\ncall    sub_10028CC90                                                  ; +0x5a, 0x1003a6fca\ncmp     dword ptr [rbx+1C4h], 1                                        ; +0x5f, 0x1003a6fcf\njz      loc_1003A7060                                                  ; +0x66, 0x1003a6fd6\nmovss   xmm0, dword ptr [rbp-58h]                                      ; +0x6c, 0x1003a6fdc\nsubss   xmm0, dword ptr [rbx+1A4h]                                     ; +0x71, 0x1003a6fe1\nandps   xmm0, cs:xmmword_100815500                                     ; +0x79, 0x1003a6fe9\nucomiss xmm0, dword ptr [rbx+224h]                                     ; +0x80, 0x1003a6ff0\njb      short loc_1003A7053                                            ; +0x87, 0x1003a6ff7\nmov     rdi, [rbx+1F0h]                                                ; +0x89, 0x1003a6ff9\nmov     esi, 2                                                         ; +0x90, 0x1003a7000\ncall    cocos2d__CCNode__stopActionByTag                               ; +0x95, 0x1003a7005\nmov     byte ptr [rbx+220h], 0                                         ; +0x9a, 0x1003a700a\nmov     dword ptr [rbx+1C4h], 1                                        ; +0xa1, 0x1003a7011\nmovss   xmm0, dword ptr [rbp-58h]                                      ; +0xab, 0x1003a701b\nmovss   dword ptr [rbx+1A4h], xmm0                                     ; +0xb0, 0x1003a7020\ncmp     byte ptr [rbx+230h], 1                                         ; +0xb8, 0x1003a7028\njnz     short loc_1003A703F                                            ; +0xbf, 0x1003a702f\nmov     rdi, rbx                                                       ; +0xc1, 0x1003a7031\nmov     rsi, r15                                                       ; +0xc4, 0x1003a7034\nmov     rdx, r14                                                       ; +0xc7, 0x1003a7037\ncall    BoomScrollLayer__cancelAndStoleTouch                           ; +0xca, 0x1003a703a\nmov     rdi, [rbx+218h]                                                ; +0xcf, 0x1003a703f\ntest    rdi, rdi                                                       ; +0xd6, 0x1003a7046\njz      short loc_1003A7053                                            ; +0xd9, 0x1003a7049\nmov     rax, [rdi]                                                     ; +0xdb, 0x1003a704b\nmov     rsi, rbx                                                       ; +0xde, 0x1003a704e\ncall    qword ptr [rax]                                                ; +0xe1, 0x1003a7051\ncmp     dword ptr [rbx+1C4h], 1                                        ; +0xe3, 0x1003a7053\njnz     loc_1003A7258                                                  ; +0xea, 0x1003a705a\nxor     r15d, r15d                                                     ; +0xf0, 0x1003a7060\nxor     eax, eax                                                       ; +0xf3, 0x1003a7063\nsub     eax, [rbx+244h]                                                ; +0xf5, 0x1003a7065\nxorps   xmm0, xmm0                                                     ; +0xfb, 0x1003a706b\ncvtsi2ss xmm0, eax                                                     ; +0xfe, 0x1003a706e\nmovss   dword ptr [rbp-2Ch], xmm0                                      ; +0x102, 0x1003a7072\nmov     rax, [rbx]                                                     ; +0x107, 0x1003a7077\nmov     rdi, rbx                                                       ; +0x10a, 0x1003a707a\ncall    qword ptr [rax+138h]                                           ; +0x10d, 0x1003a707d\nmovss   xmm0, dword ptr [rax]                                          ; +0x113, 0x1003a7083\nsubss   xmm0, dword ptr [rbx+248h]                                     ; +0x117, 0x1003a7087\nmulss   xmm0, dword ptr [rbp-2Ch]                                      ; +0x11f, 0x1003a708f\naddss   xmm0, dword ptr [rbp-58h]                                      ; +0x124, 0x1003a7094\nsubss   xmm0, dword ptr [rbx+1A4h]                                     ; +0x129, 0x1003a7099\nlea     rdi, [rbp-34h]                                                 ; +0x131, 0x1003a70a1\nxorps   xmm1, xmm1                                                     ; +0x135, 0x1003a70a5\nmovss   dword ptr [rbp-2Ch], xmm0                                      ; +0x138, 0x1003a70a8\ncall    sub_10028CBE0                                                  ; +0x13d, 0x1003a70ad\nmov     rdi, [rbx+1F0h]                                                ; +0x142, 0x1003a70b2\nmov     rax, [rdi]                                                     ; +0x149, 0x1003a70b9\ncall    qword ptr [rax+0C0h]                                           ; +0x14c, 0x1003a70bc\nmovss   xmm0, dword ptr [rax]                                          ; +0x152, 0x1003a70c2\nxorps   xmm0, cs:xmmword_1008150B0                                     ; +0x156, 0x1003a70c6\nmovaps  xmmword ptr [rbp-50h], xmm0                                    ; +0x15d, 0x1003a70cd\nmov     rax, [rbx]                                                     ; +0x161, 0x1003a70d1\nmov     rdi, rbx                                                       ; +0x164, 0x1003a70d4\ncall    qword ptr [rax+138h]                                           ; +0x167, 0x1003a70d7\nmovss   xmm0, dword ptr [rax]                                          ; +0x16d, 0x1003a70dd\nsubss   xmm0, dword ptr [rbx+248h]                                     ; +0x171, 0x1003a70e1\nmovaps  xmm1, xmmword ptr [rbp-50h]                                    ; +0x179, 0x1003a70e9\ndivss   xmm1, xmm0                                                     ; +0x17d, 0x1003a70ed\nxorps   xmm0, xmm0                                                     ; +0x181, 0x1003a70f1\nroundss xmm0, xmm1, 0Ah                                                ; +0x184, 0x1003a70f4\ncvttss2si r14d, xmm0                                                   ; +0x18a, 0x1003a70fa\ncvttps2dq xmm0, xmm0                                                   ; +0x18f, 0x1003a70ff\ncvtdq2ps xmm0, xmm0                                                    ; +0x193, 0x1003a7103\nsubss   xmm0, xmm1                                                     ; +0x196, 0x1003a7106\nucomiss xmm0, cs:dword_100814FA8                                       ; +0x19a, 0x1003a710a\nadc     r14d, 0FFFFFFFFh                                               ; +0x1a1, 0x1003a7111\ncmp     byte ptr [rbx+1ACh], 0                                         ; +0x1a5, 0x1003a7115\njnz     short loc_1003A7166                                            ; +0x1ac, 0x1003a711c\ntest    r14d, r14d                                                     ; +0x1ae, 0x1003a711e\ncmovle  r14d, r15d                                                     ; +0x1b1, 0x1003a7121\nmovzx   eax, byte ptr [rbx+1C0h]                                       ; +0x1b5, 0x1003a7125\nxor     eax, 1                                                         ; +0x1bc, 0x1003a712c\nshl     eax, 5                                                         ; +0x1bf, 0x1003a712f\nmov     rdi, [rax+rbx+1B8h]                                            ; +0x1c2, 0x1003a7132\ncall    sub_100720070                                                  ; +0x1ca, 0x1003a713a\ndec     eax                                                            ; +0x1cf, 0x1003a713f\ncmp     eax, r14d                                                      ; +0x1d1, 0x1003a7141\njg      short loc_1003A7166                                            ; +0x1d4, 0x1003a7144\nmovzx   eax, byte ptr [rbx+1C0h]                                       ; +0x1d6, 0x1003a7146\nxor     eax, 1                                                         ; +0x1dd, 0x1003a714d\nshl     eax, 5                                                         ; +0x1e0, 0x1003a7150\nmov     rdi, [rax+rbx+1B8h]                                            ; +0x1e3, 0x1003a7153\ncall    sub_100720070                                                  ; +0x1eb, 0x1003a715b\nmov     r14d, eax                                                      ; +0x1f0, 0x1003a7160\ndec     r14d                                                           ; +0x1f3, 0x1003a7163\nmov     eax, r14d                                                      ; +0x1f6, 0x1003a7166\nneg     eax                                                            ; +0x1f9, 0x1003a7169\nxorps   xmm0, xmm0                                                     ; +0x1fb, 0x1003a716b\ncvtsi2ss xmm0, eax                                                     ; +0x1fe, 0x1003a716e\nmovss   dword ptr [rbp-50h], xmm0                                      ; +0x202, 0x1003a7172\nmov     rax, [rbx]                                                     ; +0x207, 0x1003a7177\nmov     rdi, rbx                                                       ; +0x20a, 0x1003a717a\ncall    qword ptr [rax+138h]                                           ; +0x20d, 0x1003a717d\nmovss   xmm0, dword ptr [rax]                                          ; +0x213, 0x1003a7183\nsubss   xmm0, dword ptr [rbx+248h]                                     ; +0x217, 0x1003a7187\nmulss   xmm0, dword ptr [rbp-50h]                                      ; +0x21f, 0x1003a718f\nlea     rdi, [rbp-34h]                                                 ; +0x224, 0x1003a7194\nxorps   xmm1, xmm1                                                     ; +0x228, 0x1003a7198\nmovss   dword ptr [rbp-50h], xmm1                                      ; +0x22b, 0x1003a719b\ncall    sub_10028CBE0                                                  ; +0x230, 0x1003a71a0\nmovss   xmm1, dword ptr [rbp-2Ch]                                      ; +0x235, 0x1003a71a5\nsubss   xmm1, dword ptr [rbp-34h]                                      ; +0x23a, 0x1003a71aa\ntest    r14d, r14d                                                     ; +0x23f, 0x1003a71af\nmovss   dword ptr [rbp-38h], xmm1                                      ; +0x242, 0x1003a71b2\njnz     short loc_1003A71C1                                            ; +0x247, 0x1003a71b7\nxorps   xmm0, xmm0                                                     ; +0x249, 0x1003a71b9\nucomiss xmm1, xmm0                                                     ; +0x24c, 0x1003a71bc\nja      short loc_1003A71EF                                            ; +0x24f, 0x1003a71bf\nmovzx   eax, byte ptr [rbx+1C0h]                                       ; +0x251, 0x1003a71c1\nxor     eax, 1                                                         ; +0x258, 0x1003a71c8\nshl     eax, 5                                                         ; +0x25b, 0x1003a71cb\nmov     rdi, [rax+rbx+1B8h]                                            ; +0x25e, 0x1003a71ce\ncall    sub_100720070                                                  ; +0x266, 0x1003a71d6\ndec     eax                                                            ; +0x26b, 0x1003a71db\ncmp     r14d, eax                                                      ; +0x26d, 0x1003a71dd\njnz     short loc_1003A7229                                            ; +0x270, 0x1003a71e0\nxorps   xmm0, xmm0                                                     ; +0x272, 0x1003a71e2\nmovss   xmm1, dword ptr [rbp-38h]                                      ; +0x275, 0x1003a71e5\nucomiss xmm0, xmm1                                                     ; +0x27a, 0x1003a71ea\njbe     short loc_1003A7229                                            ; +0x27d, 0x1003a71ed\nmovss   xmm0, dword ptr [rbx+22Ch]                                     ; +0x27f, 0x1003a71ef\nmulss   xmm0, xmm1                                                     ; +0x287, 0x1003a71f7\nmovss   dword ptr [rbp-50h], xmm0                                      ; +0x28b, 0x1003a71fb\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x290, 0x1003a7200\nlea     rdi, [rbp-34h]                                                 ; +0x295, 0x1003a7205\nmov     rsi, rax                                                       ; +0x299, 0x1003a7209\ncall    cocos2d__CCDirector__getWinSize                                ; +0x29c, 0x1003a720c\nmovss   xmm0, dword ptr [rbp-50h]                                      ; +0x2a1, 0x1003a7211\ndivss   xmm0, dword ptr [rbp-34h]                                      ; +0x2a6, 0x1003a7216\nmovss   xmm1, dword ptr [rbp-38h]                                      ; +0x2ab, 0x1003a721b\nsubss   xmm1, xmm0                                                     ; +0x2b0, 0x1003a7220\nmovss   dword ptr [rbp-50h], xmm1                                      ; +0x2b4, 0x1003a7224\nmov     rbx, [rbx+1F0h]                                                ; +0x2b9, 0x1003a7229\nmovss   xmm0, dword ptr [rbp-2Ch]                                      ; +0x2c0, 0x1003a7230\nsubss   xmm0, dword ptr [rbp-50h]                                      ; +0x2c5, 0x1003a7235\nlea     r14, [rbp-34h]                                                 ; +0x2ca, 0x1003a723a\nxorps   xmm1, xmm1                                                     ; +0x2ce, 0x1003a723e\nmov     rdi, r14                                                       ; +0x2d1, 0x1003a7241\ncall    sub_10028CBE0                                                  ; +0x2d4, 0x1003a7244\nmov     rax, [rbx]                                                     ; +0x2d9, 0x1003a7249\nmov     rdi, rbx                                                       ; +0x2dc, 0x1003a724c\nmov     rsi, r14                                                       ; +0x2df, 0x1003a724f\ncall    qword ptr [rax+0B8h]                                           ; +0x2e2, 0x1003a7252\nadd     rsp, 38h                                                       ; +0x2e8, 0x1003a7258\npop     rbx                                                            ; +0x2ec, 0x1003a725c\npop     r12                                                            ; +0x2ed, 0x1003a725d\npop     r13                                                            ; +0x2ef, 0x1003a725f\npop     r14                                                            ; +0x2f1, 0x1003a7261\npop     r15                                                            ; +0x2f3, 0x1003a7263\npop     rbp                                                            ; +0x2f5, 0x1003a7265\nretn                                                                   ; +0x2f6, 0x1003a7266", "xrefs": ["sub_1003A7270 @ 0x1003a727c", "<???> @ 0x100927538"], "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"}