{"type": "func", "start": 6443328256, "end": 6443328640, "name": "sub_1800D6300", "pseudocode": "// \n// sub_1800D6300 from 0x1800d6300 to 0x1800d6480 (384 bytes)\n// \n// 4 xrefs:\n// > sub_1800D44D0 @ 0x1800d44e5\n// > sub_1800D7860 @ 0x1800d7cc8\n// > sub_1800D8740 @ 0x1800d8a96\n// > <???> @ 0x1801ba8c0\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\nvoid __fastcall sub_1800D6300(__int64 a1)\n{\n  HWND DesktopWindow; // rax\n  HWND v3; // rcx\n  HMONITOR v4; // rax\n  LONG left; // r8d\n  LONG top; // r9d\n  struct tagRECT v7; // [rsp+40h] [rbp-58h] BYREF\n  struct tagRECT Rect; // [rsp+50h] [rbp-48h] BYREF\n  struct tagMONITORINFO mi; // [rsp+60h] [rbp-38h] BYREF\n\n  if ( a1 )\n  {\n    DesktopWindow = GetDesktopWindow();\n    GetWindowRect(DesktopWindow, &Rect);\n    GetWindowRect(*(HWND *)(a1 + 880), &v7);\n    v3 = *(HWND *)(a1 + 880);\n    mi.cbSize = 40;\n    memset(&mi.rcMonitor, 0, 36);\n    v4 = MonitorFromWindow(v3, 2u);\n    if ( GetMonitorInfoW(v4, &mi) )\n    {\n      left = (int)(float)((float)((float)((float)((float)mi.rcMonitor.right - (float)mi.rcMonitor.left)\n                                        - (float)(v7.right - v7.left))\n                                * 0.5)\n                        + (float)mi.rcMonitor.left);\n      top = (int)(float)((float)((float)((float)((float)mi.rcMonitor.bottom - (float)mi.rcMonitor.top)\n                                       - (float)(v7.bottom - v7.top))\n                               * 0.5)\n                       + (float)mi.rcMonitor.top);\n    }\n    else\n    {\n      left = Rect.left;\n      top = Rect.top;\n      if ( Rect.left + (v7.left + Rect.right - Rect.left - v7.right) / 2 > 0 )\n        left = Rect.left + (v7.left + Rect.right - Rect.left - v7.right) / 2;\n      if ( Rect.top + (v7.top + Rect.bottom - Rect.top - v7.bottom) / 2 > 0 )\n        top = Rect.top + (v7.top + Rect.bottom - Rect.top - v7.bottom) / 2;\n    }\n    SetWindowPos(*(HWND *)(a1 + 880), nullptr, left, top, 0, 0, 0x15u);\n  }\n}", "assembly": "; \n; sub_1800D6300 from 0x1800d6300 to 0x1800d6480 (384 bytes)\n; \n; 4 xrefs:\n; > sub_1800D44D0 @ 0x1800d44e5\n; > sub_1800D7860 @ 0x1800d7cc8\n; > sub_1800D8740 @ 0x1800d8a96\n; > <???> @ 0x1801ba8c0\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\ntest    rcx, rcx                                                       ; +0x0, 0x1800d6300\njz      locret_1800D647F                                               ; +0x3, 0x1800d6303\npush    rbx                                                            ; +0x9, 0x1800d6309\nsub     rsp, 90h                                                       ; +0xa, 0x1800d630a\nmov     rax, cs:__security_cookie                                      ; +0x11, 0x1800d6311\nxor     rax, rsp                                                       ; +0x18, 0x1800d6318\nmov     [rsp+98h+var_10], rax                                          ; +0x1b, 0x1800d631b\nmov     rbx, rcx                                                       ; +0x23, 0x1800d6323\ncall    cs:GetDesktopWindow                                            ; +0x26, 0x1800d6326\nmov     rcx, rax; hWnd                                                 ; +0x2c, 0x1800d632c\nlea     rdx, [rsp+98h+Rect]; lpRect                                    ; +0x2f, 0x1800d632f\ncall    cs:GetWindowRect                                               ; +0x34, 0x1800d6334\nmov     rcx, [rbx+370h]; hWnd                                          ; +0x3a, 0x1800d633a\nlea     rdx, [rsp+98h+var_58]; lpRect                                  ; +0x41, 0x1800d6341\ncall    cs:GetWindowRect                                               ; +0x46, 0x1800d6346\nmov     rcx, [rbx+370h]; hwnd                                          ; +0x4c, 0x1800d634c\nxor     eax, eax                                                       ; +0x53, 0x1800d6353\nxorps   xmm0, xmm0                                                     ; +0x55, 0x1800d6355\nmov     [rsp+98h+mi.cbSize], 28h ; '('                                 ; +0x58, 0x1800d6358\nmovups  xmmword ptr [rsp+98h+mi.rcMonitor.left], xmm0                  ; +0x60, 0x1800d6360\nmov     [rsp+98h+mi.dwFlags], eax                                      ; +0x65, 0x1800d6365\nlea     edx, [rax+2]; dwFlags                                          ; +0x6c, 0x1800d636c\nmovups  xmmword ptr [rsp+98h+mi.rcWork.left], xmm0                     ; +0x6f, 0x1800d636f\ncall    cs:MonitorFromWindow                                           ; +0x74, 0x1800d6374\nmov     rcx, rax; hMonitor                                             ; +0x7a, 0x1800d637a\nlea     rdx, [rsp+98h+mi]; lpmi                                        ; +0x7d, 0x1800d637d\ncall    cs:GetMonitorInfoW                                             ; +0x82, 0x1800d6382\ntest    eax, eax                                                       ; +0x88, 0x1800d6388\njz      short loc_1800D6402                                            ; +0x8a, 0x1800d638a\nmov     eax, [rsp+98h+var_58.right]                                    ; +0x8c, 0x1800d638c\nxorps   xmm2, xmm2                                                     ; +0x90, 0x1800d6390\ncvtsi2ss xmm2, [rsp+98h+mi.rcMonitor.right]                            ; +0x93, 0x1800d6393\nsub     eax, [rsp+98h+var_58.left]                                     ; +0x99, 0x1800d6399\nxorps   xmm1, xmm1                                                     ; +0x9d, 0x1800d639d\nxorps   xmm0, xmm0                                                     ; +0xa0, 0x1800d63a0\ncvtsi2ss xmm1, [rsp+98h+mi.rcMonitor.left]                             ; +0xa3, 0x1800d63a3\ncvtsi2ss xmm0, eax                                                     ; +0xa9, 0x1800d63a9\nmov     eax, [rsp+98h+var_58.bottom]                                   ; +0xad, 0x1800d63ad\nsub     eax, [rsp+98h+var_58.top]                                      ; +0xb1, 0x1800d63b1\nsubss   xmm2, xmm1                                                     ; +0xb5, 0x1800d63b5\nsubss   xmm2, xmm0                                                     ; +0xb9, 0x1800d63b9\nxorps   xmm0, xmm0                                                     ; +0xbd, 0x1800d63bd\ncvtsi2ss xmm0, eax                                                     ; +0xc0, 0x1800d63c0\nmulss   xmm2, cs:dword_1800E6308                                       ; +0xc4, 0x1800d63c4\naddss   xmm2, xmm1                                                     ; +0xcc, 0x1800d63cc\nxorps   xmm1, xmm1                                                     ; +0xd0, 0x1800d63d0\ncvtsi2ss xmm1, [rsp+98h+mi.rcMonitor.top]                              ; +0xd3, 0x1800d63d3\ncvttss2si r8d, xmm2                                                    ; +0xd9, 0x1800d63d9\nxorps   xmm2, xmm2                                                     ; +0xde, 0x1800d63de\ncvtsi2ss xmm2, [rsp+98h+mi.rcMonitor.bottom]                           ; +0xe1, 0x1800d63e1\nsubss   xmm2, xmm1                                                     ; +0xe7, 0x1800d63e7\nsubss   xmm2, xmm0                                                     ; +0xeb, 0x1800d63eb\nmulss   xmm2, cs:dword_1800E6308                                       ; +0xef, 0x1800d63ef\naddss   xmm2, xmm1                                                     ; +0xf7, 0x1800d63f7\ncvttss2si r9d, xmm2                                                    ; +0xfb, 0x1800d63fb\njmp     short loc_1800D6446                                            ; +0x100, 0x1800d6400\nmov     r8d, [rsp+98h+Rect.left]                                       ; +0x102, 0x1800d6402\nmov     r9d, [rsp+98h+Rect.top]                                        ; +0x107, 0x1800d6407\nmov     eax, [rsp+98h+Rect.right]                                      ; +0x10c, 0x1800d640c\nsub     eax, r8d                                                       ; +0x110, 0x1800d6410\nsub     eax, [rsp+98h+var_58.right]                                    ; +0x113, 0x1800d6413\nadd     eax, [rsp+98h+var_58.left]                                     ; +0x117, 0x1800d6417\ncdq                                                                    ; +0x11b, 0x1800d641b\nsub     eax, edx                                                       ; +0x11c, 0x1800d641c\nsar     eax, 1                                                         ; +0x11e, 0x1800d641e\nadd     eax, r8d                                                       ; +0x120, 0x1800d6420\ntest    eax, eax                                                       ; +0x123, 0x1800d6423\ncmovg   r8d, eax; X                                                    ; +0x125, 0x1800d6425\nmov     eax, [rsp+98h+Rect.bottom]                                     ; +0x129, 0x1800d6429\nsub     eax, r9d                                                       ; +0x12d, 0x1800d642d\nsub     eax, [rsp+98h+var_58.bottom]                                   ; +0x130, 0x1800d6430\nadd     eax, [rsp+98h+var_58.top]                                      ; +0x134, 0x1800d6434\ncdq                                                                    ; +0x138, 0x1800d6438\nsub     eax, edx                                                       ; +0x139, 0x1800d6439\nsar     eax, 1                                                         ; +0x13b, 0x1800d643b\nadd     eax, r9d                                                       ; +0x13d, 0x1800d643d\ntest    eax, eax                                                       ; +0x140, 0x1800d6440\ncmovg   r9d, eax; Y                                                    ; +0x142, 0x1800d6442\nmov     rcx, [rbx+370h]; hWnd                                          ; +0x146, 0x1800d6446\nxor     eax, eax                                                       ; +0x14d, 0x1800d644d\nmov     [rsp+98h+uFlags], 15h; uFlags                                  ; +0x14f, 0x1800d644f\nxor     edx, edx; hWndInsertAfter                                      ; +0x157, 0x1800d6457\nmov     [rsp+98h+cy], eax; cy                                          ; +0x159, 0x1800d6459\nmov     [rsp+98h+var_78], eax; cx                                      ; +0x15d, 0x1800d645d\ncall    cs:SetWindowPos                                                ; +0x161, 0x1800d6461\nmov     rcx, [rsp+98h+var_10]                                          ; +0x167, 0x1800d6467\nxor     rcx, rsp; StackCookie                                          ; +0x16f, 0x1800d646f\ncall    __security_check_cookie                                        ; +0x172, 0x1800d6472\nadd     rsp, 90h                                                       ; +0x177, 0x1800d6477\npop     rbx                                                            ; +0x17e, 0x1800d647e\nretn                                                                   ; +0x17f, 0x1800d647f", "xrefs": ["sub_1800D44D0 @ 0x1800d44e5", "sub_1800D7860 @ 0x1800d7cc8", "sub_1800D8740 @ 0x1800d8a96", "<???> @ 0x1801ba8c0"], "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"}