{"type": "func", "start": 5370777488, "end": 5370778148, "name": "EditorUI::getRandomStartKey", "pseudocode": "// \n// EditorUI::getRandomStartKey from 0x1401f8f90 to 0x1401f9224 (660 bytes)\n// \n// 4 xrefs:\n// > EditorUI::processSmartObjectsFromType @ 0x1401b7f45\n// > <???> @ 0x1408a37f4\n// > <???> @ 0x1408a3804\n// > <???> @ 0x14091ab28\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:28:10 +0000\n// \n\n__int64 __fastcall EditorUI::getRandomStartKey(int a1)\n{\n  int v1; // ecx\n  int v2; // ecx\n  int v3; // ecx\n  int v4; // ecx\n  __int64 result; // rax\n  int v6; // ecx\n  int v7; // ecx\n  int v8; // ecx\n  unsigned int v9; // ebx\n\n  if ( a1 > 1861 )\n  {\n    if ( a1 == 2703 )\n    {\n      qword_14090BFA8 = 214013 * qword_14090BFA8 + 2531011;\n      return (unsigned int)((int)floorf(\n                                   (float)((float)(((unsigned __int64)qword_14090BFA8 >> 16) & 0x7FFF) / 32767.0)\n                                 + (float)((float)(((unsigned __int64)qword_14090BFA8 >> 16) & 0x7FFF) / 32767.0)) != 0)\n           + 2703;\n    }\n    else\n    {\n      v9 = 2838;\n      if ( a1 == 2838 )\n      {\n        qword_14090BFA8 = 214013 * qword_14090BFA8 + 2531011;\n        if ( (int)floorf(\n                    (float)((float)(((unsigned __int64)qword_14090BFA8 >> 16) & 0x7FFF) / 32767.0)\n                  + (float)((float)(((unsigned __int64)qword_14090BFA8 >> 16) & 0x7FFF) / 32767.0)) )\n          return 2840;\n        return v9;\n      }\n    }\n  }\n  else if ( a1 == 1861 )\n  {\n    qword_14090BFA8 = 214013 * qword_14090BFA8 + 2531011;\n    v7 = (int)floorf((float)((float)(((unsigned __int64)qword_14090BFA8 >> 16) & 0x7FFF) / 32767.0) * 4.0);\n    if ( v7 )\n    {\n      v8 = v7 - 1;\n      if ( v8 )\n      {\n        if ( v8 == 1 )\n          return 1863;\n        else\n          return 1864;\n      }\n      else\n      {\n        return 1862;\n      }\n    }\n    else\n    {\n      return 1861;\n    }\n  }\n  else\n  {\n    v1 = a1 - 869;\n    if ( v1 )\n    {\n      v2 = v1 - 562;\n      if ( v2 )\n      {\n        if ( v2 == 30 )\n        {\n          qword_14090BFA8 = 214013 * qword_14090BFA8 + 2531011;\n          v3 = (int)floorf((float)((float)(((unsigned __int64)qword_14090BFA8 >> 16) & 0x7FFF) / 32767.0) * 4.0);\n          if ( v3 )\n          {\n            v4 = v3 - 1;\n            if ( v4 )\n            {\n              if ( v4 == 1 )\n                return 1463;\n              else\n                return 1464;\n            }\n            else\n            {\n              return 1462;\n            }\n          }\n          else\n          {\n            return 1461;\n          }\n        }\n      }\n      else\n      {\n        qword_14090BFA8 = 214013 * qword_14090BFA8 + 2531011;\n        v6 = (int)floorf((float)((float)(((unsigned __int64)qword_14090BFA8 >> 16) & 0x7FFF) / 32767.0) * 3.0);\n        if ( v6 )\n        {\n          if ( v6 == 1 )\n            return 1432;\n          else\n            return 1433;\n        }\n        else\n        {\n          return 1431;\n        }\n      }\n    }\n    else\n    {\n      qword_14090BFA8 = 214013 * qword_14090BFA8 + 2531011;\n      return (unsigned int)((int)floorf(\n                                   (float)((float)(((unsigned __int64)qword_14090BFA8 >> 16) & 0x7FFF) / 32767.0)\n                                 + (float)((float)(((unsigned __int64)qword_14090BFA8 >> 16) & 0x7FFF) / 32767.0)) != 0)\n           + 869;\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::getRandomStartKey from 0x1401f8f90 to 0x1401f9224 (660 bytes)\n; \n; 4 xrefs:\n; > EditorUI::processSmartObjectsFromType @ 0x1401b7f45\n; > <???> @ 0x1408a37f4\n; > <???> @ 0x1408a3804\n; > <???> @ 0x14091ab28\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:28:10 +0000\n; \nsub     rsp, 28h                                                       ; +0x0, 0x1401f8f90\ncmp     ecx, 745h                                                      ; +0x4, 0x1401f8f94\njg      loc_1401F916C                                                  ; +0xa, 0x1401f8f9a\njz      loc_1401F90F5                                                  ; +0x10, 0x1401f8fa0\nsub     ecx, 365h                                                      ; +0x16, 0x1401f8fa6\njz      loc_1401F90A6                                                  ; +0x1c, 0x1401f8fac\nsub     ecx, 232h                                                      ; +0x22, 0x1401f8fb2\njz      loc_1401F903E                                                  ; +0x28, 0x1401f8fb8\ncmp     ecx, 1Eh                                                       ; +0x2e, 0x1401f8fbe\njnz     loc_1401F91D0                                                  ; +0x31, 0x1401f8fc1\nimul    rax, cs:qword_14090BFA8, 343FDh                                ; +0x37, 0x1401f8fc7\nadd     rax, 269EC3h                                                   ; +0x42, 0x1401f8fd2\nmov     cs:qword_14090BFA8, rax                                        ; +0x48, 0x1401f8fd8\nshr     rax, 10h                                                       ; +0x4f, 0x1401f8fdf\nand     eax, 7FFFh                                                     ; +0x53, 0x1401f8fe3\nmovd    xmm0, eax                                                      ; +0x58, 0x1401f8fe8\ncvtdq2ps xmm0, xmm0                                                    ; +0x5c, 0x1401f8fec\ndivss   xmm0, cs:dword_140835BDC                                       ; +0x5f, 0x1401f8fef\nmulss   xmm0, cs:dword_140835450; X                                    ; +0x67, 0x1401f8ff7\ncall    floorf                                                         ; +0x6f, 0x1401f8fff\ncvttss2si ecx, xmm0                                                    ; +0x74, 0x1401f9004\ntest    ecx, ecx                                                       ; +0x78, 0x1401f9008\njz      short loc_1401F9034                                            ; +0x7a, 0x1401f900a\nsub     ecx, 1                                                         ; +0x7c, 0x1401f900c\njz      short loc_1401F902A                                            ; +0x7f, 0x1401f900f\ncmp     ecx, 1                                                         ; +0x81, 0x1401f9011\njz      short loc_1401F9020                                            ; +0x84, 0x1401f9014\nmov     eax, 5B8h                                                      ; +0x86, 0x1401f9016\nadd     rsp, 28h                                                       ; +0x8b, 0x1401f901b\nretn                                                                   ; +0x8f, 0x1401f901f\nmov     eax, 5B7h                                                      ; +0x90, 0x1401f9020\nadd     rsp, 28h                                                       ; +0x95, 0x1401f9025\nretn                                                                   ; +0x99, 0x1401f9029\nmov     eax, 5B6h                                                      ; +0x9a, 0x1401f902a\nadd     rsp, 28h                                                       ; +0x9f, 0x1401f902f\nretn                                                                   ; +0xa3, 0x1401f9033\nmov     eax, 5B5h                                                      ; +0xa4, 0x1401f9034\nadd     rsp, 28h                                                       ; +0xa9, 0x1401f9039\nretn                                                                   ; +0xad, 0x1401f903d\nimul    rax, cs:qword_14090BFA8, 343FDh                                ; +0xae, 0x1401f903e\nadd     rax, 269EC3h                                                   ; +0xb9, 0x1401f9049\nmov     cs:qword_14090BFA8, rax                                        ; +0xbf, 0x1401f904f\nshr     rax, 10h                                                       ; +0xc6, 0x1401f9056\nand     eax, 7FFFh                                                     ; +0xca, 0x1401f905a\nmovd    xmm0, eax                                                      ; +0xcf, 0x1401f905f\ncvtdq2ps xmm0, xmm0                                                    ; +0xd3, 0x1401f9063\ndivss   xmm0, cs:dword_140835BDC                                       ; +0xd6, 0x1401f9066\nmulss   xmm0, cs:flt_140835388; X                                      ; +0xde, 0x1401f906e\ncall    floorf                                                         ; +0xe6, 0x1401f9076\ncvttss2si ecx, xmm0                                                    ; +0xeb, 0x1401f907b\ntest    ecx, ecx                                                       ; +0xef, 0x1401f907f\njz      short loc_1401F909C                                            ; +0xf1, 0x1401f9081\ncmp     ecx, 1                                                         ; +0xf3, 0x1401f9083\njz      short loc_1401F9092                                            ; +0xf6, 0x1401f9086\nmov     eax, 599h                                                      ; +0xf8, 0x1401f9088\nadd     rsp, 28h                                                       ; +0xfd, 0x1401f908d\nretn                                                                   ; +0x101, 0x1401f9091\nmov     eax, 598h                                                      ; +0x102, 0x1401f9092\nadd     rsp, 28h                                                       ; +0x107, 0x1401f9097\nretn                                                                   ; +0x10b, 0x1401f909b\nmov     eax, 597h                                                      ; +0x10c, 0x1401f909c\nadd     rsp, 28h                                                       ; +0x111, 0x1401f90a1\nretn                                                                   ; +0x115, 0x1401f90a5\nimul    rax, cs:qword_14090BFA8, 343FDh                                ; +0x116, 0x1401f90a6\nadd     rax, 269EC3h                                                   ; +0x121, 0x1401f90b1\nmov     cs:qword_14090BFA8, rax                                        ; +0x127, 0x1401f90b7\nshr     rax, 10h                                                       ; +0x12e, 0x1401f90be\nand     eax, 7FFFh                                                     ; +0x132, 0x1401f90c2\nmovd    xmm0, eax                                                      ; +0x137, 0x1401f90c7\ncvtdq2ps xmm0, xmm0                                                    ; +0x13b, 0x1401f90cb\ndivss   xmm0, cs:dword_140835BDC                                       ; +0x13e, 0x1401f90ce\naddss   xmm0, xmm0; X                                                  ; +0x146, 0x1401f90d6\ncall    floorf                                                         ; +0x14a, 0x1401f90da\nxor     edx, edx                                                       ; +0x14f, 0x1401f90df\ncvttss2si eax, xmm0                                                    ; +0x151, 0x1401f90e1\ntest    eax, eax                                                       ; +0x155, 0x1401f90e5\nsetnz   dl                                                             ; +0x157, 0x1401f90e7\nlea     eax, [rdx+365h]                                                ; +0x15a, 0x1401f90ea\nadd     rsp, 28h                                                       ; +0x160, 0x1401f90f0\nretn                                                                   ; +0x164, 0x1401f90f4\nimul    rax, cs:qword_14090BFA8, 343FDh                                ; +0x165, 0x1401f90f5\nadd     rax, 269EC3h                                                   ; +0x170, 0x1401f9100\nmov     cs:qword_14090BFA8, rax                                        ; +0x176, 0x1401f9106\nshr     rax, 10h                                                       ; +0x17d, 0x1401f910d\nand     eax, 7FFFh                                                     ; +0x181, 0x1401f9111\nmovd    xmm0, eax                                                      ; +0x186, 0x1401f9116\ncvtdq2ps xmm0, xmm0                                                    ; +0x18a, 0x1401f911a\ndivss   xmm0, cs:dword_140835BDC                                       ; +0x18d, 0x1401f911d\nmulss   xmm0, cs:dword_140835450; X                                    ; +0x195, 0x1401f9125\ncall    floorf                                                         ; +0x19d, 0x1401f912d\ncvttss2si ecx, xmm0                                                    ; +0x1a2, 0x1401f9132\ntest    ecx, ecx                                                       ; +0x1a6, 0x1401f9136\njz      short loc_1401F9162                                            ; +0x1a8, 0x1401f9138\nsub     ecx, 1                                                         ; +0x1aa, 0x1401f913a\njz      short loc_1401F9158                                            ; +0x1ad, 0x1401f913d\ncmp     ecx, 1                                                         ; +0x1af, 0x1401f913f\njz      short loc_1401F914E                                            ; +0x1b2, 0x1401f9142\nmov     eax, 748h                                                      ; +0x1b4, 0x1401f9144\nadd     rsp, 28h                                                       ; +0x1b9, 0x1401f9149\nretn                                                                   ; +0x1bd, 0x1401f914d\nmov     eax, 747h                                                      ; +0x1be, 0x1401f914e\nadd     rsp, 28h                                                       ; +0x1c3, 0x1401f9153\nretn                                                                   ; +0x1c7, 0x1401f9157\nmov     eax, 746h                                                      ; +0x1c8, 0x1401f9158\nadd     rsp, 28h                                                       ; +0x1cd, 0x1401f915d\nretn                                                                   ; +0x1d1, 0x1401f9161\nmov     eax, 745h                                                      ; +0x1d2, 0x1401f9162\nadd     rsp, 28h                                                       ; +0x1d7, 0x1401f9167\nretn                                                                   ; +0x1db, 0x1401f916b\ncmp     ecx, 0A8Fh                                                     ; +0x1dc, 0x1401f916c\njz      short loc_1401F91D5                                            ; +0x1e2, 0x1401f9172\nmov     [rsp+28h+var_8], rbx                                           ; +0x1e4, 0x1401f9174\nmov     ebx, 0B16h                                                     ; +0x1e9, 0x1401f9179\ncmp     ecx, ebx                                                       ; +0x1ee, 0x1401f917e\njnz     short loc_1401F91CB                                            ; +0x1f0, 0x1401f9180\nimul    rax, cs:qword_14090BFA8, 343FDh                                ; +0x1f2, 0x1401f9182\nadd     rax, 269EC3h                                                   ; +0x1fd, 0x1401f918d\nmov     cs:qword_14090BFA8, rax                                        ; +0x203, 0x1401f9193\nshr     rax, 10h                                                       ; +0x20a, 0x1401f919a\nand     eax, 7FFFh                                                     ; +0x20e, 0x1401f919e\nmovd    xmm0, eax                                                      ; +0x213, 0x1401f91a3\ncvtdq2ps xmm0, xmm0                                                    ; +0x217, 0x1401f91a7\ndivss   xmm0, cs:dword_140835BDC                                       ; +0x21a, 0x1401f91aa\naddss   xmm0, xmm0; X                                                  ; +0x222, 0x1401f91b2\ncall    floorf                                                         ; +0x226, 0x1401f91b6\nmov     eax, 0B18h                                                     ; +0x22b, 0x1401f91bb\ncvttss2si ecx, xmm0                                                    ; +0x230, 0x1401f91c0\ntest    ecx, ecx                                                       ; +0x234, 0x1401f91c4\ncmovnz  ebx, eax                                                       ; +0x236, 0x1401f91c6\nmov     eax, ebx                                                       ; +0x239, 0x1401f91c9\nmov     rbx, [rsp+28h+var_8]                                           ; +0x23b, 0x1401f91cb\nadd     rsp, 28h                                                       ; +0x240, 0x1401f91d0\nretn                                                                   ; +0x244, 0x1401f91d4\nimul    rax, cs:qword_14090BFA8, 343FDh                                ; +0x245, 0x1401f91d5\nadd     rax, 269EC3h                                                   ; +0x250, 0x1401f91e0\nmov     cs:qword_14090BFA8, rax                                        ; +0x256, 0x1401f91e6\nshr     rax, 10h                                                       ; +0x25d, 0x1401f91ed\nand     eax, 7FFFh                                                     ; +0x261, 0x1401f91f1\nmovd    xmm0, eax                                                      ; +0x266, 0x1401f91f6\ncvtdq2ps xmm0, xmm0                                                    ; +0x26a, 0x1401f91fa\ndivss   xmm0, cs:dword_140835BDC                                       ; +0x26d, 0x1401f91fd\naddss   xmm0, xmm0; X                                                  ; +0x275, 0x1401f9205\ncall    floorf                                                         ; +0x279, 0x1401f9209\nxor     edx, edx                                                       ; +0x27e, 0x1401f920e\ncvttss2si ecx, xmm0                                                    ; +0x280, 0x1401f9210\ntest    ecx, ecx                                                       ; +0x284, 0x1401f9214\nsetnz   dl                                                             ; +0x286, 0x1401f9216\nlea     eax, [rdx+0A8Fh]                                               ; +0x289, 0x1401f9219\nadd     rsp, 28h                                                       ; +0x28f, 0x1401f921f\nretn                                                                   ; +0x293, 0x1401f9223", "xrefs": ["EditorUI::processSmartObjectsFromType @ 0x1401b7f45", "<???> @ 0x1408a37f4", "<???> @ 0x1408a3804", "<???> @ 0x14091ab28"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}