Function at 0x405c9b
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
test eax, eax
jge 0x405cb9
mov ecx, dword [0x42e35c]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x42ebb8]
push ebx
push esi
push edi
lea edx, [eax + ecx]
mov ecx, dword [ebp + 8]
mov eax, 0x42db20
sub ecx, eax
mov edi, eax
cmp ecx, 0x800
jae 0x405ce0
mov edi, dword [ebp + 8]
and dword [ebp + 8], 0
mov cl, byte [edx]
test cl, cl
mov byte [ebp + 0xf], cl
je 0x405eda
jmp 0x405cf2
mov cl, byte [ebp + 0xf]
mov esi, edi
sub esi, eax
cmp esi, 0x400
jge 0x405eda
inc edx
cmp cl, 0xfc
jbe 0x405ec0
movsx eax, byte [edx + 1]
movsx ecx, byte [edx]
mov esi, eax
mov ebx, ecx
and esi, 0x7f
and ebx, 0x7f
shl esi, 7
or esi, ebx
mov ebx, ecx
or bh, 0x80
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1c], ebx
mov ebx, ecx
mov ecx, eax
mov dword [ebp - 0x18], ebx
or ch, 0x80
inc edx
inc edx
cmp byte [ebp + 0xf], 0xfe
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0xc], edx
jne 0x405e68
push 2
pop esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, 0x80000000
je 0x405d71
cmp ax, 0x5a04
je 0x405d71
cmp dword [ebp - 0x10], 0x23
je 0x405d71
cmp dword [ebp - 0x10], 0x2e
je 0x405d71
and dword [ebp + 0xc], 0
jmp 0x405d78
mov dword [ebp + 0xc], 1
cmp dword [0x42ec04], 0
je 0x405d84
push 4
pop esi
test bl, 0x80
je 0x405db9
mov eax, ebx
and ebx, 0x3f
add ebx, dword [0x42ebb8]
and eax, 0x40
push eax
push edi
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00405b4d
cmp byte [edi], 0
jne 0x405ddd
push dword [ebp - 0x10]
push edi
call fcn.00405c9b
jmp 0x405ddd
cmp ebx, 0x25
jne 0x405dcc
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x405ddd
cmp ebx, 0x24
jne 0x405ddf
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
xor esi, esi
mov eax, esi
dec esi
test eax, eax
je 0x405e4a
lea ebx, [ebp + esi*4 - 0x1c]
mov eax, dword [0x42eb84]
xor ecx, ecx
cmp eax, ecx
je 0x405e0b
cmp dword [ebp + 0xc], ecx
je 0x405e0b
push edi
push ecx
push ecx
push dword [ebx]
push dword [0x42eb88]
call eax
test eax, eax
je 0x405e4a
lea eax, [ebp - 4]
push eax
push dword [ebx]
push dword [0x42eb88]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x405e3d
push edi
push dword [ebp - 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [ebp - 4]
mov dword [ebp - 8], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp dword [ebp - 8], 0
jne 0x405e4a
and byte [edi], 0
mov eax, esi
dec esi
sub ebx, 4
test eax, eax
jne 0x405dea
cmp byte [edi], 0
je 0x405e60
cmp dword [ebp - 0x10], 0x1a
jne 0x405e60
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call fcn.00405c8a
push edi
call fcn.00405ef3
jmp 0x405eae
cmp byte [ebp + 0xf], 0xfd
jne 0x405e9c
cmp esi, 0x1d
jne 0x405e81
push dword [0x42eb88]
push edi
call fcn.00405bc4
jmp 0x405e92
mov eax, esi
shl eax, 0xa
add eax, section..ndata
push eax
push edi
call fcn.00405c67
add esi, 0xffffffeb
cmp esi, 7
jae 0x405eae
jmp 0x405e60
cmp byte [ebp + 0xf], 0xff
jne 0x405eae
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call fcn.00405c9b
push edi
call fcn.00405c7d
mov edx, dword [ebp - 0xc]
add edi, eax
mov eax, 0x42db20
jmp 0x405ecd
jne 0x405eca
mov cl, byte [edx]
mov byte [edi], cl
inc edi
inc edx
jmp 0x405ecd
mov byte [edi], cl
inc edi
mov cl, byte [edx]
test cl, cl
mov byte [ebp + 0xf], cl
jne 0x405cef
and byte [edi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
pop ebx
je 0x405eef
push eax
push dword [ebp + 8]
call fcn.00405c67
leave
ret 8