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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x560]
sub rsp, 0x660
mov rax, qword [0x140451b38]
xor rax, rsp
mov qword [rbp + 0x550], rax
xor r13d, r13d
mov r12, rdx
mov r9, rcx
test rcx, rcx
je 0x1400cacab
mov ecx, 0x104
mov rax, r9
mov r8d, ecx
cmp word [rax], r13w
je 0x1400ca9c4
add rax, 2
sub r8, 1
jne 0x1400ca9b4
mov rax, r8
neg rax
mov rax, r8
sbb ebx, ebx
sub rcx, r8
not ebx
and ebx, 0x80070057
neg rax
sbb rdi, rdi
and rdi, rcx
mov ecx, ebx
test r8, r8
je 0x1400cacb2
lea rax, [rsp + 0x20]
mov edx, 0x105
sub r9, rax
lea rcx, [rsp + 0x20]
lea rax, [rdx + 0x7ffffef9]
test rax, rax
je 0x1400caa23
movzx eax, word [r9 + rcx]
test ax, ax
je 0x1400caa23
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x1400caa00
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r13w
mov rax, rdx
neg rax
sbb ebx, ebx
not ebx
and ebx, 0x8007007a
test rdx, rdx
jne 0x1400caa4e
mov ecx, ebx
jmp 0x1400cacb2
lea rax, [rdi - 1]
mov ecx, 0x80070216
cmp rax, rdi
ja 0x1400caa64
mov rdi, rax
mov ebx, r13d
jmp 0x1400caa6b
mov ebx, ecx
call fcn.14007ac40
mov ecx, ebx
call fcn.14007ace8
test ebx, ebx
js 0x1400caa47
add rdi, rdi
mov ecx, 0x5c
cmp word [rsp + rdi + 0x20], cx
jne 0x1400caa98
cmp rdi, 0x20a
jae 0x1400caced
mov word [rsp + rdi + 0x20], r13w
cmp word [rsp + 0x20], cx
lea rdi, [rsp + 0x20]
lea rax, [rsp + 0x22]
mov word [rbp + 0x340], r13w
cmove rdi, rax
mov r15d, r13d
mov edx, ecx
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_wcschr]
mov r14, rax
test rax, rax
jne 0x1400cab38
lea rax, [rbp + 0x130]
mov r8, rdi
sub r8, rax
lea rcx, [rbp + 0x130]
mov edx, 0x105
lea rax, [rdx + 0x7ffffef9]
test rax, rax
je 0x1400cab05
movzx eax, word [r8 + rcx]
test ax, ax
je 0x1400cab05
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x1400caae2
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r13w
mov rax, rdx
neg rax
sbb ebx, ebx
not ebx
and ebx, 0x8007007a
test rdx, rdx
je 0x1400caa47
mov r15d, 1
jmp 0x1400cabd7
mov rcx, r14
sub rcx, rdi
sar rcx, 1
cmp rcx, 0x7ffffffe
ja 0x1400caca0
lea rax, [rbp + 0x130]
mov r9, rdi
sub r9, rax
lea rdx, [rbp + 0x130]
mov r8d, 0x105
lea rax, [r8 - 0x105]
add rax, rcx
je 0x1400cab8b
movzx eax, word [r9 + rdx]
test ax, ax
je 0x1400cab8b
mov word [rdx], ax
add rdx, 2
sub r8, 1
jne 0x1400cab68
test r8, r8
lea rax, [rdx - 2]
cmovne rax, rdx
mov word [rax], r13w
mov rax, r8
neg rax
sbb ebx, ebx
not ebx
and ebx, 0x8007007a
mov eax, ebx
test r8, r8
je 0x1400caca7
cmp r14, rdi
jb 0x1400cac99
add rcx, rcx
cmp rcx, 0x20a
jae 0x1400caced
mov word [rbp + rcx + 0x130], r13w
lea r8, [rbp + 0x130]
mov edx, 0x105
lea rcx, [rbp + 0x340]
call fcn.1400caeb0
mov ebx, eax
test eax, eax
js 0x1400caca7
lea rcx, [rbp + 0x340]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400cac0f
test al, 0x10
jne 0x1400cac3d
mov eax, r15d
lea rcx, [rbp + 0x340]
neg eax
sbb rdx, rdx
and rdx, r12
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x1400cac72
lea rcx, [rbp + 0x340]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400cac72
test r14, r14
je 0x1400cac64
lea r8, [0x1403d9ef0]
mov edx, 0x105
lea rcx, [rbp + 0x340]
lea rdi, [r14 + 2]
call fcn.1400caeb0
mov ebx, eax
test eax, eax
js 0x1400caca7
test r15d, r15d
jne 0x1400cacb7
lea ecx, [r15 + 0x5c]
jmp 0x1400caab6
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1400cac86
mov ebx, 0x80004005
jmp 0x1400caa47
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1400caa47
mov ecx, 0x80070216
jmp 0x1400cacb0
mov eax, 0x80070057
mov ebx, eax
mov ecx, eax
jmp 0x1400cacb2
mov ecx, 0x80070057
mov ebx, ecx
call fcn.14007ac40
mov ecx, ebx
call fcn.14007ace8
mov eax, ebx
mov rcx, qword [rbp + 0x550]
xor rcx, rsp
call fcn.140388a40
lea r11, [rsp + 0x660]
mov rbx, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.140388ce8
int3