Function at 0x1400479f0
Capabilities:
Get keyboard layout

Disassembly:
mov byte [rsp + 0x20], r9b
mov byte [rsp + 0x18], r8b
push rbx
push rbp
push rsi
push rdi
push r13
push r15
sub rsp, 0x58
mov rsi, rdx
mov qword [rsp + 0x30], rdx
xor edx, edx
movzx ebx, r8b
mov rbp, rcx
movzx r15d, dx
mov edi, edx
mov dword [rsp + 0x24], edx
mov word [rsp + 0x2a], dx
test r8b, r8b
je 0x140047a34
cmp byte [rcx + 0x64], dl
je 0x140047a34
mov cl, 1
jmp 0x140047a36
xor cl, cl
mov byte [rsp + 0x90], cl
mov r13, rsi
cmp word [rsi], dx
je 0x140047e1b
movzx esi, byte [rsp + 0xa8]
mov qword [rsp + 0x50], r12
movzx r12d, byte [rsp + 0xb0]
mov qword [rsp + 0x48], r14
movzx r14d, byte [rsp + 0xa0]
mov r8d, 0x7d
nop word [rax + rax]
mov word [rsp + 0x28], dx
movzx eax, word [r13]
cmp eax, 0x7b
je 0x140047ae8
cmp eax, 0x7d
je 0x140047d24
test cl, cl
je 0x140047aa7
inc edi
mov dword [rsp + 0x24], edi
jmp 0x140047d24
xor ecx, ecx
mov word [rsp + 0x28], ax
mov byte [rsp + 0x98], 0
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp word [rsp + 0x28], 0
je 0x140047ce6
lea rdx, [rsp + 0x98]
lea rcx, [rsp + 0x28]
mov r9, rax
mov r8b, 1
call fcn.14001aad0
movzx edi, al
jmp 0x140047b9c
lea rbx, [r13 + 2]
mov edx, r8d
mov rcx, rbx
call fcn.1400ca5f4
mov r12, rax
test rax, rax
je 0x140047d0e
sub rax, r13
sar rax, 1
dec rax
jne 0x140047b20
add r12, 2
cmp word [r12], 0x7d
jne 0x140047d0e
jmp 0x140047b26
cmp rax, 1
jne 0x140047b45
movzx ecx, byte [rsp + 0x90]
test cl, cl
je 0x140047b3d
inc edi
mov dword [rsp + 0x24], edi
jmp 0x140047d16
movzx eax, word [rbx]
mov word [rsp + 0x28], ax
xor eax, eax
xor ecx, ecx
mov word [r12], ax
mov byte [rsp + 0x20], al
mov byte [rsp + 0x98], al
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp word [rbx], 0
jne 0x140047be9
xor dil, dil
lea rdx, [rsp + 0x20]
mov rcx, rbx
call fcn.14001a9b0
movzx r15d, ax
movzx ebx, byte [rsp + 0xa0]
mov r13d, 0x7d
mov word [r12], r13w
mov r13, r12
movzx r12d, byte [rsp + 0xb0]
test dil, dil
je 0x140047ce2
movzx ecx, word [rsp + 0x28]
test cx, cx
je 0x140047ca0
test bl, bl
je 0x140047ca0
call qword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x140047ca0
test byte [rsp + 0x98], 0x30
movzx eax, dil
mov edi, dword [rsp + 0x24]
je 0x140047c99
or byte [rax + rbp + 0x74], 1
jmp 0x140047ce6
lea rdx, [rsp + 0x98]
mov r9, rax
mov r8b, 1
mov rcx, rbx
call fcn.14001aad0
movzx edi, al
test al, al
je 0x140047b6c
movzx ebx, word [rbx]
test ebx, 0xffffff80
jne 0x140047c28
mov edx, 2
mov ecx, ebx
call fcn.1400cab28
test eax, eax
je 0x140047c28
and ebx, 0xffffffdf
cmp bx, 0x56
jne 0x140047c59
movzx ebx, word [r13 + 4]
test ebx, 0xffffff80
jne 0x140047c4e
mov edx, 2
mov ecx, ebx
call fcn.1400cab28
test eax, eax
je 0x140047c4e
and ebx, 0xffffffdf
cmp bx, 0x4b
jne 0x140047c59
mov r14b, 1
jmp 0x140047c5c
xor r14b, r14b
cmp qword [rbp + 0x10], 0
je 0x140047b7d
test r14b, r14b
jne 0x140047b7d
mov dl, 1
movzx ecx, dil
call fcn.14001b1d0
movzx r15d, ax
test ax, ax
je 0x140047b7d
mov eax, 0x100
xor r15w, ax
xor dil, dil
jmp 0x140047b7d
or byte [rax + rbp + 0x74], 2
jmp 0x140047ce6
movzx ecx, dil
movzx ebx, sil
not bl
movzx eax, bl
and al, byte [rcx + rbp + 0x74]
or al, r12b
mov byte [rcx + rbp + 0x74], al
test sil, sil
je 0x140047ce2
test r14b, r14b
jne 0x140047ce2
xor edx, edx
movzx ecx, dil
call fcn.14001b1d0
mov edi, dword [rsp + 0x24]
test ax, ax
je 0x140047ce6
movzx eax, ax
and byte [rax + rbp + 0x174], bl
jmp 0x140047ce6
mov edi, dword [rsp + 0x24]
test r15w, r15w
jne 0x140047cf3
cmp byte [rsp + 0x20], r15b
je 0x140047d0e
movzx ecx, r15w
movzx eax, sil
not al
and al, byte [rcx + rbp + 0x174]
or al, r12b
mov byte [rcx + rbp + 0x174], al
movzx ecx, byte [rsp + 0x90]
movzx ebx, byte [rsp + 0xa0]
xor edx, edx
lea r8d, [rdx + 0x7d]
movzx r12d, byte [rsp + 0xb0]
add r13, 2
cmp word [r13], 0
jne 0x140047a80
mov r14, qword [rsp + 0x48]
mov r12, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x30]
test edi, edi
je 0x140047e1b
mov eax, dword [rbp + 0x30]
cmp edi, eax
jbe 0x140047da4
test eax, eax
je 0x140047d68
mov rcx, qword [rbp + 0x28]
call fcn.1400ca100
lea ecx, [rdi + rdi + 2]
call fcn.1400c9664
mov qword [rbp + 0x28], rax
test rax, rax
jne 0x140047da1
lea r8, [0x1400e245c]
lea rdx, str.Out_of_memory.
lea rcx, [0x140119150]
call fcn.140040420
add rsp, 0x58
pop r15
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov dword [rbp + 0x30], edi
cmp word [rsi], 0
mov rbx, qword [rbp + 0x28]
je 0x140047e14
mov r13d, 0x7d
movzx eax, word [rsi]
cmp eax, 0x7b
je 0x140047dca
cmp eax, r13d
je 0x140047e0a
mov word [rbx], ax
add rbx, 2
jmp 0x140047e0a
lea rdi, [rsi + 2]
mov edx, r13d
mov rcx, rdi
call fcn.1400ca5f4
mov r11, rax
test rax, rax
je 0x140047e0a
cmp rax, rdi
jne 0x140047df3
cmp word [rax + 2], r13w
lea rcx, [rax + 2]
cmove r11, rcx
lea rax, [rsi + 4]
cmp r11, rax
jne 0x140047e07
movzx eax, word [rdi]
add rbx, 2
mov word [rbx - 2], ax
mov rsi, r11
add rsi, 2
cmp word [rsi], 0
jne 0x140047db4
xor eax, eax
mov word [rbx], ax
jmp 0x140047e39
test bl, bl
je 0x140047e39
cmp dword [rbp + 0x30], 0
je 0x140047e2e
mov rax, qword [rbp + 0x28]
mov word [rax], dx
jmp 0x140047e39
lea rax, [0x1400e245c]
mov qword [rbp + 0x28], rax
mov eax, 1
add rsp, 0x58
pop r15
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret