Function at 0x4018ee
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Get common file path
Get disk size
Get file attributes
Set current directory

Disassembly:
push ebp
lea ebp, [esp - 0x3b8]
sub esp, 0x438
mov eax, dword [0x40c020]
xor eax, ebp
mov dword [ebp + 0x3b4], eax
and dword [ebp - 0x64], 0
push ebx
push esi
push edi
lea eax, [ebp - 0x5c]
push eax
mov ebx, ecx
mov esi, 0x104
push esi
mov dword [ebp - 0x6c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push esi
lea eax, [ebp + 0x2b0]
push 0
push eax
call fcn.00401f60
add esp, 0xc
lea eax, [ebp + 0x2b0]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [ebx + 0x1008]
push esi
call edi
cmp eax, 2
jle 0x401973
push esi
mov ecx, ebx
call fcn.004017b7
test eax, eax
je 0x401973
push esi
lea eax, [ebp + 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea esi, [ebp + 0x2b0]
lea eax, [ebp + 0x2b0]
dec esi
push eax
mov dword [ebp - 0x74], esi
call edi
cmp byte [eax + esi], 0x5c
je 0x40199e
push 0x409308
lea eax, [ebp + 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
and dword [ebp - 0x68], 0
push 0
push str._ir_sf_temp
lea eax, [ebp + 0x2b0]
push eax
lea eax, [ebp + 0x1ac]
push str._s_s__d
push eax
call esi
lea eax, [ebp + 0x1ac]
push eax
lea eax, [ebp + 0xa8]
push str._sirsetup.exe
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 0x20
lea eax, [ebp + 0xa8]
push eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x401a34
inc dword [ebp - 0x68]
push dword [ebp - 0x68]
lea eax, [ebp + 0x2b0]
push str._ir_sf_temp
push eax
lea eax, [ebp + 0x1ac]
push str._s_s__d
push eax
call esi
lea eax, [ebp + 0x1ac]
push eax
lea eax, [ebp + 0xa8]
push str._sirsetup.exe
push eax
call esi
add esp, 0x20
lea eax, [ebp + 0xa8]
push eax
call edi
lea eax, [ebp + 0x1ac]
push eax
call ebx
lea eax, [ebp + 0x1ac]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4019f3
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0
lea eax, [ebp + 0x1ac]
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp + 0x1ac]
push eax
lea eax, [ebp + 0x2b0]
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp + 0x2b0]
push eax
call ebx
test eax, eax
jne 0x401aa2
push str.c:_temp
lea eax, [ebp + 0x2b0]
push eax
call esi
push 0
lea eax, [ebp + 0x2b0]
push eax
call edi
lea eax, [ebp + 0x2b0]
push eax
call ebx
test eax, eax
mov edi, dword [ebp - 0x6c]
jne 0x401ac4
push str.Could_not_determine_a_temp_directory_name.__Try_running_setup.exe__T:_Path_
lea eax, [edi + 8]
push eax
call esi
mov dword [ebp - 0x64], 0x38
lea eax, [ebp + 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x74]
cmp byte [eax + ecx], 0x5c
je 0x401aec
push 0x409308
lea eax, [ebp + 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp + 0x2b0]
push eax
lea ebx, [edi + 0x1224]
push ebx
call esi
lea eax, [ebp + 0x2b0]
push eax
lea eax, [edi + 0x1328]
push eax
call esi
push str.irsetup.exe
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov al, byte [ebp + 0x2b0]
mov byte [ebp - 0x60], al
mov al, byte [ebp + 0x2b1]
mov byte [ebp - 0x5f], al
mov al, byte [ebp + 0x2b2]
mov byte [ebp - 0x5e], al
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x60]
push eax
mov byte [ebp - 0x5d], 0
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x401b6c
mov eax, dword [ebp - 0x7c]
imul eax, dword [ebp - 0x70]
mul dword [ebp - 0x78]
test edx, edx
jg 0x401b7e
jl 0x401b6c
cmp eax, 0x1e8480
jae 0x401b7e
push str.You_must_have_at_least_2MB_of_free_space_on_your_TEMP_drive_
add edi, 8
push edi
call esi
mov dword [ebp - 0x64], 0x39
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ecx, dword [ebp + 0x3b4]
mov eax, dword [ebp - 0x64]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401fda
add ebp, 0x3b8
leave
ret