KsepRegistryQueryDriverShims

NTSTATUS __stdcall KsepRegistryQueryDriverShims(PWCHAR DriverName, PVOID ShimsBuffer, UINT64 *ActualLength){
  int SZ; 
  PVOID KeyHandle; 

  KeyHandle = 0i64;
  if( !DriverName || !ShimsBuffer )
    return -1073741811;
  SZ = KsepRegistryOpenKey(
         (PWCHAR)L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Compatibility\\Driver",
         DriverName,
         &KeyHandle);
  if( SZ >= 0 )
    SZ = KsepRegistryQuerySZ((_HANDLE)KeyHandle, L"Shims", 7i64, (INT64)ShimsBuffer);
  if( SZ == -1073741772 )
    SZ = -1073741275;
  if( KeyHandle )
  {
    ZwClose((_HANDLE)KeyHandle);
    _InterlockedIncrement(dword_140C2A7FC);
  }
  return SZ;
}

Referenced by:

KsepEngineGetShimsFromRegistry