//
// sub_1009472D0 from 0x1009472d0 to 0x100947546 (630 bytes)
//
// 3 xrefs:
// > sub_100945860 @ 0x1009458cc
// > NewThreadPopup::applyMode @ 0x1009470a8
// > NewThreadPopup::friendPicked @ 0x1009481b2
//
// 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:34 +0000
//
void __fastcall sub_1009472D0(__int64 a1)
{
__int64 v2; // rdi
int v3; // eax
int v4; // r14d
__int64 v5; // rax
const char *v6; // rsi
__int64 v7; // rax
std::string *v8; // rax
const std::string::value_type *v9; // rsi
std::string::size_type v10; // rdx
char *v11; // rax
const std::string::value_type *CString; // rax
std::string::pointer data; // rsi
std::string v14; // [rsp+0h] [rbp-70h] BYREF
std::string::value_type __s[16]; // [rsp+20h] [rbp-50h] BYREF
void *__p; // [rsp+30h] [rbp-40h]
std::string v17; // [rsp+40h] [rbp-30h] BYREF
if ( !*(_QWORD *)(a1 + 856) )
return;
v2 = *(_QWORD *)(a1 + 728);
if ( !v2 )
return;
v3 = sub_1007FEF90(v2);
if ( v3 )
{
v4 = v3;
v5 = sub_1007FEFE0(*(_QWORD *)(a1 + 728), 0);
if ( (*(_BYTE *)(v5 + 320) & 1) != 0 )
{
sub_10001AD30(&v17, *(const void **)(v5 + 336), *(_QWORD *)(v5 + 328));
if ( v4 < 2 )
goto LABEL_24;
}
else
{
v17 = *(std::string *)(v5 + 320);
if ( v4 < 2 )
goto LABEL_24;
}
v7 = sub_1007FEFE0(*(_QWORD *)(a1 + 728), 1u);
if ( (*(_BYTE *)(v7 + 320) & 1) != 0 )
sub_10001AD30(&v14, *(const void **)(v7 + 336), *(_QWORD *)(v7 + 328));
else
v14 = *(std::string *)(v7 + 320);
v8 = std::string::insert(&v14, 0, ", ");
__p = v8->__r_.__value_.__l.__data_;
*(_OWORD *)__s = *(_OWORD *)&v8->__r_.__value_.__l.0;
*(_OWORD *)&v8->__r_.__value_.__l.0 = 0;
v8->__r_.__value_.__r.__words[2] = 0;
if ( (__s[0] & 1) != 0 )
{
v9 = (const std::string::value_type *)__p;
v10 = *(_QWORD *)&__s[8];
}
else
{
v10 = (unsigned __int8)__s[0] >> 1;
v9 = &__s[1];
}
std::string::append(&v17, v9, v10);
if ( (__s[0] & 1) != 0 )
{
operator delete(__p);
if ( (*(_BYTE *)&v14.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_19:
if ( v4 == 2 )
goto LABEL_24;
goto LABEL_23;
}
}
else if ( (*(_BYTE *)&v14.__r_.__value_.__s.0 & 1) == 0 )
{
goto LABEL_19;
}
operator delete(v14.__r_.__value_.__l.__data_);
if ( v4 != 2 )
{
LABEL_23:
v11 = sub_10088E820(" +%i", v4 - 2);
CString = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v11);
std::string::append(&v17, CString);
}
LABEL_24:
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )
data = v17.__r_.__value_.__l.__data_;
else
data = v17.__r_.__value_.__s.__data_;
(*(void (__fastcall **)(_QWORD, std::string::pointer))(**(_QWORD **)(a1 + 856) + 928LL))(
*(_QWORD *)(a1 + 856),
data);
(*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 856) + 160LL))(*(_QWORD *)(a1 + 856), 0.44999999);
cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(a1 + 856), 264.0, (__m128)0x3EE66666u, (__m128)0x3E4CCCCDu);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 856) + 1024LL))(*(_QWORD *)(a1 + 856), 255);
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v17.__r_.__value_.__l.__data_);
return;
}
v6 = "Select users...";
if ( *(_BYTE *)(a1 + 737) )
v6 = "Select user";
(*(void (__fastcall **)(_QWORD, const char *))(**(_QWORD **)(a1 + 856) + 928LL))(*(_QWORD *)(a1 + 856), v6);
(*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 856) + 160LL))(*(_QWORD *)(a1 + 856), 0.44999999);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 856) + 1024LL))(*(_QWORD *)(a1 + 856), 120);
}