// // GameLevelManager::onGetMapPacksCompleted from 0x3c9ed4 to 0x3ca1c4 (752 bytes) // // 1 xrefs: // > GameLevelManager::handleIt @ 0x3d7036 // // 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 // int __fastcall GameLevelManager::onGetMapPacksCompleted(GameLevelManager *a1, char **a2, const char **a3) { char *v4; // r7 _BOOL4 v6; // r10 cocos2d::CCArray *v7; // r9 int result; // r0 cocos2d::CCString *v9; // r0 char *CString; // r0 cocos2d::CCString *v11; // r0 char *v12; // r0 cocos2d::CCString *v13; // r0 char *v14; // r0 char *v15; // r2 char *v16; // r3 unsigned int i; // r11 const char **v18; // r10 cocos2d::CCString *v19; // r0 char *v20; // r0 cocos2d::CCString *v21; // r0 char *v22; // r0 cocos2d::CCString *v23; // r0 char *v24; // r0 cocos2d::CCString *v25; // r0 char *v26; // r0 const void *v27; // r0 unsigned __int8 *v28; // r3 char *v29; // r2 _BOOL4 v30; // r11 LevelManagerDelegate *v31; // r0 LevelManagerDelegate *m_levelManagerDelegate; // r10 void (__fastcall *setupPageInfo)(LevelManagerDelegate *__hidden, std::string, const unsigned __int8 *); // r11 LevelManagerDelegate *v34; // r0 cocos2d::CCArray *MapPacks; // [sp+14h] [bp-88h] char v36[4]; // [sp+34h] [bp-68h] BYREF char v37[4]; // [sp+38h] [bp-64h] BYREF char v38[4]; // [sp+3Ch] [bp-60h] BYREF char *v39; // [sp+40h] [bp-5Ch] BYREF char *v40; // [sp+44h] [bp-58h] BYREF char v41[4]; // [sp+48h] [bp-54h] BYREF unsigned __int8 *v42; // [sp+4Ch] [bp-50h] BYREF cocos2d::CCArray v43; // [sp+50h] [bp-4Ch] BYREF v4 = (char *)*a3; GameLevelManager::removeDLFromActive(a1, *a3); sub_776584((int)&v43, "-1"); v6 = sub_3BE0D8((int)a2, (int)&v43); sub_774008(&v43); if ( v6 || (sub_776584((int)&v43, *a2), v7 = sub_3BE530(&v43, "#"), sub_774008(&v43), cocos2d::CCArray::count(v7) <= 2u) ) { result = (int)a1->m_levelManagerDelegate; if ( result ) return (*(int (__fastcall **)(int, char *))(*(_DWORD *)result + 4))(result, v4); } else { v9 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v7, 0); CString = (char *)cocos2d::CCString::getCString(v9); sub_776584((int)v36, CString); v11 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v7, 1u); v12 = (char *)cocos2d::CCString::getCString(v11); sub_776584((int)v37, v12); v13 = cocos2d::CCArray::stringAtIndex(v7, 2u); v14 = (char *)cocos2d::CCString::getCString(v13); sub_776584((int)v38, v14); sub_775C20(&v39, v36); MapPacks = GameLevelManager::createAndGetMapPacks((cocos2d::CCArray *)a1, &v39, v15, v16); sub_774008(&v39); sub_776584((int)&v40, (char *)&unk_939830); for ( i = 0; i < cocos2d::CCArray::count(MapPacks); ++i ) { v18 = (const char **)cocos2d::CCArray::objectAtIndex(MapPacks, i); v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v18[67]); v20 = (char *)cocos2d::CCString::getCString(v19); sub_776584((int)&v42, v20); if ( *((_DWORD *)v42 - 3) ) { sub_775170(&v42); sub_77458C(&v40, *v42); sub_775738(&v43, &v42); sub_77458C(&v40, HIBYTE(v43.__vftable[-1].setTag)); } v21 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v18[69]); v22 = (char *)cocos2d::CCString::getCString(v21); sub_774544((int)&v40, v22); v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v18[70]); v24 = (char *)cocos2d::CCString::getCString(v23); sub_774544((int)&v40, v24); sub_774008(&v42); } v25 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%c%s%s%c%c%s", (const char *)&dword_78, "I25", "fpAa", 112, 67, "Qg"); v26 = (char *)cocos2d::CCString::getCString(v25); sub_774544((int)&v40, v26); v27 = (const void *)strlen(v40); rtsha1::calc((rtsha1 *)v40, v27, (int)&v43.m_uID, v28); rtsha1::toHexString((rtsha1 *)&v43.m_uID, (const unsigned __int8 *)&v43.m_eObjType, v29); sub_776584((int)v41, (char *)&v43.m_eObjType); v30 = sub_3BE0D8((int)v38, (int)v41); sub_774008(v41); if ( v30 ) { GameLevelManager::saveFetchedMapPacks(a1, MapPacks); m_levelManagerDelegate = a1->m_levelManagerDelegate; if ( m_levelManagerDelegate ) { setupPageInfo = m_levelManagerDelegate->setupPageInfo; sub_775C20(&v42, v37); ((void (__fastcall *)(LevelManagerDelegate *, unsigned __int8 **, char *))setupPageInfo)( m_levelManagerDelegate, &v42, v4); sub_774008(&v42); } sub_775C20(&v43, v37); GameLevelManager::storeSearchResult(a1, MapPacks, (char **)&v43, v4); sub_774008(&v43); v34 = a1->m_levelManagerDelegate; if ( v34 ) v34->loadLevelsFinished(v34, MapPacks, (const unsigned __int8 *)v4); } else { v31 = a1->m_levelManagerDelegate; if ( v31 ) v31->loadLevelsFailed(v31, (const unsigned __int8 *)v4); } sub_774008(&v40); sub_774008(v38); sub_774008(v37); return sub_774008(v36); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source