// // InfoLayer::onLevelInfo from 0x1007b1860 to 0x1007b1d13 (1203 bytes) // // 1 xrefs: // > InfoLayer::init @ 0x1007affd9 // // 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 InfoLayer::onLevelInfo(InfoLayer *a1, cocos2d::CCObject *a2) { __int128 v2; // xmm0 GJLevelList *m_levelList; // rdi GameLevelManager *v5; // rax GJGameLevel *SavedLevel_1; // rax GJGameLevel *m_level; // rbx unsigned int v8; // eax GameManager *v9; // rax const std::string::value_type *v10; // rsi const std::string::value_type *v11; // rsi std::string::size_type size; // rdx __int64 v13; // xmm0_8 const char *data; // rsi const char *v15; // rdx char *v16; // rax const char *CString; // rax const char *v18; // r14 const char *v19; // rsi const char *v20; // rdx char *v21; // rax const char *v22; // rax int v23; // edx const char *v24; // rsi char *v25; // rax const char *v26; // rax size_t v27; // rax size_t v28; // rbx char *v29; // r15 size_t v30; // r12 char *v31; // rbx std::string v32; // [rsp+0h] [rbp-C0h] BYREF _QWORD __dst[2]; // [rsp+18h] [rbp-A8h] BYREF void *v34; // [rsp+28h] [rbp-98h] std::string v35; // [rsp+30h] [rbp-90h] BYREF std::string m_updateDate; // [rsp+50h] [rbp-70h] BYREF std::string __src; // [rsp+68h] [rbp-58h] BYREF int v38; // [rsp+84h] [rbp-3Ch] std::string v39; // [rsp+88h] [rbp-38h] BYREF m_levelList = a1->m_levelList; if ( m_levelList ) { GJLevelList::showListInfo(m_levelList); return; } v5 = GameLevelManager::sharedState(); SavedLevel_1 = GameLevelManager::getSavedLevel_1(v5, a1->m_level); m_level = SavedLevel_1; if ( SavedLevel_1 ) { if ( (SavedLevel_1->m_uploadDate.m_data.m_short.sizex2 & 1) == 0 ) goto LABEL_5; } else { m_level = a1->m_level; if ( (m_level->m_uploadDate.m_data.m_short.sizex2 & 1) == 0 ) { LABEL_5: v35.__r_.__value_.__r.__words[2] = (std::string::size_type)m_level->m_uploadDate.m_data.m_long.longStorage; v2 = *(_OWORD *)&m_level->m_uploadDate.m_data.m_short.sizex2; *(_OWORD *)&v35.__r_.__value_.__l.0 = v2; if ( (m_level->m_updateDate.m_data.m_short.sizex2 & 1) != 0 ) goto LABEL_6; goto LABEL_11; } } sub_100006B70( &v35, m_level->m_uploadDate.m_data.m_long.longStorage, m_level->m_uploadDate.m_data.m_long.size, *(double *)&v2); if ( (m_level->m_updateDate.m_data.m_short.sizex2 & 1) != 0 ) { LABEL_6: sub_100006B70( &m_updateDate, m_level->m_updateDate.m_data.m_long.longStorage, m_level->m_updateDate.m_data.m_long.size, *(double *)&v2); v8 = (unsigned int)v35.__r_.__value_.__l.0; if ( (*(_BYTE *)&v35.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_7; LABEL_12: if ( v8 >> 1 ) goto LABEL_14; goto LABEL_13; } LABEL_11: m_updateDate = (std::string)m_level->m_updateDate; v8 = (unsigned int)v35.__r_.__value_.__l.0; if ( (*(_BYTE *)&v35.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_12; LABEL_7: if ( v35.__r_.__value_.__l.__size_ ) goto LABEL_14; LABEL_13: std::string::assign(&v35, "NA"); LABEL_14: if ( (*(_BYTE *)&m_updateDate.__r_.__value_.__s.0 & 1) != 0 ) { if ( !m_updateDate.__r_.__value_.__l.__size_ ) goto LABEL_18; } else if ( !(*(_BYTE *)&m_updateDate.__r_.__value_.__l.0 >> 1) ) { LABEL_18: std::string::assign(&m_updateDate, "NA"); } *(_WORD *)&__src.__r_.__value_.__l.0 = 0; v9 = GameManager::sharedState(); if ( !GameManager::getGameVariable(v9, "0089") && !a1->m_score ) { v13 = 1133903872; v38 = 1133903872; if ( (*(_BYTE *)&v35.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_37; LABEL_40: data = v35.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&m_updateDate.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_38; goto LABEL_41; } v39.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x20u); v39.__r_.__value_.__r.__words[0] = 33; v39.__r_.__value_.__l.__size_ = 25; strcpy(v39.__r_.__value_.__l.__data_, "(No description provided)"); GJGameLevel::getUnpackedLevelDescription(&v32, (__int64)m_level, *(__m128 *)"(No description provided)"); if ( (*(_BYTE *)&v32.__r_.__value_.__s.0 & 1) != 0 ) { if ( !v32.__r_.__value_.__l.__size_ ) goto LABEL_29; } else if ( !(*(_BYTE *)&v32.__r_.__value_.__l.0 >> 1) ) { goto LABEL_29; } if ( (*(_BYTE *)&v32.__r_.__value_.__s.0 & 1) != 0 ) v10 = v32.__r_.__value_.__l.__data_; else v10 = v32.__r_.__value_.__s.__data_; std::string::assign(&v39, v10); LABEL_29: if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 ) { v11 = v39.__r_.__value_.__l.__data_; size = v39.__r_.__value_.__l.__size_; } else { size = *(_BYTE *)&v39.__r_.__value_.__l.0 >> 1; v11 = v39.__r_.__value_.__s.__data_; } std::string::append(&__src, v11, size); std::string::append(&__src, "\n\n"); if ( (*(_BYTE *)&v32.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v32.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v39.__r_.__value_.__l.__data_); v13 = 1136525312; v38 = 1136525312; if ( (*(_BYTE *)&v35.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_40; LABEL_37: data = v35.__r_.__value_.__l.__data_; if ( (*(_BYTE *)&m_updateDate.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_38: v15 = m_updateDate.__r_.__value_.__s.__data_; goto LABEL_42; } LABEL_41: v15 = m_updateDate.__r_.__value_.__l.__data_; LABEL_42: v16 = sub_1007AB580("Uploaded: %s ago\nUpdated: %s ago", data, v15); CString = cocos2d::CCString::getCString((cocos2d::CCString *)v16); std::string::append(&__src, CString); v18 = __src.__r_.__value_.__s.__data_; if ( m_level->m_starsRequested > 0 ) { strcpy((char *)&v39, "\nStars"); if ( GJGameLevel::isPlatformer(m_level) ) std::string::assign(&v39, "Moons"); v19 = __src.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 ) v19 = __src.__r_.__value_.__l.__data_; if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 ) v20 = v39.__r_.__value_.__l.__data_; else v20 = v39.__r_.__value_.__s.__data_; v21 = sub_1007AB580("%s\n%s Requested: %i", v19, v20, m_level->m_starsRequested); v22 = cocos2d::CCString::getCString((cocos2d::CCString *)v21); std::string::assign(&__src, v22); if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v39.__r_.__value_.__l.__data_); } v23 = m_level->m_originalLevel.random - m_level->m_originalLevel.seed; if ( v23 ) { v24 = __src.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 ) v24 = __src.__r_.__value_.__l.__data_; v25 = sub_1007AB580("%s\nOriginal: %i", v24, v23); v26 = cocos2d::CCString::getCString((cocos2d::CCString *)v25); std::string::assign(&__src, v26); } if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 ) v18 = __src.__r_.__value_.__l.__data_; v27 = strlen(v18); if ( v27 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v13); v28 = v27; if ( v27 >= 0x17 ) { v30 = 26; if ( (v27 | 7) != 0x17 ) v30 = (v27 | 7) + 1; v29 = (char *)operator new(v30); v34 = v29; __dst[0] = v30 | 1; __dst[1] = v28; goto LABEL_65; } LOBYTE(__dst[0]) = 2 * v27; v29 = (char *)__dst + 1; if ( v27 ) LABEL_65: memmove(v29, v18, v28); v29[v28] = 0; v31 = FLAlertLayer::create_1(0, (int)"Level Info", (__int64)__dst, (int)"OK", 0, COERCE_DOUBLE((unsigned __int64)v38)); if ( (__dst[0] & 1) != 0 ) operator delete(v34); (*(void (__fastcall **)(char *))(*(_QWORD *)v31 + 1288LL))(v31); if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 ) { operator delete(__src.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&m_updateDate.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_70: if ( (*(_BYTE *)&v35.__r_.__value_.__s.0 & 1) == 0 ) return; goto LABEL_71; } } else if ( (*(_BYTE *)&m_updateDate.__r_.__value_.__s.0 & 1) == 0 ) { goto LABEL_70; } operator delete(m_updateDate.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v35.__r_.__value_.__s.0 & 1) != 0 ) LABEL_71: operator delete(v35.__r_.__value_.__l.__data_); }
GD Web Decomp Icon

GD Web Decomp

Raw Source