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 


need some ce assembler help

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

Joined: 09 Aug 2011
Posts: 245

PostPosted: Tue Aug 09, 2011 10:14 am    Post subject: need some ce assembler help Reply with quote

trying to move to assembler for the pointers and the like... read through the help files and some tutorials. but to be honest i'm more of a monkey see monkey does type Razz
could someone just post a whole assembler table script for ... i dont know xp pinball ball counter disabler or simple a check if ball count is below 3 set it to 3
preferably with cmp or test function so i can see how it SUPPOSE to work >_> just as simple as it gets so i can stop banging my head on the table. tried running thru scripted tables but all the scripts are either aobscans which seems even more complicated or they are so.... uhh... far beyond the starting level i don't understand most of the script anyway.
if u got no pinball underhand the opcode instruction for ball reduction is
pinball.exe+175b7 mov[esi+00000146],eax
much appreciate the help in advance.
Back to top
View user's profile Send private message
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5627

PostPosted: Tue Aug 09, 2011 10:53 pm    Post subject: Reply with quote

Here is one for the CE 6.1 tutorial, step 2. If the value is lower than 50, it will be set back to 100.

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
pushfd   //save flags
cmp [ebx+00000458],(int)50
jg originalcode        //jump if 50 is greater than your value
mov [ebx+00000458],(int)100

originalcode:
popfd   //load flags
mov eax,[ebx+00000458]

exit:
jmp returnhere

"Tutorial-i386.exe"+21138:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"Tutorial-i386.exe"+21138:
mov eax,[ebx+00000458]
//Alt: db 8B 83 58 04 00 00

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
HiSaZuL
Expert Cheater
Reputation: 6

Joined: 09 Aug 2011
Posts: 245

PostPosted: Sat Aug 13, 2011 8:58 pm    Post subject: Reply with quote

either im really bad at this or there's a single tiny mistake i keep making and don't see it. what you gave me as template isn't much different from what i was doing yet still doesn't work
using same pinball
code for ball change is "PINBALL.EXE"+175b7 Code:mov [esi+00000146],eax
so the table script is this:

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
pushfd
cmp [esi+00000146],(int)3
jg originalcode
mov [esi+00000146],(int)3

originalcode:
popfd
mov [esi+00000146],eax

exit:
jmp returnhere

"PINBALL.EXE"+175B7:
jmp newmem
nop
returnhere:




[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"PINBALL.EXE"+175B7:
mov [esi+00000146],eax
//Alt: db 89 86 46 01 00 00
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sat Aug 13, 2011 9:08 pm    Post subject: Reply with quote

instead of comparing against and writing to [esi+00000146] you must compare and write to eax

That is because the original code does:
mov [esi+00000146],eax

so whatever value you write to esi+146 will immediately get overwritten with the value in eax

so either do:
Code:

cmp eax,(int)3
jg originalcode
mov eax,(int)3


or

Code:

mov [esi+00000146],(int)3
popfd
jmp exit

_________________
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
HiSaZuL
Expert Cheater
Reputation: 6

Joined: 09 Aug 2011
Posts: 245

PostPosted: Sat Aug 13, 2011 9:42 pm    Post subject: Reply with quote

thanks geri and dark byte
after some tweaking and explanations i got 2 scripts that do work. and as i thought before i was just making some core dumb mistake of changing esi+146 just so it would get changed by eax anyway -_-

i do have an odd question
in this version:
Code:

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
pushfd
cmp eax,(int)3
jg originalcode
mov eax,(int)3

originalcode:
popfd
mov [esi+00000146],eax

exit:
jmp returnhere

"PINBALL.EXE"+175B7:
jmp newmem
nop
returnhere:




[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"PINBALL.EXE"+175B7:
mov [esi+00000146],eax
//Alt: db 89 86 46 01 00 00

i don't see how it would ever identify under which conditions to change eax so would i be right to guess that this is a bad way to do it(even tho for something as small as pinball it does work fine as far as i tested it)... since eax could be used by something else along the way?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sat Aug 13, 2011 10:05 pm    Post subject: Reply with quote

At that spot in the code injection eax will ALWAYS contain the number of balls

The original code was
Code:

mov [esi+00000146],eax

meaning: Set the number of balls to the value stored in eax

if eax would contain a random value, it would set the number of balls to a random value, so no, it's balls only

Of course, in other parts of the code if you do a injection at other locations eax will of course be something completly different

_________________
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
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5627

PostPosted: Sun Aug 14, 2011 1:20 am    Post subject: Reply with quote

EAX is not changing until you see an instruction which is actually changing it.
Like mov eax,[xxxxxxxx] or something like that. Registers are not changing by themselves, only when you see a code which is changing it. (Except for EIP which is always pointing to the next instruction thus it is changing by itself without any specific instruction.)

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
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 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