Function at 0x4080c9
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, 0x15c
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call fcn.00407d1a
test byte [ebp + 0xc], 8
push ecx
je 0x40810c
mov esi, dword [0x4337c4]
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
sete al
movzx eax, al
add esi, eax
push edx
mov dword [0x4337c4], esi
jmp 0x408357
mov edi, eax
mov eax, dword [ebp + 0xc]
and eax, 1
mov dword [ebp - 0x15c], eax
je 0x40812e
test edi, edi
je 0x40833d
test byte [ebp + 0xc], 2
je 0x4082e6
mov dword [esp + 4], ebx
mov dword [esp], 0x431db4
call fcn.00407881
cmp dword [ebp - 0x15c], 0
push eax
push eax
je 0x408161
mov dword [esp + 4], str..
mov dword [esp], 0x431db4
call fcn.004078b4
push eax
push eax
jmp 0x40816a
mov dword [esp], ebx
call fcn.00407496
push eax
cmp byte [ebx], 0
jne 0x408178
cmp byte [0x431db4], 0x5c
jne 0x40818a
mov dword [esp + 4], 0x40b384
mov dword [esp], ebx
call fcn.004078b4
push eax
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, ebx
push ecx
mov dword [ebp - 0x160], eax
lea eax, [ebp - 0x158]
mov dword [esp + 4], eax
mov dword [esp], 0x431db4
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
push esi
push esi
mov esi, eax
je 0x4082cf
lea eax, [ebp - 0x12c]
mov dword [esp + 4], 0x3f
mov dword [esp], eax
call fcn.0040746c
push edx
push edx
cmp byte [eax], 0
jne 0x4081eb
mov dl, byte [ebp - 0x12c]
lea eax, [ebp - 0x12c]
jmp 0x4081f5
mov dl, byte [ebp - 0x28]
test dl, dl
je 0x4081dd
lea eax, [ebp - 0x28]
cmp dl, 0x2e
jne 0x408214
mov dl, byte [eax + 1]
test dl, dl
je 0x4082a8
cmp dl, 0x2e
jne 0x408214
cmp byte [eax + 2], 0
je 0x4082a8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call fcn.00407881
test byte [ebp - 0x158], 0x10
push ecx
push ecx
je 0x40824d
mov eax, dword [ebp + 0xc]
and eax, 3
cmp eax, 3
jne 0x4082a8
mov eax, dword [ebp + 0xc]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.004080c9
jmp 0x4082a6
mov dword [esp], ebx
call fcn.0040760d
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
push edx
jne 0x408296
test byte [ebp + 0xc], 4
je 0x40828e
mov dword [esp + 4], ebx
mov dword [esp], 0xfffffff1
call fcn.00406c5d
push eax
push eax
mov dword [esp], ebx
mov dword [esp + 4], 0
call fcn.00407e26
jmp 0x4082a6
inc dword [0x4337c4]
jmp 0x4082a8
mov dword [esp + 4], ebx
mov dword [esp], 0xfffffff2
call fcn.00406c5d
push ecx
push ecx
lea eax, [ebp - 0x158]
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
push edx
push edx
jne 0x4081c0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
cmp dword [ebp - 0x15c], 0
je 0x408357
mov eax, dword [ebp - 0x160]
test edi, edi
mov byte [eax - 1], 0
je 0x40833d
mov dword [esp], ebx
call fcn.00407ce2
test eax, eax
push ecx
je 0x408357
mov dword [esp], ebx
call fcn.004078bf
push edi
mov dword [esp], ebx
call fcn.0040760d
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
push edx
jne 0x408345
test byte [ebp + 0xc], 4
je 0x40833d
mov dword [esp + 4], ebx
mov dword [esp], 0xfffffff1
call fcn.00406c5d
push esi
push esi
mov dword [esp], ebx
mov dword [esp + 4], 0
call fcn.00407e26
jmp 0x408355
inc dword [0x4337c4]
jmp 0x408357
mov dword [esp + 4], ebx
mov dword [esp], 0xffffffe5
call fcn.00406c5d
push ecx
push ecx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8