Function at 0x14008d150
Capabilities:
Get keyboard layout

Disassembly:
mov rax, rsp
push r13
sub rsp, 0x270
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov r13, rcx
mov qword [rax - 0x10], rdi
xor ecx, ecx
mov rbx, r9
mov rbp, r8
xor sil, sil
mov rdi, rdx
call qword [sym.imp.ole32.dll_CoInitialize]
xor edx, edx
lea r11, [rsp + 0x30]
lea r9, [0x1400ef040]
lea rcx, [0x1400ef050]
lea r8d, [rdx + 1]
mov qword [rsp + 0x20], r11
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x14008d5f7
mov rcx, qword [rsp + 0x30]
mov rdx, rdi
mov qword [rsp + 0x258], r14
mov rax, qword [rcx]
mov qword [rsp + 0x250], r15
call qword [rax + 0xa0]
cmp word [rbx], 0
je 0x14008d1e4
mov rcx, qword [rsp + 0x30]
mov rdx, rbx
mov rax, qword [rcx]
call qword [rax + 0x48]
mov rdx, qword [rsp + 0x2a0]
cmp word [rdx], 0
je 0x14008d1fd
mov rcx, qword [rsp + 0x30]
mov rax, qword [rcx]
call qword [rax + 0x58]
mov rdx, qword [rsp + 0x2a8]
cmp word [rdx], 0
je 0x14008d216
mov rcx, qword [rsp + 0x30]
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_getservbyport]
mov rbx, qword [rsp + 0x2c0]
xor r14d, r14d
mov r15d, reloc.OLEAUT32.dll_SafeArrayGetDim
cmp word [rbx], r14w
je 0x14008d255
mov rcx, rbx
call fcn.1400057c0
mov rcx, rbx
test al, al
je 0x14008d24b
mov r8d, r15d
xor edx, edx
call fcn.1400d91d0
mov r8d, eax
jmp 0x14008d258
call fcn.1400d6ef0
mov r8d, eax
jmp 0x14008d258
mov r8d, r14d
mov rdx, qword [rsp + 0x2b0]
cmp word [rdx], r14w
je 0x14008d281
mov rcx, qword [rsp + 0x30]
test r8d, r8d
mov eax, r14d
mov r9, qword [rcx]
setg al
sub r8d, eax
call qword [r9 + 0x88]
mov rbx, qword [rsp + 0x2b8]
cmp word [rbx], r14w
je 0x14008d2c8
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp word [rbx], r14w
je 0x14008d2c8
mov r9, rax
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.140022fa0
test al, al
je 0x14008d2c8
mov rcx, qword [rsp + 0x30]
movzx edx, al
mov eax, 0x600
mov r8, qword [rcx]
or dx, ax
call qword [r8 + 0x68]
mov rbx, qword [rsp + 0x2c8]
cmp word [rbx], r14w
je 0x14008d303
mov rcx, rbx
call fcn.1400057c0
mov rcx, rbx
test al, al
je 0x14008d2f1
mov r8d, r15d
xor edx, edx
call fcn.1400d91d0
jmp 0x14008d2f6
call fcn.1400d6ef0
mov rcx, qword [rsp + 0x30]
mov edx, eax
mov rax, qword [rcx]
call qword [rax + 0x78]
mov rcx, qword [rsp + 0x30]
lea r8, [rsp + 0x38]
lea rdx, [0x1400ef060]
mov rax, qword [rcx]
call qword [rax]
test eax, eax
js 0x14008d5dc
lea r8, [rsp + 0x40]
xor r9d, r9d
mov edx, 0x104
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetFullPathNameW]
mov rcx, qword [rsp + 0x38]
lea rdx, [rsp + 0x40]
mov rax, qword [rcx]
mov r8d, 1
call qword [rax + 0x30]
test eax, eax
js 0x14008d5d1
mov rbx, qword [0x14012b628]
mov qword [rsp + 0x260], r12
movzx eax, byte [rbx + 0x23]
test al, al
jne 0x14008d38d
mov rcx, qword [rbx + 0x10]
lea rdx, [0x1400f1614]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.1400bd640
jmp 0x14008d5c6
lea r12, [0x1400f1614]
cmp qword [rbx + 8], r12
jne 0x14008d3a3
mov rbp, qword [rbx + 0x10]
shr rbp, 1
jmp 0x14008d3a8
mov ebp, 1
lea rcx, [rbp + 1]
lea rsi, [rcx + rcx]
cmp al, 2
jne 0x14008d3c4
mov rdx, rbp
mov rcx, r12
call fcn.140006da0
jmp 0x14008d5c6
mov r8, qword [0x1401255a0]
cmp rsi, r8
jbe 0x14008d3f5
cmp rsi, qword [rbx + 0x18]
jbe 0x14008d3f5
lea r8, [0x1400f1524]
lea rdx, str.Memory_limit_reached__see_MaxMem_in_the_help_file_.
lea rcx, [0x14012c5c0]
call fcn.14004e590
jmp 0x14008d5c6
cmp rcx, 2
jae 0x14008d40f
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 4]
call fcn.1400bdcf0
jmp 0x14008d5c6
movzx eax, byte [rbx + 0x21]
test al, 2
je 0x14008d42c
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 [0x1401255a0]
mov rcx, qword [rbx + 0x18]
and byte [rbx + 0x21], 0x82
cmp rsi, rcx
jbe 0x14008d59e
movzx r9d, byte [rbx + 0x20]
movzx eax, r9b
cmp r9b, 1
jbe 0x14008d45f
cmp al, 2
je 0x14008d497
mov rdi, qword [rsp + 0x38]
mov rax, qword [rsp + 0x38]
jmp 0x14008d592
mov edi, 0x80
cmp rsi, rdi
ja 0x14008d497
cmp rsi, 8
ja 0x14008d476
mov edi, 8
jmp 0x14008d47d
cmp rsi, r15
cmovbe rdi, r15
mov rcx, rdi
call fcn.1400b60a0
test rax, rax
je 0x14008d5c6
mov byte [rbx + 0x20], 1
jmp 0x14008d592
cmp rsi, 0x20
jae 0x14008d4a7
mov edi, SafeArrayAllocDescriptor
jmp 0x14008d551
mov edi, 0x208
cmp rsi, rdi
jb 0x14008d551
cmp rsi, 0x50000
jae 0x14008d50d
pxor xmm0, xmm0
cvtsi2sd xmm0, rsi
test rsi, rsi
jns 0x14008d4d4
addsd xmm0, qword [0x140112018]
mulsd xmm0, qword [0x140112050]
movsd xmm1, qword [0x140112048]
xor eax, eax
comisd xmm0, xmm1
jbe 0x14008d503
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x14008d503
movabs rdx, 0x8000000000000000
mov rax, rdx
cvttsd2si rdi, xmm0
add rdi, rax
jmp 0x14008d551
cmp rsi, 0x320000
jae 0x14008d51f
lea rdi, [rsi + 0x8000]
jmp 0x14008d551
cmp rsi, 0xc80000
jae 0x14008d54a
movabs rax, 0x47ae147ae147ae15
mov rdi, rsi
mul rsi
sub rdi, rdx
shr rdi, 1
add rdi, rdx
shr rdi, 6
add rdi, rsi
jmp 0x14008d551
lea rdi, [rsi + 0x20000]
cmp rdi, r8
cmova rdi, r8
cmp r9b, 2
jne 0x14008d571
test rcx, rcx
je 0x14008d571
mov rcx, qword [rbx + 8]
mov sil, 1
call fcn.1400d6fc8
jmp 0x14008d574
xor sil, sil
test rdi, rdi
js 0x14008d631
mov rcx, rdi
call fcn.1400d6f08
test rax, rax
je 0x14008d631
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, r12
je 0x14008d5b4
lea r8, [rbp + rbp]
mov rdx, r12
call fcn.1400d7a30
mov rax, qword [rbx + 8]
lea rcx, [rbp + rbp]
mov word [rcx + rax], r14w
mov qword [rbx + 0x10], rcx
mov r12, qword [rsp + 0x260]
mov sil, 1
mov rcx, qword [rsp + 0x38]
mov rdx, qword [rcx]
call qword [rdx + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rcx]
call qword [rdx + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov r15, qword [rsp + 0x250]
mov r14, qword [rsp + 0x258]
call qword [sym.imp.ole32.dll_CoUninitialize]
mov rdi, qword [rsp + 0x268]
mov rbp, qword [rsp + 0x288]
mov rbx, qword [rsp + 0x280]
test sil, sil
mov rsi, qword [rsp + 0x290]
je 0x14008d672
mov eax, 1
add rsp, 0x270
pop r13
ret
test sil, sil
je 0x14008d647
lea rax, [0x14012c4b8]
mov qword [rbx + 0x18], r14
mov qword [rbx + 8], rax
jmp 0x14008d64f
mov rax, qword [rbx + 8]
mov word [rax], r14w
lea r8, [0x1400f1524]
lea rdx, str.Out_of_memory.
lea rcx, [0x14012c5c0]
mov qword [rbx + 0x10], r14
call fcn.14004e590
jmp 0x14008d5c6
mov dl, 1
mov rcx, r13
call fcn.14004ced0
add rsp, 0x270
pop r13
ret