cepluginsdk.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. /*
  2. cepluginsdk.h
  3. Updated May 14, 2012
  4. v4.0.0
  5. */
  6. #include <windows.h>
  7. #define CESDK_VERSION 6
  8. typedef enum {ptAddressList=0, ptMemoryView=1, ptOnDebugEvent=2, ptProcesswatcherEvent=3, ptFunctionPointerchange=4, ptMainMenu=5, ptDisassemblerContext=6, ptDisassemblerRenderLine=7, ptAutoAssembler=8} PluginType;
  9. typedef enum {aaInitialize=0, aaPhase1=1, aaPhase2=2, aaFinalize=3} AutoAssemblerPhase;
  10. typedef struct _PluginVersion
  11. {
  12. unsigned int version; //write here the minimum version this dll is compatible with (Current supported version: 1 and 2: this SDK only describes 2)
  13. char *pluginname; //make this point to a 0-terminated string (allocated memory or static addressin your dll, not stack)
  14. } PluginVersion, *PPluginVersion;
  15. typedef struct _PLUGINTYPE0_RECORD
  16. {
  17. char *interpretedaddress; //pointer to a 255 bytes long string (0 terminated)
  18. UINT_PTR address;//this is a read-only representaion of the address. Change interpretedaddress if you want to change this
  19. BOOL ispointer; //readonly
  20. int countoffsets; //readonly
  21. ULONG *offsets; //array of dwords ranging from 0 to countoffsets-1 (readonly)
  22. char *description; //pointer to a 255 bytes long string
  23. char valuetype; //0=byte, 1=word, 2=dword, 3=float, 4=double, 5=bit, 6=int64, 7=string
  24. char size; //stringlength or bitlength;
  25. } PLUGINTYPE0_RECORD, ADDRESSLIST_RECORD, *PPLUGINTYPE0_RECORD, *PADDRESSLIST_RECORD;
  26. //callback routines efinitions for registered plugin functions:
  27. typedef BOOL (__stdcall *CEP_PLUGINTYPE0)(PPLUGINTYPE0_RECORD SelectedRecord);
  28. typedef BOOL (__stdcall *CEP_PLUGINTYPE1)(ULONG *disassembleraddress, ULONG *selected_disassembler_address, ULONG *hexviewaddress);
  29. typedef int (__stdcall *CEP_PLUGINTYPE2)(LPDEBUG_EVENT DebugEvent);
  30. typedef void (__stdcall *CEP_PLUGINTYPE3)(ULONG processid, ULONG peprocess, BOOL Created);
  31. typedef void (__stdcall *CEP_PLUGINTYPE4)(int reserved);
  32. typedef void (__stdcall *CEP_PLUGINTYPE5)(void);
  33. typedef BOOL (__stdcall *CEP_PLUGINTYPE6ONPOPUP)(ULONG selectedAddress, char **addressofname, BOOL *show);
  34. typedef BOOL (__stdcall *CEP_PLUGINTYPE6)(ULONG *selectedAddress);
  35. typedef void (__stdcall *CEP_PLUGINTYPE7)(ULONG address, char **addressStringPointer, char **bytestringpointer, char **opcodestringpointer, char **specialstringpointer, ULONG *textcolor);
  36. typedef void (__stdcall *CEP_PLUGINTYPE8)(char **line, AutoAssemblerPhase phase, int id);
  37. typedef struct _PLUGINTYPE0_INIT
  38. {
  39. char* name; //0 terminated string describing the name for the user's menu item
  40. CEP_PLUGINTYPE0 callbackroutine; //pointer to a callback routine of the type 0 plugin
  41. } PLUGINTYPE0_INIT, ADDRESSLISTPLUGIN_INIT, *PPLUGINTYPE0_INIT, *PADDRESSLISTPLUGIN_INIT;
  42. typedef struct _PLUGINTYPE1_INIT
  43. {
  44. char* name; //0 terminated string describing the name for the user's menu item
  45. CEP_PLUGINTYPE1 callbackroutine; //pointer to a callback routine of the type 1 plugin
  46. char* shortcut; //0 terminated string containing the shortcut in textform. CE will try it's best to parse it to a valid shortcut
  47. } PLUGINTYPE1_INIT, MEMORYVIEWPLUGIN_INIT, *PPLUGINTYPE1_INIT, *PMEMORYVIEWPLUGIN_INIT;
  48. typedef struct _PLUGINTYPE2_INIT
  49. {
  50. CEP_PLUGINTYPE2 callbackroutine; //pointer to a callback routine of the type 2 plugin
  51. } PLUGINTYPE2_INIT, DEBUGEVENTPLUGIN_INIT, *PPLUGINTYPE2_INIT, *PDEBUGEVENTPLUGIN_INIT;
  52. typedef struct _PLUGINTYPE3_INIT
  53. {
  54. CEP_PLUGINTYPE3 callbackroutine; //pointer to a callback routine of the type 3 plugin
  55. } PLUGINTYPE3_INIT, PROCESSWATCHERPLUGIN_INIT, *PPLUGINTYPE3_INIT, *PPROCESSWATCHERPLUGIN_INIT;
  56. typedef struct _PLUGINTYPE4_INIT
  57. {
  58. CEP_PLUGINTYPE4 callbackroutine; //pointer to a callback routine of the type 4 plugin
  59. } PLUGINTYPE4_INIT, POINTERREASSIGNMENTPLUGIN_INIT, *PPLUGINTYPE4_INIT, *PPOINTERREASSIGNMENTPLUGIN_INIT;
  60. typedef struct _PLUGINTYPE5_INIT
  61. {
  62. char* name; //0 terminated string describing the name for the user's menu item
  63. CEP_PLUGINTYPE5 callbackroutine;
  64. char* shortcut; //0 terminated string containing the shortcut in textform. CE will try it's best to parse it to a valid shortcut
  65. } PLUGINTYPE5_INIT, MAINMENUPLUGIN_INIT, *PPLUGINTYPE5_INIT, *PMAINMENUPLUGIN_INIT;
  66. typedef struct _PLUGINTYPE6_INIT
  67. {
  68. char* name; //0 terminated string describing the name for the user's menu item
  69. CEP_PLUGINTYPE6ONPOPUP callbackroutineOnPopup;
  70. CEP_PLUGINTYPE6 callbackroutine;
  71. char* shortcut; //0 terminated string containing the shortcut in textform. CE will try it's best to parse it to a valid shortcut
  72. } PLUGINTYPE6_INIT, DISASSEMBLERCONTEXT_INIT, *PPLUGINTYPE6_INIT, *PDISASSEMBLERCONTEXT_INIT;
  73. typedef struct _PLUGINTYPE7_INIT
  74. {
  75. CEP_PLUGINTYPE7 callbackroutine; //pointer to a callback routine of the type 7 plugin
  76. } PLUGINTYPE7_INIT, DISASSEMBLERLINEPLUGIN_INIT, *PPLUGINTYPE7_INIT, *PDISASSEMBLERLINEPLUGIN_INIT;
  77. typedef struct _PLUGINTYPE8_INIT
  78. {
  79. CEP_PLUGINTYPE8 callbackroutine; //pointer to a callback routine of the type 8 plugin
  80. } PLUGINTYPE8_INIT, AUTOASSEMBLERPLUGIN_INIT, *PPLUGINTYPE8_INIT, *PAUTOASSEMBLERPLUGIN_INIT;
  81. typedef struct _REGISTERMODIFICATIONINFO
  82. {
  83. UINT_PTR address; //addres to break on
  84. BOOL change_eax;
  85. BOOL change_ebx;
  86. BOOL change_ecx;
  87. BOOL change_edx;
  88. BOOL change_esi;
  89. BOOL change_edi;
  90. BOOL change_ebp;
  91. BOOL change_esp;
  92. BOOL change_eip;
  93. #ifdef _AMD64_
  94. BOOL change_r8;
  95. BOOL change_r9;
  96. BOOL change_r10;
  97. BOOL change_r11;
  98. BOOL change_r12;
  99. BOOL change_r13;
  100. BOOL change_r14;
  101. BOOL change_r15;
  102. #endif
  103. BOOL change_cf;
  104. BOOL change_pf;
  105. BOOL change_af;
  106. BOOL change_zf;
  107. BOOL change_sf;
  108. BOOL change_of;
  109. UINT_PTR new_eax;
  110. UINT_PTR new_ebx;
  111. UINT_PTR new_ecx;
  112. UINT_PTR new_edx;
  113. UINT_PTR new_esi;
  114. UINT_PTR new_edi;
  115. UINT_PTR new_ebp;
  116. UINT_PTR new_esp;
  117. UINT_PTR new_eip;
  118. #ifdef _AMD64_
  119. UINT_PTR new_r8;
  120. UINT_PTR new_r9;
  121. UINT_PTR new_r10;
  122. UINT_PTR new_r11;
  123. UINT_PTR new_r12;
  124. UINT_PTR new_r13;
  125. UINT_PTR new_r14;
  126. UINT_PTR new_r15;
  127. #endif
  128. BOOL new_cf;
  129. BOOL new_pf;
  130. BOOL new_af;
  131. BOOL new_zf;
  132. BOOL new_sf;
  133. BOOL new_of;
  134. } REGISTERMODIFICATIONINFO, *PREGISTERMODIFICATIONINFO;
  135. //the __stdcall stuff isn't really needed since I've set compiler options to force stdcall, but this makes it clear that stdcall is used to the reader
  136. typedef void (__stdcall *CEP_SHOWMESSAGE)(char* message);
  137. typedef int (__stdcall *CEP_REGISTERFUNCTION) (int pluginid, PluginType functiontype, PVOID init);
  138. typedef BOOL (__stdcall *CEP_UNREGISTERFUNCTION) (int pluginid, int functionid);
  139. typedef HANDLE (__stdcall *CEP_GETMAINWINDOWHANDLE) (void);
  140. typedef BOOL (__stdcall *CEP_AUTOASSEMBLE) (char *script);
  141. typedef BOOL (__stdcall *CEP_ASSEMBLER) (UINT_PTR address, char* instruction, BYTE *output, int maxlength, int *returnedsize);
  142. typedef BOOL (__stdcall *CEP_DISASSEMBLER) (UINT_PTR address, char* output, int maxsize);
  143. typedef BOOL (__stdcall *CEP_CHANGEREGATADDRESS) (UINT_PTR address,PREGISTERMODIFICATIONINFO changereg);
  144. typedef BOOL (__stdcall *CEP_INJECTDLL) (char *dllname, char *functiontocall);
  145. typedef int (__stdcall *CEP_FREEZEMEM) (UINT_PTR address, int size);
  146. typedef BOOL (__stdcall *CEP_UNFREEZEMEM) (int freezeID);
  147. typedef BOOL (__stdcall *CEP_FIXMEM) (void);
  148. typedef BOOL (__stdcall *CEP_PROCESSLIST) (char *listbuffer, int listsize);
  149. typedef BOOL (__stdcall *CEP_RELOADSETTINGS) (void);
  150. typedef DWORD (__stdcall *CEP_GETADDRESSFROMPOINTER) (UINT_PTR baseaddress, int offsetcount, int* offsets);
  151. typedef BOOL (__stdcall *CEP_GENERATEAPIHOOKSCRIPT) (char *address, char *addresstojumpto, char *addresstogetnewcalladdress, char *script, int maxscriptsize);
  152. typedef BOOL (__stdcall *CEP_ADDRESSTONAME) (UINT_PTR address, char *name, int maxnamesize);
  153. typedef BOOL (__stdcall *CEP_NAMETOADDRESS) (char *name, UINT_PTR *address);
  154. typedef VOID (__stdcall *CEP_LOADDBK32)(void);
  155. typedef BOOL (__stdcall *CEP_LOADDBVMIFNEEDED)(void);
  156. typedef DWORD (__stdcall *CEP_PREVIOUSOPCODE)(ULONG address);
  157. typedef DWORD (__stdcall *CEP_NEXTOPCODE)(ULONG address);
  158. typedef BOOL (__stdcall *CEP_LOADMODULE)(char *modulepath, char *exportlist, int *maxsize);
  159. typedef BOOL (__stdcall *CEP_DISASSEMBLEEX)(ULONG address, char *output, int maxsize);
  160. typedef VOID (__stdcall *CEP_AA_ADDCOMMAND)(char *command);
  161. typedef VOID (__stdcall *CEP_AA_DELCOMMAND)(char *command);
  162. typedef PVOID (__stdcall *CEP_CREATETABLEENTRY)(void);
  163. typedef PVOID (__stdcall *CEP_GETTABLEENTRY)(char *description);
  164. typedef BOOL (__stdcall *CEP_MEMREC_SETDESCRIPTION)(PVOID memrec, char *description);
  165. typedef PCHAR (__stdcall *CEP_MEMREC_GETDESCRIPTION)(PVOID memrec);
  166. typedef BOOL (__stdcall *CEP_MEMREC_GETADDRESS)(PVOID memrec, UINT_PTR *address, DWORD *offsets, int maxoffsets, int *neededOffsets);
  167. typedef BOOL (__stdcall *CEP_MEMREC_SETADDRESS)(PVOID memrec, char *address, DWORD *offsets, int offsetcount);
  168. typedef int (__stdcall *CEP_MEMREC_GETTYPE)(PVOID memrec);
  169. typedef BOOL (__stdcall *CEP_MEMREC_SETTYPE)(PVOID memrec, int vtype);
  170. typedef BOOL (__stdcall *CEP_MEMREC_GETVALUETYPE)(PVOID memrec, char *value, int maxsize);
  171. typedef BOOL (__stdcall *CEP_MEMREC_SETVALUETYPE)(PVOID memrec, char *value);
  172. typedef char* (__stdcall *CEP_MEMREC_GETSCRIPT)(PVOID memrec);
  173. typedef BOOL (__stdcall *CEP_MEMREC_SETSCRIPT)(PVOID memrec, char *script);
  174. typedef BOOL (__stdcall *CEP_MEMREC_ISFROZEN)(PVOID memrec);
  175. typedef BOOL (__stdcall *CEP_MEMREC_FREEZE)(PVOID memrec, int direction);
  176. typedef BOOL (__stdcall *CEP_MEMREC_UNFREEZE)(PVOID memrec);
  177. typedef BOOL (__stdcall *CEP_MEMREC_SETCOLOR)(PVOID memrec, DWORD color);
  178. typedef BOOL (__stdcall *CEP_MEMREC_APPENDTOENTRY)(PVOID memrec1, PVOID memrec2);
  179. typedef BOOL (__stdcall *CEP_MEMREC_DELETE)(PVOID memrec);
  180. typedef DWORD (__stdcall *CEP_GETPROCESSIDFROMPROCESSNAME)(char *name);
  181. typedef DWORD (__stdcall *CEP_OPENPROCESS)(DWORD pid);
  182. typedef DWORD (__stdcall *CEP_DEBUGPROCESS)(int debuggerinterface);
  183. typedef VOID (__stdcall *CEP_PAUSE)(void);
  184. typedef VOID (__stdcall *CEP_UNPAUSE)(void);
  185. typedef BOOL (__stdcall *CEP_DEBUG_SETBREAKPOINT)(UINT_PTR address, int size, int trigger);
  186. typedef BOOL (__stdcall *CEP_DEBUG_REMOVEBREAKPOINT)(UINT_PTR address);
  187. typedef BOOL (__stdcall *CEP_DEBUG_CONTINUEFROMBREAKPOINT)(int continueoption);
  188. typedef VOID (__stdcall *CEP_CLOSECE)(void);
  189. typedef VOID (__stdcall *CEP_HIDEALLCEWINDOWS)(void);
  190. typedef VOID (__stdcall *CEP_UNHIDEMAINCEWINDOW)(void);
  191. typedef PVOID (__stdcall *CEP_CREATEFORM)(void);
  192. typedef void (__stdcall *CEP_FORM_CENTERSCREEN)(PVOID form);
  193. typedef void (__stdcall *CEP_FORM_HIDE)(PVOID form);
  194. typedef void (__stdcall *CEP_FORM_SHOW)(PVOID form);
  195. typedef void (__stdcall *CEP_FORM_ONCLOSE)(PVOID form, PVOID function);
  196. typedef PVOID (__stdcall *CEP_CREATEPANEL)(PVOID owner);
  197. typedef PVOID (__stdcall *CEP_CREATEGROUPBOX)(PVOID owner);
  198. typedef PVOID (__stdcall *CEP_CREATEBUTTON)(PVOID owner);
  199. typedef PVOID (__stdcall *CEP_CREATEIMAGE)(PVOID owner);
  200. typedef BOOL (__stdcall *CEP_IMAGE_LOADIMAGEFROMFILE)(PVOID image, char *filename);
  201. typedef VOID (__stdcall *CEP_IMAGE_TRANSPARENT)(PVOID image, BOOL transparent);
  202. typedef VOID (__stdcall *CEP_IMAGE_STRETCH)(PVOID image, BOOL stretch);
  203. typedef PVOID (__stdcall *CEP_CREATELABEL)(PVOID owner);
  204. typedef PVOID (__stdcall *CEP_CREATEEDIT)(PVOID owner);
  205. typedef PVOID (__stdcall *CEP_CREATEMEMO)(PVOID owner);
  206. typedef PVOID (__stdcall *CEP_CREATETIMER)(PVOID owner);
  207. typedef VOID (__stdcall *CEP_TIMER_SETINTERVAL)(PVOID timer, int interval);
  208. typedef VOID (__stdcall *CEP_TIMER_ONTIMER)(PVOID timer, PVOID function);
  209. typedef VOID (__stdcall *CEP_CONTROL_SETCAPTION)(PVOID control, char *caption);
  210. typedef BOOL (__stdcall *CEP_CONTROL_GETCAPTION)(PVOID control, char *caption, int maxsize);
  211. typedef VOID (__stdcall *CEP_CONTROL_SETPOSITION)(PVOID control, int x, int y);
  212. typedef int (__stdcall *CEP_CONTROL_GETX)(PVOID control);
  213. typedef int (__stdcall *CEP_CONTROL_GETY)(PVOID control);
  214. typedef VOID (__stdcall *CEP_CONTROL_SETSIZE)(PVOID control, int width, int height);
  215. typedef int (__stdcall *CEP_CONTROL_GETWIDTH)(PVOID control);
  216. typedef int (__stdcall *CEP_CONTROL_GETHEIGHT)(PVOID control);
  217. typedef VOID (__stdcall *CEP_CONTROL_SETALIGN)(PVOID control, int align);
  218. typedef VOID (__stdcall *CEP_CONTROL_ONCLICK)(PVOID control, PVOID function);
  219. typedef VOID (__stdcall *CEP_OBJECT_DESTROY)(PVOID object);
  220. typedef int (__stdcall *CEP_MESSAGEDIALOG)(char *massage, int messagetype, int buttoncombination);
  221. typedef BOOL (__stdcall *CEP_SPEEDHACK_SETSPEED)(float speed);
  222. /*
  223. function ce_messageDialog(message: pchar; messagetype: integer; buttoncombination: integer): integer; stdcall;
  224. function ce_speedhack_setSpeed(speed: single): BOOL; stdcall;
  225. */
  226. typedef struct _ExportedFunctions
  227. {
  228. int sizeofExportedFunctions;
  229. CEP_SHOWMESSAGE ShowMessage; //Pointer to the ce showmessage function
  230. CEP_REGISTERFUNCTION RegisterFunction; //Use this to register a specific type of plugin
  231. CEP_UNREGISTERFUNCTION UnregisterFunction; //unregisters a function registered with registerfunction
  232. PULONG OpenedProcessID; //pointer to the currently selected processid
  233. PHANDLE OpenedProcessHandle; //pointer to the currently selected processhandle
  234. CEP_GETMAINWINDOWHANDLE GetMainWindowHandle; //returns the handle of the main window (for whatever reason, it is recommended to use delphi to make a real userinterface upgrade)
  235. CEP_AUTOASSEMBLE AutoAssemble; //Pointer to the AutoAssemble function
  236. CEP_ASSEMBLER Assembler; //pointer to the assembler function
  237. CEP_DISASSEMBLER Disassembler; //pointer to the disassembler function
  238. CEP_CHANGEREGATADDRESS ChangeRegistersAtAddress; //pointer to the ChangeRegAtBP function
  239. CEP_INJECTDLL InjectDLL; //pointer to ce's Inject DLL function
  240. CEP_FREEZEMEM FreezeMem; //pointer to the FreezeMem routine
  241. CEP_UNFREEZEMEM UnfreezeMem; //pointer to the UnfreezeMem routine (use this to undo freezes with FreezeMem)
  242. CEP_FIXMEM FixMem; //pointer to the fixmem routine
  243. CEP_PROCESSLIST ProcessList; //pointer to the processlist routine
  244. CEP_RELOADSETTINGS ReloadSettings; //pointer to the ReloadSettings routine
  245. CEP_GETADDRESSFROMPOINTER GetAddressFromPointer; //pointer to the GetAddressFromPointer routine
  246. //pointers to the address that contains the pointers to the functions
  247. //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  248. PVOID ReadProcessMemory; //pointer to the pointer of ReadProcessMemory (Change it to hook that api, or use it yourself)
  249. PVOID WriteProcessMemory; //pointer to the pointer of WriteProcessMemory (Change it to hook that api, or use it yourself)
  250. PVOID GetThreadContext; // ...
  251. PVOID SetThreadContext; // ...
  252. PVOID SuspendThread; // ...
  253. PVOID ResumeThread; // ...
  254. PVOID OpenProcess; // ...
  255. PVOID WaitForDebugEvent; // ...
  256. PVOID ContinueDebugEvent; // ...
  257. PVOID DebugActiveProcess; // ...
  258. PVOID StopDebugging; // ...
  259. PVOID StopRegisterChange; // ...
  260. PVOID VirtualProtect; // ...
  261. PVOID VirtualProtectEx; // ...
  262. PVOID VirtualQueryEx; // ...
  263. PVOID VirtualAllocEx; // ...
  264. PVOID CreateRemoteThread; // ...
  265. PVOID OpenThread; // ...
  266. PVOID GetPEProcess; // ...
  267. PVOID GetPEThread; // ...
  268. PVOID GetThreadsProcessOffset; // ...
  269. PVOID GetThreadListEntryOffset; // ...
  270. PVOID GetProcessnameOffset; // ...
  271. PVOID GetDebugportOffset; // ...
  272. PVOID GetPhysicalAddress; // ...
  273. PVOID ProtectMe; // ...
  274. PVOID GetCR4; // ...
  275. PVOID GetCR3; // ...
  276. PVOID SetCR3; // ...
  277. PVOID GetSDT; // ...
  278. PVOID GetSDTShadow; // ...
  279. PVOID setAlternateDebugMethod; // ...
  280. PVOID getAlternateDebugMethod; // ...
  281. PVOID DebugProcess; // ...
  282. PVOID ChangeRegOnBP; // ...
  283. PVOID RetrieveDebugData; // ...
  284. PVOID StartProcessWatch; // ...
  285. PVOID WaitForProcessListData; // ...
  286. PVOID GetProcessNameFromID; // ...
  287. PVOID GetProcessNameFromPEProcess;// ...
  288. PVOID KernelOpenProcess; // ...
  289. PVOID KernelReadProcessMemory; // ...
  290. PVOID KernelWriteProcessMemory; // ...
  291. PVOID KernelVirtualAllocEx; // ...
  292. PVOID IsValidHandle; // ...
  293. PVOID GetIDTCurrentThread; // ...
  294. PVOID GetIDTs; // ...
  295. PVOID MakeWritable; // ...
  296. PVOID GetLoadedState; // ...
  297. PVOID DBKSuspendThread; // ...
  298. PVOID DBKResumeThread; // ...
  299. PVOID DBKSuspendProcess; // ...
  300. PVOID DBKResumeProcess; // ...
  301. PVOID KernelAlloc; // ...
  302. PVOID GetKProcAddress; // ...
  303. PVOID CreateToolhelp32Snapshot; // ...
  304. PVOID Process32First; // ...
  305. PVOID Process32Next; // ...
  306. PVOID Thread32First; // ...
  307. PVOID Thread32Next; // ...
  308. PVOID Module32First; // ...
  309. PVOID Module32Next; // ...
  310. PVOID Heap32ListFirst; // ...
  311. PVOID Heap32ListNext; // ...
  312. //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  313. //advanced for delphi 7 enterprise dll programmers only
  314. PVOID mainform; //pointer to the Tmainform object. (main window) Compatible with TFORM of D7 Enterprise
  315. PVOID memorybrowser; //pointer to the TMemoryBrowser object (memory view windows), same as mainform
  316. //Plugin Version 2+
  317. CEP_GENERATEAPIHOOKSCRIPT sym_nameToAddress;
  318. CEP_ADDRESSTONAME sym_addressToName;
  319. CEP_NAMETOADDRESS sym_generateAPIHookScript;
  320. //Plugin version 3+
  321. CEP_LOADDBK32 loadDBK32;
  322. CEP_LOADDBVMIFNEEDED loaddbvmifneeded;
  323. CEP_PREVIOUSOPCODE previousOpcode;
  324. CEP_NEXTOPCODE nextOpcode;
  325. CEP_DISASSEMBLEEX disassembleEx;
  326. CEP_LOADMODULE loadModule;
  327. CEP_AA_ADDCOMMAND aa_AddExtraCommand;
  328. CEP_AA_DELCOMMAND aa_RemoveExtraCommand;
  329. //version 4 extension
  330. CEP_CREATETABLEENTRY createTableEntry;
  331. CEP_GETTABLEENTRY getTableEntry;
  332. CEP_MEMREC_SETDESCRIPTION memrec_setDescription;
  333. CEP_MEMREC_GETDESCRIPTION memrec_getDescription;
  334. CEP_MEMREC_GETADDRESS memrec_getAddress;
  335. CEP_MEMREC_SETADDRESS memrec_setAddress;
  336. CEP_MEMREC_GETTYPE memrec_getType;
  337. CEP_MEMREC_SETTYPE memrec_setType;
  338. CEP_MEMREC_GETVALUETYPE memrec_getValue;
  339. CEP_MEMREC_SETVALUETYPE memrec_setValue;
  340. CEP_MEMREC_GETSCRIPT memrec_getScript;
  341. CEP_MEMREC_SETSCRIPT memrec_setScript;
  342. CEP_MEMREC_ISFROZEN memrec_isfrozen;
  343. CEP_MEMREC_FREEZE memrec_freeze;
  344. CEP_MEMREC_UNFREEZE memrec_unfreeze;
  345. CEP_MEMREC_SETCOLOR memrec_setColor;
  346. CEP_MEMREC_APPENDTOENTRY memrec_appendtoentry;
  347. CEP_MEMREC_DELETE memrec_delete;
  348. CEP_GETPROCESSIDFROMPROCESSNAME getProcessIDFromProcessName;
  349. CEP_OPENPROCESS openProcessEx;
  350. CEP_DEBUGPROCESS debugProcessEx;
  351. CEP_PAUSE pause;
  352. CEP_UNPAUSE unpause;
  353. CEP_DEBUG_SETBREAKPOINT debug_setBreakpoint;
  354. CEP_DEBUG_REMOVEBREAKPOINT debug_removeBreakpoint;
  355. CEP_DEBUG_CONTINUEFROMBREAKPOINT debug_continueFromBreakpoint;
  356. CEP_CLOSECE closeCE;
  357. CEP_HIDEALLCEWINDOWS hideAllCEWindows;
  358. CEP_UNHIDEMAINCEWINDOW unhideMainCEwindow;
  359. CEP_CREATEFORM createForm;
  360. CEP_FORM_CENTERSCREEN form_centerScreen;
  361. CEP_FORM_HIDE form_hide;
  362. CEP_FORM_SHOW form_show;
  363. CEP_FORM_ONCLOSE form_onClose;
  364. CEP_CREATEPANEL createPanel;
  365. CEP_CREATEGROUPBOX createGroupBox;
  366. CEP_CREATEBUTTON createButton;
  367. CEP_CREATEIMAGE createImage;
  368. CEP_IMAGE_LOADIMAGEFROMFILE image_loadImageFromFile;
  369. CEP_IMAGE_TRANSPARENT image_transparent;
  370. CEP_IMAGE_STRETCH image_stretch;
  371. CEP_CREATELABEL createLabel;
  372. CEP_CREATEEDIT createEdit;
  373. CEP_CREATEMEMO createMemo;
  374. CEP_CREATETIMER createTimer;
  375. CEP_TIMER_SETINTERVAL timer_setInterval;
  376. CEP_TIMER_ONTIMER timer_onTimer;
  377. CEP_CONTROL_SETCAPTION control_setCaption;
  378. CEP_CONTROL_GETCAPTION control_getCaption;
  379. CEP_CONTROL_SETPOSITION control_setPosition;
  380. CEP_CONTROL_GETX control_getX;
  381. CEP_CONTROL_GETY control_getY;
  382. CEP_CONTROL_SETSIZE control_setSize;
  383. CEP_CONTROL_GETWIDTH control_getWidth;
  384. CEP_CONTROL_GETHEIGHT control_getHeight;
  385. CEP_CONTROL_SETALIGN control_setAlign;
  386. CEP_CONTROL_ONCLICK control_onClick;
  387. CEP_OBJECT_DESTROY object_destroy;
  388. CEP_MESSAGEDIALOG messageDialog;
  389. CEP_SPEEDHACK_SETSPEED speedhack_setSpeed;
  390. //V5: Todo, implement function declarations
  391. VOID *ExecuteKernelCode;
  392. VOID *UserdefinedInterruptHook;
  393. VOID *GetLuaState;
  394. VOID *MainThreadCall;
  395. } ExportedFunctions, *PExportedFunctions;
  396. BOOL __stdcall CEPlugin_GetVersion(PPluginVersion pv , int sizeofpluginversion);
  397. BOOL __stdcall CEPlugin_InitializePlugin(PExportedFunctions ef , int pluginid);
  398. BOOL __stdcall CEPlugin_DisablePlugin(void);
  399. //old versions without CEPlugin_ in front also work but are not recommended due to bugbrained compilers...