{"type": "func", "start": 5373479792, "end": 5373480118, "name": "ShardsPage::goToPage", "pseudocode": "// \n// ShardsPage::goToPage from 0x14048cb70 to 0x14048ccb6 (326 bytes)\n// \n// 4 xrefs:\n// > ShardsPage::onSwitchPage @ 0x14048cb6a\n// > <???> @ 0x1406a6a34\n// > <???> @ 0x1406a6a6c\n// > <???> @ 0x1406dbf00\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 ShardsPage::goToPage(ShardsPage *a1, int a2)\n{\n  int v4; // edi\n  _BOOL8 v5; // rdx\n  int v6; // r12d\n  __int64 v7; // r14\n  struct cocos2d::CCObject *v8; // rax\n  cocos2d::CCObject_vtbl *v9; // rbx\n  __int64 copyWithZone_low; // rax\n  bool (__fastcall *isEqual)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *); // rbx\n  bool (__fastcall *i)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *); // rsi\n  _BOOL8 v13; // rdx\n  __int64 v14; // rcx\n  const char *v15; // rbx\n  cocos2d::CCSprite_vtbl *v16; // rdi\n  cocos2d::CCSpriteFrameCache *v17; // rax\n  struct cocos2d::CCSpriteFrame *v18; // rax\n\n  if ( (unsigned int)a2 <= 3 && a2 != a1->m_page )\n  {\n    a1->m_page = a2;\n    v4 = 0;\n    v6 = cocos2d::CCDictionary::count(a1->m_pages);\n    if ( v6 > 0 )\n    {\n      v7 = 0;\n      do\n      {\n        v8 = cocos2d::CCDictionary::objectForKey(a1->m_pages, v7);\n        if ( v8 )\n        {\n          v9 = v8[1].__vftable;\n          copyWithZone_low = LODWORD(v9->copyWithZone);\n          if ( (_DWORD)copyWithZone_low )\n          {\n            isEqual = v9->isEqual;\n            for ( i = (bool (__fastcall *)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *))((char *)isEqual\n                                                                                                  + 8 * copyWithZone_low\n                                                                                                  - 8);\n                  (unsigned __int64)isEqual <= (unsigned __int64)i;\n                  isEqual = (bool (__fastcall *)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *))((char *)isEqual + 8) )\n            {\n              if ( !*(_QWORD *)isEqual )\n                break;\n              LOBYTE(v5) = v4 == a2;\n              (*(void (__fastcall **)(_QWORD, _BOOL8))(**(_QWORD **)isEqual + 320LL))(*(_QWORD *)isEqual, v5);\n            }\n          }\n        }\n        ++v4;\n        ++v7;\n      }\n      while ( v4 < v6 );\n    }\n    LOBYTE(v5) = a2 > 0;\n    a1->m_prevButton->setVisible(a1->m_prevButton, v5);\n    LOBYTE(v13) = a2 < 3;\n    a1->m_nextButton->setVisible(a1->m_nextButton, v13);\n    v15 = \"tier1Icon_001.png\";\n    v16 = a1->m_tierSprite->__vftable;\n    if ( a2 > 1 )\n      v15 = \"tier2Icon_001.png\";\n    v17 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v14);\n    v18 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v17, v15);\n    v16->setDisplayFrame(a1->m_tierSprite, v18);\n  }\n}", "assembly": "; \n; ShardsPage::goToPage from 0x14048cb70 to 0x14048ccb6 (326 bytes)\n; \n; 4 xrefs:\n; > ShardsPage::onSwitchPage @ 0x14048cb6a\n; > <???> @ 0x1406a6a34\n; > <???> @ 0x1406a6a6c\n; > <???> @ 0x1406dbf00\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     edx, 3                                                         ; +0x0, 0x14048cb70\nja      locret_14048CCB5                                               ; +0x3, 0x14048cb73\npush    rbp                                                            ; +0x9, 0x14048cb79\npush    r15                                                            ; +0xa, 0x14048cb7a\nsub     rsp, 28h                                                       ; +0xc, 0x14048cb7c\nmov     ebp, edx                                                       ; +0x10, 0x14048cb80\nmov     r15, rcx                                                       ; +0x12, 0x14048cb82\ncmp     edx, [rcx+298h]                                                ; +0x15, 0x14048cb85\njz      loc_14048CCAE                                                  ; +0x1b, 0x14048cb8b\nmov     [rsp+38h+arg_0], rbx                                           ; +0x21, 0x14048cb91\nmov     [rcx+298h], edx                                                ; +0x26, 0x14048cb96\nmov     rcx, [rcx+278h]                                                ; +0x2c, 0x14048cb9c\nmov     [rsp+38h+arg_10], rdi                                          ; +0x33, 0x14048cba3\nmov     [rsp+38h+arg_18], r12                                          ; +0x38, 0x14048cba8\ncall    cs:?count@CCDictionary@cocos2d@@QEAAIXZ; cocos2d::CCDictionary::count(void) ; +0x3d, 0x14048cbad\nxor     edi, edi                                                       ; +0x43, 0x14048cbb3\nmov     r12d, eax                                                      ; +0x45, 0x14048cbb5\ntest    eax, eax                                                       ; +0x48, 0x14048cbb8\njle     short loc_14048CC33                                            ; +0x4a, 0x14048cbba\nmov     [rsp+38h+arg_8], rsi                                           ; +0x4c, 0x14048cbbc\nmov     [rsp+38h+var_18], r14                                          ; +0x51, 0x14048cbc1\nmov     r14d, edi                                                      ; +0x56, 0x14048cbc6\nnop     dword ptr [rax+00000000h]                                      ; +0x59, 0x14048cbc9\nmov     rcx, [r15+278h]                                                ; +0x60, 0x14048cbd0\nmov     rdx, r14                                                       ; +0x67, 0x14048cbd7\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x6a, 0x14048cbda\ntest    rax, rax                                                       ; +0x70, 0x14048cbe0\njz      short loc_14048CC1F                                            ; +0x73, 0x14048cbe3\nmov     rbx, [rax+38h]                                                 ; +0x75, 0x14048cbe5\nmov     eax, [rbx]                                                     ; +0x79, 0x14048cbe9\ntest    eax, eax                                                       ; +0x7b, 0x14048cbeb\njz      short loc_14048CC1F                                            ; +0x7d, 0x14048cbed\nmov     rbx, [rbx+10h]                                                 ; +0x7f, 0x14048cbef\nlea     rsi, [rax-1]                                                   ; +0x83, 0x14048cbf3\nlea     rsi, [rbx+rsi*8]                                               ; +0x87, 0x14048cbf7\ncmp     rbx, rsi                                                       ; +0x8b, 0x14048cbfb\nja      short loc_14048CC1F                                            ; +0x8e, 0x14048cbfe\nmov     rcx, [rbx]                                                     ; +0x90, 0x14048cc00\ntest    rcx, rcx                                                       ; +0x93, 0x14048cc03\njz      short loc_14048CC1F                                            ; +0x96, 0x14048cc06\nmov     rax, [rcx]                                                     ; +0x98, 0x14048cc08\ncmp     edi, ebp                                                       ; +0x9b, 0x14048cc0b\nsetz    dl                                                             ; +0x9d, 0x14048cc0d\ncall    qword ptr [rax+140h]                                           ; +0xa0, 0x14048cc10\nadd     rbx, 8                                                         ; +0xa6, 0x14048cc16\ncmp     rbx, rsi                                                       ; +0xaa, 0x14048cc1a\njbe     short loc_14048CC00                                            ; +0xad, 0x14048cc1d\ninc     edi                                                            ; +0xaf, 0x14048cc1f\ninc     r14                                                            ; +0xb1, 0x14048cc21\ncmp     edi, r12d                                                      ; +0xb4, 0x14048cc24\njl      short loc_14048CBD0                                            ; +0xb7, 0x14048cc27\nmov     r14, [rsp+38h+var_18]                                          ; +0xb9, 0x14048cc29\nmov     rsi, [rsp+38h+arg_8]                                           ; +0xbe, 0x14048cc2e\nmov     rcx, [r15+280h]                                                ; +0xc3, 0x14048cc33\ntest    ebp, ebp                                                       ; +0xca, 0x14048cc3a\nsetnle  dl                                                             ; +0xcc, 0x14048cc3c\nmov     rax, [rcx]                                                     ; +0xcf, 0x14048cc3f\ncall    qword ptr [rax+140h]                                           ; +0xd2, 0x14048cc42\nmov     rcx, [r15+288h]                                                ; +0xd8, 0x14048cc48\ncmp     ebp, 3                                                         ; +0xdf, 0x14048cc4f\nsetl    dl                                                             ; +0xe2, 0x14048cc52\nmov     rax, [rcx]                                                     ; +0xe5, 0x14048cc55\ncall    qword ptr [rax+140h]                                           ; +0xe8, 0x14048cc58\nmov     rax, [r15+290h]                                                ; +0xee, 0x14048cc5e\nlea     rbx, aTier1icon001Pn; \"tier1Icon_001.png\"                      ; +0xf5, 0x14048cc65\ncmp     ebp, 1                                                         ; +0xfc, 0x14048cc6c\nmov     rdi, [rax]                                                     ; +0xff, 0x14048cc6f\nlea     rax, aTier2icon001Pn; \"tier2Icon_001.png\"                      ; +0x102, 0x14048cc72\ncmovg   rbx, rax                                                       ; +0x109, 0x14048cc79\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x10d, 0x14048cc7d\nmov     rcx, rax                                                       ; +0x113, 0x14048cc83\nmov     rdx, rbx                                                       ; +0x116, 0x14048cc86\ncall    cs:?spriteFrameByName@CCSpriteFrameCache@cocos2d@@QEAAPEAVCCSpriteFrame@2@PEBD@Z; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const *) ; +0x119, 0x14048cc89\nmov     rcx, [r15+290h]                                                ; +0x11f, 0x14048cc8f\nmov     rdx, rax                                                       ; +0x126, 0x14048cc96\ncall    qword ptr [rdi+3E0h]                                           ; +0x129, 0x14048cc99\nmov     r12, [rsp+38h+arg_18]                                          ; +0x12f, 0x14048cc9f\nmov     rdi, [rsp+38h+arg_10]                                          ; +0x134, 0x14048cca4\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x139, 0x14048cca9\nadd     rsp, 28h                                                       ; +0x13e, 0x14048ccae\npop     r15                                                            ; +0x142, 0x14048ccb2\npop     rbp                                                            ; +0x144, 0x14048ccb4\nretn                                                                   ; +0x145, 0x14048ccb5", "xrefs": ["ShardsPage::onSwitchPage @ 0x14048cb6a", "<???> @ 0x1406a6a34", "<???> @ 0x1406a6a6c", "<???> @ 0x1406dbf00"], "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"}