//
// FRequestProfilePage::untoggleAll from 0x14013ee30 to 0x14013eece (158 bytes)
//
// 4 xrefs:
// > FRequestProfilePage::onSentRequests @ 0x14013ed36
// > FRequestProfilePage::onClose @ 0x14013edc6
// > FRequestProfilePage::loadPage @ 0x14013f389
// > ??> @ 0x1406ca20c
//
// 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
//
// Hidden C++ exception states: #wind=1
void FRequestProfilePage::untoggleAll(FRequestProfilePage *a1)
{
std::string *p_m_key; // rbx
GameLevelManager *v2; // rcx
cocos2d::CCArray *StoredOnlineLevels; // rax
cocos2d::ccArray *data; // rax
__int64 num; // rcx
cocos2d::CCObject **arr; // rax
cocos2d::CCObject **i; // rdx
void *v8; // [rsp+30h] [rbp+8h]
p_m_key = &a1->m_key;
if ( a1->m_key.m_data.m_capacity > 0xF )
p_m_key = (std::string *)p_m_key->m_data.m_bigStorage;
v2 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v8 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v2 = (GameLevelManager *)qword_1406C2EC0;
}
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v2, p_m_key->m_data.m_smallStorage._Elems);
if ( StoredOnlineLevels )
{
data = StoredOnlineLevels->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
if ( !*arr )
break;
BYTE1((*arr)[13].m_uIndexInArray) = 0;
}
}
}
}