WdipSemQueryValueFromRegistry

NTSTATUS __stdcall WdipSemQueryValueFromRegistry(_HANDLE KeyHandle, VOID *a2, INT64 a3){
  size_t v3; 
  int v4; 
  VOID *v5; 
  size_t v6; 
  int v7; 
  size_t v8; 
  UINT64 Length; 
  UINT64 ResultLength; 
  _UNICODE_STRING DestinationString; 
  char KeyValueInformation[4]; 
  int v14; 
  size_t Src; 
  int Src_4; 
  VOID *v17; 
  size_t *v18; 

  LODWORD(ResultLength) = 0;
  v4 = a3;
  v5 = *(VOID **)&KeyHandle;
  v6 = v3;
  DestinationString = 0i64;
  if( !*(_QWORD *)&KeyHandle || !a2 || !v17 || !v18 )
    return -1073741811;
  RtlInitUnicodeString(&DestinationString, (PCWSTR)a2);
  LODWORD(Length) = 144;
  v7 = ZwQueryValueKey(v5, &DestinationString, KeyValuePartialInformation, KeyValueInformation, Length, &ResultLength);
  if( v7 >= 0 )
  {
    v8 = Src;
    if( Src <= v6 && v14 == v4 )
    {
      memset(v17, 0i64, v6);
      memmove(v17, &Src_4, v8);
      *v18 = v8;
    }
    else
    {
      return -1073741823;
    }
  }
  return v7;
}

Referenced by:

WdipSemLoadConfigInfo
WdipSemLoadGroupPolicy
WdipSemLoadLocalGroupPolicy
WdipSemLoadNextContextProvider
WdipSemLoadNextEndEvent
WdipSemLoadNextScenario
WdipSemLoadScenarioTable