Function at 0x405b20
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4213b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x140
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], esi
call sub.MFC42.DLL_CString::CString_4
xor edi, edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], edi
call sub.MFC42.DLL_CFile::CFile
mov eax, dword [ebp + 8]
mov ebx, 1
test eax, eax
mov byte [ebp - 4], bl
je 0x405b79
mov ecx, esi
call fcn.00405980
jmp 0x405cfb
lea eax, [ebp - 0x18]
mov ecx, esi
push eax
call fcn.00405580
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
mov eax, dword [esi + 0x50]
mov ecx, dword [eax + 0x58]
test ecx, ecx
je 0x405c42
mov ecx, dword [eax + 0x60]
test ecx, ecx
jle 0x405c42
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK
mov ecx, dword [ebp - 0x14]
push 0
push 0xb042
push ecx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CFile::Open
mov edx, dword [esi + 0x50]
lea ecx, [ebp - 0x2c]
mov eax, dword [edx + 0x60]
push eax
call sub.MFC42.DLL_CFile::SetLength
mov edi, ebx
jmp 0x405c0a
mov dword [ebp - 4], ebx
call sub.MFC42.DLL_AfxTryCleanup
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x405c26
cmp eax, 0xffffffff
je 0x405c26
lea ecx, [ebp - 0x2c]
call sub.MFC42.DLL_CFile::Close
test edi, edi
jne 0x405c42
mov eax, dword [ebp - 0x14]
push eax
push str.Set___s__length_failed
push 2
call fcn.004135f0
add esp, 0xc
jmp 0x405cf8
mov ecx, dword [ebp - 0x14]
push 4
push ecx
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
test eax, eax
jne 0x405cfb
mov eax, dword [esi + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK
mov eax, dword [esi + 0x40]
mov edx, dword [ebp - 0x14]
push 8
push eax
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov dword [ebp - 4], ebx
call sub.MFC42.DLL_AfxTryCleanup
mov eax, dword [esi + 0x40]
lea ecx, [ebp - 0x14c]
push ecx
push eax
xor edi, edi
call sub.MFC42.DLL_CFile::GetStatus
test eax, eax
je 0x405cc3
mov edx, dword [esi + 0x50]
lea ecx, [ebp - 0x14c]
push ecx
mov eax, dword [edx + 0xd4]
mov byte [ebp - 0x13c], 0
mov dword [ebp - 0x148], eax
mov eax, dword [esi + 0x40]
push eax
call sub.MFC42.DLL_CFile::SetStatus
mov edi, ebx
jmp 0x405cfb
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x18]
push eax
push edx
call fcn.00413ae0
mov eax, dword [eax]
mov ecx, dword [ebp - 0x14]
push eax
push ecx
push str.Set_file___s__status_failed.__s
push 2
mov byte [ebp - 4], 0xa
call fcn.004135f0
add esp, 0x18
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
mov dword [ebp + 8], ebx
mov edx, dword [ebp + 8]
push esi
push edx
push 3
push 0xffffffffffffffff
call fcn.00407960
add esp, 0x10
lea ecx, [ebp - 0x2c]
mov byte [esi + 4], bl
mov byte [ebp - 4], 0
call fcn.00420414
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4