Function at 0x4063a4
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x14
test eax, eax
jns 0x4063c0
mov ecx, dword [0x429cdc]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x42ad38]
mov edx, 0x428ca0
push ebx
push ebp
mov ebp, dword [esp + 0x20]
lea ebx, [ecx + eax*2]
xor ecx, ecx
push edi
mov edi, edx
cmp ebp, edx
jb 0x4063f2
mov eax, ebp
sub eax, edx
sar eax, 1
cmp eax, 0x800
jae 0x4063f2
mov edi, ebp
mov ebp, ecx
mov dword [esp + 0x24], ebp
movzx ecx, word [ebx]
test cx, cx
je 0x4065f1
push esi
push 2
pop ebp
push 4
pop esi
mov eax, edi
sub eax, edx
and eax, 0xfffffffe
cmp eax, 0x800
jge 0x4065ec
movzx edx, cx
add ebx, ebp
cmp dx, si
jae 0x4065c8
movsx esi, byte [ebx + 1]
movsx eax, byte [ebx]
and esi, 0x7f
movzx ecx, byte [ebx]
and eax, 0x7f
movzx ebp, byte [ebx + 1]
shl esi, 7
or esi, eax
mov dword [esp + 0x18], ecx
mov eax, ecx
mov dword [esp + 0x20], ebp
or eax, 0x8000
mov dword [esp + 0x14], eax
mov eax, ebp
or eax, 0x8000
push 2
mov dword [esp + 0x20], eax
pop eax
add ebx, eax
mov dword [esp + 0x10], ebx
cmp dx, ax
jne 0x406570
cmp dword [0x42adc4], 0
mov ebx, eax
push 4
pop eax
cmovne ebx, eax
test cl, cl
jns 0x4064c3
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
push eax
push edi
lea eax, [ecx*2]
add eax, dword [0x42ad38]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406e80
xor ebp, ebp
cmp word [edi], bp
mov ebp, dword [esp + 0x20]
jne 0x40654c
push ebp
push edi
call fcn.004063a4
jmp 0x40654c
cmp ecx, 0x25
jne 0x4064d6
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x40654c
cmp ecx, 0x24
jne 0x4064e9
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor ebx, ebx
test ebx, ebx
je 0x40654c
xor ebp, ebp
mov eax, dword [0x429cf0]
dec ebx
test eax, eax
je 0x40650c
push edi
push ebp
push ebp
push dword [esp + ebx*4 + 0x20]
push dword [0x429cf8]
call eax
test eax, eax
je 0x406548
lea eax, [esp + 0x2c]
push eax
push dword [esp + ebx*4 + 0x18]
push dword [0x429cf8]
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
jne 0x40653f
push edi
push dword [esp + 0x30]
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 0x406548
xor eax, eax
mov word [edi], ax
test ebx, ebx
jne 0x4064ef
mov ebp, dword [esp + 0x20]
xor eax, eax
cmp word [edi], ax
je 0x406564
cmp ebp, 0x1a
jne 0x406564
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call fcn.00407235
mov ebx, dword [esp + 0x10]
jmp 0x4065b7
cmp edx, 3
jne 0x4065a9
cmp esi, 0x1d
jne 0x406588
push dword [0x429cf8]
push edi
call fcn.00406b20
jmp 0x406599
mov eax, esi
shl eax, 0xb
add eax, section..ndata
push eax
push edi
call fcn.0040702b
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x4065b7
push edi
call fcn.00407235
jmp 0x4065b7
cmp edx, 1
jne 0x4065b7
not esi
push esi
push edi
call fcn.004063a4
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
pop ebp
push 4
add eax, eax
pop esi
jmp 0x4065d9
jne 0x4065d4
mov ax, word [ebx]
add ebx, ebp
mov word [edi], ax
jmp 0x4065d7
mov word [edi], dx
mov eax, ebp
movzx ecx, word [ebx]
add edi, eax
mov edx, 0x428ca0
test cx, cx
jne 0x406405
mov ebp, dword [esp + 0x28]
pop esi
xor eax, eax
mov word [edi], ax
test ebp, ebp
je 0x406603
push edx
push ebp
call fcn.0040702b
jmp 0x406605
mov eax, edx
pop edi
pop ebp
pop ebx
add esp, 0x14
ret 8