Function at 0x40f480
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46d0b8
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
push ebx
push esi
push edi
mov eax, dword [0x495574]
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.0040e150
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
call fcn.0040ec80
push esi
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.00404300
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 2
call fcn.00439996
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 3
call fcn.00437d91
mov dword [ebp - 0x34], vtable.CFileException.0
call fcn.00437bed
mov ecx, eax
test ecx, ecx
je 0x40fa12
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x471758
jne 0x40fa1c
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
add eax, 0x10
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0xffffffff
call fcn.00404160
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 5
push eax
push 0x1012
push dword [ebp - 0x14]
lea ecx, [ebp - 0x58]
call fcn.00439eab
test eax, eax
jne 0x40f5f7
mov esi, dword [ebp + 8]
test esi, esi
je 0x40f5d5
lea edx, [ebp - 0x34]
lea ecx, [ebp - 0x20]
call fcn.0040f000
mov byte [ebp - 4], 6
push dword [eax]
push dword [ebp - 0x14]
push str.Cannot_open_temp_file__s_for_writing:_n_s
push esi
call fcn.00403a80
mov byte [ebp - 4], 5
or esi, 0xffffffff
mov ecx, dword [ebp - 0x20]
add esp, 0x10
add ecx, 0xfffffff0
mov eax, esi
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40f5d8
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, 0x471758
jne 0x40fa23
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40fa23
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x40f5d8
or esi, 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.0040fd10
lea ecx, [ebp - 0x58]
call fcn.004399c5
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
jmp 0x40f91e
push 0
push 0x1000
push 2
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0xac]
call fcn.00438814
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 7
call fcn.00437d6c
lea eax, [ebp - 0xac]
mov byte [ebp - 4], 9
push eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
lea ecx, [ebp - 0xac]
call fcn.00438c14
lea ecx, [ebp - 0x58]
call fcn.00439c3a
mov dword [ebp - 4], 0xe
call fcn.00437e4f
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x18]
call fcn.0040de80
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40f68c
push dword [ebp - 0x18]
call esi
test eax, eax
jne 0x40f68c
mov eax, dword [ebp + 8]
test eax, eax
je 0x40f8f6
push dword [ebp - 0x18]
push str.Cannot_delete_old_version_of_file__s
push eax
call fcn.00403a80
add esp, 0xc
jmp 0x40f8f6
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov ebx, eax
test ebx, ebx
jne 0x40f6c0
mov edi, dword [ebp + 8]
test edi, edi
je 0x40f6be
push dword [ebp - 0x14]
call esi
push dword [ebp - 0x18]
push dword [ebp - 0x14]
push str.Cannot_rename_temp_file__s_to_final_name__s
push edi
call fcn.00403a80
add esp, 0x10
test ebx, ebx
lea ecx, [ebp - 0xac]
setne bl
call fcn.00438951
lea ecx, [ebp - 0x34]
call fcn.0040fd10
lea ecx, [ebp - 0x58]
call fcn.004399c5
mov byte [ebp - 4], 1
or esi, 0xffffffff
mov ecx, dword [ebp - 0x18]
mov eax, esi
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40f728
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, 0x471758
jne 0x40fa2c
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40fa2c
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 0
mov eax, esi
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40f76f
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, 0x471758
jne 0x40fa35
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40fa35
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], esi
dec esi
test esi, esi
jg 0x40f7cb
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, 0x471758
jne 0x40fa3e
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40fa3e
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
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
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
lea ecx, [ebp - 0xac]
call fcn.00438951
lea ecx, [ebp - 0x34]
call fcn.0040fd10
lea ecx, [ebp - 0x58]
call fcn.004399c5
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
or esi, 0xffffffff
mov eax, esi
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40f95b
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, 0x471758
jne 0x40fa63
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40fa63
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 0
mov eax, esi
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40f9a2
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, 0x471758
jne 0x40fa6c
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40fa6c
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
lea ecx, [eax - 0x10]
lock xadd dword [ecx + 0xc], esi
dec esi
test esi, esi
jg 0x40f9fe
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, 0x471758
jne 0x40fa75
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40fa75
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
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
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.00404830
call edx
jmp 0x40f524
mov ecx, edx
call edi
jmp 0x40f5d8
mov ecx, edx
call edi
jmp 0x40f728
mov ecx, edx
call edi
jmp 0x40f76f
mov ecx, edx
call esi
jmp 0x40f7cb
mov ecx, edx
call edi
jmp 0x40f95b
mov ecx, edx
call edi
jmp 0x40f9a2
mov ecx, edx
call esi
jmp 0x40f9fe