//
// MemberListPopup::friendPicked from 0x74b488 to 0x74b586 (254 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'MemberListPopup::friendPicked @ 0x74b59c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:58:46 +0000
//
int __fastcall MemberListPopup::friendPicked(int this, GJUserScore *a2)
{
int v2; // r4
signed int i; // r5
int v5; // r5
cocos2d::CCDirector *v6; // r0
int *v7; // r8
int v8; // r3
void (__fastcall *v9)(int *, cocos2d::CCNode *, int); // r9
cocos2d::CCNode *v10; // r0
int v11[3]; // [sp+Ch] [bp-20h] BYREF
int v12[3]; // [sp+18h] [bp-14h] BYREF
v2 = this;
if ( a2 && *(_DWORD *)(this + 636) )
{
for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 636)); ++i )
{
if ( *(_DWORD *)(cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v2 + 636), i) + 296) == *((_DWORD *)a2 + 74) )
return cocos2d::CCArray::removeObjectAtIndex(*(cocos2d::CCArray **)(v2 + 636), i, 1);
}
v5 = *(_DWORD *)(*(_DWORD *)(v2 + 608) + 116);
v6 = (cocos2d::CCDirector *)(cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 636)) + v5);
if ( (int)v6 <= 9 )
{
return cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v2 + 636), a2);
}
else
{
v7 = *(int **)(cocos2d::CCDirector::sharedDirector(v6) + 220);
v8 = *v7;
memset(v11, 0, sizeof(v11));
v9 = *(void (__fastcall **)(int *, cocos2d::CCNode *, int))(v8 + 232);
std::string::__init(v11, "Member limit reached", 0x14u);
memset(v12, 0, sizeof(v12));
std::string::__init(v12, &unk_B6B226, 0);
v10 = TextAlertPopup::create((int)v11, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)v12);
v9(v7, v10, 1000);
std::string::~string((int)v12);
return std::string::~string((int)v11);
}
}
return this;
}