Guest User

Untitled

a guest
Oct 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. namespace Polar.MapleFunctions
  2. {
  3. using System;
  4. using System.Runtime.InteropServices;
  5.  
  6. using Polar.Util;
  7.  
  8. public class COutPacket
  9. {
  10. public static readonly FunctionInfo[] FunctionInfo = new[]
  11. {
  12. new FunctionInfo
  13. {
  14. ArrayOfBytes = "56 8B F1 8B 46 ?? 57 8D 7E ?? 85 C0",
  15. Offset = 0,
  16. Name = "COutPacket::Encode1",
  17. Target = Encode1,
  18. TargetType = typeof(DEncode1)
  19. },
  20. new FunctionInfo
  21. {
  22. ArrayOfBytes = "56 8B F1 8B 46 ?? 57 8D 7E ?? 85 C0 74 ?? 8B 40 ?? 8B 4E ?? 83 C1 ??",
  23. Offset = 0,
  24. Name = "COutPacket::Encode2",
  25. Target = Encode2,
  26. TargetType = typeof(DEncode2)
  27. },
  28. new FunctionInfo
  29. {
  30. ArrayOfBytes = "56 8B F1 8B 46 ?? 57 8D 7E ?? 85 C0 74 ?? 8B 40 ?? 8B 4E ?? 83 C1 ?? 3B C8",
  31. Offset = 0,
  32. Name = "COutPacket::Encode4",
  33. Target = Encode4,
  34. TargetType = typeof(DEncode4)
  35. },
  36. new FunctionInfo
  37. {
  38. ArrayOfBytes = "53 56 8B F1 8B 46 ?? 57 8D 7E ?? 85 C0",
  39. Offset = 0,
  40. Name = "COutPacket::EncodeBuffer",
  41. Target = EncodeBuffer,
  42. TargetType = typeof(DEncodeBuffer)
  43. },
  44. new FunctionInfo
  45. {
  46. ArrayOfBytes = "8B 17 03 56 ?? 8D 44 24 ?? 52 51",
  47. Offset = 0x75,
  48. Name = "COutPacket::EncodeString",
  49. Target = EncodeString,
  50. TargetType = typeof(DEncodeString)
  51. },
  52. new FunctionInfo
  53. {
  54. ArrayOfBytes =
  55. "68 ?? ?? ?? ?? C7 01 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B 4C 24 ?? 51",
  56. Offset = 0x30,
  57. Name = "COutPacket::Init",
  58. Target = Init,
  59. TargetType = typeof(DInit)
  60. }
  61. };
  62.  
  63. [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
  64. public delegate void DEncode1(IntPtr @this, [In] byte value);
  65.  
  66. [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
  67. public delegate void DEncode2(IntPtr @this, [In] ushort value);
  68.  
  69. [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
  70. public delegate void DEncode4(IntPtr @this, [In] uint value);
  71.  
  72. [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
  73. public delegate void DEncodeBuffer(
  74. IntPtr @this,
  75. [In] [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] buffer,
  76. [In] uint size);
  77.  
  78. [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
  79. public delegate void DEncodeString(
  80. IntPtr @this, [In] [MarshalAs(UnmanagedType.LPStr)] string value);
  81.  
  82. [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
  83. public delegate void DInit(IntPtr @this, [In] int type, [In] int loopback);
  84.  
  85. public static DEncode1 Encode1 { get; set; }
  86.  
  87. public static DEncode2 Encode2 { get; set; }
  88.  
  89. public static DEncode4 Encode4 { get; set; }
  90.  
  91. public static DEncodeBuffer EncodeBuffer { get; set; }
  92.  
  93. public static DEncodeString EncodeString { get; set; }
  94.  
  95. public static DInit Init { get; set; }
  96. }
  97. }
Add Comment
Please, Sign In to add comment