Function at 0x409951
Capabilities:
Query environment variable

Disassembly:
push ebp
xor edx, edx
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [0x428788]
mov edi, dword [ebp + 0xc]
mov dword [0x4311c4], edx
test eax, eax
je 0x409979
cmp dword [0x4311c0], 0
je 0x409988
jmp 0x4099e1
mov dword [0x428788], 1
mov eax, 1
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 0x4099be
inc dword [ebp + 0x10]
mov eax, 2
jmp 0x4099d2
cmp dl, 0x2b
jne 0x4099ca
inc dword [ebp + 0x10]
xor eax, eax
jmp 0x4099d2
test eax, eax
sete al
movzx eax, al
mov dword [0x4311d4], eax
mov dword [0x4311c0], 1
mov ebx, dword [0x4311d8]
test ebx, ebx
je 0x4099f4
cmp byte [ebx], 0
jne 0x409b0b
mov esi, dword [0x428788]
cmp dword [0x4311c8], esi
jle 0x409a08
mov dword [0x4311c8], esi
cmp esi, dword [0x4311cc]
jge 0x409a16
mov dword [0x4311cc], esi
mov ebx, dword [0x4311d4]
cmp ebx, 1
jne 0x409a6f
mov eax, dword [0x4311c8]
cmp dword [0x4311cc], eax
je 0x409a3b
cmp esi, eax
je 0x409a56
mov eax, edi
call fcn.00409844
jmp 0x409a56
cmp esi, eax
je 0x409a56
mov dword [0x4311cc], esi
jmp 0x409a56
mov eax, dword [edi + esi*4]
cmp byte [eax], 0x2d
je 0x409a63
inc esi
mov dword [0x428788], esi
mov esi, dword [0x428788]
cmp esi, dword [ebp + 8]
jl 0x409a47
jmp 0x409a69
cmp byte [eax + 1], 0
je 0x409a4f
mov dword [0x4311c8], esi
cmp dword [ebp + 8], esi
je 0x409abf
mov dword [esp + 4], 0x42b0e8
mov eax, dword [edi + esi*4]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x409ad9
inc esi
mov eax, dword [0x4311c8]
mov dword [0x428788], esi
cmp dword [0x4311cc], eax
je 0x409aac
cmp esi, eax
je 0x409ab2
mov eax, edi
call fcn.00409844
jmp 0x409ab2
mov dword [0x4311cc], esi
mov eax, dword [ebp + 8]
mov dword [0x4311c8], eax
mov dword [0x428788], eax
mov eax, dword [0x4311cc]
cmp eax, dword [0x4311c8]
je 0x409ad1
mov dword [0x428788], eax
or eax, 0xffffffff
jmp 0x40a27c
mov edx, dword [edi + esi*4]
cmp byte [edx], 0x2d
jne 0x40a262
mov al, byte [edx + 1]
test al, al
je 0x40a262
cmp dword [ebp + 0x14], 0
setne cl
cmp al, 0x2d
sete al
movzx eax, al
and eax, ecx
lea ebx, [edx + eax + 1]
mov dword [0x4311d8], ebx
cmp dword [ebp + 0x14], 0
je 0x409e74
mov ecx, dword [0x428788]
lea eax, [ecx*4]
mov dword [ebp - 0x3c], eax
mov eax, dword [edi + ecx*4]
mov dword [ebp - 0x1c], eax
mov al, byte [eax + 1]
mov byte [ebp - 0x20], al
cmp al, 0x2d
je 0x409b5f
cmp dword [ebp + 0x1c], 0
je 0x409e74
mov eax, dword [ebp - 0x1c]
mov edx, ebx
cmp byte [eax + 2], 0
jne 0x409b61
mov edx, dword [ebp + 0x10]
mov al, byte [edx]
test al, al
je 0x409b5f
cmp byte [ebp - 0x20], al
je 0x409e74
inc edx
jmp 0x409b4d
mov edx, ebx
mov al, byte [edx]
test al, al
je 0x409b6e
cmp al, 0x3d
je 0x409b6e
inc edx
jmp 0x409b61
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x2c], 0xffffffff
xor esi, esi
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x34], eax
mov eax, edx
sub eax, ebx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x409bf5
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], ebx
mov dword [ebp - 0x44], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], ecx
mov dword [esp], eax
call sub.msvcrt.dll_strncmp
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x44]
test eax, eax
jne 0x409bec
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
cmp dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x44]
je 0x409c53
test esi, esi
je 0x409be3
mov dword [ebp - 0x34], 1
jmp 0x409bec
mov eax, dword [ebp - 0x30]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
add dword [ebp - 0x24], 0x10
inc dword [ebp - 0x30]
jmp 0x409b8e
cmp dword [ebp - 0x34], 0
je 0x409c49
cmp dword [0x428784], 0
je 0x409c2e
mov ebx, dword [edi]
mov dword [esp], 2
call dword [0x428f30]
mov edi, dword [ebp - 0x1c]
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.00409930
mov ebx, dword [0x4311d8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add ebx, eax
mov dword [0x4311d8], ebx
jmp 0x409e62
test esi, esi
je 0x409dd2
jmp 0x409c5c
mov eax, dword [ebp - 0x30]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
lea eax, [ecx + 1]
mov dword [0x428788], eax
cmp byte [edx], 0
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 4]
je 0x409d14
test eax, eax
je 0x409c85
lea edi, [edx + 1]
mov dword [0x4311c4], edi
jmp 0x409da0
cmp dword [0x428784], 0
je 0x409cf1
mov edx, dword [edi + ecx*4]
mov ebx, dword [esi]
mov edi, dword [edi]
mov eax, dword [fcn.00425378]
cmp byte [edx + 1], 0x2d
jne 0x409cc3
mov dword [esp], 2
call eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], str._s:_option____s_doesnt_allow_an_argument_n
mov dword [esp], eax
call fcn.00409930
jmp 0x409cf1
movsx edx, byte [edx]
mov dword [esp], 2
mov dword [ebp - 0x1c], edx
call eax
mov edx, dword [ebp - 0x1c]
mov dword [esp + 0x10], ebx
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.00409930
mov ebx, dword [0x4311d8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add ebx, eax
mov eax, dword [esi + 0xc]
mov dword [0x4311d8], ebx
mov dword [0x428780], eax
jmp 0x409f85
dec eax
jne 0x409da0
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 8]
jge 0x409d39
lea eax, [ecx + 2]
mov dword [0x428788], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [edi + eax + 4]
mov dword [0x4311c4], eax
jmp 0x409da0
cmp dword [0x428784], 0
je 0x409d6c
mov ebx, dword [edi + ecx*4]
mov edi, dword [edi]
mov dword [esp], 2
call dword [0x428f30]
mov dword [esp + 4], str._s:_option__s_requires_an_argument_n
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp], eax
call fcn.00409930
mov ebx, dword [0x4311d8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add ebx, eax
mov eax, dword [esi + 0xc]
mov dword [0x4311d8], ebx
mov dword [0x428780], eax
mov eax, dword [ebp + 0x10]
cmp byte [eax], 0x3a
jne 0x409f85
mov eax, 0x3a
jmp 0x40a27c
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add eax, ebx
cmp dword [ebp + 0x18], 0
mov dword [0x4311d8], eax
je 0x409dbd
mov eax, dword [ebp + 0x18]
mov edi, dword [ebp - 0x2c]
mov dword [eax], edi
mov edx, dword [esi + 8]
mov eax, dword [esi + 0xc]
test edx, edx
je 0x40a27c
mov dword [edx], eax
jmp 0x40a192
cmp dword [ebp + 0x1c], 0
je 0x409df4
cmp byte [ebp - 0x20], 0x2d
je 0x409df4
mov dl, byte [ebx]
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx]
test al, al
je 0x409df4
cmp dl, al
je 0x409e74
inc ecx
jmp 0x409de3
cmp dword [0x428784], 0
je 0x409e58
cmp byte [ebp - 0x20], 0x2d
mov esi, dword [edi]
mov eax, dword [fcn.00425378]
jne 0x409e2d
mov dword [esp], 2
call eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], str._s:_unrecognized_option____s_n
mov dword [esp], eax
call fcn.00409930
jmp 0x409e58
mov edi, dword [ebp - 0x1c]
movsx edi, byte [edi]
mov dword [esp], 2
call eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], str._s:_unrecognized_option__c_s_n
mov dword [esp], eax
call fcn.00409930
mov dword [0x4311d8], 0x42b1c9
xor eax, eax
inc dword [0x428788]
mov dword [0x428780], eax
jmp 0x409f85
movsx ecx, byte [ebx]
lea esi, [ebx + 1]
mov dword [0x4311d8], esi
mov dword [ebp - 0x1c], ecx
mov eax, ecx
mov ecx, dword [ebp + 0x10]
movsx edx, byte [ecx]
test dl, dl
je 0x409e97
cmp dword [ebp - 0x1c], edx
je 0x409e99
inc ecx
jmp 0x409e88
xor ecx, ecx
cmp byte [ebx + 1], 0
jne 0x409ea5
inc dword [0x428788]
test ecx, ecx
je 0x409ead
cmp al, 0x3a
jne 0x409f09
cmp dword [0x428784], 0
je 0x409f01
cmp dword [0x4311d0], 0
mov ebx, dword [edi]
mov dword [esp], 2
mov eax, dword [fcn.00425378]
je 0x409ee4
call eax
mov edi, dword [ebp - 0x1c]
mov dword [esp + 8], ebx
mov dword [esp + 4], str._s:_illegal_option_____c_n
mov dword [esp + 0xc], edi
jmp 0x409ef9
call eax
mov edi, dword [ebp - 0x1c]
mov dword [esp + 8], ebx
mov dword [esp + 4], str._s:_invalid_option_____c_n
mov dword [esp + 0xc], edi
mov dword [esp], eax
call fcn.00409930
mov eax, dword [ebp - 0x1c]
jmp 0x409d0a
cmp byte [ecx], 0x57
mov dl, byte [ecx + 1]
jne 0x40a1ab
cmp dl, 0x3b
jne 0x40a1ab
cmp byte [ebx + 1], 0
mov eax, dword [0x428788]
je 0x409f37
inc eax
mov dword [0x4311c4], esi
mov dword [0x428788], eax
jmp 0x409fa1
cmp dword [ebp + 8], eax
jne 0x409f8f
cmp dword [0x428784], 0
je 0x409f6f
mov ebx, dword [edi]
mov dword [esp], 2
call dword [0x428f30]
mov edi, dword [ebp - 0x1c]
mov dword [esp + 4], str._s:_option_requires_an_argument_____c_n
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov dword [esp], eax
call fcn.00409930
mov eax, dword [ebp - 0x1c]
mov dword [0x428780], eax
mov eax, dword [ebp + 0x10]
movsx eax, byte [eax]
cmp al, 0x3a
je 0x40a27c
mov eax, 0x3f
jmp 0x40a27c
mov esi, dword [edi + eax*4]
lea edx, [eax + 1]
mov dword [0x428788], edx
mov dword [0x4311c4], esi
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 0x409fbf
cmp al, 0x3d
je 0x409fbf
inc dword [ebp - 0x1c]
jmp 0x409faa
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 0x40a026
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 0x40a01d
mov ecx, dword [ebp - 0x34]
mov dword [esp], ecx
call sub.msvcrt.dll_strlen
cmp dword [ebp - 0x30], eax
je 0x40a085
test ebx, ebx
je 0x40a014
mov dword [ebp - 0x2c], 1
jmp 0x40a01d
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 0x409fd4
cmp dword [ebp - 0x2c], 0
je 0x40a08e
cmp dword [0x428784], 0
je 0x40a064
mov eax, dword [0x428788]
mov ebx, dword [edi]
mov esi, dword [edi + eax*4]
mov dword [esp], 2
call dword [0x428f30]
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.00409930
mov ebx, dword [0x4311d8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
inc dword [0x428788]
add ebx, eax
mov dword [0x4311d8], ebx
jmp 0x409f85
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x20], eax
test ebx, ebx
je 0x40a199
cmp byte [ebp - 0x28], 0
mov eax, dword [ebx + 4]
je 0x40a0f6
test eax, eax
je 0x40a0a9
mov eax, dword [ebp - 0x1c]
inc eax
jmp 0x40a10f
cmp dword [0x428784], 0
je 0x40a0db
mov esi, dword [ebx]
mov ebx, dword [edi]
mov dword [esp], 2
call dword [0x428f30]
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.00409930
mov ebx, dword [0x4311d8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add ebx, eax
mov dword [0x4311d8], ebx
jmp 0x409f85
dec eax
jne 0x40a165
mov eax, dword [0x428788]
cmp eax, dword [ebp + 8]
jge 0x40a116
lea ecx, [eax + 1]
mov eax, dword [edi + eax*4]
mov dword [0x428788], ecx
mov dword [0x4311c4], eax
jmp 0x40a165
cmp dword [0x428784], 0
je 0x40a14a
mov esi, dword [edi + eax*4 - 4]
mov ebx, dword [edi]
mov dword [esp], 2
call dword [0x428f30]
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.00409930
mov ebx, dword [0x4311d8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add ebx, eax
mov dword [0x4311d8], ebx
jmp 0x409d8a
mov dword [esp], esi
call sub.msvcrt.dll_strlen
add eax, esi
cmp dword [ebp + 0x18], 0
mov dword [0x4311d8], eax
je 0x40a182
mov eax, dword [ebp + 0x18]
mov edi, dword [ebp - 0x20]
mov dword [eax], edi
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
test ecx, ecx
je 0x40a27c
mov dword [ecx], eax
xor eax, eax
jmp 0x40a27c
xor ebx, ebx
mov eax, 0x57
mov dword [0x4311d8], ebx
jmp 0x40a27c
cmp dl, 0x3a
jne 0x40a27c
cmp byte [ecx + 2], 0x3a
mov dl, byte [ebx + 1]
jne 0x40a1dc
test dl, dl
je 0x40a1d2
inc dword [0x428788]
mov dword [0x4311c4], esi
jmp 0x40a258
xor ecx, ecx
mov dword [0x4311c4], ecx
jmp 0x40a258
mov ecx, dword [0x428788]
test dl, dl
je 0x40a1f5
inc ecx
mov dword [0x4311c4], esi
mov dword [0x428788], ecx
jmp 0x40a258
cmp dword [ebp + 8], ecx
jne 0x40a246
cmp dword [0x428784], 0
je 0x40a22d
mov ebx, dword [edi]
mov dword [esp], 2
call dword [0x428f30]
mov edi, dword [ebp - 0x1c]
mov dword [esp + 4], str._s:_option_requires_an_argument_____c_n
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov dword [esp], eax
call fcn.00409930
mov eax, dword [ebp - 0x1c]
mov dword [0x428780], eax
mov eax, dword [ebp + 0x10]
movsx eax, byte [eax]
cmp al, 0x3a
je 0x40a258
mov eax, 0x3f
jmp 0x40a258
lea edx, [ecx + 1]
mov dword [0x428788], edx
mov edx, dword [edi + ecx*4]
mov dword [0x4311c4], edx
xor edx, edx
mov dword [0x4311d8], edx
jmp 0x40a27c
test ebx, ebx
je 0x409ad1
inc esi
mov dword [0x4311c4], edx
mov eax, 1
mov dword [0x428788], esi
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret