//
// LevelStatsInfoPopup::init from 0x79c324 to 0x79c5e8 (708 bytes)
//
// 1 xrefs:
// > LevelStatsInfoPopup::create @ 0x79c76e
//
// 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:59:50 +0000
//
GameManager *__fastcall LevelStatsInfoPopup::init(LevelStatsInfoPopup *this, GJGameLevel *a2)
{
GameManager *v4; // r0
GameManager *v5; // r8
int v6; // r9
const char *v7; // r2
int v8; // r0
int v9; // r6
void (__fastcall *v10)(int, _DWORD *); // r9
int v11; // s16
int v12; // r10
void (__fastcall *v13)(int, _DWORD *); // r11
int v14; // r6
void (__fastcall *v15)(int, _DWORD *); // r9
cocos2d::CCMenu *v16; // r0
int v17; // r0
ButtonSprite *v18; // r0
int v19; // r0
const char *v20; // r1
int v21; // r9
int v22; // r0
const char *v23; // r1
cocos2d::CCSprite *v24; // r6
int v25; // r0
bool v27; // [sp+4h] [bp-50h]
float v28[2]; // [sp+10h] [bp-44h] BYREF
_BYTE v29[8]; // [sp+18h] [bp-3Ch] BYREF
int (__fastcall *v30)(LevelStatsInfoPopup *, cocos2d::CCObject *); // [sp+20h] [bp-34h]
int v31; // [sp+24h] [bp-30h]
int (__fastcall *v32)(LevelStatsInfoPopup *, cocos2d::CCObject *); // [sp+28h] [bp-2Ch]
int v33; // [sp+2Ch] [bp-28h]
_BYTE v34[12]; // [sp+30h] [bp-24h] BYREF
_DWORD v35[4]; // [sp+3Ch] [bp-18h] BYREF
v4 = FLAlertLayer::init(this, 150);
v5 = v4;
if ( v4 )
{
*((_DWORD *)this + 130) = a2;
cocos2d::CCDirector::sharedDirector(v4);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v28);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v29, v28[0] * 0.5, v28[1] * 0.5);
*((_DWORD *)this + 138) = 1136525312;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v35, 0.0, 0.0, 94.0, 94.0);
v6 = cocos2d::extension::CCScale9Sprite::create("square01_001.png", v35);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v6 + 92))(v6, v29);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v6);
*((_DWORD *)this + 137) = v6;
v8 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Level Stats", "goldFont.fnt", v7);
*((_DWORD *)this + 133) = v8;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v8 + 80))(v8, 1063675494);
v9 = *((_DWORD *)this + 133);
v10 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, 0.5, 1.0);
v10(v9, v35);
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 133),
3);
*(float *)&v11 = *((float *)this + 138) - 60.0;
LevelStatsInfoPopup::buildStatsText((LevelStatsInfoPopup *)v34, (int)this);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, 0.5, 0.5);
*((_DWORD *)this + 131) = TextArea::create(
(int)v34,
"chatFont.fnt",
1065353216,
v11,
(const cocos2d::CCPoint *)v35,
1101004800,
0,
0);
std::string::~string((int)v34);
v12 = *((_DWORD *)this + 131);
v13 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v12 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, 0.5, 0.5);
v13(v12, v35);
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 131),
3);
LevelStatsInfoPopup::buildInfoText((LevelStatsInfoPopup *)v34, (int)this);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, 0.5, 0.5);
*((_DWORD *)this + 132) = TextArea::create(
(int)v34,
"chatFont.fnt",
1065353216,
v11,
(const cocos2d::CCPoint *)v35,
1101004800,
0,
0);
std::string::~string((int)v34);
v14 = *((_DWORD *)this + 132);
v15 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v14 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, 0.5, 0.5);
v15(v14, v35);
v16 = (cocos2d::CCMenu *)(*(int (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 132),
3);
v17 = cocos2d::CCMenu::create(v16);
*((_DWORD *)this + 111) = v17;
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v17, 5);
v18 = ButtonSprite::create((ButtonSprite *)"OK", (const char *)&dword_58 + 2, 0, 1.0, 0.0, v27);
v30 = LevelStatsInfoPopup::onClose;
v31 = 0;
v19 = CCMenuItemSpriteExtra::create((int)v18, 0, (int)this, (int)LevelStatsInfoPopup::onClose, 0);
*((_DWORD *)this + 136) = v19;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v19);
v21 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v20);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v21 + 80))(v21, 1063675494);
v32 = LevelStatsInfoPopup::onPrevPage;
v33 = 0;
v22 = CCMenuItemSpriteExtra::create(v21, 0, (int)this, (int)LevelStatsInfoPopup::onPrevPage, 0);
*((_DWORD *)this + 134) = v22;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v22);
v24 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_01_001.png",
v23);
cocos2d::CCSprite::setFlipX(v24, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v24 + 80))(v24, 1063675494);
v35[0] = LevelStatsInfoPopup::onNextPage;
v35[1] = 0;
v25 = CCMenuItemSpriteExtra::create((int)v24, 0, (int)this, (int)LevelStatsInfoPopup::onNextPage, 0);
*((_DWORD *)this + 135) = v25;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v25);
LevelStatsInfoPopup::updatePage(this);
}
return v5;
}