Function at 0x140059090
Capabilities:
Check for foreground window switch

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
mov rax, qword [0x140077010]
xor rax, rsp
mov qword [rbp + 0x2f], rax
cmp byte [rcx + 0x48], 0
mov r15, rcx
jne 0x1400593a5
xor r12d, r12d
nop dword [rax]
xor r9d, r9d
mov dword [rsp + 0x20], 1
xor r8d, r8d
lea rcx, [rbp - 0x11]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x14005912c
nop
lea rcx, [rbp - 0x11]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rbp - 0x11]
call qword [sym.imp.USER32.dll_DispatchMessageW]
cmp dword [rbp - 9], 0x12
je 0x1400593a5
xor r9d, r9d
mov dword [rsp + 0x20], 1
xor r8d, r8d
lea rcx, [rbp - 0x11]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x1400590f0
cmp dword [r15 + 0x1b0], 1
jne 0x140059146
mov rcx, r15
call fcn.140059770
test al, al
je 0x1400593a5
mov rbx, qword [0x14008f058]
test rbx, rbx
je 0x14005915b
mov rax, qword [rbx + 0xa0]
jmp 0x14005915e
mov rax, r12
cmp qword [rax + 0x48], r12
jne 0x140059170
call fcn.14003d350
mov rbx, qword [0x14008f058]
test rbx, rbx
je 0x14005917e
mov rdi, qword [rbx + 0x98]
jmp 0x140059181
mov rdi, r12
vpxor xmm0, xmm0, xmm0
vmovdqu xmmword [rbp - 0x39], xmm0
mov rcx, qword [rdi]
lea rdx, [rbp - 0x39]
call qword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [rbp - 0x31]
lea rcx, [rbp - 0x19]
sub eax, dword [rbp - 0x39]
vxorps xmm1, xmm1, xmm1
vcvtsi2ss xmm1, xmm1, eax
mov eax, dword [rbp - 0x2d]
sub eax, dword [rbp - 0x35]
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, eax
vmovss dword [rbx + 0x14], xmm0
vmovss dword [rbx + 0x10], xmm1
mov qword [rbp - 0x19], r12
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, qword [rbp - 0x19]
mov rsi, qword [0x14008f058]
mov rax, rcx
sub rax, qword [rdi + 0x18]
vxorps xmm1, xmm1, xmm1
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, qword [rdi + 0x20]
vcvtsi2ss xmm1, xmm1, rax
vdivss xmm1, xmm1, xmm0
vmovss dword [rbx + 0x18], xmm1
mov qword [rdi + 0x18], rcx
test rsi, rsi
je 0x14005920b
mov r14, qword [rsi + 0x98]
jmp 0x14005920e
mov r14, r12
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov rcx, qword [r14]
cmp rax, rcx
jne 0x1400592a2
cmp byte [rsi + 0xdb], r12b
je 0x140059262
vcvttss2si eax, dword [rsi + 0xe08]
mov dword [rbp - 0x29], eax
lea rdx, [rbp - 0x29]
vcvttss2si eax, dword [rsi + 0xe0c]
mov dword [rbp - 0x25], eax
call qword [sym.imp.USER32.dll_ClientToScreen]
test eax, eax
je 0x140059259
mov edx, dword [rbp - 0x25]
mov ecx, dword [rbp - 0x29]
call qword [sym.imp.USER32.dll_SetCursorPos]
cmp byte [rsi + 0xdb], r12b
jne 0x1400592a2
cmp dword [r14 + 0x10], r12d
jne 0x1400592a2
lea rcx, [rbp - 0x21]
call qword [sym.imp.USER32.dll_GetCursorPos]
test eax, eax
je 0x1400592a2
mov rcx, qword [r14]
lea rdx, [rbp - 0x21]
call qword [sym.imp.USER32.dll_ScreenToClient]
test eax, eax
je 0x1400592a2
vxorps xmm2, xmm2, xmm2
vcvtsi2ss xmm2, xmm2, dword [rbp - 0x1d]
vxorps xmm1, xmm1, xmm1
vcvtsi2ss xmm1, xmm1, dword [rbp - 0x21]
lea rcx, [rsi + 8]
call fcn.140010190
call fcn.14003dce0
cmp byte [rbx + 0x78], r12b
je 0x1400592b4
mov eax, 0xffffffff
jmp 0x1400592c1
mov rax, qword [0x14008f058]
mov eax, dword [rax + 0x4a98]
cmp dword [rdi + 0x28], eax
je 0x1400592ce
mov dword [rdi + 0x28], eax
call fcn.14003db70
call fcn.14003deb0
call fcn.140014c10
mov rcx, qword [r15 + 0x40]
test rcx, rcx
je 0x1400593d5
mov rax, qword [rcx]
call qword [rax + 0x10]
call fcn.140016cb0
mov rcx, qword [0x14008f138]
lea r8, [0x14008f148]
vmovups xmm0, xmmword [r15 + 0xf0]
xor r9d, r9d
vmovups xmmword [rbp + 0x1f], xmm0
mov rax, qword [rcx]
lea edx, [r9 + 1]
call qword [rax + 0x108]
mov rcx, qword [0x14008f138]
lea r8, [rbp + 0x1f]
mov rdx, qword [0x14008f148]
mov rax, qword [rcx]
call qword [rax + 0x190]
mov rax, qword [0x14008f058]
mov rcx, qword [rax + 0x48d0]
mov rax, qword [rcx]
mov rcx, r12
add rax, 0x48
cmp byte [rax], r12b
cmovne rcx, rax
call fcn.14003c8d0
mov rcx, qword [0x14008f140]
xor r8d, r8d
mov rax, qword [rcx]
lea edx, [r8 + 1]
call qword [rax + 0x40]
mov eax, dword [0x14008f154]
test eax, eax
je 0x14005939b
cmp eax, 1
jne 0x140059383
lea ecx, [rax + 0x1d]
jmp 0x140059395
cmp eax, 2
jne 0x14005938d
lea ecx, [rax + 0x30]
jmp 0x140059395
cmp eax, 3
jne 0x14005939b
lea ecx, [rax + 0x61]
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [r15 + 0x48], r12b
je 0x1400590d0
mov rcx, r15
call fcn.1400571c0
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.14005ba70
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
int3