//
// GJDropDownLayer::init from 0x14035f960 to 0x14035fda0 (1088 bytes)
//
// 15 xrefs:
// > AccountLayer::create @ 0x140092d6d
// > AccountLayer::layerHidden @ 0x140094c38
// > URLViewLayer::create @ 0x1403aaaf7
// > GJSongBrowser::init @ 0x1403bd89b
// > MenuLayer::onAchievements @ 0x140474aa9
// > MenuLayer::openOptions @ 0x140474d46
// > MenuLayer::onStats @ 0x140474e88
// > OptionsLayer::layerHidden @ 0x1404cc694
// > PlayLayer::showEndLayer @ 0x14050b18c
// > PlayLayer::showRetryLayer @ 0x14050b351
// > SongsLayer::create @ 0x140636981
// > ??> @ 0x1408ba3b8
// > ??> @ 0x1408ba3cc
// > ??> @ 0x1408ba3dc
// > ??> @ 0x1409212f0
//
// 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:30:52 +0000
//
bool __fastcall GJDropDownLayer::init(__int64 *a1, int a2, float a3, char a4)
{
__int64 v7; // rax
cocos2d::CCTouchDispatcher *v8; // rax
bool result; // al
__int64 v10; // rdx
__int64 v11; // rdx
__int64 v12; // rdx
__int64 v13; // rcx
__int64 v14; // rax
__int64 v15; // rax
__int64 v16; // rcx
__int64 v17; // rax
__int64 v18; // rax
int v19; // r9d
__int64 v20; // rax
__int64 v21; // rcx
__int64 *v22; // rdi
__int64 v23; // rbx
__int64 v24; // rax
int v25; // eax
cocos2d::CCObject *v26; // r14
struct cocos2d::CCMenu *v27; // rax
__int64 v28; // rdi
__int64 v29; // rcx
cocos2d::CCDirector *v30; // rax
float v31; // xmm6_4
__int64 v32; // rcx
cocos2d::CCDirector *v33; // rax
float ScreenLeft; // xmm0_4
__int64 v35; // rbx
__int64 v36; // rax
float v37; // xmm8_4
struct cocos2d::CCSprite *v38; // rdi
__int64 v39; // rbx
__int64 v40; // rax
__int64 v41; // rbx
__int64 v42; // rax
struct cocos2d::CCSprite *v43; // rdi
__int64 v44; // rbx
__int64 v45; // rax
__int64 v46; // rbx
__int64 v47; // rax
__int64 v48; // rax
__int64 v49; // rdx
__int64 v50; // rax
__int64 v51; // rcx
int v52; // [rsp+30h] [rbp-48h] BYREF
float v53; // [rsp+38h] [rbp-40h] BYREF
float v54; // [rsp+3Ch] [rbp-3Ch]
v7 = cocos2d::CCDirector::sharedDirector(a1);
v8 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 144LL))(v7);
cocos2d::CCTouchDispatcher::registerForcePrio(v8, (struct cocos2d::CCObject *)a1, 2, 0);
v52 = 2097152000;
result = cocos2d::CCLayerColor::initWithColor((cocos2d::CCLayerColor *)a1, (const struct cocos2d::_ccColor4B *)&v52);
if ( result )
{
LOBYTE(v10) = 1;
(*(void (__fastcall **)(__int64 *, __int64))(*a1 + 920))(a1, v10);
LOBYTE(v11) = 1;
(*(void (__fastcall **)(__int64 *, __int64))(*a1 + 992))(a1, v11);
LOBYTE(v12) = 1;
(*(void (__fastcall **)(__int64 *, __int64))(*a1 + 1008))(a1, v12);
v14 = cocos2d::CCDirector::sharedDirector(v13);
cocos2d::CCDirector::getWinSize(v14, &v53);
v15 = cocos2d::CCLayer::create();
v16 = *a1;
a1[72] = v15;
(*(void (__fastcall **)(__int64 *, __int64))(v16 + 464))(a1, v15);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 0.0, 0.0);
cocos2d::CCPoint::operator=(a1 + 68, v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 0.0, v54);
cocos2d::CCPoint::operator=(a1 + 69, v18);
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)a1[72] + 184LL))(a1[72], a1 + 69);
v20 = GJListLayer::create(0, a2, -1275068416, v19, LODWORD(a3), 0);
v21 = a1[72];
a1[71] = v20;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v21 + 464LL))(v21, v20);
v22 = (__int64 *)a1[71];
v23 = *v22;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v52,
(float)(v53 - 356.0) * 0.5,
(float)((float)((float)(v54 - a3) * 0.5) - 10.0) + 5.0);
(*(void (__fastcall **)(__int64 *, __int64))(v23 + 184))(v22, v24);
v25 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png");
v26 = CCMenuItemSpriteExtra::create(v25, 0, (int)a1, (__int64)sub_140360118);
*((_DWORD *)v26 + 93) = 1070386381;
v27 = cocos2d::CCMenu::create(v26, 0);
a1[70] = (__int64)v27;
v28 = *(_QWORD *)v27;
v30 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v29);
v31 = cocos2d::CCDirector::getScreenTop(v30) - 23.0;
v33 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v32);
ScreenLeft = cocos2d::CCDirector::getScreenLeft(v33);
v35 = a1[70];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, ScreenLeft + 24.0, v31);
(*(void (__fastcall **)(__int64, __int64))(v28 + 184))(v35, v36);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1[72] + 456LL))(a1[72], a1[70], 10);
v37 = (float)(a3 + *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1[71] + 200LL))(a1[71]) + 4)) + 12.0;
v38 = cocos2d::CCSprite::createWithSpriteFrameName("chain_01_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1[72] + 456LL))(
a1[72],
v38,
0xFFFFFFFFLL);
v39 = *(_QWORD *)v38;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 0.5, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v39 + 288))(v38, v40);
v41 = *(_QWORD *)v38;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, (float)(v53 * 0.5) - 156.0, v37);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v41 + 184))(v38, v42);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, _QWORD))(*(_QWORD *)v38 + 64LL))(v38, 0);
v43 = cocos2d::CCSprite::createWithSpriteFrameName("chain_01_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1[72] + 456LL))(
a1[72],
v43,
0xFFFFFFFFLL);
v44 = *(_QWORD *)v43;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 0.5, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v44 + 288))(v43, v45);
v46 = *(_QWORD *)v43;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, (float)(v53 * 0.5) + 156.0, v37);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v46 + 184))(v43, v47);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v43 + 64LL))(v43, 1);
v48 = *a1;
LOBYTE(v49) = 1;
*((_BYTE *)a1 + 584) = 0;
(*(void (__fastcall **)(__int64 *, __int64))(v48 + 1088))(a1, v49);
v50 = *a1;
*((_BYTE *)a1 + 584) = 1;
(*(void (__fastcall **)(__int64 *))(v50 + 1056))(a1);
if ( *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v51) + 209) )
{
if ( !a4 )
GameToolbox::addBackButton(a1[72], (__int64)v26);
}
return 1;
}
return result;
}