//
// GameLevelManager::verifyContainerOnlyHasLevels from 0x10054f750 to 0x10054f990 (576 bytes)
//
// 1 xrefs:
// > GameLevelManager::dataLoaded @ 0x10054fe42
//
// 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 12:32:02 +0000
//
bool __fastcall GameLevelManager::verifyContainerOnlyHasLevels(__int64 a1, __int64 a2)
{
__int64 v2; // r14
float *v3; // rbx
const void *v4; // rdi
__int64 v5; // r13
size_t v6; // rax
size_t v7; // r12
char *v8; // r13
float *v9; // r15
size_t v10; // rbx
void *v11; // rbx
void **v12; // rbx
void *v13; // r14
void *v14; // rdi
void **v16; // r15
__int64 v17; // [rsp+0h] [rbp-80h]
void *v18[2]; // [rsp+10h] [rbp-70h] BYREF
void *v19[2]; // [rsp+20h] [rbp-60h]
int v20; // [rsp+30h] [rbp-50h]
__int128 __dst; // [rsp+40h] [rbp-40h] BYREF
void *__p; // [rsp+50h] [rbp-30h]
*(_OWORD *)v19 = 0;
*(_OWORD *)v18 = 0;
v20 = 1065353216;
if ( !a2 )
goto LABEL_25;
v2 = *(_QWORD *)(a2 + 56);
if ( !v2 )
goto LABEL_25;
v3 = (float *)v18;
do
{
v4 = *(const void **)(v2 + 264);
v5 = *(_QWORD *)(v2 + 288);
if ( v4
&& __dynamic_cast(
v4,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'GJGameLevel,
0) )
{
goto LABEL_4;
}
v6 = strlen((const char *)v2);
if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v7 = v6;
v17 = v5;
if ( v6 >= 0x17 )
{
v9 = v3;
v10 = (v6 | 7) + 1;
if ( (v6 | 7) == 0x17 )
v10 = 26;
v8 = (char *)operator new(v10);
__p = v8;
*(_QWORD *)&__dst = v10 | 1;
*((_QWORD *)&__dst + 1) = v7;
v3 = v9;
LABEL_14:
memmove(v8, (const void *)v2, v7);
goto LABEL_15;
}
LOBYTE(__dst) = 2 * v6;
v8 = (char *)&__dst + 1;
if ( v6 )
goto LABEL_14;
LABEL_15:
v8[v7] = 0;
sub_1004930B0(v3, (unsigned __int8 *)&__dst, (__int64)&__dst);
v5 = v17;
if ( (__dst & 1) != 0 )
operator delete(__p);
LABEL_4:
v2 = v5;
}
while ( v5 );
v11 = v19[0];
if ( v19[0] )
{
do
{
if ( (*((_BYTE *)v11 + 16) & 1) != 0 )
{
sub_10001AD30(&__dst, *((const void **)v11 + 4), *((_QWORD *)v11 + 3));
}
else
{
__p = *((void **)v11 + 4);
__dst = *((_OWORD *)v11 + 1);
}
cocos2d::CCDictionary::removeObjectForKey(a2, (char *)&__dst);
if ( (__dst & 1) != 0 )
operator delete(__p);
v11 = *(void **)v11;
}
while ( v11 );
LABEL_25:
v12 = (void **)v19[0];
v13 = v19[1];
if ( v19[0] )
{
do
{
v16 = (void **)*v12;
if ( ((_BYTE)v12[2] & 1) != 0 )
operator delete(v12[4]);
operator delete(v12);
v12 = v16;
}
while ( v16 );
}
v14 = v18[0];
v18[0] = nullptr;
if ( v14 )
LABEL_27:
operator delete(v14);
}
else
{
v13 = v19[1];
v14 = v18[0];
v18[0] = nullptr;
if ( v14 )
goto LABEL_27;
}
return v13 == nullptr;
}