Function at 0x422080
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push str.POSIXLY_CORRECT
xor edi, edi
or ebx, 0xffffffff
call dword [sym.imp.MSVCR120.dll_getenv]
add esp, 4
test eax, eax
je 0x4220a7
mov dl, 0x2b
mov byte [ebp - 1], dl
jmp 0x4220d6
mov ecx, dword [ebp + 0x10]
mov edx, 1
mov al, byte [ecx]
cmp al, 0x3a
mov byte [ebp - 1], al
cmove edi, edx
mov dl, byte [edi + ecx]
cmp dl, 0x2b
je 0x4220c6
cmp dl, 0x2d
jne 0x4220d6
inc edi
cmp al, 0x3a
je 0x4220d6
mov al, byte [edi + ecx]
mov byte [ebp - 1], al
cmp al, 0x3a
jne 0x4220d6
inc edi
mov ecx, dword [0x465000]
mov esi, dword [0x463578]
mov dword [0x464ffc], 0
test ecx, ecx
je 0x422258
mov eax, dword [ebp + 0xc]
lea eax, [eax + esi*4]
mov dword [ebp - 8], eax
mov eax, dword [eax]
movsx ebx, byte [eax + ecx]
mov eax, dword [ebp + 0x10]
mov dword [0x464ff8], ebx
lea edx, [edi + eax]
mov al, byte [edx]
test al, al
je 0x422124
movsx eax, al
cmp ebx, eax
je 0x422183
mov al, byte [edx + 1]
inc edx
test al, al
jne 0x422115
cmp dword [0x46357c], 0
je 0x422157
mov eax, dword [ebp + 0xc]
push ebx
push dword [eax]
push str._s:_illegal_option_____c_n
call dword [sym.imp.MSVCR120.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR120.dll_fprintf]
mov ecx, dword [0x465000]
add esp, 0x10
mov esi, dword [0x463578]
mov edx, dword [ebp + 0xc]
inc ecx
mov ebx, 0x3f
mov dword [0x465000], ecx
mov eax, dword [edx + esi*4]
cmp byte [ecx + eax], 0
jne 0x42221f
inc esi
mov dword [0x465000], 0
jmp 0x422391
mov al, byte [edx + 1]
inc ecx
mov dword [0x465000], ecx
cmp al, 0x3a
je 0x42219e
cmp ebx, 0x57
jne 0x42221c
cmp al, 0x3b
jne 0x42221c
mov eax, dword [ebp - 8]
mov eax, dword [eax]
add eax, ecx
cmp byte [eax], 0
je 0x4221c0
inc esi
mov dword [0x464ffc], eax
xor ecx, ecx
mov dword [0x463578], esi
mov dword [0x465000], ecx
jmp 0x42221c
cmp byte [edx + 2], 0x3a
je 0x42221c
inc esi
xor ecx, ecx
mov dword [0x465000], ecx
mov dword [0x463578], esi
cmp esi, dword [ebp + 8]
jl 0x422244
cmp dword [0x46357c], ecx
je 0x42220c
mov eax, dword [ebp + 0xc]
push ebx
push dword [eax]
push str._s:_option_requires_an_argument_____c_n
call dword [sym.imp.MSVCR120.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR120.dll_fprintf]
mov ecx, dword [0x465000]
add esp, 0x10
mov esi, dword [0x463578]
mov eax, 0x3a
mov ebx, 0x3f
cmp byte [ebp - 1], al
cmove ebx, eax
mov edx, dword [ebp + 0xc]
test ecx, ecx
je 0x422391
mov eax, dword [edx + esi*4]
cmp byte [ecx + eax], 0
jne 0x422391
inc esi
mov dword [0x465000], 0
jmp 0x422391
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + esi*4]
inc esi
mov dword [0x463578], esi
mov dword [0x464ffc], eax
jmp 0x42221c
cmp esi, dword [ebp + 8]
jge 0x42238d
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + esi*4]
mov dh, byte [eax]
cmp dh, 0x2d
jne 0x4222af
cmp byte [eax + 1], dh
jne 0x42227d
cmp byte [eax + 2], 0
je 0x42238d
cmp dh, 0x2d
jne 0x4222af
cmp byte [eax + 1], 0
je 0x4222af
mov eax, dword [ebp + 0x10]
push eax
push ecx
push dword [ebp + 8]
mov dword [0x465000], 1
call fcn.00422080
mov esi, dword [0x463578]
add esp, 0xc
mov ebx, eax
jmp 0x422391
cmp dl, 0x2b
je 0x42238e
cmp dl, 0x2d
jne 0x4222d7
mov dword [0x464ffc], eax
inc esi
mov dword [0x465000], 0
mov ebx, 1
jmp 0x422391
mov edx, dword [ebp + 8]
mov edi, esi
cmp esi, edx
jge 0x422387
mov eax, dword [ecx + edi*4]
cmp byte [eax], 0x2d
jne 0x4222f2
cmp byte [eax + 1], 0
jne 0x4222fc
inc edi
cmp edi, edx
jl 0x4222e4
jmp 0x422387
mov eax, dword [ebp + 0x10]
push eax
push ecx
push edx
mov dword [0x463578], edi
call fcn.00422080
add esp, 0xc
mov ebx, eax
mov dword [ebp - 0x14], ebx
cmp edi, esi
jle 0x42237e
mov eax, dword [ebp + 0xc]
lea ecx, [edi + 1]
mov edx, dword [ebp + 0xc]
lea ebx, [eax + edi*4]
mov eax, edi
sub eax, esi
sub edi, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], edi
mov edi, eax
mov eax, dword [ebx - 4]
sub ebx, 4
dec ecx
mov dword [ebp - 0xc], eax
mov eax, dword [0x463578]
mov dword [ebp - 8], ecx
cmp ecx, eax
jge 0x422369
mov edx, ecx
mov esi, ebx
lea ecx, [ecx]
mov eax, dword [esi + 4]
lea esi, [esi + 4]
mov dword [esi - 4], eax
inc edx
mov eax, dword [0x463578]
cmp edx, eax
jl 0x422350
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp - 0xc]
dec eax
mov dword [0x463578], eax
mov dword [edx + eax*4], esi
dec edi
jne 0x422333
mov edi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
mov esi, dword [0x463578]
cmp edi, edx
jne 0x422391
jmp 0x42238e
inc esi
or ebx, 0xffffffff
cmp esi, dword [ebp + 8]
mov eax, ebx
pop edi
cmovg esi, dword [ebp + 8]
mov dword [0x463578], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret