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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x158
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push esi
call fcn.00406733
add esp, 0xc
test edi, 8
mov dword [ebp - 0x150], eax
je 0x406b20
sub esp, 0xc
mov ebx, dword [0x42f8f0]
push esi
call sub.KERNEL32.dll_DeleteFileA
add esp, 0xc
test eax, eax
sete al
movzx eax, al
add eax, ebx
mov dword [0x42f8f0], eax
jmp 0x406d2a
mov eax, edi
and eax, 1
mov dword [ebp - 0x158], eax
je 0x406b46
cmp dword [ebp - 0x150], 0
je 0x406d16
test edi, 2
je 0x406cd1
push eax
push 0x400
push esi
push 0x42dea8
call sub.KERNEL32.dll_lstrcpynA
cmp dword [ebp - 0x158], 0
pop eax
je 0x406b76
push eax
push eax
push str..
push 0x42dea8
call sub.KERNEL32.dll_lstrcatA
pop ebx
pop eax
jmp 0x406b82
sub esp, 0xc
push esi
call fcn.004062e5
add esp, 0xc
cmp byte [esi], 0
jne 0x406b90
cmp byte [0x42dea8], 0x5c
jne 0x406b9f
push ecx
push ecx
push 0x40a38d
push esi
call sub.KERNEL32.dll_lstrcatA
pop eax
pop edx
sub esp, 0xc
push esi
call sub.KERNEL32.dll_lstrlenA
lea eax, [esi + eax]
sub esp, 0xc
mov dword [ebp - 0x154], eax
lea eax, [ebp - 0x14c]
push eax
push 0x42dea8
call sub.KERNEL32.dll_FindFirstFileA
add esp, 0x18
cmp eax, 0xffffffff
mov ebx, eax
je 0x406cb5
push eax
push eax
push 0x3f
lea eax, [ebp - 0x120]
push eax
call fcn.0040616a
pop edx
pop ecx
cmp byte [eax], 0
je 0x406bf4
mov al, byte [ebp - 0x1c]
lea edx, [ebp - 0x1c]
test al, al
jne 0x406c00
mov al, byte [ebp - 0x120]
lea edx, [ebp - 0x120]
cmp al, 0x2e
jne 0x406c19
mov al, byte [edx + 1]
test al, al
je 0x406c90
cmp al, 0x2e
jne 0x406c19
cmp byte [edx + 2], 0
je 0x406c90
push eax
push 0x400
push edx
push dword [ebp - 0x154]
call sub.KERNEL32.dll_lstrcpynA
test byte [ebp - 0x14c], 0x10
pop eax
je 0x406c4a
mov eax, edi
and eax, 3
cmp eax, 3
jne 0x406c90
push eax
push eax
push edi
push esi
call fcn.00406ad1
jmp 0x406c8e
sub esp, 0xc
push esi
call fcn.0040682f
push esi
call sub.KERNEL32.dll_DeleteFileA
add esp, 0xc
test eax, eax
jne 0x406c84
test edi, 4
je 0x406c7c
push eax
push eax
push esi
push 0xfffffffffffffff1
call fcn.00403d54
push 0
push esi
call fcn.004068c2
jmp 0x406c8e
inc dword [0x42f8f0]
jmp 0x406c90
push ecx
push ecx
push esi
push 0xfffffffffffffff2
call fcn.00403d54
pop eax
pop edx
push eax
push eax
lea eax, [ebp - 0x14c]
push eax
push ebx
call sub.KERNEL32.dll_FindNextFileA
pop edx
pop ecx
test eax, eax
jne 0x406bd3
sub esp, 0xc
push ebx
call sub.KERNEL32.dll_FindClose
add esp, 0xc
cmp dword [ebp - 0x158], 0
je 0x406d2a
mov eax, dword [ebp - 0x154]
mov byte [eax - 1], 0
cmp dword [ebp - 0x150], 0
je 0x406d16
sub esp, 0xc
push esi
call fcn.00406137
add esp, 0xc
test eax, eax
je 0x406d2a
sub esp, 0xc
push esi
call fcn.0040631a
push esi
call fcn.0040682f
push esi
call sub.KERNEL32.dll_RemoveDirectoryA
add esp, 0xc
test eax, eax
jne 0x406d1e
and edi, 4
je 0x406d16
push eax
push eax
push esi
push 0xfffffffffffffff1
call fcn.00403d54
push 0
push esi
call fcn.004068c2
jmp 0x406d28
inc dword [0x42f8f0]
jmp 0x406d2a
push edi
push edi
push esi
push 0xffffffffffffffe5
call fcn.00403d54
pop ecx
pop ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8