{"type": "func", "start": 4298220872, "end": 4298221020, "name": "GameManager::generateSecretNumber", "pseudocode": "// \n// GameManager::generateSecretNumber from 0x10031a548 to 0x10031a5dc (148 bytes)\n// \n// 1 xrefs:\n// > SecretLayer2::onSubmit @ 0x10030b3f8\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nint __fastcall GameManager::generateSecretNumber(GameManager *a1)\n{\n  int v1; // w20\n  unsigned int i; // w19\n  float v3; // s10\n  GameManager *v4; // x19\n  int result; // w0\n  float v6; // s0\n\n  v1 = 0;\n  for ( i = 0; i != 7; ++i )\n  {\n    v3 = roundf((float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 8.0) + 1.0);\n    v1 += (int)(float)(__exp10f((float)i) * v3);\n  }\n  v4 = GameManager::sharedState();\n  result = rand();\n  v6 = vcvts_n_f32_s32(result, 0x1Fu) * 1000.0;\n  v4->m_secretNumber.random = (int)v6;\n  v4->m_secretNumber.seed = v1 + (int)v6;\n  return result;\n}", "assembly": "; \n; GameManager::generateSecretNumber from 0x10031a548 to 0x10031a5dc (148 bytes)\n; \n; 1 xrefs:\n; > SecretLayer2::onSubmit @ 0x10030b3f8\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             D11, D10, [SP,#-0x10+var_30]!                          ; +0x0, 0x10031a548\nSTP             D9, D8, [SP,#0x30+var_20]                              ; +0x4, 0x10031a54c\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x10031a550\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x10031a554\nADD             X29, SP, #0x30                                         ; +0x10, 0x10031a558\nMOV             W20, #0                                                ; +0x14, 0x10031a55c\nMOV             W19, #0                                                ; +0x18, 0x10031a560\nFMOV            S8, #1.0                                               ; +0x1c, 0x10031a564\nFMOV            S9, #8.0                                               ; +0x20, 0x10031a568\nBL              _rand                                                  ; +0x24, 0x10031a56c\nSCVTF           S0, W0, #0x1F                                          ; +0x28, 0x10031a570\nFMADD           S0, S0, S9, S8                                         ; +0x2c, 0x10031a574\nFRINTA          S10, S0                                                ; +0x30, 0x10031a578\nUCVTF           S0, W19; float                                         ; +0x34, 0x10031a57c\nBL              ___exp10f                                              ; +0x38, 0x10031a580\nFMUL            S0, S0, S10                                            ; +0x3c, 0x10031a584\nFCVTZS          W8, S0                                                 ; +0x40, 0x10031a588\nADD             W20, W20, W8                                           ; +0x44, 0x10031a58c\nADD             W19, W19, #1                                           ; +0x48, 0x10031a590\nCMP             W19, #7                                                ; +0x4c, 0x10031a594\nB.NE            loc_10031A56C                                          ; +0x50, 0x10031a598\nBL              GameManager__sharedState                               ; +0x54, 0x10031a59c\nMOV             X19, X0                                                ; +0x58, 0x10031a5a0\nBL              _rand                                                  ; +0x5c, 0x10031a5a4\nSCVTF           S0, W0, #0x1F                                          ; +0x60, 0x10031a5a8\nMOV             W8, #0x447A0000                                        ; +0x64, 0x10031a5ac\nFMOV            S1, W8                                                 ; +0x68, 0x10031a5b0\nFMUL            S0, S0, S1                                             ; +0x6c, 0x10031a5b4\nFCVTZS          W8, S0                                                 ; +0x70, 0x10031a5b8\nSTR             W8, [X19,#0x364]                                       ; +0x74, 0x10031a5bc\nADD             W8, W20, W8                                            ; +0x78, 0x10031a5c0\nSTR             W8, [X19,#0x360]                                       ; +0x7c, 0x10031a5c4\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x80, 0x10031a5c8\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x84, 0x10031a5cc\nLDP             D9, D8, [SP,#0x30+var_20]                              ; +0x88, 0x10031a5d0\nLDP             D11, D10, [SP+0x30+var_30],#0x40                       ; +0x8c, 0x10031a5d4\nRET                                                                    ; +0x90, 0x10031a5d8", "xrefs": ["SecretLayer2::onSubmit @ 0x10030b3f8"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}