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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c815d
mov eax, dword fs:[0]
push eax
sub esp, 0x2a0
mov eax, dword [0x4e7744]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov eax, 0x7ffffffe
mov ecx, dword [esi + 0x10]
sub eax, ecx
cmp eax, 2
jb 0x40648b
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x4061ae
mov eax, dword [esi]
push 2
push 0x4ca808
push ecx
push eax
push esi
push dword [ebp - 0x2ac]
lea ecx, [ebp - 0x58]
call fcn.00401b00
xor edi, edi
mov dword [ebp - 4], 0
cmp dword [ebp - 0x44], 8
lea ecx, [ebp - 0x2a8]
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x406210
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x406206
cmp eax, 3
je 0x406206
or edi, ebx
jmp 0x406437
xor edi, edi
jmp 0x406437
mov ecx, 0x4ca810
lea eax, [ebp - 0x27c]
jmp 0x406220
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x406246
test dx, dx
je 0x406242
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x406246
add eax, 4
add ecx, 4
test dx, dx
jne 0x406220
xor eax, eax
jmp 0x40624b
sbb eax, eax
or eax, 1
test eax, eax
je 0x406401
mov eax, 0x4ca814
lea ecx, [ebp - 0x27c]
mov edi, edi
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x406286
test dx, dx
je 0x406282
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x406286
add ecx, 4
add eax, 4
test dx, dx
jne 0x406260
xor eax, eax
jmp 0x40628b
sbb eax, eax
or eax, 1
test eax, eax
je 0x406401
mov ecx, dword [esi + 0x10]
mov eax, 0x7ffffffe
sub eax, ecx
cmp eax, 1
jb 0x40648b
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x4062b0
mov eax, dword [esi]
push 1
push 0x4c996c
push ecx
push eax
push esi
push dword [ebp - 0x2ac]
lea ecx, [ebp - 0x40]
call fcn.00401b00
lea ecx, [ebp - 0x27c]
mov byte [ebp - 4], 1
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4062d5
sub ecx, edx
lea eax, [ebp - 0x27c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x40]
call fcn.00409d10
mov edx, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov ecx, dword [edx]
mov dword [ebp - 0x28], ecx
mov ecx, dword [edx + 4]
mov dword [ebp - 0x24], ecx
mov ecx, dword [edx + 8]
mov dword [ebp - 0x20], ecx
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
mov edx, dword [ebp - 0x2c]
mov byte [ebp - 4], 3
cmp edx, 8
jb 0x40637f
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406375
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406490
push edx
push ecx
call fcn.004aa4d8
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
test byte [ebp - 0x2a8], 0x10
mov word [ebp - 0x40], ax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x2c], 7
je 0x4063aa
push eax
call fcn.00406160
add esp, 4
jmp 0x4063c3
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
mov eax, 0xffffffff
cmove edi, eax
mov edx, dword [ebp - 0x14]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x406401
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4063f7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406490
push edx
push ecx
call fcn.004aa4d8
add esp, 8
lea eax, [ebp - 0x2a8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x406210
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [esi + 0x14], 8
jb 0x406426
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
mov eax, 0xffffffff
cmove edi, eax
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x40646d
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406463
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406490
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004aa4f4
mov esp, ebp
pop ebp
ret
call fcn.00409af0
call fcn.004aeecf
int3