Function at 0x14006aa80
Capabilities:
Get keyboard layout

Disassembly:
mov byte [rsp + 0x20], r9b
mov byte [rsp + 0x18], r8b
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x68
mov r14, rdx
movzx esi, r8b
xor edx, edx
mov r13, rcx
mov dword [rsp + 0x38], edx
movzx ebp, dx
mov word [rsp + 0x36], dx
mov edi, edx
test r8b, r8b
je 0x14006aac4
cmp byte [rcx + 0x65], dl
je 0x14006aac4
mov cl, 1
jmp 0x14006aac6
xor cl, cl
mov r15, r14
mov byte [rsp + 0xa0], cl
mov qword [rsp + 0x60], rbx
cmp word [r14], dx
je 0x14006af53
movzx r14d, byte [rsp + 0xb8]
mov r8d, 0x7d
mov qword [rsp + 0x58], r12
movzx r12d, byte [rsp + 0xb0]
nop dword [rax]
mov word [rsp + 0x34], dx
movzx eax, word [r15]
cmp ax, 0x7b
je 0x14006ac51
cmp ax, 0x7d
je 0x14006ae4d
test cl, cl
je 0x14006ab2c
inc edi
mov dword [rsp + 0x38], edi
jmp 0x14006ae4d
xor ecx, ecx
mov word [rsp + 0x34], ax
mov byte [rsp + 0x30], 0
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp word [rsp + 0x34], 0
jne 0x14006ab4e
xor dil, dil
jmp 0x14006ad91
cmp word [rsp + 0x36], 0
jne 0x14006ab73
movzx ecx, word [rsp + 0x34]
lea rdx, [rsp + 0x30]
mov r9b, 1
mov r8, rax
call fcn.1400254c0
movzx edi, al
jmp 0x14006ad91
movzx ebx, word [rsp + 0x34]
mov ecx, ebx
test ebx, 0xffffff80
jne 0x14006ab9b
mov edx, 2
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
test eax, eax
je 0x14006ab9b
mov edi, 0xffdf
and bx, di
jmp 0x14006aba0
mov edi, 0xffdf
cmp bx, 0x56
jne 0x14006abfa
movzx ebx, word [rsp + 0x36]
mov ecx, ebx
test ebx, 0xffffff80
jne 0x14006abc7
mov edx, 2
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
test eax, eax
je 0x14006abc7
and bx, di
cmp bx, 0x4b
jne 0x14006abfa
mov r8d, reloc.WSOCK32.dll_recv
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x38]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstol]
xor ecx, ecx
mov edi, ecx
movzx ecx, al
mov rax, qword [rsp + 0x40]
cmp word [rax], di
cmove edi, ecx
jmp 0x14006ad91
xor ecx, ecx
lea rbx, str.Numpad0
mov edi, ecx
nop word [rax + rax]
mov rcx, qword [rbx]
lea rdx, [rsp + 0x34]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x14006ac3d
inc rdi
lea rax, [0x14012fa00]
add rbx, 0x10
cmp rbx, rax
jl 0x14006ac10
xor dil, dil
jmp 0x14006ad91
add rdi, rdi
lea rax, str.Numpad0
movzx edi, byte [rax + rdi*8 + 8]
jmp 0x14006ad91
lea rbx, [r15 + 2]
mov edx, r8d
mov rcx, rbx
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
mov rsi, rax
test rax, rax
je 0x14006ae3d
sub rax, r15
sar rax, 1
sub rax, 1
jne 0x14006ac89
add rsi, 2
cmp word [rsi], 0x7d
jne 0x14006ae3d
jmp 0x14006ac8f
cmp rax, 1
jne 0x14006acae
movzx ecx, byte [rsp + 0xa0]
test cl, cl
je 0x14006aca6
inc edi
mov dword [rsp + 0x38], edi
jmp 0x14006ae45
movzx eax, word [rbx]
mov word [rsp + 0x34], ax
xor ecx, ecx
mov word [rsi], cx
mov byte [rsp + 0x31], cl
mov byte [rsp + 0x30], cl
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov r8b, 1
lea rdx, [rsp + 0x30]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140025360
movzx edi, al
test al, al
je 0x14006ad71
movzx ebx, word [rbx]
mov ecx, ebx
test ebx, 0xffffff80
jne 0x14006ad09
mov edx, 2
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
test eax, eax
je 0x14006ad09
mov r12d, 0xffdf
and bx, r12w
jmp 0x14006ad0f
mov r12d, 0xffdf
cmp bx, 0x56
jne 0x14006ad42
movzx ebx, word [r15 + 4]
mov ecx, ebx
test ebx, 0xffffff80
jne 0x14006ad37
mov edx, 2
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
test eax, eax
je 0x14006ad37
and bx, r12w
cmp bx, 0x4b
jne 0x14006ad42
mov r12b, 1
jmp 0x14006ad45
xor r12b, r12b
cmp qword [r13 + 0x10], 0
je 0x14006ad81
test r12b, r12b
jne 0x14006ad81
mov dl, 1
movzx ecx, dil
call fcn.140026220
movzx ebp, ax
test ax, ax
je 0x14006ad81
mov eax, 0x100
xor bp, ax
xor dil, dil
jmp 0x14006ad81
lea rdx, [rsp + 0x31]
mov rcx, rbx
call fcn.140025240
movzx ebp, ax
mov word [rsi], 0x7d
mov r15, rsi
movzx esi, byte [rsp + 0xb0]
test dil, dil
je 0x14006ae0a
movzx ecx, word [rsp + 0x34]
test cx, cx
je 0x14006adc4
test sil, sil
je 0x14006adc4
call qword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x14006adc4
test byte [rsp + 0x30], 0x30
movzx ecx, dil
sete al
inc al
or byte [rcx + r13 + 0x74], al
jmp 0x14006ae0a
movzx edx, byte [rsp + 0xc0]
movzx ebx, r14b
movzx ecx, dil
not bl
movzx eax, bl
and al, byte [rcx + r13 + 0x74]
or al, dl
mov byte [rcx + r13 + 0x74], al
test r14b, r14b
je 0x14006ae12
test r12b, r12b
jne 0x14006ae12
xor edx, edx
movzx ecx, dil
call fcn.140026220
test ax, ax
je 0x14006ae0a
movzx eax, ax
and byte [rax + r13 + 0x174], bl
movzx edx, byte [rsp + 0xc0]
test bp, bp
jne 0x14006ae1e
cmp byte [rsp + 0x31], bpl
je 0x14006ae39
movzx ecx, bp
movzx eax, r14b
not al
and al, byte [rcx + r13 + 0x174]
or al, dl
mov byte [rcx + r13 + 0x174], al
mov edi, dword [rsp + 0x38]
movzx ecx, byte [rsp + 0xa0]
xor edx, edx
mov r8d, 0x7d
movzx esi, byte [rsp + 0xb0]
add r15, 2
cmp word [r15], 0
jne 0x14006ab00
mov r12, qword [rsp + 0x58]
mov r14, qword [rsp + 0xa8]
test edi, edi
je 0x14006af4b
mov eax, dword [r13 + 0x30]
cmp edi, eax
jbe 0x14006aec8
test eax, eax
je 0x14006ae8f
mov rcx, qword [r13 + 0x28]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [rdi*2 + 2]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [r13 + 0x28], rax
test rax, rax
jne 0x14006aec4
lea r8, [0x1400f97e4]
lea rdx, str.Out_of_memory.
lea rcx, [0x140136060]
call fcn.140064aa0
jmp 0x14006af78
mov dword [r13 + 0x30], edi
movzx eax, word [r14]
mov rbx, qword [r13 + 0x28]
test ax, ax
je 0x14006af44
mov r15d, 0x7d
nop dword [rax + rax]
cmp ax, 0x7b
je 0x14006aef9
cmp ax, r15w
je 0x14006af36
movzx eax, word [r14]
mov word [rbx], ax
add rbx, 2
jmp 0x14006af36
lea rdi, [r14 + 2]
mov edx, r15d
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
test rax, rax
je 0x14006af36
cmp rax, rdi
jne 0x14006af20
cmp word [rax + 2], r15w
lea rcx, [rax + 2]
cmove rax, rcx
lea rcx, [r14 + 4]
cmp rax, rcx
jne 0x14006af33
movzx ecx, word [rdi]
mov word [rbx], cx
add rbx, 2
mov r14, rax
movzx eax, word [r14 + 2]
add r14, 2
test ax, ax
jne 0x14006aee0
xor ecx, ecx
mov word [rbx], cx
jmp 0x14006af73
movzx esi, byte [rsp + 0xb0]
test sil, sil
je 0x14006af73
cmp dword [r13 + 0x30], 0
je 0x14006af68
mov rax, qword [r13 + 0x28]
mov word [rax], dx
jmp 0x14006af73
lea rax, [0x1400f97e4]
mov qword [r13 + 0x28], rax
mov eax, 1
mov rbx, qword [rsp + 0x60]
add rsp, 0x68
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret