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

Disassembly:
push 0x40
mov eax, 0x453a61
call fcn.0043bfb1
mov eax, dword [ebp + 8]
mov dword [0x473940], eax
xor esi, esi
push esi
push 0x102
call sub.msi.dll_MsiSetPropertyW
push 0x473940
push 0x7fdf
push 0x40cc78
call sub.msi.dll_MsiSetInternalUI
lea ecx, [ebp - 0x14]
call fcn.00406380
mov dword [ebp - 4], esi
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push eax
call fcn.0040cf22
mov dword [ebp - 0x20], eax
push dword [ebp + 0xc]
lea eax, [ebp + 8]
push eax
call fcn.0040d79c
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.0042c7cd
mov byte [ebp - 4], 2
mov byte [ebp - 4], 3
lea eax, [ebp - 0x1c]
push eax
call fcn.0041441e
pop ecx
mov byte [ebp - 4], 4
push dword [eax]
lea eax, [ebp - 0x18]
push eax
call fcn.0040d79c
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp + 8]
call fcn.00401afd
mov byte [ebp - 4], 4
lea eax, [ebp - 0x18]
push eax
call fcn.0040d7fc
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1c]
call fcn.00401b5d
push dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
call fcn.00414479
pop ecx
pop ecx
mov byte [ebp - 4], 6
push dword [eax]
lea eax, [ebp - 0x1c]
push eax
call fcn.0040d79c
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp + 8]
call fcn.00401afd
mov byte [ebp - 4], 6
lea eax, [ebp - 0x1c]
push eax
call fcn.0040d7fc
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x18]
call fcn.00401b5d
push str.Downloaded_Installers
lea edi, [ebp + 8]
call fcn.0040d7c2
push dword [ebp + 8]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call ebx
test eax, eax
jne 0x40d54d
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40d54d
call fcn.00409d4a
push dword [ebp - 0x14]
lea edi, [ebp + 8]
call fcn.0040d7c2
push dword [ebp + 8]
call ebx
test eax, eax
jne 0x40d56f
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40d548
push str._setup.msi
lea edi, [ebp + 8]
call fcn.0040d7c2
push esi
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40d548
mov dword [ebp - 4], 2
jmp 0x40d5d4
mov byte [ebp - 4], 1
call fcn.0042c7e3
xor edi, edi
cmp dword [ebp - 0x20], esi
jne 0x40d657
push dword [ebp + 0x10]
push dword [ebp + 8]
call sub.msi.dll_MsiOpenDatabaseW
mov edi, eax
push 0xa
lea ecx, [ebp - 0x4c]
call fcn.00431d4d
mov byte [ebp - 4], 0xa
lea eax, [ebp + 0xc]
push eax
push 0x473988
call fcn.0040e602
mov byte [ebp - 4], 0xb
mov eax, dword [eax]
push esi
push eax
lea ecx, [ebp - 0x4c]
call fcn.00431df3
mov ebx, eax
mov byte [ebp - 4], 0xa
lea ecx, [ebp + 0xc]
call fcn.00401b5d
cmp ebx, esi
je 0x40d64b
push ecx
mov ecx, esp
mov dword [ebp + 0xc], esp
lea eax, [ebp - 0x14]
push eax
call fcn.00405498
mov byte [ebp - 4], 0xc
mov byte [ebp - 4], 0xa
call fcn.0040d0e2
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4c]
call fcn.00431e64
lea eax, [ebp + 0xc]
push eax
push 0x473988
call fcn.0040e602
mov byte [ebp - 4], 0xd
push 0x45d858
mov ecx, eax
call fcn.00401e61
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
mov byte [ebp - 4], 1
lea ecx, [ebp + 0xc]
call fcn.00401b5d
test bl, bl
je 0x40d6f4
push ecx
mov ecx, esp
mov dword [ebp + 0x10], esp
push 0x45d874
call fcn.0040154d
mov byte [ebp - 4], 0xe
lea eax, [ebp + 0xc]
push eax
mov byte [ebp - 4], 1
call fcn.00414686
pop ecx
pop ecx
mov byte [ebp - 4], 0xf
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], esi
je 0x40d6e8
push str.__qn
lea ecx, [ebp + 0xc]
call fcn.00409e4e
lea eax, [ebp + 0xc]
push eax
call fcn.004141d3
pop ecx
mov dword [ebp + 0x10], eax
mov byte [ebp - 4], 0xf
cmp eax, esi
je 0x40d6e8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x10], esi
mov byte [ebp - 4], 1
lea ecx, [ebp + 0xc]
call fcn.00401b5d
cmp edi, esi
je 0x40d75b
cmp edi, 0x642
je 0x40d77f
cmp edi, 0x669
je 0x40d748
cmp edi, 0xbc1
jbe 0x40d718
cmp edi, 0xbc3
jbe 0x40d748
mov eax, dword [0x473944]
cmp eax, esi
je 0x40d732
mov dword [ebp - 0x24], eax
push 0x464f28
lea eax, [ebp - 0x24]
push eax
call fcn.0043c286
cmp edi, esi
jle 0x40d742
and edi, 0xffff
or edi, 0x80070000
push edi
call fcn.004017ce
push esi
push esi
push 0x8001
push dword [0x4739b8]
call dword [sym.imp.USER32.dll_PostThreadMessageW]
mov byte [ebp - 4], 0
lea eax, [ebp + 8]
push eax
call fcn.0040d7fc
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00401b5d
xor eax, eax
inc eax
call fcn.0043c057
ret 0xc
mov byte [ebp - 4], 0
lea eax, [ebp + 8]
push eax
call fcn.0040d7fc
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00401b5d
xor eax, eax
jmp 0x40d777