// // InfoLayer::onLevelInfo from 0x1402bdbb0 to 0x1402be181 (1489 bytes) // // 2 xrefs: // > InfoLayer::init @ 0x1402bc759 // > @ 0x1406d284c // // 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=8 void InfoLayer::onLevelInfo(InfoLayer *a1, cocos2d::CCObject *a2) { GJLevelList *m_levelList; // rcx GameLevelManager *v4; // rcx GJGameLevel *m_level; // rax GJGameLevel *SavedLevel; // rax int v7; // edx GJGameLevel *v8; // r14 GameManager *v9; // rcx size_t v10; // rdi char v11; // r12 _QWORD *v12; // rbx size_t v13; // rsi unsigned __int64 v14; // r15 void **v15; // rcx void **v16; // r13 size_t v17; // r12 size_t v18; // r8 void **v19; // rdx size_t v20; // r8 void **v21; // rdx const char *v22; // r8 const char *v23; // rdx cocos2d::CCString *v24; // rax char *CString; // rax size_t v26; // r8 unsigned __int64 v27; // rsi void **v28; // r8 void **v29; // rdx cocos2d::CCString *v30; // rax char *v31; // rax size_t v32; // r8 void *v33; // rcx int v34; // r8d void **v35; // rdx cocos2d::CCString *v36; // rax char *v37; // rax size_t v38; // r8 void **v39; // rdx __int64 v40; // rax int v41; // ecx FLAlertLayer *v42; // rbx void *v43; // rcx bool v44; // [rsp+50h] [rbp-B0h] void *v45; // [rsp+58h] [rbp-A8h] void *v46; // [rsp+58h] [rbp-A8h] void *Block[2]; // [rsp+68h] [rbp-98h] BYREF __int64 v48; // [rsp+78h] [rbp-88h] unsigned __int64 v49; // [rsp+80h] [rbp-80h] void *Src[2]; // [rsp+88h] [rbp-78h] BYREF __int64 v51; // [rsp+98h] [rbp-68h] unsigned __int64 v52; // [rsp+A0h] [rbp-60h] void *Buf1[2]; // [rsp+A8h] [rbp-58h] BYREF size_t v54; // [rsp+B8h] [rbp-48h] unsigned __int64 v55; // [rsp+C0h] [rbp-40h] void *v56[4]; // [rsp+C8h] [rbp-38h] BYREF void *v57[4]; // [rsp+E8h] [rbp-18h] BYREF __int128 Buf2; // [rsp+108h] [rbp+8h] BYREF __int64 v59; // [rsp+118h] [rbp+18h] __int64 v60; // [rsp+120h] [rbp+20h] m_levelList = a1->m_levelList; if ( m_levelList ) { GJLevelList::showListInfo(m_levelList); } else { v4 = (GameLevelManager *)qword_1406C2EC0; if ( !qword_1406C2EC0 ) { v45 = operator new(0x3D0u); qword_1406C2EC0 = sub_140141280((__int64)v45); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0); v4 = (GameLevelManager *)qword_1406C2EC0; } m_level = a1->m_level; if ( !m_level || (m_level->m_dailyID.random - m_level->m_dailyID.seed <= 0 ? ((v7 = m_level->m_levelID.random - m_level->m_levelID.seed, !m_level->m_gauntletLevel) ? (SavedLevel = GameLevelManager::getSavedLevel(v4, v7)) : (SavedLevel = GameLevelManager::getSavedGauntletLevel(v4, v7))) : (SavedLevel = GameLevelManager::getSavedDailyLevel(v4, m_level->m_dailyID.random - m_level->m_dailyID.seed)), (v8 = SavedLevel) == nullptr) ) { v8 = a1->m_level; } sub_14003BDB0((__int64)v57, (__int64)&v8->m_uploadDate); sub_14003BDB0((__int64)v56, (__int64)&v8->m_updateDate); if ( !v57[2] ) sub_14003CCE0(v57, &word_140532F44, 2u); if ( !v56[2] ) sub_14003CCE0(v56, &word_140532F44, 2u); *(_OWORD *)Src = 0; v51 = 0; v52 = 15; LOBYTE(Src[0]) = 0; v9 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v46 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v46); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v9 = (GameManager *)qword_1406C2ED8; } v10 = -1; if ( GameManager::getGameVariable(v9, "0089") || a1->m_score ) { *(_OWORD *)Block = 0; v12 = sub_14003AA10(0x20u); Block[0] = v12; v13 = 25; v48 = 25; v14 = 31; v49 = 31; strcpy((char *)v12, "(No description provided)"); GJGameLevel::getUnpackedLevelDescription((__int64)v8, (__int64)Buf1); Buf2 = 0; v59 = 0; v60 = 15; LOBYTE(Buf2) = 0; v15 = Buf1; v44 = v55 > 0xF; v16 = (void **)Buf1[0]; if ( v55 > 0xF ) v15 = (void **)Buf1[0]; v17 = v54; v18 = v54; if ( v54 ) v18 = 0; if ( memcmp(v15, &Buf2, v18) || v17 ) { v19 = Buf1; if ( v44 ) v19 = v16; v20 = -1; do ++v20; while ( *((_BYTE *)v19 + v20) ); sub_14003CCE0(Block, v19, v20); v14 = v49; v13 = v48; v12 = Block[0]; } v21 = Block; if ( v14 > 0xF ) v21 = (void **)v12; sub_140041270(Src, v21, v13); sub_140041270(Src, &unk_14055A8B4, 2u); sub_14003A830((__int64)Buf1); sub_14003A830((__int64)Block); v11 = 1; } else { v11 = 0; } v22 = (const char *)v56; if ( v56[3] > (void *)0xF ) v22 = (const char *)v56[0]; v23 = (const char *)v57; if ( v57[3] > (void *)0xF ) v23 = (const char *)v57[0]; v24 = cocos2d::CCString::createWithFormat("Uploaded: %s ago\nUpdated: %s ago", v23, v22); CString = (char *)cocos2d::CCString::getCString(v24); v26 = -1; do ++v26; while ( CString[v26] ); sub_140041270(Src, CString, v26); if ( v8->m_starsRequested > 0 ) { *(_OWORD *)Block = 0; v48 = 5; v27 = 15; v49 = 15; strcpy((char *)Block, "Stars"); if ( v8->m_levelLength == 5 ) { v48 = 5; memmove(Block, "Moons", 5u); BYTE5(Block[0]) = 0; v27 = v49; } v28 = Block; if ( v27 > 0xF ) v28 = (void **)Block[0]; v29 = Src; if ( v52 > 0xF ) v29 = (void **)Src[0]; v30 = cocos2d::CCString::createWithFormat( "%s\n%s Requested: %i", (const char *)v29, (const char *)v28, v8->m_starsRequested); v31 = (char *)cocos2d::CCString::getCString(v30); v32 = -1; do ++v32; while ( v31[v32] ); sub_14003CCE0(Src, v31, v32); if ( v49 > 0xF ) { v33 = Block[0]; if ( v49 + 1 >= 0x1000 ) { v33 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v33 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v33); } } v34 = v8->m_originalLevel.random - v8->m_originalLevel.seed; if ( v34 ) { v35 = Src; if ( v52 > 0xF ) v35 = (void **)Src[0]; v36 = cocos2d::CCString::createWithFormat("%s\nOriginal: %i", (const char *)v35, v34); v37 = (char *)cocos2d::CCString::getCString(v36); v38 = -1; do ++v38; while ( v37[v38] ); sub_14003CCE0(Src, v37, v38); } v39 = Src; if ( v52 > 0xF ) v39 = (void **)Src[0]; *(_OWORD *)Block = 0; v48 = 0; v49 = 0; do ++v10; while ( *((_BYTE *)v39 + v10) ); sub_14003A930(Block, v39, v10); v40 = sub_14003BDB0((__int64)&Buf2, (__int64)Block); v41 = 300; if ( v11 ) v41 = 380; v42 = FLAlertLayer::create(0, (int)"Level Info", v40, (__int64)"OK", 0, COERCE_INT((float)v41), 0, 0, 1065353216); sub_14003A830((__int64)Block); v42->show(v42); if ( v52 > 0xF ) { v43 = Src[0]; if ( v52 + 1 >= 0x1000 ) { v43 = *((void **)Src[0] - 1); if ( (unsigned __int64)((char *)Src[0] - (char *)v43 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v43); } v51 = 0; v52 = 15; LOBYTE(Src[0]) = 0; sub_14003A830((__int64)v56); sub_14003A830((__int64)v57); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source