//
// EditorSoundsSettingsPopup::init from 0xcd7de4 to 0xcd8168 (900 bytes)
//
// 2 xrefs:
// > EditorSoundsSettingsPopup::create @ 0xcd82d0
// > ??> @ 0xfca00
//
// 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:06:31 +0000
//
__int64 __fastcall EditorSoundsSettingsPopup::init(EditorSoundsSettingsPopup *this, EditorSoundsLayer *a2)
{
cocos2d::CCDirector *v4; // x0
unsigned int v5; // w22
cocos2d::CCDirector *v6; // x0
__int64 v7; // x23
void (__fastcall *v8)(__int64, _BYTE *); // x25
void (__fastcall *v9)(__int64, _BYTE *); // x25
const char *v10; // x2
__int64 v11; // x23
void (__fastcall *v12)(__int64, _BYTE *); // x25
cocos2d::CCMenu *v13; // x0
__int64 v14; // x0
__int64 v15; // x23
void (__fastcall *v16)(__int64, _BYTE *); // x25
const char *v17; // x6
__int64 v18; // x0
__int64 v19; // x25
void (__fastcall *v20)(__int64, _BYTE *); // x26
const char *v21; // x6
__int64 v22; // x0
__int64 v23; // x23
void (__fastcall *v24)(__int64, _BYTE *); // x24
const char *v25; // x1
__int64 v26; // x0
__int64 v27; // x23
void (__fastcall *v28)(__int64, _BYTE *); // x20
__int64 v30; // [xsp+60h] [xbp+60h] BYREF
_BYTE v31[16]; // [xsp+68h] [xbp+68h] BYREF
v4 = (cocos2d::CCDirector *)(unsigned __int8)FLAlertLayer::init(this, 150);
v5 = (unsigned __int8)v4;
if ( (_BYTE)v4 )
{
*((_QWORD *)this + 84) = a2;
*((_BYTE *)this + 596) = 1;
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v4);
cocos2d::CCDirector::getWinSize(&v30, v6);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v31, 0.0, 0.0, 80.0, 80.0);
v7 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v31);
v8 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v7 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v31, 280.0, 160.0);
v8(v7, v31);
v9 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v7 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, *(float *)&v30 * 0.5, *((float *)&v30 + 1) * 0.5);
v9(v7, v31);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v7,
4294967294LL);
v11 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Editor SFX", "goldFont.fnt", v10);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 160LL))(v11, 0.7);
v12 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v11 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v31,
*(float *)&v30 * 0.5,
(float)((float)(*((float *)&v30 + 1) * 0.5) + 80.0) - 20.0);
v12(v11, v31);
v13 = (cocos2d::CCMenu *)(*(__int64 (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 73) + 456LL))(
*((_QWORD *)this + 73),
v11);
v14 = cocos2d::CCMenu::create(v13);
*((_QWORD *)this + 69) = v14;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v14,
10);
v15 = *((_QWORD *)this + 69);
v16 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v15 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, *(float *)&v30 * 0.5, *((float *)&v30 + 1) * 0.5);
v16(v15, v31);
v18 = ButtonSprite::create(
(ButtonSprite *)"Download used SFX",
(const char *)&qword_A8 + 2,
0,
1,
0.55,
"bigFont.fnt",
"GJ_button_04.png",
v17,
28.0);
v19 = CCMenuItemSpriteExtra::create(v18, 0, (__int64)this, (__int64)EditorSoundsSettingsPopup::onDownloadAll, 0);
v20 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v19 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, 0.0, 12.0);
v20(v19, v31);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v19);
v22 = ButtonSprite::create(
(ButtonSprite *)"Clear All bindings",
(const char *)&qword_A8 + 2,
0,
1,
0.55,
"bigFont.fnt",
"GJ_button_06.png",
v21,
28.0);
v23 = CCMenuItemSpriteExtra::create(v22, 0, (__int64)this, (__int64)EditorSoundsSettingsPopup::onClearAll, 0);
v24 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v23 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, 0.0, -28.0);
v24(v23, v31);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v23);
v26 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v25);
v27 = CCMenuItemSpriteExtra::create(v26, 0, (__int64)this, (__int64)EditorSoundsSettingsPopup::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult(v27, 1.5);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v27);
v28 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v27 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, -130.0, 70.0);
v28(v27, v31);
}
return v5;
}