//
// MemberListPopup::friendPickerAdd from 0x100508758 to 0x100508828 (208 bytes)
//
// 2 xrefs:
// > sub_100508828 @ 0x10050882c
// > ??> @ 0x100998170
//
// 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:57 +0000
//
__int64 __fastcall MemberListPopup::friendPickerAdd(__int64 a1)
{
__int64 result; // x0
__int64 v3; // x0
__int64 v4; // x8
__int64 v5; // x0
__int64 v6; // x8
__int64 v7; // x8
result = *(_QWORD *)(a1 + 856);
if ( result )
{
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
if ( (*(_BYTE *)(a1 + 864) & 1) == 0
&& *(int *)(a1 + 868) <= 0
&& *(int *)(a1 + 872) <= 0
&& *(int *)(a1 + 876) <= 0
&& (*(_BYTE *)(a1 + 848) & 1) == 0 )
{
v3 = GameLevelManager::sharedState();
result = sub_1000C8B88(v3, *(_DWORD *)(*(_QWORD *)(a1 + 800) + 56LL), *(_QWORD *)(a1 + 856));
if ( (_DWORD)result )
{
v4 = *(_QWORD *)(a1 + 808);
if ( v4 )
{
*(_BYTE *)(v4 + 1001) = 1;
v5 = GameLevelManager::sharedState();
v6 = *(_QWORD *)(a1 + 808);
if ( v6 )
v7 = v6 + 672;
else
v7 = 0;
*(_QWORD *)(v5 + 1264) = v7;
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1360LL))(a1, 0);
}
else
{
*(_BYTE *)(a1 + 864) = 1;
result = GameLevelManager::sharedState();
*(_QWORD *)(result + 1264) = a1 + 776;
}
}
}
}
}
return result;
}