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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
cmp dword [ebp + 0x10], 0
jne 0x40d1a0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x40d3fb
mov dword [ebp - 4], 1
cmp dword [ebp + 0xc], 0
jne 0x40d1c7
mov ecx, dword [ebp + 8]
push ecx
push str._s.
lea edx, [ebp - 0x204]
push edx
call fcn.00427d10
add esp, 0xc
jmp 0x40d1e3
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str._s_s.
lea edx, [ebp - 0x204]
push edx
call fcn.00427d10
add esp, 0x10
lea eax, [ebp - 0x344]
push eax
lea ecx, [ebp - 0x204]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x348], eax
cmp dword [ebp - 0x348], 0xffffffff
je 0x40d3ac
cmp dword [ebp - 4], 0
je 0x40d3ac
mov edx, dword [ebp - 0x344]
and edx, 0x10
test edx, edx
jne 0x40d2a8
lea eax, [ebp - 0x318]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0x4cbc78
lea edx, [ebp - 0x204]
push edx
call fcn.00427d10
add esp, 0x10
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40d269
mov ecx, dword [ebp - 0x348]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x40d400
cmp dword [ebp + 0x1c], 0
je 0x40d2a3
cmp dword [ebp + 0x14], 0
jle 0x40d2a3
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx]
add eax, 1
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], eax
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x14]
cmp eax, dword [edx]
jg 0x40d2a3
mov ecx, dword [ebp - 0x348]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, 2
jmp 0x40d400
jmp 0x40d390
push 0x4cbc80
lea edx, [ebp - 0x318]
push edx
call fcn.00472700
add esp, 8
test eax, eax
je 0x40d390
push 0x4cbc84
lea eax, [ebp - 0x318]
push eax
call fcn.00472700
add esp, 8
test eax, eax
je 0x40d390
lea ecx, [ebp - 0x318]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0x4cbc88
lea eax, [ebp - 0x204]
push eax
call fcn.00427d10
add esp, 0x10
mov ecx, dword [ebp + 0x20]
push ecx
mov edx, dword [ebp + 0x1c]
push edx
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
xor edx, edx
cmp dword [ebp + 0x10], 2
setne dl
dec edx
and edx, 2
push edx
push 0
lea eax, [ebp - 0x204]
push eax
call fcn.0040d17f
add esp, 0x1c
mov dword [ebp - 0x34c], eax
cmp dword [ebp - 0x34c], 0
je 0x40d351
cmp dword [ebp - 0x34c], 2
je 0x40d365
cmp dword [ebp - 0x34c], 3
je 0x40d37c
jmp 0x40d390
mov ecx, dword [ebp - 0x348]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x40d400
mov edx, dword [ebp - 0x348]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, 2
jmp 0x40d400
mov eax, dword [ebp - 0x348]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, 3
jmp 0x40d400
lea ecx, [ebp - 0x344]
push ecx
mov edx, dword [ebp - 0x348]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov dword [ebp - 4], eax
jmp 0x40d1fd
mov eax, dword [ebp - 0x348]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 0x10], 0
jne 0x40d3fb
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x40d3d1
xor eax, eax
jmp 0x40d400
cmp dword [ebp + 0x20], 0
je 0x40d3fb
cmp dword [ebp + 0x18], 0
jle 0x40d3fb
mov edx, dword [ebp + 0x20]
mov eax, dword [edx]
add eax, 1
mov ecx, dword [ebp + 0x20]
mov dword [ecx], eax
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x18]
cmp eax, dword [edx]
jg 0x40d3fb
mov eax, 3
jmp 0x40d400
mov eax, 1
mov esp, ebp
pop ebp
ret