//
// InfoLayer::onLevelInfo from 0x53e3d4 to 0x53e6c4 (752 bytes)
//
// 0 xrefs:
//
// 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:52:16 +0000
//
int __fastcall InfoLayer::onLevelInfo(InfoLayer *this, cocos2d::CCObject *a2)
{
GJLevelList *v3; // r0
GJEditorSoundConfig *v5; // r0
GameLevelManager *v6; // r0
GJGameLevel *SavedLevel; // r5
int v8; // r3
int v9; // r3
GameManager *v10; // r0
GameManager *v11; // r0
int v12; // r10
int v13; // r2
int v14; // r3
char *v15; // r1
size_t v16; // r2
const char *v17; // r1
char *v18; // r2
cocos2d::CCString *v19; // r0
const char *CString; // r11
size_t v21; // r0
char *v22; // r1
char *v23; // r2
cocos2d::CCString *v24; // r0
char *v25; // r0
int v26; // r2
int v27; // r3
char *v28; // r5
int v29; // r2
char *v30; // r1
cocos2d::CCString *v31; // r0
char *v32; // r0
size_t v33; // r0
float v34; // s15
int *v35; // r5
char *v36; // r1
_BOOL4 v37; // [sp+Ch] [bp-58h]
int v38[3]; // [sp+14h] [bp-50h] BYREF
int v39[3]; // [sp+20h] [bp-44h] BYREF
char v40[4]; // [sp+2Ch] [bp-38h] BYREF
int v41; // [sp+30h] [bp-34h]
char *v42; // [sp+34h] [bp-30h]
int v43; // [sp+38h] [bp-2Ch] BYREF
size_t v44; // [sp+3Ch] [bp-28h]
char *v45; // [sp+40h] [bp-24h]
int v46[3]; // [sp+44h] [bp-20h] BYREF
int v47; // [sp+50h] [bp-14h] BYREF
int v48; // [sp+54h] [bp-10h]
char *v49; // [sp+58h] [bp-Ch]
v3 = *((GJLevelList **)this + 136);
if ( v3 )
return GJLevelList::showListInfo(v3);
v5 = *((GJEditorSoundConfig **)this + 137);
if ( v5 )
return GJEditorSoundConfig::showSoundInfo(v5);
v6 = (GameLevelManager *)GameLevelManager::sharedState(nullptr);
SavedLevel = (GJGameLevel *)GameLevelManager::getSavedLevel(v6, *((GJGameLevel **)this + 134));
if ( !SavedLevel )
SavedLevel = *((GJGameLevel **)this + 134);
std::string::basic_string(v38, (int)SavedLevel + 340);
std::string::basic_string(v39, (int)SavedLevel + 352);
if ( (v38[0] & 1) != 0 )
v8 = v38[1];
else
v8 = (int)LOBYTE(v38[0]) >> 1;
if ( !v8 )
std::string::assign(v38, "NA");
if ( (v39[0] & 1) != 0 )
v9 = v39[1];
else
v9 = (int)LOBYTE(v39[0]) >> 1;
if ( !v9 )
std::string::assign(v39, "NA");
*(_DWORD *)v40 = 0;
v41 = 0;
v42 = nullptr;
v10 = (GameManager *)std::string::__init((int *)v40, &unk_B6B226, 0);
v11 = (GameManager *)GameManager::sharedState(v10);
if ( GameManager::getGameVariable(v11, "0089") || *((_DWORD *)this + 135) )
{
v43 = 0;
v44 = 0;
v45 = nullptr;
std::string::__init(&v43, "(No description provided)", 0x19u);
GJGameLevel::getUnpackedLevelDescription((GJGameLevel *)&v47, (int)SavedLevel, v13, v14);
memset(v46, 0, sizeof(v46));
std::string::__init(v46, &unk_B6B226, 0);
v37 = sub_53C8D6((unsigned __int8 *)&v47, (unsigned __int8 *)v46);
std::string::~string((int)v46);
if ( !v37 )
{
if ( (v47 & 1) != 0 )
v36 = v49;
else
v36 = (char *)&v47 + 1;
std::string::assign(&v43, v36);
}
if ( (v43 & 1) != 0 )
{
v15 = v45;
v16 = v44;
}
else
{
v16 = (int)(unsigned __int8)v43 >> 1;
v15 = (char *)&v43 + 1;
}
std::string::append(v40, v15, v16);
std::string::append(v40, "\n\n", 2u);
std::string::~string((int)&v47);
std::string::~string((int)&v43);
v12 = 1;
}
else
{
v12 = 0;
}
if ( (v38[0] & 1) != 0 )
v17 = (const char *)v38[2];
else
v17 = (char *)v38 + 1;
if ( (v39[0] & 1) != 0 )
v18 = (char *)v39[2];
else
v18 = (char *)v39 + 1;
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Uploaded: %s ago\nUpdated: %s ago",
v17,
v18,
LOBYTE(v39[0]));
CString = (const char *)cocos2d::CCString::getCString(v19);
v21 = strlen(CString);
std::string::append(v40, CString, v21);
if ( *((int *)SavedLevel + 217) > 0 )
{
v47 = 0;
v48 = 0;
v49 = nullptr;
std::string::__init(&v47, "Stars", 5u);
if ( GJGameLevel::isPlatformer(SavedLevel) )
std::string::assign(&v47, "Moons");
if ( (v40[0] & 1) != 0 )
v22 = v42;
else
v22 = &v40[1];
if ( (v47 & 1) != 0 )
v23 = v49;
else
v23 = (char *)&v47 + 1;
v24 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s\n%s Requested: %i",
v22,
v23,
*((_DWORD *)SavedLevel + 217));
v25 = (char *)cocos2d::CCString::getCString(v24);
std::string::assign((int *)v40, v25);
std::string::~string((int)&v47);
}
v26 = *((_DWORD *)SavedLevel + 203);
v27 = *((_DWORD *)SavedLevel + 204);
if ( v26 != v27 )
{
v29 = v26 - v27;
if ( (v40[0] & 1) != 0 )
v30 = v42;
else
v30 = &v40[1];
v31 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s\nOriginal: %i",
v30,
v29);
v32 = (char *)cocos2d::CCString::getCString(v31);
std::string::assign((int *)v40, v32);
}
if ( (v40[0] & 1) != 0 )
v28 = v42;
else
v28 = &v40[1];
v47 = 0;
v48 = 0;
v49 = nullptr;
v33 = strlen(v28);
std::string::__init(&v47, v28, v33);
v34 = 380.0;
if ( !v12 )
v34 = 300.0;
v35 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)"Level Info", (int)&v47, (ButtonSprite *)"OK", nullptr, v34);
std::string::~string((int)&v47);
(*(void (__fastcall **)(int *))(*v35 + 656))(v35);
std::string::~string((int)v40);
std::string::~string((int)v39);
return std::string::~string((int)v38);
}