Function at 0x49bf20
Capabilities:
Get keyboard layout

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x140
mov rsi, rcx
movzx edi, word [rcx + 6]
movzx ebx, word [rcx + 8]
xorps xmm0, xmm0
movaps xmmword [rsp + 0x130], xmm0
movaps xmmword [rsp + 0x120], xmm0
movaps xmmword [rsp + 0x110], xmm0
movaps xmmword [rsp + 0x100], xmm0
movaps xmmword [rsp + 0xf0], xmm0
movaps xmmword [rsp + 0xe0], xmm0
movaps xmmword [rsp + 0xd0], xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x40], xmm0
mov dword [rsp + 0x3c], 0x100000
call sub.user32.dll_GetForegroundWindow
mov rcx, rax
xor edx, edx
call sub.user32.dll_GetWindowThreadProcessId
mov ecx, eax
call sub.user32.dll_GetKeyboardLayout
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 2
lea r8, [rsp + 0x40]
lea r9, [rsp + 0x3c]
mov ecx, edi
mov edx, ebx
call sub.user32.dll_ToUnicodeEx
test eax, eax
jle 0x49c0d5
mov edx, dword [rsp + 0x3c]
mov ecx, eax
lea r8, [rcx - 1]
mov eax, edx
and eax, 0xf800
cmp eax, 0xd800
jne 0x49c079
movzx r9d, dx
cmp r9d, 0xdbff
ja 0x49c0d5
test r8, r8
je 0x49c0d5
mov r8d, edx
shr r8d, 0x10
lea r9d, [r8 + 0x2000]
movzx r9d, r9w
cmp r9d, 0xfc00
jb 0x49c0d5
add rcx, 0xfffffffffffffffe
and edx, 0x3ff
and r8d, 0x3ff
shl rdx, 0x1a
shl r8d, 0x10
or r8, rdx
movabs rdx, 0x100000000
add rdx, r8
mov r8, rcx
jmp 0x49c07c
shl edx, 0x10
movzx eax, ax
cmp eax, 0xd800
sete cl
mov rax, rdx
shr rax, 0x10
test r8, r8
sete r8b
cmp rax, 0x110000
je 0x49c0d5
or r8b, cl
je 0x49c0d5
mov ecx, dword [rsi]
mov r8d, ecx
and r8d, 0x10
shr r8d, 4
test cl, cl
sets cl
xor cl, r8b
je 0x49c0e5
lea ecx, [rax - 0x61]
cmp ecx, 0x1a
jae 0x49c103
mov ecx, eax
add cl, 0x9f
xor edx, edx
cmp cl, 0x1a
setb dl
shl edx, 5
xor edx, eax
jmp 0x49c0ff
mov eax, 0x110000
add rsp, 0x140
pop rbx
pop rdi
pop rsi
ret
lea ecx, [rax - 0x41]
cmp ecx, 0x1a
jae 0x49c15c
mov ecx, eax
add cl, 0xbf
xor edx, edx
cmp cl, 0x1a
setb dl
shl edx, 5
or edx, eax
mov eax, edx
jmp 0x49c0da
cmp eax, 0x80
jb 0x49c0da
cmp eax, 0x1ebff
ja 0x49c0da
mov rcx, rdx
shr rcx, 0x1a
lea r8, [0x007371db]
movzx ecx, byte [rcx + r8]
cmp rcx, 0x14
jae 0x49c366
shr edx, 0x16
and edx, 0xf
shl ecx, 4
lea r8, [0x00737256]
add r8, rcx
movzx edx, byte [rdx + r8]
cmp rdx, 0x37
jae 0x49c1bd
lea rcx, [0x00737398]
mov r8, qword [rcx + rdx*8]
jmp 0x49c261
cmp eax, 0x80
jb 0x49c0da
cmp eax, 0x1f3ff
ja 0x49c0da
mov rcx, rdx
shr rcx, 0x1a
lea r8, [0x0073772b]
movzx ecx, byte [rcx + r8]
cmp rcx, 0x11
jae 0x49c377
shr edx, 0x16
and edx, 0xf
shl ecx, 4
lea r8, [0x007377a8]
add r8, rcx
movzx edx, byte [rdx + r8]
cmp rdx, 0x2b
jae 0x49c20a
lea rcx, [0x007378b8]
mov r8, qword [rcx + rdx*8]
jmp 0x49c2f2
lea rcx, [rdx - 0x37]
cmp rcx, 0x14
ja 0x49c388
lea r8, [0x00737550]
movzx ecx, byte [r8 + rdx*2 - 0x6e]
cmp rcx, 0x37
jae 0x49c3aa
movzx edx, byte [r8 + rdx*2 - 0x6d]
lea r9, [0x00737398]
lea r8d, [rdx + rdx]
sar r8b, 7
movsx r8, r8b
xor r8, qword [r9 + rcx*8]
mov ecx, edx
test dl, dl
js 0x49c25e
rol r8, cl
jmp 0x49c261
lea rcx, [rdx - 0x2b]
cmp rcx, 0x18
ja 0x49c399
lea r8, [0x00737a10]
movzx ecx, byte [r8 + rdx*2 - 0x56]
cmp rcx, 0x2b
jae 0x49c3bb
movzx edx, byte [r8 + rdx*2 - 0x55]
lea r9, [0x007378b8]
lea r8d, [rdx + rdx]
sar r8b, 7
movsx r8, r8b
xor r8, qword [r9 + rcx*8]
mov ecx, edx
test dl, dl
js 0x49c2ef
rol r8, cl
jmp 0x49c2f2
shr r8, cl
bt r8, rax
jae 0x49c0da
mov r8d, 0x5db
xor ecx, ecx
lea rdx, [0x0073a63c]
mov r9d, 0x5db
shr r8, 1
add r8, rcx
mov r10d, dword [rdx + r8*8]
cmp r10d, eax
je 0x49c2ab
lea r11, [r8 + 1]
cmp r10d, eax
cmova r9, r8
cmovb rcx, r11
mov r8, r9
sub r8, rcx
ja 0x49c280
jmp 0x49c0da
mov ecx, dword [rdx + r8*8 + 4]
mov edx, ecx
xor edx, 0xd800
add edx, 0xffef0000
cmp edx, 0xffef07ff
ja 0x49c35f
and ecx, 0x3fffff
lea rcx, [rcx + rcx*2]
lea rdx, [0x0073d514]
cmp qword [rdx + rcx*4 + 4], 0
jne 0x49c0da
mov eax, dword [rdx + rcx*4]
jmp 0x49c0da
shr r8, cl
bt r8, rax
jae 0x49c0da
mov r8d, 0x57f
xor ecx, ecx
lea rdx, [0x00737a44]
mov r9d, 0x57f
shr r8, 1
add r8, rcx
mov r10d, dword [rdx + r8*8]
cmp r10d, eax
je 0x49c33c
lea r11, [r8 + 1]
cmp r10d, eax
cmova r9, r8
cmovb rcx, r11
mov r8, r9
sub r8, rcx
ja 0x49c311
jmp 0x49c0da
mov ecx, dword [rdx + r8*8 + 4]
mov edx, ecx
xor edx, 0xd800
add edx, 0xfffff800
cmp edx, 0x10f800
cmovae ecx, eax
mov eax, ecx
jmp 0x49c0da
mov eax, ecx
jmp 0x49c0da
lea r8, [0x00736070]
mov edx, 0x14
call sym.core::panicking::panic_bounds_check::ha5eba36dbaff2278
lea r8, [0x00736070]
mov edx, 0x11
call sym.core::panicking::panic_bounds_check::ha5eba36dbaff2278
lea r8, [0x00736088]
mov edx, 0x15
call sym.core::panicking::panic_bounds_check::ha5eba36dbaff2278
lea r8, [0x00736088]
mov edx, 0x19
call sym.core::panicking::panic_bounds_check::ha5eba36dbaff2278
lea r8, [0x007360a0]
mov edx, 0x37
call sym.core::panicking::panic_bounds_check::ha5eba36dbaff2278
lea r8, [0x007360a0]
mov edx, 0x2b
call sym.core::panicking::panic_bounds_check::ha5eba36dbaff2278
int3