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

Disassembly:
test rcx, rcx
je 0x1400059e2
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 + 0x20]
mov qword [rax - 0x20], r12
mov r12, qword [rcx + 0x28]
mov dword [rcx + 0x48], 0
mov ecx, 0x120
mov qword [rbp + 0x450], rbx
call fcn.140015b40
test rax, rax
je 0x1400059c9
mov ecx, dword [rdi + 0x38]
test r12, r12
mov r9d, dword [rdi + 0x3c]
mov edx, dword [rbx + 8]
sete r8b
mov dword [rsp + 0x20], ecx
mov rcx, rax
mov qword [rsp + 0x518], r14
call fcn.14000bd90
mov r14, rax
test rax, rax
je 0x1400059c1
mov qword [rsp + 0x530], rsi
mov rcx, rax
mov qword [rsp + 0x520], r13
mov qword [rsp + 0x510], r15
call fcn.14000c1f0
mov rsi, 0xffffffffffffffff
mov r13, rax
mov r15, rsi
nop
inc r15
cmp byte [r15 + rax], 0
jne 0x1400055f0
mov eax, 0x80
lea rcx, [rbp + 0x310]
inc r15
mov r8d, 0x100
cmp r15, rax
cmova r15, rax
xor edx, edx
call fcn.140016dc0
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
nop
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140005640
mov eax, dword [0x1400723a0]
lea rdx, [rbp + 0x310]
movsd xmm0, qword [str._SystemRoot_]
mov r8d, 0x100
movsd qword [rcx], xmm0
mov dword [rcx + 8], eax
movzx eax, byte [0x1400723a4]
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 + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140005690
movzx eax, word [0x1400723b8]
xor edx, edx
movups xmm0, xmmword [str.System32AMDReal]
movups xmmword [rcx], xmm0
mov word [rcx + 0x10], ax
movzx eax, byte [0x1400723ba]
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 0x1400056df
cmp eax, 0xb7
jne 0x140005994
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 0x140005994
xor edx, edx
lea rcx, [rbp - 0x5c]
mov r8d, 0x36b
call fcn.140016dc0
mov rax, qword [rbp + 0x450]
mov dword [rbp - 0x60], 0x4000e
test rax, rax
je 0x1400057a8
add rax, 8
lea rcx, [rbp - 0x5c]
lea edx, [rbx - 0x7c]
nop dword [rax + rax]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx], xmm0
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x10], xmm1
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rcx + 0x20], xmm0
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rcx + 0x30], xmm1
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rcx + 0x40], xmm0
movups xmm0, xmmword [rax + 0x60]
movups xmmword [rcx + 0x50], xmm1
movups xmm1, xmmword [rax + 0x70]
add rax, rbx
movups xmmword [rcx + 0x60], xmm0
add rcx, rbx
movups xmmword [rcx - 0x10], xmm1
sub rdx, 1
jne 0x140005750
movups xmm0, xmmword [rax]
mov rax, qword [rax + 0x10]
movups xmmword [rcx], xmm0
mov qword [rcx + 0x10], rax
test r12, r12
je 0x1400057e0
movups xmm0, xmmword [r12]
mov eax, dword [r12 + 0x28]
movups xmm1, xmmword [r12 + 0x10]
mov dword [rbp + 0x1e4], eax
movups xmmword [rbp + 0x1bc], xmm0
movsd xmm0, qword [r12 + 0x20]
movsd qword [rbp + 0x1dc], xmm0
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 + 0x70]
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 0x14000592a
call fcn.14000c1f0
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 0x14000592a
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 dword [rax]
inc rsi
cmp byte [rbx + rsi], 0
jne 0x140005900
inc rsi
lea rcx, [rbp + 0x28b]
mov eax, 0x80
mov rdx, rbx
cmp rsi, rax
cmova rsi, rax
mov r8, rsi
call fcn.1400175f0
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 0x140005994
mov eax, dword [rbp + 0x450]
mov dword [rdi + 0x48], eax
cmp qword [rdi + 0x70], rsi
jne 0x140005979
mov qword [rdi + 0x68], r14
mov qword [rdi + 0x70], r14
mov qword [r14], rsi
mov qword [r14 + 8], rsi
inc dword [rdi + 0x78]
jmp 0x1400059a9
mov qword [r14], rsi
mov rax, qword [rdi + 0x70]
mov qword [r14 + 8], rax
mov rax, qword [rdi + 0x70]
mov qword [rax], r14
inc dword [rdi + 0x78]
mov qword [rdi + 0x70], r14
jmp 0x1400059a9
mov rcx, r14
call fcn.14000bfd0
mov edx, 0x120
mov rcx, r14
call fcn.140015b7c
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