//
// UploadListPopup::init from 0x10034f480 to 0x10034f915 (1173 bytes)
//
// 1 xrefs:
// > sub_10034EE60 @ 0x10034f00a
//
// This function is hookable on this platform (idp: pc, 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:28:49 +0000
//
__int64 __fastcall UploadListPopup::init(_QWORD *a1, __int64 a2)
{
__int64 result; // rax
unsigned int v4; // r13d
__int64 v5; // rsi
__int64 v6; // rax
__int64 v7; // r14
__int64 v8; // rax
__int128 *v9; // rax
char *v10; // rdi
__int64 v11; // r14
__int64 v12; // rax
char *v13; // rax
__int64 v14; // r14
double v15; // xmm0_8
__int64 v16; // rax
__int64 v17; // r14
double v18; // xmm0_8
__int64 v19; // rax
double v20; // xmm0_8
char *v21; // rax
void *v22; // rax
__int64 v23; // rdi
void *v24; // rsi
__int64 v25; // r14
__int64 v26; // rbx
__int64 v27; // rdi
__int64 v28; // rax
double v29; // xmm0_8
unsigned int v30; // [rsp+8h] [rbp-78h] BYREF
__int128 v31; // [rsp+10h] [rbp-70h] BYREF
void *v32; // [rsp+20h] [rbp-60h]
float v33; // [rsp+2Ch] [rbp-54h]
__int128 v34; // [rsp+30h] [rbp-50h] BYREF
void *__p; // [rsp+40h] [rbp-40h]
float v36; // [rsp+50h] [rbp-30h] BYREF
float v37; // [rsp+54h] [rbp-2Ch]
LODWORD(v34) = -1778384896;
result = cocos2d::CCLayerColor::initWithColor(a1, &v34);
if ( !(_BYTE)result )
return result;
v4 = result;
FLAlertLayer::incrementForcePrio(a1);
a1[84] = a2;
cocos2d::CCObject::retain(a2);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1000LL))(a1, 1);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1072LL))(a1, 1);
v5 = cocos2d::CCDirector::sharedDirector(a1, 1);
cocos2d::CCDirector::getWinSize(&v36, v5);
v6 = cocos2d::CCLayer::create();
a1[73] = v6;
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 456LL))(a1, v6);
sub_100278270((__int64)&v34, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
v7 = cocos2d::extension::CCScale9Sprite::create_2("square04_001.png", &v34);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 912LL))(v7, 255);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v7 + 960LL))(v7, &unk_100A08264);
sub_100278260((float *)&v34, 420.0, 300.0);
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v7 + 320LL))(v7, &v34);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)a1[73] + 464LL))(a1[73], v7, 0xFFFFFFFFLL);
sub_100278250((float *)&v34, v36 * 0.5, v37 * 0.5);
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v7 + 184LL))(v7, &v34);
v8 = a1[84];
if ( (*(_BYTE *)(v8 + 432) & 1) != 0 )
{
sub_10001AD30(&v34, *(const void **)(v8 + 448), *(_QWORD *)(v8 + 440));
if ( (v34 & 1) == 0 )
goto LABEL_4;
LABEL_6:
v10 = (char *)__p;
goto LABEL_7;
}
v9 = (__int128 *)(v8 + 432);
__p = *((void **)v9 + 2);
v34 = *v9;
if ( (v34 & 1) != 0 )
goto LABEL_6;
LABEL_4:
v10 = (char *)&v34 + 1;
LABEL_7:
v11 = cocos2d::CCLabelBMFont::create_3(v10, "goldFont.fnt");
if ( (v34 & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[73] + 456LL))(a1[73], v11);
sub_100278250((float *)&v34, v36 * 0.5, (float)((float)(v37 * 0.5) + 150.0) + -25.0);
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v11 + 184LL))(v11, &v34);
v12 = cocos2d::CCMenu::create();
a1[69] = v12;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)a1[73] + 464LL))(a1[73], v12, 10);
v32 = operator new(0x20u);
*(_QWORD *)&v31 = 33;
*((_QWORD *)&v31 + 1) = 30;
strcpy((char *)v32, "Please wait, uploading list...");
sub_100278250((float *)&v34, 0.5, 1.0);
v13 = TextArea::create(&v31, (__int64)"chatFont.fnt", &v34, 0, 0, 1.0, 400.0, 20.0);
a1[85] = v13;
if ( (v31 & 1) != 0 )
{
operator delete(v32);
v13 = (char *)a1[85];
}
(*(void (__fastcall **)(_QWORD, char *))(*(_QWORD *)a1[73] + 456LL))(a1[73], v13);
v14 = a1[85];
sub_100278250((float *)&v34, v36 * 0.5, (float)(v37 * 0.5) + -30.0);
v15 = (*(double (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v14 + 184LL))(v14, &v34);
*((_DWORD *)a1 + 160) = -1;
v16 = LoadingCircle::create(v15);
a1[86] = v16;
*(_QWORD *)(v16 + 552) = a1[73];
*(_BYTE *)(v16 + 560) = 0;
LoadingCircle::show(v16);
v17 = *(_QWORD *)(a1[86] + 544LL);
sub_100278250((float *)&v34, v36 * 0.5, (float)(0.5 * v37) + 20.0);
v18 = (*(double (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v17 + 184LL))(v17, &v34);
*(_QWORD *)(GameLevelManager::sharedState(v18) + 1280) = a1 + 83;
v19 = GameLevelManager::sharedState(v18);
v20 = GameLevelManager::uploadLevelList(v19, a1[84]);
v21 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_01_001.png", v20);
v22 = CCMenuItemSpriteExtra::create((__int64)v21, 0, (__int64)a1, (__int64)sub_10034F940, 0);
a1[87] = v22;
v23 = a1[69];
v24 = v22;
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v23 + 456LL))(v23, v22);
v25 = a1[87];
v26 = a1[69];
v27 = cocos2d::CCDirector::sharedDirector(v23, v24);
v33 = sub_100479760(v27) + 40.0;
v28 = cocos2d::CCDirector::sharedDirector(v27, v24);
v29 = sub_100479740(v28);
sub_100278250((float *)&v30, v33, *(float *)&v29 + -40.0);
cocos2d::CCNode::convertToNodeSpace((double *)&v34, v26, &v30);
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v25 + 184LL))(v25, &v34);
return v4;
}