Function at 0x493680
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xa8
mov esi, ecx
mov eax, dword [0x6401e4]
xor eax, ebp
mov dword [esp + 0xa0], eax
mov eax, str.DeleteFile.Recursive
mov ecx, str.DeleteFile.NonRecursive
test edx, edx
cmovne ecx, eax
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov eax, edx
xor al, 1
movzx eax, al
mov dword [esp + 0xc], eax
lea edi, [esp + 0x68]
push 0x168
push str..._.._base_files_file_util_win.cc
push str.DeleteFileAndRecordMetrics
push edi
call fcn.004835b0
add esp, 0x10
lea ecx, [esp + 0x10]
push 0
push edi
call fcn.004d4910
lea ebx, [esp + 0x58]
push 0x130
push str..._.._base_files_file_util_win.cc
push str.DoDeleteFile
push ebx
call fcn.004835b0
add esp, 0x10
lea ecx, [esp + 0x68]
push 0
push ebx
call fcn.004d4910
movzx ecx, byte [esi + 0xb]
test cl, cl
mov eax, dword [esi + 4]
mov edx, ecx
cmovs edx, eax
mov dword [esp], 0
mov edi, 0
test edx, edx
je 0x4938a7
test cl, cl
jns 0x493747
mov edi, 0xa1
cmp eax, 0x103
ja 0x4938a7
mov ecx, esi
push ebx
call fcn.00481350
movzx eax, byte [esp + 0x63]
test al, al
jns 0x493760
mov eax, dword [esp + 0x5c]
mov ebx, dword [esp + 0x58]
mov edi, 0xffffffff
test eax, eax
je 0x493791
add eax, eax
xor ecx, ecx
nop dword [eax]
movzx edx, word [ebx + ecx]
cmp dx, 0x3f
je 0x493789
cmp dx, 0x2a
je 0x493789
add ecx, 2
cmp eax, ecx
jne 0x493770
jmp 0x493791
cmp eax, ecx
je 0x493791
sar ecx, 1
mov edi, ecx
lea ebx, [esp + 0x58]
mov ecx, ebx
call fcn.00480970
cmp edi, 0xffffffff
je 0x4937de
mov ecx, esi
push ebx
call fcn.00481350
lea edi, [esp + 0x4c]
mov ecx, esi
push edi
call fcn.00481210
movzx eax, byte [esp + 4]
mov ecx, edi
mov edx, ebx
push eax
call fcn.004943d0
add esp, 4
mov edi, eax
lea ecx, [esp + 0x4c]
call fcn.00480970
mov ecx, ebx
call fcn.00480970
jmp 0x4938a7
cmp byte [esi + 0xb], 0
mov eax, esi
jns 0x4937e8
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x493894
mov ebx, eax
test bl, 1
je 0x49381a
mov eax, ebx
and eax, 0xfffffffe
cmp byte [esi + 0xb], 0
mov ecx, esi
jns 0x49380e
mov ecx, dword [esi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x493894
test bl, 0x10
jne 0x493832
cmp byte [esi + 0xb], 0
mov eax, esi
jns 0x493829
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x49388b
cmp byte [esp + 4], 0
je 0x49387a
mov dword [esp + 0x60], 0x1000000
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0x2a
lea edx, [esp + 0x58]
mov ecx, esi
push 1
call fcn.004943d0
add esp, 4
mov edi, eax
cmp byte [esp + 0x63], 0
jns 0x493876
push dword [esp + 0x58]
call fcn.00596316
add esp, 4
test edi, edi
jne 0x4938a7
cmp byte [esi + 0xb], 0
mov eax, esi
jns 0x493884
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov edi, 0
test eax, eax
jne 0x4938a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
and ecx, 0xfffffffe
xor edi, edi
cmp ecx, 2
cmovne edi, eax
mov eax, dword [esp + 0xc]
lea ebx, [eax + eax*2]
add ebx, 0x14
lea ecx, [esp + 0x68]
call fcn.004d4a30
test edi, edi
je 0x493916
cmp byte [esi + 0xb], 0
mov eax, esi
jns 0x4938c8
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4938f7
mov dword [esp], 7
test al, 0x10
je 0x493916
push esi
call fcn.00483050
add esp, 4
movzx eax, al
mov ecx, 6
sub ecx, eax
mov dword [esp], ecx
jmp 0x493916
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 2]
mov dword [esp], 4
cmp ecx, 4
jae 0x493916
mov eax, dword [eax*4 + 0x5cda60]
mov dword [esp], eax
mov dword [esp + 0x68], str.Windows.PostOperationState.
mov dword [esp + 0x6c], 0x1b
mov eax, dword [esp + 8]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ebx
lea esi, [esp + 0x58]
lea eax, [esp + 0x68]
push eax
push 2
push esi
call fcn.00486e20
add esp, 0xc
push 8
push dword [esp + 4]
push esi
call fcn.004d5ae0
add esp, 0xc
cmp byte [esp + 0x63], 0
jns 0x493968
push dword [esp + 0x58]
call fcn.00596316
add esp, 4
test edi, edi
je 0x4939b5
mov dword [esp + 0x68], str.Windows.FilesystemError.
mov dword [esp + 0x6c], 0x18
mov eax, dword [esp + 8]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ebx
lea eax, [esp + 0x68]
push eax
push 2
push esi
call fcn.00486e20
add esp, 0xc
push edi
push esi
call fcn.004d5b10
add esp, 8
cmp byte [esp + 0x63], 0
jns 0x4939b5
push dword [esp + 0x58]
call fcn.00596316
add esp, 4
test edi, edi
sete bl
lea ecx, [esp + 0x10]
call fcn.004d4a30
mov ecx, dword [esp + 0xa0]
xor ecx, ebp
call fcn.00596351
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret