Function at 0x40f8e0
Capabilities:
Check if file exists
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d8d1e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x820
push ebx
push edi
mov ecx, 0x5101ed
mov dword [ebp - 0x2c], 0
call fcn.004b532d
lea eax, [ebp - 0x28]
push eax
call fcn.00409c90
push 0x4e2c3c
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00403e00
add esp, 0x10
push dword [ebp - 0x20]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov byte [ebp - 4], 1
call ebx
lea eax, [ebp - 0x24]
push eax
call fcn.00409d70
push 0x4e2c5c
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00403e00
add esp, 0x10
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call fcn.00403b80
mov edx, dword [ebp - 0x10]
or edi, 0xffffffff
mov byte [ebp - 4], 2
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f995
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x20]
call ebx
lea eax, [ebp - 0x1c]
push eax
call fcn.00409e50
push 0x4e2c7c
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00403e00
add esp, 0x10
push dword [ebp - 0x18]
call ebx
mov byte [ebp - 4], 6
call fcn.00405240
mov ecx, eax
test ecx, ecx
je 0x40fbb0
mov eax, dword [ecx]
push esi
call dword [eax + 0xc]
push 0x800
push 0
mov dword [ebp - 0x2c], 1
lea esi, [eax + 0x10]
lea eax, [ebp - 0x82c]
mov dword [ebp - 0x10], esi
push eax
call fcn.004b8400
add esp, 0xc
lea eax, [ebp - 0x82c]
push 0
push 0x17
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40fa4f
lea ecx, [ebp - 0x82c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40fa20
sub ecx, edx
lea eax, [ebp - 0x82c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.00406280
push 0x4e2c38
lea ecx, [ebp - 0x10]
call fcn.0040ec90
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00403b80
mov byte [ebp - 4], 5
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40fa76
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 0x4e2c9c
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00403e00
add esp, 0xc
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 7
call fcn.00403b80
mov edx, dword [ebp - 0x10]
mov eax, edi
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
pop esi
test eax, eax
jg 0x40fab7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x18]
call ebx
lea eax, [ebp - 0x14]
push eax
call fcn.004078a0
add esp, 4
push 0x4e2cbc
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 8
call fcn.0040ec90
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40faeb
push dword [ebp - 0x14]
call ebx
mov edx, dword [ebp - 0x14]
mov eax, edi
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fb09
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x18]
mov eax, edi
mov byte [ebp - 4], 4
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fb27
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x1c]
mov eax, edi
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fb45
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x24]
mov eax, edi
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fb63
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x20]
mov eax, edi
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fb81
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
pop edi
pop ebx
jg 0x40fba2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004042d0
int3