//
// FriendPickerPopup::getUserListFinished from 0x1005039e0 to 0x100503a98 (184 bytes)
//
// 2 xrefs:
// > sub_100503F38 @ 0x100503f3c
// > ??> @ 0x100997170
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:06:55 +0000
//
__int64 __fastcall FriendPickerPopup::getUserListFinished(__int64 result, __int64 a2, int a3)
{
__int64 v4; // x19
_DWORD *v5; // x0
_DWORD *v6; // x0
v4 = result;
if ( a3 )
{
if ( a3 != 2 )
return result;
sub_10051B1EC(result);
v5 = *(_DWORD **)(v4 + 808);
if ( v5 )
cocos2d::CCObject::release(v5);
*(_QWORD *)(v4 + 808) = a2;
cocos2d::CCObject::retain(a2);
*(_BYTE *)(v4 + 824) = 1;
}
else
{
sub_10051B1EC(result);
v6 = *(_DWORD **)(v4 + 800);
if ( v6 )
cocos2d::CCObject::release(v6);
*(_QWORD *)(v4 + 800) = a2;
cocos2d::CCObject::retain(a2);
if ( (unsigned int)sub_1002E757C(*(_QWORD *)(v4 + 800)) >= 2 )
qsort(
*(void **)(*(_QWORD *)(*(_QWORD *)(v4 + 800) + 56LL) + 16LL),
**(unsigned int **)(*(_QWORD *)(v4 + 800) + 56LL),
8u,
(int (__cdecl *)(const void *, const void *))sub_100503DEC);
}
return sub_100503A98(v4);
}