//
// DemonInfoPopup::init from 0x100231614 to 0x100231e44 (2096 bytes)
//
// 1 xrefs:
// > DemonInfoPopup::create @ 0x1002315b4
//
// 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 11:01:17 +0000
//
__int64 __fastcall DemonInfoPopup::init(
__int64 a1,
unsigned int a2,
unsigned int a3,
unsigned int a4,
int a5,
unsigned int a6,
unsigned int a7,
unsigned int a8,
unsigned int a9,
unsigned int a10,
unsigned int a11,
int a12,
int a13)
{
__int64 inited; // x0
__int64 v20; // x24
__int64 v21; // x0
__int64 v22; // x19
__int64 v23; // x0
__int64 v24; // x0
void **v25; // x8
__int64 v26; // x0
__int64 CString; // x0
__int64 v28; // x19
void **v29; // x8
__int64 v30; // x0
__int64 v31; // x0
__int64 v32; // x21
__int64 v33; // x19
int i; // w26
__int64 v35; // x22
int v36; // w8
__int64 v37; // x21
__int64 v38; // x0
char *v39; // x0
void **v40; // x0
__int64 v41; // x23
void **v42; // x0
__int64 v43; // x21
double v44; // d0
void **v45; // x0
__int64 v46; // x22
float32x2_t *v47; // x21
double v48; // d0
void **v49; // x8
__int64 v50; // x0
__int64 v51; // x0
__int64 v52; // x19
void **v53; // x8
__int64 v54; // x0
__int64 v55; // x0
__int64 v56; // x19
__int64 v57; // x0
__int64 v58; // x19
__int64 v59; // x20
__n128 v60; // q0
unsigned int v62; // [xsp+20h] [xbp-E0h]
unsigned int v63; // [xsp+2Ch] [xbp-D4h]
unsigned int v64; // [xsp+34h] [xbp-CCh]
unsigned int v65; // [xsp+38h] [xbp-C8h]
float32x2_t v68; // [xsp+48h] [xbp-B8h] BYREF
void *v69[2]; // [xsp+50h] [xbp-B0h] BYREF
char v70; // [xsp+67h] [xbp-99h]
float32x2_t v71; // [xsp+68h] [xbp-98h] BYREF
float32x2_t v72; // [xsp+70h] [xbp-90h] BYREF
void *__p[2]; // [xsp+78h] [xbp-88h] BYREF
char v74; // [xsp+8Fh] [xbp-71h]
__int64 v75; // [xsp+90h] [xbp-70h] BYREF
inited = FLAlertLayer::init_1(a1, 75);
v20 = inited;
if ( (_DWORD)inited )
{
v62 = inited;
v21 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v21, &v75);
sub_1000262CC((float *)__p, 0.0, 0.0, 80.0, 80.0);
v22 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", __p);
sub_1000262C4((float *)__p, 380.0, 210.0);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v22 + 320LL))(v22, __p);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v22,
0xFFFFFFFFLL);
sub_1000262BC((float *)__p, *(float *)&v75 * 0.5, *((float *)&v75 + 1) * 0.5);
v23 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v22 + 184LL))(v22, __p);
v24 = cocos2d::CCMenu::create(v23);
*(_QWORD *)(a1 + 552) = v24;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v24, 10);
GameToolbox::pointsToString(a3 + a2 + a4 + a5 + a6, (__int64)__p);
if ( v74 >= 0 )
v25 = __p;
else
v25 = (void **)__p[0];
v26 = sub_1003065B0("Classic: %s", (const char *)v25);
CString = cocos2d::CCString::getCString(v26);
v28 = cocos2d::CCLabelBMFont::create_1(CString, "goldFont.fnt");
if ( v74 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v28);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v28 + 160LL))(v28, 0.7);
GameToolbox::pointsToString(a8 + a7 + a9 + a10 + a11, (__int64)__p);
if ( v74 >= 0 )
v29 = __p;
else
v29 = (void **)__p[0];
v30 = sub_1003065B0("Platformer: %s", (const char *)v29);
v31 = cocos2d::CCString::getCString(v30);
v32 = cocos2d::CCLabelBMFont::create_1(v31, "goldFont.fnt");
v63 = a3;
v64 = a5;
v65 = a6;
if ( v74 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v32);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v32 + 160LL))(v32, 0.7);
BYTE2(__p[0]) = -1;
LOWORD(__p[0]) = -14081;
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v32 + 1072LL))(v32, __p);
v33 = sub_1002E7468(v28);
sub_1000262BC((float *)__p, *(float *)&v75 * 0.5, (float)((float)(*((float *)&v75 + 1) * 0.5) + 105.0) + -20.0);
GameToolbox::alignItemsHorisontally(v33, (float32x2_t *)__p, 0, 30.0);
sub_1000262BC((float *)&v72, (float)(*(float *)&v75 * 0.5) + -140.0, (float)(*((float *)&v75 + 1) * 0.5) + 35.0);
for ( i = 0; i != 5; ++i )
{
sub_1000262BC((float *)__p, (float)(unsigned int)i * 70.0, 0.0);
sub_100026318(&v72, (float32x2_t *)__p, &v71);
if ( i <= 1 )
{
if ( i )
{
v36 = 8;
v35 = a8;
v37 = v63;
}
else
{
v36 = 7;
v35 = a7;
v37 = a2;
}
}
else if ( i == 2 )
{
v36 = 6;
v35 = a9;
v37 = a4;
}
else if ( i == 3 )
{
v35 = a10;
v36 = 9;
v37 = v64;
}
else
{
v36 = 10;
v35 = a11;
v37 = v65;
}
v38 = sub_1003065B0("difficulty_%02d_btn2_001.png", v36);
v39 = (char *)cocos2d::CCString::getCString(v38);
sub_100009900(__p, v39);
if ( v74 >= 0 )
v40 = __p;
else
v40 = (void **)__p[0];
v41 = cocos2d::CCSprite::createWithSpriteFrameName(v40);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v41 + 160LL))(v41, 1.0);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v41 + 184LL))(v41, &v71);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v41);
GameToolbox::pointsToString(v37, (__int64)v69);
if ( v70 >= 0 )
v42 = v69;
else
v42 = (void **)v69[0];
v43 = cocos2d::CCLabelBMFont::create_1(v42, "goldFont.fnt");
if ( v70 < 0 )
operator delete(v69[0]);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v43 + 160LL))(v43, 0.6);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v43);
sub_1000262BC((float *)&v68, 0.0, -50.0);
*(float32x2_t *)&v44 = sub_100026318(&v71, &v68, (float32x2_t *)v69);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v43 + 184LL))(v43, v69, v44);
GameToolbox::pointsToString(v35, (__int64)v69);
if ( v70 >= 0 )
v45 = v69;
else
v45 = (void **)v69[0];
v46 = cocos2d::CCLabelBMFont::create_1(v45, "goldFont.fnt");
if ( v70 < 0 )
operator delete(v69[0]);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v46 + 160LL))(v46, 0.6);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v46);
v47 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v43 + 192LL))(v43);
sub_1000262BC((float *)&v68, 0.0, -26.0);
*(float32x2_t *)&v48 = sub_100026318(v47, &v68, (float32x2_t *)v69);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v46 + 184LL))(v46, v69, v48);
BYTE2(v69[0]) = -1;
LOWORD(v69[0]) = -14081;
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v46 + 1072LL))(v46, v69);
if ( v74 < 0 )
operator delete(__p[0]);
}
sub_1000262BC(
(float *)v69,
(float)((float)(*(float *)&v75 * 0.5) + 190.0) + -12.0,
(float)((float)(*((float *)&v75 + 1) * 0.5) + -105.0) + 14.0);
v20 = v62;
if ( a13 > 0 )
{
GameToolbox::pointsToString((unsigned int)a13, (__int64)__p);
if ( v74 >= 0 )
v49 = __p;
else
v49 = (void **)__p[0];
v50 = sub_1003065B0("Gauntlet: %s", (const char *)v49);
v51 = cocos2d::CCString::getCString(v50);
v52 = cocos2d::CCLabelBMFont::create_1(v51, "goldFont.fnt");
if ( v74 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v52);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v52 + 160LL))(v52, 0.4);
sub_1000262BC((float *)__p, 1.0, 0.0);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v52 + 296LL))(v52, __p);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v52 + 184LL))(v52, v69);
*((float *)v69 + 1) = *((float *)v69 + 1) + 16.0;
}
if ( a12 >= 1 )
{
GameToolbox::pointsToString((unsigned int)a12, (__int64)__p);
if ( v74 >= 0 )
v53 = __p;
else
v53 = (void **)__p[0];
v54 = sub_1003065B0("Weekly: %s", (const char *)v53);
v55 = cocos2d::CCString::getCString(v54);
v56 = cocos2d::CCLabelBMFont::create_1(v55, "goldFont.fnt");
if ( v74 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v56);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v56 + 160LL))(v56, 0.4);
sub_1000262BC((float *)__p, 1.0, 0.0);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v56 + 296LL))(v56, __p);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v56 + 184LL))(v56, v69);
}
v57 = sub_100067FAC((__int64)"OK");
v58 = CCMenuItemSpriteExtra::create(v57, 0, a1, sub_100231EAC, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v58);
v59 = *(_QWORD *)(a1 + 552);
sub_1000262BC((float *)&v71, *(float *)&v75 * 0.5, (float)((float)(*((float *)&v75 + 1) * 0.5) + -105.0) + 25.0);
cocos2d::CCNode::convertToNodeSpace(__p, v59, &v71, v60);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v58 + 184LL))(v58, __p);
}
return v20;
}