Function at 0x40992d
Capabilities:
Query environment variable

Disassembly:
push ebp
xor edx, edx
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
cmp dword [0x428788], 0
mov edi, dword [ebp + 0xc]
mov dword [0x4311c4], edx
je 0x409955
cmp dword [0x4311c0], 0
je 0x40995f
jmp 0x4099bd
mov dword [0x428788], 1
mov eax, dword [0x428788]
mov dword [esp], 0x42b0d8
mov dword [0x4311c8], eax
mov dword [0x4311cc], eax
xor eax, eax
mov dword [0x4311d8], eax
call sub.msvcrt.dll_getenv
mov ecx, dword [ebp + 0x10]
mov dword [0x4311d0], eax
mov dl, byte [ecx]
cmp dl, 0x2d
jne 0x40999a
inc dword [ebp + 0x10]
mov eax, 2
jmp 0x4099ae
cmp dl, 0x2b
jne 0x4099a6
inc dword [ebp + 0x10]
xor eax, eax
jmp 0x4099ae
test eax, eax
sete al
movzx eax, al
mov dword [0x4311d4], eax
mov dword [0x4311c0], 1
mov eax, dword [0x4311d8]
test eax, eax
je 0x4099cf
cmp byte [eax], 0
jne 0x409b01
mov eax, dword [0x428788]
cmp dword [0x4311c8], eax
jle 0x4099e1
mov dword [0x4311c8], eax
cmp eax, dword [0x4311cc]
jge 0x4099ee
mov dword [0x4311cc], eax
mov ebx, dword [0x4311d4]
cmp ebx, 1
jne 0x409a44
mov edx, dword [0x4311c8]
cmp dword [0x4311cc], edx
je 0x409a14
cmp eax, edx
je 0x409a2d
mov eax, edi
call fcn.00409820
jmp 0x409a2d
cmp eax, edx
je 0x409a2d
mov dword [0x4311cc], eax
jmp 0x409a2d
mov edx, dword [edi + eax*4]
cmp byte [edx], 0x2d
je 0x409a39
inc eax
mov dword [0x428788], eax
mov eax, dword [0x428788]
cmp eax, dword [ebp + 8]
jl 0x409a1f
jmp 0x409a3f
cmp byte [edx + 1], 0
je 0x409a27
mov dword [0x4311c8], eax
mov esi, dword [0x428788]
cmp esi, dword [ebp + 8]
je 0x409a9a
mov dword [esp + 4], 0x42b0e8
mov eax, dword [edi + esi*4]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x409a9a
inc esi
mov eax, dword [0x4311c8]
mov dword [0x428788], esi
cmp dword [0x4311cc], eax
je 0x409a87
cmp esi, eax
je 0x409a8d
mov eax, edi
call fcn.00409820
jmp 0x409a8d
mov dword [0x4311cc], esi
mov eax, dword [ebp + 8]
mov dword [0x4311c8], eax
mov dword [0x428788], eax
mov eax, dword [0x428788]
cmp eax, dword [ebp + 8]
jne 0x409abe
mov eax, dword [0x4311cc]
cmp eax, dword [0x4311c8]
je 0x409ab6
mov dword [0x428788], eax
or eax, 0xffffffff
jmp 0x40a245
mov ecx, dword [edi + eax*4]
cmp byte [ecx], 0x2d
jne 0x409acd
mov dl, byte [ecx + 1]
test dl, dl
jne 0x409ae7
test ebx, ebx
je 0x409ab6
inc eax
mov dword [0x4311c4], ecx
mov dword [0x428788], eax
mov eax, 1
jmp 0x40a245
cmp dl, 0x2d
sete dl
xor eax, eax
cmp dword [ebp + 0x14], 0
setne al
and eax, edx
lea eax, [ecx + eax + 1]
mov dword [0x4311d8], eax
cmp dword [ebp + 0x14], 0
je 0x409e55
mov ecx, dword [0x428788]
lea eax, [ecx*4]
mov dword [ebp - 0x3c], eax
mov eax, dword [edi + ecx*4]
mov dword [ebp - 0x20], eax
mov al, byte [eax + 1]
mov byte [ebp - 0x24], al
cmp al, 0x2d
je 0x409b53
cmp dword [ebp + 0x1c], 0
je 0x409e55
mov eax, dword [ebp - 0x20]
cmp byte [eax + 2], 0
jne 0x409b53
mov edx, dword [ebp + 0x10]
mov al, byte [edx]
test al, al
je 0x409b53
cmp byte [ebp - 0x24], al
je 0x409e55
inc edx
jmp 0x409b41
mov esi, dword [0x4311d8]
mov dword [ebp - 0x1c], esi
mov eax, dword [ebp - 0x1c]
mov al, byte [eax]
test al, al
je 0x409b6e
cmp al, 0x3d
je 0x409b6e
inc dword [ebp - 0x1c]
jmp 0x409b5c
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x2c], 0xffffffff
xor ebx, ebx
mov dword [ebp - 0x28], eax
xor eax, eax
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x1c]
sub eax, esi
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
test edx, edx
je 0x409bea
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], esi
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x44], edx
call sub.msvcrt.dll_strncmp
mov ecx, dword [ebp - 0x40]
test eax, eax
jne 0x409be1
mov edx, dword [ebp - 0x44]
mov dword [esp], edx
call sub.msvcrt.dll_strlen
cmp dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x40]
je 0x409c48
test ebx, ebx
je 0x409bd8
mov dword [ebp - 0x34], 1
jmp 0x409be1
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], eax
add dword [ebp - 0x28], 0x10
inc dword [ebp - 0x30]
jmp 0x409b8f
cmp dword [ebp - 0x34], 0
je 0x409c3e
cmp dword [0x428784], 0
je 0x409c23
mov ebx, dword [edi]
mov dword [esp], 2
call dword [0x428f14]
mov edi, dword [ebp - 0x20]
mov dword [esp + 4], str._s:_option__s_is_ambiguous_n
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov dword [esp], eax
call fcn.0040990c
mov ebx, dword [0x4311d8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add ebx, eax
mov dword [0x4311d8], ebx
jmp 0x409e43
test ebx, ebx
je 0x409db3
jmp 0x409c51
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], eax
lea eax, [ecx + 1]
mov edx, dword [ebx + 4]
mov dword [0x428788], eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
cmp byte [eax], 0
je 0x409d03
inc eax
test edx, edx
jne 0x409d21
cmp dword [0x428784], 0
je 0x409ce0
mov edx, dword [edi + ecx*4]
mov esi, dword [ebx]
mov edi, dword [edi]
mov eax, dword [fcn.00424fc0]
cmp byte [edx + 1], 0x2d
jne 0x409cb2
mov dword [esp], 2
call eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], str._s:_option____s_doesnt_allow_an_argument_n
mov dword [esp], eax
call fcn.0040990c
jmp 0x409ce0
movsx edx, byte [edx]
mov dword [esp], 2
mov dword [ebp - 0x1c], edx
call eax
mov edx, dword [ebp - 0x1c]
mov dword [esp + 0x10], esi
mov dword [esp + 8], edi
mov dword [esp + 0xc], edx
mov dword [esp + 4], str._s:_option__c_s_doesnt_allow_an_argument_n
mov dword [esp], eax
call fcn.0040990c
mov esi, dword [0x4311d8]
mov dword [esp], esi
call sub.msvcrt.dll_strlen
add esi, eax
mov eax, dword [ebx + 0xc]
mov dword [0x4311d8], esi
mov dword [0x428780], eax
jmp 0x409f62
dec edx
jne 0x409d8f
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp + 8]
jge 0x409d28
lea eax, [ecx + 2]
mov dword [0x428788], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [edi + eax + 4]
mov dword [0x4311c4], eax
jmp 0x409d8f
cmp dword [0x428784], 0
je 0x409d5b
mov esi, dword [edi + ecx*4]
mov edi, dword [edi]
mov dword [esp], 2
call dword [0x428f14]
mov dword [esp + 4], str._s:_option__s_requires_an_argument_n
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp], eax
call fcn.0040990c
mov esi, dword [0x4311d8]
mov dword [esp], esi
call sub.msvcrt.dll_strlen
add esi, eax
mov eax, dword [ebx + 0xc]
mov dword [0x4311d8], esi
mov dword [0x428780], eax
mov eax, dword [ebp + 0x10]
cmp byte [eax], 0x3a
jne 0x409f62
mov eax, 0x3a
jmp 0x40a245
mov dword [esp], esi
call sub.msvcrt.dll_strlen
add eax, esi
cmp dword [ebp + 0x18], 0
mov dword [0x4311d8], eax
je 0x40a166
mov eax, dword [ebp + 0x18]
mov edi, dword [ebp - 0x2c]
jmp 0x40a164
cmp dword [ebp + 0x1c], 0
je 0x409dd5
cmp byte [ebp - 0x24], 0x2d
je 0x409dd5
mov dl, byte [esi]
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx]
test al, al
je 0x409dd5
cmp dl, al
je 0x409e55
inc ecx
jmp 0x409dc4
cmp dword [0x428784], 0
je 0x409e39
cmp byte [ebp - 0x24], 0x2d
mov ebx, dword [edi]
mov eax, dword [fcn.00424fc0]
jne 0x409e0e
mov dword [esp], 2
call eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], str._s:_unrecognized_option____s_n
mov dword [esp], eax
call fcn.0040990c
jmp 0x409e39
mov edi, dword [ebp - 0x20]
movsx edi, byte [edi]
mov dword [esp], 2
call eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], str._s:_unrecognized_option__c_s_n
mov dword [esp], eax
call fcn.0040990c
mov dword [0x4311d8], 0x42b1c9
xor eax, eax
inc dword [0x428788]
mov dword [0x428780], eax
jmp 0x409f62
mov esi, dword [0x4311d8]
mov edx, dword [ebp + 0x10]
movsx ebx, byte [esi]
lea eax, [esi + 1]
mov dword [ebp - 0x1c], eax
mov dword [0x4311d8], eax
mov eax, ebx
movsx ecx, byte [edx]
test cl, cl
je 0x409e7c
cmp ebx, ecx
je 0x409e7e
inc edx
jmp 0x409e6e
xor edx, edx
cmp byte [esi + 1], 0
jne 0x409e8a
inc dword [0x428788]
test edx, edx
je 0x409e92
cmp al, 0x3a
jne 0x409ee8
cmp dword [0x428784], 0
je 0x409ee0
cmp dword [0x4311d0], 0
mov esi, dword [edi]
mov dword [esp], 2
mov eax, dword [fcn.00424fc0]
je 0x409ec6
call eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], str._s:_illegal_option_____c_n
jmp 0x409ed8
call eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], str._s:_invalid_option_____c_n
mov dword [esp], eax
call fcn.0040990c
mov dword [0x428780], ebx
jmp 0x409f62
cmp byte [edx], 0x57
mov cl, byte [edx + 1]
jne 0x40a18f
cmp cl, 0x3b
jne 0x40a18f
cmp byte [esi + 1], 0
mov eax, dword [0x428788]
je 0x409f19
mov ecx, dword [ebp - 0x1c]
inc eax
mov dword [0x428788], eax
mov dword [0x4311c4], ecx
jmp 0x409f7d
cmp dword [ebp + 8], eax
jne 0x409f6c
cmp dword [0x428784], 0
je 0x409f4e
mov esi, dword [edi]
mov dword [esp], 2
call dword [0x428f14]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], str._s:_option_requires_an_argument_____c_n
mov dword [esp], eax
call fcn.0040990c
mov eax, dword [ebp + 0x10]
mov dword [0x428780], ebx
movsx eax, byte [eax]
cmp al, 0x3a
je 0x40a245
mov eax, 0x3f
jmp 0x40a245
lea edx, [eax + 1]
mov eax, dword [edi + eax*4]
mov dword [0x428788], edx
mov dword [0x4311c4], eax
mov esi, dword [0x4311c4]
mov dword [0x4311d8], esi
mov dword [ebp - 0x1c], esi
mov eax, dword [ebp - 0x1c]
mov al, byte [eax]
mov byte [ebp - 0x28], al
test al, al
je 0x409fa1
cmp al, 0x3d
je 0x409fa1
inc dword [ebp - 0x1c]
jmp 0x409f8c
xor eax, eax
xor ebx, ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x1c]
sub eax, esi
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
test ecx, ecx
je 0x40a008
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], esi
mov dword [esp], ecx
mov dword [esp + 8], eax
mov dword [ebp - 0x34], ecx
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x409fff
mov ecx, dword [ebp - 0x34]
mov dword [esp], ecx
call sub.msvcrt.dll_strlen
cmp dword [ebp - 0x30], eax
je 0x40a067
test ebx, ebx
je 0x409ff6
mov dword [ebp - 0x2c], 1
jmp 0x409fff
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x20], eax
add dword [ebp + 0x14], 0x10
inc dword [ebp - 0x24]
jmp 0x409fb6
cmp dword [ebp - 0x2c], 0
je 0x40a070
cmp dword [0x428784], 0
je 0x40a046
mov eax, dword [0x428788]
mov ebx, dword [edi]
mov esi, dword [edi + eax*4]
mov dword [esp], 2
call dword [0x428f14]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 4], str._s:_option__W__s_is_ambiguous_n
mov dword [esp], eax
call fcn.0040990c
mov ebx, dword [0x4311d8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
inc dword [0x428788]
add ebx, eax
mov dword [0x4311d8], ebx
jmp 0x409f62
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x20], eax
test ebx, ebx
je 0x40a17d
cmp byte [ebp - 0x28], 0
mov eax, dword [ebx + 4]
je 0x40a0d8
test eax, eax
je 0x40a08b
mov eax, dword [ebp - 0x1c]
inc eax
jmp 0x40a0f1
cmp dword [0x428784], 0
je 0x40a0bd
mov esi, dword [ebx]
mov ebx, dword [edi]
mov dword [esp], 2
call dword [0x428f14]
mov dword [esp + 4], str._s:_option__W__s_doesnt_allow_an_argument_n
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp], eax
call fcn.0040990c
mov ebx, dword [0x4311d8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add ebx, eax
mov dword [0x4311d8], ebx
jmp 0x409f62
dec eax
jne 0x40a147
mov eax, dword [0x428788]
cmp eax, dword [ebp + 8]
jge 0x40a0f8
lea ecx, [eax + 1]
mov eax, dword [edi + eax*4]
mov dword [0x428788], ecx
mov dword [0x4311c4], eax
jmp 0x40a147
cmp dword [0x428784], 0
je 0x40a12c
mov esi, dword [edi + eax*4 - 4]
mov ebx, dword [edi]
mov dword [esp], 2
call dword [0x428f14]
mov dword [esp + 4], str._s:_option__s_requires_an_argument_n
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp], eax
call fcn.0040990c
mov ebx, dword [0x4311d8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add ebx, eax
mov dword [0x4311d8], ebx
jmp 0x409d79
mov dword [esp], esi
call sub.msvcrt.dll_strlen
cmp dword [ebp + 0x18], 0
lea edx, [esi + eax]
mov dword [0x4311d8], edx
je 0x40a166
mov eax, dword [ebp + 0x18]
mov edi, dword [ebp - 0x20]
mov dword [eax], edi
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
test edx, edx
je 0x40a245
mov dword [edx], eax
xor eax, eax
jmp 0x40a245
xor ebx, ebx
mov eax, 0x57
mov dword [0x4311d8], ebx
jmp 0x40a245
cmp cl, 0x3a
jne 0x40a245
cmp byte [edx + 2], 0x3a
mov cl, byte [esi + 1]
jne 0x40a1c3
test cl, cl
je 0x40a1b9
mov edi, dword [ebp - 0x1c]
inc dword [0x428788]
mov dword [0x4311c4], edi
jmp 0x40a23d
xor ecx, ecx
mov dword [0x4311c4], ecx
jmp 0x40a23d
mov edx, dword [0x428788]
test cl, cl
je 0x40a1df
mov edi, dword [ebp - 0x1c]
inc edx
mov dword [0x428788], edx
mov dword [0x4311c4], edi
jmp 0x40a23d
cmp dword [ebp + 8], edx
jne 0x40a22b
cmp dword [0x428784], 0
je 0x40a214
mov esi, dword [edi]
mov dword [esp], 2
call dword [0x428f14]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], str._s:_option_requires_an_argument_____c_n
mov dword [esp], eax
call fcn.0040990c
mov eax, dword [ebp + 0x10]
mov dword [0x428780], ebx
movsx eax, byte [eax]
cmp al, 0x3a
je 0x40a23d
mov eax, 0x3f
jmp 0x40a23d
lea ecx, [edx + 1]
mov edx, dword [edi + edx*4]
mov dword [0x428788], ecx
mov dword [0x4311c4], edx
xor edx, edx
mov dword [0x4311d8], edx
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret