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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [0x140173040]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rbx, r8
xor esi, esi
mov dword [rbp - 0x28], esi
mov rcx, r8
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400af769
mov qword [rbp - 0x20], rsi
lea rcx, [rbp - 0x20]
call fcn.1400055e0
nop
mov qword [rbp - 0x18], rsi
lea rcx, [rbp - 0x18]
call fcn.1400055e0
nop
lea rdi, [rsi - 1]
test rbx, rbx
jne 0x1400af577
mov r8d, esi
jmp 0x1400af58b
mov r8, rdi
nop word [rax + rax]
inc r8
cmp word [rbx + r8*2], 0
jne 0x1400af580
mov rdx, rbx
lea rcx, [rbp - 0x20]
call fcn.140005a90
mov rcx, qword [rbp - 0x20]
movsxd r14, dword [rcx - 0x10]
test r14d, r14d
js 0x1400af788
mov edx, 1
sub edx, dword [rcx - 8]
mov eax, dword [rcx - 0xc]
sub eax, r14d
or eax, edx
jge 0x1400af5ca
mov edx, r14d
lea rcx, [rbp - 0x20]
call fcn.140005a20
mov rcx, qword [rbp - 0x20]
lea eax, [r14 + 1]
movsxd rdx, eax
call fcn.140115da0
mov rax, qword [rbp - 0x20]
cmp r14d, dword [rax - 0xc]
jg 0x1400af788
mov dword [rax - 0x10], r14d
mov rax, qword [rbp - 0x20]
mov word [rax + r14*2], si
mov rcx, qword [rbp - 0x20]
cmp dword [rcx - 0x10], 0
jl 0x1400af6fd
lea rdx, [0x140147c98]
call fcn.140100b40
test rax, rax
je 0x1400af6fd
sub rax, qword [rbp - 0x20]
sar rax, 1
cmp eax, edi
je 0x1400af6fd
mov qword [rbp - 0x30], rsi
mov rdx, rbx
lea rcx, [rbp - 0x30]
call fcn.14003f460
mov dword [rbp - 0x28], 1
mov rdx, rdi
nop dword [rax]
inc rdx
cmp word [rbx + rdx*2], 0
jne 0x1400af640
test rdx, rdx
je 0x1400af680
nop
movzx eax, word [rbx + rdx*2]
cmp ax, 0x5c
je 0x1400af668
cmp ax, 0x2f
je 0x1400af668
sub rdx, 1
jne 0x1400af650
jmp 0x1400af680
test edx, edx
jle 0x1400af680
mov rax, qword [rbp - 0x30]
mov r8d, dword [rax - 0x10]
sub r8d, edx
lea rcx, [rbp - 0x30]
call fcn.14003f160
mov rax, qword [rbp - 0x30]
lea rcx, [rax - 0x18]
mov rbx, qword [rbp - 0x20]
add rbx, 0xffffffffffffffe8
cmp rcx, rbx
je 0x1400af6e2
cmp dword [rbx + 0x10], 0
jl 0x1400af6ce
mov rdx, qword [rbx]
cmp qword [rcx], rdx
jne 0x1400af6ce
call fcn.140041570
mov rsi, rax
mov ecx, edi
lock xadd dword [rbx + 0x10], ecx
sub ecx, 1
jg 0x1400af6c4
mov rcx, qword [rbx]
mov r8, qword [rcx]
mov rdx, rbx
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
lea rax, [rsi + 0x18]
mov qword [rbp - 0x20], rax
jmp 0x1400af6de
mov r8d, dword [rax - 0x10]
mov rdx, rax
lea rcx, [rbp - 0x20]
call fcn.140005a90
mov rax, qword [rbp - 0x30]
lea rdx, [rax - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400af720
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x1400af720
test rbx, rbx
je 0x1400af711
mov rax, rdi
inc rax
cmp word [rbx + rax*2], 0
jne 0x1400af705
mov esi, eax
mov r8d, esi
mov rdx, rbx
lea rcx, [rbp - 0x20]
call fcn.140005a90
xor r8d, r8d
mov rdx, qword [rbp - 0x20]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
nop
mov rdx, qword [rbp - 0x18]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400af74e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp - 0x20]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x1400af769
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.1400ff350
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop r14
pop rdi
pop rbp
ret
mov ecx, 0x80070057
call fcn.140002b00
int3