Function at 0x1400397a0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x60
mov rdi, rcx
mov rax, qword [0x140119028]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp byte [rcx + 0x17], 0
mov rsi, rcx
jns 0x1400397cc
mov rsi, qword [rdi]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400397ff
test al, 0x10
jne 0x1400398f3
lea rcx, str._hs___ls_directory_conflicts_with_an_existing_file.___n
lea rdx, str.RecursiveDirectoryCreate
mov r8, rsi
call fcn.140039a00
xor edi, edi
jmp 0x1400399ce
xorps xmm0, xmm0
movaps xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], 0
movzx r9d, byte [rdi + 0x17]
mov rax, rdi
test r9b, r9b
jns 0x140039824
mov rax, qword [rdi]
mov r9, qword [rdi + 8]
add r9, r9
test r9, r9
je 0x140039885
movzx ecx, word [rax + r9 - 2]
add r9, 0xfffffffffffffffe
cmp ecx, 0x5c
je 0x140039840
cmp ecx, 0x2f
jne 0x140039827
cmp r9, 0xfffffffffffffffe
je 0x140039885
sar r9, 1
lea rax, [rdi + 0x18]
mov qword [rsp + 0x20], rax
lea rbx, [rsp + 0x28]
mov rcx, rbx
mov rdx, rdi
xor r8d, r8d
call fcn.1400309f0
movups xmm0, xmmword [rbx]
lea rcx, [rsp + 0x40]
movaps xmmword [rcx], xmm0
mov rax, qword [rbx + 0x10]
mov qword [rcx + 0x10], rax
call fcn.1400397a0
test al, al
je 0x140039911
mov rcx, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dil, 1
test eax, eax
jne 0x1400399bd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
cmp eax, 0xb7
jne 0x1400399a9
movabs rbp, 0x7fffffffffffffef
mov rcx, rsi
call fcn.1400a8f50
cmp rax, rbp
ja 0x1400399ec
mov rbx, rax
cmp rax, 0xb
jae 0x140039922
lea r15, [rsp + 0x28]
mov byte [r15 + 0x17], bl
cmp rbx, 3
jne 0x14003994e
movzx eax, word [rsi + 4]
mov word [rsp + 0x2c], ax
mov eax, dword [rsi]
mov dword [rsp + 0x28], eax
jmp 0x140039964
lea rcx, str._hs___ls_directory_exists___n
lea rdx, str.RecursiveDirectoryCreate
mov r8, rsi
call fcn.140039a00
mov dil, 1
jmp 0x1400399ce
lea rcx, str.Failed_to_create_one_of_the_parent_directories
call fcn.140039a00
jmp 0x1400399bb
lea r12, [rbx + 8]
and r12, 0xfffffffffffffff8
lea rcx, [r12 + r12]
call fcn.1400897bc
mov r15, rax
mov qword [rsp + 0x28], rax
add rbp, 0x11
or rbp, r12
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x30], rbx
jmp 0x140039953
test rbx, rbx
je 0x140039964
mov r8, rbx
add r8, rbx
mov rcx, r15
mov rdx, rsi
call fcn.14008c580
mov word [r15 + rbx*2], 0
cmp byte [rsp + 0x3f], 0
jns 0x140039979
mov rcx, qword [rsp + 0x28]
jmp 0x14003997e
lea rcx, [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp eax, 0xffffffff
setne al
and ebx, 0x10
shr ebx, 4
and bl, al
cmp byte [rsp + 0x3f], 0
jns 0x1400399a5
mov rcx, qword [rsp + 0x28]
call fcn.1400897f8
test bl, bl
jne 0x1400399bd
lea rcx, str.Failed_to_create_directory__ls__last_error_is__d_n
mov rdx, rsi
mov r8d, r14d
call fcn.140039a00
xor edi, edi
cmp byte [rsp + 0x57], 0
jns 0x1400399ce
mov rcx, qword [rsp + 0x40]
call fcn.1400897f8
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14008ab00
mov eax, edi
add rsp, 0x60
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
call fcn.1400a1f00
int3