Function at 0x40d387
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
and dword [ebp - 4], 0
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x40d648
cmp byte [esi], 0
je 0x40d648
push 0x104
lea eax, [ebp - 0x10c]
push esi
push eax
call sub.MSVCRT.dll_strncpy
push esi
mov byte [ebp - 8], 0
call sub.MSVCRT.dll_strlen
add esp, 0x10
test eax, eax
je 0x40d3e6
cmp byte [eax + esi - 1], 0x5c
je 0x40d3e6
lea eax, [ebp - 0x10c]
push 0x42523c
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
push ebx
push edi
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x354]
push eax
call sub.MSVCRT.dll_strcpy
mov ebx, dword [ebp + 0xc]
test ebx, ebx
mov edi, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
pop ecx
pop ecx
mov esi, 0x425238
je 0x40d50b
cmp byte [ebx], 0
je 0x40d50b
push esi
push ebx
call sub.MSVCRT.dll_strcmp
test eax, eax
pop ecx
pop ecx
je 0x40d50b
test byte [ebp + 0x10], 1
je 0x40d511
lea eax, [ebp - 0x354]
push eax
lea eax, [ebp - 0x10c]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x10c]
push esi
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x10c]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x40d502
lea eax, [ebp - 0x354]
push eax
lea eax, [ebp - 0x10c]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x10c]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
test byte [ebp - 0x24c], 0x10
je 0x40d4e5
lea eax, [ebp - 0x220]
push 0x425234
push eax
call sub.MSVCRT.dll_strcmp
test eax, eax
pop ecx
pop ecx
je 0x40d4e5
lea eax, [ebp - 0x220]
push 0x425230
push eax
call sub.MSVCRT.dll_strcmp
test eax, eax
pop ecx
pop ecx
je 0x40d4e5
push dword [ebp + 0x10]
lea eax, [ebp - 0x10c]
push ebx
push eax
call fcn.0040d387
lea eax, [ebp - 0x24c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40d475
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp + 8], 1
jmp 0x40d511
and dword [ebp + 8], 0
mov ebx, esi
lea eax, [ebp - 0x354]
push eax
lea eax, [ebp - 0x10c]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x10c]
push ebx
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x10c]
push eax
call edi
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
je 0x40d646
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, pe_nt_image_headers32
lea eax, [ebp - 0x354]
push eax
lea eax, [ebp - 0x10c]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x10c]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
test byte [ebp - 0x24c], 0x10
je 0x40d5d9
cmp dword [ebp + 8], 0
jne 0x40d5f6
test byte [ebp + 0x10], 1
je 0x40d5f6
lea eax, [ebp - 0x220]
push 0x425234
push eax
call sub.MSVCRT.dll_strcmp
test eax, eax
pop ecx
pop ecx
je 0x40d5f6
lea eax, [ebp - 0x220]
push 0x425230
push eax
call sub.MSVCRT.dll_strcmp
test eax, eax
pop ecx
pop ecx
je 0x40d5f6
push dword [ebp + 0x10]
lea eax, [ebp - 0x10c]
push ebx
push eax
call fcn.0040d387
jmp 0x40d5f6
test byte [ebp + 0x10], 2
je 0x40d5e9
push edi
lea eax, [ebp - 0x10c]
push eax
call esi
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x24c]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40d55b
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindClose]
test byte [ebp + 0x10], 2
je 0x40d627
push edi
lea eax, [ebp - 0x354]
push eax
call esi
cmp dword [ebp + 8], 0
je 0x40d636
mov dword [ebp - 4], 1
jmp 0x40d646
lea eax, [ebp - 0x354]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov dword [ebp - 4], eax
pop edi
pop ebx
mov eax, dword [ebp - 4]
pop esi
leave
ret 0xc