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

Disassembly:
push 0x85c
mov eax, 0x451223
call fcn.0043a3ed
mov esi, ecx
mov dword [ebp - 0x83c], esi
mov edi, 0x46f860
mov dword [ebp - 0x838], edi
mov eax, dword [ebp + 8]
mov dword [0x46f860], eax
push 0
push 0x102
call sub.msi.dll_MsiSetPropertyW
push edi
push 0x7fdf
push 0x40c1e0
call sub.msi.dll_MsiSetInternalUI
lea ecx, [ebp - 0x828]
call fcn.004062b9
and dword [ebp - 4], 0
push esi
lea eax, [ebp - 0x828]
push eax
call fcn.0040c48a
mov dword [ebp - 0x820], eax
push esi
lea eax, [ebp - 0x818]
push eax
call fcn.0040d06b
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x844]
call fcn.0042b383
mov byte [ebp - 4], 2
mov byte [ebp - 4], 3
lea eax, [ebp - 0x81c]
push eax
call fcn.004130cf
pop ecx
mov byte [ebp - 4], 4
push dword [eax]
lea eax, [ebp - 0x824]
push eax
call fcn.0040d06b
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x818]
call fcn.00401b00
mov byte [ebp - 4], 4
lea eax, [ebp - 0x824]
push eax
call fcn.00401e45
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x81c]
call fcn.00401b60
push dword [ebp - 0x818]
lea eax, [ebp - 0x81c]
push eax
call fcn.0041312a
pop ecx
pop ecx
mov byte [ebp - 4], 6
push dword [eax]
lea eax, [ebp - 0x824]
push eax
call fcn.0040d06b
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x818]
call fcn.00401b00
mov byte [ebp - 4], 6
lea eax, [ebp - 0x824]
push eax
call fcn.00401e45
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x81c]
call fcn.00401b60
push str.Downloaded_Installers
lea edi, [ebp - 0x818]
call fcn.0040d091
push dword [ebp - 0x818]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call ebx
test eax, eax
jne 0x40cafc
push eax
push dword [ebp - 0x818]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40cafc
call fcn.0040932e
push dword [ebp - 0x828]
lea edi, [ebp - 0x818]
call fcn.0040d091
push dword [ebp - 0x818]
call ebx
test eax, eax
jne 0x40cb2a
push eax
push dword [ebp - 0x818]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40caf7
push str._setup.msi
lea edi, [ebp - 0x818]
call fcn.0040d091
push 0
push dword [ebp - 0x818]
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40caf7
mov dword [ebp - 4], 2
mov byte [ebp - 4], 1
call fcn.0042b399
xor esi, esi
xor edi, edi
cmp dword [ebp - 0x820], edi
jne 0x40cd4f
lea ecx, [ebp - 0x81c]
call fcn.004062b9
mov byte [ebp - 4], 0xa
mov dword [ebp - 0x82c], edi
mov dword [ebp - 0x824], edi
mov byte [ebp - 4], 0xc
lea eax, [ebp - 0x820]
push eax
lea eax, [ebp - 0x824]
push eax
push 0x46fa4c
call fcn.00415730
cmp eax, edi
jl 0x40cca0
lea ecx, [ebp - 0x844]
call fcn.0042b383
mov byte [ebp - 4], 0xd
mov byte [ebp - 4], 0xe
mov dword [ebp - 0x830], esi
cmp esi, dword [ebp - 0x820]
je 0x40cc54
mov eax, dword [ebp - 0x824]
mov ebx, dword [eax + esi*4]
mov eax, dword [ebp - 0x81c]
mov eax, dword [eax - 0xc]
cmp eax, edi
je 0x40cbf4
push 0x20
lea ecx, [ebp - 0x81c]
call fcn.004042cb
push ebx
lea ecx, [ebp - 0x81c]
call fcn.004092be
inc esi
jmp 0x40cbbf
mov eax, dword [ebp - 0x81c]
mov dword [ebp - 0x82c], eax
mov dword [ebp - 4], 0xd
jmp 0x40cc97
mov byte [ebp - 4], 0xc
call fcn.0042b399
push dword [ebp - 0x82c]
push dword [ebp - 0x818]
call sub.msi.dll_MsiOpenDatabaseW
mov esi, eax
push 0xa
lea ecx, [ebp - 0x868]
call fcn.00430903
mov byte [ebp - 4], 0x10
lea eax, [ebp - 0x820]
push eax
push 0x46f8a8
call fcn.0040d63b
mov byte [ebp - 4], 0x11
mov eax, dword [eax]
push edi
push eax
lea ecx, [ebp - 0x868]
call fcn.004309a9
mov edi, eax
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x820]
call fcn.00401b60
test edi, edi
je 0x40cd1f
push ecx
mov ecx, esp
mov dword [ebp - 0x820], esp
lea eax, [ebp - 0x828]
push eax
call fcn.004053dc
mov byte [ebp - 4], 0x12
mov byte [ebp - 4], 0x10
call fcn.0040c64a
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x868]
call fcn.00430a1a
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x824]
push eax
call fcn.0040cecc
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x81c]
call fcn.00401b60
xor edi, edi
lea eax, [ebp - 0x820]
push eax
push 0x46f8a8
call fcn.0040d63b
mov byte [ebp - 4], 0x13
push 0x45a7cc
mov ecx, eax
call fcn.00401e7a
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x820]
call fcn.00401b60
test bl, bl
je 0x40ce0a
push ecx
mov ecx, esp
mov dword [ebp - 0x820], esp
push 0x45a7e8
call fcn.00401527
mov byte [ebp - 4], 0x14
lea eax, [ebp - 0x81c]
push eax
mov byte [ebp - 4], 1
call fcn.00413306
pop ecx
pop ecx
mov byte [ebp - 4], 0x15
mov eax, dword [ebp - 0x81c]
cmp dword [eax - 0xc], edi
je 0x40cdfb
push str.__qn
lea ecx, [ebp - 0x81c]
call fcn.004092be
lea eax, [ebp - 0x81c]
push eax
call fcn.00412e84
pop ecx
mov dword [ebp - 0x820], eax
mov byte [ebp - 4], 0x15
cmp eax, edi
je 0x40cdfb
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x820], edi
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x81c]
call fcn.00401b60
cmp esi, edi
je 0x40ce7f
cmp esi, 0x642
je 0x40cea9
cmp esi, 0x669
je 0x40ce6c
cmp esi, 0xbc1
jbe 0x40ce32
cmp esi, 0xbc3
jbe 0x40ce6c
mov eax, dword [ebp - 0x838]
mov eax, dword [eax + 4]
cmp eax, edi
je 0x40ce56
mov dword [ebp - 0x834], eax
push 0x461a08
lea eax, [ebp - 0x834]
push eax
call fcn.0043a656
cmp esi, edi
jle 0x40ce66
and esi, 0xffff
or esi, 0x80070000
push esi
call fcn.004017d1
push edi
push edi
push 0x8001
push dword [0x46f8d8]
call dword [sym.imp.USER32.dll_PostThreadMessageW]
mov byte [ebp - 4], 0
lea eax, [ebp - 0x818]
push eax
call fcn.00401e45
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x828]
call fcn.00401b60
xor eax, eax
inc eax
call fcn.0043a449
ret 4
mov byte [ebp - 4], 0
lea eax, [ebp - 0x818]
push eax
call fcn.00401e45
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x828]
call fcn.00401b60
xor eax, eax
jmp 0x40cea1