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

Disassembly:
push 0x3c
mov eax, 0x475f9d
call fcn.0045053c
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x48], ecx
xor esi, esi
mov dword [ebp - 0x30], esi
xor ebx, ebx
inc ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], esi
mov byte [ebp - 4], 3
mov dword [ebp - 0x44], esi
mov byte [ebp - 4], 5
call fcn.00409480
push eax
lea ecx, [ebp - 0x28]
call fcn.00408c39
mov byte [ebp - 4], 7
mov eax, 0x36ee80
cmp dword [ebp + 8], esi
push esi
cmovne eax, dword [ebp + 8]
push esi
push ebx
push esi
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x34], eax
test eax, eax
jne 0x40d5cb
mov ebx, 0x80070006
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40d579
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40d587
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 5
lea ecx, [edi - 0x10]
call fcn.00409575
mov byte [ebp - 4], 3
test esi, esi
je 0x40d5a1
mov eax, dword [esi]
push esi
call dword [eax + 8]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40d5b2
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40d5c3
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, ebx
call fcn.004504e6
ret
mov edi, 0x104
lea ecx, [ebp - 0x28]
push edi
call fcn.00409176
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ecx
lea ecx, [ebp - 0x28]
call fcn.004089f1
mov edi, dword [ebp - 0x28]
cmp dword [edi - 0xc], 0
jne 0x40d5fd
mov ebx, 0x8000ffff
jmp 0x40d56c
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push ecx
xor edx, edx
lea ecx, [ebp - 0x2c]
call fcn.0041e675
pop ecx
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x28]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.0040c3a0
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
call fcn.00409575
lea eax, [ebp - 0x30]
push eax
push 0x48a4ac
push 4
push esi
push 0x48a4bc
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov ebx, eax
test ebx, ebx
js 0x40d569
mov eax, dword [ebp - 0x30]
lea edx, [ebp - 0x24]
push edx
lea edx, [ebp - 0x20]
push edx
mov ecx, dword [eax]
push esi
push str.AvEmUpdate_download
push eax
call dword [ecx + 0xc]
mov ecx, dword [ebp - 0x30]
mov ebx, eax
test ecx, ecx
je 0x40d67c
mov dword [ebp - 0x30], esi
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test ebx, ebx
js 0x40d569
mov eax, dword [ebp - 0x24]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x54]
mov ebx, eax
test ebx, ebx
js 0x40d569
push 0x10
call fcn.0044fbac
pop ecx
mov dword [ebp - 0x2c], eax
mov byte [ebp - 4], 0xa
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [eax], vtable.CNotifyInterface.0
mov dword [eax + 4], 1
mov dword [eax + 8], reloc.OLEAUT32.dll_VariantCopyInd
add eax, 0xc
mov dword [ebp - 0x40], eax
mov dword [eax], esi
call edi
mov ebx, eax
call edi
mov edi, dword [ebp - 0x40]
push 2
push esi
push esi
push edi
push ebx
mov ebx, dword [ebp - 0x34]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x40d6f0
push ebx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [edi], esi
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x2c]
mov esi, edx
mov dword [ebp - 0x44], esi
mov eax, dword [ebp - 0x24]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x64]
mov ebx, eax
test ebx, ebx
js 0x40d569
mov eax, dword [ebp - 0x24]
push 3
push eax
mov ecx, dword [eax]
call dword [ecx + 0x5c]
mov ebx, eax
test ebx, ebx
js 0x40d569
mov eax, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
push edi
push dword [ebp - 0x48]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
mov ebx, eax
test ebx, ebx
js 0x40d56c
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov ebx, eax
test ebx, ebx
js 0x40d56c
push dword [ebp - 0x38]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, esi
mov ebx, dword [ebx + 8]
mov dword [ebp - 0x38], ebx
test ebx, ebx
jns 0x40d784
cmp ebx, reloc.OLEAUT32.dll_VariantCopyInd
jne 0x40d56c
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
jmp 0x40d56c
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40d7dc
mov dword [ebp - 0x2c], 9
push 2
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x40d7e5
cmp eax, 0x20
je 0x40d7b2
cmp eax, 5
jne 0x40d7c6
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub dword [ebp - 0x2c], 1
mov eax, dword [ebp - 0x3c]
jns 0x40d792
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x40d7e8
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40d7e8
mov ebx, dword [ebp - 0x38]
test ebx, ebx
jns 0x40d579
jmp 0x40d56c