Function at 0x100520380
Capabilities:
Set current directory

Disassembly:
push r15
mov eax, 0x2028
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.100672980
sub rsp, rax
lea rdi, [rsp + 0x1020]
mov r12d, r9d
mov rbx, rdx
mov esi, r8d
mov rdx, rcx
mov r9d, 0x1000
mov r8, rdi
mov ecx, 0x102
call sub.msys_2.0.dll_cygwin_conv_path
test r12d, r12d
jne 0x1005203dd
movzx eax, byte [rsp + 0x1020]
cmp al, 0x2f
je 0x1005204f0
cmp al, 0x7e
je 0x1005204f0
mov edx, 0x2f
mov rcx, rdi
call sym.vim.exe_vim_strrchr
mov r12, rax
test rax, rax
je 0x100520540
cmp rax, rdi
je 0x1005204f0
mov rcx, rax
lea rdx, [0x1006cee73]
call sub.msys_2.0.dll_strcmp
mov ecx, dword [0x10072464c]
mov r8d, eax
lea rax, [r12 + 3]
test r8d, r8d
cmove r12, rax
test ecx, ecx
jne 0x1005205c0
xor r8d, r8d
lea rcx, [0x1006cee77]
mov edx, 0x10000
call sub.msys_2.0.dll_open
mov r13d, eax
test eax, eax
js 0x1005205c6
mov ecx, eax
call sub.msys_2.0.dll_fchdir
mov r15, qword [sym.vim.exe_p_verbose]
test eax, eax
js 0x100520718
mov r8, r12
movsxd rax, esi
sub r8, rdi
cmp r8, rax
jl 0x100520678
mov edx, esi
mov rcx, rbx
call sym.vim.exe_mch_dirname
test eax, eax
je 0x1005206d8
xor ebp, ebp
mov r12, rdi
mov rax, qword [r15]
test r13d, r13d
js 0x100520610
cmp rax, 4
jg 0x100520658
mov ecx, r13d
call sub.msys_2.0.dll_fchdir
test eax, eax
jne 0x10052062f
mov ecx, r13d
call sub.msys_2.0.dll_close
mov rcx, rbx
call sub.msys_2.0.dll_strlen
lea edx, [rsi - 1]
cmp edx, eax
jg 0x10052056e
nop word [rax + rax]
xor r8d, r8d
mov eax, r8d
add rsp, 0x2028
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r12, rdi
mov rcx, rbx
call sub.msys_2.0.dll_strlen
mov rcx, r12
mov rdi, rax
call sub.msys_2.0.dll_strlen
lea edx, [rdi + rax]
cmp edx, esi
jge 0x1005204d0
cmp byte [r12], 0x2e
jne 0x100520528
cmp byte [r12 + 1], 0
mov r8d, 1
je 0x1005204d3
nop word [rax + rax]
lea r8, [rax + 1]
lea rcx, [rbx + rdi]
mov rdx, r12
call sub.msys_2.0.dll_memcpy
mov r8d, 1
jmp 0x1005204d3
mov ebp, 1
mov edx, esi
mov rcx, rbx
call sym.vim.exe_mch_dirname
test eax, eax
jne 0x100520558
mov byte [rbx], 0
xor ebp, ebp
mov r12, rdi
mov rcx, rbx
call sub.msys_2.0.dll_strlen
lea edx, [rsi - 1]
cmp edx, eax
jle 0x1005204d0
test eax, eax
jle 0x1005205a8
movsxd rdx, eax
cmp byte [rbx + rdx - 1], 0x2f
je 0x1005205a8
cmp byte [r12], 0
je 0x1005205a8
cmp byte [r12], 0x2e
jne 0x100520598
cmp byte [r12 + 1], 0
je 0x1005205a8
nop word [rax + rax]
mov edx, 0x2f
mov word [rbx + rax], dx
nop dword [rax]
test ebp, ebp
jne 0x1005204f3
xor r8d, r8d
jmp 0x1005204d3
mov r13d, 0xffffffff
lea r14, [rsp + 0x20]
mov edx, 0x1000
mov rcx, r14
call sym.vim.exe_mch_dirname
test eax, eax
jne 0x1005205e8
xor ebp, ebp
jmp 0x100520545
mov r15, qword [sym.vim.exe_p_verbose]
cmp qword [r15], 4
jg 0x10052076f
mov rcx, r14
call fcn.100672b00
test eax, eax
je 0x100520460
xor ebp, ebp
jmp 0x100520545
cmp rax, 4
jg 0x10052073f
lea r14, [rsp + 0x20]
mov rcx, r14
call fcn.100672b00
test eax, eax
je 0x10052055b
mov rcx, qword [sym.vim.exe_e_cannot_go_back_to_previous_directory]
call sub.msys_intl_8.dll_libintl_gettext
mov rcx, rax
call sym.vim.exe_emsg
test r13d, r13d
jns 0x1005204af
jmp 0x10052055b
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 0x10052049f
mov rdx, rdi
mov rcx, rbx
call sym.vim.exe_vim_strncpy
cmp qword [r15], 4
jg 0x10052078d
mov rcx, rbx
call fcn.100672b00
test eax, eax
je 0x1005206e8
movzx eax, byte [rsp + 0x1020]
cmp al, 0x2f
je 0x100520738
cmp al, 0x7e
je 0x100520738
mov byte [rbx], 0
mov edx, esi
mov rcx, rbx
call sym.vim.exe_mch_dirname
mov ebp, eax
test eax, eax
jne 0x100520762
mov byte [rbx], 0
mov r12, rdi
jmp 0x100520643
mov r12, rdi
mov byte [rbx], 0
xor ebp, ebp
jmp 0x100520489
xor eax, eax
cmp byte [r12], 0x2f
mov ebp, 1
sete al
add r12, rax
mov byte [rbx], 0
mov edx, esi
mov rcx, rbx
call sym.vim.exe_mch_dirname
test eax, eax
jne 0x100520489
jmp 0x1005206db
mov ecx, r13d
mov r13d, 0xffffffff
call sub.msys_2.0.dll_close
mov dword [0x10072464c], 1
jmp 0x1005205c6
xor ebp, ebp
mov r12, rdi
jmp 0x1005206fa
call sym.vim.exe_verbose_enter
lea r14, [rsp + 0x20]
lea rcx, str.chdir__s_
mov rdx, r14
call sym.vim.exe_smsg
call sym.vim.exe_verbose_leave
jmp 0x10052061f
mov ebp, 1
mov r12, rdi
jmp 0x100520643
call sym.vim.exe_verbose_enter
mov rdx, r14
lea rcx, str.chdir__s_
call sym.vim.exe_smsg
call sym.vim.exe_verbose_leave
jmp 0x1005205f9
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
jmp 0x10052068d