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 


Pointer into Assembly Script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
xcynic
Cheater
Reputation: 0

Joined: 28 Aug 2010
Posts: 31

PostPosted: Sun Mar 06, 2011 7:58 pm    Post subject: Pointer into Assembly Script Reply with quote

Hello again, so I've been learning (some) ASM and starting to get a hang of it.

BUT, when I tried to hack a game that used pointers, my whole world turned upside down, well I guess it did since Im somewhat drunk writing this...

Okey, back to the point..

I've written this script, but everytime I restart the game, the adress that I want changes (i've got the pointer), but I need to put that pointer in my script. Well. here is my script!

Code:

[ENABLE]
alloc(newmem,2048) //2kb should be enough
alloc(lol,1000)
label(returnhere)
label(originalcode)
label(exit)

mov ecx,50 // For the loop (?)

newmem:
jmp lol
lol:
push eax
mov eax,1000
mov [022aa95c],eax //Sets the value to 1000.
push eax
mov [022aa95c],eax
loop lol
jmp exit

originalcode:
add al,dh

exit:
jmp returnhere

022aa95c:
db 90 90 90
jmp newmem
nop
returnhere:


[DISABLE]
dealloc(newmem,2048)
022aa95c:
db 00 00 64 40 3F 6C EA 8A 53 C9 2C 37 00 00 00 00 //The value when //the char is halfway down the screen




BUT, everywhere there is 022aa95c, the pointer should be..

The pointer is:
"icytower15.exe"+000F8E38
(offsets)
1st: cc
2nd: 40
3rd: 124
4th: 8
4th: 0

Thanks alot, and answers will be really appreciated! Very Happy
Soz for my poor english..
Back to top
View user's profile Send private message
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5627

PostPosted: Sun Mar 06, 2011 8:28 pm    Post subject: Reply with quote

This code doesn't make any sense. Smile

You are injecting a code on a memory address (which is not even a code) to change the memory address itself. And even if it would be a code, you just push eax too times, mess up ecx, use integer instead of hex and loop what? Lol. Smile

You will laugh at this when you will not be drunk.

_________________
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
xcynic
Cheater
Reputation: 0

Joined: 28 Aug 2010
Posts: 31

PostPosted: Sun Mar 06, 2011 8:35 pm    Post subject: Reply with quote

Geri wrote:
This code doesn't make any sense. Smile

You are injecting a code on a memory address (which is not even a code) to change the memory address itself. And even if it would be a code, you just push eax too times, mess up ecx, use integer instead of hex and loop what? Lol. Smile

You will laugh at this when you will not be drunk.


It does work as wanted tho ;O

SEC and Ill put it on youtube :3

Here is a less "fkd up" version of the script (still somewhat drunk Very Happy)

Code:

[ENABLE]
alloc(newmem,2048) //2kb should be enough
alloc(lol,1000)
label(returnhere)
label(originalcode)
label(exit)

newmem:
jmp lol

lol:
push eax
mov eax,1000
mov [022396F4],eax //Sets the value to 1000.
jmp exit

originalcode:
add al,dh

exit:
jmp returnhere

022396F4:
db 90 90 90
jmp newmem
nop
returnhere:


[DISABLE]
dealloc(newmem,2048)
022396F4:
db 00 00 64 40 3F 6C EA 8A 53 C9 2C 37 00 00 00 00


Youtube: youtube . com / watch ? v=LZYdqY3Y9CE

BTW:
How do you change the value of an adress with a script?
(Isnt that what im doing here: mov [022396F4],eax
Change the value of the adress 022396F4 to eax (1000) ahhh, I changed it to 3e8 now :p
Back to top
View user's profile Send private message
-DEViL-
Expert Cheater
Reputation: 3

Joined: 21 Apr 2007
Posts: 185

PostPosted: Mon Mar 07, 2011 5:28 am    Post subject: Reply with quote

Code:
alloc(cave,256)
label(invalid)

cave:
pushad
mov eax,["icytower15.exe"+000F8E38]
or eax,eax
je short invalid//check if it's valid pointer or not
mov eax,[eax+cc]
or eax,eax
je short invalid
mov eax,[eax+40]
or eax,eax
je short invalid
mov eax,[eax+124]
or eax,eax
je short invalid
mov eax,[eax+8]
or eax,eax
je short invalid
mov [eax],#100//your desired value
invalid:
push #50//50 ms timeout before loop it again
call sleep
popad
jmp cave

createthread(cave)
Back to top
View user's profile Send private message
xcynic
Cheater
Reputation: 0

Joined: 28 Aug 2010
Posts: 31

PostPosted: Mon Mar 07, 2011 8:43 am    Post subject: Reply with quote

[eXtreme] wrote:
Code:
alloc(cave,256)
label(invalid)

cave:
pushad
mov eax,["icytower15.exe"+000F8E38]
or eax,eax
je short invalid//check if it's valid pointer or not
mov eax,[eax+cc]
or eax,eax
je short invalid
mov eax,[eax+40]
or eax,eax
je short invalid
mov eax,[eax+124]
or eax,eax
je short invalid
mov eax,[eax+8]
or eax,eax
je short invalid
mov [eax],#100//your desired value
invalid:
push #50//50 ms timeout before loop it again
call sleep
popad
jmp cave

createthread(cave)


Not quite sure how to use this, also, what is the 'or' function?
Back to top
View user's profile Send private message
xcynic
Cheater
Reputation: 0

Joined: 28 Aug 2010
Posts: 31

PostPosted: Wed Mar 09, 2011 5:55 am    Post subject: Reply with quote

bump..
Back to top
View user's profile Send private message
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5627

PostPosted: Wed Mar 09, 2011 9:19 am    Post subject: Reply with quote

This is how you can follow pointers in ASM. Check the static base, save the address at the first offset. Then again and again until you reach the value. But first you need to figure out what is the pointer path to your value. (The "or" will check that eax is not 0 but some valid pointer.)
_________________
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 -> 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