Function at 0x4151a0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov edx, dword [ebp + 8]
mov eax, dword [edx]
add eax, 0x13c
mov dword [esp + 4], eax
mov eax, edx
add eax, 0xec
mov dword [esp], eax
call fcn.00416770
mov dword [ebp - 0x10], eax
test eax, eax
js 0x41551d
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0xe4], 0x40
setg al
cmp dword [ebp - 0x10], 0x40
setg dl
or eax, edx
test al, 1
jne 0x415430
mov eax, dword [ebp - 0x10]
mov edx, 4
mov ecx, 0x4000
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.cygwin1.dll__fcntl64
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xec]
test eax, eax
js 0x4153e0
mov ecx, dword [ebp + 8]
mov ebx, dword [ecx]
mov edx, dword [ebx + 0x140]
movzx eax, byte [edx]
test al, al
jne 0x4153c0
cld
mov esi, dword [ebx + 0x140]
mov eax, 4
mov ecx, eax
mov edi, 0x4256aa
repe cmpsb byte [esi], byte es:[edi]
setb al
seta dl
sub dl, al
movsx eax, dl
cmp eax, 1
sbb eax, eax
and eax, 0x80
dec eax
mov dword [esp + 4], eax
lea eax, [ebx + 0x160]
xor edi, edi
mov dword [esp], eax
call fcn.00415100
mov dword [esp], fcn.00405570
call sub.cygwin1.dll_atexit
mov dword [esp], 1
mov eax, 0x405890
mov dword [esp + 4], eax
call sub.cygwin1.dll_signal
mov dword [esp], 2
mov eax, 0x405890
mov dword [esp + 4], eax
call sub.cygwin1.dll_signal
mov dword [esp], 3
mov eax, 0x405890
mov dword [esp + 4], eax
call sub.cygwin1.dll_signal
mov dword [esp], 0xf
mov eax, 0x405890
mov dword [esp + 4], eax
call sub.cygwin1.dll_signal
mov dword [esp], 0x14
mov eax, 0x4053f0
mov dword [esp + 4], eax
call sub.cygwin1.dll_signal
mov dword [esp + 0xc], edi
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x10]
mov dword [esp + 8], eax
movzx eax, word [edx + 0xe]
mov dword [esp + 4], eax
mov eax, dword [edx + 0xec]
mov dword [esp], eax
call fcn.00405cb0
mov ecx, dword [ebp + 8]
mov ebx, dword [ecx]
call sub.cygwin1.dll_fork
cmp eax, 0xffffffff
mov dword [ebx + 0x130], eax
je 0x415507
test eax, eax
je 0x415456
mov dword [esp], 0
call sub.cygwin1.dll_dup
xor edx, edx
mov ebx, eax
mov dword [esp + 4], edx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xec]
mov dword [esp], eax
call sub.cygwin1.dll_dup2
mov ecx, dword [ebp + 8]
mov eax, 0x73
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.004054e0
mov dword [esp], ebx
xor eax, eax
mov dword [esp + 4], eax
call sub.cygwin1.dll_dup2
mov dword [esp], ebx
call sub.cygwin1.dll_close
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xec]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov eax, dword [ebp - 0x10]
cmp eax, 2
jl 0x4153d2
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xe4]
cmp edx, eax
jle 0x4153a4
mov eax, edx
mov edx, dword [ebp + 8]
inc eax
mov dword [edx + 0xf0], eax
mov eax, dword [ebp - 0x10]
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [edx + 1], 0
movsx eax, al
je 0x41525e
jmp 0x415233
mov eax, 2
jmp 0x415395
mov eax, dword [edx]
mov eax, dword [eax + 0x13c]
mov dword [esp], eax
call fcn.004167c0
mov ecx, dword [ebp + 8]
test eax, eax
mov dword [ecx + 0xec], eax
jns 0x41521d
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov eax, dword [eax + 0x13c]
mov dword [esp], str.cant_open_slave_tty__s
mov dword [esp + 4], eax
call fcn.00412660
mov eax, 0xffffffff
jmp 0x4153b1
mov dword [esp], str.fd_too_high:__d_max
mov ebx, 0x40
mov dword [esp + 4], ebx
call fcn.00412660
call fcn.00405570
mov dword [esp], 1
call sub.cygwin1.dll_exit
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xe4]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov eax, dword [eax + 0x13c]
mov dword [esp + 4], eax
mov eax, dword [ecx + 0xec]
mov dword [esp], eax
call fcn.004167f0
test eax, eax
js 0x415535
mov edx, dword [ebp + 8]
xor esi, esi
mov ebx, 1
mov dword [esp + 4], esi
mov eax, dword [edx + 0xec]
mov dword [esp], eax
call sub.cygwin1.dll_dup2
mov dword [esp + 4], ebx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xec]
mov dword [esp], eax
call sub.cygwin1.dll_dup2
mov edx, dword [ebp + 8]
mov ecx, 2
mov dword [esp + 4], ecx
mov eax, dword [edx + 0xec]
mov dword [esp], eax
call sub.cygwin1.dll_dup2
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xec]
cmp eax, 2
jg 0x41552b
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00414f80
jmp 0x41544a
mov dword [esp], str.cant_fork
call fcn.00412660
mov eax, 0xffffffff
jmp 0x4153b1
mov dword [esp], str.cant_open_pseudo_tty
call fcn.00412660
jmp 0x415513
mov dword [esp], eax
call sub.cygwin1.dll_close
jmp 0x4154f0
mov dword [esp], str.could_not_obtain_control_of_tty
call fcn.00412660
jmp 0x41544a