Function at 0x404680
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40c208
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 - 0x18]
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], esi
call sub.MFC42.DLL_CString::CString_2
xor edi, edi
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], edi
call fcn.0040b2f6
mov eax, dword [ebp + 8]
mov ebx, 1
test eax, eax
mov byte [ebp - 4], bl
je 0x4046d9
mov ecx, esi
call fcn.004044e0
jmp 0x4048b9
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
call fcn.00404090
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
mov eax, dword [esi + 0x4c]
mov ecx, dword [eax + 0x54]
test ecx, ecx
je 0x4047a2
mov ecx, dword [eax + 0x5c]
test ecx, ecx
jle 0x4047a2
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK
mov ecx, dword [ebp - 0x18]
push 0
push 0xb042
push ecx
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CFile::Open
mov edx, dword [esi + 0x4c]
lea ecx, [ebp - 0x34]
mov eax, dword [edx + 0x5c]
push eax
call sub.MFC42.DLL_CFile::SetLength
mov edi, ebx
jmp 0x40476a
mov dword [ebp - 4], ebx
call sub.MFC42.DLL_AfxTryCleanup
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x404786
cmp eax, 0xffffffff
je 0x404786
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_CFile::Close
test edi, edi
jne 0x4047a2
mov eax, dword [ebp - 0x18]
push eax
push str.Set___s__length_failed
push 2
call fcn.00407670
add esp, 0xc
jmp 0x4048b6
mov ecx, dword [ebp - 0x18]
push 4
push ecx
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
test eax, eax
jne 0x4048b9
mov eax, dword [esi + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK
mov eax, dword [esi + 0x3c]
mov edx, dword [ebp - 0x18]
push eax
push edx
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CFile::Rename
mov edi, ebx
jmp 0x404803
mov dword [ebp - 4], ebx
call sub.MFC42.DLL_AfxTryCleanup
test edi, edi
jne 0x404841
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00409940
mov ecx, dword [eax]
mov edx, dword [ebp - 0x18]
push ecx
push edx
push str.Rename___s__failed.__s
push 2
mov byte [ebp - 4], 9
call fcn.00407670
add esp, 0x18
mov byte [ebp - 4], bl
lea ecx, [ebp + 8]
jmp 0x4048b1
mov eax, dword [esi + 0x3c]
lea ecx, [ebp - 0x14c]
push ecx
push eax
xor edi, edi
call sub.MFC42.DLL_CFile::GetStatus
test eax, eax
je 0x404881
mov edx, dword [esi + 0x4c]
lea ecx, [ebp - 0x14c]
push ecx
mov eax, dword [edx + 0xd0]
mov byte [ebp - 0x13c], 0
mov dword [ebp - 0x148], eax
mov eax, dword [esi + 0x3c]
push eax
call sub.MFC42.DLL_CFile::SetStatus
mov edi, ebx
jmp 0x4048b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x14]
push eax
push edx
call fcn.00409940
mov eax, dword [eax]
mov ecx, dword [ebp - 0x18]
push eax
push ecx
push str.Set_file___s__status_failed.__s
push 2
mov byte [ebp - 4], 0xa
call fcn.00407670
add esp, 0x18
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x14]
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.00406490
add esp, 0x10
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp - 0x18]
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