//
// MemberListPopup::applyAddOutcome from 0x1400ee170 to 0x1400ee871 (1793 bytes)
//
// 3 xrefs:
// > ThreadViewPopup::threadUpdateFinished @ 0x1400dd4d2
// > MemberListPopup::threadUpdateFinished @ 0x1400ee930
// > ??> @ 0x140915038
//
// 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:35 +0000
//
// Hidden C++ exception states: #wind=9
void __fastcall MemberListPopup::applyAddOutcome(__int64 a1)
{
cocos2d::CCArray **v2; // rax
cocos2d::CCArray *v3; // r14
cocos2d::CCArray *v4; // r12
cocos2d::CCArray *v5; // r13
int v6; // ebx
int v7; // edi
int v8; // esi
__int64 *v9; // rdi
const char *CString; // rax
cocos2d::CCString *v11; // rax
size_t v12; // r8
__int64 v13; // rbx
__int64 v14; // rdx
__int64 v15; // r8
__int64 v16; // rax
_QWORD *v17; // rax
__int64 v18; // rax
__m128i *v19; // rax
void **v20; // xmm0_8
__m128i v21; // xmm1
void **v22; // rdx
void *v23; // rcx
void *v24; // rcx
_QWORD *v25; // rax
__int64 v26; // rax
__m128i *v27; // rax
void **v28; // xmm0_8
__m128i v29; // xmm1
void **v30; // rdx
void *v31; // rcx
void *v32; // rcx
_QWORD *v33; // rax
__int64 v34; // rax
__m128i *v35; // rax
void **v36; // xmm0_8
__m128i v37; // xmm1
void **v38; // rdx
void *v39; // rcx
void *v40; // rcx
__int128 *v41; // rdx
size_t v42; // r8
__int64 v43; // rax
cocos2d::CCObject *v44; // rbx
void *v45; // [rsp+50h] [rbp-69h]
void *Src[2]; // [rsp+60h] [rbp-59h] BYREF
__int128 v47; // [rsp+70h] [rbp-49h]
void *Block[2]; // [rsp+80h] [rbp-39h] BYREF
__m128i v49; // [rsp+90h] [rbp-29h]
__int128 v50; // [rsp+A0h] [rbp-19h] BYREF
__int64 v51; // [rsp+B0h] [rbp-9h]
unsigned __int64 v52; // [rsp+B8h] [rbp-1h]
_QWORD v53[4]; // [rsp+C0h] [rbp+7h] BYREF
v2 = *(cocos2d::CCArray ***)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v45 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v45);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v2 = *(cocos2d::CCArray ***)&qword_14090BFB0;
}
v3 = v2[99];
v4 = v2[100];
v5 = v2[101];
if ( v3 )
v6 = cocos2d::CCArray::count(v2[99]);
else
v6 = 0;
if ( v4 )
v7 = cocos2d::CCArray::count(v4);
else
v7 = 0;
if ( v5 )
v8 = cocos2d::CCArray::count(v5);
else
v8 = 0;
*(_DWORD *)(a1 + 200) += v6;
if ( v7 || v8 )
{
v50 = 0;
v51 = 0;
v52 = 15;
LOBYTE(v50) = 0;
if ( v6 > 0 )
{
v17 = sub_1400EE070(v53, v3);
v18 = sub_140059D70(v17, 0, "Added: ", 0xFu);
*(_OWORD *)Src = 0;
v47 = 0u;
*(_OWORD *)Src = *(_OWORD *)v18;
v47 = *(_OWORD *)(v18 + 16);
*(_QWORD *)(v18 + 16) = 0;
*(_QWORD *)(v18 + 24) = 15;
*(_BYTE *)v18 = 0;
v19 = (__m128i *)sub_140044D80(Src, (void *)Delimiter, 1u);
*(__m128i *)Block = *v19;
v20 = (void **)Block[0];
v49 = v19[1];
v21 = v49;
v19[1].m128i_i64[0] = 0;
v19[1].m128i_i64[1] = 15;
v19->m128i_i8[0] = 0;
v22 = Block;
if ( _mm_srli_si128(v21, 8).m128i_u64[0] > 0xF )
v22 = v20;
sub_140044D80(&v50, v22, v21.m128i_u64[0]);
if ( v49.m128i_i64[1] > 0xFuLL )
{
v23 = Block[0];
if ( (unsigned __int64)(v49.m128i_i64[1] + 1) >= 0x1000 )
{
v23 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v23 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v23);
}
if ( *((_QWORD *)&v47 + 1) > 0xFu )
{
v24 = Src[0];
if ( (unsigned __int64)(*((_QWORD *)&v47 + 1) + 1LL) >= 0x1000 )
{
v24 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v24 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v24);
}
*(_QWORD *)&v47 = 0;
*((_QWORD *)&v47 + 1) = 15;
LOBYTE(Src[0]) = 0;
sub_14003D310((__int64)v53);
}
if ( v7 > 0 )
{
v25 = sub_1400EE070(v53, v4);
v26 = sub_140059D70(v25, 0, "Invited: ", 0x11u);
*(_OWORD *)Src = 0;
v47 = 0u;
*(_OWORD *)Src = *(_OWORD *)v26;
v47 = *(_OWORD *)(v26 + 16);
*(_QWORD *)(v26 + 16) = 0;
*(_QWORD *)(v26 + 24) = 15;
*(_BYTE *)v26 = 0;
v27 = (__m128i *)sub_140044D80(Src, (void *)Delimiter, 1u);
*(__m128i *)Block = *v27;
v28 = (void **)Block[0];
v49 = v27[1];
v29 = v49;
v27[1].m128i_i64[0] = 0;
v27[1].m128i_i64[1] = 15;
v27->m128i_i8[0] = 0;
v30 = Block;
if ( _mm_srli_si128(v29, 8).m128i_u64[0] > 0xF )
v30 = v28;
sub_140044D80(&v50, v30, v29.m128i_u64[0]);
if ( v49.m128i_i64[1] > 0xFuLL )
{
v31 = Block[0];
if ( (unsigned __int64)(v49.m128i_i64[1] + 1) >= 0x1000 )
{
v31 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v31 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v31);
}
if ( *((_QWORD *)&v47 + 1) > 0xFu )
{
v32 = Src[0];
if ( (unsigned __int64)(*((_QWORD *)&v47 + 1) + 1LL) >= 0x1000 )
{
v32 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v32 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v32);
}
*(_QWORD *)&v47 = 0;
*((_QWORD *)&v47 + 1) = 15;
LOBYTE(Src[0]) = 0;
sub_14003D310((__int64)v53);
}
if ( v8 > 0 )
{
v33 = sub_1400EE070(v53, v5);
v34 = sub_140059D70(v33, 0, "Unavailable: ", 0x15u);
*(_OWORD *)Src = 0;
v47 = 0u;
*(_OWORD *)Src = *(_OWORD *)v34;
v47 = *(_OWORD *)(v34 + 16);
*(_QWORD *)(v34 + 16) = 0;
*(_QWORD *)(v34 + 24) = 15;
*(_BYTE *)v34 = 0;
v35 = (__m128i *)sub_140044D80(Src, (void *)Delimiter, 1u);
*(__m128i *)Block = *v35;
v36 = (void **)Block[0];
v49 = v35[1];
v37 = v49;
v35[1].m128i_i64[0] = 0;
v35[1].m128i_i64[1] = 15;
v35->m128i_i8[0] = 0;
v38 = Block;
if ( _mm_srli_si128(v37, 8).m128i_u64[0] > 0xF )
v38 = v36;
sub_140044D80(&v50, v38, v37.m128i_u64[0]);
if ( v49.m128i_i64[1] > 0xFuLL )
{
v39 = Block[0];
if ( (unsigned __int64)(v49.m128i_i64[1] + 1) >= 0x1000 )
{
v39 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v39 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v39);
}
if ( *((_QWORD *)&v47 + 1) > 0xFu )
{
v40 = Src[0];
if ( (unsigned __int64)(*((_QWORD *)&v47 + 1) + 1LL) >= 0x1000 )
{
v40 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v40 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v40);
}
*(_QWORD *)&v47 = 0;
*((_QWORD *)&v47 + 1) = 15;
LOBYTE(Src[0]) = 0;
sub_14003D310((__int64)v53);
}
if ( v7 > 0 )
sub_140044D80(&v50, "\nInvited users join when they accept.", 0x25u);
v41 = &v50;
if ( v52 > 0xF )
v41 = (__int128 *)v50;
*(_OWORD *)Src = 0;
v47 = 0u;
v42 = -1;
do
++v42;
while ( *((_BYTE *)v41 + v42) );
sub_14003D230(Src, v41, v42);
v43 = sub_14003F4F0((__int64)v53, (__int64)Src);
v44 = FLAlertLayer::create(0, (int)"Add Members", v43, (__int64)"OK", 0, 1132068864, 0, 0, 1065353216);
sub_14003D310((__int64)Src);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v44 + 1064LL))(v44);
sub_14003D310((__int64)&v50);
}
else
{
v9 = *(__int64 **)(cocos2d::CCDirector::sharedDirector(a1) + 272);
if ( v6 == 1 )
{
CString = "Member added";
}
else
{
v11 = cocos2d::CCString::createWithFormat("%i members added", v6);
CString = cocos2d::CCString::getCString(v11);
}
*(_OWORD *)Src = 0;
*(_QWORD *)&v47 = 0;
*((_QWORD *)&v47 + 1) = 15;
LOBYTE(Src[0]) = 0;
*(_OWORD *)Block = 0;
v49 = 0u;
v12 = -1;
do
++v12;
while ( CString[v12] );
sub_14003D230(Block, CString, v12);
v13 = *v9;
v16 = TextAlertPopup::create(Block, v14, v15, 150, Src);
(*(void (__fastcall **)(__int64 *, __int64, __int64))(v13 + 456))(v9, v16, 1000);
}
}