Function at 0x40a9e0
Capabilities:
Check if file exists
Check os version
Create process on windows
Get common file path
Get file attributes
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5494c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4f8
mov eax, dword [0x5b5ecc]
push ebx
push esi
push edi
mov ebx, ecx
xor esi, esi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x100]
mov byte [ebp - 4], 1
push ecx
mov dword [ebp - 0x100], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x40aaf7
cmp dword [ebp - 0xf0], 2
jne 0x40aaf7
cmp dword [ebp - 0xfc], 6
jb 0x40aaf7
lea edx, [ebp - 0x204]
push 0x104
push edx
push esi
mov dword [ebp - 0x1c], 1
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x504]
lea ecx, [ebp - 0x404]
push eax
lea edx, [ebp - 0x304]
push ecx
lea eax, [ebp - 0x20]
push edx
lea ecx, [ebp - 0x204]
push eax
push ecx
call fcn.0051d13a
add esp, 0x14
lea edx, [ebp - 0x304]
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x18]
push str.Uninstall.exe
push edx
push eax
push 0x59879c
push ecx
call fcn.0053091a
mov edx, dword [ebp - 0x18]
add esp, 0x14
mov ecx, 0xf
xor eax, eax
lea edi, [ebp - 0x68]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x68], 0x3c
mov dword [ebp - 0x64], 0x40
mov dword [ebp - 0x5c], str.open
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], 3
mov dword [ebp - 0x48], eax
mov esi, dword [ebp + 8]
mov edx, dword [0x5ba8bc]
lea ecx, [ebp - 0x24]
push 4
xor eax, eax
push ecx
test esi, esi
push 4
push 0
setne al
push str.AdvancedIntegration
push edx
mov dword [ebp - 0x24], eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test esi, esi
mov dword [ebx + 0x1c], esi
je 0x40acef
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x6c]
lea edi, [ebx + 4]
push eax
push ecx
mov ecx, edi
mov dword [ebp - 0x20], 1
call fcn.00407f90
xor edx, edx
test eax, eax
sete dl
mov eax, edx
mov edx, dword [ebp - 0x20]
xor ebx, ebx
test edx, edx
sete bl
test eax, eax
je 0x40ac71
mov eax, dword [ebp - 0x1c]
xor esi, esi
test eax, eax
je 0x40acd1
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40abd9
call dword [sym.imp.USER32.dll_GetForegroundWindow]
test ebx, ebx
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x54], str._instlsp1
jne 0x40ab96
mov dword [ebp - 0x54], str._instlsp2
lea ecx, [ebp - 0x68]
push ecx
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
je 0x40abd3
mov edx, dword [ebp - 0x30]
push 0xffffffffffffffff
push edx
mov esi, 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x1c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40ace3
mov esi, dword [ebp - 0x1c]
jmp 0x40acdb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [0x5ba8bc]
lea edx, [ebp - 0x24]
push 4
push edx
push 4
push 0
push str.AdvancedIntegration
push eax
mov dword [ebp - 0x24], 0
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x1c], 0
mov ecx, dword [0x5ba8bc]
lea eax, [ebp - 0x2c]
push 4
xor edx, edx
push eax
push 4
test esi, esi
push 0
push str.lastintres
setne dl
push ecx
mov dword [ebp - 0x2c], edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test esi, esi
je 0x40ac6e
mov esi, dword [ebp - 0x28]
mov ecx, esi
call fcn.0040d3a0
push 0
push 0
mov ecx, esi
call fcn.0040b830
push 0
push 0
mov ecx, esi
call fcn.0040ca40
push 0
push 0
mov ecx, esi
call fcn.0040cab0
push 0
push 0
mov ecx, esi
call fcn.0040be60
push 1
mov ecx, esi
call fcn.00411010
mov esi, dword [ebp + 8]
lea edx, [ebp - 0x204]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40ad7f
mov eax, dword [0x5b5ecc]
mov dword [ebp + 8], eax
lea ecx, [ebp - 0x204]
push str.idmmbc.dll
push ecx
lea edx, [ebp + 8]
push 0x5987d4
push edx
mov byte [ebp - 4], 2
call fcn.0053091a
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
add esp, 0x10
push eax
call fcn.0040d840
lea ecx, [ebp + 8]
mov byte [ebp - 4], 1
call fcn.00537b04
jmp 0x40ad7f
push ebx
mov ecx, edi
call fcn.00406ae0
mov esi, eax
test esi, esi
je 0x40abd9
mov dword [ebp - 0x14], 1
jmp 0x40ac05
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40ad63
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x14], 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40ae4a
call dword [sym.imp.USER32.dll_GetForegroundWindow]
lea edx, [ebp - 0x68]
mov dword [ebp - 0x60], eax
push edx
mov dword [ebp - 0x54], str._uninstlsp
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
je 0x40ad58
mov eax, dword [ebp - 0x30]
push 0xffffffffffffffff
push eax
mov dword [ebp - 0x14], 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp - 0x30]
lea ecx, [ebp + 8]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40ad76
mov eax, dword [ebp + 8]
jmp 0x40ad6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40ae4a
lea ecx, [ebx + 4]
call fcn.00407a70
test eax, eax
mov dword [ebp - 0x14], eax
je 0x40ae4a
push 0
mov ecx, ebx
call fcn.00411010
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40ae4a
test esi, esi
jne 0x40ae26
mov edx, dword [0x5ba8bc]
lea ecx, [ebp + 8]
push esi
push ecx
push esi
push 0xf003f
push esi
push esi
push esi
push str.netApps
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40ade4
mov edi, str.turn_off
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
push str.turn_off
push 1
push eax
mov eax, dword [ebp + 8]
push str.00000action
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [0x5bb060]
mov eax, dword [0x5bb064]
push 0x50004
push edx
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x40ae26
mov edx, dword [0x5ba8bc]
lea ecx, [ebp + 8]
push 4
push ecx
push 4
push 0
push str.NeedSnRpAfRb
push edx
mov dword [ebp + 8], 1
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [0x5bb09c]
mov ecx, dword [0x5bb048]
push 0x50030
push eax
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call fcn.004093a0
add esp, 4
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call fcn.00537b04
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4