Function at 0x406bfe
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, 0x168
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push esi
call fcn.00406872
add esp, 0xc
mov dword [ebp - 0x150], eax
test edi, 8
je 0x406c4d
sub esp, 0xc
mov ebx, dword [0x440c50]
push esi
call sub.KERNEL32.dll_DeleteFileA
add esp, 0xc
test eax, eax
sete al
movzx eax, al
add eax, ebx
mov dword [0x440c50], eax
jmp 0x406e5d
mov eax, edi
and eax, 1
mov dword [ebp - 0x15c], eax
je 0x406c73
cmp dword [ebp - 0x150], 0
je 0x406e49
test edi, 2
je 0x406e04
push ebx
push ebx
push esi
push 0x43e7b8
call fcn.004064a4
mov al, byte [ebp - 0x15c]
pop edx
mov byte [ebp - 0x155], al
pop ecx
test al, al
je 0x406ca7
push eax
push eax
push str..
push 0x43e7b8
call fcn.00406420
pop ebx
pop eax
jmp 0x406cb3
sub esp, 0xc
push esi
call fcn.00406432
add esp, 0xc
cmp byte [esi], 0
jne 0x406cc1
cmp byte [0x43e7b8], 0x5c
jne 0x406cd0
push ecx
push ecx
push 0x40a3e5
push esi
call fcn.00406420
pop eax
pop edx
sub esp, 0xc
push esi
call fcn.00406429
sub esp, 0xc
lea eax, [esi + eax]
mov dword [ebp - 0x154], eax
lea eax, [ebp - 0x14c]
push eax
push 0x43e7b8
call sub.KERNEL32.dll_FindFirstFileA
add esp, 0x18
mov ebx, eax
cmp eax, 0xffffffff
je 0x406ddf
push eax
push eax
lea eax, [ebp - 0x120]
push 0x3f
push eax
call fcn.004062d5
pop edx
lea edx, [ebp - 0x120]
pop ecx
cmp byte [eax], 0
je 0x406d30
lea edx, [ebp - 0x1c]
cmp byte [ebp - 0x1c], 0
jne 0x406d30
lea edx, [ebp - 0x120]
cmp byte [edx], 0x2e
jne 0x406d46
mov al, byte [edx + 1]
test al, al
je 0x406dba
cmp al, 0x2e
jne 0x406d46
cmp byte [edx + 2], 0
je 0x406dba
push ecx
push ecx
push edx
push dword [ebp - 0x154]
call fcn.004064a4
test byte [ebp - 0x14c], 0x10
pop eax
pop edx
je 0x406d74
mov eax, edi
and eax, 3
cmp eax, 3
jne 0x406dba
push eax
push eax
push edi
push esi
call fcn.00406bfe
jmp 0x406db8
sub esp, 0xc
push esi
call fcn.00406968
push esi
call sub.KERNEL32.dll_DeleteFileA
add esp, 0xc
test eax, eax
jne 0x406dae
test edi, 4
je 0x406da6
push eax
push eax
push esi
push 0xfffffffffffffff1
call fcn.00403f43
push 0
push esi
call fcn.004069fb
jmp 0x406db8
inc dword [0x440c50]
jmp 0x406dba
push ecx
push ecx
push esi
push 0xfffffffffffffff2
call fcn.00403f43
pop eax
pop edx
push eax
push eax
lea eax, [ebp - 0x14c]
push eax
push ebx
call sub.KERNEL32.dll_FindNextFileA
pop edx
test eax, eax
pop ecx
jne 0x406d04
sub esp, 0xc
push ebx
call sub.KERNEL32.dll_FindClose
add esp, 0xc
cmp byte [ebp - 0x155], 0
je 0x406df2
mov eax, dword [ebp - 0x154]
mov byte [eax - 1], 0
cmp dword [ebp - 0x15c], 0
je 0x406e5d
cmp dword [ebp - 0x150], 0
je 0x406e49
sub esp, 0xc
push esi
call fcn.004062a2
add esp, 0xc
test eax, eax
je 0x406e5d
sub esp, 0xc
push esi
call fcn.00406467
push esi
call fcn.00406968
push esi
call sub.KERNEL32.dll_RemoveDirectoryA
add esp, 0xc
test eax, eax
jne 0x406e51
and edi, 4
je 0x406e49
push eax
push eax
push esi
push 0xfffffffffffffff1
call fcn.00403f43
push 0
push esi
call fcn.004069fb
jmp 0x406e5b
inc dword [0x440c50]
jmp 0x406e5d
push edi
push edi
push esi
push 0xffffffffffffffe5
call fcn.00403f43
pop ecx
pop ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8