Function at 0x406480
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Print debug messages
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b9cec
mov eax, dword fs:[0]
push eax
sub esp, 0x468
mov eax, dword [0x4ce028]
xor eax, esp
mov dword [esp + 0x460], eax
push ebx
push esi
push edi
mov eax, dword [0x4ce028]
xor eax, esp
push eax
lea eax, [esp + 0x478]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [esp + 0x264]
push 0x104
push eax
mov dword [esp + 0x18], edi
mov esi, 1
call dword [sym.imp.MSVCR90.dll__wgetcwd]
add esp, 8
test eax, eax
je 0x406679
push edi
call dword [sym.imp.MSVCR90.dll__wchdir]
add esp, 4
test eax, eax
jne 0x406679
lea ecx, [esp + 0x14]
push ecx
push 0x4bf198
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4065f0
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ecx, 0x4be690
lea eax, [esp + 0x40]
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x406556
test dx, dx
je 0x406552
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x406556
add eax, 4
add ecx, 4
test dx, dx
jne 0x406530
xor eax, eax
jmp 0x40655b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4065dd
mov ecx, 0x4bf1a0
lea eax, [esp + 0x40]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40658e
test dx, dx
je 0x40658a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40658e
add eax, 4
add ecx, 4
test dx, dx
jne 0x406568
xor eax, eax
jmp 0x406593
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4065dd
test byte [esp + 0x14], 0x10
je 0x4065b6
lea edx, [esp + 0x40]
push edx
call fcn.00406480
add esp, 4
test eax, eax
jne 0x4065dd
xor eax, eax
jmp 0x40667b
push 0x80
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40669f
lea ecx, [esp + 0x40]
push ecx
call ebx
test eax, eax
je 0x40669f
lea edx, [esp + 0x14]
push edx
push edi
call esi
test eax, eax
jne 0x406523
lea esi, [eax + 1]
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [esp + 0x264]
push eax
call dword [sym.imp.MSVCR90.dll__wchdir]
add esp, 4
test esi, esi
je 0x406679
mov edi, dword [esp + 0x10]
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x4065af
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x406679
lea ecx, [esp + 0x10]
call dword [0x4bd7a8]
mov dword [esp + 0x480], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x14]
push 0x4bf1a8
push ecx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
mov edx, dword [esp + 0x1c]
add esp, 0xc
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [esp + 0x10]
xor esi, esi
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, esi
mov ecx, dword [esp + 0x478]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x460]
xor ecx, esp
call fcn.0042bebe
mov esp, ebp
pop ebp
ret
xor esi, esi
jmp 0x4065f0