Function at 0x4066b6
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x1c
test eax, eax
jns 0x4066d2
mov ecx, dword [0x450ce0]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
push ebx
mov ebx, dword [esp + 0x24]
mov edx, 0x44cca0
push ebp
mov ebp, dword [0x454d38]
push edi
mov edi, edx
lea ecx, [eax + ebp]
cmp ebx, edx
jb 0x406700
mov eax, ebx
sub eax, edx
cmp eax, 0x4000
jae 0x406700
mov edi, ebx
xor ebx, ebx
mov dword [esp + 0x2c], ebx
cmp byte [ecx], 0
je 0x406923
push esi
mov eax, edi
mov ebx, ecx
sub eax, edx
mov dword [esp + 0x18], ebx
cmp eax, 0x2000
jge 0x40691e
mov dl, byte [ecx]
cmp dl, 4
jae 0x4068f3
movsx ebx, byte [ebx + 2]
movsx ecx, byte [ecx + 1]
mov esi, ebx
and esi, 0x7f
mov dword [esp + 0x34], ebx
mov eax, ecx
shl esi, 7
and eax, 0x7f
mov dword [esp + 0x20], ecx
or esi, eax
mov dword [esp + 0x28], ebx
mov eax, ecx
or eax, 0x8000
mov dword [esp + 0x1c], eax
mov eax, ebx
or eax, 0x8000
mov dword [esp + 0x24], eax
cmp dl, 2
jne 0x40689a
cmp byte [0x454dfc], 0
jne 0x406791
mov eax, 0x45a
cmp word [0x454dfe], ax
jae 0x406791
cmp ebx, 0x23
je 0x406791
cmp ebx, 0x2e
je 0x406791
xor edx, edx
jmp 0x406794
xor edx, edx
inc edx
cmp dword [0x454dc4], 0
push 2
pop ebx
push 4
pop eax
cmovne ebx, eax
mov dword [esp + 0x10], edx
test cl, cl
jns 0x4067e1
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
add ecx, ebp
push eax
push edi
push ecx
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.0040739f
cmp byte [edi], 0
mov esi, dword [esp + 0x34]
jne 0x406887
push esi
push edi
call fcn.004066b6
jmp 0x406882
cmp ecx, 0x25
jne 0x4067f7
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x40687e
cmp ecx, 0x24
jne 0x40680a
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x40687e
mov eax, dword [esp + ebx*4 + 0x18]
dec ebx
mov ecx, dword [0x450cf0]
and eax, 0xffffffbf
mov esi, eax
mov dword [esp + 0x14], eax
and esi, 0x8000
test ecx, ecx
je 0x40683e
test edx, edx
je 0x40683e
push edi
push 0
push 0
push eax
push dword [0x450cf8]
call ecx
test eax, eax
je 0x40687e
push 7
call fcn.0040730e
mov ecx, eax
mov eax, dword [esp + 0x14]
push esi
movzx eax, al
push eax
push dword [0x450cf8]
call ecx
mov ebp, eax
test ebp, ebp
je 0x406873
push edi
push ebp
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push ebp
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x40687e
mov edx, dword [esp + 0x10]
mov byte [edi], 0
test ebx, ebx
jne 0x40680a
mov esi, dword [esp + 0x34]
cmp byte [edi], 0
je 0x4068cb
cmp esi, 0x1a
jne 0x4068cb
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x4068cb
cmp dl, 3
jne 0x4068d3
cmp esi, 0x1d
jne 0x4068b2
push dword [0x450cf8]
push edi
call fcn.00406f12
jmp 0x4068e1
mov eax, esi
shl eax, 0xd
add eax, section..ndata
push eax
push edi
call fcn.00407533
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x4068e1
push edi
call fcn.00407755
jmp 0x4068e1
cmp dl, 1
jne 0x4068e1
not esi
push esi
push edi
call fcn.004066b6
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, dword [esp + 0x18]
add edi, eax
push 3
pop eax
jmp 0x406906
jne 0x406900
mov al, byte [ecx + 1]
mov byte [edi], al
inc edi
push 2
pop eax
jmp 0x406906
mov byte [edi], dl
xor eax, eax
inc edi
inc eax
lea ecx, [ebx + eax]
mov edx, 0x44cca0
cmp byte [ecx], 0
je 0x40691e
mov ebp, dword [0x454d38]
jmp 0x40670a
mov ebx, dword [esp + 0x30]
pop esi
mov byte [edi], 0
test ebx, ebx
je 0x406933
push edx
push ebx
call fcn.00407533
jmp 0x406935
mov eax, edx
pop edi
pop ebp
pop ebx
add esp, 0x1c
ret 8