Help? MineSweeper ASM!

Technical Discussions not Related Directly to MHS. For Example, Coding, Hex Editing, General Hacking, Etc.

Moderators: g3nuin3, SpeedWing, WhiteHat

Help? MineSweeper ASM!

Postby tahnsk » Wed Jun 16, 2010 6:52 pm

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
tahnsk
I Have A Few Questions
 
Posts: 5
Joined: Wed Jun 16, 2010 1:49 am

Re: Help? MineSweeper ASM!

Postby L. Spiro » Thu Jun 17, 2010 10:20 am

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
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Re: Help? MineSweeper ASM!

Postby tahnsk » Thu Jun 17, 2010 4:30 pm

The address is not wrong, can you give me example of what should I inject? (Or even try it yourself on the windows minesweeper)
tahnsk
I Have A Few Questions
 
Posts: 5
Joined: Wed Jun 16, 2010 1:49 am

Re: Help? MineSweeper ASM!

Postby L. Spiro » Thu Jun 17, 2010 5:03 pm

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
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Re: Help? MineSweeper ASM!

Postby tahnsk » Thu Jun 17, 2010 6:34 pm

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
tahnsk
I Have A Few Questions
 
Posts: 5
Joined: Wed Jun 16, 2010 1:49 am

Re: Help? MineSweeper ASM!

Postby L. Spiro » Thu Jun 17, 2010 6:57 pm

That is not the code I posted.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Re: Help? MineSweeper ASM!

Postby tahnsk » Thu Jun 17, 2010 7:15 pm

Getting the same error with al instead of eax.
tahnsk
I Have A Few Questions
 
Posts: 5
Joined: Wed Jun 16, 2010 1:49 am

Re: Help? MineSweeper ASM!

Postby L. Spiro » Thu Jun 17, 2010 8:18 pm

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
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan


Return to Technical Unrelated

Who is online

Users browsing this forum: No registered users and 0 guests

cron