Function at 0x406690
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x439688
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x4510e0]
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 dword [ebp - 0x40], ecx
mov dword [ebp - 4], 0
call fcn.00409d5c
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x4066e1
push 0x80004005
call fcn.004022b0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x3c], edi
mov byte [ebp - 4], 1
call fcn.00409d5c
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x40670c
push 0x80004005
call fcn.004022b0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], 0
call fcn.0040a267
mov byte [ebp - 4], 3
mov eax, dword [ebp + 8]
add esi, 0xfffffff0
lea edx, [eax - 0x10]
cmp edx, esi
je 0x40679f
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x406793
mov ecx, dword [edx]
cmp ecx, dword [esi]
jne 0x406793
push edx
call fcn.004021d0
add esp, 4
mov dword [ebp - 0x34], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x40678b
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x34]
add eax, 0x10
mov dword [ebp - 0x14], eax
jmp 0x40679f
push dword [eax - 0xc]
lea ecx, [ebp - 0x14]
push eax
call fcn.00402100
push 1
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x14]
call fcn.00406e90
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
cmp ecx, 1
jne 0x4067cf
test ecx, ecx
jns 0x4067c5
push 0x80070057
call fcn.004022b0
cmp word [eax], 0x5c
jne 0x4067cf
xor bl, bl
jmp 0x4067d1
mov bl, 1
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4067ee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x4067ff
push 0x447b9c
lea ecx, [ebp - 0x14]
call fcn.00406a90
push 0x447ba0
lea ecx, [ebp - 0x14]
call fcn.00406a90
mov esi, dword [ebp - 0x14]
push 0
push esi
lea ecx, [ebp - 0x30]
call fcn.0040a4ae
test eax, eax
je 0x4069e2
lea ecx, [ebp - 0x30]
call fcn.0040a654
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x30]
call fcn.0040a753
mov byte [ebp - 4], 4
mov edx, dword [eax]
lea eax, [edi - 0x10]
lea ebx, [edx - 0x10]
mov dword [ebp - 0x38], eax
cmp ebx, eax
je 0x4068f4
cmp dword [eax + 0xc], 0
lea ecx, [eax + 0xc]
mov dword [ebp - 0x34], ecx
jl 0x4068e5
mov ecx, dword [ebx]
cmp ecx, dword [eax]
jne 0x4068e5
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [ebx + 0xc], 0
lea edx, [ebx + 0xc]
mov ecx, eax
jl 0x406887
cmp ecx, dword [ebx]
jne 0x406887
mov edi, ebx
mov eax, 1
lock xadd dword [edx], eax
jmp 0x4068c3
mov eax, dword [ecx]
push 2
push dword [ebx + 4]
call dword [eax]
mov edi, eax
test edi, edi
je 0x406a8a
mov ecx, dword [ebx + 4]
mov dword [edi + 4], ecx
mov ecx, dword [ebx + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebx + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.0041bebc
add esp, 0x10
mov ecx, dword [ebp - 0x34]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4068dd
mov edx, dword [ebp - 0x38]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0x10
mov dword [ebp - 0x3c], edi
jmp 0x4068f4
push dword [edx - 0xc]
lea ecx, [ebp - 0x3c]
push edx
call fcn.00402100
mov edi, dword [ebp - 0x3c]
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x48]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406915
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x30]
call fcn.0040a9dc
test eax, eax
jne 0x4069d8
mov eax, dword [ebp - 0x30]
push 0x10
lea ecx, [ebp - 0x30]
call dword [eax + 0x38]
test eax, eax
je 0x4069c5
push 1
push ecx
mov ecx, dword [edi - 0x10]
lea ebx, [edi - 0x10]
mov eax, dword [ecx]
mov dword [ebp - 0x34], esp
call dword [eax + 0x10]
cmp dword [ebx + 0xc], 0
lea edx, [ebx + 0xc]
mov ecx, eax
jl 0x406963
cmp ecx, dword [ebx]
jne 0x406963
mov eax, 1
lock xadd dword [edx], eax
jmp 0x4069a5
mov eax, dword [ecx]
push 2
push dword [ebx + 4]
call dword [eax]
mov edx, eax
mov dword [ebp - 0x38], edx
test edx, edx
je 0x406a8a
mov ecx, dword [ebx + 4]
mov dword [edx + 4], ecx
mov ecx, dword [ebx + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebx + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edx + 0x10]
push eax
call fcn.0041bebc
mov ebx, dword [ebp - 0x38]
add esp, 0x10
mov ecx, dword [ebp - 0x34]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x40]
call fcn.00406690
test eax, eax
jne 0x4069d8
lea ecx, [ebp - 0x30]
call fcn.0040a462
xor ebx, ebx
jmp 0x4069fe
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x44], 0
jne 0x406822
lea ecx, [ebp - 0x30]
call fcn.0040a462
cmp dword [ebp + 0xc], 0
je 0x4069f9
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ebx, 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.0040a412
add esi, 0xfffffff0
mov byte [ebp - 4], 1
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406a28
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406a46
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 8]
add esi, 0xfffffff0
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406a6a
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
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.0041bcb9
mov esp, ebp
pop ebp
ret 8
call fcn.004021c0
int3