//
// GameStatsManager::getCompletedMapPacks from 0x1003cf4b4 to 0x1003cf5fc (328 bytes)
//
// 1 xrefs:
// > GameManager::recountUserStats @ 0x1003b71c8
//
// 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 11:04:10 +0000
//
_QWORD *__fastcall GameStatsManager::getCompletedMapPacks(__int64 a1)
{
__int64 v1; // x19
_QWORD *v2; // x20
unsigned int v3; // w21
__int64 v4; // x0
char *CString; // x0
__int64 v6; // x24
__int64 v7; // x0
char *v8; // x0
_BOOL4 v9; // w0
_BOOL4 v10; // w25
void *__p[2]; // [xsp+8h] [xbp-88h] BYREF
char v13; // [xsp+1Fh] [xbp-71h]
void *v14[2]; // [xsp+20h] [xbp-70h] BYREF
char v15; // [xsp+37h] [xbp-59h]
void *v16[2]; // [xsp+38h] [xbp-58h] BYREF
char v17; // [xsp+4Fh] [xbp-41h]
v1 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 608));
v2 = sub_1002E736C();
if ( (unsigned int)sub_1002E757C(v1) )
{
v3 = 0;
while ( 1 )
{
v4 = cocos2d::CCArray::stringAtIndex(v1, v3);
CString = (char *)cocos2d::CCString::getCString(v4);
sub_100009900(v16, CString);
v6 = sub_1003CF638(v16, "_");
if ( (unsigned int)sub_1002E757C(v6) == 2 )
break;
LABEL_11:
if ( v17 < 0 )
operator delete(v16[0]);
if ( ++v3 >= (unsigned int)sub_1002E757C(v1) )
return v2;
}
v7 = cocos2d::CCArray::stringAtIndex(v6, 0);
v8 = (char *)cocos2d::CCString::getCString(v7);
sub_100009900(v14, v8);
sub_100009900(__p, "pack");
v9 = sub_1000045BC(v14, __p);
v10 = v9;
if ( v13 < 0 )
{
operator delete(__p[0]);
if ( !v10 )
goto LABEL_9;
}
else if ( !v9 )
{
LABEL_9:
if ( v15 < 0 )
operator delete(v14[0]);
goto LABEL_11;
}
sub_1002E75A0(v6, 1u);
sub_1002E74E0((__int64)v2);
goto LABEL_9;
}
return v2;
}