Valhalla Legends Forums Archive | Assembly Language (any cpu) | Where to start?

AuthorMessageTime
Networks
I was wondering if anyone experienced can point me in the right direction as to where I can start learning about overall game hacking and cracking. Things to do or not to do. Places to learn. Is it just practice or what? Are eBooks helpful? Thank you in advance.
October 24, 2005, 2:01 PM
Myndfyr
Chances are good you'll need to be familiar with disassembly tools.  I'd suggest picking up Hacker Disassembling Uncovered -- it's very good.  If you search, you might find an e-book on here that someone posted before.  *shrug*
October 24, 2005, 3:37 PM
Quarantine
Let's see..learn ASM ;).
October 24, 2005, 9:18 PM
Twix
I started learning asm off stuff I like for example Starcraft because I understood how Starcraft works so i could follow the disassembly code and understand where it was trying to go.
October 25, 2005, 3:29 PM
Networks
I understand some things, I've learned basics, I was really just curious what was the best method for learning.
October 27, 2005, 1:51 PM
Quarantine
Learn how parameters are passed to the stack and how to read them. Also learn how code is translated to ASM through C.

Try converting ASM -> C and vice versa. Start off simple and gradually get better.

You will also want to get good with a debugger (such as softice or windbg) and a dissasembler (IDA)
October 27, 2005, 2:17 PM
noob
Start by disassembling to learn assembler in higher-level terms. It helps to become familiar with debugging and reverse engineering to some extent. Games are generally complex monsters, so start off small with some trivial "Hello World"s and similar.
November 16, 2005, 1:50 AM
Quarantine
Learn how Direct3D works and OpenGL, learn about the Windows API in depth for you will need it to hijack the process and hook into all your functions.
November 16, 2005, 2:20 AM
noob
Also, don't bother with any books on ASM. They teach you bad habits. Learn on your own.

Write something, for example:

[code]
int main(void)
{
  printf("string\n");
  return 0;
}
[/code]

and gcc with -S:

[code]
        .file  "asdf.c"
        .section        .rodata
.LC0:
        .string "string\n"
        .text
.globl main
        .type  main, @function
main:
        pushl  %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        andl    $-16, %esp
        movl    $0, %eax
        subl    %eax, %esp
        movl    $.LC0, (%esp)
        call    printf
        movl    $0, %eax
        leave
        ret
[/code]

Learn how functions are called, how conditionals are evaluated and acted upon, etc. Since you're interesting in game hacking, which is largely disassembling, knowing how certain chunks of C code looks in assembler is key. You don't really have to understand ASM deeply, just know what to look for.
November 16, 2005, 4:26 AM
Dan
[quote author=noob link=topic=13091.msg134200#msg134200 date=1132115214]
Also, don't bother with any books on ASM. They teach you bad habits. Learn on your own.

Write something, for example:

[code]
int main(void)
{
  printf("string\n");
  return 0;
}
[/code]

and gcc with -S:

[code]
        .file  "asdf.c"
        .section        .rodata
.LC0:
        .string "string\n"
        .text
.globl main
        .type  main, @function
main:
        pushl  %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        andl    $-16, %esp
        movl    $0, %eax
        subl    %eax, %esp
        movl    $.LC0, (%esp)
        call    printf
        movl    $0, %eax
        leave
        ret
[/code]

Learn how functions are called, how conditionals are evaluated and acted upon, etc. Since you're interesting in game hacking, which is largely disassembling, knowing how certain chunks of C code looks in assembler is key. You don't really have to understand ASM deeply, just know what to look for.
[/quote]
I dont agree with you there. E-books and books are a great resource for learning. Learning off generated code from a C compiler wont teach you how to optimize your code. And it never hurts to have a good understanding of ASM, programs may be written in ASM and not C (or even a different langauge) so you wont know what you're looking at becuase the code wasnt generated from the compiler you're familiar with.
November 19, 2005, 6:34 PM
Myndfyr
I think at the end of the day, the most absolutely critical thing to understand is how to address memory.  Because that's all you have in assembly, not silly things like variables.  (This isn't always 100% true, but :P)

IIRC Intel-based processors have 16 different addressing modes.  It's utter insanity.

I have a book on Intel assembly if you want it Networks.  It was from the intro to assembly class at ASU.
November 23, 2005, 8:34 AM
Quarantine
You can order thier official manuals for free! Ordered book 3 :)

iirc most modern OSes use "Virtual Flat" model. No segentation, linear adresing, virtual memory. Don't think hed have to worry about any of that though.(Intel Sys programming section 3.4
November 23, 2005, 4:22 PM
Myndfyr
[quote author=Warrior link=topic=13091.msg135142#msg135142 date=1132762927]
You can order thier official manuals for free! Ordered book 3 :)

iirc most modern OSes use "Virtual Flat" model. No segentation, linear adresing, virtual memory. Don't think hed have to worry about any of that though.(Intel Sys programming section 3.4
[/quote]

Maybe so, but they support them because processors do.  Knowing [ds:4fh] means 0x4f bytes off the start of the data segment is handy.
November 23, 2005, 7:21 PM
Networks
Well a little update for me, I cracked my first worthy program. :) (Not a crackme)

For those who want to learn, this is where I got started:

- http://www.crack-mes.de
- http://www.exetools.com

- Get some basic ASM tutorials
- Be famaliar with your debugger
- Do crack-mes's
- Try to physically understand what the asm code is doing, make sense of it.

- Read up on some Reverse engineering eBooks/books.

Reading lots of cracking tutorials is extremely helpful, just search around.
January 3, 2006, 11:49 PM

Search