Function at 0x4013e3
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
mov ebp, esp
sub esp, 0x430
and dword [ebp - 0xc], 0
push ebx
push esi
lea eax, [ebp - 0x430]
push edi
mov esi, 0x104
mov edi, ecx
push eax
push esi
mov dword [ebp - 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push esi
lea eax, [ebp - 0x124]
push 0
push eax
call fcn.00401ae0
add esp, 0xc
lea eax, [ebp - 0x124]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [edi + 0x1004]
push esi
call ebx
cmp eax, 2
jle 0x401459
push esi
mov ecx, edi
call fcn.00401737
test eax, eax
je 0x401459
lea eax, [ebp - 0x124]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x124]
push eax
call ebx
cmp byte [ebp + eax - 0x125], 0x5c
je 0x40147e
lea eax, [ebp - 0x124]
push 0x40718c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
and dword [ebp - 8], 0
push 0
lea eax, [ebp - 0x124]
push str._ir_sf7_temp
push eax
lea eax, [ebp - 0x228]
push str._s_s__d
push eax
call esi
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x32c]
push str._sirsetup.exe
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 0x20
lea eax, [ebp - 0x32c]
push eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x401514
inc dword [ebp - 8]
lea eax, [ebp - 0x124]
push dword [ebp - 8]
push str._ir_sf7_temp
push eax
lea eax, [ebp - 0x228]
push str._s_s__d
push eax
call esi
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x32c]
push str._sirsetup.exe
push eax
call esi
add esp, 0x20
lea eax, [ebp - 0x32c]
push eax
call edi
lea eax, [ebp - 0x228]
push eax
call ebx
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4014d3
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x228]
push 0
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x124]
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x124]
push eax
call ebx
test eax, eax
jne 0x401582
lea eax, [ebp - 0x124]
push str.c:_temp
push eax
call esi
lea eax, [ebp - 0x124]
push 0
push eax
call edi
lea eax, [ebp - 0x124]
push eax
call ebx
mov edi, dword [ebp - 0x10]
test eax, eax
jne 0x4015a4
lea eax, [edi + 4]
push str.Could_not_determine_a_temp_directory_name.__Try_running_setup.exe__T:_Path_
push eax
call esi
mov dword [ebp - 0xc], 0x38
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x125], 0x5c
je 0x4015cd
lea eax, [ebp - 0x124]
push 0x40718c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x124]
lea ebx, [edi + 0x1210]
push eax
push ebx
call esi
lea eax, [ebp - 0x124]
push eax
lea eax, [edi + 0x1314]
push eax
call esi
push str.irsetup.exe
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov al, byte [ebp - 0x124]
and byte [ebp - 1], 0
inc dword [eax]
mov byte [ebp - 4], al
mov al, byte [ebp - 0x123]
mov byte [ebp - 3], al
mov al, byte [ebp - 0x122]
mov byte [ebp - 2], al
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x40164d
mov eax, dword [ebp - 0x1c]
imul eax, dword [ebp - 0x14]
mul dword [ebp - 0x18]
test edx, edx
jg 0x40165f
jl 0x40164d
cmp eax, 0x1e8480
jae 0x40165f
add edi, 4
push str.You_must_have_at_least_2MB_of_free_space_on_your_TEMP_drive_
push edi
call esi
mov dword [ebp - 0xc], 0x39
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret