//
// GameStatsManager::completedMapPack from 0x52a098 to 0x52a15c (196 bytes)
//
// 2 xrefs:
// > MapPackCell::onClaimReward @ 0x427d90
// > GJAccountManager::onSyncAccountCompleted @ 0x582b5a
//
// 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:51:59 +0000
//
cocos2d::CCArray *__fastcall GameStatsManager::completedMapPack(
GameStatsManager *this,
const char **a2,
int a3,
int a4)
{
cocos2d::CCArray *result; // r0
const char *MapPackKey; // r0
int v8; // r9
cocos2d::CCObject *v9; // r6
const char *v10; // r10
size_t v11; // r0
const char *v12; // r5
int v13; // r6
int v14; // r3
GameStatsManager *v15; // [sp+0h] [bp-10h] BYREF
const char **v16; // [sp+4h] [bp-Ch]
int v17; // [sp+8h] [bp-8h]
int v18; // [sp+Ch] [bp-4h]
v15 = this;
v16 = a2;
v17 = a3;
v18 = a4;
result = (cocos2d::CCArray *)GameStatsManager::hasCompletedMapPack(this, a2[67]);
if ( !result )
{
MapPackKey = (const char *)GameStatsManager::getMapPackKey(this, a2[67]);
v15 = nullptr;
v16 = nullptr;
v17 = 0;
v8 = *((_DWORD *)this + 103);
v9 = *((cocos2d::CCObject **)this + 66);
v10 = MapPackKey;
v11 = strlen(MapPackKey);
std::string::__init((int *)&v15, v10, v11);
cocos2d::CCDictionary::setObject(v8, v9);
std::string::~string((int)&v15);
result = GJMapPack::totalMaps((GJMapPack *)a2);
if ( (int)result > 2 )
{
v12 = a2[69];
v13 = (int)a2[70];
if ( (int)v12 >= 11 )
v12 = nullptr;
if ( v13 >= 3 )
v13 = 0;
GameStatsManager::incrementStat(this, "6", (int)v12);
GameStatsManager::incrementStat(this, (const char *)&a1i2r3e45s789g[10], v13);
GameStatsManager::incrementStat(this, (const char *)&a1i2r3e45s789g[9]);
return (cocos2d::CCArray *)GameStatsManager::setStarsForMapPack(this, a2[67], v12, v14);
}
}
return result;
}