{"type": "func", "start": 3023576, "end": 3024046, "name": "BoomScrollLayer::repositionPagesLooped", "pseudocode": "// \n// BoomScrollLayer::repositionPagesLooped from 0x2e22d8 to 0x2e24ae (470 bytes)\n// \n// 3 xrefs:\n// > BoomScrollLayer::instantMoveToPage @ 0x2e250e\n// > BoomScrollLayer::moveToPage @ 0x2e2638\n// > BoomScrollLayer::init @ 0x2e2d84\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::repositionPagesLooped(BoomScrollLayer *a1)\n{\n  int RelativePageForNum; // r8\n  unsigned int v3; // r10\n  int v4; // r0\n  unsigned int v5; // r9\n  cocos2d::CCLayer *Page; // r7\n  void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5\n  int m_page; // r6\n  int v9; // r11\n  int v10; // r6\n  void (__fastcall *v11)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5\n  void (__fastcall *v12)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5\n  unsigned int v13; // r7\n  int v14; // r0\n  cocos2d::CCLayer *v15; // r5\n  cocos2d::CCLayer *v16; // r7\n  cocos2d::CCLayer *v17; // r0\n  void (__fastcall *updatePageWithObject)(DynamicScrollDelegate *__hidden, cocos2d::CCObject *, cocos2d::CCObject *); // r11\n  cocos2d::CCLayer *v19; // r6\n  cocos2d::CCObject *v20; // r0\n  DynamicScrollDelegate *v21; // r8\n  void (__fastcall *v22)(DynamicScrollDelegate *__hidden, cocos2d::CCObject *, cocos2d::CCObject *); // r11\n  cocos2d::CCObject *v23; // r0\n  DynamicScrollDelegate *v24; // r8\n  void (__fastcall *v25)(DynamicScrollDelegate *__hidden, cocos2d::CCObject *, cocos2d::CCObject *); // r10\n  cocos2d::CCObject *v26; // r0\n  cocos2d::CCLayer *v27; // [sp+4h] [bp-18h]\n  cocos2d::CCLayer *v28; // [sp+4h] [bp-18h]\n  DynamicScrollDelegate *m_dynamicDelegate; // [sp+4h] [bp-18h]\n  cocos2d::CCPoint v30; // [sp+Ch] [bp-10h] BYREF\n\n  RelativePageForNum = BoomScrollLayer::getRelativePageForNum(a1, a1->m_page);\n  v3 = BoomScrollLayer::getRelativePageForNum(a1, a1->m_page - 1);\n  v4 = BoomScrollLayer::getRelativePageForNum(a1, a1->m_page + 1);\n  v5 = v4;\n  if ( a1->m_dynamic )\n  {\n    Page = BoomScrollLayer::getPage(a1, a1->m_page);\n    setPosition = Page->setPosition;\n    BoomScrollLayer::getRelativePosForPage(&v30, a1, a1->m_page);\n    setPosition(Page, &v30);\n    m_page = a1->m_page;\n    v9 = m_page - 1;\n    v10 = m_page + 1;\n  }\n  else\n  {\n    v10 = v4;\n    v9 = v3;\n  }\n  v27 = BoomScrollLayer::getPage(a1, v9);\n  v11 = v27->setPosition;\n  BoomScrollLayer::getRelativePosForPage(&v30, a1, a1->m_page - 1);\n  v11(v27, &v30);\n  v28 = BoomScrollLayer::getPage(a1, v10);\n  v12 = v28->setPosition;\n  BoomScrollLayer::getRelativePosForPage(&v30, a1, a1->m_page + 1);\n  v13 = 0;\n  v12(v28, &v30);\n  while ( v13 < cocos2d::CCArray::count(a1->m_pages) )\n  {\n    v14 = cocos2d::CCArray::objectAtIndex(a1->m_pages, v13++);\n    (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v14 + 164))(v14, 0);\n  }\n  if ( a1->m_dynamic )\n  {\n    v15 = BoomScrollLayer::getPage(a1, a1->m_page);\n    v16 = BoomScrollLayer::getPage(a1, a1->m_page - 1);\n    v17 = BoomScrollLayer::getPage(a1, a1->m_page + 1);\n    m_dynamicDelegate = a1->m_dynamicDelegate;\n    updatePageWithObject = m_dynamicDelegate->updatePageWithObject;\n    v19 = v17;\n    v20 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(a1->m_dynamicObjects, RelativePageForNum);\n    updatePageWithObject(m_dynamicDelegate, v15, v20);\n    v21 = a1->m_dynamicDelegate;\n    v22 = v21->updatePageWithObject;\n    v23 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(a1->m_dynamicObjects, v3);\n    v22(v21, v16, v23);\n    v24 = a1->m_dynamicDelegate;\n    v25 = v24->updatePageWithObject;\n    v26 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(a1->m_dynamicObjects, v5);\n    v25(v24, v19, v26);\n  }\n  else\n  {\n    v15 = BoomScrollLayer::getPage(a1, RelativePageForNum);\n    v16 = BoomScrollLayer::getPage(a1, v9);\n    v19 = BoomScrollLayer::getPage(a1, v10);\n  }\n  v15->setVisible(v15, 1);\n  v16->setVisible(v16, !a1->m_pagesInvisible);\n  v19->setVisible(v19, !a1->m_pagesInvisible);\n}", "assembly": "; \n; BoomScrollLayer::repositionPagesLooped from 0x2e22d8 to 0x2e24ae (470 bytes)\n; \n; 3 xrefs:\n; > BoomScrollLayer::instantMoveToPage @ 0x2e250e\n; > BoomScrollLayer::moveToPage @ 0x2e2638\n; > BoomScrollLayer::init @ 0x2e2d84\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.W          {R4-R11,LR}                                            ; +0x0, 0x2e22d8\nSUB             SP, SP, #0x1C                                          ; +0x4, 0x2e22dc\nLDR             R5, =(__stack_chk_guard_ptr - 0x2E22EA)                ; +0x6, 0x2e22de\nMOV             R4, R0                                                 ; +0x8, 0x2e22e0\nLDR.W           R1, [R0,#0x1CC]; int                                   ; +0xa, 0x2e22e2\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xe, 0x2e22e6\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x10, 0x2e22e8\nLDR             R3, [R5]                                               ; +0x12, 0x2e22ea\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x14, 0x2e22ec\nBL              _ZN15BoomScrollLayer21getRelativePageForNumEi; BoomScrollLayer::getRelativePageForNum(int) ; +0x16, 0x2e22ee\nLDR.W           R1, [R4,#0x1CC]                                        ; +0x1a, 0x2e22f2\nSUBS            R1, #1; int                                            ; +0x1e, 0x2e22f6\nMOV             R8, R0                                                 ; +0x20, 0x2e22f8\nMOV             R0, R4; this                                           ; +0x22, 0x2e22fa\nBL              _ZN15BoomScrollLayer21getRelativePageForNumEi; BoomScrollLayer::getRelativePageForNum(int) ; +0x24, 0x2e22fc\nLDR.W           R1, [R4,#0x1CC]                                        ; +0x28, 0x2e2300\nADDS            R1, #1; int                                            ; +0x2c, 0x2e2304\nMOV             R10, R0                                                ; +0x2e, 0x2e2306\nMOV             R0, R4; this                                           ; +0x30, 0x2e2308\nBL              _ZN15BoomScrollLayer21getRelativePageForNumEi; BoomScrollLayer::getRelativePageForNum(int) ; +0x32, 0x2e230a\nLDRB.W          R3, [R4,#0x158]                                        ; +0x36, 0x2e230e\nSTR             R5, [SP,#0x1C+var_1C]                                  ; +0x3a, 0x2e2312\nMOV             R9, R0                                                 ; +0x3c, 0x2e2314\nCBZ             R3, loc_2E2348                                         ; +0x3e, 0x2e2316\nLDR.W           R1, [R4,#0x1CC]; int                                   ; +0x40, 0x2e2318\nMOV             R0, R4; this                                           ; +0x44, 0x2e231c\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x46, 0x2e231e\nADD             R6, SP, #0x1C+var_10                                   ; +0x4a, 0x2e2322\nMOV             R1, R4; int                                            ; +0x4c, 0x2e2324\nLDR.W           R2, [R4,#0x1CC]                                        ; +0x4e, 0x2e2326\nLDR             R3, [R0]                                               ; +0x52, 0x2e232a\nMOV             R7, R0                                                 ; +0x54, 0x2e232c\nMOV             R0, R6; this                                           ; +0x56, 0x2e232e\nLDR             R5, [R3,#0x5C]                                         ; +0x58, 0x2e2330\nBL              _ZN15BoomScrollLayer21getRelativePosForPageEi; BoomScrollLayer::getRelativePosForPage(int) ; +0x5a, 0x2e2332\nMOV             R1, R6                                                 ; +0x5e, 0x2e2336\nMOV             R0, R7                                                 ; +0x60, 0x2e2338\nBLX             R5                                                     ; +0x62, 0x2e233a\nLDR.W           R6, [R4,#0x1CC]                                        ; +0x64, 0x2e233c\nADD.W           R11, R6, #0xFFFFFFFF                                   ; +0x68, 0x2e2340\nADDS            R6, #1                                                 ; +0x6c, 0x2e2344\nB               loc_2E234C                                             ; +0x6e, 0x2e2346\nMOV             R6, R0                                                 ; +0x70, 0x2e2348\nMOV             R11, R10                                               ; +0x72, 0x2e234a\nMOV             R1, R11; int                                           ; +0x74, 0x2e234c\nMOV             R0, R4; this                                           ; +0x76, 0x2e234e\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x78, 0x2e2350\nADD             R7, SP, #0x1C+var_10                                   ; +0x7c, 0x2e2354\nLDR.W           R2, [R4,#0x1CC]                                        ; +0x7e, 0x2e2356\nMOV             R1, R4; int                                            ; +0x82, 0x2e235a\nSUBS            R2, #1                                                 ; +0x84, 0x2e235c\nLDR             R3, [R0]                                               ; +0x86, 0x2e235e\nSTR             R0, [SP,#0x1C+var_18]                                  ; +0x88, 0x2e2360\nMOV             R0, R7; this                                           ; +0x8a, 0x2e2362\nLDR             R5, [R3,#0x5C]                                         ; +0x8c, 0x2e2364\nBL              _ZN15BoomScrollLayer21getRelativePosForPageEi; BoomScrollLayer::getRelativePosForPage(int) ; +0x8e, 0x2e2366\nLDR.W           R12, [SP,#0x1C+var_18]                                 ; +0x92, 0x2e236a\nMOV             R1, R7                                                 ; +0x96, 0x2e236e\nMOV             R0, R12                                                ; +0x98, 0x2e2370\nBLX             R5                                                     ; +0x9a, 0x2e2372\nMOV             R1, R6; int                                            ; +0x9c, 0x2e2374\nMOV             R0, R4; this                                           ; +0x9e, 0x2e2376\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0xa0, 0x2e2378\nLDR.W           R2, [R4,#0x1CC]                                        ; +0xa4, 0x2e237c\nMOV             R1, R4; int                                            ; +0xa8, 0x2e2380\nADDS            R2, #1                                                 ; +0xaa, 0x2e2382\nLDR             R3, [R0]                                               ; +0xac, 0x2e2384\nSTR             R0, [SP,#0x1C+var_18]                                  ; +0xae, 0x2e2386\nMOV             R0, R7; this                                           ; +0xb0, 0x2e2388\nLDR             R5, [R3,#0x5C]                                         ; +0xb2, 0x2e238a\nBL              _ZN15BoomScrollLayer21getRelativePosForPageEi; BoomScrollLayer::getRelativePosForPage(int) ; +0xb4, 0x2e238c\nLDR.W           R12, [SP,#0x1C+var_18]                                 ; +0xb8, 0x2e2390\nMOV             R1, R7                                                 ; +0xbc, 0x2e2394\nMOVS            R7, #0                                                 ; +0xbe, 0x2e2396\nMOV             R0, R12                                                ; +0xc0, 0x2e2398\nBLX             R5                                                     ; +0xc2, 0x2e239a\nLDR.W           R0, [R4,#0x168]; this                                  ; +0xc4, 0x2e239c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xc8, 0x2e23a0\nCMP             R7, R0                                                 ; +0xcc, 0x2e23a4\nBCS             loc_2E23C0                                             ; +0xce, 0x2e23a6\nMOV             R1, R7; unsigned int                                   ; +0xd0, 0x2e23a8\nLDR.W           R0, [R4,#0x168]; this                                  ; +0xd2, 0x2e23aa\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xd6, 0x2e23ae\nMOVS            R1, #0                                                 ; +0xda, 0x2e23b2\nADDS            R7, #1                                                 ; +0xdc, 0x2e23b4\nLDR             R3, [R0]                                               ; +0xde, 0x2e23b6\nLDR.W           R3, [R3,#0xA4]                                         ; +0xe0, 0x2e23b8\nBLX             R3                                                     ; +0xe4, 0x2e23bc\nB               loc_2E239C                                             ; +0xe6, 0x2e23be\nLDRB.W          R3, [R4,#0x158]                                        ; +0xe8, 0x2e23c0\nMOV             R0, R4; this                                           ; +0xec, 0x2e23c4\nCMP             R3, #0                                                 ; +0xee, 0x2e23c6\nBEQ             loc_2E244E                                             ; +0xf0, 0x2e23c8\nLDR.W           R1, [R4,#0x1CC]; int                                   ; +0xf2, 0x2e23ca\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0xf6, 0x2e23ce\nLDR.W           R1, [R4,#0x1CC]                                        ; +0xfa, 0x2e23d2\nSUBS            R1, #1; int                                            ; +0xfe, 0x2e23d6\nMOV             R5, R0                                                 ; +0x100, 0x2e23d8\nMOV             R0, R4; this                                           ; +0x102, 0x2e23da\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x104, 0x2e23dc\nLDR.W           R1, [R4,#0x1CC]                                        ; +0x108, 0x2e23e0\nADDS            R1, #1; int                                            ; +0x10c, 0x2e23e4\nMOV             R7, R0                                                 ; +0x10e, 0x2e23e6\nMOV             R0, R4; this                                           ; +0x110, 0x2e23e8\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x112, 0x2e23ea\nLDR.W           R3, [R4,#0x150]                                        ; +0x116, 0x2e23ee\nMOV             R1, R8; unsigned int                                   ; +0x11a, 0x2e23f2\nLDR             R2, [R3]                                               ; +0x11c, 0x2e23f4\nSTR             R3, [SP,#0x1C+var_18]                                  ; +0x11e, 0x2e23f6\nLDR.W           R11, [R2]                                              ; +0x120, 0x2e23f8\nMOV             R6, R0                                                 ; +0x124, 0x2e23fc\nLDR.W           R0, [R4,#0x154]; this                                  ; +0x126, 0x2e23fe\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x12a, 0x2e2402\nLDR             R3, [SP,#0x1C+var_18]                                  ; +0x12e, 0x2e2406\nMOV             R1, R5                                                 ; +0x130, 0x2e2408\nMOV             R2, R0                                                 ; +0x132, 0x2e240a\nMOV             R0, R3                                                 ; +0x134, 0x2e240c\nBLX             R11                                                    ; +0x136, 0x2e240e\nLDR.W           R8, [R4,#0x150]                                        ; +0x138, 0x2e2410\nMOV             R1, R10; unsigned int                                  ; +0x13c, 0x2e2414\nLDR.W           R0, [R4,#0x154]; this                                  ; +0x13e, 0x2e2416\nLDR.W           R2, [R8]                                               ; +0x142, 0x2e241a\nLDR.W           R11, [R2]                                              ; +0x146, 0x2e241e\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x14a, 0x2e2422\nMOV             R1, R7                                                 ; +0x14e, 0x2e2426\nMOV             R2, R0                                                 ; +0x150, 0x2e2428\nMOV             R0, R8                                                 ; +0x152, 0x2e242a\nBLX             R11                                                    ; +0x154, 0x2e242c\nLDR.W           R8, [R4,#0x150]                                        ; +0x156, 0x2e242e\nMOV             R1, R9; unsigned int                                   ; +0x15a, 0x2e2432\nLDR.W           R0, [R4,#0x154]; this                                  ; +0x15c, 0x2e2434\nLDR.W           R2, [R8]                                               ; +0x160, 0x2e2438\nLDR.W           R10, [R2]                                              ; +0x164, 0x2e243c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x168, 0x2e2440\nMOV             R1, R6                                                 ; +0x16c, 0x2e2444\nMOV             R2, R0                                                 ; +0x16e, 0x2e2446\nMOV             R0, R8                                                 ; +0x170, 0x2e2448\nBLX             R10                                                    ; +0x172, 0x2e244a\nB               loc_2E246A                                             ; +0x174, 0x2e244c\nMOV             R1, R8; int                                            ; +0x176, 0x2e244e\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x178, 0x2e2450\nMOV             R1, R11; int                                           ; +0x17c, 0x2e2454\nMOV             R5, R0                                                 ; +0x17e, 0x2e2456\nMOV             R0, R4; this                                           ; +0x180, 0x2e2458\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x182, 0x2e245a\nMOV             R1, R6; int                                            ; +0x186, 0x2e245e\nMOV             R7, R0                                                 ; +0x188, 0x2e2460\nMOV             R0, R4; this                                           ; +0x18a, 0x2e2462\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x18c, 0x2e2464\nMOV             R6, R0                                                 ; +0x190, 0x2e2468\nLDR             R2, [R5]                                               ; +0x192, 0x2e246a\nMOV             R0, R5                                                 ; +0x194, 0x2e246c\nMOVS            R1, #1                                                 ; +0x196, 0x2e246e\nLDR.W           R2, [R2,#0xA4]                                         ; +0x198, 0x2e2470\nBLX             R2                                                     ; +0x19c, 0x2e2474\nLDR             R3, [R7]                                               ; +0x19e, 0x2e2476\nLDRB.W          R1, [R4,#0x1A9]                                        ; +0x1a0, 0x2e2478\nMOV             R0, R7                                                 ; +0x1a4, 0x2e247c\nLDR.W           R3, [R3,#0xA4]                                         ; +0x1a6, 0x2e247e\nEOR.W           R1, R1, #1                                             ; +0x1aa, 0x2e2482\nBLX             R3                                                     ; +0x1ae, 0x2e2486\nLDR             R3, [R6]                                               ; +0x1b0, 0x2e2488\nLDRB.W          R1, [R4,#0x1A9]                                        ; +0x1b2, 0x2e248a\nMOV             R0, R6                                                 ; +0x1b6, 0x2e248e\nLDR.W           R3, [R3,#0xA4]                                         ; +0x1b8, 0x2e2490\nEOR.W           R1, R1, #1                                             ; +0x1bc, 0x2e2494\nBLX             R3                                                     ; +0x1c0, 0x2e2498\nLDR             R3, [SP,#0x1C+var_1C]                                  ; +0x1c2, 0x2e249a\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x1c4, 0x2e249c\nLDR             R3, [R3]                                               ; +0x1c6, 0x2e249e\nCMP             R2, R3                                                 ; +0x1c8, 0x2e24a0\nBEQ             loc_2E24A8                                             ; +0x1ca, 0x2e24a2\nBLX             __stack_chk_fail                                       ; +0x1cc, 0x2e24a4\nADD             SP, SP, #0x1C                                          ; +0x1d0, 0x2e24a8\nPOP.W           {R4-R11,PC}                                            ; +0x1d2, 0x2e24aa", "xrefs": ["BoomScrollLayer::instantMoveToPage @ 0x2e250e", "BoomScrollLayer::moveToPage @ 0x2e2638", "BoomScrollLayer::init @ 0x2e2d84"], "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"}