Function at 0x40a660
Capabilities:
Check if file exists
Copy file
Get file attributes
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4428a0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2b0
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 0x390]
lea ebp, [ebx + 0x38c]
test eax, eax
push edi
mov dword [esp + 0x54], ebx
jne 0x40a69a
mov eax, 0x445318
push eax
call fcn.00422884
add esp, 4
test eax, eax
je 0x40a6cf
mov ebp, dword [ebp + 4]
test ebp, ebp
jne 0x40a6b3
mov ebp, 0x445318
push ebp
push str.FileName__s__has_a_full_path_____To_use_copytotemp__the_path_should_be_a_relative_path_from_the_setup_folder___
push 8
push 0x45a150
call fcn.004018d0
add esp, 0x10
xor eax, eax
jmp 0x40af6e
mov al, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x80]
mov byte [esp + 0x80], al
call fcn.00403f10
mov edi, str._temp_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str._temp_
lea ecx, [esp + 0x84]
call fcn.00403ab0
push 0x800
lea ecx, [esp + 0x80]
push 0
push ecx
lea ecx, [ebx + 0x1fc]
mov dword [esp + 0x2d4], 0
call fcn.0041f9e1
mov eax, dword [ebx + 0x380]
lea esi, [ebx + 0x37c]
test eax, eax
jne 0x40a743
mov eax, 0x445318
push eax
push str.Source__msiFilename_s
push 1
push 0x45a150
call fcn.004018d0
mov edx, dword [0x445314]
add esp, 0x10
lea eax, [esp + 0x7c]
mov ecx, ebp
push edx
push 0
push eax
push 0
call fcn.004166d0
mov ecx, dword [0x445314]
push ecx
push 0
push eax
mov ecx, esi
call fcn.004038b0
mov esi, dword [esi + 4]
test esi, esi
jne 0x40a78c
mov esi, 0x445318
push esi
push str.Destination__msiFilename_s
push 1
push 0x45a150
call fcn.004018d0
mov edx, dword [0x456404]
add esp, 0x10
lea ecx, [esp + 0x6c]
mov dword [esp + 0x68], edx
call fcn.0040a5f0
mov eax, dword [0x456404]
lea ecx, [esp + 0x34]
mov dword [esp + 0x30], eax
call fcn.0040a5f0
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor eax, eax
mov ax, word [ebx + 0x104]
mov byte [esp + 0x2c8], 2
push eax
push 0x28
push 0
call ebp
push eax
lea ecx, [esp + 0x78]
call fcn.00426cda
neg eax
sbb eax, eax
neg eax
mov dword [esp + 0x14], eax
jne 0x40a813
push str.Failed_to_load_localized_string
push str._s_failed_n
push 0x45a150
call fcn.0041a185
add esp, 0xc
jmp 0x40a847
mov edi, dword [esp + 0x70]
test edi, edi
jne 0x40a820
mov edi, 0x445318
mov ecx, dword [esp + 0x74]
lea esi, [ecx + 1]
lea ecx, [esp + 0x68]
push esi
call fcn.0043bbbd
push esi
push edi
push eax
call fcn.00428ee8
add esp, 0xc
lea ecx, [esp + 0x68]
push 0xffffffffffffffff
call fcn.0043bc0c
xor eax, eax
mov ax, word [ebx + 0x104]
push eax
push 0x5a
push 0
call ebp
push eax
lea ecx, [esp + 0x40]
call fcn.00426cda
neg eax
sbb eax, eax
neg eax
mov dword [esp + 0x14], eax
jne 0x40a886
push str.Failed_to_load_localized_string
push str._s_failed_n
push 0x45a150
call fcn.0041a185
add esp, 0xc
jmp 0x40a8ba
mov edi, dword [esp + 0x38]
test edi, edi
jne 0x40a893
mov edi, 0x445318
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x30]
lea esi, [edx + 1]
push esi
call fcn.0043bbbd
push esi
push edi
push eax
call fcn.00428ee8
add esp, 0xc
lea ecx, [esp + 0x30]
push 0xffffffffffffffff
call fcn.0043bc0c
push 0x450c24
lea ecx, [esp + 0x18]
call fcn.0043ba73
push eax
lea eax, [esp + 0x6c]
lea ecx, [esp + 0xa0]
push eax
push ecx
mov byte [esp + 0x2d4], 3
call fcn.0043bb57
lea edx, [esp + 0x30]
mov byte [esp + 0x2c8], 4
push edx
push eax
lea eax, [esp + 0xa8]
push eax
call fcn.0043bb57
mov cl, byte [esp + 0x13]
mov esi, dword [eax]
xor ebx, ebx
mov byte [esp + 0x58], cl
push ebx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x2cc], 5
call fcn.00403f10
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
lea ecx, [esp + 0x60]
call fcn.00403ab0
lea ecx, [esp + 0xa0]
mov byte [esp + 0x2c8], 9
call fcn.0043ba49
lea ecx, [esp + 0x9c]
mov byte [esp + 0x2c8], 8
call fcn.0043ba49
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c8], 7
call fcn.0043ba49
mov edx, dword [esp + 0x2d0]
mov dword [esp + 0x18], ebx
mov eax, dword [edx + 4]
mov ecx, dword [eax]
cmp ecx, eax
mov dword [esp + 0x1c], ecx
je 0x40acfc
mov al, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x24]
mov byte [esp + 0x24], al
call fcn.00403f10
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x7c]
lea eax, [esp + 0xa8]
mov byte [esp + 0x2c8], 0xa
lea ebp, [ecx + 8]
push ebp
push edx
push eax
call fcn.00405310
add esp, 0xc
mov ecx, dword [0x445314]
mov byte [esp + 0x2c8], 0xb
push ecx
push 0
push eax
lea ecx, [esp + 0x2c]
call fcn.004038b0
push 1
lea ecx, [esp + 0xac]
mov byte [esp + 0x2cc], 0xa
call fcn.00403f10
mov dl, byte [0x469cb0]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1bd]
mov byte [esp + 0x1bc], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40aa1e
mov eax, 0x445318
lea ecx, [esp + 0x1bc]
push 0x104
push ecx
push eax
call fcn.004244d6
lea edx, [esp + 0x1c8]
push edx
call fcn.0042267b
add esp, 0x10
test eax, eax
je 0x40ad25
mov edi, dword [esp + 0x5c]
mov ebx, dword [esp + 0x60]
test edi, edi
jne 0x40aa5a
mov edi, 0x445318
mov eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
test eax, eax
jne 0x40aa69
mov eax, 0x445318
push ecx
push eax
call fcn.00429d68
push ebx
push edi
mov esi, eax
call fcn.00429d68
lea eax, [eax + esi + 1]
push eax
call fcn.0043ad23
mov esi, eax
add esp, 0x14
test esi, esi
je 0x40aae1
mov eax, dword [ebp + 4]
mov ecx, 0x445318
test eax, eax
je 0x40aa9a
mov ecx, eax
mov eax, dword [esp + 0x5c]
test eax, eax
jne 0x40aaa7
mov eax, 0x445318
push ecx
push eax
push esi
call fcn.00428fc1
add esp, 0xc
lea edx, [esp + 0x13]
push 0
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0xb8], esp
push edx
push esi
call fcn.00416280
mov ebx, dword [esp + 0x68]
mov ecx, ebx
call fcn.00402fc0
push esi
call fcn.0043ad4c
add esp, 4
jmp 0x40aae5
mov ebx, dword [esp + 0x54]
mov al, byte [ebx + 0x1b0]
lea esi, [ebx + 0x1b0]
push 0
lea ecx, [esp + 0x48]
mov byte [esp + 0x48], al
call fcn.00403f10
mov ecx, dword [0x445314]
push ecx
push 0
push esi
lea ecx, [esp + 0x50]
call fcn.004038b0
mov edi, str.setup_
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x2c8], 0xe
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.setup_
lea ecx, [esp + 0x4c]
call fcn.004037f0
mov edx, dword [0x445314]
lea ecx, [esp + 0x44]
push edx
push 0
push ebp
call fcn.00403710
mov al, byte [0x469cb0]
mov ecx, 0x40
mov byte [esp + 0xb8], al
xor eax, eax
lea edi, [esp + 0xb9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40ab78
mov eax, 0x445318
xor ebp, ebp
lea ecx, [esp + 0xb8]
push ebp
push ecx
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea edi, [esp + 0xb8]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xb8]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x28]
call fcn.00403ab0
lea eax, [esp + 0xb8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40abde
mov eax, dword [esp + 0x24]
cmp eax, ebp
jne 0x40abd2
mov eax, 0x445318
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, dword [esp + 0x24]
cmp ecx, ebp
jne 0x40abeb
mov ecx, 0x445318
mov eax, dword [esp + 0x48]
cmp eax, ebp
jne 0x40abf8
mov eax, 0x445318
push ebp
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40ad98
mov ecx, dword [esp + 0x24]
cmp ecx, ebp
jne 0x40ac16
mov ecx, 0x445318
mov eax, dword [esp + 0x48]
cmp eax, ebp
jne 0x40ac23
mov eax, 0x445318
push ecx
push eax
push str.Copied_file__s_to__s
push 1
push 0x45a150
call fcn.004018d0
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x2e4]
add esp, 0x14
inc eax
mov dword [esp + 0x18], eax
mov eax, dword [esi + 8]
fild dword [esp + 0x18]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], ebp
push ebp
fmul qword [0x445400]
fild qword [esp + 0x90]
fdivp st(1)
call fcn.00429dac
push eax
mov ecx, ebx
call fcn.00403160
mov eax, dword [esp + 0x48]
cmp eax, ebp
je 0x40aca0
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40ac97
cmp al, 0xff
je 0x40ac97
dec al
mov byte [ecx], al
jmp 0x40aca0
push ecx
call fcn.0043ad4c
add esp, 4
mov eax, dword [esp + 0x24]
mov dword [esp + 0x48], ebp
cmp eax, ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebp
mov byte [esp + 0x2c8], 7
je 0x40acd9
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40acd0
cmp al, 0xff
je 0x40acd0
dec al
mov byte [ecx], al
jmp 0x40acd9
push ecx
call fcn.0043ad4c
add esp, 4
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov eax, dword [ecx]
mov ecx, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x1c], eax
jne 0x40a988
xor ebx, ebx
mov ecx, dword [esp + 0x5c]
cmp ecx, ebx
je 0x40aed2
mov al, byte [ecx - 1]
dec ecx
test al, al
je 0x40aec9
cmp al, 0xff
je 0x40aec9
dec al
mov byte [ecx], al
jmp 0x40aed2
lea edx, [esp + 0x1bc]
push edx
push str.Failed_to_create__s.
push 8
push 0x45a150
call fcn.004018d0
add esp, 0x10
lea ecx, [esp + 0x20]
mov byte [esp + 0x2c8], 7
push 1
call fcn.00403f10
push 1
lea ecx, [esp + 0x5c]
mov byte [esp + 0x2cc], 2
call fcn.00403f10
push 1
lea ecx, [esp + 0x38]
mov byte [esp + 0x2cc], 0xc
call fcn.00403f10
lea ecx, [esp + 0x30]
mov byte [esp + 0x2c8], 1
call fcn.0043ba49
mov byte [esp + 0x2c8], 0xd
jmp 0x40ae8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov al, byte [esp + 0x13]
push ebp
lea ecx, [esp + 0x90]
mov byte [esp + 0x90], al
call fcn.00403f10
lea ecx, [esp + 0x8c]
mov byte [esp + 0x2c8], 0xf
push ecx
call fcn.00422f0d
mov edx, dword [esp + 0x94]
add esp, 4
cmp edx, ebp
jne 0x40ade0
mov edx, 0x445318
mov ecx, dword [esp + 0x24]
cmp ecx, ebp
jne 0x40aded
mov ecx, 0x445318
mov eax, dword [esp + 0x48]
cmp eax, ebp
jne 0x40adfa
mov eax, 0x445318
push edx
push esi
push ecx
push eax
push str.Failed_to_copy_file__s_to__s.__Setting_to_copy_at_reboot.__error0x_x_:__s
push 8
push 0x45a150
call fcn.004018d0
add esp, 0x1c
lea ecx, [esp + 0x8c]
mov byte [esp + 0x2c8], 0xe
push 1
call fcn.00403f10
push 1
lea ecx, [esp + 0x48]
mov byte [esp + 0x2cc], 0xa
call fcn.00403f10
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x2cc], 7
call fcn.00403f10
push 1
lea ecx, [esp + 0x5c]
mov byte [esp + 0x2cc], 2
call fcn.00403f10
push 1
lea ecx, [esp + 0x38]
mov byte [esp + 0x2cc], 0x10
call fcn.00403f10
lea ecx, [esp + 0x30]
mov byte [esp + 0x2c8], 1
call fcn.0043ba49
mov byte [esp + 0x2c8], 0x11
push 1
lea ecx, [esp + 0x70]
call fcn.00403f10
lea ecx, [esp + 0x68]
mov byte [esp + 0x2c8], 0
call fcn.0043ba49
push 1
lea ecx, [esp + 0x80]
mov dword [esp + 0x2cc], 0xffffffff
call fcn.00403f10
xor eax, eax
jmp 0x40af6e
push ecx
call fcn.0043ad4c
add esp, 4
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x5c], ebx
cmp ecx, ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov byte [esp + 0x2c8], 1
je 0x40af09
mov al, byte [ecx - 1]
dec ecx
test al, al
je 0x40af00
cmp al, 0xff
je 0x40af00
dec al
mov byte [ecx], al
jmp 0x40af09
push ecx
call fcn.0043ad4c
add esp, 4
lea ecx, [esp + 0x30]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
call fcn.0043ba49
push 1
lea ecx, [esp + 0x70]
mov byte [esp + 0x2cc], 0x12
call fcn.00403f10
lea ecx, [esp + 0x68]
mov byte [esp + 0x2c8], 0
call fcn.0043ba49
mov ecx, dword [esp + 0x80]
cmp ecx, ebx
je 0x40af69
mov al, byte [ecx - 1]
test al, al
je 0x40af5f
cmp al, 0xff
je 0x40af5f
dec al
mov byte [ecx - 1], al
jmp 0x40af69
dec ecx
push ecx
call fcn.0043ad4c
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x2c0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x2bc
ret 4