//
// NewThreadPopup::friendPicked from 0x1400f1db0 to 0x1400f1f35 (389 bytes)
//
// 3 xrefs:
// > ??> @ 0x14072cda0
// > ??> @ 0x14091514c
// > ??> @ 0x140915158
//
// 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 11:26:37 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall NewThreadPopup::friendPicked(__int64 a1, struct cocos2d::CCObject *a2)
{
cocos2d::CCArray *v4; // rcx
unsigned int v5; // ebx
struct cocos2d::CCObject *v6; // rax
cocos2d::CCArray *v7; // rcx
__int64 v8; // rcx
__int64 *v9; // rdi
__int64 v10; // rbx
__int64 v11; // rdx
__int64 v12; // r8
__int64 v13; // rax
__int128 v14; // [rsp+30h] [rbp-58h] BYREF
__int64 v15; // [rsp+40h] [rbp-48h]
__int64 v16; // [rsp+48h] [rbp-40h]
__int128 v17; // [rsp+50h] [rbp-38h] BYREF
__int64 v18; // [rsp+60h] [rbp-28h]
__int64 v19; // [rsp+68h] [rbp-20h]
if ( a2 )
{
v4 = *(cocos2d::CCArray **)(a1 + 64);
if ( v4 )
{
if ( *(_BYTE *)(a1 + 73) )
{
cocos2d::CCArray::removeAllObjects(v4);
}
else
{
v5 = 0;
if ( (int)cocos2d::CCArray::count(v4) > 0 )
{
while ( 1 )
{
v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 64), v5);
v7 = *(cocos2d::CCArray **)(a1 + 64);
if ( *((_DWORD *)v6 + 98) == *((_DWORD *)a2 + 98) )
break;
if ( (int)++v5 >= (int)cocos2d::CCArray::count(v7) )
goto LABEL_11;
}
cocos2d::CCArray::removeObjectAtIndex(v7, v5, 1);
goto LABEL_6;
}
LABEL_11:
if ( (int)cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 64)) >= 9 )
{
v9 = *(__int64 **)(cocos2d::CCDirector::sharedDirector(v8) + 272);
v17 = 0;
v18 = 0;
v19 = 15;
LOBYTE(v17) = 0;
v14 = 0;
*(_QWORD *)&v14 = sub_14003D460(0x20u);
v15 = 20;
v16 = 31;
strcpy((char *)v14, "Member limit reached");
v10 = *v9;
v13 = TextAlertPopup::create(&v14, v11, v12, 150, &v17);
(*(void (__fastcall **)(__int64 *, __int64, __int64))(v10 + 456))(v9, v13, 1000);
return;
}
}
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 64), a2);
LABEL_6:
NewThreadPopup::updateRecipientLabel(a1 - 672);
}
}
}