Function at 0x403315
Capabilities:
Check if file exists
Copy file
Delete file
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov dword [ebp - 0x28], 1
or dword [ebp - 0x24], 0xffffffff
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x2c], eax
cmp dword [ebp + 8], 0
je 0x40333a
cmp dword [ebp + 8], 2
jne 0x4033a3
push 0x40a550
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x403396
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
push 0x40a550
call dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
jne 0x403374
push 0
call dword [sym.imp.KERNEL32.dll_ExitThread]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x20
push 0
push 0x40c3dc
call sub.MSVCRT.dll_memset
add esp, 0xc
xor eax, eax
inc eax
jmp 0x40355f
cmp dword [ebp + 8], 2
jne 0x4033a3
xor eax, eax
jmp 0x40355f
push 0x40c1d0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, 1
jne 0x4033be
push 0x40c1d0
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x104
push 0
push 0x40c1d0
call sub.MSVCRT.dll_memset
add esp, 0xc
call fcn.0040170c
push eax
push 0x40c508
push str._s_d.nls
push 0x40c1d0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0
push 0x40c1d0
push 0x40a550
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push 0x40c1d0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
je 0x4034f4
and dword [ebp - 0x38], 0
and dword [ebp - 0x34], 0
and dword [ebp - 0x3c], 0
and dword [ebp - 0x30], 0
push 0
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x34], eax
push 0
push 0
push 0
push 4
push 0
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x30], eax
push 0
push 0
push 0
push 0xf001f
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x4034dc
push 0
mov eax, dword [ebp - 0x38]
push dword [eax + 4]
mov eax, dword [ebp - 0x34]
sub eax, 8
push eax
mov eax, dword [ebp - 0x38]
add eax, 8
push eax
call fcn.00401000
mov eax, dword [ebp - 0x34]
sub eax, 8
push eax
mov eax, dword [ebp - 0x38]
add eax, 8
push eax
call fcn.00402ed5
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x3c]
cmp ecx, dword [eax]
je 0x4034bc
and dword [ebp - 0x28], 0
push 0x20
mov eax, dword [ebp - 0x38]
add eax, 8
push eax
lea eax, [ebp - 0x20]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x4034e0
and dword [ebp - 0x28], 0
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4034f8
and dword [ebp - 0x28], 0
cmp dword [ebp - 0x28], 0
jne 0x403532
push 0x40c1d0
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x40a550
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x40c2d8
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp + 8], 0
jne 0x40352e
push 2
call fcn.00403315
jmp 0x40355f
xor eax, eax
jmp 0x40355f
cmp dword [ebp + 8], 0
jne 0x40354b
push 0x20
lea eax, [ebp - 0x20]
push eax
push 0x40c3dc
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp dword [ebp + 8], 3
jne 0x40355c
push 0x40c1d0
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
inc eax
leave
ret 4