Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newbie Hex Introduction + Edit Solid Colors
#1
[] 
I know, in this area I still feel like a noob =P

Sometimes, people ask, how you change the colors that are not stored in a bitmap (which themselves are integrated in the exe as socalled "Resources"). If you've never heard about hex yet, it's time to get into the matter now. Let's get started :)

LF2 was programmed in C, a language that looks like this:
Code:
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    printf("Hello World!\n");
    return EXIT_SUCCESS;
}

Well, this would be the raw code, but for a computer, a code file is not more than a useless bunch of letters. To give the computer the information that it needs to work with, you need to compile the code. Compiling = making the code unreadable for humans but very readable for the computer.
Now, our program has become something totally different. You can't really edit it anymore (except you have knowledge of hex-editing) and it's a pretty secure way of hiding algorithms.

To get back to our topic, get the exe ready (probably it's a good idea to make a backup in case you get something wrong). Then, open the hex-editor of your choice (if you don't have any, go >here<). Paste the exe in there, and you'll see a bunch of random numbers, between 00 and FF.
00-FF? Yes, this is the hexadecimal system, our common decimal system has (as you hopefully know) 10 different digits, the hexadecimal system (latin ftw!) has 16 different digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. So, FF is the same like 255 in decimal system.
Now we need another tool to work with: FarbHexe. It sounds funny, works simple but thus is easy to use. You can download it from the link a few lines ago. Start FarbHexe and then LF2 (actually, the order doesn't really matter). You have this typical blue background that doesn't really fit if you have, for example an orange skin in progress. So, we need a nice, orange color. Now, hover over the background and read what FarbHexe says:
10 20 6c
Well, that sounds promising. Go back to the hex editor, and search for the value. But if you'll look for 10206c (I'd recommend no space if you search for hex), you'll be disappointed. The problem is that not every color is in RGB (Red,Green,Blue). There are also some things in BGR (the devil knows why...). What you're ought to do is just switch the value from 10206c to 6c2010. And, surprise, you'll get a 6c2010! If you have 1.9c as a basis, the value should be in line 26ec, on the e-th place. Convenient-wise you'd write it as an offset: 26ece (For the lf2-patcher, you should add the zeros in front, so 00026ece). Let's change it to orange. I'll take this color. Since it's BGR, you have to write it as 0088FF. Be sure to have the exe already closed, so that you can save your result!
Save the change, and you should have an orange background at the start screen.

You can do the same with any color that you can't find in the bitmaps. However, you should first search for RGB, if the supposed change doesn't work at any offset, try to search for BGR.

I know, this was a lot matter for such a simple thing, I just tried to write it in a way that people with absolutely no knowledge of hex can understand it ;)

Hope this helps :)
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#2
i havent understood one word
thats not your fault its my
i'm not good in english
Reply
Thanks given by:
#3
Hm, doesn't that mean you can un-compile it back to C?
Reply
Thanks given by:
#4
(08-13-2008, 04:52 PM)Deus Ex Machina Wrote:  Hm, doesn't that mean you can un-compile it back to C?

nope, that doesn't work. Basically, an exe could've been programed in any language but the result looks the same. Just to make it short, no, it's not possible, otherwise there would be, for example, a gazillion windows-like operating systems :p
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#5
Nobody would bother duplicating Windows ^_^
Reply
Thanks given by:
#6
(08-20-2008, 05:52 AM)Deus Ex Machina Wrote:  Nobody would bother duplicating Windows ^_^

True, true, but copying games for example or complicated algorithms used in a bunch of programs... exe-files are pretty hard to replicate.
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#7
my problem is when i search for
6c2010 it cant find it

im not sure im usinge the proper editor
Reply
Thanks given by:
#8
(09-14-2008, 09:21 AM)jamaal Wrote:  my problem is when i search for
6c2010 it cant find it

im not sure im usinge the proper editor

Are you really using a hex editor? And are you looking for hex? These numbers appear in hex, not in the ascii column.
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#9
oooo thxx
i was searching the wrong column for the hex

another question
how can you change the password in the new lf2 exe (2.0)
Reply
Thanks given by:
#10
(08-13-2008, 05:46 PM)Blue-Phoenix Wrote:  a gazillion windows-like operating systems :p

And a gazillion more more bugs
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)