Function at 0x14003fe70
Capabilities:
Get keyboard layout

Disassembly:
mov byte [rsp + 0x20], r9b
mov byte [rsp + 0x18], r8b
push rbx
push rbp
push rdi
push r13
push r14
push r15
sub rsp, 0x68
mov rbp, rdx
mov qword [rsp + 0x48], rdx
xor edx, edx
movzx ebx, r8b
mov dword [rsp + 0x34], edx
mov r13, rcx
mov word [rsp + 0x3a], dx
movzx r15d, dx
mov edi, edx
test r8b, r8b
je 0x14003feb5
cmp byte [rcx + 0x64], dl
je 0x14003feb5
mov cl, 1
jmp 0x14003feb7
xor cl, cl
mov r14, rbp
mov byte [rsp + 0xa0], cl
cmp word [rbp], dx
je 0x140040335
movzx ebp, byte [rsp + 0xb8]
mov r8d, 0x7d
mov qword [rsp + 0x60], rsi
movzx esi, byte [rsp + 0xc0]
mov qword [rsp + 0x58], r12
movzx r12d, byte [rsp + 0xb0]
mov word [rsp + 0x38], dx
movzx eax, word [r14]
cmp eax, 0x7b
je 0x1400400d9
cmp eax, 0x7d
je 0x14004003c
test cl, cl
je 0x14003ff1e
inc edi
mov dword [rsp + 0x34], edi
jmp 0x14004003c
xor ecx, ecx
mov word [rsp + 0x38], ax
mov byte [rsp + 0xa8], 0
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov r8, rax
movzx eax, word [rsp + 0x38]
test ax, ax
je 0x14003fffe
cmp word [rsp + 0x3a], 0
jne 0x14003ff67
mov r9b, 1
lea rdx, [rsp + 0xa8]
movzx ecx, ax
call fcn.1400167c0
movzx edi, al
jmp 0x14004021c
movzx ebx, ax
test ebx, 0xffffff80
jne 0x14003ff85
mov edx, 2
mov ecx, ebx
call fcn.1400ad944
test eax, eax
je 0x14003ff85
and ebx, 0xffffffdf
cmp bx, 0x56
jne 0x14003ffc7
movzx ecx, word [rsp + 0x3a]
call fcn.14000ae80
cmp ax, 0x4b
jne 0x14003ffc7
mov r8d, reloc.OLEAUT32.dll_SafeArrayGetDim
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x3c]
call fcn.1400aee64
xor ecx, ecx
mov edi, ecx
movzx ecx, al
mov rax, qword [rsp + 0x40]
cmp word [rax], di
cmove edi, ecx
jmp 0x140040214
xor ecx, ecx
lea rbx, str.Numpad0
mov edi, ecx
mov rcx, qword [rbx]
lea rdx, [rsp + 0x38]
call fcn.1400ab8c0
test eax, eax
je 0x1400400c4
inc rdi
lea rax, [0x140101210]
add rbx, 0x10
cmp rbx, rax
jl 0x14003ffd2
mov edi, dword [rsp + 0x34]
test r15w, r15w
jne 0x14004000b
cmp byte [rsp + 0x30], r15b
je 0x140040026
movzx eax, r15w
lea rcx, [r13 + 0x174]
add rcx, rax
movzx eax, bpl
not al
and al, byte [rcx]
or al, sil
mov byte [rcx], al
movzx ecx, byte [rsp + 0xa0]
movzx ebx, byte [rsp + 0xb0]
xor edx, edx
lea r8d, [rdx + 0x7d]
movzx esi, byte [rsp + 0xc0]
add r14, 2
cmp word [r14], 0
jne 0x14003fef4
mov r12, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x48]
test edi, edi
je 0x140040335
mov eax, dword [r13 + 0x30]
cmp edi, eax
jbe 0x1400402be
test eax, eax
je 0x140040083
mov rcx, qword [r13 + 0x28]
call fcn.1400ad530
lea ecx, [rdi*2 + 2]
call fcn.1400aba38
mov qword [r13 + 0x28], rax
test rax, rax
jne 0x1400402ba
lea r8, [0x1400cef3c]
lea rdx, str.Out_of_memory.
lea rcx, [0x1401072b0]
call fcn.1400395f0
add rsp, 0x68
pop r15
pop r14
pop r13
pop rdi
pop rbp
pop rbx
ret
shl rdi, 4
lea rax, str.Numpad0
movzx edi, byte [rdi + rax + 8]
jmp 0x140040214
lea rbx, [r14 + 2]
mov edx, r8d
mov rcx, rbx
call fcn.1400a9e38
mov rsi, rax
test rax, rax
je 0x140040026
sub rax, r14
sar rax, 1
sub rax, 1
jne 0x140040110
add rsi, 2
cmp word [rsi], 0x7d
jne 0x140040026
jmp 0x140040116
cmp rax, 1
jne 0x140040135
movzx ecx, byte [rsp + 0xa0]
test cl, cl
je 0x14004012d
inc edi
mov dword [rsp + 0x34], edi
jmp 0x14004002e
movzx eax, word [rbx]
mov word [rsp + 0x38], ax
xor ecx, ecx
mov word [rsi], cx
mov byte [rsp + 0x30], cl
mov byte [rsp + 0xa8], cl
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov r8b, 1
lea rdx, [rsp + 0xa8]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140016650
movzx edi, al
test al, al
je 0x1400401ee
movzx ebx, word [rbx]
test ebx, 0xffffff80
jne 0x14004018c
mov edx, 2
mov ecx, ebx
call fcn.1400ad944
test eax, eax
je 0x14004018c
and ebx, 0xffffffdf
cmp bx, 0x56
jne 0x1400401bd
movzx ebx, word [r14 + 4]
test ebx, 0xffffff80
jne 0x1400401b2
mov edx, 2
mov ecx, ebx
call fcn.1400ad944
test eax, eax
je 0x1400401b2
and ebx, 0xffffffdf
cmp bx, 0x4b
jne 0x1400401bd
mov r12b, 1
jmp 0x1400401c0
xor r12b, r12b
cmp qword [r13 + 0x10], 0
je 0x1400401ff
test r12b, r12b
jne 0x1400401ff
mov dl, 1
movzx ecx, dil
call fcn.140016d00
movzx r15d, ax
test ax, ax
je 0x1400401ff
mov eax, 0x100
xor r15w, ax
xor dil, dil
jmp 0x1400401ff
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.140016540
movzx r15d, ax
mov r14d, 0x7d
mov word [rsi], r14w
mov r14, rsi
movzx esi, byte [rsp + 0xc0]
movzx ebx, byte [rsp + 0xb0]
test dil, dil
je 0x14003fffa
movzx ecx, word [rsp + 0x38]
test cx, cx
je 0x140040265
test bl, bl
je 0x140040265
call qword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x140040265
test byte [rsp + 0xa8], 0x30
movzx eax, dil
mov edi, dword [rsp + 0x34]
je 0x14004025a
or byte [rax + r13 + 0x74], 1
jmp 0x14003fffe
or byte [rax + r13 + 0x74], 2
jmp 0x14003fffe
movzx eax, dil
lea rcx, [r13 + 0x74]
add rcx, rax
movzx ebx, bpl
not bl
movzx eax, bl
and al, byte [rcx]
or al, sil
mov byte [rcx], al
test bpl, bpl
je 0x14003fffa
test r12b, r12b
jne 0x14003fffa
xor edx, edx
movzx ecx, dil
call fcn.140016d00
mov edi, dword [rsp + 0x34]
test ax, ax
je 0x14003fffe
movzx eax, ax
and byte [rax + r13 + 0x174], bl
jmp 0x14003fffe
mov dword [r13 + 0x30], edi
cmp word [rbp], 0
mov rbx, qword [r13 + 0x28]
je 0x14004032e
mov r14d, 0x7d
nop
movzx eax, word [rbp]
cmp eax, 0x7b
je 0x1400402e7
cmp eax, r14d
je 0x140040323
mov word [rbx], ax
add rbx, 2
jmp 0x140040323
lea rdi, [rbp + 2]
mov edx, r14d
mov rcx, rdi
call fcn.1400a9e38
test rax, rax
je 0x140040323
cmp rax, rdi
jne 0x14004030d
cmp word [rax + 2], r14w
lea rcx, [rax + 2]
cmove rax, rcx
lea rcx, [rbp + 4]
cmp rax, rcx
jne 0x140040320
movzx ecx, word [rdi]
mov word [rbx], cx
add rbx, 2
mov rbp, rax
add rbp, 2
cmp word [rbp], 0
jne 0x1400402d0
xor ecx, ecx
mov word [rbx], cx
jmp 0x140040354
test bl, bl
je 0x140040354
cmp dword [r13 + 0x30], 0
je 0x140040349
mov rax, qword [r13 + 0x28]
mov word [rax], dx
jmp 0x140040354
lea rax, [0x1400cef3c]
mov qword [r13 + 0x28], rax
mov eax, 1
add rsp, 0x68
pop r15
pop r14
pop r13
pop rdi
pop rbp
pop rbx
ret