Function at 0x140005940
Capabilities:
Create directory
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x320
mov rax, qword [0x14000b110]
xor rax, rsp
mov qword [rsp + 0x310], rax
mov qword [rsp + 0xa0], rsp
mov rdi, rcx
xor esi, esi
mov word [rsp + 0xb0], si
xor edx, edx
lea r8d, [rsi + 0x4e]
lea rcx, [rsp + 0xb2]
call sub.msvcrt.dll_memset
mov word [rsp + 0x100], si
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x102]
call sub.msvcrt.dll_memset
mov qword [rsp + 0x90], rsi
mov word [rsp + 0x70], si
xor eax, eax
mov qword [rsp + 0x72], rax
mov dword [rsp + 0x7a], eax
mov word [rsp + 0x7e], ax
mov dword [rsp + 0x64], 0xa
mov dword [rsp + 0x68], 1
mov qword [rsp + 0x88], rsi
cmp rdi, rsi
jne 0x1400059ed
mov eax, 0x80070057
jmp 0x140005c0c
lea r9, [rsp + 0x64]
lea r8, [rsp + 0x90]
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x88]
call fcn.140005764
mov ebx, eax
mov dword [rsp + 0x60], eax
cmp eax, esi
jne 0x140005c03
cmp dword [rsp + 0x68], esi
jne 0x140005a2e
mov ebx, 1
mov dword [rsp + 0x60], ebx
jmp 0x140005c03
mov r9, qword [rsp + 0x88]
cmp r9, rsi
je 0x140005a6f
lea rcx, [0x1400024d0]
mov rdx, qword [r9]
cmp rdx, qword [rcx]
jne 0x140005a58
mov rdx, qword [r9 + 8]
cmp rdx, qword [rcx + 8]
jne 0x140005a58
mov eax, esi
jmp 0x140005a5d
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, esi
jne 0x140005a6f
mov ebx, 1
mov dword [rsp + 0x60], ebx
jmp 0x140005c03
mov r8d, 0x28
lea rdx, [rsp + 0xb0]
mov rcx, r9
call qword [sym.imp.ole32.dll_StringFromGUID2]
mov ebx, 0x104
mov r8d, ebx
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, esi
jne 0x140005ae6
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
cmp eax, esi
cmovle ecx, eax
mov dword [rsp + 0x80], ecx
lea rdx, [0x140005ada]
mov rcx, qword [rsp + 0xa0]
call sub.msvcrt.dll__local_unwind
nop
nop
nop
mov eax, dword [rsp + 0x80]
jmp 0x140005c0c
cmp eax, ebx
jbe 0x140005b16
mov dword [rsp + 0x98], 0x8007006f
lea rdx, [0x140005b0c]
mov rcx, qword [rsp + 0xa0]
call sub.msvcrt.dll__local_unwind
nop
nop
nop
mov eax, 0x8007006f
jmp 0x140005c0c
mov r8d, dword [rsp + 0x64]
lea rdx, [rsp + 0x100]
lea rcx, [rsp + 0xb0]
call fcn.1400053a0
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
mov word [rdi + 0x208], si
movzx eax, word [rsp + 0x7c]
movzx ecx, word [rsp + 0x7a]
movzx r8d, word [rsp + 0x78]
movzx r9d, word [rsp + 0x76]
movzx r10d, word [rsp + 0x72]
movzx r11d, word [rsp + 0x70]
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x48], ecx
mov dword [rsp + 0x40], r8d
mov dword [rsp + 0x38], r9d
mov dword [rsp + 0x30], r10d
mov dword [rsp + 0x28], r11d
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x100]
lea r8, [0x140002780]
mov rdx, rbx
mov rcx, rdi
call fcn.140003e48
mov ebx, eax
mov dword [rsp + 0x60], eax
cmp eax, esi
jl 0x140005c03
xor edx, edx
lea rcx, [rsp + 0x100]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
mov r9, rdi
lea rdx, [0x1400027d0]
lea rcx, [0x140002810]
call fcn.1400055f0
mov ebx, eax
mov dword [rsp + 0x60], eax
cmp eax, esi
jl 0x140005c03
xor edx, edx
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__waccess]
mov ecx, 0x80004005
cmp eax, esi
cmovne ebx, ecx
mov dword [rsp + 0x60], ebx
jmp 0x140005c0a
mov eax, ebx
mov rcx, qword [rsp + 0x310]
xor rcx, rsp
call fcn.1400084d0
lea r11, [rsp + 0x320]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret