Function at 0x407ed0
Capabilities:
Query environment variable

Disassembly:
push ebp
xor ecx, ecx
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [0x412138]
mov dword [0x41213c], ecx
test edx, edx
je 0x408153
mov eax, dword [0x412140]
test eax, eax
je 0x407f01
cmp byte [eax], 0
jne 0x407ff0
cmp dword [0x412150], 1
je 0x4081e0
mov edx, dword [0x412138]
mov dword [ebp - 0x2c], edx
mov ecx, dword [ebp + 8]
cmp dword [ebp - 0x2c], ecx
je 0x4081c0
cld
mov eax, dword [ebp - 0x2c]
mov edi, 0x4109e0
mov edx, dword [ebp + 0xc]
mov esi, dword [edx + eax*4]
mov eax, 3
mov ecx, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x407f82
mov edx, dword [ebp + 8]
cmp dword [ebp - 0x2c], edx
je 0x4081c0
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + ecx*4]
cmp byte [edx], 0x2d
je 0x407fc5
mov edi, dword [0x412150]
mov eax, 0xffffffff
test edi, edi
je 0x407f7a
mov dword [0x41213c], edx
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [0x412138], eax
mov eax, 1
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x2c]
mov edx, dword [0x412180]
inc eax
cmp dword [0x412170], edx
je 0x4082ee
cmp edx, eax
je 0x407fb0
mov dword [0x412138], eax
mov eax, dword [ebp + 0xc]
call fcn.00407dc0
lea esi, [esi]
mov eax, dword [ebp + 8]
mov dword [0x412180], eax
mov dword [0x412138], eax
mov dword [ebp - 0x2c], eax
jmp 0x407f3d
movzx eax, byte [edx + 1]
test al, al
je 0x407f57
mov esi, dword [ebp + 0x14]
xor ecx, ecx
test esi, esi
je 0x407fdf
cmp al, 0x2d
jne 0x407fdf
mov ecx, 1
lea eax, [edx + ecx + 1]
mov dword [0x412140], eax
nop
lea esi, [esi]
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x408286
mov ecx, dword [0x412138]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x2c], ecx
mov eax, dword [edx + ecx*4]
movzx edx, byte [eax + 1]
cmp dl, 0x2d
je 0x408028
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
je 0x408286
cmp byte [eax + 2], 0
je 0x408273
mov dword [ebp - 0x10], 0
mov ebx, dword [0x412140]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov edi, ebx
movzx eax, byte [ebx]
jmp 0x408054
inc edi
movzx eax, byte [edi]
test al, al
setne dl
cmp al, 0x3d
setne al
movzx eax, al
test eax, edx
jne 0x408050
mov dword [ebp - 0x20], 0
mov esi, dword [ebp + 0x14]
mov eax, dword [esi]
test eax, eax
je 0x4080ca
mov ecx, edi
sub ecx, ebx
mov dword [ebp - 0x24], ecx
lea esi, [esi]
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov eax, dword [esi]
mov dword [esp], eax
call sub.cygwin1.dll_strncmp
test eax, eax
jne 0x4080be
mov eax, dword [esi]
mov dword [esp], eax
call sub.cygwin1.dll_strlen
cmp dword [ebp - 0x24], eax
je 0x408473
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40833b
mov dword [ebp - 0x18], 1
inc dword [ebp - 0x20]
add esi, 0x10
mov eax, dword [esi]
test eax, eax
jne 0x408080
mov esi, dword [ebp - 0x18]
test esi, esi
setne al
xor edx, edx
cmp dword [ebp - 0x14], 0
sete dl
test edx, eax
jne 0x4084f7
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4083ac
mov eax, dword [0x412138]
lea edx, [eax + 1]
mov dword [0x412138], edx
cmp byte [edi], 0
je 0x408349
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
test eax, eax
je 0x4085a1
lea eax, [edi + 1]
mov dword [0x41213c], eax
mov dword [esp], ebx
call sub.cygwin1.dll_strlen
mov edi, dword [ebp + 0x18]
add eax, ebx
mov dword [0x412140], eax
test edi, edi
je 0x408139
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 0x18]
mov dword [edx], ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x408372
mov eax, dword [eax + 0xc]
mov dword [ecx], eax
xor eax, eax
jmp 0x407f7a
mov eax, 1
mov esi, dword [ebp + 0x10]
mov dword [0x412138], eax
mov eax, 1
mov dword [0x412180], eax
mov eax, 1
mov dword [0x412170], eax
xor eax, eax
mov dword [0x412140], eax
mov dword [esp], str.POSIXLY_CORRECT
call sub.cygwin1.dll_getenv
mov dword [0x412160], eax
mov ecx, dword [ebp + 0x10]
movzx edx, byte [ecx]
cmp dl, 0x2d
je 0x40832c
cmp dl, 0x2b
je 0x408319
mov dword [ebp + 0x10], esi
test eax, eax
sete al
movzx eax, al
mov dword [0x412150], eax
jmp 0x407eef
mov eax, dword [0x412170]
cmp eax, dword [0x412180]
je 0x4081d2
mov dword [0x412138], eax
add esp, 0x3c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [0x412180]
cmp dword [0x412170], edx
je 0x4082fd
mov eax, dword [0x412138]
cmp edx, eax
mov dword [ebp - 0x2c], eax
je 0x40820f
mov eax, dword [ebp + 0xc]
call fcn.00407dc0
mov edx, dword [0x412138]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x2c], eax
jge 0x408266
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + edx*4]
cmp byte [eax], 0x2d
je 0x408464
lea esi, [esi]
mov eax, dword [ebp - 0x2c]
inc eax
cmp eax, dword [ebp + 8]
mov dword [0x412138], eax
jge 0x408263
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax*4]
cmp byte [edx], 0x2d
jne 0x408230
cmp byte [edx + 1], 0
jne 0x408266
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
inc eax
cmp eax, dword [ebp + 8]
mov dword [0x412138], eax
jl 0x40823e
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [0x412180], eax
jmp 0x407f17
mov eax, dword [ebp + 0x10]
movzx edx, dl
call fcn.00407da0
test eax, eax
je 0x408028
mov edx, dword [0x412140]
lea eax, [edx + 1]
mov dword [0x412140], eax
mov eax, dword [ebp + 0x10]
movzx edx, byte [edx]
movzx esi, dl
mov byte [ebp - 0x25], dl
mov edx, esi
call fcn.00407da0
mov ebx, dword [0x412140]
mov ecx, eax
mov eax, dword [0x412138]
movzx edx, byte [ebx]
cmp dl, 1
adc eax, 0
test ecx, ecx
sete dl
cmp byte [ebp - 0x25], 0x3a
mov dword [0x412138], eax
sete al
or eax, edx
test al, 1
jne 0x408524
cmp byte [ecx + 1], 0x3a
je 0x40837d
movzx eax, byte [ebp - 0x25]
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [0x412138], eax
mov dword [0x412170], eax
jmp 0x407fb0
mov ecx, dword [0x412138]
cmp edx, ecx
mov dword [ebp - 0x2c], ecx
je 0x40820f
mov dword [0x412170], ecx
jmp 0x40820f
mov esi, dword [ebp + 0x10]
xor eax, eax
mov dword [0x412150], eax
inc esi
mov dword [ebp + 0x10], esi
jmp 0x407eef
mov esi, ecx
mov eax, 2
inc esi
mov dword [0x412150], eax
jmp 0x408324
mov dword [ebp - 0x10], esi
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], edx
jmp 0x4080be
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 4], 1
jne 0x40811b
cmp edx, dword [ebp + 8]
jge 0x4084c5
mov ecx, dword [ebp + 0xc]
add eax, 2
mov dword [0x412138], eax
mov eax, dword [ecx + edx*4]
jmp 0x408116
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 0xc]
jmp 0x407f7a
cmp byte [ecx + 2], 0x3a
je 0x4084af
cmp byte [ebx], 0
je 0x408488
inc dword [0x412138]
mov dword [0x41213c], ebx
xor eax, eax
mov dword [0x412140], eax
movzx eax, byte [ebp - 0x25]
jmp 0x4082e6
mov esi, dword [ebp + 0x1c]
test esi, esi
je 0x4086dd
mov eax, dword [0x412138]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x2c], eax
mov eax, dword [ecx + eax*4]
cmp byte [eax + 1], 0x2d
je 0x4083e6
movzx edx, byte [ebx]
mov eax, dword [ebp + 0x10]
call fcn.00407da0
test eax, eax
jne 0x408286
mov eax, dword [0x412138]
mov dword [ebp - 0x2c], eax
mov ebx, dword [0x40c184]
test ebx, ebx
je 0x408447
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
cmp byte [eax + 1], 0x2d
je 0x408617
call sub.cygwin1.dll___getreent
mov edx, dword [0x412140]
mov dword [esp + 0x10], edx
mov ecx, dword [ebp + 0xc]
mov edx, dword [0x412138]
mov edx, dword [ecx + edx*4]
movzx edx, byte [edx]
mov dword [esp + 0xc], edx
mov edx, dword [ecx]
mov dword [esp + 8], edx
mov edx, str._s:_unrecognized_option___c_s_n
mov dword [esp + 4], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov eax, dword [0x412138]
mov dword [ebp - 0x2c], eax
mov eax, 0x410a14
mov dword [0x412140], eax
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [0x412138], eax
mov eax, 0x3f
jmp 0x407f7a
cmp byte [eax + 1], 0
je 0x408230
jmp 0x408266
mov dword [ebp - 0x10], esi
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x1c], edx
jmp 0x4080ca
mov edx, dword [0x412138]
cmp edx, dword [ebp + 8]
je 0x408573
mov ecx, dword [ebp + 0xc]
lea eax, [edx + 1]
mov dword [0x412138], eax
mov eax, dword [ecx + edx*4]
mov dword [0x41213c], eax
jmp 0x40839c
cmp byte [ebx], 0
jne 0x408390
xor ebx, ebx
mov dword [0x41213c], ebx
jmp 0x40839c
mov ecx, dword [0x40c184]
test ecx, ecx
jne 0x408648
mov dword [esp], ebx
call sub.cygwin1.dll_strlen
add eax, ebx
mov dword [0x412140], eax
mov eax, dword [ebp + 0x10]
cmp byte [eax], 0x3a
setne al
movzx eax, al
lea eax, [eax + eax*4 + 0x3a]
jmp 0x407f7a
mov ecx, dword [0x40c184]
test ecx, ecx
jne 0x408683
mov dword [esp], ebx
call sub.cygwin1.dll_strlen
inc dword [0x412138]
add eax, ebx
mov dword [0x412140], eax
mov eax, 0x3f
jmp 0x407f7a
mov eax, dword [0x40c184]
test eax, eax
je 0x408560
mov eax, dword [0x412160]
test eax, eax
je 0x4086bd
call sub.cygwin1.dll___getreent
mov dword [esp + 0xc], esi
mov edi, str._s:_illegal_option_____c_n
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov dword [esp + 4], edi
mov dword [esp + 8], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
movzx eax, byte [ebp - 0x25]
mov dword [0x40c180], eax
mov eax, 0x3f
jmp 0x407f7a
mov ecx, dword [0x40c184]
test ecx, ecx
jne 0x4086eb
mov dword [0x40c180], esi
mov eax, dword [ebp + 0x10]
cmp byte [eax], 0x3a
setne byte [ebp - 0x25]
dec byte [ebp - 0x25]
and byte [ebp - 0x25], 0xfb
add byte [ebp - 0x25], 0x3f
jmp 0x40839c
mov edi, dword [0x40c184]
test edi, edi
je 0x4085fe
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + edx*4 - 4]
cmp byte [eax + 1], 0x2d
je 0x408716
call sub.cygwin1.dll___getreent
mov ecx, dword [ebp - 0x10]
mov ebx, str._s:_option___c_s_doesnt_allow_an_argument_n
mov edx, dword [ecx]
mov dword [esp + 0x10], edx
mov ecx, dword [ebp + 0xc]
mov edx, dword [0x412138]
mov edx, dword [ecx + edx*4 - 4]
movzx edx, byte [edx]
mov dword [esp + 0xc], edx
mov edx, dword [ecx]
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov ebx, dword [0x412140]
mov dword [esp], ebx
call sub.cygwin1.dll_strlen
add eax, ebx
mov dword [0x412140], eax
mov eax, 0x3f
jmp 0x407f7a
call sub.cygwin1.dll___getreent
mov edx, dword [0x412140]
mov dword [esp + 0xc], edx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov ecx, str._s:_unrecognized_option_____s_n
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
jmp 0x40843f
call sub.cygwin1.dll___getreent
mov ecx, dword [ebp + 0xc]
mov edx, dword [0x412138]
mov edx, dword [ecx + edx*4 - 4]
mov dword [esp + 0xc], edx
mov edx, dword [ecx]
mov dword [esp + 8], edx
mov edx, str._s:_option___s_requires_an_argument_n
mov dword [esp + 4], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov ebx, dword [0x412140]
jmp 0x4084d3
call sub.cygwin1.dll___getreent
mov ecx, dword [ebp + 0xc]
mov edx, dword [0x412138]
mov edx, dword [ecx + edx*4]
mov dword [esp + 0xc], edx
mov edx, dword [ecx]
mov dword [esp + 8], edx
mov edx, str._s:_option___s_is_ambiguous_n
mov dword [esp + 4], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov ebx, dword [0x412140]
jmp 0x408505
call sub.cygwin1.dll___getreent
mov dword [esp + 0xc], esi
mov ecx, dword [ebp + 0xc]
mov esi, str._s:_invalid_option_____c_n
mov edx, dword [ecx]
mov dword [esp + 4], esi
mov dword [esp + 8], edx
jmp 0x408555
mov edx, dword [0x412138]
mov dword [ebp - 0x2c], edx
jmp 0x4083e6
call sub.cygwin1.dll___getreent
mov dword [esp + 0xc], esi
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov dword [esp + 8], edx
mov edx, str._s:_option_requires_an_argument_____c_n
mov dword [esp + 4], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
jmp 0x408581
call sub.cygwin1.dll___getreent
mov ecx, dword [ebp - 0x10]
mov esi, str._s:_option_____s_doesnt_allow_an_argument_n
mov edx, dword [ecx]
mov dword [esp + 0xc], edx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov dword [esp + 4], esi
mov dword [esp + 8], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
jmp 0x4085f8