Add boilerplate for NE, LE, PE builders

This commit is contained in:
Matt Nadareski
2022-11-05 23:47:50 -07:00
parent 2705685f07
commit a4e55a328c
3 changed files with 84 additions and 0 deletions

View File

@@ -16,6 +16,20 @@ namespace BurnOutSharp.Builder
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(byte[] data, int offset)
{
// If the data is invalid
if (data == null)
return null;
// If the offset is out of bounds
if (offset < 0 || offset >= data.Length)
return null;
// Cache the current offset
int initialOffset = offset;
// Create a new executable to fill
var executable = new Executable();
// TODO: Implement LE/LX parsing
return null;
}
@@ -31,6 +45,20 @@ namespace BurnOutSharp.Builder
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(Stream data)
{
// If the data is invalid
if (data == null)
return null;
// If the offset is out of bounds
if (data.Position < 0 || data.Position >= data.Length)
return null;
// Cache the current offset
int initialOffset = (int)data.Position;
// Create a new executable to fill
var executable = new Executable();
// TODO: Implement LE/LX parsing
return null;
}

View File

@@ -16,6 +16,20 @@ namespace BurnOutSharp.Builder
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(byte[] data, int offset)
{
// If the data is invalid
if (data == null)
return null;
// If the offset is out of bounds
if (offset < 0 || offset >= data.Length)
return null;
// Cache the current offset
int initialOffset = offset;
// Create a new executable to fill
var executable = new Executable();
// TODO: Implement NE parsing
return null;
}
@@ -31,6 +45,20 @@ namespace BurnOutSharp.Builder
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(Stream data)
{
// If the data is invalid
if (data == null)
return null;
// If the offset is out of bounds
if (data.Position < 0 || data.Position >= data.Length)
return null;
// Cache the current offset
int initialOffset = (int)data.Position;
// Create a new executable to fill
var executable = new Executable();
// TODO: Implement NE parsing
return null;
}

View File

@@ -16,6 +16,20 @@ namespace BurnOutSharp.Builder
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(byte[] data, int offset)
{
// If the data is invalid
if (data == null)
return null;
// If the offset is out of bounds
if (offset < 0 || offset >= data.Length)
return null;
// Cache the current offset
int initialOffset = offset;
// Create a new executable to fill
var executable = new Executable();
// TODO: Implement PE parsing
return null;
}
@@ -31,6 +45,20 @@ namespace BurnOutSharp.Builder
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(Stream data)
{
// If the data is invalid
if (data == null)
return null;
// If the offset is out of bounds
if (data.Position < 0 || data.Position >= data.Length)
return null;
// Cache the current offset
int initialOffset = (int)data.Position;
// Create a new executable to fill
var executable = new Executable();
// TODO: Implement PE parsing
return null;
}