//
// LevelInfoLayer::onLevelInfo from 0x100028c98 to 0x100028e38 (416 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::init @ 0x1000258a0
//
// 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 LevelInfoLayer::onLevelInfo(LevelInfoLayer *a1, cocos2d::CCObject *a2)
{
GJGameLevel *m_level; // x0
int v4; // w21
void **v5; // x20
int random; // w22
int seed; // w23
int v8; // w24
int v9; // w25
int NormalPercent; // w0
void **v11; // x10
cocos2d::CCString *v12; // x0
char *CString; // x0
cocos2d::CCString *v14; // x0
const char *v15; // x0
std::string *v16; // x1
__int64 v17; // x19
void *v18[2]; // [xsp+28h] [xbp-88h] BYREF
char v19; // [xsp+3Fh] [xbp-71h]
void *__p[2]; // [xsp+40h] [xbp-70h] BYREF
char *longStorage; // [xsp+50h] [xbp-60h]
std::string v22; // [xsp+58h] [xbp-58h] BYREF
if ( !a1->m_isBusy )
{
m_level = a1->m_level;
if ( m_level->m_levelName.m_data.m_short.shortStorage.__elems_[22] < 0 )
{
sub_1000097D0(__p, (void *)m_level->m_levelName.m_data.m_long.capacitym1, m_level->m_levelName.m_data.m_long.size);
m_level = a1->m_level;
}
else
{
*(_OWORD *)__p = *(_OWORD *)&m_level->m_levelName.m_data.m_short.sizex2;
longStorage = m_level->m_levelName.m_data.m_long.longStorage;
}
v4 = SHIBYTE(longStorage);
v5 = (void **)__p[0];
random = m_level->m_attempts.random;
seed = m_level->m_attempts.seed;
v8 = m_level->m_jumps.random;
v9 = m_level->m_jumps.seed;
NormalPercent = GJGameLevel::getNormalPercent(m_level);
v11 = __p;
if ( v4 < 0 )
v11 = v5;
v12 = (cocos2d::CCString *)sub_100268F4C(
"%s\n"
"Total Attempts: %i\n"
"Total Jumps: %i\n"
"Normal: %i%%\n"
"Practice: %i%%",
(const char *)v11,
random - seed,
v8 - v9,
NormalPercent,
a1->m_level->m_practicePercent);
CString = (char *)cocos2d::CCString::getCString(v12);
sub_100009900(&v22, CString);
if ( SHIBYTE(longStorage) < 0 )
operator delete(__p[0]);
if ( GJGameLevel::getNormalPercent(a1->m_level) != a1->m_level->m_newNormalPercent2.random
- a1->m_level->m_newNormalPercent2.seed )
{
v14 = (cocos2d::CCString *)sub_100268F4C(
"\nLeaderboard: %i%%",
a1->m_level->m_newNormalPercent2.random - a1->m_level->m_newNormalPercent2.seed);
v15 = cocos2d::CCString::getCString(v14);
std::string::append(&v22, v15);
}
if ( (v22.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v16 = &v22;
else
v16 = (std::string *)v22.__r_.__value_.__r.__words[0];
sub_100009900(v18, (char *)v16);
v17 = FLAlertLayer::create_1(0, "Level Stats", v18, "OK", 0, 300.0);
if ( v19 < 0 )
operator delete(v18[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v17 + 1288LL))(v17);
if ( SHIBYTE(v22.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v22.__r_.__value_.__l.__data_);
}
}