//
// sub_BA4948 from 0xba4948 to 0xba4a38 (240 bytes)
//
// 1 xrefs:
// > sub_B87DB4 @ 0xb8a1b4
//
// 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
//
_QWORD *__fastcall sub_BA4948(const char *a1, _DWORD *a2)
{
_QWORD *result; // x0
_QWORD *v5; // x19
_WORD *v6; // x0
_WORD *v7; // x20
size_t v8; // x0
result = off_1231020(1u, 0x30u);
v5 = result;
if ( result )
{
v6 = off_1231020(1u, 0x6Eu);
v5[4] = v6;
v7 = v6;
if ( v6 )
{
v8 = strlen(a1);
if ( v8 > 0x6B )
{
off_1231008(v7);
off_1231008(v5);
*a2 = 1;
return nullptr;
}
else
{
*((_DWORD *)v5 + 1) = 1;
*((_DWORD *)v5 + 4) = 110;
*((_DWORD *)v5 + 2) = 1;
*v7 = 1;
memcpy(v7 + 1, a1, v8 + 1);
return v5;
}
}
else
{
off_1231008(v5);
*a2 = 0;
return nullptr;
}
}
return result;
}