|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Beck123x How do I cheat? Reputation: 0
Joined: 24 Sep 2021 Posts: 5
|
Posted: Fri Oct 22, 2021 10:54 am Post subject: Create new memory region |
|
|
Hello. Can someone help me.
For example, after I modify the bytes of this adress " 143DDA009" from
"A3 0C 57 FC F3 0F 11 83 A8 00 00 00 F3 44 0F 11 83 B0 00 00 00 40 84 FF" to " A3 0C 57 FC E9 EE 5F 21 FC 90 90 90 F3 44 0F 11 83 B0 00 00 00 40 84 FF"
Some instruction from that memory adress will jump to an adress like 13FFF0000 which doesn't exist yet and if I am searching it all bytes will be ?? ?? ?? ?? .......
Can you tell me, how to write a C# code to allocate a memory Region that starts at 13FFF0000 and ends at 13FFFFFFF for example?
I want to build my hack to be an EXE and then to protect it, but this doesn't matter.
The problem is that I wrote the code in C# to patch those bytes, but 13FFF000 adress doesn't exist.
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1587
|
Posted: Fri Oct 22, 2021 10:15 pm Post subject: Re: Create new memory region |
|
|
Beck123x wrote: | Some instruction from that memory adress will jump to an adress like 13FFF0000 which doesn't exist yet |
it's unclear what you meant here.
anyhow, allocating memory regions externally should be done by a call to VirtualAllocEx; and since you mentioned it contains a jump instruction to that region then make sure to set page protection to be executable and readable.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
Beck123x How do I cheat? Reputation: 0
Joined: 24 Sep 2021 Posts: 5
|
Posted: Wed Oct 27, 2021 4:59 am Post subject: Re: Create new memory region |
|
|
OldCheatEngineUser wrote: | Beck123x wrote: | Some instruction from that memory adress will jump to an adress like 13FFF0000 which doesn't exist yet |
it's unclear what you meant here.
anyhow, allocating memory regions externally should be done by a call to VirtualAllocEx; and since you mentioned it contains a jump instruction to that region then make sure to set page protection to be executable and readable. |
Look what I mean :
Code: |
namespace xFUT22
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public Mem m = new Mem();
private byte[] orgBytes;
private void form1_load(object sender, EventArgs e)
{
if (!backgroundWorker1.IsBusy)
backgroundWorker1.RunWorkerAsync();
}
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
while (true)
{
int pID = m.GetProcIdFromName("FIFA22"); //Gaseste ID-ul jocului
bool openProc = false; //verifica daca procesul e gasit
if (pID > 0)
{
openProc = m.OpenProcess(pID); //Porneste procesul, daca exista
procID.Invoke((MethodInvoker)delegate
{
procID.Text = pID.ToString();
});
}
if (openProc) // De aici incepe modificarea memoriei
{
procID.Invoke((MethodInvoker)delegate
{
openLabel.Text = "OPEN";
openLabel.ForeColor = Color.Green;
});
if (HiddenTF.Checked)
m.WriteMemory("0x143dda009", "bytes", "A3 0C 57 FC E9 EE 5F 21 FC 90 90 90 F3 44 0F 11 83 B0 00 00 00 40 84 FF");
else
m.WriteMemory("0x143dda009", "bytes", "A3 0C 57 FC F3 0F 11 83 A8 00 00 00 F3 44 0F 11 83 B0 00 00 00 40 84 FF");
if (HiddenTF.Checked)
m.WriteMemory("0x13FFF0000", "bytes", "F3 0F 11 9B B1 00 00 00 E9 08 A0 DE 03 00 00 00 00 00 00 00 00 00 00 00");
else
m.WriteMemory("0x13FFF0000", "bytes", "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00");
|
I have this C# using Memory64.dll.
The problem is that the adress 13FFF0000 DOESN'T exist, in FIFA process, untill I create it with CT, but I want to do it from my program.
I can allocate memory to FIFA process with CheatEngine, so I can write bytes to 13FFF0000, but i dont know how to do that with C#.
Can you explain?
|
|
Back to top |
|
|
atom0s Moderator Reputation: 199
Joined: 25 Jan 2006 Posts: 8518 Location: 127.0.0.1
|
Posted: Wed Oct 27, 2021 8:17 pm Post subject: |
|
|
Calling alloc() in CE is just calling VirtualAllocEx as needed with the proper params based on what you tell CE to do.
_________________
- Retired. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|