Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private PS3API PS3 = new PS3API(SelectAPI.ControlConsole);
- private byte[] XPLongFoundsBytes = new byte[33554432];
- private byte[] XPBytes = new byte[]
- {
- 0,
- 0,
- 0,
- 220,
- 0,
- 0,
- 0,
- 10,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255
- };
- private byte[] CashLongFoundsBytes = new byte[33554432];
- private byte[] CashBytes = new byte[]
- {
- 0,
- 0,
- 0,
- 0,
- 1,
- 126,
- 17,
- 144,
- 16,
- 0,
- 98,
- 16,
- 0,
- 0,
- 0,
- 0,
- 1,
- 126,
- 17,
- 144,
- 16,
- 0,
- 164,
- 16,
- 0,
- 0,
- 0,
- 0,
- 1,
- 126,
- 17,
- 144,
- 16,
- 0,
- 230,
- 19,
- 0,
- 0,
- 0,
- 0,
- 1,
- 126,
- 17,
- 144,
- 16,
- 1,
- 40,
- 16,
- 0,
- 0,
- 0,
- 0,
- 1,
- 126,
- 17,
- 144,
- 16,
- 1,
- 106,
- 18,
- 0,
- 0,
- 0,
- 0,
- 1,
- 126,
- 19,
- 36,
- 16,
- 0,
- 98,
- 16,
- 0,
- 0,
- 0,
- 0,
- 1,
- 126,
- 19,
- 36
- };
- private byte[] LastLongFoundsBytes = new byte[33554432];
- private byte[] LastBytes = new byte[]
- {
- 0,
- 0,
- 0,
- 16,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255
- };
- private byte[] SomeLongFoundsBytes = new byte[33554432];
- private byte[] SomeBytes = new byte[]
- {
- 0,
- 0,
- 39,
- 16,
- 63,
- 128,
- 0,
- 0,
- 63,
- 128,
- 0,
- 0,
- 0,
- 0,
- 1,
- 0,
- 63,
- 128,
- 0,
- 0,
- 63,
- 128,
- 0,
- 0,
- 63,
- 128,
- 0,
- 0,
- 63,
- 128,
- 0,
- 0,
- 63,
- 128,
- 0,
- 0,
- 63,
- 128,
- 0,
- 0,
- 63,
- 128,
- 0,
- 0,
- 63,
- 128,
- 0,
- 0
- };
- private byte[] TaxiLongFoundsBytes = new byte[33554432];
- private byte[] TaxiBytes = new byte[]
- {
- 28,
- 177,
- 255,
- 244,
- 0,
- 0,
- 0,
- 0,
- 199,
- 3,
- 219,
- 95
- };
- private byte[] SNSLongFoundsBytes = new byte[33554432];
- private byte[] SNSBytes = new byte[]
- {
- 0,
- 0,
- 0,
- 16,
- 249,
- 230,
- 170,
- 75
- };
- private byte[] JBLongFoundsBytes = new byte[33554432];
- private byte[] JBBytes = new byte[]
- {
- 62,
- 171,
- 85,
- 85
- };
- private byte[] GarageLongFoundsBytes = new byte[33554432];
- private byte[] GarageBytes = new byte[]
- {
- 82,
- 65,
- 68,
- 73,
- 79,
- 95,
- 49,
- 56,
- 95,
- 57,
- 48,
- 83,
- 95,
- 82,
- 79,
- 67,
- 75,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 255,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
- };
- private byte[] ModelLongFoundsBytes = new byte[33554432];
- private byte[] ModelBytes = new byte[]
- {
- 24,
- 206,
- 87,
- 208
- };
- private uint SomeOffsetOne = 0u;
- private uint SNSOffsetOne = 0u;
- private uint JBOffsetOne = 0u;
- private uint GarageOffsetOne = 0u;
- private uint ModelOffsetOne = 0u;
- private int SNSPlusNumber = 8;
- private int JBPlusNumber = 4;
- private int GarageMinaseNumber = 96;
- private int ModelMinaseNumber = 20;
- private uint SNSStartOffset = 838860800u;
- private uint JBStartOffset = 838860800u;
- private uint GarageStartOffset = 855638016u;
- private uint ModelStartOffset = 844103680u;
- private uint ZeroOffset = 0u;
- public int NumberOffsets = 0;
- private IContainer components = null;
- public static string ByteToString(byte[] any)
- {
- string text = BitConverter.ToString(any);
- return text.Replace("-", "");
- }
- private string Make(string h)
- {
- StringBuilder stringBuilder = new StringBuilder();
- for (int i = 0; i <= h.Length - 2; i += 2)
- {
- stringBuilder.Append(Convert.ToString(Convert.ToChar(int.Parse(h.Substring(i, 2), NumberStyles.HexNumber))));
- }
- stringBuilder.Replace('\0', ' ');
- return stringBuilder.ToString();
- }
- public static string GetTemporaryDirectory()
- {
- return Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
- }
- public uint ContainsSequence(byte[] toSearch, byte[] toFind, uint StartOffset)
- {
- int num = 0;
- IL_31:
- uint result;
- while (num + toFind.Length < toSearch.Length)
- {
- bool flag = true;
- int i = 0;
- while (i < toFind.Length)
- {
- if (toSearch[num + i] == toFind[i])
- {
- i++;
- }
- else
- {
- flag = false;
- IL_26:
- if (!flag)
- {
- num += 16;
- goto IL_31;
- }
- int num2 = (int)(StartOffset + (uint)num);
- uint num3 = (uint)num2;
- result = num3;
- return result;
- }
- }
- goto IL_26;
- }
- result = 0u;
- return result;
- }
- public uint ContainsSequence_by_KranK_ModZ(byte[] toSearch, byte[] toFind, uint StartOffset, int bytes)
- {
- int num = 0;
- IL_31:
- uint result;
- while (num + toFind.Length < toSearch.Length)
- {
- bool flag = true;
- int i = 0;
- while (i < toFind.Length)
- {
- if (toSearch[num + i] == toFind[i])
- {
- i++;
- }
- else
- {
- flag = false;
- IL_26:
- if (!flag)
- {
- num += bytes;
- goto IL_31;
- }
- this.NumberOffsets++;
- int num2 = (int)(StartOffset + (uint)num);
- result = (uint)num2;
- return result;
- }
- }
- goto IL_26;
- }
- result = 0u;
- return result;
- }
- private uint Search(byte[] Search, uint Start, int Length, int bytes)
- {
- byte[] toSearch = this.PS3.Extension.ReadBytes(Start, Length);
- uint num = this.ContainsSequence_by_KranK_ModZ(toSearch, Search, Start, bytes);
- uint result;
- if (num.Equals(this.ZeroOffset))
- {
- result = 0u;
- }
- else
- {
- int num2 = 0;
- for (int i = 0; i < Search.Length; i++)
- {
- int num3 = (int)Search[i];
- if (num3 == 1)
- {
- num2++;
- }
- }
- uint num4 = num + (uint)num2;
- result = num4;
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement