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 


About "Custom Type"

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

Joined: 11 Mar 2015
Posts: 136

PostPosted: Sat Aug 29, 2015 6:19 pm    Post subject: About "Custom Type" Reply with quote

non-native speakers


the following code:
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]


CE 6.4 release--------CE 6.4 Svn How uses?



01.png
 Description:
 Filesize:  16.12 KB
 Viewed:  17901 Time(s)

01.png


Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Aug 29, 2015 7:22 pm    Post subject: Reply with quote

Right-click the 'Value Type' dropdown (4 Bytes)
Select 'Define new custom type (Auto Assembler)'
Paste
Back to top
View user's profile Send private message
xxhehe
Expert Cheater
Reputation: 0

Joined: 11 Mar 2015
Posts: 136

PostPosted: Sat Aug 29, 2015 7:39 pm    Post subject: Reply with quote

Zanzer wrote:
Right-click the 'Value Type' dropdown (4 Bytes)
Select 'Define new custom type (Auto Assembler)'
Paste


Select 'Define new custom type (Auto Assembler)'
Only CE5.6.1 feasible



01.png
 Description:
 Filesize:  17.52 KB
 Viewed:  17885 Time(s)

01.png



02.png
 Description:
 Filesize:  17.12 KB
 Viewed:  17885 Time(s)

02.png



03.png
 Description:
 Filesize:  18.65 KB
 Viewed:  17886 Time(s)

03.png


Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Aug 29, 2015 7:58 pm    Post subject: Reply with quote

In version 6.4, right-click the dropdown.
Do NOT expand or open the dropdown.
Just right-click it.



CustomType.png
 Description:
 Filesize:  7.79 KB
 Viewed:  17875 Time(s)

CustomType.png


Back to top
View user's profile Send private message
xxhehe
Expert Cheater
Reputation: 0

Joined: 11 Mar 2015
Posts: 136

PostPosted: Sat Aug 29, 2015 8:07 pm    Post subject: Reply with quote

Zanzer wrote:
In version 6.4, right-click the dropdown.
Do NOT expand or open the dropdown.
Just right-click it.


Vielen Dank.


find the problem:

search any value.Found Show All:Zero



01.png
 Description:
 Filesize:  312.86 KB
 Viewed:  17859 Time(s)

01.png



01.png
 Description:
 Filesize:  16.33 KB
 Viewed:  17871 Time(s)

01.png


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