//
// EditLevelLayer::onLevelInfo from 0x1400d6a30 to 0x1400d6c4d (541 bytes)
//
// 2 xrefs:
// > EditLevelLayer::init @ 0x1400d6586
// > ??> @ 0x1406c879c
//
// 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
//
// Hidden C++ exception states: #wind=4
void EditLevelLayer::onLevelInfo(EditLevelLayer *a1, cocos2d::CCObject *a2)
{
GJGameLevel *m_level; // rax
const char *v4; // rdx
cocos2d::CCString *v5; // rax
const char *CString; // rax
size_t v7; // rbx
size_t v8; // r8
void **v9; // rdx
__int64 v10; // rax
FLAlertLayer *v11; // rbx
void *v12; // rcx
__int128 v13; // [rsp+58h] [rbp-41h] BYREF
__int64 v14; // [rsp+68h] [rbp-31h]
__int64 v15; // [rsp+70h] [rbp-29h]
_BYTE v16[32]; // [rsp+80h] [rbp-19h] BYREF
void *Block[2]; // [rsp+A0h] [rbp+7h] BYREF
__int128 v18; // [rsp+B0h] [rbp+17h]
_QWORD v19[4]; // [rsp+C0h] [rbp+27h] BYREF
sub_14003BDB0((__int64)v19, (__int64)&a1->m_level->m_levelName);
v4 = (const char *)v19;
if ( v19[3] > 0xFu )
v4 = (const char *)v19[0];
m_level = a1->m_level;
v5 = cocos2d::CCString::createWithFormat(
"%s\nTotal Attempts: %i\nTotal Jumps: %i\nObjects: %i",
v4,
m_level->m_attempts.random - m_level->m_attempts.seed,
m_level->m_jumps.random - m_level->m_jumps.seed,
m_level->m_objectCount.random - m_level->m_objectCount.seed);
CString = cocos2d::CCString::getCString(v5);
*(_OWORD *)Block = 0;
v18 = 0;
v7 = -1;
v8 = -1;
do
++v8;
while ( CString[v8] );
sub_14003A930(Block, CString, v8);
sub_14003A830((__int64)v19);
if ( a1->m_level->m_objectCount.random - a1->m_level->m_objectCount.seed > 40000 )
sub_140041270(Block, " (high)", 0xFu);
v9 = Block;
if ( *((_QWORD *)&v18 + 1) > 0xFu )
v9 = (void **)Block[0];
v13 = 0;
v14 = 0;
v15 = 0;
do
++v7;
while ( *((_BYTE *)v9 + v7) );
sub_14003A930(&v13, v9, v7);
v10 = sub_14003BDB0((__int64)v16, (__int64)&v13);
v11 = FLAlertLayer::create(0, (int)"Level Stats", v10, (__int64)"OK", 0, 1133903872, 0, 0, 1065353216);
sub_14003A830((__int64)&v13);
v11->show(v11);
if ( *((_QWORD *)&v18 + 1) > 0xFu )
{
v12 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v18 + 1) + 1LL) >= 0x1000 )
{
v12 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v12 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v12);
}
}