//
// GJMapPack::completedMaps from 0x8069ec to 0x806aa4 (184 bytes)
//
// 6 xrefs:
// > MapPackCell::loadFromMapPack @ 0x73d7cc
// > MapPackCell::loadFromMapPack @ 0x73d82c
// > MapPackCell::loadFromMapPack @ 0x73dcb0
// > GJMapPack::hasCompletedMapPack @ 0x806ac4
// > GauntletNode::generateNode @ 0xa74c40
// > ??> @ 0xc9fd0
//
// 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 12:54:45 +0000
//
__int64 __fastcall GJMapPack::completedMaps(GJMapPack *this)
{
cocos2d::CCArray *v2; // x0
unsigned int v3; // w19
unsigned int v4; // w21
GameStatsManager *v5; // x0
cocos2d::CCString *v6; // x0
int v7; // w1
GameStatsManager *v8; // x0
GameStatsManager *v9; // x0
int v11; // [xsp+38h] [xbp+38h]
v2 = *((cocos2d::CCArray **)this + 40);
if ( !v2 )
return 0;
v3 = 0;
v4 = 0;
while ( v3 < (unsigned int)cocos2d::CCArray::count(v2) )
{
v6 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 40), v3);
v7 = cocos2d::CCString::intValue(v6);
v8 = (GameStatsManager *)*((unsigned __int8 *)this + 404);
v11 = v7;
if ( *((_BYTE *)this + 404) )
{
v5 = (GameStatsManager *)GameStatsManager::sharedState(v8);
if ( (unsigned __int8)GameStatsManager::hasCompletedGauntletLevel(v5, v11) )
++v4;
}
else
{
v9 = (GameStatsManager *)GameStatsManager::sharedState(v8);
if ( (unsigned __int8)GameStatsManager::hasCompletedOnlineLevel(v9, v11) )
++v4;
}
v2 = *((cocos2d::CCArray **)this + 40);
++v3;
}
return v4;
}