//
// GameLevelManager::updateLevel from 0x3d02e4 to 0x3d0400 (284 bytes)
//
// 2 xrefs:
// > LevelInfoLayer::onUpdate @ 0x3b21ce
// > LevelInfoLayer::init @ 0x3b528a
//
// 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 GameLevelManager::updateLevel(GameLevelManager *a1, GJGameLevel *a2)
{
const char *v3; // r5
char *LevelDownloadKey; // r10
cocos2d::CCString *v5; // r0
const char *CString; // r0
cocos2d::CCString *v7; // r0
char *v8; // r0
char *v9; // [sp+1Ch] [bp-14h] BYREF
char *v10; // [sp+20h] [bp-10h] BYREF
const char *v11; // [sp+24h] [bp-Ch] BYREF
char *v12; // [sp+28h] [bp-8h] BYREF
v3 = (const char *)(a2->m_levelID.random - a2->m_levelID.seed);
LevelDownloadKey = (char *)GameLevelManager::getLevelDownloadKey(
a1,
(int)v3,
a2->m_gauntletLevel,
a2->m_dailyID.random - a2->m_dailyID.seed);
if ( !GameLevelManager::isDLActive(a1, LevelDownloadKey) )
{
GameLevelManager::addDLToActive(a1, LevelDownloadKey);
GameLevelManager::getBasePostString((GameLevelManager *)&v9);
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&aO1i2r3e45s7t89[10]);
CString = cocos2d::CCString::getCString(v5);
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&levelID=%i&gameVersion=%i&secret=%s",
v3,
22,
CString);
v8 = (char *)cocos2d::CCString::getCString(v7);
sub_774544((int)&v9, v8);
sub_776584((int)&v10, "https://www.boomlings.com/database/downloadGJLevel22.php");
sub_776584((int)&v11, v9);
sub_776584((int)&v12, LevelDownloadKey);
GameLevelManager::ProcessHttpRequest(a1, &v10, &v11, &v12, 5);
sub_774008(&v12);
sub_774008(&v11);
sub_774008(&v10);
sub_774008(&v9);
}
}