CmpInitializeLoadOptions

NTSTATUS __stdcall CmpInitializeLoadOptions(PVOID BugCheckParameter3){
  INT8 v1; 
  const char *v2; 
  NTSTATUS result; 
  struct _STRING SourceString; 
  v2 = (const char *)*((_QWORD *)BugCheckParameter3 + 27);
  SourceString = 0i64;
  RtlInitAnsiString(&SourceString, v2, v1);
  CmpLoadOptions.Length = 0;
  CmpLoadOptions.MaximumLength = 2 * (SourceString.Length + 1);
  CmpLoadOptions.Buffer = (wchar_t *)ExAllocatePoolWithTag(
                                       PagedPool,
                                       2i64 * ((unsigned int)SourceString.Length + 1),
                                       0x30394D43ui64);
  if( !CmpLoadOptions.Buffer )
    KeBugCheckEx(0x74u, 3ui64, 1ui64, (ULONG_PTR)BugCheckParameter3, 0i64);
  RtlAnsiStringToUnicodeString(&CmpLoadOptions, &SourceString, 0);
  result = (NTSTATUS)CmpLoadOptions.Buffer;
  CmpLoadOptions.Buffer[SourceString.Length] = 0;
  CmpLoadOptions.Length += 2;
  return result;
}

Referenced by:

CmInitSystem1