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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.00406989
test byte [ebp + 0xc], 8
mov dword [ebp - 0xc], eax
je 0x406ed0
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x472de8], eax
jmp 0x4070d0
push ebx
mov ebx, dword [ebp + 0xc]
and ebx, 1
push esi
mov dword [ebp - 4], ebx
je 0x406eef
test eax, eax
je 0x40704e
test byte [ebp + 0xc], 2
je 0x40704e
push edi
mov esi, 0x45c8b0
push esi
call fcn.004061b2
test ebx, ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrcatW]
je 0x406f0f
push str..
push esi
call ebx
jmp 0x406f15
push edi
call fcn.0040695c
cmp word [edi], 0
jne 0x406f25
cmp word [0x45c8b0], 0x5c
jne 0x406f2d
push 0x408838
push edi
call ebx
push edi
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
lea eax, [edi + eax*2]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x25c]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_FindFirstFileW]
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x40703e
lea esi, [ebp - 0x230]
push 0x3f
mov eax, esi
push eax
call fcn.00405ead
xor ebx, ebx
cmp word [eax], bx
je 0x406f74
cmp word [ebp - 0x28], bx
je 0x406f74
lea esi, [ebp - 0x28]
cmp word [esi], 0x2e
jne 0x406f97
movzx eax, word [esi + 2]
cmp ax, bx
je 0x40701b
cmp ax, 0x2e
jne 0x406f97
cmp word [esi + 4], bx
je 0x40701b
push esi
push dword [ebp - 8]
call fcn.004061b2
test byte [ebp - 0x25c], 0x10
je 0x406fbe
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x40701b
push dword [ebp + 0xc]
push edi
call fcn.00406e9d
jmp 0x40701b
push edi
push str.Delete:_DeleteFile___s__
call fcn.0040644e
pop ecx
pop ecx
push edi
call fcn.00405fd8
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
push edi
test eax, eax
jne 0x407014
test byte [ebp + 0xc], 4
je 0x407000
push str.Delete:_DeleteFile_on_Reboot___s__
call fcn.0040644e
pop ecx
pop ecx
push edi
push 0xfffffffffffffff1
call fcn.00405119
push ebx
push edi
call fcn.00406e6a
jmp 0x40701b
push str.Delete:_DeleteFile_failed___s__
call fcn.0040644e
inc dword [0x472de8]
pop ecx
pop ecx
jmp 0x40701b
push 0xfffffffffffffff2
call fcn.00405119
lea eax, [ebp - 0x25c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_FindNextFileW]
test eax, eax
jne 0x406f54
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_FindClose]
jmp 0x407040
xor ebx, ebx
cmp dword [ebp - 4], ebx
je 0x40704e
mov ecx, dword [ebp - 8]
xor eax, eax
mov word [ecx - 2], ax
xor esi, esi
cmp dword [ebp - 4], esi
je 0x4070ce
push edi
cmp dword [ebp - 0xc], esi
jne 0x407062
push str.RMDir:_RemoveDirectory_invalid_input___s__
jmp 0x4070b8
call fcn.00406480
test eax, eax
je 0x4070ce
push edi
call fcn.0040692d
push edi
push str.RMDir:_RemoveDirectory___s__
call fcn.0040644e
pop ecx
pop ecx
push edi
call fcn.00405fd8
push edi
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryW]
push edi
test eax, eax
jne 0x4070c7
test byte [ebp + 0xc], 4
je 0x4070b3
push str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.0040644e
pop ecx
pop ecx
push edi
push 0xfffffffffffffff1
call fcn.00405119
push esi
push edi
call fcn.00406e6a
jmp 0x4070ce
push str.RMDir:_RemoveDirectory_failed___s__
call fcn.0040644e
inc dword [0x472de8]
pop ecx
pop ecx
jmp 0x4070ce
push 0xffffffffffffffe5
call fcn.00405119
pop esi
pop ebx
pop edi
leave
ret 8