Function at 0x405c0a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
jns 0x405c2b
mov ecx, dword [0x42f3a8]
lea eax, [edi*4 + 4]
sub ecx, eax
mov edi, dword [ecx]
add edi, dword [0x42fbf8]
cmp dword [ebp + 0x10], 0
mov esi, 0x42eb60
mov dword [ebp - 4], esi
je 0x405c62
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
push edi
push ebx
call fcn.004057ea
push ebx
call fcn.00406139
pop ecx
mov edi, ebx
mov eax, dword [ebp + 8]
mov ecx, eax
sub ecx, esi
cmp ecx, 0x800
jae 0x405c78
and dword [ebp + 8], 0
mov dword [ebp - 4], eax
mov al, byte [edi]
mov byte [ebp + 0xf], al
test al, al
je 0x405e8e
jmp 0x405c8a
mov al, byte [ebp + 0xf]
mov ecx, dword [ebp - 4]
sub ecx, esi
cmp ecx, 0x400
jge 0x405e8e
inc edi
cmp al, 0xfc
jbe 0x405e6f
movsx eax, byte [edi + 1]
movsx ecx, byte [edi]
mov esi, eax
and esi, 0x7f
mov edx, ecx
and edx, 0x7f
shl esi, 7
or esi, edx
mov ebx, ecx
mov edx, 0x8000
or ebx, edx
mov dword [ebp - 0x14], ebx
mov ebx, ecx
mov ecx, eax
or ecx, edx
add edi, 2
cmp byte [ebp + 0xf], 0xfe
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], eax
jne 0x405e08
push 2
pop esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x405d0b
mov ecx, 0x5a04
cmp ax, cx
je 0x405d0b
cmp dword [ebp - 8], 0x23
je 0x405d0b
cmp dword [ebp - 8], 0x2e
je 0x405d0b
and dword [ebp + 0xc], 0
jmp 0x405d12
mov dword [ebp + 0xc], 1
cmp dword [0x42fc84], 0
je 0x405d1e
push 4
pop esi
test bl, bl
jns 0x405d5c
mov esi, dword [ebp - 4]
mov eax, ebx
and eax, 0x40
push eax
push esi
and ebx, 0x3f
add ebx, dword [0x42fbf8]
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.004056d3
cmp byte [esi], 0
jne 0x405df3
push dword [ebp - 8]
push esi
call fcn.0040580c
jmp 0x405deb
cmp ebx, 0x25
jne 0x405d71
push 0x400
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x405deb
cmp ebx, 0x24
jne 0x405de7
push 0x400
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
xor esi, esi
jmp 0x405de7
mov eax, dword [0x42fbc0]
xor ecx, ecx
dec esi
cmp eax, ecx
je 0x405dae
cmp dword [ebp + 0xc], ecx
je 0x405dae
push dword [ebp - 4]
push ecx
push ecx
push dword [ebp + esi*4 - 0x14]
push dword [0x42fbc4]
call eax
test eax, eax
je 0x405deb
lea eax, [ebp + 0x10]
push eax
push dword [ebp + esi*4 - 0x14]
push dword [0x42fbc4]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x405de1
push dword [ebp - 4]
push dword [ebp + 0x10]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [ebp + 0x10]
mov ebx, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test ebx, ebx
jne 0x405deb
mov eax, dword [ebp - 4]
mov byte [eax], 0
test esi, esi
jne 0x405d88
mov esi, dword [ebp - 4]
cmp byte [esi], 0
je 0x405e05
cmp dword [ebp - 8], 0x1a
jne 0x405e05
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
jmp 0x405e41
cmp byte [ebp + 0xf], 0xfd
jne 0x405e48
cmp esi, 0x1d
jne 0x405e23
push dword [0x42fbc4]
push dword [ebp - 4]
call fcn.0040574a
jmp 0x405e36
mov eax, esi
shl eax, 0xa
add eax, section..ndata
push eax
push dword [ebp - 4]
call fcn.004057ea
add esi, 0xffffffeb
cmp esi, 7
jae 0x405e5c
push dword [ebp - 4]
call fcn.0040581e
jmp 0x405e5c
cmp byte [ebp + 0xf], 0xff
jne 0x405e5c
or eax, 0xffffffff
sub eax, esi
push eax
push dword [ebp - 4]
call fcn.0040580c
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [ebp - 4], eax
mov esi, 0x42eb60
jmp 0x405e81
mov ecx, dword [ebp - 4]
jne 0x405e7c
mov al, byte [edi]
inc dword [ebp - 4]
inc edi
jmp 0x405e7f
inc dword [ebp - 4]
mov byte [ecx], al
mov al, byte [edi]
mov byte [ebp + 0xf], al
test al, al
jne 0x405c87
cmp dword [ebp + 8], 0
mov eax, dword [ebp - 4]
mov byte [eax], 0
je 0x405ea5
push esi
push dword [ebp + 8]
call fcn.004057ea
jmp 0x405ea7
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0xc