Raised This Month: $87 Target: $400
 21% 

SmxViewer - Disassemble .smx files


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BAILOPAN
Join Date: Jan 2004
Old 09-05-2014 , 23:51   SmxViewer - Disassemble .smx files
Reply With Quote #1

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:


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

Last edited by BAILOPAN; 09-05-2014 at 23:53.
BAILOPAN is offline
Sreaper
髪を用心
Join Date: Nov 2009
Location: Source SDK
Old 09-06-2014 , 04:23   Re: SmxViewer - Disassemble .smx files
Reply With Quote #2

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.
__________________

Last edited by Sreaper; 09-06-2014 at 04:23.
Sreaper is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 09-07-2014 , 16:50   Re: SmxViewer - Disassemble .smx files
Reply With Quote #3

This is awesome!
Now for a way to export or to save output as a log, xml or txt.
__________________
Maxximou5 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 09-08-2014 , 20:37   Re: SmxViewer - Disassemble .smx files
Reply With Quote #4

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
__________________

Last edited by Peace-Maker; 09-08-2014 at 20:42.
Peace-Maker is offline
BAILOPAN
Join Date: Jan 2004
Old 09-09-2014 , 03:22   Re: SmxViewer - Disassemble .smx files
Reply With Quote #5

@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.
__________________
egg

Last edited by BAILOPAN; 09-09-2014 at 03:24.
BAILOPAN is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 09-15-2014 , 09:31   Re: SmxViewer - Disassemble .smx files
Reply With Quote #6

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.
Attached Files
File Type: smx x.smx (2.9 KB, 428 views)
__________________

Last edited by GoD-Tony; 09-15-2014 at 09:34.
GoD-Tony is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 09-18-2014 , 10:35   Re: SmxViewer - Disassemble .smx files
Reply With Quote #7

Quote:
Originally Posted by GoD-Tony View Post
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.
__________________
Peace-Maker is offline
Afonia
Member
Join Date: Jun 2014
Old 12-07-2014 , 08:31   Re: SmxViewer - Disassemble .smx files
Reply With Quote #8

Hello, tell me who does not know how a person to run this program ??
Afonia is offline
Send a message via Skype™ to Afonia
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode