//
// GameStatsManager::completedChallenge from 0x52a78c to 0x52a808 (124 bytes)
//
// 1 xrefs:
// > ChallengesPage::claimItem @ 0x600af8
//
// 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
//
GameManager *__fastcall GameStatsManager::completedChallenge(GameManager *this, GJChallengeItem *a2, int a3, int a4)
{
GameManager *v4; // r8
const char *v6; // r4
int v7; // r10
cocos2d::CCObject *v8; // r9
_DWORD v9[4]; // [sp+0h] [bp-10h] BYREF
v9[0] = this;
v9[1] = a2;
v9[2] = a3;
v9[3] = a4;
v4 = this;
if ( *((_BYTE *)a2 + 96) )
{
this = (GameManager *)GameStatsManager::hasCompletedChallenge(
this,
a2,
*((unsigned __int8 *)a2 + 96),
(int)&_stack_chk_guard);
if ( !this )
{
v6 = (const char *)(*((_DWORD *)a2 + 17) - *((_DWORD *)a2 + 18));
v7 = *((_DWORD *)v4 + 116);
v8 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v6);
GameStatsManager::getChallengeKey((GameStatsManager *)v9, v4, (int)a2);
cocos2d::CCDictionary::setObject(v7, v8);
std::string::~string((int)v9);
return GameStatsManager::incrementStat(v4, "13", (int)v6);
}
}
return this;
}