BiDoesHiveKeyExist

UINT8 __stdcall BiDoesHiveKeyExist(PWCHAR KeyPath){
  PVOID v1; 
  UINT8 v3; 
  int v4; 
  HANDLE Handle; 
  PVOID v7; 
  v1 = 0i64;
  Handle = 0i64;
  v3 = 0;
  v7 = 0i64;
  if( !wcschr(KeyPath, 0x5Cu) )
  {
    if( (int)BiOpenKeyNonBcd(0i64, (WCHAR *)L"\\Registry\\Machine", 0x20019ui64, &Handle) >= 0 )
    {
      v4 = BiOpenKeyNonBcd(Handle, KeyPath, 0x20019ui64, &v7);
      v3 = 0;
      v1 = v7;
      if( v4 >= 0 )
        v3 = 1;
    }
    if( Handle )
      ZwClose(Handle);
    if( v1 )
      ZwClose(v1);
  }
  return v3;
}

Referenced by:

BiAddStoreFromFile