Function at 0x406a8d
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
jge 0x406aac
mov ecx, dword [0x792320]
lea eax, [esi*4 + 4]
sub ecx, eax
mov esi, dword [ecx]
mov eax, dword [0x792b78]
mov ecx, dword [ebp + 8]
add esi, eax
mov eax, 0x791700
mov dword [ebp - 4], eax
cmp ecx, eax
jb 0x406ad5
mov edx, ecx
sub edx, eax
cmp edx, 0x800
jae 0x406ad5
and dword [ebp + 8], 0
mov dword [ebp - 4], ecx
mov cl, byte [esi]
mov byte [ebp + 0xf], cl
test cl, cl
je 0x406cfa
push ebx
push edi
jmp 0x406ae9
mov cl, byte [ebp + 0xf]
mov edx, dword [ebp - 4]
sub edx, eax
cmp edx, 0x400
jge 0x406cf8
inc esi
cmp cl, 4
jae 0x406cd9
movsx eax, byte [esi + 1]
movsx ecx, byte [esi]
mov edi, eax
and edi, 0x7f
mov edx, ecx
and edx, 0x7f
shl edi, 7
or edi, edx
mov ebx, ecx
mov edx, 0x8000
or ebx, edx
mov dword [ebp - 0x1c], ebx
mov ebx, ecx
mov ecx, eax
or ecx, edx
inc esi
inc esi
cmp byte [ebp + 0xf], 2
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], esi
jne 0x406c72
push 2
pop edi
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x406b6d
mov ecx, 0x5a04
cmp ax, cx
je 0x406b6d
cmp dword [ebp - 0x10], 0x23
je 0x406b6d
cmp dword [ebp - 0x10], 0x2e
je 0x406b6d
and dword [ebp + 0xc], 0
jmp 0x406b74
mov dword [ebp + 0xc], 1
cmp dword [0x793024], 0
je 0x406b80
push 4
pop edi
test bl, bl
jns 0x406bc1
mov edi, dword [ebp - 4]
mov eax, ebx
and ebx, 0x3f
add ebx, dword [0x792b78]
and eax, 0x40
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
mov esi, edi
call fcn.0040696a
cmp byte [edi], 0
jne 0x406c5a
push dword [ebp - 0x10]
push edi
call fcn.00406a8d
mov esi, dword [ebp - 0xc]
jmp 0x406c50
cmp ebx, 0x25
jne 0x406bd6
push 0x400
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x406c50
cmp ebx, 0x24
jne 0x406c4c
push 0x400
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
xor edi, edi
jmp 0x406c4c
mov eax, dword [0x792b40]
xor ecx, ecx
dec edi
cmp eax, ecx
je 0x406c13
cmp dword [ebp + 0xc], ecx
je 0x406c13
push dword [ebp - 4]
push ecx
push ecx
push dword [ebp + edi*4 - 0x1c]
push dword [0x792b44]
call eax
test eax, eax
je 0x406c50
lea eax, [ebp - 8]
push eax
push dword [ebp + edi*4 - 0x1c]
push dword [0x792b44]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x406c46
push dword [ebp - 4]
push dword [ebp - 8]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [ebp - 8]
mov ebx, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test ebx, ebx
jne 0x406c50
mov eax, dword [ebp - 4]
mov byte [eax], 0
test edi, edi
jne 0x406bed
mov edi, dword [ebp - 4]
cmp byte [edi], 0
je 0x406c6f
jmp 0x406c5d
mov esi, dword [ebp - 0xc]
cmp dword [ebp - 0x10], 0x1a
jne 0x406c6f
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push edi
jmp 0x406cab
cmp byte [ebp + 0xf], 3
jne 0x406cb2
cmp edi, 0x1d
jne 0x406c8d
push dword [0x792b44]
push dword [ebp - 4]
call fcn.004069da
jmp 0x406ca0
mov eax, edi
shl eax, 0xa
add eax, section..ndata
push eax
push dword [ebp - 4]
call fcn.00406a77
add edi, 0xffffffeb
cmp edi, 7
jae 0x406cc6
push dword [ebp - 4]
call fcn.00406d14
jmp 0x406cc6
cmp byte [ebp + 0xf], 1
jne 0x406cc6
or eax, 0xffffffff
sub eax, edi
push eax
push dword [ebp - 4]
call fcn.00406a8d
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [ebp - 4], eax
mov eax, 0x791700
jmp 0x406ceb
mov edx, dword [ebp - 4]
jne 0x406ce6
mov cl, byte [esi]
inc dword [ebp - 4]
inc esi
jmp 0x406ce9
inc dword [ebp - 4]
mov byte [edx], cl
mov cl, byte [esi]
mov byte [ebp + 0xf], cl
test cl, cl
jne 0x406ae6
pop edi
pop ebx
cmp dword [ebp + 8], 0
mov ecx, dword [ebp - 4]
mov byte [ecx], 0
pop esi
je 0x406d10
push eax
push dword [ebp + 8]
call fcn.00406a77
leave
ret 8