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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c0
push ebx
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push str.Internet_Download_Manager
lea eax, [ebp - 0x1b8]
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 0x405344
push esi
call sub.MSVCRT.dll_strstr
pop ecx
test eax, eax
pop ecx
jne 0x401647
push 0x405338
push esi
call sub.MSVCRT.dll_strstr
pop ecx
test eax, eax
pop ecx
je 0x401651
mov dword [0x406f20], 1
push str._skipdlgs
push esi
call sub.MSVCRT.dll_strstr
pop ecx
test eax, eax
pop ecx
jne 0x401684
push 0x405320
push esi
call sub.MSVCRT.dll_strstr
pop ecx
test eax, eax
pop ecx
jne 0x401684
push 0x405314
push esi
call sub.MSVCRT.dll_strstr
pop ecx
test eax, eax
pop ecx
je 0x40168e
mov dword [0x406f24], 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 - 0x1b8]
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 - 0x1b8]
push str.Welcome
push eax
call edi
pop ecx
lea eax, [ebp - 0x1b8]
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 dword [ebp - 0xb4], 0x94
mov dword [0x406b04], eax
lea eax, [ebp - 0xb4]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x401769
cmp dword [ebp - 0xa4], 2
jne 0x401751
cmp dword [ebp - 0xb0], 6
jne 0x40174f
cmp dword [ebp - 0xac], ebx
je 0x401751
cmp dword [ebp - 0xb0], 6
jae 0x401769
push 0x30
push str.IDM_Setup
push str.IDM_no_longer_supports_older_versions_of_Windows_such_as_Windows_XP_or_Vista._r_nIDM_requires_Windows_7_or_later.
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x401956
mov esi, 0x406b08
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x4017a4
push esi
push ebx
push 0x9c4000
call fcn.004013e0
add esp, 0xc
test eax, eax
jne 0x4017f3
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 - 0x3c0]
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 0x4017e0
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
jmp 0x40177e
push 0x405110
push 1
push ebx
push ebx
push str.Could_not_find_temp_path_in_unpacker
jmp 0x4018d6
push 0x7e
push esi
call sub.MSVCRT.dll_wcschr
pop ecx
test eax, eax
pop ecx
je 0x401808
push esi
call fcn.00401478
pop ecx
push esi
call sub.MSVCRT.dll_wcslen
cmp word [eax*2 + 0x406b06], 0x5c
pop ecx
je 0x401827
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 0x4018e0
push 0x5c
push 0x406b0e
call sub.MSVCRT.dll_wcschr
pop ecx
mov dword [ebp + 0x10], eax
pop ecx
lea eax, [ebp - 0x3c0]
push 0x208
push ebx
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 0x10]
add esp, 0xc
cmp eax, ebx
je 0x401879
sub eax, esi
sar eax, 1
jmp 0x401880
push esi
call sub.MSVCRT.dll_wcslen
pop ecx
push eax
lea eax, [ebp - 0x3c0]
push esi
push eax
call sub.MSVCRT.dll_wcsncpy
add esp, 0xc
lea eax, [ebp - 0x3c0]
push eax
call edi
cmp eax, 0xffffffff
jne 0x4018b1
lea eax, [ebp - 0x3c0]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4018c0
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4018c0
add eax, 2
push 0x5c
push eax
jmp 0x40184d
push esi
call edi
cmp eax, 0xffffffff
jne 0x4018e0
push 0x405110
push 1
push ebx
push ebx
push str.Could_not_create_temp_dir_in_unpacker
call fcn.00401cb8
add esp, 0x14
jmp 0x401956
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 0x406d14
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push ebx
push 0x401e43
push ebx
push 0x65
push dword [0x406b04]
call dword [sym.imp.USER32.dll_CreateDialogParamA]
cmp eax, ebx
mov dword [0x406afc], eax
jne 0x40195f
lea eax, [ebp + 0x10]
push eax
push ebx
push esi
push 0x401eb2
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov dword [0x406d10], eax
jne 0x401951
push ebx
push ebx
push ebx
push esi
call fcn.00401ee2
add esp, 0x10
mov dword [0x406b00], eax
call fcn.004019be
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x10
lea ecx, [ebp - 0x1b8]
push ecx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 5
push dword [0x406afc]
call dword [sym.imp.USER32.dll_ShowWindow]
push ebx
push ebx
push 0x7e8
push dword [0x406afc]
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 0x401951
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 0x40199b