//
// cocos2d::CCDirector::init from 0xd48a48 to 0xd48c94 (588 bytes)
//
// 4 xrefs:
// > cocos2d::CCDirector::sharedDirector @ 0xd48cf4
// > ??> @ 0x973a8
// > ??> @ 0x15167a0
// > ??> @ 0x15168d0
//
// 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 13:07:36 +0000
//
__int64 __fastcall cocos2d::CCDirector::init(cocos2d::CCDirector *this)
{
cocos2d::CCArray *v2; // x20
__int64 v3; // x0
cocos2d::CCScheduler *v4; // x20
cocos2d::CCScheduler *v5; // x0
__int64 v6; // x20
cocos2d::CCKeypadDispatcher *v7; // x20
cocos2d::CCKeyboardDispatcher *v8; // x20
cocos2d::CCMouseDispatcher *v9; // x20
cocos2d::CCAccelerometer *v10; // x20
cocos2d::CCPoolManager *v11; // x0
cocos2d::CCPoolManager *v12; // x0
cocos2d::CCObject *v14; // [xsp+48h] [xbp+48h]
float v15; // [xsp+50h] [xbp+50h] BYREF
cocos2d::CCDirector::setDefaultValues(this);
*((_QWORD *)this + 34) = 0;
*((_QWORD *)this + 35) = 0;
*((_QWORD *)this + 12) = 0;
*((_QWORD *)this + 43) = 0;
v2 = (cocos2d::CCArray *)operator new(0x40u);
cocos2d::CCArray::CCArray(v2);
*((_QWORD *)this + 37) = v2;
cocos2d::CCArray::init(v2);
*((_QWORD *)this + 44) = 0;
*((_BYTE *)this + 404) = 0;
*((_QWORD *)this + 29) = 0;
*((_QWORD *)this + 30) = 0;
*((_QWORD *)this + 31) = 0;
*((_DWORD *)this + 66) = 0;
*((_DWORD *)this + 65) = 0;
*((_DWORD *)this + 55) = 0;
*((_DWORD *)this + 56) = 0;
*((_DWORD *)this + 57) = 0;
*((_DWORD *)this + 43) = 0;
*((_DWORD *)this + 42) = 0;
*((_QWORD *)this + 42) = operator new[](0x10u);
v3 = operator new(0x10u);
*(_QWORD *)v3 = 0;
*(_DWORD *)(v3 + 8) = 0;
*((_QWORD *)this + 38) = v3;
*((_BYTE *)this + 176) = 0;
*((_BYTE *)this + 177) = 0;
*((_BYTE *)this + 178) = 0;
*((_DWORD *)this + 45) = 0;
*((_QWORD *)this + 47) = 0;
*((_BYTE *)this + 368) = 0;
*((_BYTE *)this + 405) = 0;
*((_BYTE *)this + 256) = 0;
*((_BYTE *)this + 184) = 0;
*((_DWORD *)this + 67) = 0;
cocos2d::CCSize::operator=((float *)this + 80, flt_15600F0);
*((_QWORD *)this + 24) = 0;
*((float *)this + 82) = 1.0;
v4 = (cocos2d::CCScheduler *)operator new(0x80u);
cocos2d::CCScheduler::CCScheduler(v4);
*((_QWORD *)this + 13) = v4;
v14 = (cocos2d::CCObject *)operator new(0x50u);
cocos2d::CCActionManager::CCActionManager(v14);
v5 = *((cocos2d::CCScheduler **)this + 13);
*((_QWORD *)this + 14) = v14;
cocos2d::CCScheduler::scheduleUpdateForTarget(v5, v14, 0x80000000, 0);
v6 = operator new(0xA8u);
cocos2d::CCObject::CCObject(v6);
*(_QWORD *)(v6 + 64) = 0;
*(_QWORD *)(v6 + 72) = 0;
*(_QWORD *)v6 = &off_15319A0;
*(_QWORD *)(v6 + 56) = off_1531A20;
*(_QWORD *)(v6 + 88) = 0;
*(_DWORD *)(v6 + 128) = -500;
*(_QWORD *)(v6 + 96) = 0;
*(_DWORD *)(v6 + 124) = 0;
*(_QWORD *)(v6 + 136) = 0;
*(_QWORD *)(v6 + 144) = 0;
*(_QWORD *)(v6 + 152) = 0;
*(_DWORD *)(v6 + 160) = 0;
*((_QWORD *)this + 15) = v6;
cocos2d::CCTouchDispatcher::init((cocos2d::CCTouchDispatcher *)v6);
v7 = (cocos2d::CCKeypadDispatcher *)operator new(0x58u);
cocos2d::CCKeypadDispatcher::CCKeypadDispatcher(v7);
*((_QWORD *)this + 16) = v7;
v8 = (cocos2d::CCKeyboardDispatcher *)operator new(0x90u);
cocos2d::CCKeyboardDispatcher::CCKeyboardDispatcher(v8);
*((_QWORD *)this + 17) = v8;
v9 = (cocos2d::CCMouseDispatcher *)operator new(0x58u);
cocos2d::CCMouseDispatcher::CCMouseDispatcher(v9);
*((_QWORD *)this + 18) = v9;
*((_QWORD *)this + 19) = 0;
v10 = (cocos2d::CCAccelerometer *)operator new(0x28u);
v11 = (cocos2d::CCPoolManager *)cocos2d::CCAccelerometer::CCAccelerometer(v10);
*((_QWORD *)this + 20) = v10;
v12 = cocos2d::CCPoolManager::sharedPoolManager(v11);
cocos2d::CCPoolManager::push(v12);
*((_QWORD *)this + 45) = 0;
*((_DWORD *)this + 100) = 0;
cocos2d::CCSize::CCSize(&v15, 480.0, 320.0);
cocos2d::CCSize::operator=((float *)this + 96, &v15);
return 1;
}