Function at 0x416cf0
Capabilities:
Query environment variable

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x416e14
mov eax, dword [ebp + 8]
test eax, eax
je 0x417169
mov edx, dword [ebp + 0xc]
mov dword [esp], edx
call sub.cygwin1.dll_strlen
lea ecx, [eax + 1]
add eax, 0x37
and eax, 0xfffffff0
mov dword [ebp - 0x28], ecx
call fcn.0041a520
mov dword [esp + 8], ecx
lea ebx, [esp + 0x1f]
mov edx, dword [ebp + 0xc]
and ebx, 0xfffffff0
lea eax, [ebx + 0x18]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygwin1.dll_memcpy
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 8]
mov dword [ebx + 4], eax
mov eax, 0x4166b0
mov dword [ebx], ecx
mov dword [esp + 8], eax
mov eax, 0x4221c0
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.cygwin1.dll_tfind
mov dword [ebp - 0x24], eax
test eax, eax
je 0x416d86
mov edx, dword [eax]
mov eax, dword [0x4227d0]
cmp dword [edx + 8], eax
je 0x417066
call sub.cygwin1.dll___errno
mov esi, dword [0x4221d0]
mov eax, dword [eax]
test esi, esi
mov dword [ebp - 0x20], eax
je 0x41707a
mov eax, dword [0x4227c0]
test eax, eax
mov dword [ebp - 0x14], eax
jmp 0x416dd7
mov eax, dword [ebp - 0x14]
add eax, 0x10
mov dword [esp + 4], eax
mov edx, dword [ebp + 8]
mov dword [esp], edx
call sub.cygwin1.dll_strcmp
test eax, eax
je 0x417176
jl 0x41721a
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx]
test ecx, ecx
mov dword [ebp - 0x14], ecx
jne 0x416daa
mov dword [ebp - 0x1c], 0x420ce0
cmp dword [ebp + 0x1c], 6
mov dword [ebp - 0x2c], str.LC_XXX
ja case.default.0x416df0
mov eax, dword [ebp + 0x1c]
jmp dword [eax*4 + 0x420d94]
call sub.cygwin1.dll___errno
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
test edx, edx
je 0x416e14
cmp dword [ebp + 0x18], 1
je 0x416e14
mov eax, dword [ebp + 0x10]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x2c], 0x420d37
mov dword [esp], str.LANGUAGE
call sub.cygwin1.dll_getenv
test eax, eax
mov ebx, eax
je 0x416e41
xor eax, eax
cmp byte [ebx], 0
setne al
neg eax
and ebx, eax
mov edx, dword [ebp - 0x2c]
mov dword [esp + 4], edx
mov ecx, dword [ebp + 0x1c]
mov dword [esp], ecx
call fcn.00418680
mov dword [ebp - 0x30], eax
test ebx, ebx
je 0x41709e
cld
mov ecx, 2
mov esi, eax
mov edi, 0x420d47
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
mov ecx, ebx
je 0x41709e
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.cygwin1.dll_strlen
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x2c]
mov dword [esp], edx
call sub.cygwin1.dll_strlen
mov ecx, dword [ebp - 0x34]
lea eax, [eax + ecx + 0x23]
and eax, 0xfffffff0
call fcn.0041a520
mov edx, dword [ebp - 0x2c]
lea eax, [esp + 0x1f]
and eax, 0xfffffff0
mov dword [ebp - 0x38], eax
call fcn.00416900
mov edx, 0x420d49
call fcn.00416900
mov edx, dword [ebp - 0x34]
mov dword [esp + 8], edx
mov ecx, dword [ebp + 8]
mov dword [esp], eax
mov dword [esp + 4], ecx
call sub.cygwin1.dll_mempcpy
mov edx, 0x420d4b
call fcn.00416900
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.cygwin1.dll_strlen
add eax, 0x1f
and eax, 0xfffffff0
call fcn.0041a520
lea edx, [esp + 0x1f]
and edx, 0xfffffff0
mov dword [ebp - 0x3c], edx
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebp - 0x18]
movzx ecx, byte [eax]
cmp cl, 0x3a
jne 0x416f2e
nop
lea esi, [esi]
inc dword [ebp - 0x18]
mov edx, dword [ebp - 0x18]
movzx ecx, byte [edx]
cmp cl, 0x3a
je 0x416f20
test cl, cl
jne 0x417010
mov ecx, dword [ebp - 0x3c]
mov byte [ecx], 0x43
mov byte [ecx + 1], 0
cld
mov esi, dword [ebp - 0x3c]
mov ecx, 2
mov edi, 0x420d47
repe cmpsb byte [esi], byte es:[edi]
je 0x416df7
mov esi, dword [ebp - 0x3c]
mov edi, str.POSIX
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
je 0x416df7
mov ecx, dword [ebp - 0x14]
mov dword [esp + 0xc], ecx
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x3c]
mov dword [esp + 4], edx
mov ecx, dword [ebp - 0x1c]
mov dword [esp], ecx
call fcn.004186e0
test eax, eax
mov esi, eax
je 0x416f10
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], eax
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], edx
mov ecx, dword [ebp - 0x14]
mov dword [esp], esi
mov dword [esp + 4], ecx
call fcn.00416920
test eax, eax
mov edi, eax
jne 0x41711b
xor ebx, ebx
cmp dword [esi + 0x10], 0
je 0x416f10
nop
lea esi, [esi]
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], eax
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], edx
mov ecx, dword [ebp - 0x14]
mov dword [esp + 4], ecx
mov eax, dword [esi + ebx*4 + 0x10]
mov dword [esp], eax
call fcn.00416920
test eax, eax
mov edi, eax
jne 0x417111
inc ebx
mov eax, dword [esi + ebx*4 + 0x10]
test eax, eax
jne 0x416fd0
jmp 0x416f10
mov ebx, dword [ebp - 0x3c]
cmp cl, 0x3a
jmp 0x417033
inc dword [ebp - 0x18]
mov byte [ebx], cl
inc ebx
mov eax, dword [ebp - 0x18]
movzx ecx, byte [eax]
test cl, cl
setne al
xor edx, edx
cmp cl, 0x3a
setne dl
test eax, edx
jne 0x417018
mov byte [ebx], 0
cmp dword [0x4221d0], 1
jne 0x416f40
mov eax, 0x2f
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x3c]
mov dword [esp], edx
call sub.cygwin1.dll_strchr
test eax, eax
jne 0x416f10
jmp 0x416f40
mov edi, dword [ebp + 0x14]
test edi, edi
jne 0x4170a6
mov edi, dword [edx + 0x10]
mov eax, edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.cygwin1.dll__getuid32
mov ebx, eax
call sub.cygwin1.dll__geteuid32
cmp ebx, eax
je 0x417226
mov ebx, 1
mov dword [0x4221d0], ebx
jmp 0x416d9e
mov ecx, dword [ebp - 0x30]
jmp 0x416e7d
mov eax, dword [edx + 0xc]
mov edx, dword [edx + 0x14]
mov dword [esp + 4], edx
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx]
mov edx, dword [edx + 0x10]
mov dword [esp], edx
mov edx, dword [ebp + 0x18]
call fcn.004168a0
mov edi, eax
mov eax, edi
jmp 0x417072
mov dword [ebp - 0x2c], str.LC_MESSAGES
jmp case.default.0x416df0
mov dword [ebp - 0x2c], str.LC_MONETARY
jmp case.default.0x416df0
mov dword [ebp - 0x2c], str.LC_CTYPE
jmp case.default.0x416df0
mov dword [ebp - 0x2c], str.LC_COLLATE
jmp case.default.0x416df0
mov dword [ebp - 0x2c], str.LC_TIME
jmp case.default.0x416df0
mov dword [ebp - 0x2c], str.LC_NUMERIC
jmp case.default.0x416df0
mov esi, dword [esi + ebx*4 + 0x10]
je 0x416f10
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x41724a
mov edx, dword [ebp - 0x24]
mov eax, dword [edx]
mov edx, dword [0x4227d0]
mov dword [eax + 0xc], esi
mov dword [eax + 8], edx
mov edx, dword [ebp - 0x10]
mov dword [eax + 0x10], edi
mov dword [eax + 0x14], edx
call sub.cygwin1.dll___errno
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x417070
mov eax, dword [ebp - 0x10]
mov dword [esp], edi
mov dword [esp + 4], eax
mov edx, dword [ebp + 0x18]
mov eax, esi
jmp 0x4170be
mov eax, dword [str.messages]
mov dword [ebp + 8], eax
jmp 0x416d11
mov edx, dword [ebp - 0x14]
test edx, edx
je 0x416dd9
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 4]
mov dword [ebp - 0x1c], eax
cmp byte [eax], 0x2f
je 0x416de0
mov dword [esp], eax
mov ebx, 0x106
call sub.cygwin1.dll_strlen
lea esi, [eax + 1]
jmp 0x4171bb
call sub.cygwin1.dll___errno
cmp dword [eax], 0x22
jne 0x416df7
mov eax, ebx
shr eax, 1
lea ebx, [ebx + eax + 0x20]
lea eax, [ebx + esi + 0x1e]
and eax, 0xfffffff0
call fcn.0041a520
lea ecx, [esp + 0x1f]
and ecx, 0xfffffff0
mov dword [ebp - 0x1c], ecx
call sub.cygwin1.dll___errno
mov dword [eax], 0
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.cygwin1.dll_getcwd
test eax, eax
je 0x4171a5
xor eax, eax
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x1c]
mov dword [esp], edx
call sub.cygwin1.dll_strchr
mov edx, 0x420d49
call fcn.00416900
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 4]
call fcn.00416900
jmp 0x416de0
mov dword [ebp - 0x14], 0
jmp 0x416dd9
call sub.cygwin1.dll__getgid32
mov ebx, eax
call sub.cygwin1.dll__getegid32
cmp ebx, eax
jne 0x41708e
mov ecx, 0xffffffff
mov dword [0x4221d0], ecx
jmp 0x416d9e
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x34]
lea eax, [edx + ecx + 0x19]
mov dword [esp], eax
call sub.cygwin1.dll_malloc
test eax, eax
mov ebx, eax
je 0x417140
mov eax, dword [ebp - 0x28]
mov dword [esp + 8], eax
mov edx, dword [ebp + 0xc]
lea eax, [ebx + 0x18]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.cygwin1.dll_mempcpy
mov dword [ebx], eax
mov edx, dword [ebp - 0x34]
inc edx
mov dword [esp + 8], edx
mov ecx, dword [ebp + 8]
mov dword [esp], eax
mov dword [esp + 4], ecx
call sub.cygwin1.dll_memcpy
mov dword [ebx + 0xc], esi
mov eax, dword [ebp + 0x1c]
mov dword [ebx + 0x10], edi
mov dword [ebx + 4], eax
mov eax, dword [0x4227d0]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x14], eax
mov eax, 0x4166b0
mov dword [esp + 8], eax
mov eax, 0x4221c0
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.cygwin1.dll_tsearch
mov dword [ebp - 0x24], eax
test eax, eax
je 0x4172db
cmp dword [eax], ebx
je 0x417140
mov dword [esp], ebx
call sub.cygwin1.dll_free
jmp 0x417140