Function at 0x40ebc0
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 0x40ee20
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40ee20
mov dword [esp], edi
call fcn.0040fa50
cmp eax, edi
je 0x40ee4a
mov dword [esp], edi
call fcn.0040fa40
xor edx, edx
test eax, eax
mov ebx, eax
je 0x40ee02
lea edx, [ebp - 0x10]
call fcn.0040e9f0
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x14]
call fcn.0040e9f0
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 0x40ee02
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 0x40eca3
xor ebx, ebx
cmp ebx, eax
jge 0x40ec92
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 0x40ec92
inc ebx
cmp ebx, dword [ebp - 0x34]
jl 0x40ec70
test edi, edi
jle 0x40ee0c
cmp ebx, dword [ebp - 0x34]
je 0x40ee0c
mov eax, dword [ebp + 0x10]
lea edx, [ebp - 0x18]
call fcn.0040e9f0
mov dword [ebp - 0x24], eax
test eax, eax
je 0x40ee0c
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 0x40eccd
mov ebx, eax
mov dword [ebp - 0x28], 0
cmp dword [ebp - 0x28], ebx
jge 0x40ee30
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 0x40ed07
inc dword [ebp - 0x28]
cmp dword [ebp - 0x28], ebx
jl 0x40ece0
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40ee30
mov esi, dword [ebp - 0x10]
xor edi, edi
xor ebx, ebx
jmp 0x40ed31
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 0x40ed20
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 0x40ed59
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 0x40ed48
inc edi
mov dword [esp], edi
call sub.msvcrt.dll_malloc
xor edx, edx
test eax, eax
mov esi, eax
je 0x40ee02
mov byte [eax], 0
xor ebx, ebx
cmp ebx, dword [ebp - 0x10]
jge 0x40ed98
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 0x40ed80
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov ebx, dword [ebp - 0x28]
add eax, esi
mov edx, dword [ebp - 0x14]
jmp 0x40edc1
mov word [eax], 0x2e2e
inc ebx
mov byte [eax + 2], 0
add eax, 2
mov byte [eax], 0x2f
inc eax
cmp ebx, edx
jl 0x40edb0
mov byte [eax], 0
mov ebx, dword [ebp - 0x28]
cmp ebx, dword [ebp - 0x18]
jge 0x40ede8
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 0x40edd0
mov eax, dword [ebp - 0x1c]
call fcn.0040e9c0
mov eax, dword [ebp - 0x20]
call fcn.0040e9c0
mov eax, dword [ebp - 0x24]
call fcn.0040e9c0
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.0040e9c0
mov eax, dword [ebp - 0x20]
call fcn.0040e9c0
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.0040e9c0
mov eax, dword [ebp - 0x20]
call fcn.0040e9c0
mov eax, dword [ebp - 0x24]
call fcn.0040e9c0
jmp 0x40ee20
mov dword [esp], str.PATH
call sub.msvcrt.dll_getenv
test eax, eax
mov esi, eax
je 0x40ebfe
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea ebx, [eax + 1]
cmp ebx, 1
ja 0x40ee75
mov ebx, 2
mov dword [esp], edi
call sub.msvcrt.dll_strlen
lea eax, [eax + ebx + 0x1f]
and eax, 0xfffffff0
call fcn.0040ffc0
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 0x40ef69
cmp esi, ecx
je 0x40ef6f
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 0x40ef7c
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 0x40ef88
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 0x40ef88
cmp byte [esi], 0
je 0x40ebfe
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 0x40eeb7
inc esi
jmp 0x40eea0
mov byte [ebx], 0x2e
mov byte [ebx + 1], 0x2f
mov byte [ebx + 2], 0
jmp 0x40ef00
mov ecx, dword [ebp - 0x2c]
mov byte [ebx + ecx], 0
jmp 0x40ef00
mov edi, ebx
jmp 0x40ebfe