Function at 0x4015eb
Capabilities:
Check if file exists
Check mutex and terminate process on windows
Check mutex on windows
Create directory
Create thread
Get common file path
Get file attributes
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x32c
push ebx
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push str.Internet_Download_Manager
lea eax, [ebp - 0x124]
push str._s_Setup
push eax
call edi
mov esi, dword [ebp + 0x10]
push str._delsetup
push esi
call sub.MSVCRT.dll_strstr
add esp, 0x14
test eax, eax
jne 0x401647
push 0x4052d4
push esi
call sub.MSVCRT.dll_strstr
pop ecx
test eax, eax
pop ecx
jne 0x401647
push 0x4052c8
push esi
call sub.MSVCRT.dll_strstr
pop ecx
test eax, eax
pop ecx
je 0x401651
mov dword [0x406eb0], 1
push str._skipdlgs
push esi
call sub.MSVCRT.dll_strstr
pop ecx
test eax, eax
pop ecx
jne 0x401684
push 0x4052b0
push esi
call sub.MSVCRT.dll_strstr
pop ecx
test eax, eax
pop ecx
jne 0x401684
push 0x4052a4
push esi
call sub.MSVCRT.dll_strstr
pop ecx
test eax, eax
pop ecx
je 0x40168e
mov dword [0x406eb4], 1
xor ebx, ebx
push str.IDM_Setup_Mutex_st23nZ7a
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40170b
mov esi, dword [sym.imp.USER32.dll_FindWindowA]
lea eax, [ebp - 0x124]
push eax
push ebx
call esi
cmp eax, ebx
mov dword [ebp + 0x10], eax
je 0x4016cf
push 9
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [ebp + 0x10]
jmp 0x4016f9
lea eax, [ebp - 0x124]
push str.Welcome
push eax
call edi
pop ecx
lea eax, [ebp - 0x124]
pop ecx
push eax
push ebx
call esi
mov esi, eax
cmp esi, ebx
je 0x4016ff
push 9
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, dword [ebp + 8]
mov esi, 0x406a98
push esi
push 0x104
mov dword [0x406a94], eax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x40174e
push esi
push ebx
push 0x9c4000
call fcn.004013e0
add esp, 0xc
test eax, eax
jne 0x40179d
push 0x30
push str.IDM_Setup
push str.The_IDM_Installation_program_requires_about_10_MBytes_of_disk_space_to_extract_setup_files_to_a_temporary_folder._There_is_not_enough_free_space_on_the_disk_to_store_temporary_files._Please_free_some_disk_space__or_select_a_location_on_another_disk_to_store_temporary_files_of_IDM_installation_program.
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push 7
xor eax, eax
pop ecx
lea edi, [ebp - 0x1c]
mov dword [ebp - 0x20], ebx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x14], str.Select_Temp_Directory
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x10], 0x10
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
cmp eax, ebx
je 0x40178a
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
jmp 0x401728
push 0x405110
push 1
push ebx
push ebx
push str.Could_not_find_temp_path_in_unpacker
jmp 0x401880
push 0x7e
push esi
call sub.MSVCRT.dll_wcschr
pop ecx
test eax, eax
pop ecx
je 0x4017b2
push esi
call fcn.00401478
pop ecx
push esi
call sub.MSVCRT.dll_wcslen
cmp word [eax*2 + 0x406a96], 0x5c
pop ecx
je 0x4017d1
push 0x4050e4
push esi
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
push str.IDM_Setup_Temp
push esi
call sub.MSVCRT.dll_wcscat
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
pop ecx
pop ecx
push esi
call edi
cmp eax, 0xffffffff
jne 0x40188a
push 0x5c
push 0x406a9e
call sub.MSVCRT.dll_wcschr
pop ecx
mov dword [ebp + 0x10], eax
pop ecx
lea eax, [ebp - 0x32c]
push 0x208
push ebx
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 0x10]
add esp, 0xc
cmp eax, ebx
je 0x401823
sub eax, esi
sar eax, 1
jmp 0x40182a
push esi
call sub.MSVCRT.dll_wcslen
pop ecx
push eax
lea eax, [ebp - 0x32c]
push esi
push eax
call sub.MSVCRT.dll_wcsncpy
add esp, 0xc
lea eax, [ebp - 0x32c]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40185b
lea eax, [ebp - 0x32c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40186a
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40186a
add eax, 2
push 0x5c
push eax
jmp 0x4017f7
push esi
call edi
cmp eax, 0xffffffff
jne 0x40188a
push 0x405110
push 1
push ebx
push ebx
push str.Could_not_create_temp_dir_in_unpacker
call fcn.00401c62
add esp, 0x14
jmp 0x401900
push 0x4050e4
push esi
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
push str.setup_error.log
push esi
push str._s_s
push 0x406ca4
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push ebx
push 0x401ded
push ebx
push 0x65
push dword [0x406a94]
call dword [sym.imp.USER32.dll_CreateDialogParamA]
cmp eax, ebx
mov dword [0x406a8c], eax
jne 0x401909
lea eax, [ebp + 0x10]
push eax
push ebx
push esi
push 0x401e5c
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov dword [0x406ca0], eax
jne 0x4018fb
push ebx
push ebx
push ebx
push esi
call fcn.00401e8c
add esp, 0x10
mov dword [0x406a90], eax
call fcn.00401968
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x10
lea ecx, [ebp - 0x124]
push ecx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 5
push dword [0x406a8c]
call dword [sym.imp.USER32.dll_ShowWindow]
push ebx
push ebx
push 0x7e8
push dword [0x406a8c]
call dword [sym.imp.USER32.dll_SendMessageA]
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push ebx
push ebx
lea eax, [ebp - 0x1c]
push ebx
push eax
call esi
test eax, eax
je 0x4018fb
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push ebx
push ebx
lea eax, [ebp - 0x1c]
push ebx
push eax
jmp 0x401945