Function at 0x418320
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a0769
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4c9144]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 3
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 0xc]
test eax, eax
jne 0x4183a0
lea ecx, [ebp - 0x18]
push ecx
mov ecx, 0x4ab958
call fcn.0041be20
lea eax, [ebp - 0x18]
lea edi, [ebp + 0xc]
mov byte [ebp - 4], 4
call fcn.00417620
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4183a0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 0x14]
cmp dword [ecx - 0xc], 0
jne 0x4183e9
lea edx, [ebp - 0x18]
push edx
mov ecx, str.msgpl
call fcn.0041be20
lea eax, [ebp - 0x18]
lea edi, [ebp + 0x14]
mov byte [ebp - 4], 5
call fcn.00417620
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4183e9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x14]
push ecx
call fcn.0041b8b0
mov byte [ebp - 4], 6
mov edx, dword [ebp + 0x10]
mov eax, dword [edx - 0xc]
test eax, eax
jne 0x418467
mov edx, dword [ebp - 0x14]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, 0x3e8
or eax, ecx
jge 0x418427
mov eax, 0x3e8
lea ecx, [ebp - 0x14]
call fcn.00417470
mov edx, dword [ebp - 0x14]
push edx
push 0x3e8
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.00489835
add esp, 8
test eax, eax
js 0x41845d
mov ecx, dword [ebp - 0x14]
cmp eax, dword [ecx - 8]
jg 0x41845d
mov dword [ecx - 0xc], eax
mov edx, dword [ebp - 0x14]
xor ecx, ecx
mov word [edx + eax*2], cx
jmp 0x418472
push 0x80070057
call fcn.00417580
lea eax, [ebp + 0x10]
lea edi, [ebp - 0x14]
call fcn.00417620
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx - 0xc]
test ecx, ecx
je 0x41849d
lea eax, [ecx - 1]
test eax, eax
js 0x41845d
cmp eax, ecx
jg 0x41845d
cmp word [edx + eax*2], 0x5c
je 0x41849d
push 1
push 0x4ab668
lea ebx, [ebp - 0x14]
call fcn.00418f40
mov ebx, dword [ebp + 8]
push ebx
mov byte [ebp - 0xd], 0
call fcn.0041b8b0
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], 0
mov edi, edi
cmp byte [ebp - 0xd], 0
jne 0x41856a
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x18]
push eax
call fcn.004899b7
add esp, 4
test eax, eax
je 0x4184ea
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov dword [ebp - 0x18], ecx
jmp 0x4184ed
mov ecx, dword [ebp - 0x18]
cmp ecx, 1
jb 0x4184fa
cmp ecx, 0xffff
jbe 0x418516
mov eax, 0x80008001
mul ecx
shr edx, 0xf
imul edx, edx, 0xffff
mov eax, 1
sub eax, edx
add ecx, eax
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x14]
push edi
push ecx
mov ecx, dword [ebp + 0x14]
push ecx
push edx
push str._s_s__04x._s
mov edi, ebx
call fcn.00417250
mov eax, dword [ebx]
add esp, 0x14
push eax
call esi
cmp eax, 0xffffffff
jne 0x41853d
mov byte [ebp - 0xd], 1
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, 0x64
jl 0x4184c0
cmp byte [ebp - 0xd], 0
jne 0x41856a
mov eax, dword [ebx]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41858d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4185b0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4185d3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4185f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret