Function at 0x14001cab0
Capabilities:
Get keyboard layout

Disassembly:
push rsi
push r12
push r15
sub rsp, 0x60
mov rsi, r8
mov r12, rdx
mov r15d, ecx
test r8, r8
jne 0x14001cad4
xor eax, eax
add rsp, 0x60
pop r15
pop r12
pop rsi
ret
mov qword [rsp + 0x58], rdi
mov edi, dword [r8]
call fcn.14001bfd0
test r15d, r15d
js 0x14001cfaf
cmp edi, 0xe7
je 0x14001cfaf
mov qword [rsp + 0x80], rbx
call fcn.14001c270
mov ecx, dword [0x1401257e0]
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov rbx, rax
mov rax, qword [0x1401256c0]
cmp rbx, rax
je 0x14001cb30
cmp rbx, qword [0x1401256b8]
cmovne rax, rbx
mov qword [0x1401256c0], rax
mov rcx, rsi
call fcn.14001bbf0
test eax, eax
jne 0x14001cf84
mov rcx, rsi
call fcn.14001b9a0
test eax, eax
jne 0x14001cf84
mov rax, qword [0x1401256c8]
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x50], r14
cmp dword [rax], 0
jne 0x14001cc77
cmp dword [rax + 0x10], 0
je 0x14001cb7d
cmp dword [rax + 0x18], 0
jne 0x14001cc77
test r15d, r15d
jne 0x14001ce4b
test byte [rsi + 8], 0x80
jne 0x14001ce4b
mov rax, qword [0x1401256b8]
cmp rbx, rax
jne 0x14001ce4b
test rbx, rbx
je 0x14001ce4b
mov rbp, qword [0x1401256c0]
xor r14d, r14d
cmp dword [0x14012588c], r14d
je 0x14001cbe6
test rbp, rbp
je 0x14001cbf0
cmp rbp, rax
je 0x14001cbe6
xor edx, edx
mov rcx, rbp
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov rax, qword [0x1401256b8]
mov rbp, qword [0x1401256c0]
mov dword [0x14012588c], r14d
test rbp, rbp
je 0x14001cbf0
cmp rbp, rax
jne 0x14001cbf7
mov rbp, qword [0x1401256b0]
mov edx, dword [rsi + 4]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r8, [0x1401256d0]
mov ecx, edi
mov dword [rsp + 0x20], r14d
call qword [sym.imp.USER32.dll_ToAsciiEx]
mov edx, dword [rsi + 4]
lea r9, [rsp + 0x90]
lea r8, [0x1401256d0]
mov qword [rsp + 0x28], rbp
mov ecx, edi
mov dword [rsp + 0x20], r14d
mov ebx, eax
call qword [sym.imp.USER32.dll_ToAsciiEx]
cmp ebx, 1
jne 0x14001ce4b
cmp eax, ebx
jne 0x14001ce4b
movzx eax, byte [rsp + 0x90]
cmp byte [rsp + 0x30], al
je 0x14001ce4b
mov edx, ebx
lea rcx, [rsp + 0x90]
call fcn.14001d970
mov eax, ebx
jmp 0x14001ce61
test r15d, r15d
jne 0x14001ce4b
test byte [rsi + 8], 0x80
jne 0x14001ce4b
mov eax, dword [rax + 0x840]
xor r14d, r14d
sub eax, 4
cmp eax, 1
jbe 0x14001ccba
cmp dword [0x14012588c], r14d
je 0x14001ccba
mov rcx, qword [0x1401256c0]
xor edx, edx
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov dword [0x14012588c], r14d
movzx edx, byte [0x1401257e9]
movzx eax, byte [0x1401257ea]
test dl, dl
jne 0x14001ccd9
test al, al
jne 0x14001ccd9
cmp byte [0x1401257ee], r14b
je 0x14001cd05
cmp rbx, qword [0x1401256b0]
movzx ecx, byte [0x140112260]
je 0x14001cf62
test dl, dl
je 0x14001cf62
test al, al
je 0x14001cf62
test cl, cl
je 0x14001cf62
mov edx, dword [rsi + 4]
lea r9, [rsp + 0x98]
mov qword [rsp + 0x28], rbx
lea r8, [0x1401256d0]
mov ecx, edi
mov dword [rsp + 0x20], r14d
call qword [sym.imp.USER32.dll_ToAsciiEx]
mov ebp, eax
cmp eax, 1
jne 0x14001cdab
mov rcx, qword [0x1401256b0]
test rcx, rcx
je 0x14001cdab
mov rax, qword [0x1401256b8]
test rax, rax
je 0x14001cdab
cmp byte [0x1401257e9], r14b
jne 0x14001cdab
cmp byte [0x1401257ea], r14b
jne 0x14001cdab
cmp rbx, rax
jne 0x14001cdab
mov edx, dword [rsi + 4]
lea r9, [rsp + 0x90]
mov qword [rsp + 0x28], rcx
lea r8, [0x1401256d0]
mov ecx, edi
mov dword [rsp + 0x20], r14d
call qword [sym.imp.USER32.dll_ToAsciiEx]
cmp eax, ebp
jne 0x14001cdab
movzx eax, word [rsp + 0x90]
movzx edx, word [rsp + 0x98]
cmp al, dl
je 0x14001cdb3
movzx edx, ax
mov word [rsp + 0x98], ax
mov r14d, ebp
jmp 0x14001cdb3
movzx edx, word [rsp + 0x98]
cmp byte [0x140124e65], 0
je 0x14001ce1c
cmp edi, 8
je 0x14001cee8
movzx eax, byte [0x140112261]
cmp edi, eax
je 0x14001cee8
movzx ecx, byte [0x140112262]
cmp edi, ecx
je 0x14001cee8
cmp qword [0x1401278f8], 0x80
jae 0x14001cee8
test ebp, ebp
mov byte [rsp + 0x38], dl
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x40], rdi
lea rcx, [0x1401278d8]
sets byte [rsp + 0x48]
call fcn.140022b40
mov eax, 1
jmp 0x14001ce61
test ebp, ebp
js 0x14001ce85
cmp ebp, 1
je 0x14001ce85
lea eax, [rdi - 0x10]
cmp eax, 2
jbe 0x14001ce4b
lea eax, [rdi - 0xa0]
cmp eax, 5
jbe 0x14001ce4b
cmp edi, 0x2d
je 0x14001ce4b
cmp byte [0x140112260], 0
je 0x14001ce4b
call fcn.14001d4e0
mov r9, rsi
mov r8, r12
mov edx, r15d
mov rcx, qword [0x140124e68]
call qword [sym.imp.USER32.dll_CallNextHookEx]
mov rbp, qword [rsp + 0x88]
mov r14, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x80]
mov rdi, qword [rsp + 0x58]
add rsp, 0x60
pop r15
pop r12
pop rsi
ret
lea eax, [rdi - 0x60]
mov byte [rsp + 0x90], dl
lea rcx, [0x140125890]
cmp eax, 9
ja 0x14001cea8
movzx edx, dl
call fcn.1400bf6b0
jmp 0x14001cf2e
mov dword [0x1401256a4], 0x400
lea rax, [0x1401256a8]
cmp edi, 8
jne 0x14001cef5
lea r9, [0x1401256a4]
mov qword [rsp + 0x20], rax
lea r8, [0x140124ea0]
lea rdx, [0x1401256a0]
call fcn.1400bf870
mov eax, dword [0x1401256a0]
cmp eax, 1
jne 0x14001cf22
mov r9, rsi
mov r8, r12
xor edx, edx
jmp 0x14001ce54
mov qword [rsp + 0x28], rax
lea r9, [0x140124ea0]
lea rax, [0x1401256a4]
movzx edx, dl
lea r8, [0x1401256a0]
mov qword [rsp + 0x20], rax
call fcn.1400bf7f0
mov eax, dword [0x1401256a0]
test eax, eax
jne 0x14001cf53
cmp dword [0x1401256a4], eax
jne 0x14001cf53
test r14d, r14d
je 0x14001ce4b
mov edx, 1
lea rcx, [rsp + 0x90]
call fcn.14001d970
mov eax, 1
jmp 0x14001ce61
call fcn.14001d1c0
mov eax, 1
jmp 0x14001ce61
lea eax, [rdi - 0x11]
cmp eax, 1
jbe 0x14001ce4b
lea eax, [rdi - 0xa2]
cmp eax, 3
jbe 0x14001ce4b
test cl, cl
jmp 0x14001ce44
test byte [rsi + 8], 0x80
je 0x14001cfa5
mov rcx, qword [0x140124e68]
mov r9, rsi
mov r8, r12
mov edx, r15d
call qword [sym.imp.USER32.dll_CallNextHookEx]
jmp 0x14001ce6e
mov eax, 1
jmp 0x14001ce6e
mov rcx, qword [0x140124e68]
mov r9, rsi
mov r8, r12
mov edx, r15d
call qword [sym.imp.USER32.dll_CallNextHookEx]
mov rdi, qword [rsp + 0x58]
add rsp, 0x60
pop r15
pop r12
pop rsi
ret