//
// GameStatsManager::getCompletedMapPacks from 0x51db2c to 0x51dc40 (276 bytes)
//
// 1 xrefs:
// > GameManager::recountUserStats @ 0x41bd0e
//
// 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:50 +0000
//
cocos2d::CCArray *__fastcall GameStatsManager::getCompletedMapPacks(cocos2d::CCDictionary **this)
{
unsigned int v1; // r5
cocos2d::CCArray *v2; // r10
cocos2d::CCArray *v3; // r9
cocos2d::CCString *v4; // r0
const char *CString; // r0
const char *v6; // r7
size_t v7; // r0
cocos2d::CCArray *v8; // r11
cocos2d::CCString *v9; // r0
size_t v10; // r0
cocos2d::CCObject *v11; // r0
const char *v13; // [sp+Ch] [bp-30h]
_BOOL4 v14; // [sp+Ch] [bp-30h]
int v15[3]; // [sp+10h] [bp-2Ch] BYREF
int v16[3]; // [sp+1Ch] [bp-20h] BYREF
int v17[3]; // [sp+28h] [bp-14h] BYREF
v1 = 0;
v2 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*(this + 103));
v3 = (cocos2d::CCArray *)cocos2d::CCArray::create(v2);
while ( v1 < cocos2d::CCArray::count(v2) )
{
v4 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v2, v1);
CString = (const char *)cocos2d::CCString::getCString(v4);
memset(v15, 0, sizeof(v15));
v6 = CString;
v7 = strlen(CString);
std::string::__init(v15, v6, v7);
v8 = sub_519534(v15, "_");
if ( cocos2d::CCArray::count(v8) == 2 )
{
v9 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v8, 0);
v13 = (const char *)cocos2d::CCString::getCString(v9);
memset(v16, 0, sizeof(v16));
v10 = strlen(v13);
std::string::__init(v16, v13, v10);
memset(v17, 0, sizeof(v17));
std::string::__init(v17, "pack", 4u);
v14 = sub_515F68((unsigned __int8 *)v16, (unsigned __int8 *)v17);
std::string::~string((int)v17);
if ( v14 )
{
v11 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(v8, 1u);
cocos2d::CCArray::addObject(v3, v11);
}
std::string::~string((int)v16);
}
++v1;
std::string::~string((int)v15);
}
return v3;
}