Function at 0x140051b00
Capabilities:
Check for time delay via gettickcount
Terminate process

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x38
mov rsi, r9
mov rdi, r8
mov rbx, rdx
mov rbp, rcx
test rdx, rdx
je 0x140051dce
cmp word [rdx], 0
je 0x140051dce
lea rdx, str.Exist
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140051db2
lea rdx, str.Close
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140051d28
lea rdx, str.Priority
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140051c8e
lea rdx, str.Wait
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140051b89
lea ebp, [rax + 4]
jmp 0x140051ba4
lea rdx, str.WaitClose
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140051dce
lea ebp, [rax + 5]
cmp word [rsi], 0
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x30], r15
je 0x140051bdb
mov rcx, rsi
xor r14b, r14b
call fcn.140026bd0
mulsd xmm0, qword [0x1400ef968]
cvttsd2si esi, xmm0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r12d, eax
jmp 0x140051be5
mov r12d, dword [rsp + 0x68]
mov r14b, 1
xor esi, esi
mov r15d, dword gs:[0x48]
nop
mov rcx, rdi
call fcn.14007b770
mov ebx, eax
cmp rbp, 4
jne 0x140051c33
test eax, eax
je 0x140051c37
mov rcx, qword [0x140102760]
mov rdx, rbx
mov r8b, reloc.OLEAUT32.dll_SafeArrayGetElement
call fcn.1400014c0
mov eax, 1
mov r14, qword [rsp + 0x70]
mov r12, qword [rsp + 0x60]
mov r15, qword [rsp + 0x30]
add rsp, 0x38
pop rdi
pop rsi
pop rbp
pop rbx
ret
test eax, eax
je 0x140051c6d
test r14b, r14b
jne 0x140051c4d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [r12 + rsi]
sub ecx, eax
cmp ecx, 5
jle 0x140051c04
cmp dword [0x140105cc0], r15d
mov ecx, 0x64
jne 0x140051c65
lea edx, [rcx - 0x63]
call fcn.1400019b0
jmp 0x140051bf0
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140051bf0
mov rcx, qword [0x140102760]
lea rdx, [0x1400cc6d4]
xor r9d, r9d
mov byte [rsp + 0x20], 1
lea r8, [r9 - 1]
call fcn.1400b1f60
jmp 0x140051c1b
movzx ecx, word [rsi]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_towupper]
movzx eax, ax
add eax, 0xffffffbf
cmp eax, 0x11
ja case.0x140051cb9.67
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x51dec]
add rcx, rdx
jmp rcx
mov ebx, 0x40
jmp 0x140051ce3
mov ebx, 0x4000
jmp 0x140051ce3
mov ebx, SafeArrayAllocDescriptor
jmp 0x140051ce3
mov ebx, 0x8000
jmp 0x140051ce3
mov ebx, 0x80
jmp 0x140051ce3
mov ebx, 0x100
cmp word [rdi], 0
je 0x140051cf3
mov rcx, rdi
call fcn.14007b770
jmp 0x140051cf9
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edi, eax
test eax, eax
je case.0x140051cb9.67
mov r8d, eax
xor edx, edx
mov ecx, 0x200
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je case.0x140051cb9.67
mov edx, ebx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetPriorityClass]
jmp 0x140051d59
mov rcx, rdi
call fcn.14007b770
mov edi, eax
test eax, eax
je case.0x140051cb9.67
mov r8d, eax
xor edx, edx
mov ecx, 0x1f0fff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je case.0x140051cb9.67
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
test ebx, ebx
cmovne esi, edi
mov edx, esi
mov rcx, qword [0x140102760]
mov r8b, reloc.OLEAUT32.dll_SafeArrayGetElement
call fcn.1400014c0
mov eax, 1
add rsp, 0x38
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov rcx, qword [0x140102760]
lea rdx, [0x1400cc6d4]
xor r9d, r9d
mov byte [rsp + 0x20], 1
lea r8, [r9 - 1]
call fcn.1400b1f60
add rsp, 0x38
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp word [rdi], 0
je 0x140051dc4
mov rcx, rdi
call fcn.14007b770
mov edx, eax
jmp 0x140051d6d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, eax
jmp 0x140051d6d
mov r9, rbx
lea rdx, str.Parameter_1_invalid.
xor r8d, r8d
mov rcx, rbp
add rsp, 0x38
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.140047d40