//
// sub_100606408 from 0x100606408 to 0x10060649c (148 bytes)
//
// 7 xrefs:
// > ??> @ 0x10083fef8
// > ??> @ 0x10083ff60
// > ??> @ 0x10083ffc8
// > ??> @ 0x100840030
// > ??> @ 0x100840098
// > ??> @ 0x100840100
// > ??> @ 0x100840168
//
// 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
//
_BYTE *__fastcall sub_100606408(__int64 a1, const void **a2)
{
_BYTE *v3; // x0
_BYTE *v4; // x20
if ( !a2 )
return nullptr;
if ( !*(_DWORD *)a2 )
return nullptr;
v3 = sub_100588710((unsigned int)(*(_DWORD *)a2 + 1), (__int64)"v3_ia5.c", 87);
v4 = v3;
if ( v3 )
{
memcpy(v3, a2[1], *(int *)a2);
v4[*(int *)a2] = 0;
}
else
{
sub_1005E0E48(34, 149, 65, (__int64)"v3_ia5.c", 88);
return nullptr;
}
return v4;
}