Function at 0x10042a360
Capabilities:
Set current directory

Disassembly:
mov eax, dword [rcx]
test eax, eax
js 0x10042a370
mov ecx, eax
jmp fcn.100431a10
mov rcx, qword [rcx + 8]
jmp 0x10042fa50
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
call sub.msys_2.0.dll_chdir
mov ebx, eax
test eax, eax
jne 0x10042fa80
mov eax, ebx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
call sub.msys_2.0.dll___errno
cmp dword [rax], 0x5b
jne 0x10042fa6a
mov rcx, rsi
call sub.msys_2.0.dll_strlen
mov rbx, rax
lea rbp, [rsi + rax]
test rax, rax
je 0x10042fd95
cmp rax, 0xfff
jbe 0x10042fd38
lea r12, [0x10043c1ee]
mov rcx, rsi
mov rdx, r12
call sub.msys_2.0.dll_strspn
mov rdi, rax
cmp rax, 2
je 0x10042fba0
mov r13d, 0xfffffffe
test rax, rax
jne 0x10042fc70
cmp byte [rsi], 0x2f
je 0x10042fd76
cmp rbp, rsi
jb 0x10042fd57
mov rax, rbp
sub rax, rsi
cmp rax, 0xfff
jg 0x10042fb33
jmp 0x10042fc15
mov byte [rbx], 0x2f
add rbx, 1
mov rdx, r12
mov rcx, rbx
call sub.msys_2.0.dll_strspn
lea rsi, [rbx + rax]
mov rax, rbp
sub rax, rsi
cmp rax, 0xfff
jle 0x10042fc20
mov r13d, edi
mov r8d, 0x1000
mov edx, 0x2f
mov rcx, rsi
call sub.msys_2.0.dll_memrchr
mov rbx, rax
test rax, rax
je 0x10042fc00
mov byte [rax], 0
sub rax, rsi
cmp rax, 0xfff
jg 0x10042fd19
mov r8d, 0x60c000
mov rdx, rsi
mov ecx, r13d
call sub.msys_2.0.dll_openat
mov edi, eax
test eax, eax
js 0x10042fce0
test r13d, r13d
js 0x10042fb08
mov ecx, r13d
call sub.msys_2.0.dll_close
test eax, eax
je 0x10042fb08
call fcn.10042fa20
nop dword [rax]
lea r8, [rbx - 3]
lea rcx, [rsi + 3]
mov edx, 0x2f
call sub.msys_2.0.dll_memchr
mov rbx, rax
test rax, rax
je 0x10042fc00
mov byte [rax], 0
mov r8d, 0x60c000
mov rdx, rsi
mov ecx, 0xfffffffe
call sub.msys_2.0.dll_openat
mov byte [rbx], 0x2f
mov r13d, eax
test eax, eax
js 0x10042fd10
add rbx, 1
mov rdx, r12
mov rcx, rbx
call sub.msys_2.0.dll_strspn
lea rsi, [rbx + rax]
jmp 0x10042fadc
call sub.msys_2.0.dll___errno
mov dword [rax], 0x5b
mov ebx, 0xffffffff
jmp 0x10042fa6a
mov edi, r13d
nop dword [rax + rax]
cmp rsi, rbp
jae 0x10042fca0
mov r8d, 0x60c000
mov rdx, rsi
mov ecx, edi
call sub.msys_2.0.dll_openat
mov r13d, eax
test eax, eax
js 0x10042fcab
test edi, edi
jns 0x10042fcf8
mov ecx, r13d
call fcn.100431a10
test eax, eax
jne 0x10042fcc6
mov ecx, r13d
call sub.msys_2.0.dll_close
test eax, eax
jne 0x10042fb94
xor ebx, ebx
jmp 0x10042fa6a
mov r8d, 0x60c000
mov rdx, r12
mov ecx, 0xfffffffe
call sub.msys_2.0.dll_openat
mov r13d, eax
test eax, eax
js 0x10042fd10
add rsi, rdi
jmp 0x10042fadc
mov ecx, edi
call fcn.100431a10
test eax, eax
je 0x10042fce5
mov r13d, edi
call sub.msys_2.0.dll___errno
mov ebx, dword [rax]
test r13d, r13d
jns 0x10042fccd
call sub.msys_2.0.dll___errno
mov dword [rax], ebx
jmp 0x10042fc0b
call sub.msys_2.0.dll___errno
mov ebx, dword [rax]
mov ecx, r13d
call sub.msys_2.0.dll_close
test eax, eax
je 0x10042fcba
jmp 0x10042fb94
mov byte [rbx], 0x2f
jmp 0x10042fcae
test edi, edi
js 0x10042fc60
mov r13d, edi
jmp 0x10042fc50
mov ecx, edi
call sub.msys_2.0.dll_close
test eax, eax
je 0x10042fc44
jmp 0x10042fb94
call sub.msys_2.0.dll___errno
mov ebx, dword [rax]
jmp 0x10042fcba
lea r9, str.slash___dir___4096
lea r8, str.chdir_long
mov edx, 0xb2
lea rcx, str.chdir_long.c
call sub.msys_2.0.dll___assert_func
lea r9, str.4096___len
lea r8, str.chdir_long
mov edx, 0x7e
lea rcx, str.chdir_long.c
call sub.msys_2.0.dll___assert_func
lea r9, str.dir___dir_end
lea r8, str.chdir_long
mov edx, 0xa2
lea rcx, str.chdir_long.c
call sub.msys_2.0.dll___assert_func
lea r9, str.dir____
lea r8, str.chdir_long
mov edx, 0xa1
lea rcx, str.chdir_long.c
call sub.msys_2.0.dll___assert_func
lea r9, str.0___len
lea r8, str.chdir_long
mov edx, 0x7d
lea rcx, str.chdir_long.c
call sub.msys_2.0.dll___assert_func
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop