Function at 0x406be9
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x260
push ebx
push esi
mov esi, dword [esp + 0x26c]
push esi
call fcn.004069f9
mov ebx, dword [esp + 0x270]
mov dword [esp + 0xc], eax
test bl, 8
je 0x406c25
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x473e88], eax
jmp 0x406e37
push ebp
push edi
mov edi, ebx
and edi, 1
push 0
mov dword [esp + 0x20], edi
pop ebp
je 0x406c46
test eax, eax
je 0x406dba
test bl, 2
je 0x406dba
push esi
push 0x4582c0
call fcn.00407220
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatW]
test edi, edi
je 0x406c69
push str..
push 0x4582c0
call ebp
jmp 0x406c6f
push esi
call fcn.00407379
xor eax, eax
cmp word [esi], ax
jne 0x406c80
cmp word [0x4582c0], 0x5c
jne 0x406c88
push 0x409a54
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebp, [esi + eax*2]
lea eax, [esp + 0x20]
mov dword [esp + 0x10], ebp
push eax
push 0x4582c0
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
je 0x406daa
mov edi, eax
lea ebp, [esp + 0x4c]
push 0x3f
mov eax, ebp
push eax
call fcn.004069da
xor ecx, ecx
cmp word [eax], cx
je 0x406cde
cmp word [esp + 0x254], cx
lea eax, [esp + 0x254]
cmove eax, ebp
mov ebp, eax
push 0x2e
pop edx
cmp word [ebp], dx
jne 0x406d03
movzx eax, word [ebp + 2]
test ax, ax
je 0x406d87
cmp ax, dx
jne 0x406d03
cmp word [ebp + 4], cx
je 0x406d87
push ebp
mov ebp, dword [esp + 0x14]
push ebp
call fcn.00407220
test byte [esp + 0x20], 0x10
je 0x406d27
mov eax, ebx
and eax, 3
cmp al, 3
jne 0x406d8b
push ebx
push esi
call fcn.00406be9
jmp 0x406d8b
push esi
push str.Delete:_DeleteFile___s__
call fcn.00406a77
pop ecx
pop ecx
push esi
call fcn.004072f9
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
test eax, eax
jne 0x406d7e
test bl, 4
je 0x406d6a
push str.Delete:_DeleteFile_on_Reboot___s__
call fcn.00406a77
pop ecx
pop ecx
push esi
push 0xfffffffffffffff1
call fcn.00405eef
xor eax, eax
push eax
push esi
call fcn.00406659
jmp 0x406d8b
push str.Delete:_DeleteFile_failed___s__
call fcn.00406a77
inc dword [0x473e88]
pop ecx
pop ecx
jmp 0x406d8b
push 0xfffffffffffffff2
call fcn.00405eef
jmp 0x406d8b
mov ebp, dword [esp + 0x10]
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x406cb5
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x406db4
xor eax, eax
mov word [ebp - 2], ax
mov eax, dword [esp + 0x14]
xor ebp, ebp
test edi, edi
je 0x406e35
push esi
test eax, eax
jne 0x406dca
push str.RMDir:_RemoveDirectory_invalid_input___s__
jmp 0x406e1f
call fcn.004069b3
test eax, eax
je 0x406e35
push esi
call fcn.00406984
push esi
push str.RMDir:_RemoveDirectory___s__
call fcn.00406a77
pop ecx
pop ecx
push esi
call fcn.004072f9
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push esi
test eax, eax
jne 0x406e2e
test bl, 4
je 0x406e1a
push str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.00406a77
pop ecx
pop ecx
push esi
push 0xfffffffffffffff1
call fcn.00405eef
push ebp
push esi
call fcn.00406659
jmp 0x406e35
push str.RMDir:_RemoveDirectory_failed___s__
call fcn.00406a77
inc dword [0x473e88]
pop ecx
pop ecx
jmp 0x406e35
push 0xffffffffffffffe5
call fcn.00405eef
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x260
ret 8