summaryrefslogtreecommitdiff
path: root/other/burneye/src/stub/cgate.c
blob: 1f8bb3f8296e3688f81f69795798e853c7c2452b (plain)
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

#include "include/int80.h"
#include "include/unistd.h"
#include "helper.h"


typedef struct {
	unsigned long int	sav0,
				sav4;	/* first 8 saved bytes of function */
	unsigned long int	ra_sav;	/* saved return address */
	unsigned char *		ar_beg;	/* begin address of encrypted area */
	unsigned long int	ar_len;	/* length of function */
	void *			keyptr;	/* key structure pointer */
} callgate;


callgate * cg_find (unsigned long int addr);

void
cg_decrypt (callgate *cg)
{
#ifdef VDEBUG
	be_printf ("cg_decrypt (0x%08lx, 0x%08lx, %lu)\n", cg->keyptr, cg->ar_beg, cg->ar_len);
#endif
}



callgate sample = {
	0x01234567, 0x89abcdef,
	0x00000000,
	(void *) 0x40404040, 0x00001000,
	(void *) 0x80808080,
};


callgate *
cg_find (unsigned long int addr)
{
	return (&sample);
}