//
// ProfilePage::toggleMainPageVisibility from 0x1007bfce0 to 0x1007bfe21 (321 bytes)
//
// 0 xrefs:
//
// 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 __fastcall ProfilePage::toggleMainPageVisibility(ProfilePage *a1, bool a2)
{
cocos2d::CCArray *m_arrayWithUsernameLabel; // rax
cocos2d::ccArray *data; // rax
cocos2d::CCObject **arr; // r12
unsigned __int64 v6; // r13
cocos2d::CCArray *m_buttons; // rax
cocos2d::ccArray *v8; // rax
cocos2d::CCObject **v9; // r12
unsigned __int64 v10; // r13
GJCommentListLayer *m_list; // rdi
bool v12; // r14
__int64 v13; // rax
m_arrayWithUsernameLabel = a1->m_arrayWithUsernameLabel;
if ( m_arrayWithUsernameLabel )
{
data = m_arrayWithUsernameLabel->data;
if ( data->num )
{
arr = data->arr;
v6 = (unsigned __int64)&arr[data->num - 1];
do
{
if ( !*arr )
break;
((void (__fastcall *)(cocos2d::CCObject *, bool))(*arr)->__vftable[4].~CCObject)(*arr, a2);
++arr;
}
while ( (unsigned __int64)arr <= v6 );
}
}
m_buttons = a1->m_buttons;
if ( m_buttons )
{
v8 = m_buttons->data;
if ( v8->num )
{
v9 = v8->arr;
v10 = (unsigned __int64)&v9[v8->num - 1];
do
{
if ( !*v9 )
break;
((void (__fastcall *)(cocos2d::CCObject *, bool))(*v9)->__vftable[4].~CCObject)(*v9, a2);
++v9;
}
while ( (unsigned __int64)v9 <= v10 );
}
}
m_list = a1->m_list;
if ( m_list )
((void (__fastcall *)(GJCommentListLayer *, bool))m_list->setVisible)(m_list, a2);
if ( a2 )
{
((void (__fastcall *)(CCMenuItemSpriteExtra *, bool))a1->m_leftArrow->setVisible)(
a1->m_leftArrow,
a1->m_pageStartIdx != 0);
v12 = a1->m_pageStartIdx + a1->m_pageEndIdx < a1->m_itemCount;
v13 = 752;
}
else
{
v12 = 0;
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_rightArrow->setVisible)(a1->m_rightArrow, 0);
v13 = 760;
}
(*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)((char *)&a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ v13)
+ 328LL))(
*(ProfilePage_vtbl **)((char *)&a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ v13),
v12);
}