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

Disassembly:
push 0x3c
mov eax, 0x47bbad
call fcn.00454305
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.0040aa2d
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 0x40d36e
mov ebx, 0x80070006
jmp 0x40d57a
mov ebx, 0x104
lea ecx, [ebp - 0x28]
push ebx
call fcn.0040a41f
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ecx
lea ecx, [ebp - 0x28]
call fcn.0040d63e
mov eax, dword [ebp - 0x28]
cmp dword [eax - 0xc], 0
jne 0x40d3a0
mov ebx, 0x8000ffff
jmp 0x40d57a
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push ecx
xor edx, edx
lea ecx, [ebp - 0x30]
call fcn.0041ea93
pop ecx
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x28]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.0040bd07
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx - 0x10]
call fcn.0040aa0b
lea eax, [ebp - 0x2c]
push eax
push 0x48f454
push 4
push edi
push 0x48f464
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov ebx, eax
test ebx, ebx
js 0x40d57a
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 0x40d41f
mov dword [ebp - 0x2c], edi
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test ebx, ebx
js 0x40d57a
mov eax, dword [ebp - 0x24]
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x54]
mov ebx, eax
test ebx, ebx
js 0x40d57a
push 0x10
call fcn.00453ca3
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 0x40d498
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 0x40d57a
mov eax, dword [ebp - 0x24]
push 3
push eax
mov ecx, dword [eax]
call dword [ecx + 0x5c]
mov ebx, eax
test ebx, ebx
js 0x40d57a
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 0x40d57a
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov ebx, eax
test ebx, ebx
js 0x40d57a
push dword [ebp - 0x44]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [esi + 8]
test ebx, ebx
jns 0x40d51a
cmp ebx, reloc.OLEAUT32.dll_VariantCopyInd
jne 0x40d57a
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
jmp 0x40d57a
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40d56d
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 0x40d576
cmp eax, 0x20
je 0x40d543
cmp eax, 5
jne 0x40d557
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub dword [ebp - 0x30], 1
mov eax, dword [ebp - 0x38]
jns 0x40d521
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x40d576
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test ebx, ebx
jns 0x40d587
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40d587
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40d595
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jns 0x40d5b5
mov eax, ebx
and eax, 0x1fff0000
cmp eax, 0x70000
jne 0x40d5ae
movzx edi, bx
test edi, edi
jne 0x40d5b7
mov edi, 0x4b1
jmp 0x40d5b7
xor edi, edi
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.0040aa0b
mov byte [ebp - 4], 3
test esi, esi
je 0x40d5d4
mov eax, dword [esi]
push esi
call dword [eax + 8]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40d5e5
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x40d5f6
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
mov eax, edi
call fcn.004542b4
ret