Function at 0x410ad0
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 0x410b11
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.msi.dll_MsiOpenDatabaseW
jmp 0x410d50
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x60], 0
call fcn.00410640
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 0x410b64
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 0x410b64
mov eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x80], 0
je 0x410ba3
cmp dword [ebp + 0x10], 0
jne 0x410ba3
lea ecx, [ebp - 0x54]
push ecx
mov edx, dword [ebp - 8]
push edx
call sub.ADVAPI32.dll_ConvertStringSidToSidW
test eax, eax
je 0x410ba3
lea eax, [ebp - 0x60]
push eax
call fcn.00410040
add esp, 4
test eax, eax
je 0x410ba3
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 0x410bb5
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.msi.dll_MsiOpenDatabaseW
jmp 0x410d50
push 0x10
push 0
lea edx, [ebp - 0x7c]
push edx
call fcn.00403800
add esp, 0xc
push 0x44
push 0
lea eax, [ebp - 0x50]
push eax
call fcn.00403800
add esp, 0xc
mov dword [ebp - 0x50], 0x44
mov ecx, dword [ebp - 8]
push ecx
call fcn.00410340
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 0x410c28
cmp dword [ebp - 0x84], 3
jbe 0x410c16
jmp 0x410c28
push 0
push str._quiet
lea eax, [ebp - 0x5c]
push eax
call fcn.004024ae
jmp 0x410c38
push 0
push 0x414860
lea ecx, [ebp - 0x5c]
push ecx
call fcn.004024ae
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.0040267a
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.00403800
add esp, 0xc
push 0x44
push 0
lea edx, [ebp - 0x50]
push edx
call fcn.00403800
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.00403800
add esp, 0xc
push 0x44
push 0
lea ecx, [ebp - 0x50]
push ecx
call fcn.00403800
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 0x410d1a
mov eax, 0x643
jmp 0x410d50
cmp dword [ebp - 0x6c], 0
je 0x410d29
mov eax, dword [ebp - 0x6c]
push eax
call fcn.00401f72
cmp dword [ebp - 0x5c], 0
je 0x410d38
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.00401f72
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