Function at 0x401730
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 0x40194d
cmp dword [ebp + 8], esi
jne 0x40194d
call fcn.0040f550
push str.AdvApi32
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0x2c], eax
test eax, eax
je 0x4017ab
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]
neg eax
sbb eax, eax
add eax, 1
jne 0x40194d
lea ecx, [esp + 0x1c]
call fcn.004011e0
mov esi, dword [esp + 0x1c]
neg eax
sbb eax, eax
add eax, 1
jne 0x40194d
push esi
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x40194d
push 0x44
push eax
lea eax, [esp + 0x50]
xorps xmm0, xmm0
push eax
movaps xmmword [esp + 0x3c], xmm0
call fcn.00414870
mov ecx, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x48], 0x44
call fcn.00401350
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.00414870
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.00414870
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 0x4018d2
cmp eax, 2
mov eax, 0x43cdd0
jne 0x4018d7
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.0040fc50
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 0x401930
push eax
call fcn.0040fe60
push 0xffffffffffffffff
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40195d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40195d
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 0x401974
push eax
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40197f
push eax
call ecx
test esi, esi
je 0x401993
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