Function at 0x40be46
Capabilities:
Check if file exists
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x2b0
mov eax, dword [0x6f4e3c]
xor eax, ebp
mov dword [esp + 0x2a8], eax
lea esi, [esp + 0x94]
mov ecx, esi
call fcn.00485150
mov ecx, esi
push 1
push str.mhtmlfile_shellopencommand
push SysReAllocStringLen
call fcn.004852c0
xor ebx, ebx
test eax, eax
jne 0x40c31a
lea edi, [esp + 0x88]
mov dword [edi + 4], ebx
mov dword [edi], ebx
mov dword [edi + 8], ebx
lea ecx, [esp + 0x94]
push edi
push 0x6390a0
call fcn.00485a20
test eax, eax
je 0x40bf40
xor ebx, ebx
lea esi, [esp + 0x64]
mov ecx, esi
push ebx
call fcn.0046b060
movzx eax, byte [esp + 0x93]
test al, al
jns 0x40bedf
mov edi, dword [esp + 0x88]
mov eax, dword [esp + 0x8c]
mov ecx, esi
push eax
push edi
call fcn.0046b660
lea edi, [esp + 0xa0]
mov ecx, esi
push edi
call fcn.0046bd30
lea ecx, [esp + 0x58]
mov dword [esp + 4], ecx
push edi
call fcn.00468aa8
mov ecx, edi
call fcn.0046ee40
mov dword [edi + 4], ebx
mov dword [edi], ebx
mov dword [edi + 8], ebx
mov ecx, dword [ebp + 8]
movzx ebx, byte [ecx + 0xb]
test bl, bl
jns 0x40bf24
mov ebx, dword [ecx + 4]
mov ecx, dword [ecx]
lea eax, [ebx + 0xe]
cmp eax, 0x7ffffff0
jae 0x40c33e
cmp eax, 4
ja 0x40bf4e
mov byte [esp + 0xab], bl
jmp 0x40bf8f
lea esi, [esp + 0x88]
xor ebx, ebx
jmp 0x40c305
mov dword [esp + 8], ecx
lea esi, [ebx + 0x16]
and esi, 0xfffffff8
js 0x40c34a
lea eax, [esi + esi]
push eax
call fcn.00517b56
add esp, 4
mov edi, eax
mov dword [esp + 0xa0], eax
or esi, 0x80000000
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], ebx
test ebx, ebx
mov ecx, dword [esp + 8]
je 0x40bf9d
lea eax, [ebx + ebx]
push eax
push ecx
push edi
call fcn.006025b0
add esp, 0xc
mov word [edi + ebx*2], 0
lea ebx, [esp + 0xa0]
mov ecx, ebx
push 0xe
push 0x63ac20
call fcn.00468fc8
movzx edx, byte [esp + 0x63]
mov eax, edx
test dl, dl
jns 0x40bfc7
mov eax, dword [esp + 0x5c]
movzx ecx, byte [esp + 0xab]
test cl, cl
js 0x40bfdd
cmp eax, ecx
jne 0x40c043
test eax, eax
jne 0x40bff1
jmp 0x40c059
cmp eax, dword [esp + 0xa4]
jne 0x40c034
test eax, eax
je 0x40c04a
mov ebx, dword [esp + 0xa0]
test dl, dl
jns 0x40bffd
mov edx, dword [esp + 0x58]
mov dword [esp + 4], edx
xor edx, edx
mov esi, dword [esp + 4]
movzx esi, word [esi + edx*2]
movzx edi, word [ebx + edx*2]
cmp si, di
jne 0x40c015
inc edx
cmp eax, edx
jne 0x40bfff
test cl, cl
jns 0x40c028
push dword [esp + 0xa0]
call fcn.00517bd6
add esp, 4
mov bl, 1
cmp si, di
je 0x40c059
jmp 0x40c2e2
push dword [esp + 0xa0]
call fcn.00517bd6
add esp, 4
mov bl, 1
jmp 0x40c2e2
push dword [esp + 0xa0]
call fcn.00517bd6
add esp, 4
lea esi, [esp + 0x4c]
mov ecx, esi
call fcn.00485150
xor edi, edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x48], edi
mov ecx, esi
push 1
push 0x63ac3e
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004852c0
test eax, eax
je 0x40c105
lea eax, [esp + 0x40]
lea ecx, [esp + 0x4c]
push eax
push 0x6390a0
call fcn.00485a20
movzx eax, byte [esp + 0x4b]
mov ecx, eax
test al, al
jns 0x40c0ab
mov ecx, dword [esp + 0x44]
xor ebx, ebx
test ecx, ecx
je 0x40c2c9
call fcn.0049a0aa
mov esi, eax
lea eax, [esp + 0x40]
lea edi, [esp + 0x24]
push eax
push 0x63acd4
push edi
call fcn.0040c34f
add esp, 0xc
mov ecx, edi
push str.___nohome
call fcn.00469188
mov ecx, dword [eax + 8]
mov dword [esp + 0x38], ecx
movsd xmm0, qword [eax]
movsd qword [esp + 0x30], xmm0
mov dword [eax], ebx
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
cmp byte [esp + 0x3b], 0
jns 0x40c15a
mov eax, dword [esp + 0x30]
jmp 0x40c15e
lea esi, [esp + 0xa0]
push 0x208
push edi
push esi
call fcn.006030b0
add esp, 0xc
push edi
push 0x26
push esi
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40c09c
push str.internet_exploreriexplore.exe
push esi
call fcn.00620710
add esp, 8
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c09c
lea ecx, [esp + 0x40]
push esi
call fcn.0046930c
jmp 0x40c09c
lea eax, [esp + 0x30]
lea edi, [esp + 0xa0]
mov ecx, edi
push eax
call fcn.00401a6c
lea ecx, [esp + 0x18]
push 0x6390a0
call fcn.00401a6c
lea ebx, [esp + 0xc]
mov ecx, ebx
push str.mhtmlfile_shellopencommand
call fcn.00401a6c
mov eax, dword [esi]
mov ecx, esi
push 1
push edi
lea edx, [esp + 0x20]
push edx
push 0x200
push ebx
push SysReAllocStringLen
call dword [eax + 0x3c]
cmp byte [ebx + 0xb], 0
jns 0x40c1b7
push dword [esp + 0xc]
call fcn.00517bd6
add esp, 4
cmp byte [esp + 0x23], 0
jns 0x40c1ca
push dword [esp + 0x18]
call fcn.00517bd6
add esp, 4
cmp byte [esp + 0xab], 0
jns 0x40c1e3
push dword [esp + 0xa0]
call fcn.00517bd6
add esp, 4
cmp byte [esp + 0x3b], 0
jns 0x40c1f6
push dword [esp + 0x30]
call fcn.00517bd6
add esp, 4
cmp byte [esp + 0x2f], 0
jns 0x40c209
push dword [esp + 0x24]
call fcn.00517bd6
add esp, 4
lea ecx, [esp + 0xa0]
push 0x63acd8
call fcn.00401a6c
lea edi, [esp + 0x30]
mov ecx, edi
push 0x6390a0
call fcn.00401a6c
lea ebx, [esp + 0x24]
mov ecx, ebx
push str.mhtmlfileDefaultIcon
call fcn.00401a6c
mov eax, dword [esi]
mov ecx, esi
push 1
lea edx, [esp + 0xa4]
push edx
push edi
push 0
push ebx
push SysReAllocStringLen
call dword [eax + 0x3c]
cmp byte [esp + 0x2f], 0
jns 0x40c267
push dword [esp + 0x24]
call fcn.00517bd6
add esp, 4
cmp byte [esp + 0x3b], 0
jns 0x40c27a
push dword [esp + 0x30]
call fcn.00517bd6
add esp, 4
cmp byte [esp + 0xab], 0
jns 0x40c293
push dword [esp + 0xa0]
call fcn.00517bd6
add esp, 4
mov ecx, esi
call fcn.0049a0c0
mov ebx, eax
test al, al
je 0x40c2b6
sub esp, 0x10
movaps xmm0, xmmword [0x639de0]
movups xmmword [esp], xmm0
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
jmp 0x40c2bd
mov ecx, esi
call fcn.0049a0de
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov al, byte [esp + 0x4b]
test al, al
jns 0x40c2d9
push dword [esp + 0x40]
call fcn.00517bd6
add esp, 4
lea ecx, [esp + 0x4c]
call fcn.00485370
cmp byte [esp + 0x63], 0
jns 0x40c2f5
push dword [esp + 0x58]
call fcn.00517bd6
add esp, 4
lea esi, [esp + 0x88]
lea ecx, [esp + 0x64]
call fcn.0046b550
cmp byte [esi + 0xb], 0
jns 0x40c31a
push dword [esp + 0x88]
call fcn.00517bd6
add esp, 4
lea ecx, [esp + 0x94]
call fcn.00485370
mov ecx, dword [esp + 0x2a8]
xor ecx, ebp
call fcn.00517c1a
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [esp + 0xa0]
call fcn.00467d64
call fcn.0061842c