Function at 0x140004860
Capabilities:
Create directory
Query environment variable
Write file on windows

Disassembly:
test rcx, rcx
je 0x140004d02
mov rax, rsp
push rbp
push rdi
lea rbp, [rax - 0x448]
sub rsp, 0x538
mov qword [rax + 0x18], rbx
mov rdi, rcx
mov rbx, qword [rcx + 0x28]
mov qword [rax - 0x20], r12
mov r12, qword [rcx + 0x20]
mov dword [rcx + 0x48], 0
mov ecx, 0x120
mov qword [rbp + 0x450], rbx
call fcn.140012d48
test rax, rax
je 0x140004ce9
mov ecx, dword [rdi + 0x38]
add r12, 8
mov r9d, dword [rdi + 0x3c]
test rbx, rbx
mov dword [rsp + 0x20], ecx
mov rcx, rax
sete r8b
mov qword [rsp + 0x518], r14
mov edx, dword [r12]
call fcn.140009f90
mov r14, rax
test rax, rax
je 0x140004ce1
mov qword [rsp + 0x530], rsi
mov rcx, rax
mov qword [rsp + 0x520], r13
mov qword [rsp + 0x510], r15
call fcn.14000a3f0
mov rsi, 0xffffffffffffffff
mov r13, rax
mov r15, rsi
inc r15
cmp byte [r15 + rax], 0
jne 0x140004913
mov eax, 0x80
lea rcx, [rbp + 0x310]
inc r15
mov r8d, 0x100
cmp r15, rax
cmova r15, rax
xor edx, edx
call fcn.140013e20
xorps xmm0, xmm0
lea rcx, [rsp + 0x50]
movups xmmword [rsp + 0x50], xmm0
dec rcx
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140004962
mov eax, dword [0x140060dd8]
lea rdx, [rbp + 0x310]
movsd xmm0, qword [str._SystemRoot_]
mov r8d, 0x100
movsd qword [rcx], xmm0
mov dword [rcx + 8], eax
movzx eax, byte [0x140060ddc]
mov byte [rcx + 0xc], al
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea rcx, [rbp + 0x310]
dec rcx
nop dword [rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400049b0
movzx eax, word [0x140060df0]
xor edx, edx
movups xmm0, xmmword [str.System32AMDReal]
movups xmmword [rcx], xmm0
mov word [rcx + 0x10], ax
movzx eax, byte [0x140060df2]
mov byte [rcx + 0x12], al
lea rcx, [rbp + 0x310]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x1400049ff
cmp eax, 0xb7
jne 0x140004cb4
mov ebx, 0x80
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], ebx
xor r9d, r9d
mov rcx, r13
mov dword [rsp + 0x20], 2
lea edx, [rbx - 0x7c]
lea r8d, [rbx - 0x7f]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rdi + 0x40], rax
cmp rax, rsi
je 0x140004cb4
xor edx, edx
lea rcx, [rbp - 0x5c]
mov r8d, 0x36b
call fcn.140013e20
lea rcx, [rbp - 0x5c]
mov dword [rbp - 0x60], 0x4000a
lea eax, [rbx - 0x7c]
nop dword [rax + rax]
movups xmm0, xmmword [r12]
movups xmm1, xmmword [r12 + 0x10]
movups xmmword [rcx], xmm0
movups xmm0, xmmword [r12 + 0x20]
movups xmmword [rcx + 0x10], xmm1
movups xmm1, xmmword [r12 + 0x30]
movups xmmword [rcx + 0x20], xmm0
movups xmm0, xmmword [r12 + 0x40]
movups xmmword [rcx + 0x30], xmm1
movups xmm1, xmmword [r12 + 0x50]
movups xmmword [rcx + 0x40], xmm0
movups xmm0, xmmword [r12 + 0x60]
movups xmmword [rcx + 0x50], xmm1
movups xmm1, xmmword [r12 + 0x70]
add r12, rbx
movups xmmword [rcx + 0x60], xmm0
add rcx, rbx
movups xmmword [rcx - 0x10], xmm1
sub rax, 1
jne 0x140004a60
mov rax, qword [r12 + 0x10]
movups xmm0, xmmword [r12]
movups xmmword [rcx], xmm0
mov qword [rcx + 0x10], rax
mov rax, qword [rbp + 0x450]
test rax, rax
je 0x140004b02
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x1bc], xmm0
movsd xmm0, qword [rax + 0x20]
mov eax, dword [rax + 0x28]
movsd qword [rbp + 0x1dc], xmm0
mov dword [rbp + 0x1e4], eax
movups xmmword [rbp + 0x1cc], xmm1
mov eax, dword [rdi + 0x38]
lea rcx, [rsp + 0x40]
mov dword [rbp + 0x1e8], eax
xorps xmm0, xmm0
mov eax, dword [rdi + 0x3c]
mov dword [rbp + 0x1ec], eax
movups xmmword [rsp + 0x40], xmm0
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [rsp + 0x40]
mov rcx, qword [rdi + 0x68]
mov word [rbp + 0x1f0], ax
movzx eax, word [rsp + 0x42]
mov word [rbp + 0x1f2], ax
movzx eax, word [rsp + 0x46]
mov word [rbp + 0x1f4], ax
movzx eax, word [rsp + 0x48]
mov word [rbp + 0x1f6], ax
movzx eax, word [rsp + 0x4a]
mov word [rbp + 0x1f8], ax
movzx eax, word [rsp + 0x4c]
mov word [rbp + 0x1fa], ax
mov byte [rbp + 0x1fe], 1
mov dword [rbp + 0x1ff], 1
mov dword [rbp + 0x203], 1
mov dword [rbp + 0x207], 4
test rcx, rcx
je 0x140004c4a
call fcn.14000a3f0
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov edx, 0x40000000
mov rcx, rax
mov dword [rsp + 0x20], 4
mov rbx, rax
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r12, rax
cmp rax, rsi
je 0x140004c4a
xor r9d, r9d
xor r8d, r8d
mov edx, 0x26b
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
lea r9, [rbp + 0x458]
mov r8d, r15d
mov dword [rbp + 0x458], eax
mov rdx, r13
mov qword [rsp + 0x20], rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
inc rsi
cmp byte [rbx + rsi], 0
jne 0x140004c20
inc rsi
lea rcx, [rbp + 0x28b]
mov eax, 0x80
mov rdx, rbx
cmp rsi, rax
cmova rsi, rax
mov r8, rsi
call fcn.140014470
mov rcx, qword [rdi + 0x40]
lea r9, [rbp + 0x450]
xor esi, esi
lea rdx, [rbp - 0x60]
mov r8d, 0x36f
mov dword [rbp + 0x450], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140004cb4
mov eax, dword [rbp + 0x450]
mov dword [rdi + 0x48], eax
cmp qword [rdi + 0x68], rsi
jne 0x140004c99
mov qword [rdi + 0x60], r14
mov qword [rdi + 0x68], r14
mov qword [r14], rsi
mov qword [r14 + 8], rsi
inc dword [rdi + 0x70]
jmp 0x140004cc9
mov qword [r14], rsi
mov rax, qword [rdi + 0x68]
mov qword [r14 + 8], rax
mov rax, qword [rdi + 0x68]
mov qword [rax], r14
inc dword [rdi + 0x70]
mov qword [rdi + 0x68], r14
jmp 0x140004cc9
mov rcx, r14
call fcn.14000a1d0
mov edx, 0x120
mov rcx, r14
call fcn.140012d84
mov rsi, qword [rsp + 0x530]
mov r13, qword [rsp + 0x520]
mov r15, qword [rsp + 0x510]
mov r14, qword [rsp + 0x518]
mov rbx, qword [rsp + 0x560]
mov r12, qword [rsp + 0x528]
add rsp, 0x538
pop rdi
pop rbp
ret