//
// GJBaseGameLayer::loadGroupParentsFromString from 0x10013dc90 to 0x10013de54 (452 bytes)
//
// 1 xrefs:
// > GameObject::objectFromVector @ 0x1005c0660
//
// 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 GJBaseGameLayer::loadGroupParentsFromString(
GJBaseGameLayer *a1,
GameObject *a2,
const std::string *a3,
double a4)
{
const std::string *v4; // r12
unsigned int v5; // eax
std::string::size_type v6; // r13
std::string::size_type v7; // rcx
unsigned int v8; // r14d
std::string::size_type size; // r14
std::string::pointer v10; // r15
size_t v11; // r14
char *v12; // rbx
int v13; // ebx
size_t v14; // r12
char *v15; // r14
std::string::size_type v16; // [rsp+8h] [rbp-68h]
char *data; // [rsp+20h] [rbp-50h]
const std::string *v18; // [rsp+28h] [rbp-48h]
char __dst[8]; // [rsp+30h] [rbp-40h] BYREF
size_t v20; // [rsp+38h] [rbp-38h]
char *v21; // [rsp+40h] [rbp-30h]
v4 = a3;
v5 = (unsigned int)a3->__r_.__value_.__l.0;
if ( (v5 & 1) == 0 )
{
if ( !(v5 >> 1) )
return;
goto LABEL_5;
}
if ( a3->__r_.__value_.__l.__size_ )
{
LABEL_5:
v6 = 0;
v7 = std::string::find(a3, 46, 0);
data = v4->__r_.__value_.__s.__data_;
v18 = v4;
v8 = (unsigned int)v4->__r_.__value_.__l.0;
if ( (v8 & 1) != 0 )
goto LABEL_8;
LABEL_6:
size = v8 >> 1;
v10 = data;
if ( v6 > size )
LABEL_26:
sub_1000547C0();
while ( 1 )
{
v11 = size - v6;
if ( v11 >= v7 - v6 )
v11 = v7 - v6;
if ( v11 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(a4);
v16 = v7;
if ( v11 >= 0x17 )
{
v14 = (v11 | 7) + 1;
if ( (v11 | 7) == 0x17 )
v14 = 26;
v12 = (char *)operator new(v14);
v21 = v12;
*(_QWORD *)__dst = v14 + 1;
v4 = v18;
v20 = v11;
}
else
{
__dst[0] = 2 * v11;
v12 = &__dst[1];
if ( !v11 )
{
__dst[1] = 0;
if ( (__dst[0] & 1) == 0 )
goto LABEL_16;
goto LABEL_21;
}
}
memmove(v12, &v10[v6], v11);
v12[v11] = 0;
if ( (__dst[0] & 1) == 0 )
{
LABEL_16:
v13 = atoi(&__dst[1]);
goto LABEL_22;
}
LABEL_21:
v15 = v21;
v13 = atoi(v21);
operator delete(v15);
LABEL_22:
GJBaseGameLayer::setGroupParent(a1, a2, v13);
if ( v16 == -1 )
return;
v6 = v16 + 1;
v7 = std::string::find(v4, 46, v16 + 1);
v8 = (unsigned int)v4->__r_.__value_.__l.0;
if ( (v8 & 1) == 0 )
goto LABEL_6;
LABEL_8:
size = v4->__r_.__value_.__l.__size_;
if ( size < v6 )
goto LABEL_26;
v10 = v4->__r_.__value_.__l.__data_;
}
}
}