IopIsBitlockerOn

UINT8 __stdcall IopIsBitlockerOn(){
  int v0; 
  _UNICODE_STRING KeyName; 
  PVOID Handle; 
  _KEY_VALUE_FULL_INFORMATION *Information; 

  Information = 0i64;
  Handle = 0i64;
  v0 = 1;
  KeyName = 0i64;
  RtlInitUnicodeString(&KeyName, L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control\\BitlockerStatus");
  if( IopOpenRegistryKey(&Handle, 0i64, &KeyName, 0x20019ui64, 0) >= 0 )
  {
    if( IopGetRegistryValue(Handle, (PWCHAR)L"BootStatus", 0i64, &Information) >= 0 )
    {
      if( Information->DataLength )
        v0 = *(ULONG *)((char *)&Information->TitleIndex + Information->DataOffset);
      ExFreePoolWithTag(Information, 0);
    }
    ObCloseHandle(Handle, 0);
  }
  return v0 == 1;
}

Referenced by:

IopInitDumpCapsuleSupport