Function at 0x422260
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 0x4222a1
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.msi.dll_MsiOpenDatabaseW
jmp 0x4224e0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x60], 0
call fcn.00421dd0
mov dword [ebp - 8], eax
mov dword [ebp - 0x80], 0
push 0x4263e4
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0
je 0x4222f4
push 0x4263f0
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 0x4222f4
mov eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x80], 0
je 0x422333
cmp dword [ebp + 0x10], 0
jne 0x422333
lea ecx, [ebp - 0x54]
push ecx
mov edx, dword [ebp - 8]
push edx
call sub.ADVAPI32.dll_ConvertStringSidToSidW
test eax, eax
je 0x422333
lea eax, [ebp - 0x60]
push eax
call fcn.004217d0
add esp, 4
test eax, eax
je 0x422333
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 0x422345
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.msi.dll_MsiOpenDatabaseW
jmp 0x4224e0
push 0x10
push 0
lea edx, [ebp - 0x7c]
push edx
call fcn.0040f520
add esp, 0xc
push 0x44
push 0
lea eax, [ebp - 0x50]
push eax
call fcn.0040f520
add esp, 0xc
mov dword [ebp - 0x50], 0x44
mov ecx, dword [ebp - 8]
push ecx
call fcn.00421ad0
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 0x4223b8
cmp dword [ebp - 0x84], 3
jbe 0x4223a6
jmp 0x4223b8
push 0
push str._quiet
lea eax, [ebp - 0x5c]
push eax
call fcn.0040dad4
jmp 0x4223c8
push 0
push 0x426418
lea ecx, [ebp - 0x5c]
push ecx
call fcn.0040dad4
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.0040dca0
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 0x426470
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.0040f520
add esp, 0xc
push 0x44
push 0
lea edx, [ebp - 0x50]
push edx
call fcn.0040f520
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 0x4264b0
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.0040f520
add esp, 0xc
push 0x44
push 0
lea ecx, [ebp - 0x50]
push ecx
call fcn.0040f520
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 0x4224aa
mov eax, 0x643
jmp 0x4224e0
cmp dword [ebp - 0x6c], 0
je 0x4224b9
mov eax, dword [ebp - 0x6c]
push eax
call fcn.0040d598
cmp dword [ebp - 0x5c], 0
je 0x4224c8
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.0040d598
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