//
// GameStatsManager::awardSecretKey from 0x100053010 to 0x1000530c6 (182 bytes)
//
// 2 xrefs:
// > PlayLayer::levelComplete @ 0x10008147d
// > PlayLayer::destroyPlayer @ 0x100088134
//
// 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:35 +0000
//
bool __fastcall GameStatsManager::awardSecretKey(_DWORD *a1, __m128 a2)
{
int Stat; // eax
int v3; // r14d
float v4; // xmm1_4
__int32 v6; // [rsp+Ch] [rbp-14h]
Stat = GameStatsManager::getStat((__int64)a1, "22", a2);
v3 = a1[192] - a1[193];
v4 = (float)v3;
a2.f32[0] = (float)Stat / 500.0;
a2.f32[0] = _mm_round_ss(a2, a2, 9).f32[0];
if ( a2.f32[0] > (float)v3 )
{
a1[194] = v3 + 1;
v6 = a2.i32[0];
a2 = 0;
a2.f32[0] = (float)((float)rand() * 4.6566129e-10) * 1000.0;
a1[193] = (int)a2.f32[0];
a1[192] = v3 + (int)a2.f32[0] + 1;
GameStatsManager::incrementStat((__int64)a1, "21", 1u, a2);
a2.i32[0] = v6;
v4 = (float)v3;
}
return a2.f32[0] > v4;
}