Advertisement
Guest User

Untitled

a guest
Jun 24th, 2015
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.22 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using Binarysharp.MemoryManagement;
  11. using Binarysharp.MemoryManagement.Helpers;
  12. using System.Linq;
  13.  
  14. namespace WindowsFormsApplication1
  15. {
  16.     public partial class Form1 : Form
  17.     {
  18.         public Form1()
  19.         {
  20.             InitializeComponent();
  21.         }
  22.  
  23.         private void Form1_Load(object sender, EventArgs e)
  24.         {
  25.  
  26.             string gameName = "South Park - The Stick of Truth";
  27.             using (var m = new MemorySharp(ApplicationFinder.FromProcessName(gameName).FirstOrDefault()))
  28.             {
  29.  
  30.                 var moneyPtr = new IntPtr(0x01B71110);
  31.                 int[] offsets = { 0x0, 0x14, 0x14, 0x218 };
  32.  
  33.                 moneyPtr = m[moneyPtr].Read<IntPtr>();
  34.  
  35.                 foreach (var offset in offsets)
  36.                 {
  37.                     moneyPtr = m[moneyPtr + offset, false].Read<IntPtr>();
  38.  
  39.                 }
  40.  
  41.                 byte[] bytes = { 1, 1, 1, 1 };
  42.                 m.Write<byte>(moneyPtr, bytes, false);
  43.  
  44.  
  45.             }
  46.  
  47.         }
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement