//
// ProfilePage::toggleMainPageVisibility from 0x1008a60f0 to 0x1008a6231 (321 bytes)
//
// 0 xrefs:
//
// 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 12:37:16 +0000
//
__int64 __fastcall ProfilePage::toggleMainPageVisibility(__int64 a1, unsigned __int8 a2)
{
__int64 v3; // rax
unsigned int *v4; // rax
_QWORD *v5; // r12
unsigned __int64 v6; // r13
__int64 v7; // rax
unsigned int *v8; // rax
_QWORD *v9; // r12
unsigned __int64 v10; // r13
__int64 v11; // rdi
bool v12; // r14
__int64 v13; // rax
v3 = *(_QWORD *)(a1 + 840);
if ( v3 )
{
v4 = *(unsigned int **)(v3 + 56);
if ( *v4 )
{
v5 = *((_QWORD **)v4 + 2);
v6 = (unsigned __int64)&v5[*v4 - 1];
do
{
if ( !*v5 )
break;
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*v5 + 344LL))(*v5, a2);
++v5;
}
while ( (unsigned __int64)v5 <= v6 );
}
}
v7 = *(_QWORD *)(a1 + 832);
if ( v7 )
{
v8 = *(unsigned int **)(v7 + 56);
if ( *v8 )
{
v9 = *((_QWORD **)v8 + 2);
v10 = (unsigned __int64)&v9[*v8 - 1];
do
{
if ( !*v9 )
break;
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*v9 + 344LL))(*v9, a2);
++v9;
}
while ( (unsigned __int64)v9 <= v10 );
}
}
v11 = *(_QWORD *)(a1 + 784);
if ( v11 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v11 + 344LL))(v11, a2);
if ( a2 )
{
(*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 800) + 344LL))(
*(_QWORD *)(a1 + 800),
*(_DWORD *)(a1 + 852) != 0);
v12 = *(_DWORD *)(a1 + 852) + *(_DWORD *)(a1 + 856) < *(_DWORD *)(a1 + 848);
v13 = 792;
}
else
{
v12 = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 792) + 344LL))(*(_QWORD *)(a1 + 792), 0);
v13 = 800;
}
return (*(__int64 (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + v13) + 344LL))(*(_QWORD *)(a1 + v13), v12);
}