Function at 0x40ee60
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edi, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
test edi, edi
sete al
test edx, edx
sete dl
or eax, edx
test al, 1
jne 0x40f0c0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40f0c0
mov dword [esp], edi
call fcn.0040fcf0
cmp eax, edi
je 0x40f0ea
mov dword [esp], edi
call fcn.0040fce0
xor edx, edx
test eax, eax
mov ebx, eax
je 0x40f0a2
lea edx, [ebp - 0x10]
call fcn.0040ec90
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x14]
call fcn.0040ec90
mov dword [ebp - 0x20], eax
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
test ecx, ecx
sete al
test edx, edx
sete dl
or eax, edx
xor edx, edx
test al, 1
jne 0x40f0a2
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
dec edi
mov dword [ebp - 0x10], edi
cmp edi, eax
mov dword [ebp - 0x34], eax
jne 0x40ef43
xor ebx, ebx
cmp ebx, eax
jge 0x40ef32
lea esi, [esi]
lea edi, [edi]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + ebx*4]
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + ebx*4]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x40ef32
inc ebx
cmp ebx, dword [ebp - 0x34]
jl 0x40ef10
test edi, edi
jle 0x40f0ac
cmp ebx, dword [ebp - 0x34]
je 0x40f0ac
mov eax, dword [ebp + 0x10]
lea edx, [ebp - 0x18]
call fcn.0040ec90
mov dword [ebp - 0x24], eax
test eax, eax
je 0x40f0ac
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
mov ebx, edx
mov dword [ebp - 0x30], eax
cmp edx, eax
mov dword [ebp - 0x34], edx
jle 0x40ef6d
mov ebx, eax
mov dword [ebp - 0x28], 0
cmp dword [ebp - 0x28], ebx
jge 0x40f0d0
lea esi, [esi]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + ecx*4]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + ecx*4]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x40efa7
inc dword [ebp - 0x28]
cmp dword [ebp - 0x28], ebx
jl 0x40ef80
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40f0d0
mov esi, dword [ebp - 0x10]
xor edi, edi
xor ebx, ebx
jmp 0x40efd1
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + ebx*4]
inc ebx
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add edi, eax
cmp ebx, esi
jl 0x40efc0
mov eax, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x28]
sub dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x34]
lea eax, [edx + edx*2]
add edi, eax
jmp 0x40eff9
mov ecx, dword [ebp - 0x24]
mov eax, dword [ecx + ebx*4]
inc ebx
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add edi, eax
cmp ebx, dword [ebp - 0x30]
jl 0x40efe8
inc edi
mov dword [esp], edi
call sub.msvcrt.dll_malloc
xor edx, edx
test eax, eax
mov esi, eax
je 0x40f0a2
mov byte [eax], 0
xor ebx, ebx
cmp ebx, dword [ebp - 0x10]
jge 0x40f038
lea esi, [esi]
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + ebx*4]
inc ebx
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
cmp ebx, dword [ebp - 0x10]
jl 0x40f020
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov ebx, dword [ebp - 0x28]
add eax, esi
mov edx, dword [ebp - 0x14]
jmp 0x40f061
mov word [eax], 0x2e2e
inc ebx
mov byte [eax + 2], 0
add eax, 2
mov byte [eax], 0x2f
inc eax
cmp ebx, edx
jl 0x40f050
mov byte [eax], 0
mov ebx, dword [ebp - 0x28]
cmp ebx, dword [ebp - 0x18]
jge 0x40f088
mov ecx, dword [ebp - 0x24]
mov eax, dword [ecx + ebx*4]
inc ebx
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
cmp ebx, dword [ebp - 0x18]
jl 0x40f070
mov eax, dword [ebp - 0x1c]
call fcn.0040ec60
mov eax, dword [ebp - 0x20]
call fcn.0040ec60
mov eax, dword [ebp - 0x24]
call fcn.0040ec60
mov edx, esi
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x1c]
call fcn.0040ec60
mov eax, dword [ebp - 0x20]
call fcn.0040ec60
lea esi, [esi]
lea esp, [ebp - 0xc]
xor edx, edx
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x1c]
call fcn.0040ec60
mov eax, dword [ebp - 0x20]
call fcn.0040ec60
mov eax, dword [ebp - 0x24]
call fcn.0040ec60
jmp 0x40f0c0
mov dword [esp], str.PATH
call sub.msvcrt.dll_getenv
test eax, eax
mov esi, eax
je 0x40ee9e
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea ebx, [eax + 1]
cmp ebx, 1
ja 0x40f115
mov ebx, 2
mov dword [esp], edi
call sub.msvcrt.dll_strlen
lea eax, [eax + ebx + 0x1f]
and eax, 0xfffffff0
call fcn.00410260
lea ebx, [esp + 0x1b]
mov ecx, esi
and ebx, 0xfffffff0
lea esi, [esi]
lea edi, [edi]
movzx eax, byte [esi]
cmp al, 0x3b
sete dl
test al, al
sete al
or eax, edx
test al, 1
je 0x40f209
cmp esi, ecx
je 0x40f20f
mov eax, esi
sub eax, ecx
mov dword [ebp - 0x2c], eax
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sub.msvcrt.dll_strncpy
movzx eax, byte [esi - 1]
cmp al, 0x2f
setne dl
cmp al, 0x5c
setne al
movzx eax, al
test edx, eax
je 0x40f21c
mov edx, dword [ebp - 0x2c]
mov byte [ebx + edx], 0x2f
mov byte [ebx + edx + 1], 0
nop
lea esi, [esi]
mov dword [esp + 4], edi
mov dword [esp], ebx
call sub.msvcrt.dll_strcat
mov dword [esp], ebx
xor eax, eax
mov dword [esp + 4], eax
call sub.msvcrt.dll__access
test eax, eax
je 0x40f228
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov dword [eax + ebx], 0x6578652e
mov byte [eax + ebx + 4], 0
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll__access
test eax, eax
je 0x40f228
cmp byte [esi], 0
je 0x40ee9e
lea ecx, [esi + 1]
mov esi, ecx
movzx eax, byte [esi]
cmp al, 0x3b
sete dl
test al, al
sete al
or eax, edx
test al, 1
jne 0x40f157
inc esi
jmp 0x40f140
mov byte [ebx], 0x2e
mov byte [ebx + 1], 0x2f
mov byte [ebx + 2], 0
jmp 0x40f1a0
mov ecx, dword [ebp - 0x2c]
mov byte [ebx + ecx], 0
jmp 0x40f1a0
mov edi, ebx
jmp 0x40ee9e