Function at 0x40c517
Capabilities:
Copy file
Delete file
Get file size
Read file on windows

Disassembly:
mov eax, 0x416182
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x20
push ebx
push esi
xor ebx, ebx
push edi
lea eax, [ebp - 0x2c]
push ebx
push eax
call fcn.0040c765
pop ecx
pop ecx
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], ebx
cmp eax, ebx
jne 0x40c544
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x40c5f7
lea eax, [ebp - 0x1c]
push 1
push eax
call fcn.0040c765
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 1
push eax
call fcn.0040cd57
add esp, 0xc
test al, al
jne 0x40c5c7
lea eax, [ebp - 0x1c]
push eax
call fcn.0040cd57
test al, al
pop ecx
je 0x40c5c7
mov ecx, dword [ebp - 0x28]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
cmp ecx, ebx
jne 0x40c59f
mov ecx, eax
cmp dword [ebp - 0x18], ebx
je 0x40c5a7
mov eax, dword [ebp - 0x18]
push ebx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40c5c7
mov eax, dword [ebp - 0x18]
cmp eax, ebx
jne 0x40c5c0
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x18]
cmp eax, ebx
jne 0x40c5d3
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push eax
call edi
push 1
lea ecx, [ebp - 0x1c]
mov esi, eax
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
cmp esi, 0xffffffff
je 0x40c628
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0x10
jb 0x40c621
lea eax, [ebp + 8]
push ebx
push eax
push edi
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40c621
cmp dword [ebp + 8], edi
jne 0x40c621
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ecx, dword [ebp - 0xc]
pop edi
mov al, bl
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4