Page 1 of 1

Help? MineSweeper ASM!

PostPosted: Wed Jun 16, 2010 6:52 pm
by tahnsk
I'll show you two asm injections I made, can you tell me please what is wrong with the second one?


Change number of flags left to 5 - WORKING
Code: Select all
mov eax, 5
mov dword ptr ds:[01005194], eax



Change the timer INSTRUCTION that "inc" the timer to another instruction that "dec" the timer - NOT WORKING (Process Crashes)
inc [0100579c] TO dec [0100579c] ; 579C05FF TO 579C0DFF
Code: Select all
mov eax, 579C0DFF
mov dword ptr ds:[01002FF5], eax

Re: Help? MineSweeper ASM!

PostPosted: Thu Jun 17, 2010 10:20 am
by L. Spiro
Knowledge Base is not for asking questions. Moved.


There could be anything wrong with your second injection.
Did you overwrite something you should not have?
Is the address correct? I guarantee either the address or the size of the data you are writing is wrong.
You will never write a DWORD to a non-multiple-of-four address.
Either you should be writing a BYTE, or your address is wrong.


L. Spiro

Re: Help? MineSweeper ASM!

PostPosted: Thu Jun 17, 2010 4:30 pm
by tahnsk
The address is not wrong, can you give me example of what should I inject? (Or even try it yourself on the windows minesweeper)

Re: Help? MineSweeper ASM!

PostPosted: Thu Jun 17, 2010 5:03 pm
by L. Spiro
You just said the address was 0100579C, then posted code for 01002FF5.

01002FF5 is wrong for a DWORD, which is 99.99% of the time on a DWORD-aligned address (0xXXXXXXX0, 0xXXXXXXX4, 0xXXXXXXX8, or 0xXXXXXXXC).

Why are you writing 579C0DFF to it?
579C05FF + 1 = 579C0600.

Why not:
Code: Select all
mov al, 0Dh
mov byte ptr ds:[01002FF6], al
?


L. Spiro

Re: Help? MineSweeper ASM!

PostPosted: Thu Jun 17, 2010 6:34 pm
by tahnsk
When I use this code:

Code: Select all
mov    eax,0Dh
mov byte ptr ds:[01002FF6],eax


I'm getting this error in fasm:

Code: Select all
Error: invaild name.
Instruction: mov byte ptr ds:[01002FF6],eax

Re: Help? MineSweeper ASM!

PostPosted: Thu Jun 17, 2010 6:57 pm
by L. Spiro
That is not the code I posted.


L. Spiro

Re: Help? MineSweeper ASM!

PostPosted: Thu Jun 17, 2010 7:15 pm
by tahnsk
Getting the same error with al instead of eax.

Re: Help? MineSweeper ASM!

PostPosted: Thu Jun 17, 2010 8:18 pm
by L. Spiro
I don’t have FASM, but it works in MHS’s Auto-Assembler.
FASM is just being picky.


Code: Select all
mov al 0D
mov [01002FF6], al

Code: Select all
mov al 0Dh
mov [01002FF6], al

Code: Select all
mov al 0Dh
mov byte ptr [01002FF6], al



Play with it until it works.


L. Spiro