//
// FriendPickerPopup::init from 0x10093c5b0 to 0x10093ce32 (2178 bytes)
//
// 1 xrefs:
// > sub_10092B760 @ 0x10092b87c
//
// 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:29 +0000
//
__int64 __fastcall FriendPickerPopup::init(__int64 a1, __int64 a2, unsigned int a3, int a4, int a5, int a6)
{
__int64 v9; // r15
__int64 v10; // r14
__int64 result; // rax
int v12; // r15d
unsigned int v13; // ebx
unsigned int v14; // r13d
__m128i inserted; // xmm0
__m128i v16; // xmm0
unsigned int v17; // r12d
__int64 v18; // xmm1_8
const char *v19; // rdi
char *v20; // rax
void *v21; // r15
float v22; // xmm0_4
char *v23; // rax
void *v24; // rbx
char *v25; // r15
void *v26; // r15
_QWORD **v27; // rbx
__int64 v28; // rsi
double v29; // xmm0_8
char *v30; // rbx
void *v31; // rbx
void *v32; // rbx
__int64 v33; // rbx
double v34; // xmm0_8
__int64 v35; // rdi
unsigned int v36; // ebx
__int64 v37; // r15
__int64 v38; // rsi
char *v39; // rax
__int64 CString; // rax
char *v41; // rax
void *v42; // rbx
__int64 v43; // rax
__int64 v44; // rax
__int64 v45; // rax
__int128 v46; // [rsp+8h] [rbp-78h] BYREF
void *v47; // [rsp+18h] [rbp-68h]
__int128 v48; // [rsp+20h] [rbp-60h] BYREF
void *v49; // [rsp+30h] [rbp-50h]
unsigned __int64 v50[3]; // [rsp+38h] [rbp-48h] BYREF
int v51; // [rsp+54h] [rbp-2Ch]
v51 = a5;
v9 = a2;
v10 = a1;
LOWORD(v50[0]) = 0;
result = sub_10095C520(a1, "Select Users", v50, 340.0, 260.0);
if ( (v50[0] & 1) != 0 )
{
v12 = a6;
v13 = a3;
v14 = result;
operator delete((void *)v50[2]);
result = v14;
a3 = v13;
a6 = v12;
v9 = a2;
v10 = a1;
}
if ( (_BYTE)result )
{
inserted = _mm_insert_epi32(_mm_insert_epi32(_mm_insert_epi32(_mm_cvtsi32_si128(a3), a4, 1), v51, 2), a6, 3);
*(_QWORD *)(v10 + 792) = v9;
v16 = _mm_packus_epi32(inserted, inserted);
*(_DWORD *)(v10 + 825) = _mm_cvtsi128_si32(_mm_packus_epi16(v16, v16));
if ( (_BYTE)a4 )
{
v17 = result;
sub_10095C9F0(v10, 74.0, COERCE_DOUBLE(1110441984));
}
else
{
v17 = result;
if ( (_BYTE)a3 )
v18 = 1110441984;
else
v18 = 1098907648;
sub_10095C9F0(v10, 74.0, *(double *)&v18);
if ( !(_BYTE)a3 )
{
LABEL_16:
LOBYTE(v48) = 24;
strcpy((char *)&v48 + 1, "Select Users");
v47 = operator new(0xE0u);
*(_QWORD *)&v46 = 225;
*((_QWORD *)&v46 + 1) = 222;
strcpy(
(char *)v47,
"Users without a checkbox are not your friend, or have turned off messages or invites in their "
"Account Settings.\n"
"Advisors and Moderators open to all take message requests from anyone.");
v25 = InfoAlertButton::create(&v48, &v46, 0.80000001);
if ( (v46 & 1) != 0 )
operator delete(v47);
if ( (v48 & 1) != 0 )
operator delete(v49);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v10 + 552) + 456LL))(*(_QWORD *)(v10 + 552), v25);
sub_100278250(
(float *)v50,
(float)((float)(*(float *)(v10 + 668) * 0.5) + *(float *)(v10 + 660)) + -18.0,
(float)((float)(*(float *)(v10 + 672) * 0.5) + *(float *)(v10 + 664)) + -18.0);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v25 + 184LL))(v25, v50);
sub_10096D680(*(_QWORD *)(v10 + 688), v10 + 776, 64.0, 0.0, COERCE_DOUBLE(1086324736));
*(float *)&v51 = (float)((float)(*(float *)(v10 + 672) * 0.5) + *(float *)(v10 + 664)) + -52.0;
sub_100278270((__int64)v50, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u);
v26 = cocos2d::extension::CCScale9Sprite::create_2((__int64)"square02b_small.png", v50);
sub_100278260((float *)v50, 200.0, 24.0);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v26 + 320LL))(v26, v50);
BYTE2(v50[0]) = 31;
LOWORD(v50[0]) = 13405;
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v26 + 960LL))(v26, v50);
sub_100278250((float *)v50, *(float *)(v10 + 660), *(float *)&v51);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v26 + 184LL))(v26, v50);
(*(void (__fastcall **)(_QWORD, void *, _QWORD))(**(_QWORD **)(v10 + 584) + 464LL))(
*(_QWORD *)(v10 + 584),
v26,
0);
v27 = sub_1004EEE20((__int64)"Search", 20, 188.0, 24.0);
*(_QWORD *)(v10 + 864) = v27;
sub_100278250((float *)v50, *(float *)(v10 + 660), *(float *)&v51);
((void (__fastcall *)(_QWORD **, unsigned __int64 *))(*v27)[23])(v27, v50);
CCTextInputNode::setLabelPlaceholderScale(*(_QWORD *)(v10 + 864), 0.60000002);
v28 = *(_QWORD *)(v10 + 864);
*(_QWORD *)(v28 + 584) = v10 + 544;
v29 = (*(double (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v10 + 584) + 464LL))(
*(_QWORD *)(v10 + 584),
v28,
5);
v30 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"gj_findBtn_001.png", v29);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v30 + 160LL))(v30, 0.60000002);
v31 = CCMenuItemSpriteExtra::create((__int64)v30, 0, v10, (__int64)sub_10093CF30, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v31, 1.3);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v10 + 552) + 456LL))(*(_QWORD *)(v10 + 552), v31);
sub_100278250((float *)v50, *(float *)(v10 + 660) + 122.0, *(float *)&v51);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v31 + 184LL))(v31, v50);
if ( *(_BYTE *)(v10 + 826) == 1 )
{
v32 = cocos2d::CCLabelBMFont::create_3((__int64)"", (__int64)"goldFont.fnt");
*(_QWORD *)(v10 + 872) = v32;
sub_100278250((float *)v50, 0.0, 0.5);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v32 + 296LL))(v32, v50);
(*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(v10 + 872) + 160LL))(*(_QWORD *)(v10 + 872), 0.5);
v33 = *(_QWORD *)(v10 + 872);
*(_QWORD *)&v34 = *(unsigned int *)(v10 + 660);
*(float *)&v34 = (float)(*(float *)&v34 - (float)(*(float *)(v10 + 668) * 0.5)) + 40.0;
sub_100278250(
(float *)v50,
*(float *)&v34,
(float)(*(float *)(v10 + 664) - (float)(*(float *)(v10 + 672) * 0.5)) + 24.0);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v33 + 184LL))(v33, v50);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(v10 + 584) + 464LL))(
*(_QWORD *)(v10 + 584),
*(_QWORD *)(v10 + 872),
5);
if ( *(_QWORD *)(v10 + 872) )
{
v35 = *(_QWORD *)(v10 + 792);
if ( v35 )
{
v36 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v35 + 16LL))(v35);
v37 = *(_QWORD *)(v10 + 872);
if ( *(_BYTE *)(v10 + 828) == 1 )
{
v38 = (*(unsigned int (__fastcall **)(_QWORD))(**(_QWORD **)(v10 + 792) + 56LL))(*(_QWORD *)(v10 + 792))
+ v36;
v39 = sub_10088E820("%i/%i", v38, 10);
}
else
{
v39 = sub_10088E820("%i/%i", v36, 9);
}
CString = cocos2d::CCString::getCString((__int64)v39);
v34 = (*(double (__fastcall **)(__int64, __int64))(*(_QWORD *)v37 + 928LL))(v37, CString);
}
}
v41 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_checkOn_001.png", v34);
*(_QWORD *)(v10 + 880) = v41;
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v41 + 160LL))(v41, 0.69999999);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v10 + 880) + 912LL))(*(_QWORD *)(v10 + 880), 140);
v42 = CCMenuItemSpriteExtra::create(*(_QWORD *)(v10 + 880), 0, v10, (__int64)sub_10093D0E0, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v42, 1.3);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v10 + 552) + 456LL))(*(_QWORD *)(v10 + 552), v42);
sub_100278250(
(float *)v50,
(float)(*(float *)(v10 + 660) - (float)(*(float *)(v10 + 668) * 0.5)) + 22.0,
(float)(*(float *)(v10 + 664) - (float)(0.5 * *(float *)(v10 + 672))) + 24.0);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v42 + 184LL))(v42, v50);
}
*(_QWORD *)(GameLevelManager::sharedState() + 1368) = v10 + 784;
v43 = GameLevelManager::sharedState();
v44 = sub_10057BF90(v43, 0);
if ( v44 )
{
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)v10 + 1392LL))(v10, v44, 0);
}
else
{
sub_10095CF70(v10);
v45 = GameLevelManager::sharedState();
GameLevelManager::getUserList(v45, 0);
}
return v17;
}
}
v19 = "Done";
if ( *(_BYTE *)(v10 + 828) )
v19 = "Add";
v20 = ButtonSprite::create_1(
(__int64)v19,
0x32u,
0,
1u,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_01.png",
0.5,
25.0);
v21 = CCMenuItemSpriteExtra::create((__int64)v20, 0, v10, (__int64)sub_10093CE70, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v21, 1.2);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v10 + 552) + 456LL))(*(_QWORD *)(v10 + 552), v21);
v22 = *(float *)(v10 + 660);
if ( *(_BYTE *)(v10 + 827) )
v22 = v22 + -36.0;
sub_100278250((float *)v50, v22, (float)(*(float *)(v10 + 664) - (float)(*(float *)(v10 + 672) * 0.5)) + 24.0);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v21 + 184LL))(v21, v50);
if ( *(_BYTE *)(v10 + 827) == 1 )
{
v23 = ButtonSprite::create_1(
(__int64)"Clear",
0x32u,
0,
1u,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.5,
25.0);
v24 = CCMenuItemSpriteExtra::create((__int64)v23, 0, v10, (__int64)sub_10093CEF0, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v24, 1.2);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v10 + 552) + 456LL))(*(_QWORD *)(v10 + 552), v24);
sub_100278250(
(float *)v50,
*(float *)(v10 + 660) + 36.0,
(float)(*(float *)(v10 + 664) - (float)(0.5 * *(float *)(v10 + 672))) + 24.0);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v24 + 184LL))(v24, v50);
}
goto LABEL_16;
}
return result;
}