Function at 0x14007d4c0
Capabilities:
Get keyboard layout

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x250
mov rbx, qword [0x14013f500]
mov rdi, rcx
xor ecx, ecx
mov rsi, rdx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
mov r9, rax
call fcn.140023e00
movzx r13d, al
test al, al
jne 0x14007d81a
lea rdx, [rsp + 0x290]
xor r8d, r8d
mov rcx, rdi
call fcn.14009ee10
test eax, eax
jne 0x14007d7dd
movzx eax, byte [rbx + 0x23]
test al, al
jne 0x14007d550
mov rcx, qword [rbx + 0x10]
lea rdx, [0x1401035ac]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.1400e6e20
mov esi, eax
jmp 0x14007db1a
lea r14, [0x1401035ac]
xor ebp, ebp
cmp qword [rbx + 8], r14
jne 0x14007d568
mov r12, qword [rbx + 0x10]
shr r12, 1
jmp 0x14007d56b
mov r12, rbp
lea rcx, [r12 + 1]
lea rsi, [rcx + rcx]
cmp al, 2
jne 0x14007d58a
mov rdx, r12
mov rcx, r14
call fcn.140006bc0
mov esi, eax
jmp 0x14007db1a
mov r8, qword [0x14013b0d0]
cmp rsi, r8
jbe 0x14007d5b9
cmp rsi, qword [rbx + 0x18]
jbe 0x14007d5b9
lea rdx, [0x140124720]
lea rcx, [0x140143150]
mov r8, r14
call fcn.14005f7b0
mov esi, eax
jmp 0x14007db1a
cmp rcx, 2
jae 0x14007d5d8
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 3]
call fcn.1400e74d0
mov esi, 1
jmp 0x14007db1a
movzx eax, byte [rbx + 0x21]
test al, 2
je 0x14007d5f5
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 r9, qword [rbx + 0x18]
and byte [rbx + 0x21], 0x82
cmp rsi, r9
jbe 0x14007d76f
movzx r10d, byte [rbx + 0x20]
movzx eax, r10b
cmp r10b, 1
jbe 0x14007d62e
cmp al, 2
je 0x14007d66e
mov rdi, qword [rsp + 0x290]
mov rax, qword [rsp + 0x290]
jmp 0x14007d763
mov edi, 0x80
cmp rsi, rdi
ja 0x14007d66e
cmp rsi, 8
ja 0x14007d645
mov edi, 8
jmp 0x14007d651
mov eax, reloc.WSOCK32.dll_recv
cmp rsi, rax
cmovbe rdi, rax
mov rcx, rdi
call fcn.1400dd290
test rax, rax
jne 0x14007d665
mov esi, ebp
jmp 0x14007db1a
mov byte [rbx + 0x20], 1
jmp 0x14007d763
cmp rsi, 0x20
jae 0x14007d67e
mov edi, SafeArrayAllocDescriptor
jmp 0x14007d728
mov edi, 0x208
cmp rsi, rdi
jb 0x14007d728
cmp rsi, 0x50000
jae 0x14007d6e4
pxor xmm0, xmm0
cvtsi2sd xmm0, rsi
test rsi, rsi
jns 0x14007d6ab
addsd xmm0, qword [0x1401279a8]
mulsd xmm0, qword [0x1401279e0]
movsd xmm1, qword [0x1401279d8]
xor ecx, ecx
comisd xmm0, xmm1
jbe 0x14007d6da
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x14007d6da
movabs rax, 0x8000000000000000
mov rcx, rax
cvttsd2si rdi, xmm0
add rdi, rcx
jmp 0x14007d728
cmp rsi, 0x320000
jae 0x14007d6f6
lea rdi, [rsi + 0x8000]
jmp 0x14007d728
cmp rsi, 0xc80000
jae 0x14007d721
movabs rax, 0x47ae147ae147ae15
mov rdi, rsi
mul rsi
sub rdi, rdx
shr rdi, 1
add rdi, rdx
shr rdi, 6
add rdi, rsi
jmp 0x14007d728
lea rdi, [rsi + 0x20000]
cmp rdi, r8
cmova rdi, r8
cmp r10b, 2
jne 0x14007d749
test r9, r9
je 0x14007d749
mov rcx, qword [rbx + 8]
mov sil, 1
call qword [sym.imp.MSVCR100.dll_free]
jmp 0x14007d74c
xor sil, sil
test rdi, rdi
js 0x14007d79f
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_malloc]
test rax, rax
je 0x14007d79f
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 0x14007d785
lea r8, [r12 + r12]
mov rdx, r14
call qword [sym.imp.MSVCR100.dll_memmove]
mov rax, qword [rbx + 8]
lea rcx, [r12 + r12]
mov esi, 1
mov word [rcx + rax], bp
mov qword [rbx + 0x10], rcx
jmp 0x14007db1a
test sil, sil
je 0x14007d7b5
lea rax, [0x140141fa8]
mov qword [rbx + 0x18], rbp
mov qword [rbx + 8], rax
jmp 0x14007d7bc
mov rax, qword [rbx + 8]
mov word [rax], bp
lea rdx, str.Out_of_memory.
lea rcx, [0x140143150]
mov r8, r14
mov qword [rbx + 0x10], rbp
call fcn.14005f7b0
mov esi, eax
jmp 0x14007db1a
mov edx, dword [rsp + 0x290]
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.14009f240
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.1400e6100
jmp 0x14007db1c
movzx edi, word [rsi]
mov r12d, 2
test edi, 0xffffff80
jne 0x14007d83d
mov edx, r12d
mov ecx, edi
call qword [sym.imp.MSVCR100.dll__isctype]
test eax, eax
je 0x14007d83d
and edi, 0xffffffdf
movzx eax, di
xor ebp, ebp
mov esi, 1
cmp eax, 0x50
je 0x14007d855
cmp eax, 0x54
cmovne r12d, ebp
jmp 0x14007d858
mov r12d, esi
mov edx, r12d
movzx ecx, r13b
call fcn.14009f180
movzx r8d, byte [rbx + 0x23]
lea rcx, [0x140122fa0]
test al, al
lea r13, [0x140122fa4]
cmovne r13, rcx
test r8b, r8b
jne 0x14007d8a1
mov rcx, qword [rbx + 0x10]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov rdx, r13
mov byte [rsp + 0x20], sil
call fcn.1400e6e20
mov esi, eax
jmp 0x14007db1a
mov qword [rsp + 0x280], r15
movzx edx, sil
lea r14, [0x1401035ac]
test r13, r13
jne 0x14007d8c3
xor dl, dl
mov r15, rbp
mov r13, r14
jmp 0x14007d8e5
cmp qword [rbx + 8], r13
jne 0x14007d8d2
mov r15, qword [rbx + 0x10]
shr r15, 1
jmp 0x14007d8e5
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 0x14007d905
mov rdx, r15
mov rcx, r13
call fcn.140006bc0
mov esi, eax
jmp 0x14007db12
mov r8, qword [0x14013b0d0]
cmp r12, r8
jbe 0x14007d934
cmp r12, qword [rbx + 0x18]
jbe 0x14007d934
lea rdx, [0x140124720]
lea rcx, [0x140143150]
mov r8, r14
call fcn.14005f7b0
mov esi, eax
jmp 0x14007db12
cmp rax, 2
jae 0x14007d953
test dl, dl
mov rcx, rbx
setne bpl
xor r8d, r8d
lea edx, [rbp + 2]
call fcn.1400e74d0
jmp 0x14007db12
movzx eax, byte [rbx + 0x21]
test al, 2
je 0x14007d970
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 r9, qword [rbx + 0x18]
and byte [rbx + 0x21], 0x82
cmp r12, r9
jbe 0x14007daec
movzx r10d, byte [rbx + 0x20]
movzx eax, r10b
cmp r10b, sil
jbe 0x14007d9a8
cmp al, 2
je 0x14007d9e8
mov rdi, qword [rsp + 0x290]
mov rax, qword [rsp + 0x290]
jmp 0x14007dae0
mov edi, 0x80
cmp r12, rdi
ja 0x14007d9e8
cmp r12, 8
ja 0x14007d9bf
mov edi, 8
jmp 0x14007d9cb
mov eax, reloc.WSOCK32.dll_recv
cmp r12, rax
cmovbe rdi, rax
mov rcx, rdi
call fcn.1400dd290
test rax, rax
jne 0x14007d9df
mov esi, ebp
jmp 0x14007db12
mov byte [rbx + 0x20], sil
jmp 0x14007dae0
cmp r12, 0x20
jae 0x14007d9f8
mov edi, SafeArrayAllocDescriptor
jmp 0x14007daa4
mov edi, 0x208
cmp r12, rdi
jb 0x14007daa4
cmp r12, 0x50000
jae 0x14007da5e
pxor xmm0, xmm0
cvtsi2sd xmm0, r12
test r12, r12
jns 0x14007da25
addsd xmm0, qword [0x1401279a8]
mulsd xmm0, qword [0x1401279e0]
movsd xmm1, qword [0x1401279d8]
xor ecx, ecx
comisd xmm0, xmm1
jbe 0x14007da54
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x14007da54
movabs rax, 0x8000000000000000
mov rcx, rax
cvttsd2si rdi, xmm0
add rdi, rcx
jmp 0x14007daa4
cmp r12, 0x320000
jae 0x14007da71
lea rdi, [r12 + 0x8000]
jmp 0x14007daa4
cmp r12, 0xc80000
jae 0x14007da9c
movabs rax, 0x47ae147ae147ae15
mov rdi, r12
mul r12
sub rdi, rdx
shr rdi, 1
add rdi, rdx
shr rdi, 6
add rdi, r12
jmp 0x14007daa4
lea rdi, [r12 + 0x20000]
cmp rdi, r8
cmova rdi, r8
cmp r10b, 2
jne 0x14007dac6
test r9, r9
je 0x14007dac6
mov rcx, qword [rbx + 8]
movzx r12d, sil
call qword [sym.imp.MSVCR100.dll_free]
jmp 0x14007dac9
xor r12b, r12b
test rdi, rdi
js 0x14007db38
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_malloc]
test rax, rax
je 0x14007db38
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 0x14007db02
lea r8, [r15 + r15]
mov rdx, r13
call qword [sym.imp.MSVCR100.dll_memmove]
mov rax, qword [rbx + 8]
lea rcx, [r15 + r15]
mov word [rcx + rax], bp
mov qword [rbx + 0x10], rcx
mov r15, qword [rsp + 0x280]
mov eax, esi
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret
test r12b, r12b
je 0x14007db4e
lea rax, [0x140141fa8]
mov qword [rbx + 0x18], rbp
mov qword [rbx + 8], rax
jmp 0x14007db55
mov rax, qword [rbx + 8]
mov word [rax], bp
lea rdx, str.Out_of_memory.
lea rcx, [0x140143150]
mov r8, r14
mov qword [rbx + 0x10], rbp
call fcn.14005f7b0
mov esi, eax
jmp 0x14007db12