//
// GameLevelManager::getCompletedLevels from 0x4ad2f8 to 0x4ad3b6 (190 bytes)
//
// 2 xrefs:
// > GameLevelManager::submitUserInfo @ 0x4bb016
// > GameLevelManager::getOnlineLevels @ 0x4c0ec8
//
// 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:00 +0000
//
cocos2d::CCArray *__fastcall GameLevelManager::getCompletedLevels(cocos2d::CCDictionary **this, int a2)
{
unsigned int v3; // r5
cocos2d::CCArray *v4; // r7
cocos2d::CCArray *v5; // r8
int v6; // r0
cocos2d::CCString *v7; // r0
const char *CString; // r0
int v9; // r11
size_t v10; // r0
GJGameLevel *v11; // r11
bool v12; // cc
const char *v15; // [sp+4h] [bp-18h]
int v16[3]; // [sp+8h] [bp-14h] BYREF
v3 = 0;
v4 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)this);
v5 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*(this + 136));
while ( v3 < cocos2d::CCArray::count(v5) )
{
v6 = cocos2d::CCArray::count(v5);
v7 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v5, ~v3 + v6);
CString = (const char *)cocos2d::CCString::getCString(v7);
memset(v16, 0, sizeof(v16));
v9 = (int)*(this + 136);
v15 = CString;
v10 = strlen(CString);
std::string::__init(v16, v15, v10);
v11 = (GJGameLevel *)cocos2d::CCDictionary::objectForKey(v9, v16);
std::string::~string((int)v16);
if ( a2 )
v12 = *((_DWORD *)v11 + 172) - *((_DWORD *)v11 + 173) <= 99;
else
v12 = GJGameLevel::getNormalPercent(v11) <= 99;
if ( !v12 )
cocos2d::CCArray::addObject(v4, v11);
++v3;
}
return v4;
}