Advertisement
Riremito

Untitled

Jan 28th, 2015
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.08 KB | None | 0 0
  1. #ifndef __AIRMEMORY_H__
  2. #define __AIRMEMORY_H__
  3.  
  4. #include<Windows.h>
  5. #include<psapi.h>
  6. #pragma comment(lib, "psapi.lib")
  7.  
  8. #define MaxSize 256
  9.  
  10. #define CALL 0xE8
  11. #define JMP 0xE9
  12. #define JNE 0x850F
  13. #define JE 0x840F
  14.  
  15. class AirMemory{
  16.     private:
  17.         DWORD BaseAddress;
  18.         DWORD Memory_Start;
  19.         DWORD Memory_End;
  20.         DWORD MemoryDump;
  21.         bool IsDLL;
  22.         DWORD OldAddr;
  23.         DWORD OldSize;
  24.         DWORD OldProtect;
  25.  
  26.         bool FullAccess(DWORD dwAddr, DWORD dwSize);
  27.         bool RestoreProtect();
  28.  
  29.     public:
  30.         AirMemory();
  31.         void Init(char *ModuleName = NULL);
  32.         void CreateMemoryDump();
  33.         DWORD AobScan(char *Aob, int Result = 0);
  34.         bool MemoryWriter(DWORD dwAddr, char *Code);
  35.         bool RestoreMemory(DWORD dwAddr, DWORD dwSize);
  36.         bool WriteHook(DWORD dwPrev, WORD OpCode, void(*dwNext)(), DWORD *RetAddr = NULL, DWORD dwAdd = 0);
  37.         void GetDumpInfo(DWORD *MS, DWORD *ME, DWORD *MD);
  38.         DWORD GetBaseAddress();
  39.         void PointerHook(DWORD dwPointer, void(*NewFunction)(), DWORD *OldFunction);
  40.         DWORD AutoVMHook(DWORD dwFunction, void(*dwNext)(), DWORD *RetAddr, DWORD dwMinAddr = 0);
  41. };
  42.  
  43. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement