//
// OptionsLayer::customSetup from 0x100112af8 to 0x100113480 (2440 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008d0958
//
// 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 10:59:09 +0000
//
__int64 __fastcall OptionsLayer::customSetup(__int64 a1)
{
__int64 v2; // x0
_QWORD *WinSize; // x0
__n128 v4; // q0
__int64 v5; // x0
__int64 v6; // x21
__int64 v7; // x0
__int64 v8; // x23
__int64 v9; // x0
__int64 v10; // x25
__int64 v11; // x0
__int64 v12; // x20
__int64 v13; // x0
__int64 v14; // x22
__int64 v15; // x0
__int64 v16; // x24
__int64 v17; // x0
__int64 v18; // x26
double v19; // d0
double v20; // d0
double v21; // d0
double v22; // d0
double v23; // d0
double v24; // d0
double v25; // d0
__int64 v26; // x0
__int64 v27; // x20
int v28; // w0
int Stat; // w23
const char *v30; // x0
__int64 v31; // x22
__int64 v32; // x21
__n128 v33; // q0
float v34; // s8
__int64 v35; // x0
__int64 v36; // x23
double v37; // d0
__int64 v38; // x23
double v39; // d0
__int64 v40; // x22
__int64 v41; // x23
float32x2_t *v42; // x24
double v43; // d0
__int64 v44; // x0
__int64 v45; // x23
__int64 v46; // x0
__n128 v47; // q0
__int64 v48; // x23
float32x2_t *v49; // x24
double v50; // d0
__int64 v51; // x24
float32x2_t *v52; // x23
double v53; // d0
__int64 v54; // x0
__int64 v55; // x23
__int64 v56; // x0
__n128 v57; // q0
__int64 v58; // x0
_QWORD *v59; // x0
__int64 v60; // x0
float32x2_t *v61; // x22
__int64 v62; // x22
void *__p[2]; // [xsp+28h] [xbp-A8h] BYREF
char v65; // [xsp+3Fh] [xbp-91h]
float32x2_t v66; // [xsp+40h] [xbp-90h] BYREF
float32x2_t v67; // [xsp+48h] [xbp-88h] BYREF
float32x2_t v68; // [xsp+50h] [xbp-80h] BYREF
float32x2_t v69; // [xsp+58h] [xbp-78h] BYREF
float v70; // [xsp+60h] [xbp-70h] BYREF
__int64 v71; // [xsp+68h] [xbp-68h] BYREF
v2 = cocos2d::CCDirector::sharedDirector(a1);
WinSize = cocos2d::CCDirector::getWinSize(&v71, v2);
*(_QWORD *)(a1 + 624) = cocos2d::CCMenu::create(WinSize);
sub_1000262BC(&v70, *(float *)&v71 * 0.5, (float)(*((float *)&v71 + 1) * 0.5) + 80.0);
cocos2d::CCNode::convertToNodeSpace(&v69, *(_QWORD *)(a1 + 624), &v70, v4);
v5 = sub_100067FD4((__int64)"Account", 130, 0, 1, 1.0);
v6 = CCMenuItemSpriteExtra::create(v5, 0, a1, sub_1001134A0, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 624) + 456LL))(*(_QWORD *)(a1 + 624), v6);
v7 = sub_100067FD4((__int64)"How To Play", 130, 0, 1, 1.0);
v8 = CCMenuItemSpriteExtra::create(v7, 0, a1, sub_1001134B0, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 624) + 456LL))(*(_QWORD *)(a1 + 624), v8);
v9 = sub_100067FD4((__int64)"Options", 130, 0, 1, 1.0);
v10 = CCMenuItemSpriteExtra::create(v9, 0, a1, OptionsLayer::onOptions, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 624) + 456LL))(*(_QWORD *)(a1 + 624), v10);
v11 = sub_100067FD4((__int64)"Rate", 78, 0, 1, 1.0);
v12 = CCMenuItemSpriteExtra::create(v11, 0, a1, sub_1001134F0, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 624) + 456LL))(*(_QWORD *)(a1 + 624), v12);
v13 = sub_100067FD4((__int64)"Songs", 78, 0, 1, 1.0);
v14 = CCMenuItemSpriteExtra::create(v13, 0, a1, sub_100113504, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 624) + 456LL))(*(_QWORD *)(a1 + 624), v14);
v15 = sub_100067FD4((__int64)"Help", 78, 0, 1, 1.0);
v16 = CCMenuItemSpriteExtra::create(v15, 0, a1, sub_100113514, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 624) + 456LL))(*(_QWORD *)(a1 + 624), v16);
v17 = sub_100067FD4((__int64)"Parental", 130, 0, 1, 1.0);
v18 = CCMenuItemSpriteExtra::create(v17, 0, a1, sub_100113524, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 624) + 456LL))(*(_QWORD *)(a1 + 624), v18);
sub_1000262BC((float *)&v67, -79.0, 0.0);
*(float32x2_t *)&v19 = sub_100026318(&v69, &v67, &v68);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v6 + 184LL))(v6, &v68, v19);
sub_1000262BC((float *)&v67, 79.0, 0.0);
*(float32x2_t *)&v20 = sub_100026318(&v69, &v67, &v68);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v8 + 184LL))(v8, &v68, v20);
sub_1000262BC((float *)&v67, -79.0, -80.0);
*(float32x2_t *)&v21 = sub_100026318(&v69, &v67, &v68);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v10 + 184LL))(v10, &v68, v21);
sub_1000262BC((float *)&v67, 79.0, -80.0);
*(float32x2_t *)&v22 = sub_100026318(&v69, &v67, &v68);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v18 + 184LL))(v18, &v68, v22);
sub_1000262BC((float *)&v67, -105.0, -40.0);
*(float32x2_t *)&v23 = sub_100026318(&v69, &v67, &v68);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v12 + 184LL))(v12, &v68, v23);
sub_1000262BC((float *)&v67, 0.0, -40.0);
*(float32x2_t *)&v24 = sub_100026318(&v69, &v67, &v68);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v14 + 184LL))(v14, &v68, v24);
sub_1000262BC((float *)&v67, 105.0, -40.0);
*(float32x2_t *)&v25 = sub_100026318(&v69, &v67, &v68);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v16 + 184LL))(v16, &v68, v25);
v26 = (*(__int64 (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 576) + 464LL))(
*(_QWORD *)(a1 + 576),
*(_QWORD *)(a1 + 624),
1);
v27 = cocos2d::CCMenu::create(v26);
v28 = GameStatsManager::sharedState(v27);
Stat = GameStatsManager::getStat(v28, "12");
if ( Stat <= 9 )
v30 = "GJ_lockGray_001.png";
else
v30 = "GJ_lock_open_001.png";
v31 = cocos2d::CCSprite::createWithSpriteFrameName(v30);
v32 = CCMenuItemSpriteExtra::create(v31, 0, a1, OptionsLayer::onSecretVault, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v27 + 456LL))(v27, v32);
sub_1000262BC((float *)&v67, *(float *)&v71 + -20.0, *((float *)&v71 + 1) + -18.0);
cocos2d::CCNode::convertToNodeSpace(&v68, v27, &v67, v33);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v32 + 184LL))(v32, &v68);
if ( Stat <= 9 )
{
v34 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v32 + 328LL))(v32) * 0.5;
v35 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v32 + 328LL))(v32);
sub_1000262BC((float *)&v68, v34, (float)(*(float *)(v35 + 4) * 0.5) + -21.0);
v36 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_coinsIcon2_001.png");
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v31 + 456LL))(v31, v36);
sub_1000262BC((float *)&v66, 7.5, 0.0);
*(float32x2_t *)&v37 = sub_100026318(&v68, &v66, &v67);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v36 + 184LL))(v36, &v67, v37);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v36 + 160LL))(v36, 0.5);
v38 = cocos2d::CCLabelBMFont::create_1("10", "bigFont.fnt");
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v31 + 456LL))(v31, v38);
sub_1000262BC((float *)&v66, -7.5, 0.0);
*(float32x2_t *)&v39 = sub_100026318(&v68, &v66, &v67);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v38 + 184LL))(v38, &v67, v39);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v38 + 160LL))(v38, 0.4);
}
CCMenuItemSpriteExtra::setSizeMult(1.5);
v40 = cocos2d::CCLabelBMFont::create_1("Music", "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 576) + 456LL))(*(_QWORD *)(a1 + 576), v40);
sub_1000262BC((float *)&v68, *(float *)&v71 * 0.5, (float)(*((float *)&v71 + 1) * 0.5) + -34.0);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v40 + 184LL))(v40, &v68);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v40 + 160LL))(v40, 0.6);
*(_QWORD *)(a1 + 648) = Slider::create_2(a1, OptionsLayer::musicSliderChanged, 0);
Slider::setBarVisibility();
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 576) + 456LL))(
*(_QWORD *)(a1 + 576),
*(_QWORD *)(a1 + 648));
v41 = *(_QWORD *)(a1 + 648);
v42 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v40 + 192LL))(v40);
sub_1000262BC((float *)&v67, 0.0, -20.0);
*(float32x2_t *)&v43 = sub_100026318(v42, &v67, &v68);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v41 + 184LL))(v41, &v68, v43);
v44 = (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 648) + 72LL))(*(_QWORD *)(a1 + 648), 0);
v45 = *(_QWORD *)(a1 + 648);
v46 = FMODAudioEngine::sharedEngine(v44);
v47.n128_f64[0] = FMODAudioEngine::getBackgroundMusicVolume(v46);
Slider::setValue(v45, v47);
v48 = cocos2d::CCLabelBMFont::create_1("SFX", "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 576) + 456LL))(*(_QWORD *)(a1 + 576), v48);
v49 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v40 + 192LL))(v40);
sub_1000262BC((float *)&v67, 0.0, -40.0);
*(float32x2_t *)&v50 = sub_100026318(v49, &v67, &v68);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v48 + 184LL))(v48, &v68, v50);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v48 + 160LL))(v48, 0.6);
*(_QWORD *)(a1 + 656) = Slider::create_2(a1, OptionsLayer::sfxSliderChanged, 0);
Slider::setBarVisibility();
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 576) + 456LL))(
*(_QWORD *)(a1 + 576),
*(_QWORD *)(a1 + 656));
v51 = *(_QWORD *)(a1 + 656);
v52 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v48 + 192LL))(v48);
sub_1000262BC((float *)&v67, 0.0, -20.0);
*(float32x2_t *)&v53 = sub_100026318(v52, &v67, &v68);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v51 + 184LL))(v51, &v68, v53);
v54 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 656) + 72LL))(*(_QWORD *)(a1 + 656), 1);
v55 = *(_QWORD *)(a1 + 656);
v56 = FMODAudioEngine::sharedEngine(v54);
v57.n128_f64[0] = FMODAudioEngine::getEffectsVolume(v56);
v58 = Slider::setValue(v55, v57);
*(_QWORD *)(GameManager::sharedState(v58) + 952) = a1 + 616;
v59 = sub_100009900(__p, "Menu\nMusic");
v60 = GameManager::sharedState(v59);
LODWORD(v55) = GameManager::getGameVariable(v60, "0122");
v61 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v40 + 192LL))(v40);
sub_1000262BC((float *)&v67, 145.0, -35.0);
sub_100026318(v61, &v67, &v68);
v62 = *(_QWORD *)(a1 + 576);
sub_1000262BC((float *)&v66, 0.0, 2.0);
GameToolbox::createToggleButton(
(__int64 *)__p,
(__int64)OptionsLayer::onMenuMusic,
0,
(unsigned int)v55 ^ 1,
v27,
&v68,
a1,
v62,
0.6,
0.35,
0.0,
(float *)&v66,
(__int64)"bigFont.fnt",
1,
0,
0);
if ( v65 < 0 )
operator delete(__p[0]);
return (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 576) + 456LL))(*(_QWORD *)(a1 + 576), v27);
}