//
// GameObject::createGroupContainer from 0x140299700 to 0x1402997d0 (208 bytes)
//
// 4 xrefs:
// > GameObject::loadGroupsFromString @ 0x140299b9c
// > ??> @ 0x1408af5a4
// > ??> @ 0x1408af5b4
// > ??> @ 0x14091d714
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:29:11 +0000
//
void __fastcall GameObject::createGroupContainer(__int64 a1, int a2)
{
char *v2; // rbx
__int64 v3; // rdi
__int64 v4; // rsi
char *v5; // rax
char *v6; // r9
int v7; // r8d
char *v8; // rax
int v9; // edi
int v10; // eax
char *v11; // rdi
unsigned __int64 i; // rcx
__int64 j; // rax
v2 = (char *)(a1 + 1168);
v3 = a2;
if ( !*(_QWORD *)(a1 + 1168) )
{
v4 = a2;
v5 = (char *)operator new(saturated_mul(a2, 2u));
*(_QWORD *)v2 = v5;
v6 = v5;
v7 = 0;
if ( (int)v3 >= 8 )
{
v8 = &v5[2 * v3 - 2];
if ( v6 > v2 || v8 < v2 )
{
v9 = v3 & 0x7FFFFFF8;
do
v7 += 8;
while ( v7 < v9 );
v10 = v9 + 7;
v11 = v6;
for ( i = (unsigned __int64)(16LL * (v10 / 8)) >> 1; i; --i )
{
*(_WORD *)v11 = 0;
v11 += 2;
}
}
}
for ( j = v7; j < v4; *(_WORD *)(*(_QWORD *)v2 + 2 * j++) = 0 )
;
}
}