Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Convert Assemble script from cheat engine to c# windows form

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
MrHacker45
How do I cheat?
Reputation: 0

Joined: 10 May 2014
Posts: 7
Location: USA

PostPosted: Sat May 10, 2014 4:00 am    Post subject: Convert Assemble script from cheat engine to c# windows form Reply with quote

Hi, please say me how to convert AutoAssembleScript from Cheatengine to C# Windows Form Application.
Button1 Enable
Button2 Disable
Please answer to my question.
Thanks
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Sat May 10, 2014 2:05 pm    Post subject: Reply with quote

Convert the ASM you are writing to bytes (look at the disassembler view of the functions you are writing to etc.) then use WriteProcessMemory to write that new memory.

You can look into the ManagedFASM project as well to write direct ASM.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
MrHacker45
How do I cheat?
Reputation: 0

Joined: 10 May 2014
Posts: 7
Location: USA

PostPosted: Sun May 11, 2014 4:47 am    Post subject: Opcode Reply with quote

atom0s wrote:
Convert the ASM you are writing to bytes (look at the disassembler view of the functions you are writing to etc.) then use WriteProcessMemory to write that new memory.

You can look into the ManagedFASM project as well to write direct ASM.


ok i will look for it, thanks.
here is my second question, please answer. Smile
i use ProcessMemoryReader Class for create opcode trainer using cheat engine memory viewer and VS C# 2010 Express.
It wants ADDRESS + OPCODES.
All codes working and trainer works too.
but when i restart game address changes and program dont work Sad
example: fld dword eax+04 address 0x57874842 + opcodes D9 90 04 40
0x57874842 address changing at every start.
how can i make it freeze before new version of game will be released?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Sun May 11, 2014 2:30 pm    Post subject: Re: Opcode Reply with quote

MrHacker45 wrote:
atom0s wrote:
Convert the ASM you are writing to bytes (look at the disassembler view of the functions you are writing to etc.) then use WriteProcessMemory to write that new memory.

You can look into the ManagedFASM project as well to write direct ASM.


ok i will look for it, thanks.
here is my second question, please answer. Smile
i use ProcessMemoryReader Class for create opcode trainer using cheat engine memory viewer and VS C# 2010 Express.
It wants ADDRESS + OPCODES.
All codes working and trainer works too.
but when i restart game address changes and program dont work Sad
example: fld dword eax+04 address 0x57874842 + opcodes D9 90 04 40
0x57874842 address changing at every start.
how can i make it freeze before new version of game will be released?


I do not use whatever class you are referring to so I do not know the code specifics for it.

If the game addresses are changing you need to learn how to handle DMA / code shifting. You can use pattern scanning (AoB) to locate the function that you need to alter and such as well. Browse through the tutorial sections, there are a handful of tutorials for each of these topics.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
MrHacker45
How do I cheat?
Reputation: 0

Joined: 10 May 2014
Posts: 7
Location: USA

PostPosted: Sun May 11, 2014 3:12 pm    Post subject: Re: Opcode Reply with quote

atom0s wrote:
MrHacker45 wrote:
atom0s wrote:
Convert the ASM you are writing to bytes (look at the disassembler view of the functions you are writing to etc.) then use WriteProcessMemory to write that new memory.

You can look into the ManagedFASM project as well to write direct ASM.


ok i will look for it, thanks.
here is my second question, please answer. Smile
i use ProcessMemoryReader Class for create opcode trainer using cheat engine memory viewer and VS C# 2010 Express.
It wants ADDRESS + OPCODES.
All codes working and trainer works too.
but when i restart game address changes and program dont work Sad
example: fld dword eax+04 address 0x57874842 + opcodes D9 90 04 40
0x57874842 address changing at every start.
how can i make it freeze before new version of game will be released?


I do not use whatever class you are referring to so I do not know the code specifics for it.

If the game addresses are changing you need to learn how to handle DMA / code shifting. You can use pattern scanning (AoB) to locate the function that you need to alter and such as well. Browse through the tutorial sections, there are a handful of tutorials for each of these topics.


i will try.
pointer scan dont helping on that.
i wanna make freeze memory viewer address for c# program.
i use ProcessMemoryReader class and codes are:

using System.Diagnostics;

namespace Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
ProcessMemoryReaderLib.ProcessMemoryReader preader = new ProcessMemoryReaderLib.ProcessMemoryReader();
}

private void button1_Click(object sender, EventArgs e)
{
ProcessMemoryReaderLib.ProcessMemoryReader preader = new ProcessMemoryReaderLib.ProcessMemoryReader();
System.Diagnostics.Process[] myprocess = System.Diagnostics.Process.GetProcessesByName("SniperEliteV2");
if (myprocess.Length == 0)
{
MessageBox.Show("Run the game before running this!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
Application.Exit();
}
if (myprocess.Length != 0)
{
preader.ReadProcess = myprocess[0];
preader.OpenProcess();
int byteswritten;
byte[] memory = { 0x90, 0x90 };
long memaddress = 0x00DF63F6;
preader.WriteProcessMemory((IntPtr)memaddress, memory, out byteswritten);

}
}
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Sun May 11, 2014 10:14 pm    Post subject: Reply with quote

If the values are not staying 0x90 0x90 you need to continue writing them in a thread or timer.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
MrHacker45
How do I cheat?
Reputation: 0

Joined: 10 May 2014
Posts: 7
Location: USA

PostPosted: Mon May 12, 2014 8:03 am    Post subject: trainer Reply with quote

atom0s wrote:
If the values are not staying 0x90 0x90 you need to continue writing them in a thread or timer.


for taking address i open memory viewer and right click on fstp dword ptr edi+04 for example --> go to address --> copy address.
at every start that address changing, not opcodes 0x90 0x90 etc etc
only the address of fstp dword ptr edi+04
if i go to pointer scan fstp dword ptr edi+04 and i found pointer address BASE address changing again Sad

Look this please, sorry for taking your time
h tt p: // ww w6 9.zippyshare . co m/ v/ 12639805/ file .ht ml
opcodes not changing, only address
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Mon May 12, 2014 1:28 pm    Post subject: Reply with quote

If the address changes then you either need to:
A. Look for a base pointer to that code area.
B. Scan for the pattern of bytes to that instruction using an AoB scanner.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
MrHacker45
How do I cheat?
Reputation: 0

Joined: 10 May 2014
Posts: 7
Location: USA

PostPosted: Tue May 13, 2014 8:20 am    Post subject: address Reply with quote

atom0s wrote:
If the address changes then you either need to:
A. Look for a base pointer to that code area.
B. Scan for the pattern of bytes to that instruction using an AoB scanner.


i scanned for pointer for BASE address, but its not working for memory viewer address.
when i find address and right click -> what writes this address to memory, nothing i get Sad
AoB Scan ? i not tried this method.
if its not hard can you send me video tutorial for aob scan ?
Back to top
View user's profile Send private message
MrHacker45
How do I cheat?
Reputation: 0

Joined: 10 May 2014
Posts: 7
Location: USA

PostPosted: Wed May 14, 2014 10:16 am    Post subject: trainer Reply with quote

atom0s wrote:
If the address changes then you either need to:
A. Look for a base pointer to that code area.
B. Scan for the pattern of bytes to that instruction using an AoB scanner.


i know why address changes every time.
Its DMA address and the problem is that.
Have you any methods make DMA address freeze?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites