//
// sub_10057DE20 from 0x10057de20 to 0x10057df50 (304 bytes)
//
// 1 xrefs:
// > sub_10057E440 @ 0x10057e564
//
// 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
//
__int64 __fastcall sub_10057DE20(char *a1, __int64 a2, char *a3, __int64 a4, char *a5, __int64 a6)
{
__int64 v8; // x22
char *v12; // x0
char *v13; // x19
_BYTE *v14; // x27
__int64 v15; // x28
__darwin_ct_rune_t v16; // t1
char *v17; // x8
char v18; // t1
__int64 *v19; // x0
__int64 *v20; // x21
__int64 v21; // x20
v8 = a4;
v12 = (char *)off_10085DEB0(2 * (a4 + a2));
v13 = v12;
if ( !v12 )
return 27;
if ( a2 )
{
v14 = v12 + 1;
v15 = a2;
do
{
v16 = *a1++;
*(v14 - 1) = __toupper(v16);
*v14 = 0;
--v15;
v14 += 2;
}
while ( v15 );
}
if ( v8 )
{
v17 = &v13[2 * a2 + 1];
do
{
v18 = *a3++;
*(v17 - 1) = v18;
*v17 = 0;
--v8;
v17 += 2;
}
while ( v8 );
}
nullsub_1();
v19 = sub_10057BBC0((__int64)&off_10082E070, a5, 16);
v20 = v19;
if ( v19 )
{
sub_1005700D0(v19);
sub_10057BD60(v20, a6);
v21 = 0;
}
else
{
v21 = 27;
}
off_10085DEB8(v13);
return v21;
}