//
// sub_C6E548 from 0xc6e548 to 0xc6e6f8 (432 bytes)
//
// 2 xrefs:
// > FriendPickerPopup::getUserListFinished @ 0xc81388
// > FriendPickerPopup::getUserListFinished @ 0xc81390
//
// 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:29 +0000
//
__int64 __fastcall sub_C6E548(__int64 *a1, __int64 *a2)
{
__int64 v2; // x0
__int64 v3; // x2
__int64 v4; // x19
__int64 v5; // x0
__int64 v6; // x1
_BYTE *v7; // x24
char v8; // w0
__int64 v9; // x19
__int64 v10; // x0
__int64 v11; // x1
_BYTE *v12; // x20
int v13; // w23
int v14; // w0
int v15; // w21
int v16; // t1
int v17; // w19
int v18; // w0
unsigned int v19; // w19
int v21; // w20
int v22; // w19
__int64 v23; // [xsp+48h] [xbp+48h] BYREF
__int64 v24; // [xsp+50h] [xbp+50h]
void *v25; // [xsp+58h] [xbp+58h]
__int64 v26; // [xsp+60h] [xbp+60h] BYREF
__int64 v27; // [xsp+68h] [xbp+68h]
void *v28; // [xsp+70h] [xbp+70h]
v2 = *a1;
v23 = 0;
v3 = v2 + 320;
LOBYTE(v2) = *(_BYTE *)(v2 + 320);
v24 = 0;
v25 = nullptr;
v4 = *a2;
if ( (v2 & 1) != 0 )
{
std::string::__init(&v23, *(void **)(v3 + 16), *(_QWORD *)(v3 + 8));
}
else
{
v5 = *(_QWORD *)v3;
v6 = *(_QWORD *)(v3 + 8);
v25 = *(void **)(v3 + 16);
v23 = v5;
v24 = v6;
}
v7 = (char *)&v23 + 1;
if ( (v23 & 1) != 0 )
v7 = v25;
v8 = *(_BYTE *)(v4 + 320);
v26 = 0;
v9 = v4 + 320;
v27 = 0;
v28 = nullptr;
if ( (v8 & 1) != 0 )
{
std::string::__init(&v26, *(void **)(v9 + 16), *(_QWORD *)(v9 + 8));
}
else
{
v10 = *(_QWORD *)v9;
v11 = *(_QWORD *)(v9 + 8);
v28 = *(void **)(v9 + 16);
v26 = v10;
v27 = v11;
}
v12 = (char *)&v26 + 1;
v13 = v26 & 1;
if ( v13 )
v12 = v28;
v14 = (unsigned __int8)*v7;
if ( !*v7 )
{
v21 = (unsigned __int8)*v12;
LABEL_21:
v22 = tolower(v14);
v19 = v22 - tolower(v21);
if ( v13 )
LABEL_22:
operator delete(v28);
goto LABEL_17;
}
v15 = (unsigned __int8)*v12;
if ( !*v12 )
{
LABEL_20:
v21 = 0;
goto LABEL_21;
}
while ( 1 )
{
v17 = tolower(v14);
v18 = v17 - tolower(v15);
if ( v18 )
break;
v16 = (unsigned __int8)*++v7;
v14 = v16;
if ( !v16 )
{
v21 = (unsigned __int8)v12[1];
goto LABEL_21;
}
v15 = (unsigned __int8)v12[1];
if ( !v12[1] )
goto LABEL_20;
++v12;
}
v19 = v18;
if ( v13 )
goto LABEL_22;
LABEL_17:
if ( (v23 & 1) != 0 )
operator delete(v25);
return v19;
}