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

Disassembly:
sub esp, 0x66c
push esi
mov esi, dword [esp + 0x674]
push edi
xor edi, edi
test esi, esi
je 0x516dea
cmp word [esi], di
je 0x516dea
push ebx
mov ebx, 0x104
lea eax, [esp + 0x10]
push ebx
push esi
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
push esi
mov word [esp + 0x228], ax
call sub.MSVCRT.dll_wcslen
add esp, 0x10
test eax, eax
je 0x516b8a
cmp eax, ebx
jge 0x516b8a
cmp word [esi + eax*2 - 2], 0x5c
je 0x516b8a
lea eax, [esp + 0x10]
push 0x5cd2a8
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
push ebp
push ebx
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x478]
push eax
call sub.MSVCRT.dll_wcsncpy
mov ebp, dword [esp + 0x690]
xor eax, eax
mov ebx, dword [esp + 0x694]
add esp, 0xc
mov word [esp + 0x678], ax
mov esi, 0x5cd2b4
test ebp, ebp
je 0x516cb9
cmp word [ebp], di
je 0x516cb9
push esi
push ebp
call sub.MSVCRT.dll_wcscmp
pop ecx
pop ecx
test eax, eax
je 0x516cb9
test bl, 1
je 0x516cb3
lea eax, [esp + 0x470]
push eax
push str._s.
lea eax, [esp + 0x1c]
push 0x104
push eax
call sub.MSVCRT.dll__snwprintf
add esp, 0x10
lea eax, [esp + 0x220]
push eax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x516cae
lea eax, [esp + 0x24c]
push eax
lea eax, [esp + 0x474]
push eax
push 0x5cd86c
lea eax, [esp + 0x20]
push 0x104
push eax
call sub.MSVCRT.dll__snwprintf
add esp, 0x14
test byte [esp + 0x220], 0x10
je 0x516c94
lea eax, [esp + 0x24c]
push 0x5cd2c0
push eax
call sub.MSVCRT.dll_wcscmp
pop ecx
pop ecx
test eax, eax
je 0x516c94
lea eax, [esp + 0x24c]
push 0x5cd2bc
push eax
call sub.MSVCRT.dll_wcscmp
pop ecx
pop ecx
test eax, eax
je 0x516c94
push ebx
push ebp
lea eax, [esp + 0x1c]
push eax
call fcn.00516b22
lea eax, [esp + 0x220]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x516c27
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor esi, esi
inc esi
jmp 0x516cbd
mov esi, dword [esp + 0x10]
jmp 0x516cbd
mov ebp, esi
mov esi, edi
push ebp
lea eax, [esp + 0x474]
push eax
push 0x5cd86c
lea eax, [esp + 0x20]
push 0x104
push eax
call sub.MSVCRT.dll__snwprintf
add esp, 0x14
lea eax, [esp + 0x220]
push eax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x516de8
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [esp + 0x24c]
push eax
lea eax, [esp + 0x474]
push eax
push 0x5cd86c
lea eax, [esp + 0x20]
push 0x104
push eax
call sub.MSVCRT.dll__snwprintf
add esp, 0x14
test byte [esp + 0x220], 0x10
je 0x516d7b
test esi, esi
jne 0x516d97
test bl, 1
je 0x516d97
lea eax, [esp + 0x24c]
push 0x5cd2c0
push eax
call sub.MSVCRT.dll_wcscmp
pop ecx
pop ecx
test eax, eax
je 0x516d97
lea eax, [esp + 0x24c]
push 0x5cd2bc
push eax
call sub.MSVCRT.dll_wcscmp
pop ecx
pop ecx
test eax, eax
je 0x516d97
push ebx
push ebp
lea eax, [esp + 0x1c]
push eax
call fcn.00516b22
jmp 0x516d97
test bl, 2
je 0x516d8c
push pe_nt_image_headers32
lea eax, [esp + 0x18]
push eax
call edi
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x220]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x516d03
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_FindClose]
test bl, 2
je 0x516dcf
push pe_nt_image_headers32
lea eax, [esp + 0x474]
push eax
call edi
test esi, esi
je 0x516dd8
xor edi, edi
inc edi
jmp 0x516de8
lea eax, [esp + 0x470]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov edi, eax
pop ebp
pop ebx
mov eax, edi
pop edi
pop esi
add esp, 0x66c
ret 0xc