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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push edi
mov edi, ecx
mov bl, dl
cmp dword [edi + 0x14], 8
jb 0x501b86
mov eax, dword [edi]
jmp 0x501b88
mov eax, edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x501d96
cmp dword [edi + 0x14], 8
jb 0x501ba1
mov eax, dword [edi]
jmp 0x501ba3
mov eax, edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
cmp dword [edi + 0x14], 8
jb 0x501bb4
mov eax, dword [edi]
jmp 0x501bb6
mov eax, edi
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_DeleteFileW]
push eax
call esi
cmp eax, 1
sete al
mov byte [ebp - 1], al
test al, al
jne 0x501d8c
mov eax, dword [sym.imp.KERNEL32.DLL_GetLastError]
test bl, bl
mov ebx, dword [ebp + 8]
je 0x501ce0
call eax
cmp eax, 5
jne 0x501cdb
cmp dword [edi + 0x14], 8
jb 0x501bf6
mov eax, dword [edi]
jmp 0x501bf8
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
mov edx, eax
mov dword [ebp - 8], edx
test dl, 1
je 0x501cdb
test ebx, ebx
je 0x501c35
cmp dword [edi + 0x14], 8
jb 0x501c1b
mov ecx, dword [edi]
jmp 0x501c1d
mov ecx, edi
mov eax, dword [ebx]
push edx
push ecx
push str.File__s_is_with_read_only._Its_attribute_is:__d._UnSetting_its_read_only_attr_and_retry_deleting
push str.FileUtils
push 0x5c0ec0
push 0x14
push ebx
jmp 0x501c9d
mov ecx, dword [0x615408]
test ecx, ecx
je 0x501c6f
cmp dword [edi + 0x14], 8
jb 0x501c49
mov eax, dword [edi]
jmp 0x501c4b
mov eax, edi
push edx
push eax
push str.File__s_is_with_read_only._Its_attribute_is:__d._UnSetting_its_read_only_attr_and_retry_deleting
push 0x5c0ec0
push 0x5c0ec0
push str.FileUtils
push str.OOBEUtils
push 0x14
call ecx
add esp, 0x20
jmp 0x501ca3
mov ecx, dword [0x61540c]
test ecx, ecx
je 0x501ca3
cmp dword [edi + 0x14], 8
jb 0x501c83
mov edx, dword [edi]
jmp 0x501c85
mov edx, edi
push dword [ebp - 8]
mov eax, dword [ecx]
push edx
push str.File__s_is_with_read_only._Its_attribute_is:__d._UnSetting_its_read_only_attr_and_retry_deleting
push str.FileUtils
push 0x5c0ec0
push 0x14
push ecx
call dword [eax + 0x34]
add esp, 0x1c
cmp dword [edi + 0x14], 8
jb 0x501cad
mov eax, dword [edi]
jmp 0x501caf
mov eax, edi
push 0x80
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
cmp dword [edi + 0x14], 8
jb 0x501cc5
mov eax, dword [edi]
jmp 0x501cc7
mov eax, edi
push eax
call esi
cmp eax, 1
sete al
mov byte [ebp - 1], al
test al, al
jne 0x501d8c
mov eax, dword [sym.imp.KERNEL32.DLL_GetLastError]
test ebx, ebx
je 0x501d14
cmp dword [edi + 0x14], 8
jb 0x501cec
mov edi, dword [edi]
mov esi, dword [ebx]
call eax
push eax
push edi
push str.Failed_to_delete_file:__s_LastError:_d
push str.FileUtils
push 0x5c0ec0
push 0x32
push ebx
call dword [esi + 0x34]
mov al, byte [ebp - 1]
add esp, 0x1c
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x615408], 0
je 0x501d57
cmp dword [edi + 0x14], 8
jb 0x501d25
mov edi, dword [edi]
call eax
push eax
push edi
push str.Failed_to_delete_file:__s_LastError:_d
push 0x5c0ec0
push 0x5c0ec0
push str.FileUtils
push str.OOBEUtils
push 0x32
call dword [0x615408]
mov al, byte [ebp - 1]
add esp, 0x20
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [0x61540c]
test esi, esi
je 0x501d8c
cmp dword [edi + 0x14], 8
jb 0x501d69
mov edi, dword [edi]
mov esi, dword [esi]
call eax
push eax
push edi
push str.Failed_to_delete_file:__s_LastError:_d
push str.FileUtils
push 0x5c0ec0
push 0x32
push dword [0x61540c]
call dword [esi + 0x34]
add esp, 0x1c
mov al, byte [ebp - 1]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret