🔒 Locked
can you read computer code?
Advertisement
Original Post
I just wanted to know if anyone knows anyone who can read code, i don''t mean programming code, but the binary code in .exe files, in the Matrix style?
It''s a bit of a stupid question, but i''ve always wondered.
//end
Theoretically, you could try to translate it into hex, and from there try to figure it out. It''s kind of a waste of time, because VC++ comes with a hex utility anyway. How do you think I edited out some cuss words in DOOM?
- DarkMage139
"Real game developers don't change the rules. Real game developers don't break the rules. Real game developers make the rules!"
"Originality (in games) is the spice of life!"
- DarkMage139
"Real game developers don't change the rules. Real game developers don't break the rules. Real game developers make the rules!"
"Originality (in games) is the spice of life!"
Yeah, it''s called a hex editor. It lets you view the thing in hexadecimal form. From there, you use a disassembler to read the asm code (it''s really not that complex to translate from hex to asm). If I knew asm, I''d be able to read it
Then only people who really do this though are generally evil people who call themselves hackers (note: THEY ARE _NOT_ HACKERS) and try to mess with other peoples'' programs. However, this can be good in various ways, but I don''t really feel like going into that right now
If you code it, they will come...
Commander M
http://commanderm.8m.com
cmndrm@commanderm.8m.com
If you code it, they will come...
Commander M
http://commanderm.8m.com
cmndrm@commanderm.8m.com
Hacker \Hack"er\, n.
One who, or that which, hacks. Specifically: A cutting
instrument for making notches; esp., one used for notching
pine trees in collecting turpentine; a hack.
-----------------------------
A wise man once said "A person with half a clue is more dangerous than a person with or without one."
One who, or that which, hacks. Specifically: A cutting
instrument for making notches; esp., one used for notching
pine trees in collecting turpentine; a hack.
-----------------------------
A wise man once said "A person with half a clue is more dangerous than a person with or without one."
quote:
Original post by DarkMage139
How do you think I edited out some cuss words in DOOM?![]()
Wussie
------------------------
Captured Reality.
Hmm, well I could read computer code if I had some sort of chart which told what machine code numbers map to which assembly instruction. But why would I want to? 
Icarus: there might be some, but i'd imagine that it would be virtually unreadable since exe's don't store variable names.
--TheGoop
Edited by - TheGoop on June 17, 2000 6:40:17 PM
Icarus: there might be some, but i'd imagine that it would be virtually unreadable since exe's don't store variable names.
--TheGoop
Edited by - TheGoop on June 17, 2000 6:40:17 PM
quote:
Original post by Icarus
I heard that there are programs which can decompile .exe files into C code. Is this true?
Despite what the programming teacher at my high school believes, I''m pretty sure there are no binary-to-C converters. Of course...the programming teacher at my high school also believes that, using these converters (which, to my knowledge, do not exist), you can convert the .exe file on a SNES cartridge into C code. Not only does he believe this, he accused a friend of mine of performing this very same task.
P h a n t a s m
"I'd feel safer if the helicopter had an ejection seat."
I could read exes in ascii format with the help of a few reference books, except for the invisible characters, and the beep. I haven''t memorized all of the opcode bytes because of how useless it is to do so, and how easily I would be made fun of (Converting decimal to binary in my head in my free time bad enough). But the code in the matrix is nothing like what exes look like in ascii form. In the matrix they made the characters appear in random positions, and fade out to make it look more interesting. The real exes would look like that junk that your printer spits out when it has a bad connection.
About decompilers, decompilers do exist, but they are not as useful as the seem. They usually can only decompile into the orignal language, ie C to C, VB to VB, java to java (it works good for java). Some tricks written in assembly can not be translated into C, even with inline assembly (I''ve used them a few times
). Even after it is translated back, without debug info it''s almost as hard to read as my code. There would be no comments, a lot of the OOP structure would be lost, and all of the function names and variable names wouldn''t be descriptive, ie temp1, temp2, and Func1. Also the compiler makes some optimizations which translate back into different code.
Most SNES games are written in C, so it is concievably possible to get a decompiler for them. But I don''t think SNES cartridges don''t have "exe files," esspecially since they don''t have x86 opcodes.
Phantasm: where are you from? I like proving computer programming teachers wrong, and I''m good at it.
About decompilers, decompilers do exist, but they are not as useful as the seem. They usually can only decompile into the orignal language, ie C to C, VB to VB, java to java (it works good for java). Some tricks written in assembly can not be translated into C, even with inline assembly (I''ve used them a few times
Most SNES games are written in C, so it is concievably possible to get a decompiler for them. But I don''t think SNES cartridges don''t have "exe files," esspecially since they don''t have x86 opcodes.
Phantasm: where are you from? I like proving computer programming teachers wrong, and I''m good at it.
Yes, one could theoretically read an executable file in binary form by hand and tell what it does. Although it would take a calculator, executable file format specifications, and an opcode listing for the processor the executable is compiled for.
This is how some programs can seemingly extract assembly code from the binary executable. All that these programs are doing is translating the opcodes in binary form to their assembly equivalent. For this you''d need a program designed for that purpose.. like SoftICE. If you can understand assembly, then you have a chance of understanding how the program works given it''s assembly output listing.
---
Michael Tanczos
This is how some programs can seemingly extract assembly code from the binary executable. All that these programs are doing is translating the opcodes in binary form to their assembly equivalent. For this you''d need a program designed for that purpose.. like SoftICE. If you can understand assembly, then you have a chance of understanding how the program works given it''s assembly output listing.
---
Michael Tanczos
A friend of mine who knew nothing about programming thought the best way to learn or get a head start on building a program would be to look at the .exe files and reverse engineer them.
I kept trying to impress upon him that that would be rediculous and take more time and effort than simply becoming a brilliant programmer and solving the problems yourself.
Strange, that sentence up there that I wrote has 2 ''thats'' in a row. Is that correct grammar?
How about this one: The food he had had had had a bad taste. Four hads!
I kept trying to impress upon him that that would be rediculous and take more time and effort than simply becoming a brilliant programmer and solving the problems yourself.
Strange, that sentence up there that I wrote has 2 ''thats'' in a row. Is that correct grammar?
How about this one: The food he had had had had a bad taste. Four hads!
I started writing a program which would convert machine code in mnemonics and vise-versa, but I got a bit stuck with the formatting in my reference material, and the CIH virus munched it before I got it finished.
I could write it again (I found better docs), but I''m not sure I can be bothered.
George.
"Who says computer games affect kids, imagine if PacMan affected us as kids, we'd all sit around in a darkened room munching pills and listening to repetitive music....uh oh!"
I could write it again (I found better docs), but I''m not sure I can be bothered.
George.

"Who says computer games affect kids, imagine if PacMan affected us as kids, we'd all sit around in a darkened room munching pills and listening to repetitive music....uh oh!"
Which machine code? And x86 is a lot harder now with the 32 bit opcodes, MMX, 3dnow, and SSE. They have had to make so many additions to it.
For a good time hit Alt-F4! Go ahead try it, all the cool people are doing it.
For a good time hit Alt-F4! Go ahead try it, all the cool people are doing it.
I had a professor in college (a Ph.D. Computer Science, worked in the industry back in the 70's) who is so fluent in HEX, it was like reading and writing English to him.
I use the VC++ HEX editor when I'm reverse engineering something, but I would never actually bother to decipher the instructions.
I always read and step though the disassembly when I'm debugging. You can do this for debug builds, and release builds. You can even attach the debugger to a process (someone else's software like MS Excel) that is running, and then hit the debug break to step into the dissassembly (it almost seems like there is no point to writing my own custom hacking tools).
The real imposible part of decompiling is that you have no symbolics. That is, you don't have function names or variable idenifiers. Without these, well, I guess you're like rain man trying to write poetry or compose a symphony. (If you are that talented and briliant, then why would you need to decompile? just wave your magic wand and make your software work.) There is an exception, .EXEs and .DLLs that are COM servers, have symbolics for thier programming interfaces stored in type libraries.
Here's a tip some of you might already know. Open a game's .EXE or .DLLs with the VC++ resource viewer! (On the VC++ file open dialog you have to select "Open As: Resources"). Now you can see all the statically linked dialog templates, icons, strings, ...
My curiosity has led me to do this to Half-Life, South Park, AOE, ... You might be suprised what you find.
By the way, in my opinion, "Hacking" implies deviant and un-prefessional behavior or even destruction. "Reverse Engineering" implies that I am building or constructing or improving, in any case it's for the good of the cause. Note that to call someone a hack can be seen as derogatory or demoralizing (after they've worked so hard to solve a problem) or even hurt thier career when you say it in front of the wrong people.
Edited by - Marsupial Rodentia on June 22, 2000 2:47:49 PM
I use the VC++ HEX editor when I'm reverse engineering something, but I would never actually bother to decipher the instructions.
I always read and step though the disassembly when I'm debugging. You can do this for debug builds, and release builds. You can even attach the debugger to a process (someone else's software like MS Excel) that is running, and then hit the debug break to step into the dissassembly (it almost seems like there is no point to writing my own custom hacking tools).
The real imposible part of decompiling is that you have no symbolics. That is, you don't have function names or variable idenifiers. Without these, well, I guess you're like rain man trying to write poetry or compose a symphony. (If you are that talented and briliant, then why would you need to decompile? just wave your magic wand and make your software work.) There is an exception, .EXEs and .DLLs that are COM servers, have symbolics for thier programming interfaces stored in type libraries.
Here's a tip some of you might already know. Open a game's .EXE or .DLLs with the VC++ resource viewer! (On the VC++ file open dialog you have to select "Open As: Resources"). Now you can see all the statically linked dialog templates, icons, strings, ...
My curiosity has led me to do this to Half-Life, South Park, AOE, ... You might be suprised what you find.
By the way, in my opinion, "Hacking" implies deviant and un-prefessional behavior or even destruction. "Reverse Engineering" implies that I am building or constructing or improving, in any case it's for the good of the cause. Note that to call someone a hack can be seen as derogatory or demoralizing (after they've worked so hard to solve a problem) or even hurt thier career when you say it in front of the wrong people.
Edited by - Marsupial Rodentia on June 22, 2000 2:47:49 PM
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement