Function at 0x40ad10
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52d2c8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5976b8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x18], esi
mov eax, dword [ebp + 0x14]
sub eax, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x24]
mov ecx, dword [eax + 8]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x20], ebx
cmp dword [ebp + 8], ebx
jbe 0x40af73
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x1c], ebx
mov dword [ebp + 0xc], edi
mov eax, dword [esi + 0x14]
cmp eax, 3
jne 0x40ada7
cmp dword [edi + 0x208], 2
jne 0x40ada7
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x1c]
mov ecx, dword [esi + 4]
push edx
push eax
push edi
push ecx
mov ecx, esi
call fcn.00408660
push 1
mov eax, ebx
xor edx, edx
div dword [ebp + 8]
mov ecx, esi
add eax, dword [ebp + 0x10]
push eax
call fcn.00405f40
jmp 0x40af23
cmp eax, 4
jne 0x40aeb0
cmp dword [ebp - 0x14], 0
jbe 0x40aeb0
call fcn.004170fe
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
je 0x40af64
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x14], ebx
jbe 0x40ae8a
test ebx, ebx
js 0x40af6e
mov eax, dword [ebp + 0x24]
cmp ebx, dword [eax + 8]
jge 0x40af6e
mov ecx, dword [eax + 4]
lea eax, [ecx + ebx*4]
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
cmp eax, esi
je 0x40ae5d
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40ae4d
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40ae4d
push eax
call fcn.00403500
mov dword [ebp - 0x2c], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40ae42
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov edi, dword [ebp - 0x2c]
add edi, 0x10
mov dword [ebp - 0x10], edi
jmp 0x40ae5d
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00404130
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp + 0xc]
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40af64
push eax
push edi
call fcn.00514ba4
add esp, 8
test eax, eax
je 0x40aefa
inc ebx
cmp ebx, dword [ebp - 0x14]
jb 0x40adeb
mov esi, dword [ebp - 0x18]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40aead
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov edi, dword [ebp + 0xc]
push 0x20
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40aeeb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x40aed4
cmp eax, 5
jne 0x40aeeb
cmp dword [esi + 0x14], 4
je 0x40aeeb
push 0
push edi
mov ecx, esi
call fcn.00409250
mov dword [ebp - 0x28], 1
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x24]
add eax, dword [ebp - 0x1c]
push ecx
jmp 0x40ad92
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40af1d
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
add ebx, dword [ebp - 0x24]
inc eax
add edi, 0x20c
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp + 0xc], edi
cmp eax, dword [ebp + 8]
jb 0x40ad69
cmp dword [ebp - 0x28], 0
je 0x40af73
mov eax, 0xbc2
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20
push 0x80004005
call fcn.00401550
call fcn.0041565f
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20