//
// UploadListPopup::init from 0xbac2a8 to 0xbac758 (1200 bytes)
//
// 2 xrefs:
// > UploadListPopup::create @ 0xbac8b4
// > ??> @ 0xe1b50
//
// 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:02:52 +0000
//
__int64 __fastcall UploadListPopup::init(UploadListPopup *this, GJLevelList *a2)
{
unsigned __int8 v4; // w0
unsigned int v5; // w23
cocos2d::CCDirector *v7; // x0
cocos2d::CCDirector *v8; // x0
cocos2d::CCLayer *WinSize; // x0
__int64 v10; // x0
__int64 v11; // x22
void (__fastcall *v12)(__int64, __int64 *); // x25
void (__fastcall *v13)(__int64, __int64 *); // x25
__int64 v14; // x0
const char *v15; // x2
__int64 v16; // x1
cocos2d::CCLabelBMFont *v17; // x0
__int64 v18; // x22
__int64 (__fastcall *v19)(__int64, __int64 *); // x25
cocos2d::CCMenu *v20; // x0
__int64 v21; // x0
__int64 v22; // x0
char v23; // w1
__int64 v24; // x24
void (__fastcall *v25)(__int64, __int64 *); // x25
__int64 v26; // x0
__int64 v27; // x24
__int64 (__fastcall *v28)(__int64, __int64 *); // x25
GameLevelManager *v29; // x0
GameLevelManager *v30; // x0
GameLevelManager *v31; // x0
const char *v32; // x1
__int64 v33; // x0
__int64 v34; // x0
cocos2d::CCDirector **v35; // x24
cocos2d::CCNode *v36; // x25
void (__fastcall *v37)(cocos2d::CCDirector **, __int64 *); // x19
cocos2d::CCDirector *v38; // x0
cocos2d::CCDirector *ScreenLeft; // x0
float v40; // s0
float v41; // s8
cocos2d::CCDirector *v42; // x0
float v43; // s0
__int64 v44; // [xsp+60h] [xbp+60h] BYREF
_BYTE v45[8]; // [xsp+68h] [xbp+68h] BYREF
__int64 v46[2]; // [xsp+70h] [xbp+70h] BYREF
__int64 v47; // [xsp+80h] [xbp+80h] BYREF
__int64 v48; // [xsp+88h] [xbp+88h]
void *v49; // [xsp+90h] [xbp+90h]
LODWORD(v46[0]) = -1778384896;
v4 = cocos2d::CCLayerColor::initWithColor(this, v46);
v5 = v4;
if ( v4 )
{
FLAlertLayer::incrementForcePrio(this);
*((_QWORD *)this + 84) = a2;
cocos2d::CCObject::retain(a2);
(*(void (__fastcall **)(UploadListPopup *, __int64))(*(_QWORD *)this + 1000LL))(this, 1);
v7 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(UploadListPopup *, __int64))(*(_QWORD *)this + 1072LL))(
this,
1);
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);
WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize(&v44, v8);
v10 = cocos2d::CCLayer::create(WinSize);
*((_QWORD *)this + 73) = v10;
(*(void (__fastcall **)(UploadListPopup *, __int64))(*(_QWORD *)this + 456LL))(this, v10);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v46, 0.0, 0.0, 80.0, 80.0);
v11 = cocos2d::extension::CCScale9Sprite::create("square04_001.png", v46);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 912LL))(v11, 0xFFFFFFFFLL);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v11 + 960LL))(v11, &unk_11963F8);
v12 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v11 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v46, 420.0, 300.0);
v12(v11, v46);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v11,
0xFFFFFFFFLL);
v13 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v11 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, *(float *)&v44 * 0.5, *((float *)&v44 + 1) * 0.5);
v13(v11, v46);
v47 = 0;
v14 = *((_QWORD *)this + 84);
v48 = 0;
v49 = nullptr;
v15 = (const char *)(v14 + 432);
if ( (*(_BYTE *)(v14 + 432) & 1) != 0 )
{
std::string::__init(&v47, *(void **)(v14 + 448), *(_QWORD *)(v14 + 440));
}
else
{
v16 = *(_QWORD *)(v14 + 440);
v47 = *(_QWORD *)v15;
v48 = v16;
v49 = *(void **)(v14 + 448);
}
v17 = (cocos2d::CCLabelBMFont *)((char *)&v47 + 1);
if ( (v47 & 1) != 0 )
v17 = (cocos2d::CCLabelBMFont *)v49;
v18 = cocos2d::CCLabelBMFont::create(v17, "goldFont.fnt", v15);
if ( (v47 & 1) != 0 )
operator delete(v49);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 73) + 456LL))(*((_QWORD *)this + 73), v18);
v19 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v18 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v46,
*(float *)&v44 * 0.5,
(float)((float)(*((float *)&v44 + 1) * 0.5) + 150.0) - 25.0);
v20 = (cocos2d::CCMenu *)v19(v18, v46);
v21 = cocos2d::CCMenu::create(v20);
*((_QWORD *)this + 69) = v21;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v21,
10);
v47 = 0;
v48 = 0;
v49 = nullptr;
std::string::__init(&v47, "Please wait, uploading list...", 0x1Eu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.5, 1.0);
v22 = TextArea::create((char *)&v47, "chatFont.fnt", (const cocos2d::CCPoint *)v46, 0, 0, 1.0, 400.0, 20.0);
v23 = v47;
*((_QWORD *)this + 85) = v22;
if ( (v23 & 1) != 0 )
{
operator delete(v49);
v22 = *((_QWORD *)this + 85);
}
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 73) + 456LL))(*((_QWORD *)this + 73), v22);
v24 = *((_QWORD *)this + 85);
v25 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v24 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v46,
*(float *)&v44 * 0.5,
(float)(*((float *)&v44 + 1) * 0.5) + -30.0);
v25(v24, v46);
*((_DWORD *)this + 160) = -1;
v26 = LoadingCircle::create((LoadingCircle *)0xFFFFFFFFLL);
*((_QWORD *)this + 86) = v26;
*(_QWORD *)(v26 + 552) = *((_QWORD *)this + 73);
*(_BYTE *)(*((_QWORD *)this + 86) + 560LL) = 0;
LoadingCircle::show(*((cocos2d::CCNode ***)this + 86));
v27 = *(_QWORD *)(*((_QWORD *)this + 86) + 544LL);
v28 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v27 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, *(float *)&v44 * 0.5, (float)(*((float *)&v44 + 1) * 0.5) + 20.0);
v29 = (GameLevelManager *)v28(v27, v46);
v30 = (GameLevelManager *)GameLevelManager::sharedState(v29);
*((_QWORD *)v30 + 160) = (char *)this + 664;
v31 = (GameLevelManager *)GameLevelManager::sharedState(v30);
GameLevelManager::uploadLevelList(v31, *((GJLevelList **)this + 84));
v33 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v32);
v34 = CCMenuItemSpriteExtra::create(v33, 0, (__int64)this, (__int64)UploadListPopup::onBack, 0);
*((_QWORD *)this + 87) = v34;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v34);
v35 = *((cocos2d::CCDirector ***)this + 87);
v36 = *((cocos2d::CCNode **)this + 69);
v37 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v35 + 23);
v38 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v35);
ScreenLeft = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenLeft(v38);
v41 = v40;
v42 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ScreenLeft);
cocos2d::CCDirector::getScreenTop(v42);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v45, v41 + 40.0, v43 - 40.0);
cocos2d::CCNode::convertToNodeSpace(v46, v36, (const cocos2d::CCPoint *)v45);
v37(v35, v46);
}
return v5;
}