//
// -[AppController applicationDidFinishLaunching:] from 0x100007470 to 0x1000077fb (907 bytes)
//
// 1 xrefs:
// > ??> @ 0x100998d98
//
// 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
//
void __cdecl -[AppController applicationDidFinishLaunching:](AppController *self, SEL a2, id a3)
{
AppControllerManager *v4; // rax
int v5; // r14d
CCWindow *v6; // rax
__int64 v7; // r8
__int64 v8; // r9
CCWindow *v9; // rax
__int64 v10; // r8
__int64 v11; // r9
CGPoint origin; // xmm0
CGSize size; // xmm1
id v14; // rax
id v15; // rax
id v16; // r14
EAGLView *v17; // rax
__int64 v18; // rcx
__int64 v19; // r8
__int64 v20; // r9
EAGLView *v21; // r14
__int64 v22; // rax
cocos2d::CCApplication *v23; // rax
__int64 v24; // rcx
__int64 v25; // r8
__int64 v26; // r9
GameManager *v27; // rax
_BYTE v28[24]; // [rsp+20h] [rbp-A0h] BYREF
double v29; // [rsp+38h] [rbp-88h]
__m128d v30; // [rsp+40h] [rbp-80h]
__m64 v31; // [rsp+58h] [rbp-68h] BYREF
__int128 v32; // [rsp+60h] [rbp-60h]
__int128 v33; // [rsp+70h] [rbp-50h]
__int128 v34; // [rsp+80h] [rbp-40h] BYREF
__int64 v35; // [rsp+90h] [rbp-30h]
GameManager::sharedState();
self->designSize_ = (CGSize)xmmword_100815130;
*(_WORD *)&self->shouldClose_ = 0;
*(_WORD *)&self->_liveResizing = 0;
self->_mouseDown = 0;
self->_mouseEnabled = 1;
v4 = +[AppControllerManager sharedInstance](&OBJC_CLASS___AppControllerManager, "sharedInstance");
-[AppControllerManager setController:](v4, "setController:", self);
v5 = (unsigned int)GameManager::sharedState();
GameManager::sharedState();
GameManager::resolutionForKey((GameManager *)&v31, v5);
self->windowedSize_.origin = 0;
v30 = _mm_cvtps_pd(v31);
self->windowedSize_.size = (CGSize)v30;
v6 = objc_alloc(&OBJC_CLASS___CCWindow);
v9 = -[CCWindow initWithFrame:fullscreen:borderless:](
v6,
"initWithFrame:fullscreen:borderless:",
0,
0,
v7,
v8,
*(_QWORD *)&self->windowedSize_.origin.x,
*(_QWORD *)&self->windowedSize_.origin.y,
*(_QWORD *)&self->windowedSize_.size.width,
*(_QWORD *)&self->windowedSize_.size.height);
self->_window = v9;
-[CCWindow setContentAspectRatio:](v9, "setContentAspectRatio:", v30.f64[0], _mm_unpackhi_pd(v30, v30).f64[0]);
-[CCWindow setMinSize:](self->_window, "setMinSize:", 240.0, 160.0);
v32 = 0;
v33 = xmmword_100815140;
objc_msgSend_stret(
v28,
(SEL)&OBJC_CLASS___NSWindow,
"contentRectForFrameRect:styleMask:",
15,
v10,
v11,
0,
0,
0x4059000000000000LL,
0x4059000000000000LL);
self->_menuBarHeight = 100.0 - v29;
origin = self->windowedSize_.origin;
size = self->windowedSize_.size;
self->_savedSize.origin = origin;
self->_savedSize.size = size;
self->originalWinFrame_.size = size;
self->originalWinFrame_.origin = origin;
v34 = xmmword_1008151B0;
v35 = 8;
v14 = objc_alloc((Class)&OBJC_CLASS___NSOpenGLPixelFormat);
v15 = objc_msgSend(v14, "initWithAttributes:", &v34);
v16 = objc_autorelease(v15);
v17 = objc_alloc(&OBJC_CLASS___EAGLView);
v32 = 0;
v33 = (__int128)v30;
HIDWORD(origin.x) = 0;
v21 = -[EAGLView initWithFrame:pixelFormat:](
v17,
"initWithFrame:pixelFormat:",
v16,
v18,
v19,
v20,
0,
0,
*(_OWORD *)&v30);
self->glView = v21;
-[CCWindow backingScaleFactor](self->_window, "backingScaleFactor");
*(float *)&origin.x = 0.0;
-[EAGLView setBackingScaleFactor:](v21, "setBackingScaleFactor:", origin.x);
-[CCWindow becomeFirstResponder](self->_window, "becomeFirstResponder");
-[CCWindow setContentView:](self->_window, "setContentView:", self->glView);
-[CCWindow setTitle:](self->_window, "setTitle:", CFSTR("Geometry Dash"));
-[CCWindow makeKeyAndOrderFront:](self->_window, "makeKeyAndOrderFront:", self);
-[CCWindow setAcceptsMouseMovedEvents:](self->_window, "setAcceptsMouseMovedEvents:", 1);
-[CCWindow setDelegate:](self->_window, "setDelegate:", self);
-[CCWindow setCollectionBehavior:](self->_window, "setCollectionBehavior:", 128);
-[CCWindow setAnimationBehavior:](self->_window, "setAnimationBehavior:", 2);
-[CCWindow setOpaque:](self->_window, "setOpaque:", 1);
v22 = sub_100606910();
if ( !(unsigned __int8)sub_100606B70(v22) )
exit(0);
self->_isControllerConnected = 0;
-[EAGLView lockOpenGLContext](self->glView, "lockOpenGLContext");
v23 = cocos2d::CCApplication::sharedApplication();
cocos2d::CCApplication::run(v23);
-[EAGLView unlockOpenGLContext](self->glView, "unlockOpenGLContext");
-[AppController handleWindowResize:Center:](
self,
"handleWindowResize:Center:",
0,
v24,
v25,
v26,
*(_QWORD *)&self->windowedSize_.origin.x,
*(_QWORD *)&self->windowedSize_.origin.y,
*(_QWORD *)&self->windowedSize_.size.width,
*(_QWORD *)&self->windowedSize_.size.height);
-[AppController centerWindow](self, "centerWindow");
v27 = GameManager::sharedState();
if ( !GameManager::getGameVariable(v27, "0025") )
-[AppController toggleFullScreenOn](self, "toggleFullScreenOn");
}