//
// sub_10057480C from 0x10057480c to 0x100574898 (140 bytes)
//
// 4 xrefs:
// > sub_100558DA8 @ 0x100559a80
// > sub_100562B38 @ 0x100562c1c
// > sub_100562B38 @ 0x100562d38
// > sub_10058316C @ 0x10058319c
//
// 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
//
char **__fastcall sub_10057480C(__int64 a1, char *__s1)
{
char *v3; // x19
char **result; // x0
__int64 v5; // x9
__int64 v6; // x8
v3 = off_10085DEC8(__s1);
if ( !v3 )
return nullptr;
result = (char **)off_10085DEB0(0x10u);
if ( !result )
{
off_10085DEB8(v3);
return nullptr;
}
*result = v3;
result[1] = nullptr;
if ( a1 )
{
v5 = a1;
do
{
v6 = v5;
v5 = *(_QWORD *)(v5 + 8);
}
while ( v5 );
*(_QWORD *)(v6 + 8) = result;
return (char **)a1;
}
return result;
}