//
// DemonInfoPopup::init from 0x5f7da0 to 0x5f83a8 (1544 bytes)
//
// 1 xrefs:
// > DemonInfoPopup::create @ 0x5f8468
//
// 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:54:32 +0000
//
GameManager *__fastcall DemonInfoPopup::init(
const cocos2d::CCPoint **this,
unsigned int a2,
unsigned int a3,
unsigned int a4,
unsigned int a5,
unsigned int a6,
unsigned int a7,
unsigned int a8,
unsigned int a9,
unsigned int a10,
unsigned int a11,
int a12,
int a13)
{
GameManager *v15; // r0
int v16; // r7
void (__fastcall *v17)(int, _DWORD *); // r6
int (__fastcall *v18)(int, _DWORD *); // r6
cocos2d::CCMenu *v19; // r0
const cocos2d::CCPoint *v20; // r0
cocos2d::CCLabelBMFont *v21; // r1
cocos2d::CCString *v22; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v24; // r2
cocos2d::CCArray *v25; // r6
cocos2d::CCLabelBMFont *v26; // r1
cocos2d::CCString *v27; // r0
cocos2d::CCLabelBMFont *v28; // r0
const char *v29; // r2
cocos2d::CCObject *v30; // r7
void (__fastcall *v31)(cocos2d::CCObject *, _DWORD *); // r2
float v32; // r0
int v33; // r7
float v34; // r6
unsigned int v35; // r5
unsigned int v36; // r6
cocos2d::CCString *v37; // r0
const char *v38; // r0
const char *v39; // r9
size_t v40; // r0
const char *v41; // r1
cocos2d::CCSprite *v42; // r0
int v43; // r9
const char *v44; // r2
cocos2d::CCLabelBMFont *v45; // r0
int v46; // r6
void (__fastcall *v47)(int, _DWORD *); // r11
const char *v48; // r2
cocos2d::CCLabelBMFont *v49; // r0
int v50; // r5
void (__fastcall *v51)(int, _DWORD *); // r10
int v52; // r11
void (__fastcall *v53)(int, _DWORD *); // r2
const char *v54; // r1
cocos2d::CCLabelBMFont *v55; // r1
cocos2d::CCString *v56; // r0
cocos2d::CCLabelBMFont *v57; // r0
const char *v58; // r2
int v59; // r10
void (__fastcall *v60)(int, _DWORD *); // r5
cocos2d::CCLabelBMFont *v61; // r1
cocos2d::CCString *v62; // r0
cocos2d::CCLabelBMFont *v63; // r0
const char *v64; // r2
int v65; // r5
void (__fastcall *v66)(int, _DWORD *); // r6
ButtonSprite *v67; // r0
int v68; // r5
const cocos2d::CCPoint *v69; // r9
void (__fastcall *v70)(int, _BYTE *); // r7
GameManager *v72; // [sp+Ch] [bp-80h]
float v75; // [sp+28h] [bp-64h] BYREF
float v76; // [sp+2Ch] [bp-60h]
_BYTE v77[8]; // [sp+30h] [bp-5Ch] BYREF
char v78[4]; // [sp+38h] [bp-54h] BYREF
float v79; // [sp+3Ch] [bp-50h]
_BYTE v80[8]; // [sp+40h] [bp-4Ch] BYREF
_BYTE v81[8]; // [sp+48h] [bp-44h] BYREF
int v82[2]; // [sp+50h] [bp-3Ch] BYREF
cocos2d::CCSprite *v83; // [sp+58h] [bp-34h]
char v84; // [sp+5Ch] [bp-30h] BYREF
char v85; // [sp+5Dh] [bp-2Fh] BYREF
cocos2d::CCLabelBMFont *v86; // [sp+64h] [bp-28h]
unsigned __int8 v87; // [sp+68h] [bp-24h] BYREF
_BYTE v88[7]; // [sp+69h] [bp-23h] BYREF
cocos2d::CCLabelBMFont *v89; // [sp+70h] [bp-1Ch]
_DWORD v90[4]; // [sp+74h] [bp-18h] BYREF
v15 = FLAlertLayer::init((FLAlertLayer *)this, 75);
v72 = v15;
if ( v15 )
{
cocos2d::CCDirector::sharedDirector(v15);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v75);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v90, 0.0, 0.0, 80.0, 80.0);
v16 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v90);
v17 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v90, 380.0, 210.0);
v17(v16, v90);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v16, -1);
v18 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, v75 * 0.5, v76 * 0.5);
v19 = (cocos2d::CCMenu *)v18(v16, v90);
v20 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v19);
*(this + 111) = v20;
(*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *, int))(*(_DWORD *)*(this + 115) + 232))(
*(this + 115),
v20,
10);
GameToolbox::pointsToString((GameToolbox *)&v87, a2 + a3 + a4 + a5 + a6);
if ( (v87 & 1) != 0 )
v21 = v89;
else
v21 = (cocos2d::CCLabelBMFont *)v88;
v22 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Classic: %s",
(const char *)v21);
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v22);
v25 = (cocos2d::CCArray *)cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v24);
std::string::~string((int)&v87);
(*(void (__fastcall **)(_DWORD, cocos2d::CCArray *))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v25);
(*(void (__fastcall **)(cocos2d::CCArray *, int))(*(_DWORD *)v25 + 80))(v25, 1060320051);
GameToolbox::pointsToString((GameToolbox *)&v87, a7 + a8 + a9 + a10 + a11);
if ( (v87 & 1) != 0 )
v26 = v89;
else
v26 = (cocos2d::CCLabelBMFont *)v88;
v27 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Platformer: %s",
(const char *)v26,
v87 << 31);
v28 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v27);
v30 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v28, "goldFont.fnt", v29);
std::string::~string((int)&v87);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v30);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v30 + 80))(v30, 1060320051);
v31 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v30 + 536);
LOWORD(v90[0]) = -14081;
BYTE2(v90[0]) = -1;
v31(v30, v90);
v32 = COERCE_FLOAT(cocos2d::CCArray::create(v25, v30, 0));
v33 = 0;
v34 = v32;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, v75 * 0.5, (float)((float)(v76 * 0.5) + 105.0) - 20.0);
GameToolbox::alignItemsHorisontally(v34, 30.0, (int)v90, 0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, (float)(v75 * 0.5) - 140.0, (float)(v76 * 0.5) + 35.0);
do
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, (float)v33 * 70.0, 0.0);
cocos2d::CCPoint::operator+(v80, v77, v90);
switch ( v33 )
{
case 1:
v35 = a8;
v36 = a3;
v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"difficulty_%02d_btn2_001.png",
byte_8);
break;
case 2:
v35 = a9;
v36 = a4;
v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"difficulty_%02d_btn2_001.png",
&byte_6);
break;
case 3:
v35 = a10;
v36 = a5;
v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"difficulty_%02d_btn2_001.png",
byte_9);
break;
case 4:
v35 = a11;
v36 = a6;
v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"difficulty_%02d_btn2_001.png",
&byte_9[1]);
break;
default:
v35 = a7;
v36 = a2;
v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"difficulty_%02d_btn2_001.png",
&byte_7);
break;
}
v38 = (const char *)cocos2d::CCString::getCString(v37);
v82[0] = 0;
v82[1] = 0;
v83 = nullptr;
v39 = v38;
v40 = strlen(v38);
std::string::__init(v82, v39, v40);
if ( (v82[0] & 1) != 0 )
v42 = v83;
else
v42 = (cocos2d::CCSprite *)((char *)v82 + 1);
v43 = cocos2d::CCSprite::createWithSpriteFrameName(v42, v41);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v43 + 80))(v43, 1065353216);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v43 + 92))(v43, v80);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v43);
GameToolbox::pointsToString((GameToolbox *)&v84, v36);
if ( (v84 & 1) != 0 )
v45 = v86;
else
v45 = (cocos2d::CCLabelBMFont *)&v85;
v46 = cocos2d::CCLabelBMFont::create(v45, "goldFont.fnt", v44);
std::string::~string((int)&v84);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v46 + 80))(v46, 1058642330);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v46);
v47 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v46 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, 0.0, -50.0);
cocos2d::CCPoint::operator+(v90, v80, v81);
v47(v46, v90);
GameToolbox::pointsToString((GameToolbox *)&v87, v35);
if ( (v87 & 1) != 0 )
v49 = v89;
else
v49 = (cocos2d::CCLabelBMFont *)v88;
v50 = cocos2d::CCLabelBMFont::create(v49, "goldFont.fnt", v48);
std::string::~string((int)&v87);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v50 + 80))(v50, 1058642330);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v50);
v51 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v50 + 92);
v52 = (*(int (__fastcall **)(int))(*(_DWORD *)v46 + 96))(v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, 0.0, -26.0);
cocos2d::CCPoint::operator+(v90, v52, v81);
v51(v50, v90);
v53 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v50 + 536);
LOWORD(v90[0]) = -14081;
BYTE2(v90[0]) = -1;
v53(v50, v90);
++v33;
std::string::~string((int)v82);
}
while ( v33 != 5 );
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v78,
(float)((float)(v75 * 0.5) + 190.0) - 12.0,
(float)((float)(v76 * 0.5) - 105.0) + 14.0);
if ( a13 > 0 )
{
GameToolbox::pointsToString((GameToolbox *)&v87, a13);
if ( (v87 & 1) != 0 )
v55 = v89;
else
v55 = (cocos2d::CCLabelBMFont *)v88;
v56 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Gauntlet: %s",
(const char *)v55,
v87 << 31);
v57 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v56);
v59 = cocos2d::CCLabelBMFont::create(v57, "goldFont.fnt", v58);
std::string::~string((int)&v87);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v59);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v59 + 80))(v59, 1053609165);
v60 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v59 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, 1.0, 0.0);
v60(v59, v90);
(*(void (__fastcall **)(int, char *))(*(_DWORD *)v59 + 92))(v59, v78);
v79 = v79 + 16.0;
}
if ( a12 > 0 )
{
GameToolbox::pointsToString((GameToolbox *)&v87, a12);
if ( (v87 & 1) != 0 )
v61 = v89;
else
v61 = (cocos2d::CCLabelBMFont *)v88;
v62 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Weekly: %s",
(const char *)v61);
v63 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v62);
v65 = cocos2d::CCLabelBMFont::create(v63, "goldFont.fnt", v64);
std::string::~string((int)&v87);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v65);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v65 + 80))(v65, 1053609165);
v66 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v65 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, 1.0, 0.0);
v66(v65, v90);
(*(void (__fastcall **)(int, char *))(*(_DWORD *)v65 + 92))(v65, v78);
}
v67 = ButtonSprite::create((ButtonSprite *)"OK", v54);
v90[0] = DemonInfoPopup::onClose;
v90[1] = 0;
v68 = CCMenuItemSpriteExtra::create((int)v67, 0, (int)this, (int)DemonInfoPopup::onClose, 0);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v68);
v69 = *(this + 111);
v70 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v68 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v80, v75 * 0.5, (float)((float)(v76 * 0.5) - 105.0) + 25.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v81, v69);
v70(v68, v81);
}
return v72;
}