Function at 0x406d76
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.00406b86
mov ebx, dword [esp + 0x270]
mov dword [esp + 0xc], eax
test bl, 8
je 0x406db2
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x959d88], eax
jmp 0x406fc4
push ebp
push edi
mov edi, ebx
and edi, 1
push 0
mov dword [esp + 0x20], edi
pop ebp
je 0x406dd3
test eax, eax
je 0x406f47
test bl, 2
je 0x406f47
push esi
push 0x8d2480
call fcn.00407254
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatW]
test edi, edi
je 0x406df6
push str..
push 0x8d2480
call ebp
jmp 0x406dfc
push esi
call fcn.00407352
xor eax, eax
cmp word [esi], ax
jne 0x406e0d
cmp word [0x8d2480], 0x5c
jne 0x406e15
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 0x8d2480
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
je 0x406f37
mov edi, eax
lea ebp, [esp + 0x4c]
push 0x3f
mov eax, ebp
push eax
call fcn.00406b67
xor ecx, ecx
cmp word [eax], cx
je 0x406e6b
cmp word [esp + 0x254], cx
lea eax, [esp + 0x254]
cmove eax, ebp
mov ebp, eax
push 0x2e
pop edx
cmp word [ebp], dx
jne 0x406e90
movzx eax, word [ebp + 2]
test ax, ax
je 0x406f14
cmp ax, dx
jne 0x406e90
cmp word [ebp + 4], cx
je 0x406f14
push ebp
mov ebp, dword [esp + 0x14]
push ebp
call fcn.00407254
test byte [esp + 0x20], 0x10
je 0x406eb4
mov eax, ebx
and eax, 3
cmp al, 3
jne 0x406f18
push ebx
push esi
call fcn.00406d76
jmp 0x406f18
push esi
push str.Delete:_DeleteFile___s__
call fcn.00406c04
pop ecx
pop ecx
push esi
call fcn.004072d2
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
test eax, eax
jne 0x406f0b
test bl, 4
je 0x406ef7
push str.Delete:_DeleteFile_on_Reboot___s__
call fcn.00406c04
pop ecx
pop ecx
push esi
push 0xfffffffffffffff1
call fcn.0040607c
xor eax, eax
push eax
push esi
call fcn.004067e6
jmp 0x406f18
push str.Delete:_DeleteFile_failed___s__
call fcn.00406c04
inc dword [0x959d88]
pop ecx
pop ecx
jmp 0x406f18
push 0xfffffffffffffff2
call fcn.0040607c
jmp 0x406f18
mov ebp, dword [esp + 0x10]
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x406e42
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x406f41
xor eax, eax
mov word [ebp - 2], ax
mov eax, dword [esp + 0x14]
xor ebp, ebp
test edi, edi
je 0x406fc2
push esi
test eax, eax
jne 0x406f57
push str.RMDir:_RemoveDirectory_invalid_input___s__
jmp 0x406fac
call fcn.00406b40
test eax, eax
je 0x406fc2
push esi
call fcn.00406b11
push esi
push str.RMDir:_RemoveDirectory___s__
call fcn.00406c04
pop ecx
pop ecx
push esi
call fcn.004072d2
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push esi
test eax, eax
jne 0x406fbb
test bl, 4
je 0x406fa7
push str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.00406c04
pop ecx
pop ecx
push esi
push 0xfffffffffffffff1
call fcn.0040607c
push ebp
push esi
call fcn.004067e6
jmp 0x406fc2
push str.RMDir:_RemoveDirectory_failed___s__
call fcn.00406c04
inc dword [0x959d88]
pop ecx
pop ecx
jmp 0x406fc2
push 0xffffffffffffffe5
call fcn.0040607c
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x260
ret 8