Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. void getEmuRW(void *pos, u32 size, u32 *readOff, u32 *writeOff){
  2. //Look for read/write code
  3. unsigned char pattern[] = {0x04, 0x00, 0x0D, 0x00, 0x17, 0x00, 0x1E, 0x00, 0xC8, 0x05};
  4.  
  5. *writeOff = (u32)memsearch(pos, pattern, size, 10);
  6. *readOff = (u32)memsearch((void *)(*writeOff - 0x1000), pattern, 0x1000, 10);
  7. }
  8.  
  9. void getMPU(void *pos, u32 *off, u32 size){
  10. //Look for MPU code
  11. unsigned char pattern[] = {0x03, 0x00, 0x24, 0x00, 0x00, 0x00, 0x10};
  12.  
  13. *off = (u32)memsearch(pos, pattern, size, 7);
  14. }
  15.  
  16. void getEmuCode(void *pos, u32 *off, u32 size){
  17. void *proc9 = memsearch(pos, "Process9", size, 8);
  18. unsigned char pattern[] = {0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF};
  19.  
  20. //We're looking for the last spot before Process9
  21. *off = (u32)memsearch(pos, pattern, size - (size - (u32)(proc9 - pos)), 6) + 0xF;
  22. }
  23.  
  24. void getSignatures(void *pos, u32 size, u32 *off, u32 *off2){
  25. //Look for signature checks
  26. unsigned char pattern[] = {0xC0, 0x1C, 0x76, 0xE7, 0x20};
  27. unsigned char pattern2[] = {0x70, 0xB5, 0x22, 0x4D, 0x0C};
  28.  
  29. *off = (u32)memsearch(pos, pattern, size, 5);
  30. *off2 = (u32)memsearch(pos, pattern2, size, 5);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement