Selamat datang ke
Osem Forum Komuniti!

Sila klik Login untuk masuk atau
klik Register untuk pendaftaran baru.
Latest topics
» New Release (Daily Update)
Mon Jul 25, 2016 10:46 am by bayu_inzaghi

» Trumbo (2015)
Fri Jul 15, 2016 7:12 am by bayu_inzaghi

» Solace (2015)
Thu Jul 14, 2016 10:36 am by bayu_inzaghi

» Courage (2015)
Tue Jul 12, 2016 7:50 pm by bayu_inzaghi

» Ronaldo (2015)
Mon Jul 11, 2016 7:22 am by bayu_inzaghi

» The Witch (2015)
Sat Jul 09, 2016 10:20 pm by bayu_inzaghi

» Jeruzalem (2015)
Sat Jul 09, 2016 12:37 am by bayu_inzaghi

» Intruders (2015)
Fri Jul 08, 2016 12:40 am by bayu_inzaghi

» Moonwalkers (2015)
Thu Jul 07, 2016 11:03 am by bayu_inzaghi

December 2018

Calendar Calendar

MHS Auto-Assemble Works\C++ Version Fails

Go down

MHS Auto-Assemble WorksC++ Version Fails

Post by mezzo on Wed Jun 06, 2012 10:44 am

I'm working on a new game, and it seems to dislike being hacked. (It shouldn't have any protection aside from DMA, it's a NoCD.)

I used your Auto-Assemble feature to produce an identical patch to one I am applying from C++, and yours works, while mine fails. ? (Crashes)

I've checked the debugger, and my patch is being applied, and looks just like yours. So I don't get it, are you catching errors or something? (The game uses SEH functions, lot's of them, could this be an issue? My hooks should be fine, I use the same code for other games without issues. It always writes my patches perfectly.)

Also, if it helps, I'm using MS Detours for some stuff, and I have this issue with it. (This method also works fine in other games.)

    DWORD __stdcall Hook_Tester(DWORD value)
      DWORD res = Real_Tester(value);
        Log(value); // Prints to console.
      return res;

That code works fine.

DWORD __stdcall Hook_Tester(DWORD value)
return Real_Tester(value);

This version crashes the game. (All my Detours have this issue, if I make any changes before calling the original function, it crashes the game.)


So is any of this ringing any bells? I can show you any code you need to see, etc,. I just didn't want to flood this post with excess info, since I don't know what's relevant. (Never had this issue before.)

I thought I was corrupting the stack\registers, etc, but I tried pushad\popad\pushfd\popfd, I checked my version against yours, etc,. I can't figure out what the problem is.


Edit: Also, casting functions to pointers, and invoking them crashes the game too. (This also works fine in other games.)

The only thing I can think of, is, that you are applying some sort of fix, that I'm not, or something. As far as causes, I was reading about SEH, and it appears to make a copy of the stack, and compares it against the original to look for exceptions, that's what I think is causing this.

Sir Hacks Alot
Limited Osem Member
Limited Osem Member

Posts : 66
Treasure : 102
Reputation : 10
Join date : 03/06/2012
Location : Kyiv, Ukraine

View user profile

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum