//
// GameLevelManager::getCompletedWeeklyLevels from 0x1000ac860 to 0x1000ac9b4 (340 bytes)
//
// 1 xrefs:
// > GameLevelManager::updateUserScore @ 0x1000bc488
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 10:58:37 +0000
//
__int64 __fastcall GameLevelManager::getCompletedWeeklyLevels(__int64 a1)
{
__int64 v2; // x0
unsigned int *v3; // x9
__int64 v4; // x8
__int64 v5; // x20
_QWORD *v6; // x25
unsigned __int64 v7; // x26
__int64 v8; // x23
__int64 v9; // x24
char *CString; // x0
void *v11; // x0
_DWORD *v12; // x23
__int64 v13; // x0
void *__p[2]; // [xsp+8h] [xbp-68h] BYREF
char v16; // [xsp+1Fh] [xbp-51h]
v2 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 848));
if ( v2 )
{
v3 = *(unsigned int **)(v2 + 56);
v4 = *v3;
if ( (_DWORD)v4 )
{
v5 = 0;
v6 = *((_QWORD **)v3 + 2);
v7 = (unsigned __int64)&v6[v4 - 1];
while ( 1 )
{
v8 = *v6;
if ( !*v6 )
return v5;
if ( ((unsigned int)cocos2d::CCString::intValue(*v6) - 100001) >> 5 <= 0xC34 )
{
v9 = *(_QWORD *)(a1 + 848);
CString = (char *)cocos2d::CCString::getCString(v8);
sub_100009900(__p, CString);
v11 = (void *)cocos2d::CCDictionary::objectForKey(v9, __p);
if ( v11 )
{
v11 = __dynamic_cast(
v11,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'GJGameLevel,
0);
v12 = v11;
}
else
{
v12 = nullptr;
}
if ( v16 < 0 )
{
operator delete(__p[0]);
if ( v12 )
{
LABEL_13:
if ( v12[237] - v12[238] == 10 && v12[215] - v12[214] == 100 )
{
v13 = GameStatsManager::sharedState(v11);
v5 = (unsigned int)v5 + (unsigned int)GameStatsManager::hasCompletedLevel(v13, v12);
}
}
}
else if ( v12 )
{
goto LABEL_13;
}
}
if ( (unsigned __int64)++v6 > v7 )
return v5;
}
}
}
return 0;
}