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

Disassembly:
push 0xffffffffffffffff
push 0x5db0cc
mov eax, dword fs:[0]
push eax
sub esp, 0x2ac
mov eax, dword [0x66d4f4]
xor eax, esp
mov dword [esp + 0x2a8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x66d4f4]
xor eax, esp
push eax
lea eax, [esp + 0x2c0]
mov dword fs:[0], eax
mov ecx, dword [esp + 0x2d0]
xor ebp, ebp
cmp ecx, ebp
je 0x509325
cmp byte [ecx], 0
je 0x509325
mov edi, 0xf
mov eax, ecx
mov dword [esp + 0x178], edi
mov dword [esp + 0x174], ebp
mov byte [esp + 0x164], 0
lea esi, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x5091f5
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x168]
call fcn.00408ea0
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x164]
mov dword [esp + 0x2cc], ebp
call fcn.004252f0
mov ecx, eax
call fcn.00425780
cmp byte [eax], 0x5c
je 0x509242
push 0x5c
push 1
lea ecx, [esp + 0x168]
call fcn.00406640
push 1
push 2
lea ecx, [esp + 0xe8]
call fcn.0040a750
push 0x60123c
lea ecx, [esp + 0x164]
push ecx
lea edx, [esp + 0xe8]
push edx
mov byte [esp + 0x2d4], 1
call fcn.00408950
add esp, 8
push eax
call fcn.00409270
add esp, 8
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0xe4]
call fcn.00408c00
mov ebx, 0x10
cmp dword [eax + 0x18], ebx
jb 0x5092a0
mov eax, dword [eax + 4]
jmp 0x5092a3
add eax, 4
lea ecx, [esp + 0x17c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp dword [esp + 0x50], ebx
mov esi, eax
mov dword [esp + 0x14], esi
jb 0x5092cb
mov edx, dword [esp + 0x3c]
push edx
call fcn.005a1b1d
add esp, 4
cmp esi, 0xffffffff
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebp
mov byte [esp + 0x3c], 0
jne 0x509352
lea ecx, [esp + 0x12c]
mov byte [esp + 0x2c8], 0
call fcn.00409510
lea eax, [esp + 0x12c]
push eax
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
cmp dword [esp + 0x178], ebx
jb 0x509325
mov ecx, dword [esp + 0x164]
push ecx
call fcn.005a1b1d
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x2c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2a8]
xor ecx, esp
call fcn.005bd2d7
add esp, 0x2b8
ret
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push 2
lea ecx, [esp + 0x68]
call fcn.0040a750
lea edx, [esp + 0x1a8]
push edx
lea eax, [esp + 0x164]
push eax
lea ecx, [esp + 0x68]
push ecx
mov byte [esp + 0x2d4], 2
call fcn.00408950
add esp, 8
push eax
call fcn.00409270
mov edx, dword [esp + 0x184]
and edx, ebx
add esp, 8
cmp dl, bl
jne 0x509433
mov edi, 0x63b668
lea esi, [esp + 0x1a8]
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x509412
mov edi, 0x601240
lea esi, [esp + 0x1a8]
mov ecx, 3
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x509412
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x64]
call fcn.00408c00
cmp dword [eax + 0x18], ebx
mov byte [esp + 0x2c8], 3
jb 0x5093f2
mov eax, dword [eax + 4]
jmp 0x5093f5
add eax, 4
push eax
call fcn.00509180
add esp, 4
cmp dword [esp + 0x34], ebx
jb 0x5094a3
mov ecx, dword [esp + 0x20]
push ecx
jmp 0x50949b
lea ecx, [esp + 0xac]
mov byte [esp + 0x2c8], 1
call fcn.00409510
lea edx, [esp + 0xac]
push edx
jmp 0x5094bf
push 1
call ebp
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x64]
call fcn.00408c00
cmp dword [eax + 0x18], ebx
jb 0x50944f
mov eax, dword [eax + 4]
jmp 0x509452
add eax, 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp dword [esp + 0x34], ebx
jb 0x50946e
mov ecx, dword [esp + 0x20]
push ecx
call fcn.005a1b1d
add esp, 4
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x64]
call fcn.00408c00
cmp dword [eax + 0x18], ebx
jb 0x509486
mov eax, dword [eax + 4]
jmp 0x509489
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0x34], ebx
jb 0x5094a3
mov eax, dword [esp + 0x20]
push eax
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0xac]
mov byte [esp + 0x2c8], 1
call fcn.00409510
lea ecx, [esp + 0xac]
push ecx
mov dword [esp + 0xb0], vtable.std::ios_base.0
call fcn.005d9cc4
mov esi, dword [esp + 0x18]
add esp, 4
lea edx, [esp + 0x17c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x509358
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x178]
cmp ecx, ebx
mov edi, dword [esp + 0x164]
mov eax, edi
jae 0x50950f
lea eax, [esp + 0x164]
mov edx, dword [esp + 0x174]
lea esi, [eax + edx]
test esi, esi
je 0x509541
cmp ecx, ebx
mov eax, edi
jae 0x50952a
lea eax, [esp + 0x164]
cmp eax, esi
ja 0x509541
cmp ecx, ebx
mov eax, edi
jae 0x50953b
lea eax, [esp + 0x164]
add eax, edx
cmp esi, eax
jbe 0x509546
call fcn.005bdf65
push 1
lea ecx, [esp + 0x58]
lea eax, [esp + 0x164]
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], esi
call fcn.005077d0
mov edx, dword [eax + 4]
mov eax, dword [eax]
push edx
push eax
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x16c]
call fcn.00507810
cmp dword [esp + 0x178], ebx
mov eax, dword [esp + 0x164]
jae 0x509594
lea eax, [esp + 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
lea ecx, [esp + 0x12c]
mov esi, eax
mov byte [esp + 0x2c8], 0
call fcn.00409510
lea edx, [esp + 0x12c]
push edx
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
cmp dword [esp + 0x178], ebx
jb 0x5095e5
mov eax, dword [esp + 0x164]
push eax
call fcn.005a1b1d
add esp, 4
mov eax, esi
jmp 0x50932a