Function at 0x495890
Capabilities:
Get common file path
Query environment variable

Disassembly:
mov eax, 0x50d8
call fcn.004e6b50
mov eax, dword [0x519bc0]
xor eax, esp
mov dword [esp + 0x50d4], eax
cmp byte [0x53d329], 0
push ebp
mov ebp, ecx
push edi
mov edi, dword [esp + 0x50e4]
mov dword [esp + 0xc], ebp
jne 0x4958f0
cmp word [edi], 0x2e
jne 0x4958f0
movzx eax, word [edi + 2]
push eax
call fcn.00452bc0
test al, al
je 0x4958df
add edi, 4
cmp word [edi], 0x2e
je 0x4958c6
jmp 0x4958f0
cmp word [edi], 0x2e
jne 0x4958f0
cmp word [edi + 2], 0
je 0x495d8c
push 0x800
lea ecx, [esp + 0x3018]
push ecx
push edi
call fcn.00453e00
mov ecx, 0x5024a8
mov eax, edi
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x495936
test dx, dx
je 0x495932
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x495936
add eax, 4
add ecx, 4
test dx, dx
jne 0x495910
xor eax, eax
jmp 0x49593b
sbb eax, eax
sbb eax, 0xffffffff
push ebx
test eax, eax
push esi
sete bl
push edi
mov byte [esp + 0x17], bl
call fcn.00452b60
mov esi, eax
movzx edx, word [esi]
push edx
call fcn.00452bc0
test al, al
je 0x49599c
test bl, bl
jne 0x49599c
lea ecx, [esp + 0x301c]
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x49598e
test dx, dx
je 0x49598a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x49598e
add eax, 4
add ecx, 4
test dx, dx
jne 0x495968
xor eax, eax
jmp 0x495993
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x49599c
xor eax, eax
mov word [esi], ax
xor ebx, ebx
mov esi, edi
cmp word [edi], bx
je 0x4959de
cmp word [esi], 0x2e
jne 0x4959de
cmp word [esi + 2], 0x2e
jne 0x4959de
movzx ecx, word [esi + 4]
push ecx
call fcn.00452bc0
test al, al
jne 0x4959c7
cmp word [esi + 4], 0
jne 0x4959de
xor edx, edx
cmp word [esi + 4], dx
setne dl
inc ebx
add edx, 2
cmp word [esi + edx*2], 0
lea esi, [esi + edx*2]
jne 0x4959a5
cmp byte [0x53d329], 0
je 0x495a02
cmp byte [esp + 0x50f0], 0
je 0x495a02
push edi
call fcn.004530a0
test al, al
je 0x495a02
mov ecx, ebp
call fcn.004928d0
cmp byte [ebp + 0x1042], 0
je 0x495a39
mov ecx, dword [ebp + 0x2144]
cmp ebx, ecx
mov eax, ebx
jl 0x495a19
mov eax, ecx
cmp byte [esp + 0x13], 0
je 0x495a22
mov eax, ecx
test eax, eax
je 0x495a39
push 0
mov esi, ebp
push eax
mov ecx, esi
call fcn.00490ec0
push 0
jmp 0x495d83
mov byte [ebp + 0x1042], 0
cmp byte [0x53d329], 0
je 0x495b35
push 0
push str.FlatView
push str.FileList
call fcn.0049c560
test eax, eax
je 0x495a6a
test ebx, ebx
je 0x495d8a
push 0x800
lea eax, [esp + 0x1020]
push eax
mov ecx, 0x54be08
call fcn.0047b170
mov ecx, 0x5024a8
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x495aae
test dx, dx
je 0x495aaa
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x495aae
add eax, 4
add ecx, 4
test dx, dx
jne 0x495a88
xor eax, eax
jmp 0x495ab3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x495ae4
push edi
mov ecx, 0x54be08
call fcn.0047b050
test al, al
je 0x495ae4
xor ecx, ecx
test ebx, ebx
setle cl
lea edx, [esp + 0x101c]
dec ecx
and ecx, edx
push ecx
mov ecx, ebp
call fcn.00494090
jmp 0x495d8a
push 0x800
lea eax, [esp + 0x20]
push eax
mov ecx, 0x54be08
call fcn.0047b190
push 0x800
lea ecx, [esp + 0x20]
push ecx
lea esi, [ebp + 0x1044]
push esi
call fcn.004694b0
push esi
call fcn.00453770
mov ecx, ebp
call fcn.004928d0
test al, al
je 0x495d8a
lea edx, [esp + 0x1c]
push edx
call fcn.004534c0
push eax
mov ecx, ebp
jmp 0x495d85
push 0x800
add ebp, 0x1044
push ebp
lea eax, [esp + 0x1024]
push eax
call fcn.004694b0
xor ecx, ecx
mov word [esp + 0x1c], cx
test ebx, ebx
jle 0x495c33
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderLocation]
mov edx, dword [esp + 0x14]
cmp byte [edx + 0x1042], 0
jne 0x495c33
push ebp
call fcn.00452bf0
test al, al
je 0x495bef
mov eax, dword [esp + 0x14]
movzx ecx, word [eax + 0x1048]
push ecx
call fcn.00452bc0
test al, al
je 0x495bef
mov eax, dword [esp + 0x14]
cmp word [eax + 0x104a], 0
jne 0x495bef
cmp dword [eax + 0x2144], 0
jle 0x495bb3
mov byte [eax + 0x1042], 1
jmp 0x495c0b
mov eax, dword [eax + 0x28]
lea edx, [esp + 0x18]
push edx
push 0
push 0
push 0x11
push eax
mov dword [esp + 0x2c], 0
call esi
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, 0x549cb8
call fcn.00491b80
mov eax, dword [0x572b3c]
mov ecx, dword [esp + 0x18]
mov edx, dword [eax]
mov edx, dword [edx + 0x14]
push ecx
push eax
call edx
jmp 0x495c0b
push 0x800
push ebp
call fcn.004534c0
push eax
lea eax, [esp + 0x24]
push eax
call fcn.004694b0
push ebp
call fcn.00453770
dec ebx
cmp word [edi], 0x2e
jne 0x495c1b
add edi, 2
cmp word [edi], 0x2e
je 0x495c12
movzx ecx, word [edi]
push ecx
call fcn.00452bc0
test al, al
je 0x495c2b
add edi, 2
test ebx, ebx
jg 0x495b63
cmp byte [esp + 0x13], 0
je 0x495c62
push 0x800
lea edx, [esp + 0x2020]
push edx
push ebp
call fcn.00453e00
push 0x800
lea eax, [esp + 0x2020]
push eax
push ebp
call fcn.004694b0
jmp 0x495c97
push edi
call fcn.004530a0
test al, al
je 0x495c7a
push 0x800
push edi
push ebp
call fcn.004694b0
jmp 0x495c97
cmp word [edi], 0
je 0x495c97
push 0x800
push ebp
call fcn.00452c60
push 0x800
push edi
push ebp
call fcn.00469530
push ebp
call fcn.00452c20
mov esi, eax
cmp esi, 0xffffffff
je 0x495cce
call fcn.004b3c10
mov edx, 1
mov ecx, esi
shl edx, cl
test edx, eax
jne 0x495cce
push 0x800
lea eax, [esp + 0x1020]
push eax
push ebp
call fcn.004694b0
jmp 0x495d8a
mov esi, dword [esp + 0x14]
cmp byte [esi + 0x1042], 0
jne 0x495d73
push ebp
call fcn.00445470
test al, al
jne 0x495d73
push 0x800
lea ecx, [esp + 0x2020]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x495d25
lea edx, [esp + 0x201c]
push edx
call fcn.00445470
test al, al
je 0x495d25
push 0x800
lea eax, [esp + 0x2020]
push eax
jmp 0x495d6d
push ebp
push 0x6c
call fcn.00463400
push eax
lea ecx, [esp + 0x4024]
push ecx
mov edx, 0x864
call fcn.004a63e0
add esp, 0xc
push 0x10
push 0x66
call fcn.00463400
push eax
mov eax, dword [0x53f484]
lea edx, [esp + 0x4024]
push edx
push eax
call fcn.004b53a0
push 0x800
lea ecx, [esp + 0x1020]
push ecx
push ebp
call fcn.004694b0
movzx edx, word [esp + 0x1c]
neg edx
sbb edx, edx
lea eax, [esp + 0x1c]
and edx, eax
push edx
mov ecx, esi
call fcn.00494c40
pop esi
pop ebx
mov ecx, dword [esp + 0x50dc]
pop edi
pop ebp
xor ecx, esp
call fcn.004e6b3a
add esp, 0x50d8
ret 8