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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x590]
sub rsp, 0x690
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x6e8], rbx
mov rax, qword [0x1801bc080]
xor rax, rsp
mov qword [rbp + 0x580], rax
mov r15, r8
mov r12, rdx
mov r9, rcx
mov r10d, 0xffffffff
mov edx, r10d
mov r8d, dword [0x1801c29b8]
mov eax, dword [0x1801c29d8]
cmp eax, 5
jne 0x180005272
cmp r8d, 1
jne 0x1800052d3
lea edx, [rax + 0x4b]
lea eax, [rdx + 4]
jmp 0x18000530e
cmp eax, 6
jne 0x1800052d3
mov rax, r10
mov ecx, dword [0x1801c29b8]
sub ecx, 1
je 0x180005299
sub ecx, 1
je 0x18000528f
cmp ecx, 1
jne 0x1800052a1
mov edx, 0xc8
lea eax, [rdx + 8]
jmp 0x1800052a1
mov edx, 0xc0
lea eax, [rdx + 8]
cmp edx, r10d
jne 0x18000530e
mov eax, r10d
mov rcx, qword [rbp + 0x580]
xor rcx, rsp
call fcn.1800ef540
mov rbx, qword [rsp + 0x6e8]
add rsp, 0x690
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp eax, 0xa
jne 0x1800052a6
test r8d, r8d
jne 0x1800052a6
mov eax, dword [0x1801c29bc]
cmp eax, 0x55f0
jae 0x1800052f4
mov edx, 0xd0
lea eax, [rdx + 8]
jmp 0x18000530e
je 0x180005304
cmp eax, 0x585d
je 0x180005304
cmp eax, 0x5867
jne 0x1800052a6
mov edx, 0xd8
mov eax, 0xe0
lea r8d, [rdx - 8]
mov ecx, edx
mov r13, qword [rcx + r9]
cmp dword [rax + r9], 1
jne 0x1800052a6
mov rbx, qword [r8 + r9]
mov ecx, 0x20a
call fcn.1800efc54
mov rdi, rax
xor edx, edx
mov r8d, 0x20a
mov rcx, rax
call fcn.18010e6d0
xor r14d, r14d
lea rsi, [r14 - 1]
test rbx, rbx
je 0x180005385
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x1800053e1
mov word [rdi + 0x208], r14w
mov r8, rsi
nop dword [rax + rax]
inc r8
cmp word [rdi + r8*2], r14w
jne 0x180005370
mov rdx, rdi
mov rcx, r15
call fcn.180004a10
mov rbx, qword [r13]
xor edx, edx
mov r8d, 0x20a
mov rcx, rdi
call fcn.18010e6d0
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
jne 0x18000544b
lea rdx, [rdi + 4]
inc rsi
cmp word [rdx + rsi*2], r14w
jne 0x1800053b1
mov r8, rsi
mov rcx, r15
call fcn.180004a10
lea rbx, [r15 + 0x10]
mov rcx, rdi
cmp qword [rbx], r14
ja 0x180005422
call fcn.1800ef5a0
mov eax, 0xffffffff
jmp 0x1800052a9
lea rcx, [rsp + 0x50]
call fcn.18009edf0
cmp dword [rsp + 0x54], 0xa
jb 0x180005385
lea rdx, [rdi + 4]
mov r8, rsi
nop dword [rax]
inc r8
cmp word [rdx + r8*2], r14w
jne 0x180005400
mov rcx, r15
call fcn.180004a10
lea rbx, [r15 + 0x10]
cmp qword [rbx], r14
jbe 0x180005385
mov rcx, rdi
call fcn.1800ef5a0
cmp r12, r15
je 0x180005444
cmp qword [r15 + 0x18], 8
jb 0x180005436
mov r15, qword [r15]
mov r8, qword [rbx]
mov rdx, r15
mov rcx, r12
call fcn.180004a10
xor eax, eax
jmp 0x1800052a9
mov word [rdi + 0x208], r14w
cmp qword [r15 + 0x10], r14
jne 0x18000546c
mov r8, rsi
nop dword [rax]
inc r8
cmp word [rdi + r8*2], r14w
jne 0x180005460
jmp 0x1800054aa
mov rcx, rsi
nop
inc rcx
cmp word [rdi + rcx*2], r14w
jne 0x180005470
test ecx, ecx
je 0x180005498
mov edx, 0xffffffff
add ecx, edx
lea r8, [rdi + rcx*2]
cmp word [r8], 0x5c
je 0x180005631
test ecx, ecx
jne 0x180005483
mov r8, rsi
nop dword [rax + rax]
inc r8
cmp word [rdi + r8*2], r14w
jne 0x1800054a0
mov rdx, rdi
mov rcx, r12
call fcn.180004a10
mov rcx, rdi
call fcn.1800ef5a0
mov rcx, r12
cmp qword [r12 + 0x18], 8
jb 0x1800054cc
mov rcx, qword [r12]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x180005444
mov rcx, r12
cmp qword [r12 + 0x18], 8
jb 0x1800054e9
mov rcx, qword [r12]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov rbx, rax
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x370]
call fcn.18010e6d0
xor r9d, r9d
lea r8d, [r9 + 2]
lea rdx, [rbp + 0x370]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x180005444
test rbx, rbx
je 0x180005444
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x160]
call fcn.18010e6d0
mov rcx, r14
nop dword [rax]
nop dword [rax + rax]
movzx eax, word [rbp + rcx + 0x370]
mov word [rbp + rcx + 0x160], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x180005550
mov rdx, rbx
lea rcx, [rbp + 0x160]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
lea rcx, [rbp + 0x160]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1800055ae
lea rax, [rbp + 0x160]
mov r8, rsi
inc r8
cmp word [rax + r8*2], 0
jne 0x180005594
lea rdx, [rbp + 0x160]
mov rcx, r12
call fcn.180004a10
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x50]
call fcn.18010e6d0
movzx eax, word [rbp + r14 + 0x370]
mov word [rsp + r14 + 0x50], ax
lea r14, [r14 + 2]
test ax, ax
jne 0x1800055c0
lea rdx, str.AccessoriesSystem_Tools
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov rdx, rbx
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x180005444
lea rax, [rsp + 0x50]
inc rsi
cmp word [rax + rsi*2], 0
jne 0x180005610
mov r8, rsi
lea rdx, [rsp + 0x50]
mov rcx, r12
call fcn.180004a10
xor eax, eax
jmp 0x1800052a9
test ecx, ecx
je 0x180005498
mov rdx, r15
lea rcx, [rsp + 0x28]
call fcn.18000d620
nop
mov rdx, rax
mov rcx, r12
call fcn.18000cc70
nop
mov rdx, qword [rsp + 0x40]
cmp rdx, 8
jb 0x180005691
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18000568c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1800056aa
call fcn.1800ef5a0
movdqa xmm0, xmmword [0x180171380]
movdqu xmmword [rsp + 0x38], xmm0
mov word [rsp + 0x28], r14w
jmp 0x1800054b5
call fcn.180111064
int3