Function at 0x407d8e
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
mov eax, 0x4da5b4
call fcn.004d1d50
sub esp, 0x98
mov eax, dword [0x52e400]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
xor eax, ebp
push ebx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x88], esi
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov eax, dword [sym.imp.MSVCP71.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
push dword [eax]
xor edi, edi
push 0x5c
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], edi
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::rfind_wchar_t__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP71.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
cmp eax, dword [ecx]
je 0x407dec
push eax
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::resize_unsigned_int_]
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call esi
cmp eax, 1
jne 0x407e33
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call esi
cmp eax, 1
jne 0x407e33
push 0xa
push ebx
push dword [ebp - 0x88]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp eax, 1
jne 0x407e26
xor esi, esi
jmp 0x4080a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4080a5
lea eax, [ebp - 0xa0]
push eax
push dword [ebp - 0x88]
mov dword [ebp - 0xa0], edi
call fcn.00407944
cmp eax, edi
pop ecx
pop ecx
jne 0x407e2c
push edi
push edi
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_unsigned_int__wchar_t_]
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
mov dword [ebp - 0xa4], eax
lea eax, [ebp - 0xa4]
push eax
push edi
push dword [ebp - 0x88]
call fcn.00407922
add esp, 0xc
cmp eax, edi
je 0x407e90
mov esi, eax
jmp 0x408098
push str..backup
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.00407aea
add esp, 0xc
push 0xb
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x407ed1
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407efc
push edi
lea eax, [ebp - 0x84]
push eax
push 0x4ec6d4
push dword [ebp - 0x88]
mov dword [ebp - 0x84], edi
mov dword [ebp - 0x8c], edi
call fcn.00408a4c
add esp, 0x10
cmp eax, edi
je 0x407f03
mov esi, eax
jmp 0x40808b
push edi
lea eax, [ebp - 0x8c]
push eax
push 0x4ec6cc
push ebx
call fcn.00408a4c
add esp, 0x10
push dword [ebp - 0x84]
mov esi, eax
cmp esi, edi
je 0x407f30
call fcn.00407908
pop ecx
jmp 0x40808b
call fcn.004078d2
cmp edx, edi
pop ecx
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], edx
mov dword [ebp - 0x94], edi
mov dword [ebp - 0x90], edi
jl 0x408047
jg 0x407f64
cmp eax, edi
jb 0x408047
jmp 0x407f64
xor edi, edi
push edi
push 0x1000
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_unsigned_int__char_]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
lea ecx, [ebp - 0x2c]
mov ebx, eax
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push edi
push eax
push ebx
push dword [ebp - 0x84]
call fcn.004078aa
mov edi, edx
add esp, 0x10
test edi, edi
mov esi, eax
jl 0x408038
jg 0x407fb2
test esi, esi
jbe 0x408038
push edi
push esi
push ebx
push dword [ebp - 0x8c]
call fcn.00407c05
add esp, 0x10
cmp eax, esi
jne 0x40800c
cmp edx, edi
jne 0x40800c
add dword [ebp - 0x94], eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
adc dword [ebp - 0x90], edx
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [ebp - 0x90]
cmp eax, dword [ebp - 0x98]
jl 0x407f62
jg 0x408045
mov eax, dword [ebp - 0x9c]
cmp dword [ebp - 0x94], eax
jbe 0x407f62
jmp 0x408045
push dword [ebp - 0x84]
call fcn.00407908
push dword [ebp - 0x8c]
call fcn.00407908
pop ecx
pop ecx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov esi, 0x40000003
jmp 0x40808b
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
xor edi, edi
push dword [ebp - 0x84]
mov esi, dword [sym.imp.XLFSIO.dll_long_int___stdcall_XLFS_CloseFile_void__]
call esi
cmp eax, edi
jne 0x407efc
push dword [ebp - 0x8c]
call esi
cmp eax, edi
jne 0x407efc
push dword [ebp - 0x88]
call dword [sym.imp.XLFSIO.dll_long_int___stdcall_XLFS_DeleteFile_wchar_t_const__]
lea ecx, [ebp - 0x80]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor esi, esi
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d1da7
leave
ret