Function at 0x140004e60
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x218]
sub rsp, 0x318
mov rsi, rcx
lea r9, [rbp + 0x270]
xor r8d, r8d
xor edx, edx
lea rcx, [0x1400315a0]
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
xor edi, edi
test eax, eax
je 0x140004eb4
mov rcx, qword [rbp + 0x270]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
lea rdx, [0x14003f34c]
jmp 0x140004ebb
mov rdx, qword [rbp + 0x270]
mov ebx, 7
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x78], rbx
mov word [rsp + 0x60], di
lea rcx, [rsp + 0x60]
call fcn.1400067f4
nop
mov r14d, edi
mov dword [rbp + 0x268], edi
cmp dword [rsi + 0x78], edi
jle 0x1400050e8
mov r15, rdi
mov rdx, qword [rsi + 0x80]
add rdx, r15
cmp qword [rdx + 0x18], 0x10
jb 0x140004f08
mov rdx, qword [rdx]
mov r8d, 0x1fe
lea rcx, [rbp + 0x10]
call fcn.14001577c
mov qword [rbp - 0x80], rdi
mov qword [rbp - 0x70], rdi
mov qword [rbp - 0x68], rbx
mov word [rbp - 0x80], di
lea rdx, [rbp + 0x10]
lea rcx, [rbp - 0x80]
call fcn.1400067f4
nop
movabs rax, 0x7ffffffffffffffe
mov rcx, qword [rsp + 0x70]
sub rax, rcx
mov rdx, qword [rbp - 0x70]
cmp rax, rdx
jb 0x140005106
lea r9, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae r9, qword [rsp + 0x60]
lea rax, [rbp - 0x80]
cmp qword [rbp - 0x68], 8
cmovae rax, qword [rbp - 0x80]
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rbp - 0x48]
call fcn.140006f04
nop
lea rcx, [rbp - 0x48]
cmp qword [rbp - 0x30], 8
cmovae rcx, qword [rbp - 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140004faa
mov al, dil
jmp 0x140004faf
shr al, 4
and al, 1
test al, al
je 0x1400050bd
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], rdi
lea rdx, [rbp - 0x48]
lea rcx, [rsp + 0x40]
call fcn.140006870
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x58]
call fcn.140001c18
mov eax, dword [rbp - 0x50]
test eax, eax
jle 0x1400050bd
mov rdi, qword [rbp - 0x58]
mov r12d, eax
xor r14d, r14d
mov dword [rbp + 0x260], r14d
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x58], r14
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.140006870
lea rdx, [rbp + 0x260]
lea rcx, [rsp + 0x40]
call fcn.140001e14
mov r13, rax
cmp dword [rbp + 0x260], r14d
jbe 0x1400050a6
lea rax, [rbp - 0x28]
mov qword [rbp + 0x278], rax
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x58], r14
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.140006870
lea rax, [rsp + 0x40]
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x18], r14
mov qword [rbp - 8], r14
mov qword [rbp], rbx
mov qword [rbp - 0x28], r13
mov eax, dword [rbp + 0x260]
mov dword [rbp - 0x20], eax
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x18]
call fcn.14000640c
nop
lea rcx, [rsp + 0x40]
call fcn.140006790
lea rcx, [rsi + 0x40]
lea rdx, [rbp - 0x28]
call fcn.140005eec
add rdi, 0x20
sub r12, 1
jne 0x140004ff7
mov r14d, dword [rbp + 0x268]
xor edi, edi
lea rcx, [rbp - 0x48]
call fcn.140006790
nop
lea rcx, [rbp - 0x80]
call fcn.140006790
inc r14d
mov dword [rbp + 0x268], r14d
add r15, 0x20
cmp r14d, dword [rsi + 0x78]
jl 0x140004ef4
lea rcx, [rsp + 0x60]
call fcn.140006790
add rsp, 0x318
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.140001740
nop