//
// LevelPage::onInfo from 0x514e44 to 0x51509c (600 bytes)
//
// 1 xrefs:
// > LevelSelectLayer::onInfo @ 0x5150e8
//
// 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:51:36 +0000
//
int __fastcall LevelPage::onInfo(int this, cocos2d::CCObject *a2)
{
char *v2; // r8
int v3; // r7
int v4; // r3
int v5; // r1
size_t v6; // r0
int *v7; // r7
size_t v8; // r0
int *v9; // r7
int *v10; // r3
int v11; // r1
char *v12; // r2
char *v13; // r1
cocos2d::CCString *v14; // r0
const char *CString; // r8
size_t v16; // r0
const char *v17; // r1
GJGameLevel *v18; // r0
char *v19; // r8
int NormalPercent; // r0
cocos2d::CCString *v21; // r0
cocos2d::CCString *v22; // r0
char *v23; // r0
char *v24; // r0
size_t v25; // r0
int *v26; // r7
int v27; // [sp+Ch] [bp-1Ch] BYREF
int v28; // [sp+10h] [bp-18h]
char *v29; // [sp+14h] [bp-14h]
int v30; // [sp+18h] [bp-10h] BYREF
int v31; // [sp+1Ch] [bp-Ch]
char *v32; // [sp+20h] [bp-8h]
v3 = this;
v4 = *(_DWORD *)(this + 324);
if ( v4 )
{
v5 = *(_DWORD *)(v4 + 268) - *(_DWORD *)(v4 + 272);
if ( v5 == -1 )
{
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(
&v27,
"Roses are red\nViolets are blue\nWelcome to\n2.2",
0x4Du);
if ( (v27 & 1) == 0 )
v2 = (char *)&v27 + 1;
v30 = 0;
if ( (v27 & 1) != 0 )
v2 = v29;
v31 = 0;
v32 = nullptr;
v6 = strlen(v2);
std::string::__init(&v30, v2, v6);
v7 = FLAlertLayer::create(
0,
(cocos2d::CCLabelBMFont *)"It's a secret...",
(int)&v30,
(ButtonSprite *)"OK",
nullptr,
360.0);
std::string::~string((int)&v30);
(*(void (__fastcall **)(int *))(*v7 + 656))(v7);
}
else if ( v5 == -2 )
{
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(
&v27,
"The path leads to an old tower. It's been left alone for years, with little reason to explore.",
0x76u);
v30 = 0;
v31 = 0;
if ( (v27 & 1) == 0 )
v2 = (char *)&v27 + 1;
v32 = nullptr;
if ( (v27 & 1) != 0 )
v2 = v29;
v8 = strlen(v2);
std::string::__init(&v30, v2, v8);
v9 = FLAlertLayer::create(
0,
(cocos2d::CCLabelBMFont *)"The Tower",
(int)&v30,
(ButtonSprite *)"OK",
nullptr,
360.0);
std::string::~string((int)&v30);
(*(void (__fastcall **)(int *))(*v9 + 656))(v9);
}
else
{
v30 = 0;
v31 = 0;
v32 = nullptr;
if ( (*(_BYTE *)(v4 + 280) & 1) != 0 )
{
std::string::__init(&v30, *(const void **)(v4 + 288), *(_DWORD *)(v4 + 284));
}
else
{
v10 = (int *)(v4 + 280);
v11 = v10[1];
v12 = (char *)v10[2];
v30 = *v10;
v31 = v11;
v32 = v12;
}
if ( (v30 & 1) != 0 )
v13 = v32;
else
v13 = (char *)&v30 + 1;
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s\nTotal Attempts: %i",
v13,
*(_DWORD *)(*(_DWORD *)(v3 + 324) + 620) - *(_DWORD *)(*(_DWORD *)(v3 + 324) + 624));
CString = (const char *)cocos2d::CCString::getCString(v14);
v27 = 0;
v28 = 0;
v29 = nullptr;
v16 = strlen(CString);
std::string::__init(&v27, CString, v16);
std::string::~string((int)&v30);
v17 = *(const char **)(*(_DWORD *)(v3 + 324) + 1184);
if ( (int)v17 > 0 )
{
v22 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"\nPractice Attempts: %i",
v17);
v23 = (char *)cocos2d::CCString::getCString(v22);
std::string::append(&v27, v23);
}
v18 = *(GJGameLevel **)(v3 + 324);
v19 = (char *)(*((_DWORD *)v18 + 158) - *((_DWORD *)v18 + 159));
NormalPercent = GJGameLevel::getNormalPercent(v18);
v21 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"\n"
"Total Jumps: %i\n"
"Normal: %i%%\n"
"Practice: %i%%",
v19,
NormalPercent,
*(_DWORD *)(*(_DWORD *)(v3 + 324) + 712));
v24 = (char *)cocos2d::CCString::getCString(v21);
std::string::append(&v27, v24);
v30 = 0;
v31 = 0;
if ( (v27 & 1) == 0 )
v19 = (char *)&v27 + 1;
v32 = nullptr;
if ( (v27 & 1) != 0 )
v19 = v29;
v25 = strlen(v19);
std::string::__init(&v30, v19, v25);
v26 = FLAlertLayer::create(
0,
(cocos2d::CCLabelBMFont *)"Level Stats",
(int)&v30,
(ButtonSprite *)"OK",
nullptr,
300.0);
std::string::~string((int)&v30);
(*(void (__fastcall **)(int *))(*v26 + 656))(v26);
}
return std::string::~string((int)&v27);
}
return this;
}