//
// CreatorLayer::onMyLevels from 0x140136aa0 to 0x140136ffc (1372 bytes)
//
// 2 xrefs:
// > CreatorLayer::init @ 0x140135eae
// > ??> @ 0x140917114
//
// 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:27:05 +0000
//
// Hidden C++ exception states: #wind=9
bool CreatorLayer::onMyLevels()
{
__int64 v0; // rbx
__int64 v1; // rsi
__int64 v2; // rbx
cocos2d::CCString *v3; // rax
int v4; // edi
void *v5; // r8
int v6; // ebx
__int64 v7; // rdi
cocos2d::CCString *v8; // rax
int v9; // edi
void *v10; // r8
__int64 v11; // rdi
cocos2d::CCString *v12; // rax
int v13; // edi
void *v14; // r8
__int64 v15; // rdi
cocos2d::CCString *v16; // rax
int v17; // edi
void *v18; // r8
struct cocos2d::CCScene *v19; // rbx
__int64 v20; // rcx
__int64 v21; // rax
struct cocos2d::CCScene *v22; // rbx
__int64 v23; // rcx
cocos2d::CCDirector *v24; // rax
void *v26; // [rsp+30h] [rbp-19h]
void *v27; // [rsp+30h] [rbp-19h]
void *v28; // [rsp+30h] [rbp-19h]
void *v29; // [rsp+30h] [rbp-19h]
void *v30; // [rsp+30h] [rbp-19h]
void *Src[2]; // [rsp+38h] [rbp-11h] BYREF
__int64 v32; // [rsp+48h] [rbp-1h]
unsigned __int64 v33; // [rsp+50h] [rbp+7h]
void *Block[2]; // [rsp+58h] [rbp+Fh] BYREF
__int64 v35; // [rsp+68h] [rbp+1Fh]
unsigned __int64 v36; // [rsp+70h] [rbp+27h]
void *v37[2]; // [rsp+78h] [rbp+2Fh] BYREF
__int64 v38; // [rsp+88h] [rbp+3Fh]
unsigned __int64 v39; // [rsp+90h] [rbp+47h]
v0 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v26 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v26);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v0 = qword_14090BFD0;
}
if ( *(_DWORD *)(v0 + 1296) != 102
|| (unsigned __int8)GameManager::getGameVariable(v0, "0218")
|| (unsigned __int8)GameManager::getGameVariable(v0, "0219")
|| (unsigned __int8)GameManager::getGameVariable(v0, "0077") )
{
v1 = GJSearchObject::create_2(98);
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v27 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v27);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
*(_OWORD *)Block = 0;
v35 = 3;
v36 = 15;
LODWORD(Block[0]) = 6256231;
sub_140044D80(Block, "0091", 4u);
v3 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v2 + 432), Block);
v4 = cocos2d::CCString::intValue(v3);
if ( v36 > 0xF )
{
v5 = Block[0];
if ( v36 + 1 >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v5);
}
v6 = 0;
v35 = 0;
v36 = 15;
LOBYTE(Block[0]) = 0;
if ( v4 > 999 )
goto LABEL_24;
v7 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v28 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v28);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v7 = qword_14090BFD0;
}
*(_OWORD *)Src = 0;
v32 = 3;
v33 = 15;
LODWORD(Src[0]) = 6256231;
sub_140044D80(Src, "0091", 4u);
v8 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v7 + 432), Src);
v9 = cocos2d::CCString::intValue(v8);
if ( v33 > 0xF )
{
v10 = Src[0];
if ( v33 + 1 >= 0x1000 )
{
v10 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v10 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v10);
}
v32 = 0;
v33 = 15;
LOBYTE(Src[0]) = 0;
if ( v9 >= 0 )
{
LABEL_24:
v11 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v29 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v29);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v11 = qword_14090BFD0;
}
*(_OWORD *)v37 = 0;
v38 = 3;
v39 = 15;
LODWORD(v37[0]) = 6256231;
sub_140044D80(v37, "0091", 4u);
v12 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v11 + 432), v37);
v13 = cocos2d::CCString::intValue(v12);
if ( v39 > 0xF )
{
v14 = v37[0];
if ( v39 + 1 >= 0x1000 )
{
v14 = *((void **)v37[0] - 1);
if ( (unsigned __int64)((char *)v37[0] - (char *)v14 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v14);
}
v38 = 0;
v39 = 15;
LOBYTE(v37[0]) = 0;
if ( v13 <= 999 )
{
v15 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v30 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v30);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v15 = qword_14090BFD0;
}
*(_OWORD *)Src = 0;
v32 = 3;
v33 = 15;
LODWORD(Src[0]) = 6256231;
sub_140044D80(Src, "0091", 4u);
v16 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v15 + 432), Src);
v17 = cocos2d::CCString::intValue(v16);
if ( v33 > 0xF )
{
v18 = Src[0];
if ( v33 + 1 >= 0x1000 )
{
v18 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v18 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v18);
}
v6 = v17;
}
else
{
v6 = 999;
}
}
*(_DWORD *)(v1 + 452) = v6;
}
else
{
v1 = GJSearchObject::create_2(102);
}
v19 = (struct cocos2d::CCScene *)cocos2d::CCScene::create();
*(_QWORD *)(cocos2d::CCApplication::sharedApplication(v20) + 232) = v19;
v21 = LevelBrowserLayer::create(v1);
(*(void (__fastcall **)(struct cocos2d::CCScene *, __int64))(*(_QWORD *)v19 + 464LL))(v19, v21);
v22 = cocos2d::CCTransitionFade::create(0.5, v19);
v24 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v23);
return cocos2d::CCDirector::pushScene(v24, v22);
}