Results 1 to 8 of 8

Thread: I want to look at source code

  1. #1
    mdhakk
    Guest

    I want to look at source code

    I used the search feature and couldn't find what I wanted, and I have a feeling I'm going to be ridiculed/chastised for posting this, but this is sort of a last resort. I don't want to be a cracker, all I want to do is take a peek at some code used to run some of my older games and maybe mess with the values a bit. My problem is that the code is compiled or whatever in to a dat file. Is there a program that is able to unpack text/binary dat files? Once again, I'm a novice programmer, and I really dont know much at all about this kind of stuff, so I'm sorry if I've done something I shouldn't have, but I would rather learn how a program works than how it's security and what not works.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  2. #2
    I'll leave it to JMI as to whether you deserve any scolding.

    What you need to do, is locate the code exactly. If the whole .dat file is code, you're lucky. Otherwise, you'll have to dig it out.
    When located, you need to run it through a disassembler of some kind. You might have some luck using hiew or tools like it (as they can quite easily start disassembly from whereever you want in the code), but then again, IDA might be able to do the work for you, if configured right.
    Heck, if you're lucky, the .dat file is just a rename .exe or .com file. Check the start of the file for the telltale signs.

    Now, since you're probably gonna come up against some obstacles, figure out the following:
    1. Is the code compiled to machine language? Or is it some vb crap kinda thing?
    2. Is it packed or plain?
    3. What machine was it intended to run on, and for what system?

    Get those right, and things should be somewhat easier.
    In short, get a hexeditor, get a disassembler, get some readin matter, get busy, and don't come back here before you've made some progress.

    Fake

  3. #3
    mdhakk
    Guest
    wouldn't this require me to learn assembly and a whole bunch of other stuff? I literally have never reverse engineered anything in my life, is it feasible that I would be able to see the code in this dat file with less than a week's work? Like I said before, I'm not looking to learn to reverse engineer, I just wanted to find an easy way to look at the source code, and I guess that isn't happening.

    I did try a little bit though. The file is all code, and no hiew did not magically convert it to legible text (unless you count tons of smiley faces). I messed around with hiew for about an hour, but I couldn't understand even a little bit of it. It seems to me that there would be a lot of work involved in order for me to be able to do this, and I really don't have the time.

    So I guess what I'm asking, is whether or not this is something I can learn in a short period of time, or am I just going to have to give up?
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  4. #4
    What do you assume you are going to be able to discover if you do not understand what you are actually looking at in the code? If you do not understand anything about packed/unpacked code and have no idea about how to use disassemblers (or even what they are) or debuggers, it would appear that you have set yourself a fairly unattainable goal, just in the hope of cheating on a game you want to have a better score.

    You probably would better spend your time if you learned how to search for information on the net to determine whether or not there is already information out there on how to hack the specific games you are interested in hacking. You would be amazed at how much information is already out there if you try searching. There is a link at the bottem of these forums to searchlore which should give you a good start in that direction if you are as clueless about searching as you are about reversing.

    There is nothing wrong with being clueless about reversing or searching. We all started out in that category. There is something wrong with not trying to learn how to help oneself to do one or both of these things and you appear to have at least attempted to start off in a proper direction.

    If you actually want to learn how to reverse, you need to accept the fact that it is a study intensive proposition, which might not be well suited for your limited ambitions as stated, and it is not prone to shortcuts which work well. However, searching for a ready solution for your particular programs might lead to information or a solution which avoids the necessity of learning very much beyond how to implement what the game hackers have already discovered.

    Regards,
    JMI

  5. #5
    mdhakk
    Guest
    I can understand the code well enough, I just dont know how to reverse engineer, and like I said earlier, at the moment I'm not too interested in learning how to. I did search for someone who has already cracked it, but to no avail. I'm not really interested in cheating to get a higher score, which has nothing to do with anything, but it certainly makes my motives seem childish and stupid. I'm more interested in modifying the code to try and effect the gameplay itself. I'm assuming the game is coded in some sort of vartiation of C, and it's easy enough to modify anything C just by looking at syntax.

    I realize I'm out of luck, seeing as how hacking this file is way over my head, but that's really all I wanted to know. Whether or not this was something I was capable of doing, and apparently it is not.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  6. #6
    Naides is Nobody
    Join Date
    Jan 2002
    Location
    Planet Earth
    Posts
    1,647
    Hi mdhakk.

    One harsh reality I learned early in this business is that the object code, once compiled and optimized has essentially no resemblance to the original source code.
    Regardless how proficient you are in C, most of the RevEng work is done at the asm level. The original syntaxis and structure is gone.
    Last edited by naides; March 19th, 2005 at 19:51.

  7. #7
    <script>alert(0)</script> disavowed's Avatar
    Join Date
    Apr 2002
    Posts
    1,281
    Despite this, it is possible to manually rewrite the object code as C code, though this does require a good deal of reverse engineering skill and can be quite time consuming. I hope that answers your original question.

  8. #8
    mdhakk
    Guest
    ahhh, well thanks for the info. I thought as much. I guess I'll have to find another way to amuse myself, seeing as how people have cracked later iterations of the game, I doubt they would go back and reverse engineer a game older than ones they had already done.

    thanks again
    I promise that I have read the FAQ and tried to use the Search to answer my question.

Similar Threads

  1. Dll source code
    By w_a_r_1 in forum The Newbie Forum
    Replies: 6
    Last Post: July 1st, 2009, 15:07
  2. Dede source code available now
    By Lbolt99 in forum Tools of Our Trade (TOT) Messageboard
    Replies: 6
    Last Post: August 12th, 2002, 23:39
  3. C source code for an assembler
    By IcyDee in forum Tools of Our Trade (TOT) Messageboard
    Replies: 2
    Last Post: July 10th, 2002, 02:14
  4. How can i see the source code of a webpage?
    By KiSCiX in forum Malware Analysis and Unpacking Forum
    Replies: 1
    Last Post: March 13th, 2001, 03:26

Bookmarks

Posting Permissions

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