//
// CreatorLayer::dCreatorLayer from 0x140135400 to 0x14013550d (269 bytes)
//
// 3 xrefs:
// > sub_1401399BC @ 0x1401399c3
// > ??> @ 0x140737968
// > ??> @ 0x1409170f0
//
// 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:04 +0000
//
// Hidden C++ exception states: #wind=1
char *__fastcall CreatorLayer::dCreatorLayer(char *Block, char a2)
{
char *v4; // rdi
__int64 v5; // rax
void *v6; // rax
*(_QWORD *)Block = &CreatorLayer::`vftable';
*((_QWORD *)Block + 40) = &CreatorLayer::`vftable';
*((_QWORD *)Block + 41) = &CreatorLayer::`vftable';
*((_QWORD *)Block + 42) = &CreatorLayer::`vftable';
*((_QWORD *)Block + 43) = &CreatorLayer::`vftable';
*((_QWORD *)Block + 44) = &CreatorLayer::`vftable';
*((_QWORD *)Block + 51) = &CreatorLayer::`vftable';
*((_QWORD *)Block + 52) = &CreatorLayer::`vftable';
v4 = Block + 424;
*((_QWORD *)Block + 53) = &CreatorLayer::`vftable';
v5 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v6 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v6);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v5 = *(_QWORD *)&qword_14090BFB0;
}
if ( *(char **)(v5 + 1568) == v4 )
*(_QWORD *)(v5 + 1568) = 0;
cocos2d::CCLayer::~CCLayer((cocos2d::CCLayer *)Block);
if ( (a2 & 1) != 0 )
j_j_free(Block);
return Block;
}