Function at 0x14003fca0
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 0x14003fce9
cmp byte [rcx + 0x64], dl
je 0x14003fce9
mov dil, 1
jmp 0x14003fcec
xor dil, dil
add rcx, 0x174
mov byte [rsp + 0x30], dil
mov rbp, rsi
mov qword [rsp + 0x38], rcx
cmp word [rsi], dx
je 0x140040099
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 0x14003fd78
cmp eax, 0x7d
je 0x14003fdbf
test dil, dil
je 0x14003fd41
inc r13d
jmp 0x14003fdbf
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.1400165a0
movzx edi, al
jmp 0x14003ff46
mov edx, ecx
lea rbx, [rbp + 2]
mov rcx, rbx
call fcn.1400aa318
mov r14, rax
test rax, rax
je 0x14003fdb0
mov rcx, rax
sub rcx, rbp
sar rcx, 1
sub rcx, 1
jne 0x14003fe4b
add r14, 2
cmp word [r14], 0x7d
je 0x14003fe51
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 0x14003fd20
mov r12, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x40]
test r13d, r13d
je 0x140040090
mov eax, dword [rbx + 0x30]
cmp r13d, eax
jbe 0x14004001b
test eax, eax
je 0x14003fe08
mov rcx, qword [rbx + 0x28]
call fcn.1400ae540
lea ecx, [r13*2 + 2]
call fcn.1400abf18
mov qword [rbx + 0x28], rax
test rax, rax
jne 0x140040017
lea r8, [0x1400cfffc]
lea rdx, str.Out_of_memory.
lea rcx, [0x140108310]
call fcn.1400393c0
add rsp, 0x60
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp rcx, 1
jne 0x14003fe66
test dil, dil
je 0x14003fe5e
inc r13d
jmp 0x14003fdb0
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.1400165a0
movzx edi, al
test al, al
je 0x14003ff25
movzx ebx, word [rbx]
test ebx, 0xffffff80
jne 0x14003febc
mov edx, 2
mov ecx, ebx
call fcn.1400ae954
test eax, eax
je 0x14003febc
and ebx, 0xffffffdf
cmp bx, 0x56
jne 0x14003feec
movzx ebx, word [rbp + 4]
test ebx, 0xffffff80
jne 0x14003fee1
mov edx, 2
mov ecx, ebx
call fcn.1400ae954
test eax, eax
je 0x14003fee1
and ebx, 0xffffffdf
cmp bx, 0x4b
jne 0x14003feec
mov r12b, 1
jmp 0x14003feef
xor r12b, r12b
mov rax, qword [rsp + 0xa0]
cmp qword [rax + 0x10], 0
je 0x14003ff31
test r12b, r12b
jne 0x14003ff31
mov dl, 1
movzx ecx, dil
call fcn.140016c40
movzx r15d, ax
test ax, ax
je 0x14003ff31
mov eax, 0x100
xor r15w, ax
xor dil, dil
jmp 0x14003ff31
mov rcx, rbx
call fcn.1400164a0
movzx r15d, ax
mov ebp, 0x7d
mov word [r14], bp
mov rbp, r14
movzx r14d, byte [rsp + 0xb8]
test dil, dil
je 0x14003ffe0
movzx ecx, word [rsp + 0x34]
test cx, cx
je 0x14003ff94
cmp byte [rsp + 0xb0], 0
je 0x14003ff94
call qword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x14003ff94
test byte [rsp + 0xa8], 0x30
mov rcx, qword [rsp + 0x38]
movzx edx, byte [rsp + 0xc0]
movzx eax, dil
je 0x14003ff8e
or byte [rax + rsi], 1
jmp 0x14003ffed
or byte [rax + rsi], 2
jmp 0x14003ffed
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 0x14003ffe8
test r12b, r12b
jne 0x14003ffe8
xor edx, edx
movzx ecx, dil
call fcn.140016c40
mov rcx, qword [rsp + 0x38]
movzx edx, byte [rsp + 0xc0]
test ax, ax
je 0x14003ffed
movzx eax, ax
and byte [rax + rcx], bl
jmp 0x14003ffed
movzx edx, byte [rsp + 0xc0]
mov rcx, qword [rsp + 0x38]
mov rbx, qword [rsp + 0xa0]
test r15w, r15w
je 0x14003fdb8
movzx eax, r15w
add rcx, rax
movzx eax, r14b
not al
and al, byte [rcx]
or al, dl
mov byte [rcx], al
jmp 0x14003fdb8
mov dword [rbx + 0x30], r13d
cmp word [rsi], 0
mov rbx, qword [rbx + 0x28]
je 0x140040089
mov ebp, 0x7d
nop word [rax + rax]
movzx eax, word [rsi]
cmp eax, 0x7b
je 0x140040045
cmp eax, ebp
je 0x14004007f
mov word [rbx], ax
add rbx, 2
jmp 0x14004007f
lea rdi, [rsi + 2]
mov edx, ebp
mov rcx, rdi
call fcn.1400aa318
test rax, rax
je 0x14004007f
cmp rax, rdi
jne 0x140040069
cmp word [rax + 2], bp
lea rcx, [rax + 2]
cmove rax, rcx
lea rcx, [rsi + 4]
cmp rax, rcx
jne 0x14004007c
movzx ecx, word [rdi]
mov word [rbx], cx
add rbx, 2
mov rsi, rax
add rsi, 2
cmp word [rsi], 0
jne 0x140040030
xor eax, eax
mov word [rbx], ax
jmp 0x1400400b8
movzx r8d, byte [rsp + 0xb0]
test r8b, r8b
je 0x1400400b8
cmp dword [rbx + 0x30], 0
je 0x1400400ad
mov rax, qword [rbx + 0x28]
mov word [rax], dx
jmp 0x1400400b8
lea rax, [0x1400cfffc]
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