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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x10005a67
mov eax, edi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10005830
sub eax, edx
add eax, 5
je 0x10005a67
lea ebx, [eax + 0x13]
and ebx, 0xfffffff0
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
je 0x10005a67
push ebx
push 0
push esi
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [esi - 1]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10005882
mov ecx, dword [str..]
mov dword [eax], ecx
mov dl, byte [0x1004664c]
mov byte [eax + 4], dl
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
mov dword [esp + 0x14], ebx
cmp ebx, 0xffffffff
je 0x10005a67
jmp 0x100058c0
mov ecx, 0x10046650
lea eax, [esp + 0x44]
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100058f0
test dl, dl
je 0x100058ec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100058f0
add eax, 2
add ecx, 2
test dl, dl
jne 0x100058d0
xor eax, eax
jmp 0x100058f5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10005a37
mov ecx, 0x10046654
lea eax, [esp + 0x44]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10005926
test dl, dl
je 0x10005922
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10005926
add eax, 2
add ecx, 2
test dl, dl
jne 0x10005906
xor eax, eax
jmp 0x1000592b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10005a37
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10005938
sub eax, edx
mov edx, eax
lea eax, [esp + 0x44]
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10005950
sub eax, esi
lea eax, [eax + edx + 2]
test eax, eax
je 0x10005a67
lea esi, [eax + 0x13]
and esi, 0xfffffff0
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x10005a67
push esi
push 0
push ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea eax, [esp + 0x44]
mov esi, eax
jmp 0x100059b0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100059b0
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100059c0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test byte [esp + 0x18], 0x10
je 0x100059e5
push ebx
call fcn.10005810
jmp 0x10005a0a
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
push ebx
call esi
push 0
push ebx
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x10005a0a
push 4
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x10005a2c
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [ebp + 8]
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x100058c0
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
call fcn.10012460
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4