//
// sub_10004B424 from 0x10004b424 to 0x10004b4e0 (188 bytes)
//
// 9 xrefs:
// > sub_1001D97E0 @ 0x1001d9868
// > sub_10040DFD4 @ 0x10040e000
// > sub_10040DFD4 @ 0x10040e03c
// > sub_1004E11C0 @ 0x1004e1278
// > sub_1004E11C0 @ 0x1004e12f0
// > sub_1004E6938 @ 0x1004e696c
// > sub_1004E6938 @ 0x1004e697c
// > sub_1004E81D8 @ 0x1004e82d4
// > sub_1004E81D8 @ 0x1004e837c
//
// 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 10:57:41 +0000
//
char *__usercall sub_10004B424@(char *result@, __int64 *a2@)
{
int v3; // w9
unsigned __int64 v4; // x8
bool v5; // w12
unsigned __int64 v6; // x10
__int64 v7; // x9
unsigned __int64 v8; // x9
__int64 *v9; // x11
__int64 *v10; // x13
__int64 v11; // x12
int v12; // w13
unsigned __int64 v13; // x13
if ( result[23] < 0 )
{
result = (char *)sub_1000097D0(a2, *(void **)result, *((_QWORD *)result + 1));
}
else
{
*(_OWORD *)a2 = *(_OWORD *)result;
a2[2] = *((_QWORD *)result + 2);
}
v3 = *((char *)a2 + 23);
v4 = *((unsigned __int8 *)a2 + 23);
v5 = v3 < 0;
v6 = a2[1];
if ( v3 >= 0 )
v7 = *((unsigned __int8 *)a2 + 23);
else
v7 = a2[1];
if ( v7 )
{
v8 = 0;
v9 = (__int64 *)*a2;
do
{
if ( v5 )
v10 = v9;
else
v10 = a2;
if ( *((char *)v10 + v8) >= 65 )
{
v11 = (__int64)(v5 ? v9 : a2);
v12 = *(char *)(v11 + v8);
if ( v12 <= 90 )
{
*(_BYTE *)(v11 + v8) = v12 + 32;
v4 = *((unsigned __int8 *)a2 + 23);
v9 = (__int64 *)*a2;
v6 = a2[1];
}
}
++v8;
v5 = (v4 & 0x80u) != 0LL;
if ( (v4 & 0x80u) == 0LL )
v13 = v4;
else
v13 = v6;
}
while ( v8 < v13 );
}
return result;
}