[RELEASE] Auto-ASM Assist

Share Your Own Code Samples With the World

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

[RELEASE] Auto-ASM Assist

Postby CoMPMStR » Sat Mar 12, 2011 6:28 am

Image

Hey guys, here's another small program I made awhile back to help while using MHS. I've been upgrading my PC recently and had some troubles with new harddrives, but now that everything is working I finally had time to continue moving forward. I reinstalled some games to see how they run on my new rig, and since they are running great I decided to attempt hacking them once more. That's how I stumbled upon this buried treasure I had hidden deep within the bowels of my computer.

I remember before I made this program, I would always have to keep writing redundant code each time I created a new auto asm script. You can only write 'FULLACCESS', 'ALLOC', 'LABEL', 'DEALLOC', '[ENABLE]', '[DISABLE]' so many times without going crazy or at least thinking some kind of crazy thoughts. Sooo... since it still proves to be very useful to me I decided to clean it up and release it to the public.

Download:
http://www.mediafire.com/compmstr
*You need to have .NET Framework v3.5 installed in order for this program to work.

______________________________________________________

First off, the program is self explanatory-unless you don't know a thing about ASM-so there won't be a readme. I will, however, post a very simple tutorial using the weapon condition hack I found in Fallout: New Vegas. This will be my way of helping you all, who need it, learn to use this program properly. Here goes...

As with some of my other tutorials, I won't go into finding the hack or even finding the location in the disassembler. You should already know how to do that if you want to use a program like this, because this won't work magic for those who don't know anything about MHS's auto asm feature or even ASM in general.

First thing you do, after you've found what accesses the address, is highlight and copy the entire contents of the piece of code you want to overwrite.
Image

Since it's all copied to the clipboard (and I mean ALL), it's time to open my program and paste it into the box labeled 'Source Contents'. This box will contain the disassembly of the original code, which means this is the code that will be used when the auto-asm entry is DISABLED.
Image

Of course, you can't just leave the pasted code in the box as it is and expect it to work. A little clean-up work needs to be done. All you need in the box is the disassembly. The address of the first line needs to go into the box labeled 'Source Address', and the box labeled 'Source Length' needs to have how many bytes the source content uses. In this example, the source content only uses 6 bytes; but must contain no less than 5 bytes. This should also be the part where you modify the 'Cave Contents' so when the auto-asm entry is ENABLED, it will do what you want.
Image

Now if you know anything about ASM, and you're looking at the above picture like "Where does 'dword ptr [value]' come from?", continue reading. I created this program to allow you to add extra memory allocations directly from the program using the button labeled 'Alloc Mem'. When you click the button it will show you all the extra allocations you have that will be included in the auto asm script when you click 'Generate'. When you get this window, simply click 'Add' and a new window will appear allowing you to enter the allocation details. The box labeled 'Data' should only contain a string of bytes, doesn't need to include spaces and also doesn't need to be an even length as a '0' will be prefixed if the length is uneven. Ticking the checkbox will allow you to generate byte strings from any given numerical data type, if strings are important I will add it as needed. NOTE: You can leave the 'Data' box empty if you want to use the memory allocation for storage or write only purposes.
Image

If you've made it this far, and you already have your extra memory allocations added, there's another feature I'd like to point out. If you have the game running, you can automatically get the module+offset combination of any given address by clicking the button 'Get Static'. Upon the first time clicking this button, you will be prompted with the window seen below. From here you just choose the game process, the address is already entered according to the main window, then just click 'Find'. If you click the 'Get Static' button a subsequent time, you will be prompted with a message box asking whether you'd like to choose a new process or not. You will, however, need to click the 'Get Static' button each time you enter a new address but before you click 'Generate'.
Image

If you've done everything correctly, you should be able to click 'Generate' and have the resulting output work flawlessly (assuming your asm code is in order).
Image

This program also automatically adds label declarations according to your 'Cave Contents' code. If it finds a line that ends with a colon (:), it will automatically add that as a new label when you click 'Generate' so you can just use it like normal without worrying about if it's declared already or not-just define it with a colon and use it.

*This program does not do any type of error checking done by MHS. It does not know the difference between correct and incorrect ASM code. It also does not replace MHS's assembler/disassembler.


And as always, all questions, comments, suggestions are welcome. Enjoy! :D
Image

______________________________________________________
My Utilities:
CT <-> LSSAVE Converter
LSS Visual Dialog Designer
.NET Trainer Helper Library

~Whether you think you can or you think you can't, you're right.

L. Spiro wrote:In my left hand is a red pill. If you take it I will show you the truth. I lost my right hand in the war, so I’m afraid you’re stuck with the red pill.
User avatar
CoMPMStR
(P)ot (I)n (M)y (P)ipe
 
Posts: 451
Joined: Thu Mar 06, 2008 7:50 am
Location: Best Place

Re: [RELEASE] Auto-ASM Assist

Postby L. Spiro » Sat Mar 12, 2011 3:42 pm

And as always, good work.

I may put some time into MHS when I retire.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan


Return to Code Submissions

Who is online

Users browsing this forum: No registered users and 0 guests

cron