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
add esp, 0xc
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 0x401690
mov esi, dword [sym.imp.USER32.dll_FindWindowA]
lea eax, [ebp - 0x124]
push eax
push ebx
call esi
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x401654
push 9
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [ebp + 8]
jmp 0x40167e
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 0x401684
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, 0x4069f8
push esi
push 0x104
mov dword [0x4069f4], eax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x4016d3
push esi
push ebx
push 0x9c4000
call fcn.004013e0
add esp, 0xc
test eax, eax
jne 0x401722
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 0x40170f
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
jmp 0x4016ad
push 0x405110
push 1
push ebx
push ebx
push str.Could_not_find_temp_path_in_unpacker
jmp 0x401805
push 0x7e
push esi
call sub.MSVCRT.dll_wcschr
pop ecx
test eax, eax
pop ecx
je 0x401737
push esi
call fcn.00401478
pop ecx
push esi
call sub.MSVCRT.dll_wcslen
cmp word [eax*2 + 0x4069f6], 0x5c
pop ecx
je 0x401756
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 0x40180f
push 0x5c
push 0x4069fe
call sub.MSVCRT.dll_wcschr
pop ecx
mov dword [ebp + 8], eax
pop ecx
lea eax, [ebp - 0x32c]
push 0x208
push ebx
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 8]
add esp, 0xc
cmp eax, ebx
je 0x4017a8
sub eax, esi
sar eax, 1
jmp 0x4017af
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 0x4017e0
lea eax, [ebp - 0x32c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4017ef
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4017ef
add eax, 2
push 0x5c
push eax
jmp 0x40177c
push esi
call edi
cmp eax, 0xffffffff
jne 0x40180f
push 0x405110
push 1
push ebx
push ebx
push str.Could_not_create_temp_dir_in_unpacker
call fcn.00401b82
add esp, 0x14
jmp 0x401885
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 0x406c04
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push ebx
push 0x401d0d
push ebx
push 0x65
push dword [0x4069f4]
call dword [sym.imp.USER32.dll_CreateDialogParamA]
cmp eax, ebx
mov dword [0x4069ec], eax
jne 0x40188e
lea eax, [ebp + 8]
push eax
push ebx
push esi
push 0x401d7c
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov dword [0x406c00], eax
jne 0x401880
push ebx
push ebx
push ebx
push esi
call fcn.00401dac
add esp, 0x10
mov dword [0x4069f0], eax
call fcn.004018ed
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 [0x4069ec]
call dword [sym.imp.USER32.dll_ShowWindow]
push ebx
push ebx
push 0x7e8
push dword [0x4069ec]
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 0x401880
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 0x4018ca