[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4712: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4714: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4715: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4716: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
JoinUO Forums • View topic - Decompiling/Deobfuscating the Ultima Online Demo scripts
Page 1 of 1

Decompiling/Deobfuscating the Ultima Online Demo scripts

PostPosted: Thu Sep 17, 2009 1:22 pm
by Batlin
One of the big mysteries inside the Ultima Online DAT file were the .m (.m.q) files. Those files, like the directory name suggests, contain code. As it turns out, the scripts are obfuscated but by analyzing the script execution engine inside uodemo.exe I was able to figure it all out.

More technical explanation can be found on the wiki :

There are 1615 scripts in total, 814 of them assign behaviours to objects. The other 801 are the behaviours themselves, the skills & dungeon scripts (quests). OSI magery is spread over more than 120 scripts (2 scripts per spell).

How to "decompile" the scripts:
1) Extract the "scripts" directory from the DAT file :
2) Download the Mass M Decompiler :
3) Run the "Mass M Decompiler" and point it to the "scripts" directory
4) Press the Dump All button when decompilation is complete

You will find that the variable names inside the scripts are obfuscated.

Re: Decompiling/Deobfuscating the Ultima Online Demo scripts

PostPosted: Sun Jan 03, 2010 4:32 am
by xantier
Nothing is changed.. Mass decompile button doesnt work. :(

Re: Decompiling/Deobfuscating the Ultima Online Demo scripts

PostPosted: Sun Jan 03, 2010 10:18 am
by Batlin
Hello xantier

You have to press the "..." button and select the directory that contains the .m files & the sdb.txt file.
Screenshot Mass M Decompiler.JPG
Screenshot Mass M Decompiler.JPG (100 KiB) Viewed 9635 times

If you have VB.Net installed (Express editions should work), set a break-point at the ScanAndDecompileAll procedure at see what happens there.

Re: Decompiling/Deobfuscating the Ultima Online Demo scripts

PostPosted: Sun Jan 03, 2010 6:17 pm
by Sen
Link doesn't work for me.

Re: Decompiling/Deobfuscating the Ultima Online Demo scripts

PostPosted: Fri Jun 04, 2010 4:31 pm
by Stuck
I can't get the Mass Decompile to work either. I've selected the correct directory, but still nothing. :(

edit: Nevermind, I got it working after messing around with it in visual studio a bit.

Btw, thank you for all of this Batlin. :)

Now I just gotta figure out a way to re-compile the scripts. ;p

Re: Decompiling/Deobfuscating the Ultima Online Demo scripts

PostPosted: Tue Jun 29, 2010 8:00 am
by Batlin

Re: Decompiling/Deobfuscating the Ultima Online Demo scripts

PostPosted: Fri Jul 16, 2010 2:24 am
by Stuck

Re: Decompiling/Deobfuscating the Ultima Online Demo scripts

PostPosted: Sat Aug 21, 2010 9:21 pm
by Batlin
I've uploaded a new version of the Mass M Decompiler which fixes a bug that Garret reported me 9 months ago. Sorry for the delay.

To fix the bug manually in your already decompiled scripts: replace "location usedon" by "location place" in those scripts that implement the "targetloc" event.

Re: Decompiling/Deobfuscating the Ultima Online Demo scripts

PostPosted: Sat Sep 18, 2010 6:24 am
by Batlin