ExpUpdateProductSuiteTypeInRegistry
VOID __stdcall ExpUpdateProductSuiteTypeInRegistry(VOID *KeyHandle){
VOID *v1;
unsigned int v2;
__int64 v3;
__int64 v4;
int v5;
NTSTATUS v6;
char *v7;
__int64 v8;
size_t v9;
NTSTATUS v10;
const wchar_t *v11;
__int64 v12;
size_t v13;
__int64 v14;
size_t v15;
__int64 v16;
size_t v17;
__int64 v18;
size_t v19;
__int64 v20;
size_t v21;
__int64 v22;
size_t v23;
__int64 v24;
size_t v25;
__int64 v26;
size_t v27;
__int64 v28;
size_t v29;
__int64 v30;
size_t v31;
__int64 v32;
size_t v33;
__int64 v34;
size_t v35;
__int64 v36;
size_t v37;
size_t v38;
UINT64 v39;
_UNICODE_STRING Data;
_UNICODE_STRING DestinationString_8;
char v42[768];
v1 = (VOID *)*(&ExBootDevicesRemovedEvent + 38);
v2 = 758;
DestinationString_8 = 0i64;
Data = 0i64;
memset(v42, 0i64, 0x2F6u);
if( ExpSetupModeDetected )
return;
RtlInitUnicodeString(&DestinationString_8, L"ProductType");
v3 = -1i64;
if( KUSER_SHARED_DATA.NtProductType == NtProductLanManNt )
{
v11 = L"LanmanNT";
}
else
{
if( KUSER_SHARED_DATA.NtProductType != NtProductServer )
{
RtlInitUnicodeString(&Data, L"WinNT");
v4 = -1i64;
do
++v4;
while( aWinnt_0[v4] );
v5 = 2 * v4 + 2;
goto LABEL_7;
}
v11 = L"ServerNT";
}
RtlInitUnicodeString(&Data, v11);
v5 = 18;
LABEL_7:
LODWORD(v39) = v5;
v6 = NtSetValueKey(v1, &DestinationString_8, 0i64, 1ui64, Data.Buffer, v39);
if( v6 < 0 )
KeBugCheckEx(0x9Au, (PVOID)0x11, (PVOID)(unsigned int)v6, (PVOID)1, 0i64);
RtlInitUnicodeString(&DestinationString_8, L"ProductSuite");
v7 = v42;
if( ExVerifySuite(SmallBusiness) )
{
v12 = -1i64;
do
++v12;
while( aSmallBusiness[v12] );
v13 = 2 * v12 + 2;
if( v13 < 0x2F6 )
{
memmove(v42, L"Small Business", v13);
v7 = &v42[v13];
v2 = 758 - v13;
}
}
if( ExVerifySuite(Enterprise) )
{
v14 = -1i64;
do
++v14;
while( aEnterprise[v14] );
v15 = 2 * v14 + 2;
if( v2 > v15 )
{
memmove(v7, L"Enterprise", v15);
v7 += v15;
v2 -= v15;
}
}
if( ExVerifySuite(BackOffice) )
{
v16 = -1i64;
do
++v16;
while( aBackoffice[v16] );
v17 = 2 * v16 + 2;
if( v2 > v17 )
{
memmove(v7, L"BackOffice", v17);
v7 += v17;
v2 -= v17;
}
}
if( ExVerifySuite(CommunicationServer) )
{
v18 = -1i64;
do
++v18;
while( aCommunications[v18] );
v19 = 2 * v18 + 2;
if( v2 > v19 )
{
memmove(v7, L"CommunicationServer", v19);
v7 += v19;
v2 -= v19;
}
}
if( ExVerifySuite(TerminalServer) )
{
v8 = -1i64;
do
++v8;
while( aTerminalServer_0[v8] );
v9 = 2 * v8 + 2;
if( v2 > v9 )
{
memmove(v7, L"Terminal Server", v9);
v7 += v9;
v2 -= v9;
}
}
if( ExVerifySuite(SmallBusinessRestricted) )
{
v20 = -1i64;
do
++v20;
while( aSmallBusinessR[v20] );
v21 = 2 * v20 + 2;
if( v2 > v21 )
{
memmove(v7, L"Small Business(Restricted)", v21);
v7 += v21;
v2 -= v21;
}
}
if( ExVerifySuite(EmbeddedNT) )
{
v22 = -1i64;
do
++v22;
while( aEmbeddednt[v22] );
v23 = 2 * v22 + 2;
if( v2 > v23 )
{
memmove(v7, L"EmbeddedNT", v23);
v7 += v23;
v2 -= v23;
}
}
if( ExVerifySuite(DataCenter) )
{
v24 = -1i64;
do
++v24;
while( aDatacenter[v24] );
v25 = 2 * v24 + 2;
if( v2 > v25 )
{
memmove(v7, L"DataCenter", v25);
v7 += v25;
v2 -= v25;
}
}
if( ExVerifySuite(Personal) )
{
v26 = -1i64;
do
++v26;
while( aPersonal[v26] );
v27 = 2 * v26 + 2;
if( v2 > v27 )
{
memmove(v7, L"Personal", v27);
v7 += v27;
v2 -= v27;
}
}
if( ExVerifySuite(Blade) )
{
v28 = -1i64;
do
++v28;
while( aBlade[v28] );
v29 = 2 * v28 + 2;
if( v2 > v29 )
{
memmove(v7, L"Blade", v29);
v7 += v29;
v2 -= v29;
}
}
if( ExVerifySuite(EmbeddedRestricted) )
{
v30 = -1i64;
do
++v30;
while( aEmbeddedRestri[v30] );
v31 = 2 * v30 + 2;
if( v2 > v31 )
{
memmove(v7, L"Embedded(Restricted)", v31);
v7 += v31;
v2 -= v31;
}
}
if( ExVerifySuite(SecurityAppliance) )
{
v32 = -1i64;
do
++v32;
while( aSecurityApplia[v32] );
v33 = 2 * v32 + 2;
if( v2 > v33 )
{
memmove(v7, L"Security Appliance", v33);
v7 += v33;
v2 -= v33;
}
}
if( ExVerifySuite(StorageServer) )
{
v34 = -1i64;
do
++v34;
while( aStorageServer[v34] );
v35 = 2 * v34 + 2;
if( v2 > v35 )
{
memmove(v7, L"Storage Server", v35);
v7 += v35;
v2 -= v35;
}
}
if( ExVerifySuite(ComputeServer) )
{
v36 = -1i64;
do
++v36;
while( aComputeServer[v36] );
v37 = 2 * v36 + 2;
if( v2 > v37 )
{
memmove(v7, L"Compute Server", v37);
v7 += v37;
v2 -= v37;
}
}
if( ExVerifySuite(PhoneNT) )
{
do
++v3;
while( aPhonent[v3] );
v38 = 2 * v3 + 2;
if( v2 > v38 )
{
memmove(v7, L"PhoneNT", v38);
v2 -= v38;
}
}
LODWORD(v39) = 760 - v2;
v10 = NtSetValueKey(v1, &DestinationString_8, 0i64, 7ui64, v42, v39);
if( v10 < 0 )
KeBugCheckEx(0x9Au, (PVOID)0x11, (PVOID)(unsigned int)v10, (PVOID)2, 0i64);
}Referenced by:
ExpWatchProductTypeInitialization