//
// sub_10093D210 from 0x10093d210 to 0x10093d731 (1313 bytes)
//
// 6 xrefs:
// > sub_10093D0E0 @ 0x10093d0fb
// > sub_10093D0E0 @ 0x10093d12e
// > FriendPickerPopup::getUserListFinished @ 0x10093d1fd
// > FriendPickerPopup::getUserListFailed @ 0x10093d97d
// > FriendPickerPopup::textChanged @ 0x10093db7a
// > sub_10093E170 @ 0x10093e175
//
// 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 sub_10093D210(__int64 a1)
{
__int64 v1; // r13
__int64 v2; // rdi
unsigned int v3; // r14d
__int64 v4; // rbx
__int64 v5; // rsi
char *v6; // rax
__int64 CString; // rax
_DWORD *v8; // rdi
void *v9; // rax
__int64 v10; // rdi
__int64 v11; // r12
char *v12; // r14
unsigned int v13; // r15d
int v14; // ebx
__int64 v15; // rax
unsigned int v16; // eax
unsigned __int64 v17; // rbx
char v18; // r12
unsigned __int64 v19; // rdx
char *v20; // rax
char v21; // al
_BYTE *v22; // rcx
char *v23; // rbx
unsigned int v24; // r15d
signed __int64 v25; // r15
char *v26; // rax
char *v27; // rbx
bool v28; // bl
__int64 v29; // rdi
size_t v30; // rdx
char *v31; // r13
char *v32; // r14
char *v33; // rax
bool v34; // cc
const char *v35; // rsi
__int64 result; // rax
const char *v37; // rsi
unsigned int v38; // eax
__int64 v39; // rax
char *v40; // [rsp+0h] [rbp-A0h]
__int64 v41; // [rsp+8h] [rbp-98h]
char *v42; // [rsp+10h] [rbp-90h]
unsigned int v43; // [rsp+18h] [rbp-88h]
__int64 v44; // [rsp+20h] [rbp-80h]
int __c; // [rsp+2Ch] [rbp-74h]
__int64 v46; // [rsp+30h] [rbp-70h]
char *__s2; // [rsp+38h] [rbp-68h]
__int128 v48; // [rsp+40h] [rbp-60h] BYREF
void *v49; // [rsp+50h] [rbp-50h]
__int128 __s; // [rsp+60h] [rbp-40h] BYREF
void *__p; // [rsp+70h] [rbp-30h]
v1 = a1;
sub_10095CEF0(a1);
if ( *(_QWORD *)(a1 + 872) )
{
v2 = *(_QWORD *)(a1 + 792);
if ( v2 )
{
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 16LL))(v2);
v4 = *(_QWORD *)(v1 + 872);
if ( *(_BYTE *)(v1 + 828) == 1 )
{
v5 = (*(unsigned int (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 792) + 56LL))(*(_QWORD *)(v1 + 792)) + v3;
v6 = sub_10088E820("%i/%i", v5, 10);
}
else
{
v6 = sub_10088E820("%i/%i", v3, 9);
}
CString = cocos2d::CCString::getCString((__int64)v6);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 928LL))(v4, CString);
}
}
v8 = *(_DWORD **)(v1 + 816);
if ( v8 )
{
cocos2d::CCObject::release(v8);
*(_QWORD *)(v1 + 816) = 0;
}
v9 = sub_1007FE900();
*(_QWORD *)(v1 + 816) = v9;
cocos2d::CCObject::retain((__int64)v9);
if ( *(_BYTE *)(v1 + 856) == 1 && (v10 = *(_QWORD *)(v1 + 792)) != 0 )
{
v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 24LL))(v10);
if ( !v11 )
goto LABEL_69;
}
else if ( *(_BYTE *)(v1 + 824) == 1 )
{
v11 = *(_QWORD *)(v1 + 808);
if ( !v11 )
goto LABEL_69;
}
else
{
v11 = *(_QWORD *)(v1 + 800);
if ( !v11 )
{
LABEL_69:
ScrollableContentLayer::reloadVirtualRows(*(_QWORD *)(v1 + 688), 0.0);
if ( *(_BYTE *)(v1 + 856) )
{
v35 = "No users selected";
}
else
{
v35 = "No friends yet. Use the search to find users.";
if ( *(_BYTE *)(v1 + 824) )
v35 = "No users found";
}
return sub_10095D0B0(v1, v35);
}
}
if ( !(unsigned int)sub_1007FEF90(v11) )
goto LABEL_69;
if ( (int)sub_1007FEF90(v11) <= 0 )
goto LABEL_71;
v12 = (char *)&__s + 1;
v42 = (char *)(v1 + 833);
v13 = 0;
v44 = v1;
v41 = v11;
while ( 2 )
{
v46 = sub_1007FEFE0(v11, v13);
v14 = *(_DWORD *)(v46 + 376);
v15 = GJAccountManager::sharedState(v11, v13);
if ( v14 == *(_DWORD *)(v15 + 352) - *(_DWORD *)(v15 + 356) )
goto LABEL_21;
if ( *(_BYTE *)(v1 + 824) )
goto LABEL_53;
v16 = *(unsigned __int8 *)(v1 + 832);
if ( (v16 & 1) != 0 )
{
if ( !*(_QWORD *)(v1 + 840) )
goto LABEL_53;
}
else if ( !(v16 >> 1) )
{
goto LABEL_53;
}
if ( (*(_BYTE *)(v46 + 320) & 1) != 0 )
{
sub_10001AD30(&v48, *(const void **)(v46 + 336), *(_QWORD *)(v46 + 328));
if ( (v48 & 1) != 0 )
goto LABEL_30;
LABEL_32:
__p = v49;
__s = v48;
goto LABEL_33;
}
v49 = *(void **)(v46 + 336);
v48 = *(_OWORD *)(v46 + 320);
if ( (v48 & 1) == 0 )
goto LABEL_32;
LABEL_30:
sub_10001AD30(&__s, v49, *((unsigned __int64 *)&v48 + 1));
LABEL_33:
v17 = 0;
v43 = v13;
while ( 1 )
{
v18 = __s;
if ( (__s & 1) != 0 )
break;
v19 = (unsigned __int8)__s >> 1;
if ( v17 >= v19 )
{
v23 = v12;
v24 = *(unsigned __int8 *)(v1 + 832);
if ( (v24 & 1) == 0 )
goto LABEL_58;
LABEL_44:
__s2 = *(char **)(v1 + 848);
v25 = *(_QWORD *)(v1 + 840);
if ( !v25 )
goto LABEL_59;
goto LABEL_45;
}
LABEL_39:
v20 = v12;
if ( (__s & 1) != 0 )
v20 = (char *)__p;
v21 = __tolower(v20[v17]);
v22 = v12;
if ( (__s & 1) != 0 )
v22 = __p;
v22[v17++] = v21;
}
v19 = *((_QWORD *)&__s + 1);
if ( v17 < *((_QWORD *)&__s + 1) )
goto LABEL_39;
v23 = (char *)__p;
v24 = *(unsigned __int8 *)(v1 + 832);
if ( (v24 & 1) != 0 )
goto LABEL_44;
LABEL_58:
v25 = v24 >> 1;
__s2 = v42;
if ( !v25 )
{
LABEL_59:
v28 = 0;
v1 = v44;
v13 = v43;
if ( (__s & 1) == 0 )
goto LABEL_49;
LABEL_48:
operator delete(__p);
goto LABEL_49;
}
LABEL_45:
v26 = &v23[v19];
v40 = v23;
if ( (__int64)v19 >= v25 )
{
__c = *__s2;
do
{
v30 = v19 - v25 + 1;
if ( !v30 )
break;
v31 = v12;
v32 = v26;
v33 = (char *)memchr(v23, __c, v30);
if ( !v33 )
{
v26 = v32;
v27 = v32;
v12 = v31;
goto LABEL_47;
}
v27 = v33;
if ( !memcmp(v33, __s2, v25) )
{
v26 = v32;
v12 = v31;
goto LABEL_47;
}
v23 = v27 + 1;
v26 = v32;
v19 = v32 - v23;
v34 = v32 - v23 < v25;
v12 = v31;
}
while ( !v34 );
}
v27 = v26;
LABEL_47:
v28 = v27 == v26 || v27 - v40 == -1;
v1 = v44;
v13 = v43;
if ( (v18 & 1) != 0 )
goto LABEL_48;
LABEL_49:
v11 = v41;
if ( (v48 & 1) != 0 )
{
operator delete(v49);
if ( !v28 )
goto LABEL_53;
}
else if ( !v28 )
{
LABEL_53:
if ( *(_BYTE *)(v1 + 856) != 1
|| (v29 = *(_QWORD *)(v1 + 792)) == 0
|| (*(unsigned __int8 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v29 + 8LL))(
v29,
*(unsigned int *)(v46 + 376)) )
{
sub_1007FEBF0(*(_QWORD *)(v1 + 816), v46);
}
}
LABEL_21:
if ( (int)++v13 < (int)sub_1007FEF90(v11) )
continue;
break;
}
LABEL_71:
ScrollableContentLayer::reloadVirtualRows(*(_QWORD *)(v1 + 688), 0.0);
result = sub_1007FEF90(*(_QWORD *)(v1 + 816));
if ( !(_DWORD)result )
{
if ( *(_BYTE *)(v1 + 824) )
{
v37 = "Nothing found";
}
else
{
v38 = *(unsigned __int8 *)(v1 + 832);
if ( (v38 & 1) != 0 )
v39 = *(_QWORD *)(v1 + 840);
else
v39 = v38 >> 1;
v37 = "No friends match\nTap search to check all users";
if ( !v39 )
v37 = "Nothing found";
}
return sub_10095D0B0(v1, v37);
}
return result;
}