//
// MemberListPopup::friendPickerAdd from 0x100943740 to 0x100943820 (224 bytes)
//
// 2 xrefs:
// > sub_100943820 @ 0x10094382c
// > ??> @ 0x100bc54f0
//
// This function is hookable on this platform (idp: pc, 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 12:38:32 +0000
//
__int64 __fastcall MemberListPopup::friendPickerAdd(__int64 a1)
{
__int64 result; // rax
__int64 v3; // rdi
__int64 v4; // rax
__int64 v5; // rax
__int64 v6; // rax
__int64 v7; // rcx
__int64 v8; // rdx
v3 = *(_QWORD *)(a1 + 856);
if ( v3 )
{
result = sub_1007FEF90(v3);
if ( (_DWORD)result )
{
if ( !*(_BYTE *)(a1 + 864)
&& *(int *)(a1 + 868) <= 0
&& *(int *)(a1 + 872) <= 0
&& *(int *)(a1 + 876) <= 0
&& !*(_BYTE *)(a1 + 848) )
{
v4 = GameLevelManager::sharedState();
result = sub_1005786D0(v4, *(_DWORD *)(*(_QWORD *)(a1 + 800) + 56LL), *(_QWORD *)(a1 + 856));
if ( (_BYTE)result )
{
v5 = *(_QWORD *)(a1 + 808);
if ( v5 )
{
*(_BYTE *)(v5 + 1001) = 1;
v6 = GameLevelManager::sharedState();
v7 = *(_QWORD *)(a1 + 808);
v8 = v7 + 672;
if ( !v7 )
v8 = 0;
*(_QWORD *)(v6 + 1264) = v8;
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;
}