Function at 0x14005e7e0
Capabilities:
Get keyboard layout

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x250
mov rbx, qword [0x140119620]
mov rdi, rcx
xor ecx, ecx
mov rsi, rdx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp word [rdi], 0
je 0x14005eba1
mov r9, rax
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.14001aac0
movzx r13d, al
test al, al
je 0x14005eba1
movzx edi, word [rsi]
mov r12d, 2
test edi, 0xffffff80
jne 0x14005e856
mov edx, r12d
mov ecx, edi
call fcn.1400cb9d8
test eax, eax
je 0x14005e856
and edi, 0xffffffdf
movzx eax, di
xor ebp, ebp
mov esi, 1
cmp eax, 0x50
je 0x14005e86e
cmp eax, 0x54
cmovne r12d, ebp
jmp 0x14005e871
mov r12d, esi
mov edx, r12d
movzx ecx, r13b
call fcn.140079060
movzx r8d, byte [rbx + 0x23]
lea rcx, [0x1400ee2b8]
test al, al
lea r13, [0x1400ee2bc]
cmovne r13, rcx
test r8b, r8b
jne 0x14005e8ba
mov rcx, qword [rbx + 0x10]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov rdx, r13
mov byte [rsp + 0x20], sil
call fcn.1400b1370
mov esi, eax
jmp 0x14005eea9
mov qword [rsp + 0x288], r15
movzx edx, sil
lea r14, [0x1400e34fc]
test r13, r13
jne 0x14005e8dc
xor dl, dl
mov r15, rbp
mov r13, r14
jmp 0x14005e8fe
cmp qword [rbx + 8], r13
jne 0x14005e8eb
mov r15, qword [rbx + 0x10]
shr r15, 1
jmp 0x14005e8fe
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea r15, [rcx - 1]
lea rax, [r15 + 1]
lea r12, [rax + rax]
cmp r8b, 2
jne 0x14005e926
mov rdx, r15
mov rcx, r13
call fcn.1400060b0
mov r15, qword [rsp + 0x288]
mov esi, eax
jmp 0x14005eea9
mov r8, qword [0x140114480]
cmp r12, r8
jbe 0x14005e95d
cmp r12, qword [rbx + 0x18]
jbe 0x14005e95d
lea rdx, str.Memory_limit_reached__see_MaxMem_in_the_help_file_.
lea rcx, [0x14011b1d0]
mov r8, r14
call fcn.1400405d0
mov r15, qword [rsp + 0x288]
mov esi, eax
jmp 0x14005eea9
cmp rax, 2
jae 0x14005e986
test dl, dl
mov rcx, rbx
setne bpl
xor r8d, r8d
lea edx, [rbp + 3]
call fcn.1400b1a20
mov r15, qword [rsp + 0x288]
mov eax, esi
jmp 0x14005eea9
movzx eax, byte [rbx + 0x21]
test al, 2
je 0x14005e9a3
mov rcx, qword [rbx]
and al, 0x3d
mov byte [rbx + 0x21], al
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov r8, qword [0x140114480]
mov r9, qword [rbx + 0x18]
and byte [rbx + 0x21], 0x82
cmp r12, r9
jbe 0x14005eb27
movzx r10d, byte [rbx + 0x20]
movzx eax, r10b
cmp r10b, sil
jbe 0x14005e9db
cmp al, 2
je 0x14005ea25
mov rdi, qword [rsp + 0x280]
mov rax, qword [rsp + 0x280]
jmp 0x14005eb1b
mov edi, 0x80
cmp r12, rdi
ja 0x14005ea25
cmp r12, 8
ja 0x14005e9f2
mov edi, 8
jmp 0x14005e9fe
mov eax, reloc.OLEAUT32.dll_SafeArrayGetDim
cmp r12, rax
cmovbe rdi, rax
mov rcx, rdi
call fcn.1400aa290
test rax, rax
jne 0x14005ea1c
mov r15, qword [rsp + 0x288]
mov esi, ebp
mov eax, ebp
jmp 0x14005eea9
mov byte [rbx + 0x20], sil
jmp 0x14005eb1b
cmp r12, 0x20
jae 0x14005ea35
mov edi, SafeArrayAllocDescriptor
jmp 0x14005eae1
mov edi, 0x208
cmp r12, rdi
jb 0x14005eae1
cmp r12, 0x50000
jae 0x14005ea9b
pxor xmm0, xmm0
cvtsi2sd xmm0, r12
test r12, r12
jns 0x14005ea62
addsd xmm0, qword [0x140101e78]
mulsd xmm0, qword [0x140101eb0]
movsd xmm1, qword [0x140101ea8]
xor ecx, ecx
comisd xmm0, xmm1
jbe 0x14005ea91
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x14005ea91
movabs rax, 0x8000000000000000
mov rcx, rax
cvttsd2si rdi, xmm0
add rdi, rcx
jmp 0x14005eae1
cmp r12, 0x320000
jae 0x14005eaae
lea rdi, [r12 + 0x8000]
jmp 0x14005eae1
cmp r12, 0xc80000
jae 0x14005ead9
movabs rax, 0x47ae147ae147ae15
mov rdi, r12
mul r12
sub rdi, rdx
shr rdi, 1
add rdi, rdx
shr rdi, 6
add rdi, r12
jmp 0x14005eae1
lea rdi, [r12 + 0x20000]
cmp rdi, r8
cmova rdi, r8
cmp r10b, 2
jne 0x14005eb02
test r9, r9
je 0x14005eb02
mov rcx, qword [rbx + 8]
movzx r12d, sil
call fcn.1400cafac
jmp 0x14005eb05
xor r12b, r12b
test rdi, rdi
js 0x14005eb5b
mov rcx, rdi
call fcn.1400ca834
test rax, rax
je 0x14005eb5b
mov byte [rbx + 0x20], 2
and byte [rbx + 0x21], 0x7f
mov qword [rbx + 8], rax
mov qword [rbx + 0x18], rdi
mov rcx, qword [rbx + 8]
cmp rcx, r13
je 0x14005eb3c
lea r8, [r15 + r15]
mov rdx, r13
call fcn.1400cb170
mov rax, qword [rbx + 8]
lea rcx, [r15 + r15]
mov r15, qword [rsp + 0x288]
mov word [rcx + rax], bp
mov qword [rbx + 0x10], rcx
mov eax, esi
jmp 0x14005eea9
test r12b, r12b
je 0x14005eb71
lea rax, [0x14011b188]
mov qword [rbx + 0x18], rbp
mov qword [rbx + 8], rax
jmp 0x14005eb78
mov rax, qword [rbx + 8]
mov word [rax], bp
lea rdx, str.Out_of_memory.
lea rcx, [0x14011b1d0]
mov r8, r14
mov qword [rbx + 0x10], rbp
call fcn.1400405d0
mov r15, qword [rsp + 0x288]
mov esi, eax
jmp 0x14005eea9
lea rdx, [rsp + 0x280]
xor r8d, r8d
mov rcx, rdi
call fcn.140078d00
test eax, eax
jne 0x14005ee71
movzx eax, byte [rbx + 0x23]
test al, al
jne 0x14005ebe7
mov rcx, qword [rbx + 0x10]
lea rdx, [0x1400e34fc]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.1400b1370
mov esi, eax
jmp 0x14005eea9
lea r14, [0x1400e34fc]
xor ebp, ebp
cmp qword [rbx + 8], r14
jne 0x14005ebff
mov r12, qword [rbx + 0x10]
shr r12, 1
jmp 0x14005ec02
mov r12, rbp
lea rcx, [r12 + 1]
lea rsi, [rcx + rcx]
cmp al, 2
jne 0x14005ec21
mov rdx, r12
mov rcx, r14
call fcn.1400060b0
mov esi, eax
jmp 0x14005eea9
mov r8, qword [0x140114480]
cmp rsi, r8
jbe 0x14005ec50
cmp rsi, qword [rbx + 0x18]
jbe 0x14005ec50
lea rdx, str.Memory_limit_reached__see_MaxMem_in_the_help_file_.
lea rcx, [0x14011b1d0]
mov r8, r14
call fcn.1400405d0
mov esi, eax
jmp 0x14005eea9
cmp rcx, 2
jae 0x14005ec71
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 4]
call fcn.1400b1a20
mov esi, 1
mov eax, esi
jmp 0x14005eea9
movzx eax, byte [rbx + 0x21]
test al, 2
je 0x14005ec8e
mov rcx, qword [rbx]
and al, 0x3d
mov byte [rbx + 0x21], al
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov r8, qword [0x140114480]
mov r9, qword [rbx + 0x18]
and byte [rbx + 0x21], 0x82
cmp rsi, r9
jbe 0x14005ee08
movzx r10d, byte [rbx + 0x20]
movzx eax, r10b
cmp r10b, 1
jbe 0x14005ecc7
cmp al, 2
je 0x14005ed09
mov rdi, qword [rsp + 0x280]
mov rax, qword [rsp + 0x280]
jmp 0x14005edfc
mov edi, 0x80
cmp rsi, rdi
ja 0x14005ed09
cmp rsi, 8
ja 0x14005ecde
mov edi, 8
jmp 0x14005ecea
mov eax, reloc.OLEAUT32.dll_SafeArrayGetDim
cmp rsi, rax
cmovbe rdi, rax
mov rcx, rdi
call fcn.1400aa290
test rax, rax
jne 0x14005ed00
mov esi, ebp
mov eax, ebp
jmp 0x14005eea9
mov byte [rbx + 0x20], 1
jmp 0x14005edfc
cmp rsi, 0x20
jae 0x14005ed19
mov edi, SafeArrayAllocDescriptor
jmp 0x14005edc3
mov edi, 0x208
cmp rsi, rdi
jb 0x14005edc3
cmp rsi, 0x50000
jae 0x14005ed7f
pxor xmm0, xmm0
cvtsi2sd xmm0, rsi
test rsi, rsi
jns 0x14005ed46
addsd xmm0, qword [0x140101e78]
mulsd xmm0, qword [0x140101eb0]
movsd xmm1, qword [0x140101ea8]
xor ecx, ecx
comisd xmm0, xmm1
jbe 0x14005ed75
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x14005ed75
movabs rax, 0x8000000000000000
mov rcx, rax
cvttsd2si rdi, xmm0
add rdi, rcx
jmp 0x14005edc3
cmp rsi, 0x320000
jae 0x14005ed91
lea rdi, [rsi + 0x8000]
jmp 0x14005edc3
cmp rsi, 0xc80000
jae 0x14005edbc
movabs rax, 0x47ae147ae147ae15
mov rdi, rsi
mul rsi
sub rdi, rdx
shr rdi, 1
add rdi, rdx
shr rdi, 6
add rdi, rsi
jmp 0x14005edc3
lea rdi, [rsi + 0x20000]
cmp rdi, r8
cmova rdi, r8
cmp r10b, 2
jne 0x14005ede3
test r9, r9
je 0x14005ede3
mov rcx, qword [rbx + 8]
mov sil, 1
call fcn.1400cafac
jmp 0x14005ede6
xor sil, sil
test rdi, rdi
js 0x14005ee36
mov rcx, rdi
call fcn.1400ca834
test rax, rax
je 0x14005ee36
mov byte [rbx + 0x20], 2
and byte [rbx + 0x21], 0x7f
mov qword [rbx + 8], rax
mov qword [rbx + 0x18], rdi
mov rcx, qword [rbx + 8]
cmp rcx, r14
je 0x14005ee1d
lea r8, [r12 + r12]
mov rdx, r14
call fcn.1400cb170
mov rax, qword [rbx + 8]
lea rcx, [r12 + r12]
mov esi, 1
mov word [rcx + rax], bp
mov qword [rbx + 0x10], rcx
mov eax, esi
jmp 0x14005eea9
test sil, sil
je 0x14005ee4c
lea rax, [0x14011b188]
mov qword [rbx + 0x18], rbp
mov qword [rbx + 8], rax
jmp 0x14005ee53
mov rax, qword [rbx + 8]
mov word [rax], bp
lea rdx, str.Out_of_memory.
lea rcx, [0x14011b1d0]
mov r8, r14
mov qword [rbx + 0x10], rbp
call fcn.1400405d0
mov esi, eax
jmp 0x14005eea9
mov edx, dword [rsp + 0x280]
lea rcx, [rsp + 0x50]
xor ebp, ebp
mov qword [rsp + 0x30], rcx
lea r8, [rsp + 0x30]
xor r9d, r9d
mov ecx, eax
mov dword [rsp + 0x40], ebp
mov word [rsp + 0x50], bp
call fcn.140079120
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.1400b0650
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret