Valhalla Legends Forums Archive | General Programming | Shh!

AuthorMessageTime
idoL
Programming refers to VB code, and "Maps" refer to StarCraft maps.

Hi, if your one of moral judgement and don't approve of "unlocking" maps, then don't respond please! ;)

Ok now, I am interested in programming a map unprotector, so far the best protection is a thingie called "ProEdit" which makes it nearly impossible to unlock unless you hexedit.

Any ideas how you would go about creating a program to unprotect a map locked with ProEdit? If you can program somthing to do this please send me it, or atleast the code to compile?
July 22, 2004, 9:42 PM
Spht
[quote author=Snake link=board=5;threadid=7825;start=0#msg71933 date=1090532554]
Programming refers to VB code, and "Maps" refer to StarCraft maps.

Hi, if your one of moral judgement and don't approve of "unlocking" maps, then don't respond please! ;)

Ok now, I am interested in programming a map unprotector, so far the best protection is a thingie called "ProEdit" which makes it nearly impossible to unlock unless you hexedit.

Any ideas how you would go about creating a program to unprotect a map locked with ProEdit? If you can program somthing to do this please send me it, or atleast the code to compile?

[/quote]

It doesn't look like you're very interested in knowing how to write a program to "unprotect" a map. It seems like you just want a program which does this. If so, you posted in the wrong forum. Did you search Google first?

Anyway, if you are interested in doing work yourself: I'm guessing ProEdit creator(s) don't mention what ProEdit does to a map to make it "protected"? I'm assuming it corrupts the map file some way so StarEdit can't view it, but you can still play in it? You (or a friend) will probably need to disassemble ProEdit to see exactly what it does to the file so that you can write a program to reverse the changes.
July 22, 2004, 10:13 PM
iago
I'm not sure this is right, but I think it may be used to "protect" maps. There's a storm function, "251   SFileAuthenticateArchive(HANDLE hArchive,int)". It is possible that it makes a change to the .mpq file such that SFileAuthenticateArchive fails. It's also possible that that isn't called on the mapfile when yo'ure playing, only editing.

This is just a theory, but who knows?

July 22, 2004, 10:44 PM
idoL
Spht, that was kinda the idea, I want to see a map unprotector that will go thru ProEdit, if only by telling me how to make it myself or someone make it for me.
There is no program thus far that has crack ProEdit, this is kind of a challenge.
July 22, 2004, 11:42 PM
idoL
[quote author=iago link=board=5;threadid=7825;start=0#msg71950 date=1090536278]
I'm not sure this is right, but I think it may be used to "protect" maps. There's a storm function, "251 SFileAuthenticateArchive(HANDLE hArchive,int)". It is possible that it makes a change to the .mpq file such that SFileAuthenticateArchive fails. It's also possible that that isn't called on the mapfile when yo'ure playing, only editing.

This is just a theory, but who knows?


[/quote]

Could you confirm this? Perhaps with a program that rescructures or repairs the SFileAuthenticateArchive to it's origanol state, would that in theory work?
July 22, 2004, 11:44 PM
Adron
That function might also just verify Blizzards signature on the mpq...
July 23, 2004, 12:29 AM
Arta
It does - I doubt it's used to check maps at all, unless they're Blizzard-approved.
July 23, 2004, 1:09 AM
idoL
I think a little detective work might solve my problem -- I'll ask the author how he went about making the "protecting" procedure, becuase you know I want to make a map protector myself, in theory, if I reverse or repair the function he used, could I build a program to unprotect his protection?
July 23, 2004, 1:12 AM
Tuberload
[quote author=Snake link=board=5;threadid=7825;start=0#msg71971 date=1090545178]
I think a little detective work might solve my problem -- I'll ask the author how he went about making the "protecting" procedure, becuase you know I want to make a map protector myself, in theory, if I reverse or repair the function he used, could I build a program to unprotect his protection?
[/quote]

If Blizzard clients can unprotect the map then it only makes sense that with the proper research you could as well.
July 23, 2004, 1:50 AM
idoL
What do you mean, what unprotects them?
July 23, 2004, 4:57 AM
Myndfyr
[quote author=Tuberload link=board=5;threadid=7825;start=0#msg71978 date=1090547412]
[quote author=Snake link=board=5;threadid=7825;start=0#msg71971 date=1090545178]
I think a little detective work might solve my problem -- I'll ask the author how he went about making the "protecting" procedure, becuase you know I want to make a map protector myself, in theory, if I reverse or repair the function he used, could I build a program to unprotect his protection?
[/quote]

If Blizzard clients can unprotect the map then it only makes sense that with the proper research you could as well.
[/quote]

That's not necessarily true, though. Blizzard probably does the same thing to "protect" the map from the map editor before it packs it into the MPQ. There's probably some "feature" (Adron) that prevents the SC map editor from loading a map with certain characteristics up. That's the only real "protection" afforded, my guess.

[update]
I was googling for "world of warcraft mpq definition files" because I wanted to see if anyone had come up with the strings in the MPQ files for WoW. This was something I was lead to:
http://deprotect.nathanmx.com/
You might be interested in what the guy talks about. It's for WC3, but it might also apply to SC/BW. You might be interested.
[/update]
July 23, 2004, 9:38 AM
Adron
I think it's more like destroying some structures that the map editor uses in a way that the map editor either crashes or says the map is invalid when trying to load it. Those same structures are either not used when playing the map, or used in a different way that still works.
July 23, 2004, 10:34 AM
The-Rabid-Lord
Aparentley a proptector will change some of the map data and triggers. You would need to reverse the process and put back in the triggers and imfo removed.
July 23, 2004, 3:10 PM
idoL
[3:41:3] <Clokr_> what?
[3:56:8] <Snake> Your ProEdit takes structure out of the map making not function in the map editor, but still playable right?
[4:10:2] <Clokr_> yeah.
[4:18:5] <Snake> Can you elaborate more on this process?
[4:25:2] <Clokr_> no
July 23, 2004, 4:03 PM
j0k3r
[quote author=Snake link=board=5;threadid=7825;start=0#msg72036 date=1090598633]
[3:41:3] <Clokr_> what?
[3:56:8] <Snake> Your ProEdit takes structure out of the map making not function in the map editor, but still playable right?
[4:10:2] <Clokr_> yeah.
[4:18:5] <Snake> Can you elaborate more on this process?
[4:25:2] <Clokr_> no
[/quote]
You didn't actually think that would work, did you?
July 23, 2004, 4:35 PM
iago
Do you have the program that puts the protection on it? If so, just compare the before/after mapfiles. There's a linux program called "diff", but I think that only works on Ascii files. I'm not sure what you can use for binary files on windows.
July 23, 2004, 5:00 PM
idoL
That's a good idea, I have a Linux but I don't think "diff" will show me what happens before and after on a map file. Got any other methods of comparing?
July 23, 2004, 6:57 PM
Adron
fc works.
July 23, 2004, 7:01 PM
Tuberload
Hex Workshop can compare two files. It shouldn't be to hard.
July 23, 2004, 9:19 PM
Soul Taker
I tried comparing a locked and non-locked map before, it seems like a TON of data is just missing in the locked version. Also, IIRC, I remember there being discussion back on the CamSys boards about deleting information, such as information about the terrain, that wasn't specifically checked by the game, but is by the map editor.
July 27, 2004, 3:45 PM
Adron
Sounds possible. Then all you have to do is make a tool to rebuild a map file? You need to be able to load and save maps, and replace any data that doesn't exist in the map being loaded with the defaults that the game uses?
July 27, 2004, 8:11 PM
idoL
[quote author=Adron link=board=5;threadid=7825;start=15#msg72954 date=1090959085]
Sounds possible. Then all you have to do is make a tool to rebuild a map file? You need to be able to load and save maps, and replace any data that doesn't exist in the map being loaded with the defaults that the game uses?
[/quote]

It's harder then it sounds, but yes that is what you do, I hex'd a map by replacing missing data, and it opend, now to write a program to do that.
July 27, 2004, 9:32 PM
Spht
[quote author=Snake link=board=5;threadid=7825;start=15#msg72970 date=1090963975]It's harder then it sounds, but yes that is what you do, I hex'd a map by replacing missing data, and it opend[/quote]

Sounds pretty easy then.
July 27, 2004, 9:47 PM
Myndfyr
[quote author=Snake link=board=5;threadid=7825;start=15#msg72970 date=1090963975]
[quote author=Adron link=board=5;threadid=7825;start=15#msg72954 date=1090959085]
Sounds possible. Then all you have to do is make a tool to rebuild a map file? You need to be able to load and save maps, and replace any data that doesn't exist in the map being loaded with the defaults that the game uses?
[/quote]

It's harder then it sounds, but yes that is what you do, I hex'd a map by replacing missing data, and it opend, now to write a program to do that.
[/quote]

Of course, then the issue is -- how do you know what the missing data is? If you *have* the missing data, then you pretty much have the unprotected map! The data is distinct for any particular map.
July 27, 2004, 11:05 PM
Adron
[quote author=Myndfyre link=board=5;threadid=7825;start=15#msg72992 date=1090969520]
[quote author=Snake link=board=5;threadid=7825;start=15#msg72970 date=1090963975]
[quote author=Adron link=board=5;threadid=7825;start=15#msg72954 date=1090959085]
Sounds possible. Then all you have to do is make a tool to rebuild a map file? You need to be able to load and save maps, and replace any data that doesn't exist in the map being loaded with the defaults that the game uses?
[/quote]

It's harder then it sounds, but yes that is what you do, I hex'd a map by replacing missing data, and it opend, now to write a program to do that.
[/quote]

Of course, then the issue is -- how do you know what the missing data is? If you *have* the missing data, then you pretty much have the unprotected map! The data is distinct for any particular map.
[/quote]

If the map is playable without the missing data, it can't be required and critical data. It's just something the map editor wants, but doesn't affect the map as it's played. So... Redundant and should be recreatable!
July 27, 2004, 11:57 PM
Myndfyr
[quote author=Adron link=board=5;threadid=7825;start=15#msg73011 date=1090972661]
If the map is playable without the missing data, it can't be required and critical data. It's just something the map editor wants, but doesn't affect the map as it's played. So... Redundant and should be recreatable!
[/quote]

I'm sure it is recreatable ;-) My point was, using a hex editor to compare the differences between a protected map and a non-protected map won't help.

This is the information I got about WC3 map protection from the link I posted on page 1:

[quote]
- Hiding the war3map.j file in "scripts\"
- Changing the MPQ headersize information
- Code obfustication
[/quote]

Evidently, that information "breaks" the map editor which relies on it, but is not crucial in the map (perhaps triggers are somehow *compiled* into an MPQ that is used by the game, but the .j file is there for the editor?) for the game. It also appears that the MPQ header size information is disregarded by the game, but it breaks the map editor.
July 28, 2004, 2:09 AM
idoL
I was reffering to it was hard to find the data then it is to replace it.
July 28, 2004, 5:59 AM
Soul Taker
[quote author=Myndfyre link=board=5;threadid=7825;start=15#msg73053 date=1090980558]
[quote author=Adron link=board=5;threadid=7825;start=15#msg73011 date=1090972661]
If the map is playable without the missing data, it can't be required and critical data. It's just something the map editor wants, but doesn't affect the map as it's played. So... Redundant and should be recreatable!
[/quote]

I'm sure it is recreatable ;-) My point was, using a hex editor to compare the differences between a protected map and a non-protected map won't help.

This is the information I got about WC3 map protection from the link I posted on page 1:

[quote]
- Hiding the war3map.j file in "scripts\"
- Changing the MPQ headersize information
- Code obfustication
[/quote]

Evidently, that information "breaks" the map editor which relies on it, but is not crucial in the map (perhaps triggers are somehow *compiled* into an MPQ that is used by the game, but the .j file is there for the editor?) for the game. It also appears that the MPQ header size information is disregarded by the game, but it breaks the map editor.
[/quote]
It also says it deletes numerous files in the MPQ that are only used by the world editor, such as a file that contains camera angle settings, that will cause the world editor to error if it doesn't find them.
July 28, 2004, 12:24 PM
Myndfyr
[quote author=Soul Taker link=board=5;threadid=7825;start=15#msg73109 date=1091017442]
[quote author=Myndfyre link=board=5;threadid=7825;start=15#msg73053 date=1090980558]
[quote author=Adron link=board=5;threadid=7825;start=15#msg73011 date=1090972661]
If the map is playable without the missing data, it can't be required and critical data. It's just something the map editor wants, but doesn't affect the map as it's played. So... Redundant and should be recreatable!
[/quote]

I'm sure it is recreatable ;-) My point was, using a hex editor to compare the differences between a protected map and a non-protected map won't help.

This is the information I got about WC3 map protection from the link I posted on page 1:

[quote]
- Hiding the war3map.j file in "scripts\"
- Changing the MPQ headersize information
- Code obfustication
[/quote]

Evidently, that information "breaks" the map editor which relies on it, but is not crucial in the map (perhaps triggers are somehow *compiled* into an MPQ that is used by the game, but the .j file is there for the editor?) for the game. It also appears that the MPQ header size information is disregarded by the game, but it breaks the map editor.
[/quote]
It also says it deletes numerous files in the MPQ that are only used by the world editor, such as a file that contains camera angle settings, that will cause the world editor to error if it doesn't find them.
[/quote]

Adron's point is that those files in the MPQ must be redundant in some way, because the maps are still playable without them.

My point was that using a hex editor won't be the optimal way to do it, because it requires having the original file, unless you're so l33t that you can figure out the data structures just by looking at the raw data. ;)
July 28, 2004, 10:57 PM
Tuberload
[quote author=Myndfyre link=board=5;threadid=7825;start=15#msg73135 date=1091055443]My point was that using a hex editor won't be the optimal way to do it, because it requires having the original file, unless you're so l33t that you can figure out the data structures just by looking at the raw data. ;)
[/quote]

No simply looking at the difference probably wont present the missing data but it is a viable part of figuring out file formats. It gives you insight on how much is missing and where, and then you can start figuring out the structure through reverse engineering.
July 29, 2004, 2:32 AM
Clokr_
Nice convo guys, now one question:
What's the point of making an unprotector?
Is not funner make a better protector? ;)
August 10, 2004, 2:23 PM
Myndfyr
[quote author=Clokr_ link=board=5;threadid=7825;start=30#msg74887 date=1092147823]
Nice convo guys, now one question:
What's the point of making an unprotector?
Is not funner make a better protector? ;)
[/quote]

Please tell me you did not just say "funner."

:o
August 11, 2004, 12:57 AM

Search