//
// GameLevelManager::resetStoredUserList from 0x140163230 to 0x14016339b (363 bytes)
//
// 8 xrefs:
// > FriendsProfilePage::onUpdate @ 0x140140b65
// > GameLevelManager::onAcceptFriendRequestCompleted @ 0x140161645
// > GameLevelManager::onBlockUserCompleted @ 0x1401623b9
// > ProfilePage::init @ 0x1403beab5
// > ProfilePage::init @ 0x1403beaf9
// > ProfilePage::onUpdate @ 0x1403bfc1b
// > ProfilePage::onUpdate @ 0x1403bfc5f
// > ??> @ 0x1406cac2c
//
// 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 GameLevelManager::resetStoredUserList(GameLevelManager *a1, UserListType a2)
{
void *v2; // rcx
void *Block[2]; // [rsp+20h] [rbp-38h] BYREF
__int64 v4; // [rsp+30h] [rbp-28h]
unsigned __int64 v5; // [rsp+38h] [rbp-20h]
if ( !a2 )
{
HIWORD(Block[1]) = 0;
v4 = 11;
v5 = 15;
qmemcpy(Block, "get_friend", 10);
*(_DWORD *)((char *)&Block[1] + 2) = (unsigned __int8)aGetFriends[10];
cocos2d::CCDictionary::removeObjectForKey(a1->m_storedLevels, Block);
if ( v5 <= 0xF )
return;
v2 = Block[0];
if ( v5 + 1 >= 0x1000 )
{
v2 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v2 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
goto LABEL_11;
}
if ( a2 == Blocked )
{
HIWORD(Block[1]) = 0;
v4 = 11;
v5 = 15;
qmemcpy(Block, "get_blocke", 10);
*(_DWORD *)((char *)&Block[1] + 2) = (unsigned __int8)aGetBlocked[10];
cocos2d::CCDictionary::removeObjectForKey(a1->m_storedLevels, Block);
if ( v5 > 0xF )
{
v2 = Block[0];
if ( v5 + 1 >= 0x1000 )
{
v2 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v2 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
LABEL_11:
j_j_free(v2);
}
}
}