//
// GameManager::generateSecretNumber from 0x140185cf0 to 0x140185e18 (296 bytes)
//
// 2 xrefs:
// > SecretLayer2::onSubmit @ 0x1403e6b27
// > ??> @ 0x1406cb628
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=1
int GameManager::generateSecretNumber(GameManager *a1)
{
int v1; // edi
int i; // ebx
float v3; // xmm0_4
float v4; // xmm6_4
__int64 v5; // rbx
float v6; // xmm0_4
int result; // eax
void *v8; // [rsp+80h] [rbp+8h]
v1 = 0;
for ( i = 0; i < 7; ++i )
{
v3 = (float)rand();
v4 = roundf((float)((float)(v3 / 32767.0) * 8.0) + 1.0);
v1 += (int)(float)(v4 * powf(10.0, (float)i));
}
v5 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v8 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v5 = qword_1406C2ED8;
}
v6 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(v5 + 900) = (int)v6;
result = v1 + (int)v6;
*(_DWORD *)(v5 + 896) = result;
return result;
}