Advertisement
Dev

JRPC - XMessagebox

Dev
May 2nd, 2017
39,010
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. #UDT
  2. #UltimateDevTeam
  3.  
  4.  
  5. string[] Buttons = new string[] { textBoxX4.Text };
  6. int selectedIndex = comboBox1.SelectedIndex;
  7. int focusButton = 0;
  8. int flags = 0;
  9. XShowMessageBoxUI(selectedIndex, textBoxX2.Text, textBoxX3.Text, Buttons.Length, Buttons, focusButton, flags);
  10.  
  11.  
  12. ///FUCKTION
  13.  
  14. private void XShowMessageBoxUI(int UserIndex, string Title, string Text, int NumButtons, string[] Buttons, int FocusButton, int Flags)
  15. {
  16. uint address = jtag.ResolveFunction("xam.xex", 0x2ca);
  17. uint num2 = 0x81b01480;
  18. byte[] data = new byte[6];
  19. byte[] buffer2 = new byte[0x1c];
  20. byte[] buffer3 = new byte[0];
  21. byte[] buffer4 = new byte[0];
  22. byte[] buffer5 = new byte[0];
  23. uint num3 = 0;
  24. uint num4 = 0;
  25. uint num5 = 0;
  26. uint num6 = 0;
  27. jtag.SetMemory(num2, data);
  28. jtag.SetMemory(num2 + 6, buffer2);
  29. uint num7 = 0x22;
  30. byte[] buffer6 = Title.ToWCHAR();
  31. byte[] buffer7 = Text.ToWCHAR();
  32. if (NumButtons >= 1)
  33. {
  34. buffer3 = Buttons[0].ToWCHAR();
  35. }
  36. if (NumButtons >= 2)
  37. {
  38. buffer4 = Buttons[1].ToWCHAR();
  39. }
  40. if (NumButtons == 3)
  41. {
  42. buffer5 = Buttons[2].ToWCHAR();
  43. }
  44. jtag.SetMemory(num2 + num7, buffer6);
  45. uint num8 = num2 + num7;
  46. num7 += (uint)buffer6.Length;
  47. jtag.SetMemory(num2 + num7, buffer7);
  48. uint num9 = num2 + num7;
  49. num7 += (uint)buffer7.Length;
  50. if (NumButtons >= 1)
  51. {
  52. jtag.SetMemory(num2 + num7, buffer3);
  53. num3 = num2 + num7;
  54. num7 += (uint)buffer3.Length;
  55. }
  56. if (NumButtons >= 2)
  57. {
  58. jtag.SetMemory(num2 + num7, buffer4);
  59. num4 = num2 + num7;
  60. num7 += (uint)buffer4.Length;
  61. }
  62. if (NumButtons == 3)
  63. {
  64. jtag.SetMemory(num2 + num7, buffer5);
  65. num5 = num2 + num7;
  66. num7 += (uint)buffer5.Length;
  67. }
  68. if (NumButtons >= 1)
  69. {
  70. jtag.WriteInt32(num2 + num7, (int)num3);
  71. num6 = num2 + num7;
  72. num7 += 4;
  73. }
  74. if (NumButtons >= 2)
  75. {
  76. jtag.WriteInt32(num2 + num7, (int)num4);
  77. num7 += 4;
  78. }
  79. if (NumButtons == 3)
  80. {
  81. jtag.WriteInt32(num2 + num7, (int)num5);
  82. num7 += 4;
  83. }
  84. object[] arguments = new object[] { UserIndex, num8, num9, NumButtons, num6, FocusButton, Flags, num2, num2 + 0x1c };
  85. jtag.Call<uint>(address, arguments);
  86. byte[] buffer8 = new byte[num7];
  87. jtag.SetMemory(num2, buffer8);
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement