Function at 0x1005226f0
Capabilities:
Set current directory

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov esi, dword [r8 + 0x28]
mov r15d, dword [r8 + 0x20]
mov ebp, dword [r8 + 0x24]
lea eax, [rsi - 1]
cmp r15d, 1
mov dword [rsp + 0x24], eax
lea eax, [r15 - 1]
mov r12, rdx
mov rbx, r8
mov dword [rsp + 0x28], eax
lea eax, [rbp - 2]
sete byte [rsp + 0x20]
and eax, 0xfffffffd
movzx edx, byte [rsp + 0x20]
sete byte [rsp + 0x2f]
cmp ebp, 4
mov qword [rsp + 0xb0], rcx
sete dil
mov dword [rsp + 0xc8], r9d
mov qword [rsp + 0x48], 0xffffffffffffffff
mov qword [rsp + 0x50], 0xffffffffffffffff
mov qword [rsp + 0x58], 0xffffffffffffffff
mov dword [rsp + 0x38], 0xffffffff
mov dword [rsp + 0x3c], 0xffffffff
test dl, dl
je 0x100522b18
mov r13d, 1
test dil, dil
je 0x100522b18
mov dword [r12 + 0x14], 0
mov eax, dword [rbx + 0x160]
test eax, eax
je 0x1005227d1
cmp dword [rsp + 0x24], 1
ja 0x1005227b8
cmp dword [rsp + 0x28], 1
jbe 0x100522db0
lea rdx, [rsp + 0x3c]
lea rcx, [rsp + 0x38]
lea r9, [r12 + 0x18]
lea r8, [r12 + 0x20]
call fcn.10051ef20
cmp esi, 2
je 0x100522d58
cmp esi, 1
je 0x1005227f6
mov r14d, dword [rsp + 0x38]
cmp esi, 3
je 0x100522c20
test r14d, r14d
js 0x100522c20
cmp r15d, 2
je 0x100522d82
cmp r15d, 1
je 0x100522814
mov r14d, dword [rsp + 0x38]
test r14d, r14d
js 0x100522f18
cmp ebp, 2
je 0x100522b30
movzx edi, dil
or edi, r13d
jne 0x100522b56
mov r14d, dword [rsp + 0x38]
test r14d, r14d
js 0x100522f80
test dword [rbx], 0x8000000
je 0x100522b80
mov r15, qword [rbx + 0x188]
mov r14d, dword [rsp + 0x38]
test r15, r15
je 0x100522ba0
add dword [r15 + 0x534], 1
mov r8, qword [r12 + 0x20]
test r8, r8
je 0x10052287f
mov r9d, dword [rsp + 0x38]
lea rdx, str.using_pty__s_on_fd__d
mov rcx, r15
call sym.vim.exe_ch_log
lea r14, [rsp + 0x40]
mov rcx, r14
call fcn.10051ea40
call sub.msys_2.0.dll_fork
mov edi, eax
cmp eax, 0xffffffff
je 0x100523030
test eax, eax
jne 0x100522c88
xor edx, edx
xor ecx, ecx
call fcn.10051e8d0
xor edx, edx
mov ecx, 0x13
call fcn.1006731b0
xor r8d, r8d
xor ecx, ecx
mov rdx, r14
call sub.msys_2.0.dll_sigprocmask
call sym.vim.exe_ch_log_active
test eax, eax
jne 0x100522fa0
call sub.msys_2.0.dll_setsid
mov r14d, dword [rbx + 0x2e0]
test r14d, r14d
jle 0x100523050
mov rax, qword [sym.vim.exe_term_strings]
mov r12, qword [rax]
test r12, r12
je 0x100522c40
cmp byte [r12], 0
je 0x100522c40
mov r8d, 5
lea rdx, [0x1006cedd0]
mov rcx, r12
call sub.msys_2.0.dll_strncmp
test eax, eax
jne 0x100522c40
nop dword [rax + rax]
movsxd rdx, dword [rbx + 0x2e4]
mov r9d, dword [rsp + 0xc8]
movsxd rcx, r14d
mov r8, r12
call fcn.10051eab0
mov rax, qword [rbx + 0x288]
test rax, rax
je 0x1005229a4
mov rdx, qword [rax + 0x18]
mov r15, qword [rax + 0x38]
mov r12d, edx
test edx, edx
jle 0x1005229a4
mov r14, qword [sym.vim.exe_hash_removed]
nop dword [rax]
mov rax, qword [r15 + 8]
test rax, rax
je 0x100522c78
cmp rax, r14
je 0x100522c78
mov rcx, r15
add r15, 0x10
call sym.vim.exe_dict_lookup
mov rcx, rax
call sym.vim.exe_tv_get_string
mov rcx, qword [r15 - 8]
mov rdx, rax
call sym.vim.exe_vim_setenv
sub r12d, 1
jne 0x100522968
cmp esi, 1
movzx eax, byte [rsp + 0x20]
sete sil
or eax, esi
movzx eax, al
or eax, r13d
jne 0x100522fb8
mov r14d, dword [rsp + 0x3c]
test r14d, r14d
jns 0x100522f38
xor ecx, ecx
xor r13d, r13d
mov r12d, 0xffffffff
call sub.msys_2.0.dll_close
mov byte [rsp + 0x20], 0
mov ecx, dword [rsp + 0x48]
test ecx, ecx
js 0x100523020
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 r13b, r13b
jne 0x100523000
cmp ebp, 4
je 0x1005230c8
mov ecx, dword [rsp + 0x5c]
test ecx, ecx
js 0x100523098
call sub.msys_2.0.dll_dup
mov edi, 1
mov ecx, 1
mov dword [rsi], eax
call sub.msys_2.0.dll_close
cmp byte [rsp + 0x20], 0
jne 0x100522ff0
mov ecx, dword [rsp + 0x54]
test ecx, ecx
js 0x100523010
call sub.msys_2.0.dll_dup
mov ecx, dword [rsp + 0x48]
mov dword [rsi], eax
test ecx, ecx
js 0x100522a64
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x4c]
test ecx, ecx
js 0x100522a71
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x50]
test ecx, ecx
js 0x100522a7e
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x54]
test ecx, ecx
js 0x100522a8b
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x58]
test ecx, ecx
js 0x100522a98
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x5c]
test ecx, ecx
js 0x100522aa5
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x38]
test ecx, ecx
js 0x100522aba
call sub.msys_2.0.dll_close
mov ecx, r14d
call sub.msys_2.0.dll_close
cmp r12d, 0xffffffff
je 0x100522ac8
mov ecx, r12d
call sub.msys_2.0.dll_close
mov r12, qword [rbx + 0x2d8]
test r12, r12
je 0x100522af1
mov rax, qword [sym.vim.exe_p_verbose]
cmp qword [rax], 4
jg 0x1005230db
mov rcx, r12
call fcn.100672b00
test eax, eax
jne 0x100522b09
mov rdx, qword [rsp + 0xb0]
mov rcx, qword [rdx]
call sub.msys_2.0.dll_execvp
test edi, edi
jne 0x100523080
mov ecx, 0x7a
call sub.msys_2.0.dll__exit
nop dword [rax + rax]
xor r13d, r13d
cmp ebp, 1
sete r13b
jmp 0x100522793
mov r14, qword [rbx + 0x140]
mov r8d, 0x180
mov edx, 0x601
mov rcx, r14
call sub.msys_2.0.dll_open
mov dword [rsp + 0x5c], eax
test eax, eax
js 0x100678870
cmp esi, 1
jne 0x100522838
cmp r15d, 1
jne 0x100522838
test r13d, r13d
je 0x100522838
xor r15d, r15d
jmp 0x10052287f
call sym.vim.exe_add_channel
mov r14d, dword [rsp + 0x38]
mov r15, rax
test rax, rax
jne 0x100522861
nop word cs:[rax + rax]
mov rcx, r15
call sym.vim.exe_channel_unref
mov ecx, dword [rsp + 0x48]
test ecx, ecx
jns 0x100522f00
mov ecx, dword [rsp + 0x4c]
test ecx, ecx
jns 0x100522ee8
mov ecx, dword [rsp + 0x50]
test ecx, ecx
jns 0x100522ed0
mov ecx, dword [rsp + 0x54]
test ecx, ecx
jns 0x100522eb8
mov ecx, dword [rsp + 0x58]
test ecx, ecx
jns 0x100522ea0
mov ecx, dword [rsp + 0x5c]
test ecx, ecx
jns 0x100522e90
test r14d, r14d
jns 0x100522e70
mov ecx, dword [rsp + 0x3c]
test ecx, ecx
jns 0x100522e60
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [rsp + 0x48]
call sub.msys_2.0.dll_pipe
test eax, eax
jns 0x1005227f6
xor r15d, r15d
jmp 0x100522ba0
mov rax, qword [sym.vim.exe_t_colors]
lea r12, str.xterm_256color
mov eax, dword [rax]
cmp eax, 0xff
jg 0x100522928
cmp eax, 0x10
lea r12, str.xterm_color
lea rax, [0x1006cedd0]
cmovle r12, rax
jmp 0x100522928
add r15, 0x10
jmp 0x100522968
mov rdx, r14
xor r8d, r8d
xor ecx, ecx
mov dword [rsp + 0x20], eax
call sub.msys_2.0.dll_sigprocmask
mov r9d, dword [rsp + 0x20]
mov r14d, dword [rsp + 0x38]
mov dword [r12 + 0x14], 1
mov qword [r12 + 0x68], r15
mov dword [r12 + 0x10], r9d
test r14d, r14d
jns 0x100522e48
mov ecx, dword [rsp + 0x48]
test ecx, ecx
jns 0x100522e30
mov ecx, dword [rsp + 0x54]
test ecx, ecx
jns 0x100522e18
mov ecx, dword [rsp + 0x5c]
test ecx, ecx
jns 0x100522dc8
test r15, r15
je 0x100522dd6
cmp dword [rsp + 0x24], 1
mov edx, 0xffffffff
jbe 0x100522d02
mov edx, dword [rsp + 0x4c]
test edx, edx
cmovs edx, r14d
cmp dword [rsp + 0x28], 1
mov r8d, 0xffffffff
jbe 0x100522d1b
mov r8d, dword [rsp + 0x50]
test r8d, r8d
cmovs r8d, r14d
movzx eax, byte [rsp + 0x2f]
mov r9d, 0xffffffff
or eax, r13d
jne 0x100522d39
mov r9d, dword [rsp + 0x58]
test r9d, r9d
js 0x1005230b0
mov rcx, r15
call sym.vim.exe_channel_set_pipes
mov r8, rbx
mov rdx, r12
mov rcx, r15
call sym.vim.exe_channel_set_job
jmp 0x100522c05
mov r14, qword [rbx + 0x148]
xor r8d, r8d
xor edx, edx
mov rcx, r14
call sub.msys_2.0.dll_open
mov dword [rsp + 0x48], eax
test eax, eax
js 0x100678894
cmp r15d, 2
jne 0x100522800
mov r14, qword [rbx + 0x138]
mov r8d, 0x1a4
mov edx, 0x601
mov rcx, r14
call sub.msys_2.0.dll_open
mov dword [rsp + 0x54], eax
test eax, eax
jns 0x100522814
jmp 0x1006788b8
movzx eax, byte [rsp + 0x2f]
or eax, r13d
jne 0x1005227d1
jmp 0x1005227b8
call sub.msys_2.0.dll_close
test r15, r15
jne 0x100522cec
mov ecx, dword [rsp + 0x4c]
test ecx, ecx
js 0x100522de3
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x50]
test ecx, ecx
js 0x100522df0
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x58]
test ecx, ecx
js 0x100522dfd
call sub.msys_2.0.dll_close
test r14d, r14d
js 0x100522c05
mov ecx, r14d
call sub.msys_2.0.dll_close
jmp 0x100522c05
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x5c]
test ecx, ecx
js 0x100522ce3
jmp 0x100522dc8
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x54]
test ecx, ecx
js 0x100522cd7
jmp 0x100522e18
mov ecx, dword [rsp + 0x3c]
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x48]
test ecx, ecx
js 0x100522ccb
jmp 0x100522e30
call sub.msys_2.0.dll_close
jmp 0x100522c05
mov ecx, r14d
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x3c]
test ecx, ecx
js 0x100522c05
jmp 0x100522e60
call sub.msys_2.0.dll_close
test r14d, r14d
js 0x100522bf9
jmp 0x100522e70
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x5c]
test ecx, ecx
js 0x100522bf0
jmp 0x100522e90
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x58]
test ecx, ecx
js 0x100522be4
jmp 0x100522ea0
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x54]
test ecx, ecx
js 0x100522bd8
jmp 0x100522eb8
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x50]
test ecx, ecx
js 0x100522bcc
jmp 0x100522ed0
call sub.msys_2.0.dll_close
mov ecx, dword [rsp + 0x4c]
test ecx, ecx
js 0x100522bc0
jmp 0x100522ee8
lea rcx, [rsp + 0x50]
call sub.msys_2.0.dll_pipe
test eax, eax
jns 0x100522814
xor r15d, r15d
jmp 0x100522ba0
mov byte [rsp + 0x20], 0
xor r13d, r13d
xor esi, esi
mov r12d, 0xffffffff
mov ecx, r14d
call sym.vim.exe_setup_slavepty
xor r8d, r8d
mov edx, 0x540e
mov ecx, r14d
call sub.msys_2.0.dll_ioctl
xor ecx, ecx
call sub.msys_2.0.dll_close
test sil, sil
je 0x1005229e1
mov ecx, r12d
call sub.msys_2.0.dll_dup
jmp 0x1005229f2
lea rcx, [rsp + 0x58]
call sub.msys_2.0.dll_pipe
test eax, eax
jns 0x100522838
xor r15d, r15d
jmp 0x100522ba0
lea rcx, [0x1006cefa1]
mov rdx, rcx
call sym.vim.exe_ch_logfile
jmp 0x1005228d3
xor r8d, r8d
mov edx, 0x10002
lea rcx, str._dev_null
call sub.msys_2.0.dll_open
mov r12d, eax
test eax, eax
js 0x1005230f9
mov r14d, dword [rsp + 0x3c]
and r13d, 1
test r14d, r14d
js 0x100522f60
jmp 0x100522f48
mov ecx, r12d
call sub.msys_2.0.dll_dup
jmp 0x100522a55
mov ecx, r12d
call sub.msys_2.0.dll_dup
jmp 0x100522a2d
mov ecx, r14d
call sub.msys_2.0.dll_dup
jmp 0x100522a55
mov ecx, r14d
call sub.msys_2.0.dll_dup
jmp 0x1005229f2
mov rdx, r14
xor r8d, r8d
xor ecx, ecx
call sub.msys_2.0.dll_sigprocmask
mov r14d, dword [rsp + 0x38]
jmp 0x100522ba0
mov rax, qword [sym.vim.exe_Columns]
mov r9d, dword [rsp + 0xc8]
lea r8, [0x1006cefac]
mov rdx, qword [rax]
mov rax, qword [sym.vim.exe_Rows]
mov rcx, qword [rax]
call fcn.10051eab0
jmp 0x100522942
lea rcx, str.executing_job_failed
call sub.msys_2.0.dll_perror
jmp 0x100522b09
mov ecx, r14d
mov edi, 1
call sub.msys_2.0.dll_dup
jmp 0x100522a2d
cmp r14d, r8d
mov r9d, 0xffffffff
cmovne r9d, r14d
jmp 0x100522d39
mov ecx, dword [rsp + 0x54]
mov edi, 1
call sub.msys_2.0.dll_dup
jmp 0x100522a2d
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 0x100522ae5
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
mov rcx, qword [sym.vim.exe_e_cant_open_file_str]
xor r15d, r15d
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, r14
mov rcx, rax
call sym.vim.exe_semsg
mov r14d, dword [rsp + 0x38]
jmp 0x100522ba0
mov rcx, qword [sym.vim.exe_e_cant_open_file_str]
xor r15d, r15d
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, r14
mov rcx, rax
call sym.vim.exe_semsg
mov r14d, dword [rsp + 0x38]
jmp 0x100522ba0
mov rcx, qword [sym.vim.exe_e_cant_open_file_str]
xor r15d, r15d
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, r14
mov rcx, rax
call sym.vim.exe_semsg
mov r14d, dword [rsp + 0x38]
jmp 0x100522ba0