Function at 0x14004c170
Capabilities:
Get keyboard layout

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x8010]
mov eax, 0x8110
call fcn.1400e37c0
sub rsp, rax
cmp word [rdx], 0
mov r12, r9
movzx r15d, r8b
mov r14, rdx
mov rdi, rcx
mov rbx, rdx
je case.0x14004c1db.34
movzx eax, word [rdx + 2]
test ax, ax
je case.0x14004c1db.34
lea rdx, [0x140000000]
cmp ax, 0x20
je case.0x14004c1db.34
movzx eax, word [rbx]
add eax, 0xffffffdf
cmp eax, 0x5d
ja case.0x14004c1db.34
cdqe
movzx eax, byte [rdx + rax + 0x4c854]
mov ecx, dword [rdx + rax*4 + 0x4c84c]
add rcx, rdx
jmp rcx
movzx eax, word [rbx + 4]
add rbx, 2
test ax, ax
jne 0x14004c1b6
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140024020
lea rdx, [0x14010c7b8]
mov rcx, rbx
movzx esi, al
call fcn.1400c53ac
lea ecx, [rsi - 1]
mov qword [rbp + 0x8068], rax
cmp cl, 5
ja 0x14004c22b
cmp sil, 3
jne 0x14004c233
lea ecx, [rsi + 0x66]
cmp cl, 5
ja 0x14004c237
mov cl, 1
jmp 0x14004c239
xor cl, cl
lea eax, [r15 - 1]
cmp al, 5
ja 0x14004c247
cmp r15b, 3
jne 0x14004c24f
lea eax, [r15 + 0x66]
cmp al, 5
ja 0x14004c253
mov al, 1
jmp 0x14004c255
xor al, al
mov byte [rbp + 0x8058], al
mov qword [rsp + 0x8150], r13
test cl, cl
jne 0x14004c270
test al, al
je 0x14004c270
mov r13b, 1
jmp 0x14004c273
xor r13b, r13b
add sil, 0x64
cmp sil, 3
jbe 0x14004c28c
lea eax, [r15 + 0x64]
mov byte [rbp + 0x8060], 0
cmp al, 3
ja 0x14004c293
mov byte [rbp + 0x8060], 1
mov rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp word [rbx + rax*2], 0
jne 0x14004c2a0
lea rsi, [0x140106cb0]
cmp rax, 1
jne 0x14004c2cb
movzx ecx, word [rbx]
call qword [sym.imp.USER32.dll_IsCharUpperW]
test eax, eax
lea rax, [0x140110184]
jne 0x14004c2ce
mov rax, rsi
cmp qword [rbp + 0x8068], 0
lea r9, [0x14010a640]
mov qword [rsp + 0x28], r14
lea r8, str._s_s_s
cmovne r9, rsi
mov qword [rsp + 0x20], rax
mov edx, SafeArrayAllocDescriptor
lea rcx, [rbp - 0x40]
call fcn.1400a5c90
movzx eax, word [r12]
cmp ax, 0x22
je 0x14004c32b
cmp ax, 0x60
je 0x14004c32b
mov r8d, SafeArrayAllocDescriptor
lea rcx, [rbp - 0x80]
mov rdx, r12
call fcn.1400d8b44
xor esi, esi
mov word [rbp - 0x42], si
jmp 0x14004c33e
mov ecx, 0x60
mov word [rbp - 0x7e], ax
xor esi, esi
mov word [rbp - 0x80], cx
mov word [rbp - 0x7c], si
mov rdx, qword [rbp + 0x8070]
lea rcx, [rsp + 0x40]
sub r12, rdx
mov eax, 8
sar r12, 1
lea rbx, [r12 + 1]
cmp rbx, rax
cmova rbx, rax
lea r8, [rbx - 1]
call fcn.1400d8b44
mov word [rsp + rbx*2 + 0x3e], si
cmp r15b, 0x13
jne 0x14004c39b
cmp word [rsp + 0x40], 0
jne 0x14004c39b
lea rdx, str.Pause
lea rcx, [rbp - 0x80]
call fcn.1400ca01c
test eax, eax
jne 0x14004c39b
mov eax, 4
jmp 0x14004c4a8
mov rcx, qword [rdi + 0x160]
test rcx, rcx
je 0x14004c449
mov rax, qword [rdi + 0x798]
movzx edx, byte [0x14013529c]
test rax, rax
je 0x14004c3e8
test dl, dl
je 0x14004c3e8
mov r8, rcx
mov qword [rsp + 0x28], rsi
mov rcx, rdi
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea rdx, str.Hotkey_or_hotstring_is_missing_its_opening_brace.
call fcn.14000fb70
mov esi, eax
jmp 0x14004c4a8
cmp byte [0x14013529f], 0
je 0x14004c42b
test dl, dl
jne 0x14004c42b
test rax, rax
je 0x14004c404
movzx r9d, word [rax + 2]
mov edx, dword [rax + 4]
jmp 0x14004c411
mov r9d, dword [rdi + 0x3b8]
mov edx, dword [rdi + 0x3bc]
mov dword [rsp + 0x20], edx
mov r8, rcx
lea rdx, str.Hotkey_or_hotstring_is_missing_its_opening_brace.
mov rcx, rdi
call fcn.14000fa20
mov eax, esi
jmp 0x14004c4a8
mov r9, rcx
mov qword [rsp + 0x20], rsi
mov rcx, rdi
lea rdx, str.Hotkey_or_hotstring_is_missing_its_opening_brace.
xor r8d, r8d
call fcn.140010b10
mov eax, esi
jmp 0x14004c4a8
xor r9d, r9d
lea rdx, str._Hotkey__ThisHotkey_
xor r8d, r8d
mov rcx, rdi
call fcn.1400541f0
test eax, eax
je 0x14004c4a6
mov rax, qword [0x14012c398]
mov rbx, qword [rax + 0x28]
test rbx, rbx
je 0x14004c4a6
lea r8, [rbp + 0x8068]
lea rdx, [rbp + 0x8070]
lea rcx, [rbp - 0x40]
call fcn.14001b820
test rax, rax
je 0x14004c4c2
movzx r8d, byte [rbp + 0x8070]
mov rdx, rbx
mov rcx, rax
call fcn.14001abc0
test rax, rax
jne 0x14004c4dd
xor eax, eax
mov r13, qword [rsp + 0x8150]
add rsp, 0x8110
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
movzx r9d, byte [rbp + 0x8070]
lea r8, [rbp - 0x40]
xor edx, edx
mov rcx, rbx
call fcn.14001a010
test rax, rax
je 0x14004c4a6
cmp byte [rbp + 0x8058], 0
lea rax, str.SetMouseDelay
lea r8, str.SetKeyDelay
cmovne r8, rax
lea rdx, [0x140110188]
lea rcx, [rbp]
call fcn.140006de0
movzx r12d, byte [rbp + 0x8060]
lea r15, [rbp]
movsxd rcx, eax
lea r15, [r15 + rcx*2]
test r13b, r13b
je 0x14004c53d
test r12b, r12b
jne 0x14004c53d
lea r8, [rbp - 0x80]
mov rcx, r15
lea rdx, str._GetKeyState___s__
call fcn.140006de0
movsxd rcx, eax
lea r15, [r15 + rcx*2]
movzx ecx, word [0x140133394]
lea rbx, [rsp + 0x50]
mov rax, qword [0x140133380]
mov r13d, 0x5e
mov r14, qword [rax + rcx*8 - 8]
test byte [r14 + 0xf], 1
je 0x14004c581
mov edx, r13d
lea rcx, [rsp + 0x40]
call fcn.1400c50a4
test rax, rax
jne 0x14004c581
mov dword [rsp + 0x50], 0x5e003c
lea rbx, [rsp + 0x54]
test byte [r14 + 0xf], 2
je 0x14004c5a4
mov edx, r13d
lea rcx, [rsp + 0x40]
call fcn.1400c50a4
test rax, rax
jne 0x14004c5a4
mov dword [rbx], 0x5e003e
add rbx, 4
test byte [r14 + 0xf], 4
mov r13d, SafeArrayAllocDescriptor
je 0x14004c5cd
mov edx, r13d
lea rcx, [rsp + 0x40]
call fcn.1400c50a4
test rax, rax
jne 0x14004c5cd
mov dword [rbx], 0x21003c
add rbx, 4
test byte [r14 + 0xf], 8
je 0x14004c5f0
mov edx, r13d
lea rcx, [rsp + 0x40]
call fcn.1400c50a4
test rax, rax
jne 0x14004c5f0
mov dword [rbx], 0x21003e
add rbx, 4
test byte [r14 + 0xf], 0x10
mov r13d, 0x2b
je 0x14004c619
mov edx, r13d
lea rcx, [rsp + 0x40]
call fcn.1400c50a4
test rax, rax
jne 0x14004c619
mov dword [rbx], 0x2b003c
add rbx, 4
test byte [r14 + 0xf], 0x20
je 0x14004c63c
mov edx, r13d
lea rcx, [rsp + 0x40]
call fcn.1400c50a4
test rax, rax
jne 0x14004c63c
mov dword [rbx], 0x2b003e
add rbx, 4
test byte [r14 + 0xf], 0x40
mov r13d, reloc.OLEAUT32.dll_SafeArrayAllocDescriptor
je 0x14004c665
mov edx, r13d
lea rcx, [rsp + 0x40]
call fcn.1400c50a4
test rax, rax
jne 0x14004c665
mov dword [rbx], 0x23003c
add rbx, 4
test byte [r14 + 0xf], 0x80
je 0x14004c688
mov edx, r13d
lea rcx, [rsp + 0x40]
call fcn.1400c50a4
test rax, rax
jne 0x14004c688
mov dword [rbx], 0x23003e
add rbx, 4
lea r9, [0x140106cb0]
mov word [rbx], si
test r12b, r12b
lea rax, str._DownR
lea r8, [rsp + 0x50]
mov rcx, r15
cmovne rax, r9
lea rdx, str.Send__Blind_s_s_s_s_s__
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call fcn.140006de0
xor r9d, r9d
mov byte [rsp + 0x20], 0
xor r8d, r8d
mov dl, 3
mov rcx, rdi
call fcn.1400525e0
test eax, eax
je 0x14004c4a6
xor r8d, r8d
lea rdx, [rbp]
mov rcx, rdi
call fcn.14004ff80
test eax, eax
je 0x14004c4a6
xor r9d, r9d
mov byte [rsp + 0x20], 0
xor r8d, r8d
mov dl, 4
mov rcx, rdi
call fcn.1400525e0
test eax, eax
je 0x14004c4a6
test r12b, r12b
jne 0x14004c841
lea r8, [rbp - 0x40]
lea rdx, str._s_up
lea rcx, [rbp]
call fcn.140006de0
xor r9d, r9d
lea rdx, str._Hotkey__ThisHotkey_
xor r8d, r8d
mov rcx, rdi
call fcn.1400541f0
test eax, eax
je 0x14004c4a6
mov rax, qword [0x14012c398]
mov rbx, qword [rax + 0x28]
test rbx, rbx
je 0x14004c4a6
lea r8, [rbp + 0x8070]
lea rdx, [rbp + 0x8060]
lea rcx, [rbp]
call fcn.14001b820
test rax, rax
je 0x14004c7a4
movzx r8d, byte [rbp + 0x8060]
mov rdx, rbx
mov rcx, rax
call fcn.14001abc0
test rax, rax
jne 0x14004c7c3
jmp 0x14004c4a6
movzx r9d, byte [rbp + 0x8060]
lea r8, [rbp]
xor edx, edx
mov rcx, rbx
call fcn.14001a010
test rax, rax
je 0x14004c4a6
cmp byte [rbp + 0x8058], 0
lea rcx, str.SetMouseDelay
lea r8, str.SetKeyDelay
cmovne r8, rcx
lea r9, [rbp - 0x80]
lea rcx, [rbp]
lea rdx, str._s__1__Send__Blind_s_Up___n
call fcn.140006de0
xor r9d, r9d
mov byte [rsp + 0x20], 0
xor r8d, r8d
mov dl, 3
mov rcx, rdi
call fcn.1400525e0
test eax, eax
je 0x14004c4a6
xor r8d, r8d
lea rdx, [rbp]
mov rcx, rdi
call fcn.14004ff80
test eax, eax
je 0x14004c4a6
xor r9d, r9d
mov byte [rsp + 0x20], 0
xor r8d, r8d
mov dl, 4
mov rcx, rdi
call fcn.1400525e0
test eax, eax
je 0x14004c4a6
mov eax, 1
jmp 0x14004c4a8