//
// LevelPickerPopup::init from 0x74a594 to 0x74ac74 (1760 bytes)
//
// 1 xrefs:
// > LevelPickerPopup::create @ 0x74adc0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:58:45 +0000
//
int __fastcall LevelPickerPopup::init(LevelPickerPopup *this, LevelPickerDelegate *a2)
{
int inited; // r9
int v5; // r0
float v6; // s14
int v7; // r6
void (__fastcall *v8)(int, _DWORD *); // r8
int v9; // r0
void (__fastcall *v10)(int, _DWORD *); // r2
int v11; // r6
void (__fastcall *v12)(int, _DWORD *); // r8
float v13; // s14
float v14; // s15
float v15; // s17
int v16; // r6
void (__fastcall *v17)(int, _DWORD *); // r10
void (__fastcall *v18)(int, _DWORD *); // r3
void (__fastcall *v19)(int, _DWORD *); // r8
int InputNode; // r0
float v21; // r1
int v22; // r6
void (__fastcall *v23)(int, _DWORD *); // r8
ButtonSprite *v24; // r0
int v25; // r8
const char *v26; // r2
int v27; // r0
void (__fastcall *v28)(int, _DWORD *); // r8
const char *v29; // r1
int v30; // r8
int v31; // r0
void (__fastcall *v32)(int, _DWORD *); // r8
ButtonSprite *v33; // r0
int v34; // r0
int v35; // r8
void (__fastcall *v36)(int, _DWORD *); // r10
int v37; // r10
void (__fastcall *v38)(int, _DWORD *); // r6
const char *v39; // r1
int v40; // r0
int v41; // r0
int v42; // r8
void (__fastcall *v43)(int, _DWORD *); // r10
const char *v44; // r1
int v45; // r8
const char *v46; // r1
int v47; // r5
cocos2d::CCNodeRGBA *v48; // r0
int v49; // r7
void (__fastcall *v50)(int, _BYTE *); // r8
int v52; // [sp+0h] [bp-7Ch]
float v53; // [sp+10h] [bp-6Ch]
float v54; // [sp+10h] [bp-6Ch]
void (__fastcall *v55)(int, _DWORD *); // [sp+18h] [bp-64h]
int v56; // [sp+18h] [bp-64h]
int v57; // [sp+18h] [bp-64h]
_BYTE v58[8]; // [sp+24h] [bp-58h] BYREF
_DWORD (__fastcall *v59)(LevelPickerPopup *__hidden, cocos2d::CCObject *); // [sp+2Ch] [bp-50h]
int v60; // [sp+30h] [bp-4Ch]
int (__fastcall *v61)(int, cocos2d::CCObject *); // [sp+34h] [bp-48h]
int v62; // [sp+38h] [bp-44h]
_DWORD (*v63)(LevelPickerPopup *__hidden, cocos2d::CCObject *); // [sp+3Ch] [bp-40h]
int v64; // [sp+40h] [bp-3Ch]
_DWORD (*v65)(LevelPickerPopup *__hidden, cocos2d::CCObject *); // [sp+44h] [bp-38h]
int v66; // [sp+48h] [bp-34h]
int v67[3]; // [sp+4Ch] [bp-30h] BYREF
int v68; // [sp+58h] [bp-24h] BYREF
int v69; // [sp+5Ch] [bp-20h]
int v70; // [sp+60h] [bp-1Ch]
_DWORD v71[4]; // [sp+64h] [bp-18h] BYREF
v68 = 0;
v69 = 0;
v70 = 0;
std::string::__init(&v68, &unk_B6B226, 0);
inited = PagedListPopup::initPaged(
(int)this,
(cocos2d::CCLabelBMFont *)"Share Level",
(unsigned __int8 *)&v68,
410.0,
290.0);
std::string::~string((int)&v68);
if ( inited )
{
v5 = *((_DWORD *)this + 142);
v6 = *((float *)this + 132);
*((_DWORD *)this + 151) = a2;
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v5 + 108))(
v5,
(float)(*((float *)this + 130) - (float)(v6 * 0.5)) - 19.0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 143) + 108))(
*((_DWORD *)this + 143),
(float)(*((float *)this + 130) + (float)(*((float *)this + 132) * 0.5)) + 19.0);
v7 = *((_DWORD *)this + 144);
if ( v7 )
{
v8 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v71, 1.0, 0.5);
v8(v7, v71);
v9 = *((_DWORD *)this + 144);
v10 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 536);
LOWORD(v71[0]) = 0;
BYTE2(v71[0]) = 0;
v10(v9, v71);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 144) + 512))(*((_DWORD *)this + 144), 150);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 144) + 80))(*((_DWORD *)this + 144), 1056293519);
v11 = *((_DWORD *)this + 144);
v12 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v11 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v71,
(float)(*((float *)this + 130) + (float)(*((float *)this + 132) * 0.5)) - 9.0,
(float)(*((float *)this + 131) + (float)(*((float *)this + 133) * 0.5)) - 13.0);
v12(v11, v71);
}
v13 = *((float *)this + 133);
v14 = *((float *)this + 131);
*((_DWORD *)this + 138) = 1135214592;
*((_DWORD *)this + 139) = 1128792064;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v71,
*((float *)this + 130),
(float)((float)(v14 + (float)(v13 * 0.5)) - 76.0) - 100.0);
cocos2d::CCPoint::operator=((char *)this + 560, v71);
v15 = (float)(*((float *)this + 131) + (float)(*((float *)this + 133) * 0.5)) - 48.0;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v71, 0.0, 0.0, 40.0, 40.0);
v16 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v71);
v17 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v71, 200.0, 24.0);
v17(v16, v71);
v18 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 480);
LOWORD(v71[0]) = 13405;
BYTE2(v71[0]) = 31;
v18(v16, v71);
v19 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v71, *((float *)this + 130) - 20.0, v15);
v19(v16, v71);
(*(void (__fastcall **)(_DWORD, int, _DWORD))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v16, 0);
InputNode = GameToolbox::createInputNode(
(GameToolbox *)0x433C0000,
24.0,
COERCE_FLOAT("Search saved"),
(const char *)&dword_18,
v52);
v21 = *((float *)this + 130) - 20.0;
*((_DWORD *)this + 165) = InputNode;
v22 = InputNode;
v23 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)InputNode + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v71, v21, v15);
v23(v22, v71);
CCTextInputNode::setLabelPlaceholderScale(*((_DWORD *)this + 165), 0.6);
*(_DWORD *)(*((_DWORD *)this + 165) + 420) = (char *)this + 440;
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 165),
5);
v24 = ButtonSprite::create(
(ButtonSprite *)"Online",
(const char *)&word_2C,
0,
0.4,
1,
"bigFont.fnt",
"GJ_button_01.png",
COERCE_CONST_CHAR_(24.0),
v53);
*((_DWORD *)this + 168) = v24;
v60 = 0;
v59 = LevelPickerPopup::onOnlineMode;
v25 = CCMenuItemSpriteExtra::create((int)v24, 0, (int)this, (int)LevelPickerPopup::onOnlineMode, 0);
CCMenuItemSpriteExtra::setSizeMult(v25, 1.2);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v25);
v55 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v25 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v71, *((float *)this + 130) + 122.0, v15);
v55(v25, v71);
v27 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Showing your online levels", "chatFont.fnt", v26);
*((_DWORD *)this + 166) = v27;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v27 + 80))(v27, 1051931443);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 166) + 512))(*((_DWORD *)this + 166), 140);
v56 = *((_DWORD *)this + 166);
v28 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v56 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v71,
*((float *)this + 130),
(float)(*((float *)this + 131) + (float)(*((float *)this + 133) * 0.5)) - 70.0);
v28(v56, v71);
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 166),
5);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 166) + 172))(*((_DWORD *)this + 166), 0);
v30 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_updateBtn_001.png", v29);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v30 + 80))(v30, 1057635697);
v62 = 0;
v61 = LevelPickerPopup::onRefreshOnline;
v31 = CCMenuItemSpriteExtra::create(v30, 0, (int)this, (int)LevelPickerPopup::onRefreshOnline, 0);
*((_DWORD *)this + 167) = v31;
CCMenuItemSpriteExtra::setSizeMult(v31, 1.2);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
*((_DWORD *)this + 167));
v57 = *((_DWORD *)this + 167);
v32 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v57 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v71, *((float *)this + 130) + 175.0, v15);
v32(v57, v71);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 167) + 172))(*((_DWORD *)this + 167), 0);
v33 = ButtonSprite::create(
(ButtonSprite *)"Use ID",
(const char *)&dword_6C + 2,
0,
0.4,
1,
"bigFont.fnt",
"GJ_button_01.png",
COERCE_CONST_CHAR_(24.0),
v54);
*((_DWORD *)this + 170) = v33;
v64 = 0;
v63 = LevelPickerPopup::onUseID;
v34 = CCMenuItemSpriteExtra::create((int)v33, 0, (int)this, (int)LevelPickerPopup::onUseID, 0);
*((_DWORD *)this + 169) = v34;
CCMenuItemSpriteExtra::setSizeMult(v34, 1.2);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
*((_DWORD *)this + 169));
v35 = *((_DWORD *)this + 169);
v36 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v35 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v71,
*((float *)this + 130),
(float)(*((float *)this + 131) - (float)(*((float *)this + 133) * 0.5)) + 20.0);
v36(v35, v71);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 169) + 172))(*((_DWORD *)this + 169), 0);
memset(v67, 0, sizeof(v67));
std::string::__init(v67, "Share", 5u);
v68 = 0;
v69 = 0;
v70 = 0;
std::string::__init(
&v68,
"Pick a level or type an ID.\n"
"You can also type links directly: l_123 for a level, li_123 for a list.",
0x7Bu);
v37 = InfoAlertButton::create((char *)v67, (int)&v68, 1058642330);
std::string::~string((int)&v68);
std::string::~string((int)v67);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v37);
v38 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v37 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v71,
(float)(*((float *)this + 130) + (float)(*((float *)this + 132) * 0.5)) - 17.0,
(float)(*((float *)this + 131) - (float)(*((float *)this + 133) * 0.5)) + 16.0);
v38(v37, v71);
v40 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_viewListsBtn_001.png", v39);
*((_DWORD *)this + 155) = v40;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v40 + 80))(v40, 1058642330);
v41 = *((_DWORD *)this + 155);
v66 = 0;
v65 = LevelPickerPopup::onToggleKind;
v42 = CCMenuItemSpriteExtra::create(v41, 0, (int)this, (int)LevelPickerPopup::onToggleKind, 0);
CCMenuItemSpriteExtra::setSizeMult(v42, 1.2);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v42);
v43 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v42 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v71, *((float *)this + 130) - 145.0, v15);
v43(v42, v71);
v45 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_heartOn_001.png", v44);
v47 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_heartOff_001.png", v46);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v45 + 80))(v45, 1060655596);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v47 + 80))(v47, 1060655596);
v71[1] = 0;
v71[0] = LevelPickerPopup::onToggleFavorites;
v48 = CCMenuItemToggler::create(v45, v47, (int)this, (int)LevelPickerPopup::onToggleFavorites, 0);
*((_DWORD *)this + 154) = v48;
*((_BYTE *)v48 + 309) = 1;
CCMenuItemToggler::setSizeMult(*((CCMenuItemToggler **)this + 154), 1.2);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
*((_DWORD *)this + 154));
v49 = *((_DWORD *)this + 154);
v50 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v49 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v58,
(float)(*((float *)this + 130) - (float)(*((float *)this + 132) * 0.5)) + 18.0,
(float)(*((float *)this + 131) - (float)(*((float *)this + 133) * 0.5)) + 18.0);
v50(v49, v58);
PagedListPopup::loadPage((int)this, 0);
}
return inited;
}