//
// sub_1001BAE70 from 0x1001bae70 to 0x1001baed3 (99 bytes)
//
// 10 xrefs:
// > EffectGameObject::triggerObject @ 0x1001b97d6
// > EffectGameObject::triggerObject @ 0x1001b9870
// > EffectGameObject::triggerObject @ 0x1001b9d67
// > EffectGameObject::triggerObject @ 0x1001b9dc4
// > EffectGameObject::triggerObject @ 0x1001b9f6e
// > EffectGameObject::triggerObject @ 0x1001b9fb3
// > EffectGameObject::triggerObject @ 0x1001ba160
// > EffectGameObject::triggerObject @ 0x1001ba221
// > EffectGameObject::triggerObject @ 0x1001ba2cb
// > EffectGameObject::triggerObject @ 0x1001ba504
//
// 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
//
void __fastcall sub_1001BAE70(__int64 a1, __int64 a2)
{
const void *v2; // r14
signed __int64 v3; // r15
char *v4; // rax
char *v5; // r12
*(_OWORD *)a1 = 0;
*(_QWORD *)(a1 + 16) = 0;
v2 = *(const void **)a2;
v3 = *(_QWORD *)(a2 + 8) - *(_QWORD *)a2;
if ( v3 )
{
if ( v3 < 0 )
sub_1000C40D0();
v4 = (char *)operator new(v3);
*(_QWORD *)a1 = v4;
*(_QWORD *)(a1 + 8) = v4;
v5 = &v4[v3];
*(_QWORD *)(a1 + 16) = &v4[v3];
memcpy(v4, v2, v3);
*(_QWORD *)(a1 + 8) = v5;
}
}