//
// GameLevelManager::getCompletedEventLevels from 0x1000acb38 to 0x1000acc90 (344 bytes)
//
// 2 xrefs:
// > GameLevelManager::updateUserScore @ 0x1000bc4a8
// > GameLevelManager::updateUserScore @ 0x1000bc650
//
// 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::getCompletedEventLevels(__int64 a1, int a2, int a3)
{
__int64 v6; // x0
unsigned int *v7; // x9
__int64 v8; // x8
__int64 v9; // x22
_QWORD *v10; // x27
unsigned __int64 v11; // x28
__int64 v12; // x25
__int64 v13; // x26
char *CString; // x0
void *v15; // x0
_DWORD *v16; // x25
int v17; // w8
__int64 v18; // x0
void *__p[2]; // [xsp+8h] [xbp-68h] BYREF
char v21; // [xsp+1Fh] [xbp-51h]
v6 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 848));
if ( v6 )
{
v7 = *(unsigned int **)(v6 + 56);
v8 = *v7;
if ( (_DWORD)v8 )
{
v9 = 0;
v10 = *((_QWORD **)v7 + 2);
v11 = (unsigned __int64)&v10[v8 - 1];
while ( 1 )
{
v12 = *v10;
if ( !*v10 )
return v9;
if ( (int)cocos2d::CCString::intValue(*v10) >= 200001 )
{
v13 = *(_QWORD *)(a1 + 848);
CString = (char *)cocos2d::CCString::getCString(v12);
sub_100009900(__p, CString);
v15 = (void *)cocos2d::CCDictionary::objectForKey(v13, __p);
if ( v15 )
{
v15 = __dynamic_cast(
v15,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'GJGameLevel,
0);
v16 = v15;
}
else
{
v16 = nullptr;
}
if ( v21 < 0 )
{
operator delete(__p[0]);
if ( v16 )
{
LABEL_13:
v17 = v16[237] - v16[238];
if ( v17 >= a2 && v17 <= a3 && v16[215] - v16[214] == 100 )
{
v18 = GameStatsManager::sharedState(v15);
v9 = (unsigned int)v9 + (unsigned int)GameStatsManager::hasCompletedLevel(v18, v16);
}
}
}
else if ( v16 )
{
goto LABEL_13;
}
}
if ( (unsigned __int64)++v10 > v11 )
return v9;
}
}
}
return 0;
}