Function at 0x1400110f0
Capabilities:
Get keyboard layout

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x430
xor r12d, r12d
xor sil, sil
mov rdi, r9
movzx r15d, r8b
mov rbp, rcx
lea r14, [r9 + 0x12]
movzx r13d, r12w
mov byte [rax + 0x18], sil
test r9, r9
jne 0x14001112e
lea r14, [rax + 8]
mov qword [rsp + 0x488], rbx
test r15b, r15b
jne 0x1400111b6
mov rbx, rcx
test rcx, rcx
je 0x1400111b6
movzx edx, word [rcx]
test dx, dx
je 0x1400111b6
nop dword [rax + rax]
lea rcx, [0x1400e66c0]
mov eax, SafeArrayAllocDescriptor
nop dword [rax]
cmp dx, ax
je 0x140011181
movzx eax, word [rcx + 2]
add rcx, 2
test ax, ax
jne 0x140011160
movzx edx, word [rbx + 2]
add rbx, 2
test dx, dx
jne 0x140011150
jmp 0x1400111b6
mov rcx, rbx
movzx eax, word [rcx]
cmp ax, 0x20
je 0x140011193
cmp ax, 9
jne 0x140011199
add rcx, 2
jmp 0x140011184
lea rdx, [0x1400e3aec]
call fcn.1400ca91c
test eax, eax
jne 0x1400111b6
test rdi, rdi
je 0x1400111b2
mov byte [rdi + 0x16], 1
mov word [rbx], r12w
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp word [rbp], r12w
jne 0x1400111cc
xor bl, bl
jmp 0x140011561
lea rdx, [rsp + 0x480]
mov r9, rax
mov r8b, 1
mov rcx, rbp
call fcn.14001ac30
movzx ebx, al
test al, al
je 0x140011559
test r15b, r15b
je 0x1400114f4
lea eax, [rbx + 0x64]
cmp al, 3
ja 0x140011516
cmp byte [rsp + 0x490], r12b
je 0x1400114b1
mov rdi, qword [0x14011a308]
movzx eax, byte [rdi + 0x23]
test al, al
jne 0x140011241
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1400e66c8]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.1400b14e0
xor eax, eax
jmp 0x14001193b
lea r13, [0x1400e66c8]
cmp qword [rdi + 8], r13
jne 0x140011257
mov rbp, qword [rdi + 0x10]
shr rbp, 1
jmp 0x14001125c
mov ebp, 1
lea rcx, [rbp + 1]
lea rsi, [rcx + rcx]
cmp al, 2
jne 0x14001127a
mov rdx, rbp
mov rcx, r13
call fcn.1400060c0
xor eax, eax
jmp 0x14001193b
mov r8, qword [0x140114480]
cmp rsi, r8
jbe 0x140011298
cmp rsi, qword [rdi + 0x18]
jbe 0x140011298
lea rdx, [0x1400ffee0]
jmp 0x1400118aa
cmp rcx, 2
jae 0x1400112b4
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 4]
call fcn.1400b1b90
xor eax, eax
jmp 0x14001193b
movzx eax, byte [rdi + 0x21]
test al, 2
je 0x1400112d1
mov rcx, qword [rdi]
and al, 0x3d
mov byte [rdi + 0x21], al
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov r8, qword [0x140114480]
mov r9, qword [rdi + 0x18]
and byte [rdi + 0x21], 0x82
cmp rsi, r9
jbe 0x140011446
movzx r10d, byte [rdi + 0x20]
movzx eax, r10b
cmp r10b, 1
jbe 0x14001130a
cmp al, 2
je 0x140011347
mov rbx, qword [rsp + 0x470]
mov rax, qword [rsp + 0x470]
jmp 0x14001143a
mov ebx, 0x80
cmp rsi, rbx
ja 0x140011347
cmp rsi, 8
ja 0x140011321
mov ebx, 8
jmp 0x14001132d
mov eax, reloc.OLEAUT32.dll_SafeArrayGetDim
cmp rsi, rax
cmovbe rbx, rax
mov rcx, rbx
call fcn.1400aa400
test rax, rax
je 0x1400118bd
mov byte [rdi + 0x20], 1
jmp 0x14001143a
cmp rsi, 0x20
jae 0x140011357
mov ebx, SafeArrayAllocDescriptor
jmp 0x140011401
mov ebx, 0x208
cmp rsi, rbx
jb 0x140011401
cmp rsi, 0x50000
jae 0x1400113bd
pxor xmm0, xmm0
cvtsi2sd xmm0, rsi
test rsi, rsi
jns 0x140011384
addsd xmm0, qword [0x140101e88]
mulsd xmm0, qword [0x140101ec0]
movsd xmm1, qword [0x140101eb8]
xor ecx, ecx
comisd xmm0, xmm1
jbe 0x1400113b3
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x1400113b3
movabs rax, 0x8000000000000000
mov rcx, rax
cvttsd2si rbx, xmm0
add rbx, rcx
jmp 0x140011401
cmp rsi, 0x320000
jae 0x1400113cf
lea rbx, [rsi + 0x8000]
jmp 0x140011401
cmp rsi, 0xc80000
jae 0x1400113fa
movabs rax, 0x47ae147ae147ae15
mov rbx, rsi
mul rsi
sub rbx, rdx
shr rbx, 1
add rbx, rdx
shr rbx, 6
add rbx, rsi
jmp 0x140011401
lea rbx, [rsi + 0x20000]
cmp rbx, r8
cmova rbx, r8
cmp r10b, 2
jne 0x140011421
test r9, r9
je 0x140011421
mov rcx, qword [rdi + 8]
mov sil, 1
call fcn.1400cb11c
jmp 0x140011424
xor sil, sil
test rbx, rbx
js 0x140011475
mov rcx, rbx
call fcn.1400ca9a4
test rax, rax
je 0x140011475
mov byte [rdi + 0x20], 2
and byte [rdi + 0x21], 0x7f
mov qword [rdi + 8], rax
mov qword [rdi + 0x18], rbx
mov rcx, qword [rdi + 8]
cmp rcx, r13
je 0x14001145c
lea r8, [rbp + rbp]
mov rdx, r13
call fcn.1400cb2e0
mov rax, qword [rdi + 8]
lea rcx, [rbp + rbp]
mov word [rcx + rax], r12w
mov qword [rdi + 0x10], rcx
xor eax, eax
jmp 0x14001193b
test sil, sil
je 0x140011499
lea rax, [0x14011b184]
mov qword [rdi + 0x18], r12
mov qword [rdi + 0x10], r12
mov qword [rdi + 8], rax
lea rdx, [0x1400e6570]
jmp 0x1400118aa
mov rax, qword [rdi + 8]
lea rdx, [0x1400e6570]
mov word [rax], r12w
mov qword [rdi + 0x10], r12
jmp 0x1400118aa
lea r8, [0x1400e66d0]
lea rcx, [rsp + 0x30]
mov r9, rbp
mov edx, 0x200
call fcn.1400ad210
mov r8, qword [rsp + 0x478]
lea rdx, [rsp + 0x30]
lea rcx, [0x14011b1d0]
call fcn.140040740
test rdi, rdi
jne 0x1400118bd
lea eax, [rdi + 4]
jmp 0x14001193b
test rdi, rdi
je 0x140011516
lea rdx, [0x1400e671c]
mov r8d, 2
mov rcx, rbp
call fcn.1400cab74
test eax, eax
sete al
mov byte [rdi + 0x17], al
lea eax, [rbx - 1]
cmp al, 5
ja 0x140011522
cmp bl, 3
jne 0x140011529
lea eax, [rbx + 0x66]
cmp al, 5
ja 0x14001152d
mov cl, 1
jmp 0x14001152f
xor cl, cl
movzx esi, byte [rsp + 0x480]
test sil, 0x30
je 0x140011548
lea eax, [rbx - 0x41]
cmp al, 0x19
ja 0x140011548
and sil, 0xcf
test cl, cl
je 0x1400118e1
mov byte [r14], 2
jmp 0x1400118e1
movzx esi, byte [rsp + 0x480]
xor edx, edx
mov rcx, rbp
call fcn.14001ab10
movzx r13d, ax
test ax, ax
jne 0x1400118e1
lea rdx, [rsp + 0x480]
mov r8b, 1
mov rcx, rbp
call fcn.140078e70
mov r13d, eax
test ax, ax
jne 0x1400118c1
cmp byte [rsp + 0x490], r12b
je 0x140011863
mov rdi, qword [0x14011a308]
movzx eax, byte [rdi + 0x23]
test al, al
jne 0x1400115d7
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1400e6724]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.1400b14e0
xor eax, eax
jmp 0x14001193b
lea r13, [0x1400e6724]
cmp qword [rdi + 8], r13
jne 0x1400115ed
mov rbp, qword [rdi + 0x10]
shr rbp, 1
jmp 0x1400115f2
mov ebp, 1
lea rcx, [rbp + 1]
lea rsi, [rcx + rcx]
cmp al, 2
jne 0x140011610
mov rdx, rbp
mov rcx, r13
call fcn.1400060c0
xor eax, eax
jmp 0x14001193b
mov r8, qword [0x140114480]
cmp rsi, r8
jbe 0x140011643
cmp rsi, qword [rdi + 0x18]
jbe 0x140011643
lea r8, [0x1400e346c]
lea rdx, [0x1400ffee0]
lea rcx, [0x14011b1d0]
call fcn.140040740
xor eax, eax
jmp 0x14001193b
cmp rcx, 2
jae 0x14001165f
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 4]
call fcn.1400b1b90
xor eax, eax
jmp 0x14001193b
movzx eax, byte [rdi + 0x21]
test al, 2
je 0x14001167c
mov rcx, qword [rdi]
and al, 0x3d
mov byte [rdi + 0x21], al
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov r8, qword [0x140114480]
mov r9, qword [rdi + 0x18]
and byte [rdi + 0x21], 0x82
cmp rsi, r9
jbe 0x1400117f1
movzx r10d, byte [rdi + 0x20]
movzx eax, r10b
cmp r10b, 1
jbe 0x1400116b5
cmp al, 2
je 0x1400116f2
mov rbx, qword [rsp + 0x470]
mov rax, qword [rsp + 0x470]
jmp 0x1400117e5
mov ebx, 0x80
cmp rsi, rbx
ja 0x1400116f2
cmp rsi, 8
ja 0x1400116cc
mov ebx, 8
jmp 0x1400116d8
mov eax, reloc.OLEAUT32.dll_SafeArrayGetDim
cmp rsi, rax
cmovbe rbx, rax
mov rcx, rbx
call fcn.1400aa400
test rax, rax
je 0x140011819
mov byte [rdi + 0x20], 1
jmp 0x1400117e5
cmp rsi, 0x20
jae 0x140011702
mov ebx, SafeArrayAllocDescriptor
jmp 0x1400117ac
mov ebx, 0x208
cmp rsi, rbx
jb 0x1400117ac
cmp rsi, 0x50000
jae 0x140011768
pxor xmm0, xmm0
cvtsi2sd xmm0, rsi
test rsi, rsi
jns 0x14001172f
addsd xmm0, qword [0x140101e88]
mulsd xmm0, qword [0x140101ec0]
movsd xmm1, qword [0x140101eb8]
xor ecx, ecx
comisd xmm0, xmm1
jbe 0x14001175e
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x14001175e
movabs rax, 0x8000000000000000
mov rcx, rax
cvttsd2si rbx, xmm0
add rbx, rcx
jmp 0x1400117ac
cmp rsi, 0x320000
jae 0x14001177a
lea rbx, [rsi + 0x8000]
jmp 0x1400117ac
cmp rsi, 0xc80000
jae 0x1400117a5
movabs rax, 0x47ae147ae147ae15
mov rbx, rsi
mul rsi
sub rbx, rdx
shr rbx, 1
add rbx, rdx
shr rbx, 6
add rbx, rsi
jmp 0x1400117ac
lea rbx, [rsi + 0x20000]
cmp rbx, r8
cmova rbx, r8
cmp r10b, 2
jne 0x1400117cc
test r9, r9
je 0x1400117cc
mov rcx, qword [rdi + 8]
mov sil, 1
call fcn.1400cb11c
jmp 0x1400117cf
xor sil, sil
test rbx, rbx
js 0x140011820
mov rcx, rbx
call fcn.1400ca9a4
test rax, rax
je 0x140011820
mov byte [rdi + 0x20], 2
and byte [rdi + 0x21], 0x7f
mov qword [rdi + 8], rax
mov qword [rdi + 0x18], rbx
mov rcx, qword [rdi + 8]
cmp rcx, r13
je 0x140011807
lea r8, [rbp + rbp]
mov rdx, r13
call fcn.1400cb2e0
mov rax, qword [rdi + 8]
lea rcx, [rbp + rbp]
mov word [rcx + rax], r12w
mov qword [rdi + 0x10], rcx
xor eax, eax
jmp 0x14001193b
test sil, sil
je 0x140011836
lea rax, [0x14011b184]
mov qword [rdi + 0x18], r12
mov qword [rdi + 8], rax
jmp 0x14001183e
mov rax, qword [rdi + 8]
mov word [rax], r12w
lea r8, [0x1400e346c]
lea rdx, [0x1400e6570]
lea rcx, [0x14011b1d0]
mov qword [rdi + 0x10], r12
call fcn.140040740
xor eax, eax
jmp 0x14001193b
cmp word [rbp + 2], r12w
jne 0x140011887
cmp byte [0x14011bd84], r12b
jne 0x140011887
mov eax, 3
test rdi, rdi
cmove r12d, eax
mov eax, r12d
jmp 0x14001193b
test rdi, rdi
je 0x1400118bd
lea r8, [0x1400e6728]
lea rcx, [rsp + 0x30]
mov r9, rbp
mov edx, 0x200
call fcn.1400ad210
lea rdx, [rsp + 0x30]
lea r8, [0x1400e346c]
lea rcx, [0x14011b1d0]
call fcn.140040740
xor eax, eax
jmp 0x14001193b
movsxd rbx, dword [rsp + 0x480]
inc dword [0x14011a394]
lea rcx, [0x14011a398]
mov byte [r14], 4
mov rax, rbx
mov byte [rbx + rcx], 1
test r15b, r15b
je 0x1400118f5
test rdi, rdi
je 0x140011936
mov byte [rdi + 0x11], bl
mov word [rdi + 0xa], r13w
jmp 0x140011936
test rdi, rdi
je 0x140011936
movzx eax, sil
mov byte [rdi + 0x10], bl
mov ebx, 8
and al, 0xd5
mov word [rdi + 8], r13w
test al, 0xc0
cmovne r12d, ebx
test al, 0xc
je 0x14001191b
or r12d, 1
test al, 0x30
je 0x140011923
or r12d, 4
test al, 3
je 0x14001192b
or r12d, 2
or dword [rdi], r12d
and sil, 0x2a
or byte [rdi + 0xe], sil
mov eax, 1
mov rbx, qword [rsp + 0x488]
add rsp, 0x430
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret