using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace PS4_GTA
{
public class RPC
{
private uint nativeArgBase = 0;
private uint hookAddress = 0;
private uint rpcCodeAddress = 0;
private List<uint> nativeFuncList = new List<uint>();
private List<UInt64> nativeHashList = new List<UInt64>();
public RPC()
{
nativeArgBase = 0x2DCD820;
hookAddress = 0xD8F480;
rpcCodeAddress = 0x5046D0;
}
public void InitRPC()
{
WriteU64(nativeArgBase, 0);
byte[] hook = new byte[] {
0x55, //push rbp
0xE8, 0x4A, 0x52, 0x77, 0xFF, //call 0x5046D0
0x5D, //pop rbp
0xC3, //retn
};
byte[] asmx86 = new byte[] {
0x55, //push rbp
0x41, 0x52, //push r10
0x53, //push rbx
0x49, 0xC7, 0xC2, 0x20, 0xD8, 0xDC, 0x02, //mov r10, 0x2DCD820
0x49, 0x8B, 0x1A, //mov rbx, [r10]
0x48, 0x85, 0xDB, //test rbx, rbx
0x74, 0x1A, //jz 0x5046FB
0x48, 0xC7, 0xC7, 0x30, 0xD8, 0xDC, 0x02, //mov rdi, 0x2DCD830
0xFF, 0xD3, //call rbx
0x49, 0xC7, 0xC2, 0x20, 0xD8, 0xDC, 0x02, //mov r10, 0x2DCD820...