public static void XNotifyQueueUI(XboxConsole Console, uint XUserIndex, XNotifyUITypes XNotifyUIType, XNotifyUIPriorities XNotifyUIPriority, string XNotifyMessage) { if (XUserIndex > 3) { throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid user index specified. It must be less than or equal to 3."); } if (!Enum.IsDefined(typeof(XNotifyUITypes), XNotifyUIType)) { throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid notification type specified."); } if (!Enum.IsDefined(typeof(XNotifyUIPriorities), XNotifyUIPriority)) { throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid notification priority specified."); } var dwType = new XDRPCArgumentInfo <uint>((uint)XNotifyUIType); var dwUserIndex = new XDRPCArgumentInfo <uint>(XUserIndex); var dwPriority = new XDRPCArgumentInfo <uint>((uint)XNotifyUIPriority); var pwszStringParam = new XDRPCStringArgumentInfo(XNotifyMessage, Encoding.BigEndianUnicode); var returnVal = Console.ExecuteRPC <uint>(XDRPCMode.Title, "xam.xex", 656, dwType, dwUserIndex, dwPriority, pwszStringParam); if (returnVal != 0x00000000) { throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal); } }
public static uint XexGetModuleHandle(XboxConsole Console, string ModuleName) { var name = new XDRPCStringArgumentInfo(ModuleName, Encoding.ASCII); var handle = new XDRPCArgumentInfo <uint>(0, ArgumentType.Out); var returnVal = Console.ExecuteRPC <uint>(XDRPCMode.Title, "xboxkrnl.exe", 405, name, handle); if (returnVal != 0x00000000) { throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal); } return(handle.Value); }
public static FIND_USER_INFO_RESPONSE XUserFindUser(XDevkit.IXboxConsole xbc, ulong YourXUID, string GamertagOrXUID) { var qwUserId = new XDRPCArgumentInfo <ulong>(YourXUID); XDRPCArgumentInfo qwFindId = null; XDRPCArgumentInfo szSenderName = null; //if (GamertagOrXUID is ulong) //{ // if (!XUID.IsOnlineXUID((ulong)GamertagOrXUID) && !XUID.IsTeamXUID((ulong)GamertagOrXUID)) throw new Exception("XDKUtilities.XUserFindUser: Invalid gamer online/team XUID specified."); // qwFindId = new XDRPCArgumentInfo<ulong>((ulong)GamertagOrXUID); //} //else if (GamertagOrXUID is string) { if (GamertagOrXUID.Length > 15) { throw new Exception("XDKUtilities.XUserFindUser: Invalid Gamertag specified. It must be less than or equal to 15 characters in length."); } szSenderName = new XDRPCStringArgumentInfo(GamertagOrXUID, Encoding.ASCII, ArgumentType.ByRef, 16); } if (qwFindId == null && szSenderName == null) { throw new Exception("XDKUtilities.XUserFindUser: Invalid gamertag/XUID specified."); } if (qwFindId == null) { qwFindId = new XDRPCArgumentInfo <ulong>(0); } if (szSenderName == null) { szSenderName = new XDRPCStringArgumentInfo(string.Empty, Encoding.ASCII, ArgumentType.ByRef, 16); } var cbResults = new XDRPCArgumentInfo <int>(0x18); var pResults = new XDRPCStructArgumentInfo <FIND_USER_INFO_RESPONSE>(new FIND_USER_INFO_RESPONSE(), ArgumentType.Out); var pXOverlapped = new XDRPCArgumentInfo <uint>(0); var returnVal = ((XDevkit.IXboxConsole)xbc).ExecuteRPC <uint>(XDRPCMode.Title, Tools.Addresses.g_XUserFindUserAddressDEV, qwUserId, qwFindId, szSenderName, cbResults, pResults, pXOverlapped); if (returnVal != 0x00000000) { throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal); } return(pResults.Value); }
public static void XamShowFofUI(XboxConsole Console, uint XUserIndex, ulong FriendXUID, string Gamertag) { if (XUserIndex > 3) { throw new Exception("XDKUtilities.XamShowFofUI: Invalid user index specified. It must be less than or equal to 3."); } if (!XUID.IsOnlineXUID(FriendXUID) && !XUID.IsTeamXUID(FriendXUID)) { throw new Exception("XDKUtilities.XamShowFofUI: Invalid friend online/team XUID specified."); } if (Gamertag.Length > 15) { throw new Exception("XDKUtilities.XamShowFofUI: Invalid Gamertag specified. It must be less than or equal to 16 characters in length."); } var dwUserIndex = new XDRPCArgumentInfo <uint>(XUserIndex); var xuidFriend = new XDRPCArgumentInfo <ulong>(FriendXUID); var pszGamertag = new XDRPCStringArgumentInfo(Gamertag, Encoding.ASCII); var returnVal = Console.ExecuteRPC <uint>(XDRPCMode.Title, "xam.xex", 1572, dwUserIndex, xuidFriend, pszGamertag); if (returnVal != 0x00000000) { throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal); } }
public void SetClanTagText(string clantag) { XDRPCExecutionOptions options = new XDRPCExecutionOptions(XDRPCMode.Title, this.Addresses.SetClanTagText); XDRPCArgumentInfo<uint> info = new XDRPCArgumentInfo<uint>(0); XDRPCStringArgumentInfo info2 = new XDRPCStringArgumentInfo(clantag); ((XDevkit.IXboxConsole) xbc).ExecuteRPC<uint>(options, new XDRPCArgumentInfo[] { info, info2 }); }
public void setStat(string statName, int value) { XDRPCExecutionOptions options = new XDRPCExecutionOptions(XDRPCMode.Title, this.Addresses.SetIntPlayerStat); XDRPCArgumentInfo<int> info = new XDRPCArgumentInfo<int>(0); XDRPCStringArgumentInfo info2 = new XDRPCStringArgumentInfo(statName); XDRPCArgumentInfo<int> info3 = new XDRPCArgumentInfo<int>(value); ((XDevkit.IXboxConsole) this.xbc).ExecuteRPC<int>(options, new XDRPCArgumentInfo[] { info, info2, info3 }); }
public byte G_MaterialIndex(string material) { XDRPCExecutionOptions options = new XDRPCExecutionOptions(XDRPCMode.Title, this.Addresses.G_MaterialIndex); XDRPCStringArgumentInfo info = new XDRPCStringArgumentInfo(material); return ((XDevkit.IXboxConsole) xbc).ExecuteRPC<byte>(options, new XDRPCArgumentInfo[] { info }); }
public decimal getStat(string statName) { XDRPCExecutionOptions options = new XDRPCExecutionOptions(XDRPCMode.Title, this.Addresses.GetIntPlayerStat); XDRPCArgumentInfo<int> info = new XDRPCArgumentInfo<int>(0); XDRPCStringArgumentInfo info2 = new XDRPCStringArgumentInfo(statName); return ((XDevkit.IXboxConsole) this.xbc).ExecuteRPC<int>(options, new XDRPCArgumentInfo[] { info, info2 }); }
public static FIND_USER_INFO_RESPONSE XUserFindUser(XDevkit.IXboxConsole xbc, ulong YourXUID, string GamertagOrXUID) { var qwUserId = new XDRPCArgumentInfo<ulong>(YourXUID); XDRPCArgumentInfo qwFindId = null; XDRPCArgumentInfo szSenderName = null; //if (GamertagOrXUID is ulong) //{ // if (!XUID.IsOnlineXUID((ulong)GamertagOrXUID) && !XUID.IsTeamXUID((ulong)GamertagOrXUID)) throw new Exception("XDKUtilities.XUserFindUser: Invalid gamer online/team XUID specified."); // qwFindId = new XDRPCArgumentInfo<ulong>((ulong)GamertagOrXUID); //} //else if (GamertagOrXUID is string) { if (GamertagOrXUID.Length > 15) throw new Exception("XDKUtilities.XUserFindUser: Invalid Gamertag specified. It must be less than or equal to 15 characters in length."); szSenderName = new XDRPCStringArgumentInfo(GamertagOrXUID, Encoding.ASCII, ArgumentType.ByRef, 16); } if (qwFindId == null && szSenderName == null) throw new Exception("XDKUtilities.XUserFindUser: Invalid gamertag/XUID specified."); if (qwFindId == null) qwFindId = new XDRPCArgumentInfo<ulong>(0); if (szSenderName == null) szSenderName = new XDRPCStringArgumentInfo(string.Empty, Encoding.ASCII, ArgumentType.ByRef, 16); var cbResults = new XDRPCArgumentInfo<int>(0x18); var pResults = new XDRPCStructArgumentInfo<FIND_USER_INFO_RESPONSE>(new FIND_USER_INFO_RESPONSE(), ArgumentType.Out); var pXOverlapped = new XDRPCArgumentInfo<uint>(0); var returnVal = ((XDevkit.IXboxConsole)xbc).ExecuteRPC<uint>(XDRPCMode.Title, Tools.Addresses.g_XUserFindUserAddressDEV, qwUserId, qwFindId, szSenderName, cbResults, pResults, pXOverlapped); if (returnVal != 0x00000000) throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal); return pResults.Value; }
public short G_LocalizedStringIndex(string text) { XDRPCExecutionOptions options = new XDRPCExecutionOptions(XDRPCMode.Title, this.Addresses.G_LocalizedStringIndex); XDRPCStringArgumentInfo info = new XDRPCStringArgumentInfo(text); return ((XDevkit.IXboxConsole) xbc).ExecuteRPC<short>(options, new XDRPCArgumentInfo[] { info }); }
public static void XNotifyQueueUI(XboxConsole Console, uint XUserIndex, XNotifyUITypes XNotifyUIType, XNotifyUIPriorities XNotifyUIPriority, string XNotifyMessage) { if (XUserIndex > 3) throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid user index specified. It must be less than or equal to 3."); if (!Enum.IsDefined(typeof(XNotifyUITypes), XNotifyUIType)) throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid notification type specified."); if (!Enum.IsDefined(typeof(XNotifyUIPriorities), XNotifyUIPriority)) throw new Exception("XDKUtilities.XNotifyQueueUI: Invalid notification priority specified."); var dwType = new XDRPCArgumentInfo<uint>((uint)XNotifyUIType); var dwUserIndex = new XDRPCArgumentInfo<uint>(XUserIndex); var dwPriority = new XDRPCArgumentInfo<uint>((uint)XNotifyUIPriority); var pwszStringParam = new XDRPCStringArgumentInfo(XNotifyMessage, Encoding.BigEndianUnicode); var returnVal = Console.ExecuteRPC<uint>(XDRPCMode.Title, "xam.xex", 656, dwType, dwUserIndex, dwPriority, pwszStringParam); if (returnVal != 0x00000000) throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal); }
public static uint XexGetModuleHandle(XboxConsole Console, string ModuleName) { var name = new XDRPCStringArgumentInfo(ModuleName, Encoding.ASCII); var handle = new XDRPCArgumentInfo<uint>(0, ArgumentType.Out); var returnVal = Console.ExecuteRPC<uint>(XDRPCMode.Title, "xboxkrnl.exe", 405, name, handle); if (returnVal != 0x00000000) throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal); return handle.Value; }
public static void XamShowFofUI(XboxConsole Console, uint XUserIndex, ulong FriendXUID, string Gamertag) { if (XUserIndex > 3) throw new Exception("XDKUtilities.XamShowFofUI: Invalid user index specified. It must be less than or equal to 3."); if (!XUID.IsOnlineXUID(FriendXUID) && !XUID.IsTeamXUID(FriendXUID)) throw new Exception("XDKUtilities.XamShowFofUI: Invalid friend online/team XUID specified."); if (Gamertag.Length > 15) throw new Exception("XDKUtilities.XamShowFofUI: Invalid Gamertag specified. It must be less than or equal to 16 characters in length."); var dwUserIndex = new XDRPCArgumentInfo<uint>(XUserIndex); var xuidFriend = new XDRPCArgumentInfo<ulong>(FriendXUID); var pszGamertag = new XDRPCStringArgumentInfo(Gamertag, Encoding.ASCII); var returnVal = Console.ExecuteRPC<uint>(XDRPCMode.Title, "xam.xex", 1572, dwUserIndex, xuidFriend, pszGamertag); if (returnVal != 0x00000000) throw new COMException("Exception from HRESULT: " + string.Format("0x{0:X}", returnVal), (int)returnVal); }
public static uint Call(this XDevkit.IXboxConsole xbCon, uint address, params object[] arg) { if (((XDevkit.IXboxConsole) xbCon).SupportsRPC()) { bool flag = false; if (xbCon != null) { XDRPCExecutionOptions options = new XDRPCExecutionOptions(XDRPCMode.Title, address); XDRPCArgumentInfo[] args = new XDRPCArgumentInfo[arg.Length]; XDRPCArgumentInfo<float>[] infoArray2 = new XDRPCArgumentInfo<float>[arg.Length]; for (int i = 0; i < arg.Length; i++) { object obj2 = arg[i]; if (obj2 is string) { args[i] = new XDRPCStringArgumentInfo((string) obj2); } else if (obj2 is int) { args[i] = new XDRPCArgumentInfo<int>((int) obj2); } else if (obj2 is uint) { args[i] = new XDRPCArgumentInfo<uint>((uint) obj2); } else if (obj2 is float) { infoArray2[i] = new XDRPCArgumentInfo<float>((float) obj2); flag = true; } else if (obj2 is long) { args[i] = new XDRPCArgumentInfo<long>((long) obj2); } else if (obj2 is byte[]) { args[i] = new XDRPCArrayArgumentInfo<byte[]>((byte[]) obj2); } else if (obj2 is short) { args[i] = new XDRPCArgumentInfo<short>((short) obj2); } else if (obj2 is byte) { args[i] = new XDRPCArgumentInfo<byte>((byte) obj2); } else if (obj2 is char[]) { args[i] = new XDRPCArrayArgumentInfo<char[]>((char[]) obj2); } else if (obj2 is char) { args[i] = new XDRPCArgumentInfo<char>((char) obj2); } else { Console.WriteLine("Invalid Arg"); return 0; } } try { if (flag) { return (uint) ((XDevkit.IXboxConsole) xbCon).ExecuteRPC<float>(options, infoArray2); } return ((XDevkit.IXboxConsole) xbCon).ExecuteRPC<uint>(options, args); } catch (Exception) { return 0; } } return 0; } long[] argument = new long[9]; if (firstRan == 0) { byte[] buffer = new byte[4]; xbCon.DebugTarget.GetMemory(0x91c088ae, 4, buffer, out meh); xbCon.DebugTarget.InvalidateMemoryCache(true, 0x91c088ae, 4); Array.Reverse(buffer); bufferAddress = BitConverter.ToUInt32(buffer, 0); firstRan = 1; stringPointer = bufferAddress + 0x5dc; floatPointer = bufferAddress + 0xa8c; bytePointer = bufferAddress + 0xc80; xbCon.DebugTarget.SetMemory(bufferAddress, 100, nulled, out meh); xbCon.DebugTarget.SetMemory(stringPointer, 100, nulled, out meh); } if (bufferAddress == 0) { byte[] buffer2 = new byte[4]; xbCon.DebugTarget.GetMemory(0x91c088ae, 4, buffer2, out meh); xbCon.DebugTarget.InvalidateMemoryCache(true, 0x91c088ae, 4); Array.Reverse(buffer2); bufferAddress = BitConverter.ToUInt32(buffer2, 0); } stringPointer = bufferAddress + 0x5dc; floatPointer = bufferAddress + 0xa8c; bytePointer = bufferAddress + 0xc80; int num4 = 0; int index = 0; foreach (object obj3 in arg) { if (obj3 is byte) { byte[] buffer3 = (byte[]) obj3; argument[index] = BitConverter.ToUInt32(buffer3, 0); } else if (obj3 is byte[]) { byte[] buffer4 = (byte[]) obj3; xbCon.DebugTarget.SetMemory(bytePointer, (uint) buffer4.Length, buffer4, out meh); argument[index] = bytePointer; bytePointer += (uint) (buffer4.Length + 2); } else if (obj3 is float) { byte[] buffer5 = BitConverter.GetBytes(float.Parse(Convert.ToString(obj3))); xbCon.DebugTarget.SetMemory(floatPointer, (uint) buffer5.Length, buffer5, out meh); argument[index] = floatPointer; floatPointer += (uint) (buffer5.Length + 2); } else if (obj3 is float[]) { byte[] dst = new byte[12]; int num6 = 0; for (num6 = 0; num6 <= 2; num6++) { byte[] buffer7 = new byte[4]; Buffer.BlockCopy((Array) obj3, num6 * 4, buffer7, 0, 4); Array.Reverse(buffer7); Buffer.BlockCopy(buffer7, 0, dst, 4 * num6, 4); } xbCon.DebugTarget.SetMemory(floatPointer, (uint) dst.Length, dst, out meh); argument[index] = floatPointer; floatPointer += 2; } else if (obj3 is string) { byte[] buffer8 = Encoding.ASCII.GetBytes(Convert.ToString(obj3)); xbCon.DebugTarget.SetMemory(stringPointer, (uint) buffer8.Length, buffer8, out meh); argument[index] = stringPointer; string str = Convert.ToString(obj3); stringPointer += (uint) (str.Length + 1); } else { argument[index] = Convert.ToInt64(obj3); } num4++; index++; } byte[] data = getData(argument); xbCon.DebugTarget.SetMemory(bufferAddress + 8, (uint) data.Length, data, out meh); byte[] bytes = BitConverter.GetBytes(num4); Array.Reverse(bytes); xbCon.DebugTarget.SetMemory(bufferAddress + 4, 4, bytes, out meh); Thread.Sleep(0); byte[] array = BitConverter.GetBytes(address); Array.Reverse(array); xbCon.DebugTarget.SetMemory(bufferAddress, 4, array, out meh); Thread.Sleep(50); byte[] buffer12 = new byte[4]; xbCon.DebugTarget.GetMemory(bufferAddress + 0xffc, 4, buffer12, out meh); xbCon.DebugTarget.InvalidateMemoryCache(true, bufferAddress + 0xffc, 4); Array.Reverse(buffer12); return BitConverter.ToUInt32(buffer12, 0); }
public static uint Call(this XDevkit.IXboxConsole xbCon, uint address, params object[] arg) { if (((XDevkit.IXboxConsole)xbCon).SupportsRPC()) { bool flag = false; if (xbCon != null) { XDRPCExecutionOptions options = new XDRPCExecutionOptions(XDRPCMode.Title, address); XDRPCArgumentInfo[] args = new XDRPCArgumentInfo[arg.Length]; XDRPCArgumentInfo <float>[] infoArray2 = new XDRPCArgumentInfo <float> [arg.Length]; for (int i = 0; i < arg.Length; i++) { object obj2 = arg[i]; if (obj2 is string) { args[i] = new XDRPCStringArgumentInfo((string)obj2); } else if (obj2 is int) { args[i] = new XDRPCArgumentInfo <int>((int)obj2); } else if (obj2 is uint) { args[i] = new XDRPCArgumentInfo <uint>((uint)obj2); } else if (obj2 is float) { infoArray2[i] = new XDRPCArgumentInfo <float>((float)obj2); flag = true; } else if (obj2 is long) { args[i] = new XDRPCArgumentInfo <long>((long)obj2); } else if (obj2 is byte[]) { args[i] = new XDRPCArrayArgumentInfo <byte[]>((byte[])obj2); } else if (obj2 is short) { args[i] = new XDRPCArgumentInfo <short>((short)obj2); } else if (obj2 is byte) { args[i] = new XDRPCArgumentInfo <byte>((byte)obj2); } else if (obj2 is char[]) { args[i] = new XDRPCArrayArgumentInfo <char[]>((char[])obj2); } else if (obj2 is char) { args[i] = new XDRPCArgumentInfo <char>((char)obj2); } else { Console.WriteLine("Invalid Arg"); return(0); } } try { if (flag) { return((uint)((XDevkit.IXboxConsole)xbCon).ExecuteRPC <float>(options, infoArray2)); } return(((XDevkit.IXboxConsole)xbCon).ExecuteRPC <uint>(options, args)); } catch (Exception) { return(0); } } return(0); } long[] argument = new long[9]; if (firstRan == 0) { byte[] buffer = new byte[4]; xbCon.DebugTarget.GetMemory(0x91c088ae, 4, buffer, out meh); xbCon.DebugTarget.InvalidateMemoryCache(true, 0x91c088ae, 4); Array.Reverse(buffer); bufferAddress = BitConverter.ToUInt32(buffer, 0); firstRan = 1; stringPointer = bufferAddress + 0x5dc; floatPointer = bufferAddress + 0xa8c; bytePointer = bufferAddress + 0xc80; xbCon.DebugTarget.SetMemory(bufferAddress, 100, nulled, out meh); xbCon.DebugTarget.SetMemory(stringPointer, 100, nulled, out meh); } if (bufferAddress == 0) { byte[] buffer2 = new byte[4]; xbCon.DebugTarget.GetMemory(0x91c088ae, 4, buffer2, out meh); xbCon.DebugTarget.InvalidateMemoryCache(true, 0x91c088ae, 4); Array.Reverse(buffer2); bufferAddress = BitConverter.ToUInt32(buffer2, 0); } stringPointer = bufferAddress + 0x5dc; floatPointer = bufferAddress + 0xa8c; bytePointer = bufferAddress + 0xc80; int num4 = 0; int index = 0; foreach (object obj3 in arg) { if (obj3 is byte) { byte[] buffer3 = (byte[])obj3; argument[index] = BitConverter.ToUInt32(buffer3, 0); } else if (obj3 is byte[]) { byte[] buffer4 = (byte[])obj3; xbCon.DebugTarget.SetMemory(bytePointer, (uint)buffer4.Length, buffer4, out meh); argument[index] = bytePointer; bytePointer += (uint)(buffer4.Length + 2); } else if (obj3 is float) { byte[] buffer5 = BitConverter.GetBytes(float.Parse(Convert.ToString(obj3))); xbCon.DebugTarget.SetMemory(floatPointer, (uint)buffer5.Length, buffer5, out meh); argument[index] = floatPointer; floatPointer += (uint)(buffer5.Length + 2); } else if (obj3 is float[]) { byte[] dst = new byte[12]; int num6 = 0; for (num6 = 0; num6 <= 2; num6++) { byte[] buffer7 = new byte[4]; Buffer.BlockCopy((Array)obj3, num6 * 4, buffer7, 0, 4); Array.Reverse(buffer7); Buffer.BlockCopy(buffer7, 0, dst, 4 * num6, 4); } xbCon.DebugTarget.SetMemory(floatPointer, (uint)dst.Length, dst, out meh); argument[index] = floatPointer; floatPointer += 2; } else if (obj3 is string) { byte[] buffer8 = Encoding.ASCII.GetBytes(Convert.ToString(obj3)); xbCon.DebugTarget.SetMemory(stringPointer, (uint)buffer8.Length, buffer8, out meh); argument[index] = stringPointer; string str = Convert.ToString(obj3); stringPointer += (uint)(str.Length + 1); } else { argument[index] = Convert.ToInt64(obj3); } num4++; index++; } byte[] data = getData(argument); xbCon.DebugTarget.SetMemory(bufferAddress + 8, (uint)data.Length, data, out meh); byte[] bytes = BitConverter.GetBytes(num4); Array.Reverse(bytes); xbCon.DebugTarget.SetMemory(bufferAddress + 4, 4, bytes, out meh); Thread.Sleep(0); byte[] array = BitConverter.GetBytes(address); Array.Reverse(array); xbCon.DebugTarget.SetMemory(bufferAddress, 4, array, out meh); Thread.Sleep(50); byte[] buffer12 = new byte[4]; xbCon.DebugTarget.GetMemory(bufferAddress + 0xffc, 4, buffer12, out meh); xbCon.DebugTarget.InvalidateMemoryCache(true, bufferAddress + 0xffc, 4); Array.Reverse(buffer12); return(BitConverter.ToUInt32(buffer12, 0)); }