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 


Instruction to Opcode?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source
View previous topic :: View next topic  
Author Message
KryziK
Expert Cheater
Reputation: 3

Joined: 16 Aug 2009
Posts: 199

PostPosted: Wed Dec 09, 2009 6:27 pm    Post subject: Instruction to Opcode? Reply with quote

I am working on a trainer for Step 7, and it requires that you inject code to add by 2 instead of dec by 1.

I was wondering, how do I get the bytes of the address to jump to, created by VirtualAllocEx.

What I mean is, when VirtualAllocEx returns an address, how do I turn that into a jump opcode to that address with just bytes?

E9 98 5F 26 02 makes "JMP 026C0000" in this case, but how do I change that address to the returned one. I know how to write, I just need to know how to convert the address into those bytes.

Then, in the new memory, I have the code to increase by 2, and I need to make a jump back to where I was.

In AA this would be:

Code:
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(exit)

0045A063:
jmp newmem
returnhere:

newmem:
add blahblah(i have this somewhere)

exit:
jmp returnhere


I need to convert the address of newmem into a jump command in bytes, so it can be written. It seems that 0045A069 seems to be the returnhere address every time, so I can get that myself.

If I am being unclear please let me know. I have tried learning assembly by itself numerous times, but cannot get my head around it. This all makes sense, I am just not sure how to apply it.

Thanks! Very Happy

EDIT:: I just learned that what I want to do is an Instruction to Opcode/Byte conversion, but I cannot find any converters ANYWHERE. There is one on this forum from 2007 but I don't exactly get what to do with it. I'll check again though.

RE-EDIT:: Yeah, I have no clue how to use that, and I don't think I'll be able to. Any other ideas? Is there somewhere that I can learn how to manually convert...or is that extremely hard or anything?
Back to top
View user's profile Send private message
KryziK
Expert Cheater
Reputation: 3

Joined: 16 Aug 2009
Posts: 199

PostPosted: Tue Dec 15, 2009 3:53 pm    Post subject: Reply with quote

Bump.

Dead forum?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Tue Dec 15, 2009 4:42 pm    Post subject: Reply with quote

check assemblerunit.pas
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
KryziK
Expert Cheater
Reputation: 3

Joined: 16 Aug 2009
Posts: 199

PostPosted: Tue Dec 15, 2009 4:47 pm    Post subject: Reply with quote

Hey, thanks for the reply, but I don't have a SVN client installed, nor do I have a Pascal interpreter. Is there an area I am overlooking on the forum where it is residing besides SVN?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Tue Dec 15, 2009 5:23 pm    Post subject: Reply with quote

http://cheatengine.org/downloads.php

just download "Cheat Engine 5.5 sourcecode"

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
KryziK
Expert Cheater
Reputation: 3

Joined: 16 Aug 2009
Posts: 199

PostPosted: Tue Dec 15, 2009 5:35 pm    Post subject: Reply with quote

Oh, forgot about the "main site" Smile

Oh, my....where to begin... xD... I've never used Pascal before.
This may be a lost cause if it needs conversion.
Back to top
View user's profile Send private message
KryziK
Expert Cheater
Reputation: 3

Joined: 16 Aug 2009
Posts: 199

PostPosted: Tue Dec 22, 2009 2:27 pm    Post subject: Reply with quote

I have decided that I may be willing to convert it.

Problem is, I don't know pascal. Could you please go through the main parts and tell me what they mean so I will have an idea on how to do them in another language?

Thanks!

Edit: sorry for the DP, I don't know if editing a message sends a notification like a new post does.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source 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