{"type": "func", "start": 4298664128, "end": 4298664728, "name": "GameManager::generateSecretNumber", "pseudocode": "// \n// GameManager::generateSecretNumber from 0x1003868c0 to 0x100386b18 (600 bytes)\n// \n// 1 xrefs:\n// > SecretLayer2::onSubmit @ 0x10049f4f9\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; // ebx\n  int v2; // r12d\n  int v3; // r13d\n  int v4; // r15d\n  int v5; // eax\n  __m128 v6; // xmm4\n  __int64 v7; // r14\n  void *v8; // r14\n  __m128 v9; // xmm5\n  int v10; // edx\n  __m128 v11; // xmm4\n  __m128 v12; // xmm5\n  int v13; // ecx\n  __m128 v14; // xmm4\n  __m128 v15; // xmm5\n  int v16; // esi\n  __m128 v17; // xmm4\n  __m128 v18; // xmm5\n  __m128 v19; // xmm5\n  int v20; // edx\n  __m128 v21; // xmm4\n  int v22; // edx\n  __m128 v23; // xmm5\n  int v24; // esi\n  __m128 v25; // xmm4\n  int v26; // edx\n  int v27; // ecx\n  __m128 v28; // xmm4\n  __m128 v29; // xmm0\n  int v30; // ebx\n  int result; // eax\n  int v32; // [rsp+Ch] [rbp-34h]\n  int v33; // [rsp+10h] [rbp-30h]\n  int v34; // [rsp+14h] [rbp-2Ch]\n\n  v1 = rand();\n  v2 = rand();\n  v3 = rand();\n  v4 = rand();\n  v33 = rand();\n  v32 = rand();\n  v5 = rand();\n  v7 = qword_1009A0E18;\n  if ( !qword_1009A0E18 )\n  {\n    v34 = v5;\n    v8 = operator new(0x638u);\n    sub_10038CE40(v8);\n    qword_1009A0E18 = (__int64)v8;\n    (*(void (__fastcall **)(void *))(*(_QWORD *)v8 + 80LL))(v8);\n    v7 = qword_1009A0E18;\n    v5 = v34;\n  }\n  v6.f32[0] = (float)((float)((float)v1 * 4.6566129e-10) * 8.0) + 1.0;\n  v9 = _mm_or_ps(_mm_and_ps(v6, (__m128)xmmword_1008150B0), (__m128)xmmword_1008150C0);\n  v9.f32[0] = v9.f32[0] + v6.f32[0];\n  v10 = (int)_mm_round_ss((__m128)0LL, v9, 11).f32[0];\n  v11 = 0;\n  v11.f32[0] = (float)((float)((float)v2 * 4.6566129e-10) * 8.0) + 1.0;\n  v12 = _mm_or_ps(_mm_and_ps(v11, (__m128)xmmword_1008150B0), (__m128)xmmword_1008150C0);\n  v12.f32[0] = v12.f32[0] + v11.f32[0];\n  v13 = v10 + (int)(float)(_mm_round_ss((__m128)0LL, v12, 11).f32[0] * 10.0);\n  v14 = 0;\n  v14.f32[0] = (float)((float)((float)v3 * 4.6566129e-10) * 8.0) + 1.0;\n  v15 = _mm_or_ps(_mm_and_ps(v14, (__m128)xmmword_1008150B0), (__m128)xmmword_1008150C0);\n  v15.f32[0] = v15.f32[0] + v14.f32[0];\n  v16 = (int)(float)(_mm_round_ss((__m128)0LL, v15, 11).f32[0] * 100.0);\n  v17 = 0;\n  v17.f32[0] = (float)((float)((float)v4 * 4.6566129e-10) * 8.0) + 1.0;\n  v18 = _mm_or_ps(_mm_and_ps(v17, (__m128)xmmword_1008150B0), (__m128)xmmword_1008150C0);\n  v18.f32[0] = v18.f32[0] + v17.f32[0];\n  v17.f32[0] = _mm_round_ss((__m128)0LL, v18, 11).f32[0];\n  v19 = 0;\n  v20 = (int)(float)(v17.f32[0] * 1000.0);\n  v19.f32[0] = (float)((float)((float)v33 * 4.6566129e-10) * 8.0) + 1.0;\n  v21 = _mm_or_ps(_mm_and_ps(v19, (__m128)xmmword_1008150B0), (__m128)xmmword_1008150C0);\n  v21.f32[0] = v21.f32[0] + v19.f32[0];\n  v22 = v16 + v20;\n  v23 = 0;\n  v24 = (int)(float)(_mm_round_ss(v21, v21, 11).f32[0] * 10000.0);\n  v23.f32[0] = (float)((float)((float)v32 * 4.6566129e-10) * 8.0) + 1.0;\n  v25 = _mm_or_ps(_mm_and_ps(v23, (__m128)xmmword_1008150B0), (__m128)xmmword_1008150C0);\n  v25.f32[0] = v25.f32[0] + v23.f32[0];\n  v26 = v13 + v22;\n  v27 = v24 + (int)(float)(_mm_round_ss(v25, v25, 11).f32[0] * 100000.0);\n  v28 = 0;\n  v28.f32[0] = (float)((float)((float)v5 * 4.6566129e-10) * 8.0) + 1.0;\n  v29 = _mm_or_ps(_mm_and_ps((__m128)xmmword_1008150B0, v28), (__m128)xmmword_1008150C0);\n  v29.f32[0] = v29.f32[0] + v28.f32[0];\n  v30 = v26 + v27 + (int)(float)(_mm_round_ss(v29, v29, 11).f32[0] * 1000000.0);\n  result = (int)(float)((float)((float)rand() * 4.6566129e-10) * 1000.0);\n  *(_DWORD *)(v7 + 868) = result;\n  *(_DWORD *)(v7 + 864) = result + v30;\n  return result;\n}", "assembly": "; \n; GameManager::generateSecretNumber from 0x1003868c0 to 0x100386b18 (600 bytes)\n; \n; 1 xrefs:\n; > SecretLayer2::onSubmit @ 0x10049f4f9\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\npush    rbp                                                            ; +0x0, 0x1003868c0\nmov     rbp, rsp                                                       ; +0x1, 0x1003868c1\npush    r15                                                            ; +0x4, 0x1003868c4\npush    r14                                                            ; +0x6, 0x1003868c6\npush    r13                                                            ; +0x8, 0x1003868c8\npush    r12                                                            ; +0xa, 0x1003868ca\npush    rbx                                                            ; +0xc, 0x1003868cc\nsub     rsp, 18h                                                       ; +0xd, 0x1003868cd\ncall    _rand                                                          ; +0x11, 0x1003868d1\nmov     ebx, eax                                                       ; +0x16, 0x1003868d6\ncall    _rand                                                          ; +0x18, 0x1003868d8\nmov     r12d, eax                                                      ; +0x1d, 0x1003868dd\ncall    _rand                                                          ; +0x20, 0x1003868e0\nmov     r13d, eax                                                      ; +0x25, 0x1003868e5\ncall    _rand                                                          ; +0x28, 0x1003868e8\nmov     r15d, eax                                                      ; +0x2d, 0x1003868ed\ncall    _rand                                                          ; +0x30, 0x1003868f0\nmov     [rbp+var_30], eax                                              ; +0x35, 0x1003868f5\ncall    _rand                                                          ; +0x38, 0x1003868f8\nmov     [rbp+var_34], eax                                              ; +0x3d, 0x1003868fd\ncall    _rand                                                          ; +0x40, 0x100386900\nmov     r14, cs:qword_1009A0E18                                        ; +0x45, 0x100386905\ntest    r14, r14                                                       ; +0x4c, 0x10038690c\njnz     short loc_100386943                                            ; +0x4f, 0x10038690f\nmov     [rbp+var_2C], eax                                              ; +0x51, 0x100386911\nmov     edi, 638h; __sz                                                ; +0x54, 0x100386914\ncall    __Znwm; operator new(ulong)                                    ; +0x59, 0x100386919\nmov     r14, rax                                                       ; +0x5e, 0x10038691e\nmov     rdi, rax                                                       ; +0x61, 0x100386921\ncall    sub_10038CE40                                                  ; +0x64, 0x100386924\nmov     cs:qword_1009A0E18, r14                                        ; +0x69, 0x100386929\nmov     rax, [r14]                                                     ; +0x70, 0x100386930\nmov     rdi, r14                                                       ; +0x73, 0x100386933\ncall    qword ptr [rax+50h]                                            ; +0x76, 0x100386936\nmov     r14, cs:qword_1009A0E18                                        ; +0x79, 0x100386939\nmov     eax, [rbp+var_2C]                                              ; +0x80, 0x100386940\ncvtsi2ss xmm4, ebx                                                     ; +0x83, 0x100386943\nmovss   xmm0, cs:dword_100815710                                       ; +0x87, 0x100386947\nmulss   xmm4, xmm0                                                     ; +0x8f, 0x10038694f\nmovaps  xmm6, xmm0                                                     ; +0x93, 0x100386953\nmovss   xmm1, cs:dword_100815034                                       ; +0x96, 0x100386956\nmulss   xmm4, xmm1                                                     ; +0x9e, 0x10038695e\nmovss   xmm2, cs:alpha                                                 ; +0xa2, 0x100386962\naddss   xmm4, xmm2                                                     ; +0xaa, 0x10038696a\nmovaps  xmm0, cs:xmmword_1008150B0                                     ; +0xae, 0x10038696e\nmovaps  xmm5, xmm4                                                     ; +0xb5, 0x100386975\nandps   xmm5, xmm0                                                     ; +0xb8, 0x100386978\nmovaps  xmm3, cs:xmmword_1008150C0                                     ; +0xbb, 0x10038697b\norps    xmm5, xmm3                                                     ; +0xc2, 0x100386982\naddss   xmm5, xmm4                                                     ; +0xc5, 0x100386985\nxorps   xmm4, xmm4                                                     ; +0xc9, 0x100386989\nroundss xmm4, xmm5, 0Bh                                                ; +0xcc, 0x10038698c\ncvttss2si edx, xmm4                                                    ; +0xd2, 0x100386992\nxorps   xmm4, xmm4                                                     ; +0xd6, 0x100386996\ncvtsi2ss xmm4, r12d                                                    ; +0xd9, 0x100386999\nmulss   xmm4, xmm6                                                     ; +0xde, 0x10038699e\nmulss   xmm4, xmm1                                                     ; +0xe2, 0x1003869a2\naddss   xmm4, xmm2                                                     ; +0xe6, 0x1003869a6\nmovaps  xmm5, xmm4                                                     ; +0xea, 0x1003869aa\nandps   xmm5, xmm0                                                     ; +0xed, 0x1003869ad\norps    xmm5, xmm3                                                     ; +0xf0, 0x1003869b0\naddss   xmm5, xmm4                                                     ; +0xf3, 0x1003869b3\nxorps   xmm4, xmm4                                                     ; +0xf7, 0x1003869b7\nroundss xmm4, xmm5, 0Bh                                                ; +0xfa, 0x1003869ba\nmulss   xmm4, cs:dword_100814FEC                                       ; +0x100, 0x1003869c0\ncvttss2si ecx, xmm4                                                    ; +0x108, 0x1003869c8\nadd     ecx, edx                                                       ; +0x10c, 0x1003869cc\nxorps   xmm4, xmm4                                                     ; +0x10e, 0x1003869ce\ncvtsi2ss xmm4, r13d                                                    ; +0x111, 0x1003869d1\nmulss   xmm4, xmm6                                                     ; +0x116, 0x1003869d6\nmulss   xmm4, xmm1                                                     ; +0x11a, 0x1003869da\naddss   xmm4, xmm2                                                     ; +0x11e, 0x1003869de\nmovaps  xmm5, xmm4                                                     ; +0x122, 0x1003869e2\nandps   xmm5, xmm0                                                     ; +0x125, 0x1003869e5\norps    xmm5, xmm3                                                     ; +0x128, 0x1003869e8\naddss   xmm5, xmm4                                                     ; +0x12b, 0x1003869eb\nxorps   xmm4, xmm4                                                     ; +0x12f, 0x1003869ef\nroundss xmm4, xmm5, 0Bh                                                ; +0x132, 0x1003869f2\nmulss   xmm4, cs:dword_100815014                                       ; +0x138, 0x1003869f8\ncvttss2si esi, xmm4                                                    ; +0x140, 0x100386a00\nxorps   xmm4, xmm4                                                     ; +0x144, 0x100386a04\ncvtsi2ss xmm4, r15d                                                    ; +0x147, 0x100386a07\nmulss   xmm4, xmm6                                                     ; +0x14c, 0x100386a0c\nmulss   xmm4, xmm1                                                     ; +0x150, 0x100386a10\naddss   xmm4, xmm2                                                     ; +0x154, 0x100386a14\nmovaps  xmm5, xmm4                                                     ; +0x158, 0x100386a18\nandps   xmm5, xmm0                                                     ; +0x15b, 0x100386a1b\norps    xmm5, xmm3                                                     ; +0x15e, 0x100386a1e\naddss   xmm5, xmm4                                                     ; +0x161, 0x100386a21\nxorps   xmm4, xmm4                                                     ; +0x165, 0x100386a25\nroundss xmm4, xmm5, 0Bh                                                ; +0x168, 0x100386a28\nmulss   xmm4, cs:dword_1008152B8                                       ; +0x16e, 0x100386a2e\nxorps   xmm5, xmm5                                                     ; +0x176, 0x100386a36\ncvtsi2ss xmm5, [rbp+var_30]                                            ; +0x179, 0x100386a39\ncvttss2si edx, xmm4                                                    ; +0x17e, 0x100386a3e\nmulss   xmm5, xmm6                                                     ; +0x182, 0x100386a42\nmulss   xmm5, xmm1                                                     ; +0x186, 0x100386a46\naddss   xmm5, xmm2                                                     ; +0x18a, 0x100386a4a\nmovaps  xmm4, xmm5                                                     ; +0x18e, 0x100386a4e\nandps   xmm4, xmm0                                                     ; +0x191, 0x100386a51\norps    xmm4, xmm3                                                     ; +0x194, 0x100386a54\naddss   xmm4, xmm5                                                     ; +0x197, 0x100386a57\nroundss xmm4, xmm4, 0Bh                                                ; +0x19b, 0x100386a5b\nmulss   xmm4, cs:dword_100815714                                       ; +0x1a1, 0x100386a61\nadd     edx, esi                                                       ; +0x1a9, 0x100386a69\nxorps   xmm5, xmm5                                                     ; +0x1ab, 0x100386a6b\ncvtsi2ss xmm5, [rbp+var_34]                                            ; +0x1ae, 0x100386a6e\ncvttss2si esi, xmm4                                                    ; +0x1b3, 0x100386a73\nmulss   xmm5, xmm6                                                     ; +0x1b7, 0x100386a77\nmulss   xmm5, xmm1                                                     ; +0x1bb, 0x100386a7b\naddss   xmm5, xmm2                                                     ; +0x1bf, 0x100386a7f\nmovaps  xmm4, xmm5                                                     ; +0x1c3, 0x100386a83\nandps   xmm4, xmm0                                                     ; +0x1c6, 0x100386a86\norps    xmm4, xmm3                                                     ; +0x1c9, 0x100386a89\naddss   xmm4, xmm5                                                     ; +0x1cc, 0x100386a8c\nroundss xmm4, xmm4, 0Bh                                                ; +0x1d0, 0x100386a90\nmulss   xmm4, cs:dword_10081578C                                       ; +0x1d6, 0x100386a96\nadd     edx, ecx                                                       ; +0x1de, 0x100386a9e\ncvttss2si ecx, xmm4                                                    ; +0x1e0, 0x100386aa0\nadd     ecx, esi                                                       ; +0x1e4, 0x100386aa4\nxorps   xmm4, xmm4                                                     ; +0x1e6, 0x100386aa6\ncvtsi2ss xmm4, eax                                                     ; +0x1e9, 0x100386aa9\nmulss   xmm4, xmm6                                                     ; +0x1ed, 0x100386aad\nmulss   xmm4, xmm1                                                     ; +0x1f1, 0x100386ab1\naddss   xmm4, xmm2                                                     ; +0x1f5, 0x100386ab5\nandps   xmm0, xmm4                                                     ; +0x1f9, 0x100386ab9\norps    xmm0, xmm3                                                     ; +0x1fc, 0x100386abc\naddss   xmm0, xmm4                                                     ; +0x1ff, 0x100386abf\nroundss xmm0, xmm0, 0Bh                                                ; +0x203, 0x100386ac3\nmulss   xmm0, cs:dword_1008157B0                                       ; +0x209, 0x100386ac9\ncvttss2si ebx, xmm0                                                    ; +0x211, 0x100386ad1\nadd     ebx, ecx                                                       ; +0x215, 0x100386ad5\nadd     ebx, edx                                                       ; +0x217, 0x100386ad7\ncall    _rand                                                          ; +0x219, 0x100386ad9\nxorps   xmm0, xmm0                                                     ; +0x21e, 0x100386ade\ncvtsi2ss xmm0, eax                                                     ; +0x221, 0x100386ae1\nmulss   xmm0, cs:dword_100815710                                       ; +0x225, 0x100386ae5\nmulss   xmm0, cs:dword_1008152B8                                       ; +0x22d, 0x100386aed\ncvttss2si eax, xmm0                                                    ; +0x235, 0x100386af5\nmov     [r14+364h], eax                                                ; +0x239, 0x100386af9\nadd     ebx, eax                                                       ; +0x240, 0x100386b00\nmov     [r14+360h], ebx                                                ; +0x242, 0x100386b02\nadd     rsp, 18h                                                       ; +0x249, 0x100386b09\npop     rbx                                                            ; +0x24d, 0x100386b0d\npop     r12                                                            ; +0x24e, 0x100386b0e\npop     r13                                                            ; +0x250, 0x100386b10\npop     r14                                                            ; +0x252, 0x100386b12\npop     r15                                                            ; +0x254, 0x100386b14\npop     rbp                                                            ; +0x256, 0x100386b16\nretn                                                                   ; +0x257, 0x100386b17", "xrefs": ["SecretLayer2::onSubmit @ 0x10049f4f9"], "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"}