Function at 0x41a920
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ecx, dword [0x4200e8]
mov edx, dword [0x429354]
test ecx, ecx
setle al
and eax, 0xff
or eax, edx
mov dword [0x429354], eax
test eax, eax
jne 0x41ab44
mov edi, dword [0x429378]
cmp dword [0x4200e8], edi
jge 0x41ab86
mov eax, dword [0x4200e8]
mov dword [0x429368], 0
dec eax
mov dword [0x429388], eax
mov dword [0x429378], eax
mov dword [0x429358], eax
mov edi, dword [0x429388]
inc edi
mov dword [0x429378], edi
lea esi, [esi]
mov edx, dword [0x429388]
inc edx
mov dword [0x429388], edx
cmp dword [ebp + 0xc], edx
jle 0x41ab1f
mov edi, dword [ebp + 0x10]
mov dword [0x429358], edx
mov ecx, dword [edi + edx*4]
mov dword [0x429368], ecx
cmp byte [ecx], 0x2d
jne 0x41aac0
lea eax, [ecx + 1]
mov dword [0x429368], eax
mov al, byte [ecx + 1]
test al, al
je 0x41aac0
cmp al, 0x2d
je 0x41ab5d
cmp dword [ebp + 8], 1
jle 0x41ae56
mov ecx, dword [ebp + 0x18]
lea eax, [ebp + 0x20]
mov ebx, dword [ebp + 0x1c]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], ebx
mov dword [0x429350], 0
test ecx, ecx
je 0x41aaa7
mov ebx, dword [ecx]
test ebx, ebx
je 0x41aaa7
mov edi, dword [0x429368]
mov esi, ecx
add esi, 0x10
mov dword [ebp - 0x20], ecx
lea eax, [edi + 1]
lea edx, [edi + 2]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x30], 0xffffffff
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x40], edx
mov dl, byte [edi]
test dl, dl
je 0x41aa61
mov ecx, dword [ebp - 0x24]
cmp byte [ebx], dl
jne 0x41aa80
mov eax, dword [ebp - 0x40]
jmp 0x41aa59
mov ecx, eax
cmp byte [ebx], dl
lea eax, [eax + 1]
jne 0x41aa80
mov dl, byte [eax - 1]
inc ebx
test dl, dl
jne 0x41aa50
cmp byte [ebx], 0
je 0x41ac13
mov eax, dword [ebp - 0x30]
test eax, eax
jns 0x41b009
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x30], eax
jmp 0x41aa89
cmp dl, 0x3d
je 0x41ad12
mov ebx, dword [ebp - 0x34]
mov dword [ebp - 0x20], esi
inc ebx
mov dword [ebp - 0x34], ebx
mov ebx, dword [esi]
add esi, 0x10
test ebx, ebx
jne 0x41aa3c
mov ecx, dword [ebp - 0x30]
test ecx, ecx
jns 0x41ae7c
cmp dword [ebp + 8], 1
je 0x41b163
mov eax, dword [0x429368]
cmp byte [eax], 0
jne 0x41ae5d
nop
mov edi, dword [ebp + 0x14]
mov dl, byte [edi]
cmp dl, 0x2d
je 0x41af32
mov ecx, dword [0x429398]
movsx eax, dl
test ecx, ecx
jne 0x41ab36
test ah, 0x10
jne 0x41ab3b
mov dword [0x429398], 0x1000
cmp dl, 0x2b
je 0x41ab03
sub esp, 0xc
push str.POSIXLY_CORRECT
call sub.msvcrt.dll_getenv
add esp, 0x10
test eax, eax
je 0x41ab12
mov edx, dword [0x429398]
or edx, 0x10
mov dword [0x429398], edx
test byte [0x429398], 0x10
je 0x41a990
mov eax, dword [0x429378]
or esi, 0xffffffff
mov dword [0x4200e8], eax
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
test ah, 0x10
je 0x41ab12
or eax, ecx
mov dword [0x429398], eax
jmp 0x41ab12
mov dword [0x4200e8], 1
mov dword [0x429354], 0
jmp 0x41a960
lea eax, [ecx + 2]
cmp byte [ecx + 2], 0
je 0x41b0ef
mov edx, dword [ebp + 8]
test edx, edx
jle 0x41ae5d
mov dword [0x429368], eax
mov dword [ebp + 8], 1
jmp 0x41a9e6
mov eax, dword [0x429368]
test eax, eax
je 0x41ad1d
mov bl, byte [eax]
test bl, bl
je 0x41ad1d
inc eax
mov ecx, dword [ebp + 0x14]
movsx esi, bl
mov dword [0x4200f0], esi
mov dword [0x429368], eax
mov dl, byte [ecx]
cmp dl, 0x2b
je 0x41ae1a
cmp dl, 0x2d
je 0x41ae1a
cmp dl, 0x3a
je 0x41af9b
cmp bl, dl
je 0x41af61
inc ecx
mov dl, byte [ecx]
test dl, dl
jne 0x41abcc
cmp dword [ebp + 8], 2
je 0x41ade3
mov edi, dword [0x4200ec]
test edi, edi
jne 0x41ae34
mov eax, dword [0x429368]
test eax, eax
je 0x41ae05
cmp byte [eax], 0
je 0x41ae05
mov eax, dword [0x429388]
jmp 0x41ae0b
mov eax, dword [ebp - 0x28]
mov dword [0x429368], 0
test eax, eax
je 0x41ac2c
mov ecx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x34]
mov dword [ecx], ebx
mov edx, dword [0x429388]
mov edi, dword [0x429350]
inc edx
test edi, edi
mov dword [0x4200e8], edx
je 0x41acc8
mov edi, dword [ebp - 0x20]
mov esi, dword [edi + 4]
test esi, esi
jne 0x41acf3
mov eax, dword [ebp + 0x10]
mov ebx, dword [0x4200ec]
test ebx, ebx
mov edx, dword [eax]
je 0x41acae
mov ax, word [0x427d04]
mov word [ebp - 0xf], ax
mov al, byte [0x427d06]
mov byte [ebp - 0xd], al
cmp dword [ebp + 8], 1
je 0x41ac80
mov byte [ebp - 0xe], 0
mov ebx, dword [sym.imp.msvcrt.dll__iob]
push ecx
add ebx, 0x40
push edx
push str._s:
push ebx
call sub.msvcrt.dll_fprintf
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
push eax
lea eax, [ebp - 0xf]
push eax
push str.option___s_s_doesnt_accept_an_argument_n
push ebx
call sub.msvcrt.dll_fprintf
add esp, 0x20
mov ecx, dword [ebp - 0x20]
mov esi, 0x3f
mov eax, dword [ecx + 0xc]
mov dword [0x4200f0], eax
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [ebp - 0x20]
cmp dword [ebx + 4], 1
jne 0x41acf3
cmp dword [ebp + 0xc], edx
jle 0x41b064
mov edi, dword [ebp + 0x10]
mov dword [0x429388], edx
mov eax, dword [edi + edx*4]
mov dword [0x429350], eax
lea eax, [edx + 1]
mov dword [0x4200e8], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 8]
test edx, edx
je 0x41ae29
mov eax, dword [ecx + 0xc]
xor esi, esi
mov dword [edx], eax
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [0x429350], ecx
jmp 0x41aa61
cmp edi, dword [0x429358]
jge 0x41a97f
mov esi, dword [0x429388]
mov ecx, dword [0x429358]
inc esi
mov dword [ebp - 0x38], esp
sub esi, ecx
lea eax, [esi*4 + 0x1e]
and eax, 0xfffffff0
call fcn.00419d60
lea ecx, [esp + 0xf]
and ecx, 0xfffffff0
test esi, esi
mov dword [ebp - 0x3c], ecx
jle 0x41afa3
mov ebx, dword [0x429358]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x44], ebx
xor ecx, ecx
lea edx, [eax + ebx*4]
lea esi, [esi]
mov ebx, dword [ebp - 0x3c]
mov eax, dword [edx]
add edx, 4
mov dword [ebx + ecx*4], eax
inc ecx
cmp ecx, esi
jne 0x41ad70
mov ecx, dword [ebp - 0x44]
dec ecx
mov dword [0x429358], ecx
cmp ecx, edi
jl 0x41adb6
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp + 0x10]
lea ebx, [eax + edx*4]
lea edx, [ecx + esi]
lea edx, [eax + edx*4]
lea esi, [esi]
mov eax, dword [ebx - 4]
dec ecx
mov dword [edx], eax
sub ebx, 4
sub edx, 4
cmp ecx, edi
jge 0x41ada0
mov dword [0x429358], ecx
test esi, esi
jle 0x41add2
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + edi*4]
xor ecx, ecx
mov ebx, dword [ebp - 0x3c]
mov eax, dword [ebx + ecx*4]
inc ecx
mov dword [edx], eax
add edx, 4
cmp ecx, esi
jne 0x41adc2
lea edi, [esi + edi]
mov dword [0x429378], edi
mov esp, dword [ebp - 0x38]
jmp 0x41a990
mov edx, dword [0x4200ec]
test edx, edx
jne 0x41b131
mov dword [0x429368], 0
mov dword [0x4200f0], 0
mov eax, dword [0x429388]
inc eax
mov esi, 0x3f
mov dword [0x4200e8], eax
jmp 0x41ab2c
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x14]
inc ecx
mov dl, byte [edi + 1]
jmp 0x41abc3
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebx + 0xc]
jmp 0x41ab2c
push esi
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, dword [ebp + 0x10]
add eax, 0x40
mov ebx, dword [edx]
push ebx
push str._s:_invalid_option_____c_n
push eax
call sub.msvcrt.dll_fprintf
add esp, 0x10
jmp 0x41abf3
mov dword [ebp + 8], 0
mov edi, dword [ebp + 0x14]
push edi
mov esi, dword [ebp + 0x10]
push esi
mov ebx, dword [ebp + 0xc]
push ebx
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041a920
add esp, 0x10
mov esi, eax
jmp 0x41ab2c
mov edx, dword [ebp - 0x28]
mov dword [0x429368], 0
test edx, edx
je 0x41ae95
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x30]
mov dword [edx], ecx
mov edx, dword [0x429388]
mov eax, dword [0x429350]
inc edx
test eax, eax
mov dword [0x4200e8], edx
je 0x41b1a4
mov eax, dword [ebp - 0x30]
mov edi, dword [ebp - 0x2c]
shl eax, 4
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
add edi, eax
mov eax, dword [edi + 4]
test eax, eax
jne 0x41b1dd
mov ebx, dword [ebp + 0x10]
mov eax, dword [0x4200ec]
test eax, eax
mov edx, dword [ebx]
je 0x41af20
mov ax, word [0x427d04]
mov word [ebp - 0xf], ax
mov al, byte [0x427d06]
mov byte [ebp - 0xd], al
cmp dword [ebp + 8], 1
je 0x41aef5
mov byte [ebp - 0xe], 0
mov ebx, dword [sym.imp.msvcrt.dll__iob]
push eax
add ebx, 0x40
push edx
push str._s:
push ebx
call sub.msvcrt.dll_fprintf
mov esi, dword [edi]
lea eax, [ebp - 0xf]
push esi
push eax
push str.option___s_s_doesnt_accept_an_argument_n
push ebx
call sub.msvcrt.dll_fprintf
add esp, 0x20
mov eax, dword [edi + 0xc]
mov esi, 0x3f
mov dword [0x4200f0], eax
jmp 0x41ab2c
mov eax, dword [0x429388]
mov edx, dword [ebp + 0x10]
inc eax
mov dword [0x429368], 0
mov dword [0x4200e8], eax
mov eax, dword [0x429388]
mov esi, 1
mov eax, dword [edx + eax*4]
mov dword [0x429350], eax
jmp 0x41ab2c
test ecx, ecx
je 0x41abdb
cmp byte [ecx + 1], 0x3a
je 0x41afb0
mov dword [0x429350], 0
test eax, eax
je 0x41b001
cmp byte [eax], 0
je 0x41b001
mov eax, dword [0x429388]
mov esi, dword [0x4200f0]
mov dword [0x4200e8], eax
jmp 0x41ab2c
inc ecx
mov dl, byte [ecx]
jmp 0x41abcc
mov eax, dword [0x429358]
mov dword [ebp - 0x44], eax
jmp 0x41ad80
mov dword [0x429350], eax
cmp byte [eax], 0
jne 0x41afec
cmp byte [ecx + 2], 0x3a
je 0x41b23d
mov edi, dword [ebp + 0xc]
mov eax, dword [0x429388]
sub edi, eax
mov dword [ebp + 0xc], edi
cmp dword [ebp + 0xc], 1
jle 0x41b1f0
inc eax
mov edx, dword [ebp + 0x10]
mov dword [0x429388], eax
mov eax, dword [edx + eax*4]
mov dword [0x429350], eax
mov eax, dword [0x429388]
mov dword [0x429368], 0
inc eax
mov dword [0x4200e8], eax
mov eax, dword [0x429388]
inc eax
jmp 0x41af8b
mov eax, dword [0x429388]
mov dword [0x4200f0], 0
inc eax
mov dword [0x429368], 0
mov dword [0x4200e8], eax
mov eax, dword [0x4200ec]
test eax, eax
je 0x41b159
mov edi, dword [ebp + 0x10]
mov eax, dword [0x429388]
mov eax, dword [edi + eax*4]
push eax
mov esi, dword [edi]
push esi
push str._s:_option___s_is_ambiguous_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov esi, 0x3f
add eax, 0x40
push eax
call sub.msvcrt.dll_fprintf
add esp, 0x10
jmp 0x41ab2c
mov edx, dword [ebp + 0x14]
mov al, byte [edx]
cmp al, 0x2b
je 0x41b0e7
cmp al, 0x2d
je 0x41b0e7
cmp al, 0x3a
mov ebx, dword [ebp + 0x10]
setne al
and eax, 0xff
mov edx, dword [ebx]
lea esi, [eax + eax*4 + 0x3a]
mov eax, dword [0x4200ec]
test eax, eax
je 0x41b0d7
mov ax, word [0x427d04]
mov word [ebp - 0xf], ax
mov al, byte [0x427d06]
mov byte [ebp - 0xd], al
cmp dword [ebp + 8], 1
je 0x41b0a9
mov byte [ebp - 0xe], 0
mov ebx, dword [sym.imp.msvcrt.dll__iob]
push eax
add ebx, 0x40
push edx
push str._s:
push ebx
call sub.msvcrt.dll_fprintf
mov edi, dword [ebp - 0x20]
mov eax, dword [edi]
push eax
lea eax, [ebp - 0xf]
push eax
push str.option___s_s_requires_an_argument_n
push ebx
call sub.msvcrt.dll_fprintf
add esp, 0x20
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0xc]
mov dword [0x4200f0], eax
jmp 0x41ab2c
mov ecx, dword [ebp + 0x14]
mov al, byte [ecx + 1]
jmp 0x41b071
mov esi, dword [0x429378]
cmp edx, esi
jle 0x41b11c
mov eax, dword [ebp + 0x10]
lea ebx, [eax + edx*4 - 4]
dec edx
mov eax, dword [ebx]
mov dword [ebx + 4], eax
sub ebx, 4
lea eax, [edx + 1]
cmp esi, eax
jl 0x41b100
mov dword [0x429358], edx
mov edx, dword [ebp + 0x10]
mov dword [edx + esi*4], ecx
lea eax, [esi + 1]
or esi, 0xffffffff
mov dword [0x429378], eax
mov dword [0x4200e8], eax
jmp 0x41ab2c
dec eax
mov dword [0x429368], eax
push eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push str._s:_unrecognised_option____s_n
push eax
call sub.msvcrt.dll_fprintf
add esp, 0x10
jmp 0x41adf1
mov esi, 0x3f
jmp 0x41ab2c
mov eax, dword [0x429388]
mov dword [0x4200f0], 0
inc eax
mov dword [0x429368], 0
mov dword [0x4200e8], eax
mov eax, dword [0x4200ec]
test eax, eax
je 0x41b159
mov ebx, dword [ebp + 0x10]
mov eax, dword [0x429388]
mov eax, dword [ebx + eax*4]
push eax
mov eax, dword [ebx]
push eax
push str._s:_unrecognised_option___s_n
jmp 0x41b049
mov ebx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x2c]
shl ebx, 4
mov dword [ebp - 0x30], ebx
mov ecx, dword [ebp - 0x30]
add edi, ecx
cmp dword [edi + 4], 1
jne 0x41b1dd
cmp dword [ebp + 0xc], edx
jle 0x41b25c
mov ecx, dword [ebp + 0x10]
mov dword [0x429388], edx
mov eax, dword [ecx + edx*4]
mov dword [0x429350], eax
lea eax, [edx + 1]
mov dword [0x4200e8], eax
mov edx, dword [edi + 8]
test edx, edx
je 0x41b254
mov eax, dword [edi + 0xc]
xor esi, esi
mov dword [edx], eax
jmp 0x41ab2c
mov esi, dword [0x4200ec]
test esi, esi
je 0x41b21d
mov ebx, dword [0x4200f0]
mov eax, dword [sym.imp.msvcrt.dll__iob]
push ebx
add eax, 0x40
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx]
push ecx
push str._s:_option_requires_an_argument_____c_n
push eax
call sub.msvcrt.dll_fprintf
add esp, 0x10
mov ebx, dword [ebp + 0x14]
mov al, byte [ebx]
cmp al, 0x2b
je 0x41b24c
cmp al, 0x2d
je 0x41b24c
cmp al, 0x3a
setne al
and eax, 0xff
lea esi, [eax + eax*4 + 0x3a]
jmp 0x41ab2c
mov dword [0x429350], 0
jmp 0x41afec
mov edi, dword [ebp + 0x14]
mov al, byte [edi + 1]
jmp 0x41b22a
mov esi, dword [edi + 0xc]
jmp 0x41ab2c
mov ebx, dword [ebp + 0x14]
mov al, byte [ebx]
cmp al, 0x2b
je 0x41b2d9
cmp al, 0x2d
je 0x41b2d9
cmp al, 0x3a
mov ecx, dword [ebp + 0x10]
setne al
and eax, 0xff
mov edx, dword [ecx]
lea esi, [eax + eax*4 + 0x3a]
mov eax, dword [0x4200ec]
test eax, eax
je 0x41b2cc
mov ax, word [0x427d04]
mov word [ebp - 0xf], ax
mov al, byte [0x427d06]
mov byte [ebp - 0xd], al
cmp dword [ebp + 8], 1
je 0x41b2a1
mov byte [ebp - 0xe], 0
mov ebx, dword [sym.imp.msvcrt.dll__iob]
push eax
add ebx, 0x40
push edx
push str._s:
push ebx
call sub.msvcrt.dll_fprintf
mov eax, dword [edi]
push eax
lea eax, [ebp - 0xf]
push eax
push str.option___s_s_requires_an_argument_n
push ebx
call sub.msvcrt.dll_fprintf
add esp, 0x20
mov eax, dword [edi + 0xc]
mov dword [0x4200f0], eax
jmp 0x41ab2c
mov edx, dword [ebp + 0x14]
mov al, byte [edx + 1]
jmp 0x41b269