Function at 0x140057350
Capabilities:
Get keyboard layout

Disassembly:
mov byte [rsp + 0x20], r9b
mov byte [rsp + 0x18], r8b
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
xor edi, edi
movzx esi, r9b
mov dword [rsp + 0x38], edi
mov rbx, rcx
mov word [rsp + 0x36], di
movzx r13d, di
mov r15d, edi
test r8b, r8b
je 0x14005739b
cmp byte [rcx + 0x64], dil
je 0x14005739b
mov cl, 1
jmp 0x14005739d
xor cl, cl
mov r12, rdx
mov byte [rsp + 0x30], cl
cmp word [rdx], di
je 0x14005786f
mov r14, qword [rsp + 0xa0]
mov edx, 0x7d
mov qword [rsp + 0x58], rbp
movzx ebp, byte [rsp + 0xb0]
nop word [rax + rax]
mov word [rsp + 0x34], di
movzx eax, word [r12]
cmp ax, 0x7b
je 0x140057544
cmp ax, 0x7d
je 0x14005775c
test cl, cl
je 0x1400573ff
inc r15d
mov dword [rsp + 0x38], r15d
jmp 0x14005775c
xor ecx, ecx
mov word [rsp + 0x34], ax
mov byte [rsp + 0x31], 0
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp word [rsp + 0x34], 0
jne 0x140057426
xor bl, bl
xor bpl, bpl
xor r15b, r15b
jmp 0x1400576a2
movzx ecx, word [rsp + 0x36]
test cx, cx
jne 0x140057453
movzx ecx, word [rsp + 0x34]
lea rdx, [rsp + 0x31]
mov r9b, 1
mov r8, rax
call fcn.1400222e0
xor bpl, bpl
movzx ebx, al
xor r15b, r15b
jmp 0x1400576a2
movzx ebx, word [rsp + 0x34]
test ebx, 0xffffff80
je 0x140057464
mov edx, edi
jmp 0x140057477
mov edx, 2
mov ecx, ebx
call fcn.1400d7464
movzx ecx, word [rsp + 0x36]
mov edx, eax
movzx eax, bx
mov ebp, 0xffdf
and ax, bp
test edx, edx
cmove ax, bx
cmp ax, 0x56
jne 0x1400574ee
movzx ebx, cx
test ebx, 0xffffff80
je 0x14005749d
mov ecx, edi
jmp 0x1400574ab
mov edx, 2
mov ecx, ebx
call fcn.1400d7464
mov ecx, eax
movzx eax, bx
and ax, bp
test ecx, ecx
cmove ax, bx
cmp ax, 0x4b
jne 0x1400574ee
mov r8d, reloc.WSOCK32.dll_recv
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x38]
call fcn.1400d2570
movzx ecx, al
mov ebx, edi
mov rax, qword [rsp + 0x40]
cmp word [rax], 0
cmove ebx, ecx
xor bpl, bpl
xor r15b, r15b
jmp 0x1400576a2
lea rbp, str.Numpad0
mov rbx, rbp
nop dword [rax + rax]
mov rcx, qword [rbx]
lea rdx, [rsp + 0x34]
call fcn.1400d0944
test eax, eax
je 0x140057531
inc rdi
lea rax, [0x1401303c0]
add rbx, 0x10
cmp rbx, rax
jl 0x140057500
xor bl, bl
xor bpl, bpl
xor r15b, r15b
jmp 0x1400576a2
add rdi, rdi
movzx ebx, byte [rbp + rdi*8 + 8]
xor bpl, bpl
xor r15b, r15b
jmp 0x1400576a2
lea rcx, [r12 + 2]
call fcn.1400cbb24
mov rsi, rax
test rax, rax
je 0x140057752
sub rax, r12
sar rax, 1
sub rax, 1
jne 0x140057576
add rsi, 2
cmp word [rsi], 0x7d
jne 0x140057752
jmp 0x14005757c
cmp rax, 1
jne 0x14005759d
movzx ecx, byte [rsp + 0x30]
test cl, cl
je 0x140057592
inc r15d
mov dword [rsp + 0x38], r15d
jmp 0x140057757
movzx eax, word [r12 + 2]
mov word [rsp + 0x34], ax
xor eax, eax
xor r15b, r15b
xor ecx, ecx
mov word [rsi], ax
mov byte [rsp + 0x32], r15b
mov byte [rsp + 0x31], al
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov r8b, 1
lea rdx, [rsp + 0x31]
lea rcx, [r12 + 2]
mov qword [rsp + 0x20], rax
call fcn.140022190
movzx ebx, al
test al, al
je 0x140057679
movzx edi, word [r12 + 2]
test edi, 0xffffff80
je 0x1400575ec
xor edx, edx
mov ecx, edx
jmp 0x1400575fc
mov edx, 2
mov ecx, edi
call fcn.1400d7464
mov ecx, eax
xor edx, edx
movzx eax, di
mov ebp, 0xffdf
and ax, bp
test ecx, ecx
cmove ax, di
cmp ax, 0x56
jne 0x14005764a
movzx edi, word [r12 + 4]
test edi, 0xffffff80
je 0x140057625
mov ecx, edx
jmp 0x140057633
mov edx, 2
mov ecx, edi
call fcn.1400d7464
mov ecx, eax
movzx eax, di
and ax, bp
test ecx, ecx
cmove ax, di
cmp ax, 0x4b
jne 0x14005764a
mov bpl, 1
jmp 0x14005764d
xor bpl, bpl
cmp qword [r14 + 0x10], 0
je 0x140057692
test bpl, bpl
jne 0x140057692
mov dl, 1
movzx ecx, bl
call fcn.140022f70
movzx r13d, ax
test ax, ax
je 0x140057692
mov eax, 0x100
xor r13w, ax
xor bl, bl
jmp 0x140057692
lea rdx, [rsp + 0x32]
lea rcx, [r12 + 2]
call fcn.140022070
movzx r15d, byte [rsp + 0x32]
movzx r13d, ax
mov word [rsi], 0x7d
mov r12, rsi
movzx esi, byte [rsp + 0xb8]
test bl, bl
je 0x14005771e
movzx ecx, word [rsp + 0x34]
test cx, cx
je 0x1400576d8
cmp byte [rsp + 0xb0], 0
je 0x1400576d8
call qword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x1400576d8
test byte [rsp + 0x31], 0x30
movzx ecx, bl
sete al
inc al
or byte [rcx + r14 + 0x74], al
jmp 0x14005771e
movzx edx, byte [rsp + 0xc0]
movzx edi, sil
movzx ecx, bl
not dil
movzx eax, dil
and al, byte [rcx + r14 + 0x74]
or al, dl
mov byte [rcx + r14 + 0x74], al
test sil, sil
je 0x140057726
test bpl, bpl
jne 0x140057726
xor edx, edx
movzx ecx, bl
call fcn.140022f70
test ax, ax
je 0x14005771e
movzx eax, ax
and byte [rax + r14 + 0x174], dil
movzx edx, byte [rsp + 0xc0]
test r13w, r13w
jne 0x140057731
test r15b, r15b
je 0x14005774d
movzx ecx, r13w
movzx eax, sil
not al
and al, byte [rcx + r14 + 0x174]
or al, dl
mov byte [rcx + r14 + 0x174], al
mov r15d, dword [rsp + 0x38]
movzx ecx, byte [rsp + 0x30]
xor edi, edi
lea edx, [rdi + 0x7d]
movzx esi, byte [rsp + 0xb8]
add r12, 2
cmp word [r12], 0
jne 0x1400573d0
mov rbp, qword [rsp + 0x58]
mov r14, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0xa0]
test r15d, r15d
je 0x140057866
mov eax, dword [rbx + 0x30]
cmp r15d, eax
jbe 0x1400577eb
test eax, eax
je 0x1400577a7
mov rcx, qword [rbx + 0x28]
call fcn.1400d29a8
lea ecx, [r15*2 + 2]
call fcn.1400d29a0
mov qword [rbx + 0x28], rax
test rax, rax
jne 0x1400577e7
lea r8, [0x1400fb87c]
lea rdx, str.Out_of_memory.
lea rcx, [0x140136640]
call fcn.1400515e0
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov dword [rbx + 0x30], r15d
movzx eax, word [r14]
mov rbx, qword [rbx + 0x28]
test ax, ax
je 0x14005785f
mov r12d, 0x7d
nop
cmp ax, 0x7b
je 0x140057815
cmp ax, r12w
je 0x140057851
mov word [rbx], ax
add rbx, 2
jmp 0x140057851
lea rdi, [r14 + 2]
mov edx, r12d
mov rcx, rdi
call fcn.1400cbb24
test rax, rax
je 0x140057851
cmp rax, rdi
jne 0x14005783b
cmp word [rax + 2], r12w
lea rcx, [rax + 2]
cmove rax, rcx
lea rcx, [r14 + 4]
cmp rax, rcx
jne 0x14005784e
movzx ecx, word [rdi]
mov word [rbx], cx
add rbx, 2
mov r14, rax
movzx eax, word [r14 + 2]
add r14, 2
test ax, ax
jne 0x140057800
xor eax, eax
mov word [rbx], ax
jmp 0x14005788e
movzx r8d, byte [rsp + 0xb0]
test r8b, r8b
je 0x14005788e
cmp dword [rbx + 0x30], 0
je 0x140057883
mov rax, qword [rbx + 0x28]
mov word [rax], di
jmp 0x14005788e
lea rax, [0x1400fb87c]
mov qword [rbx + 0x28], rax
mov eax, 1
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret