AslDoesDirectoryExistNtPath

NTSTATUS __stdcall AslDoesDirectoryExistNtPath(PCWSTR SourceString){
  WCHAR v1; 
  NTSTATUS v2; 
  NTSTATUS v3; 
  struct _UNICODE_STRING DestinationString; 
  struct _IO_STATUS_BLOCK IoStatusBlock; 
  struct _OBJECT_ATTRIBUTES ObjectAttributes; 
  UNICODE_STRING FileHandle; 
  *(_QWORD *)&ObjectAttributes.Length = 48i64;
  *(_QWORD *)&ObjectAttributes.Attributes = 576i64;
  v2 = 0;
  *(_QWORD *)&FileHandle.Length = 0i64;
  DestinationString = 0i64;
  IoStatusBlock = 0i64;
  RtlInitUnicodeString(&DestinationString, SourceString, v1);
  ObjectAttributes.ObjectName = &DestinationString;
  ObjectAttributes.RootDirectory = 0i64;
  *(_OWORD *)&ObjectAttributes.SecurityDescriptor = 0i64;
  v3 = ZwOpenFile(&FileHandle, (PWCHAR)0x100080);
  if( v3 >= 0 )
  {
    ZwClose(*(HANDLE *)&FileHandle.Length);
    return 1;
  }
  if( v3 == -1073741790 || v3 == -1073741757 )
    return 1;
  return v2;
}

Referenced by:

SdbpCheckMatchingDir