Function at 0x40e610
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46d318
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
push ebx
push esi
push edi
mov eax, dword [0x495580]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, edx
mov dword [ebp - 0x3c], esi
mov edi, ecx
mov dword [ebp - 0x38], edi
lea ecx, [ebp - 0x1c]
call fcn.0040d6a0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
call fcn.0040e030
mov byte [ebp - 4], 2
call fcn.004363ea
mov ecx, eax
mov byte [ebp - 4], 1
test ecx, ecx
je 0x40ea84
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
push esi
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.00403c20
test al, al
jne 0x40e6bb
test esi, esi
jne 0x40e69d
xor ecx, ecx
jmp 0x40e6b1
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e6a2
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x18]
call fcn.00403e20
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 4
call fcn.004381d5
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 5
call fcn.00436590
mov dword [ebp - 0x34], vtable.CFileException.0
mov byte [ebp - 4], 7
call fcn.004363ea
mov ecx, eax
mov byte [ebp - 4], 6
test ecx, ecx
je 0x40ea8e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0xffffffff
call fcn.00403d70
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 9
push eax
push 0x1012
push dword [ebp - 0x14]
lea ecx, [ebp - 0x54]
call fcn.00438714
test eax, eax
jne 0x40e7c4
mov esi, dword [ebp + 8]
test esi, esi
je 0x40e77a
lea edx, [ebp - 0x34]
lea ecx, [ebp - 0x20]
call fcn.0040e260
mov byte [ebp - 4], 0xa
push dword [eax]
push dword [ebp - 0x14]
push str.Cannot_open_temp_file__s_for_writing:_n_s
push esi
call fcn.00403530
mov edx, dword [ebp - 0x20]
or edi, 0xffffffff
add esp, 0x10
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e77d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40e77d
or edi, 0xffffffff
mov edx, dword [ebp - 0x24]
mov eax, edi
mov dword [ebp - 0x34], vtable.CFileException.0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e79e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x54]
call fcn.004381fe
mov edx, dword [ebp - 0x18]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e8a4
mov ecx, dword [edx]
push edx
jmp 0x40e89f
push 0
push 0x1000
push 2
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0xa8]
call fcn.0043703d
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 0xb
call fcn.0043656b
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0xa8]
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 8]
lea ecx, [ebp - 0xa8]
call fcn.00437438
lea ecx, [ebp - 0x54]
call fcn.0043846e
mov dword [ebp - 4], 0x12
call fcn.0043664e
mov byte [ebp - 4], 0xb
mov esi, dword [ebp - 0x18]
mov ecx, esi
call fcn.0040d3e0
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40e8ee
push esi
call edi
test eax, eax
jne 0x40e8ee
mov eax, dword [ebp + 8]
test eax, eax
je 0x40e856
push esi
push str.Cannot_delete_old_version_of_file__s
push eax
call fcn.00403530
add esp, 0xc
lea ecx, [ebp - 0xa8]
call fcn.00437170
mov edx, dword [ebp - 0x24]
or edi, 0xffffffff
mov dword [ebp - 0x34], vtable.CFileException.0
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e885
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x54]
call fcn.004381fe
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40e8a4
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x14]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e8be
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1c]
lea edx, [eax - 0x10]
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x40ea70
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x40e922
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x40e920
push dword [ebp - 0x14]
call edi
push esi
push dword [ebp - 0x14]
push str.Cannot_rename_temp_file__s_to_final_name__s
push ebx
call fcn.00403530
mov eax, dword [ebp - 0x20]
add esp, 0x10
test eax, eax
lea ecx, [ebp - 0xa8]
setne bl
call fcn.00437170
mov edx, dword [ebp - 0x24]
or edi, 0xffffffff
mov dword [ebp - 0x34], vtable.CFileException.0
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e954
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x54]
call fcn.004381fe
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40e973
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x14]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e98d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x40e9a5
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404410
push 0x80004005
call fcn.00404410
int3