Function at 0x491130
Capabilities:
Check if file exists
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xa8
mov eax, dword [0x63a1e8]
mov edi, ecx
mov ebx, edx
mov ecx, str.DeleteFile.NonRecursive
lea esi, [esp + 0x68]
xor eax, ebp
test edx, edx
mov dword [esp + 0xa0], eax
mov eax, str.DeleteFile.Recursive
cmovne ecx, eax
mov eax, ebx
xor al, 1
mov dword [esp + 8], ecx
movzx eax, al
mov dword [esp + 0xc], eax
push 0x168
push str..._.._base_files_file_util_win.cc
push str.DeleteFileAndRecordMetrics
push esi
call fcn.004820c0
add esp, 0x10
lea ecx, [esp + 0x10]
push 0
push esi
call fcn.004d05f0
lea esi, [esp + 0x58]
push 0x130
push str..._.._base_files_file_util_win.cc
push str.DoDeleteFile
push esi
call fcn.004820c0
add esp, 0x10
lea ecx, [esp + 0x68]
push 0
push esi
call fcn.004d05f0
movzx ecx, byte [edi + 0xb]
mov eax, dword [edi + 4]
mov dword [esp], edi
mov edi, 0
mov dword [esp + 4], 0
test cl, cl
mov edx, ecx
cmovs edx, eax
test edx, edx
je 0x49136a
test cl, cl
jns 0x4911f9
mov edi, 0xa1
cmp eax, 0x103
ja 0x49136a
mov ecx, dword [esp]
push esi
call fcn.004800f0
movzx eax, byte [esp + 0x63]
test al, al
jns 0x491213
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x58]
mov edi, 0xffffffff
test eax, eax
je 0x491243
add eax, eax
mov ecx, esi
movzx edx, word [ecx]
cmp dx, 0x3f
je 0x491239
cmp dx, 0x2a
je 0x491239
add ecx, 2
add eax, 0xfffffffe
jne 0x491220
jmp 0x491243
test eax, eax
je 0x491243
sub ecx, esi
sar ecx, 1
mov edi, ecx
lea esi, [esp + 0x58]
mov ecx, esi
call fcn.0047f6f0
cmp edi, 0xffffffff
je 0x491295
mov edi, esi
mov esi, dword [esp]
mov ecx, esi
push edi
call fcn.004800f0
lea eax, [esp + 0x4c]
mov ecx, esi
push eax
mov esi, eax
call fcn.0047ffd0
movzx eax, bl
mov ecx, esi
mov edx, edi
mov ebx, edi
push eax
call fcn.00491e60
add esp, 4
mov ecx, esi
mov edi, eax
call fcn.0047f6f0
mov ecx, ebx
call fcn.0047f6f0
jmp 0x49136a
mov eax, dword [esp]
cmp byte [eax + 0xb], 0
jns 0x4912a3
mov eax, dword [esp]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x491357
test al, 1
je 0x4912d8
mov ecx, dword [esp]
mov esi, eax
and eax, 0xfffffffe
cmp byte [ecx + 0xb], 0
jns 0x4912ca
mov ecx, dword [esp]
mov ecx, dword [ecx]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
mov eax, esi
je 0x491357
test al, 0x10
jne 0x4912f3
mov eax, dword [esp]
cmp byte [eax + 0xb], 0
jns 0x4912ea
mov eax, dword [esp]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x49134e
test bl, bl
je 0x491339
mov ecx, dword [esp]
mov dword [esp + 0x60], 0x1000000
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0x2a
lea edx, [esp + 0x58]
push 1
call fcn.00491e60
add esp, 4
cmp byte [esp + 0x63], 0
mov edi, eax
jns 0x491335
push dword [esp + 0x58]
call fcn.005909b6
add esp, 4
test edi, edi
jne 0x49136a
mov eax, dword [esp]
cmp byte [eax + 0xb], 0
jns 0x491347
mov eax, dword [esp]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
mov edi, 0
jne 0x49136a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
xor edi, edi
and ecx, 0xfffffffe
cmp ecx, 2
cmovne edi, eax
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x68]
lea esi, [eax + eax*2 + 0x14]
call fcn.004d06e0
test edi, edi
je 0x4913e1
mov eax, dword [esp]
cmp byte [eax + 0xb], 0
jns 0x49138d
mov eax, dword [esp]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4913c0
test al, 0x10
mov dword [esp + 4], 7
je 0x4913e1
push dword [esp]
call fcn.00481b50
add esp, 4
movzx eax, al
mov ecx, 6
sub ecx, eax
mov dword [esp + 4], ecx
jmp 0x4913e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 2]
mov dword [esp + 4], 4
cmp ecx, 4
jae 0x4913e1
mov eax, dword [eax*4 + 0x5c757c]
mov dword [esp + 4], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x68], str.Windows.PostOperationState.
mov dword [esp + 0x6c], 0x1b
lea ebx, [esp + 0x58]
mov dword [esp + 0x70], eax
lea eax, [esp + 0x68]
mov dword [esp + 0x74], esi
push eax
push 2
push ebx
call fcn.004859e0
add esp, 0xc
push 8
push dword [esp + 8]
push ebx
call fcn.004d1720
add esp, 0xc
cmp byte [esp + 0x63], 0
js 0x491478
test edi, edi
je 0x491488
mov eax, dword [esp + 8]
mov dword [esp + 0x68], str.Windows.FilesystemError.
mov dword [esp + 0x6c], 0x18
mov dword [esp + 0x70], eax
lea eax, [esp + 0x68]
mov dword [esp + 0x74], esi
push eax
push 2
push ebx
call fcn.004859e0
add esp, 0xc
push edi
push ebx
call fcn.004d1750
add esp, 8
cmp byte [esp + 0x63], 0
jns 0x491474
push dword [esp + 0x58]
call fcn.005909b6
add esp, 4
xor ebx, ebx
jmp 0x49148a
push dword [esp + 0x58]
call fcn.005909b6
add esp, 4
test edi, edi
jne 0x49142b
mov bl, 1
lea ecx, [esp + 0x10]
call fcn.004d06e0
mov ecx, dword [esp + 0xa0]
xor ecx, ebp
call fcn.005909f1
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret