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

Disassembly:
push 0xffffffffffffffff
push 0x4daabb
mov eax, dword fs:[0]
push eax
sub esp, 0x288
mov eax, dword [0x5181f4]
xor eax, esp
mov dword [esp + 0x284], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5181f4]
xor eax, esp
push eax
lea eax, [esp + 0x29c]
mov dword fs:[0], eax
mov byte [esp + 0x14], dl
mov ebp, dword [esp + 0x2b4]
mov ebx, dword [esp + 0x2b0]
xor eax, eax
test ebp, ebp
sete al
mov edi, ecx
xor ecx, ecx
test ebx, ebx
sete cl
cmp eax, ecx
je 0x49637b
mov eax, 0x80070057
jmp 0x4965e6
cmp dword [edi + 0x14], 0
je 0x496371
test ebp, ebp
je 0x496394
push 0xffffffffffffffff
push 0
push edi
mov ecx, ebp
call fcn.00404c75
mov byte [ebx], 1
lea edx, [esp + 0x20]
push edx
mov ecx, edi
call fcn.00482160
mov ecx, eax
call fcn.004820a0
cmp word [eax], 0x5c
je 0x4963b8
push 0x5c
push 1
mov ecx, edi
call fcn.00427598
push 0x2a
push 1
mov ecx, edi
call fcn.00427598
cmp dword [edi + 0x18], 8
lea eax, [edi + 4]
mov dword [esp + 0x18], eax
jb 0x4963d2
mov eax, dword [eax]
lea ecx, [esp + 0x48]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
jne 0x496410
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4963f9
xor eax, eax
jmp 0x4965e6
test eax, eax
jle 0x4965e6
and eax, 0xffff
or eax, 0x80070000
jmp 0x4965e6
mov eax, dword [edi + 0x14]
push 0xffffffffffffffff
add eax, 0xffffffff
push eax
mov ecx, edi
call fcn.00404404
xor esi, esi
cmp word [esp + 0x74], 0x2e
jne 0x49644a
mov ax, word [esp + 0x76]
test ax, ax
je 0x496509
cmp ax, 0x2e
jne 0x49644a
cmp word [esp + 0x78], 0
je 0x496509
lea edx, [esp + 0x74]
push edx
lea eax, [esp + 0x30]
push edi
push eax
call fcn.00409a90
add esp, 0xc
cmp dword [esp + 0x44], 8
mov eax, dword [esp + 0x30]
mov dword [esp + 0x2a4], 0
jae 0x496477
lea eax, [esp + 0x30]
mov ecx, dword [esp + 0x48]
and ecx, 0xfffffffc
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test byte [esp + 0x48], 0x10
je 0x4964a6
mov edx, dword [esp + 0x2ac]
push ebp
push ebx
push edx
mov dl, 1
lea ecx, [esp + 0x38]
call fcn.00496310
mov esi, eax
jmp 0x4964d7
test ebp, ebp
je 0x4964bd
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x34]
push eax
mov ecx, ebp
call fcn.00404c75
mov byte [ebx], 0
cmp dword [esp + 0x44], 8
mov eax, dword [esp + 0x30]
jae 0x4964cc
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x496527
cmp dword [esp + 0x44], 8
mov dword [esp + 0x2a4], 0xffffffff
jb 0x4964f6
mov ecx, dword [esp + 0x30]
push ecx
call fcn.00441cca
add esp, 4
xor eax, eax
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], eax
mov word [esp + 0x30], ax
test esi, esi
jl 0x496570
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x48]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x496422
jmp 0x496551
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x49653b
and eax, 0xffff
or eax, 0x80070000
lea ecx, [esp + 0x2c]
mov esi, eax
mov dword [esp + 0x2a4], 0xffffffff
call fcn.00404364
test esi, esi
jl 0x496570
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x496570
test eax, eax
jle 0x49656e
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
test esi, esi
jl 0x4965e4
cmp byte [esp + 0x14], 0
je 0x4965e4
test ebp, ebp
je 0x496599
push 0xffffffffffffffff
push 0
push edi
mov ecx, ebp
call fcn.00404c75
mov byte [ebx], 1
cmp byte [esp + 0x2ac], 0
je 0x4965b7
cmp dword [edi + 0x18], 8
jb 0x4965b1
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
jmp 0x4965c3
mov eax, dword [esp + 0x18]
jmp 0x4965c3
cmp dword [edi + 0x18], 8
mov eax, dword [esp + 0x18]
jb 0x4965c3
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4965e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4965e2
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
mov eax, esi
mov ecx, dword [esp + 0x29c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x284]
xor ecx, esp
call fcn.00441cbb
add esp, 0x294
ret 0xc