Function at 0x401b89
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, 0x438
mov eax, dword [0x40a020]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x41c], 0
push ebx
push esi
push edi
lea eax, [ebp - 0x414]
push eax
mov edi, ecx
mov esi, 0x104
push esi
mov dword [ebp - 0x420], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push esi
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.00402620
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [edi + 0x1008]
push esi
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp eax, 2
jle 0x401c15
mov ecx, dword [ebp - 0x420]
push esi
call fcn.00401998
test eax, eax
je 0x401c15
push esi
lea eax, [ebp - 0x108]
push eax
call edi
lea esi, [ebp - 0x108]
lea eax, [ebp - 0x108]
dec esi
push eax
mov dword [ebp - 0x42c], esi
call ebx
cmp byte [eax + esi], 0x5c
je 0x401c43
push 0x407218
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
and dword [ebp - 0x424], 0
push 0
push str._ir_sf_temp
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push str._s_s__d
push eax
call esi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push str._sirsetup.exe
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x401cc4
inc dword [ebp - 0x424]
push dword [ebp - 0x424]
lea eax, [ebp - 0x108]
push str._ir_sf_temp
push eax
lea eax, [ebp - 0x20c]
push str._s_s__d
push eax
call esi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push str._sirsetup.exe
push eax
call esi
add esp, 0x20
lea eax, [ebp - 0x310]
push eax
call ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401c89
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0
lea eax, [ebp - 0x20c]
push eax
call esi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x108]
push eax
call ebx
test eax, eax
jne 0x401d3c
push str.c:_temp
lea eax, [ebp - 0x108]
push eax
call edi
push 0
lea eax, [ebp - 0x108]
push eax
call esi
lea eax, [ebp - 0x108]
push eax
call ebx
mov esi, dword [ebp - 0x420]
test eax, eax
jne 0x401d64
push str.Could_not_determine_a_temp_directory_name.__Try_running_setup.exe__T:_Path_
lea eax, [esi + 8]
push eax
call edi
mov dword [ebp - 0x41c], 0x38
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x42c]
cmp byte [eax + ecx], 0x5c
je 0x401d8f
push 0x407218
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x108]
push eax
lea ebx, [esi + 0x1224]
push ebx
call edi
lea eax, [ebp - 0x108]
push eax
lea eax, [esi + 0x1328]
push eax
call edi
push str.irsetup.exe
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
call ebx
lea ecx, [ebp - 0x108]
lea eax, [esi + 0x142c]
push ecx
push eax
call edi
push str.lua5.1.dll
lea eax, [esi + 0x142c]
push eax
call ebx
mov al, byte [ebp - 0x108]
mov byte [ebp - 0x418], al
mov al, byte [ebp - 0x107]
mov byte [ebp - 0x417], al
mov al, byte [ebp - 0x106]
mov byte [ebp - 0x416], al
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x418]
push eax
mov byte [ebp - 0x415], 0
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x401e53
mov eax, dword [ebp - 0x434]
imul eax, dword [ebp - 0x428]
mul dword [ebp - 0x430]
test edx, edx
jg 0x401e68
jl 0x401e53
cmp eax, 0x1e8480
jae 0x401e68
push str.You_must_have_at_least_2MB_of_free_space_on_your_TEMP_drive_
add esi, 8
push esi
call edi
mov dword [ebp - 0x41c], 0x39
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x41c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040269a
leave
ret