ASM Injection crashes my game

Need Help With an Existing Feature in Memory Hacking Software? Ask Here

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

ASM Injection crashes my game

Postby trialusert » Mon Aug 31, 2009 3:18 am

Look at this code part:
Image

If I NOP the selected function, it changes to:
Image

This way everything works good. The problem appears when I try to inject a "NOP" using the code injector, like this:

1. Before the change (why are there two question marks by the way?)
Image

2. After the change (question marks deleted)
Image

When I do that, the game crashes after a few seconds. I wonder why this is happening? Is this a bug?
User avatar
trialusert
NULL
 
Posts: 155
Joined: Tue May 20, 2008 6:19 pm

Postby L. Spiro » Mon Aug 31, 2009 7:44 am

You only injected 1 NOP when it requires 2.


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

Postby trialusert » Mon Aug 31, 2009 3:23 pm

Even with 2 nops the game keeps crashing... By the way, what are those question marks?
User avatar
trialusert
NULL
 
Posts: 155
Joined: Tue May 20, 2008 6:19 pm

Postby L. Spiro » Mon Aug 31, 2009 4:06 pm

I do not know what the question marks are.

But your injection is wrong on principle.


It needs to be:

Code: Select all
0x005F8A91 :
nop
nop



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

Postby trialusert » Mon Aug 31, 2009 6:04 pm

Exactly what I did. Keeps crashing. I believe it's some kind of a bug
User avatar
trialusert
NULL
 
Posts: 155
Joined: Tue May 20, 2008 6:19 pm

Postby L. Spiro » Mon Aug 31, 2009 6:30 pm

That is not what you posted.

I would be surprised if my ASM failed whereas the NOP tool worked, since they work the same exact way. In the end, they both use one WriteProcessMemory() with 2 0x90 values at the given address.

The reason clicking Next gives you a preview is not only so you can copy the codes for your own uses but also so you can verify the code to be injected.


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

Postby trialusert » Mon Aug 31, 2009 6:35 pm

I meant that I also tried to inject the code you wrote, but the game still crashed... That's pretty wierd. The game is C&C Tiberium Wars
User avatar
trialusert
NULL
 
Posts: 155
Joined: Tue May 20, 2008 6:19 pm

Postby WhiteHat » Tue Sep 01, 2009 1:13 pm

Perhaps because the codes around the one you’re injecting are SSE ASM codes ? Maybe that is the reason those question marks came up...

To make a far jump, the injection code needs 5 bytes which are in your case here would have to reside in: 0x5F8A91 to 0x5F8A95. Since MHS has not yet able to translate SSE ASM, the OverwrittenCode part were failed to translate the bytes in 0x5F8A93 to 0x5F8A95.

To make it work try to change those question marks into the bytes they are suppose to be. This steps may work:
- Open MHS Hex Editor and Note the 3 bytes within 0x5F8A93 to 0x5F8A95.
- Replace the “??” into “db 0xXX 0xYY 0xZZ” where XX, YY, ZZ are those bytes you get from the first step.


By seeing your screen shot you may want to replace those question mark to:
Code: Select all
db 0xF3 0x11 0x0F

or
Code: Select all
db 0xF3 0x0F 0x11


Either one of them should works...

Correct me if i’m wrong... (whoa, my 700th posts)..
.. to boldly go where no eagle has gone before...
User avatar
WhiteHat
Elang Djawa
 
Posts: 1059
Joined: Fri Jul 21, 2006 12:49 pm
Location: Away for a while...

Postby trialusert » Wed Sep 02, 2009 7:43 am

Thank you WhiteHat, I'll check that soon and report back.
User avatar
trialusert
NULL
 
Posts: 155
Joined: Tue May 20, 2008 6:19 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 0 guests