{"type": "func", "start": 5374937504, "end": 5374937870, "name": "BrowseSmartTemplateLayer::goToPage", "pseudocode": "// \n// BrowseSmartTemplateLayer::goToPage from 0x1405f09a0 to 0x1405f0b0e (366 bytes)\n// \n// 7 xrefs:\n// > BrowseSmartTemplateLayer::init @ 0x1405efe3f\n// > BrowseSmartTemplateLayer::onClick @ 0x1405f0edc\n// > BrowseSmartTemplateLayer::onClick @ 0x1405f0ef1\n// > BrowseSmartKeyLayer::init @ 0x1405f1534\n// > <???> @ 0x1408e3110\n// > <???> @ 0x1408e3150\n// > <???> @ 0x14092f21c\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:35:05 +0000\n// \n\nunsigned int __fastcall BrowseSmartTemplateLayer::goToPage(__int64 a1, int a2)\n{\n  cocos2d::CCArray *v3; // rcx\n  unsigned int i; // ebp\n  bool v5; // r15\n  cocos2d::CCArray *v6; // r14\n  unsigned int j; // esi\n  struct cocos2d::CCObject *v8; // rdi\n\n  *(_DWORD *)(a1 + 680) = a2;\n  v3 = *(cocos2d::CCArray **)(a1 + 672);\n  if ( a2 >= 0 )\n  {\n    if ( *(_DWORD *)(a1 + 680) > cocos2d::CCArray::count(v3) - 1 )\n      *(_DWORD *)(a1 + 680) = 0;\n  }\n  else\n  {\n    *(_DWORD *)(a1 + 680) = cocos2d::CCArray::count(v3) - 1;\n  }\n  for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 672)); ++i )\n  {\n    v5 = *(_DWORD *)(a1 + 680) == i;\n    v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 672), i);\n    for ( j = 0; j < cocos2d::CCArray::count(v6); ++j )\n    {\n      v8 = cocos2d::CCArray::objectAtIndex(v6, j);\n      (*(void (__fastcall **)(struct cocos2d::CCObject *, bool))(*(_QWORD *)v8 + 336LL))(v8, v5);\n      (*(void (__fastcall **)(struct cocos2d::CCObject *, bool))(*(_QWORD *)v8 + 936LL))(v8, v5);\n    }\n  }\n  if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 672)) > 1 )\n    return BrowseSmartTemplateLayer::updateDots(a1);\n  (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 696) + 336LL))(*(_QWORD *)(a1 + 696), 0);\n  return (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 688) + 336LL))(*(_QWORD *)(a1 + 688), 0);\n}", "assembly": "; \n; BrowseSmartTemplateLayer::goToPage from 0x1405f09a0 to 0x1405f0b0e (366 bytes)\n; \n; 7 xrefs:\n; > BrowseSmartTemplateLayer::init @ 0x1405efe3f\n; > BrowseSmartTemplateLayer::onClick @ 0x1405f0edc\n; > BrowseSmartTemplateLayer::onClick @ 0x1405f0ef1\n; > BrowseSmartKeyLayer::init @ 0x1405f1534\n; > <???> @ 0x1408e3110\n; > <???> @ 0x1408e3150\n; > <???> @ 0x14092f21c\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:35:05 +0000\n; \npush    rbx                                                            ; +0x0, 0x1405f09a0\nsub     rsp, 30h                                                       ; +0x2, 0x1405f09a2\nmov     [rcx+2A8h], edx                                                ; +0x6, 0x1405f09a6\nmov     rbx, rcx                                                       ; +0xc, 0x1405f09ac\nmov     rcx, [rcx+2A0h]                                                ; +0xf, 0x1405f09af\nmov     [rsp+38h+arg_0], rbp                                           ; +0x16, 0x1405f09b6\ntest    edx, edx                                                       ; +0x1b, 0x1405f09bb\njns     short loc_1405F09CF                                            ; +0x1d, 0x1405f09bd\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1f, 0x1405f09bf\ndec     eax                                                            ; +0x25, 0x1405f09c5\nmov     [rbx+2A8h], eax                                                ; +0x27, 0x1405f09c7\njmp     short loc_1405F09E9                                            ; +0x2d, 0x1405f09cd\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x2f, 0x1405f09cf\ndec     eax                                                            ; +0x35, 0x1405f09d5\ncmp     [rbx+2A8h], eax                                                ; +0x37, 0x1405f09d7\njbe     short loc_1405F09E9                                            ; +0x3d, 0x1405f09dd\nmov     dword ptr [rbx+2A8h], 0                                        ; +0x3f, 0x1405f09df\nmov     rcx, [rbx+2A0h]                                                ; +0x49, 0x1405f09e9\nxor     ebp, ebp                                                       ; +0x50, 0x1405f09f0\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x52, 0x1405f09f2\ntest    eax, eax                                                       ; +0x58, 0x1405f09f8\njz      loc_1405F0AC0                                                  ; +0x5a, 0x1405f09fa\nmov     [rsp+38h+arg_8], rsi                                           ; +0x60, 0x1405f0a00\nmov     [rsp+38h+arg_10], rdi                                          ; +0x65, 0x1405f0a05\nmov     [rsp+38h+var_10], r14                                          ; +0x6a, 0x1405f0a0a\nmov     [rsp+38h+var_18], r15                                          ; +0x6f, 0x1405f0a0f\nnop     dword ptr [rax+00h]                                            ; +0x74, 0x1405f0a14\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x78, 0x1405f0a18\ncmp     [rbx+2A8h], ebp                                                ; +0x80, 0x1405f0a20\nmov     edx, ebp                                                       ; +0x86, 0x1405f0a26\nmov     rcx, [rbx+2A0h]                                                ; +0x88, 0x1405f0a28\nsetz    r15b                                                           ; +0x8f, 0x1405f0a2f\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x93, 0x1405f0a33\nmov     rcx, rax                                                       ; +0x99, 0x1405f0a39\nmov     r14, rax                                                       ; +0x9c, 0x1405f0a3c\nxor     esi, esi                                                       ; +0x9f, 0x1405f0a3f\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa1, 0x1405f0a41\ntest    eax, eax                                                       ; +0xa7, 0x1405f0a47\njz      short loc_1405F0A95                                            ; +0xa9, 0x1405f0a49\nnop     dword ptr [rax+rax+00h]                                        ; +0xab, 0x1405f0a4b\nmov     edx, esi                                                       ; +0xb0, 0x1405f0a50\nmov     rcx, r14                                                       ; +0xb2, 0x1405f0a52\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xb5, 0x1405f0a55\nmovzx   edx, r15b                                                      ; +0xbb, 0x1405f0a5b\nmov     rdi, rax                                                       ; +0xbf, 0x1405f0a5f\nmov     rcx, [rax]                                                     ; +0xc2, 0x1405f0a62\nmov     r8, [rcx+150h]                                                 ; +0xc5, 0x1405f0a65\nmov     rcx, rax                                                       ; +0xcc, 0x1405f0a6c\ncall    r8                                                             ; +0xcf, 0x1405f0a6f\nmov     rcx, [rdi]                                                     ; +0xd2, 0x1405f0a72\nmovzx   edx, r15b                                                      ; +0xd5, 0x1405f0a75\nmov     r8, [rcx+3A8h]                                                 ; +0xd9, 0x1405f0a79\nmov     rcx, rdi                                                       ; +0xe0, 0x1405f0a80\ncall    r8                                                             ; +0xe3, 0x1405f0a83\nmov     rcx, r14                                                       ; +0xe6, 0x1405f0a86\ninc     esi                                                            ; +0xe9, 0x1405f0a89\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xeb, 0x1405f0a8b\ncmp     esi, eax                                                       ; +0xf1, 0x1405f0a91\njb      short loc_1405F0A50                                            ; +0xf3, 0x1405f0a93\nmov     rcx, [rbx+2A0h]                                                ; +0xf5, 0x1405f0a95\ninc     ebp                                                            ; +0xfc, 0x1405f0a9c\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xfe, 0x1405f0a9e\ncmp     ebp, eax                                                       ; +0x104, 0x1405f0aa4\njb      loc_1405F0A20                                                  ; +0x106, 0x1405f0aa6\nmov     r15, [rsp+38h+var_18]                                          ; +0x10c, 0x1405f0aac\nmov     r14, [rsp+38h+var_10]                                          ; +0x111, 0x1405f0ab1\nmov     rdi, [rsp+38h+arg_10]                                          ; +0x116, 0x1405f0ab6\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x11b, 0x1405f0abb\nmov     rcx, [rbx+2A0h]                                                ; +0x120, 0x1405f0ac0\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x127, 0x1405f0ac7\nmov     rbp, [rsp+38h+arg_0]                                           ; +0x12d, 0x1405f0acd\ncmp     eax, 1                                                         ; +0x132, 0x1405f0ad2\nja      short loc_1405F0B01                                            ; +0x135, 0x1405f0ad5\nmov     rcx, [rbx+2B8h]                                                ; +0x137, 0x1405f0ad7\nxor     edx, edx                                                       ; +0x13e, 0x1405f0ade\nmov     rax, [rcx]                                                     ; +0x140, 0x1405f0ae0\ncall    qword ptr [rax+150h]                                           ; +0x143, 0x1405f0ae3\nmov     rcx, [rbx+2B0h]                                                ; +0x149, 0x1405f0ae9\nxor     edx, edx                                                       ; +0x150, 0x1405f0af0\nmov     rax, [rcx]                                                     ; +0x152, 0x1405f0af2\nadd     rsp, 30h                                                       ; +0x155, 0x1405f0af5\npop     rbx                                                            ; +0x159, 0x1405f0af9\njmp     qword ptr [rax+150h]                                           ; +0x15a, 0x1405f0afa\nmov     rcx, rbx                                                       ; +0x161, 0x1405f0b01\nadd     rsp, 30h                                                       ; +0x164, 0x1405f0b04\npop     rbx                                                            ; +0x168, 0x1405f0b08\njmp     BrowseSmartTemplateLayer__updateDots                           ; +0x169, 0x1405f0b09", "xrefs": ["BrowseSmartTemplateLayer::init @ 0x1405efe3f", "BrowseSmartTemplateLayer::onClick @ 0x1405f0edc", "BrowseSmartTemplateLayer::onClick @ 0x1405f0ef1", "BrowseSmartKeyLayer::init @ 0x1405f1534", "<???> @ 0x1408e3110", "<???> @ 0x1408e3150", "<???> @ 0x14092f21c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}