Log in

View Full Version : Mega Newbie needs help. Enabled Save button but cant save


bobmaster
December 19th, 2003, 23:33
I am trying to enable the save feature on "2D design" by TechSoft
h**p://www.techsoftuk.co.uk/2ddem.exe -9MB approx

I used this guide www.woodmann.com/fravia/menusspa.htm and
So far i have been able to enable the file menu "Save" and "Save As" options
"un-gray" them. I did this using a hex editor and changing the file as follows:


Original File:
002697d0: 00 00 02 e1 26 00 43 00 6c 00 6f 00 73 00 65 00 :: ..á&.C.l.o.s.e.
002697d0: 00 00 00 00 03 e1 26 00 53 00 61 00 76 00 65 00 :: ....á&.S.a.v.e.
002697d0: 09 00 43 00 74 00 72 00 6c 00 2b 00 53 00 00 00 :: ..C.t.r.l.+.S...
002697d0: 00 00 04 e1 53 00 61 00 76 00 65 00 20 00 26 00 :: ..áS.a.v.e...&.
002697d0: 41 00 73 00 2e 00 2e 00 2e 00 00 00 00 00 00 00 :: A.s.............

Changed File:
002697d0: 00 00 02 e1 26 00 43 00 6c 00 6f 00 73 00 65 00 :: ..á&.C.l.o.s.e.
002697d0: 00 00 00 00 01 e1 26 00 53 00 61 00 76 00 65 00 :: ....á&.S.a.v.e.
002697d0: 09 00 43 00 74 00 72 00 6c 00 2b 00 53 00 00 00 :: ..C.t.r.l.+.S...
002697d0: 00 00 01 e1 53 00 61 00 76 00 65 00 20 00 26 00 :: ..áS.a.v.e...&.
002697d0: 41 00 73 00 2e 00 2e 00 2e 00 00 00 00 00 00 00 :: A.s.............

This enables (un-grays) the "Save" and "Save As" but if i select them using
the mouse i get a "Open" dialog rather than a "Save"/"Save As" one. if i press
the shortcut key (Ctrl+S) the "Save As" dialog is displayed but after pressing
OK i get the message "Cannot save from demo version". I get the same
message if u use the "Export" function, witch isnt "grayed out" in the first
place.

I opened the file in W32dsm ver8.93. and found this string refrence
String Resource ID=01070: "Cannot save from demo version".

Also Found the Imported Function
comdlg32.GetSaveFileNameA
and the string refrence
String Resource ID=20102: "Saving. Please Wait...".

So i think the save function is someware still in the program but i donno
how i would enable it, or make the save buttons point to the correct bit
of save code. I dont realy know how to use W32dsm peoperly as i am a
newbie. I would appreciate any help anyone can give. Point me in the
correct direction or to some appropriate guides remember i am a mega-noob
so nothing too complex.

Thanks.

BTW this is the first thing i have ever tried to Reverse Engineer
Why? Because the £195 price is about £194 to expensive for me
i need this software for school work, they have the software at
school but i need to get some work done at home. The comp staff
are bastards and said i cant have a copy to take home even though
whilst i was google-ing i found other high schools giving copys to there
students for £5.

JMI
December 20th, 2003, 03:42
bobmaster:

Time for a little concept thinking about the issue. You had a button that was "greyed out" and you "un-greyed" it and you wonder why it still doesn't work. Maybe a better question would be:

"Why did you believe that simply manually 'un-greying' the button would make the program work?"

Now I know absolutely nothing about your program, but I can make certain educated guesses about what's happening, simply because I've read alot of things about reversing. First, you have an expensive commercial cad/cam product that has some form of protection system. From your description, it appears to have some form of "demo" mode to permit you to see how it operates, but it won't allow you to save your work, so its functionality it severly limited. You noticed that the "save" button was disabled and you figured if you simply turned the button color to the "on" position, it would save. Why?

You need to think about what may, or probably is going on. One can assume (often a mistake ) that there is a registration dialogue box, chosen from one of the menu's, more often than not, the "help" menu, with a "register" choice. But what would you think might be going on behind the scenes? Here's just a hypothesis of what it might be.

You have to enter a serial number of some sort. The program then performs some form of check on the number, to determine whether it is "valid." IF the number passes that check, the program branches to a line of code that enables the program features of "saving" and turns on/activates the save button.

Now you did not mention entering a serial number, so one can assume that the program did NOT run a check on the number, and did not branch to that part of the code which activates the save function and turns on the "save" button. You come along and figure out how to make the save button appear to be "on," but, because there has been no passing of the registration check, the code is not accessing the save function itself, whether or not the button is lit. Cad/Cam programs are usually expensive and often well protected in their demo versions.

So, in short, you have approached the problem from the wrong end. You have manually "lit" the button, but you, obviously, have no "save" code enabled to respond when the button is pushed. It would appear that you need to start with the registration code, itself, and see if it has a "good boy-bad cracker switch" which you can force to the "good-boy" branch.

Another alternative is to attempt to trace more of the code to look for the code that actually does the work of saving, after the button is pushed. You might have something like an event mask which waits for things to happen and then branches to the area of the code designed to respond to that event. One of those events would be pressing the "save" button and then the event code would branch off to do that task.

There is also another possibility, though less likely. That would be that the demo code is not actually a full program, because it does not actually have the code in it to save. This is less likely, because most programmers are too lazy to want to make two versions or take part of the code out, but it is the most effective way of preventing reverse engineering. You can't make the program do what it's code does not contain, unless you write it your self.

An actual good clue might have been to actually READ the information on the company's website. Did you notice the part for the 2D Demo that it states:
"In order to avoid software theft, the software is encrypted with the name of the licensed user, typically the name of a person, or the name of an individual establishment." Now they do not explain what THEY mean by encrypted, but it is more likely, from your description, that without passing the registration test, certain parts of the code, like "saving" remain encrypted and are NOT available. Looking at the program in a dissassembler would give you a better clue. If that's the case and they have used proper encryption, you are essentially screwed. If, on the other hand, their encryption is weak, you might have a chance. One thing to check is whether the demo exe and the exe on the schools machines are the same size. Can you guess why?

So, you obviously have much more work to do other than just turning on a button. Judging from your own description of your skill level in this endevour, it does not appear likely that you are capable of "reversing" this project on your own and actually want someone here to "reverse it for you. Of course, you could prove me wrong, but due to your stated need for course completion convenience, the obvious time limit that imposes on your ability to get yourself up to speed, I doubt you will be able, or patient enough to learn enough to accomplish the task in the time avialable. So what are you going to do if the answer is that you need to read a great deal more before you are really ready to start?

Regards,

nikolatesla20
December 20th, 2003, 03:45
Another viable option is to find a different target. There's lots of CAD programs out there.

-nt20

JMI
December 20th, 2003, 03:54
And, of course, that is another option You CAN learn how to work the program from the demo, even if you can't save. You could use some other cad/cam program to get homework done for submission to the prof.

Of course they don't actually expect you to be doing the work outside of the classroom or lab, or they would have made the program available for your use. So this, really is an issue of personal conveniency, not in itself bad, but a motivation which does not bode well for your potential willingness to buckle down and do the hard work yourself.

Regards,