Function at 0x100518a00
Capabilities:
Set current directory

Disassembly:
push rbp
mov eax, 0x2038
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
call fcn.10065e270
sub rsp, rax
lea rbp, [rsp + 0x80]
lea r14, [rbp + 0xfb0]
mov r12d, r9d
mov rbx, rdx
mov r13d, r8d
mov rdx, rcx
mov r9d, 0x1000
mov r8, r14
mov ecx, 0x102
call sub.msys_2.0.dll_cygwin_conv_path
test r12d, r12d
jne 0x100518a63
movzx eax, byte [rbp + 0xfb0]
cmp al, 0x2f
je 0x100518b80
cmp al, 0x7e
je 0x100518b80
mov edx, 0x2f
mov rcx, r14
call sym.vim.exe_vim_strrchr
mov r12, rax
test rax, rax
je 0x100518bd0
cmp rax, r14
je 0x100518b80
mov ecx, 4
mov rsi, rax
lea rdx, [r12 + 3]
lea rdi, [0x1006b310d]
repe cmpsb byte [rsi], byte [rdi]
mov ecx, dword [0x10070b40c]
seta al
sbb al, 0
test al, al
cmove r12, rdx
test ecx, ecx
jne 0x100518c50
xor r8d, r8d
lea rcx, [0x1006b3111]
xor edx, edx
call sub.msys_2.0.dll_open
mov r15d, eax
test eax, eax
js 0x100518c56
mov ecx, eax
call sub.msys_2.0.dll_fchdir
mov r9, qword [sym.vim.exe_p_verbose]
test eax, eax
js 0x100518dc8
mov r8, r12
movsxd rax, r13d
mov qword [rbp - 0x58], r9
sub r8, r14
cmp r8, rax
jl 0x100518d10
mov edx, r13d
mov rcx, rbx
call sym.vim.exe_mch_dirname
mov r9, qword [rbp - 0x58]
test eax, eax
je 0x100518d80
xor esi, esi
mov r12, r14
mov rax, qword [r9]
test r15d, r15d
js 0x100518cb0
cmp rax, 4
jg 0x100518cf0
mov ecx, r15d
call sub.msys_2.0.dll_fchdir
test eax, eax
jne 0x100518cce
mov ecx, r15d
call sub.msys_2.0.dll_close
mov rcx, rbx
call sub.msys_2.0.dll_strlen
lea edx, [r13 - 1]
cmp edx, eax
jg 0x100518c00
nop word [rax + rax]
xor r8d, r8d
mov eax, r8d
add rsp, 0x2038
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov r12, r14
mov rcx, rbx
call sub.msys_2.0.dll_strlen
mov rcx, r12
mov r14, rax
call sub.msys_2.0.dll_strlen
lea edx, [r14 + rax]
cmp edx, r13d
jge 0x100518b60
cmp byte [r12], 0x2e
jne 0x100518bb8
cmp byte [r12 + 1], 0
mov r8d, 1
je 0x100518b63
nop dword [rax]
lea r8, [rax + 1]
lea rcx, [rbx + r14]
mov rdx, r12
call sub.msys_2.0.dll_memcpy
mov r8d, 1
jmp 0x100518b63
mov esi, 1
mov edx, r13d
mov rcx, rbx
call sym.vim.exe_mch_dirname
test eax, eax
jne 0x100518be9
mov byte [rbx], 0
xor esi, esi
mov r12, r14
mov rcx, rbx
call sub.msys_2.0.dll_strlen
lea edx, [r13 - 1]
cmp edx, eax
jle 0x100518b60
test eax, eax
jle 0x100518c38
movsxd rdx, eax
cmp byte [rbx + rdx - 1], 0x2f
je 0x100518c38
cmp byte [r12], 0
je 0x100518c38
cmp byte [r12], 0x2e
jne 0x100518c28
cmp byte [r12 + 1], 0
je 0x100518c38
nop dword [rax]
mov edx, 0x2f
mov word [rbx + rax], dx
nop dword [rax]
test esi, esi
jne 0x100518b83
xor r8d, r8d
jmp 0x100518b63
mov r15d, 0xffffffff
lea rdi, [rbp - 0x50]
mov edx, 0x1000
mov rcx, rdi
call sym.vim.exe_mch_dirname
test eax, eax
jne 0x100518c78
xor esi, esi
jmp 0x100518bd5
mov r9, qword [sym.vim.exe_p_verbose]
cmp qword [r9], 4
jg 0x100518e1e
mov rcx, rdi
mov qword [rbp - 0x58], r9
call fcn.10065e3f0
mov r9, qword [rbp - 0x58]
test eax, eax
je 0x100518ae6
xor esi, esi
jmp 0x100518bd5
cmp rax, 4
jg 0x100518def
lea rdi, [rbp - 0x50]
mov rcx, rdi
call fcn.10065e3f0
test eax, eax
je 0x100518bec
mov rcx, qword [sym.vim.exe_e_prev_dir]
call sub.msys_intl_8.dll_libintl_gettext
mov rcx, rax
call sym.vim.exe_emsg
test r15d, r15d
jns 0x100518b3e
jmp 0x100518bec
call sym.vim.exe_verbose_enter
lea rcx, str.fchdir___to_previous_dir
call sym.vim.exe_msg
call sym.vim.exe_verbose_leave
jmp 0x100518b2e
mov rdx, r14
mov rcx, rbx
call sym.vim.exe_vim_strncpy
mov r9, qword [rbp - 0x58]
cmp qword [r9], 4
jg 0x100518e44
mov rcx, rbx
mov qword [rbp - 0x58], r9
call fcn.10065e3f0
mov r9, qword [rbp - 0x58]
test eax, eax
je 0x100518d90
movzx eax, byte [rbp + 0xfb0]
cmp al, 0x2f
je 0x100518de8
cmp al, 0x7e
je 0x100518de8
mov byte [rbx], 0
mov edx, r13d
mov rcx, rbx
call sym.vim.exe_mch_dirname
mov esi, eax
test eax, eax
jne 0x100518e11
mov byte [rbx], 0
mov r12, r14
jmp 0x100518ce2
mov r12, r14
mov byte [rbx], 0
xor esi, esi
jmp 0x100518b18
xor eax, eax
cmp byte [r12], 0x2f
mov esi, 1
sete al
add r12, rax
mov byte [rbx], 0
mov edx, r13d
mov rcx, rbx
mov qword [rbp - 0x58], r9
call sym.vim.exe_mch_dirname
mov r9, qword [rbp - 0x58]
test eax, eax
jne 0x100518b18
jmp 0x100518d83
mov ecx, r15d
mov r15d, 0xffffffff
call sub.msys_2.0.dll_close
mov dword [0x10070b40c], 1
jmp 0x100518c56
xor esi, esi
mov r12, r14
jmp 0x100518da2
call sym.vim.exe_verbose_enter
lea rdi, [rbp - 0x50]
lea rcx, str.chdir__s_
mov rdx, rdi
call sym.vim.exe_smsg
call sym.vim.exe_verbose_leave
jmp 0x100518cbe
mov esi, 1
mov r12, r14
jmp 0x100518ce2
mov qword [rbp - 0x58], r9
call sym.vim.exe_verbose_enter
mov rdx, rdi
lea rcx, str.chdir__s_
call sym.vim.exe_smsg
call sym.vim.exe_verbose_leave
mov r9, qword [rbp - 0x58]
jmp 0x100518c89
call sym.vim.exe_verbose_enter
mov rdx, rbx
lea rcx, str.chdir__s_
call sym.vim.exe_smsg
call sym.vim.exe_verbose_leave
mov r9, qword [rbp - 0x58]
jmp 0x100518d29