//
// FriendsProfilePage::getUserListFinished from 0x1001d97e0 to 0x1001d98e4 (260 bytes)
//
// 2 xrefs:
// > sub_1001D98E4 @ 0x1001d98e8
// > ??> @ 0x1007c03e8
//
// 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; // x0
cocos2d::CCArray *v7; // x8
cocos2d::ccArray *data; // x8
__int64 num; // x9
unsigned __int64 arr; // x8
unsigned __int64 v11; // x9
GameLevelManager *v12; // x19
GJAccountManager *v13; // x0
GJUserScore *v14; // x0
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 )
{
v7 = a1->m_users;
if ( v7 )
{
data = v7->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (unsigned __int64)data->arr;
v11 = arr + 8 * num - 8;
do
{
if ( !*(_QWORD *)arr )
break;
*(_BYTE *)(*(_QWORD *)arr + 688LL) = 0;
arr += 8LL;
}
while ( arr <= v11 );
}
}
v12 = GameLevelManager::sharedState();
v13 = GJAccountManager::sharedState();
v14 = GameLevelManager::userInfoForAccountID(v12, v13->m_accountID - v13->m_unkInt1);
if ( v14 )
v14->m_newFriendCount = 0;
}
}
}