Raised This Month: $222 Target: $400
 55% 

amxxdump


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sawce
The null pointer exception error and virtual machine bug
Join Date: Oct 2004
Old 03-21-2007 , 12:03   amxxdump
Reply With Quote #1

This is just a small tool I was working on for personal use, but I figured a couple people may find it useful so I made it a bit easier to use and got it to build on Windows.

This program is an amxmodx specific plugin disassembler. Specifically, plugins built with amxmodx 1.5+ (previous ones will not load).

This is meant to compliment Wraith's disassembler, not entirely replace it. My data section examination implementation is very poor (did it in about 5 minutes...), so it's better to use his for that regard. His also makes pseudo labels for jumps, this one just displays the address. Also his is in a nice GUI, this one is entirely console driven.

The biggest difference between the two disassemblers is this one was built with the sole purpose of looking up the plugin's symbol table. The symbol table (to my knowledge) was not in Small when Wraith made his disassembler.

For disassembly the symbol table is complete hax. You can view a variables exact offsets, the scope of the variable, the name, tags for it, dimensions, etc.

General usage:

As stated previous, this is ENTIRELY console driven. There is no GUI for this.

amxxdump file.amxx [ parameters ]

Here are the switches:

Quote:
-a Suppress address locations in most places.
-c Suppress all comments from disassembly.
-x List all public and stock functions and their parameters.
-n List all natives used by the plugin.
-D <name> Disassemble the provided function.
-d Disassemble the entire code section of the script.
-s Show all symbols.
-m Show required modules.
-r <name> Search for all references to the named function.
-R <name> Search for all references to the named native.
-v <val> Display the value of an address in the data section.
-A <size> In addition to -v, this dumps <size> many cells as an output.
-V <val> Display the value of an address in the data section as a string.
-F <val> Display the value of an address in the data section as a float.
-f Output the name of every file that included code (stocks).
-l Output line number and filename as comment on BREAK ops.
-j Output jump labels as comments for jumps, switches and case tables.
-e Attempt to estimate some data from push.c/const.pri ops. Do not read data literally.
-E Attempt to list parameters of standard native calls. Not all will work, requires include files.
-N Suppresses the variable dimensions, tags, and default values in the native guesser output. Implies -E
-g List all global variables. A pawn compiler bug will make not-used stock variables display as well.
-h Hide parameter numbers and addresses, useful for comparing with diffs.

-! Display this program's license.

-? This help screen.
For example, to output the assembly of the "cmdSlap" function in admincmd.amxx, I would do:

amxxdump admincmd.amxx -D cmdSlap

As stated before, the data viewing portion is very poorly implemented.

Just a warning, I haven't extensively tested the Windows build. The vast majority of my work has been with the Linux version.

v1.01, now with (hopefully!) less crashes on Windows, -f and -l (run with -? for details)
v1.02, now with -c (suppress all comments) and -j (generate pseudo labels for jumps)
v1.3, now with better Windows support, very basic SourceMod plugin support, and now with native parsing.
v1.3.1, fixed a few small quirks with the native parser
v1.3.2, fixed a few more quirks with the native parser
v1.4, more tweaks to the native parser, added comments to STACK and FILL ops, added comment when a variable scope begins. Added -g.
v1.5, fixed some crashes with the native parser on some awkward natives. Added -h, -N, and -A (consult -? for more details). Changed most address output (except for the disassembly itself) to be 0x%08X instead of 0x%X. Changed -m to give better output.
Attached Files
File Type: zip amxxdump.zip (424.7 KB, 11665 views)

Last edited by sawce the snail; 04-01-2007 at 10:33.
sawce is offline
BAILOPAN
Join Date: Jan 2004
Old 03-21-2007 , 13:59   Re: amxxdump
Reply With Quote #2

sawce how is it you're so awesome
__________________
egg
BAILOPAN is offline
Old 04-11-2013, 06:45
alphaads
This message has been deleted by Arkshine. Reason: Spambot
sawce
The null pointer exception error and virtual machine bug
Join Date: Oct 2004
Old 03-21-2007 , 14:29   Re: amxxdump
Reply With Quote #4

i no rite
sawce is offline
Old 02-21-2011, 03:31
safira218
This message has been deleted by Exolent[jNr]. Reason: Spambot
Juba_PornBorn1
BANNED
Join Date: Feb 2007
Location: Caracas
Old 03-21-2007 , 19:09   Re: amxxdump
Reply With Quote #6

I left a post searching for a plugin manager and here it is!!! Well not as I figured it would be but a benning of a program that may be very useful in a near future adding extra tools and make instead of console only a all full acess program with buttons, decomplilers etc...

http://forums.alliedmods.net/showthread.php?t=52770

This litle program is sweeetttt! I tryed some of the options and it's really easy to get the offsets of plugins I got, as well as natives! Hope someone develops this even further and take it to what I meant in the post link!

Last edited by Juba_PornBorn1; 03-21-2007 at 21:28.
Juba_PornBorn1 is offline
Old 02-25-2011, 13:54
safira18
This message has been deleted by Seta00. Reason: Spambot
sawce
The null pointer exception error and virtual machine bug
Join Date: Oct 2004
Old 03-22-2007 , 09:51   Re: amxxdump
Reply With Quote #8

Updated to v1.02:

Added:
-c Suppress all comments.
-j Generate pseudo labels for jumps.

v1.01 (old change log):

Hopefully fixed crashing on Windows.

Added:
-l Display file & line comments on BREAK opcodes.
-f Display all files that generated code (included stocks).

@Juba_PornBorn1 this is nothing like your request...

Last edited by sawce the snail; 03-22-2007 at 09:53.
sawce is offline
Jheshka
Senior Member
Join Date: Dec 2005
Old 03-23-2007 , 00:23   Re: amxxdump
Reply With Quote #9

Marry me?
__________________
James
Jheshka is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-23-2007 , 01:28   Re: amxxdump
Reply With Quote #10

Quote:
Originally Posted by Jheshka View Post
Marry me?
Deviance is offline
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 09:59.


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