AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   SmxViewer - Disassemble .smx files (https://forums.alliedmods.net/showthread.php?t=247653)

BAILOPAN 09-05-2014 22:51

SmxViewer - Disassemble .smx files
 
Hi All,

I've released a quick new tool for viewing .smx files. You may recall Lysis, an experimental project to fully decompile plugins. That was a deeply complicated project, so I decided to try something much simpler. SmxViewer does basic reverse engineering of plugins, showing you the layout of the file and providing disassembly of its code stream.

You can get the source code here or download binaries here. You probably need .NET Framework 4.5 or something.

I would like to have a command-line version of this tool eventually.

Screenshot:
http://users.alliedmods.net/~dvander/smxdasm5.png

Link to God-Tony's web version of Lysis: http://godtony.mooo.com/lysis/

Sreaper 09-06-2014 03:23

Re: SmxViewer - Disassemble .smx files
 
Very cool. Thanks for sharing!

My only suggestion would be for the ability to drag an .smx file over the program window to open it rather than using the file menu.

Maxximou5 09-07-2014 15:50

Re: SmxViewer - Disassemble .smx files
 
This is awesome!
Now for a way to export or to save output as a log, xml or txt.

Peace-Maker 09-08-2014 19:37

Re: SmxViewer - Disassemble .smx files
 
Nice tool! I like how you list all local variables used in a function in that .dbg.symbols tree.
You could parse the myinfo, __ext_, __pl_ and __version pubvar structs and display them as well as showing the full function's signature in the .dbg.symbols and .dbg.natives function list, plus listing the right tags and dims for globals.

Some links to navigate through the different items would ease the use of it too. Like showing the debug info you show in the .dbg.symbols section at the top of the .code dump of a function. (signature, file and line)

You could also build a list of called functions in the .code section :)

BAILOPAN 09-09-2014 02:22

Re: SmxViewer - Disassemble .smx files
 
@Peace-Maker: Yeah, I could hardcode in logic to decode those structs - that's a good idea. At the time I started this I figured I'd have enough RTTI to decode them without special handling. I ended up bailing on RTTI though (for now), so hardcoding seems reasonable.

My GUI-fu isn't that great. I mostly used ILdasm to guide the design. More cross-linking would be good though.

GoD-Tony 09-15-2014 08:31

Re: SmxViewer - Disassemble .smx files
 
1 Attachment(s)
This is neat!

I'm attaching a closed-source plugin that I commonly used to test with Lysis, and at the moment it causes SmxViewer to crash. May be worth a look if you're curious.

Peace-Maker 09-18-2014 09:35

Re: SmxViewer - Disassemble .smx files
 
Quote:

Originally Posted by GoD-Tony (Post 2198936)
This is neat!

I'm attaching a closed-source plugin that I commonly used to test with Lysis, and at the moment it causes SmxViewer to crash. May be worth a look if you're curious.

That's the same silly trick that haunted Lysis in the beginning. The last null terminator in the stringtable got removed (replaced by 0x01). That leads to garbage in the name of the last section.

Afonia 12-07-2014 07:31

Re: SmxViewer - Disassemble .smx files
 
Hello, tell me who does not know how a person to run this program ??


All times are GMT -4. The time now is 03:52.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.