+ Reply to Thread
Results 1 to 5 of 5

Thread: [Map] How to decompile a protected/Obfuscated map

  1. #1
    Development Team
    Points: 30,788, Level: 76
    Level completed: 93%, Points required for next Level: 62
    Overall activity: 0%
    imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy's Avatar
    Join Date
    Feb 2011
    Location
    Hawkesbury, NSW
    Posts
    2,584
    Points
    30,788
    Total Donations For

    [DtK] [SA] imthenewguy     $ 0.00

    [Map] How to decompile a protected/Obfuscated map

    Hi all,

    I have had a few people approach me with problems when they are decompiling a map.

    There are multitudes of methods available when it comes to locking a map file, but the most effective way is to use the Obfuscator process.

    If you have ever decompiled a map and tried to open it in hammer, only to get the following error: E:\Steam\steamapps\USERNAME\Sourcesdk_content\cstr ike\mapsrc\MAPNAME.vmf, line 00000: unexpected end of file - it is possible that the map has been obfuscated.

    What tools do we need for this?
    We will only need 2 tools to fix this problem.

    Cracked VMEX: We will use this to decompile the map, bypassing any protections on it (besides the obfuscator).
    Download: http://www.tophattwaffle.com/downloads/vmex/

    Notepad++: We will use this to open up the vmf file and adjust its code to fix the problem.
    Download: http://notepad-plus-plus.org/

    Ok I have the tools, what now?
    We will need to open up the folder containing the cracked vmex. In there you will see 4-5 files: vmex.bat, vmex.jar, vmex2.bat and some other random shit.

    Move the map you wish to decompile into this folder and double click on the vmex.jar file.

    This screen will appear:



    Leave all of the settings as is and click browse, and select your map file.

    Click decompile and wait for up to 30 seconds.

    In the folder containing the vmex files, there should also be a file with the same name as your map, with an _d at the end. This is our vmf (valve map file).

    Copy the file to your clipboard.

    Open hammer and browse for maps.

    Paste your map file in this folder and open it.

    Hammer will attempt to open the file, if it is successful then you don't need this tutorial and you can stop now. If it is not successful, it will post you an error similar to the one mentioned at the beginning of this tutorial. It will also give you a line number (take note of it).

    Right click on the vmf file and open it with notepad++

    On the left hand side, you will see line numbers - scroll down until you see the line number mentioned in the error in hammer. It is normally at the very bottom.

    This last part will be different with every map, but the idea is simple and I will explain it with my example.

    When i decompiled jb_battleforce_jail_v3 it came up with and error on line 327264:



    TO fix it, I had to remove the final command lines (lines 327264 - 327267). You will also need to make sure the command lines above it are opened/closed correctly with parenthesis.

    Here is my fixed version:



    Once you have edited the map correctly, save it and attempt to open it in hammer again.

    It should work.

    If you are missing textures for the map, I will be writing up a tutorial on how to extract textures from a map file to your computer.

    Hope this helps!

  2. The Following 4 Users Say Thank You to imthenewguy For This Useful Post:


  3. #2
    Banned
    Points: 15,206, Level: 53
    Level completed: 56%, Points required for next Level: 244
    Overall activity: 0%



    Gyarados has a reputation beyond repute Gyarados has a reputation beyond repute Gyarados has a reputation beyond repute Gyarados has a reputation beyond repute Gyarados has a reputation beyond repute Gyarados has a reputation beyond repute Gyarados has a reputation beyond repute Gyarados has a reputation beyond repute Gyarados has a reputation beyond repute Gyarados has a reputation beyond repute Gyarados has a reputation beyond repute Gyarados's Avatar
    Join Date
    Nov 2011
    Location
    Albury
    Posts
    1,684
    Points
    15,206
    Total Donations For

    Gyarados     $ 60.00
    Thanks new guy, well written tutorial. Good job!

  4. #3
    :%)
    Points: 8,196, Level: 38
    Level completed: 87%, Points required for next Level: 54
    Overall activity: 0%
    Kavemium has much to be proud of Kavemium has much to be proud of Kavemium has much to be proud of Kavemium has much to be proud of Kavemium has much to be proud of Kavemium has much to be proud of Kavemium has much to be proud of Kavemium has much to be proud of Kavemium has much to be proud of Kavemium has much to be proud of Kavemium's Avatar
    Join Date
    Feb 2012
    Posts
    482
    Points
    8,196
    Total Donations For

    [DtK] [Jedi] Kavemium     $ 0.00
    This is very helpful, I remember when I was trying to make MG maps (a looong time ago) I searched for a long time for a decompiler.

    (◕:%)◕✿).com.au


    *Note: :%) is a copyrighted meme, please do not steal it

  5. #4
    Senior Member
    Points: 22,275, Level: 65
    Level completed: 20%, Points required for next Level: 525
    Overall activity: 73.0%



    Cody2G has a reputation beyond repute Cody2G has a reputation beyond repute Cody2G has a reputation beyond repute Cody2G has a reputation beyond repute Cody2G has a reputation beyond repute Cody2G has a reputation beyond repute Cody2G has a reputation beyond repute Cody2G has a reputation beyond repute Cody2G has a reputation beyond repute Cody2G has a reputation beyond repute Cody2G has a reputation beyond repute Cody2G's Avatar
    Join Date
    Aug 2012
    Location
    Newcastle, NSW
    Posts
    1,975
    Points
    22,275
    Total Donations For

    [DtK] [V] Cody2G     $ 10.00
    Good write-up Newguy!

  6. #5
    Development Team
    Points: 30,788, Level: 76
    Level completed: 93%, Points required for next Level: 62
    Overall activity: 0%
    imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy has a reputation beyond repute imthenewguy's Avatar
    Join Date
    Feb 2011
    Location
    Hawkesbury, NSW
    Posts
    2,584
    Points
    30,788
    Total Donations For

    [DtK] [SA] imthenewguy     $ 0.00
    Thanks guys!

    If you have trouble with the notepad++ part, paste the block of code on this thread and Ill give you a hand.

    Also, if you need to learn how to extract the map files so you can see them in hammer, view this: http://www.dying2kill.com.au/showthr...rom-a-map-file

    Cheers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts