Function at 0x4064ce
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x14
test eax, eax
jns 0x4064ea
mov ecx, dword [0x472200]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x47a258]
xor edx, edx
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
lea ebp, [ecx + eax*2]
mov ecx, 0x46a1c0
push edi
mov edi, ecx
cmp ebx, ecx
jb 0x40651c
mov eax, ebx
sub eax, ecx
sar eax, 1
cmp eax, 0x4000
jae 0x40651c
mov edi, ebx
mov ebx, edx
mov dword [esp + 0x24], ebx
cmp word [ebp], dx
je 0x406726
push esi
push 2
pop esi
mov eax, edi
mov ebx, ebp
sub eax, ecx
and eax, 0xfffffffe
cmp eax, 0x4000
jge 0x406721
movzx edx, word [ebp]
add ebp, esi
push 4
pop eax
cmp dx, ax
jae 0x406700
movsx esi, byte [ebx + 3]
movsx eax, byte [ebp]
and esi, 0x7f
movzx ecx, byte [ebp]
and eax, 0x7f
shl esi, 7
or esi, eax
mov dword [esp + 0x18], ecx
mov eax, ecx
or eax, 0x8000
mov dword [esp + 0x14], eax
movzx eax, byte [ebp + 1]
lea ebp, [ebx + 4]
push 2
mov dword [esp + 0x24], eax
or eax, 0x8000
pop ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], ebp
cmp dx, bx
jne 0x4066a6
cmp dword [0x47a2e4], 0
push 4
pop eax
cmovne ebx, eax
test cl, cl
jns 0x4065e8
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
push eax
mov eax, dword [0x47a258]
push edi
lea eax, [eax + ecx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.0040725a
mov esi, dword [esp + 0x20]
xor ebx, ebx
cmp word [edi], bx
jne 0x406693
push esi
push edi
call fcn.004064ce
jmp 0x40668e
cmp ecx, 0x25
jne 0x4065fe
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406688
cmp ecx, 0x24
jne 0x406611
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x406688
xor ebp, ebp
mov eax, dword [esp + ebx*4 + 0x10]
dec ebx
mov ecx, dword [0x472210]
and eax, 0xffffffbf
mov esi, eax
mov dword [esp + 0x2c], eax
and esi, 0x8000
test ecx, ecx
je 0x406641
push edi
push ebp
push ebp
push eax
push dword [0x472218]
call ecx
test eax, eax
je 0x406684
push 7
call fcn.004071c9
mov ecx, eax
mov eax, dword [esp + 0x2c]
push esi
movzx eax, al
push eax
push dword [0x472218]
call ecx
mov dword [esp + 0x2c], eax
test eax, eax
je 0x40667b
push edi
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [esp + 0x2c]
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x406684
xor eax, eax
mov word [edi], ax
test ebx, ebx
jne 0x406613
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
xor ebx, ebx
cmp word [edi], bx
je 0x4066d7
cmp esi, 0x1a
jne 0x4066d7
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x4066d7
cmp edx, 3
jne 0x4066df
cmp esi, 0x1d
jne 0x4066be
push dword [0x472218]
push edi
call fcn.00406dda
jmp 0x4066ed
mov eax, esi
shl eax, 0xe
add eax, section..ndata
push eax
push edi
call fcn.004073fd
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x4066ed
push edi
call fcn.00407620
jmp 0x4066ed
cmp edx, 1
jne 0x4066ed
not esi
push esi
push edi
call fcn.004064ce
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
add eax, eax
mov ecx, 0x46a1c0
pop esi
jmp 0x406713
jne 0x40670e
mov ax, word [ebp]
lea ebp, [ebx + 4]
mov word [edi], ax
jmp 0x406711
mov word [edi], dx
mov eax, esi
add edi, eax
xor eax, eax
cmp word [ebp], ax
jne 0x40652a
mov ebx, dword [esp + 0x28]
pop esi
xor eax, eax
mov word [edi], ax
test ebx, ebx
je 0x406738
push ecx
push ebx
call fcn.004073fd
jmp 0x40673a
mov eax, ecx
pop edi
pop ebp
pop ebx
add esp, 0x14
ret 8