forked from NytroRST/ShellcodeCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeclaredFunctions.h
More file actions
57 lines (40 loc) · 1.23 KB
/
DeclaredFunctions.h
File metadata and controls
57 lines (40 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef DECLAREDFUNCTIONS_H
#define DECLAREDFUNCTIONS_H
#include <string>
#include <vector>
#include "Utils.h"
#include "DLLBaseAddress.h"
#include "FunctionOffsetAddress.h"
#include "Platform.h"
using namespace std;
class DeclaredFunctions
{
public:
// Vector with declared functions
struct DeclaredFunction
{
string Name;
string DLL;
};
static size_t AllDeclaredFunctionsNr;
static vector<DeclaredFunction> AllDeclaredFunctions;
// Used to generate ASM
static size_t NrBasesToStack;
static size_t NrFunctionsToStack;
static string GenerateLoadLibraryCall(string p_sDLLName);
static string GenerateLoadLibraryCall_x86(string p_sDLLName);
static string GenerateLoadLibraryCall_x64(string p_sDLLName);
static string GenerateGetProcAddressCall(string p_sDLLName, string p_sFunctionName);
static string GenerateGetProcAddressCall_x86(string p_sDLLName, string p_sFunctionName);
static string GenerateGetProcAddressCall_x64(string p_sDLLName, string p_sFunctionName);
// Constructor
DeclaredFunctions()
{
AllDeclaredFunctionsNr = 0;
}
// Add function name
static void AddFunctionName(string p_sFunctionName);
// Add function DLL name
static void AddFunctionDLLName(string p_sDLLName);
};
#endif // !DECLAREDFUNCTIONS_H