Function at 0x401430
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [0x406018]
mov ebx, 1
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], ecx
push edi
test esi, esi
jne 0x401460
mov ecx, ebx
mov esi, ecx
mov dword [0x40a354], ecx
mov dword [0x406018], esi
jmp 0x401466
mov ecx, dword [0x40a354]
mov eax, dword [0x4060bc]
cmp eax, 0xffffffff
je 0x401474
test ecx, ecx
je 0x40149c
push str.POSIXLY_CORRECT
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov esi, dword [0x406018]
add esp, 4
mov ecx, dword [0x40a354]
neg eax
mov edx, dword [ebp - 4]
sbb eax, eax
neg eax
mov dword [0x4060bc], eax
xor edi, edi
test eax, eax
mov dword [0x40a344], edi
cmovne ebx, edi
mov dword [ebp - 0x10], ebx
test ecx, ecx
je 0x4014c2
or eax, 0xffffffff
or ebx, eax
mov dword [0x4060b0], eax
mov dword [0x4060b4], ebx
jmp 0x4014cd
mov ebx, dword [0x4060b4]
mov eax, dword [0x4060b0]
mov edi, dword [0x4060b8]
mov dword [ebp - 8], eax
test ecx, ecx
jne 0x4014e2
cmp byte [edi], cl
jne 0x4015ef
mov dword [0x40a354], 0
cmp esi, dword [ebp - 0xc]
jge 0x4017ac
mov edi, dword [edx + esi*4]
mov dword [0x4060b8], edi
cmp byte [edi], 0x2d
jne 0x401538
cmp byte [edi + 1], 0
jne 0x401598
push 0x2d
push str.hvm:l:r:s:d:e:
call dword [sym.imp.VCRUNTIME140.dll_strchr]
mov esi, dword [0x406018]
add esp, 8
mov ebx, dword [0x4060b4]
test eax, eax
mov eax, dword [0x4060b0]
mov edx, dword [ebp - 4]
mov dword [ebp - 8], eax
jne 0x401592
cmp dword [ebp - 0x10], 0
mov edi, 0x404180
mov dword [0x4060b8], edi
je 0x4017ec
cmp ebx, 0xffffffff
jne 0x401556
mov ebx, esi
jmp 0x401577
cmp eax, 0xffffffff
je 0x40157d
push edx
push ecx
call fcn.00401100
mov eax, esi
add esp, 8
sub eax, dword [ebp - 8]
add ebx, eax
or eax, 0xffffffff
mov dword [ebp - 8], eax
mov dword [0x4060b0], eax
mov dword [0x4060b4], ebx
mov ecx, dword [0x40a354]
inc esi
mov edx, dword [ebp - 4]
mov dword [0x406018], esi
jmp 0x4014d6
mov edi, dword [0x4060b8]
cmp ebx, 0xffffffff
je 0x4015ab
cmp eax, 0xffffffff
cmove eax, esi
mov dword [ebp - 8], eax
mov dword [0x4060b0], eax
cmp byte [edi + 1], 0
lea ecx, [edi + 1]
je 0x4015ef
mov edi, ecx
cmp byte [edi], 0x2d
jne 0x4015ef
cmp byte [edi + 1], 0
jne 0x4015ef
inc esi
mov dword [0x4060b8], 0x404180
mov dword [0x406018], esi
cmp eax, 0xffffffff
je 0x4017d8
push edx
push ecx
call fcn.00401100
sub esi, dword [ebp - 8]
add esp, 8
add esi, ebx
jmp 0x4017d2
cmp edi, dword [edx + esi*4]
je 0x40162a
cmp byte [edi], 0x2d
jne 0x40162a
mov ecx, dword [ebp - 4]
inc edi
push 0
sub esp, 8
mov dword [0x4060b8], edi
mov edx, str.hvm:l:r:s:d:e:
call fcn.004011c0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4016cb
mov esi, dword [0x406018]
mov edi, dword [0x4060b8]
movsx ebx, byte [edi]
inc edi
mov dword [0x4060b8], edi
cmp ebx, 0x3a
je 0x401786
cmp ebx, 0x2d
jne 0x40164b
cmp byte [edi], 0
jne 0x401792
push ebx
push str.hvm:l:r:s:d:e:
call dword [sym.imp.VCRUNTIME140.dll_strchr]
add esp, 8
test eax, eax
je 0x401761
cmp ebx, 0x57
jne 0x4016dc
cmp byte [eax + 1], 0x3b
jne 0x4016dc
mov eax, dword [0x4060b8]
cmp byte [eax], 0
jne 0x4016b6
mov eax, dword [0x406018]
inc eax
mov dword [0x406018], eax
cmp eax, dword [ebp - 0xc]
jl 0x4016ab
push ebx
push str.option_requires_an_argument_____c
mov dword [0x4060b8], 0x404180
call fcn.00401080
add esp, 8
mov eax, 0x3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + eax*4]
mov dword [0x4060b8], eax
mov ecx, dword [ebp - 4]
mov edx, str.hvm:l:r:s:d:e:
push 0
sub esp, 8
call fcn.004011c0
add esp, 0xc
mov dword [0x4060b8], 0x404180
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [eax + 1], 0x3a
je 0x4016fb
mov eax, dword [0x4060b8]
cmp byte [eax], 0
jne 0x40172d
inc dword [0x406018]
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x4060b8]
mov dword [0x40a344], 0
cmp byte [ecx], 0
je 0x401736
mov dword [0x40a344], ecx
mov ecx, dword [0x406018]
inc ecx
mov dword [0x4060b8], 0x404180
mov dword [0x406018], ecx
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [eax + 2], 0x3a
je 0x401716
mov ecx, dword [0x406018]
inc ecx
mov dword [0x406018], ecx
cmp ecx, dword [ebp - 0xc]
jl 0x401754
push ebx
jmp 0x401688
mov eax, dword [ebp - 4]
mov eax, dword [eax + ecx*4]
mov dword [0x40a344], eax
jmp 0x40171c
cmp ebx, 0x2d
jne 0x40177a
mov eax, dword [0x4060b8]
cmp byte [eax], 0
jne 0x401792
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [0x406018]
mov edi, dword [0x4060b8]
cmp byte [edi], 0
jne 0x401792
inc esi
mov dword [0x406018], esi
push ebx
push str.unknown_option_____c
call fcn.00401080
add esp, 8
mov eax, 0x3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [0x4060b8], 0x404180
cmp eax, 0xffffffff
je 0x4017cc
push edx
push ecx
call fcn.00401100
sub ebx, dword [ebp - 8]
add esp, 8
add esi, ebx
jmp 0x4017d2
cmp ebx, 0xffffffff
cmovne esi, ebx
mov dword [0x406018], esi
mov dword [0x4060b0], 0xffffffff
mov dword [0x4060b4], 0xffffffff
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret