KsepRegistryQueryKeyInformation

NTSTATUS __stdcall KsepRegistryQueryKeyInformation(
        PVOID KeyHandle,
        UINT64 *MaxValueNameLength,
        UINT64 *MaxValueDataLength){
  NTSTATUS result; 
  unsigned int *v7; 
  unsigned int *v8; 
  int v9; 
  UINT64 Length; 
  LODWORD(Length) = 0;
  *MaxValueNameLength = 0i64;
  *MaxValueDataLength = 0i64;
  result = ZwQueryKey(KeyHandle, KeyFullInformation, 0i64, 0i64, &Length);
  if( result == -2147483643 || result == -1073741789 )
  {
    KsepPoolAllocatePaged((unsigned int)Length);
    v8 = v7;
    if( v7 )
    {
      v9 = ZwQueryKey(KeyHandle, KeyFullInformation, v7, (unsigned int)Length, &Length);
      if( v9 >= 0 )
      {
        *MaxValueNameLength = v8[9] + 2i64;
        *MaxValueDataLength = v8[10];
      }
      KsepPoolFreePaged(v8);
      return v9;
    }
    else
    {
      return -1073741801;
    }
  }
  return result;
}

Referenced by:

KsepDbQueryRegistryDeviceDataList