//
// sub_1002128F0 from 0x1002128f0 to 0x100212a1c (300 bytes)
//
// 1 xrefs:
// > MessagesProfilePage::init @ 0x1002121ae
//
// 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:26:58 +0000
//
__int64 __fastcall sub_1002128F0(__int64 a1, double a2)
{
__int64 v2; // rax
__int64 result; // rax
__int64 v4; // r14
__int64 v5; // rax
__int64 v6; // rsi
__int64 StoredOnlineLevels; // rax
int v8; // r15d
unsigned int *v9; // rax
__int64 v10; // rcx
unsigned __int64 v11; // rax
unsigned __int64 v12; // rcx
int v13; // eax
unsigned int *v14; // rcx
__int64 v15; // rdx
bool v16; // al
unsigned __int64 v17; // rcx
unsigned __int64 v18; // rdx
v2 = GameLevelManager::sharedState(a2);
if ( (*(_BYTE *)(a1 + 704) & 1) != 0 )
{
result = GameLevelManager::getStoredOnlineLevels(v2, *(_QWORD *)(a1 + 720));
if ( !result )
return result;
}
else
{
result = GameLevelManager::getStoredOnlineLevels(v2, a1 + 705);
if ( !result )
return result;
}
v4 = result;
result = sub_1007FEF90(result);
if ( (_DWORD)result )
{
v5 = GameLevelManager::sharedState(a2);
if ( (*(_BYTE *)(a1 + 704) & 1) != 0 )
v6 = *(_QWORD *)(a1 + 720);
else
v6 = a1 + 705;
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v5, v6);
v8 = 0;
if ( StoredOnlineLevels )
{
v9 = *(unsigned int **)(StoredOnlineLevels + 56);
v10 = *v9;
if ( *v9 )
{
v11 = *((_QWORD *)v9 + 2);
v12 = v11 + 8 * v10 - 8;
v8 = 0;
do
{
if ( !*(_QWORD *)v11 )
break;
v8 += *(unsigned __int8 *)(*(_QWORD *)v11 + 426LL);
v11 += 8LL;
}
while ( v11 <= v12 );
}
}
v13 = sub_1007FEF90(v4);
v14 = *(unsigned int **)(v4 + 56);
v15 = *v14;
if ( *v14 )
{
v16 = v8 != v13;
v17 = *((_QWORD *)v14 + 2);
v18 = v17 + 8 * v15 - 8;
do
{
if ( !*(_QWORD *)v17 )
break;
*(_BYTE *)(*(_QWORD *)v17 + 426LL) = v16;
v17 += 8LL;
}
while ( v17 <= v18 );
}
sub_100212C00(a1);
return CustomListView::reloadAll(*(_QWORD *)(*(_QWORD *)(a1 + 744) + 544LL));
}
return result;
}