//
// GameLevelManager::markLevelAsDownloaded from 0x4aea48 to 0x4aeada (146 bytes)
//
// 2 xrefs:
// > GameLevelManager::markListAsDownloaded @ 0x4aeae2
// > GameLevelManager::processOnDownloadLevelCompleted @ 0x4da15a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:50:01 +0000
//
int __fastcall GameLevelManager::markLevelAsDownloaded(cocos2d::CCDictionary **this, const char *a2)
{
int v4; // r8
cocos2d::CCObject *v5; // r7
const char *LevelKey; // r0
const char *v7; // r5
size_t v8; // r0
int v10[3]; // [sp+0h] [bp-14h] BYREF
if ( cocos2d::CCDictionary::count(*(this + 140)) > 0x63u )
{
cocos2d::CCDictionary::getFirstKey((cocos2d::CCDictionary *)v10);
cocos2d::CCDictionary::removeObjectForKey(*(this + 140));
std::string::~string((int)v10);
}
v4 = (int)*(this + 140);
v5 = *(this + 242);
LevelKey = (const char *)GameLevelManager::getLevelKey((GameLevelManager *)this, a2);
memset(v10, 0, sizeof(v10));
v7 = LevelKey;
v8 = strlen(LevelKey);
std::string::__init(v10, v7, v8);
cocos2d::CCDictionary::setObject(v4, v5);
return std::string::~string((int)v10);
}