Function at 0x406abe
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x18
test eax, eax
jns 0x406adc
mov ecx, dword [0x4762a8]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x47e318]
push ebx
lea ebx, [ecx + eax*2]
mov eax, 0x46da40
push edi
mov edi, eax
cmp dword [ebp + 8], eax
jb 0x406b09
mov ecx, dword [ebp + 8]
sub ecx, eax
sar ecx, 1
cmp ecx, 0x4008
jae 0x406b09
mov edi, dword [ebp + 8]
and dword [ebp + 8], 0
movzx ecx, word [ebx]
test cx, cx
je 0x406d1d
push esi
mov edx, edi
sub edx, eax
and edx, 0xfffffffe
cmp edx, 0x4008
jge 0x406d1c
movzx ecx, cx
push 2
pop edx
add ebx, edx
mov dword [ebp + 0xc], ecx
cmp ecx, 4
jae 0x406cfd
mov al, byte [ebx]
movsx esi, byte [ebx + 1]
movsx ecx, al
and esi, 0x7f
and ecx, 0x7f
movzx eax, al
shl esi, 7
or esi, ecx
mov ecx, 0x8000
mov edx, eax
or edx, ecx
mov dword [ebp - 0x18], edx
movzx edx, byte [ebx + 1]
mov dword [ebp - 0xc], edx
or edx, ecx
add ebx, 2
cmp word [ebp + 0xc], 2
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], edx
jne 0x406c9b
mov ecx, dword [0x47e2d0]
push 2
pop esi
test ecx, ecx
jns 0x406ba6
mov edx, 0x5a04
cmp cx, dx
je 0x406ba6
cmp dword [ebp - 0xc], 0x23
je 0x406ba6
cmp dword [ebp - 0xc], 0x2e
je 0x406ba6
and dword [ebp + 0xc], 0
jmp 0x406bad
mov dword [ebp + 0xc], 1
cmp dword [0x47e3a4], 0
je 0x406bb9
push 4
pop esi
test al, al
jns 0x406bf8
mov ecx, eax
and ecx, 0x40
push ecx
mov ecx, dword [0x47e318]
push edi
and eax, 0x3f
lea eax, [ecx + eax*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.0040634e
cmp word [edi], 0
jne 0x406c87
push dword [ebp - 0xc]
push edi
call fcn.00406abe
jmp 0x406c81
cmp eax, 0x25
jne 0x406c0b
push 0x2004
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406c81
cmp eax, 0x24
jne 0x406c7d
push 0x2004
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor esi, esi
jmp 0x406c7d
mov eax, dword [0x47e2d4]
xor ecx, ecx
dec esi
cmp eax, ecx
je 0x406c44
cmp dword [ebp + 0xc], ecx
je 0x406c44
push edi
push ecx
push ecx
push dword [ebp + esi*4 - 0x18]
push dword [0x47e2d8]
call eax
test eax, eax
je 0x406c81
lea eax, [ebp - 4]
push eax
push dword [ebp + esi*4 - 0x18]
push dword [0x47e2d8]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x406c78
push edi
push dword [ebp - 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [ebp - 4]
mov dword [ebp - 8], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp dword [ebp - 8], 0
jne 0x406c81
xor eax, eax
mov word [edi], ax
test esi, esi
jne 0x406c20
cmp word [edi], 0
je 0x406cd1
cmp dword [ebp - 0xc], 0x1a
jne 0x406cd1
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x406cd1
cmp word [ebp + 0xc], 3
jne 0x406cd9
cmp esi, 0x1d
jne 0x406cb5
push dword [0x47e2d8]
push edi
call fcn.004063c9
jmp 0x406cc9
mov eax, esi
imul eax, eax, 0x4008
add eax, section..ndata
push eax
push edi
call fcn.00406481
add esi, 0xffffffeb
cmp esi, 7
jae 0x406cec
push edi
call fcn.004064a3
jmp 0x406cec
cmp word [ebp + 0xc], 1
jne 0x406cec
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call fcn.00406abe
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [edi + eax*2]
mov eax, 0x46da40
jmp 0x406d10
jne 0x406d0b
mov cx, word [ebx]
mov word [edi], cx
add edi, edx
add ebx, edx
jmp 0x406d10
mov word [edi], cx
add edi, edx
movzx ecx, word [ebx]
test cx, cx
jne 0x406b16
pop esi
xor ecx, ecx
mov word [edi], cx
pop edi
pop ebx
cmp dword [ebp + 8], ecx
je 0x406d32
push eax
push dword [ebp + 8]
call fcn.00406481
leave
ret 8