//
// ShardsPage::goToPage from 0x14062d9a0 to 0x14062dae2 (322 bytes)
//
// 4 xrefs:
// > ShardsPage::onSwitchPage @ 0x14062d99a
// > ??> @ 0x1408e715c
// > ??> @ 0x1408e7190
// > ??> @ 0x140930980
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:35:27 +0000
//
void __fastcall ShardsPage::goToPage(__int64 a1, int a2)
{
int v4; // edi
__int64 v5; // rdx
int v6; // r12d
__int64 v7; // r14
struct cocos2d::CCObject *v8; // rax
unsigned int *v9; // rbx
__int64 v10; // rax
_QWORD *v11; // rbx
_QWORD *i; // rsi
__int64 v13; // rdx
__int64 v14; // rdx
__int64 v15; // rcx
__int64 *v16; // rsi
const char *v17; // rbx
__int64 v18; // rdi
cocos2d::CCSpriteFrameCache *v19; // rax
struct cocos2d::CCSpriteFrame *v20; // rax
if ( (unsigned int)a2 <= 3 && a2 != *(_DWORD *)(a1 + 696) )
{
*(_DWORD *)(a1 + 696) = a2;
v4 = 0;
v6 = cocos2d::CCDictionary::count(*(cocos2d::CCDictionary **)(a1 + 664));
if ( v6 > 0 )
{
v7 = 0;
do
{
v8 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 664), v7);
if ( v8 )
{
v9 = *((unsigned int **)v8 + 7);
v10 = *v9;
if ( (_DWORD)v10 )
{
v11 = *((_QWORD **)v9 + 2);
for ( i = &v11[v10 - 1]; v11 <= i; ++v11 )
{
if ( !*v11 )
break;
LOBYTE(v5) = v4 == a2;
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*v11 + 336LL))(*v11, v5);
}
}
}
++v4;
++v7;
}
while ( v4 < v6 );
}
LOBYTE(v5) = a2 > 0;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 672) + 336LL))(*(_QWORD *)(a1 + 672), v5);
LOBYTE(v13) = a2 < 3;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 680) + 336LL))(*(_QWORD *)(a1 + 680), v13);
v16 = *(__int64 **)(a1 + 688);
v17 = "tier1Icon_001.png";
if ( a2 > 1 )
v17 = "tier2Icon_001.png";
v18 = *v16;
v19 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v15, v14);
v20 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v19, v17);
(*(void (__fastcall **)(__int64 *, struct cocos2d::CCSpriteFrame *))(v18 + 1008))(v16, v20);
}
}