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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rbp
push rsi
push rdi
push r13
push r14
sub rsp, 0x340
xor esi, esi
mov rbx, rdx
mov rdi, rcx
mov qword [rax + 0x20], rsi
call fcn.140050588
cmp al, sil
setne al
mov byte [rbx], al
cmp al, sil
jne 0x140064a4e
xor eax, eax
jmp 0x140064cfe
lea r8, [rsp + 0x378]
xor edx, edx
mov rcx, rdi
mov word [rsp + 0x70], si
mov dword [rsp + 0x378], esi
mov dword [rsp + 0x380], esi
call fcn.14001204c
mov rbx, rax
cmp rax, rsi
je 0x140064a47
lea rcx, [rsp + 0x50]
xor edx, edx
call fcn.1400588f8
lea rcx, [rsp + 0x40]
call fcn.14004bc1c
mov eax, dword [rsp + 0x378]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x50]
xor r8d, r8d
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x5c], eax
mov dword [rsp + 0x48], esi
mov dword [rsp + 0x4c], esi
mov qword [rsp + 0x50], rbx
call fcn.14005062c
cmp dword [rsp + 0x48], esi
jle 0x140064ce7
lea r14, [0x1400f2c58]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.14004a964
mov rax, qword [0x1400f23f0]
mov ebx, 0xfffffffd
cmp rax, rsi
je 0x140064b04
xor ecx, ecx
call rax
mov ebx, eax
cmp eax, esi
je 0x140064b04
cmp eax, 1
jne 0x140064b04
call qword [0x1400f23f8]
mov edx, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call fcn.14004aa1c
mov rdi, rax
cmp rax, rsi
je 0x140064b42
mov r8, qword [rax]
lea rdx, [rsp + 0x388]
mov rcx, rax
call qword [r8 + 0x18]
mov rbp, qword [rsp + 0x388]
cmp rbp, rsi
jne 0x140064b4f
mov rdx, qword [rdi]
mov rcx, rdi
call qword [rdx + 0x10]
mov rbp, qword [rsp + 0x388]
cmp rbp, rsi
je 0x140064b72
mov rax, qword [0x1400f23f8]
cmp rax, rsi
je 0x140064b61
cmp ebx, esi
jne 0x140064b61
call rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, rbp
jmp 0x140064ce7
mov edi, 0x104
lea rdx, [rsp + 0x70]
lea rcx, [0x1400d64f0]
mov r8d, edi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, esi
jg 0x140064bc9
lea rdx, [rsp + 0x70]
lea rcx, [0x1400d64e0]
mov r8d, edi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, esi
jg 0x140064bc9
mov rax, qword [0x1400f23f8]
cmp rax, rsi
je 0x140064bbb
cmp ebx, esi
jne 0x140064bbb
call rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140064ce7
cdqe
mov qword [rsp + 0x60], rsi
mov ebp, 0x63
lea r13, [rsp + rax*2 + 0x70]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
call fcn.1400475f0
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], rsi
mov dword [rsp + 0x30], 0x80
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x60]
mov r9d, 5
mov r8d, 0x40000000
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], rsi
call fcn.1400034e0
mov rdi, qword [rsp + 0x60]
cmp rdi, rsi
jne 0x140064c59
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
sub ebp, 1
jns 0x140064bda
jmp 0x140064ba9
mov r8d, dword [rsp + 0x48]
mov rdx, qword [rsp + 0x40]
lea r9, [rsp + 0x380]
mov rcx, rdi
mov dword [rsp + 0x380], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp rdi, 0xffffffffffffffff
je 0x140064c8f
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0x70]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov dword [rsp + 0x28], 0x10
mov dword [rsp + 0x20], esi
call qword [sym.imp.USER32.dll_LoadImageW]
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x388], rax
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rax, qword [0x1400f23f8]
mov rdi, qword [rsp + 0x388]
cmp rax, rsi
je 0x140064cdb
cmp ebx, esi
jne 0x140064cdb
call rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, rdi
lea rcx, [rsp + 0x40]
call fcn.140044f24
lea rcx, [rsp + 0x50]
call fcn.140044f24
mov rax, rsi
mov rbx, qword [rsp + 0x370]
add rsp, 0x340
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret