-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMemChunk.h
More file actions
80 lines (47 loc) · 1.18 KB
/
MemChunk.h
File metadata and controls
80 lines (47 loc) · 1.18 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// --- Author : Moreau Cyril - Spl3en
// --- File : MemChunk.h
// --- Date : 2013-03-04-22.10.17
// --- Version : 1.0
#ifndef MemChunk_H_INCLUDED
#define MemChunk_H_INCLUDED
// ---------- Includes ------------
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include "../BbQueue/BbQueue.h"
#include "../Win32Tools/Win32Tools.h"
// ---------- Defines -------------
typedef enum {
MEM_TYPE_IMAGE = 0,
MEM_TYPE_MAPPED = 1,
MEM_TYPE_PRIVATE = 2,
} MemType;
// ------ Struct declaration -------
typedef
struct _MemChunk
{
HANDLE proc;
DWORD addr;
unsigned char *buffer;
unsigned int size;
MemType type;
BbQueue *matches;
} MemChunk;
// --------- Constructors ---------
MemChunk *
memchunk_new (HANDLE hProc, MEMORY_BASIC_INFORMATION *meminfo);
void
memchunk_init (MemChunk *mem, HANDLE hProc, MEMORY_BASIC_INFORMATION *meminfo);
// ----------- Functions ------------
void
memchunk_read_from_memory (MemChunk *mem);
void
memchunk_set_update (MemChunk *mem, char to_update);
void
memchunk_debug (MemChunk *mc);
void
memchunk_full_debug (MemChunk *mc);
// --------- Destructors ----------
void
memchunk_free (MemChunk *memchunk);
#endif // MemChunk_INCLUDED