//
// FriendsProfilePage::getUserListFinished from 0x100658710 to 0x100658823 (275 bytes)
//
// 2 xrefs:
// > sub_100658830 @ 0x10065883c
// > ??> @ 0x1009864c8
//
// 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 FriendsProfilePage::getUserListFinished(FriendsProfilePage *a1, cocos2d::CCArray *a2, UserListType a3)
{
cocos2d::CCArray *m_users; // rdi
cocos2d::CCArray *v6; // rax
cocos2d::ccArray *data; // rax
__int64 num; // rcx
unsigned __int64 arr; // rax
unsigned __int64 v10; // rcx
GameLevelManager *v11; // rbx
GJAccountManager *v12; // rax
GJUserScore *v13; // rax
if ( a1->m_type == a3 )
{
m_users = a1->m_users;
if ( m_users )
cocos2d::CCObject::release(m_users);
a1->m_users = a2;
cocos2d::CCObject::retain(a2);
FriendsProfilePage::setupUsersBrowser(a1, a1->m_users, a3);
((void (__fastcall *)(LoadingCircle *, _QWORD))a1->m_circle->setVisible)(a1->m_circle, 0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_refreshBtn->setVisible)(a1->m_refreshBtn, 1);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_noInternet->setVisible)(a1->m_noInternet, 0);
if ( !a1->m_type )
{
v6 = a1->m_users;
if ( v6 )
{
data = v6->data;
num = data->num;
if ( data->num )
{
arr = (unsigned __int64)data->arr;
v10 = arr + 8 * num - 8;
do
{
if ( !*(_QWORD *)arr )
break;
*(_BYTE *)(*(_QWORD *)arr + 688LL) = 0;
arr += 8LL;
}
while ( arr <= v10 );
}
}
v11 = GameLevelManager::sharedState();
v12 = GJAccountManager::sharedState();
v13 = GameLevelManager::userInfoForAccountID(v11, v12->m_accountID - v12->m_unkInt1);
if ( v13 )
v13->m_newFriendCount = 0;
}
}
}