Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.03 KB | None | 0 0
  1. [StructLayout(LayoutKind.Sequential)]
  2. public struct SpreadTable
  3. {
  4.     [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)]
  5.     public float[] table;
  6. }
  7.  
  8.  
  9. public static void PrintSpreadTable() // Using Galileo makes it so easy.
  10. {
  11.     Galileo.LibAssistant assistant = new Galileo.LibAssistant("BFP4f");
  12.     IntPtr baseAddress = assistant.GetProcess().MainModule.BaseAddress;
  13.     int size = assistant.GetProcess().MainModule.ModuleMemorySize;
  14.     IntPtr a = assistant.GetMemoryManager().FindPattern(baseAddress, size,
  15.         new byte[] { 0x55, 0x8B, 0xEC, 0x51, 0x89, 0x4D, 0xFC, 0x8B, 0x45, 0x08, 0xD9, 0x04, 0x85, 0x00, 0x00, 0x00, 0x00, 0x8B, 0xE5, 0x5D, 0xC2, 0x04, 0x00 },
  16.         "xxxxxxxxxxxxx????xxxxxx", 0);
  17.     SpreadTable spread = assistant.GetMemoryManager().ReadStructure<SpreadTable>(a, 0); // 2nd parameter is the size of the structure, if this is 0, the struct size is automatically worked out by Galileo
  18.     for (int index = 0; index < 1024; index++)
  19.         Console.WriteLine(index + ": " + spread.table[index]);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement