//
// sub_10057DD50 from 0x10057dd50 to 0x10057de20 (208 bytes)
//
// 4 xrefs:
// > sub_10057E440 @ 0x10057e540
// > sub_10057E440 @ 0x10057e5cc
// > sub_10057E440 @ 0x10057e678
// > sub_10058212C @ 0x1005822d4
//
// 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_10057DD50(int a1, char *__s, __int64 a3)
{
char *v4; // x22
size_t v5; // x23
size_t v6; // x21
char *v7; // x0
void *v8; // x20
_BYTE *v9; // x8
char v10; // t1
_BYTE v12[96]; // [xsp+0h] [xbp-90h] BYREF
v4 = __s;
v5 = strlen(__s);
v6 = 2 * v5;
v7 = (char *)off_10085DEB0(2 * v5);
v8 = v7;
if ( !v7 )
return 27;
if ( v5 )
{
v9 = v7 + 1;
do
{
v10 = *v4++;
*(v9 - 1) = v10;
*v9 = 0;
--v5;
v9 += 2;
}
while ( v5 );
}
sub_10058CC14(v12);
sub_10058C264((int)v12, v8, v6);
sub_10058CAB8(a3, v12);
*(_BYTE *)(a3 + 20) = 0;
*(_DWORD *)(a3 + 16) = 0;
off_10085DEB8(v8);
return 0;
}