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

Disassembly:
mov eax, 0x4db61c
call fcn.004d1ec0
sub esp, 0x98
mov eax, dword [0x52f220]
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 0x407993
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 0x4079da
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 0x4079da
push 0xa
push ebx
push dword [ebp - 0x88]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp eax, 1
jne 0x4079cd
xor esi, esi
jmp 0x407c4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x407c4c
lea eax, [ebp - 0xa0]
push eax
push dword [ebp - 0x88]
mov dword [ebp - 0xa0], edi
call fcn.00407481
cmp eax, edi
pop ecx
pop ecx
jne 0x4079d3
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.0040745f
add esp, 0xc
cmp eax, edi
je 0x407a37
mov esi, eax
jmp 0x407c3f
push str..backup
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.00407691
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 0x407a78
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407aa3
push edi
lea eax, [ebp - 0x84]
push eax
push 0x4ed6c4
push dword [ebp - 0x88]
mov dword [ebp - 0x84], edi
mov dword [ebp - 0x8c], edi
call fcn.004085f8
add esp, 0x10
cmp eax, edi
je 0x407aaa
mov esi, eax
jmp 0x407c32
push edi
lea eax, [ebp - 0x8c]
push eax
push 0x4ed6bc
push ebx
call fcn.004085f8
add esp, 0x10
push dword [ebp - 0x84]
mov esi, eax
cmp esi, edi
je 0x407ad7
call fcn.00407445
pop ecx
jmp 0x407c32
call fcn.0040740f
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 0x407bee
jg 0x407b0b
cmp eax, edi
jb 0x407bee
jmp 0x407b0b
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.004073e7
mov edi, edx
add esp, 0x10
test edi, edi
mov esi, eax
jl 0x407bdf
jg 0x407b59
test esi, esi
jbe 0x407bdf
push edi
push esi
push ebx
push dword [ebp - 0x8c]
call fcn.004077ac
add esp, 0x10
cmp eax, esi
jne 0x407bb3
cmp edx, edi
jne 0x407bb3
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 0x407b09
jg 0x407bec
mov eax, dword [ebp - 0x9c]
cmp dword [ebp - 0x94], eax
jbe 0x407b09
jmp 0x407bec
push dword [ebp - 0x84]
call fcn.00407445
push dword [ebp - 0x8c]
call fcn.00407445
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 0x407c32
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 0x407aa3
push dword [ebp - 0x8c]
call esi
cmp eax, edi
jne 0x407aa3
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.004d1f17
leave
ret