Function at 0x10020220
Capabilities:
Check if file exists
Delete directory
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10094596
mov eax, dword fs:[0]
push eax
sub esp, 0x1c0
mov eax, dword [0x100c3384]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x74], ecx
call fcn.1003eb30
mov dword [ebp - 0x78], eax
push 1
mov eax, dword [ebp - 0x78]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x78]
mov eax, dword [edx + 8]
call eax
mov byte [ebp - 0x88], al
cmp byte [ebp - 0x88], 1
je 0x10020279
jmp 0x10020344
push 0x1009e3a8
lea ecx, [ebp - 0x40]
call fcn.10004260
mov dword [ebp - 4], 0
push 0x1009e3a4
lea ecx, [ebp - 0x28]
call fcn.10004260
mov byte [ebp - 4], 1
call fcn.1003eb30
mov dword [ebp - 0x7c], eax
mov ecx, dword [ebp - 0x74]
add ecx, 0x60
push ecx
push 0x1009e418
mov edx, dword [ebp - 0x74]
add edx, 0x48
push edx
push str.Hotfix:_clear_workspace_____n
push 0x107
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x134]
call fcn.10004a60
mov dword [ebp - 0x8c], eax
mov edx, dword [ebp - 0x8c]
mov dword [ebp - 0x90], edx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x90]
call fcn.10002a60
mov ecx, eax
call fcn.1000c8f0
mov ecx, eax
call fcn.10002a60
mov ecx, eax
call fcn.1000c8f0
push eax
mov eax, dword [ebp - 0x7c]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x7c]
mov eax, dword [edx + 0x1c]
call eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x134]
call fcn.10005a70
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.10005680
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.10005680
mov ecx, dword [ebp - 0x74]
add ecx, 0x48
call fcn.10009ee0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10020375
mov ecx, dword [ebp - 0x74]
add ecx, 0x60
call fcn.10009ee0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10020375
jmp 0x100204a8
mov ecx, dword [ebp - 0x74]
add ecx, 0x60
call fcn.10009ee0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 0x74]
add ecx, 0x48
call fcn.10009ee0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10020496
call fcn.1003eb30
mov dword [ebp - 0x80], eax
push 2
mov ecx, dword [ebp - 0x80]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x80]
mov eax, dword [edx + 8]
call eax
mov byte [ebp - 0x94], al
cmp byte [ebp - 0x94], 1
je 0x100203cc
jmp 0x10020478
push 0x1009e420
lea ecx, [ebp - 0x70]
call fcn.10004260
mov dword [ebp - 4], 3
push 0x1009e41c
lea ecx, [ebp - 0x58]
call fcn.10004260
mov byte [ebp - 4], 4
call fcn.1003eb30
mov dword [ebp - 0x84], eax
push str.Hotfix:_delete_last_msu_fail__rename_first
push 0x111
lea ecx, [ebp - 0x70]
push ecx
lea edx, [ebp - 0x58]
push edx
lea ecx, [ebp - 0x1cc]
call fcn.10004a60
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x9c], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x9c]
call fcn.10002a60
push eax
mov ecx, dword [ebp - 0x84]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x84]
mov eax, dword [edx + 0x1c]
call eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x1cc]
call fcn.10005a70
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x58]
call fcn.10005680
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70]
call fcn.10005680
mov ecx, dword [ebp - 0x74]
add ecx, 0x60
call fcn.10009ee0
push eax
mov ecx, dword [ebp - 0x74]
add ecx, 0x48
call fcn.10009ee0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov ecx, dword [ebp - 0x74]
add ecx, 0x30
call fcn.10009ee0
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1005dfd5
mov esp, ebp
pop ebp
ret