//
// AppDelegate::applicationDidFinishLaunching from 0x6e68c0 to 0x6e6b68 (680 bytes)
//
// 2 xrefs:
// > ??> @ 0xd76c8
// > ??> @ 0x14251f0
//
// This function is hookable on this platform (idp: arm, 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:51:43 +0000
//
__int64 __fastcall AppDelegate::applicationDidFinishLaunching(AppDelegate *this)
{
cocos2d::CCFileUtils *v2; // x19
__int64 v3; // x23
__int64 v4; // x20
void *v5; // x27
__int64 v6; // x24
unsigned __int64 v7; // x26
__int64 v8; // x28
__int64 v9; // x1
__int64 v10; // x1
CCContentManager *v11; // x0
ObjectDecoder *v12; // x0
GJObjectDecoder *v13; // x23
__int64 v14; // x0
bool v15; // zf
GameManager *v16; // x0
LocalLevelManager *v17; // x0
LocalLevelManager *v18; // x0
LocalLevelManager *v19; // x0
GameManager *v20; // x0
GameManager *v21; // x0
GameManager *VideoSettings; // x0
GameManager *v23; // x0
PlatformToolbox *v24; // x0
float v25; // s0
AdToolbox *v26; // x0
bool v27; // w1
cocos2d::CCScene *v28; // x0
char v30; // w0
__int64 v31; // x0
struct timeval tv; // [xsp+60h] [xbp+60h] BYREF
_QWORD v33[3]; // [xsp+70h] [xbp+70h] BYREF
*((_BYTE *)this + 17) = 0;
gettimeofday(&tv, nullptr);
srand(LODWORD(tv.tv_sec) * LODWORD(tv.tv_usec));
qword_155C3C0 = tv.tv_usec * tv.tv_sec;
v2 = (cocos2d::CCFileUtils *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)(tv.tv_usec * tv.tv_sec));
v3 = cocos2d::CCFileUtils::sharedFileUtils(v2);
v4 = operator new(0x30u);
v33[2] = v4;
v33[1] = 36;
v33[0] = 49;
strcpy((char *)v4, "/data/data/com.robtopx.geometryjump/");
if ( v33 == (_QWORD *)(v3 + 112) )
goto LABEL_7;
if ( (*(_BYTE *)(v3 + 112) & 1) == 0 )
{
v5 = (void *)(v3 + 113);
v6 = 48;
v7 = 22;
LABEL_4:
v8 = operator new(v6);
v9 = *(_QWORD *)(v4 + 8);
*(_QWORD *)v8 = *(_QWORD *)v4;
*(_QWORD *)(v8 + 8) = v9;
v10 = *(_QWORD *)(v4 + 24);
*(_QWORD *)(v8 + 16) = *(_QWORD *)(v4 + 16);
*(_QWORD *)(v8 + 24) = v10;
*(_DWORD *)(v8 + 32) = *(_DWORD *)(v4 + 32);
if ( v7 != 22 )
operator delete(v5);
*(_QWORD *)(v3 + 128) = v8;
*(_QWORD *)(v3 + 112) = v6 | 1;
*(_QWORD *)(v3 + 120) = 36;
*(_BYTE *)(v8 + 36) = 0;
goto LABEL_7;
}
v7 = (*(_QWORD *)(v3 + 112) & 0xFFFFFFFFFFFFFFFELL) - 1;
if ( v7 <= 0x23 )
{
v31 = 2 * v7;
v5 = *(void **)(v3 + 128);
if ( 2 * v7 < 0x24 )
v31 = 36;
v6 = (v31 + 16) & 0xFFFFFFFFFFFFFFF0LL;
goto LABEL_4;
}
*((_BYTE *)memmove(*(void **)(v3 + 128), (const void *)v4, 0x24u) + 36) = 0;
if ( (*(_BYTE *)(v3 + 112) & 1) != 0 )
{
v30 = v33[0];
*(_QWORD *)(v3 + 120) = 36;
if ( (v30 & 1) == 0 )
goto LABEL_8;
goto LABEL_15;
}
*(_BYTE *)(v3 + 112) = 72;
LABEL_7:
if ( (v33[0] & 1) == 0 )
goto LABEL_8;
LABEL_15:
operator delete((void *)v4);
LABEL_8:
AppDelegate::setupGLView(this);
v11 = (CCContentManager *)cocos2d::CCDirector::setProjection(v2, 0);
v12 = (ObjectDecoder *)CCContentManager::sharedManager(v11);
v13 = (GJObjectDecoder *)ObjectDecoder::sharedDecoder(v12);
v14 = GJObjectDecoder::sharedDecoder(v13);
v15 = v14 == 0;
v16 = (GameManager *)(v14 + 320);
if ( v15 )
v16 = nullptr;
*((_QWORD *)v13 + 40) = v16;
v17 = (LocalLevelManager *)GameManager::sharedState(v16);
v18 = (LocalLevelManager *)LocalLevelManager::sharedState(v17);
v19 = (LocalLevelManager *)LocalLevelManager::sharedState(v18);
v20 = (GameManager *)LocalLevelManager::tryRecoverAutoSaves(v19);
v21 = (GameManager *)GameManager::sharedState(v20);
VideoSettings = (GameManager *)GameManager::loadVideoSettings(v21);
v23 = (GameManager *)GameManager::sharedState(VideoSettings);
GameManager::startUpdate(v23);
cocos2d::CCDirector::getContentScaleFactor(v2);
*((_BYTE *)this + 36) = 0;
v24 = (PlatformToolbox *)cocos2d::CCDirector::setDepthTest(v2, 0);
PlatformToolbox::getDeviceRefreshRate(v24);
v26 = (AdToolbox *)(*(__int64 (__fastcall **)(cocos2d::CCFileUtils *, double))(*(_QWORD *)v2 + 96LL))(
v2,
(float)(1.0 / v25));
*((_BYTE *)v2 + 217) = 1;
*((_BYTE *)this + 34) = 0;
AdToolbox::setupAds(v26);
v28 = (cocos2d::CCScene *)LoadingLayer::scene(nullptr, v27);
cocos2d::CCDirector::runWithScene(v2, v28);
return 1;
}