//
// MessagesProfilePage::untoggleAll from 0x1001cd248 to 0x1001cd2b0 (104 bytes)
//
// 2 xrefs:
// > MessagesProfilePage::onClose @ 0x1001cc88c
// > MessagesProfilePage::loadPage @ 0x1001ccc7c
//
// 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 MessagesProfilePage::untoggleAll(MessagesProfilePage *a1)
{
GameLevelManager *v2; // x0
std::string *p_m_messageKey; // x1
cocos2d::CCArray *StoredOnlineLevels; // x0
cocos2d::ccArray *data; // x8
__int64 num; // x9
unsigned __int64 arr; // x8
unsigned __int64 v8; // x9
v2 = GameLevelManager::sharedState();
p_m_messageKey = &a1->m_messageKey;
if ( a1->m_messageKey.m_data.m_short.shortStorage.__elems_[22] < 0 )
p_m_messageKey = (std::string *)p_m_messageKey->m_data.m_long.capacitym1;
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v2, (const char *)p_m_messageKey);
if ( StoredOnlineLevels )
{
data = StoredOnlineLevels->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (unsigned __int64)data->arr;
v8 = arr + 8 * num - 8;
do
{
if ( !*(_QWORD *)arr )
break;
*(_BYTE *)(*(_QWORD *)arr + 426LL) = 0;
arr += 8LL;
}
while ( arr <= v8 );
}
}
}