//
// sub_100153024 from 0x100153024 to 0x1001530a8 (132 bytes)
//
// 8 xrefs:
// > sub_100152F2C @ 0x100152f68
// > sub_100152F2C @ 0x100152f78
// > sub_100153114 @ 0x100153150
// > sub_100153114 @ 0x100153160
// > sub_10015320C @ 0x100153248
// > sub_10015320C @ 0x100153258
// > sub_100153354 @ 0x100153384
// > sub_100153354 @ 0x100153394
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void *__usercall sub_100153024@(void *result@, unsigned __int8 *a2@)
{
__int64 v3; // x8
int v4; // w9
unsigned __int8 *v5; // x8
unsigned __int8 *v6; // x20
unsigned __int8 *v7; // x21
if ( *((char *)result + 23) < 0 )
{
result = sub_1000097D0(a2, *(void **)result, *((_QWORD *)result + 1));
}
else
{
*(_OWORD *)a2 = *(_OWORD *)result;
*((_QWORD *)a2 + 2) = *((_QWORD *)result + 2);
}
v3 = a2[23];
v4 = (char)v3;
v5 = &a2[v3];
if ( v4 >= 0 )
v6 = v5;
else
v6 = (unsigned __int8 *)(*(_QWORD *)a2 + *((_QWORD *)a2 + 1));
if ( v4 >= 0 )
v7 = a2;
else
v7 = *(unsigned __int8 **)a2;
while ( v7 != v6 )
{
result = (void *)__tolower(*v7);
*v7++ = (unsigned __int8)result;
}
return result;
}