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 


Guide to writing hard to read and unmaintainable ASM scripts

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

Joined: 08 Oct 2015
Posts: 486

PostPosted: Wed Apr 27, 2016 10:13 pm    Post subject: Guide to writing hard to read and unmaintainable ASM scripts Reply with quote

1. Write script's logic in C first.
2. Use gcc to output the assembly.
3. Alternatively, use Compiler Explorer to generate assembly with level 3 optimization.
3. Copy assembly to CE.
4. Remove unnecessary instructions such as initialization of main() etc.
5. PROFIT! And learn nothing much along the way, instead of honing your assembly writing skillset by doing it manually. Plus having tons of numbered labels that make reading the script an equally hard lesson in reverse engineering.

Was writing a relatively long and complex script recently and debugging the logic in assembler was just hellishly confusing. So decided to draft in C first and translate to assembler manually after that, if only to make understanding the code's logic easier. Then I decided that repeatedly translating, even if bit by bit each time was a chore, so I decided to just rip the assembly from a compiled source. Though it barely works out, it's probably in the list of "How NOT to program in assembly" Laughing
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