1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can you Modify programs?

Discussion in 'General Programming Chat' started by luke82817, Feb 4, 2009.

  1. luke82817

    luke82817 Regular Member

    Joined:
    Dec 7, 2008
    Messages:
    249
    Likes Received:
    63
    Occupation:
    musician/internet moneymaking man
    Location:
    Canada
    Does anyone know how to open up and modify programs? Like since most of these programs (tube increaser, etc.) are written in C++, can you open up the .cpp file and edit it? This would also be cool if I could do this to my computer games and change em around to my liking. Possible?
     
  2. Allie Albatross

    Allie Albatross Junior Member

    Joined:
    Jan 31, 2009
    Messages:
    116
    Likes Received:
    44
    Location:
    Austin, TX
    If you have the original source code, sure. But if it's pre-compiled already, then no.
     
  3. luke82817

    luke82817 Regular Member

    Joined:
    Dec 7, 2008
    Messages:
    249
    Likes Received:
    63
    Occupation:
    musician/internet moneymaking man
    Location:
    Canada
    Well for computer games I thought they compiled slightly different on different machines. So does it compile when you install it, or do they just compile the code ahead of time for every common type of CPU?
     
  4. WickednDivine

    WickednDivine Executive VIP Premium Member

    Joined:
    Jul 29, 2008
    Messages:
    468
    Likes Received:
    344
    Code is not compiled when you install it, it's basically just copied to the correct place, and if windows, the registry values set, etc.

    You cannot get the source code. You could try decompiling it..but it's not very effective
     
  5. albertb

    albertb Registered Member

    Joined:
    Nov 18, 2008
    Messages:
    53
    Likes Received:
    9
    Commercial software doesn't generally come with source code. They are precompiled. Most CPU's we use have similar architecture so code can run on them without needing to be compiled differently.
    Programs can be modified without source code though. Its known as reverse engineering. But its not easy.
     
  6. luke82817

    luke82817 Regular Member

    Joined:
    Dec 7, 2008
    Messages:
    249
    Likes Received:
    63
    Occupation:
    musician/internet moneymaking man
    Location:
    Canada
    hmmm. In order to convert backwards what do you have to do? Are you saying that the machine code is what you are given, or is it binary or hex? If it's machine code then I could probably do it, but I donno about binary or hex. Not yet anyway..

    If it's binary or hex, isn't there a program that convert it to machine code? Since it's a one-to-one translation it'd be easy and then all I'd have to do is change the machine code I guess..

    Am I close or am I way off?? Thanks!
     
    Last edited: Feb 4, 2009
  7. WickednDivine

    WickednDivine Executive VIP Premium Member

    Joined:
    Jul 29, 2008
    Messages:
    468
    Likes Received:
    344
    machine code IS binary, i'm not sure what you're trying to say.
     
  8. luke82817

    luke82817 Regular Member

    Joined:
    Dec 7, 2008
    Messages:
    249
    Likes Received:
    63
    Occupation:
    musician/internet moneymaking man
    Location:
    Canada
    I meant Assembly sorry, not machine code. Assembly is a 1to1 translation from machine code. I meant that if it is binary then I can probably convert it to assembly and then modify that? Because I can kinda work with assembly is that's the case.
     
  9. *poohbear*

    *poohbear* Registered Member

    Joined:
    Jun 1, 2008
    Messages:
    59
    Likes Received:
    15
    You can try Hex Editors for editing binary content, but you need to have a good understanding of what you are doing. Back in the day on AOL, people use to change email addresses in keyloggers to where the logs would be emailed by using Hex Editors
     
  10. asteroth

    asteroth Newbie

    Joined:
    Dec 30, 2008
    Messages:
    33
    Likes Received:
    162
    Occupation:
    CPA / PPC
    27648 decimal is 6C00 hexadecimal. 0101 binary is 5 decimal.
    So what do you want to do? You could look at memory after
    game is loaded. You could dump memory to a file. What kind
    of modifications are you wanting to do?
     
  11. asteroth

    asteroth Newbie

    Joined:
    Dec 30, 2008
    Messages:
    33
    Likes Received:
    162
    Occupation:
    CPA / PPC
    27648 decimal is 6C00 hexadecimal. 0101 binary is 5 decimal.
    So what do you want to do? You could look at memory after
    game is loaded. You could dump memory to a file. What kind
    of modifications are you wanting to do?
     
  12. luke82817

    luke82817 Regular Member

    Joined:
    Dec 7, 2008
    Messages:
    249
    Likes Received:
    63
    Occupation:
    musician/internet moneymaking man
    Location:
    Canada
    yeah I know binary and hex (I am cpsc major). What I am wanting to do is several programs. Maybe modify some internet programs (like youTube programs) also I think it would be very cool if I could say open up a game like Final Fantasy VII and modify it for example. Or you know open up an rts game and make some awesome changes. Basically anything that pisses you off in a game you could change (probably not graphics). You know, change Madden 09 so that I can have a fiend quarterback that can bash through 3 defenders at once (by increasing stats to 150 or something). That'd be fun :D
     
  13. asteroth

    asteroth Newbie

    Joined:
    Dec 30, 2008
    Messages:
    33
    Likes Received:
    162
    Occupation:
    CPA / PPC
    Google woodmann, for serious programming discussions. Reverse engineering, game programming. There are many ways to change
    programs, just takes time, and patience. Knowledge is not what
    you carry around in your head or credentials. It is knowing where
    to get the answers when you need them. For example... PHD....
    Post Hole Digger.
     
    • Thanks Thanks x 2
  14. albertb

    albertb Registered Member

    Joined:
    Nov 18, 2008
    Messages:
    53
    Likes Received:
    9
    Yeah, you can view the assembly code of a compiled program. Assembly code is nothing but binary thats why a compiled program can be decompiled into Assembly. Use a debugger like SoftICE or Ollydbg and attach it to the process you want to modify. You can then set breakpoints, modify the code, memory etc. Its not as easy as writing a program in assembly. Takes some time to understand what a piece of code is doing.
     
    • Thanks Thanks x 1