//
// SetLevelOrderPopup::init from 0x10034c770 to 0x10034ca31 (705 bytes)
//
// 1 xrefs:
// > sub_10034AE10 @ 0x10034aff1
//
// 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:48 +0000
//
__int64 __fastcall SetLevelOrderPopup::init(_QWORD *a1, int a2, unsigned int a3, int a4)
{
__int64 v5; // r14
__int64 v6; // rsi
unsigned int v7; // ebx
__int64 v8; // rax
double v9; // xmm0_8
char *v10; // r13
void *v11; // r13
char *v12; // r15
void *v13; // r12
unsigned int v15; // [rsp+20h] [rbp-80h] BYREF
double v16; // [rsp+28h] [rbp-78h] BYREF
unsigned __int64 v17; // [rsp+30h] [rbp-70h] BYREF
char v18; // [rsp+38h] [rbp-68h] BYREF
char v19[15]; // [rsp+39h] [rbp-67h] BYREF
void *v20; // [rsp+48h] [rbp-58h]
char v21; // [rsp+50h] [rbp-50h] BYREF
char v22[15]; // [rsp+51h] [rbp-4Fh] BYREF
void *__p; // [rsp+60h] [rbp-40h]
float v24[2]; // [rsp+68h] [rbp-38h] BYREF
unsigned __int64 v25[6]; // [rsp+70h] [rbp-30h] BYREF
v5 = (__int64)a1;
v18 = 22;
strcpy(v19, "Level Order");
v21 = 4;
strcpy(v22, "OK");
v6 = a3;
v7 = SetIDPopup::init(a1, a3, 1, a4, (__int64)&v18, (__int64)&v21, 0.0, 0, 0, 1, 1);
if ( (v21 & 1) == 0 )
{
if ( (v18 & 1) == 0 )
goto LABEL_3;
LABEL_7:
a1 = v20;
operator delete(v20);
if ( !(_BYTE)v7 )
return v7;
goto LABEL_4;
}
a1 = __p;
operator delete(__p);
if ( (v18 & 1) != 0 )
goto LABEL_7;
LABEL_3:
if ( (_BYTE)v7 )
{
LABEL_4:
*(_DWORD *)(v5 + 704) = a2;
v8 = cocos2d::CCDirector::sharedDirector(a1, v6);
cocos2d::CCDirector::getWinSize(v24, v8);
*(_QWORD *)&v9 = LODWORD(v24[0]);
*(float *)&v9 = v24[0] * 0.5;
sub_100278250((float *)&v15, v24[0] * 0.5, (float)(0.5 * v24[1]) + 5.0);
cocos2d::CCNode::convertToNodeSpace((double *)v25, *(_QWORD *)(v5 + 552), &v15);
v10 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"edit_leftBtn2_001.png", v9);
(*(void (__fastcall **)(char *, void *))(*(_QWORD *)v10 + 960LL))(v10, &unk_100A0825B);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v10 + 160LL))(v10, 1.1);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v10 + 360LL))(v10, 90.0);
v11 = CCMenuItemSpriteExtra::create((__int64)v10, 0, v5, (__int64)SetLevelOrderPopup::onOrderButton, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v5 + 552) + 456LL))(*(_QWORD *)(v5 + 552), v11);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v11 + 72LL))(v11, 0);
sub_100278250((float *)&v17, -85.0, 0.0);
sub_100278350(&v16, v25, &v17);
(*(void (__fastcall **)(void *, double *))(*(_QWORD *)v11 + 184LL))(v11, &v16);
CCMenuItemSpriteExtra::setSizeMult((__int64)v11, 1.4);
v12 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"edit_rightBtn2_001.png", COERCE_DOUBLE(1068708659));
(*(void (__fastcall **)(char *, void *))(*(_QWORD *)v12 + 960LL))(v12, &unk_100A0825E);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v12 + 160LL))(v12, 1.1);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v12 + 360LL))(v12, 90.0);
v13 = CCMenuItemSpriteExtra::create((__int64)v12, 0, v5, (__int64)SetLevelOrderPopup::onOrderButton, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v5 + 552) + 456LL))(*(_QWORD *)(v5 + 552), v13);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v13 + 72LL))(v13, 1);
sub_100278250((float *)&v17, 85.0, 0.0);
sub_100278350(&v16, v25, &v17);
(*(void (__fastcall **)(void *, double *))(*(_QWORD *)v13 + 184LL))(v13, &v16);
CCMenuItemSpriteExtra::setSizeMult((__int64)v13, 1.4);
}
return v7;
}