{"type": "func", "start": 4298794512, "end": 4298794939, "name": "BoomScrollLayer::moveToPage", "pseudocode": "// \n// BoomScrollLayer::moveToPage from 0x1003a6610 to 0x1003a67bb (427 bytes)\n// \n// 16 xrefs:\n// > BoomScrollLayer::addPage_1 @ 0x1003a6942\n// > BoomScrollLayer::addPage @ 0x1003a69b6\n// > BoomScrollLayer::removePage @ 0x1003a6a40\n// > BoomScrollLayer::removePageWithNumber @ 0x1003a6b03\n// > BoomScrollLayer::ccTouchEnded @ 0x1003a74fb\n// > WorldSelectLayer::goToPage @ 0x1003c2c53\n// > ListButtonBar::onLeft @ 0x1003f0377\n// > ListButtonBar::onRight @ 0x1003f0417\n// > ListButtonBar::goToPage @ 0x1003f04bb\n// > LevelSelectLayer::onPrev @ 0x1004329ba\n// > LevelSelectLayer::onNext @ 0x1004329ea\n// > LevelSelectLayer::keyDown @ 0x1004347f4\n// > LevelSelectLayer::keyDown @ 0x100434820\n// > GauntletSelectLayer::goToPage @ 0x100572f61\n// > SecretRewardsLayer::onSwitchPage @ 0x1006329e4\n// > SecretRewardsLayer::goToPage @ 0x100632a21\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::moveToPage(BoomScrollLayer *a1, int a2)\n{\n  float *v3; // rax\n  float m_touchQuotient; // xmm0_4\n  float v5; // xmm3_4\n  __m128 v6; // xmm1\n  __m128 v7; // xmm0\n  cocos2d::CCMoveTo *v8; // rax\n  unsigned int v9; // r15d\n  unsigned int v10; // eax\n  int v11; // ecx\n  int v12; // r8d\n  int v13; // r9d\n  cocos2d::CCAction *v14; // r15\n  BoomScrollLayerDelegate *m_delegate; // rdi\n  double v16; // [rsp+4h] [rbp-2Ch] BYREF\n  float v17; // [rsp+Ch] [rbp-24h]\n\n  if ( a1->m_looped || a2 >= 0 && (int)sub_100720070(*((_QWORD *)&a1->m_dynamicObjects + 4 * !a1->m_dynamic)) > a2 )\n  {\n    a1->m_pageMoving = 1;\n    v17 = (float)-a2;\n    v3 = (float *)((__int64 (__fastcall *)(BoomScrollLayer *))a1->getContentSize)(a1);\n    sub_10028CBE0((float *)&v16, (float)(*v3 - a1->m_pageOffset) * v17, 0.0);\n    sub_10028CC90(&a1->m_position, &v16);\n    cocos2d::CCNode::stopActionByTag(a1->m_extendedLayer, 2);\n    m_touchQuotient = a1->m_touchQuotient;\n    if ( m_touchQuotient <= a1->m_maxSpeed )\n    {\n      if ( m_touchQuotient <= a1->m_minSpeed )\n        v5 = 0.96000004;\n      else\n        v5 = 0.72000003;\n    }\n    else\n    {\n      v5 = 0.48000002;\n    }\n    v6.i32[0] = LODWORD(a1->m_unkFloat2);\n    v7 = _mm_cmplt_ss((__m128)0LL, v6);\n    a1->m_touchQuotient = 0.0;\n    v8 = cocos2d::CCMoveTo::create(\n           COERCE_FLOAT(_mm_andnot_ps(v7, (__m128)0x3F800000u).u32[0] | v6.i32[0] & v7.i32[0]) * v5,\n           &a1->m_position);\n    v9 = (unsigned int)cocos2d::CCEaseElasticOut::create(v8, 0.5);\n    v10 = (unsigned int)cocos2d::CCCallFunc::create(\n                          a1,\n                          (cocos2d::SEL_CallFunc)(unsigned __int64)BoomScrollLayer::moveToPageEnded);\n    v14 = (cocos2d::CCAction *)sub_1003B5760(v9, v10, 0, v11, v12, v13);\n    cocos2d::CCNode::runAction(a1->m_extendedLayer, v14);\n    ((void (__fastcall *)(cocos2d::CCAction *, __int64))v14->setTag)(v14, 2);\n    a1->m_page = a2;\n    m_delegate = a1->m_delegate;\n    if ( m_delegate )\n      ((void (__fastcall *)(BoomScrollLayerDelegate *, BoomScrollLayer *, _QWORD))m_delegate->scrollLayerWillScrollToPage)(\n        m_delegate,\n        a1,\n        (unsigned int)a2);\n    if ( a1->m_looped )\n      BoomScrollLayer::repositionPagesLooped(a1);\n  }\n}", "assembly": "; \n; BoomScrollLayer::moveToPage from 0x1003a6610 to 0x1003a67bb (427 bytes)\n; \n; 16 xrefs:\n; > BoomScrollLayer::addPage_1 @ 0x1003a6942\n; > BoomScrollLayer::addPage @ 0x1003a69b6\n; > BoomScrollLayer::removePage @ 0x1003a6a40\n; > BoomScrollLayer::removePageWithNumber @ 0x1003a6b03\n; > BoomScrollLayer::ccTouchEnded @ 0x1003a74fb\n; > WorldSelectLayer::goToPage @ 0x1003c2c53\n; > ListButtonBar::onLeft @ 0x1003f0377\n; > ListButtonBar::onRight @ 0x1003f0417\n; > ListButtonBar::goToPage @ 0x1003f04bb\n; > LevelSelectLayer::onPrev @ 0x1004329ba\n; > LevelSelectLayer::onNext @ 0x1004329ea\n; > LevelSelectLayer::keyDown @ 0x1004347f4\n; > LevelSelectLayer::keyDown @ 0x100434820\n; > GauntletSelectLayer::goToPage @ 0x100572f61\n; > SecretRewardsLayer::onSwitchPage @ 0x1006329e4\n; > SecretRewardsLayer::goToPage @ 0x100632a21\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    rbp                                                            ; +0x0, 0x1003a6610\nmov     rbp, rsp                                                       ; +0x1, 0x1003a6611\npush    r15                                                            ; +0x4, 0x1003a6614\npush    r14                                                            ; +0x6, 0x1003a6616\npush    r12                                                            ; +0x8, 0x1003a6618\npush    rbx                                                            ; +0xa, 0x1003a661a\nsub     rsp, 10h                                                       ; +0xb, 0x1003a661b\nmov     r14d, esi                                                      ; +0xf, 0x1003a661f\nmov     rbx, rdi                                                       ; +0x12, 0x1003a6622\ncmp     byte ptr [rdi+1ACh], 0                                         ; +0x15, 0x1003a6625\njnz     short loc_1003A665A                                            ; +0x1c, 0x1003a662c\ntest    r14d, r14d                                                     ; +0x1e, 0x1003a662e\njs      loc_1003A67AE                                                  ; +0x21, 0x1003a6631\nmovzx   eax, byte ptr [rbx+1C0h]                                       ; +0x27, 0x1003a6637\nxor     eax, 1                                                         ; +0x2e, 0x1003a663e\nshl     eax, 5                                                         ; +0x31, 0x1003a6641\nmov     rdi, [rax+rbx+1B8h]                                            ; +0x34, 0x1003a6644\ncall    sub_100720070                                                  ; +0x3c, 0x1003a664c\ncmp     eax, r14d                                                      ; +0x41, 0x1003a6651\njle     loc_1003A67AE                                                  ; +0x44, 0x1003a6654\nmov     byte ptr [rbx+220h], 1                                         ; +0x4a, 0x1003a665a\nmov     eax, r14d                                                      ; +0x51, 0x1003a6661\nneg     eax                                                            ; +0x54, 0x1003a6664\ncvtsi2ss xmm0, eax                                                     ; +0x56, 0x1003a6666\nmovss   [rbp+var_24], xmm0                                             ; +0x5a, 0x1003a666a\nmov     rax, [rbx]                                                     ; +0x5f, 0x1003a666f\nmov     rdi, rbx                                                       ; +0x62, 0x1003a6672\ncall    qword ptr [rax+138h]                                           ; +0x65, 0x1003a6675\nmovss   xmm0, dword ptr [rax]                                          ; +0x6b, 0x1003a667b\nsubss   xmm0, dword ptr [rbx+248h]                                     ; +0x6f, 0x1003a667f\nmulss   xmm0, [rbp+var_24]                                             ; +0x77, 0x1003a6687\nlea     r12, [rbp+var_2C]                                              ; +0x7c, 0x1003a668c\nxorps   xmm1, xmm1                                                     ; +0x80, 0x1003a6690\nmov     rdi, r12                                                       ; +0x83, 0x1003a6693\ncall    sub_10028CBE0                                                  ; +0x86, 0x1003a6696\nlea     r15, [rbx+1E8h]                                                ; +0x8b, 0x1003a669b\nmov     rdi, r15                                                       ; +0x92, 0x1003a66a2\nmov     rsi, r12                                                       ; +0x95, 0x1003a66a5\ncall    sub_10028CC90                                                  ; +0x98, 0x1003a66a8\nmov     rdi, [rbx+1F0h]                                                ; +0x9d, 0x1003a66ad\nmov     esi, 2                                                         ; +0xa4, 0x1003a66b4\ncall    cocos2d__CCNode__stopActionByTag                               ; +0xa9, 0x1003a66b9\nmovss   xmm0, dword ptr [rbx+1A8h]                                     ; +0xae, 0x1003a66be\nucomiss xmm0, dword ptr [rbx+20Ch]                                     ; +0xb6, 0x1003a66c6\njbe     short loc_1003A66D9                                            ; +0xbd, 0x1003a66cd\nmovss   xmm3, cs:dword_100817FB4                                       ; +0xbf, 0x1003a66cf\njmp     short loc_1003A66F4                                            ; +0xc7, 0x1003a66d7\nucomiss xmm0, dword ptr [rbx+210h]                                     ; +0xc9, 0x1003a66d9\njbe     short loc_1003A66EC                                            ; +0xd0, 0x1003a66e0\nmovss   xmm3, cs:dword_1008178E0                                       ; +0xd2, 0x1003a66e2\njmp     short loc_1003A66F4                                            ; +0xda, 0x1003a66ea\nmovss   xmm3, cs:dword_1008178E8                                       ; +0xdc, 0x1003a66ec\nmovss   xmm1, dword ptr [rbx+214h]                                     ; +0xe4, 0x1003a66f4\nxorps   xmm0, xmm0                                                     ; +0xec, 0x1003a66fc\ncmpltss xmm0, xmm1                                                     ; +0xef, 0x1003a66ff\nandps   xmm1, xmm0                                                     ; +0xf4, 0x1003a6704\nmovss   xmm2, cs:alpha                                                 ; +0xf7, 0x1003a6707\nandnps  xmm0, xmm2                                                     ; +0xff, 0x1003a670f\norps    xmm0, xmm1                                                     ; +0x102, 0x1003a6712\nmulss   xmm0, xmm3                                                     ; +0x105, 0x1003a6715\nmov     dword ptr [rbx+1A8h], 0                                        ; +0x109, 0x1003a6719\nmov     rdi, r15                                                       ; +0x113, 0x1003a6723\ncall    cocos2d__CCMoveTo__create                                      ; +0x116, 0x1003a6726\nmovss   xmm0, cs:dword_100814FA8                                       ; +0x11b, 0x1003a672b\nmov     rdi, rax                                                       ; +0x123, 0x1003a6733\ncall    cocos2d__CCEaseElasticOut__create                              ; +0x126, 0x1003a6736\nmov     r15, rax                                                       ; +0x12b, 0x1003a673b\nlea     rsi, BoomScrollLayer__moveToPageEnded                          ; +0x12e, 0x1003a673e\nmov     rdi, rbx                                                       ; +0x135, 0x1003a6745\nxor     edx, edx                                                       ; +0x138, 0x1003a6748\ncall    cocos2d__CCCallFunc__create                                    ; +0x13a, 0x1003a674a\nmov     rdi, r15                                                       ; +0x13f, 0x1003a674f\nmov     rsi, rax                                                       ; +0x142, 0x1003a6752\nxor     edx, edx                                                       ; +0x145, 0x1003a6755\nxor     eax, eax                                                       ; +0x147, 0x1003a6757\ncall    sub_1003B5760                                                  ; +0x149, 0x1003a6759\nmov     r15, rax                                                       ; +0x14e, 0x1003a675e\nmov     rdi, [rbx+1F0h]                                                ; +0x151, 0x1003a6761\nmov     rsi, rax                                                       ; +0x158, 0x1003a6768\ncall    cocos2d__CCNode__runAction                                     ; +0x15b, 0x1003a676b\nmov     rax, [r15]                                                     ; +0x160, 0x1003a6770\nmov     rdi, r15                                                       ; +0x163, 0x1003a6773\nmov     esi, 2                                                         ; +0x166, 0x1003a6776\ncall    qword ptr [rax+48h]                                            ; +0x16b, 0x1003a677b\nmov     [rbx+244h], r14d                                               ; +0x16e, 0x1003a677e\nmov     rdi, [rbx+218h]                                                ; +0x175, 0x1003a6785\ntest    rdi, rdi                                                       ; +0x17c, 0x1003a678c\njz      short loc_1003A679D                                            ; +0x17f, 0x1003a678f\nmov     rax, [rdi]                                                     ; +0x181, 0x1003a6791\nmov     rsi, rbx                                                       ; +0x184, 0x1003a6794\nmov     edx, r14d                                                      ; +0x187, 0x1003a6797\ncall    qword ptr [rax+18h]                                            ; +0x18a, 0x1003a679a\ncmp     byte ptr [rbx+1ACh], 1                                         ; +0x18d, 0x1003a679d\njnz     short loc_1003A67AE                                            ; +0x194, 0x1003a67a4\nmov     rdi, rbx                                                       ; +0x196, 0x1003a67a6\ncall    BoomScrollLayer__repositionPagesLooped                         ; +0x199, 0x1003a67a9\nadd     rsp, 10h                                                       ; +0x19e, 0x1003a67ae\npop     rbx                                                            ; +0x1a2, 0x1003a67b2\npop     r12                                                            ; +0x1a3, 0x1003a67b3\npop     r14                                                            ; +0x1a5, 0x1003a67b5\npop     r15                                                            ; +0x1a7, 0x1003a67b7\npop     rbp                                                            ; +0x1a9, 0x1003a67b9\nretn                                                                   ; +0x1aa, 0x1003a67ba", "xrefs": ["BoomScrollLayer::addPage_1 @ 0x1003a6942", "BoomScrollLayer::addPage @ 0x1003a69b6", "BoomScrollLayer::removePage @ 0x1003a6a40", "BoomScrollLayer::removePageWithNumber @ 0x1003a6b03", "BoomScrollLayer::ccTouchEnded @ 0x1003a74fb", "WorldSelectLayer::goToPage @ 0x1003c2c53", "ListButtonBar::onLeft @ 0x1003f0377", "ListButtonBar::onRight @ 0x1003f0417", "ListButtonBar::goToPage @ 0x1003f04bb", "LevelSelectLayer::onPrev @ 0x1004329ba", "LevelSelectLayer::onNext @ 0x1004329ea", "LevelSelectLayer::keyDown @ 0x1004347f4", "LevelSelectLayer::keyDown @ 0x100434820", "GauntletSelectLayer::goToPage @ 0x100572f61", "SecretRewardsLayer::onSwitchPage @ 0x1006329e4", "SecretRewardsLayer::goToPage @ 0x100632a21"], "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"}