//
// sub_100531D58 from 0x100531d58 to 0x100531e00 (168 bytes)
//
// 2 xrefs:
// > sub_10053053C @ 0x1005305f0
// > AutoBackupPopup::textChanged @ 0x100531c3c
//
// 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:07:21 +0000
//
void *__usercall sub_100531D58@(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(*((unsigned __int8 *)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;
}