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

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x280
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x2b0], rbx
mov rax, qword [0x180097090]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov rdi, rdx
mov qword [rsp + 0x20], rdx
mov rsi, rcx
xor eax, eax
mov dword [rsp + 0x28], eax
lea rax, [0x18009c570]
mov qword [rsp + 0x28], rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rdx, rdi
lea rcx, str._FindFileByDocName:_s
call fcn.18002cf0c
mov rbp, qword [0x18009d5c8]
mov rdi, qword [rbp]
mov rax, qword [0x18009d5a0]
mov rbx, rax
nop dword [rax]
test rbx, rbx
je 0x180006b0a
cmp rbx, rax
je 0x180006b0f
call fcn.180053884
cmp rdi, rbp
je 0x180006c2a
test rbx, rbx
jne 0x180006b27
call fcn.180053884
xor r11d, r11d
jmp 0x180006b2a
mov r11, qword [rbx]
cmp rdi, qword [r11 + 0x28]
jne 0x180006b35
call fcn.180053884
cmp qword [rdi + 0x30], 8
jb 0x180006b42
mov rcx, qword [rdi + 0x18]
jmp 0x180006b46
lea rcx, [rdi + 0x18]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
test rax, rax
je 0x180006b9f
mov rbp, qword [rsp + 0x20]
test rbp, rbp
je 0x180006b9f
test rbx, rbx
jne 0x180006b6a
call fcn.180053884
xor r11d, r11d
jmp 0x180006b6d
mov r11, qword [rbx]
cmp rdi, qword [r11 + 0x28]
jne 0x180006b78
call fcn.180053884
cmp qword [rdi + 0x30], 8
jb 0x180006b85
mov rcx, qword [rdi + 0x18]
jmp 0x180006b89
lea rcx, [rdi + 0x18]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov rcx, rax
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x180006bd2
test rbx, rbx
jne 0x180006bae
call fcn.180053884
xor r11d, r11d
jmp 0x180006bb1
mov r11, qword [rbx]
cmp rdi, qword [r11 + 0x28]
jne 0x180006bbc
call fcn.180053884
mov rdi, qword [rdi]
mov rbp, qword [0x18009d5c8]
mov rax, qword [0x18009d5a0]
jmp 0x180006b00
test rbx, rbx
jne 0x180006be1
call fcn.180053884
mov r11, rbx
jmp 0x180006be6
mov r11, qword [rbx]
xor ebx, ebx
cmp rdi, qword [r11 + 0x28]
jne 0x180006bf1
call fcn.180053884
lea rdx, [rdi + 0x10]
mov qword [rsi + 0x20], 7
mov qword [rsi + 0x18], rbx
mov word [rsi + 8], bx
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rcx, rsi
call fcn.18000bc30
nop
lea rcx, [0x18009c570]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, rsi
jmp 0x180007026
mov rbx, qword [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x180006d18
lea rdx, [0x18007ad30]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_StrStrIW]
test rax, rax
jne 0x180006cd4
xor edi, edi
mov word [rsp + 0x60], di
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x62]
call fcn.1800575a0
lea rdx, [rsp + 0x60]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov rdx, rbx
lea rcx, [rsp + 0x60]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov qword [rsi + 0x20], 7
mov qword [rsi + 0x18], rdi
mov word [rsi + 8], di
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x60]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rsp + 0x60]
mov rcx, rsi
call fcn.18000d5e0
nop
lea rcx, [0x18009c570]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, rsi
jmp 0x180007026
mov qword [rsi + 0x20], 7
xor eax, eax
mov qword [rsi + 0x18], rax
mov word [rsi + 8], ax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbx
mov rcx, rsi
call fcn.18000d5e0
nop
lea rcx, [0x18009c570]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, rsi
jmp 0x180007026
mov rbp, qword [0x18009d5c8]
mov rdi, qword [rbp]
mov rax, qword [0x18009d5a0]
mov rbx, rax
nop dword [rax]
test rbx, rbx
je 0x180006d3a
cmp rbx, rax
je 0x180006d3f
call fcn.180053884
cmp rdi, rbp
je 0x180006e1c
test rbx, rbx
jne 0x180006d59
call fcn.180053884
xor ebp, ebp
mov r11, rbp
jmp 0x180006d5e
mov r11, qword [rbx]
xor ebp, ebp
cmp rdi, qword [r11 + 0x28]
jne 0x180006d69
call fcn.180053884
cmp qword [rdi + 0x30], 8
jb 0x180006d76
mov rcx, qword [rdi + 0x18]
jmp 0x180006d7a
lea rcx, [rdi + 0x18]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov rcx, rax
mov rdx, qword [rsp + 0x20]
call qword [sym.imp.SHLWAPI.dll_StrStrIW]
test rax, rax
jne 0x180006dc6
test rbx, rbx
jne 0x180006da2
call fcn.180053884
mov r11, rbp
jmp 0x180006da5
mov r11, qword [rbx]
cmp rdi, qword [r11 + 0x28]
jne 0x180006db0
call fcn.180053884
mov rdi, qword [rdi]
mov rbp, qword [0x18009d5c8]
mov rax, qword [0x18009d5a0]
jmp 0x180006d30
test rbx, rbx
jne 0x180006dd5
call fcn.180053884
mov r11, rbp
jmp 0x180006dd8
mov r11, qword [rbx]
cmp rdi, qword [r11 + 0x28]
jne 0x180006de3
call fcn.180053884
lea rdx, [rdi + 0x10]
mov qword [rsi + 0x20], 7
mov qword [rsi + 0x18], rbp
mov word [rsi + 8], bp
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rcx, rsi
call fcn.18000bc30
nop
lea rcx, [0x18009c570]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, rsi
jmp 0x180007026
lea rdx, [0x18007ad38]
mov rdi, qword [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_StrStrIW]
test rax, rax
je 0x180006ff1
xor ebp, ebp
mov word [rsp + 0x60], bp
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x62]
call fcn.1800575a0
mov r8d, 0x104
mov rdx, rdi
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
lea rdx, [0x18007ad38]
lea rcx, [rsp + 0x60]
call qword [sym.imp.SHLWAPI.dll_StrStrIW]
mov rdi, rax
mov word [rax], bp
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x38]
call fcn.180006a80
nop
cmp qword [rsp + 0x50], rbp
je 0x180006fad
mov qword [rsi + 0x20], 7
mov qword [rsi + 0x18], rbp
lea rdi, [rsi + 8]
mov word [rdi], bp
mov rbx, qword [rsp + 0x50]
or r8, 0xffffffffffffffff
cmp rbx, r8
cmova rbx, r8
lea rax, [rsp + 0x38]
cmp rsi, rax
jne 0x180006ee4
mov rdx, rbx
mov rcx, rsi
call fcn.18000d6f0
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call fcn.18000d6f0
jmp 0x180006f76
movabs rax, 0x7ffffffffffffffe
cmp rbx, rax
jbe 0x180006ef8
call fcn.180052c48
mov rax, qword [rsi + 0x20]
cmp rax, rbx
jae 0x180006f12
mov r8, qword [rsi + 0x18]
mov rdx, rbx
mov rcx, rsi
call fcn.18000fb70
jmp 0x180006f29
test rbx, rbx
jne 0x180006f29
mov qword [rsi + 0x18], rbp
cmp rax, 8
jb 0x180006f24
mov rdi, qword [rdi]
mov word [rdi], bp
jmp 0x180006f76
test rbx, rbx
je 0x180006f76
lea r8, [rsp + 0x40]
cmp qword [rsp + 0x58], 8
cmovae r8, qword [rsp + 0x40]
mov rdx, qword [rsi + 0x20]
cmp rdx, 8
jb 0x180006f4e
mov rcx, qword [rdi]
jmp 0x180006f51
mov rcx, rdi
lea rbp, [rbx + rbx]
add rdx, rdx
mov r9, rbp
call fcn.1800538e4
mov qword [rsi + 0x18], rbx
cmp qword [rsi + 0x20], 8
jb 0x180006f6e
mov rdi, qword [rdi]
xor eax, eax
mov word [rdi + rbp], ax
xor ebp, ebp
cmp qword [rsp + 0x58], 8
jb 0x180006f88
mov rcx, qword [rsp + 0x40]
call fcn.1800538dc
mov qword [rsp + 0x58], 7
mov qword [rsp + 0x50], rbp
mov word [rsp + 0x40], bp
lea rcx, [0x18009c570]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, rsi
jmp 0x180007026
lea rdx, [rdi + 6]
mov rcx, rsi
call fcn.180006a80
nop
cmp qword [rsp + 0x58], 8
jb 0x180006fcc
mov rcx, qword [rsp + 0x40]
call fcn.1800538dc
mov qword [rsp + 0x58], 7
mov qword [rsp + 0x50], rbp
mov word [rsp + 0x40], bp
lea rcx, [0x18009c570]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, rsi
jmp 0x180007026
mov qword [rsi + 0x20], 7
xor eax, eax
mov qword [rsi + 0x18], rax
mov word [rsi + 8], ax
xor r8d, r8d
lea rdx, [0x18007a6b0]
mov rcx, rsi
call fcn.18000d5e0
nop
lea rcx, [0x18009c570]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, rsi
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.180052d60
mov rbx, qword [rsp + 0x2b0]
add rsp, 0x280
pop rdi
pop rsi
pop rbp
ret