CmpInitializeSystemBiosInformation
VOID __stdcall CmpInitializeSystemBiosInformation(_LOADER_PARAMETER_BLOCK *LoaderBlock){
_LOADER_PARAMETER_EXTENSION *Extension;
int Length;
int v3;
int v4;
VOID **PoolWithTag;
UINT64 *v6;
wchar_t *v7;
UINT64 Buffer;
UINT64 *v9;
UINT64 *v10;
unsigned int v11;
_UNICODE_STRING *Class;
_UNICODE_STRING *Classa;
_UNICODE_STRING *Classb;
UINT64 CreateOptions;
UINT64 CreateOptionsa;
_OBJECT_ATTRIBUTES ObjectAttributes;
unsigned int Source;
VOID *KeyHandle;
Extension = LoaderBlock->Extension;
KeyHandle = (VOID *)-1i64;
memset(&ObjectAttributes, 0, sizeof(ObjectAttributes));
Length = Extension->AcpiBiosVersion.Length;
v3 = Extension->SmbiosVersion.Length;
v4 = Extension->EfiVersion.Length;
PoolWithTag = ExAllocatePoolWithTag(1ui64, (unsigned int)(v3 + v4 + Length + 8), 538987843i64);
v7 = (wchar_t *)PoolWithTag;
if( PoolWithTag )
{
Buffer = (UINT64)Extension->AcpiBiosVersion.Buffer;
Source = 0;
LODWORD(Class) = Length;
CmpBuildRegMultiSz((PWCHAR)PoolWithTag, v6, (PWCHAR)&Source, Buffer, (UINT64)Class);
LODWORD(Classa) = v3;
CmpBuildRegMultiSz(v7, v9, (PWCHAR)&Source, (UINT64)Extension->SmbiosVersion.Buffer, (UINT64)Classa);
LODWORD(Classb) = v4;
CmpBuildRegMultiSz(v7, v10, (PWCHAR)&Source, (UINT64)Extension->EfiVersion.Buffer, (UINT64)Classb);
v11 = Source;
LODWORD(CreateOptions) = 0;
*(wchar_t *)((char *)v7 + Source) = 0;
ObjectAttributes.Length = 48;
ObjectAttributes.RootDirectory = 0i64;
ObjectAttributes.Attributes = 576;
ObjectAttributes.ObjectName = &CmRegistryMachineHardwareDescriptionSystemName;
*(_OWORD *)&ObjectAttributes.SecurityDescriptor = 0i64;
if( ZwCreateKey(&KeyHandle, 2ui64, &ObjectAttributes, 0i64, 0i64, CreateOptions, 0i64) >= 0 )
{
LODWORD(CreateOptionsa) = v11 + 2;
ZwSetValueKey(KeyHandle, (_UNICODE_STRING *)&CmpSystemBiosVersionString, 0i64, 7ui64, v7, CreateOptionsa);
}
ExFreePoolWithTag(v7, 0);
}
if( KeyHandle != (VOID *)-1i64 )
ZwClose((_HANDLE)KeyHandle);
}Referenced by:
CmpInitializeMachineDependentConfiguration