//
// sub_100933900 from 0x100933900 to 0x100933eb9 (1465 bytes)
//
// 2 xrefs:
// > ThreadViewPopup::threadUpdateFinished @ 0x100933676
// > MemberListPopup::threadUpdateFinished @ 0x100943afe
//
// 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 12:38:25 +0000
//
void __fastcall sub_100933900(__int64 a1)
{
__int64 v2; // r13
__int64 v3; // r12
__int64 v4; // rdi
int v5; // ebx
int v6; // r15d
int v7; // eax
__int64 v8; // rbx
const char *CString; // r14
int v10; // r14d
std::string *v11; // rax
std::string *v12; // rax
const std::string::value_type *v13; // rsi
std::string::size_type v14; // rdx
char *v15; // rax
size_t v16; // rax
size_t v17; // r15
char *v18; // r12
size_t v19; // r13
char *v20; // rax
std::string::pointer v21; // rdi
std::string *v22; // rax
std::string *v23; // rax
const std::string::value_type *v24; // rsi
std::string::size_type v25; // rdx
std::string *v26; // rax
std::string *v27; // rax
const std::string::value_type *v28; // rsi
std::string::size_type v29; // rdx
const char *v30; // rbx
size_t v31; // rax
size_t v32; // r14
char *v33; // r15
size_t v34; // r12
__int64 v35; // rax
__int128 v36; // [rsp+0h] [rbp-E0h] BYREF
void *__p; // [rsp+10h] [rbp-D0h]
__int128 __dst; // [rsp+18h] [rbp-C8h] BYREF
char *v39; // [rsp+28h] [rbp-B8h]
__int128 v40; // [rsp+30h] [rbp-B0h] BYREF
void *v41; // [rsp+40h] [rbp-A0h]
__int64 v42; // [rsp+48h] [rbp-98h]
std::string v43; // [rsp+50h] [rbp-90h] BYREF
std::string v44; // [rsp+68h] [rbp-78h] BYREF
std::string v45; // [rsp+80h] [rbp-60h] BYREF
std::string::value_type __s[16]; // [rsp+A0h] [rbp-40h] BYREF
void *data; // [rsp+B0h] [rbp-30h]
v2 = *(_QWORD *)(GameLevelManager::sharedState() + 688);
v3 = *(_QWORD *)(GameLevelManager::sharedState() + 696);
v4 = *(_QWORD *)(GameLevelManager::sharedState() + 704);
v5 = 0;
v6 = 0;
v42 = v4;
if ( v2 )
{
v4 = v42;
v6 = sub_1007FEF90(v2);
}
if ( v3 )
{
v4 = v42;
v5 = sub_1007FEF90(v3);
}
if ( v4 )
{
v7 = sub_1007FEF90(v4);
*(_DWORD *)(a1 + 168) += v6;
if ( !(v7 | v5) )
goto LABEL_7;
}
else
{
v7 = 0;
*(_DWORD *)(a1 + 168) += v6;
if ( !v5 )
{
LABEL_7:
v8 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector() + 272);
if ( v6 == 1 )
{
CString = "Member added";
}
else
{
v15 = sub_10088E820("%i members added", v6);
CString = (const char *)cocos2d::CCString::getCString((__int64)v15);
}
v16 = strlen(CString);
if ( v16 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v17 = v16;
if ( v16 >= 0x17 )
{
v19 = 26;
if ( (v16 | 7) != 0x17 )
v19 = (v16 | 7) + 1;
v18 = (char *)operator new(v19);
v39 = v18;
*(_QWORD *)&__dst = v19 + 1;
*((_QWORD *)&__dst + 1) = v17;
}
else
{
LOBYTE(__dst) = 2 * v16;
v18 = (char *)&__dst + 1;
if ( !v16 )
{
LABEL_22:
v18[v17] = 0;
LOWORD(v36) = 0;
v20 = TextAlertPopup::create(&__dst, 0x96u, &v36, 0.5, 0.60000002);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)v8 + 464LL))(v8, v20, 1000);
if ( (v36 & 1) != 0 )
operator delete(__p);
if ( (__dst & 1) != 0 )
{
v21 = v39;
LABEL_70:
operator delete(v21);
return;
}
return;
}
}
memmove(v18, CString, v17);
goto LABEL_22;
}
}
v10 = v7;
memset(&v43, 0, sizeof(v43));
if ( v6 > 0 )
{
sub_100943840(&v44);
v11 = std::string::insert(&v44, 0, "Added: ");
v45 = *v11;
*(_OWORD *)&v11->__r_.__value_.__l.0 = 0;
v11->__r_.__value_.__r.__words[2] = 0;
v12 = std::string::append(&v45, "\n");
data = v12->__r_.__value_.__l.__data_;
*(_OWORD *)__s = *(_OWORD *)&v12->__r_.__value_.__l.0;
*(_OWORD *)&v12->__r_.__value_.__l.0 = 0;
v12->__r_.__value_.__r.__words[2] = 0;
if ( (__s[0] & 1) != 0 )
{
v13 = (const std::string::value_type *)data;
v14 = *(_QWORD *)&__s[8];
}
else
{
v14 = (unsigned __int8)__s[0] >> 1;
v13 = &__s[1];
}
std::string::append(&v43, v13, v14);
if ( (__s[0] & 1) != 0 )
{
operator delete(data);
if ( (*(_BYTE *)&v45.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_29:
if ( (*(_BYTE *)&v44.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_31;
goto LABEL_30;
}
}
else if ( (*(_BYTE *)&v45.__r_.__value_.__s.0 & 1) == 0 )
{
goto LABEL_29;
}
operator delete(v45.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v44.__r_.__value_.__s.0 & 1) != 0 )
LABEL_30:
operator delete(v44.__r_.__value_.__l.__data_);
}
LABEL_31:
if ( v5 <= 0 )
goto LABEL_42;
sub_100943840(&v44);
v22 = std::string::insert(&v44, 0, "Invited: ");
v45 = *v22;
*(_OWORD *)&v22->__r_.__value_.__l.0 = 0;
v22->__r_.__value_.__r.__words[2] = 0;
v23 = std::string::append(&v45, "\n");
data = v23->__r_.__value_.__l.__data_;
*(_OWORD *)__s = *(_OWORD *)&v23->__r_.__value_.__l.0;
*(_OWORD *)&v23->__r_.__value_.__l.0 = 0;
v23->__r_.__value_.__r.__words[2] = 0;
if ( (__s[0] & 1) != 0 )
{
v24 = (const std::string::value_type *)data;
v25 = *(_QWORD *)&__s[8];
}
else
{
v25 = (unsigned __int8)__s[0] >> 1;
v24 = &__s[1];
}
std::string::append(&v43, v24, v25);
if ( (__s[0] & 1) != 0 )
{
operator delete(data);
if ( (*(_BYTE *)&v45.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_40:
if ( (*(_BYTE *)&v44.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_42;
goto LABEL_41;
}
}
else if ( (*(_BYTE *)&v45.__r_.__value_.__s.0 & 1) == 0 )
{
goto LABEL_40;
}
operator delete(v45.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v44.__r_.__value_.__s.0 & 1) != 0 )
LABEL_41:
operator delete(v44.__r_.__value_.__l.__data_);
LABEL_42:
if ( v10 <= 0 )
goto LABEL_53;
sub_100943840(&v44);
v26 = std::string::insert(&v44, 0, "Unavailable: ");
v45 = *v26;
*(_OWORD *)&v26->__r_.__value_.__l.0 = 0;
v26->__r_.__value_.__r.__words[2] = 0;
v27 = std::string::append(&v45, "\n");
data = v27->__r_.__value_.__l.__data_;
*(_OWORD *)__s = *(_OWORD *)&v27->__r_.__value_.__l.0;
*(_OWORD *)&v27->__r_.__value_.__l.0 = 0;
v27->__r_.__value_.__r.__words[2] = 0;
if ( (__s[0] & 1) != 0 )
{
v28 = (const std::string::value_type *)data;
v29 = *(_QWORD *)&__s[8];
}
else
{
v29 = (unsigned __int8)__s[0] >> 1;
v28 = &__s[1];
}
std::string::append(&v43, v28, v29);
if ( (__s[0] & 1) != 0 )
{
operator delete(data);
if ( (*(_BYTE *)&v45.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_51:
if ( (*(_BYTE *)&v44.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_53;
goto LABEL_52;
}
}
else if ( (*(_BYTE *)&v45.__r_.__value_.__s.0 & 1) == 0 )
{
goto LABEL_51;
}
operator delete(v45.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v44.__r_.__value_.__s.0 & 1) != 0 )
LABEL_52:
operator delete(v44.__r_.__value_.__l.__data_);
LABEL_53:
if ( v5 > 0 )
std::string::append(&v43, "\nInvited users join when they accept.");
if ( (*(_BYTE *)&v43.__r_.__value_.__s.0 & 1) != 0 )
v30 = v43.__r_.__value_.__l.__data_;
else
v30 = v43.__r_.__value_.__s.__data_;
v31 = strlen(v30);
if ( v31 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v32 = v31;
if ( v31 >= 0x17 )
{
v34 = 26;
if ( (v31 | 7) != 0x17 )
v34 = (v31 | 7) + 1;
v33 = (char *)operator new(v34);
v41 = v33;
*(_QWORD *)&v40 = v34 | 1;
*((_QWORD *)&v40 + 1) = v32;
goto LABEL_65;
}
LOBYTE(v40) = 2 * v31;
v33 = (char *)&v40 + 1;
if ( v31 )
LABEL_65:
memmove(v33, v30, v32);
v33[v32] = 0;
v35 = sub_100493AB0(0, (__int64)"Add Members", &v40, (__int64)"OK", 0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v35 + 1312LL))(v35);
if ( (v40 & 1) != 0 )
operator delete(v41);
if ( (*(_BYTE *)&v43.__r_.__value_.__s.0 & 1) != 0 )
{
v21 = v43.__r_.__value_.__l.__data_;
goto LABEL_70;
}
}