//
// GJDropDownLayer::init from 0x8ecec0 to 0x8ed2fc (1084 bytes)
//
// 5 xrefs:
// > GJDropDownLayer::create @ 0x8ed3bc
// > GJDropDownLayer::init @ 0x8ed450
// > EndLevelLayer::init @ 0x8f9ad0
// > RetryLevelLayer::create @ 0x918854
// > ??> @ 0xe4178
//
// 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 12:56:56 +0000
//
__int64 __fastcall GJDropDownLayer::init(GameToolbox **this, cocos2d::CCLabelBMFont *a2, float a3, unsigned __int8 a4)
{
unsigned int v7; // w24
__int64 v8; // x0
cocos2d::CCTouchDispatcher *v9; // x0
unsigned __int8 v10; // w0
unsigned int v11; // w26
cocos2d::CCDirector *v13; // x0
cocos2d::CCDirector *v14; // x0
cocos2d::CCLayer *WinSize; // x0
__int64 v16; // x0
long double v17; // q0
cocos2d::CCLayerColor *v18; // x0
__int64 v19; // x22
void (__fastcall *v20)(__int64, _BYTE *); // x25
const char *v21; // x1
__int64 v22; // x0
cocos2d::CCMenu *v23; // x25
GameToolbox *v24; // x0
GameToolbox *v25; // x22
cocos2d::CCDirector *v26; // x0
void (__fastcall *v27)(GameToolbox *, _BYTE *); // x27
cocos2d::CCDirector *v28; // x0
cocos2d::CCDirector *ScreenLeft; // x0
float v30; // s0
float v31; // s10
cocos2d::CCDirector *v32; // x0
float v33; // s0
float v34; // s8
const char *v35; // x1
__int64 v36; // x22
void (__fastcall *v37)(__int64, _BYTE *); // x28
void (__fastcall *v38)(__int64, _BYTE *); // x28
const char *v39; // x1
__int64 v40; // x22
void (__fastcall *v41)(__int64, _BYTE *); // x27
void (__fastcall *v42)(__int64, _BYTE *); // x27
PlatformToolbox *v43; // x0
cocos2d::CCMenuItem *v44; // x2
__int64 v45; // [xsp+88h] [xbp+88h] BYREF
_BYTE v46[8]; // [xsp+90h] [xbp+90h] BYREF
v7 = a4;
v8 = cocos2d::CCDirector::sharedDirector(_stack_chk_guard);
v9 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 160LL))(v8);
cocos2d::CCTouchDispatcher::registerForcePrio(v9, (cocos2d::CCObject *)this, 2, 0);
v46[0] = 0;
v46[1] = 0;
v46[2] = 0;
v46[3] = 125;
v10 = cocos2d::CCLayerColor::initWithColor(this, v46);
v11 = v10;
if ( v10 )
{
(*((void (__fastcall **)(GameToolbox **, __int64))*this + 125))(this, 1);
(*((void (__fastcall **)(GameToolbox **, __int64))*this + 134))(this, 1);
v13 = (cocos2d::CCDirector *)(*((__int64 (__fastcall **)(GameToolbox **, __int64))*this + 136))(this, 1);
v14 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v13);
WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize(&v45, v14);
v16 = cocos2d::CCLayer::create(WinSize);
*(this + 72) = (GameToolbox *)v16;
(*((void (__fastcall **)(GameToolbox **, __int64))*this + 57))(this, v16);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.0, 0.0);
cocos2d::CCPoint::operator=(this + 68, v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.0, *((float *)&v45 + 1));
*(__n128 *)&v17 = cocos2d::CCPoint::operator=(this + 69, v46);
(*(void (__fastcall **)(_QWORD, char *, long double))(*(_QWORD *)*(this + 72) + 184LL))(
*(this + 72),
(char *)this + 552,
v17);
v18 = GJListLayer::create(nullptr, a2, -1275068416, 0, 356.0, a3);
*(this + 71) = v18;
(*(void (__fastcall **)(_QWORD, cocos2d::CCLayerColor *))(*(_QWORD *)*(this + 72) + 456LL))(*(this + 72), v18);
v19 = (__int64)*(this + 71);
v20 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v19 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v46,
(float)(*(float *)&v45 - 356.0) * 0.5,
(float)((float)((float)(*((float *)&v45 + 1) - a3) * 0.5) + -10.0) + 5.0);
v20(v19, v46);
v22 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_03_001.png", v21);
v23 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v22, 0, (__int64)this, 1320, 1);
CCMenuItemSpriteExtra::setSizeMult((__int64)v23, 1.6);
v24 = (GameToolbox *)cocos2d::CCMenu::create(v23, nullptr);
*(this + 70) = v24;
v25 = v24;
v26 = *(cocos2d::CCDirector **)v24;
v27 = *((void (__fastcall **)(GameToolbox *, _BYTE *))v26 + 23);
v28 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v26);
ScreenLeft = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenLeft(v28);
v31 = v30;
v32 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ScreenLeft);
cocos2d::CCDirector::getScreenTop(v32);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, v31 + 24.0, v33 - 23.0);
v27(v25, v46);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(*(_QWORD *)*(this + 72) + 464LL))(*(this + 72), *(this + 70), 10);
v34 = (float)(a3
+ *(float *)((*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 71) + 192LL))(*(this + 71)) + 4))
+ 12.0;
v36 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"chain_01_001.png", v35);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*(this + 72) + 464LL))(
*(this + 72),
v36,
0xFFFFFFFFLL);
v37 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v36 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.5, 0.0);
v37(v36, v46);
v38 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v36 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, (float)(*(float *)&v45 * 0.5) + -156.0, v34);
v38(v36, v46);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v36 + 72LL))(v36, 0);
v40 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"chain_01_001.png", v39);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*(this + 72) + 464LL))(
*(this + 72),
v40,
0xFFFFFFFFLL);
v41 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v40 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.5, 0.0);
v41(v40, v46);
v42 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v40 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, (float)(*(float *)&v45 * 0.5) + 156.0, v34);
v42(v40, v46);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v40 + 72LL))(v40, 1);
*((_BYTE *)this + 584) = 0;
(*((void (__fastcall **)(GameToolbox **, __int64))*this + 167))(this, 1);
*((_BYTE *)this + 584) = 1;
v43 = (PlatformToolbox *)(*((__int64 (__fastcall **)(GameToolbox **))*this + 163))(this);
if ( v7 < (unsigned __int8)PlatformToolbox::isControllerConnected(v43) )
GameToolbox::addBackButton(*(this + 72), v23, v44);
}
return v11;
}