//
// GameManager::generateSecretNumber from 0x416254 to 0x4162f2 (158 bytes)
//
// 1 xrefs:
// > SecretLayer2::onSubmit @ 0x61efe2
//
// 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:47:41 +0000
//
int __fastcall GameManager::generateSecretNumber(GameManager *this)
{
int v1; // r4
int v2; // r5
int v3; // s15
float v4; // s16
float v5; // r0
int v6; // r4
int result; // r0
int v8; // s15
v1 = 0;
v2 = 0;
do
{
rand();
v3 = v1++;
v4 = COERCE_FLOAT(roundf());
v5 = powf(10.0, (float)v3);
v2 += (int)(float)(v4 * v5);
}
while ( v1 != 7 );
v6 = GameManager::sharedState((GameManager *)LODWORD(v5));
result = rand();
v8 = (int)(float)((float)((float)result * 4.6566e-10) * 1000.0);
*(_DWORD *)(v6 + 708) = v8;
*(_DWORD *)(v6 + 704) = v8 + v2;
return result;
}