Function at 0x40d445
Capabilities:
Create bits job
Create directory
Delete file
Get common file path
Move file

Disassembly:
push 0x3c
mov eax, 0x47d45b
call fcn.004569c5
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x40], ecx
xor edi, edi
mov dword [ebp - 0x2c], edi
xor ebx, ebx
inc ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], edi
mov byte [ebp - 4], 3
mov esi, edi
mov dword [ebp - 0x3c], esi
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x28]
call fcn.0040aaed
mov byte [ebp - 4], 6
mov eax, 0x927c0
cmp dword [ebp + 8], edi
push edi
cmovne eax, dword [ebp + 8]
push edi
push ebx
push edi
mov dword [ebp - 0x44], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x34], eax
test eax, eax
jne 0x40d4a8
mov ebx, 0x80070006
jmp 0x40d6b4
mov ebx, 0x104
lea ecx, [ebp - 0x28]
push ebx
call fcn.0040a4d3
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ecx
lea ecx, [ebp - 0x28]
call fcn.0040d778
mov eax, dword [ebp - 0x28]
cmp dword [eax - 0xc], 0
jne 0x40d4da
mov ebx, 0x8000ffff
jmp 0x40d6b4
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push ecx
xor edx, edx
lea ecx, [ebp - 0x30]
call fcn.0041edbf
pop ecx
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x28]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.0040be21
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx - 0x10]
call fcn.0040aacb
lea eax, [ebp - 0x2c]
push eax
push 0x4a9c34
push 4
push edi
push 0x4a9c44
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov ebx, eax
test ebx, ebx
js 0x40d6b4
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x24]
push edx
lea edx, [ebp - 0x20]
push edx
mov ecx, dword [eax]
push edi
push str.AvEmUpdate_download
push eax
call dword [ecx + 0xc]
mov ecx, dword [ebp - 0x2c]
mov ebx, eax
test ecx, ecx
je 0x40d559
mov dword [ebp - 0x2c], edi
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test ebx, ebx
js 0x40d6b4
mov eax, dword [ebp - 0x24]
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x54]
mov ebx, eax
test ebx, ebx
js 0x40d6b4
push 0x10
call fcn.0045620b
mov esi, eax
pop ecx
mov dword [ebp - 0x48], esi
push 9
pop eax
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], al
mov dword [esi + 0xc], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [esi], vtable.CNotifyInterface.0
mov dword [esi + 4], 1
mov dword [esi + 8], reloc.OLEAUT32.dll_VariantCopyInd
call edi
mov ebx, eax
call edi
push 2
xor edi, edi
lea ecx, [esi + 0xc]
push edi
push edi
push ecx
push ebx
mov ebx, dword [ebp - 0x34]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x40d5d2
push ebx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [esi + 0xc], edi
mov byte [ebp - 4], 6
mov dword [ebp - 0x3c], esi
mov eax, dword [ebp - 0x24]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x64]
mov ebx, eax
test ebx, ebx
js 0x40d6b4
mov eax, dword [ebp - 0x24]
push 3
push eax
mov ecx, dword [eax]
call dword [ecx + 0x5c]
mov ebx, eax
test ebx, ebx
js 0x40d6b4
mov eax, dword [ebp - 0x24]
push dword [ebp - 0x28]
push dword [ebp - 0x40]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
mov ebx, eax
test ebx, ebx
js 0x40d6b4
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov ebx, eax
test ebx, ebx
js 0x40d6b4
push dword [ebp - 0x44]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [esi + 8]
test ebx, ebx
jns 0x40d654
cmp ebx, reloc.OLEAUT32.dll_VariantCopyInd
jne 0x40d6b4
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
jmp 0x40d6b4
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40d6a7
push 2
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x40d6b0
cmp eax, 0x20
je 0x40d67d
cmp eax, 5
jne 0x40d691
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub dword [ebp - 0x30], 1
mov eax, dword [ebp - 0x38]
jns 0x40d65b
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x40d6b0
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test ebx, ebx
jns 0x40d6c1
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40d6c1
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40d6cf
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jns 0x40d6ef
mov eax, ebx
and eax, 0x1fff0000
cmp eax, 0x70000
jne 0x40d6e8
movzx edi, bx
test edi, edi
jne 0x40d6f1
mov edi, 0x4b1
jmp 0x40d6f1
xor edi, edi
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.0040aacb
mov byte [ebp - 4], 3
test esi, esi
je 0x40d70e
mov eax, dword [esi]
push esi
call dword [eax + 8]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40d71f
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x40d730
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
mov eax, edi
call fcn.00456974
ret