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
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
#![cfg(windows)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]

extern crate libc;
extern crate winapi;

use winapi::{BOOL, BYTE, DWORD, HANDLE, ULONG, UINT_PTR, PCHAR, LPDEBUG_EVENT, PVOID};

pub const CESDK_VERSION: i8 = 6;

#[repr(C)]
pub enum PluginType {
    AddressList = 0,
    MemoryView = 1,
    OnDebugEvent = 2,
    ProcessWatcherEvent = 3,
    FunctionPointerChange = 4,
    MainMenu = 5,
    DisassemblerContext = 6,
    DisassemblerRenderLine = 7,
    AutoAssembler = 8
}

#[repr(C)]
pub enum AutoAssemblerPhase {
    Initialize = 0,
    Phase1 = 1,
    Phase2 = 2,
    Finalize = 3
}

#[repr(C)]
pub struct PluginVersion {
    pub version: libc::c_uint,
    pub pluginname: *const libc::c_char
}

#[repr(C)]
pub struct AddressListRecord {
    pub interpretedaddress: *const libc::c_char, //pointer to a 255 bytes long string (0 terminated)
    pub address: UINT_PTR, //this is a read-only representaion of the address. Change interpretedaddress if you want to change this
    pub ispointer: BOOL, //readonly
    pub countoffsets: libc::c_int, //readonly
    pub offsets: *const ULONG, //array of dwords ranging from 0 to countoffsets-1 (readonly)
    pub description: *const libc::c_char, //pointer to a 255 bytes long string
    pub valuetype: libc::c_char, //0=byte, 1=word, 2=dword, 3=float, 4=double, 5=bit, 6=int64, 7=string
    pub size: libc::c_char //stringlength or bitlength;
}

//callback routines efinitions for registered plugin functions:
pub type CEP_PLUGINTYPE0 = extern "stdcall" fn(SelectedRecord: AddressListRecord) -> BOOL;
pub type CEP_PLUGINTYPE1 = extern "stdcall" fn(disassembleraddress: *const ULONG, selected_disassembler_address: *const ULONG, hexviewaddress: *const ULONG) -> BOOL;
pub type CEP_PLUGINTYPE2 = extern "stdcall" fn(DebugEvent: LPDEBUG_EVENT) -> libc::c_int;
pub type CEP_PLUGINTYPE3 = extern "stdcall" fn(processid: ULONG, peprocess: ULONG, Created: BOOL);
pub type CEP_PLUGINTYPE4 = extern "stdcall" fn(reserved: libc::c_int);
pub type CEP_PLUGINTYPE5 = extern "stdcall" fn();
pub type CEP_PLUGINTYPE6ONPOPUP = extern "stdcall" fn(selectedAddress: ULONG, addressofname: *const *const libc::c_char, show: *mut BOOL) -> BOOL;
pub type CEP_PLUGINTYPE6 = extern "stdcall" fn(selectedAddress: *const ULONG) -> BOOL;
pub type CEP_PLUGINTYPE7 = extern "stdcall" fn(address: ULONG, addressStringPointer: *const *const libc::c_char, bytestringpointer: *const *const libc::c_char, opcodestringpointer: *const *const libc::c_char, specialstringpointer: *const *const libc::c_char, textcolor: *const ULONG);
pub type CEP_PLUGINTYPE8 = extern "stdcall" fn(line: *const *const libc::c_char, phase: AutoAssemblerPhase, id: libc::c_int);

#[repr(C)]
pub struct PLUGINTYPE0_INIT {
    pub name: *const libc::c_char, //0 terminated string describing the name for the user's menu item
    pub callbackroutine: CEP_PLUGINTYPE0 //pointer to a callback routine of the type 0 plugin
}

#[repr(C)]
pub struct PLUGINTYPE1_INIT {
    pub name: *const libc::c_char, //0 terminated string describing the name for the user's menu item
    pub callbackroutine: CEP_PLUGINTYPE1, //pointer to a callback routine of the type 1 plugin
    pub shortcut: *const libc::c_char //0 terminated string containing the shortcut in textform. CE will try it's best to parse it to a valid shortcut
}

#[repr(C)]
pub struct PLUGINTYPE2_INIT {
    pub callbackroutine: CEP_PLUGINTYPE2 //pointer to a callback routine of the type 2 plugin
}

#[repr(C)]
pub struct PLUGINTYPE3_INIT {
    pub callbackroutine: CEP_PLUGINTYPE3 //pointer to a callback routine of the type 3 plugin
}

#[repr(C)]
pub struct PLUGINTYPE4_INIT {
    pub callbackroutine: CEP_PLUGINTYPE4 //pointer to a callback routine of the type 4 plugin
}

#[repr(C)]
pub struct PLUGINTYPE5_INIT {
    pub name: *const libc::c_char, //0 terminated string describing the name for the user's menu item
    pub callbackroutine: CEP_PLUGINTYPE5,
    pub shortcut: *const libc::c_char //0 terminated string containing the shortcut in textform. CE will try it's best to parse it to a valid shortcut
}

#[repr(C)]
pub struct PLUGINTYPE6_INIT {
    pub name: *const libc::c_char, //0 terminated string describing the name for the user's menu item
    pub callbackroutineOnPopup: CEP_PLUGINTYPE6ONPOPUP,
    pub callbackroutine: CEP_PLUGINTYPE6,
    pub shortcut: *const libc::c_char //0 terminated string containing the shortcut in textform. CE will try it's best to parse it to a valid shortcut
}

#[repr(C)]
pub struct PLUGINTYPE7_INIT {
    pub callbackroutine: CEP_PLUGINTYPE7 //pointer to a callback routine of the type 7 plugin
}

#[repr(C)]
pub struct PLUGINTYPE8_INIT {
    pub callbackroutine: CEP_PLUGINTYPE8 //pointer to a callback routine of the type 8 plugin
}

#[cfg(target_pointer_width = "32")]
#[repr(C)]
pub struct RegisterModificationInfo {
    pub address: libc::uintptr_t,
    pub change_eax: BOOL,
    pub change_ebx: BOOL,
    pub change_ecx: BOOL,
    pub change_edx: BOOL,
    pub change_esi: BOOL,
    pub change_edi: BOOL,
    pub change_ebp: BOOL,
    pub change_esp: BOOL,
    pub change_eip: BOOL,
    pub change_cf: BOOL,
    pub change_pf: BOOL,
    pub change_af: BOOL,
    pub change_zf: BOOL,
    pub change_sf: BOOL,
    pub change_of: BOOL,
    pub new_eax: UINT_PTR,
    pub new_ebx: UINT_PTR,
    pub new_ecx: UINT_PTR,
    pub new_edx: UINT_PTR,
    pub new_esi: UINT_PTR,
    pub new_edi: UINT_PTR,
    pub new_ebp: UINT_PTR,
    pub new_esp: UINT_PTR,
    pub new_eip: UINT_PTR,

    pub new_cf: BOOL,
    pub new_pf: BOOL,
    pub new_af: BOOL,
    pub new_zf: BOOL,
    pub new_sf: BOOL,
    pub new_of: BOOL
}

#[cfg(target_pointer_width = "64")]
#[repr(C)]
pub struct RegisterModificationInfo {
    pub address: libc::uintptr_t,
    pub change_eax: BOOL,
    pub change_ebx: BOOL,
    pub change_ecx: BOOL,
    pub change_edx: BOOL,
    pub change_esi: BOOL,
    pub change_edi: BOOL,
    pub change_ebp: BOOL,
    pub change_esp: BOOL,
    pub change_eip: BOOL,
    pub change_r8: BOOL,
    pub change_r9: BOOL,
    pub change_r10: BOOL,
    pub change_r11: BOOL,
    pub change_r12: BOOL,
    pub change_r13: BOOL,
    pub change_r14: BOOL,
    pub change_r15: BOOL,
    pub change_cf: BOOL,
    pub change_pf: BOOL,
    pub change_af: BOOL,
    pub change_zf: BOOL,
    pub change_sf: BOOL,
    pub change_of: BOOL,
    pub new_eax: UINT_PTR,
    pub new_ebx: UINT_PTR,
    pub new_ecx: UINT_PTR,
    pub new_edx: UINT_PTR,
    pub new_esi: UINT_PTR,
    pub new_edi: UINT_PTR,
    pub new_ebp: UINT_PTR,
    pub new_esp: UINT_PTR,
    pub new_eip: UINT_PTR,
    pub new_r8: UINT_PTR,
    pub new_r9: UINT_PTR,
    pub new_r10: UINT_PTR,
    pub new_r11: UINT_PTR,
    pub new_r12: UINT_PTR,
    pub new_r13: UINT_PTR,
    pub new_r14: UINT_PTR,
    pub new_r15: UINT_PTR,

    pub new_cf: BOOL,
    pub new_pf: BOOL,
    pub new_af: BOOL,
    pub new_zf: BOOL,
    pub new_sf: BOOL,
    pub new_of: BOOL
}

pub type CEP_SHOWMESSAGE = extern "stdcall" fn(message: *const libc::c_char);
pub type CEP_REGISTERFUNCTION = extern "stdcall" fn(pluginid: libc::c_int, functiontype: PluginType, init: PVOID) -> libc::c_int;
pub type CEP_UNREGISTERFUNCTION = extern "stdcall" fn(pluginid: libc::c_int, functionid: libc::c_int) -> BOOL;
pub type CEP_GETMAINWINDOWHANDLE = extern "stdcall" fn() -> HANDLE;
pub type CEP_AUTOASSEMBLE = extern "stdcall" fn(script: *const libc::c_char) -> BOOL;
pub type CEP_ASSEMBLER = extern "stdcall" fn(address: libc::uintptr_t, instruction: *const libc::c_char, output: *const BYTE, maxlength: libc::c_int, returnedsize: *const libc::c_int) -> BOOL;
pub type CEP_DISASSEMBLER = extern "stdcall" fn(address: libc::uintptr_t, output: *const libc::c_char, maxsize: libc::c_int) -> BOOL;
pub type CEP_CHANGEREGATADDRESS = extern "stdcall" fn(address_thing: libc::uintptr_t, changereg: *const RegisterModificationInfo) -> BOOL;
pub type CEP_INJECTDLL = extern "stdcall" fn(dllname: *const libc::c_char, functiontocall: *const libc::c_char) -> BOOL;
pub type CEP_FREEZEMEM = extern "stdcall" fn(address: libc::uintptr_t, size: libc::c_int) -> libc::c_int;
pub type CEP_UNFREEZEMEM = extern "stdcall" fn(freezeID: libc::c_int) -> BOOL;
pub type CEP_FIXMEM = extern "stdcall" fn() -> BOOL;
pub type CEP_PROCESSLIST = extern "stdcall" fn(listbuffer: *const libc::c_char, listsize: libc::c_int) -> BOOL;
pub type CEP_RELOADSETTINGS = extern "stdcall" fn() -> BOOL;
pub type CEP_GETADDRESSFROMPOINTER = extern "stdcall" fn(baseaddress: libc::uintptr_t, offsetcount: libc::c_int, offsets: *const libc::c_int) -> DWORD;
pub type CEP_GENERATEAPIHOOKSCRIPT = extern "stdcall" fn(address: *const libc::c_char, addresstojumpto: *const libc::c_char, addresstogetnewcalladdress: *const libc::c_char, script: *const libc::c_char, maxscriptsize: libc::c_int) -> BOOL;
pub type CEP_ADDRESSTONAME = extern "stdcall" fn(address: libc::uintptr_t, name: *const libc::c_char, maxnamesize: libc::c_int) -> BOOL;
pub type CEP_NAMETOADDRESS = extern "stdcall" fn(name: *const libc::c_char, address: *const libc::uintptr_t) -> BOOL;

pub type CEP_LOADDBK32 = extern "stdcall" fn();
pub type CEP_LOADDBVMIFNEEDED = extern "stdcall" fn() -> BOOL;
pub type CEP_PREVIOUSOPCODE = extern "stdcall" fn(address: ULONG) -> DWORD;
pub type CEP_NEXTOPCODE = extern "stdcall" fn(address: ULONG) -> DWORD;
pub type CEP_LOADMODULE = extern "stdcall" fn(modulepath: *const libc::c_char, exportlist: *const libc::c_char, maxsize: *const libc::c_int) -> BOOL;
pub type CEP_DISASSEMBLEEX = extern "stdcall" fn(address: ULONG, output: *const libc::c_char, maxsize: libc::c_int) -> BOOL;
pub type CEP_AA_ADDCOMMAND = extern "stdcall" fn(command: *const libc::c_char);
pub type CEP_AA_DELCOMMAND = extern "stdcall" fn(command: *const libc::c_char);

pub type CEP_CREATETABLEENTRY = extern "stdcall" fn() -> PVOID;
pub type CEP_GETTABLEENTRY = extern "stdcall" fn(description: *const libc::c_char) -> PVOID;
pub type CEP_MEMREC_SETDESCRIPTION = extern "stdcall" fn(memrec: PVOID, description: *const libc::c_char) -> BOOL;
pub type CEP_MEMREC_GETDESCRIPTION = extern "stdcall" fn(memrec: PVOID) -> PCHAR;
pub type CEP_MEMREC_GETADDRESS = extern "stdcall" fn(memrec: PVOID, address: *const libc::uintptr_t, offsets: *mut DWORD, maxoffsets: libc::c_int, neededOffsets: *const libc::c_int) -> BOOL;
pub type CEP_MEMREC_SETADDRESS = extern "stdcall" fn(memrec: PVOID, address: *const libc::c_char, offsets: *mut DWORD, offsetcount: libc::c_int) -> BOOL;
pub type CEP_MEMREC_GETTYPE = extern "stdcall" fn(memrec: PVOID) -> libc::c_int;
pub type CEP_MEMREC_SETTYPE = extern "stdcall" fn(memrec: PVOID, vtype: libc::c_int) -> BOOL;
pub type CEP_MEMREC_GETVALUETYPE = extern "stdcall" fn(memrec: PVOID, value: *const libc::c_char, maxsize: libc::c_int) -> BOOL;
pub type CEP_MEMREC_SETVALUETYPE = extern "stdcall" fn(memrec: PVOID, value: *const libc::c_char) -> BOOL;
pub type CEP_MEMREC_GETSCRIPT = extern "stdcall" fn(memrec: PVOID) -> *mut libc::c_char;
pub type CEP_MEMREC_SETSCRIPT = extern "stdcall" fn(memrec: PVOID, script: *const libc::c_char) -> BOOL;
pub type CEP_MEMREC_ISFROZEN = extern "stdcall" fn(memrec: PVOID) -> BOOL;
pub type CEP_MEMREC_FREEZE = extern "stdcall" fn(memrec: PVOID, direction: libc::c_int) -> BOOL;
pub type CEP_MEMREC_UNFREEZE = extern "stdcall" fn(memrec: PVOID) -> BOOL;
pub type CEP_MEMREC_SETCOLOR = extern "stdcall" fn(memrec: PVOID, color: DWORD) -> BOOL;
pub type CEP_MEMREC_APPENDTOENTRY = extern "stdcall" fn(memrec1: PVOID, memrec2: PVOID) -> BOOL;
pub type CEP_MEMREC_DELETE = extern "stdcall" fn(memrec: PVOID) -> BOOL;

pub type CEP_GETPROCESSIDFROMPROCESSNAME = extern "stdcall" fn(name: *const libc::c_char) -> DWORD;
pub type CEP_OPENPROCESS = extern "stdcall" fn(pid: DWORD) -> DWORD;
pub type CEP_DEBUGPROCESS = extern "stdcall" fn(debuggerinterface: libc::c_int) -> DWORD;
pub type CEP_PAUSE = extern "stdcall" fn();
pub type CEP_UNPAUSE = extern "stdcall" fn();
pub type CEP_DEBUG_SETBREAKPOINT = extern "stdcall" fn(address: libc::uintptr_t, size: libc::c_int, trigger: libc::c_int) -> BOOL;
pub type CEP_DEBUG_REMOVEBREAKPOINT = extern "stdcall" fn(address: libc::uintptr_t) -> BOOL;
pub type CEP_DEBUG_CONTINUEFROMBREAKPOINT = extern "stdcall" fn(continueoption: libc::c_int) -> BOOL;

pub type CEP_CLOSECE = extern "stdcall" fn();
pub type CEP_HIDEALLCEWINDOWS = extern "stdcall" fn();
pub type CEP_UNHIDEMAINCEWINDOW = extern "stdcall" fn();

pub type CEP_CREATEFORM = extern "stdcall" fn() -> PVOID;
pub type CEP_FORM_CENTERSCREEN = extern "stdcall" fn(form: PVOID);
pub type CEP_FORM_HIDE = extern "stdcall" fn(form: PVOID);
pub type CEP_FORM_SHOW = extern "stdcall" fn(form: PVOID);
pub type CEP_FORM_ONCLOSE = extern "stdcall" fn(form: PVOID, function: PVOID);

pub type CEP_CREATEPANEL = extern "stdcall" fn(owner: PVOID) -> PVOID;
pub type CEP_CREATEGROUPBOX = extern "stdcall" fn(owner: PVOID) -> PVOID;
pub type CEP_CREATEBUTTON = extern "stdcall" fn(owner: PVOID) -> PVOID;
pub type CEP_CREATEIMAGE = extern "stdcall" fn(owner: PVOID) -> PVOID;

pub type CEP_IMAGE_LOADIMAGEFROMFILE = extern "stdcall" fn(image: PVOID, filename: *const libc::c_char) -> BOOL;
pub type CEP_IMAGE_TRANSPARENT = extern "stdcall" fn(image: PVOID, transparent: BOOL);
pub type CEP_IMAGE_STRETCH = extern "stdcall" fn(image: PVOID, stretch: BOOL);

pub type CEP_CREATELABEL = extern "stdcall" fn(owner: PVOID) -> PVOID;
pub type CEP_CREATEEDIT = extern "stdcall" fn(owner: PVOID) -> PVOID;
pub type CEP_CREATEMEMO = extern "stdcall" fn(owner: PVOID) -> PVOID;
pub type CEP_CREATETIMER = extern "stdcall" fn(owner: PVOID) -> PVOID;

pub type CEP_TIMER_SETINTERVAL = extern "stdcall" fn(timer: PVOID, interval: libc::c_int);
pub type CEP_TIMER_ONTIMER = extern "stdcall" fn(timer: PVOID, function: PVOID);

pub type CEP_CONTROL_SETCAPTION = extern "stdcall" fn(control: PVOID, caption: *const libc::c_char);
pub type CEP_CONTROL_GETCAPTION = extern "stdcall" fn(control: PVOID, caption: *const libc::c_char, maxsize: libc::c_int) -> BOOL;

pub type CEP_CONTROL_SETPOSITION = extern "stdcall" fn(control: PVOID, x: libc::c_int, y: libc::c_int);
pub type CEP_CONTROL_GETX = extern "stdcall" fn(control: PVOID) -> libc::c_int;
pub type CEP_CONTROL_GETY = extern "stdcall" fn(control: PVOID) -> libc::c_int;

pub type CEP_CONTROL_SETSIZE = extern "stdcall" fn(control: PVOID, width: libc::c_int, height: libc::c_int);
pub type CEP_CONTROL_GETWIDTH = extern "stdcall" fn(control: PVOID) -> libc::c_int;
pub type CEP_CONTROL_GETHEIGHT = extern "stdcall" fn(control: PVOID) -> libc::c_int;

pub type CEP_CONTROL_SETALIGN = extern "stdcall" fn(control: PVOID, align: libc::c_int);
pub type CEP_CONTROL_ONCLICK = extern "stdcall" fn(control: PVOID, function: PVOID);

pub type CEP_OBJECT_DESTROY = extern "stdcall" fn(object: PVOID);

pub type CEP_MESSAGEDIALOG = extern "stdcall" fn(massage: *const libc::c_char, messagetype: libc::c_int, buttoncombination: libc::c_int) -> libc::c_int;
pub type CEP_SPEEDHACK_SETSPEED = extern "stdcall" fn(speed: libc::c_float) -> BOOL;

#[repr(C)]
pub struct ExportedFunctions {
    pub sizeofExportedFunctions: libc::c_int,
    pub ShowMessage: CEP_SHOWMESSAGE,
    pub RegisterFunction: CEP_REGISTERFUNCTION,
    pub UnregisterFunction: CEP_UNREGISTERFUNCTION,
    pub OpenedProcessID: *const ULONG,
    pub OpenedProcessHandle: *const HANDLE,

    pub GetMainWindowHandle: CEP_GETMAINWINDOWHANDLE, //returns the handle of the main window (for whatever reason, it is recommended to use delphi to make a real userinterface upgrade)
    pub AutoAssemble: CEP_AUTOASSEMBLE, //Pointer to the AutoAssemble function
    pub Assembler: CEP_ASSEMBLER, //pointer to the assembler function
    pub Disassembler: CEP_DISASSEMBLER, //pointer to the disassembler function
    ChangeRegistersAtAddress: CEP_CHANGEREGATADDRESS, //pointer to the ChangeRegAtBP function
    pub InjectDLL: CEP_INJECTDLL, //pointer to ce's Inject DLL function
    pub FreezeMem: CEP_FREEZEMEM, //pointer to the FreezeMem routine
    pub UnfreezeMem: CEP_UNFREEZEMEM, //pointer to the UnfreezeMem routine (use this to undo freezes with FreezeMem)
    pub FixMem: CEP_FIXMEM, //pointer to the fixmem routine
    pub ProcessList: CEP_PROCESSLIST, //pointer to the processlist routine
    pub ReloadSettings: CEP_RELOADSETTINGS, //pointer to the ReloadSettings routine
    pub GetAddressFromPointer: CEP_GETADDRESSFROMPOINTER, //pointer to the GetAddressFromPointer routine

    //pointers to the address that contains the pointers to the functions
    // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    pub ReadProcessMemory: PVOID,           // pointer to the pointer of ReadProcessMemory (Change it to hook that api, or use it yourself)
    pub WriteProcessMemory: PVOID,          // pointer to the pointer of WriteProcessMemory (Change it to hook that api, or use it yourself)
    pub GetThreadContext: PVOID,            // ...
    pub SetThreadContext: PVOID,            // ...
    pub SuspendThread: PVOID,               // ...
    pub ResumeThread: PVOID,                // ...
    pub OpenProcess: PVOID,                 // ...
    pub WaitForDebugEvent: PVOID,           // ...
    pub ContinueDebugEvent: PVOID,          // ...
    pub DebugActiveProcess: PVOID,          // ...
    pub StopDebugging: PVOID,               // ...
    pub StopRegisterChange: PVOID,          // ...
    pub VirtualProtect: PVOID,              // ...
    pub VirtualProtectEx: PVOID,            // ...
    pub VirtualQueryEx: PVOID,              // ...
    pub VirtualAllocEx: PVOID,              // ...
    pub CreateRemoteThread: PVOID,          // ...
    pub OpenThread: PVOID,                  // ...
    pub GetPEProcess: PVOID,                // ...
    pub GetPEThread: PVOID,                 // ...
    pub GetThreadsProcessOffset: PVOID,     // ...
    pub GetThreadListEntryOffset: PVOID,    // ...
    pub GetProcessnameOffset: PVOID,        // ...
    pub GetDebugportOffset: PVOID,          // ...
    pub GetPhysicalAddress: PVOID,          // ...
    pub ProtectMe: PVOID,                   // ...
    pub GetCR4: PVOID,                      // ...
    pub GetCR3: PVOID,                      // ...
    pub SetCR3: PVOID,                      // ...
    pub GetSDT: PVOID,                      // ...
    pub GetSDTShadow: PVOID,                // ...
    pub setAlternateDebugMethod: PVOID,     // ...
    pub getAlternateDebugMethod: PVOID,     // ...
    pub DebugProcess: PVOID,                // ...
    pub ChangeRegOnBP: PVOID,               // ...
    pub RetrieveDebugData: PVOID,           // ...
    pub StartProcessWatch: PVOID,           // ...
    pub WaitForProcessListData: PVOID,      // ...
    pub GetProcessNameFromID: PVOID,        // ...
    pub GetProcessNameFromPEProcess: PVOID, // ...
    pub KernelOpenProcess: PVOID,           // ...
    pub KernelReadProcessMemory: PVOID,     // ...
    pub KernelWriteProcessMemory: PVOID,    // ...
    pub KernelVirtualAllocEx: PVOID,        // ...
    pub IsValidHandle: PVOID,               // ...
    pub GetIDTCurrentThread: PVOID,         // ...
    pub GetIDTs: PVOID,                     // ...
    pub MakeWritable: PVOID,                // ...
    pub GetLoadedState: PVOID,              // ...
    pub DBKSuspendThread: PVOID,            // ...
    pub DBKResumeThread: PVOID,             // ...
    pub DBKSuspendProcess: PVOID,           // ...
    pub DBKResumeProcess: PVOID,            // ...
    pub KernelAlloc: PVOID,                 // ...
    pub GetKProcAddress: PVOID,             // ...
    pub CreateToolhelp32Snapshot: PVOID,    // ...
    pub Process32First: PVOID,              // ...
    pub Process32Next: PVOID,               // ...
    pub Thread32First: PVOID,               // ...
    pub Thread32Next: PVOID,                // ...
    pub Module32First: PVOID,               // ...
    pub Module32Next: PVOID,                // ...
    pub Heap32ListFirst: PVOID,             // ...
    pub Heap32ListNext: PVOID,              // ...
    //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    //advanced for delphi 7 enterprise dll programmers only
    pub mainform: PVOID, //pointer to the Tmainform object. (main window) Compatible with TFORM of D7 Enterprise
    pub memorybrowser: PVOID, //pointer to the TMemoryBrowser object (memory view windows), same as mainform

    //Plugin Version 2+
    pub sym_nameToAddress: CEP_GENERATEAPIHOOKSCRIPT,
    pub sym_addressToName: CEP_ADDRESSTONAME,
    pub sym_generateAPIHookScript: CEP_NAMETOADDRESS,

    //Plugin version 3+
    pub loadDBK32: CEP_LOADDBK32,
    pub loaddbvmifneeded: CEP_LOADDBVMIFNEEDED,
    pub previousOpcode: CEP_PREVIOUSOPCODE,
    pub nextOpcode: CEP_NEXTOPCODE,
    pub disassembleEx: CEP_DISASSEMBLEEX,
    pub loadModule: CEP_LOADMODULE,
    pub aa_AddExtraCommand: CEP_AA_ADDCOMMAND,
    pub aa_RemoveExtraCommand: CEP_AA_DELCOMMAND,

    //version 4 extension
    pub createTableEntry: CEP_CREATETABLEENTRY,
    pub getTableEntry: CEP_GETTABLEENTRY,
    pub memrec_setDescription: CEP_MEMREC_SETDESCRIPTION,
    pub memrec_getDescription: CEP_MEMREC_GETDESCRIPTION,
    pub memrec_getAddress: CEP_MEMREC_GETADDRESS,
    pub memrec_setAddress: CEP_MEMREC_SETADDRESS,
    pub memrec_getType: CEP_MEMREC_GETTYPE,
    pub memrec_setType: CEP_MEMREC_SETTYPE,
    pub memrec_getValue: CEP_MEMREC_GETVALUETYPE,
    pub memrec_setValue: CEP_MEMREC_SETVALUETYPE,
    pub memrec_getScript: CEP_MEMREC_GETSCRIPT,
    pub memrec_setScript: CEP_MEMREC_SETSCRIPT,
    pub memrec_isfrozen: CEP_MEMREC_ISFROZEN,
    pub memrec_freeze: CEP_MEMREC_FREEZE,
    pub memrec_unfreeze: CEP_MEMREC_UNFREEZE,
    pub memrec_setColor: CEP_MEMREC_SETCOLOR,
    pub memrec_appendtoentry: CEP_MEMREC_APPENDTOENTRY,
    pub memrec_delete: CEP_MEMREC_DELETE,

    pub getProcessIDFromProcessName: CEP_GETPROCESSIDFROMPROCESSNAME,
    pub openProcessEx: CEP_OPENPROCESS,
    pub debugProcessEx: CEP_DEBUGPROCESS,
    pub pause: CEP_PAUSE,
    pub unpause: CEP_UNPAUSE,

    pub debug_setBreakpoint: CEP_DEBUG_SETBREAKPOINT,
    pub debug_removeBreakpoint: CEP_DEBUG_REMOVEBREAKPOINT,
    pub debug_continueFromBreakpoint: CEP_DEBUG_CONTINUEFROMBREAKPOINT,

    pub closeCE: CEP_CLOSECE,
    pub hideAllCEWindows: CEP_HIDEALLCEWINDOWS,
    pub unhideMainCEwindow: CEP_UNHIDEMAINCEWINDOW,
    pub createForm: CEP_CREATEFORM,
    pub form_centerScreen: CEP_FORM_CENTERSCREEN,
    pub form_hide: CEP_FORM_HIDE,
    pub form_show: CEP_FORM_SHOW,
    pub form_onClose: CEP_FORM_ONCLOSE,

    pub createPanel: CEP_CREATEPANEL,
    pub createGroupBox: CEP_CREATEGROUPBOX,
    pub createButton: CEP_CREATEBUTTON,
    pub createImage: CEP_CREATEIMAGE,
    pub image_loadImageFromFile: CEP_IMAGE_LOADIMAGEFROMFILE,
    pub image_transparent: CEP_IMAGE_TRANSPARENT,
    pub image_stretch: CEP_IMAGE_STRETCH,

    pub createLabel: CEP_CREATELABEL,
    pub createEdit: CEP_CREATEEDIT,
    pub createMemo: CEP_CREATEMEMO,
    pub createTimer: CEP_CREATETIMER,
    pub timer_setInterval: CEP_TIMER_SETINTERVAL,
    pub timer_onTimer: CEP_TIMER_ONTIMER,
    pub control_setCaption: CEP_CONTROL_SETCAPTION,
    pub control_getCaption: CEP_CONTROL_GETCAPTION,
    pub control_setPosition: CEP_CONTROL_SETPOSITION,
    pub control_getX: CEP_CONTROL_GETX,
    pub control_getY: CEP_CONTROL_GETY,
    pub control_setSize: CEP_CONTROL_SETSIZE,
    pub control_getWidth: CEP_CONTROL_GETWIDTH,
    pub control_getHeight: CEP_CONTROL_GETHEIGHT,
    pub control_setAlign: CEP_CONTROL_SETALIGN,
    pub control_onClick: CEP_CONTROL_ONCLICK,

    pub object_destroy: CEP_OBJECT_DESTROY,
    pub messageDialog: CEP_MESSAGEDIALOG,
    pub speedhack_setSpeed: CEP_SPEEDHACK_SETSPEED,

    //V5: Todo, implement function declarations
    pub ExecuteKernelCode: PVOID,
    pub UserdefinedInterruptHook: PVOID,
    pub GetLuaState: PVOID,
    pub MainThreadCall: PVOID
}