Results 1 to 12 of 12
  1. #1
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool

    GetUnicodeBytesFromChar Improvements

    The function GetUnicodeBytesFromChar (shown at the very below) is a really Ugly and rather in-efficient function using way more performance than is actually required. I was playing around with my hack tried to find an alternative to the function.

    The Improved function is much faster because of the reasons below:

    • Switch statements loses performance over 7 switched (x86 Architecture thing)
    • The function uses reference for the output which is proven to be faster because no memory have to be created.
    • Because this function is not so simple it can easily be inline meaning no memory have to be copied somewhere then read elsewhere for each character.
    • It also gain performance because x86 architecture is familiar with multiplying by 4(32 bits, 4 Bytes) and can do this very fast.
    • Its short nice code that is not filled with cases



    Code:
    void GetUnicodeBytesFromChar(char curChar, WORD& bOut)
    {
        bOut = (WORD)curChar * 4;
    }
    It's actually pretty simple crack for this ugly function.
    Code:
    void GetUnicodeBytesFromChar(int curChar, BYTE *bOut)        {
                if (!bOut) return;
    
    
                switch (curChar)
                {
                case ' ': bOut[0] = 0x80; bOut[1] = 0x00; break;
                case '0': bOut[0] = 0xC0; bOut[1] = 0x00; break;
                case '1': bOut[0] = 0xC4; bOut[1] = 0x00; break;
                case '2': bOut[0] = 0xC8; bOut[1] = 0x00; break;
                case '3': bOut[0] = 0xCC; bOut[1] = 0x00; break;
                case '4': bOut[0] = 0xD0; bOut[1] = 0x00; break;
                case '5': bOut[0] = 0xD4; bOut[1] = 0x00; break;
                case '6': bOut[0] = 0xD8; bOut[1] = 0x00; break;
                case '7': bOut[0] = 0xDC; bOut[1] = 0x00; break;
                case '8': bOut[0] = 0xE0; bOut[1] = 0x00; break;
                case '9': bOut[0] = 0xE4; bOut[1] = 0x00; break;
    
    
                case 'A': bOut[0] = 0x04; bOut[1] = 0x01; break;
                case 'B': bOut[0] = 0x08; bOut[1] = 0x01; break;
                case 'C': bOut[0] = 0x0C; bOut[1] = 0x01; break;
                case 'D': bOut[0] = 0x10; bOut[1] = 0x01; break;
                case 'E': bOut[0] = 0x14; bOut[1] = 0x01; break;
                case 'F': bOut[0] = 0x18; bOut[1] = 0x01; break;
                case 'G': bOut[0] = 0x1C; bOut[1] = 0x01; break;
                case 'H': bOut[0] = 0x20; bOut[1] = 0x01; break;
                case 'I': bOut[0] = 0x24; bOut[1] = 0x01; break;
                case 'J': bOut[0] = 0x28; bOut[1] = 0x01; break;
                case 'K': bOut[0] = 0x2C; bOut[1] = 0x01; break;
                case 'L': bOut[0] = 0x30; bOut[1] = 0x01; break;
                case 'M': bOut[0] = 0x34; bOut[1] = 0x01; break;
                case 'N': bOut[0] = 0x38; bOut[1] = 0x01; break;
                case 'O': bOut[0] = 0x3C; bOut[1] = 0x01; break;
                case 'P': bOut[0] = 0x40; bOut[1] = 0x01; break;
                case 'Q': bOut[0] = 0x44; bOut[1] = 0x01; break;
                case 'R': bOut[0] = 0x48; bOut[1] = 0x01; break;
                case 'S': bOut[0] = 0x4C; bOut[1] = 0x01; break;
                case 'T': bOut[0] = 0x50; bOut[1] = 0x01; break;
                case 'U': bOut[0] = 0x54; bOut[1] = 0x01; break;
                case 'V': bOut[0] = 0x58; bOut[1] = 0x01; break;
                case 'W': bOut[0] = 0x5C; bOut[1] = 0x01; break;
                case 'X': bOut[0] = 0x60; bOut[1] = 0x01; break;
                case 'Y': bOut[0] = 0x64; bOut[1] = 0x01; break;
                case 'Z': bOut[0] = 0x68; bOut[1] = 0x01; break;
    
    
                case 'a': bOut[0] = 0x84; bOut[1] = 0x01; break;
                case 'b': bOut[0] = 0x88; bOut[1] = 0x01; break;
                case 'c': bOut[0] = 0x8C; bOut[1] = 0x01; break;
                case 'd': bOut[0] = 0x90; bOut[1] = 0x01; break;
                case 'e': bOut[0] = 0x94; bOut[1] = 0x01; break;
                case 'f': bOut[0] = 0x98; bOut[1] = 0x01; break;
                case 'g': bOut[0] = 0x9C; bOut[1] = 0x01; break;
                case 'h': bOut[0] = 0xA0; bOut[1] = 0x01; break;
                case 'i': bOut[0] = 0xA4; bOut[1] = 0x01; break;
                case 'j': bOut[0] = 0xA8; bOut[1] = 0x01; break;
                case 'k': bOut[0] = 0xAC; bOut[1] = 0x01; break;
                case 'l': bOut[0] = 0xB0; bOut[1] = 0x01; break;
                case 'm': bOut[0] = 0xB4; bOut[1] = 0x01; break;
                case 'n': bOut[0] = 0xB8; bOut[1] = 0x01; break;
                case 'o': bOut[0] = 0xBC; bOut[1] = 0x01; break;
                case 'p': bOut[0] = 0xC0; bOut[1] = 0x01; break;
                case 'q': bOut[0] = 0xC4; bOut[1] = 0x01; break;
                case 'r': bOut[0] = 0xC8; bOut[1] = 0x01; break;
                case 's': bOut[0] = 0xCC; bOut[1] = 0x01; break;
                case 't': bOut[0] = 0xD0; bOut[1] = 0x01; break;
                case 'u': bOut[0] = 0xD4; bOut[1] = 0x01; break;
                case 'v': bOut[0] = 0xD8; bOut[1] = 0x01; break;
                case 'w': bOut[0] = 0xDC; bOut[1] = 0x01; break;
                case 'x': bOut[0] = 0xE0; bOut[1] = 0x01; break;
                case 'y': bOut[0] = 0xE4; bOut[1] = 0x01; break;
                case 'z': bOut[0] = 0xE8; bOut[1] = 0x01; break;
    
    
                case '}': bOut[0] = 0xF4; bOut[1] = 0x01; break;
                case '˛': bOut[0] = 0xC8; bOut[1] = 0x02; break;
                case 'ł': bOut[0] = 0xCC; bOut[1] = 0x02; break;
                case '{': bOut[0] = 0xEC; bOut[1] = 0x01; break;
                case '[': bOut[0] = 0x6C; bOut[1] = 0x01; break;
                case ']': bOut[0] = 0x74; bOut[1] = 0x01; break;
                case '~': bOut[0] = 0xF8; bOut[1] = 0x01; break;
                case '\\': bOut[0] = 0x70; bOut[1] = 0x01; break;
                case '|': bOut[0] = 0xF0; bOut[1] = 0x01; break;
                case 'µ': bOut[0] = 0xD4; bOut[1] = 0x02; break;
                case '@': bOut[0] = 0x00; bOut[1] = 0x01; break;
                case '€': bOut[0] = 0x00; bOut[1] = 0x02; break;
                case '=': bOut[0] = 0xF4; bOut[1] = 0x00; break;
                case '!': bOut[0] = 0x84; bOut[1] = 0x00; break;
                case '"': bOut[0] = 0x88; bOut[1] = 0x00; break;
                case '§': bOut[0] = 0x9C; bOut[1] = 0x02; break;
                case '$': bOut[0] = 0x90; bOut[1] = 0x00; break;
                case '%': bOut[0] = 0x94; bOut[1] = 0x00; break;
                case '&': bOut[0] = 0x98; bOut[1] = 0x00; break;
                case '/': bOut[0] = 0xBC; bOut[1] = 0x00; break;
                case '(': bOut[0] = 0xA0; bOut[1] = 0x00; break;
                case ')': bOut[0] = 0xA4; bOut[1] = 0x00; break;
                case '*': bOut[0] = 0xA8; bOut[1] = 0x00; break;
                case ';': bOut[0] = 0xEC; bOut[1] = 0x00; break;
                case '_': bOut[0] = 0x7C; bOut[1] = 0x01; break;
                case ':': bOut[0] = 0xE8; bOut[1] = 0x00; break;
                case '\'': bOut[0] = 0x9C; bOut[1] = 0x00; break;
                case '?': bOut[0] = 0xFC; bOut[1] = 0x00; break;
                case '°': bOut[0] = 0xC0; bOut[1] = 0x02; break;
                case '`': bOut[0] = 0x80; bOut[1] = 0x01; break;
                case '>': bOut[0] = 0xF8; bOut[1] = 0x00; break;
                case '^': bOut[0] = 0x78; bOut[1] = 0x01; break;
                case '+': bOut[0] = 0xAC; bOut[1] = 0x00; break;
                case '-': bOut[0] = 0xB4; bOut[1] = 0x00; break;
                case ',': bOut[0] = 0xB0; bOut[1] = 0x00; break;
                case '.': bOut[0] = 0xB8; bOut[1] = 0x00; break;
                case '#': bOut[0] = 0x8C; bOut[1] = 0x00; break;
                case 'ß': bOut[0] = 0x7C; bOut[1] = 0x03; break;
                case '<': bOut[0] = 0xF0; bOut[1] = 0x00; break;
    
    
                default: bOut[0] = 0xFC; bOut[1] = 0x00; break;//'?'
                }
            }
    Last edited by topblast; 12-31-2013 at 02:14 PM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  2. The Following 3 Users Say Thank You to topblast For This Useful Post:

    arun823 (01-01-2014),[MPGH]Flengo (12-31-2013),OpKilts (12-31-2013)

  3. #2
    B4NDiT26's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    1,010
    Reputation
    26
    Thanks
    32
    My Mood
    Shocked
    Thanks for sharing. I think there's no need to explain, after see it a coder should understand... I don't cuz I don't know a lot of c++, just basic level

  4. #3
    XarutoUsoCrack's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    CFAL Honra & Glória Server
    Posts
    1,087
    Reputation
    51
    Thanks
    2,482
    My Mood
    Relaxed
    i think i already seen a something like that in Gellin base our another hack base here.

  5. #4
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by XarutoUsoCrack View Post
    i think i already seen a something like that in Gellin base our another hack base here.
    idk, didnt spend to much time on those base

    Quote Originally Posted by B4NDiT26 View Post
    Thanks for sharing. I think there's no need to explain, after see it a coder should understand... I don't cuz I don't know a lot of c++, just basic level
    Ok, I will explain it then.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  6. #5
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,322
    My Mood
    Doh
    lol your doing the S2S better than even Doobic Studio's original S2S code XD

    commando: You're probably the best non-coder coder I know LOL


  7. The Following User Says Thank You to supercarz1991 For This Useful Post:

    topblast (01-03-2014)

  8. #6
    Relax1977's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    30
    Reputation
    10
    Thanks
    4
    how to use it?

  9. #7
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by Relax1977 View Post
    how to use it?
    If you use a spammer, that is how you use it, there is an image of the code Right about.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  10. #8
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,322
    My Mood
    Doh
    Quote Originally Posted by topblast View Post


    If you use a spammer, that is how you use it, there is an image of the code Right about.
    i don't think you need to worry about blanking out your ID's because most have been released public. just sayin

    commando: You're probably the best non-coder coder I know LOL


  11. #9
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by supercarz1991 View Post
    i don't think you need to worry about blanking out your ID's because most have been released public. just sayin
    But not in direct images
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  12. #10
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,322
    My Mood
    Doh
    Quote Originally Posted by topblast View Post


    But not in direct images
    that's what i was talking about was on your image lol

    commando: You're probably the best non-coder coder I know LOL


  13. #11
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by supercarz1991 View Post
    that's what i was talking about was on your image lol
    i meant people don't have the source in images posted online, its mostly in a file you have to download and extract
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  14. #12
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,322
    My Mood
    Doh
    Quote Originally Posted by topblast View Post


    i meant people don't have the source in images posted online, its mostly in a file you have to download and extract
    oh that makes sense. never mind

    commando: You're probably the best non-coder coder I know LOL


Similar Threads

  1. Direct X 10 improved gamming
    By llvengancell in forum WarRock - International Hacks
    Replies: 7
    Last Post: 09-11-2007, 09:08 PM
  2. Help to improve my hack
    By Elliwood in forum WarRock - International Hacks
    Replies: 3
    Last Post: 06-06-2007, 11:48 AM
  3. [Vid] Wallhax Improved By Me
    By castaway in forum WarRock Korea Hacks
    Replies: 16
    Last Post: 05-28-2007, 11:22 AM
  4. Radio improvements
    By poker in forum Entertainment
    Replies: 2
    Last Post: 05-25-2007, 02:03 AM
  5. new sig (needs improvement)
    By ace76543 in forum Art & Graphic Design
    Replies: 8
    Last Post: 03-15-2007, 07:34 AM