Function at 0x40d0d4
Capabilities:
Check if file exists
Copy file
Create directory

Disassembly:
push 0x40
mov eax, 0x45ec4b
call fcn.0043f414
mov eax, dword [ebp + 8]
mov dword [0x480f80], eax
xor edi, edi
push edi
push 0x102
call sub.msi.dll_MsiSetPropertyW
push 0x480f80
push 0x7fdf
push 0x40c53b
call sub.msi.dll_MsiSetInternalUI
lea ecx, [ebp - 0x14]
call fcn.00401a8d
mov dword [ebp - 4], edi
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push eax
call fcn.0040c8f1
mov dword [ebp - 0x20], eax
push dword [ebp + 0xc]
lea eax, [ebp + 8]
push eax
call fcn.0040d5fe
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.00430697
mov byte [ebp - 4], 2
mov byte [ebp - 4], 3
lea eax, [ebp - 0x1c]
push eax
call fcn.004188b1
pop ecx
mov byte [ebp - 4], 4
push dword [eax]
lea eax, [ebp - 0x18]
push eax
call fcn.0040d5fe
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp + 8]
call fcn.00401b2a
mov byte [ebp - 4], 4
lea eax, [ebp - 0x18]
push eax
call fcn.00404386
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1c]
call fcn.004089bb
push dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
call fcn.0041890c
pop ecx
pop ecx
mov byte [ebp - 4], 6
push dword [eax]
lea eax, [ebp - 0x1c]
push eax
call fcn.0040d5fe
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp + 8]
call fcn.00401b2a
mov byte [ebp - 4], 6
lea eax, [ebp - 0x1c]
push eax
call fcn.00404386
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x18]
call fcn.004089bb
push str.Downloaded_Installers
lea esi, [ebp + 8]
call fcn.0040d63d
push dword [ebp + 8]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call ebx
test eax, eax
jne 0x40d1f4
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40d1f4
call fcn.004092d0
push dword [ebp - 0x14]
lea esi, [ebp + 8]
call fcn.0040d63d
push dword [ebp + 8]
call ebx
test eax, eax
jne 0x40d216
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40d1ef
push str._setup.msi
lea esi, [ebp + 8]
call fcn.0040d63d
push edi
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40d1ef
mov dword [ebp - 4], 2
jmp 0x40d27b
mov byte [ebp - 4], 1
call fcn.004306ad
xor esi, esi
cmp dword [ebp - 0x20], edi
jne 0x40d2fe
push dword [ebp + 0x10]
push dword [ebp + 8]
call sub.msi.dll_MsiOpenDatabaseW
mov esi, eax
push 0xa
lea ecx, [ebp - 0x4c]
call fcn.004365c0
mov byte [ebp - 4], 0xa
lea eax, [ebp + 0xc]
push eax
push 0x480fd8
call fcn.0040f59b
mov byte [ebp - 4], 0xb
mov eax, dword [eax]
push edi
push eax
lea ecx, [ebp - 0x4c]
call fcn.00436666
mov ebx, eax
mov byte [ebp - 4], 0xa
lea ecx, [ebp + 0xc]
call fcn.004089bb
cmp ebx, edi
je 0x40d2f2
push ecx
mov ecx, esp
mov dword [ebp + 0xc], esp
lea eax, [ebp - 0x14]
push eax
call fcn.00405244
mov byte [ebp - 4], 0xc
mov byte [ebp - 4], 0xa
call fcn.0040cbb9
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4c]
call fcn.004366d7
lea eax, [ebp + 0xc]
push eax
push 0x480fd8
call fcn.0040f59b
mov byte [ebp - 4], 0xd
push 0x468220
mov ecx, eax
call fcn.004043bb
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
mov byte [ebp - 4], 1
lea ecx, [ebp + 0xc]
call fcn.004089bb
test bl, bl
je 0x40d39b
push ecx
mov ecx, esp
mov dword [ebp + 0x10], esp
push 0x46823c
call fcn.00401518
mov byte [ebp - 4], 0xe
lea eax, [ebp + 0xc]
push eax
mov byte [ebp - 4], 1
call fcn.00418ae8
pop ecx
pop ecx
mov byte [ebp - 4], 0xf
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], edi
je 0x40d38f
push str.__qn
lea ecx, [ebp + 0xc]
call fcn.004092fc
lea eax, [ebp + 0xc]
push eax
call fcn.004186e8
pop ecx
mov dword [ebp + 0x10], eax
mov byte [ebp - 4], 0xf
cmp eax, edi
je 0x40d38f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x10], edi
mov byte [ebp - 4], 1
lea ecx, [ebp + 0xc]
call fcn.004089bb
cmp esi, edi
je 0x40d40a
cmp esi, 0x103
je 0x40d40a
cmp esi, 0x642
je 0x40d42e
cmp esi, 0x669
je 0x40d3f7
cmp esi, 0xbc1
jbe 0x40d3c7
cmp esi, 0xbc3
jbe 0x40d3f7
mov eax, dword [0x480f84]
cmp eax, edi
je 0x40d3e1
mov dword [ebp - 0x24], eax
push 0x4716c8
lea eax, [ebp - 0x24]
push eax
call fcn.0043f726
cmp esi, edi
jle 0x40d3f1
and esi, 0xffff
or esi, 0x80070000
push esi
call fcn.00401784
push edi
push edi
push 0x8001
push dword [0x481008]
call dword [sym.imp.USER32.dll_PostThreadMessageW]
mov byte [ebp - 4], 0
lea eax, [ebp + 8]
push eax
call fcn.00404386
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.004089bb
xor eax, eax
inc eax
call fcn.0043f4b9
ret 0xc
mov byte [ebp - 4], 0
lea eax, [ebp + 8]
push eax
call fcn.00404386
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.004089bb
xor eax, eax
jmp 0x40d426