Function at 0x14005ef68
Capabilities:
Delete file
Query environment variable
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x310
xor r13d, r13d
mov rbp, rcx
cmp qword [rcx + 8], r13
mov qword [rax + 0x10], r13
jg 0x14005ef94
xor eax, eax
jmp 0x14005f1e0
lea rcx, [0x140107de8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.1400549bc
mov rax, qword [0x140107508]
mov ebx, 0xfffffffd
cmp rax, r13
je 0x14005efcd
xor ecx, ecx
call rax
mov ebx, eax
cmp eax, r13d
je 0x14005efcd
cmp eax, 1
jne 0x14005efcd
call qword [0x140107510]
mov edx, dword [rbp + 8]
mov rcx, qword [rbp]
call fcn.140054a74
mov rsi, rax
cmp rax, r13
je 0x14005f00d
mov r8, qword [rax]
lea rdx, [rsp + 0x348]
mov rcx, rax
call qword [r8 + 0x18]
mov rdi, qword [rsp + 0x348]
cmp rdi, r13
jne 0x14005f1bd
mov rdx, qword [rsi]
mov rcx, rsi
call qword [rdx + 0x10]
mov rdi, qword [rsp + 0x348]
cmp rdi, r13
jne 0x14005f1bd
mov edi, 0x104
lea rdx, [rsp + 0x40]
lea rcx, [0x1400e97e0]
mov r8d, edi
mov word [rsp + 0x40], r13w
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r13d
jg 0x14005f078
lea rdx, [rsp + 0x40]
lea rcx, [0x1400e97d0]
mov r8d, edi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r13d
jg 0x14005f078
mov rax, qword [0x140107510]
cmp rax, r13
je 0x14005f070
cmp ebx, r13d
jne 0x14005f070
call rax
mov rdi, r13
jmp 0x14005f1d0
cdqe
mov qword [rsp + 0x350], r13
mov esi, 0x63
lea r12, [rsp + rax*2 + 0x40]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
call fcn.1400512e8
add edi, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, str.pecmd_bmp._lu._lu.tmp
mov r9d, edi
mov rcx, r12
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfW]
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x30], 0x80
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x350]
mov r9d, 5
mov r8d, 0x40000000
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], r13
call fcn.140003590
mov rdi, qword [rsp + 0x350]
cmp rdi, r13
jne 0x14005f111
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
sub esi, 1
jns 0x14005f08c
jmp 0x14005f05d
mov r8d, dword [rbp + 8]
mov rdx, qword [rbp]
lea r9, [rsp + 0x340]
mov rcx, rdi
mov dword [rsp + 0x340], r13d
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp rdi, 0xffffffffffffffff
je 0x14005f146
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov dword [rsp + 0x28], 0x10
mov dword [rsp + 0x20], r13d
call qword [sym.imp.USER32.dll_LoadImageW]
mov qword [rsp + 0x348], rax
cmp rax, r13
jne 0x14005f1aa
lea rcx, [rsp + 0x40]
call fcn.14005e8f0
mov rdi, rax
cmp rax, r13
je 0x14005f1aa
mov r8, qword [rax]
lea rdx, [rsp + 0x348]
mov rcx, rax
call qword [r8 + 0x18]
cmp qword [rsp + 0x348], r13
jne 0x14005f1aa
mov rdx, qword [rdi]
mov rcx, rdi
call qword [rdx + 0x10]
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdi, qword [rsp + 0x348]
mov rax, qword [0x140107510]
cmp rax, r13
je 0x14005f1d0
cmp ebx, r13d
jne 0x14005f1d0
call rax
lea rcx, [0x140107de8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, rdi
mov rbx, qword [rsp + 0x358]
add rsp, 0x310
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret