//
// AppDelegate::applicationDidFinishLaunching from 0x140082a40 to 0x140082d88 (840 bytes)
//
// 2 xrefs:
// > ??> @ 0x14053c538
// > ??> @ 0x1406c6a50
//
// 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=7
bool AppDelegate::applicationDidFinishLaunching(AppDelegate *a1)
{
__int64 v2; // rcx
cocos2d::CCDirector *v3; // rdi
__int64 v4; // rax
GJObjectDecoder *v5; // rbx
__int64 v6; // rax
ObjectDecoderDelegate *v7; // rcx
GameManager *v8; // rcx
bool GameVariable; // bl
__int64 v10; // rdx
__int64 v11; // rcx
cocos2d::CCApplication *v12; // rax
GameManager *v13; // rcx
bool v14; // bl
__int64 v15; // rdx
__int64 v16; // rcx
GameManager *v17; // rcx
bool v18; // bl
__int64 v19; // rdx
__int64 v20; // rcx
__int64 v21; // rcx
__int64 v22; // rbx
__int64 v23; // rax
__int64 v24; // rax
struct cocos2d::CCScene *v25; // rax
__int128 v27; // [rsp+40h] [rbp-38h] BYREF
__int64 v28; // [rsp+50h] [rbp-28h]
__int64 v29; // [rsp+58h] [rbp-20h]
int v30; // [rsp+80h] [rbp+8h] BYREF
int v31; // [rsp+84h] [rbp+Ch]
__int128 *v32; // [rsp+88h] [rbp+10h]
BYTE1(a1[1].m_saveTime) = 0;
cocos2d::gettimeofday((cocos2d *)&v30, nullptr);
srand(v31 * v30);
v3 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v2);
v32 = &v27;
v27 = 0;
v28 = 0;
v29 = 15;
*(_QWORD *)&v27 = sub_14003AA10(0x30u);
v28 = 36;
v29 = 47;
strcpy((char *)v27, "/data/data/com.robtopx.geometryjump/");
v4 = cocos2d::CCFileUtils::sharedFileUtils();
cocos2d::CCFileUtils::setAndroidPath(v4, &v27);
a1->cocos2d::CCApplication::cocos2d::CCApplicationProtocol::__vftable[1].applicationDidFinishLaunching(a1);
cocos2d::CCDirector::setProjection(v3, kCCDirectorProjection2D);
CCContentManager::sharedManager();
v5 = GJObjectDecoder::sharedDecoder();
v6 = ObjectDecoder::sharedDecoder();
v7 = &v5->ObjectDecoderDelegate;
if ( !v5 )
v7 = nullptr;
*(_QWORD *)(v6 + 320) = v7;
if ( !qword_1406C2ED8 )
{
v32 = (__int128 *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v32);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
}
LocalLevelManager::sharedState();
v8 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v32 = (__int128 *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v32);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v8 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v32 = (__int128 *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v32);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v8 = (GameManager *)qword_1406C2ED8;
}
}
GameVariable = GameManager::getGameVariable(v8, "0030");
v12 = (cocos2d::CCApplication *)cocos2d::CCApplication::sharedApplication(v11, v10);
cocos2d::CCApplication::toggleVerticalSync(v12, GameVariable);
v13 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v32 = (__int128 *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v32);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v13 = (GameManager *)qword_1406C2ED8;
}
v14 = GameManager::getGameVariable(v13, "0032");
*(_BYTE *)(cocos2d::CCApplication::sharedApplication(v16, v15) + 199) = v14;
v17 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v32 = (__int128 *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v32);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v17 = (GameManager *)qword_1406C2ED8;
}
v18 = GameManager::getGameVariable(v17, "0023");
*(_BYTE *)(cocos2d::CCApplication::sharedApplication(v20, v19) + 200) = v18;
v22 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v32 = (__int128 *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v32);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v22 = qword_1406C2ED8;
}
v23 = cocos2d::CCDirector::sharedDirector(v21);
v24 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 112LL))(v23);
cocos2d::CCScheduler::scheduleSelector(v24, sub_14018B4F0, v22);
a1[2].m_resourceRootPath.m_data.m_smallStorage._Elems[4] = 0;
cocos2d::CCDirector::setDepthTest(v3, 0);
((void (__fastcall *)(cocos2d::CCDirector *))v3->setAnimationInterval)(v3);
v3->m_bDisplayStats = 1;
a1[2].m_resourceRootPath.m_data.m_smallStorage._Elems[2] = 0;
v25 = LoadingLayer::scene(0);
cocos2d::CCDirector::runWithScene(v3, v25);
return 1;
}