Function at 0x1400a60a0
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, [0x1401034e0]
lea rcx, [0x1401034f0]
lea r8d, [rdx + 1]
mov qword [rsp + 0x20], r11
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x1400a6540
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 0x1400a6134
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 0x1400a614d
mov rcx, qword [rsp + 0x30]
mov rax, qword [rcx]
call qword [rax + 0x58]
mov rdx, qword [rsp + 0x2a8]
cmp word [rdx], 0
je 0x1400a6166
mov rcx, qword [rsp + 0x30]
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_getservbyport]
mov rdi, qword [rsp + 0x2b0]
xor r15d, r15d
mov r14d, reloc.WSOCK32.dll_recv
cmp word [rdi], r15w
je 0x1400a61cb
mov rbx, qword [rsp + 0x2c0]
cmp word [rbx], r15w
je 0x1400a61b7
mov rcx, rbx
call fcn.140005040
mov rcx, rbx
test al, al
je 0x1400a61ab
mov r8d, r14d
xor edx, edx
call qword [sym.imp.MSVCR100.dll_wcstol]
lea r8d, [rax - 1]
jmp 0x1400a61ba
call qword [sym.imp.MSVCR100.dll__wtoi]
lea r8d, [rax - 1]
jmp 0x1400a61ba
mov r8d, r15d
mov rcx, qword [rsp + 0x30]
mov rdx, rdi
mov rax, qword [rcx]
call qword [rax + 0x88]
mov rbx, qword [rsp + 0x2b8]
cmp word [rbx], r15w
je 0x1400a620c
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
xor r8d, r8d
xor edx, edx
mov r9, rax
mov rcx, rbx
call fcn.140023e00
test al, al
je 0x1400a620c
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], r15w
je 0x1400a6249
mov rcx, rbx
call fcn.140005040
mov rcx, rbx
test al, al
je 0x1400a6236
mov r8d, r14d
xor edx, edx
call qword [sym.imp.MSVCR100.dll_wcstol]
jmp 0x1400a623c
call qword [sym.imp.MSVCR100.dll__wtoi]
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, [0x140103500]
mov rax, qword [rcx]
call qword [rax]
test eax, eax
js 0x1400a6525
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 0x1400a651a
mov rbx, qword [0x140140268]
mov qword [rsp + 0x260], r12
movzx eax, byte [rbx + 0x23]
test al, al
jne 0x1400a62d3
mov rcx, qword [rbx + 0x10]
lea rdx, [0x140103674]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.1400e6e20
jmp 0x1400a650f
lea r12, [0x140103674]
cmp qword [rbx + 8], r12
jne 0x1400a62e9
mov rbp, qword [rbx + 0x10]
shr rbp, 1
jmp 0x1400a62ee
mov ebp, 1
lea rcx, [rbp + 1]
lea rsi, [rcx + rcx]
cmp al, 2
jne 0x1400a630a
mov rdx, rbp
mov rcx, r12
call fcn.140006bc0
jmp 0x1400a650f
mov r8, qword [0x14013b0d0]
cmp rsi, r8
jbe 0x1400a633b
cmp rsi, qword [rbx + 0x18]
jbe 0x1400a633b
lea r8, [0x1401035ac]
lea rdx, [0x140124720]
lea rcx, [0x140143150]
call fcn.14005f7b0
jmp 0x1400a650f
cmp rcx, 2
jae 0x1400a6355
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 3]
call fcn.1400e74d0
jmp 0x1400a650f
movzx eax, byte [rbx + 0x21]
test al, 2
je 0x1400a6372
mov rcx, qword [rbx]
and al, 0x3d
mov byte [rbx + 0x21], al
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
mov r8, qword [0x14013b0d0]
mov rcx, qword [rbx + 0x18]
and byte [rbx + 0x21], 0x82
cmp rsi, rcx
jbe 0x1400a64e6
movzx r9d, byte [rbx + 0x20]
movzx eax, r9b
cmp r9b, 1
jbe 0x1400a63a5
cmp al, 2
je 0x1400a63dd
mov rdi, qword [rsp + 0x38]
mov rax, qword [rsp + 0x38]
jmp 0x1400a64da
mov edi, 0x80
cmp rsi, rdi
ja 0x1400a63dd
cmp rsi, 8
ja 0x1400a63bc
mov edi, 8
jmp 0x1400a63c3
cmp rsi, r14
cmovbe rdi, r14
mov rcx, rdi
call fcn.1400dd290
test rax, rax
je 0x1400a650f
mov byte [rbx + 0x20], 1
jmp 0x1400a64da
cmp rsi, 0x20
jae 0x1400a63ed
mov edi, SafeArrayAllocDescriptor
jmp 0x1400a6497
mov edi, 0x208
cmp rsi, rdi
jb 0x1400a6497
cmp rsi, 0x50000
jae 0x1400a6453
pxor xmm0, xmm0
cvtsi2sd xmm0, rsi
test rsi, rsi
jns 0x1400a641a
addsd xmm0, qword [0x1401279a8]
mulsd xmm0, qword [0x1401279e0]
movsd xmm1, qword [0x1401279d8]
xor eax, eax
comisd xmm0, xmm1
jbe 0x1400a6449
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x1400a6449
movabs rdx, 0x8000000000000000
mov rax, rdx
cvttsd2si rdi, xmm0
add rdi, rax
jmp 0x1400a6497
cmp rsi, 0x320000
jae 0x1400a6465
lea rdi, [rsi + 0x8000]
jmp 0x1400a6497
cmp rsi, 0xc80000
jae 0x1400a6490
movabs rax, 0x47ae147ae147ae15
mov rdi, rsi
mul rsi
sub rdi, rdx
shr rdi, 1
add rdi, rdx
shr rdi, 6
add rdi, rsi
jmp 0x1400a6497
lea rdi, [rsi + 0x20000]
cmp rdi, r8
cmova rdi, r8
cmp r9b, 2
jne 0x1400a64b8
test rcx, rcx
je 0x1400a64b8
mov rcx, qword [rbx + 8]
mov sil, 1
call qword [sym.imp.MSVCR100.dll_free]
jmp 0x1400a64bb
xor sil, sil
test rdi, rdi
js 0x1400a657a
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_malloc]
test rax, rax
je 0x1400a657a
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 0x1400a64fd
lea r8, [rbp + rbp]
mov rdx, r12
call qword [sym.imp.MSVCR100.dll_memmove]
mov rax, qword [rbx + 8]
lea rcx, [rbp + rbp]
mov word [rcx + rax], r15w
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.WSOCK32.dll_recv]
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rcx]
call qword [rdx + reloc.WSOCK32.dll_recv]
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 0x1400a65bb
mov eax, 1
add rsp, 0x270
pop r13
ret
test sil, sil
je 0x1400a6590
lea rax, [0x140141fa8]
mov qword [rbx + 0x18], r15
mov qword [rbx + 8], rax
jmp 0x1400a6598
mov rax, qword [rbx + 8]
mov word [rax], r15w
lea r8, [0x1401035ac]
lea rdx, str.Out_of_memory.
lea rcx, [0x140143150]
mov qword [rbx + 0x10], r15
call fcn.14005f7b0
jmp 0x1400a650f
mov dl, 1
mov rcx, r13
call fcn.14005e3f0
add rsp, 0x270
pop r13
ret