4Bytes * 8 Scan Type for Cheat Engine
Thanks Cheat Engine Forums!
4Bytes * 8 Scan Type for Cheat Engine Posted on: 06/02/2013 2:15pm
Quote Post
TIM the Enchanter
Level: 1
ADR Info

Start a new scan.
Rightclick on the value type and choose "Define new custom Type (Auto Assembler)".  Yup, right click on the actual drop down selection box.

Replace everything in the box that pops up with the following code.
 

alloc(TypeName,256) 
alloc(ByteSize,4) 
alloc(ConvertRoutine,1024) 
alloc(ConvertBackRoutine,1024) 

TypeName: 
db 'Flash *8 type',0 

ByteSize: 
dd 4 

//The convert routine should hold a routine that converts the data to an nteger (in eax) 
//function declared as: stdcall int ConvertRoutine(unsigned char *input); 

//Note: Keep in mind that this routine can be called by multiple threads at the same time. 

ConvertRoutine: 
[32-bit] 
push ebp 
mov ebp,esp 
push ecx 
mov ecx,[ebp+8] 
[/32-bit] 

//at this point ecx contains the address where the bytes are stored 

//put the bytes into the eax register 
mov eax,[ecx] //second fun fact, addressing with 32-bit registers doesn't work in 64-bit, it becomes a 64-bit automatically (most of the time) 
shr eax,3 //shift right by 3 bits (divide by 8) 

//and now exit the routine 
[64-bit] 
ret 
[/64-bit] 
[32-bit] 
pop ecx 
pop ebp 
ret 4 
[/32-bit] 

//The convert back routine should hold a routine that converts the given integer back to a row of bytes (e.g when the user wats to write a new value) 
//function declared as: stdcall void ConvertBackRoutine(int i, unsigned char *output); 
ConvertBackRoutine: 
[32-bit] 
push ebp 
mov ebp,esp 
push edx //save the registers 
push ecx 
mov edx,[ebp+0c] 
mov ecx,[ebp+08] 
[/32-bit] 

//at this point edx contains the address to write the value to 
//and ecx contains the value 

push eax 
push edx 


mov edx,[edx] //edx now contains the original value 
and edx,7 //only save the first 3 bits 

mov eax,ecx //eax gets the user input value 
shl eax,3 //shift left by 3 bits (multiply by 8) 
or eax,edx //add the bits of the original value 

pop edx 
mov [edx],eax //write the new value into the old value 
pop eax 

[64-bit] 
//everything is back to what it was, so exit 
ret 
[/64-bit] 

[32-bit] 
//cleanup first 
pop ecx 
pop edx 
pop ebp 
ret 8 
[/32-bit] 



From now on cheat engine can handle the flash *8 type, even if you restart.
It will also be included in the "All" type scan. (can be excluded in settings) 





Everything's coming up KongHack!

"When you know nothing matters, the universe is yours" ~Rick Sanchez

RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 06/02/2013 4:51pm
Quote Post
[insert tagline here]

Ohhh, nice. This will definitely save some time.




RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 06/02/2013 5:58pm
Quote Post
The Laziest Man on KongHack

damn, if i knew cheat engine could do such a thing, i probably would have made something similar (similar because it wouldnt be as good as this)

what else does cheat engine do that im unaware of?!




RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 06/02/2013 8:13pm
Quote Post
Your resident no-lifer

Hmm, this was from the cheat engine forums, wasn't it?
I remember seeing it there a while back. It's a good idea to have it here too though.




Check out this guy, I always laugh at him.

If any of my AoBs are broken, send me a PM and I''ll see what I can do.

RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 06/03/2013 1:13am
Quote Post
TIM the Enchanter
Level: 1
ADR Info

Yup, straight from the forums.  Credited in the topic description. :P





Everything's coming up KongHack!

"When you know nothing matters, the universe is yours" ~Rick Sanchez

RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 07/31/2013 11:56am
Quote Post
The Laziest Man on KongHack

i think i'm just gonna bump this since its both useful and interesting. plus i needed it just now so why not




RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 07/31/2013 3:09pm
Quote Post

It would be nice to also have a 4b * 8 + 6. Can someone do it? (I'm kind of a noob in such things :-( )

RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 07/31/2013 3:12pm
Quote Post
The Laziest Man on KongHack

this already does that. it could be 4b*8+anything and itll still work




RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 07/31/2013 4:24pm
Quote Post
thenewcomer Posted on: 07/31/2013 11:12am

this already does that. it could be 4b*8+anything and itll still work



Nice. I knew that I am a n00b. I still need to learn a lot :)

RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 07/31/2013 5:06pm
Quote Post

Nice share, TIM! Added it to CE, this will be pretty convenient!




MOEKTAZO!
RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 05/11/2014 10:04am
Quote Post

nice thanks for this :)

RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 05/27/2014 8:52pm
Quote Post

So what it does is: you type basic number you see and it attempts it *8 and *8+6, right? Does it also check the base value you input or you should search for *1 separately?

RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 05/28/2014 2:39am
Quote Post
The Laziest Man on KongHack
Hentaicheg Posted on: 05/27/2014 4:52pm

So what it does is: you type basic number you see and it attempts it *8 and *8+6, right? Does it also check the base value you input or you should search for *1 separately?


yes it automatically does *8 and *8+6. and no it doesnt check base value, you have to do that the normal way
 




RE: 4Bytes * 8 Scan Type for Cheat Engine Posted on: 12/01/2015 12:32am
Quote Post

This will make some of the games so much faster to search