//
// MemberListPopup::friendPicked from 0xc6b750 to 0xc6b904 (436 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'MemberListPopup::friendPicked @ 0xc6b90c
// > ??> @ 0x41d88
// > ??> @ 0x14ef2e8
//
// 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:27 +0000
//
__int64 __fastcall MemberListPopup::friendPicked(MemberListPopup *this, GJUserScore *a2)
{
cocos2d::CCArray *v4; // x0
signed int i; // w19
bool v6; // zf
int v7; // w19
cocos2d::CCDirector *v8; // x0
__int64 *v9; // x19
__int64 v10; // x3
void (__fastcall *v11)(__int64 *, __int64, __int64); // x23
__int64 v12; // x0
__int64 v14[2]; // [xsp+48h] [xbp+48h] BYREF
void *v15; // [xsp+58h] [xbp+58h]
__int64 v16[2]; // [xsp+60h] [xbp+60h] BYREF
void *v17; // [xsp+70h] [xbp+70h]
if ( a2 )
{
v4 = *((cocos2d::CCArray **)this + 107);
if ( v4 )
{
for ( i = 0; i < (int)cocos2d::CCArray::count(v4); ++i )
{
v6 = *(_DWORD *)(cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 107), i) + 376) == *((_DWORD *)a2 + 94);
v4 = *((cocos2d::CCArray **)this + 107);
if ( v6 )
{
cocos2d::CCArray::removeObjectAtIndex(v4, i, 1);
return _stack_chk_guard;
}
}
v7 = *(_DWORD *)(*((_QWORD *)this + 100) + 168LL);
v8 = (cocos2d::CCDirector *)(v7 + (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 107)));
if ( (int)v8 <= 9 )
{
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 107), a2);
}
else
{
v9 = *(__int64 **)(cocos2d::CCDirector::sharedDirector(v8) + 272);
v10 = *v9;
v14[0] = 0;
v14[1] = 0;
v11 = *(void (__fastcall **)(__int64 *, __int64, __int64))(v10 + 464);
v15 = nullptr;
std::string::__init(v14, "Member limit reached", 0x14u);
v16[0] = 0;
v16[1] = 0;
v17 = nullptr;
std::string::__init(v16, &byte_11B8890, 0);
v12 = TextAlertPopup::create((char *)v14, 150, (char *)v16, 0.5, 0.6);
v11(v9, v12, 1000);
if ( (v16[0] & 1) != 0 )
operator delete(v17);
if ( (v14[0] & 1) != 0 )
operator delete(v15);
}
}
}
return _stack_chk_guard;
}