libPeConv
A library to load, manipulate, dump PE files.
Loading...
Searching...
No Matches
pe_virtual_to_raw.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <windows.h>
9
10#include "buffer_util.h"
11
12namespace peconv {
13
25 IN BYTE* payload,
26 IN size_t in_size,
27 IN ULONGLONG loadBase,
28 OUT size_t &outputSize,
29 IN OPTIONAL bool rebuffer=true
30 );
31
32 /*
33 Modifies raw alignment of the PE to be the same as virtual alignment.
34 \param payload : the PE in the Virtual format that needs to be realigned
35 \param in_size : size of the input buffer
36 \param loadBase : the base to which the given PE was relocated
37 \param outputSize : the size of the output buffer (the PE in the Raw format)
38 \return a buffer of the outputSize, containing the realigned PE. The buffer can be freed by the function free_pe_module.
39 */
41 IN const BYTE* payload,
42 IN size_t in_size,
43 IN ULONGLONG loadBase,
44 OUT size_t &outputSize
45 );
46
47};//namespace peconv
Definitions of the used buffer types. Functions for their allocation and deallocation.
BYTE * pe_virtual_to_raw(IN BYTE *payload, IN size_t in_size, IN ULONGLONG loadBase, OUT size_t &outputSize, IN OPTIONAL bool rebuffer=true)
BYTE * pe_realign_raw_to_virtual(IN const BYTE *payload, IN size_t in_size, IN ULONGLONG loadBase, OUT size_t &outputSize)