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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
and eax, 0xffff
movzx ecx, ax
and ecx, 0xff
movzx edx, cl
mov dword [ebp - 0x64], edx
cmp dword [ebp - 0x64], 6
jae 0x410ae1
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.msi.dll_MsiOpenDatabaseW
jmp 0x410d20
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x60], 0
call fcn.00410610
mov dword [ebp - 8], eax
mov dword [ebp - 0x80], 0
push str.AdvApi32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0
je 0x410b34
push str.CreateProcessWithTokenW
mov edx, dword [ebp - 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x80], eax
cmp dword [ebp - 0x80], 0
jne 0x410b34
mov eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x80], 0
je 0x410b73
cmp dword [ebp + 0x10], 0
jne 0x410b73
lea ecx, [ebp - 0x54]
push ecx
mov edx, dword [ebp - 8]
push edx
call sub.ADVAPI32.dll_ConvertStringSidToSidW
test eax, eax
je 0x410b73
lea eax, [ebp - 0x60]
push eax
call fcn.00410010
add esp, 4
test eax, eax
je 0x410b73
mov ecx, dword [ebp - 0x60]
push ecx
mov edx, dword [ebp - 0x54]
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x410b85
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.msi.dll_MsiOpenDatabaseW
jmp 0x410d20
push 0x10
push 0
lea edx, [ebp - 0x7c]
push edx
call fcn.004037e0
add esp, 0xc
push 0x44
push 0
lea eax, [ebp - 0x50]
push eax
call fcn.004037e0
add esp, 0xc
mov dword [ebp - 0x50], 0x44
mov ecx, dword [ebp - 8]
push ecx
call fcn.00410310
add esp, 4
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x5c], 0
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0x84], edx
cmp dword [ebp - 0x84], 2
jb 0x410bf8
cmp dword [ebp - 0x84], 3
jbe 0x410be6
jmp 0x410bf8
push 0
push str._quiet
lea eax, [ebp - 0x5c]
push eax
call fcn.0040248e
jmp 0x410c08
push 0
push 0x414860
lea ecx, [ebp - 0x5c]
push ecx
call fcn.0040248e
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.msiexec__i___s___s__s
lea edx, [ebp - 0x6c]
push edx
call fcn.0040265a
add esp, 0x14
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x50]
push ecx
push 0
push 0
push 0x400
push str.msiexec__unregister
push 0x4148b8
push 1
mov edx, dword [ebp - 0x58]
push edx
call dword [ebp - 0x80]
push 0x3e8
mov eax, dword [ebp - 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x10
push 0
lea ecx, [ebp - 0x7c]
push ecx
call fcn.004037e0
add esp, 0xc
push 0x44
push 0
lea edx, [ebp - 0x50]
push edx
call fcn.004037e0
add esp, 0xc
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x50]
push ecx
push 0
push 0
push 0x400
push str.msiexec__regserver
push 0x4148f8
push 1
mov edx, dword [ebp - 0x58]
push edx
call dword [ebp - 0x80]
push 0x10
push 0
lea eax, [ebp - 0x7c]
push eax
call fcn.004037e0
add esp, 0xc
push 0x44
push 0
lea ecx, [ebp - 0x50]
push ecx
call fcn.004037e0
add esp, 0xc
lea edx, [ebp - 0x7c]
push edx
lea eax, [ebp - 0x50]
push eax
push 0
push 0
push 0x400
mov ecx, dword [ebp - 0x6c]
push ecx
push str.msiexec.exe
push 1
mov edx, dword [ebp - 0x58]
push edx
call dword [ebp - 0x80]
test eax, eax
jne 0x410cea
mov eax, 0x643
jmp 0x410d20
cmp dword [ebp - 0x6c], 0
je 0x410cf9
mov eax, dword [ebp - 0x6c]
push eax
call fcn.00401f52
cmp dword [ebp - 0x5c], 0
je 0x410d08
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.00401f52
push 0xffffffffffffffff
mov edx, dword [ebp - 0x7c]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
mov esp, ebp
pop ebp
ret