//
// GameLevelOptionsLayer::create from 0x1403aa2b0 to 0x1403aa5e8 (824 bytes)
//
// 3 xrefs:
// > EditLevelLayer::onLevelOptions @ 0x140179cab
// > LevelInfoLayer::onLevelOptions @ 0x1404245a7
// > ??> @ 0x1409239a8
//
// 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:31:20 +0000
//
// Hidden C++ exception states: #wind=2
cocos2d::CCObject *__fastcall GameLevelOptionsLayer::create(cocos2d::CCObject *a1)
{
cocos2d::CCObject *v2; // r14
int v3; // r9d
__int64 v4; // rcx
__int64 v5; // rax
__int64 *v6; // rsi
__int64 v7; // rdi
__int64 v8; // rbx
__int64 v9; // rax
__int64 v10; // rax
_WORD v12[8]; // [rsp+20h] [rbp-40h] BYREF
__int64 v13; // [rsp+30h] [rbp-30h]
__int64 v14; // [rsp+38h] [rbp-28h]
__int128 v15; // [rsp+40h] [rbp-20h] BYREF
__int64 v16; // [rsp+50h] [rbp-10h]
__int64 v17; // [rsp+58h] [rbp-8h]
cocos2d::CCObject *v18; // [rsp+98h] [rbp+38h] BYREF
__int128 *v19; // [rsp+A0h] [rbp+40h] BYREF
char v20; // [rsp+A8h] [rbp+48h] BYREF
v2 = (cocos2d::CCObject *)operator new(0x480u);
v18 = v2;
GJOptionsLayer::GJOptionsLayer((__int64)v2);
*(_QWORD *)v2 = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 40) = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 41) = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 42) = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 43) = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 44) = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 51) = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 54) = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 68) = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 83) = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 84) = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 142) = &GameLevelOptionsLayer::`vftable';
*((_QWORD *)v2 + 143) = 0;
*((_DWORD *)v2 + 250) = 1110704128;
*((_DWORD *)v2 + 255) = 1053609165;
if ( a1 )
{
*((_QWORD *)v2 + 143) = a1;
cocos2d::CCObject::retain(a1);
}
if ( GJOptionsLayer::init((__int64)v2, 2, 280.0, v3) )
{
*((_BYTE *)v2 + 744) = 1;
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v2 + 1096LL))(v2);
v5 = cocos2d::CCDirector::sharedDirector(v4);
cocos2d::CCDirector::getWinSize(v5, &v18);
v19 = &v15;
v15 = 0;
v16 = 0;
v17 = 0;
*(_QWORD *)&v15 = sub_14003D460(0xB0u);
v16 = 171;
v17 = 175;
strcpy(
(char *)v15,
"Adjust visual and gameplay settings for this level. These changes only affect how you experience t"
"he level and do not impact other players.");
v12[7] = 0;
v13 = 13;
v14 = 15;
strcpy((char *)v12, "Level Options");
v6 = (__int64 *)InfoAlertButton::create(v12, &v15);
(*(void (__fastcall **)(_QWORD, __int64 *))(**((_QWORD **)v2 + 69) + 464LL))(*((_QWORD *)v2 + 69), v6);
v7 = *v6;
v8 = *((_QWORD *)v2 + 69);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v19,
(float)((float)(*((float *)v2 + 183) * 0.5) + (float)(*(float *)&v18 * 0.5)) - 18.0,
(float)((float)(*((float *)v2 + 184) * 0.5) + (float)(*((float *)&v18 + 1) * 0.5)) - 18.0);
cocos2d::CCNode::convertToNodeSpace(v8, &v20, v9);
(*(void (__fastcall **)(__int64 *, __int64))(v7 + 184))(v6, v10);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v2 + 1136LL))(v2);
*((_BYTE *)v2 + 744) = 0;
cocos2d::CCObject::autorelease(v2);
return v2;
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v2 + 8LL))(v2, 1);
return nullptr;
}
}