Function at 0x4018f0
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
Hide graphical window
Terminate process

Disassembly:
sub esp, 0x3c8
mov eax, dword [0x412190]
xor eax, esp
mov dword [esp + 0x3c4], eax
push ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
push esi
mov esi, dword [esp + 0x3dc]
push edi
mov edi, dword [esp + 0x3d8]
push str.Internet_Download_Manager
lea eax, [esp + 0xc8]
push str._s_Setup
push eax
call ebx
push str._delsetup
push esi
call fcn.004049e0
add esp, 0x14
test eax, eax
jne 0x401965
push 0x40d71c
push esi
call fcn.004049e0
add esp, 8
test eax, eax
jne 0x401965
push 0x40d710
push esi
call fcn.004049e0
add esp, 8
test eax, eax
je 0x40196f
mov dword [0x4132a8], 1
push str._skipdlgs
push esi
call fcn.004049e0
add esp, 8
test eax, eax
jne 0x4019a5
push 0x40d6f8
push esi
call fcn.004049e0
add esp, 8
test eax, eax
jne 0x4019a5
push 0x40d6ec
push esi
call fcn.004049e0
add esp, 8
test eax, eax
je 0x4019af
mov dword [0x4132ac], 1
push str.IDM_Setup_Mutex_st23nZ7a
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401a1e
mov edi, dword [sym.imp.USER32.dll_FindWindowA]
lea ecx, [esp + 0xc4]
push ecx
push 0
call edi
mov esi, eax
test esi, esi
jne 0x401a06
lea edx, [esp + 0xc4]
push str.Welcome
push edx
call ebx
add esp, 8
lea eax, [esp + 0xc4]
push eax
push esi
call edi
mov esi, eax
test esi, esi
je 0x401a16
push 9
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea ecx, [esp + 0x30]
push ecx
mov dword [0x413094], edi
mov dword [esp + 0x34], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x401a5e
cmp dword [esp + 0x40], 2
jne 0x401b06
mov eax, dword [esp + 0x34]
cmp eax, 6
jne 0x401b00
cmp dword [esp + 0x38], 0
je 0x401b06
push 0x412e88
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov ebx, 0x10
test eax, eax
je 0x401aae
push 0x412e88
push 0
push 0x9c4000
call section..text
add esp, 0xc
test eax, eax
jne 0x401b3c
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 eax
call edi
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0xc]
lea edx, [esp + 0x1c8]
push eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], str.Select_Temp_Directory
mov dword [esp + 0x20], ebx
call esi
test eax, eax
je 0x401b1f
push 0x412e88
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
jmp 0x401a83
jae 0x401a5e
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 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x401da7
push 0x40d3c4
push 1
push 0
push 0
push str.Could_not_find_temp_path_in_unpacker
call fcn.00401450
add esp, 0x14
jmp 0x401da7
push 0x7e
push 0x412e88
call fcn.00404a66
add esp, 8
test eax, eax
je 0x401b5c
push 0x412e88
call fcn.004010d0
add esp, 4
mov eax, 0x412e88
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401b64
sub eax, edx
sar eax, 1
cmp word [eax*2 + 0x412e86], 0x5c
je 0x401b9a
mov edi, 0x412e88
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x401b86
mov ecx, dword [0x40d4cc]
mov dword [edi], ecx
mov edi, 0x412e88
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x401ba2
mov ecx, 7
mov esi, str.IDM_Setup_Temp
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x412e88
call edi
cmp eax, 0xffffffff
jne 0x401c96
push 0x5c
push 0x412e8e
call fcn.00404a66
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
add esp, 8
push 0x208
lea edx, [esp + 0x1cc]
push 0
push edx
mov esi, eax
call fcn.00405150
add esp, 0xc
test esi, esi
je 0x401c0d
mov eax, esi
sub eax, 0x412e88
jmp 0x401c22
mov eax, 0x412e88
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401c15
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x1cc]
push 0x412e88
push eax
call fcn.00405312
add esp, 0xc
lea ecx, [esp + 0x1c8]
push ecx
call edi
cmp eax, 0xffffffff
jne 0x401c59
push 0
lea edx, [esp + 0x1cc]
push edx
call ebx
test eax, eax
je 0x401c6d
test esi, esi
je 0x401c6d
add esi, 2
push 0x5c
push esi
call fcn.00404a66
jmp 0x401be4
push 0x412e88
call edi
cmp eax, 0xffffffff
jne 0x401c96
push 0x40d3c4
push 1
push 0
push 0
push str.Could_not_create_temp_dir_in_unpacker
call fcn.00401450
add esp, 0x14
jmp 0x401da7
mov edi, 0x412e88
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x401ca0
mov eax, dword [0x40d4cc]
push str.setup_error.log
push 0x412e88
push str._s_s
push 0x413098
mov dword [edi], eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [0x413094]
add esp, 0x10
push 0
push 0x401640
push 0
push 0x65
push ecx
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [0x412e80], eax
test eax, eax
jne 0x401d2d
lea edx, [esp + 0x2c]
push edx
push eax
push 0x412e88
push 0x402400
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4132a0], eax
test eax, eax
jne 0x401da2
push eax
push eax
push eax
push 0x412e88
call fcn.00402000
add esp, 0x10
mov dword [0x413090], eax
jmp 0x401da2
lea ecx, [esp + 0xc4]
push ecx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov edx, dword [0x412e80]
push 5
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x412e80]
push 0
push 0
push 0x7e8
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
push 0
lea ecx, [esp + 0x18]
push ecx
call esi
test eax, eax
je 0x401da2
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
lea edx, [esp + 0xc]
push edx
call edi
lea eax, [esp + 0xc]
push eax
call ebx
push 0
push 0
push 0
lea ecx, [esp + 0x18]
push ecx
call esi
test eax, eax
jne 0x401d83
call fcn.004016b0
mov ecx, dword [esp + 0x3d0]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00404d54
add esp, 0x3c8
ret 0x10