{"type": "func", "start": 5501020, "end": 5501212, "name": "BrowseSmartTemplateLayer::goToPage", "pseudocode": "// \n// BrowseSmartTemplateLayer::goToPage from 0x53f05c to 0x53f11c (192 bytes)\n// \n// 3 xrefs:\n// > BrowseSmartTemplateLayer::onClick @ 0x53f148\n// > BrowseSmartKeyLayer::init @ 0x53f564\n// > BrowseSmartTemplateLayer::init @ 0x540008\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 BrowseSmartTemplateLayer::goToPage(BrowseSmartTemplateLayer *a1, int a2)\n{\n  cocos2d::CCArray *m_pages; // r0\n  unsigned int i; // r5\n  unsigned int v5; // r6\n  _BOOL4 v6; // r7\n  cocos2d::CCArray *v7; // r9\n  int v8; // r0\n  int v9; // r8\n\n  a1->m_page = a2;\n  m_pages = a1->m_pages;\n  if ( a2 >= 0 )\n  {\n    if ( a2 > (unsigned int)(cocos2d::CCArray::count(m_pages) - 1) )\n      a1->m_page = 0;\n  }\n  else\n  {\n    a1->m_page = cocos2d::CCArray::count(m_pages) - 1;\n  }\n  for ( i = 0; i < cocos2d::CCArray::count(a1->m_pages); ++i )\n  {\n    v5 = 0;\n    v6 = a1->m_page == i;\n    v7 = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(a1->m_pages, i);\n    while ( v5 < cocos2d::CCArray::count(v7) )\n    {\n      v8 = cocos2d::CCArray::objectAtIndex(v7, v5++);\n      v9 = v8;\n      (*(void (__fastcall **)(int, _BOOL4))(*(_DWORD *)v8 + 164))(v8, v6);\n      (*(void (__fastcall **)(int, _BOOL4))(*(_DWORD *)v9 + 520))(v9, v6);\n    }\n  }\n  if ( cocos2d::CCArray::count(a1->m_pages) > 1u )\n  {\n    BrowseSmartTemplateLayer::updateDots(a1);\n  }\n  else\n  {\n    a1->m_prevPageBtn->setVisible(a1->m_prevPageBtn, 0);\n    a1->m_nextPageBtn->setVisible(a1->m_nextPageBtn, 0);\n  }\n}", "assembly": "; \n; BrowseSmartTemplateLayer::goToPage from 0x53f05c to 0x53f11c (192 bytes)\n; \n; 3 xrefs:\n; > BrowseSmartTemplateLayer::onClick @ 0x53f148\n; > BrowseSmartKeyLayer::init @ 0x53f564\n; > BrowseSmartTemplateLayer::init @ 0x540008\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\nCMP             R1, #0                                                 ; +0x0, 0x53f05c\nPUSH.W          {R4-R10,LR}                                            ; +0x2, 0x53f05e\nMOV             R4, R0                                                 ; +0x6, 0x53f062\nMOV             R5, R1                                                 ; +0x8, 0x53f064\nSTR.W           R1, [R4,#0x1F8]                                        ; +0xa, 0x53f066\nLDR.W           R0, [R0,#0x1F4]; this                                  ; +0xe, 0x53f06a\nBGE             loc_53F07E                                             ; +0x12, 0x53f06e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x14, 0x53f070\nSUBS            R0, #1                                                 ; +0x18, 0x53f074\nSTR.W           R0, [R4,#0x1F8]                                        ; +0x1a, 0x53f076\nMOVS            R5, #0                                                 ; +0x1e, 0x53f07a\nB               loc_53F092                                             ; +0x20, 0x53f07c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x22, 0x53f07e\nSUBS            R0, #1                                                 ; +0x26, 0x53f082\nCMP             R5, R0                                                 ; +0x28, 0x53f084\nBLS             loc_53F07A                                             ; +0x2a, 0x53f086\nMOVS            R3, #0                                                 ; +0x2c, 0x53f088\nSTR.W           R3, [R4,#0x1F8]                                        ; +0x2e, 0x53f08a\nB               loc_53F07A                                             ; +0x32, 0x53f08e\nADDS            R5, #1                                                 ; +0x34, 0x53f090\nLDR.W           R0, [R4,#0x1F4]; this                                  ; +0x36, 0x53f092\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x3a, 0x53f096\nCMP             R5, R0                                                 ; +0x3e, 0x53f09a\nBCS             loc_53F0E6                                             ; +0x40, 0x53f09c\nLDR.W           R7, [R4,#0x1F8]                                        ; +0x42, 0x53f09e\nMOV             R1, R5; unsigned int                                   ; +0x46, 0x53f0a2\nLDR.W           R0, [R4,#0x1F4]; this                                  ; +0x48, 0x53f0a4\nMOVS            R6, #0                                                 ; +0x4c, 0x53f0a8\nSUBS            R3, R7, R5                                             ; +0x4e, 0x53f0aa\nNEGS            R7, R3                                                 ; +0x50, 0x53f0ac\nADCS            R7, R3                                                 ; +0x52, 0x53f0ae\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x54, 0x53f0b0\nMOV             R9, R0                                                 ; +0x58, 0x53f0b4\nMOV             R0, R9; this                                           ; +0x5a, 0x53f0b6\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x5c, 0x53f0b8\nCMP             R6, R0                                                 ; +0x60, 0x53f0bc\nBCS             loc_53F090                                             ; +0x62, 0x53f0be\nMOV             R1, R6; unsigned int                                   ; +0x64, 0x53f0c0\nMOV             R0, R9; this                                           ; +0x66, 0x53f0c2\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x68, 0x53f0c4\nMOV             R1, R7                                                 ; +0x6c, 0x53f0c8\nADDS            R6, #1                                                 ; +0x6e, 0x53f0ca\nLDR             R3, [R0]                                               ; +0x70, 0x53f0cc\nMOV             R8, R0                                                 ; +0x72, 0x53f0ce\nLDR.W           R3, [R3,#0xA4]                                         ; +0x74, 0x53f0d0\nBLX             R3                                                     ; +0x78, 0x53f0d4\nLDR.W           R3, [R8]                                               ; +0x7a, 0x53f0d6\nMOV             R0, R8                                                 ; +0x7e, 0x53f0da\nMOV             R1, R7                                                 ; +0x80, 0x53f0dc\nLDR.W           R3, [R3,#0x208]                                        ; +0x82, 0x53f0de\nBLX             R3                                                     ; +0x86, 0x53f0e2\nB               loc_53F0B6                                             ; +0x88, 0x53f0e4\nLDR.W           R0, [R4,#0x1F4]; this                                  ; +0x8a, 0x53f0e6\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x8e, 0x53f0ea\nCMP             R0, #1                                                 ; +0x92, 0x53f0ee\nBHI             loc_53F112                                             ; +0x94, 0x53f0f0\nLDR.W           R0, [R4,#0x200]                                        ; +0x96, 0x53f0f2\nMOVS            R1, #0                                                 ; +0x9a, 0x53f0f6\nLDR             R3, [R0]                                               ; +0x9c, 0x53f0f8\nLDR.W           R3, [R3,#0xA4]                                         ; +0x9e, 0x53f0fa\nBLX             R3                                                     ; +0xa2, 0x53f0fe\nLDR.W           R0, [R4,#0x1FC]                                        ; +0xa4, 0x53f100\nMOVS            R1, #0                                                 ; +0xa8, 0x53f104\nPOP.W           {R4-R10,LR}                                            ; +0xaa, 0x53f106\nLDR             R3, [R0]                                               ; +0xae, 0x53f10a\nLDR.W           R3, [R3,#0xA4]                                         ; +0xb0, 0x53f10c\nBX              R3                                                     ; +0xb4, 0x53f110\nMOV             R0, R4; this                                           ; +0xb6, 0x53f112\nPOP.W           {R4-R10,LR}                                            ; +0xb8, 0x53f114\nB.W             _ZN24BrowseSmartTemplateLayer10updateDotsEv; BrowseSmartTemplateLayer::updateDots(void) ; +0xbc, 0x53f118", "xrefs": ["BrowseSmartTemplateLayer::onClick @ 0x53f148", "BrowseSmartKeyLayer::init @ 0x53f564", "BrowseSmartTemplateLayer::init @ 0x540008"], "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"}