Function at 0x4088c0
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows

Disassembly:
push 0xffffffffffffffff
push 0x40f0ce
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x417018]
xor eax, esp
mov dword [esp + 0x274], eax
push ebx
push esi
push edi
mov eax, dword [0x417018]
xor eax, esp
push eax
lea eax, [esp + 0x28c]
mov dword fs:[0], eax
mov dword [esp + 0x294], 0
mov eax, dword [esp + 0x29c]
mov ebx, 8
cmp dword [esp + 0x2b0], ebx
jae 0x408921
lea eax, [esp + 0x29c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40894d
cmp dword [esp + 0x2b0], ebx
jb 0x408946
mov eax, dword [esp + 0x29c]
push eax
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
xor al, al
jmp 0x408bab
mov edx, dword [esp + 0x2ac]
lea esi, [edx - 1]
cmp edx, esi
ja 0x408966
push str.invalid_string_position
call dword [sym.imp.MSVCP100.dll_void___cdecl_std::_Xout_of_range_char_const__]
mov ecx, dword [esp + 0x2b0]
mov edi, dword [esp + 0x29c]
mov eax, edi
cmp ecx, ebx
jae 0x408981
lea eax, [esp + 0x29c]
cmp word [eax + esi*2], 0x5c
je 0x4089d1
mov eax, edi
cmp ecx, ebx
jae 0x408995
lea eax, [esp + 0x29c]
cmp ecx, ebx
lea eax, [eax + edx*2]
mov ecx, edi
jae 0x4089a5
lea ecx, [esp + 0x29c]
test eax, eax
je 0x4089ad
sub eax, ecx
sar eax, 1
push 0x5c
push eax
lea edi, [esp + 0x2a4]
call fcn.0040c5c0
mov ecx, dword [esp + 0x2b0]
mov edx, dword [esp + 0x2ac]
mov edi, dword [esp + 0x29c]
mov eax, edi
cmp ecx, ebx
jae 0x4089de
lea eax, [esp + 0x29c]
cmp ecx, ebx
lea eax, [eax + edx*2]
mov ecx, edi
jae 0x4089ee
lea ecx, [esp + 0x29c]
test eax, eax
je 0x4089f6
sub eax, ecx
sar eax, 1
push 0x2a
push eax
lea edi, [esp + 0x2a4]
call fcn.0040c5c0
mov eax, dword [esp + 0x29c]
cmp dword [esp + 0x2b0], ebx
jae 0x408a17
mov eax, edi
lea ecx, [esp + 0x34]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x408a51
cmp dword [esp + 0x2b0], ebx
jb 0x408946
mov edx, dword [esp + 0x29c]
push edx
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
xor al, al
jmp 0x408bab
mov eax, dword [esp + 0x2ac]
dec eax
push eax
lea ecx, [esp + 0x1c]
push ecx
xor ecx, ecx
lea edx, [esp + 0x2a4]
call fcn.0040a5c0
mov edi, eax
lea esi, [esp + 0x29c]
mov byte [esp + 0x294], 1
call fcn.00406650
mov byte [esp + 0x294], 0
cmp dword [esp + 0x2c], ebx
jb 0x408a9f
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, 2
lea ebx, [ebx]
test byte [esp + 0x34], 0x10
jne 0x408b44
xor eax, eax
push eax
lea ecx, [esp + 0x2a0]
mov word [esp + 0x1c], ax
push ecx
or eax, 0xffffffff
lea edi, [esp + 0x20]
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], 0
call fcn.004066c0
lea eax, [esp + 0x60]
mov byte [esp + 0x294], bl
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
test cx, cx
jne 0x408af5
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x20]
call fcn.0040bc70
mov eax, dword [esp + 0x18]
mov edi, 8
cmp dword [esp + 0x2c], edi
jae 0x408b25
lea eax, [esp + 0x18]
push eax
call esi
mov byte [esp + 0x294], 0
cmp dword [esp + 0x2c], edi
jb 0x408b44
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x408ab0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x29c]
mov esi, 8
cmp dword [esp + 0x2b0], esi
jae 0x408b83
lea eax, [esp + 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
setne bl
cmp dword [esp + 0x2b0], esi
jb 0x408ba9
mov ecx, dword [esp + 0x29c]
push ecx
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x28c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x274]
xor ecx, esp
call fcn.0040d342
add esp, 0x288
ret