Function at 0x14003fe40
Capabilities:
Get keyboard layout

Disassembly:
mov byte [rsp + 0x20], r9b
mov byte [rsp + 0x18], r8b
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x60
mov rsi, rdx
mov qword [rsp + 0x40], rdx
xor edx, edx
movzx r14d, r9b
mov word [rsp + 0x36], dx
mov rbx, rcx
movzx r15d, dx
mov r13d, edx
test r8b, r8b
je 0x14003fe89
cmp byte [rcx + 0x64], dl
je 0x14003fe89
mov dil, 1
jmp 0x14003fe8c
xor dil, dil
add rcx, 0x174
mov byte [rsp + 0x30], dil
mov rbp, rsi
mov qword [rsp + 0x38], rcx
cmp word [rsi], dx
je 0x140040239
mov qword [rsp + 0x58], r12
lea rsi, [rbx + 0x74]
movzx r12d, byte [rsp + 0xb0]
mov ecx, 0x7d
mov word [rsp + 0x34], dx
movzx eax, word [rbp]
cmp eax, 0x7b
je 0x14003ff18
cmp eax, 0x7d
je 0x14003ff5f
test dil, dil
je 0x14003fee1
inc r13d
jmp 0x14003ff5f
xor ecx, ecx
mov word [rsp + 0x34], ax
mov byte [rsp + 0xa8], 0
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov r8b, 1
lea rdx, [rsp + 0xa8]
lea rcx, [rsp + 0x34]
mov qword [rsp + 0x20], rax
call fcn.140016640
movzx edi, al
jmp 0x1400400e6
mov edx, ecx
lea rbx, [rbp + 2]
mov rcx, rbx
call fcn.1400a9d38
mov r14, rax
test rax, rax
je 0x14003ff50
mov rcx, rax
sub rcx, rbp
sar rcx, 1
sub rcx, 1
jne 0x14003ffeb
add r14, 2
cmp word [r14], 0x7d
je 0x14003fff1
mov rbx, qword [rsp + 0xa0]
mov ecx, 0x7d
xor edx, edx
movzx edi, byte [rsp + 0x30]
add rbp, 2
movzx r14d, byte [rsp + 0xb8]
cmp word [rbp], 0
jne 0x14003fec0
mov r12, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x40]
test r13d, r13d
je 0x140040230
mov eax, dword [rbx + 0x30]
cmp r13d, eax
jbe 0x1400401bb
test eax, eax
je 0x14003ffa8
mov rcx, qword [rbx + 0x28]
call fcn.1400ad430
lea ecx, [r13*2 + 2]
call fcn.1400ab938
mov qword [rbx + 0x28], rax
test rax, rax
jne 0x1400401b7
lea r8, [0x1400cef3c]
lea rdx, str.Out_of_memory.
lea rcx, [0x1401072b0]
call fcn.1400395c0
add rsp, 0x60
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp rcx, 1
jne 0x140040006
test dil, dil
je 0x14003fffe
inc r13d
jmp 0x14003ff50
movzx eax, word [rbx]
mov word [rsp + 0x34], ax
xor eax, eax
xor ecx, ecx
mov word [r14], ax
mov byte [rsp + 0xa8], al
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov r8b, 1
lea rdx, [rsp + 0xa8]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140016640
movzx edi, al
test al, al
je 0x1400400c5
movzx ebx, word [rbx]
test ebx, 0xffffff80
jne 0x14004005c
mov edx, 2
mov ecx, ebx
call fcn.1400ad844
test eax, eax
je 0x14004005c
and ebx, 0xffffffdf
cmp bx, 0x56
jne 0x14004008c
movzx ebx, word [rbp + 4]
test ebx, 0xffffff80
jne 0x140040081
mov edx, 2
mov ecx, ebx
call fcn.1400ad844
test eax, eax
je 0x140040081
and ebx, 0xffffffdf
cmp bx, 0x4b
jne 0x14004008c
mov r12b, 1
jmp 0x14004008f
xor r12b, r12b
mov rax, qword [rsp + 0xa0]
cmp qword [rax + 0x10], 0
je 0x1400400d1
test r12b, r12b
jne 0x1400400d1
mov dl, 1
movzx ecx, dil
call fcn.140016ce0
movzx r15d, ax
test ax, ax
je 0x1400400d1
mov eax, 0x100
xor r15w, ax
xor dil, dil
jmp 0x1400400d1
mov rcx, rbx
call fcn.140016540
movzx r15d, ax
mov ebp, 0x7d
mov word [r14], bp
mov rbp, r14
movzx r14d, byte [rsp + 0xb8]
test dil, dil
je 0x140040180
movzx ecx, word [rsp + 0x34]
test cx, cx
je 0x140040134
cmp byte [rsp + 0xb0], 0
je 0x140040134
call qword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x140040134
test byte [rsp + 0xa8], 0x30
mov rcx, qword [rsp + 0x38]
movzx edx, byte [rsp + 0xc0]
movzx eax, dil
je 0x14004012e
or byte [rax + rsi], 1
jmp 0x14004018d
or byte [rax + rsi], 2
jmp 0x14004018d
movzx edx, byte [rsp + 0xc0]
movzx ebx, r14b
movzx ecx, dil
not bl
movzx eax, byte [rcx + rsi]
and al, bl
or al, dl
mov byte [rcx + rsi], al
test r14b, r14b
je 0x140040188
test r12b, r12b
jne 0x140040188
xor edx, edx
movzx ecx, dil
call fcn.140016ce0
mov rcx, qword [rsp + 0x38]
movzx edx, byte [rsp + 0xc0]
test ax, ax
je 0x14004018d
movzx eax, ax
and byte [rax + rcx], bl
jmp 0x14004018d
movzx edx, byte [rsp + 0xc0]
mov rcx, qword [rsp + 0x38]
mov rbx, qword [rsp + 0xa0]
test r15w, r15w
je 0x14003ff58
movzx eax, r15w
add rcx, rax
movzx eax, r14b
not al
and al, byte [rcx]
or al, dl
mov byte [rcx], al
jmp 0x14003ff58
mov dword [rbx + 0x30], r13d
cmp word [rsi], 0
mov rbx, qword [rbx + 0x28]
je 0x140040229
mov ebp, 0x7d
nop word [rax + rax]
movzx eax, word [rsi]
cmp eax, 0x7b
je 0x1400401e5
cmp eax, ebp
je 0x14004021f
mov word [rbx], ax
add rbx, 2
jmp 0x14004021f
lea rdi, [rsi + 2]
mov edx, ebp
mov rcx, rdi
call fcn.1400a9d38
test rax, rax
je 0x14004021f
cmp rax, rdi
jne 0x140040209
cmp word [rax + 2], bp
lea rcx, [rax + 2]
cmove rax, rcx
lea rcx, [rsi + 4]
cmp rax, rcx
jne 0x14004021c
movzx ecx, word [rdi]
mov word [rbx], cx
add rbx, 2
mov rsi, rax
add rsi, 2
cmp word [rsi], 0
jne 0x1400401d0
xor eax, eax
mov word [rbx], ax
jmp 0x140040258
movzx r8d, byte [rsp + 0xb0]
test r8b, r8b
je 0x140040258
cmp dword [rbx + 0x30], 0
je 0x14004024d
mov rax, qword [rbx + 0x28]
mov word [rax], dx
jmp 0x140040258
lea rax, [0x1400cef3c]
mov qword [rbx + 0x28], rax
mov eax, 1
add rsp, 0x60
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret