//
// InfoLayer::onLevelInfo from 0x1003523c8 to 0x100352794 (972 bytes)
//
// 1 xrefs:
// > InfoLayer::init @ 0x100351080
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall InfoLayer::onLevelInfo(InfoLayer *a1, cocos2d::CCObject *a2)
{
GJLevelList *m_levelList; // x0
GameLevelManager *v4; // x0
GJGameLevel *SavedLevel_1; // x19
std::string::size_type size; // x8
std::string::size_type v7; // x8
GameManager *v8; // x0
bool v9; // w0
bool v10; // w20
void **v11; // x1
std::string *v12; // x1
std::string::size_type v13; // x2
int v14; // w8
float v15; // s8
std::string *p_dst; // x8
std::string *p_m_updateDate; // x9
cocos2d::CCString *v18; // x0
const char *CString; // x0
std::string *v20; // x8
std::string *v21; // x9
cocos2d::CCString *v22; // x0
const char *v23; // x0
int v24; // w8
std::string *v25; // x9
cocos2d::CCString *v26; // x0
const char *v27; // x0
std::string *v28; // x1
FLAlertLayer *v29; // x19
void *v30[2]; // [xsp+18h] [xbp-E8h] BYREF
char v31; // [xsp+2Fh] [xbp-D1h]
void *__p[2]; // [xsp+30h] [xbp-D0h] BYREF
char v33; // [xsp+47h] [xbp-B9h]
void *v34[2]; // [xsp+48h] [xbp-B8h] BYREF
char v35; // [xsp+5Fh] [xbp-A1h]
std::string v36; // [xsp+60h] [xbp-A0h] BYREF
std::string v37; // [xsp+78h] [xbp-88h] BYREF
std::string m_updateDate; // [xsp+90h] [xbp-70h] BYREF
std::string __dst; // [xsp+B0h] [xbp-50h] BYREF
m_levelList = a1->m_levelList;
if ( m_levelList )
{
GJLevelList::showListInfo(m_levelList);
return;
}
v4 = GameLevelManager::sharedState();
SavedLevel_1 = GameLevelManager::getSavedLevel_1(v4, a1->m_level);
if ( !SavedLevel_1 )
SavedLevel_1 = a1->m_level;
if ( SavedLevel_1->m_uploadDate.m_data.m_short.shortStorage.__elems_[22] < 0 )
sub_1000097D0(
&__dst,
(void *)SavedLevel_1->m_uploadDate.m_data.m_long.capacitym1,
SavedLevel_1->m_uploadDate.m_data.m_long.size);
else
__dst = (std::string)SavedLevel_1->m_uploadDate;
if ( SavedLevel_1->m_updateDate.m_data.m_short.shortStorage.__elems_[22] < 0 )
sub_1000097D0(
&m_updateDate,
(void *)SavedLevel_1->m_updateDate.m_data.m_long.capacitym1,
SavedLevel_1->m_updateDate.m_data.m_long.size);
else
m_updateDate = (std::string)SavedLevel_1->m_updateDate;
size = HIBYTE(__dst.__r_.__value_.__r.__words[2]);
if ( (__dst.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
size = __dst.__r_.__value_.__l.__size_;
if ( !size )
std::string::assign(&__dst, "NA");
v7 = HIBYTE(m_updateDate.__r_.__value_.__r.__words[2]);
if ( (m_updateDate.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v7 = m_updateDate.__r_.__value_.__l.__size_;
if ( !v7 )
std::string::assign(&m_updateDate, "NA");
sub_100009900(&v37, "");
v8 = GameManager::sharedState();
if ( GameManager::getGameVariable(v8, "0089") || a1->m_score )
{
sub_100009900(&v36, "(No description provided)");
GJGameLevel::getUnpackedLevelDescription((__int64)SavedLevel_1, v34);
sub_100009900(__p, "");
v9 = sub_1000045BC(v34, __p);
v10 = v9;
if ( v33 < 0 )
{
operator delete(__p[0]);
if ( v10 )
{
LABEL_29:
if ( (v36.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v12 = &v36;
else
v12 = (std::string *)v36.__r_.__value_.__r.__words[0];
if ( (v36.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v13 = HIBYTE(v36.__r_.__value_.__r.__words[2]);
else
v13 = v36.__r_.__value_.__l.__size_;
std::string::append(&v37, (const std::string::value_type *)v12, v13);
std::string::append(&v37, "\n\n");
if ( v35 < 0 )
operator delete(v34[0]);
if ( SHIBYTE(v36.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v36.__r_.__value_.__l.__data_);
v14 = 1136525312;
goto LABEL_40;
}
}
else if ( v9 )
{
goto LABEL_29;
}
if ( v35 >= 0 )
v11 = v34;
else
v11 = (void **)v34[0];
std::string::assign(&v36, (const std::string::value_type *)v11);
goto LABEL_29;
}
v14 = 1133903872;
LABEL_40:
v15 = *(float *)&v14;
p_dst = &__dst;
if ( (__dst.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
p_dst = (std::string *)__dst.__r_.__value_.__r.__words[0];
p_m_updateDate = &m_updateDate;
if ( (m_updateDate.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
p_m_updateDate = (std::string *)m_updateDate.__r_.__value_.__r.__words[0];
v18 = (cocos2d::CCString *)sub_100268F4C(
"Uploaded: %s ago\nUpdated: %s ago",
(const char *)p_dst,
(const char *)p_m_updateDate);
CString = cocos2d::CCString::getCString(v18);
std::string::append(&v37, CString);
if ( SavedLevel_1->m_starsRequested >= 1 )
{
sub_100009900(&v36, "Stars");
if ( GJGameLevel::isPlatformer(SavedLevel_1) )
std::string::assign(&v36, "Moons");
v20 = &v37;
if ( (v37.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v20 = (std::string *)v37.__r_.__value_.__r.__words[0];
v21 = &v36;
if ( (v36.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v21 = (std::string *)v36.__r_.__value_.__r.__words[0];
v22 = (cocos2d::CCString *)sub_100268F4C(
"%s\n%s Requested: %i",
(const char *)v20,
(const char *)v21,
SavedLevel_1->m_starsRequested);
v23 = cocos2d::CCString::getCString(v22);
std::string::assign(&v37, v23);
if ( SHIBYTE(v36.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v36.__r_.__value_.__l.__data_);
}
v24 = SavedLevel_1->m_originalLevel.random - SavedLevel_1->m_originalLevel.seed;
if ( v24 )
{
v25 = &v37;
if ( (v37.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v25 = (std::string *)v37.__r_.__value_.__r.__words[0];
v26 = (cocos2d::CCString *)sub_100268F4C("%s\nOriginal: %i", (const char *)v25, v24);
v27 = cocos2d::CCString::getCString(v26);
std::string::assign(&v37, v27);
}
if ( (v37.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v28 = &v37;
else
v28 = (std::string *)v37.__r_.__value_.__r.__words[0];
sub_100009900(v30, (char *)v28);
v29 = FLAlertLayer::create_1(0, (__int64)"Level Info", (__int64)v30, (__int64)"OK", 0, v15);
if ( v31 < 0 )
operator delete(v30[0]);
((void (__fastcall *)(FLAlertLayer *))v29->show)(v29);
if ( SHIBYTE(v37.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v37.__r_.__value_.__l.__data_);
if ( SHIBYTE(m_updateDate.__r_.__value_.__r.__words[2]) < 0 )
operator delete(m_updateDate.__r_.__value_.__l.__data_);
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
}