Xeno-rat
Loading...
Searching...
No Matches
xeno_rat_server.IconInjector.IconFile Class Reference
Collaboration diagram for xeno_rat_server.IconInjector.IconFile:

Public Member Functions

byte[] ImageData (int index)
 Retrieves the image data at the specified index.
 
byte[] CreateIconGroupData (uint iconBaseID)
 Creates icon group data for the specified icon base ID.
 

Static Public Member Functions

static IconFile FromFile (string filename)
 Creates an IconFile instance from the specified file.
 

Properties

int ImageCount [get]
 

Private Attributes

ICONDIR iconDir = new ICONDIR()
 
ICONDIRENTRY[] iconEntry
 
byte[][] iconImage
 

Member Function Documentation

◆ CreateIconGroupData()

byte[] xeno_rat_server.IconInjector.IconFile.CreateIconGroupData ( uint iconBaseID)
inline

Creates icon group data for the specified icon base ID.

Parameters
iconBaseIDThe base ID for the icons.
Returns
The icon group data as a byte array.

This method creates icon group data for the specified icon base ID by marshalling the ICONDIR and GRPICONDIRENTRY structures and copying the image data into a byte array. The method allocates memory for the data, pins it, and then marshals the structures and image data into the pinned memory. Finally, the method frees the pinned memory and returns the icon group data as a byte array.

Here is the caller graph for this function:

◆ FromFile()

static IconFile xeno_rat_server.IconInjector.IconFile.FromFile ( string filename)
inlinestatic

Creates an IconFile instance from the specified file.

Parameters
filenameThe path of the file from which to create the IconFile instance.
Returns
An instance of IconFile created from the specified file.
Exceptions
System.IO.FileNotFoundExceptionThrown when the specified file is not found.
System.IO.IOExceptionThrown when an I/O error occurs while reading the file.

This method reads the contents of the specified file into memory and populates the IconFile instance with the icon directory and image data. It uses marshaling to convert the byte array into structured data and allocates memory using GCHandle. The method then iterates through the icon directory entries, copying the image data into the iconImage array. Finally, it frees the allocated memory and returns the populated IconFile instance.

Here is the caller graph for this function:

◆ ImageData()

byte[] xeno_rat_server.IconInjector.IconFile.ImageData ( int index)
inline

Retrieves the image data at the specified index.

Parameters
indexThe index of the image data to be retrieved.
Returns
The image data at the specified index .
Here is the caller graph for this function:

Member Data Documentation

◆ iconDir

ICONDIR xeno_rat_server.IconInjector.IconFile.iconDir = new ICONDIR()
private

◆ iconEntry

ICONDIRENTRY [] xeno_rat_server.IconInjector.IconFile.iconEntry
private

◆ iconImage

byte [][] xeno_rat_server.IconInjector.IconFile.iconImage
private

Property Documentation

◆ ImageCount

int xeno_rat_server.IconInjector.IconFile.ImageCount
get

The documentation for this class was generated from the following file: