Function at 0x418560
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 0x49f4d8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x4c6184]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 2
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 0xc]
test eax, eax
jne 0x4185e0
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, 0x4a99ec
call fcn.0041bf30
lea eax, [ebp - 0x1c]
lea edi, [ebp + 0xc]
mov byte [ebp - 4], 3
call fcn.00417130
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4185e0
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 0x418629
lea edx, [ebp - 0x1c]
push edx
mov ecx, str.genpl
call fcn.0041bf30
lea eax, [ebp - 0x1c]
lea edi, [ebp + 0x14]
mov byte [ebp - 4], 4
call fcn.00417130
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418629
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.0041bb70
mov byte [ebp - 4], 5
mov edx, dword [ebp + 0x10]
mov eax, dword [edx - 0xc]
test eax, eax
jne 0x4186a7
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 0x418667
mov eax, 0x3e8
lea ecx, [ebp - 0x14]
call fcn.00416f90
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.004883c5
add esp, 8
test eax, eax
js 0x41869d
mov ecx, dword [ebp - 0x14]
cmp eax, dword [ecx - 8]
jg 0x41869d
mov dword [ecx - 0xc], eax
mov edx, dword [ebp - 0x14]
xor ecx, ecx
mov word [edx + eax*2], cx
jmp 0x4186b2
push 0x80070057
call fcn.004170a0
lea eax, [ebp + 0x10]
lea edi, [ebp - 0x14]
call fcn.00417130
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx - 0xc]
test ecx, ecx
je 0x4186dd
lea eax, [ecx - 1]
test eax, eax
js 0x41869d
cmp eax, ecx
jg 0x41869d
cmp word [edx + eax*2], 0x5c
je 0x4186dd
push 1
push 0x4a9708
lea ebx, [ebp - 0x14]
call fcn.00419410
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 0xd], 0
call fcn.0041bb70
mov byte [ebp - 4], 6
xor ebx, ebx
cmp byte [ebp - 0xd], 0
jne 0x41879c
mov esi, dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
push ecx
call fcn.004885a7
add esp, 4
test eax, eax
je 0x41871a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov dword [ebp - 0x1c], ecx
jmp 0x41871d
mov ecx, dword [ebp - 0x1c]
cmp ecx, 1
jb 0x41872a
cmp ecx, 0xffff
jbe 0x418746
mov eax, 0x80008001
mul ecx
shr edx, 0xf
imul edx, edx, 0xffff
mov eax, 1
sub eax, edx
add ecx, eax
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x14]
push esi
push ecx
mov ecx, dword [ebp + 0x14]
push ecx
push edx
push str._s_s__04x._s
lea edi, [ebp - 0x18]
call fcn.00417b50
mov eax, dword [ebp - 0x18]
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x418773
mov byte [ebp - 0xd], 1
inc ebx
cmp ebx, 0x64
jl 0x4186f0
cmp byte [ebp - 0xd], 0
jne 0x41879c
mov ecx, dword [ebp - 0x18]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [ebp - 0x18]
mov ecx, dword [edi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
cmp dword [edi - 4], 0
lea ecx, [edi - 4]
jl 0x4187c5
cmp eax, dword [edi - 0x10]
jne 0x4187c5
lea esi, [edi - 0x10]
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x4187fe
mov ecx, dword [edi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
jne 0x4187de
call fcn.00419530
mov eax, dword [edi - 0xc]
mov dword [esi + 4], eax
mov eax, dword [edi - 0xc]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [eax + eax + 2]
push edi
push edx
lea eax, [esi + 0x10]
push eax
call fcn.00487c28
add esp, 0x10
lea ecx, [esi + 0x10]
mov esi, dword [ebp + 8]
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov dword [esi], ecx
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x418829
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 - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41884c
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 + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41886f
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 + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418892
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
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 0x4188b8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret