Function at 0x487700
Capabilities:
Check if file exists
Delete file
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e093e
mov eax, dword fs:[0]
push eax
sub esp, 0x824
mov eax, dword [0x5203c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov dword [ebp - 0x830], 0
mov dword [ebp - 0x82c], 0
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x487af2
push 2
push dword [edi]
call fcn.004b99a3
add esp, 8
test eax, eax
jne 0x487af2
push 6
push dword [edi]
call fcn.004b99a3
add esp, 8
test eax, eax
jne 0x487af2
lea eax, [ebp - 0x828]
push edi
push eax
call fcn.004875a0
add esp, 8
mov eax, dword [ebp - 0x828]
mov edx, 0x4e7a5c
mov dword [ebp - 4], 0
mov ecx, eax
mov si, word [ecx]
cmp si, word [edx]
jne 0x4877c7
test si, si
je 0x4877c3
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x4877c7
add ecx, 4
add edx, 4
test si, si
jne 0x4877a1
xor ecx, ecx
jmp 0x4877cc
sbb ecx, ecx
or ecx, 1
test ecx, ecx
je 0x487ad3
mov edx, str.HFS
mov ecx, eax
jmp 0x4877e0
mov si, word [ecx]
cmp si, word [edx]
jne 0x487806
test si, si
je 0x487802
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x487806
add ecx, 4
add edx, 4
test si, si
jne 0x4877e0
xor ecx, ecx
jmp 0x48780b
sbb ecx, ecx
or ecx, 1
test ecx, ecx
je 0x487ad3
call fcn.00476b10
mov ecx, eax
test ecx, ecx
je 0x487b14
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x814], eax
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [ebp - 0x814]
push str.HITTEST__lu.tmp
push eax
call fcn.00476950
mov eax, dword [edi]
sub eax, 0x10
mov byte [ebp - 4], 2
push eax
call fcn.00476560
add eax, 0x10
add esp, 0x10
mov dword [ebp - 0x81c], eax
push 0x5c
push 0x2f
lea ecx, [ebp - 0x81c]
mov byte [ebp - 4], 3
call fcn.00487e40
mov esi, dword [ebp - 0x814]
lea eax, [esi - 0x10]
push eax
mov dword [ebp - 0x824], eax
call fcn.00476560
add eax, 0x10
add esp, 4
mov dword [ebp - 0x818], eax
push 0x5c
push 0x2f
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], 4
call fcn.00487e40
push 0x4f98a0
lea ecx, [ebp - 0x818]
call fcn.00487ef0
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.004ad7b0
mov edi, dword [ebp - 0x818]
lea eax, [ebp - 0x810]
add esp, 0xc
push edi
push dword [ebp - 0x81c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
call fcn.00476b10
mov ecx, eax
test ecx, ecx
je 0x487b1e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x820], eax
lea eax, [ebp - 0x810]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x820]
call fcn.00476480
test al, al
jne 0x487952
lea ecx, [ebp - 0x810]
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x487930
sub ecx, edx
lea eax, [ebp - 0x810]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x820]
call fcn.00477ed0
lea edx, [edi - 0x10]
mov dword [ebp - 0x830], 2
or edi, 0xffffffff
mov byte [ebp - 4], 3
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x48797a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x81c]
mov eax, edi
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x48799b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x820]
lea ecx, [esi - 0x10]
lea ebx, [eax - 0x10]
cmp ebx, ecx
je 0x487a08
mov esi, dword [ebp - 0x824]
cmp dword [esi + 0xc], 0
jl 0x4879f3
mov ecx, dword [ebx]
cmp ecx, dword [esi]
jne 0x4879f3
push ebx
call fcn.00476560
add esp, 4
mov dword [ebp - 0x824], eax
mov ecx, edi
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4879e8
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x824]
lea esi, [eax + 0x10]
mov dword [ebp - 0x814], esi
jmp 0x487a08
push dword [eax - 0xc]
lea ecx, [ebp - 0x814]
push eax
call fcn.00477ed0
mov esi, dword [ebp - 0x814]
mov byte [ebp - 4], 1
mov eax, edi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x487a20
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push 0x82
push 2
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x487a4f
push eax
mov dword [ebp - 0x82c], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push esi
call ebx
test eax, eax
je 0x487a94
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x487a94
push esi
call ebx
test eax, eax
je 0x487a94
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x487a89
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x487a94
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x487aaf
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x828]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x487af2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x487af2
lea esi, [eax - 0x10]
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x487af2
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x82c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a8e4e
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00476460
push 0x80004005
call fcn.00476460
int3