Function at 0x1400104b0
Capabilities:
Get keyboard layout

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x440
xor r12d, r12d
mov rdi, r9
movzx r14d, r8b
movzx ebp, r12w
mov r15, rdx
mov rsi, rcx
lea r13, [r9 + 0x12]
mov byte [rax + 0x18], bpl
test r9, r9
jne 0x1400104ee
lea r13, [rax + 0x20]
test r14b, r14b
jne 0x140010576
mov rbx, rcx
test rcx, rcx
je 0x140010576
movzx edx, word [rcx]
test dx, dx
je 0x140010576
nop word [rax + rax]
lea rcx, [0x14012ed90]
mov eax, SafeArrayAllocDescriptor
nop dword [rax]
cmp dx, ax
je 0x140010541
movzx eax, word [rcx + 2]
add rcx, 2
test ax, ax
jne 0x140010520
movzx edx, word [rbx + 2]
add rbx, 2
test dx, dx
jne 0x140010510
jmp 0x140010576
mov rcx, rbx
movzx eax, word [rcx]
cmp ax, 0x20
je 0x140010553
cmp ax, 9
jne 0x140010559
add rcx, 2
jmp 0x140010544
lea rdx, [0x14012ed98]
call fcn.140108424
test eax, eax
jne 0x140010576
test rdi, rdi
je 0x140010572
mov byte [rdi + 0x16], 1
mov word [rbx], r12w
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
lea rdx, [rsp + 0x490]
mov r8b, 1
mov r9, rax
mov rcx, rsi
call fcn.140019df0
movzx ebx, al
test al, al
je 0x140010915
test r14b, r14b
je 0x1400108b1
lea eax, [rbx + 0x64]
cmp al, 3
ja 0x1400108d3
cmp byte [rsp + 0x4a0], r12b
je 0x14001086b
mov rdi, qword [0x1401703d0]
movzx eax, byte [rdi + 0x23]
test al, al
jne 0x1400105f3
mov rcx, qword [rdi + 0x10]
lea rdx, [0x14012eda0]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.1400e9bc0
xor eax, eax
jmp 0x140010cf9
lea r13, [0x14012eda0]
cmp qword [rdi + 8], r13
jne 0x140010609
mov rbp, qword [rdi + 0x10]
shr rbp, 1
jmp 0x14001060e
mov ebp, 1
lea rcx, [rbp + 1]
lea rsi, [rcx + rcx]
cmp al, 2
jne 0x14001062c
mov rdx, rbp
mov rcx, r13
call fcn.140005910
xor eax, eax
jmp 0x140010cf9
mov r8, qword [0x140169b08]
cmp rsi, r8
jbe 0x140010652
cmp rsi, qword [rdi + 0x18]
jbe 0x140010652
lea rcx, [0x14014bd60]
call fcn.1400dd2e0
mov rdx, rax
jmp 0x140010c67
cmp rcx, 2
jae 0x14001066e
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 4]
call fcn.1400ea290
xor eax, eax
jmp 0x140010cf9
movzx eax, byte [rdi + 0x21]
test al, 2
je 0x14001068b
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 [0x140169b08]
mov r9, qword [rdi + 0x18]
and byte [rdi + 0x21], 0x82
cmp rsi, r9
jbe 0x140010800
movzx r10d, byte [rdi + 0x20]
movzx eax, r10b
cmp r10b, 1
jbe 0x1400106c4
cmp al, 2
je 0x140010701
mov rbx, qword [rsp + 0x498]
mov rax, qword [rsp + 0x498]
jmp 0x1400107f4
mov ebx, 0x80
cmp rsi, rbx
ja 0x140010701
cmp rsi, 8
ja 0x1400106db
mov ebx, 8
jmp 0x1400106e7
mov eax, reloc.OLEAUT32.dll_SafeArrayGetDim
cmp rsi, rax
cmovbe rbx, rax
mov rcx, rbx
call fcn.1400dc2b0
test rax, rax
je 0x140010c7a
mov byte [rdi + 0x20], 1
jmp 0x1400107f4
cmp rsi, 0x20
jae 0x140010711
mov ebx, SafeArrayAllocDescriptor
jmp 0x1400107bb
mov ebx, 0x208
cmp rsi, rbx
jb 0x1400107bb
cmp rsi, 0x50000
jae 0x140010777
pxor xmm0, xmm0
cvtsi2sd xmm0, rsi
test rsi, rsi
jns 0x14001073e
addsd xmm0, qword [0x140152fd8]
mulsd xmm0, qword [0x140153040]
movsd xmm1, qword [0x140153038]
xor ecx, ecx
comisd xmm0, xmm1
jbe 0x14001076d
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x14001076d
movabs rax, 0x8000000000000000
mov rcx, rax
cvttsd2si rbx, xmm0
add rbx, rcx
jmp 0x1400107bb
cmp rsi, 0x320000
jae 0x140010789
lea rbx, [rsi + 0x8000]
jmp 0x1400107bb
cmp rsi, 0xc80000
jae 0x1400107b4
movabs rax, 0x47ae147ae147ae15
mov rbx, rsi
mul rsi
sub rbx, rdx
shr rbx, 1
add rbx, rdx
shr rbx, 6
add rbx, rsi
jmp 0x1400107bb
lea rbx, [rsi + 0x20000]
cmp rbx, r8
cmova rbx, r8
cmp r10b, 2
jne 0x1400107db
test r9, r9
je 0x1400107db
mov rcx, qword [rdi + 8]
mov sil, 1
call fcn.140108f48
jmp 0x1400107de
xor sil, sil
test rbx, rbx
js 0x14001082f
mov rcx, rbx
call fcn.1401084ac
test rax, rax
je 0x14001082f
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 0x140010816
lea r8, [rbp + rbp]
mov rdx, r13
call fcn.140109100
mov rax, qword [rdi + 8]
lea rcx, [rbp + rbp]
mov word [rcx + rax], r12w
mov qword [rdi + 0x10], rcx
xor eax, eax
jmp 0x140010cf9
test sil, sil
je 0x140010853
lea rax, [0x140171290]
mov qword [rdi + 0x18], r12
mov qword [rdi + 0x10], r12
mov qword [rdi + 8], rax
lea rdx, str.Out_of_memory.
jmp 0x140010c67
mov rax, qword [rdi + 8]
lea rdx, str.Out_of_memory.
mov word [rax], r12w
mov qword [rdi + 0x10], r12
jmp 0x140010c67
lea rcx, [0x14012edb0]
call fcn.1400dd2e0
lea rcx, [rsp + 0x40]
mov r9, rsi
mov r8, rax
mov edx, 0x200
call fcn.1400e6100
lea rdx, [rsp + 0x40]
lea rcx, [0x1401712e0]
mov r8, r15
call fcn.1400a5580
test rdi, rdi
jne 0x140010c7a
lea eax, [rdi + 4]
jmp 0x140010cf9
test rdi, rdi
je 0x1400108d3
lea rdx, [0x14012ee0c]
mov r8d, 2
mov rcx, rsi
call fcn.140108e4c
test eax, eax
sete al
mov byte [rdi + 0x17], al
lea eax, [rbx - 1]
cmp al, 5
ja 0x1400108df
cmp bl, 3
jne 0x1400108e6
lea eax, [rbx + 0x66]
cmp al, 5
ja 0x1400108ea
mov dl, 1
jmp 0x1400108ec
xor dl, dl
movzx ecx, byte [rsp + 0x490]
test cl, 0x30
je 0x140010903
lea eax, [rbx - 0x41]
cmp al, 0x19
ja 0x140010903
and cl, 0xcf
test dl, dl
je 0x140010ca4
mov byte [r13], 2
jmp 0x140010ca4
mov rcx, rsi
call fcn.140019cf0
movzx ebp, ax
test ax, ax
jne 0x140010c9c
lea rdx, [rsp + 0x30]
mov r8b, 1
mov rcx, rsi
call fcn.1400712c0
mov ebp, eax
test ax, ax
jne 0x140010c7e
cmp byte [rsp + 0x4a0], r12b
je 0x140010c18
mov rdi, qword [0x1401703d0]
movzx eax, byte [rdi + 0x23]
test al, al
jne 0x140010984
mov rcx, qword [rdi + 0x10]
lea rdx, [0x14012ee14]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.1400e9bc0
xor eax, eax
jmp 0x140010cf9
lea r13, [0x14012ee14]
cmp qword [rdi + 8], r13
jne 0x14001099a
mov rbp, qword [rdi + 0x10]
shr rbp, 1
jmp 0x14001099f
mov ebp, 1
lea rcx, [rbp + 1]
lea rsi, [rcx + rcx]
cmp al, 2
jne 0x1400109bd
mov rdx, rbp
mov rcx, r13
call fcn.140005910
xor eax, eax
jmp 0x140010cf9
mov r8, qword [0x140169b08]
cmp rsi, r8
jbe 0x1400109f8
cmp rsi, qword [rdi + 0x18]
jbe 0x1400109f8
lea rcx, [0x14014bd60]
call fcn.1400dd2e0
lea r8, [0x1401295d4]
lea rcx, [0x1401712e0]
mov rdx, rax
call fcn.1400a5580
xor eax, eax
jmp 0x140010cf9
cmp rcx, 2
jae 0x140010a14
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 4]
call fcn.1400ea290
xor eax, eax
jmp 0x140010cf9
movzx eax, byte [rdi + 0x21]
test al, 2
je 0x140010a31
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 [0x140169b08]
mov r9, qword [rdi + 0x18]
and byte [rdi + 0x21], 0x82
cmp rsi, r9
jbe 0x140010ba6
movzx r10d, byte [rdi + 0x20]
movzx eax, r10b
cmp r10b, 1
jbe 0x140010a6a
cmp al, 2
je 0x140010aa7
mov rbx, qword [rsp + 0x498]
mov rax, qword [rsp + 0x498]
jmp 0x140010b9a
mov ebx, 0x80
cmp rsi, rbx
ja 0x140010aa7
cmp rsi, 8
ja 0x140010a81
mov ebx, 8
jmp 0x140010a8d
mov eax, reloc.OLEAUT32.dll_SafeArrayGetDim
cmp rsi, rax
cmovbe rbx, rax
mov rcx, rbx
call fcn.1400dc2b0
test rax, rax
je 0x140010bce
mov byte [rdi + 0x20], 1
jmp 0x140010b9a
cmp rsi, 0x20
jae 0x140010ab7
mov ebx, SafeArrayAllocDescriptor
jmp 0x140010b61
mov ebx, 0x208
cmp rsi, rbx
jb 0x140010b61
cmp rsi, 0x50000
jae 0x140010b1d
pxor xmm0, xmm0
cvtsi2sd xmm0, rsi
test rsi, rsi
jns 0x140010ae4
addsd xmm0, qword [0x140152fd8]
mulsd xmm0, qword [0x140153040]
movsd xmm1, qword [0x140153038]
xor ecx, ecx
comisd xmm0, xmm1
jbe 0x140010b13
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x140010b13
movabs rax, 0x8000000000000000
mov rcx, rax
cvttsd2si rbx, xmm0
add rbx, rcx
jmp 0x140010b61
cmp rsi, 0x320000
jae 0x140010b2f
lea rbx, [rsi + 0x8000]
jmp 0x140010b61
cmp rsi, 0xc80000
jae 0x140010b5a
movabs rax, 0x47ae147ae147ae15
mov rbx, rsi
mul rsi
sub rbx, rdx
shr rbx, 1
add rbx, rdx
shr rbx, 6
add rbx, rsi
jmp 0x140010b61
lea rbx, [rsi + 0x20000]
cmp rbx, r8
cmova rbx, r8
cmp r10b, 2
jne 0x140010b81
test r9, r9
je 0x140010b81
mov rcx, qword [rdi + 8]
mov sil, 1
call fcn.140108f48
jmp 0x140010b84
xor sil, sil
test rbx, rbx
js 0x140010bd5
mov rcx, rbx
call fcn.1401084ac
test rax, rax
je 0x140010bd5
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 0x140010bbc
lea r8, [rbp + rbp]
mov rdx, r13
call fcn.140109100
mov rax, qword [rdi + 8]
lea rcx, [rbp + rbp]
mov word [rcx + rax], r12w
mov qword [rdi + 0x10], rcx
xor eax, eax
jmp 0x140010cf9
test sil, sil
je 0x140010beb
lea rax, [0x140171290]
mov qword [rdi + 0x18], r12
mov qword [rdi + 8], rax
jmp 0x140010bf3
mov rax, qword [rdi + 8]
mov word [rax], r12w
lea r8, [0x1401295d4]
lea rdx, str.Out_of_memory.
lea rcx, [0x1401712e0]
mov qword [rdi + 0x10], r12
call fcn.1400a5580
xor eax, eax
jmp 0x140010cf9
cmp word [rsi + 2], r12w
jne 0x140010c3c
cmp byte [0x140171e90], r12b
jne 0x140010c3c
mov eax, 3
test rdi, rdi
cmove r12d, eax
mov eax, r12d
jmp 0x140010cf9
test rdi, rdi
je 0x140010c7a
lea rcx, [0x14012ee20]
call fcn.1400dd2e0
lea rcx, [rsp + 0x40]
mov r9, rsi
mov r8, rax
mov edx, 0x200
call fcn.1400e6100
lea rdx, [rsp + 0x40]
lea r8, [0x1401295d4]
lea rcx, [0x1401712e0]
call fcn.1400a5580
xor eax, eax
jmp 0x140010cf9
movsxd rbx, dword [rsp + 0x30]
inc dword [0x14017045c]
lea rcx, [0x140170460]
mov byte [r13], 4
mov rax, rbx
mov byte [rbx + rcx], 1
movzx ecx, byte [rsp + 0x490]
test r14b, r14b
je 0x140010cb7
test rdi, rdi
je 0x140010cf4
mov byte [rdi + 0x11], bl
mov word [rdi + 0xa], bp
jmp 0x140010cf4
test rdi, rdi
je 0x140010cf4
movzx eax, cl
mov byte [rdi + 0x10], bl
mov ebx, 8
and al, 0xd5
mov word [rdi + 8], bp
test al, 0xc0
cmovne r12d, ebx
test al, 0xc
je 0x140010cdb
or r12d, 1
test al, 0x30
je 0x140010ce3
or r12d, 4
test al, 3
je 0x140010ceb
or r12d, 2
or dword [rdi], r12d
and cl, 0x2a
or byte [rdi + 0xe], cl
mov eax, 1
mov rbx, qword [rsp + 0x480]
add rsp, 0x440
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret