//
// GJBaseGameLayer::loadGroupParentsFromString from 0x140224860 to 0x1402249f7 (407 bytes)
//
// 3 xrefs:
// > GameObject::objectFromVector @ 0x14019db42
// > GameObject::objectFromVector @ 0x14019db9f
// > ??> @ 0x1406cd764
//
// 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
//
// Hidden C++ exception states: #wind=1
void __fastcall GJBaseGameLayer::loadGroupParentsFromString(GJBaseGameLayer *a1, GameObject *a2, char *a3)
{
unsigned __int64 v6; // rsi
unsigned __int64 v7; // rbp
char *v8; // r14
unsigned __int64 v9; // r15
size_t v10; // r8
char *v11; // rcx
_BYTE *v12; // rax
__int64 v13; // rcx
__int64 v14; // rdi
size_t v15; // r8
size_t v16; // rsi
_QWORD *v17; // rax
const char *v18; // rcx
int v19; // esi
char *v20; // rcx
char *String[2]; // [rsp+30h] [rbp-68h] BYREF
__int64 v22; // [rsp+40h] [rbp-58h]
unsigned __int64 v23; // [rsp+48h] [rbp-50h]
v6 = *((_QWORD *)a3 + 2);
if ( v6 )
{
v7 = 0;
v8 = a3;
v9 = *((_QWORD *)a3 + 3);
if ( v9 > 0xF )
v8 = *(char **)a3;
v10 = *((_QWORD *)a3 + 2);
v11 = v8;
LABEL_5:
v12 = memchr(v11, 46, v10);
if ( v12 )
{
v14 = v12 - v8;
goto LABEL_8;
}
while ( 1 )
{
v14 = -1;
LABEL_8:
*(_OWORD *)String = 0;
v22 = 0;
v23 = 0;
if ( v6 < v7 )
sub_14003BCC0(v13);
v15 = v14 - v7;
v16 = v6 - v7;
if ( v16 < v14 - v7 )
v15 = v16;
v17 = a3;
if ( v9 > 0xF )
v17 = *(_QWORD **)a3;
sub_14003A930(String, (char *)v17 + v7, v15);
v18 = (const char *)String;
if ( v23 > 0xF )
v18 = String[0];
v19 = atoi(v18);
if ( v23 > 0xF )
{
v20 = String[0];
if ( v23 + 1 >= 0x1000 )
{
v20 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v20 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v20);
}
GJBaseGameLayer::setGroupParent(a1, a2, v19);
if ( v14 == -1 )
break;
v7 = v14 + 1;
v8 = a3;
v9 = *((_QWORD *)a3 + 3);
if ( v9 > 0xF )
v8 = *(char **)a3;
v6 = *((_QWORD *)a3 + 2);
if ( v7 < v6 )
{
v10 = v6 - v7;
v11 = &v8[v7];
goto LABEL_5;
}
}
}
sub_14003A830((__int64)a3);
}