//
// MessagesProfilePage::untoggleAll from 0x140477140 to 0x1404771de (158 bytes)
//
// 4 xrefs:
// > MessagesProfilePage::onClose @ 0x140476f97
// > MessagesProfilePage::loadPage @ 0x1404772f9
// > ??> @ 0x140928460
// > ??> @ 0x14092846c
//
// 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:32:41 +0000
//
_QWORD *__fastcall MessagesProfilePage::untoggleAll(__int64 a1)
{
_BYTE *v1; // rbx
__int64 v2; // rcx
_QWORD *result; // rax
__int64 v4; // rcx
_QWORD *i; // rdx
void *v6; // [rsp+30h] [rbp+8h]
v1 = (_BYTE *)(a1 + 704);
if ( *(_QWORD *)(a1 + 728) > 0xFu )
v1 = *(_BYTE **)v1;
v2 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v6 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v6);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v2 = *(_QWORD *)&qword_14090BFB0;
}
result = (_QWORD *)GameLevelManager::getStoredOnlineLevels(v2, v1);
if ( result )
{
result = (_QWORD *)result[7];
v4 = *(unsigned int *)result;
if ( (_DWORD)v4 )
{
result = (_QWORD *)result[2];
for ( i = &result[v4 - 1]; result <= i; ++result )
{
if ( !*result )
break;
*(_BYTE *)(*result + 466LL) = 0;
}
}
}
return result;
}