Function at 0x401660
Capabilities:
Check os version
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x88
push esi
push edi
mov dword [esp + 0x24], edx
xor edi, edi
mov dword [esp + 0x28], ecx
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor esi, esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], esi
cmp al, 6
jb 0x401873
cmp dword [ebp + 8], esi
jne 0x401873
call fcn.0040fe90
push str.AdvApi32
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0x2c], eax
test eax, eax
je 0x4016db
push str.CreateProcessWithTokenW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [esp + 0x2c]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
je 0x401873
lea ecx, [esp + 0x1c]
call fcn.00401270
mov esi, dword [esp + 0x1c]
test eax, eax
je 0x401873
push esi
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x401873
push 0x44
push eax
lea eax, [esp + 0x50]
xorps xmm0, xmm0
push eax
movaps xmmword [esp + 0x3c], xmm0
call fcn.00414fa0
mov ecx, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x48], 0x44
call fcn.004013e0
lea ecx, [esp + 0x30]
mov dword [esp + 0x1c], eax
push ecx
lea ecx, [esp + 0x4c]
push ecx
push 0
push 0
push 0x400
push str.msiexec__unregister
push str.msiexec.exe
push 1
push eax
call dword [esp + 0x34]
push 0x3e8
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x44
lea eax, [esp + 0x4c]
xorps xmm0, xmm0
push 0
push eax
movaps xmmword [esp + 0x3c], xmm0
call fcn.00414fa0
add esp, 0xc
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
push 0
push 0x400
push str.msiexec__regserver
push str.msiexec.exe
push 1
push dword [esp + 0x3c]
call dword [esp + 0x34]
push 0x44
lea eax, [esp + 0x4c]
xorps xmm0, xmm0
push 0
push eax
movaps xmmword [esp + 0x3c], xmm0
call fcn.00414fa0
add esp, 0xc
xorps xmm0, xmm0
movd eax, xmm0
push 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp + 0xc]
cmp eax, 3
je 0x4017f8
cmp eax, 2
mov eax, 0x43fe7c
jne 0x4017fd
mov eax, str._quiet
push dword [esp + 0x24]
push eax
push dword [esp + 0x30]
lea eax, [esp + 0x24]
push str.msiexec__i___s___s__s
push eax
call fcn.0040e130
add esp, 0x14
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
push 0
push 0x400
push dword [esp + 0x2c]
push str.msiexec.exe
push 1
push dword [esp + 0x3c]
call dword [esp + 0x34]
test eax, eax
mov ecx, 0x643
mov eax, dword [esp + 0x18]
cmove edi, ecx
test eax, eax
je 0x401856
push eax
call fcn.0040e720
push 0xffffffffffffffff
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x401883
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401883
push dword [esp + 0x24]
push dword [esp + 0x2c]
call dword [sym.imp.msi.dll_MsiOpenDatabaseW]
mov edi, eax
mov eax, dword [esp + 0x14]
mov ecx, dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
je 0x40189a
push eax
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4018a5
push eax
call ecx
test esi, esi
je 0x4018b9
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret