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

Disassembly:
mov rax, rsp
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x310
xor r14d, r14d
mov r12, rdx
mov rbp, rcx
cmp qword [rcx + 8], r14
mov qword [rax + 0x18], r14
jg 0x14006595a
xor eax, eax
jmp 0x140065bec
lea rcx, [0x14011bee0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.14005a678
mov rax, qword [0x14011b600]
mov ebx, 0xfffffffd
cmp rax, r14
je 0x140065993
xor ecx, ecx
call rax
mov ebx, eax
cmp eax, r14d
je 0x140065993
cmp eax, 1
jne 0x140065993
call qword [0x14011b608]
mov rdx, qword [rbp + 8]
mov rcx, qword [rbp]
call fcn.14006529c
mov rsi, rax
cmp rax, r14
je 0x1400659d4
mov r8, qword [rax]
lea rdx, [rsp + 0x360]
mov rcx, rax
call qword [r8 + 0x18]
mov rdi, qword [rsp + 0x360]
cmp rdi, r14
jne 0x140065bc9
mov rdx, qword [rsi]
mov rcx, rsi
call qword [rdx + 0x10]
mov rdi, qword [rsp + 0x360]
cmp rdi, r14
jne 0x140065bc9
mov edi, 0x104
lea rdx, [rsp + 0x40]
lea rcx, [0x1400fc890]
mov r8d, edi
mov word [rsp + 0x40], r14w
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r14d
jg 0x140065a3f
lea rdx, [rsp + 0x40]
lea rcx, [0x1400fc880]
mov r8d, edi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, r14d
jg 0x140065a3f
mov rax, qword [0x14011b608]
cmp rax, r14
je 0x140065a37
cmp ebx, r14d
jne 0x140065a37
call rax
mov rdi, r14
jmp 0x140065bdc
cdqe
mov qword [rsp + 0x368], r14
mov esi, 0x63
lea r13, [rsp + rax*2 + 0x40]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
call fcn.140056c2c
add edi, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, str.pecmd_bmp._lu._lu.tmp
mov r9d, edi
mov rcx, r13
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfW]
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], 0x80
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x368]
xor r9d, r9d
mov r8d, 0x40000000
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], r14
call fcn.1400037a8
mov rdi, qword [rsp + 0x368]
cmp rdi, r14
jne 0x140065ad5
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
sub esi, 1
jns 0x140065a53
jmp 0x140065a24
mov r8d, dword [rbp + 8]
mov rdx, qword [rbp]
lea r9, [rsp + 0x350]
mov rcx, rdi
mov dword [rsp + 0x350], r14d
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp rdi, 0xffffffffffffffff
je 0x140065b0a
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], r14d
call qword [sym.imp.USER32.dll_LoadImageW]
mov qword [rsp + 0x360], rax
cmp rax, r14
jne 0x140065bb6
lea rcx, [rsp + 0x40]
call fcn.14006512c
mov rdi, rax
cmp rax, r14
je 0x140065b70
mov r8, qword [rax]
lea rdx, [rsp + 0x360]
mov rcx, rax
call qword [r8 + 0x18]
cmp qword [rsp + 0x360], r14
jne 0x140065bb6
mov rdx, qword [rdi]
mov rcx, rdi
call qword [rdx + 0x10]
jmp 0x140065bb6
cmp r12, r14
je 0x140065bb6
lea rcx, [rsp + 0x40]
xor edx, edx
call fcn.14001d2a4
mov qword [r12], rax
cmp rax, r14
je 0x140065bb6
lea rdx, [rsp + 0x360]
xor r8d, r8d
mov rcx, rax
call qword [0x14011ad00]
cmp qword [rsp + 0x360], r14
jne 0x140065bb6
mov rcx, qword [r12]
call qword [0x14011acc8]
mov qword [r12], r14
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdi, qword [rsp + 0x360]
mov rax, qword [0x14011b608]
cmp rax, r14
je 0x140065bdc
cmp ebx, r14d
jne 0x140065bdc
call rax
lea rcx, [0x14011bee0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, rdi
add rsp, 0x310
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret