//
// NewThreadPopup::updateRecipientLabel from 0xc7cf6c to 0xc7d250 (740 bytes)
//
// 5 xrefs:
// > NewThreadPopup::applyMode @ 0xc7d558
// > NewThreadPopup::onToggleMode @ 0xc7eeb0
// > NewThreadPopup::friendPicked @ 0xc7f01c
// > NewThreadPopup::friendPicked @ 0xc7f034
// > ??> @ 0xf3988
//
// This function is hookable on this platform (idp: arm, 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 13:05:37 +0000
//
__int64 __fastcall NewThreadPopup::updateRecipientLabel(NewThreadPopup *this)
{
cocos2d::CCArray *v2; // x0
int v3; // w21
const char *v4; // x1
__int64 v6; // x2
char v7; // w0
__int64 v8; // x0
__int64 v9; // x1
__int64 v10; // x2
char v11; // w0
__int64 v12; // x0
__int64 v13; // x1
__int64 *v14; // x0
size_t v15; // x3
unsigned __int8 v16; // w2
size_t v17; // x2
char *v18; // x1
cocos2d::CCString *v19; // x0
char *CString; // x0
char *v21; // x1
__int64 v22; // [xsp+40h] [xbp+40h] BYREF
__int64 v23; // [xsp+48h] [xbp+48h]
void *v24; // [xsp+50h] [xbp+50h]
__int64 v25; // [xsp+58h] [xbp+58h] BYREF
__int64 v26; // [xsp+60h] [xbp+60h]
void *v27; // [xsp+68h] [xbp+68h]
__int64 v28; // [xsp+70h] [xbp+70h] BYREF
size_t v29; // [xsp+78h] [xbp+78h]
void *v30; // [xsp+80h] [xbp+80h]
if ( *((_QWORD *)this + 107) )
{
v2 = *((cocos2d::CCArray **)this + 91);
if ( v2 )
{
v3 = cocos2d::CCArray::count(v2);
if ( v3 )
{
v6 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 91), 0) + 320;
v7 = *(_BYTE *)v6;
v22 = 0;
v23 = 0;
v24 = nullptr;
if ( (v7 & 1) != 0 )
{
std::string::__init(&v22, *(void **)(v6 + 16), *(_QWORD *)(v6 + 8));
}
else
{
v8 = *(_QWORD *)v6;
v9 = *(_QWORD *)(v6 + 8);
v24 = *(void **)(v6 + 16);
v22 = v8;
v23 = v9;
}
if ( v3 > 1 )
{
v10 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 91), 1u) + 320;
v11 = *(_BYTE *)v10;
v25 = 0;
v26 = 0;
v27 = nullptr;
if ( (v11 & 1) != 0 )
{
std::string::__init(&v25, *(void **)(v10 + 16), *(_QWORD *)(v10 + 8));
}
else
{
v12 = *(_QWORD *)v10;
v13 = *(_QWORD *)(v10 + 8);
v27 = *(void **)(v10 + 16);
v25 = v12;
v26 = v13;
}
v14 = std::string::insert(&v25, 0, ", ");
v15 = v14[1];
v28 = *v14;
v29 = v15;
v30 = (void *)v14[2];
*v14 = 0;
v14[1] = 0;
v16 = v28;
v14[2] = 0;
if ( (v16 & 1) != 0 )
{
v18 = (char *)v30;
v17 = v29;
}
else
{
v17 = v16 >> 1;
v18 = (char *)&v28 + 1;
}
std::string::append((__int64)&v22, v18, v17);
if ( (v28 & 1) != 0 )
operator delete(v30);
if ( (v25 & 1) != 0 )
operator delete(v27);
if ( v3 != 2 )
{
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)" +%i",
(const char *)(unsigned int)(v3 - 2));
CString = (char *)cocos2d::CCString::getCString(v19);
std::string::append((__int64)&v22, CString);
}
}
if ( (v22 & 1) != 0 )
v21 = (char *)v24;
else
v21 = (char *)&v22 + 1;
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 107) + 928LL))(*((_QWORD *)this + 107), v21);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 107) + 160LL))(*((_QWORD *)this + 107), 0.45);
cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 107), 264.0, 0.45, 0.2);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 107) + 1024LL))(
*((_QWORD *)this + 107),
0xFFFFFFFFLL);
if ( (v22 & 1) != 0 )
operator delete(v24);
}
else
{
if ( *((_BYTE *)this + 737) )
v4 = "Select user";
else
v4 = "Select users...";
(*(void (__fastcall **)(_QWORD, const char *))(**((_QWORD **)this + 107) + 928LL))(*((_QWORD *)this + 107), v4);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 107) + 160LL))(*((_QWORD *)this + 107), 0.45);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 107) + 1024LL))(*((_QWORD *)this + 107), 120);
}
}
}
return _stack_chk_guard;
}