# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Angelfire

# BadMFS -- Developer Guide

- 1
- 2
- 3
- 4
- 5
- 6
- 7
…
- 13
- 14

This should be a null terminated string not longer than
MAX_BadMFS_FILENAMESIZE-1.
Currently there is no way to extend this limit, although there may be in the
future.
dwAccessFlags [in]
The requested access for the file in question. Only one process may write to
a file at a time, but
many may read. If multiple instances have already opened a file for read
access then an instance intending to write will have to wait until the file
becomes available.
The flags used for access are BadMFS_READ , BadMFS_WRITE, or both
(BadMFS_READ | BadMFS_WRITE). If this attribute is zero the results are
undefined.
dwCreateFlags [in]
Specifies what action should be taken on the file whether it exists or does not
exist.
Value Meaning
BadMFS_CREATE_NEW
(1)
Creates a new file only if the file specified does not
already exist
If the file exists, the method will fail and the status will be
STATUS_FILE_EXISTS.
BadMFS_CREATE_ALWAY
S (2)
Always creates a new file.
If the specified file already exists, and is writable, the
method wipes the file and replaces it with the new one.
The method then succeeds and returns STATUS_SUCCESS.
If the file does not already exist the file is created and
STATUS_SUCCESS is returned.
BadMFS_OPEN_EXISTING
(3)
Opens the file only if it already exists.
If the file is not found the method will fail return
STATUS_NO_SUCH_FILE. Otherwise the handle will be set
and STATUS_SUCCESS returned.
BadMFS_OPEN_ALWAYS
(4)
Always opens the file.
If the file exists, the function succeeds and returns
STATUS_FILE_EXISTS.
If the file does not exist, the file is created and
STATUS_SUCCESS returned.
BadMFS_TRUNCATE_EXI
STING (5)
Opens a file and truncates it so that its size is zero bytes,
only if it exists.
If the file is not found, the function fails and returns

- 1
- 2
- 3
- 4
- 5
- 6
- 7
…
- 13
- 14