Function at 0x1400408c0
Capabilities:
Check for time delay via gettickcount
Get keyboard layout

Disassembly:
push rbx
push rbp
push r15
mov eax, 0x8180
call fcn.1400bf950
sub rsp, rax
xor ebp, ebp
mov r15, rcx
cmp byte [rcx], 0x3e
jne 0x14004098a
mov rcx, qword [0x140107160]
lea rdx, str.UseErrorLevel
call fcn.14008bd00
mov r9, qword [0x140107158]
test rax, rax
mov rdx, qword [0x140107150]
mov eax, ebp
setne bl
cmp byte [r15 + 1], 3
movzx ecx, bl
cmova rax, qword [0x1401070b8]
xor cl, 1
mov qword [rsp + 0x48], rax
xor r8d, r8d
mov byte [rsp + 0x40], 1
lea rax, [rsp + 0x60]
mov byte [rsp + 0x38], bl
mov qword [rsp + 0x30], rax
mov rax, qword [0x140107160]
mov qword [rsp + 0x28], rax
mov byte [rsp + 0x20], cl
lea rcx, [0x1401072b0]
call fcn.14003a9e0
test eax, eax
jne 0x14004098a
test bl, bl
je 0x14004097c
mov rcx, qword [0x140104d40]
lea rdx, str.ERROR
xor r9d, r9d
mov byte [rsp + 0x20], 1
or r8, 0xffffffffffffffff
call fcn.14008f020
mov ebp, eax
mov eax, ebp
add rsp, 0x8180
pop r15
pop rbp
pop rbx
ret
movzx eax, byte [r15]
mov qword [rsp + 0x8178], rsi
mov qword [rsp + 0x8170], rdi
mov qword [rsp + 0x8168], r12
mov qword [rsp + 0x8160], r13
mov qword [rsp + 0x8158], r14
movaps xmmword [rsp + 0x8140], xmm6
cmp al, 0x5d
jne 0x140040b77
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov rcx, qword [0x140107150]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call fcn.140016640
mov byte [rsp + 0x81b0], al
test al, al
jne 0x140040a6e
mov rcx, qword [0x140107150]
lea rdx, [rsp + 0x5c]
xor r8d, r8d
call fcn.14005fbb0
mov dword [rsp + 0x54], eax
test eax, eax
je 0x140040a13
add eax, 0xfffffff4
cmp eax, 0x1f
jbe 0x140040a79
mov rcx, qword [0x140104d40]
lea rdx, [0x1400e25dc]
xor r9d, r9d
mov byte [rsp + 0x20], 1
or r8, 0xffffffffffffffff
call fcn.14008f020
mov r14, qword [rsp + 0x8158]
mov r13, qword [rsp + 0x8160]
mov r12, qword [rsp + 0x8168]
mov rdi, qword [rsp + 0x8170]
mov rsi, qword [rsp + 0x8178]
movaps xmm6, xmmword [rsp + 0x8140]
add rsp, 0x8180
pop r15
pop rbp
pop rbx
ret
mov eax, dword [rsp + 0x81a0]
mov dword [rsp + 0x54], eax
mov rsi, qword [0x140107158]
mov r13b, 1
mov byte [rsp + 0x81a0], bpl
mov r12d, ebp
mov dword [rsp + 0x50], 1
mov byte [rsp + 0x81a8], r13b
movzx eax, word [rsi]
test ax, ax
je 0x140040b5b
movsd xmm6, qword [0x1400edbe8]
lea rdi, [rsi + 2]
nop word [rax + rax]
movzx ebx, ax
test ebx, 0xffffff80
jne 0x140040ade
mov edx, 2
mov ecx, ebx
call fcn.1400ad844
test eax, eax
je 0x140040ade
and ebx, 0xffffffdf
movzx eax, bx
cmp eax, 0x44
je 0x140040b36
cmp eax, 0x4c
je 0x140040b30
cmp eax, 0x54
jne 0x140040b3e
mov rcx, rdi
xor r13b, r13b
call fcn.140010be0
mov rcx, rdi
test al, al
je 0x140040b20
xor edx, edx
lea r8d, [rdx + 0x10]
call fcn.1400aed04
xorps xmm0, xmm0
cvtsi2sd xmm0, rax
mulsd xmm0, xmm6
cvttsd2si r12d, xmm0
jmp 0x140040b3e
call fcn.1400b2e50
mulsd xmm0, xmm6
cvttsd2si r12d, xmm0
jmp 0x140040b3e
mov dword [rsp + 0x50], ebp
jmp 0x140040b3e
mov byte [rsp + 0x81a0], 1
movzx eax, word [rsi + 2]
add rsi, 2
add rdi, 2
test ax, ax
jne 0x140040ac0
mov byte [rsp + 0x81a8], r13b
lea rax, [rsp + 0x130]
mov dword [rsp + 0x120], ebp
mov qword [rsp + 0x110], rax
jmp 0x140040c6e
mov rcx, qword [0x140107150]
mov rbx, qword [0x140107160]
cmp al, 0x3e
je 0x140040b92
cmp al, 0x5c
je 0x140040b9a
cmp word [rbx], bp
jne 0x140040ba3
cmp al, 0x5c
jne 0x140040c2c
cmp word [rcx], bp
je 0x140040c2c
xor r13b, r13b
cmp al, 0x5c
mov byte [rsp + 0x81a8], r13b
cmove rbx, rcx
mov rcx, rbx
call fcn.140010be0
mov rcx, rbx
test al, al
je 0x140040bd8
xor edx, edx
lea r8d, [rdx + 0x10]
call fcn.1400aed04
xorps xmm0, xmm0
cvtsi2sd xmm0, rax
jmp 0x140040bdd
call fcn.1400b2e50
movzx eax, byte [rsp + 0x81a0]
movzx edx, byte [rsp + 0x81a0]
mov ecx, dword [rsp + 0x81a0]
mulsd xmm0, qword [0x1400edbe8]
mov byte [rsp + 0x81a0], al
mov eax, dword [rsp + 0x81a0]
mov byte [rsp + 0x81b0], dl
mov dword [rsp + 0x54], ecx
cvttsd2si r12d, xmm0
mov dword [rsp + 0x50], eax
cmp r12d, 1
jge 0x140040c6e
mov r12d, 0x1f4
jmp 0x140040c6e
movzx eax, byte [rsp + 0x81a0]
mov r13b, 1
mov byte [rsp + 0x81b0], al
mov r12d, ebp
mov eax, dword [rsp + 0x81a0]
mov dword [rsp + 0x54], eax
movzx eax, byte [rsp + 0x81a0]
mov byte [rsp + 0x81a0], al
mov eax, dword [rsp + 0x81a0]
mov dword [rsp + 0x50], eax
mov byte [rsp + 0x81a8], r13b
cmp byte [r15], 0x3e
je 0x140040c93
mov rcx, qword [0x140104d40]
lea rdx, [0x1400cefdc]
xor r9d, r9d
mov byte [rsp + 0x20], 1
or r8, 0xffffffffffffffff
call fcn.14008f020
cmp byte [r15], 0x5c
jne 0x140040cb3
mov edx, 1
mov rcx, r15
call fcn.140028630
mov byte [rsp + 0x81b8], 1
cmp eax, 1
je 0x140040cbb
mov byte [rsp + 0x81b8], bpl
lea rdi, [rsp + 0x130]
mov r14d, ebp
lea rdx, [0x1400cef3c]
mov ecx, 0x4001
cmp byte [r15 + 1], bpl
jbe 0x140040d6c
mov rsi, rbp
lea r13, [0x140000000]
test ecx, ecx
jne 0x140040cf1
mov qword [rsp + rsi + 0x70], rdx
jmp 0x140040d52
mov rdx, qword [rsi + r13 + 0x107150]
movsxd rbx, ecx
mov rcx, rdi
mov qword [rsp + rsi + 0x70], rdi
lea r8, [rbx - 1]
call fcn.1400b3ca4
or rax, 0xffffffffffffffff
mov word [rdi + rbx*2 - 2], bp
nop word [rax + rax]
cmp word [rdi + rax*2 + 2], bp
lea rax, [rax + 1]
jne 0x140040d20
lea rdi, [rdi + rax*2]
add rdi, 2
lea rcx, [rsp + 0x130]
mov rax, rdi
lea rdx, [0x1400cef3c]
sub rax, rcx
mov ecx, 0x4001
sar rax, 1
sub ecx, eax
movzx eax, byte [r15 + 1]
inc r14d
add rsi, 8
cmp r14d, eax
jl 0x140040ce6
movzx r13d, byte [rsp + 0x81a8]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rdi, qword [rsp + 0x60]
lea r9, [0x140000000]
mov r11, qword [0x140100a58]
mov ebx, eax
movzx esi, byte [rsp + 0x81a0]
xorps xmm6, xmm6
mov r14d, dword [rsp + 0x50]
mov r10, qword [rsp + 0x78]
mov r8, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x90]
nop dword [rax]
movzx eax, byte [r15]
add eax, 0xffffffc2
cmp eax, 0x3e
ja case.0x140040dd6.69
cdqe
movzx eax, byte [r9 + rax + 0x41174]
mov ecx, dword [r9 + rax*4 + 0x41154]
add rcx, r9
jmp rcx
movzx eax, byte [r15 + 1]
lea r10, [0x1400cef3c]
cmp al, 4
mov dword [rsp + 0x40], ebp
mov qword [rsp + 0x38], rbp
lea r9, [0x1400cef3c]
cmova r10, rdx
mov byte [rsp + 0x30], 1
cmp al, 3
mov byte [rsp + 0x28], bpl
lea rdx, [0x1400cef3c]
mov qword [rsp + 0x20], r10
cmova r9, r8
mov rcx, r11
cmp al, 1
lea r8, [0x1400cef3c]
cmova r8, qword [rsp + 0x78]
test al, al
cmovne rdx, qword [rsp + 0x70]
call fcn.1400907a0
test rax, rax
je case.0x140040dd6.69
mov rcx, qword [0x140100a58]
mov ecx, dword [rcx + 0x74]
jmp 0x140040eb8
movzx eax, byte [r15 + 1]
lea rcx, [0x1400cef3c]
cmp al, 4
mov dword [rsp + 0x40], ebp
mov qword [rsp + 0x38], rbp
lea r9, [0x1400cef3c]
cmova rcx, rdx
mov byte [rsp + 0x30], bpl
cmp al, 3
mov byte [rsp + 0x28], bpl
mov qword [rsp + 0x20], rcx
lea rdx, [0x1400cef3c]
cmova r9, r8
mov rcx, r11
cmp al, 1
lea r8, [0x1400cef3c]
cmova r8, r10
test al, al
cmovne rdx, qword [rsp + 0x70]
call fcn.1400907a0
test rax, rax
jne case.0x140040dd6.69
mov rax, qword [0x140100a58]
mov ecx, dword [rax + 0x74]
cmp ecx, 0xffffffff
jle 0x140041149
mov edx, 1
call fcn.1400016f0
mov eax, 1
jmp 0x140040a32
movzx eax, byte [r15 + 1]
lea rcx, [0x1400cef3c]
cmp al, 4
mov byte [rsp + 0x28], 1
lea r9, [0x1400cef3c]
cmova rcx, rdx
cmp al, 3
mov qword [rsp + 0x20], rcx
lea rdx, [0x1400cef3c]
cmova r9, r8
mov rcx, r11
cmp al, 1
lea r8, [0x1400cef3c]
cmova r8, r10
test al, al
cmovne rdx, qword [rsp + 0x70]
call fcn.1400905a0
test rax, rax
jne 0x140040eae
jmp case.0x140040dd6.69
movzx eax, byte [r15 + 1]
lea rcx, [0x1400cef3c]
cmp al, 4
mov byte [rsp + 0x28], 1
lea r9, [0x1400cef3c]
cmova rcx, rdx
cmp al, 3
mov qword [rsp + 0x20], rcx
lea rdx, [0x1400cef3c]
cmova r9, r8
mov rcx, r11
cmp al, 1
lea r8, [0x1400cef3c]
cmova r8, r10
test al, al
cmovne rdx, qword [rsp + 0x70]
call fcn.1400905a0
test rax, rax
je 0x140040eae
jmp case.0x140040dd6.69
cmp byte [rsp + 0x81b8], bpl
je 0x140040fa4
call qword [sym.imp.USER32.dll_CountClipboardFormats]
test eax, eax
jne 0x140041149
jmp case.0x140040dd6.69
mov ecx, SafeArrayGetElemsize
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
jne 0x140041149
lea ecx, [rax + 0xf]
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
jne 0x140041149
jmp case.0x140040dd6.69
movzx eax, byte [rsp + 0x81b0]
test al, al
je 0x140040fec
mov edx, r14d
movzx ecx, al
call fcn.14005ff10
cmp al, sil
je 0x140041149
jmp case.0x140040dd6.69
mov edx, dword [rsp + 0x5c]
lea r8, [rsp + 0x110]
mov ecx, dword [rsp + 0x54]
xor r9d, r9d
call fcn.14005ffc0
ucomisd xmm0, xmm6
jp 0x140041010
jne 0x140041010
xor eax, eax
jmp 0x140041012
mov al, 1
cmp al, sil
je 0x140041149
jmp case.0x140040dd6.69
test rdi, rdi
je 0x140041133
lea rdx, [rsp + 0x58]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [rsp + 0x58], 0x103
jne 0x140041124
test r13b, r13b
jne 0x14004105c
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [rbx + r12]
sub ecx, eax
cmp ecx, 5
jle 0x140040a13
mov edx, 1
mov ecx, 0x8000012f
call fcn.1400016f0
mov r11, qword [0x140100a58]
lea r9, [0x140000000]
mov rdx, qword [rsp + 0x90]
mov r8, qword [rsp + 0x88]
mov r10, qword [rsp + 0x78]
test al, al
je 0x140040db0
cmp byte [r11 + 0x139], bpl
je 0x140040db0
movsxd rcx, dword [0x140105dd8]
lea r9, [0x140000000]
test ecx, ecx
mov eax, 0x190
cmovne eax, ecx
dec eax
movsxd rdx, eax
cmp qword [r9 + rdx*8 + 0x106420], r15
jne 0x1400410e0
cmp dword [r9 + rdx*4 + 0x105de0], ebx
mov rdx, qword [rsp + 0x90]
je 0x140040db0
mov rdx, qword [rsp + 0x90]
mov r8, qword [rsp + 0x88]
mov r10, qword [rsp + 0x78]
mov qword [r9 + rcx*8 + 0x106420], r15
mov dword [r9 + rcx*4 + 0x105de0], ebx
inc ecx
mov dword [0x140105dd8], ecx
cmp ecx, 0x190
jl 0x140040db0
mov dword [0x140105dd8], ebp
jmp 0x140040d97
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [rsp + 0x58]
jmp 0x140041137
mov dword [rsp + 0x58], ebp
mov rcx, qword [0x140104d40]
mov r8b, reloc.OLEAUT32.dll_SafeArrayGetElement
movsxd rdx, ebp
call fcn.140001280
mov eax, 1
jmp 0x140040a32