Function at 0x140007b60
Capabilities:
Create directory
Get common file path
Query environment variable
Set environment variable

Disassembly:
push r15
mov eax, 0x4028
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14000e610
sub rsp, rax
mov r14, rcx
mov r12, rdx
test rdx, rdx
je 0x140007d50
lea rcx, [0x14001336e]
call fcn.140007a30
xor r8d, r8d
mov rdx, r12
xor ecx, ecx
mov r13, rax
call fcn.140008cd0
mov rbx, rax
test rax, rax
je 0x140007e10
lea rbp, [rsp + 0x20]
mov rcx, rax
mov r8d, 0x1000
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, rbx
mov esi, eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
test esi, esi
je 0x140007de0
mov rcx, rbp
call fcn.140009050
test eax, eax
jne 0x140007d38
mov r8d, 0x1000
mov rdx, rbp
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wfullpath]
mov r15, rax
test r15, r15
je 0x140007e21
lea rsi, [rsp + 0x2020]
xor eax, eax
mov ecx, 0x400
mov edx, 0x5c
mov rdi, rsi
rep stosq qword [rdi], rax
mov rcx, r15
call sub.api_ms_win_crt_private_l1_1_0.dll_wcschr
mov rdi, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rbx, rax
test rax, rax
je 0x140007c75
nop word [rax + rax]
mov r8, rbx
mov rdx, r15
mov rcx, rsi
sub r8, r15
sar r8, 1
add r8, 1
call sub.api_ms_win_crt_string_l1_1_0.dll_wcsncpy
xor edx, edx
mov rcx, rsi
call rdi
lea rcx, [rbx + 2]
mov edx, 0x5c
call sub.api_ms_win_crt_private_l1_1_0.dll_wcschr
mov rbx, rax
test rax, rax
jne 0x140007c40
xor edx, edx
mov rcx, r15
call rdi
lea rcx, [0x140013444]
mov rdx, r15
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wputenv_s]
mov rcx, r15
mov ebx, eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
test ebx, ebx
jne 0x140007df8
mov rdx, rsi
mov ecx, 0x1000
mov edi, 5
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__getpid
lea r8, str._MEI_d
mov edx, 0x10
mov rcx, rbp
mov r9d, eax
call fcn.140007910
mov r15, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wtempnam]
mov rcx, rsi
mov rdx, rbp
call r15
mov rcx, rax
mov rbx, rax
call fcn.140008e50
test eax, eax
je 0x140007d68
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
sub edi, 1
jne 0x140007cd4
test r12, r12
je 0x140007d1e
test r13, r13
je 0x140007db0
lea rcx, [0x14001336e]
mov rdx, r13
call fcn.140007ac0
mov rcx, r13
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor eax, eax
add rsp, 0x4028
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsdup_1]
mov r15, rax
jmp 0x140007bfd
xor r13d, r13d
lea rbp, [rsp + 0x20]
lea rsi, [rsp + 0x2020]
jmp 0x140007c9e
mov rcx, r14
mov r8d, 0x1000
mov rdx, rbx
call fcn.140008b00
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
test r12, r12
je 0x140007da6
test r13, r13
je 0x140007e32
lea rcx, [0x14001336e]
mov rdx, r13
call fcn.140007ac0
mov rcx, r13
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, 1
jmp 0x140007d20
xor r8d, r8d
xor ecx, ecx
lea rdx, [0x14001336e]
call fcn.140008cd0
xor edx, edx
mov rbx, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
jmp 0x140007d1e
lea rcx, str.LOADER:_Failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
call fcn.140002b80
jmp 0x140007d1e
lea rcx, str.LOADER:_Failed_to_set_the_TMP_environment_variable._n
call fcn.140002b80
jmp 0x140007d1e
lea rcx, str.LOADER:_Failed_to_convert_runtime_tmpdir_to_a_wide_string._n
call fcn.140002b80
jmp 0x140007d1e
lea rcx, str.LOADER:_Failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.140002b80
jmp 0x140007d1e
xor r8d, r8d
xor ecx, ecx
lea rdx, [0x14001336e]
call fcn.140008cd0
xor edx, edx
mov rbx, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
jmp 0x140007da6