Function at 0x40c8f0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov ecx, dword [0x40f42c]
mov edx, dword [0x414458]
test ecx, ecx
mov ebx, dword [ebp + 0x10]
setle al
and eax, 0xff
or eax, edx
mov dword [0x414458], eax
test eax, eax
je 0x40c9f0
mov dword [0x40f42c], 1
mov dword [0x414458], 0
xor ecx, ecx
mov dword [0x414468], ecx
mov dword [0x414464], ecx
mov dword [0x41445c], ecx
mov dword [0x414460], 0
mov eax, ecx
mov edx, ecx
cmp ecx, eax
jg 0x40cc70
lea eax, [edx + 1]
mov dword [0x414464], eax
mov dword [ebp - 0x3c], ebx
lea ecx, [edx + 1]
mov esi, edx
mov dword [0x414468], ecx
mov edx, ecx
cmp dword [ebp + 0xc], ecx
jle 0x40c9db
mov eax, dword [ebp - 0x3c]
mov dword [0x41445c], edx
lea edi, [eax + edx*4]
mov eax, dword [edi]
mov dword [0x414460], eax
cmp byte [eax], 0x2d
je 0x40cae0
mov ebx, dword [ebp + 0x14]
mov al, byte [ebx]
cmp al, 0x2d
je 0x40ce80
mov edx, dword [0x41446c]
movsx eax, al
test edx, edx
jne 0x40cab7
test ah, 0x10
jne 0x40cad2
mov dword [0x41446c], 0x1000
cmp eax, 0x2b
jne 0x40cbf0
mov ax, 0x1010
mov dword [0x41446c], eax
mov eax, dword [0x414464]
mov dword [0x40f42c], eax
or eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [0x40f42c]
mov eax, dword [0x414464]
cmp ecx, eax
jge 0x40ca05
dec ecx
jmp 0x40c937
mov edx, dword [0x414468]
lea esi, [edx + 1]
cmp ecx, esi
jg 0x40cd35
mov esi, dword [0x414460]
test esi, esi
je 0x40cd90
mov cl, byte [esi]
mov byte [ebp - 0x2c], cl
test cl, cl
je 0x40cd90
movsx edi, byte [ebp - 0x2c]
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x30], edi
mov dword [0x40f434], edi
lea edi, [esi + 1]
mov dword [0x414460], edi
mov al, byte [ecx]
cmp al, 0x2d
je 0x40cda0
mov dword [ebp - 0x34], ecx
cmp al, 0x2b
je 0x40cda0
cmp al, 0x3a
je 0x40cdb5
mov ecx, dword [ebp - 0x34]
lea esi, [esi]
cmp byte [ebp - 0x2c], al
je 0x40cdd0
inc ecx
mov al, byte [ecx]
test al, al
jne 0x40ca70
cmp dword [ebp + 8], 2
je 0x40ceb5
mov eax, dword [0x40f430]
test eax, eax
jne 0x40cf59
test edi, edi
je 0x40caa2
mov eax, edx
cmp byte [edi], 0
jne 0x40caa5
lea eax, [edx + 1]
mov dword [0x40f42c], eax
lea esp, [ebp - 0xc]
mov eax, 0x3f
pop ebx
pop esi
pop edi
pop ebp
ret
test ah, 0x10
jne 0x40cad2
and edx, 0x10
test edx, edx
jne 0x40c9db
mov edx, dword [0x414468]
jmp 0x40c96a
or eax, edx
mov dword [0x41446c], eax
mov edx, eax
jmp 0x40cabc
lea ebx, [eax + 1]
mov dword [0x414460], ebx
mov bl, byte [eax + 1]
mov byte [ebp - 0x2c], bl
test bl, bl
je 0x40c998
cmp bl, 0x2d
je 0x40ce10
cmp dword [ebp + 8], 1
jle 0x40cd53
mov edi, dword [ebp + 0x18]
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 0x48], esi
mov dword [0x414454], 0
test edi, edi
je 0x40cc49
mov eax, dword [edi]
test eax, eax
je 0x40cc49
mov ebx, dword [0x414460]
lea esi, [edi + 0x10]
mov dword [ebp - 0x34], ebx
inc ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x44], 0xffffffff
mov dword [ebp - 0x4c], edi
mov esi, eax
mov ebx, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x2c]
dec edi
mov dword [ebp - 0x3c], edi
mov edi, dword [ebp - 0x34]
mov al, byte [edi]
test al, al
je 0x40cb88
cmp al, byte [esi]
jne 0x40cc11
mov edi, dword [ebp - 0x40]
jmp 0x40cb81
inc edi
cmp al, byte [esi]
jne 0x40cc14
mov al, byte [edi]
inc esi
test al, al
jne 0x40cb78
cmp byte [esi], 0
jne 0x40cd20
mov edi, dword [ebp - 0x48]
mov dword [0x414460], 0
test edi, edi
je 0x40cbb0
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x3c]
mov dword [eax], edx
mov edx, dword [0x414468]
lea eax, [edx + 1]
mov esi, dword [0x414454]
mov dword [0x40f42c], eax
test esi, esi
je 0x40cf8f
mov ecx, dword [ebp - 0x38]
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x40cedc
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 8]
test eax, eax
je 0x40cf4e
mov edx, dword [edx + 0xc]
mov dword [eax], edx
xor eax, eax
jmp 0x40c9e8
mov dword [esp], str.POSIXLY_CORRECT
call sym._getenv
test eax, eax
je 0x40cea7
mov eax, dword [0x41446c]
or eax, 0x10
jmp 0x40c9d6
mov edi, dword [ebp - 0x40]
cmp al, 0x3d
je 0x40cd80
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0x38], edi
mov esi, dword [edi]
add edi, 0x10
mov dword [ebp - 0x30], edi
mov edi, dword [ebp - 0x2c]
inc edi
test esi, esi
mov dword [ebp - 0x2c], edi
jne 0x40cb5b
mov edi, dword [ebp - 0x4c]
mov dword [ebp - 0x3c], ebx
cmp dword [ebp - 0x44], 0xffffffff
jne 0x40d197
cmp dword [ebp + 8], 1
je 0x40d151
mov eax, dword [0x414460]
cmp byte [eax], 0
je 0x40c998
mov ebx, dword [ebp - 0x3c]
jmp 0x40cd5d
inc edx
mov esi, dword [0x41445c]
sub edx, esi
mov dword [ebp - 0x30], esp
lea eax, [edx*4 + 0x1e]
and eax, 0xfffffff0
call fcn.0040c710
lea ecx, [esp + 0x1f]
and ecx, 0xfffffff0
test edx, edx
jle 0x40cfc0
mov edi, dword [0x41445c]
xor eax, eax
mov dword [ebp - 0x2c], edi
lea esi, [ebx + edi*4]
mov edi, dword [esi]
add esi, 4
mov dword [ecx + eax*4], edi
inc eax
cmp eax, edx
jne 0x40cca8
mov eax, dword [ebp - 0x2c]
mov esi, dword [0x414464]
dec eax
mov dword [ebp - 0x2c], esi
mov dword [0x41445c], eax
cmp eax, esi
jl 0x40cce7
mov dword [ebp - 0x34], esi
nop
lea esi, [eax + edx]
mov edi, dword [ebx + eax*4]
dec eax
mov dword [ebx + esi*4], edi
cmp dword [ebp - 0x2c], eax
jle 0x40ccd0
mov esi, dword [ebp - 0x34]
mov dword [0x41445c], eax
test edx, edx
jle 0x40cd00
xor eax, eax
lea esi, [esi]
add esi, eax
mov edi, dword [ecx + eax*4]
inc eax
mov dword [ebx + esi*4], edi
cmp eax, edx
mov esi, dword [ebp - 0x2c]
jne 0x40ccf0
mov ecx, dword [ebp - 0x2c]
add edx, ecx
mov dword [0x414464], edx
mov esp, dword [ebp - 0x30]
mov edx, dword [0x414468]
jmp 0x40c967
cmp dword [ebp - 0x44], 0xffffffff
jne 0x40d04d
mov esi, dword [ebp - 0x3c]
mov dword [ebp - 0x44], esi
jmp 0x40cc1c
lea edx, [ecx - 1]
mov dword [0x414460], 0
mov dword [0x414468], edx
mov ecx, dword [0x41445c]
jmp 0x40c957
mov ebx, dword [ebp - 0x3c]
mov dword [ebp + 8], 0
mov edi, dword [ebp + 0x14]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov edx, dword [ebp + 8]
mov dword [esp], edx
call sym._getopt_parse
jmp 0x40c9e8
mov dword [0x414454], edi
jmp 0x40cb88
mov ecx, dword [0x41445c]
jmp 0x40c957
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x14]
inc eax
mov dword [ebp - 0x34], eax
mov al, byte [ecx + 1]
cmp al, 0x3a
jne 0x40ca67
mov eax, dword [ebp - 0x34]
inc eax
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov al, byte [ecx]
cmp byte [ebp - 0x2c], al
jne 0x40ca79
lea esi, [esi]
mov dword [ebp - 0x34], ecx
test ecx, ecx
je 0x40ca80
cmp byte [ecx + 1], 0x3a
je 0x40ce40
mov dword [0x414454], 0
test edi, edi
je 0x40cdf7
mov eax, edx
cmp byte [esi + 1], 0
jne 0x40cdfa
lea eax, [edx + 1]
mov dword [0x40f42c], eax
mov eax, dword [0x40f434]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea ebx, [eax + 2]
mov dword [ebp - 0x2c], ebx
cmp byte [eax + 2], 0
je 0x40d104
mov eax, dword [ebp + 8]
test eax, eax
jle 0x40cc61
mov dword [0x414460], ebx
mov dword [ebp + 8], 1
jmp 0x40cb0a
mov dword [0x414454], edi
cmp byte [esi + 1], 0
jne 0x40ce71
cmp byte [ecx + 2], 0x3a
je 0x40cfce
mov eax, dword [ebp + 0xc]
sub eax, edx
dec eax
jle 0x40d010
inc edx
mov dword [0x414468], edx
mov eax, dword [ebx + edx*4]
mov dword [0x414454], eax
mov dword [0x414460], 0
jmp 0x40cdf7
mov ebx, dword [ebp - 0x3c]
lea eax, [ecx + 1]
mov dword [0x414460], 0
mov dword [0x40f42c], eax
mov eax, dword [ebx + ecx*4]
mov dword [0x414454], eax
mov eax, 1
jmp 0x40c9e8
mov edx, dword [0x41446c]
and edx, 0x10
jmp 0x40cabf
mov ecx, dword [0x40f430]
test ecx, ecx
jne 0x40cfdd
mov dword [0x414460], 0
mov dword [0x40f434], 0
jmp 0x40caa2
mov edx, dword [0x40f430]
mov eax, dword [ebx]
test edx, edx
je 0x40cf39
mov word [ebp - 0x1b], 0x2d2d
mov byte [ebp - 0x19], 0
cmp dword [ebp + 8], 1
je 0x40cefc
mov byte [ebp - 0x1a], 0
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], eax
add ebx, 0x40
mov dword [esp + 4], str._s:
mov dword [esp], ebx
call sym._fprintf
mov esi, dword [ebp - 0x38]
mov eax, dword [esi]
mov dword [esp + 4], str.option___s_s_doesnt_accept_an_argument_n
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1b]
mov dword [esp + 8], eax
mov dword [esp], ebx
call sym._fprintf
mov edi, dword [ebp - 0x38]
mov eax, dword [edi + 0xc]
mov dword [0x40f434], eax
mov eax, 0x3f
jmp 0x40c9e8
mov ebx, dword [ebp - 0x38]
mov eax, dword [ebx + 0xc]
jmp 0x40c9e8
mov edx, dword [ebp - 0x30]
mov dword [esp + 0xc], edx
mov eax, dword [ebx]
mov dword [esp + 4], str._s:_invalid_option_____c_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov edi, dword [0x414460]
mov edx, dword [0x414468]
jmp 0x40ca97
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 4], 1
jne 0x40cbd4
cmp dword [ebp + 0xc], eax
jle 0x40d0cb
mov dword [0x414468], eax
add edx, 2
mov eax, dword [ebx + eax*4]
mov dword [0x40f42c], edx
mov dword [0x414454], eax
jmp 0x40cbd4
mov esi, dword [0x41445c]
mov dword [ebp - 0x2c], esi
jmp 0x40ccb5
mov dword [0x414454], 0
jmp 0x40ce71
mov dword [0x414460], esi
mov dword [esp + 0xc], esi
mov eax, dword [ebx]
mov dword [esp + 4], str._s:_unrecognised_option____s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov edx, dword [0x414468]
jmp 0x40cec3
mov esi, dword [0x40f430]
test esi, esi
jne 0x40d0a1
mov edi, dword [ebp + 0x14]
mov dl, byte [edi]
cmp dl, 0x2d
je 0x40d045
cmp dl, 0x2b
je 0x40d045
mov eax, 0x3a
cmp dl, 0x3a
je 0x40c9e8
mov eax, 0x3f
jmp 0x40c9e8
mov eax, dword [ebp + 0x14]
mov dl, byte [eax + 1]
jmp 0x40d02d
lea eax, [ecx + 1]
mov dword [0x40f434], 0
mov dword [0x414460], 0
mov dword [0x40f42c], eax
cmp dword [0x40f430], 0
je 0x40d03b
mov eax, dword [ebx + ecx*4]
mov dword [esp + 0xc], eax
mov eax, dword [ebx]
mov dword [esp + 4], str._s:_option___s_is_ambiguous_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, 0x3f
jmp 0x40c9e8
mov esi, dword [ebp - 0x30]
mov dword [esp + 0xc], esi
mov eax, dword [ebx]
mov dword [esp + 4], str._s:_option_requires_an_argument_____c_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
jmp 0x40d01e
mov esi, dword [ebp + 0x14]
mov al, byte [esi]
cmp al, 0x2d
je 0x40d149
cmp al, 0x2b
je 0x40d149
cmp al, 0x3a
mov edx, str.option___s_s_requires_an_argument_n
setne al
and eax, 0xff
lea eax, [eax + eax*4 + 0x3a]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov ecx, dword [ebx]
mov eax, dword [ebp + 8]
call sym._getopt_argerror
jmp 0x40c9e8
mov eax, dword [0x414464]
mov ebx, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], eax
cmp eax, edx
jge 0x40d133
mov eax, dword [edi]
mov edx, dword [ebx + ecx*4 - 4]
mov dword [ebx + ecx*4], edx
mov ecx, esi
dec esi
lea edx, [esi + 2]
cmp dword [ebp - 0x2c], edx
jl 0x40d115
mov edx, dword [ebp - 0x2c]
mov dword [0x41445c], ecx
mov dword [ebx + edx*4], eax
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [0x414464], eax
mov dword [0x40f42c], eax
or eax, 0xffffffff
jmp 0x40c9e8
mov edi, dword [ebp + 0x14]
mov al, byte [edi + 1]
jmp 0x40d0d8
lea eax, [ecx + 1]
mov ebx, dword [ebp - 0x3c]
mov dword [0x40f434], 0
mov dword [0x414460], 0
mov dword [0x40f42c], eax
cmp dword [0x40f430], 0
je 0x40d03b
mov eax, dword [ebx + ecx*4]
mov dword [esp + 0xc], eax
mov eax, dword [ebx]
mov dword [esp + 4], str._s:_unrecognised_option___s_n
mov dword [esp + 8], eax
jmp 0x40d087
mov dword [0x414460], 0
cmp dword [ebp - 0x48], 0
je 0x40d1b5
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
mov dword [eax], edx
mov edx, dword [0x414468]
lea eax, [edx + 1]
mov dword [0x40f42c], eax
cmp dword [0x414454], 0
je 0x40d1e7
mov eax, dword [ebp - 0x44]
shl eax, 4
add edi, eax
cmp dword [edi + 4], 0
je 0x40d21e
mov eax, dword [edi + 8]
test eax, eax
je 0x40d216
mov edx, dword [edi + 0xc]
mov dword [eax], edx
xor eax, eax
jmp 0x40c9e8
mov ecx, dword [ebp - 0x44]
shl ecx, 4
add edi, ecx
cmp dword [edi + 4], 1
jne 0x40d1d4
cmp dword [ebp + 0xc], eax
jle 0x40d289
mov dword [0x414468], eax
add edx, 2
mov eax, dword [ebx + eax*4]
mov dword [0x40f42c], edx
mov dword [0x414454], eax
jmp 0x40d1d4
mov eax, dword [edi + 0xc]
jmp 0x40c9e8
mov eax, dword [ebx]
cmp dword [0x40f430], 0
je 0x40d277
mov word [ebp - 0x1b], 0x2d2d
mov byte [ebp - 0x19], 0
cmp dword [ebp + 8], 1
je 0x40d23d
mov byte [ebp - 0x1a], 0
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], eax
add ebx, 0x40
mov dword [esp + 4], str._s:
mov dword [esp], ebx
call sym._fprintf
mov eax, dword [edi]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1b]
mov dword [esp + 8], eax
mov dword [esp + 4], str.option___s_s_doesnt_accept_an_argument_n
mov dword [esp], ebx
call sym._fprintf
mov eax, dword [edi + 0xc]
mov dword [0x40f434], eax
mov eax, 0x3f
jmp 0x40c9e8
mov ecx, dword [ebp + 0x14]
mov al, byte [ecx]
cmp al, 0x2d
je 0x40d2bf
cmp al, 0x2b
je 0x40d2bf
cmp al, 0x3a
mov dword [esp], edi
setne al
and eax, 0xff
mov edx, str.option___s_s_requires_an_argument_n
lea eax, [eax + eax*4 + 0x3a]
mov dword [esp + 4], eax
mov ecx, dword [ebx]
mov eax, dword [ebp + 8]
call sym._getopt_argerror
jmp 0x40c9e8
mov esi, dword [ebp + 0x14]
mov al, byte [esi + 1]
jmp 0x40d296