{"type": "func", "start": 6443342640, "end": 6443342970, "name": "sub_1800D9B30", "pseudocode": "// \n// sub_1800D9B30 from 0x1800d9b30 to 0x1800d9c7a (330 bytes)\n// \n// 3 xrefs:\n// > sub_1800D9060 @ 0x1800d9077\n// > sub_1800DA0D0 @ 0x1800da400\n// > <???> @ 0x1801c4b48\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:22:34 +0000\n// \n\nunsigned __int64 __fastcall sub_1800D9B30(__int64 a1)\n{\n  unsigned int v1; // ebx\n  HWND v3; // rcx\n  int v4; // esi\n  HMONITOR v5; // rax\n  unsigned int v6; // ebp\n  int v7; // eax\n  int v8; // ecx\n  float v9; // xmm0_4\n  int v10; // eax\n  float v11; // xmm2_4\n  int v12; // ecx\n  float v13; // xmm2_4\n  float v14; // xmm4_4\n  float v15; // xmm3_4\n  float v16; // xmm0_4\n  struct tagMONITORINFO mi; // [rsp+20h] [rbp-38h] BYREF\n\n  mi.cbSize = 40;\n  v1 = 0;\n  v3 = *(HWND *)(a1 + 880);\n  v4 = 0;\n  memset(&mi.rcMonitor, 0, 36);\n  v5 = MonitorFromWindow(v3, 2u);\n  v6 = 0;\n  if ( !GetMonitorInfoW(v5, &mi) )\n    return v1 | ((unsigned __int64)v6 << 32);\n  v7 = *(_DWORD *)(a1 + 712);\n  if ( v7 )\n  {\n    v8 = *(_DWORD *)(a1 + 716);\n    if ( v8 )\n    {\n      v9 = (float)v7;\n      v10 = *(_DWORD *)(a1 + 724);\n      v11 = (float)v8;\n      v12 = *(_DWORD *)(a1 + 728);\n      v13 = v11 / v9;\n      v14 = (float)((float)mi.rcMonitor.right - (float)mi.rcMonitor.left) - (float)v10;\n      v15 = (float)((float)mi.rcMonitor.bottom - (float)mi.rcMonitor.top) - (float)v12;\n      v16 = v14 * v13;\n      if ( v14 < (float)(v15 / v13) )\n      {\n        if ( v15 >= v16 )\n        {\n          v1 = (int)v14;\n          v4 = (int)v16;\n        }\n      }\n      else\n      {\n        v1 = (int)(float)(v15 / v13);\n        v4 = (int)v15;\n      }\n      v6 = v4 + v12;\n      v1 += v10;\n      return v1 | ((unsigned __int64)v6 << 32);\n    }\n  }\n  return 0;\n}", "assembly": "; \n; sub_1800D9B30 from 0x1800d9b30 to 0x1800d9c7a (330 bytes)\n; \n; 3 xrefs:\n; > sub_1800D9060 @ 0x1800d9077\n; > sub_1800DA0D0 @ 0x1800da400\n; > <???> @ 0x1801c4b48\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:22:34 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800d9b30\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1800d9b35\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1800d9b3a\npush    rdi                                                            ; +0xf, 0x1800d9b3f\nsub     rsp, 50h                                                       ; +0x10, 0x1800d9b40\nmov     rax, cs:__security_cookie                                      ; +0x14, 0x1800d9b44\nxor     rax, rsp                                                       ; +0x1b, 0x1800d9b4b\nmov     [rsp+58h+var_10], rax                                          ; +0x1e, 0x1800d9b4e\nxorps   xmm0, xmm0                                                     ; +0x23, 0x1800d9b53\nmov     [rsp+58h+mi.cbSize], 28h ; '('                                 ; +0x26, 0x1800d9b56\nxor     ebx, ebx                                                       ; +0x2e, 0x1800d9b5e\nmov     rdi, rcx                                                       ; +0x30, 0x1800d9b60\nmov     rcx, [rcx+370h]; hwnd                                          ; +0x33, 0x1800d9b63\nxor     eax, eax                                                       ; +0x3a, 0x1800d9b6a\nmov     esi, ebx                                                       ; +0x3c, 0x1800d9b6c\nmov     [rsp+58h+mi.dwFlags], eax                                      ; +0x3e, 0x1800d9b6e\nmovups  xmmword ptr [rsp+58h+mi.rcMonitor.left], xmm0                  ; +0x42, 0x1800d9b72\nlea     edx, [rbx+2]; dwFlags                                          ; +0x47, 0x1800d9b77\nmovups  xmmword ptr [rsp+58h+mi.rcWork.left], xmm0                     ; +0x4a, 0x1800d9b7a\ncall    cs:MonitorFromWindow                                           ; +0x4f, 0x1800d9b7f\nlea     rdx, [rsp+58h+mi]; lpmi                                        ; +0x55, 0x1800d9b85\nmov     ebp, ebx                                                       ; +0x5a, 0x1800d9b8a\nmov     rcx, rax; hMonitor                                             ; +0x5c, 0x1800d9b8c\ncall    cs:GetMonitorInfoW                                             ; +0x5f, 0x1800d9b8f\ntest    eax, eax                                                       ; +0x65, 0x1800d9b95\njz      loc_1800D9C48                                                  ; +0x67, 0x1800d9b97\nmov     eax, [rdi+2C8h]                                                ; +0x6d, 0x1800d9b9d\ntest    eax, eax                                                       ; +0x73, 0x1800d9ba3\njz      loc_1800D9C75                                                  ; +0x75, 0x1800d9ba5\nmov     ecx, [rdi+2CCh]                                                ; +0x7b, 0x1800d9bab\ntest    ecx, ecx                                                       ; +0x81, 0x1800d9bb1\njz      loc_1800D9C75                                                  ; +0x83, 0x1800d9bb3\nxorps   xmm0, xmm0                                                     ; +0x89, 0x1800d9bb9\nxorps   xmm4, xmm4                                                     ; +0x8c, 0x1800d9bbc\ncvtsi2ss xmm4, [rsp+58h+mi.rcMonitor.right]                            ; +0x8f, 0x1800d9bbf\ncvtsi2ss xmm0, eax                                                     ; +0x95, 0x1800d9bc5\nmov     eax, [rdi+2D4h]                                                ; +0x99, 0x1800d9bc9\nxorps   xmm3, xmm3                                                     ; +0x9f, 0x1800d9bcf\nxorps   xmm1, xmm1                                                     ; +0xa2, 0x1800d9bd2\ncvtsi2ss xmm3, [rsp+58h+mi.rcMonitor.bottom]                           ; +0xa5, 0x1800d9bd5\ncvtsi2ss xmm1, eax                                                     ; +0xab, 0x1800d9bdb\nxorps   xmm2, xmm2                                                     ; +0xaf, 0x1800d9bdf\ncvtsi2ss xmm2, ecx                                                     ; +0xb2, 0x1800d9be2\nmov     ecx, [rdi+2D8h]                                                ; +0xb6, 0x1800d9be6\ndivss   xmm2, xmm0                                                     ; +0xbc, 0x1800d9bec\nxorps   xmm0, xmm0                                                     ; +0xc0, 0x1800d9bf0\ncvtsi2ss xmm0, [rsp+58h+mi.rcMonitor.left]                             ; +0xc3, 0x1800d9bf3\nsubss   xmm4, xmm0                                                     ; +0xc9, 0x1800d9bf9\nxorps   xmm0, xmm0                                                     ; +0xcd, 0x1800d9bfd\ncvtsi2ss xmm0, [rsp+58h+mi.rcMonitor.top]                              ; +0xd0, 0x1800d9c00\nsubss   xmm4, xmm1                                                     ; +0xd6, 0x1800d9c06\nxorps   xmm1, xmm1                                                     ; +0xda, 0x1800d9c0a\nsubss   xmm3, xmm0                                                     ; +0xdd, 0x1800d9c0d\ncvtsi2ss xmm1, ecx                                                     ; +0xe1, 0x1800d9c11\nmovaps  xmm0, xmm4                                                     ; +0xe5, 0x1800d9c15\nsubss   xmm3, xmm1                                                     ; +0xe8, 0x1800d9c18\nmulss   xmm0, xmm2                                                     ; +0xec, 0x1800d9c1c\nmovaps  xmm5, xmm3                                                     ; +0xf0, 0x1800d9c20\ndivss   xmm5, xmm2                                                     ; +0xf3, 0x1800d9c23\ncomiss  xmm4, xmm5                                                     ; +0xf7, 0x1800d9c27\njb      short loc_1800D9C36                                            ; +0xfa, 0x1800d9c2a\ncvttss2si ebx, xmm5                                                    ; +0xfc, 0x1800d9c2c\ncvttss2si esi, xmm3                                                    ; +0x100, 0x1800d9c30\njmp     short loc_1800D9C43                                            ; +0x104, 0x1800d9c34\ncomiss  xmm3, xmm0                                                     ; +0x106, 0x1800d9c36\njb      short loc_1800D9C43                                            ; +0x109, 0x1800d9c39\ncvttss2si ebx, xmm4                                                    ; +0x10b, 0x1800d9c3b\ncvttss2si esi, xmm0                                                    ; +0x10f, 0x1800d9c3f\nlea     ebp, [rsi+rcx]                                                 ; +0x113, 0x1800d9c43\nadd     ebx, eax                                                       ; +0x116, 0x1800d9c46\nmov     eax, ebp                                                       ; +0x118, 0x1800d9c48\nshl     rax, 20h                                                       ; +0x11a, 0x1800d9c4a\nmov     ecx, ebx                                                       ; +0x11e, 0x1800d9c4e\nor      rax, rcx                                                       ; +0x120, 0x1800d9c50\nmov     rcx, [rsp+58h+var_10]                                          ; +0x123, 0x1800d9c53\nxor     rcx, rsp; StackCookie                                          ; +0x128, 0x1800d9c58\ncall    __security_check_cookie                                        ; +0x12b, 0x1800d9c5b\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x130, 0x1800d9c60\nmov     rbp, [rsp+58h+arg_10]                                          ; +0x135, 0x1800d9c65\nmov     rsi, [rsp+58h+arg_18]                                          ; +0x13a, 0x1800d9c6a\nadd     rsp, 50h                                                       ; +0x13f, 0x1800d9c6f\npop     rdi                                                            ; +0x143, 0x1800d9c73\nretn                                                                   ; +0x144, 0x1800d9c74\nmov     rax, rbx                                                       ; +0x145, 0x1800d9c75\njmp     short loc_1800D9C53                                            ; +0x148, 0x1800d9c78", "xrefs": ["sub_1800D9060 @ 0x1800d9077", "sub_1800DA0D0 @ 0x1800da400", "<???> @ 0x1801c4b48"], "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"}