{"type": "func", "start": 3938392, "end": 3938754, "name": "BoomScrollLayer::setupDynamicScrolling", "pseudocode": "// \n// BoomScrollLayer::setupDynamicScrolling from 0x3c1858 to 0x3c19c2 (362 bytes)\n// \n// 1 xrefs:\n// > BoomScrollLayer::init @ 0x3c2484\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\nunsigned int __fastcall BoomScrollLayer::setupDynamicScrolling(int a1, cocos2d::CCObject *this, int a3, int a4)\n{\n  cocos2d::CCObject *v6; // r0\n  cocos2d::CCArray *v7; // r0\n  int Object; // r9\n  void (__fastcall *v9)(int, cocos2d::CCObject **); // r10\n  int v10; // r9\n  void (__fastcall *v11)(int, cocos2d::CCObject **); // r10\n  int v12; // r9\n  void (__fastcall *v13)(int, cocos2d::CCObject **); // r10\n  void (__fastcall ***v14)(_DWORD, int, int, int, int, cocos2d::CCObject *, int, int); // r5\n  void (__fastcall *v15)(_DWORD, int, int, int, int, cocos2d::CCObject *, int, int); // r9\n  int v16; // r10\n  int v17; // r0\n  int v18; // r3\n  void (__fastcall ***v19)(_DWORD, int, int); // r5\n  void (__fastcall *v20)(_DWORD, int, int); // r9\n  int v21; // r10\n  int v22; // r0\n  void (__fastcall ***v23)(_DWORD, int, int); // r5\n  void (__fastcall *v24)(_DWORD, int, int); // r9\n  int v25; // r10\n  int v26; // r0\n  unsigned int result; // r0\n  unsigned int v28; // r5\n  int v29; // r5\n  cocos2d::CCObject *v31; // [sp+4h] [bp-Ch] BYREF\n  int v32; // [sp+8h] [bp-8h]\n  int v33; // [sp+Ch] [bp-4h]\n\n  v31 = this;\n  v32 = a3;\n  v33 = a4;\n  *(_DWORD *)(a1 + 340) = a3;\n  v6 = *(cocos2d::CCObject **)(a1 + 344);\n  if ( v6 )\n    cocos2d::CCObject::release(v6);\n  *(_DWORD *)(a1 + 344) = this;\n  cocos2d::CCObject::retain(this);\n  v7 = *(cocos2d::CCArray **)(a1 + 364);\n  *(_BYTE *)(a1 + 348) = 1;\n  Object = cocos2d::CCArray::lastObject(v7);\n  v9 = *(void (__fastcall **)(int, cocos2d::CCObject **))(*(_DWORD *)Object + 92);\n  BoomScrollLayer::getRelativePosForPage((BoomScrollLayer *)&v31, (float *)a1, -1);\n  v9(Object, &v31);\n  v10 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 364), 0);\n  v11 = *(void (__fastcall **)(int, cocos2d::CCObject **))(*(_DWORD *)v10 + 92);\n  BoomScrollLayer::getRelativePosForPage((BoomScrollLayer *)&v31, (float *)a1, 0);\n  v11(v10, &v31);\n  v12 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 364), 1u);\n  v13 = *(void (__fastcall **)(int, cocos2d::CCObject **))(*(_DWORD *)v12 + 92);\n  BoomScrollLayer::getRelativePosForPage((BoomScrollLayer *)&v31, (float *)a1, 1);\n  v13(v12, &v31);\n  v14 = *(void (__fastcall ****)(_DWORD, int, int, int, int, cocos2d::CCObject *, int, int))(a1 + 340);\n  v15 = **v14;\n  v16 = cocos2d::CCArray::lastObject(*(cocos2d::CCArray **)(a1 + 364));\n  v17 = cocos2d::CCArray::lastObject(*(cocos2d::CCArray **)(a1 + 344));\n  v15(v14, v16, v17, v18, a1, v31, v32, v33);\n  v19 = *(void (__fastcall ****)(_DWORD, int, int))(a1 + 340);\n  v20 = **v19;\n  v21 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 364), 0);\n  v22 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 344), 0);\n  v20(v19, v21, v22);\n  v23 = *(void (__fastcall ****)(_DWORD, int, int))(a1 + 340);\n  v24 = **v23;\n  v25 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 364), 1u);\n  v26 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 344), 1u);\n  v24(v23, v25, v26);\n  result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 344));\n  if ( result <= 2 )\n  {\n    *(_BYTE *)(a1 + 348) = 0;\n    *(_BYTE *)(a1 + 336) = 0;\n    while ( 1 )\n    {\n      v28 = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 364));\n      result = cocos2d::CCArray::count(this);\n      if ( v28 <= result )\n        break;\n      v29 = cocos2d::CCArray::lastObject(*(cocos2d::CCArray **)(a1 + 364));\n      cocos2d::CCArray::removeLastObject(*(cocos2d::CCArray **)(a1 + 364), 1);\n      (*(void (__fastcall **)(int))(*(_DWORD *)v29 + 268))(v29);\n    }\n  }\n  return result;\n}", "assembly": "; \n; BoomScrollLayer::setupDynamicScrolling from 0x3c1858 to 0x3c19c2 (362 bytes)\n; \n; 1 xrefs:\n; > BoomScrollLayer::init @ 0x3c2484\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          {R0-R10,LR}                                            ; +0x0, 0x3c1858\nMOV             R4, R0                                                 ; +0x4, 0x3c185c\nLDR             R3, =(__stack_chk_guard_ptr - 0x3C186A)                ; +0x6, 0x3c185e\nMOV             R8, R1                                                 ; +0x8, 0x3c1860\nSTR.W           R2, [R0,#0x154]                                        ; +0xa, 0x3c1862\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0xe, 0x3c1866\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x10, 0x3c1868\nLDR.W           R0, [R0,#0x158]; this                                  ; +0x12, 0x3c186a\nLDR             R1, [R3]                                               ; +0x16, 0x3c186e\nMOV             R7, R3                                                 ; +0x18, 0x3c1870\nSTR             R1, [SP,#0x10+var_4]                                   ; +0x1a, 0x3c1872\nCBZ             R0, loc_3C187A                                         ; +0x1c, 0x3c1874\nBL              _ZN7cocos2d8CCObject7releaseEv; cocos2d::CCObject::release(void) ; +0x1e, 0x3c1876\nMOV             R0, R8; this                                           ; +0x22, 0x3c187a\nSTR.W           R8, [R4,#0x158]                                        ; +0x24, 0x3c187c\nBL              _ZN7cocos2d8CCObject6retainEv; cocos2d::CCObject::retain(void) ; +0x28, 0x3c1880\nMOVS            R6, #1                                                 ; +0x2c, 0x3c1884\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0x2e, 0x3c1886\nADD             R5, SP, #0x10+var_C                                    ; +0x32, 0x3c188a\nSTRB.W          R6, [R4,#0x15C]                                        ; +0x34, 0x3c188c\nBL              _ZN7cocos2d7CCArray10lastObjectEv; cocos2d::CCArray::lastObject(void) ; +0x38, 0x3c1890\nMOV.W           R2, #0xFFFFFFFF                                        ; +0x3c, 0x3c1894\nMOV             R1, R4; int                                            ; +0x40, 0x3c1898\nLDR             R3, [R0]                                               ; +0x42, 0x3c189a\nMOV             R9, R0                                                 ; +0x44, 0x3c189c\nMOV             R0, R5; this                                           ; +0x46, 0x3c189e\nLDR.W           R10, [R3,#0x5C]                                        ; +0x48, 0x3c18a0\nBL              _ZN15BoomScrollLayer21getRelativePosForPageEi; BoomScrollLayer::getRelativePosForPage(int) ; +0x4c, 0x3c18a4\nMOV             R0, R9                                                 ; +0x50, 0x3c18a8\nMOV             R1, R5                                                 ; +0x52, 0x3c18aa\nBLX             R10                                                    ; +0x54, 0x3c18ac\nMOVS            R1, #0; unsigned int                                   ; +0x56, 0x3c18ae\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0x58, 0x3c18b0\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x5c, 0x3c18b4\nMOVS            R2, #0                                                 ; +0x60, 0x3c18b8\nMOV             R1, R4; int                                            ; +0x62, 0x3c18ba\nLDR             R3, [R0]                                               ; +0x64, 0x3c18bc\nMOV             R9, R0                                                 ; +0x66, 0x3c18be\nMOV             R0, R5; this                                           ; +0x68, 0x3c18c0\nLDR.W           R10, [R3,#0x5C]                                        ; +0x6a, 0x3c18c2\nBL              _ZN15BoomScrollLayer21getRelativePosForPageEi; BoomScrollLayer::getRelativePosForPage(int) ; +0x6e, 0x3c18c6\nMOV             R0, R9                                                 ; +0x72, 0x3c18ca\nMOV             R1, R5                                                 ; +0x74, 0x3c18cc\nBLX             R10                                                    ; +0x76, 0x3c18ce\nMOV             R1, R6; unsigned int                                   ; +0x78, 0x3c18d0\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0x7a, 0x3c18d2\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x7e, 0x3c18d6\nMOV             R2, R6                                                 ; +0x82, 0x3c18da\nMOV             R1, R4; int                                            ; +0x84, 0x3c18dc\nLDR             R3, [R0]                                               ; +0x86, 0x3c18de\nMOV             R9, R0                                                 ; +0x88, 0x3c18e0\nMOV             R0, R5; this                                           ; +0x8a, 0x3c18e2\nLDR.W           R10, [R3,#0x5C]                                        ; +0x8c, 0x3c18e4\nBL              _ZN15BoomScrollLayer21getRelativePosForPageEi; BoomScrollLayer::getRelativePosForPage(int) ; +0x90, 0x3c18e8\nMOV             R1, R5                                                 ; +0x94, 0x3c18ec\nMOV             R0, R9                                                 ; +0x96, 0x3c18ee\nBLX             R10                                                    ; +0x98, 0x3c18f0\nLDR.W           R5, [R4,#0x154]                                        ; +0x9a, 0x3c18f2\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0x9e, 0x3c18f6\nLDR             R3, [R5]                                               ; +0xa2, 0x3c18fa\nLDR.W           R9, [R3]                                               ; +0xa4, 0x3c18fc\nBL              _ZN7cocos2d7CCArray10lastObjectEv; cocos2d::CCArray::lastObject(void) ; +0xa8, 0x3c1900\nMOV             R10, R0                                                ; +0xac, 0x3c1904\nLDR.W           R0, [R4,#0x158]; this                                  ; +0xae, 0x3c1906\nBL              _ZN7cocos2d7CCArray10lastObjectEv; cocos2d::CCArray::lastObject(void) ; +0xb2, 0x3c190a\nMOV             R1, R10                                                ; +0xb6, 0x3c190e\nMOV             R2, R0                                                 ; +0xb8, 0x3c1910\nMOV             R0, R5                                                 ; +0xba, 0x3c1912\nBLX             R9                                                     ; +0xbc, 0x3c1914\nLDR.W           R5, [R4,#0x154]                                        ; +0xbe, 0x3c1916\nMOVS            R1, #0; unsigned int                                   ; +0xc2, 0x3c191a\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0xc4, 0x3c191c\nLDR             R3, [R5]                                               ; +0xc8, 0x3c1920\nLDR.W           R9, [R3]                                               ; +0xca, 0x3c1922\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xce, 0x3c1926\nMOVS            R1, #0; unsigned int                                   ; +0xd2, 0x3c192a\nMOV             R10, R0                                                ; +0xd4, 0x3c192c\nLDR.W           R0, [R4,#0x158]; this                                  ; +0xd6, 0x3c192e\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xda, 0x3c1932\nMOV             R1, R10                                                ; +0xde, 0x3c1936\nMOV             R2, R0                                                 ; +0xe0, 0x3c1938\nMOV             R0, R5                                                 ; +0xe2, 0x3c193a\nBLX             R9                                                     ; +0xe4, 0x3c193c\nLDR.W           R5, [R4,#0x154]                                        ; +0xe6, 0x3c193e\nMOV             R1, R6; unsigned int                                   ; +0xea, 0x3c1942\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0xec, 0x3c1944\nLDR             R3, [R5]                                               ; +0xf0, 0x3c1948\nLDR.W           R9, [R3]                                               ; +0xf2, 0x3c194a\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xf6, 0x3c194e\nMOV             R1, R6; unsigned int                                   ; +0xfa, 0x3c1952\nMOV             R10, R0                                                ; +0xfc, 0x3c1954\nLDR.W           R0, [R4,#0x158]; this                                  ; +0xfe, 0x3c1956\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x102, 0x3c195a\nMOV             R1, R10                                                ; +0x106, 0x3c195e\nMOV             R2, R0                                                 ; +0x108, 0x3c1960\nMOV             R0, R5                                                 ; +0x10a, 0x3c1962\nBLX             R9                                                     ; +0x10c, 0x3c1964\nLDR.W           R0, [R4,#0x158]; this                                  ; +0x10e, 0x3c1966\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x112, 0x3c196a\nCMP             R0, #2                                                 ; +0x116, 0x3c196e\nBHI             loc_3C19B0                                             ; +0x118, 0x3c1970\nMOVS            R3, #0                                                 ; +0x11a, 0x3c1972\nSTRB.W          R3, [R4,#0x15C]                                        ; +0x11c, 0x3c1974\nSTRB.W          R3, [R4,#0x150]                                        ; +0x120, 0x3c1978\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0x124, 0x3c197c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x128, 0x3c1980\nMOV             R5, R0                                                 ; +0x12c, 0x3c1984\nMOV             R0, R8; this                                           ; +0x12e, 0x3c1986\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x130, 0x3c1988\nCMP             R5, R0                                                 ; +0x134, 0x3c198c\nBLS             loc_3C19B0                                             ; +0x136, 0x3c198e\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0x138, 0x3c1990\nBL              _ZN7cocos2d7CCArray10lastObjectEv; cocos2d::CCArray::lastObject(void) ; +0x13c, 0x3c1994\nMOVS            R1, #1; bool                                           ; +0x140, 0x3c1998\nMOV             R5, R0                                                 ; +0x142, 0x3c199a\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0x144, 0x3c199c\nBL              _ZN7cocos2d7CCArray16removeLastObjectEb; cocos2d::CCArray::removeLastObject(bool) ; +0x148, 0x3c19a0\nLDR             R3, [R5]                                               ; +0x14c, 0x3c19a4\nMOV             R0, R5                                                 ; +0x14e, 0x3c19a6\nLDR.W           R3, [R3,#0x10C]                                        ; +0x150, 0x3c19a8\nBLX             R3                                                     ; +0x154, 0x3c19ac\nB               loc_3C197C                                             ; +0x156, 0x3c19ae\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x158, 0x3c19b0\nLDR             R3, [R7]                                               ; +0x15a, 0x3c19b2\nCMP             R2, R3                                                 ; +0x15c, 0x3c19b4\nBEQ             loc_3C19BC                                             ; +0x15e, 0x3c19b6\nBLX             __stack_chk_fail                                       ; +0x160, 0x3c19b8\nADD             SP, SP, #0x10                                          ; +0x164, 0x3c19bc\nPOP.W           {R4-R10,PC}                                            ; +0x166, 0x3c19be", "xrefs": ["BoomScrollLayer::init @ 0x3c2484"], "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"}