//
// CommunityCreditsPage::goToPage from 0x140096100 to 0x140096217 (279 bytes)
//
// 5 xrefs:
// > CommunityCreditsPage::init @ 0x140096057
// > CommunityCreditsPage::onSwitchPage @ 0x1400960fa
// > ??> @ 0x140669740
// > ??> @ 0x1406697a0
// > ??> @ 0x1406c71f4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void CommunityCreditsPage::goToPage(CommunityCreditsPage *a1, int a2)
{
int v4; // eax
_BOOL8 v5; // rdx
int v6; // r13d
int v7; // r12d
int v8; // edi
__int64 v9; // r14
struct cocos2d::CCObject *v10; // rax
cocos2d::CCObject_vtbl *v11; // rbx
__int64 copyWithZone_low; // rax
bool (__fastcall *isEqual)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *); // rbx
bool (__fastcall *i)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *); // rbp
_BOOL8 v15; // rdx
v4 = cocos2d::CCDictionary::count(a1->m_pageObjects);
v6 = v4;
if ( a2 >= 0 )
{
v7 = v4 - 1;
if ( a2 <= v4 - 1 && a2 != a1->m_page )
{
v8 = 0;
a1->m_page = a2;
if ( v4 > 0 )
{
v9 = 0;
do
{
v10 = cocos2d::CCDictionary::objectForKey(a1->m_pageObjects, v9);
if ( v10 )
{
v11 = v10[1].__vftable;
copyWithZone_low = LODWORD(v11->copyWithZone);
if ( (_DWORD)copyWithZone_low )
{
isEqual = v11->isEqual;
for ( i = (bool (__fastcall *)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *))((char *)isEqual + 8 * copyWithZone_low - 8);
(unsigned __int64)isEqual <= (unsigned __int64)i;
isEqual = (bool (__fastcall *)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *))((char *)isEqual + 8) )
{
if ( !*(_QWORD *)isEqual )
break;
LOBYTE(v5) = v8 == a2;
(*(void (__fastcall **)(_QWORD, _BOOL8))(**(_QWORD **)isEqual + 320LL))(*(_QWORD *)isEqual, v5);
}
}
}
++v8;
++v9;
}
while ( v8 < v6 );
}
LOBYTE(v5) = a2 > 0;
a1->m_prevButton->setVisible(a1->m_prevButton, v5);
LOBYTE(v15) = a2 < v7;
a1->m_nextButton->setVisible(a1->m_nextButton, v15);
}
}
}