//
// GameStatsManager::awardOldSpecialStats from 0x10003bae0 to 0x10003bbe3 (259 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 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 12:19:33 +0000
//
void __fastcall GameStatsManager::awardOldSpecialStats(__int64 a1, __m128 a2, __m128 a3)
{
_DWORD *v3; // r12
unsigned int v4; // r14d
__int64 v5; // rax
_DWORD *MainLevel; // r14
int NormalPercent; // r15d
_QWORD *v8; // rdi
_QWORD *v9; // rbx
void *v10; // rdi
void *v11; // [rsp+8h] [rbp-48h] BYREF
void *__p; // [rsp+18h] [rbp-38h]
LevelTools::getLevelList(&v11);
v3 = __p;
if ( __p )
{
do
{
v4 = v3[4];
v5 = GameLevelManager::sharedState();
MainLevel = (_DWORD *)GameLevelManager::getMainLevel(v5, v4, 1);
if ( (int)GJGameLevel::getNormalPercent(MainLevel) > MainLevel[216] - MainLevel[217] )
{
NormalPercent = GJGameLevel::getNormalPercent(MainLevel);
MainLevel[218] = NormalPercent;
a2 = 0;
a2.f32[0] = (float)((float)rand() * 4.6566129e-10) * 1000.0;
MainLevel[217] = (int)a2.f32[0];
MainLevel[216] = (int)a2.f32[0] + NormalPercent;
}
GameStatsManager::awardCurrencyForLevel(a1, (__int64)MainLevel, a2, a3);
v3 = *(_DWORD **)v3;
}
while ( v3 );
v8 = __p;
if ( __p )
{
do
{
v9 = (_QWORD *)*v8;
operator delete(v8);
v8 = v9;
}
while ( v9 );
}
}
v10 = v11;
v11 = nullptr;
if ( v10 )
operator delete(v10);
}