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

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0xd0]
sub rsp, 0x1d0
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x210], rbx
mov rax, qword [0x1400425e0]
xor rax, rsp
mov qword [rbp + 0xc0], rax
mov r14d, r8d
mov rsi, rdx
mov rdi, rcx
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x48], rdx
xor r15d, r15d
mov dword [rsp + 0x30], r15d
mov qword [rcx + 0x18], 0xf
mov qword [rcx + 0x10], r15
mov byte [rcx], r15b
mov dword [rsp + 0x30], 1
mov byte [rbp - 0x50], r15b
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp - 0x4f]
call fcn.140019790
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r15 + 0x26]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jne 0x140017b83
mov qword [rbp - 0x78], 0xf
mov qword [rbp - 0x80], r15
mov byte [rsp + 0x70], al
cmp byte [rbp - 0x50], al
jne 0x1400178fd
mov r8d, r15d
jmp 0x14001790f
lea rax, [rbp - 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x140017905
lea rdx, [rbp - 0x50]
lea rcx, [rsp + 0x70]
call fcn.14000e9b0
nop
lea r8, [0x1400334e0]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x50]
call fcn.1400014a0
mov rbx, rax
cmp rdi, rax
je 0x140017965
cmp qword [rdi + 0x18], 0x10
jb 0x14001794b
mov rcx, qword [rdi]
call fcn.140018d84
mov qword [rdi + 0x18], 0xf
mov qword [rdi + 0x10], r15
mov byte [rdi], 0
mov rdx, rbx
mov rcx, rdi
call fcn.14000ce40
cmp qword [rsp + 0x68], 0x10
jb 0x140017977
mov rcx, qword [rsp + 0x50]
call fcn.140018d84
mov qword [rsp + 0x68], 0xf
mov qword [rsp + 0x60], r15
mov byte [rsp + 0x50], 0
cmp qword [rbp - 0x78], 0x10
jb 0x14001799b
mov rcx, qword [rsp + 0x70]
call fcn.140018d84
lea r9, [0x1400332e0]
lea r8, [0x140033390]
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.140017550
cmp qword [rax + 0x10], 0
setne bl
cmp qword [rsp + 0x68], 0x10
jb 0x1400179cf
mov rcx, qword [rsp + 0x50]
call fcn.140018d84
test bl, bl
je 0x140017aa0
lea r9, [0x1400332e0]
lea r8, [0x140033390]
xor edx, edx
lea rcx, [rbp - 0x70]
call fcn.140017550
mov rbx, rax
lea r8, [0x1400332e0]
mov rdx, rdi
lea rcx, [rsp + 0x70]
call fcn.1400015e0
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140001250
mov rbx, rax
cmp rdi, rax
je 0x140017a49
cmp qword [rdi + 0x18], 0x10
jb 0x140017a2f
mov rcx, qword [rdi]
call fcn.140018d84
mov qword [rdi + 0x18], 0xf
mov qword [rdi + 0x10], r15
mov byte [rdi], 0
mov rdx, rbx
mov rcx, rdi
call fcn.14000ce40
cmp qword [rsp + 0x68], 0x10
jb 0x140017a5b
mov rcx, qword [rsp + 0x50]
call fcn.140018d84
mov qword [rsp + 0x68], 0xf
mov qword [rsp + 0x60], r15
mov byte [rsp + 0x50], 0
cmp qword [rbp - 0x78], 0x10
jb 0x140017a7f
mov rcx, qword [rsp + 0x70]
call fcn.140018d84
mov qword [rbp - 0x78], 0xf
mov qword [rbp - 0x80], r15
mov byte [rsp + 0x70], 0
cmp qword [rbp - 0x58], 0x10
jb 0x140017aa0
mov rcx, qword [rbp - 0x70]
call fcn.140018d84
cmp qword [rsi + 0x10], 0
je 0x140017b51
mov r9d, 1
xor r8d, r8d
lea rdx, [rbp - 0x70]
mov rcx, rsi
call fcn.140010d50
nop
mov rbx, qword [rax + 0x10]
cmp qword [rax + 0x18], 0x10
jb 0x140017acf
mov rax, qword [rax]
mov r8d, 1
cmp rbx, r8
cmovb r8, rbx
test r8, r8
jne 0x140017ae6
mov eax, r15d
jmp 0x140017af5
lea rdx, [0x1400332e0]
mov rcx, rax
call fcn.14001c5d0
cdqe
test rax, rax
jne 0x140017b11
cmp rbx, 1
jae 0x140017b07
or eax, 0xffffffff
jmp 0x140017b11
mov eax, r15d
cmp rbx, 1
setne al
test eax, eax
setne bl
cmp qword [rbp - 0x58], 0x10
jb 0x140017b26
mov rcx, qword [rbp - 0x70]
call fcn.140018d84
test bl, bl
je 0x140017b3f
mov r8d, 1
lea rdx, [0x1400332e0]
mov rcx, rdi
call fcn.14000e580
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
call fcn.14000e390
test r14d, r14d
je 0x140017b83
cmp qword [rdi + 0x18], 0x10
jb 0x140017b62
mov rcx, qword [rdi]
jmp 0x140017b65
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x140017b83
xor r8d, r8d
lea rdx, [0x1400331aa]
mov rcx, rdi
call fcn.14000e9b0
nop
cmp qword [rsi + 0x18], 0x10
jb 0x140017b92
mov rcx, qword [rsi]
call fcn.140018d84
mov qword [rsi + 0x18], 0xf
mov qword [rsi + 0x10], r15
mov byte [rsi], 0
mov rax, rdi
mov rcx, qword [rbp + 0xc0]
xor rcx, rsp
call fcn.14001c4b0
mov rbx, qword [rsp + 0x210]
add rsp, 0x1d0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret