Function at 0x4106f0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
or edi, 0xffffffff
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x1c], 0
test eax, eax
je 0x410a9e
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x410a9e
cmp dword [ebp + 0x10], 0
jne 0x41073e
cmp dword [ebp + 0x14], 0
je 0x410a9e
mov ecx, dword [0x458b78]
cmp ecx, eax
jge 0x410784
mov eax, dword [esi + ecx*4]
test eax, eax
je 0x410784
mov edx, 0x4474f0
mov bl, byte [eax]
cmp bl, byte [edx]
jne 0x410774
test bl, bl
je 0x410770
mov bl, byte [eax + 1]
cmp bl, byte [edx + 1]
jne 0x410774
add eax, 2
add edx, 2
test bl, bl
jne 0x410754
xor eax, eax
jmp 0x410779
sbb eax, eax
or eax, 1
test eax, eax
jne 0x41078e
inc ecx
mov dword [0x458b78], ecx
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
test ecx, ecx
jne 0x4107a7
mov ecx, 1
mov edx, ecx
mov dword [0x458b78], ecx
mov dword [0x458b7c], edx
jmp 0x4107ad
mov edx, dword [0x458b7c]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4107cb
mov al, byte [eax]
cmp al, 0x2d
je 0x4107be
cmp al, 0x2b
jne 0x4107cb
xor ebx, ebx
cmp al, 0x2d
setne bl
inc ebx
inc dword [ebp + 0x10]
jmp 0x4107ec
push str.POSIXLY_CORRECT
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov ecx, dword [0x458b78]
add esp, 4
mov edx, dword [0x458b7c]
neg eax
sbb ebx, ebx
and ebx, 2
mov dword [ebp - 0x20], ebx
cmp edx, 1
jne 0x41091a
mov eax, ebx
sub eax, 0
je 0x410863
mov ebx, esi
sub eax, edx
je 0x410828
sub eax, edx
jne 0x410921
push dword [ebp + 0x1c]
push dword [ebx + ecx*4]
call fcn.00410d80
add esp, 8
test eax, eax
je 0x410784
jmp 0x410921
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebx + ecx*4]
push eax
push esi
call fcn.00410d80
add esp, 8
test eax, eax
jne 0x410921
pop edi
mov dword [0x458b74], esi
inc ecx
pop esi
mov dword [0x458b78], ecx
mov eax, 1
mov dword [0x457014], 1
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], eax
mov ebx, eax
mov eax, dword [ebp + 0x1c]
push eax
mov eax, ecx
push dword [esi + eax*4]
call fcn.00410d80
add esp, 8
test eax, eax
jne 0x4108aa
xor edi, edi
push dword [ebp + 0x1c]
inc ecx
inc edi
mov ebx, ecx
mov dword [0x458b78], ecx
push dword [esi + ebx*4]
call fcn.00410d80
add esp, 8
test eax, eax
je 0x410888
mov dword [ebp - 0x14], edi
or edi, 0xffffffff
mov eax, dword [esi + ebx*4]
test eax, eax
jne 0x4108c3
mov eax, dword [ebp - 0xc]
pop edi
pop esi
mov dword [0x458b78], eax
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 0x4474f0
mov bl, byte [eax]
cmp bl, byte [esi]
jne 0x4108e8
test bl, bl
je 0x4108e4
mov bl, byte [eax + 1]
cmp bl, byte [esi + 1]
jne 0x4108e8
add eax, 2
add esi, 2
test bl, bl
jne 0x4108c8
xor eax, eax
jmp 0x4108ed
sbb eax, eax
or eax, 1
test eax, eax
jne 0x41091e
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp - 0xc]
push 1
push dword [ebp - 0x14]
lea eax, [edi + ebx*4]
push eax
call fcn.00410db0
add esp, 0xc
lea eax, [ebx + 1]
mov dword [0x458b78], eax
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, esi
jmp 0x410921
mov ebx, dword [ebp + 0xc]
cmp dword [ebp + 0x14], 0
je 0x410ae3
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
push 2
push 0x4474f0
push dword [ebx + ecx*4]
call esi
mov ecx, dword [0x458b78]
add esp, 0xc
test eax, eax
je 0x410963
cmp dword [ebp + 0x1c], 0
je 0x410958
mov eax, dword [ebx + ecx*4]
cmp byte [eax], 0x2b
je 0x410963
mov edx, dword [0x458b7c]
jmp 0x410ae3
mov edx, dword [0x458b7c]
cmp edx, 1
jne 0x410ae3
push 2
push 0x4474f0
push dword [ebx + ecx*4]
call esi
mov ecx, dword [0x458b7c]
test eax, eax
mov eax, dword [0x458b78]
mov edx, 2
cmove ecx, edx
or edi, 0xffffffff
push 0x3d
mov dword [0x458b7c], ecx
mov eax, dword [ebx + eax*4]
add eax, ecx
push eax
call sub.VCRUNTIME140.dll_strchr
mov ecx, dword [0x458b78]
add esp, 0x14
mov dword [ebp - 8], eax
test eax, eax
jne 0x4109d6
mov edx, dword [ebx + ecx*4]
mov esi, edx
lea eax, [esi + 1]
mov dword [ebp - 0x18], eax
mov al, byte [esi]
inc esi
test al, al
jne 0x4109c4
sub esi, dword [ebp - 0x18]
lea eax, [edx + esi]
mov dword [ebp - 8], eax
jmp 0x4109db
mov esi, eax
sub esi, dword [ebx + ecx*4]
mov edx, dword [0x458b7c]
xor eax, eax
mov dword [ebp - 0x10], eax
sub esi, edx
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
test eax, eax
je 0x410ae3
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp + 0xc]
nop
push esi
push eax
mov eax, dword [ebx + ecx*4]
add eax, edx
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x410a3e
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov ecx, eax
mov dword [ebp - 0x18], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x410a22
sub ecx, edx
cmp esi, ecx
je 0x410ab4
test edi, edi
jns 0x410a64
mov eax, dword [ebp - 0x10]
mov edi, eax
jmp 0x410a41
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x14]
inc eax
mov dword [ebp - 0x10], eax
shl eax, 4
add eax, ecx
mov dword [ebp - 0x18], eax
mov eax, dword [eax]
test eax, eax
je 0x410aba
mov ecx, dword [0x458b78]
mov edx, dword [0x458b7c]
jmp 0x410a00
cmp dword [0x457010], 0
je 0x410a9e
mov eax, dword [ebp + 0x14]
add edi, edi
push 2
mov ebx, dword [eax + edi*8]
mov eax, dword [0x458b78]
mov edi, dword [ebp + 0xc]
mov esi, dword [edi + eax*4]
mov edi, dword [edi]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push dword [ebp - 0x18]
push ebx
push esi
push edi
push str._s:_option___s_is_ambiguous__could_be_____s_or_____s__n
push eax
call fcn.00404730
add esp, 0x1c
mov dword [0x457014], 0x3f
mov eax, 0x3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x14]
mov edx, dword [0x458b7c]
test edi, edi
js 0x410ad7
mov eax, edi
add eax, eax
mov eax, dword [ecx + eax*8 + 4]
mov ecx, dword [0x458b78]
jmp 0x410ba7
mov eax, dword [ebp - 8]
mov ecx, dword [0x458b78]
mov dword [ebp - 8], eax
mov esi, dword [ebp + 0x10]
or eax, 0xffffffff
test esi, esi
je 0x410ba7
mov eax, dword [ebx + ecx*4]
movsx eax, byte [eax + edx]
push eax
push esi
call sub.VCRUNTIME140.dll_strchr
mov esi, eax
add esp, 8
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x410b74
cmp dword [0x457010], eax
je 0x410b3e
mov eax, dword [0x458b78]
mov esi, dword [ebx]
push 2
mov ecx, dword [ebx + eax*4]
mov eax, dword [0x458b7c]
movsx edi, byte [ecx + eax]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push edi
push esi
push str._s:_invalid_option_______c_n
push eax
call fcn.00404730
add esp, 0x14
mov edx, dword [0x458b78]
mov ecx, dword [0x458b7c]
inc ecx
mov dword [0x458b7c], ecx
mov eax, dword [ebx + edx*4]
cmp byte [ecx + eax], 0
jne 0x410a9e
inc edx
mov dword [0x458b7c], 1
mov dword [0x458b78], edx
jmp 0x410a9e
xor eax, eax
cmp byte [esi + 1], 0x3a
jne 0x410b84
cmp byte [esi + 2], 0x3a
sete al
inc eax
mov ecx, dword [0x458b78]
mov edx, dword [0x458b7c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + ecx*4]
inc eax
add eax, edx
mov dword [ebp - 8], eax
movsx eax, byte [esi]
mov dword [0x457014], eax
mov eax, dword [ebp - 0x18]
xor esi, esi
sub eax, esi
je 0x410cc5
sub eax, 1
je 0x410c0a
sub eax, 1
jne 0x410cea
mov eax, dword [ebp - 8]
mov al, byte [eax]
mov byte [ebp - 1], al
mov byte [ebp + 0xb], al
cmp al, 0x3d
jne 0x410bd7
mov eax, dword [ebp - 8]
mov al, byte [eax + 1]
mov byte [ebp + 0xb], al
mov eax, dword [ebp - 8]
inc eax
cmp byte [ebp - 1], 0x3d
cmovne eax, dword [ebp - 8]
cmp byte [ebp + 0xb], 0
je 0x410bfe
mov edx, 1
mov dword [0x458b74], eax
mov dword [0x458b7c], edx
jmp 0x410cea
xor eax, eax
mov dword [0x458b74], eax
jmp 0x410cea
mov eax, dword [ebp - 8]
mov dl, byte [eax]
mov dh, dl
cmp dl, 0x3d
jne 0x410c19
mov dh, byte [eax + 1]
inc eax
cmp dl, 0x3d
cmovne eax, dword [ebp - 8]
test dh, dh
jne 0x410cb3
lea eax, [ecx + 1]
cmp eax, dword [ebp + 8]
jl 0x410caa
cmp dword [0x457010], esi
je 0x410c8d
mov esi, dword [ebx]
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push 2
call ebx
push esi
push str._s:_argument_required_for_option__
push eax
call fcn.00404730
add esp, 0x10
push 2
test edi, edi
js 0x410c70
mov eax, dword [ebp + 0x14]
add edi, edi
mov esi, dword [eax + edi*8]
call ebx
push esi
push str.___s_n
jmp 0x410c7e
mov eax, dword [ebp - 0x1c]
movsx esi, byte [eax]
call ebx
push esi
push str.__c_n
push eax
call fcn.00404730
mov ecx, dword [0x458b78]
add esp, 0x10
pop edi
inc ecx
mov dword [0x457014], 0x3a
pop esi
mov dword [0x458b78], ecx
mov eax, 0x3a
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + ecx*4 + 4]
mov esi, 1
mov edx, 1
mov dword [0x458b74], eax
mov dword [0x458b7c], edx
jmp 0x410cea
test edi, edi
jns 0x410cd9
mov eax, dword [ebx + ecx*4]
inc edx
mov dword [0x458b7c], edx
cmp byte [edx + eax], 0
jne 0x410ce4
mov edx, 1
mov dword [0x458b7c], edx
mov dword [0x458b74], esi
cmp dword [ebp - 0x20], 0
jne 0x410d18
cmp edx, 1
jne 0x410d27
mov edx, dword [ebp - 0x14]
test edx, edx
je 0x410d1d
lea eax, [esi + 1]
push eax
mov eax, dword [ebp - 0xc]
push edx
lea eax, [ebx + eax*4]
push eax
call fcn.00410db0
mov eax, dword [ebp - 0xc]
add esp, 0xc
inc eax
add eax, esi
jmp 0x410d22
cmp edx, 1
jne 0x410d27
lea eax, [esi + 1]
add eax, ecx
mov dword [0x458b78], eax
test edi, edi
js 0x410d54
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x410d34
mov dword [eax], edi
mov eax, dword [ebp + 0x14]
add edi, edi
mov ecx, dword [eax + edi*8 + 8]
mov eax, dword [eax + edi*8 + 0xc]
test ecx, ecx
je 0x410aad
pop edi
pop esi
mov dword [ecx], eax
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x457014]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret