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 


[C#] Converting

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Sun Feb 14, 2010 8:44 am    Post subject: [C#] Converting Reply with quote

Im trying to convert an address (0055E2A4) to 43 df 15 00
Just like CE memory viewer reads it.
0040035C - e9 43 df 15 00 - jmp 0055e2a4

Im able to write the bytes but cant convert it first.
I need to do this because of different versions, the address i jump to changes.
Also the app scans for the address first so i wouldnt know where to jump untill its found and converted.

Thanks if anyone can help

_________________
Back to top
View user's profile Send private message
Deltron Z
Expert Cheater
Reputation: 1

Joined: 14 Jun 2009
Posts: 164

PostPosted: Mon Feb 15, 2010 2:52 am    Post subject: Reply with quote

Little Endian - it's actually 0x0015DF43. since a JMP is relative, add the address 0x0040035C to it plus 5 bytes. (length of a far-jump instruction)
Back to top
View user's profile Send private message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Mon Feb 15, 2010 7:59 am    Post subject: Reply with quote

I'll still need to conver it first. 0040035C is just a codecave.
Hex to array of bytes but everything i try just just seperates it.

_________________
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Mon Feb 15, 2010 8:38 am    Post subject: Reply with quote

Pingo wrote:
I'll still need to conver it first. 0040035C is just a codecave.
Hex to array of bytes but everything i try just just seperates it.


Code:
DWORD converted = (*(DWORD*)0x0040035C)+0x0040035C+5;


or ReadProcessMemory if you would like:

Code:
DWORD converted = 0;
ReadProcessMemory(hProcess, 0x0040035C, &converted , 4, NULL);
converted += 0x0040035C + 5;


In CE, go to the memory address in Hex View, right click-> Display Type-> 4 Byte Hex
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 programming 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