-
Notifications
You must be signed in to change notification settings - Fork 27
/
execenv.h
41 lines (28 loc) · 1022 Bytes
/
execenv.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
#ifndef _EXEC_ENV_H
#define _EXEC_ENV_H
//#include <Ntifs.h>
#include <Basetsd.h>
#include "environment.h"
#include "sync.h"
struct _zone;
struct _cb_info;
typedef struct _exec_env {
UINT_PTR virtualStack; //mandatory first member (used in vm-rm transitions
UINT_PTR returnRegister; // ax/eax/rax value
UINT_PTR jumpBuff;
unsigned int heapSize, historySize, logHashSize, outBufferSize;
unsigned char *pStack; // = NULL;
unsigned char *pHeap; //NULL
struct _zone *pFirstFree; //NULL
_tbm_mutex cbLock; // = 0;
struct _cb_info **hashTable; // = 0
UINT_PTR *history;
unsigned long posHist, totHist; // = 0;
unsigned char *outBuffer; // = NULL;
void *userContext;
};
struct _exec_env *NewEnv(unsigned int heapSize, unsigned int historySize, unsigned int logHashSize, unsigned int outBufferSize);
void DeleteEnv(struct _exec_env *pEnv);
void *AllocUserContext(struct _exec_env *pEnv, unsigned int size);
void DeleteUserContext(struct _exec_env *pEnv);
#endif