Function at 0x40a7d0
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52d28f
mov eax, dword fs:[0]
push eax
mov eax, 0x1a80
call fcn.005158c0
mov eax, dword [0x5976b8]
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 ebx, ecx
lea eax, [ebp - 0x1a54]
xor edi, edi
lea ecx, [ebx + 0x154]
push eax
mov dword [ebp - 0x1a70], ebx
mov dword [ebp - 0x1a54], edi
call fcn.00402830
cmp eax, edi
jbe 0x40a8d0
xor esi, esi
mov edi, eax
mov ecx, dword [ebp - 0x1a54]
push 0x20
lea edx, [esi + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp - 0x1a54]
lea ecx, [esi + eax]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40a8c3
lea ecx, [ebp - 0x1a8c]
call fcn.00416bbc
mov edx, dword [ebp - 0x1a54]
push 0
lea eax, [esi + edx]
push eax
lea ecx, [ebp - 0x1a8c]
mov dword [ebp - 4], 0
call fcn.00416c88
test eax, eax
je 0x40a8a6
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x1a54]
lea edx, [esi + ecx]
push 0
push edx
lea ecx, [ebp - 0x1a8c]
call fcn.00416c88
test eax, eax
jne 0x40a883
lea ecx, [ebp - 0x1a8c]
call fcn.00416728
lea ecx, [ebp - 0x1a8c]
mov dword [ebp - 4], 0xffffffff
call fcn.00416bee
add esi, 0x208
dec edi
jne 0x40a830
mov eax, dword [ebp - 0x1a54]
push eax
lea ecx, [ebx + 0x154]
call fcn.00402ca0
push 0x206
lea edx, [ebp - 0x626]
xor ecx, ecx
push edi
push edx
mov word [ebp - 0x628], cx
call fcn.005149a0
push 0x206
lea ecx, [ebp - 0x216]
xor eax, eax
push edi
push ecx
mov word [ebp - 0x218], ax
call fcn.005149a0
push 0xd4a4
mov dword [ebp - 0x1a64], edi
mov dword [ebp - 0x1a68], edi
call fcn.00415512
add esp, 0x1c
mov dword [ebp - 0x1a60], eax
mov dword [ebp - 4], 1
cmp eax, edi
je 0x40a951
mov ecx, eax
call fcn.00411ce0
mov dword [ebp - 0x1a5c], eax
jmp 0x40a957
mov dword [ebp - 0x1a5c], edi
mov edi, dword [ebp - 0x1a5c]
mov dword [ebp - 4], 0xffffffff
test edi, edi
jne 0x40a972
mov eax, 0x661
jmp 0x40acef
lea edx, [ebp - 0x1a68]
push edx
lea eax, [ebp - 0x1a64]
push eax
lea ecx, [ebx + 0x154]
call fcn.004017e0
xor esi, esi
mov dword [ebp - 0x1a6c], esi
cmp dword [ebp - 0x1a68], esi
jbe 0x40ac23
mov dword [ebp - 0x1a60], esi
jmp 0x40a9b0
push 0x208
lea ecx, [ebp - 0x628]
push 0
push ecx
call fcn.005149a0
mov edx, dword [ebp - 0x1a64]
lea eax, [esi + edx]
push eax
lea ecx, [ebp - 0x628]
push 0x104
push ecx
call fcn.00515853
mov edx, dword [ebp - 0x1a64]
lea eax, [esi + edx]
lea ecx, [eax + 0x208]
add esp, 0x18
cmp word [ecx], 0
je 0x40aa13
push ecx
push eax
push 0x53d734
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00515c51
add esp, 0x14
jmp 0x40aa28
push eax
lea ecx, [ebp - 0x218]
push 0x104
push ecx
call fcn.00515853
add esp, 0xc
mov edx, dword [edi]
mov edx, dword [edx + 0x1c]
lea eax, [ebp - 0x1a50]
push eax
lea ecx, [ebp - 0x218]
push ecx
mov ecx, edi
call edx
mov eax, dword [ebp - 0x1848]
mov ebx, eax
test eax, eax
jle 0x40abec
lea ecx, [ebp - 0x218]
lea eax, [ebp - 0x628]
jmp 0x40aa60
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40aa86
test dx, dx
je 0x40aa82
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40aa86
add eax, 4
add ecx, 4
test dx, dx
jne 0x40aa60
xor eax, eax
jmp 0x40aa8b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jns 0x40abec
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40aaba
test al, 1
je 0x40aaba
and eax, 0xfffffffe
push eax
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x40abec
lea ecx, [ebp - 0x1a8c]
call fcn.00416bbc
push 0
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x1a8c]
mov dword [ebp - 4], 2
call fcn.00416c88
test eax, eax
je 0x40ab20
lea esp, [esp]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
lea ecx, [ebp - 0x218]
push ecx
lea ecx, [ebp - 0x1a8c]
call fcn.00416c88
test eax, eax
jne 0x40ab00
lea ecx, [ebp - 0x1a8c]
call fcn.00416728
lea ecx, [ebp - 0x1a8c]
mov dword [ebp - 4], 0xffffffff
call fcn.00416bee
lea edx, [ebp - 0x218]
push 0x104
push edx
call fcn.0051611e
mov ecx, dword [ebp + ebx*4 - 0x1748]
mov esi, eax
add esp, 8
xor eax, eax
mov word [ebp - 0x644], ax
mov eax, ecx
mov dword [ebp - 0x630], 7
mov dword [ebp - 0x634], 0
lea edi, [eax + 2]
lea esp, [esp]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x40ab80
sub eax, edi
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x644]
call fcn.00408030
cmp dword [ebp - 0x630], 8
mov edi, dword [ebp - 0x634]
jb 0x40abba
mov ecx, dword [ebp - 0x644]
push ecx
call fcn.0041554c
add esp, 4
xor edx, edx
sub esi, edi
xor eax, eax
dec ebx
mov dword [ebp - 0x630], 7
mov dword [ebp - 0x634], 0
mov word [ebp - 0x644], dx
mov word [ebp + esi*2 - 0x21a], ax
test ebx, ebx
jg 0x40aa4f
mov eax, dword [ebp - 0x1a6c]
mov esi, dword [ebp - 0x1a60]
mov edi, dword [ebp - 0x1a5c]
inc eax
add esi, 0x410
mov dword [ebp - 0x1a6c], eax
mov dword [ebp - 0x1a60], esi
cmp eax, dword [ebp - 0x1a68]
jb 0x40a9b0
mov ebx, dword [ebp - 0x1a70]
lea ecx, [ebp - 0x1a58]
push ecx
lea ecx, [ebx + 0x154]
call fcn.00403bd0
mov edx, dword [ebp - 0x1a58]
push edx
mov dword [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40ac63
test al, 1
je 0x40ac63
and eax, 0xfffffffe
push eax
mov eax, dword [ebp - 0x1a58]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, dword [ebp - 0x1a58]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x41e]
push eax
mov word [ebp - 0x420], dx
call fcn.005149a0
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x420]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor edx, edx
push edx
lea eax, [ebp - 0x420]
push eax
mov ecx, ebx
mov word [ebp - 0x21a], dx
call fcn.00409250
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
mov eax, dword [ebp - 0x1a58]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aced
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
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.00514990
mov esp, ebp
pop ebp
ret