//
// StarInfoPopup::init from 0x5f8498 to 0x5f8a24 (1420 bytes)
//
// 1 xrefs:
// > StarInfoPopup::create @ 0x5f8ae6
//
// 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:33 +0000
//
GameManager *__fastcall StarInfoPopup::init(
const cocos2d::CCPoint **this,
unsigned int a2,
unsigned int a3,
unsigned int a4,
unsigned int a5,
unsigned int a6,
unsigned int a7,
int a8,
int a9,
int a10,
bool a11)
{
GameManager *v14; // r0
int v15; // r6
void (__fastcall *v16)(int, _DWORD *); // r7
int (__fastcall *v17)(int, _DWORD *); // r7
cocos2d::CCMenu *v18; // r0
const cocos2d::CCPoint *v19; // r0
const char *v20; // r5
size_t v21; // r0
const char *v22; // r5
char *v23; // r2
cocos2d::CCString *v24; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v26; // r2
int v27; // r5
void (__fastcall *v28)(int, _DWORD *); // r7
float v29; // s15
int i; // r6
unsigned int v31; // r7
int v32; // r0
cocos2d::CCSprite *v33; // r8
const char *v34; // r2
cocos2d::CCLabelBMFont *v35; // r0
int v36; // r7
const char *v37; // r1
char *v38; // r1
cocos2d::CCString *v39; // r0
cocos2d::CCLabelBMFont *v40; // r0
const char *v41; // r2
int v42; // r6
void (__fastcall *v43)(int, _DWORD *); // r10
char *v44; // r1
cocos2d::CCString *v45; // r0
cocos2d::CCLabelBMFont *v46; // r0
const char *v47; // r2
int v48; // r6
void (__fastcall *v49)(int, _DWORD *); // r10
char *v50; // r1
cocos2d::CCString *v51; // r0
cocos2d::CCLabelBMFont *v52; // r0
const char *v53; // r2
int v54; // r10
void (__fastcall *v55)(int, _DWORD *); // r6
ButtonSprite *v56; // r0
int v57; // r5
const cocos2d::CCPoint *v58; // r7
void (__fastcall *v59)(int, _BYTE *); // r6
GameManager *v61; // [sp+Ch] [bp-A0h]
void (__fastcall *v62)(int, _DWORD *); // [sp+10h] [bp-9Ch]
float v64; // [sp+24h] [bp-88h] BYREF
float v65; // [sp+28h] [bp-84h]
_BYTE v66[8]; // [sp+2Ch] [bp-80h] BYREF
char v67[4]; // [sp+34h] [bp-78h] BYREF
float v68; // [sp+38h] [bp-74h]
_BYTE v69[8]; // [sp+3Ch] [bp-70h] BYREF
_BYTE v70[8]; // [sp+44h] [bp-68h] BYREF
int v71[2]; // [sp+4Ch] [bp-60h] BYREF
const char *v72; // [sp+54h] [bp-58h]
char v73; // [sp+58h] [bp-54h] BYREF
char v74; // [sp+59h] [bp-53h] BYREF
char *v75; // [sp+60h] [bp-4Ch]
char v76; // [sp+64h] [bp-48h] BYREF
char v77; // [sp+65h] [bp-47h] BYREF
cocos2d::CCLabelBMFont *v78; // [sp+6Ch] [bp-40h]
char v79; // [sp+70h] [bp-3Ch] BYREF
char v80; // [sp+71h] [bp-3Bh] BYREF
char *v81; // [sp+78h] [bp-34h]
unsigned __int8 v82; // [sp+7Ch] [bp-30h] BYREF
char v83; // [sp+7Dh] [bp-2Fh] BYREF
char *v84; // [sp+84h] [bp-28h]
char v85; // [sp+88h] [bp-24h] BYREF
char v86; // [sp+89h] [bp-23h] BYREF
char *v87; // [sp+90h] [bp-1Ch]
_DWORD v88[4]; // [sp+94h] [bp-18h] BYREF
v14 = FLAlertLayer::init((FLAlertLayer *)this, 75);
v61 = v14;
if ( v14 )
{
cocos2d::CCDirector::sharedDirector(v14);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v64);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v88, 0.0, 0.0, 80.0, 80.0);
v15 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v88);
v16 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v15 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v88, 380.0, 210.0);
v16(v15, v88);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v15, -1);
v17 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v15 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v88, v64 * 0.5, v65 * 0.5);
v18 = (cocos2d::CCMenu *)v17(v15, v88);
v19 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v18);
*(this + 111) = v19;
(*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *, int))(*(_DWORD *)*(this + 115) + 232))(
*(this + 115),
v19,
10);
if ( a11 )
v20 = "Platformer";
else
v20 = "Classic";
v71[0] = 0;
v71[1] = 0;
v72 = nullptr;
v21 = strlen(v20);
std::string::__init(v71, v20, v21);
if ( (v71[0] & 1) != 0 )
v22 = v72;
else
v22 = (char *)v71 + 1;
GameToolbox::pointsToString((GameToolbox *)&v73, a3 + a4 + a5 + a6 + a7);
if ( (v73 & 1) != 0 )
v23 = v75;
else
v23 = &v74;
v24 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s: %s", v22, v23);
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v24);
v27 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v26);
std::string::~string((int)&v73);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v27);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v27 + 80))(v27, 1060320051);
v28 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v27 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v88, v64 * 0.5, (float)((float)(v65 * 0.5) + 105.0) - 20.0);
v28(v27, v88);
v29 = (float)(v64 * 0.5) - 147.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, v29, (float)(v65 * 0.5) + 25.0);
for ( i = 0; i != 6; ++i )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v88, (float)i * 59.0, 0.0);
cocos2d::CCPoint::operator+(v69, v66, v88);
switch ( i )
{
case 1:
v31 = a3;
goto LABEL_40;
case 2:
v31 = a4;
goto LABEL_40;
case 3:
v31 = a5;
goto LABEL_40;
case 4:
v31 = a6;
goto LABEL_40;
case 5:
v31 = a7;
LABEL_40:
v32 = i;
break;
default:
v31 = a2;
v32 = -1;
break;
}
v33 = GJDifficultySprite::create((const char *)v32, (_BYTE *)&dword_0 + 1);
(*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v33 + 80))(v33, 1063675494);
(*(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_DWORD *)v33 + 92))(v33, v69);
(*(void (__fastcall **)(_DWORD, cocos2d::CCSprite *))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v33);
GameToolbox::pointsToString((GameToolbox *)&v76, v31);
if ( (v76 & 1) != 0 )
v35 = v78;
else
v35 = (cocos2d::CCLabelBMFont *)&v77;
v36 = cocos2d::CCLabelBMFont::create(v35, "goldFont.fnt", v34);
std::string::~string((int)&v76);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v36 + 80))(v36, 1058642330);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v36);
v62 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v36 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, 0.0, -40.0);
cocos2d::CCPoint::operator+(v88, v69, v70);
v62(v36, v88);
}
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v67,
(float)((float)(v64 * 0.5) + 190.0) - 12.0,
(float)((float)(v65 * 0.5) - 105.0) + 14.0);
if ( a9 > 0 )
{
GameToolbox::pointsToString((GameToolbox *)&v79, a9);
if ( (v79 & 1) != 0 )
v38 = v81;
else
v38 = &v80;
v39 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Gauntlet: %s", v38);
v40 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v39);
v42 = cocos2d::CCLabelBMFont::create(v40, "goldFont.fnt", v41);
std::string::~string((int)&v79);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v42);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v42 + 80))(v42, 1053609165);
v43 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v42 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v88, 1.0, 0.0);
v43(v42, v88);
(*(void (__fastcall **)(int, char *))(*(_DWORD *)v42 + 92))(v42, v67);
v68 = v68 + 16.0;
}
if ( a8 > 0 )
{
GameToolbox::pointsToString((GameToolbox *)&v82, a8);
if ( (v82 & 1) != 0 )
v44 = v84;
else
v44 = &v83;
v45 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Daily: %s", v44, v82 << 31);
v46 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v45);
v48 = cocos2d::CCLabelBMFont::create(v46, "goldFont.fnt", v47);
std::string::~string((int)&v82);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v48);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v48 + 80))(v48, 1053609165);
v49 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v48 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v88, 1.0, 0.0);
v49(v48, v88);
(*(void (__fastcall **)(int, char *))(*(_DWORD *)v48 + 92))(v48, v67);
v68 = v68 + 16.0;
}
if ( a10 > 0 )
{
GameToolbox::pointsToString((GameToolbox *)&v85, a10);
if ( (v85 & 1) != 0 )
v50 = v87;
else
v50 = &v86;
v51 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Map: %s", v50);
v52 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v51);
v54 = cocos2d::CCLabelBMFont::create(v52, "goldFont.fnt", v53);
std::string::~string((int)&v85);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v54);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v54 + 80))(v54, 1053609165);
v55 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v54 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v88, 1.0, 0.0);
v55(v54, v88);
(*(void (__fastcall **)(int, char *))(*(_DWORD *)v54 + 92))(v54, v67);
v68 = v68 + 16.0;
}
v56 = ButtonSprite::create((ButtonSprite *)"OK", v37);
v88[1] = 0;
v88[0] = StarInfoPopup::onClose;
v57 = CCMenuItemSpriteExtra::create((int)v56, 0, (int)this, (int)StarInfoPopup::onClose, 0);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v57);
v58 = *(this + 111);
v59 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v57 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, v64 * 0.5, (float)((float)(v65 * 0.5) - 105.0) + 25.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v70, v58);
v59(v57, v70);
std::string::~string((int)v71);
}
return v61;
}