//
// UploadListPopup::init from 0x6d6ce4 to 0x6d702e (842 bytes)
//
// 1 xrefs:
// > UploadListPopup::create @ 0x6d70e4
//
// 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:57:07 +0000
//
int __fastcall UploadListPopup::init(UploadListPopup *this, GJLevelList *a2)
{
int v4; // r8
cocos2d::CCDirector *v5; // r0
cocos2d::CCLayer *WinSize; // r0
int v7; // r0
int v8; // r3
int v9; // r6
void (__fastcall *v10)(int, _DWORD *); // r9
void (__fastcall *v11)(int, _DWORD *); // r9
const char *v12; // r2
cocos2d::CCLabelBMFont *v13; // r0
int v14; // r9
int (__fastcall *v15)(int, _DWORD *); // r10
cocos2d::CCMenu *v16; // r0
int v17; // r0
int v18; // r6
int (__fastcall *v19)(int, _DWORD *); // r9
LoadingCircle *v20; // r0
cocos2d::CCLayerColor *v21; // r0
int v22; // r3
int v23; // r9
int (__fastcall *v24)(int, _DWORD *); // r10
GameLevelManager *v25; // r0
GameLevelManager *v26; // r0
GameLevelManager *v27; // r0
const char *v28; // r1
int v29; // r0
int v30; // r0
cocos2d::CCDirector *v31; // r0
int v32; // r6
const cocos2d::CCPoint *v33; // r10
void (__fastcall *v34)(int, _BYTE *); // r9
cocos2d::CCDirector *v35; // r0
float v36; // s16
cocos2d::CCDirector *v37; // r0
float v38; // r0
float v40; // [sp+10h] [bp-38h] BYREF
float v41; // [sp+14h] [bp-34h]
_BYTE v42[8]; // [sp+18h] [bp-30h] BYREF
_BYTE v43[8]; // [sp+20h] [bp-28h] BYREF
int v44[2]; // [sp+28h] [bp-20h] BYREF
cocos2d::CCLabelBMFont *v45; // [sp+30h] [bp-18h]
_DWORD v46[4]; // [sp+34h] [bp-14h] BYREF
v46[0] = -1778384896;
v4 = cocos2d::CCLayerColor::initWithColor(this, v46);
if ( v4 )
{
FLAlertLayer::incrementForcePrio(this);
*((_DWORD *)this + 131) = a2;
cocos2d::CCObject::retain(a2);
(*(void (__fastcall **)(UploadListPopup *, int))(*(_DWORD *)this + 500))(this, 1);
v5 = (cocos2d::CCDirector *)(*(int (__fastcall **)(UploadListPopup *, int))(*(_DWORD *)this + 536))(this, 1);
cocos2d::CCDirector::sharedDirector(v5);
WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v40);
v7 = cocos2d::CCLayer::create(WinSize);
v8 = *(_DWORD *)this;
*((_DWORD *)this + 115) = v7;
(*(void (__fastcall **)(UploadListPopup *, int))(v8 + 228))(this, v7);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v46, 0.0, 0.0, 80.0, 80.0);
v9 = cocos2d::extension::CCScale9Sprite::create("square04_001.png", v46);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 456))(v9, 255);
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v9 + 480))(v9, &unk_BEFF64);
v10 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v46, 420.0, 300.0);
v10(v9, v46);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v9, -1);
v11 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, v40 * 0.5, v41 * 0.5);
v11(v9, v46);
std::string::basic_string(v44, *((_DWORD *)this + 131) + 348);
if ( (v44[0] & 1) != 0 )
v13 = v45;
else
v13 = (cocos2d::CCLabelBMFont *)((char *)v44 + 1);
v14 = cocos2d::CCLabelBMFont::create(v13, "goldFont.fnt", v12);
std::string::~string((int)v44);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v14);
v15 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v14 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, v40 * 0.5, (float)((float)(v41 * 0.5) + 150.0) - 25.0);
v16 = (cocos2d::CCMenu *)v15(v14, v46);
v17 = cocos2d::CCMenu::create(v16);
*((_DWORD *)this + 111) = v17;
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v17, 10);
v44[0] = 0;
v44[1] = 0;
v45 = nullptr;
std::string::__init(v44, "Please wait, uploading list...", 0x1Eu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.5, 1.0);
*((_DWORD *)this + 132) = TextArea::create(
(int)v44,
"chatFont.fnt",
1065353216,
1137180672,
(const cocos2d::CCPoint *)v46,
COERCE_INT(20.0),
0,
0);
std::string::~string((int)v44);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 115) + 228))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 132));
v18 = *((_DWORD *)this + 132);
v19 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v18 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, v40 * 0.5, (float)(v41 * 0.5) - 30.0);
v20 = (LoadingCircle *)v19(v18, v46);
*((_DWORD *)this + 125) = -1;
v21 = LoadingCircle::create(v20);
v22 = *((_DWORD *)this + 115);
*((_DWORD *)this + 133) = v21;
*((_DWORD *)v21 + 111) = v22;
*(_BYTE *)(*((_DWORD *)this + 133) + 448) = 0;
LoadingCircle::show(*((cocos2d::CCNode ***)this + 133));
v23 = *(_DWORD *)(*((_DWORD *)this + 133) + 440);
v24 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v23 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, v40 * 0.5, (float)(v41 * 0.5) + 20.0);
v25 = (GameLevelManager *)v24(v23, v46);
v26 = (GameLevelManager *)GameLevelManager::sharedState(v25);
*((_DWORD *)v26 + 212) = (char *)this + 520;
v27 = (GameLevelManager *)GameLevelManager::sharedState(v26);
GameLevelManager::uploadLevelList(v27, *((GJLevelList **)this + 131));
v29 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v28);
v46[0] = UploadListPopup::onBack;
v46[1] = 0;
v30 = CCMenuItemSpriteExtra::create(v29, 0, (int)this, (int)UploadListPopup::onBack, 0);
*((_DWORD *)this + 134) = v30;
v31 = (cocos2d::CCDirector *)(*(int (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v30);
v32 = *((_DWORD *)this + 134);
v33 = *((const cocos2d::CCPoint **)this + 111);
v34 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v32 + 92);
v35 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v31);
v36 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v35));
v37 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v36));
v38 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v37));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, v36 + 40.0, v38 - 40.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v43, v33);
v34(v32, v43);
}
return v4;
}