{"type": "func", "start": 5370305776, "end": 5370306072, "name": "GameManager::generateSecretNumber", "pseudocode": "// \n// GameManager::generateSecretNumber from 0x140185cf0 to 0x140185e18 (296 bytes)\n// \n// 2 xrefs:\n// > SecretLayer2::onSubmit @ 0x1403e6b27\n// > <???> @ 0x1406cb628\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\n// Hidden C++ exception states: #wind=1\nint GameManager::generateSecretNumber(GameManager *a1)\n{\n  int v1; // edi\n  int i; // ebx\n  float v3; // xmm0_4\n  float v4; // xmm6_4\n  __int64 v5; // rbx\n  float v6; // xmm0_4\n  int result; // eax\n  void *v8; // [rsp+80h] [rbp+8h]\n\n  v1 = 0;\n  for ( i = 0; i < 7; ++i )\n  {\n    v3 = (float)rand();\n    v4 = roundf((float)((float)(v3 / 32767.0) * 8.0) + 1.0);\n    v1 += (int)(float)(v4 * powf(10.0, (float)i));\n  }\n  v5 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v8 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v8);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v5 = qword_1406C2ED8;\n  }\n  v6 = (float)((float)rand() / 32767.0) * 1000.0;\n  *(_DWORD *)(v5 + 900) = (int)v6;\n  result = v1 + (int)v6;\n  *(_DWORD *)(v5 + 896) = result;\n  return result;\n}", "assembly": "; \n; GameManager::generateSecretNumber from 0x140185cf0 to 0x140185e18 (296 bytes)\n; \n; 2 xrefs:\n; > SecretLayer2::onSubmit @ 0x1403e6b27\n; > <???> @ 0x1406cb628\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\nmov     rax, rsp                                                       ; +0x0, 0x140185cf0\nmov     [rax+10h], rbx                                                 ; +0x3, 0x140185cf3\nmov     [rax+8], rcx                                                   ; +0x7, 0x140185cf7\npush    rdi                                                            ; +0xb, 0x140185cfb\nsub     rsp, 70h                                                       ; +0xc, 0x140185cfc\nmovaps  xmmword ptr [rax-18h], xmm6                                    ; +0x10, 0x140185d00\nmovaps  xmmword ptr [rax-28h], xmm7                                    ; +0x14, 0x140185d04\nmovaps  xmmword ptr [rax-38h], xmm8                                    ; +0x18, 0x140185d08\nmovaps  xmmword ptr [rax-48h], xmm9                                    ; +0x1d, 0x140185d0d\nmovaps  xmmword ptr [rax-58h], xmm10                                   ; +0x22, 0x140185d12\nxor     edi, edi                                                       ; +0x27, 0x140185d17\nmov     ebx, edi                                                       ; +0x29, 0x140185d19\nmovss   xmm7, cs:dword_140623644                                       ; +0x2b, 0x140185d1b\nmovss   xmm8, cs:dword_140623068                                       ; +0x33, 0x140185d23\nmovss   xmm9, cs:flt_140622C24                                         ; +0x3c, 0x140185d2c\nmovss   xmm10, cs:flt_14062307C                                        ; +0x45, 0x140185d35\nxchg    ax, ax                                                         ; +0x4e, 0x140185d3e\ncall    cs:rand                                                        ; +0x50, 0x140185d40\nmovd    xmm0, eax                                                      ; +0x56, 0x140185d46\ncvtdq2ps xmm0, xmm0                                                    ; +0x5a, 0x140185d4a\ndivss   xmm0, xmm7                                                     ; +0x5d, 0x140185d4d\nmulss   xmm0, xmm8                                                     ; +0x61, 0x140185d51\naddss   xmm0, xmm9; X                                                  ; +0x66, 0x140185d56\ncall    cs:__imp_roundf                                                ; +0x6b, 0x140185d5b\nmovaps  xmm6, xmm0                                                     ; +0x71, 0x140185d61\nmovd    xmm1, ebx                                                      ; +0x74, 0x140185d64\ncvtdq2ps xmm1, xmm1; Y                                                 ; +0x78, 0x140185d68\nmovaps  xmm0, xmm10; X                                                 ; +0x7b, 0x140185d6b\ncall    powf                                                           ; +0x7f, 0x140185d6f\nmulss   xmm6, xmm0                                                     ; +0x84, 0x140185d74\ncvttss2si eax, xmm6                                                    ; +0x88, 0x140185d78\nadd     edi, eax                                                       ; +0x8c, 0x140185d7c\ninc     ebx                                                            ; +0x8e, 0x140185d7e\ncmp     ebx, 7                                                         ; +0x90, 0x140185d80\njl      short loc_140185D40                                            ; +0x93, 0x140185d83\nmov     rbx, cs:qword_1406C2ED8                                        ; +0x95, 0x140185d85\ntest    rbx, rbx                                                       ; +0x9c, 0x140185d8c\njnz     short loc_140185DC3                                            ; +0x9f, 0x140185d8f\nmov     ecx, 668h; Size                                                ; +0xa1, 0x140185d91\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xa6, 0x140185d96\nmov     [rsp+78h+arg_0], rax                                           ; +0xab, 0x140185d9b\nmov     rcx, rax                                                       ; +0xb3, 0x140185da3\ncall    sub_14017AB00                                                  ; +0xb6, 0x140185da6\nnop                                                                    ; +0xbb, 0x140185dab\nmov     cs:qword_1406C2ED8, rax                                        ; +0xbc, 0x140185dac\nmov     rdx, [rax]                                                     ; +0xc3, 0x140185db3\nmov     rcx, rax                                                       ; +0xc6, 0x140185db6\ncall    qword ptr [rdx+48h]                                            ; +0xc9, 0x140185db9\nmov     rbx, cs:qword_1406C2ED8                                        ; +0xcc, 0x140185dbc\ncall    cs:rand                                                        ; +0xd3, 0x140185dc3\nmovd    xmm0, eax                                                      ; +0xd9, 0x140185dc9\ncvtdq2ps xmm0, xmm0                                                    ; +0xdd, 0x140185dcd\ndivss   xmm0, xmm7                                                     ; +0xe0, 0x140185dd0\nmulss   xmm0, cs:dword_14062350C                                       ; +0xe4, 0x140185dd4\ncvttss2si eax, xmm0                                                    ; +0xec, 0x140185ddc\nmov     [rbx+384h], eax                                                ; +0xf0, 0x140185de0\nadd     eax, edi                                                       ; +0xf6, 0x140185de6\nmov     [rbx+380h], eax                                                ; +0xf8, 0x140185de8\nmov     rbx, [rsp+78h+arg_8]                                           ; +0xfe, 0x140185dee\nmovaps  xmm6, [rsp+78h+var_18]                                         ; +0x106, 0x140185df6\nmovaps  xmm7, [rsp+78h+var_28]                                         ; +0x10b, 0x140185dfb\nmovaps  xmm8, [rsp+78h+var_38]                                         ; +0x110, 0x140185e00\nmovaps  xmm9, [rsp+78h+var_48]                                         ; +0x116, 0x140185e06\nmovaps  xmm10, [rsp+78h+var_58]                                        ; +0x11c, 0x140185e0c\nadd     rsp, 70h                                                       ; +0x122, 0x140185e12\npop     rdi                                                            ; +0x126, 0x140185e16\nretn                                                                   ; +0x127, 0x140185e17", "xrefs": ["SecretLayer2::onSubmit @ 0x1403e6b27", "<???> @ 0x1406cb628"], "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"}