//
// MemberListPopup::friendPickerAdd from 0xc671d0 to 0xc6728c (188 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'MemberListPopup::friendPickerAdd @ 0xc67290
// > ??> @ 0x637d8
// > ??> @ 0x14ef318
//
// 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 13:05:25 +0000
//
__int64 __fastcall MemberListPopup::friendPickerAdd(__int64 this)
{
__int64 v1; // x19
cocos2d::CCArray **v2; // x0
GameLevelManager *v3; // x0
__int64 v4; // x0
__int64 v5; // x3
__int64 v6; // x2
if ( *(_QWORD *)(this + 856) )
{
v1 = this;
this = cocos2d::CCArray::count(*(cocos2d::CCArray **)(this + 856));
if ( (_DWORD)this )
{
this = (unsigned __int8)MemberListPopup::opPending((MemberListPopup *)v1);
if ( !(_BYTE)this )
{
v2 = (cocos2d::CCArray **)GameLevelManager::sharedState((GameLevelManager *)this);
this = (unsigned __int8)GameLevelManager::addThreadMembers(
v2,
*(_DWORD *)(*(_QWORD *)(v1 + 800) + 56LL),
*(cocos2d::CCArray **)(v1 + 856));
if ( (_BYTE)this )
{
v3 = *(GameLevelManager **)(v1 + 808);
if ( v3 )
{
*((_BYTE *)v3 + 1001) = 1;
v4 = GameLevelManager::sharedState(v3);
v5 = *(_QWORD *)(v1 + 808);
v6 = v5 + 672;
if ( !v5 )
v6 = 0;
*(_QWORD *)(v4 + 1264) = v6;
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v1 + 1360LL))(v1, 0);
}
else
{
*(_BYTE *)(v1 + 864) = (unsigned __int8)&dword_0 + 1;
this = GameLevelManager::sharedState((GameLevelManager *)((char *)&dword_0 + 1));
*(_QWORD *)(this + 1264) = v1 + 776;
}
}
}
}
}
return this;
}