Function at 0x4015e0
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [esp + 0x44]
cmp dword [0x41d058], eax
je 0x401850
mov eax, dword [esp + 0x44]
mov ebp, 1
mov dword [0x41d050], 1
mov dword [0x41d04c], 1
mov dword [0x41d058], eax
mov eax, dword [esp + 0x40]
mov dword [0x41d048], 1
mov dword [0x41d054], eax
mov dword [0x41d044], 0
mov dword [0x41d040], 0
mov eax, dword [esp + 0x44]
lea ecx, [ebp*4]
mov dword [0x41d03c], 0
mov ebx, dword [eax + ebp*4]
test ebx, ebx
je 0x401818
cmp byte [ebx], 0x2d
jne 0x401748
cmp byte [ebx + 1], 0x2d
jne 0x401748
cmp byte [ebx + 2], 0
jne 0x401748
mov ebx, dword [0x41d04c]
mov dword [0x41d044], 1
cmp ebx, ebp
jle 0x401830
mov esi, dword [0x41d058]
lea eax, [ebp + 1]
jmp 0x4016ac
add eax, 1
cmp byte [edx], 0x2d
je 0x4016c0
cmp ebx, ebp
jl 0x4016c0
mov edx, dword [esi + eax*4]
mov ebp, eax
lea ecx, [eax*4]
test edx, edx
jne 0x4016a0
lea esi, [esi]
mov eax, dword [esp + 0x44]
mov dword [0x41d050], ebp
mov dword [0x41d048], 1
mov ebx, dword [eax + ecx]
test ebx, ebx
je 0x401818
mov eax, dword [esp + 0x48]
movzx eax, byte [eax]
cmp al, 0x2d
je 0x401870
cmp al, 0x2b
je 0x401840
mov dword [esp], str.POSIXLY_CORRECT
call sym._getenv
mov ebp, dword [0x41d050]
test eax, eax
jne 0x401840
mov ebx, dword [0x41d040]
mov esi, dword [0x41d054]
lea eax, [ebp + ebx]
cmp eax, esi
jl 0x4017c8
mov ebp, dword [esp + 0x40]
sub ebp, ebx
mov dword [0x41d038], ebp
mov edi, 0xffffffff
add esp, 0x2c
pop ebx
mov eax, edi
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x41d044]
test eax, eax
jne 0x4016df
cmp byte [ebx], 0x2d
jne 0x4016df
cmp byte [ebx + 1], 0
je 0x4016df
mov eax, dword [0x41d048]
movsx edi, byte [ebx + eax]
lea esi, [eax + 1]
mov eax, dword [esp + 0x48]
mov dword [0x41d048], esi
cmp byte [eax], 0x2d
mov dword [esp + 4], edi
je 0x4018d2
mov dword [esp], eax
call sym._strchr
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4018e6
mov eax, dword [esp + 0x18]
add ebx, esi
movzx edx, byte [ebx]
cmp byte [eax + 1], 0x3a
je 0x40193a
test dl, dl
je 0x4019ec
cmp edi, 0xffffffff
je 0x401818
mov ebp, dword [0x41d050]
jmp 0x4018bd
mov edi, dword [0x41d058]
lea edx, [ebp*4]
add ebx, 1
lea eax, [edi + edx]
lea edx, [edi + edx + 4]
mov ecx, dword [eax]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x18], ecx
mov ecx, esi
sub ecx, ebp
lea ecx, [ecx*4 - 4]
mov dword [esp + 8], ecx
call sym._memmove
mov ecx, dword [esp + 0x18]
mov dword [0x41d040], ebx
mov dword [edi + esi*4 - 4], ecx
jmp 0x401640
mov ebp, dword [esp + 0x40]
sub ebp, dword [0x41d040]
jmp 0x40172e
add ebp, 1
add ecx, 4
jmp 0x4016c0
mov eax, dword [esp + 0x40]
sub eax, ebp
mov dword [0x41d040], eax
jmp 0x40172e
mov eax, dword [esp + 0x40]
mov ebp, dword [0x41d050]
cmp dword [0x41d054], eax
jne 0x4015f7
jmp 0x401640
mov ecx, dword [0x41d04c]
mov dword [0x41d03c], ebx
cmp ecx, ebp
jle 0x4018cd
mov ebx, dword [0x41d058]
lea eax, [ebp + 1]
jmp 0x40189c
add eax, 1
cmp byte [edx], 0x2d
je 0x4018a8
cmp ecx, ebp
jl 0x4018a8
mov edx, dword [ebx + eax*4]
mov ebp, eax
test edx, edx
jne 0x401890
lea esi, [esi]
mov dword [0x41d050], ebp
mov edi, 1
mov dword [0x41d048], 1
mov dword [0x41d038], ebp
add esp, 0x2c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
add ebp, 1
jmp 0x4018a8
add eax, 1
mov dword [esp], eax
call sym._strchr
mov dword [esp + 0x18], eax
jmp 0x40178b
mov ecx, dword [0x414008]
test ecx, ecx
jne 0x401a44
mov edx, dword [0x41d04c]
mov dword [0x41400c], edi
cmp edx, ebp
jle 0x401a32
mov ecx, dword [0x41d058]
jmp 0x401919
cmp byte [eax], 0x2d
je 0x401923
cmp edx, ebp
jl 0x401923
add ebp, 1
mov eax, dword [ecx + ebp*4]
test eax, eax
jne 0x401910
mov dword [0x41d050], ebp
mov edi, 0x21
mov dword [0x41d048], 1
jmp 0x4018bd
lea eax, [ebp + 1]
test dl, dl
jne 0x401a76
mov esi, dword [esp + 0x18]
cmp byte [esi + 2], 0x3a
je 0x401ab0
cmp dword [0x41d04c], ebp
mov edx, ebp
mov ebx, dword [esp + 0x44]
cmovge edx, dword [0x41d04c]
jmp 0x40196d
cmp byte [ecx], 0x2d
jne 0x401979
mov esi, edx
add edx, 1
mov ecx, dword [ebx + edx*4]
test ecx, ecx
jne 0x401968
mov ebx, dword [0x41d040]
mov dword [0x41d04c], edx
mov dword [0x41d03c], ecx
add ebx, edx
cmp ebx, dword [0x41d054]
jl 0x401b21
mov dword [0x41d03c], 0
cmp edx, ebp
jg 0x401b4c
mov dword [0x41d050], eax
mov dword [0x41d048], 1
mov eax, dword [esp + 0x18]
cmp byte [eax + 2], 0x3a
je 0x4017b2
mov edx, dword [0x414008]
mov dword [0x41400c], edi
test edx, edx
jne 0x401b9c
mov ebp, dword [0x41d050]
mov edi, 0x24
jmp 0x4018bd
mov ecx, dword [0x41d04c]
cmp ecx, ebp
jle 0x401a3a
mov ebx, dword [0x41d058]
lea eax, [ebp + 1]
jmp 0x401a15
add eax, 1
cmp byte [edx], 0x2d
je 0x401b41
cmp ecx, esi
jl 0x401b41
mov edx, dword [ebx + eax*4]
mov esi, eax
test edx, edx
jne 0x401a01
mov dword [0x41d050], eax
mov dword [0x41d048], 1
jmp 0x4017b2
add ebp, 1
jmp 0x401923
lea eax, [ebp + 1]
mov dword [0x41d050], eax
jmp 0x401a23
mov ebx, dword [0x41400c]
mov dword [esp], 2
call dword [0x41404c]
mov dword [esp + 4], str._nERROR:___c_command_line_option_takes_no_arguments_n
mov dword [esp + 8], ebx
mov dword [esp], eax
call sym._fprintf_s
mov ebp, dword [0x41d050]
jmp 0x4018f4
mov ecx, dword [0x41d04c]
mov dword [0x41d03c], ebx
cmp ecx, ebp
jle 0x401a1e
mov ebx, dword [0x41d058]
jmp 0x401aa2
add eax, 1
cmp byte [esi], 0x2d
je 0x401b7e
cmp ecx, edx
jl 0x401b7e
mov esi, dword [ebx + eax*4]
mov edx, eax
test esi, esi
jne 0x401a8e
jmp 0x401a1e
mov esi, dword [esp + 0x44]
mov edx, dword [esi + eax*4]
test edx, edx
je 0x401b89
cmp byte [edx], 0x2d
je 0x401b89
mov ecx, dword [0x41d040]
mov dword [0x41d03c], edx
mov edx, eax
mov dword [0x41d04c], eax
add ecx, eax
cmp ecx, dword [0x41d054]
jl 0x401aef
mov dword [0x41d03c], 0
mov ebx, dword [0x41d058]
jmp 0x401b03
cmp byte [ecx], 0x2d
je 0x401b0a
cmp edx, eax
jl 0x401b0a
add eax, 1
mov ecx, dword [ebx + eax*4]
test ecx, ecx
jne 0x401af7
mov dword [0x41d050], eax
mov ecx, dword [0x41d03c]
mov dword [0x41d048], 1
jmp 0x401b34
cmp edx, ebp
jg 0x401b4e
mov dword [0x41d050], eax
mov dword [0x41d048], 1
test ecx, ecx
jne 0x4017b2
jmp 0x4019ba
mov dword [0x41d050], esi
jmp 0x401a23
xor ecx, ecx
mov ebx, dword [0x41d058]
mov edx, dword [ebx + eax*4]
mov ebp, eax
test edx, edx
je 0x401b25
cmp byte [edx], 0x2d
lea edx, [eax - 1]
setne byte [esp + 0x1f]
cmp esi, edx
setge dl
add eax, 1
test byte [esp + 0x1f], dl
jne 0x401b54
mov dword [0x41d050], ebp
jmp 0x401b2a
mov dword [0x41d050], edx
jmp 0x401a23
mov edx, dword [0x41d04c]
cmp edx, ebp
jle 0x401b0a
jmp 0x401aef
mov dword [esp], 2
call dword [0x41404c]
mov dword [esp + 8], edi
mov edi, 0x24
mov dword [esp + 4], str._nERROR:___c_command_line_option_requires_argument_s__n
mov dword [esp], eax
call sym._fprintf_s
mov ebp, dword [0x41d050]
jmp 0x4018bd