Function at 0x40fb40
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x437c83
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x270
mov edx, dword [esp + 0x280]
push ebx
mov dword [esp + 0x1c], ecx
mov ebx, 4
mov eax, dword [edx]
test eax, eax
jle 0x40fe34
push ebp
mov ebp, dword [esp + 0x290]
push esi
push edi
mov dword [esp + 0x20], eax
jmp 0x40fb8d
mov edx, dword [esp + 0x290]
mov eax, dword [ebx + edx]
add ebx, 4
mov ecx, eax
lea edi, [esp + 0x80]
lea esi, [ebx + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add ebx, eax
and ecx, 3
mov dword [esp + 0x24], ebx
rep movsb byte es:[edi], byte [esi]
mov byte [esp + eax + 0x80], 0
xor edi, edi
lea eax, [esp + 0x80]
push edi
push eax
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
test eax, eax
jne 0x40fe1b
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CFile::CFile
push 0x48
mov dword [esp + 0x28c], edi
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
cmp esi, edi
mov byte [esp + 0x288], 1
je 0x40fc17
mov ecx, esi
call dword [sym.imp.ImageObjectPro.dll_public:_void___thiscall_CImageBox::constructor_void_]
mov dword [esi], 0x43c4bc
mov dword [esp + 0x14], esi
jmp 0x40fc1d
mov dword [esp + 0x14], edi
mov esi, edi
push edi
lea ecx, [esp + 0x84]
push 0x8000
push ecx
lea ecx, [esp + 0x38]
mov byte [esp + 0x294], 0
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x40fdec
push edi
push 0x1000
lea edx, [esp + 0x34]
push 1
push edx
lea ecx, [esp + 0x4c]
call fcn.0042c79c
mov eax, dword [esi]
lea ecx, [esp + 0x3c]
push ecx
mov ecx, esi
mov byte [esp + 0x28c], 2
call dword [eax + 8]
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CArchive::Close
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CFile::Close
mov edx, dword [esp + 0x29c]
mov ecx, dword [esp + 0x28]
push esi
push 1
push edx
call sub.MFC42.DLL_CDocument::UpdateAllViews
cmp ebp, edi
je 0x40fdd9
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 4]
mov ebx, edx
xor edi, edi
mov dword [esp + 0x1c], ebx
inc ebx
cmp ebx, edi
jne 0x40fcce
cmp eax, edi
je 0x40fcc3
push eax
mov dword [esp + 0x14], edx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [ebp + 4], edi
mov dword [ebp + 0xc], edi
mov dword [ebp + 8], edi
jmp 0x40fdcb
cmp eax, edi
jne 0x40fd06
lea edi, [ebx*4]
push edi
call sub.MFC42.DLL_operatornew
mov edx, eax
mov ecx, edi
mov dword [ebp + 4], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [ebp + 0xc], ebx
mov dword [ebp + 8], ebx
jmp 0x40fdcb
mov ecx, dword [ebp + 0xc]
cmp ebx, ecx
jg 0x40fd36
cmp edx, ebx
jge 0x40fd26
mov ecx, ebx
sub ecx, edx
lea edx, [eax + edx*4]
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp + 8], ebx
jmp 0x40fdcb
jle 0x40fd2e
sub edx, ebx
mov dword [esp + 0x10], edx
mov dword [ebp + 8], ebx
jmp 0x40fdcb
mov eax, dword [ebp + 0x10]
cmp eax, edi
jne 0x40fd60
mov eax, edx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x40fd54
mov eax, 4
jmp 0x40fd60
cmp eax, 0x400
jle 0x40fd60
mov eax, 0x400
add eax, ecx
cmp ebx, eax
mov dword [esp + 0x18], eax
jl 0x40fd6e
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x18]
lea ecx, [eax*4]
push ecx
call sub.MFC42.DLL_operatornew
mov ecx, dword [ebp + 8]
mov esi, dword [ebp + 4]
shl ecx, 2
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x14], eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp + 8]
mov ecx, ebx
sub ecx, edx
lea edi, [eax + edx*4]
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 4]
push eax
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
add esp, 8
mov dword [ebp + 4], eax
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], ecx
mov edx, dword [ebp + 4]
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x24]
mov dword [edx + eax*4], esi
lea ecx, [esp + 0x3c]
mov byte [esp + 0x288], 0
call sub.MFC42.DLL_CArchive::CArchive
jmp 0x40fdf9
cmp esi, edi
je 0x40fdf9
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx + 4]
lea eax, [esp + 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x2c]
mov dword [esp + 0x288], 0xffffffff
call fcn.0042cb74
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x20], eax
jne 0x40fb86
pop edi
pop esi
mov eax, 1
pop ebp
jmp 0x40fe39
mov eax, 1
mov ecx, dword [esp + 0x274]
pop ebx
mov dword fs:[0], ecx
add esp, 0x27c
ret 0x10