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 


what does this code

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
hawlong
Newbie cheater
Reputation: 0

Joined: 24 Jan 2022
Posts: 10

PostPosted: Fri Feb 04, 2022 6:50 am    Post subject: what does this code Reply with quote

hello ,
Please help me, what does this code do?

Code:
registersymbol(black)
alloc(black,12)

newmem:
mov esi,ecx
cmp [black],1
jne code



And what is the name of this programming language?
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Fri Feb 04, 2022 7:01 am    Post subject: Reply with quote

It's auto assembler.
Code:

registersymbol(black)   // register a label for reference within the table
alloc(black,12)         // allocate 12 bytes of memory

newmem:
mov esi,ecx             // move the value held in ecx into esi
cmp [black],1           // move the value 1 to the address black
jne code                // if the value is not equal to 1 then jump to the code section (original instructions)
Back to top
View user's profile Send private message
hawlong
Newbie cheater
Reputation: 0

Joined: 24 Jan 2022
Posts: 10

PostPosted: Fri Feb 04, 2022 7:47 am    Post subject: Reply with quote

thanks for reply ,

[black] Is this variable?
where is the value of this variable?
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Fri Feb 04, 2022 8:20 am    Post subject: Reply with quote

black is the user defined reference. In essence, yes it's a variable.

You can view the address/value of black (if the script activates) by navigating to the Lua engine window (ctrl, alt, shift + L) then typing the following code:
Code:

print('The address of black is : ' .. getAddressSafe('black') .. '\n' .. The value of black is : ' .. readInteger('black'))
Back to top
View user's profile Send private message
hawlong
Newbie cheater
Reputation: 0

Joined: 24 Jan 2022
Posts: 10

PostPosted: Fri Feb 04, 2022 8:44 am    Post subject: Reply with quote

Sorry, I did not understand
Why is this variable[black] being compared when it has no value?
Is it possible to convert this code to c plus?
Code:
registersymbol(black)
alloc(black,12)



what does this function do?
Code:
reassemble()
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Fri Feb 04, 2022 11:35 am    Post subject: Reply with quote

hawlong wrote:
Sorry, I did not understand
Why is this variable[black] being compared when it has no value?
Is it possible to convert this code to c plus?
Code:
registersymbol(black)
alloc(black,12)



what does this function do?
Code:
reassemble()


I have no idea how you obtained the code so I can't tell you why. I'm not proficient in C++ so I can't advise on that matter. In regard to your next question.
Code:

reassemble()


Reassembles the given address, writing at it's declared location. It acts like a smart readMem. It reads the address's instruction, re-evaluates any addresses, reassembles the address's instruction at its declared location. This is great for code changes in game updates, as well as polymorphic code, or any code that has polymorphic like behaviour.

Note: It doesn't accept labels, just registered symbols and addresses.

For more information you can view the wiki.
Back to top
View user's profile Send private message
hawlong
Newbie cheater
Reputation: 0

Joined: 24 Jan 2022
Posts: 10

PostPosted: Fri Feb 04, 2022 4:57 pm    Post subject: Reply with quote

Thanks so much , <3
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