Function at 0x474f10
Capabilities:
Delete file
Get common file path
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x840
mov ebx, dword [0x76d170]
test ebx, ebx
je 0x475710
lea esi, [ebp - 0x214]
mov dword [esp], 0x104
mov dword [esp + 4], esi
call dword [sym.imp.kernel32.dll_GetTempPathW]
sub esp, 8
mov edi, eax
test eax, eax
jne 0x474f5a
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x78
je 0x4756f0
mov eax, 0x1030
call fcn.0045b740
mov ebx, dword fs:[0x18]
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetTempPathW_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
setne al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x1031
call fcn.0045b740
xor eax, eax
cmp edi, 0x103
mov dword [esp + 4], 0x59813c
setbe al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x82c]
mov dword [esp], esi
mov edi, dword [sym.imp.kernel32.dll_GetTempFileNameW]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59dca0
call edi
sub esp, 0x10
mov dword [ebp - 0x830], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1034
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetTempFileNameW_error__replaced___ld_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x830]
xor eax, eax
test edx, edx
setne al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x624]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x59dca0
mov dword [esp], esi
call edi
sub esp, 0x10
mov dword [ebp - 0x830], eax
mov eax, 0x1037
call fcn.0045b740
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetTempFileNameW_error__replacement___ld_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x830]
xor eax, eax
test edx, edx
setne al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x41c]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x59dca0
mov dword [esp], esi
call edi
sub esp, 0x10
mov dword [ebp - 0x830], eax
mov eax, 0x103a
call fcn.0045b740
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetTempFileNameW_error__backup___ld_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x830]
xor eax, eax
test edx, edx
setne al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x41c]
mov dword [esp + 0x14], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x624]
mov dword [esp + 4], eax
lea eax, [ebp - 0x82c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp], eax
call dword [0x76d170]
sub esp, 0x18
mov dword [ebp - 0x830], eax
mov eax, 0x103d
call fcn.0045b740
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.ReplaceFileW:_error__ld_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x830]
mov dword [esp], edx
call fcn.0045bef0
lea eax, [ebp - 0x624]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x59dca0
mov dword [esp], esi
call edi
sub esp, 0x10
mov dword [ebp - 0x830], eax
mov eax, 0x1040
call fcn.0045b740
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetTempFileNameW_error__replacement___ld_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x830]
xor eax, eax
test edx, edx
setne al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x624]
mov dword [esp + 0x14], 0
mov dword [esp + 4], eax
lea eax, [ebp - 0x82c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [0x76d170]
mov dword [ebp - 0x830], eax
sub esp, 0x18
mov eax, 0x1042
call fcn.0045b740
mov edx, dword [ebp - 0x830]
mov ecx, dword [ebx + 0x34]
mov eax, 1
test edx, edx
je 0x475678
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], str.ReplaceFileW:_error__ld_n
mov ebx, dword fs:[0x18]
call fcn.0045bef0
lea eax, [ebp - 0x624]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x59dca0
mov dword [esp], esi
call edi
sub esp, 0x10
mov dword [ebp - 0x830], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1046
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetTempFileNameW_error__replacement___ld_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x830]
xor eax, eax
test edx, edx
setne al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x41c]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_DeleteFileW]
mov dword [ebp - 0x830], eax
call eax
sub esp, 4
mov dword [ebp - 0x834], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1048
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.DeleteFileW:_error__backup___ld_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x834]
mov dword [esp], edx
call fcn.0045bef0
lea eax, [ebp - 0x41c]
mov dword [esp + 0x14], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x624]
mov dword [esp + 4], eax
lea eax, [ebp - 0x82c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp], eax
call dword [0x76d170]
sub esp, 0x18
mov dword [ebp - 0x834], eax
call fcn.0057d110
mov edx, dword [ebp - 0x834]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x104a
mov eax, 1
mov ecx, dword [ebx + 0x34]
test edx, edx
je 0x475668
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], str.ReplaceFileW:_error__ld_n
call fcn.0045bef0
lea eax, [ebp - 0x624]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59dca0
call edi
sub esp, 0x10
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x104e
mov edi, dword fs:[0x18]
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.GetTempFileNameW_error__replacement___ld_n
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x82c]
mov dword [esp + 4], 1
mov esi, dword [sym.imp.kernel32.dll_SetFileAttributesW]
mov dword [esp], eax
call esi
sub esp, 8
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1050
mov eax, 1
mov edx, dword [edi + 0x34]
test ebx, ebx
je 0x475658
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.SetFileAttributesW:_error_setting_to_read_only__ld_n
mov edi, dword fs:[0x18]
call fcn.0045bef0
lea eax, [ebp - 0x41c]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 8], eax
lea eax, [ebp - 0x624]
mov dword [esp + 4], eax
lea eax, [ebp - 0x82c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp], eax
call dword [0x76d170]
sub esp, 0x18
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1055
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 4], 0x59b2f2
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1056
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 5
sete al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x82c]
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], eax
call esi
sub esp, 8
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1058
mov eax, dword [edi + 0x34]
test ebx, ebx
jne 0x475630
cmp eax, 5
je 0x475730
mov dword [esp + 8], eax
mov dword [esp + 4], str.SetFileAttributesW:_error_setting_to_normal__ld_n
mov dword [esp], 0
call fcn.0045bef0
lea eax, [ebp - 0x82c]
mov dword [esp], eax
mov eax, dword [ebp - 0x830]
call eax
sub esp, 4
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x105e
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x34]
mov dword [esp], edi
mov dword [esp + 4], str.DeleteFileW:_error__replaced___ld_n
mov dword [esp + 8], eax
call fcn.0045bef0
lea eax, [ebp - 0x41c]
mov dword [esp + 0x14], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x624]
mov dword [esp + 4], eax
lea eax, [ebp - 0x82c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp], eax
call dword [0x76d170]
sub esp, 0x18
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1060
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.ReplaceFileW:_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
sete al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x624]
mov dword [esp + 0x14], 0
mov dword [esp + 4], eax
lea eax, [ebp - 0x82c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [0x76d170]
sub esp, 0x18
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1063
xor eax, eax
mov edx, dword [esi + 0x34]
test edi, edi
jne 0x4755f7
mov eax, 1
cmp edx, 2
je 0x4755f7
xor eax, eax
cmp edx, 5
sete al
mov dword [esp], eax
mov dword [esp + 8], edx
mov dword [esp + 4], str.ReplaceFileW:_unexpected_error__ld_n
call fcn.0045bef0
lea eax, [ebp - 0x624]
mov dword [esp], eax
mov eax, dword [ebp - 0x830]
call eax
sub esp, 4
test ebx, ebx
jne 0x475688
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], eax
mov ebx, 1
mov dword [esp + 4], str.SetFileAttributesW:_error_setting_to_normal__ld_n
mov dword [esp], 1
call fcn.0045bef0
jmp 0x4754d6
xor eax, eax
cmp edx, 5
sete al
jmp 0x4753c3
xor eax, eax
cmp ecx, 5
sete al
jmp 0x475314
xor eax, eax
cmp ecx, 5
sete al
jmp 0x4751e1
lea eax, [ebp - 0x41c]
mov dword [esp], eax
mov eax, dword [ebp - 0x830]
call eax
sub esp, 4
mov esi, eax
mov eax, 0x106b
call fcn.0045b740
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
test esi, esi
je 0x4756d8
mov dword [esp], ebx
mov dword [esp + 8], edx
mov dword [esp + 4], str.DeleteFileW:_error__backup___ld_n
call fcn.0045bef0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [0x8f0770]
cmp edx, 5
sete al
xor ebx, ebx
test ecx, ecx
sete bl
and ebx, eax
jmp 0x4756b5
mov eax, 0x102d
call fcn.0045b740
mov dword [esp], str.GetTempPathW_is_not_available_n
call fcn.0045bec0
jmp 0x475623
mov eax, 0x1026
call fcn.0045b740
mov dword [esp], str.ReplaceFileW___is_missing_n
call fcn.0045bec0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 5
mov dword [esp + 4], str.SetFileAttributesW:_error_setting_to_normal__ld_n
mov dword [esp], 1
call fcn.0045bef0
jmp 0x4754d6