{"type": "func", "start": 4296196320, "end": 4296196732, "name": "BoomScrollLayer::moveToPage", "pseudocode": "// \n// BoomScrollLayer::moveToPage from 0x10012c0e0 to 0x10012c27c (412 bytes)\n// \n// 7 xrefs:\n// > BoomScrollLayer::ccTouchEnded @ 0x10012c990\n// > ListButtonBar::goToPage @ 0x100168258\n// > GauntletSelectLayer::goToPage @ 0x1001bfdc8\n// > SecretRewardsLayer::goToPage @ 0x1002ea1a0\n// > LevelSelectLayer::onPrev @ 0x10040231c\n// > LevelSelectLayer::onNext @ 0x10040234c\n// > LevelSelectLayer::keyDown @ 0x1004038e4\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// local variable allocation has failed, the output may be wrong!\nvoid __fastcall BoomScrollLayer::moveToPage(BoomScrollLayer *a1, int a2)\n{\n  __int64 v2; // x20\n  __int64 v4; // x8\n  __n128 v5; // q0\n  __n128 v6; // q1\n  float m_touchQuotient; // s0\n  float v8; // s0\n  float m_unkFloat2; // s1\n  cocos2d::CCMoveTo *v10; // x0\n  cocos2d::CCEaseElasticOut *v11; // x21\n  cocos2d::CCAction *v12; // x21\n  BoomScrollLayerDelegate *m_delegate; // x0\n  double v14; // [xsp+18h] [xbp-38h] BYREF\n  cocos2d::SEL_CallFunc v15; // 0:x1.16\n\n  v2 = *(_QWORD *)&a2;\n  if ( a1->m_looped )\n    goto LABEL_6;\n  if ( (a2 & 0x80000000) == 0 )\n  {\n    v4 = 472;\n    if ( a1->m_dynamic )\n      v4 = 440;\n    if ( (int)sub_10024A36C(*(BoomScrollLayer_vtbl **)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable\n                                                     + v4)) > a2 )\n    {\nLABEL_6:\n      a1->m_pageMoving = 1;\n      v5.n128_f32[0] = (float)(*(float *)((__int64 (__fastcall *)(BoomScrollLayer *))a1->getContentSize)(a1)\n                             - a1->m_pageOffset)\n                     * (float)-(int)v2;\n      v6.n128_u32[0] = 0;\n      sub_100022980(v5, v6, &v14);\n      sub_1000229D0(&a1->m_position, &v14);\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          v8 = 0.96;\n        else\n          v8 = 0.72;\n      }\n      else\n      {\n        v8 = 0.48;\n      }\n      m_unkFloat2 = a1->m_unkFloat2;\n      if ( m_unkFloat2 <= 0.0 )\n        m_unkFloat2 = 1.0;\n      a1->m_touchQuotient = 0.0;\n      v10 = cocos2d::CCMoveTo::create(v8 * m_unkFloat2, &a1->m_position);\n      v11 = cocos2d::CCEaseElasticOut::create(v10, 0.5);\n      v15.ptr = (void (*)(void))BoomScrollLayer::moveToPageEnded;\n      v15.adj = 0;\n      cocos2d::CCCallFunc::create(a1, v15);\n      v12 = (cocos2d::CCAction *)sub_10018A494(v11);\n      cocos2d::CCNode::runAction(a1->m_extendedLayer, v12);\n      ((void (__fastcall *)(cocos2d::CCAction *, __int64))v12->setTag)(v12, 2);\n      a1->m_page = v2;\n      m_delegate = a1->m_delegate;\n      if ( m_delegate )\n        ((void (__fastcall *)(BoomScrollLayerDelegate *, BoomScrollLayer *, __int64))m_delegate->scrollLayerWillScrollToPage)(\n          m_delegate,\n          a1,\n          v2);\n      if ( a1->m_looped )\n        BoomScrollLayer::repositionPagesLooped(a1);\n    }\n  }\n}", "assembly": "; \n; BoomScrollLayer::moveToPage from 0x10012c0e0 to 0x10012c27c (412 bytes)\n; \n; 7 xrefs:\n; > BoomScrollLayer::ccTouchEnded @ 0x10012c990\n; > ListButtonBar::goToPage @ 0x100168258\n; > GauntletSelectLayer::goToPage @ 0x1001bfdc8\n; > SecretRewardsLayer::goToPage @ 0x1002ea1a0\n; > LevelSelectLayer::onPrev @ 0x10040231c\n; > LevelSelectLayer::onNext @ 0x10040234c\n; > LevelSelectLayer::keyDown @ 0x1004038e4\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\nSUB             SP, SP, #0x60                                          ; +0x0, 0x10012c0e0\nSTP             D9, D8, [SP,#0x50+var_30]                              ; +0x4, 0x10012c0e4\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x8, 0x10012c0e8\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0xc, 0x10012c0ec\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x10, 0x10012c0f0\nADD             X29, SP, #0x50                                         ; +0x14, 0x10012c0f4\nMOV             X20, X1                                                ; +0x18, 0x10012c0f8\nMOV             X19, X0                                                ; +0x1c, 0x10012c0fc\nLDRB            W8, [X0,#0x1AC]                                        ; +0x20, 0x10012c100\nTBNZ            W8, #0, loc_10012C130                                  ; +0x24, 0x10012c104\nTBNZ            W20, #0x1F, loc_10012C264                              ; +0x28, 0x10012c108\nLDRB            W8, [X19,#0x1C0]                                       ; +0x2c, 0x10012c10c\nCMP             W8, #0                                                 ; +0x30, 0x10012c110\nMOV             W8, #0x1D8                                             ; +0x34, 0x10012c114\nMOV             W9, #0x1B8                                             ; +0x38, 0x10012c118\nCSEL            X8, X9, X8, NE                                         ; +0x3c, 0x10012c11c\nLDR             X0, [X19,X8]                                           ; +0x40, 0x10012c120\nBL              sub_10024A36C                                          ; +0x44, 0x10012c124\nCMP             W0, W20                                                ; +0x48, 0x10012c128\nB.LE            loc_10012C264                                          ; +0x4c, 0x10012c12c\nMOV             W8, #1                                                 ; +0x50, 0x10012c130\nSTRB            W8, [X19,#0x220]                                       ; +0x54, 0x10012c134\nNEG             W8, W20                                                ; +0x58, 0x10012c138\nSCVTF           S8, W8                                                 ; +0x5c, 0x10012c13c\nLDR             X8, [X19]                                              ; +0x60, 0x10012c140\nLDR             X8, [X8,#0x138]                                        ; +0x64, 0x10012c144\nMOV             X0, X19                                                ; +0x68, 0x10012c148\nBLR             X8                                                     ; +0x6c, 0x10012c14c\nLDR             S0, [X0]                                               ; +0x70, 0x10012c150\nLDR             S1, [X19,#0x248]                                       ; +0x74, 0x10012c154\nFSUB            S0, S0, S1                                             ; +0x78, 0x10012c158\nFMUL            S0, S0, S8                                             ; +0x7c, 0x10012c15c\nADD             X0, SP, #0x50+var_38                                   ; +0x80, 0x10012c160\nFMOV            S1, WZR                                                ; +0x84, 0x10012c164\nBL              sub_100022980                                          ; +0x88, 0x10012c168\nADD             X0, X19, #0x1E8                                        ; +0x8c, 0x10012c16c\nADD             X1, SP, #0x50+var_38                                   ; +0x90, 0x10012c170\nBL              sub_1000229D0                                          ; +0x94, 0x10012c174\nLDR             X0, [X19,#0x1F0]                                       ; +0x98, 0x10012c178\nMOV             W1, #2                                                 ; +0x9c, 0x10012c17c\nBL              cocos2d__CCNode__stopActionByTag                       ; +0xa0, 0x10012c180\nLDR             S0, [X19,#0x1A8]                                       ; +0xa4, 0x10012c184\nLDR             S1, [X19,#0x20C]                                       ; +0xa8, 0x10012c188\nFCMP            S0, S1                                                 ; +0xac, 0x10012c18c\nB.LE            loc_10012C1A0                                          ; +0xb0, 0x10012c190\nADRP            X8, #dword_100636F04@PAGE                              ; +0xb4, 0x10012c194\nLDR             S0, [X8,#dword_100636F04@PAGEOFF]                      ; +0xb8, 0x10012c198\nB               loc_10012C1C0                                          ; +0xbc, 0x10012c19c\nLDR             S1, [X19,#0x210]                                       ; +0xc0, 0x10012c1a0\nFCMP            S0, S1                                                 ; +0xc4, 0x10012c1a4\nB.LE            loc_10012C1B8                                          ; +0xc8, 0x10012c1a8\nADRP            X8, #dword_100635D48@PAGE                              ; +0xcc, 0x10012c1ac\nLDR             S0, [X8,#dword_100635D48@PAGEOFF]                      ; +0xd0, 0x10012c1b0\nB               loc_10012C1C0                                          ; +0xd4, 0x10012c1b4\nADRP            X8, #dword_100635D50@PAGE                              ; +0xd8, 0x10012c1b8\nLDR             S0, [X8,#dword_100635D50@PAGEOFF]                      ; +0xdc, 0x10012c1bc\nLDR             S1, [X19,#0x214]                                       ; +0xe0, 0x10012c1c0\nFCMP            S1, #0.0                                               ; +0xe4, 0x10012c1c4\nFMOV            S2, #1.0                                               ; +0xe8, 0x10012c1c8\nFCSEL           S1, S1, S2, GT                                         ; +0xec, 0x10012c1cc\nFMUL            S0, S0, S1                                             ; +0xf0, 0x10012c1d0\nSTR             WZR, [X19,#0x1A8]                                      ; +0xf4, 0x10012c1d4\nADD             X0, X19, #0x1E8                                        ; +0xf8, 0x10012c1d8\nBL              cocos2d__CCMoveTo__create                              ; +0xfc, 0x10012c1dc\nFMOV            S0, #0.5                                               ; +0x100, 0x10012c1e0\nBL              cocos2d__CCEaseElasticOut__create                      ; +0x104, 0x10012c1e4\nMOV             X21, X0                                                ; +0x108, 0x10012c1e8\nADRL            X1, BoomScrollLayer__moveToPageEnded                   ; +0x10c, 0x10012c1ec\nMOV             X0, X19                                                ; +0x114, 0x10012c1f4\nMOV             X2, #0                                                 ; +0x118, 0x10012c1f8\nBL              cocos2d__CCCallFunc__create                            ; +0x11c, 0x10012c1fc\nSTP             X0, XZR, [SP,#0x50+var_50]                             ; +0x120, 0x10012c200\nMOV             X0, X21                                                ; +0x124, 0x10012c204\nBL              sub_10018A494                                          ; +0x128, 0x10012c208\nMOV             X21, X0                                                ; +0x12c, 0x10012c20c\nLDR             X0, [X19,#0x1F0]                                       ; +0x130, 0x10012c210\nMOV             X1, X21                                                ; +0x134, 0x10012c214\nBL              cocos2d__CCNode__runAction                             ; +0x138, 0x10012c218\nLDR             X8, [X21]                                              ; +0x13c, 0x10012c21c\nLDR             X8, [X8,#0x48]                                         ; +0x140, 0x10012c220\nMOV             X0, X21                                                ; +0x144, 0x10012c224\nMOV             W1, #2                                                 ; +0x148, 0x10012c228\nBLR             X8                                                     ; +0x14c, 0x10012c22c\nSTR             W20, [X19,#0x244]                                      ; +0x150, 0x10012c230\nLDR             X0, [X19,#0x218]                                       ; +0x154, 0x10012c234\nCBZ             X0, loc_10012C250                                      ; +0x158, 0x10012c238\nLDR             X8, [X0]                                               ; +0x15c, 0x10012c23c\nLDR             X8, [X8,#0x18]                                         ; +0x160, 0x10012c240\nMOV             X1, X19                                                ; +0x164, 0x10012c244\nMOV             X2, X20                                                ; +0x168, 0x10012c248\nBLR             X8                                                     ; +0x16c, 0x10012c24c\nLDRB            W8, [X19,#0x1AC]                                       ; +0x170, 0x10012c250\nCMP             W8, #1                                                 ; +0x174, 0x10012c254\nB.NE            loc_10012C264                                          ; +0x178, 0x10012c258\nMOV             X0, X19                                                ; +0x17c, 0x10012c25c\nBL              BoomScrollLayer__repositionPagesLooped                 ; +0x180, 0x10012c260\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x184, 0x10012c264\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x188, 0x10012c268\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0x18c, 0x10012c26c\nLDP             D9, D8, [SP,#0x50+var_30]                              ; +0x190, 0x10012c270\nADD             SP, SP, #0x60 ; '`'                                    ; +0x194, 0x10012c274\nRET                                                                    ; +0x198, 0x10012c278", "xrefs": ["BoomScrollLayer::ccTouchEnded @ 0x10012c990", "ListButtonBar::goToPage @ 0x100168258", "GauntletSelectLayer::goToPage @ 0x1001bfdc8", "SecretRewardsLayer::goToPage @ 0x1002ea1a0", "LevelSelectLayer::onPrev @ 0x10040231c", "LevelSelectLayer::onNext @ 0x10040234c", "LevelSelectLayer::keyDown @ 0x1004038e4"], "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"}