Function at 0x1400140a0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get program files directory

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x290
mov rax, qword [0x14005a318]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov r14, r8
mov rbx, rdx
mov rsi, rcx
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x48], rdx
mov edx, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
xor ebp, ebp
mov eax, dword [rdx + rcx]
cmp dword [0x14005d218], eax
jle 0x140014137
lea rcx, [0x14005d218]
call fcn.140024058
cmp dword [0x14005d218], 0xffffffff
jne 0x140014137
mov qword [0x14005d230], rbp
mov qword [0x14005d238], 7
mov word [0x14005d220], bp
lea rcx, [0x140043d10]
call fcn.1400243a0
lea rcx, [0x14005d218]
call fcn.140023ff8
mov rcx, qword [0x14005d230]
test rcx, rcx
jne 0x1400141a3
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x70]
call fcn.140026d60
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x26]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x14001419c
lea rax, [rsp + 0x70]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], bp
jne 0x140014181
lea rdx, [rsp + 0x70]
lea rcx, [0x14005d220]
call fcn.14000cfd0
mov rcx, qword [0x14005d230]
movabs rdi, 0x7ffffffffffffffe
test r14, r14
je 0x14001427d
mov rdx, qword [rbx + 0x10]
mov rax, rdi
sub rax, rcx
cmp rax, rdx
jb 0x14001434c
lea r9, [0x14005d220]
cmp qword [0x14005d238], 8
cmovae r9, qword [0x14005d220]
mov rax, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400141ed
mov rax, qword [rbx]
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea r8, [0x14005d220]
movzx edx, byte [rsp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.14000e420
lea rcx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, ebp
cmp eax, 0xffffffff
setne cl
mov dword [r14], ecx
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x140014276
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140014271
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140014352
call fcn.1400243b8
mov rcx, qword [0x14005d230]
mov rax, qword [rbx + 0x10]
sub rdi, rcx
cmp rdi, rax
jb 0x140014340
lea r9, [0x14005d220]
cmp qword [0x14005d238], 8
cmovae r9, qword [0x14005d220]
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400142b1
mov rdx, qword [rbx]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x20], rcx
lea r8, [0x14005d220]
movzx edx, byte [rsp + 0x40]
mov rcx, rsi
call fcn.14000e420
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x140014310
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x14001430b
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140014346
mov rcx, r8
call fcn.1400243b8
mov qword [rbx + 0x10], rbp
mov qword [rbx + 0x18], 7
mov word [rbx], bp
mov rax, rsi
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.140023ea0
add rsp, 0x290
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
call fcn.140003e20
nop
call fcn.1400303f4
nop
call fcn.140003e20
int3
call fcn.1400303f4
int3