{"type": "func", "start": 3938760, "end": 3939230, "name": "BoomScrollLayer::repositionPagesLooped", "pseudocode": "// \n// BoomScrollLayer::repositionPagesLooped from 0x3c19c8 to 0x3c1b9e (470 bytes)\n// \n// 3 xrefs:\n// > BoomScrollLayer::instantMoveToPage @ 0x3c1bfe\n// > BoomScrollLayer::moveToPage @ 0x3c1d28\n// > BoomScrollLayer::init @ 0x3c2474\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:46:31 +0000\n// \n\nint __fastcall BoomScrollLayer::repositionPagesLooped(BoomScrollLayer *this)\n{\n  unsigned int RelativePageForNum; // r8\n  unsigned int v3; // r10\n  int v4; // r0\n  unsigned int v5; // r9\n  int Page; // r7\n  void (__fastcall *v7)(int, _BYTE *); // r5\n  int v8; // r6\n  unsigned int v9; // r11\n  unsigned int v10; // r6\n  void (__fastcall *v11)(int, _BYTE *); // r5\n  void (__fastcall *v12)(int, _BYTE *); // r5\n  unsigned int v13; // r7\n  int v14; // r0\n  int v15; // r5\n  int v16; // r7\n  int v17; // r0\n  void (__fastcall *v18)(_DWORD, int, int); // r11\n  int v19; // r6\n  int v20; // r0\n  void (__fastcall ***v21)(_DWORD, int, int); // r8\n  void (__fastcall *v22)(_DWORD, int, int); // r11\n  int v23; // r0\n  void (__fastcall ***v24)(_DWORD, int, int); // r8\n  void (__fastcall *v25)(_DWORD, int, int); // r10\n  int v26; // r0\n  int v28; // [sp+4h] [bp-18h]\n  int v29; // [sp+4h] [bp-18h]\n  void (__fastcall ***v30)(_DWORD, int, int); // [sp+4h] [bp-18h]\n  _BYTE v31[8]; // [sp+Ch] [bp-10h] BYREF\n\n  RelativePageForNum = BoomScrollLayer::getRelativePageForNum((cocos2d::CCArray **)this, *((_DWORD *)this + 115));\n  v3 = BoomScrollLayer::getRelativePageForNum((cocos2d::CCArray **)this, *((_DWORD *)this + 115) - 1);\n  v4 = BoomScrollLayer::getRelativePageForNum((cocos2d::CCArray **)this, *((_DWORD *)this + 115) + 1);\n  v5 = v4;\n  if ( *((_BYTE *)this + 348) )\n  {\n    Page = BoomScrollLayer::getPage(this, *((_DWORD *)this + 115));\n    v7 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)Page + 92);\n    BoomScrollLayer::getRelativePosForPage((BoomScrollLayer *)v31, (float *)this, *((_DWORD *)this + 115));\n    v7(Page, v31);\n    v8 = *((_DWORD *)this + 115);\n    v9 = v8 - 1;\n    v10 = v8 + 1;\n  }\n  else\n  {\n    v10 = v4;\n    v9 = v3;\n  }\n  v28 = BoomScrollLayer::getPage(this, v9);\n  v11 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v28 + 92);\n  BoomScrollLayer::getRelativePosForPage((BoomScrollLayer *)v31, (float *)this, *((_DWORD *)this + 115) - 1);\n  v11(v28, v31);\n  v29 = BoomScrollLayer::getPage(this, v10);\n  v12 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v29 + 92);\n  BoomScrollLayer::getRelativePosForPage((BoomScrollLayer *)v31, (float *)this, *((_DWORD *)this + 115) + 1);\n  v13 = 0;\n  v12(v29, v31);\n  while ( v13 < cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 91)) )\n  {\n    v14 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 91), v13++);\n    (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v14 + 172))(v14, 0);\n  }\n  if ( *((_BYTE *)this + 348) )\n  {\n    v15 = BoomScrollLayer::getPage(this, *((_DWORD *)this + 115));\n    v16 = BoomScrollLayer::getPage(this, *((_DWORD *)this + 115) - 1);\n    v17 = BoomScrollLayer::getPage(this, *((_DWORD *)this + 115) + 1);\n    v30 = *((void (__fastcall ****)(_DWORD, int, int))this + 85);\n    v18 = **v30;\n    v19 = v17;\n    v20 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 86), RelativePageForNum);\n    v18(v30, v15, v20);\n    v21 = *((void (__fastcall ****)(_DWORD, int, int))this + 85);\n    v22 = **v21;\n    v23 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 86), v3);\n    v22(v21, v16, v23);\n    v24 = *((void (__fastcall ****)(_DWORD, int, int))this + 85);\n    v25 = **v24;\n    v26 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 86), v5);\n    v25(v24, v19, v26);\n  }\n  else\n  {\n    v15 = BoomScrollLayer::getPage(this, RelativePageForNum);\n    v16 = BoomScrollLayer::getPage(this, v9);\n    v19 = BoomScrollLayer::getPage(this, v10);\n  }\n  (*(void (__fastcall **)(int, int))(*(_DWORD *)v15 + 172))(v15, 1);\n  (*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 172))(v16, *((unsigned __int8 *)this + 425) ^ 1);\n  return (*(int (__fastcall **)(int, int))(*(_DWORD *)v19 + 172))(v19, *((unsigned __int8 *)this + 425) ^ 1);\n}", "assembly": "; \n; BoomScrollLayer::repositionPagesLooped from 0x3c19c8 to 0x3c1b9e (470 bytes)\n; \n; 3 xrefs:\n; > BoomScrollLayer::instantMoveToPage @ 0x3c1bfe\n; > BoomScrollLayer::moveToPage @ 0x3c1d28\n; > BoomScrollLayer::init @ 0x3c2474\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:46:31 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x3c19c8\nSUB             SP, SP, #0x1C                                          ; +0x4, 0x3c19cc\nLDR             R5, =(__stack_chk_guard_ptr - 0x3C19DA)                ; +0x6, 0x3c19ce\nMOV             R4, R0                                                 ; +0x8, 0x3c19d0\nLDR.W           R1, [R0,#0x1CC]; int                                   ; +0xa, 0x3c19d2\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xe, 0x3c19d6\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x10, 0x3c19d8\nLDR             R3, [R5]                                               ; +0x12, 0x3c19da\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x14, 0x3c19dc\nBL              _ZN15BoomScrollLayer21getRelativePageForNumEi; BoomScrollLayer::getRelativePageForNum(int) ; +0x16, 0x3c19de\nLDR.W           R1, [R4,#0x1CC]                                        ; +0x1a, 0x3c19e2\nSUBS            R1, #1; int                                            ; +0x1e, 0x3c19e6\nMOV             R8, R0                                                 ; +0x20, 0x3c19e8\nMOV             R0, R4; this                                           ; +0x22, 0x3c19ea\nBL              _ZN15BoomScrollLayer21getRelativePageForNumEi; BoomScrollLayer::getRelativePageForNum(int) ; +0x24, 0x3c19ec\nLDR.W           R1, [R4,#0x1CC]                                        ; +0x28, 0x3c19f0\nADDS            R1, #1; int                                            ; +0x2c, 0x3c19f4\nMOV             R10, R0                                                ; +0x2e, 0x3c19f6\nMOV             R0, R4; this                                           ; +0x30, 0x3c19f8\nBL              _ZN15BoomScrollLayer21getRelativePageForNumEi; BoomScrollLayer::getRelativePageForNum(int) ; +0x32, 0x3c19fa\nLDRB.W          R3, [R4,#0x15C]                                        ; +0x36, 0x3c19fe\nSTR             R5, [SP,#0x1C+var_1C]                                  ; +0x3a, 0x3c1a02\nMOV             R9, R0                                                 ; +0x3c, 0x3c1a04\nCBZ             R3, loc_3C1A38                                         ; +0x3e, 0x3c1a06\nLDR.W           R1, [R4,#0x1CC]; int                                   ; +0x40, 0x3c1a08\nMOV             R0, R4; this                                           ; +0x44, 0x3c1a0c\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x46, 0x3c1a0e\nADD             R6, SP, #0x1C+var_10                                   ; +0x4a, 0x3c1a12\nMOV             R1, R4; int                                            ; +0x4c, 0x3c1a14\nLDR.W           R2, [R4,#0x1CC]                                        ; +0x4e, 0x3c1a16\nLDR             R3, [R0]                                               ; +0x52, 0x3c1a1a\nMOV             R7, R0                                                 ; +0x54, 0x3c1a1c\nMOV             R0, R6; this                                           ; +0x56, 0x3c1a1e\nLDR             R5, [R3,#0x5C]                                         ; +0x58, 0x3c1a20\nBL              _ZN15BoomScrollLayer21getRelativePosForPageEi; BoomScrollLayer::getRelativePosForPage(int) ; +0x5a, 0x3c1a22\nMOV             R1, R6                                                 ; +0x5e, 0x3c1a26\nMOV             R0, R7                                                 ; +0x60, 0x3c1a28\nBLX             R5                                                     ; +0x62, 0x3c1a2a\nLDR.W           R6, [R4,#0x1CC]                                        ; +0x64, 0x3c1a2c\nADD.W           R11, R6, #0xFFFFFFFF                                   ; +0x68, 0x3c1a30\nADDS            R6, #1                                                 ; +0x6c, 0x3c1a34\nB               loc_3C1A3C                                             ; +0x6e, 0x3c1a36\nMOV             R6, R0                                                 ; +0x70, 0x3c1a38\nMOV             R11, R10                                               ; +0x72, 0x3c1a3a\nMOV             R1, R11; int                                           ; +0x74, 0x3c1a3c\nMOV             R0, R4; this                                           ; +0x76, 0x3c1a3e\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x78, 0x3c1a40\nADD             R7, SP, #0x1C+var_10                                   ; +0x7c, 0x3c1a44\nLDR.W           R2, [R4,#0x1CC]                                        ; +0x7e, 0x3c1a46\nMOV             R1, R4; int                                            ; +0x82, 0x3c1a4a\nSUBS            R2, #1                                                 ; +0x84, 0x3c1a4c\nLDR             R3, [R0]                                               ; +0x86, 0x3c1a4e\nSTR             R0, [SP,#0x1C+var_18]                                  ; +0x88, 0x3c1a50\nMOV             R0, R7; this                                           ; +0x8a, 0x3c1a52\nLDR             R5, [R3,#0x5C]                                         ; +0x8c, 0x3c1a54\nBL              _ZN15BoomScrollLayer21getRelativePosForPageEi; BoomScrollLayer::getRelativePosForPage(int) ; +0x8e, 0x3c1a56\nLDR.W           R12, [SP,#0x1C+var_18]                                 ; +0x92, 0x3c1a5a\nMOV             R1, R7                                                 ; +0x96, 0x3c1a5e\nMOV             R0, R12                                                ; +0x98, 0x3c1a60\nBLX             R5                                                     ; +0x9a, 0x3c1a62\nMOV             R1, R6; int                                            ; +0x9c, 0x3c1a64\nMOV             R0, R4; this                                           ; +0x9e, 0x3c1a66\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0xa0, 0x3c1a68\nLDR.W           R2, [R4,#0x1CC]                                        ; +0xa4, 0x3c1a6c\nMOV             R1, R4; int                                            ; +0xa8, 0x3c1a70\nADDS            R2, #1                                                 ; +0xaa, 0x3c1a72\nLDR             R3, [R0]                                               ; +0xac, 0x3c1a74\nSTR             R0, [SP,#0x1C+var_18]                                  ; +0xae, 0x3c1a76\nMOV             R0, R7; this                                           ; +0xb0, 0x3c1a78\nLDR             R5, [R3,#0x5C]                                         ; +0xb2, 0x3c1a7a\nBL              _ZN15BoomScrollLayer21getRelativePosForPageEi; BoomScrollLayer::getRelativePosForPage(int) ; +0xb4, 0x3c1a7c\nLDR.W           R12, [SP,#0x1C+var_18]                                 ; +0xb8, 0x3c1a80\nMOV             R1, R7                                                 ; +0xbc, 0x3c1a84\nMOVS            R7, #0                                                 ; +0xbe, 0x3c1a86\nMOV             R0, R12                                                ; +0xc0, 0x3c1a88\nBLX             R5                                                     ; +0xc2, 0x3c1a8a\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0xc4, 0x3c1a8c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xc8, 0x3c1a90\nCMP             R7, R0                                                 ; +0xcc, 0x3c1a94\nBCS             loc_3C1AB0                                             ; +0xce, 0x3c1a96\nMOV             R1, R7; unsigned int                                   ; +0xd0, 0x3c1a98\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0xd2, 0x3c1a9a\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xd6, 0x3c1a9e\nMOVS            R1, #0                                                 ; +0xda, 0x3c1aa2\nADDS            R7, #1                                                 ; +0xdc, 0x3c1aa4\nLDR             R3, [R0]                                               ; +0xde, 0x3c1aa6\nLDR.W           R3, [R3,#0xAC]                                         ; +0xe0, 0x3c1aa8\nBLX             R3                                                     ; +0xe4, 0x3c1aac\nB               loc_3C1A8C                                             ; +0xe6, 0x3c1aae\nLDRB.W          R3, [R4,#0x15C]                                        ; +0xe8, 0x3c1ab0\nMOV             R0, R4; this                                           ; +0xec, 0x3c1ab4\nCMP             R3, #0                                                 ; +0xee, 0x3c1ab6\nBEQ             loc_3C1B3E                                             ; +0xf0, 0x3c1ab8\nLDR.W           R1, [R4,#0x1CC]; int                                   ; +0xf2, 0x3c1aba\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0xf6, 0x3c1abe\nLDR.W           R1, [R4,#0x1CC]                                        ; +0xfa, 0x3c1ac2\nSUBS            R1, #1; int                                            ; +0xfe, 0x3c1ac6\nMOV             R5, R0                                                 ; +0x100, 0x3c1ac8\nMOV             R0, R4; this                                           ; +0x102, 0x3c1aca\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x104, 0x3c1acc\nLDR.W           R1, [R4,#0x1CC]                                        ; +0x108, 0x3c1ad0\nADDS            R1, #1; int                                            ; +0x10c, 0x3c1ad4\nMOV             R7, R0                                                 ; +0x10e, 0x3c1ad6\nMOV             R0, R4; this                                           ; +0x110, 0x3c1ad8\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x112, 0x3c1ada\nLDR.W           R3, [R4,#0x154]                                        ; +0x116, 0x3c1ade\nMOV             R1, R8; unsigned int                                   ; +0x11a, 0x3c1ae2\nLDR             R2, [R3]                                               ; +0x11c, 0x3c1ae4\nSTR             R3, [SP,#0x1C+var_18]                                  ; +0x11e, 0x3c1ae6\nLDR.W           R11, [R2]                                              ; +0x120, 0x3c1ae8\nMOV             R6, R0                                                 ; +0x124, 0x3c1aec\nLDR.W           R0, [R4,#0x158]; this                                  ; +0x126, 0x3c1aee\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x12a, 0x3c1af2\nLDR             R3, [SP,#0x1C+var_18]                                  ; +0x12e, 0x3c1af6\nMOV             R1, R5                                                 ; +0x130, 0x3c1af8\nMOV             R2, R0                                                 ; +0x132, 0x3c1afa\nMOV             R0, R3                                                 ; +0x134, 0x3c1afc\nBLX             R11                                                    ; +0x136, 0x3c1afe\nLDR.W           R8, [R4,#0x154]                                        ; +0x138, 0x3c1b00\nMOV             R1, R10; unsigned int                                  ; +0x13c, 0x3c1b04\nLDR.W           R0, [R4,#0x158]; this                                  ; +0x13e, 0x3c1b06\nLDR.W           R2, [R8]                                               ; +0x142, 0x3c1b0a\nLDR.W           R11, [R2]                                              ; +0x146, 0x3c1b0e\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x14a, 0x3c1b12\nMOV             R1, R7                                                 ; +0x14e, 0x3c1b16\nMOV             R2, R0                                                 ; +0x150, 0x3c1b18\nMOV             R0, R8                                                 ; +0x152, 0x3c1b1a\nBLX             R11                                                    ; +0x154, 0x3c1b1c\nLDR.W           R8, [R4,#0x154]                                        ; +0x156, 0x3c1b1e\nMOV             R1, R9; unsigned int                                   ; +0x15a, 0x3c1b22\nLDR.W           R0, [R4,#0x158]; this                                  ; +0x15c, 0x3c1b24\nLDR.W           R2, [R8]                                               ; +0x160, 0x3c1b28\nLDR.W           R10, [R2]                                              ; +0x164, 0x3c1b2c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x168, 0x3c1b30\nMOV             R1, R6                                                 ; +0x16c, 0x3c1b34\nMOV             R2, R0                                                 ; +0x16e, 0x3c1b36\nMOV             R0, R8                                                 ; +0x170, 0x3c1b38\nBLX             R10                                                    ; +0x172, 0x3c1b3a\nB               loc_3C1B5A                                             ; +0x174, 0x3c1b3c\nMOV             R1, R8; int                                            ; +0x176, 0x3c1b3e\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x178, 0x3c1b40\nMOV             R1, R11; int                                           ; +0x17c, 0x3c1b44\nMOV             R5, R0                                                 ; +0x17e, 0x3c1b46\nMOV             R0, R4; this                                           ; +0x180, 0x3c1b48\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x182, 0x3c1b4a\nMOV             R1, R6; int                                            ; +0x186, 0x3c1b4e\nMOV             R7, R0                                                 ; +0x188, 0x3c1b50\nMOV             R0, R4; this                                           ; +0x18a, 0x3c1b52\nBL              _ZN15BoomScrollLayer7getPageEi; BoomScrollLayer::getPage(int) ; +0x18c, 0x3c1b54\nMOV             R6, R0                                                 ; +0x190, 0x3c1b58\nLDR             R2, [R5]                                               ; +0x192, 0x3c1b5a\nMOV             R0, R5                                                 ; +0x194, 0x3c1b5c\nMOVS            R1, #1                                                 ; +0x196, 0x3c1b5e\nLDR.W           R2, [R2,#0xAC]                                         ; +0x198, 0x3c1b60\nBLX             R2                                                     ; +0x19c, 0x3c1b64\nLDR             R3, [R7]                                               ; +0x19e, 0x3c1b66\nLDRB.W          R1, [R4,#0x1A9]                                        ; +0x1a0, 0x3c1b68\nMOV             R0, R7                                                 ; +0x1a4, 0x3c1b6c\nLDR.W           R3, [R3,#0xAC]                                         ; +0x1a6, 0x3c1b6e\nEOR.W           R1, R1, #1                                             ; +0x1aa, 0x3c1b72\nBLX             R3                                                     ; +0x1ae, 0x3c1b76\nLDR             R3, [R6]                                               ; +0x1b0, 0x3c1b78\nLDRB.W          R1, [R4,#0x1A9]                                        ; +0x1b2, 0x3c1b7a\nMOV             R0, R6                                                 ; +0x1b6, 0x3c1b7e\nLDR.W           R3, [R3,#0xAC]                                         ; +0x1b8, 0x3c1b80\nEOR.W           R1, R1, #1                                             ; +0x1bc, 0x3c1b84\nBLX             R3                                                     ; +0x1c0, 0x3c1b88\nLDR             R3, [SP,#0x1C+var_1C]                                  ; +0x1c2, 0x3c1b8a\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x1c4, 0x3c1b8c\nLDR             R3, [R3]                                               ; +0x1c6, 0x3c1b8e\nCMP             R2, R3                                                 ; +0x1c8, 0x3c1b90\nBEQ             loc_3C1B98                                             ; +0x1ca, 0x3c1b92\nBLX             __stack_chk_fail                                       ; +0x1cc, 0x3c1b94\nADD             SP, SP, #0x1C                                          ; +0x1d0, 0x3c1b98\nPOP.W           {R4-R11,PC}                                            ; +0x1d2, 0x3c1b9a", "xrefs": ["BoomScrollLayer::instantMoveToPage @ 0x3c1bfe", "BoomScrollLayer::moveToPage @ 0x3c1d28", "BoomScrollLayer::init @ 0x3c2474"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}