Function at 0x486bb0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x7c
test eax, eax
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x60], ecx
je 0x486e90
test edx, edx
je 0x486e90
mov ebx, dword [ebp - 0x60]
test ebx, ebx
je 0x486e90
mov dword [esp], eax
call fcn.0047f540
cmp eax, esi
mov dword [ebp - 0x64], eax
je 0x486ea0
mov ecx, dword [ebp + 8]
mov dword [esp], esi
test ecx, ecx
jne 0x486d10
call fcn.00496d40
mov ebx, eax
test ebx, ebx
je 0x486e90
lea edx, [ebp - 0x50]
mov eax, ebx
call fcn.004869f0
mov dword [esp], ebx
mov esi, eax
mov dword [ebp - 0x64], eax
call sub.msvcrt.dll_free
test esi, esi
je 0x486e90
mov eax, dword [ebp - 0x5c]
lea edx, [ebp - 0x4c]
call fcn.004869f0
test eax, eax
mov ebx, eax
je 0x486e80
mov eax, dword [ebp - 0x50]
lea esi, [eax - 1]
cmp esi, dword [ebp - 0x4c]
mov dword [ebp - 0x50], esi
jne 0x486c8d
test esi, esi
jle 0x486e80
mov dword [ebp - 0x5c], esi
xor edi, edi
mov esi, dword [ebp - 0x64]
jmp 0x486c6c
add edi, 1
cmp dword [ebp - 0x5c], edi
je 0x486e80
mov eax, dword [ebx + edi*4]
mov dword [esp + 4], eax
mov eax, dword [esi + edi*4]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x486c60
mov esi, dword [ebp - 0x5c]
cmp esi, edi
je 0x486e80
mov eax, dword [ebp - 0x60]
lea edx, [ebp - 0x48]
call fcn.004869f0
test eax, eax
mov edx, eax
mov dword [ebp - 0x60], eax
je 0x486e80
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x68], eax
cmp ecx, eax
cmovle eax, ecx
test eax, eax
mov dword [ebp - 0x6c], ecx
jle 0x487018
xor edi, edi
mov esi, edx
mov dword [ebp - 0x5c], eax
jmp 0x486ccf
add edi, 1
cmp edi, dword [ebp - 0x5c]
je 0x486d20
mov eax, dword [esi + edi*4]
mov dword [esp + 4], eax
mov eax, dword [ebx + edi*4]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x486cc7
xor esi, esi
test edi, edi
jne 0x486d20
mov eax, dword [ebp - 0x64]
call fcn.00486970
mov eax, ebx
call fcn.00486970
mov eax, dword [ebp - 0x60]
call fcn.00486970
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00485530
mov ebx, eax
jmp 0x486c04
mov eax, dword [ebp - 0x50]
test eax, eax
jle 0x486fed
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x70], edi
mov esi, edx
lea eax, [edx + eax*4]
xor edx, edx
mov edi, esi
mov ebx, edx
mov esi, eax
mov eax, dword [edi]
add edi, 4
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add ebx, eax
cmp edi, esi
jne 0x486d41
mov esi, ebx
mov edi, dword [ebp - 0x70]
mov ebx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x68]
mov edx, dword [ebp - 0x6c]
sub eax, edi
lea eax, [eax + eax*2]
add eax, esi
cmp edx, edi
jle 0x486d9d
mov ecx, dword [ebp - 0x60]
mov dword [ebp - 0x5c], ebx
mov ebx, eax
mov dword [ebp - 0x68], edi
lea esi, [ecx + edi*4]
lea edx, [ecx + edx*4]
mov edi, esi
mov esi, edx
mov eax, dword [edi]
add edi, 4
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add ebx, eax
cmp edi, esi
jne 0x486d82
mov eax, ebx
mov edi, dword [ebp - 0x68]
mov ebx, dword [ebp - 0x5c]
mov esi, eax
add esi, 1
mov dword [esp], esi
call sub.msvcrt.dll_malloc
test eax, eax
mov esi, eax
je 0x486ceb
mov byte [eax], 0
mov eax, dword [ebp - 0x50]
xor ecx, ecx
test eax, eax
mov dword [ebp - 0x5c], eax
jle 0x486ded
mov dword [ebp - 0x68], ebx
mov ebx, dword [ebp - 0x64]
mov dword [ebp - 0x6c], edi
mov edi, ecx
nop
mov eax, dword [ebx + edi*4]
add edi, 1
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
cmp edi, dword [ebp - 0x5c]
jne 0x486dd0
mov ebx, dword [ebp - 0x68]
mov edi, dword [ebp - 0x6c]
mov edx, esi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x486def
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
cmovne ecx, edx
add al, al
mov eax, dword [ebp - 0x4c]
sbb ecx, 3
cmp edi, eax
jge 0x487027
sub eax, edi
lea eax, [eax + eax*2]
add eax, ecx
nop
mov edx, 0x2e2e
add ecx, 3
mov word [ecx - 3], dx
mov byte [ecx - 1], 0
cmp ecx, eax
mov byte [ecx - 1], 0x2f
jne 0x486e30
mov byte [eax], 0
mov eax, dword [ebp - 0x48]
cmp edi, eax
mov dword [ebp - 0x5c], eax
jge 0x486ceb
mov dword [ebp - 0x68], ebx
mov ebx, dword [ebp - 0x60]
nop
mov eax, dword [ebx + edi*4]
add edi, 1
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
cmp edi, dword [ebp - 0x5c]
jne 0x486e60
mov ebx, dword [ebp - 0x68]
jmp 0x486ceb
xor esi, esi
mov dword [ebp - 0x60], 0
jmp 0x486ceb
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.PATH
call sub.msvcrt.dll_getenv
test eax, eax
je 0x486bef
mov dword [esp], eax
mov dword [ebp - 0x68], eax
call sub.msvcrt.dll_strlen
lea ebx, [eax + 1]
mov eax, 2
cmp ebx, 1
cmovbe ebx, eax
mov eax, dword [ebp - 0x64]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea eax, [ebx + eax + 0x23]
and eax, 0xfffffff0
call fcn.00495be0
mov edx, dword [ebp - 0x68]
sub esp, eax
lea edi, [esp + 0x1b]
mov ebx, edx
and edi, 0xfffffff0
mov dword [ebp - 0x68], edi
movzx eax, byte [ebx]
test al, al
je 0x486f10
cmp al, 0x3b
je 0x486f10
add ebx, 1
movzx eax, byte [ebx]
test al, al
jne 0x486efc
lea esi, [esi]
cmp ebx, edx
je 0x487000
mov esi, ebx
sub esi, edx
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov dword [esp], edi
call sub.msvcrt.dll_memcpy
movzx eax, byte [ebx - 1]
cmp al, 0x5c
je 0x486ff4
cmp al, 0x2f
je 0x486ff4
mov byte [edi + esi], 0x2f
mov byte [edi + esi + 1], 0
mov eax, dword [ebp - 0x64]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__access]
test eax, eax
je 0x486fbc
mov edx, edi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x486f6f
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
add al, al
sbb edx, 3
mov dword [edx], 0x6578652e
mov byte [edx + 4], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__access]
test eax, eax
jne 0x486fde
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__stati64]
test eax, eax
js 0x486fde
movzx eax, word [ebp - 0x42]
and ax, 0xf000
cmp ax, 0x8000
je 0x48701f
cmp byte [ebx], 0
je 0x487010
add ebx, 1
mov edx, ebx
jmp 0x486ef5
xor esi, esi
jmp 0x486d5c
mov byte [edi + esi], 0
jmp 0x486f49
mov byte [edi], 0x2e
mov byte [edi + 1], 0x2f
mov byte [edi + 2], 0
jmp 0x486f49
mov esi, dword [ebp - 0x64]
jmp 0x486bef
xor esi, esi
jmp 0x486ceb
mov esi, dword [ebp - 0x68]
jmp 0x486bef
mov eax, ecx
jmp 0x486e48