//
// WorldLevelPage::onInfo from 0x1003c6780 to 0x1003c69e6 (614 bytes)
//
// 1 xrefs:
// > WorldLevelPage::init @ 0x1003c65fc
//
// 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 WorldLevelPage::onInfo(WorldLevelPage *a1, cocos2d::CCObject *a2)
{
__int128 v2; // xmm0
GJGameLevel *m_level; // rdi
cocos2d::CCString *v5; // rax
const char *CString; // rbx
size_t v7; // rax
size_t v8; // r14
char *v9; // r15
char *v10; // rbx
size_t v11; // r12
size_t v12; // rax
size_t v13; // r14
char *v14; // r15
size_t v15; // r12
__int64 v16; // rbx
char v17; // [rsp+0h] [rbp-90h]
_QWORD v18[2]; // [rsp+8h] [rbp-88h] BYREF
void *v19; // [rsp+18h] [rbp-78h]
__int128 v20; // [rsp+20h] [rbp-70h] BYREF
void *__p; // [rsp+30h] [rbp-60h]
int seed; // [rsp+44h] [rbp-4Ch]
_QWORD __dst[2]; // [rsp+48h] [rbp-48h] BYREF
char *__s; // [rsp+58h] [rbp-38h]
char v25; // [rsp+67h] [rbp-29h]
m_level = a1->m_level;
if ( !m_level )
return;
if ( (m_level->m_levelName.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(
&v20,
m_level->m_levelName.m_data.m_long.longStorage,
m_level->m_levelName.m_data.m_long.size,
*(double *)&v2);
m_level = a1->m_level;
}
else
{
__p = m_level->m_levelName.m_data.m_long.longStorage;
v2 = *(_OWORD *)&m_level->m_levelName.m_data.m_short.sizex2;
v20 = v2;
}
v25 = v20;
seed = m_level->m_attempts.seed;
GJGameLevel::getNormalPercent(m_level);
v5 = (cocos2d::CCString *)sub_1007AB580(
"%s\n"
"Total Attempts: %i\n"
"Total Jumps: %i\n"
"Normal: %i%%\n"
"Practice: %i%%",
v17);
CString = cocos2d::CCString::getCString(v5);
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(*(double *)&v2);
v8 = v7;
if ( v7 >= 0x17 )
{
v11 = 26;
if ( (v7 | 7) != 0x17 )
v11 = (v7 | 7) + 1;
v9 = (char *)operator new(v11);
__s = v9;
__dst[0] = v11 | 1;
__dst[1] = v8;
}
else
{
LOBYTE(__dst[0]) = 2 * v7;
v9 = (char *)__dst + 1;
if ( !v7 )
{
BYTE1(__dst[0]) = 0;
if ( (v20 & 1) == 0 )
goto LABEL_10;
goto LABEL_9;
}
}
memmove(v9, CString, v8);
v9[v8] = 0;
if ( (v20 & 1) != 0 )
LABEL_9:
operator delete(__p);
LABEL_10:
if ( (__dst[0] & 1) != 0 )
v10 = __s;
else
v10 = (char *)__dst + 1;
v12 = strlen(v10);
if ( v12 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(*(double *)&v2);
v13 = v12;
if ( v12 >= 0x17 )
{
v15 = 26;
if ( (v12 | 7) != 0x17 )
v15 = (v12 | 7) + 1;
v14 = (char *)operator new(v15);
v19 = v14;
v18[0] = v15 | 1;
v18[1] = v13;
}
else
{
LOBYTE(v18[0]) = 2 * v12;
v14 = (char *)v18 + 1;
if ( !v12 )
goto LABEL_26;
}
memmove(v14, v10, v13);
LABEL_26:
v14[v13] = 0;
v16 = FLAlertLayer::create_1(0, "Level Stats", v18, "OK", 0, 300.0);
if ( (v18[0] & 1) != 0 )
operator delete(v19);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v16 + 1288LL))(v16);
if ( (__dst[0] & 1) != 0 )
operator delete(__s);
}