//
// sub_10050412C from 0x10050412c to 0x1005041d4 (168 bytes)
//
// 4 xrefs:
// > sub_100503A98 @ 0x100503bd4
// > FriendPickerPopup::textChanged @ 0x1005040b8
// > LevelPickerPopup::textChanged @ 0x1005062f4
// > sub_100506380 @ 0x1005064d0
//
// 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 11:06:55 +0000
//
void *__usercall sub_10050412C@(void *result@, __int64 *a2@)
{
unsigned __int64 v3; // x8
__int64 v4; // x9
unsigned __int64 v5; // x20
unsigned __int64 v6; // x8
__int64 *v7; // x8
__int64 *v8; // x8
unsigned __int64 v9; // x9
if ( *((char *)result + 23) < 0 )
{
result = sub_1000097D0(a2, *(void **)result, *((_QWORD *)result + 1));
}
else
{
*(_OWORD *)a2 = *(_OWORD *)result;
a2[2] = *((_QWORD *)result + 2);
}
v3 = *((char *)a2 + 23);
v4 = a2[1];
if ( (v3 & 0x80000000) == 0LL )
v4 = *((char *)a2 + 23);
if ( v4 )
{
v5 = 0;
v6 = v3 >> 63;
do
{
if ( (v6 & 1) != 0 )
v7 = (__int64 *)*a2;
else
v7 = a2;
result = (void *)__tolower(*((char *)v7 + v5));
if ( *((char *)a2 + 23) >= 0 )
v8 = a2;
else
v8 = (__int64 *)*a2;
*((_BYTE *)v8 + v5++) = (_BYTE)result;
v9 = *((char *)a2 + 23);
v6 = v9 >> 63;
if ( (v9 & 0x80000000) != 0LL )
v9 = a2[1];
}
while ( v5 < v9 );
}
return result;
}