Function at 0x4067ef
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov eax, 0x103c
call fcn.004288a8
call fcn.00401b40
call fcn.0040261f
mov ebx, 0
cmp dword [ebp + 8], 0
je 0x406dd6
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00401d75
mov dword [ebp - 0x1028], eax
mov edx, eax
movzx eax, byte [eax]
cmp al, 0x23
jne 0x4068f1
mov esi, edx
add esi, 1
movzx eax, byte [esi]
cmp al, 0x2b
je 0x406846
cmp al, 0x2d
jne 0x40685f
lea eax, [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00402104
mov edi, eax
add edi, dword [0x43cb28]
jmp 0x406871
lea eax, [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00402104
lea edi, [eax - 1]
mov edx, dword [ebp - 0x10]
mov ebx, 1
cmp esi, edx
je 0x406dd6
test edi, edi
js 0x40688d
cmp edi, dword [0x43cb24]
jl 0x4068a3
mov dword [esp], str.Equation_not_defined.
call fcn.004029a3
mov ebx, 0
jmp 0x406dd6
cmp byte [edx], 0x3a
sete al
movzx eax, al
add edx, eax
mov dword [esp], edx
call fcn.00401d75
mov edx, eax
cmp byte [eax], 0
je 0x4068d9
sub eax, dword [ebp + 8]
add dword [0x43351c], eax
mov dword [esp + 4], edx
mov dword [esp], edi
call fcn.0040631e
mov ebx, eax
jmp 0x406dd6
mov dword [0x43cb28], edi
mov dword [esp], edi
call fcn.0040217f
mov ebx, 1
jmp 0x406dd6
cmp dword [0x433520], 0
jne 0x40696e
cmp al, 0x21
jne 0x40696e
mov dword [esp], str.SHELL
call sub.cygwin1.dll_getenv
test eax, eax
mov edx, str._bin_sh
cmove eax, edx
mov dword [ebp - 0x10], eax
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.cygwin1.dll_access
test eax, eax
je 0x406941
mov dword [esp], str.Shell_not_found_or_not_executable__check_SHELL_environment_variable.
call fcn.004029a3
mov ebx, 0
jmp 0x406dd6
mov eax, dword [ebp - 0x1028]
add eax, 1
mov dword [esp], eax
call fcn.00401d75
cmp byte [eax], 0
cmove eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.004062bc
test eax, eax
sete al
movzx ebx, al
jmp 0x406dd6
mov dword [ebp - 0x102c], 0
cmp al, 0x3f
jne 0x4069a7
mov eax, dword [ebp - 0x1028]
add eax, 1
mov dword [esp], eax
call fcn.00401d75
mov edx, eax
sub edx, dword [ebp + 8]
add dword [0x43351c], edx
mov dword [esp], eax
call fcn.00406f04
mov ebx, eax
jmp 0x406dd6
mov esi, dword [sym.imp.cygwin1.dll___ctype_ptr__]
mov eax, dword [ebp - 0x1028]
mov dword [ebp - 0x10], eax
movzx eax, byte [eax]
test al, al
je 0x4069f0
movsx eax, al
mov edx, dword [sym.imp.cygwin1.dll___ctype_ptr__]
mov edx, dword [edx]
test byte [edx + eax + 1], 8
jne 0x4069f0
mov ebx, dword [ebp - 0x1028]
add ebx, 1
mov dword [ebp - 0x10], ebx
movzx eax, byte [ebx]
test al, al
je 0x4069f6
movsx edx, al
mov eax, dword [esi]
test byte [eax + edx + 1], 8
je 0x4069d5
jmp 0x4069f6
mov ebx, dword [ebp - 0x1028]
mov eax, dword [ebp - 0x1028]
mov dword [ebp - 0x1020], eax
mov edx, ebx
sub edx, eax
mov dword [ebp - 0x1030], edx
cmp edx, 6
jne 0x406a2d
mov dword [esp + 8], 6
mov dword [esp + 4], 0x42b211
mov dword [esp], eax
call sub.cygwin1.dll_strncasecmp
test eax, eax
je 0x406a4a
mov esi, 0x42d740
mov dword [ebp - 0x1024], 0
mov edx, dword [ebp - 0x1030]
mov dword [ebp - 0x1038], edx
jmp 0x406a67
mov dword [esp], ebx
call fcn.00401d75
mov dword [ebp - 0x1028], eax
mov dword [ebp - 0x102c], 1
jmp 0x4069ad
mov eax, dword [esi]
mov dword [ebp - 0x1034], eax
mov edi, eax
mov eax, 0
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub ecx, 1
cmp ecx, 4
mov eax, 4
cmova ecx, eax
cmp dword [ebp - 0x1030], ecx
jb 0x406abb
mov edx, dword [ebp - 0x1038]
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x1034]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x1028]
mov dword [esp], edx
call sub.cygwin1.dll_strncasecmp
test eax, eax
je 0x406b14
mov edx, dword [esi + 4]
test edx, edx
je 0x406d7b
mov edi, edx
mov eax, 0
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub ecx, 1
cmp ecx, 4
mov eax, 4
cmova ecx, eax
cmp ecx, dword [ebp - 0x1038]
ja 0x406d7b
mov eax, dword [ebp - 0x1038]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x1028]
mov dword [esp], edx
call sub.cygwin1.dll_strncasecmp
test eax, eax
jne 0x406d7b
mov dword [esp], ebx
call fcn.00401d75
mov dword [ebp - 0x10], eax
mov edx, eax
sub edx, dword [ebp + 8]
add dword [0x43351c], edx
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
lea eax, [ebp - 0x1010]
mov dword [esp], eax
call fcn.00407b94
cmp eax, 0xfff
jbe 0x406b61
mov dword [esp], str.Command_line_too_long.
call fcn.004029a3
mov ebx, 0
jmp 0x406dd6
cmp dword [0x433520], 1
jg 0x406cc4
lea edi, [ebp - 0x1010]
mov eax, 0
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx - 1]
mov ebx, ecx
sub ebx, 2
js 0x406cc4
lea edx, [ebp + eax - 0x1012]
cmp byte [ebp + ebx - 0x1010], 0x3e
jne 0x406bec
jmp 0x406bad
movzx eax, byte [edx]
sub edx, 1
cmp al, 0x3e
jne 0x406bec
lea eax, [ebp + ebx - 0x100f]
mov dword [esp], eax
call fcn.00401d75
mov esi, eax
test ebx, ebx
je 0x406bd4
lea eax, [ebx - 1]
mov edx, 1
cmp byte [ebp + eax - 0x1010], 0x3e
je 0x406bdb
mov eax, ebx
mov edx, 0
mov byte [ebp + eax - 0x1010], 0
test esi, esi
jne 0x406bf6
jmp 0x406cc4
sub ebx, 1
jns 0x406ba3
jmp 0x406cc4
test edx, edx
je 0x406c0e
mov dword [esp + 4], 0x42b22f
mov dword [esp], esi
call sub.cygwin1.dll__fopen64
mov ebx, eax
jmp 0x406c20
mov dword [esp + 4], 0x42b231
mov dword [esp], esi
call sub.cygwin1.dll__fopen64
mov ebx, eax
test ebx, ebx
jne 0x406c3d
mov dword [esp], esi
call sub.cygwin1.dll_perror
mov dword [esp], str.Cant_open_redirected_output_file_for_writing.
call fcn.004029a3
jmp 0x406dd6
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
cmp eax, dword [0x43cce0]
je 0x406c6d
call sub.cygwin1.dll___getreent
mov edx, dword [0x43cce0]
cmp dword [eax + 0xc], edx
je 0x406c6d
cmp edx, dword [0x4348d8]
je 0x406c6d
mov dword [esp], edx
call sub.cygwin1.dll_fclose
mov dword [0x43cce0], ebx
lea ebx, [ebp - 0x1010]
mov dword [esp], ebx
call fcn.00407b31
mov dword [0x4346d4], 1
mov eax, dword [ebp - 0x102c]
mov dword [0x43c5e8], eax
mov edx, dword [ebp - 0x1024]
lea eax, [edx + edx*2]
mov dword [esp], ebx
call dword [eax*8 + 0x42d748]
mov ebx, eax
mov dword [0x43c5e8], 0
mov eax, dword [0x43cce0]
cmp eax, dword [0x4348d8]
jne 0x406d08
jmp 0x406d3a
lea ebx, [ebp - 0x1010]
mov dword [esp], ebx
call fcn.00407b31
mov dword [0x4346d4], 1
mov eax, dword [ebp - 0x102c]
mov dword [0x43c5e8], eax
mov edx, dword [ebp - 0x1024]
lea eax, [edx + edx*2]
mov dword [esp], ebx
call dword [eax*8 + 0x42d748]
mov ebx, eax
mov dword [0x43c5e8], 0
jmp 0x406d3a
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
cmp eax, dword [0x43cce0]
je 0x406d30
call sub.cygwin1.dll___getreent
mov edx, dword [0x43cce0]
cmp dword [eax + 0xc], edx
je 0x406d30
mov dword [esp], edx
call sub.cygwin1.dll_fclose
mov eax, dword [0x4348d8]
mov dword [0x43cce0], eax
test ebx, ebx
jne 0x406dd6
cmp dword [0x43c608], 0
js 0x406dd6
mov edx, dword [ebp - 0x1024]
lea eax, [edx + edx*2]
mov eax, dword [eax*8 + 0x42d74c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1034]
mov dword [esp + 4], eax
mov dword [esp], str.Command_usage:__s__s_n
call sub.cygwin1.dll_printf
jmp 0x406dd6
add dword [ebp - 0x1024], 1
add esi, 0x18
cmp dword [ebp - 0x1024], 0x29
jne 0x406a67
cmp dword [ebp - 0x102c], 0
je 0x406dae
mov dword [esp], str.Expecting_command_to_repeat.
call fcn.004029a3
mov ebx, 0
jmp 0x406dd6
call fcn.00402d84
mov edx, dword [ebp - 0x1020]
sub edx, dword [ebp + 8]
add dword [0x43351c], edx
mov edx, dword [ebp - 0x1028]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004063b6
mov ebx, eax
mov eax, ebx
add esp, 0x103c
pop ebx
pop esi
pop edi
pop ebp
ret