//
// sub_BA4A9C from 0xba4a9c to 0xba4b40 (164 bytes)
//
// 4 xrefs:
// > sub_B839AC @ 0xb84db8
// > sub_B8FD4C @ 0xb8fed4
// > sub_B8FD4C @ 0xb8ffe8
// > sub_BB8F34 @ 0xbb8f78
//
// 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_BA4A9C(__int64 a1, char *a2)
{
char *result; // x0
char *v4; // x21
__int64 i; // x2
result = off_1231018(a2);
v4 = result;
if ( result )
{
result = (char *)off_1231000(0x10u);
if ( result )
{
*((_QWORD *)result + 1) = 0;
*(_QWORD *)result = v4;
if ( a1 )
{
for ( i = a1; *(_QWORD *)(i + 8); i = *(_QWORD *)(i + 8) )
;
*(_QWORD *)(i + 8) = result;
return (char *)a1;
}
}
else
{
off_1231008(v4);
return nullptr;
}
}
return result;
}