Function at 0x14001b480
Capabilities:
Get keyboard layout

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x440
xor r12d, r12d
mov rdi, r9
movzx r14d, r8b
movzx ebp, r12w
mov r15, rdx
mov rsi, rcx
lea r13, [r9 + 0x12]
mov byte [rax + 0x18], bpl
test r9, r9
jne 0x14001b4be
lea r13, [rax + 0x20]
test r14b, r14b
jne 0x14001b547
mov rbx, rcx
test rcx, rcx
je 0x14001b547
movzx edx, word [rcx]
test dx, dx
je 0x14001b547
nop word [rax + rax]
lea rcx, [0x140107c20]
mov eax, SafeArrayAllocDescriptor
nop dword [rax]
cmp dx, ax
je 0x14001b511
movzx eax, word [rcx + 2]
add rcx, 2
test ax, ax
jne 0x14001b4f0
movzx edx, word [rbx + 2]
add rbx, 2
test dx, dx
jne 0x14001b4e0
jmp 0x14001b547
mov rcx, rbx
movzx eax, word [rcx]
cmp ax, 0x20
je 0x14001b523
cmp ax, 9
jne 0x14001b529
add rcx, 2
jmp 0x14001b514
lea rdx, [0x140105074]
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
jne 0x14001b547
test rdi, rdi
je 0x14001b543
mov byte [rdi + 0x16], 1
mov word [rbx], r12w
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
lea rdx, [rsp + 0x490]
mov r8b, 1
mov r9, rax
mov rcx, rsi
call fcn.140023e00
movzx ebx, al
test al, al
je 0x14001b8da
test r14b, r14b
je 0x14001b875
lea eax, [rbx + 0x64]
cmp al, 3
ja 0x14001b898
cmp byte [rsp + 0x4a0], r12b
je 0x14001b837
mov rdi, qword [0x140140268]
movzx eax, byte [rdi + 0x23]
test al, al
jne 0x14001b5c4
mov rcx, qword [rdi + 0x10]
lea rdx, reloc.WSOCK32.dll_gethostbyaddr
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.1400e6e20
xor eax, eax
jmp 0x14001bcb1
lea r13, reloc.WSOCK32.dll_gethostbyaddr
cmp qword [rdi + 8], r13
jne 0x14001b5da
mov rbp, qword [rdi + 0x10]
shr rbp, 1
jmp 0x14001b5df
mov ebp, 1
lea rcx, [rbp + 1]
lea rsi, [rcx + rcx]
cmp al, 2
jne 0x14001b5fd
mov rdx, rbp
mov rcx, r13
call fcn.140006bc0
xor eax, eax
jmp 0x14001bcb1
mov r8, qword [0x14013b0d0]
cmp rsi, r8
jbe 0x14001b61b
cmp rsi, qword [rdi + 0x18]
jbe 0x14001b61b
lea rdx, [0x140124720]
jmp 0x14001bc1f
cmp rcx, 2
jae 0x14001b637
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 3]
call fcn.1400e74d0
xor eax, eax
jmp 0x14001bcb1
movzx eax, byte [rdi + 0x21]
test al, 2
je 0x14001b654
mov rcx, qword [rdi]
and al, 0x3d
mov byte [rdi + 0x21], al
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
mov r8, qword [0x14013b0d0]
mov r9, qword [rdi + 0x18]
and byte [rdi + 0x21], 0x82
cmp rsi, r9
jbe 0x14001b7cb
movzx r10d, byte [rdi + 0x20]
movzx eax, r10b
cmp r10b, 1
jbe 0x14001b68d
cmp al, 2
je 0x14001b6ca
mov rbx, qword [rsp + 0x498]
mov rax, qword [rsp + 0x498]
jmp 0x14001b7bf
mov ebx, 0x80
cmp rsi, rbx
ja 0x14001b6ca
cmp rsi, 8
ja 0x14001b6a4
mov ebx, 8
jmp 0x14001b6b0
mov eax, reloc.WSOCK32.dll_recv
cmp rsi, rax
cmovbe rbx, rax
mov rcx, rbx
call fcn.1400dd290
test rax, rax
je 0x14001bc32
mov byte [rdi + 0x20], 1
jmp 0x14001b7bf
cmp rsi, 0x20
jae 0x14001b6da
mov ebx, SafeArrayAllocDescriptor
jmp 0x14001b784
mov ebx, 0x208
cmp rsi, rbx
jb 0x14001b784
cmp rsi, 0x50000
jae 0x14001b740
pxor xmm0, xmm0
cvtsi2sd xmm0, rsi
test rsi, rsi
jns 0x14001b707
addsd xmm0, qword [0x1401279a8]
mulsd xmm0, qword [0x1401279e0]
movsd xmm1, qword [0x1401279d8]
xor ecx, ecx
comisd xmm0, xmm1
jbe 0x14001b736
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x14001b736
movabs rax, 0x8000000000000000
mov rcx, rax
cvttsd2si rbx, xmm0
add rbx, rcx
jmp 0x14001b784
cmp rsi, 0x320000
jae 0x14001b752
lea rbx, [rsi + 0x8000]
jmp 0x14001b784
cmp rsi, 0xc80000
jae 0x14001b77d
movabs rax, 0x47ae147ae147ae15
mov rbx, rsi
mul rsi
sub rbx, rdx
shr rbx, 1
add rbx, rdx
shr rbx, 6
add rbx, rsi
jmp 0x14001b784
lea rbx, [rsi + 0x20000]
cmp rbx, r8
cmova rbx, r8
cmp r10b, 2
jne 0x14001b7a5
test r9, r9
je 0x14001b7a5
mov rcx, qword [rdi + 8]
mov sil, 1
call qword [sym.imp.MSVCR100.dll_free]
jmp 0x14001b7a8
xor sil, sil
test rbx, rbx
js 0x14001b7fb
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_malloc]
test rax, rax
je 0x14001b7fb
mov byte [rdi + 0x20], 2
and byte [rdi + 0x21], 0x7f
mov qword [rdi + 8], rax
mov qword [rdi + 0x18], rbx
mov rcx, qword [rdi + 8]
cmp rcx, r13
je 0x14001b7e2
lea r8, [rbp + rbp]
mov rdx, r13
call qword [sym.imp.MSVCR100.dll_memmove]
mov rax, qword [rdi + 8]
lea rcx, [rbp + rbp]
mov word [rcx + rax], r12w
mov qword [rdi + 0x10], rcx
xor eax, eax
jmp 0x14001bcb1
test sil, sil
je 0x14001b81f
lea rax, [0x140141fa8]
mov qword [rdi + 0x18], r12
mov qword [rdi + 0x10], r12
mov qword [rdi + 8], rax
lea rdx, str.Out_of_memory.
jmp 0x14001bc1f
mov rax, qword [rdi + 8]
lea rdx, str.Out_of_memory.
mov word [rax], r12w
mov qword [rdi + 0x10], r12
jmp 0x14001bc1f
lea r8, str.__s__is_not_allowed_as_a_prefix_key.
lea rcx, [rsp + 0x40]
mov r9, rsi
mov edx, 0x200
call fcn.1400e0640
lea rdx, [rsp + 0x40]
lea rcx, [0x140143150]
mov r8, r15
call fcn.14005f7b0
test rdi, rdi
jne 0x14001bc32
lea eax, [rdi + 4]
jmp 0x14001bcb1
test rdi, rdi
je 0x14001b898
lea rdx, [0x140107c7c]
mov r8d, 2
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll__wcsnicmp]
test eax, eax
sete al
mov byte [rdi + 0x17], al
lea eax, [rbx - 1]
cmp al, 5
ja 0x14001b8a4
cmp bl, 3
jne 0x14001b8ab
lea eax, [rbx + 0x66]
cmp al, 5
ja 0x14001b8af
mov dl, 1
jmp 0x14001b8b1
xor dl, dl
movzx ecx, byte [rsp + 0x490]
test cl, 0x30
je 0x14001b8c8
lea eax, [rbx - 0x41]
cmp al, 0x19
ja 0x14001b8c8
and cl, 0xcf
test dl, dl
je 0x14001bc5c
mov byte [r13], 2
jmp 0x14001bc5c
mov rcx, rsi
call fcn.140023d00
movzx ebp, ax
test ax, ax
jne 0x14001bc54
lea rdx, [rsp + 0x30]
mov r8b, 1
mov rcx, rsi
call fcn.14009ee10
mov ebp, eax
test ax, ax
jne 0x14001bc36
cmp byte [rsp + 0x4a0], r12b
je 0x14001bbd8
mov rdi, qword [0x140140268]
movzx eax, byte [rdi + 0x23]
test al, al
jne 0x14001b949
mov rcx, qword [rdi + 0x10]
lea rdx, [0x140107c84]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.1400e6e20
xor eax, eax
jmp 0x14001bcb1
lea r13, [0x140107c84]
cmp qword [rdi + 8], r13
jne 0x14001b95f
mov rbp, qword [rdi + 0x10]
shr rbp, 1
jmp 0x14001b964
mov ebp, 1
lea rcx, [rbp + 1]
lea rsi, [rcx + rcx]
cmp al, 2
jne 0x14001b982
mov rdx, rbp
mov rcx, r13
call fcn.140006bc0
xor eax, eax
jmp 0x14001bcb1
mov r8, qword [0x14013b0d0]
cmp rsi, r8
jbe 0x14001b9b5
cmp rsi, qword [rdi + 0x18]
jbe 0x14001b9b5
lea r8, [0x1401035ac]
lea rdx, [0x140124720]
lea rcx, [0x140143150]
call fcn.14005f7b0
xor eax, eax
jmp 0x14001bcb1
cmp rcx, 2
jae 0x14001b9d1
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 3]
call fcn.1400e74d0
xor eax, eax
jmp 0x14001bcb1
movzx eax, byte [rdi + 0x21]
test al, 2
je 0x14001b9ee
mov rcx, qword [rdi]
and al, 0x3d
mov byte [rdi + 0x21], al
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
mov r8, qword [0x14013b0d0]
mov r9, qword [rdi + 0x18]
and byte [rdi + 0x21], 0x82
cmp rsi, r9
jbe 0x14001bb65
movzx r10d, byte [rdi + 0x20]
movzx eax, r10b
cmp r10b, 1
jbe 0x14001ba27
cmp al, 2
je 0x14001ba64
mov rbx, qword [rsp + 0x498]
mov rax, qword [rsp + 0x498]
jmp 0x14001bb59
mov ebx, 0x80
cmp rsi, rbx
ja 0x14001ba64
cmp rsi, 8
ja 0x14001ba3e
mov ebx, 8
jmp 0x14001ba4a
mov eax, reloc.WSOCK32.dll_recv
cmp rsi, rax
cmovbe rbx, rax
mov rcx, rbx
call fcn.1400dd290
test rax, rax
je 0x14001bb8e
mov byte [rdi + 0x20], 1
jmp 0x14001bb59
cmp rsi, 0x20
jae 0x14001ba74
mov ebx, SafeArrayAllocDescriptor
jmp 0x14001bb1e
mov ebx, 0x208
cmp rsi, rbx
jb 0x14001bb1e
cmp rsi, 0x50000
jae 0x14001bada
pxor xmm0, xmm0
cvtsi2sd xmm0, rsi
test rsi, rsi
jns 0x14001baa1
addsd xmm0, qword [0x1401279a8]
mulsd xmm0, qword [0x1401279e0]
movsd xmm1, qword [0x1401279d8]
xor ecx, ecx
comisd xmm0, xmm1
jbe 0x14001bad0
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x14001bad0
movabs rax, 0x8000000000000000
mov rcx, rax
cvttsd2si rbx, xmm0
add rbx, rcx
jmp 0x14001bb1e
cmp rsi, 0x320000
jae 0x14001baec
lea rbx, [rsi + 0x8000]
jmp 0x14001bb1e
cmp rsi, 0xc80000
jae 0x14001bb17
movabs rax, 0x47ae147ae147ae15
mov rbx, rsi
mul rsi
sub rbx, rdx
shr rbx, 1
add rbx, rdx
shr rbx, 6
add rbx, rsi
jmp 0x14001bb1e
lea rbx, [rsi + 0x20000]
cmp rbx, r8
cmova rbx, r8
cmp r10b, 2
jne 0x14001bb3f
test r9, r9
je 0x14001bb3f
mov rcx, qword [rdi + 8]
mov sil, 1
call qword [sym.imp.MSVCR100.dll_free]
jmp 0x14001bb42
xor sil, sil
test rbx, rbx
js 0x14001bb95
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_malloc]
test rax, rax
je 0x14001bb95
mov byte [rdi + 0x20], 2
and byte [rdi + 0x21], 0x7f
mov qword [rdi + 8], rax
mov qword [rdi + 0x18], rbx
mov rcx, qword [rdi + 8]
cmp rcx, r13
je 0x14001bb7c
lea r8, [rbp + rbp]
mov rdx, r13
call qword [sym.imp.MSVCR100.dll_memmove]
mov rax, qword [rdi + 8]
lea rcx, [rbp + rbp]
mov word [rcx + rax], r12w
mov qword [rdi + 0x10], rcx
xor eax, eax
jmp 0x14001bcb1
test sil, sil
je 0x14001bbab
lea rax, [0x140141fa8]
mov qword [rdi + 0x18], r12
mov qword [rdi + 8], rax
jmp 0x14001bbb3
mov rax, qword [rdi + 8]
mov word [rax], r12w
lea r8, [0x1401035ac]
lea rdx, str.Out_of_memory.
lea rcx, [0x140143150]
mov qword [rdi + 0x10], r12
call fcn.14005f7b0
xor eax, eax
jmp 0x14001bcb1
cmp word [rsi + 2], r12w
jne 0x14001bbfc
cmp byte [0x140143d28], r12b
jne 0x14001bbfc
mov eax, 3
test rdi, rdi
cmove r12d, eax
mov eax, r12d
jmp 0x14001bcb1
test rdi, rdi
je 0x14001bc32
lea r8, [0x140107c88]
lea rcx, [rsp + 0x40]
mov r9, rsi
mov edx, 0x200
call fcn.1400e0640
lea rdx, [rsp + 0x40]
lea r8, [0x1401035ac]
lea rcx, [0x140143150]
call fcn.14005f7b0
xor eax, eax
jmp 0x14001bcb1
movsxd rbx, dword [rsp + 0x30]
inc dword [0x140140538]
lea rcx, [0x140140528]
mov byte [r13], 4
mov rax, rbx
mov byte [rbx + rcx], 1
movzx ecx, byte [rsp + 0x490]
test r14b, r14b
je 0x14001bc6f
test rdi, rdi
je 0x14001bcac
mov byte [rdi + 0x11], bl
mov word [rdi + 0xa], bp
jmp 0x14001bcac
test rdi, rdi
je 0x14001bcac
movzx eax, cl
mov byte [rdi + 0x10], bl
mov ebx, 8
and al, 0xd5
mov word [rdi + 8], bp
test al, 0xc0
cmovne r12d, ebx
test al, 0xc
je 0x14001bc93
or r12d, 1
test al, 0x30
je 0x14001bc9b
or r12d, 4
test al, 3
je 0x14001bca3
or r12d, 2
or dword [rdi], r12d
and cl, 0x2a
or byte [rdi + 0xe], cl
mov eax, 1
mov rbx, qword [rsp + 0x480]
add rsp, 0x440
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret