Function at 0x140002d20
Capabilities:
Check for foreground window switch
Check for time delay via gettickcount

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov r13d, r9d
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x48], rdx
mov rsi, rcx
xor r12d, r12d
mov dword [rsp + 0x30], r12d
test rcx, rcx
jne 0x140002d6c
xor eax, eax
jmp 0x140002f99
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov r14, rax
mov qword [rsp + 0x58], r12
mov rdi, r12
mov qword [rsp + 0x38], r12
mov r9, qword [rsi]
lea r8, [rsp + 0x58]
mov edx, 0x271f
mov rcx, rsi
call qword [r9 + 0x80]
mov ebx, r12d
test eax, eax
setns bl
mov dword [rsp + 0x30], ebx
test ebx, ebx
je 0x140002f64
call qword [sym.imp.USER32.dll_GetForegroundWindow]
cmp r14, rax
jne 0x140002f5d
mov dword [rsp + 0x30], 1
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
lea rdx, [rsp + 0x64]
call qword [rax + 0x20]
test eax, eax
js 0x140002f5d
mov ebx, 1
mov dword [rsp + 0x30], ebx
mov r15d, ebx
mov eax, dword [rsp + 0x64]
cmp eax, ebx
cmove r15d, r12d
mov dword [rsp + 0x60], eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r12d, eax
nop
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, r12d
cmp eax, 0x9c40
jae 0x140002f3d
call qword [sym.imp.USER32.dll_GetForegroundWindow]
cmp r14, rax
jne 0x140002f3d
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
call qword [rax + 0x18]
xor ebx, ebx
mov edx, ebx
test eax, eax
setns dl
mov dword [rsp + 0x30], edx
test edx, edx
jne 0x140002ee9
test rsi, rsi
je 0x140002e53
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x10]
mov esi, ebx
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140002e68
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rsp + 0x58], rbx
test rdi, rdi
je 0x140002e79
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x10]
mov rsi, rbx
mov dword [rsp + 0x20], r13d
mov r9, qword [rsp + 0x40]
mov r8, qword [rsp + 0x48]
lea rdx, [rsp + 0x38]
call fcn.1400022e0
test eax, eax
je 0x140002ed6
call qword [sym.imp.USER32.dll_GetForegroundWindow]
cmp r14, rax
jne 0x140002ed6
mov dword [rsp + 0x30], 1
mov rdi, qword [rsp + 0x38]
mov rax, qword [rdi]
lea r8, [rsp + 0x58]
mov edx, 0x271f
mov rcx, rdi
call qword [rax + 0x80]
test eax, eax
js 0x140002edb
mov ebx, 1
mov dword [rsp + 0x30], ebx
jmp 0x140002e00
mov rdi, qword [rsp + 0x38]
mov dword [rsp + 0x30], ebx
xor r12d, r12d
mov qword [rsp + 0x58], r12
jmp 0x140002f3d
call qword [sym.imp.USER32.dll_GetForegroundWindow]
cmp r14, rax
jne 0x140002f15
mov dword [rsp + 0x30], 1
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
lea rdx, [rsp + 0x60]
call qword [rax + 0x20]
test eax, eax
js 0x140002f15
mov ebx, 1
mov dword [rsp + 0x30], ebx
cmp dword [rsp + 0x60], r15d
je 0x140002f44
mov rcx, r14
call qword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x140002f3d
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140002e00
cmp dword [rsp + 0x60], r15d
jne 0x140002f64
mov edx, 2
lea rcx, [0x1400289b0]
call fcn.1400014c0
mov ebx, eax
mov dword [rsp + 0x30], eax
jmp 0x140002f64
mov ebx, r12d
mov dword [rsp + 0x30], ebx
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140002f74
mov rax, qword [rcx]
call qword [rax + 0x10]
test rdi, rdi
je 0x140002f82
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x10]
test rsi, rsi
je 0x140002f91
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x10]
nop
jmp 0x140002f97
mov eax, ebx
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.140005570
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret