forked from falltergeist/int2ssl
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathProcTable.h
71 lines (54 loc) · 1.7 KB
/
ProcTable.h
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/**
*
* Copyright (c) 2005-2009 Anchorite (TeamX), <[email protected]>
* Copyright (c) 2014-2015 Nirran, phobos2077
* Copyright (c) 2015 alexeevdv <[email protected]>
* Distributed under the GNU GPL v3. For full terms see the file license.txt
*
*/
#ifndef PROC_TABLE_H
#define PROC_TABLE_H
// C++ standard includes
#include <stdint.h>
// int2ssl includes
// Third party includes
class CProcDescriptor
{
public:
CProcDescriptor();
CProcDescriptor(const CProcDescriptor& Item);
virtual ~CProcDescriptor();
public:
virtual void Serialize();
void Dump();
public:
CProcDescriptor& operator = (const CProcDescriptor& Item);
public:
uint32_t m_ulNameOffset; // Index into namespace for procedure name
uint32_t m_ulType; // Type of function (P_TIMED, P_CONDITIONAL, none)
uint32_t m_ulTime; // Time this proc should go off, if timed
uint32_t m_ulExpressionOffset; // Pointer to conditional code, if conditional
uint32_t m_ulBodyOffset; // Pointer to procedure
uint32_t m_ulNumArgs; // Number of args to procedure
};
class CProcTable
{
public:
CProcTable();
virtual ~CProcTable();
public:
virtual void Serialize();
uint32_t GetSize();
uint32_t GetSizeOfProc(uint32_t nIndex);
uint32_t GetOffsetOfProcSection();
void Dump();
public:
CProcDescriptor& operator [] (uint32_t nIndex);
private:
// CProcTableArray
typedef std::vector<CProcDescriptor> CProcTableArray;
CProcTableArray m_Table;
std::vector<uint32_t> m_ProcSize;
uint32_t m_ulOffsetOfProcSection;
};
#endif //PROC_TABLE_H