//
// InfoLayer::onLevelInfo from 0x100894ef0 to 0x1008953c3 (1235 bytes)
//
// 1 xrefs:
// > InfoLayer::init @ 0x10089315c
//
// 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:37:06 +0000
//
void __fastcall InfoLayer::onLevelInfo(__int64 *a1)
{
__int64 v2; // rdi
__int64 v3; // rax
__int64 SavedLevel_1; // rax
__int64 v5; // rbx
unsigned int v6; // eax
__int64 v7; // rax
const std::string::value_type *v8; // rsi
const std::string::value_type *v9; // rsi
std::string::size_type size; // rdx
const char *data; // rsi
const char *v12; // rdx
char *v13; // rax
const std::string::value_type *CString; // rax
const char *v15; // r14
const char *v16; // rsi
const char *v17; // rdx
char *v18; // rax
const std::string::value_type *v19; // rax
int v20; // edx
const char *v21; // rsi
char *v22; // rax
const std::string::value_type *v23; // rax
size_t v24; // rax
size_t v25; // rbx
char *v26; // r15
size_t v27; // r12
char *v28; // rbx
std::string v29; // [rsp+0h] [rbp-C0h] BYREF
_QWORD __dst[2]; // [rsp+18h] [rbp-A8h] BYREF
void *v31; // [rsp+28h] [rbp-98h]
std::string v32; // [rsp+30h] [rbp-90h] BYREF
std::string v33; // [rsp+50h] [rbp-70h] BYREF
std::string __src; // [rsp+68h] [rbp-58h] BYREF
float v35; // [rsp+84h] [rbp-3Ch]
std::string v36; // [rsp+88h] [rbp-38h] BYREF
v2 = a1[89];
if ( v2 )
{
GJLevelList::showListInfo(v2);
return;
}
if ( a1[90] )
{
sub_100907740();
return;
}
v3 = GameLevelManager::sharedState();
SavedLevel_1 = GameLevelManager::getSavedLevel_1(v3, a1[87]);
v5 = SavedLevel_1;
if ( SavedLevel_1 )
{
if ( (*(_BYTE *)(SavedLevel_1 + 464) & 1) == 0 )
goto LABEL_7;
}
else
{
v5 = a1[87];
if ( (*(_BYTE *)(v5 + 464) & 1) == 0 )
{
LABEL_7:
v32 = *(std::string *)(v5 + 464);
if ( (*(_BYTE *)(v5 + 488) & 1) != 0 )
goto LABEL_8;
goto LABEL_13;
}
}
sub_10001AD30(&v32, *(const void **)(v5 + 480), *(_QWORD *)(v5 + 472));
if ( (*(_BYTE *)(v5 + 488) & 1) != 0 )
{
LABEL_8:
sub_10001AD30(&v33, *(const void **)(v5 + 504), *(_QWORD *)(v5 + 496));
v6 = (unsigned int)v32.__r_.__value_.__l.0;
if ( (*(_BYTE *)&v32.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_9;
LABEL_14:
if ( v6 >> 1 )
goto LABEL_16;
goto LABEL_15;
}
LABEL_13:
v33 = *(std::string *)(v5 + 488);
v6 = (unsigned int)v32.__r_.__value_.__l.0;
if ( (*(_BYTE *)&v32.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_14;
LABEL_9:
if ( v32.__r_.__value_.__l.__size_ )
goto LABEL_16;
LABEL_15:
std::string::assign(&v32, "NA");
LABEL_16:
if ( (*(_BYTE *)&v33.__r_.__value_.__s.0 & 1) != 0 )
{
if ( !v33.__r_.__value_.__l.__size_ )
goto LABEL_20;
}
else if ( !(*(_BYTE *)&v33.__r_.__value_.__l.0 >> 1) )
{
LABEL_20:
std::string::assign(&v33, "NA");
}
*(_WORD *)&__src.__r_.__value_.__l.0 = 0;
v7 = GameManager::sharedState();
if ( !(unsigned __int8)GameManager::getGameVariable(v7, "0089") && !a1[88] )
{
v35 = 300.0;
if ( (*(_BYTE *)&v32.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_39;
LABEL_42:
data = v32.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&v33.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_40;
goto LABEL_43;
}
v36.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x20u);
v36.__r_.__value_.__r.__words[0] = 33;
v36.__r_.__value_.__l.__size_ = 25;
strcpy(v36.__r_.__value_.__l.__data_, "(No description provided)");
GJGameLevel::getUnpackedLevelDescription(&v29, v5);
if ( (*(_BYTE *)&v29.__r_.__value_.__s.0 & 1) != 0 )
{
if ( !v29.__r_.__value_.__l.__size_ )
goto LABEL_31;
}
else if ( !(*(_BYTE *)&v29.__r_.__value_.__l.0 >> 1) )
{
goto LABEL_31;
}
if ( (*(_BYTE *)&v29.__r_.__value_.__s.0 & 1) != 0 )
v8 = v29.__r_.__value_.__l.__data_;
else
v8 = v29.__r_.__value_.__s.__data_;
std::string::assign(&v36, v8);
LABEL_31:
if ( (*(_BYTE *)&v36.__r_.__value_.__s.0 & 1) != 0 )
{
v9 = v36.__r_.__value_.__l.__data_;
size = v36.__r_.__value_.__l.__size_;
}
else
{
size = *(_BYTE *)&v36.__r_.__value_.__l.0 >> 1;
v9 = v36.__r_.__value_.__s.__data_;
}
std::string::append(&__src, v9, size);
std::string::append(&__src, "\n\n");
if ( (*(_BYTE *)&v29.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v29.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v36.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v36.__r_.__value_.__l.__data_);
v35 = 380.0;
if ( (*(_BYTE *)&v32.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_42;
LABEL_39:
data = v32.__r_.__value_.__l.__data_;
if ( (*(_BYTE *)&v33.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_40:
v12 = v33.__r_.__value_.__s.__data_;
goto LABEL_44;
}
LABEL_43:
v12 = v33.__r_.__value_.__l.__data_;
LABEL_44:
v13 = sub_10088E820("Uploaded: %s ago\nUpdated: %s ago", data, v12);
CString = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v13);
std::string::append(&__src, CString);
v15 = __src.__r_.__value_.__s.__data_;
if ( *(int *)(v5 + 1044) > 0 )
{
strcpy((char *)&v36, "\nStars");
if ( GJGameLevel::isPlatformer(v5) )
std::string::assign(&v36, "Moons");
v16 = __src.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 )
v16 = __src.__r_.__value_.__l.__data_;
if ( (*(_BYTE *)&v36.__r_.__value_.__s.0 & 1) != 0 )
v17 = v36.__r_.__value_.__l.__data_;
else
v17 = v36.__r_.__value_.__s.__data_;
v18 = sub_10088E820("%s\n%s Requested: %i", v16, v17, *(_DWORD *)(v5 + 1044));
v19 = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v18);
std::string::assign(&__src, v19);
if ( (*(_BYTE *)&v36.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v36.__r_.__value_.__l.__data_);
}
v20 = *(_DWORD *)(v5 + 988) - *(_DWORD *)(v5 + 992);
if ( v20 )
{
v21 = __src.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 )
v21 = __src.__r_.__value_.__l.__data_;
v22 = sub_10088E820("%s\nOriginal: %i", v21, v20);
v23 = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v22);
std::string::assign(&__src, v23);
}
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 )
v15 = __src.__r_.__value_.__l.__data_;
v24 = strlen(v15);
if ( v24 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v25 = v24;
if ( v24 >= 0x17 )
{
v27 = 26;
if ( (v24 | 7) != 0x17 )
v27 = (v24 | 7) + 1;
v26 = (char *)operator new(v27);
v31 = v26;
__dst[0] = v27 | 1;
__dst[1] = v25;
goto LABEL_67;
}
LOBYTE(__dst[0]) = 2 * v24;
v26 = (char *)__dst + 1;
if ( v24 )
LABEL_67:
memmove(v26, v15, v25);
v26[v25] = 0;
v28 = FLAlertLayer::create_1(0, (int)"Level Info", (__int64)__dst, (int)"OK", 0, v35);
if ( (__dst[0] & 1) != 0 )
operator delete(v31);
(*(void (__fastcall **)(char *))(*(_QWORD *)v28 + 1312LL))(v28);
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 )
{
operator delete(__src.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v33.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_72:
if ( (*(_BYTE *)&v32.__r_.__value_.__s.0 & 1) == 0 )
return;
goto LABEL_73;
}
}
else if ( (*(_BYTE *)&v33.__r_.__value_.__s.0 & 1) == 0 )
{
goto LABEL_72;
}
operator delete(v33.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v32.__r_.__value_.__s.0 & 1) != 0 )
LABEL_73:
operator delete(v32.__r_.__value_.__l.__data_);
}