Function at 0x4068b9
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x18
test eax, eax
jns 0x4068d5
mov ecx, dword [0x46b540]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x473598]
xor edx, edx
push ebx
mov ebx, dword [esp + 0x20]
push ebp
lea ebp, [ecx + eax*2]
mov ecx, 0x463500
push edi
mov edi, ecx
cmp ebx, ecx
jb 0x406907
mov eax, ebx
sub eax, ecx
sar eax, 1
cmp eax, 0x4000
jae 0x406907
mov edi, ebx
mov ebx, edx
mov dword [esp + 0x28], ebx
cmp word [ebp], dx
je 0x406b01
push esi
push 2
pop esi
mov eax, edi
mov ebx, ebp
sub eax, ecx
and eax, 0xfffffffe
cmp eax, 0x4000
jge 0x406afc
movzx edx, word [ebp]
add ebp, esi
push 4
pop eax
cmp dx, ax
jae 0x406adb
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 + 0x1c], ecx
mov eax, ecx
or eax, 0x8000
mov dword [esp + 0x18], eax
movzx eax, byte [ebp + 1]
lea ebp, [ebx + 4]
mov dword [esp + 0x24], eax
or eax, 0x8000
push 2
mov dword [esp + 0x24], eax
pop eax
mov dword [esp + 0x14], ebp
cmp dx, ax
jne 0x406a81
cmp dword [0x473624], 0
push 4
pop edx
cmovne eax, edx
test cl, cl
jns 0x4069d4
mov ebx, dword [0x473598]
mov eax, ecx
and eax, 0x40
and ecx, 0x3f
push eax
push edi
lea eax, [ebx + ecx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00407635
mov esi, dword [esp + 0x24]
xor ebx, ebx
cmp word [edi], bx
jne 0x406a6e
push esi
push edi
call fcn.004068b9
jmp 0x406a69
cmp ecx, 0x25
jne 0x4069e7
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406a63
cmp ecx, 0x24
jne 0x4069fa
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x406a63
xor ebp, ebp
dec eax
mov dword [esp + 0x10], eax
mov esi, eax
mov eax, dword [0x46b550]
test eax, eax
je 0x406a1f
push edi
push ebp
push ebp
push dword [esp + esi*4 + 0x24]
push dword [0x46b558]
call eax
test eax, eax
je 0x406a5f
lea eax, [esp + 0x30]
push eax
push dword [esp + esi*4 + 0x1c]
push dword [0x46b558]
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
jne 0x406a52
push edi
push dword [esp + 0x34]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [esp + 0x30]
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x406a5f
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4069fc
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x24]
xor ebx, ebx
cmp word [edi], bx
je 0x406ab2
cmp esi, 0x1a
jne 0x406ab2
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x406ab2
cmp edx, 3
jne 0x406aba
cmp esi, 0x1d
jne 0x406a99
push dword [0x46b558]
push edi
call fcn.004071b5
jmp 0x406ac8
mov eax, esi
shl eax, 0xe
add eax, section..ndata
push eax
push edi
call fcn.004077d8
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x406ac8
push edi
call fcn.00407a3f
jmp 0x406ac8
cmp edx, 1
jne 0x406ac8
not esi
push esi
push edi
call fcn.004068b9
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
add eax, eax
mov ecx, 0x463500
pop esi
jmp 0x406aee
jne 0x406ae9
mov ax, word [ebp]
lea ebp, [ebx + 4]
mov word [edi], ax
jmp 0x406aec
mov word [edi], dx
mov eax, esi
add edi, eax
xor eax, eax
cmp word [ebp], ax
jne 0x406915
mov ebx, dword [esp + 0x2c]
pop esi
xor eax, eax
mov word [edi], ax
test ebx, ebx
je 0x406b13
push ecx
push ebx
call fcn.004077d8
jmp 0x406b15
mov eax, ecx
pop edi
pop ebp
pop ebx
add esp, 0x18
ret 8