Decompiling Plugins (.amx/x -> .sma)
Topic: How do you decode a closed source plugin back to source code?
This is a hot topic for some people, and I've been asked about it many times. After the Sputnik53 incident, I decided to publically reveal how it's done. Currently, I'm writing a multipart-article on the SourceMod devlog. This is not for the faint of heart, and you should step into this with knowledge of C and processor memory layout. I'll update this post as I complete more pieces of the tutorial. Part 1 - Introduction to the VM Part 2 - Basic Disassembly Part 3 - Decoding Branches Part 4 - Local procedures, variables, and multi-branches Part 5 - Optimization Part 6 - Stocks, floats, ternary operators, and for loops Part 7 - Multi-part if statements, multi-dimensional arrays |
Part 4 added.
|
Nice, very very nice.
p.s. Whats the answer to the bonus question :lol: |
Part 5 added.
Worth noting here too: Wraith's AMXReader now supports AMX Mod X 1.60 plugins. |
w00teh!!!
Baileh finally decided to make mine life happy again ^^ |
It is also worth noting that the disassembler isn't idiot proof. If you have a problem or request you can find me in #adminmod on gamesurge.
|
Part 6 added.
|
Part 7 added.
|
Re: Decompiling Plugins (.amx/x -> .sma)
when i open AmxReader gives me that error "The Application failed initialize properly (0xc0000135). Click on OK to terminate the application" :((
Pls help me :( |
Re: Decompiling Plugins (.amx/x -> .sma)
Nice gj BAIL
|
Re: Decompiling Plugins (.amx/x -> .sma)
Quote:
|
I remember when you showed me how to do this before, bail. :D
|
Re: Decompiling Plugins (.amx/x -> .sma)
what is this ???
Code:
PROC plugin_init |
Re: Decompiling Plugins (.amx/x -> .sma)
If you have no clue what that is, then don't even bother until you gain more experience in programming.
|
Re: Decompiling Plugins (.amx/x -> .sma)
Quote:
|
Re: Decompiling Plugins (.amx/x -> .sma)
I read but for nothing
Give a dictionary for those codes |
Re: Decompiling Plugins (.amx/x -> .sma)
I have a question..How do you determine what an array was called?
|
Re: Decompiling Plugins (.amx/x -> .sma)
Quote:
I wish Bail would finish this. It looks almost done, but I've already read the entire thing and it seems to be missing just a few things. |
Re: Decompiling Plugins (.amx/x -> .sma)
Aww I was hoping you could..
Oh well. pretty complicated this is.. took me 30 mins of reading then re-writing the decompile and all I got was the #defines, the #includes, and the whole plugin_init. |
Re: Decompiling Plugins (.amx/x -> .sma)
Quote:
Anyway, please BAIL finish this. I actually beta tested krot@l's hack mod on his test server, but that was before I ever had any clue on what amx mod or amxx was. |
Re: Decompiling Plugins (.amx/x -> .sma)
For AMX Mod X plugins 1.50+ and higher, all symbol names are kept in a symbol database. Unfortunately, Wraith's Disassembler does not support this yet.
|
Re: Decompiling Plugins (.amx/x -> .sma)
|
Re: Decompiling Plugins (.amx/x -> .sma)
Yea that would be good.
|
Re: Decompiling Plugins (.amx/x -> .sma)
Here is the latest version I have.
It's the source and binaries, binaries are in Release. http://cybermind.user.stfunoob.com/m...sassembler.zip |
Re: Decompiling Plugins (.amx/x -> .sma)
As the original link is dead, I suggest to prevent it in future you upload it to AMXX.
|
Re: Decompiling Plugins (.amx/x -> .sma)
Well i also made a link for the file on my webhost(So if the old link dies This will jump in)
http://www.daghost.xionize.com/files...sassembler.zip |
Re: Decompiling Plugins (.amx/x -> .sma)
|
Re: Decompiling Plugins (.amx/x -> .sma)
I will talk to Wraith.
|
Re: Decompiling Plugins (.amx/x -> .sma)
Wraith,'s site is back up
|
Re: Decompiling Plugins (.amx/x -> .sma)
help plz with decompile superheromysql.amxx
|
Re: Decompiling Plugins (.amx/x -> .sma)
Quote:
|
Re: Decompiling Plugins (.amx/x -> .sma)
Hi.. can someone help me please. I was trying to decode this but... this plugin isn't simple.... Here is...
http://server.united-games.cz/?q=dis...d.zip&download Here are functions of plugin... (It is Czech plugin and i'll translate functions to eng...) PS: I asked creator of ugcmd to get me it in sma but he can't :( Commands: CONSOLE: * ughelp - help all commands * ugmaplist - somethink like maplist * ugkick - ID player, you can kick he by ID * ugkick #ID - kick player by ID * ugkick nick - kick player by nick * ugsay - when i wrote to console ugsay AMXX tha BEST ---> i see on HUD AMXX tha BEST SAY: * ugrr - Restart round * ugrm - 3x Restart a start game (write LIVE) * ugknife - restart for knife rounds * ugwarmup - ser server for warmup (money, time etc.) * ugmatch - set server for match * ugaimawp - set server for play AIM a AWP maps (freezetime 1) * ugmr5 - when is DRAW... startmoney 10 000 and mr 5 * ugpause - Pause/Unpause game * ugdust2 - change map de_dust2 * uginferno - change map de_inferno * ugnuke - change map de_nuke * ugtrain - change map de_train * ugcplmill - change map de_cpl_mill * ugcplstrike - change map de_cpl_strike * ugcplfire - change map de_cpl_fire * ugcbble - change map de_cbble * ugaztec - change map de_aztec * ugforge - change map de_forge * ugprodigy - change map de_prodigy * ugawp - change map aim_awp * ugruins - change map awp_ruins * uggowenna - change map awp_gowenna * ugindia - change map awp_india * ugskawp - change map aim_sk_awp * ugspace - change map awp_space * ugdarkness - change map awp_darkness * ugaim - change map aim_map * ugaim2 - change map aim_map2 * ughlo - change map aim_map_hlo * ugskaim - change map aim_sk_ak_m4 * ugheadshot - change map aim_headshot * ugbono - change map aim_b0n0 * ugak - change map ak_47 * uglazy - change map aim_lazy sorry for my english, but i am learning it...... Someone who help me please... it is nice plugin but creator is ********... Say and console commands can use all players but i can to adjust it for only ADMINS can use it.... Please decompyle it or create new one... I think you can do it by i am newbie and i am not... Thx men |
Re: Decompiling Plugins (.amx/x -> .sma)
Suggestions/Requests board..
Quote:
|
Re: Decompiling Plugins (.amx/x -> .sma)
Quote:
A 'typical' sized function takes around 15-20 minutes, longer stuff will take much longer, and everything is prone to error. Typical plugins generally consist of 10ish functions. Larger ones will obviously have more. |
Re: Decompiling Plugins (.amx/x -> .sma)
i'm trying to make a c# program that remakes the easy functions, just as a bit of help
but u gotta put the dissassembled code in the program before it works amxx files are too hard for meh to start from that part but the structures still are strange :P hopefully it works ^^ if anyone wants to help me with it, you're all welcome i'll surely release it on this board then if its completed and working btw i gotta add a line: "i'm not responsible any abuse of this program incluidng copyright breaking" update: i'm changing it to active server page program |
Re: Decompiling Plugins (.amx/x -> .sma)
I'm having some problems with Wraiths AMX Diassembler, whenever it try's to represent a call to a native function it does it like this:
0xB4 SYSREQ.C [BAD SYSREQ] All throughout the disassembled file, is there any fix for this? (AMX Compiled with 3.2.3664.0 Pawn Compiler) |
Re: Decompiling Plugins (.amx/x -> .sma)
there are no longer any sites that have the AmxReader for download :(
|
Re: Decompiling Plugins (.amx/x -> .sma)
1 Attachment(s)
here you go. the decompiler i don't know it its the latest but here.
|
Re: Decompiling Plugins (.amx/x -> .sma)
can anyone update this?
the links dosent work (not the one in the first post but when you go in to the links you have to check some links they have) |
Re: Decompiling Plugins (.amx/x -> .sma)
I tried decompiling many plugins... It always shows: [BAD SYSREQ]...
There should be the natives name.. Help? |
All times are GMT -4. The time now is 16:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.