Function at 0x1400ced30
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x3a0]
sub rsp, 0x4a0
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x4e0], rbx
mov rax, qword [0x140176810]
xor rax, rsp
mov qword [rbp + 0x390], rax
mov rsi, rdx
mov r14, rcx
lea rdx, [rsp + 0x70]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rcx, [rsp + 0x70]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor ebx, ebx
movabs r15, 0x7ffffffffffffffe
test eax, eax
jne 0x1400cef7c
mov ecx, 7
mov qword [rsp + 0x40], rcx
mov edx, ebx
mov qword [rsp + 0x38], rbx
mov word [rsp + 0x28], bx
cmp word [rsp + 0x70], dx
jne 0x1400cedbf
mov edi, ebx
jmp 0x1400cede6
lea rcx, [rsp + 0x70]
call fcn.1400ded00
mov rdi, rax
mov rcx, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x38]
cmp rcx, 8
jb 0x1400cede6
mov r8, qword [rsp + 0x28]
mov rax, r8
jmp 0x1400cedf0
lea rax, [rsp + 0x28]
mov r8, qword [rsp + 0x28]
lea r9, [rsp + 0x70]
cmp r9, rax
jb 0x1400cee91
lea rax, [rsp + 0x28]
cmp rcx, 8
cmovae rax, r8
lea rax, [rax + rdx*2]
lea r9, [rsp + 0x70]
cmp rax, r9
jbe 0x1400cee91
lea rax, [rsp + 0x28]
cmp rcx, 8
cmovae rax, r8
lea r9, [rsp + 0x70]
sub r9, rax
sar r9, 1
cmp rdx, r9
jae 0x1400cee43
lea rcx, str.invalid_string_position
call fcn.1400db848
int3
mov rax, rdx
sub rax, r9
cmp rdi, rax
cmovb rax, rdi
lea r10, [rax + r9]
cmp rdx, r10
jae 0x1400cee66
lea rcx, str.invalid_string_position
call fcn.1400db848
int3
mov qword [rsp + 0x38], r10
lea rax, [rsp + 0x28]
cmp rcx, 8
cmovae rax, r8
mov word [rax + r10*2], bx
mov r8, r9
xor edx, edx
lea rcx, [rsp + 0x28]
call fcn.14001071c
jmp 0x1400cef26
cmp rdi, r15
jbe 0x1400ceea3
lea rcx, str.string_too_long
call fcn.1400db810
int3
cmp rcx, rdi
jae 0x1400ceeba
mov r8, rdx
mov rdx, rdi
lea rcx, [rsp + 0x28]
call fcn.1400107cc
jmp 0x1400ceed4
test rdi, rdi
jne 0x1400ceee3
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x28]
cmp rcx, 8
cmovae rax, r8
mov word [rax], bx
mov r8, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x40]
test rdi, rdi
je 0x1400cef30
lea rax, [rsp + 0x28]
cmp rcx, 8
cmovae rax, r8
test rdi, rdi
je 0x1400cef10
lea r8, [rdi + rdi]
lea rdx, [rsp + 0x70]
mov rcx, rax
call fcn.1400dc430
mov rcx, qword [rsp + 0x40]
mov r8, qword [rsp + 0x28]
mov qword [rsp + 0x38], rdi
lea rax, [rsp + 0x28]
cmp rcx, 8
cmovae rax, r8
mov word [rax + rdi*2], bx
mov r8, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x40]
xor dil, dil
lea rdx, [rsp + 0x28]
cmp rcx, 8
cmovae rdx, r8
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
je 0x1400cef5b
cmp eax, 0xb7
je 0x1400cef5b
cmp eax, 0x50
jne 0x1400cef5e
mov dil, 1
cmp qword [rsp + 0x40], 8
jb 0x1400cef70
mov rcx, qword [rsp + 0x28]
call fcn.1400400f0
test dil, dil
jne 0x1400cef7c
xor al, al
jmp 0x1400cf1ff
mov ecx, 7
mov qword [rsp + 0x60], rcx
mov r8, rbx
mov qword [rsp + 0x58], rbx
mov word [rsp + 0x48], bx
cmp word [rsp + 0x70], bx
jne 0x1400cef9f
mov rdi, rbx
jmp 0x1400cefc6
lea rcx, [rsp + 0x70]
call fcn.1400ded00
mov rdi, rax
mov rcx, qword [rsp + 0x60]
mov r8, qword [rsp + 0x58]
cmp rcx, 8
jb 0x1400cefc6
mov rdx, qword [rsp + 0x48]
mov rax, rdx
jmp 0x1400cefd0
lea rax, [rsp + 0x48]
mov rdx, qword [rsp + 0x48]
lea r9, [rsp + 0x70]
cmp r9, rax
jb 0x1400cf071
lea rax, [rsp + 0x48]
cmp rcx, 8
cmovae rax, rdx
lea rax, [rax + r8*2]
lea r9, [rsp + 0x70]
cmp rax, r9
jbe 0x1400cf071
lea rax, [rsp + 0x48]
cmp rcx, 8
cmovae rax, rdx
lea r9, [rsp + 0x70]
sub r9, rax
sar r9, 1
cmp r8, r9
jae 0x1400cf023
lea rcx, str.invalid_string_position
call fcn.1400db848
int3
mov rax, r8
sub rax, r9
cmp rdi, rax
cmovb rax, rdi
lea r10, [rax + r9]
cmp r8, r10
jae 0x1400cf046
lea rcx, str.invalid_string_position
call fcn.1400db848
int3
mov qword [rsp + 0x58], r10
lea rax, [rsp + 0x48]
cmp rcx, 8
cmovae rax, rdx
mov word [rax + r10*2], bx
mov r8, r9
xor edx, edx
lea rcx, [rsp + 0x48]
call fcn.14001071c
jmp 0x1400cf103
cmp rdi, r15
jbe 0x1400cf083
lea rcx, str.string_too_long
call fcn.1400db810
int3
cmp rcx, rdi
jae 0x1400cf097
mov rdx, rdi
lea rcx, [rsp + 0x48]
call fcn.1400107cc
jmp 0x1400cf0b1
test rdi, rdi
jne 0x1400cf0c0
mov qword [rsp + 0x58], rbx
lea rax, [rsp + 0x48]
cmp rcx, 8
cmovae rax, rdx
mov word [rax], bx
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x60]
test rdi, rdi
je 0x1400cf103
lea rax, [rsp + 0x48]
cmp rcx, 8
cmovae rax, rdx
test rdi, rdi
je 0x1400cf0ed
lea r8, [rdi + rdi]
lea rdx, [rsp + 0x70]
mov rcx, rax
call fcn.1400dc430
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x48]
mov qword [rsp + 0x58], rdi
lea rax, [rsp + 0x48]
cmp rcx, 8
cmovae rax, rdx
mov word [rax + rdi*2], bx
mov qword [rsp + 0x40], 7
mov qword [rsp + 0x38], rbx
mov word [rsp + 0x28], bx
cmp word [rsi], 0
jne 0x1400cf121
mov rax, rbx
jmp 0x1400cf129
mov rcx, rsi
call fcn.1400ded00
mov r8, rax
mov rdx, rsi
lea rcx, [rsp + 0x28]
call fcn.140010250
nop
lea r8, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae r8, qword [rsp + 0x48]
mov edx, 0x104
lea rcx, [rbp + 0x180]
call fcn.1400e42ec
lea rdx, [rsp + 0x28]
cmp qword [rsp + 0x40], 8
cmovae rdx, qword [rsp + 0x28]
lea rcx, [rbp + 0x180]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edi, eax
test eax, eax
je 0x1400cf1ad
cmp word [rbp + 0x180], 0
je 0x1400cf199
lea rcx, [rbp + 0x180]
call fcn.1400ded00
mov rbx, rax
mov r8, rbx
lea rdx, [rbp + 0x180]
lea rcx, [rsp + 0x48]
call fcn.140010250
cmp edi, 1
sete bl
cmp qword [rsp + 0x40], 8
jb 0x1400cf1c5
mov rcx, qword [rsp + 0x28]
call fcn.1400400f0
test bl, bl
je 0x1400cf1ea
lea rcx, [r14 + 0x68]
lea rax, [rsp + 0x48]
cmp rcx, rax
je 0x1400cf1e8
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x48]
call fcn.1400104e4
mov bl, 1
cmp qword [rsp + 0x60], 8
jb 0x1400cf1fc
mov rcx, qword [rsp + 0x48]
call fcn.1400400f0
movzx eax, bl
mov rcx, qword [rbp + 0x390]
xor rcx, rsp
call fcn.1400dc400
mov rbx, qword [rsp + 0x4e0]
add rsp, 0x4a0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret