Function at 0x10051acd0
Capabilities:
Set current directory

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x80]
mov r12d, dword [r8 + 0x28]
mov r13d, dword [r8 + 0x20]
mov r14d, dword [r8 + 0x24]
lea eax, [r12 - 1]
cmp r13d, 1
mov dword [rbp - 0x50], eax
lea eax, [r13 - 1]
mov rsi, rdx
mov rbx, r8
mov dword [rbp - 0x54], eax
lea eax, [r14 - 2]
sete byte [rbp - 0x48]
and eax, 0xfffffffd
movzx edx, byte [rbp - 0x48]
sete byte [rbp - 0x55]
cmp r14d, 4
mov qword [rbp + 0x40], rcx
sete dil
mov dword [rbp + 0x58], r9d
mov qword [rbp - 0x28], 0xffffffffffffffff
mov qword [rbp - 0x20], 0xffffffffffffffff
mov qword [rbp - 0x18], 0xffffffffffffffff
mov dword [rbp - 0x38], 0xffffffff
mov dword [rbp - 0x34], 0xffffffff
test dl, dl
je 0x10051b0d0
mov r15d, 1
test dil, dil
je 0x10051b0d0
mov r9d, dword [rbx + 0x160]
mov dword [rsi + 0x14], 0
test r9d, r9d
je 0x10051ada5
cmp dword [rbp - 0x50], 1
ja 0x10051ad90
cmp dword [rbp - 0x54], 1
jbe 0x10051b350
lea rdx, [rbp - 0x34]
lea rcx, [rbp - 0x38]
lea r9, [rsi + 0x18]
lea r8, [rsi + 0x20]
call fcn.1005174d0
cmp r12d, 2
je 0x10051b320
cmp r12d, 1
je 0x10051adcc
mov r8d, dword [rbp - 0x38]
test r8d, r8d
js 0x10051b1c0
cmp r12d, 3
je 0x10051b1c0
cmp r13d, 2
je 0x10051b1db
cmp r13d, 1
je 0x10051ade7
mov ecx, dword [rbp - 0x38]
test ecx, ecx
js 0x10051b4a8
cmp r14d, 2
je 0x10051b0e0
movzx edi, dil
or edi, r15d
jne 0x10051b105
mov edx, dword [rbp - 0x38]
test edx, edx
js 0x10051b548
test dword [rbx], 0x8000000
je 0x10051b130
mov rdi, qword [rbx + 0x188]
test rdi, rdi
je 0x10051b148
add dword [rdi + 0x534], 1
mov r8, qword [rsi + 0x20]
test r8, r8
je 0x10051ae48
mov r9d, dword [rbp - 0x38]
lea rdx, str.using_pty__s_on_fd__d
mov rcx, rdi
call sym.vim.exe_ch_log
lea r9, [rbp - 0x30]
mov rcx, r9
mov qword [rbp - 0x60], r9
call fcn.100516fc0
call sub.msys_2.0.dll_fork
mov r9, qword [rbp - 0x60]
cmp eax, 0xffffffff
mov r13d, eax
je 0x10051b5f0
test eax, eax
jne 0x10051b260
xor edx, edx
xor ecx, ecx
mov qword [rbp - 0x50], r9
call fcn.100516e50
xor edx, edx
mov ecx, 0x13
call fcn.10065eaa0
mov r9, qword [rbp - 0x50]
xor r8d, r8d
xor ecx, ecx
mov rdx, r9
call sub.msys_2.0.dll_sigprocmask
call sym.vim.exe_ch_log_active
test eax, eax
jne 0x10051b5a0
call sub.msys_2.0.dll_setsid
mov eax, dword [rbx + 0x2e0]
test eax, eax
jle 0x10051b608
mov rdx, qword [sym.vim.exe_term_strings]
mov r8, qword [rdx]
test r8, r8
je 0x10051b210
cmp byte [r8], 0
je 0x10051b210
mov ecx, 5
lea rdi, [0x1006b3070]
mov rsi, r8
repe cmpsb byte [rsi], byte [rdi]
seta dl
sbb dl, 0
test dl, dl
jne 0x10051b210
nop dword [rax + rax]
movsxd rdx, dword [rbx + 0x2e4]
mov r9d, dword [rbp + 0x58]
movsxd rcx, eax
call fcn.100517030
mov rax, qword [rbx + 0x288]
test rax, rax
je 0x10051af6f
mov rdx, qword [rax + 0x18]
mov rdi, qword [rax + 0x38]
mov esi, edx
test edx, edx
jle 0x10051af6f
nop dword [rax]
mov rax, qword [rdi + 8]
test rax, rax
je 0x10051b250
cmp rax, qword [sym.vim.exe_hash_removed]
je 0x10051b250
mov rcx, rdi
add rdi, 0x10
call sym.vim.exe_dict_lookup
mov rcx, rax
call sym.vim.exe_tv_get_string
mov rcx, qword [rdi - 8]
mov rdx, rax
call sym.vim.exe_vim_setenv
sub esi, 1
jne 0x10051af30
cmp r12d, 1
movzx eax, byte [rbp - 0x48]
sete sil
or eax, esi
movzx eax, al
or eax, r15d
jne 0x10051b560
mov ecx, dword [rbp - 0x34]
test ecx, ecx
jns 0x10051b4c0
xor ecx, ecx
xor r15d, r15d
mov r12d, 0xffffffff
call sub.msys_2.0.dll_close
mov byte [rbp - 0x48], 0
mov ecx, dword [rbp - 0x28]
test ecx, ecx
js 0x10051b5c8
call sub.msys_2.0.dll_dup
mov rsi, qword [sym.vim.exe_vim_ignored]
mov dword [rsi], eax
mov ecx, 2
call sub.msys_2.0.dll_close
test r15b, r15b
jne 0x10051b516
cmp r14d, 4
je 0x10051b680
mov ecx, dword [rbp - 0x14]
test ecx, ecx
js 0x10051b650
call sub.msys_2.0.dll_dup
mov r13d, 1
mov dword [rsi], eax
mov ecx, 1
call sub.msys_2.0.dll_close
cmp byte [rbp - 0x48], 0
jne 0x10051b534
mov ecx, dword [rbp - 0x1c]
test ecx, ecx
js 0x10051b5e0
call sub.msys_2.0.dll_dup
mov dword [rsi], eax
mov ecx, dword [rbp - 0x28]
test ecx, ecx
js 0x10051b028
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x24]
test ecx, ecx
js 0x10051b034
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x20]
test ecx, ecx
js 0x10051b040
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x1c]
test ecx, ecx
js 0x10051b04c
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x18]
test ecx, ecx
js 0x10051b058
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x14]
test ecx, ecx
js 0x10051b064
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x38]
test ecx, ecx
js 0x10051b078
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x34]
call sub.msys_2.0.dll_close
cmp r12d, 0xffffffff
je 0x10051b086
mov ecx, r12d
call sub.msys_2.0.dll_close
mov r12, qword [rbx + 0x2d8]
test r12, r12
je 0x10051b0af
mov rax, qword [sym.vim.exe_p_verbose]
cmp qword [rax], 4
jg 0x10051b695
mov rcx, r12
call fcn.10065e3f0
test eax, eax
jne 0x10051b0c4
mov rdx, qword [rbp + 0x40]
mov rcx, qword [rdx]
call sub.msys_2.0.dll_execvp
test r13d, r13d
jne 0x10051b638
mov ecx, 0x7a
call sub.msys_2.0.dll__exit
nop
xor r15d, r15d
cmp r14d, 1
sete r15b
jmp 0x10051ad6d
mov rdi, qword [rbx + 0x140]
mov r8d, 0x180
mov edx, 0x601
mov rcx, rdi
call sub.msys_2.0.dll_open
mov dword [rbp - 0x14], eax
test eax, eax
js 0x100663ea0
cmp r12d, 1
jne 0x10051ae09
cmp r13d, 1
jne 0x10051ae09
test r15d, r15d
je 0x10051ae09
xor edi, edi
jmp 0x10051ae48
call sym.vim.exe_add_channel
mov rdi, rax
test rax, rax
jne 0x10051ae2c
nop dword [rax]
xor edi, edi
mov rcx, rdi
call sym.vim.exe_channel_unref
mov ecx, dword [rbp - 0x28]
test ecx, ecx
jns 0x10051b490
mov ecx, dword [rbp - 0x24]
test ecx, ecx
jns 0x10051b478
mov ecx, dword [rbp - 0x20]
test ecx, ecx
jns 0x10051b460
mov ecx, dword [rbp - 0x1c]
test ecx, ecx
jns 0x10051b448
mov ecx, dword [rbp - 0x18]
test ecx, ecx
jns 0x10051b430
mov ecx, dword [rbp - 0x14]
test ecx, ecx
jns 0x10051b418
mov ecx, dword [rbp - 0x38]
test ecx, ecx
jns 0x10051b400
mov ecx, dword [rbp - 0x34]
test ecx, ecx
jns 0x10051b397
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rcx, [rbp - 0x28]
call sub.msys_2.0.dll_pipe
test eax, eax
js 0x10051b148
cmp r13d, 2
jne 0x10051add6
mov r9, qword [rbx + 0x138]
mov r8d, 0x1a4
mov edx, 0x601
mov rcx, r9
mov qword [rbp - 0x60], r9
call sub.msys_2.0.dll_open
mov r9, qword [rbp - 0x60]
test eax, eax
mov dword [rbp - 0x1c], eax
jns 0x10051ade7
jmp 0x100663ebf
mov rdx, qword [sym.vim.exe_t_colors]
lea r8, str.xterm_256color
mov edx, dword [rdx]
cmp edx, 0xff
jg 0x10051af00
cmp edx, 0x10
lea r8, [0x1006b3070]
lea rdx, str.xterm_color
cmovg r8, rdx
jmp 0x10051af00
add rdi, 0x10
jmp 0x10051af30
xor r8d, r8d
mov rdx, r9
xor ecx, ecx
mov dword [rbp - 0x48], eax
call sub.msys_2.0.dll_sigprocmask
mov r10d, dword [rbp - 0x48]
mov eax, dword [rbp - 0x38]
mov qword [rsi + 0x68], rdi
mov dword [rsi + 0x14], 1
mov dword [rsi + 0x10], r10d
test eax, eax
jns 0x10051b3c0
mov ecx, dword [rbp - 0x28]
test ecx, ecx
jns 0x10051b3a8
mov ecx, dword [rbp - 0x1c]
test ecx, ecx
jns 0x10051b3e8
mov ecx, dword [rbp - 0x14]
test ecx, ecx
jns 0x10051b3d8
test rdi, rdi
je 0x10051b368
cmp dword [rbp - 0x50], 1
mov edx, 0xffffffff
jbe 0x10051b2cc
mov edx, dword [rbp - 0x24]
test edx, edx
cmovs edx, dword [rbp - 0x38]
cmp dword [rbp - 0x54], 1
mov r8d, 0xffffffff
jbe 0x10051b2e4
mov r8d, dword [rbp - 0x20]
test r8d, r8d
cmovs r8d, dword [rbp - 0x38]
movzx eax, byte [rbp - 0x55]
mov r9d, 0xffffffff
or eax, r15d
jne 0x10051b300
mov r9d, dword [rbp - 0x18]
test r9d, r9d
js 0x10051b668
mov rcx, rdi
call sym.vim.exe_channel_set_pipes
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call sym.vim.exe_channel_set_job
jmp 0x10051b1aa
mov r9, qword [rbx + 0x148]
xor r8d, r8d
xor edx, edx
mov rcx, r9
mov qword [rbp - 0x60], r9
call sub.msys_2.0.dll_open
mov r9, qword [rbp - 0x60]
test eax, eax
mov dword [rbp - 0x28], eax
jns 0x10051adcc
jmp 0x100663ee6
movzx eax, byte [rbp - 0x55]
or eax, r15d
jne 0x10051ada5
jmp 0x10051ad90
mov ecx, dword [rbp - 0x24]
test ecx, ecx
js 0x10051b374
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x20]
test ecx, ecx
js 0x10051b380
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x18]
test ecx, ecx
js 0x10051b38c
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x38]
test ecx, ecx
js 0x10051b1aa
call sub.msys_2.0.dll_close
jmp 0x10051b1aa
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x1c]
test ecx, ecx
js 0x10051b2a4
jmp 0x10051b3e8
mov ecx, dword [rbp - 0x34]
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x28]
test ecx, ecx
js 0x10051b299
jmp 0x10051b3a8
call sub.msys_2.0.dll_close
jmp 0x10051b2af
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x14]
test ecx, ecx
js 0x10051b2af
jmp 0x10051b3d8
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x34]
test ecx, ecx
js 0x10051b1aa
jmp 0x10051b397
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x38]
test ecx, ecx
js 0x10051b19f
jmp 0x10051b400
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x14]
test ecx, ecx
js 0x10051b194
jmp 0x10051b418
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x18]
test ecx, ecx
js 0x10051b189
jmp 0x10051b430
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x1c]
test ecx, ecx
js 0x10051b17e
jmp 0x10051b448
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x20]
test ecx, ecx
js 0x10051b173
jmp 0x10051b460
call sub.msys_2.0.dll_close
mov ecx, dword [rbp - 0x24]
test ecx, ecx
js 0x10051b168
jmp 0x10051b478
lea rcx, [rbp - 0x20]
call sub.msys_2.0.dll_pipe
test eax, eax
jns 0x10051ade7
jmp 0x10051b148
xor r15d, r15d
xor esi, esi
xor edi, edi
mov r12d, 0xffffffff
call sym.vim.exe_setup_slavepty
mov ecx, dword [rbp - 0x34]
xor r8d, r8d
mov edx, 0x540e
call sub.msys_2.0.dll_ioctl
xor ecx, ecx
call sub.msys_2.0.dll_close
test sil, sil
je 0x10051b5b8
mov ecx, r12d
call sub.msys_2.0.dll_dup
mov rsi, qword [sym.vim.exe_vim_ignored]
mov ecx, 2
mov dword [rsi], eax
call sub.msys_2.0.dll_close
test r15b, r15b
je 0x10051afd4
mov ecx, r12d
call sub.msys_2.0.dll_dup
mov ecx, 1
mov dword [rsi], eax
call sub.msys_2.0.dll_close
cmp byte [rbp - 0x48], 0
je 0x10051b00a
mov ecx, r12d
call sub.msys_2.0.dll_dup
mov dword [rsi], eax
jmp 0x10051b01c
lea rcx, [rbp - 0x18]
call sub.msys_2.0.dll_pipe
test eax, eax
jns 0x10051ae09
jmp 0x10051b148
xor r8d, r8d
mov edx, 2
lea rcx, str._dev_null
call sub.msys_2.0.dll_open
mov r12d, eax
test eax, eax
js 0x10051b6b3
mov ecx, dword [rbp - 0x34]
and r15d, 1
mov edi, 1
test ecx, ecx
js 0x10051b4e2
jmp 0x10051b4cd
lea rdx, [0x1006b3239]
mov rcx, rdx
call sym.vim.exe_ch_logfile
jmp 0x10051aeac
and byte [rbp - 0x48], dil
and r15d, edi
jmp 0x10051afa8
mov ecx, dword [rbp - 0x34]
call sub.msys_2.0.dll_dup
mov rsi, qword [sym.vim.exe_vim_ignored]
mov dword [rsi], eax
jmp 0x10051afc1
mov ecx, dword [rbp - 0x34]
call sub.msys_2.0.dll_dup
mov dword [rsi], eax
jmp 0x10051b01c
xor r8d, r8d
mov rdx, r9
xor ecx, ecx
call sub.msys_2.0.dll_sigprocmask
jmp 0x10051b14a
mov rax, qword [sym.vim.exe_Columns]
mov r9d, dword [rbp + 0x58]
lea r8, [0x1006b3244]
mov rdx, qword [rax]
mov rax, qword [sym.vim.exe_Rows]
mov rcx, qword [rax]
call fcn.100517030
jmp 0x10051af13
lea rcx, str.executing_job_failed
call sub.msys_2.0.dll_perror
jmp 0x10051b0c4
mov ecx, dword [rbp - 0x34]
mov r13d, 1
call sub.msys_2.0.dll_dup
mov dword [rsi], eax
jmp 0x10051aff6
mov r9d, dword [rbp - 0x38]
mov eax, 0xffffffff
cmp r9d, r8d
cmove r9d, eax
jmp 0x10051b300
mov ecx, dword [rbp - 0x1c]
mov r13d, 1
call sub.msys_2.0.dll_dup
mov dword [rsi], eax
jmp 0x10051aff6
call sym.vim.exe_verbose_enter
mov rdx, r12
lea rcx, str.chdir__s_
call sym.vim.exe_smsg
call sym.vim.exe_verbose_leave
jmp 0x10051b0a3
lea rcx, str.opening__dev_null_failed
call sub.msys_2.0.dll_perror
mov ecx, 0x7b
call sub.msys_2.0.dll__exit
nop dword [rax]
mov rcx, qword [sym.vim.exe_e_notopen]
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, rdi
xor edi, edi
mov rcx, rax
call sym.vim.exe_semsg
nop
jmp 0x10051b14a
mov rcx, qword [sym.vim.exe_e_notopen]
mov qword [rbp - 0x48], r9
xor edi, edi
call sub.msys_intl_8.dll_libintl_gettext
mov r9, qword [rbp - 0x48]
mov rcx, rax
mov rdx, r9
call sym.vim.exe_semsg
nop
jmp 0x10051b14a
mov rcx, qword [sym.vim.exe_e_notopen]
mov qword [rbp - 0x48], r9
xor edi, edi
call sub.msys_intl_8.dll_libintl_gettext
mov r9, qword [rbp - 0x48]
mov rcx, rax
mov rdx, r9
call sym.vim.exe_semsg
nop
jmp 0x10051b14a