About:DeAMX (Decompiler)
#1

Hello all,
I've just read Y_Less's tutorial about why does DeAMX doesn't decompile the way we think. Also I've seen some functions where people do tell it protects from the decompile though it doesn't.

The reason why I started the topic is to discuss about the protection of a script from DeAMX. DeAMX, won't decompile well though just to know whether some tricks won't allow it to decompile well.

Does DeAMX decompile includes too?
Well I'm not so sure about it, but if it doesn't; to protect our script in some cases like to pass our .amx file to others for testing, couldn't we include our script?

pawn Code:
#include <myscript>
//This is my fs.
public OnPlayerConnect(playerid)
{
  GivePlayerMoney(playerid, 10);
  return 1;
}
pawn Code:
//Include
#include <a_samp>
#define red 0xFF0000FF

public OnPlayerSpawn(playerid)
{
 if(GetPlayerMoney(playerid) >= 1)
 {
   new str[128];
   new Lname[MAX_PLAYER_NAME];
   GetPlayerName(playerid,Lname,sizeof(Lname));
   format(str,sizeof(str),"%s has been kicked from the server.(Reason:test|not anti hack)", Lname);
   SendClientMessageToAll(red, str);
   Kick(playerid);
 }
  return 1;
}
For example, if I do want to protect the included script from DeAMX, couldn't it be added as an include?

So if DeAMX decompiles the script, would it be decompiling like this?

pawn Code:
//Decompiled stuff.
#include <myscript>
public OnPlayerConnect(playerid)
{
  GivePlayerMoney(playerid, 10);
  return 1;
}
I'm just aware to know about it because once my small fs got stolen by my cousin through decompile..
Reply
#2

I think no,
Never try the DeAMX before. But base on other scripters.
DeAMX is fail..
Reply
#3

Well yeah it is a fail, but in case of some small fs, it decompiles well. Also I doubt that opening a .amx file with notepad and seperating the codes and pasting such small codes on a notepad and saving it as .amx couldn't be decompiled? Later couldn't they get whole script by decompiling through making it small snippets?


That's the reason why I asked would including prevent it.
Reply
#4

deamx will never work, as far as i know. i have tried it alot of times..
Reply
#5

It works for me..tried it once becuz some guy on forums released his gm with only amx and i was trying to decompile it..cuz i wuz learning pawn that time(wuz a newb)
Reply
#6

Quote:
Originally Posted by [HK]Ryder[AN]
View Post
It works for me..tried it once becuz some guy on forums released his gm with only amx and i was trying to decompile it..cuz i wuz learning pawn that time(wuz a newb)
The decompiled .pwn won't ever be same as the source[.pwn].
Reply
#7

DeAMX is a fail. a big one. it doesn't show you the main codes.

EDIT: as Mark™ said.
Reply
#8

Well Decompiled script won't output as the original .pwn is. Even though if it decompiles not as original .pwn, our script is leaked(If decompiled doesn't gives well, some of the script could be leaked).
So I want to know if DeAMX doesn't decompile includes, couldn't we create our script as an include and then include it to a pawn file and compile?
So it gets protected, right?


pawn Code:
#include <myscript>
//Inside 'myscript' include, I've my necessary script codes.
public OnPlayerConnect(playerid)
{
   GivePlayerMoney(playerid, 10);
   return 1;
}
If DeAMX doesn't decompile includes, couldn't we protect our script by using it as an include in case of giving our .amx file for a test?
Reply
#9

Once a script is complied in .amx format, then some of it is generated into a unreadable format (pcode / AMX opcodes/instructions) so the samp-server.exe executable can run it.

Also, this might be very interesting. I recently opened an .amx file and noticed that some code is surrounded by the Ђ character. If you remove all instances of that character, you'll notice some readable .pwn code!

EDIT: About the first post, using the #include directive would pull anything from the specified include file and automatically add it into the .amx, so if you have this gamemode:

pawn Code:
// My Gamemode
#include <a_samp>
#include <stuff>
And stuff.inc contained something along the lines of:
pawn Code:
#include <a_samp>

stock my_function()
{
    print("Your function is cool.");
}
Your script would compile as:

pawn Code:
// My Gamemode
#include <a_samp>
#include <a_samp>

stock my_function()
{
    print("Your function is cool.");
}
Reply
#10

Quote:
Originally Posted by Lordz™
View Post
Well Decompiled script won't output as the original .pwn is. Even though if it decompiles not as original .pwn, our script is leaked(If decompiled doesn't gives well, some of the script could be leaked).
So I want to know if DeAMX doesn't decompile includes, couldn't we create our script as an include and then include it to a pawn file and compile?
So it gets protected, right?


pawn Code:
#include <myscript>
//Inside 'myscript' include, I've my necessary script codes.
public OnPlayerConnect(playerid)
{
   GivePlayerMoney(playerid, 10);
   return 1;
}
If DeAMX doesn't decompile includes, couldn't we protect our script by using it as an include in case of giving our .amx file for a test?
Includes have that name because they are scripts which get included in the main script file during the preprocessing .



So, they can be decompiled with the rest of the binary file .



If someone has the .amx file, that person is able to understand its code through a hex editor.



I hope that I have helped .
Reply
#11

Quote:
Originally Posted by Lordz™
View Post
That's the reason why I asked would including prevent it.
Included files are merely a simplification for the scripter and the compiler grabs their content and processes it a whole bunch. And the output gets written to the .amx similarly, it has no idea about the files included in the script source.

There are a few ways to confuse DeAMX. I have seen plenty of "Anti-DeAMX" scripts around this forum and if you're seriously worried about someone trying to decompile your gamemode, look it up.
Also, people are not going to have a nice time reading decompiled code, because it looks messy, has no variable names, etc.
Reply
#12

The really good scripters could work with a de-amxed script. But the really good scripters dont need to decompile and steal someone elses script. They could just recreate the whole thing on their own faster. So decompiling is no problem at all in samp.
Reply
#13

I know of three ways to confuse deamx - the released script to prevent it, states/automata, and #emit.
Reply
#14

I know that DeAMX includes only 3 things: a_samp, core and float.

The functions in all the other include files are compiled with the amx file by the pawn compiler, so they aren't protected because when DeAMX Decompiles the amx file all the functions that were in the includes are shown in the decompiled script.

Sorry for my bad english.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)