Function at 0x40e7e0
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x481cb6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x154
mov eax, dword [0x4ac588]
push ebx
push esi
push edi
mov dword [esp + 0x15c], eax
mov dword [esp + 0x14], ecx
call fcn.00461fc6
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0xc], esi
mov dword [esp + 0x168], 0
call fcn.00461fc6
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x170]
test edi, edi
mov byte [esp + 0x168], 1
jne 0x40e856
xor eax, eax
jmp 0x40e869
mov eax, edi
lea edx, [eax + 1]
jmp 0x40e860
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e860
sub eax, edx
push eax
push edi
lea ecx, [esp + 0x18]
call fcn.00401710
push 4
push str..
lea ecx, [esp + 0x18]
call fcn.00401870
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x40e8eb
lea eax, [ebx - 0x10]
mov byte [esp + 0x168], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e8bf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esi - 0x10]
mov dword [esp + 0x168], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e8e4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
jmp 0x40ea78
mov ebx, dword [esp + 0x174]
push ebp
mov ebp, dword [esp + 0x17c]
lea ebx, [ebx]
lea eax, [esp + 0x4c]
push 0x488530
push eax
call fcn.0044b987
add esp, 8
test eax, eax
je 0x40ea04
lea ecx, [esp + 0x4c]
push 0x48a1f4
push ecx
call fcn.0044b987
add esp, 8
test eax, eax
je 0x40ea04
test ebx, ebx
jne 0x40e952
lea edx, [esp + 0x4c]
push str.desktop.ini
push edx
call fcn.0044b736
add esp, 8
test eax, eax
je 0x40ea04
test edi, edi
jne 0x40e95a
xor eax, eax
jmp 0x40e969
mov eax, edi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e960
sub eax, edx
push eax
push edi
lea ecx, [esp + 0x18]
call fcn.00401710
push 0x5c
lea ecx, [esp + 0x14]
call fcn.00407bd0
lea eax, [esp + 0x4c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e986
sub eax, edx
push eax
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x18]
call fcn.00401870
mov esi, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x40e9b8
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test byte [esp + 0x20], 0x10
je 0x40e9d4
mov ecx, dword [esp + 0x18]
push ebp
push ebx
push esi
call fcn.0040e7e0
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x40ea04
test ebp, ebp
je 0x40e9fd
lea ecx, [esp + 0x4c]
push str.index.dat
push ecx
call fcn.0044b736
add esp, 8
test eax, eax
jne 0x40e9fd
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x4c]
push edx
push edi
call fcn.0040e630
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40e900
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x16c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
pop ebp
jg 0x40ea4e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esi - 0x10]
mov dword [esp + 0x168], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ea73
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 1
mov ecx, dword [esp + 0x160]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x154]
pop ebx
call fcn.0044af18
add esp, 0x160
ret 0xc