//
// LevelPage::onInfo from 0x100422690 to 0x100422bd1 (1345 bytes)
//
// 1 xrefs:
// > LevelSelectLayer::onInfo @ 0x1004202ba
//
// This function is hookable on this platform (idp: pc, 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:30:16 +0000
//
void __fastcall LevelPage::onInfo(__int64 a1)
{
__int64 v1; // rax
int v2; // ecx
char *v3; // rbx
size_t v4; // rax
size_t v5; // r14
char *v6; // r15
size_t v7; // rax
size_t v8; // r14
char *v9; // r15
__int64 v11; // rax
const char *CString; // r14
size_t v13; // rax
std::string::size_type v14; // r15
char *data; // r12
size_t v16; // r12
__int64 v17; // r14
size_t v18; // r12
__int64 v19; // r14
std::string::pointer v20; // rdi
size_t v21; // r13
__int64 v22; // rdi
__int64 v23; // rax
const std::string::value_type *v24; // rax
__int64 v25; // rax
const std::string::value_type *v26; // rax
const char *v27; // rbx
size_t v28; // rax
size_t v29; // r14
char *v30; // r15
size_t v31; // r12
__int64 v32; // rbx
char v33; // [rsp+0h] [rbp-B0h]
char v34; // [rsp+0h] [rbp-B0h]
_QWORD __dst[2]; // [rsp+8h] [rbp-A8h] BYREF
void *__p; // [rsp+18h] [rbp-98h]
_QWORD v37[2]; // [rsp+20h] [rbp-90h] BYREF
void *v38; // [rsp+30h] [rbp-80h]
_QWORD v39[2]; // [rsp+38h] [rbp-78h] BYREF
void *v40; // [rsp+48h] [rbp-68h]
__int128 v41; // [rsp+50h] [rbp-60h] BYREF
void *v42; // [rsp+60h] [rbp-50h]
std::string v43; // [rsp+70h] [rbp-40h] BYREF
v1 = *(_QWORD *)(a1 + 424);
if ( !v1 )
return;
v2 = *(_DWORD *)(v1 + 328) - *(_DWORD *)(v1 + 332);
if ( v2 == -2 )
{
v3 = (char *)operator new(0x78u);
strcpy(
v3,
"The path leads to an old tower. It's been left alone for years, with little reason to explore.");
v7 = strlen(v3);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v8 = v7;
if ( v7 >= 0x17 )
{
v18 = 26;
if ( (v7 | 7) != 0x17 )
v18 = (v7 | 7) + 1;
v9 = (char *)operator new(v18);
v38 = v9;
v37[0] = v18 | 1;
v37[1] = v8;
}
else
{
LOBYTE(v37[0]) = 2 * v7;
v9 = (char *)v37 + 1;
if ( !v7 )
goto LABEL_30;
}
memcpy(v9, v3, v8);
LABEL_30:
v9[v8] = 0;
v19 = FLAlertLayer::create_1(0, "The Tower", v37, "OK", 0, 360.0);
if ( (v37[0] & 1) != 0 )
operator delete(v38);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v19 + 1312LL))(v19);
goto LABEL_33;
}
if ( v2 == -1 )
{
v3 = (char *)operator new(0x50u);
strcpy(v3, "Roses are red\nViolets are blue\nWelcome to\n2.2");
v4 = strlen(v3);
if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v5 = v4;
if ( v4 >= 0x17 )
{
v16 = 26;
if ( (v4 | 7) != 0x17 )
v16 = (v4 | 7) + 1;
v6 = (char *)operator new(v16);
__p = v6;
__dst[0] = v16 | 1;
__dst[1] = v5;
}
else
{
LOBYTE(__dst[0]) = 2 * v4;
v6 = (char *)__dst + 1;
if ( !v4 )
goto LABEL_23;
}
memcpy(v6, v3, v5);
LABEL_23:
v6[v5] = 0;
v17 = FLAlertLayer::create_1(0, "It's a secret...", __dst, "OK", 0, 360.0);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v17 + 1312LL))(v17);
LABEL_33:
v20 = v3;
LABEL_34:
operator delete(v20);
return;
}
if ( (*(_BYTE *)(v1 + 344) & 1) != 0 )
{
sub_10001AD30(&v41, *(const void **)(v1 + 360), *(_QWORD *)(v1 + 352));
}
else
{
v42 = *(void **)(v1 + 360);
v41 = *(_OWORD *)(v1 + 344);
}
v11 = sub_10088E820("%s\nTotal Attempts: %i", v33);
CString = (const char *)cocos2d::CCString::getCString(v11);
v13 = strlen(CString);
if ( v13 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v14 = v13;
if ( v13 >= 0x17 )
{
v21 = 26;
if ( (v13 | 7) != 0x17 )
v21 = (v13 | 7) + 1;
data = (char *)operator new(v21);
v43.__r_.__value_.__r.__words[2] = (std::string::size_type)data;
v43.__r_.__value_.__r.__words[0] = v21 | 1;
v43.__r_.__value_.__l.__size_ = v14;
goto LABEL_39;
}
v43.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v13);
data = v43.__r_.__value_.__s.__data_;
if ( v13 )
LABEL_39:
memmove(data, CString, v14);
data[v14] = 0;
if ( (v41 & 1) != 0 )
operator delete(v42);
v22 = *(_QWORD *)(a1 + 424);
if ( *(int *)(v22 + 1532) > 0 )
{
v23 = sub_10088E820("\nPractice Attempts: %i", v34);
v24 = (const std::string::value_type *)cocos2d::CCString::getCString(v23);
std::string::append(&v43, v24);
v22 = *(_QWORD *)(a1 + 424);
}
GJGameLevel::getNormalPercent(v22);
v25 = sub_10088E820("\nTotal Jumps: %i\nNormal: %i%%\nPractice: %i%%", v34);
v26 = (const std::string::value_type *)cocos2d::CCString::getCString(v25);
std::string::append(&v43, v26);
if ( (*(_BYTE *)&v43.__r_.__value_.__s.0 & 1) != 0 )
v27 = v43.__r_.__value_.__l.__data_;
else
v27 = v43.__r_.__value_.__s.__data_;
v28 = strlen(v27);
if ( v28 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v29 = v28;
if ( v28 >= 0x17 )
{
v31 = 26;
if ( (v28 | 7) != 0x17 )
v31 = (v28 | 7) + 1;
v30 = (char *)operator new(v31);
v40 = v30;
v39[0] = v31 | 1;
v39[1] = v29;
goto LABEL_54;
}
LOBYTE(v39[0]) = 2 * v28;
v30 = (char *)v39 + 1;
if ( v28 )
LABEL_54:
memmove(v30, v27, v29);
v30[v29] = 0;
v32 = FLAlertLayer::create_1(0, "Level Stats", v39, "OK", 0, 300.0);
if ( (v39[0] & 1) != 0 )
operator delete(v40);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v32 + 1312LL))(v32);
if ( (*(_BYTE *)&v43.__r_.__value_.__s.0 & 1) != 0 )
{
v20 = v43.__r_.__value_.__l.__data_;
goto LABEL_34;
}
}