//
// sub_1003D204C from 0x1003d204c to 0x1003d20f8 (172 bytes)
//
// 1 xrefs:
// > ChallengesPage::claimItem @ 0x1000367b8
//
// 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:11 +0000
//
__int64 __fastcall sub_1003D204C(__int64 result, __int64 a2)
{
__int64 v3; // x19
int v4; // w8
__int64 v5; // x20
__int64 v6; // x22
void *v7; // x23
void *__p[2]; // [xsp+8h] [xbp-48h] BYREF
char v9; // [xsp+1Fh] [xbp-31h]
if ( *(_BYTE *)(a2 + 100) == 1 )
{
v3 = result;
result = sub_1003D1FDC(result, a2);
if ( (result & 1) == 0 )
{
v4 = *(_DWORD *)(a2 + 72);
v5 = (unsigned int)(v4 - *(_DWORD *)(a2 + 76));
v6 = *(_QWORD *)(v3 + 712);
v7 = sub_1003065B0("%i", v4 - *(_DWORD *)(a2 + 76));
sub_1003D1F94(a2, __p);
cocos2d::CCDictionary::setObject(v6, v7, __p);
if ( v9 < 0 )
operator delete(__p[0]);
return GameStatsManager::incrementStat(v3, "13", v5);
}
}
return result;
}