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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe70
push esi
push edi
xor esi, esi
push 0x208
lea eax, [ebp - 0x66e]
push esi
push eax
mov word [ebp - 0x670], si
call sub.msvcrt.dll_memset
xor eax, eax
mov dword [ebp - 0x18], esi
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
mov dword [ebp - 0x10], esi
lea edi, [ebp - 0xc]
add esp, 0xc
stosd dword es:[edi], eax
lea eax, [ebp - 4]
push eax
push str.SOFTWAREMozilla
push 0x80000002
mov word [ebx], si
call fcn.0041334d
add esp, 0xc
test eax, eax
jne 0x40668b
push 0x1fe
lea eax, [ebp - 0x45e]
push esi
push eax
mov word [ebp - 0x460], si
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x460]
push eax
mov dword [ebp - 8], esi
push esi
jmp 0x40666f
push 7
lea eax, [ebp - 0x460]
push str.mozilla
push eax
call sub.msvcrt.dll__wcsnicmp
add esp, 0xc
test eax, eax
jne 0x406662
push 0x208
lea eax, [ebp - 0x25e]
push esi
push eax
mov word [ebp - 0x260], si
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x7fe
lea eax, [ebp - 0xe6e]
push esi
push eax
mov word [ebp - 0xe70], si
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x460]
push eax
push str._s_bin
lea eax, [ebp - 0xe70]
push 0x3ff
push eax
call sub.msvcrt.dll__snwprintf
push str.PathToExe
lea eax, [ebp - 0xe70]
push eax
push dword [ebp - 4]
lea esi, [ebp - 0x260]
call fcn.004133a2
add esp, 0x1c
mov eax, esi
push 0x5c
push eax
call sub.msvcrt.dll_wcsrchr
test eax, eax
pop ecx
pop ecx
je 0x406607
and word [eax], 0
cmp word [ebp - 0x260], 0
je 0x406660
lea eax, [ebp - 0x260]
push eax
lea edi, [ebp - 0x10]
call fcn.00406412
test eax, eax
je 0x406660
lea eax, [ebp - 0x18]
push eax
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jg 0x40663f
cmp word [ebp - 0x670], 0
jne 0x406660
lea eax, [ebp - 0x260]
push eax
lea eax, [ebp - 0x670]
push eax
call sub.msvcrt.dll_wcscpy
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
xor esi, esi
inc dword [ebp - 8]
lea eax, [ebp - 0x460]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.004133e4
add esp, 0xc
test eax, eax
je 0x406563
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x670]
push eax
push ebx
call sub.msvcrt.dll_wcscpy
cmp word [ebx], si
pop ecx
pop ecx
jne 0x40674d
push 0x104
push ebx
push str._programfiles_Mozilla_Firefox
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push ebx
xor edi, edi
call fcn.00406412
test eax, eax
jne 0x4066c3
mov word [ebx], si
cmp word [ebx], si
jne 0x40674d
mov esi, ebx
call fcn.00407b4f
push ebx
xor edi, edi
call fcn.00406412
test eax, eax
jne 0x4066e2
and word [ebx], ax
cmp word [ebx], 0
jne 0x40674b
push ebx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push ebx
xor edi, edi
call fcn.00406412
test eax, eax
jne 0x406703
and word [ebx], ax
cmp word [ebx], 0
jne 0x40674b
lea eax, [ebp - 0x50]
call fcn.004128d0
push eax
call fcn.00412922
lea eax, [ebp - 0x50]
push eax
call fcn.00412b7b
test eax, eax
je 0x406743
add eax, 4
push eax
call fcn.00407be3
cmp word [ebx], 0
pop ecx
je 0x406743
push ebx
xor edi, edi
call fcn.00406412
test eax, eax
jne 0x406743
and word [ebx], ax
lea edi, [ebp - 0x50]
call fcn.004128ff
xor esi, esi
xor eax, eax
cmp word [ebx], si
pop edi
setne al
pop esi
leave
ret