//
// InfoLayer::onLevelInfo from 0x90a418 to 0x90a960 (1352 bytes)
//
// 3 xrefs:
// > ??> @ 0xf3070
// > InfoLayer::init @ 0x90c694
// > ??> @ 0x15475c8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:57:12 +0000
//
__int64 __fastcall InfoLayer::onLevelInfo(InfoLayer *this, cocos2d::CCObject *a2)
{
GJLevelList *v3; // x0
GJEditorSoundConfig *v5; // x0
GameLevelManager *v6; // x0
__int64 SavedLevel; // x21
char v8; // w0
__int64 v9; // x0
__int64 v10; // x1
char v11; // w0
__int64 v12; // x0
__int64 v13; // x1
__int64 v14; // x1
__int64 v15; // x0
GameManager *v16; // x0
GameManager *v17; // x0
int v18; // w25
_BOOL4 v19; // w26
char *v20; // x1
char *v21; // x1
size_t v22; // x2
char *v23; // x1
char *v24; // x2
cocos2d::CCString *v25; // x0
size_t v26; // x0
char *v27; // x1
char *v28; // x2
cocos2d::CCString *v29; // x0
char *v30; // x0
int v31; // w3
int v32; // w2
char *v33; // x1
cocos2d::CCString *v34; // x0
char *v35; // x0
char *v36; // x1
size_t v37; // x0
float v38; // s0
__int64 v39; // x20
char *CString; // [xsp+68h] [xbp+68h]
char *v41; // [xsp+68h] [xbp+68h]
__int64 v42; // [xsp+78h] [xbp+78h] BYREF
__int64 v43; // [xsp+80h] [xbp+80h]
char *v44; // [xsp+88h] [xbp+88h]
__int64 v45; // [xsp+90h] [xbp+90h] BYREF
__int64 v46; // [xsp+98h] [xbp+98h]
void *v47; // [xsp+A0h] [xbp+A0h]
__int64 v48[2]; // [xsp+A8h] [xbp+A8h] BYREF
char *v49; // [xsp+B8h] [xbp+B8h]
__int64 v50; // [xsp+C0h] [xbp+C0h] BYREF
size_t v51; // [xsp+C8h] [xbp+C8h]
void *v52; // [xsp+D0h] [xbp+D0h]
__int64 v53[2]; // [xsp+D8h] [xbp+D8h] BYREF
void *v54; // [xsp+E8h] [xbp+E8h]
__int64 v55; // [xsp+F0h] [xbp+F0h] BYREF
__int64 v56; // [xsp+F8h] [xbp+F8h]
char *v57; // [xsp+100h] [xbp+100h]
v3 = *((GJLevelList **)this + 89);
if ( v3 )
{
GJLevelList::showListInfo(v3);
}
else
{
v5 = *((GJEditorSoundConfig **)this + 90);
if ( v5 )
{
GJEditorSoundConfig::showSoundInfo(v5);
}
else
{
v6 = (GameLevelManager *)GameLevelManager::sharedState(nullptr);
SavedLevel = GameLevelManager::getSavedLevel(v6, *((GJGameLevel **)this + 87));
if ( !SavedLevel )
SavedLevel = *((_QWORD *)this + 87);
v8 = *(_BYTE *)(SavedLevel + 464);
v42 = 0;
v43 = 0;
v44 = nullptr;
if ( (v8 & 1) != 0 )
{
std::string::__init(&v42, *(void **)(SavedLevel + 480), *(_QWORD *)(SavedLevel + 472));
}
else
{
v9 = *(_QWORD *)(SavedLevel + 464);
v10 = *(_QWORD *)(SavedLevel + 472);
v44 = *(char **)(SavedLevel + 480);
v42 = v9;
v43 = v10;
}
v11 = *(_BYTE *)(SavedLevel + 488);
v45 = 0;
v46 = 0;
v47 = nullptr;
if ( (v11 & 1) != 0 )
{
std::string::__init(&v45, *(void **)(SavedLevel + 504), *(_QWORD *)(SavedLevel + 496));
}
else
{
v12 = *(_QWORD *)(SavedLevel + 488);
v13 = *(_QWORD *)(SavedLevel + 496);
v47 = *(void **)(SavedLevel + 504);
v45 = v12;
v46 = v13;
}
v14 = (unsigned __int8)v42 >> 1;
if ( (v42 & 1) != 0 )
v14 = v43;
if ( !v14 )
std::string::assign(&v42, "NA");
if ( (v45 & 1) != 0 )
v15 = v46;
else
v15 = (unsigned __int8)v45 >> 1;
if ( !v15 )
std::string::assign(&v45, "NA");
v48[0] = 0;
v48[1] = 0;
v49 = nullptr;
v16 = (GameManager *)std::string::__init(v48, &byte_11B8890, 0);
v17 = (GameManager *)GameManager::sharedState(v16);
if ( (unsigned __int8)GameManager::getGameVariable(v17, "0089") || (v18 = 0, *((_QWORD *)this + 88)) )
{
v50 = 0;
v51 = 0;
v52 = nullptr;
std::string::__init(&v50, "(No description provided)", 0x19u);
GJGameLevel::getUnpackedLevelDescription((GJGameLevel *)SavedLevel, &v55);
v53[0] = 0;
v53[1] = 0;
v54 = nullptr;
std::string::__init(v53, &byte_11B8890, 0);
v19 = sub_906E80((__int64)&v55, (__int64)v53);
if ( (v53[0] & 1) != 0 )
operator delete(v54);
if ( !v19 )
{
v20 = (char *)&v55 + 1;
if ( (v55 & 1) != 0 )
v20 = v57;
std::string::assign(&v50, v20);
}
if ( (v50 & 1) != 0 )
{
v21 = (char *)v52;
v22 = v51;
}
else
{
v22 = (unsigned __int8)v50 >> 1;
v21 = (char *)&v50 + 1;
}
std::string::append((__int64)v48, v21, v22);
std::string::append((__int64)v48, "\n\n", 2u);
if ( (v55 & 1) != 0 )
operator delete(v57);
if ( (v50 & 1) != 0 )
operator delete(v52);
v18 = 1;
}
v23 = (char *)&v42 + 1;
if ( (v42 & 1) != 0 )
v23 = v44;
v24 = (char *)&v45 + 1;
if ( (v45 & 1) != 0 )
v24 = (char *)v47;
v25 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Uploaded: %s ago\nUpdated: %s ago",
v23,
v24);
CString = (char *)cocos2d::CCString::getCString(v25);
v26 = strlen(CString);
std::string::append((__int64)v48, CString, v26);
if ( *(int *)(SavedLevel + 1044) > 0 )
{
v55 = 0;
v56 = 0;
v57 = nullptr;
std::string::__init(&v55, "Stars", 5u);
if ( GJGameLevel::isPlatformer((GJGameLevel *)SavedLevel) )
std::string::assign(&v55, "Moons");
v27 = (char *)v48 + 1;
if ( (v48[0] & 1) != 0 )
v27 = v49;
v28 = (char *)&v55 + 1;
if ( (v55 & 1) != 0 )
v28 = v57;
v29 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s\n%s Requested: %i",
v27,
v28,
*(unsigned int *)(SavedLevel + 1044));
v30 = (char *)cocos2d::CCString::getCString(v29);
std::string::assign(v48, v30);
if ( (v55 & 1) != 0 )
operator delete(v57);
}
v31 = *(_DWORD *)(SavedLevel + 988);
v32 = *(_DWORD *)(SavedLevel + 992);
if ( v31 != v32 )
{
v33 = (char *)v48 + 1;
if ( (v48[0] & 1) != 0 )
v33 = v49;
v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s\nOriginal: %i",
v33,
(unsigned int)(v31 - v32));
v35 = (char *)cocos2d::CCString::getCString(v34);
std::string::assign(v48, v35);
}
v36 = (char *)v48 + 1;
if ( (v48[0] & 1) != 0 )
v36 = v49;
v41 = v36;
v55 = 0;
v56 = 0;
v57 = nullptr;
v37 = strlen(v36);
std::string::__init(&v55, v41, v37);
if ( v18 )
v38 = 380.0;
else
v38 = 300.0;
v39 = FLAlertLayer::create(
0,
(cocos2d::CCLabelBMFont *)"Level Info",
(char *)&v55,
(ButtonSprite *)"OK",
nullptr,
v38);
if ( (v55 & 1) != 0 )
operator delete(v57);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v39 + 1312LL))(v39);
if ( (v48[0] & 1) != 0 )
operator delete(v49);
if ( (v45 & 1) != 0 )
operator delete(v47);
if ( (v42 & 1) != 0 )
operator delete(v44);
}
}
return _stack_chk_guard;
}