//
// sub_1003D3364 from 0x1003d3364 to 0x1003d3528 (452 bytes)
//
// 1 xrefs:
// > GameStatsManager::recountSpecialStats @ 0x1003d35bc
//
// 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:12 +0000
//
__int64 __fastcall sub_1003D3364(__int64 a1)
{
__int64 v1; // x8
__int64 v2; // x8
__int64 v3; // x20
__int64 v4; // x19
__int64 v5; // x8
__int64 v6; // x8
__int64 v7; // x19
char v8; // w8
char v9; // w19
bool v10; // zf
__int64 v11; // x8
__int64 v12; // x21
__int64 v13; // x8
__int64 v14; // x22
__int64 v15; // x23
unsigned int v16; // w24
__int64 v17; // x0
char *CString; // x0
__int64 v19; // x0
int v20; // w25
char *v21; // x1
__int64 v22; // x0
int v23; // w26
unsigned int v24; // w26
void *__p[2]; // [xsp+10h] [xbp-80h] BYREF
char v28; // [xsp+27h] [xbp-69h]
void *v29[2]; // [xsp+28h] [xbp-68h] BYREF
char v30; // [xsp+3Fh] [xbp-51h]
v1 = *(_QWORD *)(a1 + 712);
if ( v1 && (v2 = *(_QWORD *)(v1 + 56)) != 0 )
{
LODWORD(v3) = 0;
do
{
v4 = *(_QWORD *)(v2 + 288);
v3 = (unsigned int)cocos2d::CCString::intValue(*(_QWORD *)(v2 + 264)) + (unsigned int)v3;
v2 = v4;
}
while ( v4 );
}
else
{
v3 = 0;
}
v5 = *(_QWORD *)(a1 + 728);
if ( v5 )
{
v6 = *(_QWORD *)(v5 + 56);
if ( v6 )
{
do
{
v7 = *(_QWORD *)(v6 + 288);
v3 = (unsigned int)cocos2d::CCString::intValue(*(_QWORD *)(v6 + 264)) + (unsigned int)v3;
v6 = v7;
}
while ( v7 );
}
}
v8 = 1;
do
{
v9 = v8;
v10 = (v8 & 1) == 0;
v11 = 696;
if ( !v10 )
v11 = 688;
v12 = *(_QWORD *)(a1 + v11);
v13 = 680;
if ( !v10 )
v13 = 672;
v14 = *(_QWORD *)(a1 + v13);
v15 = cocos2d::CCDictionary::allKeys(v12);
if ( (unsigned int)sub_1002E757C(v15) )
{
v16 = 0;
do
{
v17 = cocos2d::CCArray::stringAtIndex(v15, v16);
CString = (char *)cocos2d::CCString::getCString(v17);
sub_100009900(v29, CString);
v19 = cocos2d::CCDictionary::valueForKey(v12, v29);
v20 = cocos2d::CCString::intValue(v19);
if ( v30 >= 0 )
v21 = (char *)v29;
else
v21 = (char *)v29[0];
sub_100009900(__p, v21);
v22 = cocos2d::CCDictionary::valueForKey(v14, __p);
v23 = cocos2d::CCString::intValue(v22);
if ( v28 < 0 )
operator delete(__p[0]);
if ( (unsigned int)(v23 - 11) >= 0xFFFFFFF7 )
v24 = v23 + 2;
else
v24 = 0;
if ( v30 < 0 )
operator delete(v29[0]);
v3 = (unsigned int)(int)(float)(floorf((float)((float)v20 / 100.0) * (float)v24) + (float)(int)v3);
++v16;
}
while ( v16 < (unsigned int)sub_1002E757C(v15) );
}
v8 = 0;
}
while ( (v9 & 1) != 0 );
return v3;
}