public static void Enable(PS4API ps4, ulong?nativeTableAddress = null) { if (nativeTableAddress != null) { Address.NativeTable = nativeTableAddress.Value; } PS4 = ps4; _DestroyAll(); byte[] freeSpace = BitConverter.GetBytes(_freeSpace); byte[] exeSpace = BitConverter.GetBytes(_executableSpace); #region rpcOpcode byte[] rpc_code = { 0x55, 0x48, 0x89, 0xE5, 0x53, 0x48, 0xBB, freeSpace[0], freeSpace[1], freeSpace[2], freeSpace[3], freeSpace[4], freeSpace[5], freeSpace[6], freeSpace[7], 0x48, 0x83, 0x3B, 0x00, 0x74, 0x1F, 0x48, 0x8D, 0x7B, 0x08, 0x48, 0x8D, 0x83, 0xA8, 0x00, 0x00, 0x00, 0x48, 0x89, 0x07, 0x48, 0x8D, 0x43, 0x28, 0x48, 0x89, 0x47, 0x10, 0xFF, 0x13, 0x48, 0xC7, 0x03, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x48, 0x31, 0xC0, 0x48, 0x89, 0xEC, 0x5D, 0xC3 }; #endregion PS4.SetMemory(_executableSpace, rpc_code); PS4.SetMemory(NativeAddress(0xF25D331DC2627BBC) + 0x9, new byte[] { 0x51, 0x48, 0xB9, exeSpace[0], exeSpace[1], exeSpace[2], exeSpace[3], exeSpace[4], exeSpace[5], exeSpace[6], exeSpace[7], 0xFF, 0xD1, 0x59, 0x48, 0x83, 0xC4, 0x08, 0x5B, 0x5D, 0xC3 }); }
public API() { PS4 = new PS4API(); }