[How to]Fix Sin/Ranger Exploit

08/29/2012 08:45 JohnHeatz#1
Hi everyone; I know I have posted a file with this already fixed here:

[Only registered and activated users can see links. Click Here To Register...]

But I feel like giving the information as of how to do it yourself; this just for the ones wanting to know, as most of the server owners know how to do this, or have gotten files with it already fixed; yet, having the information is never bad, at least, I believe.

So let's start.

Once again, you will need a [Only registered and activated users can see links. Click Here To Register...] and some back-ups of your ps_game.exe.

The fix is quite easy, all you have to do is look for the following strings:
  • 0F B6 84 3E 9D 01 00 00 8B 4B 30 0F B7 54 41 52 01 97 D8 12 00 00
  • 0F B6 97 A2 01 00 00 8B 46 30 0F B7 4C 50 52 29 8F D8 12 00 00 0F
  • 0F B7 D1 01 97 D8 12 00 00 EB 09 0F B7 C9 01 8F FC 12 00 00 83 C0
  • 0F B7 D0 29 97 D8 12 00 00 EB 3F 0F B7 C0 29 87 FC 12 00 00 8B 87
  • 0F B7 51 52 29 90 D8 12 00 00 0F B7 51 58 29 90 DC 12 00 00 0F B7
  • 0F B7 51 52 01 90 D8 12 00 00 0F B7 51 58 01 90 DC 12 00 00 0F B7
  • 0F B6 94 3B 9D 01 00 00 8B 46 30 0F B7 4C 50 5E 29 8F E0 12 00 00
  • 0F B6 D0 8B 43 30 0F B7 4C 50 5E 01 8F E0 12 00 00 0F B6 94 3E 9D

Now, before these strings you will find the values 70 [XX], with XX being two characters forming some Hexadecimal value (they can be different from one line to another, so don't worry about it), for example, the first line would be:

Code:
70 [XX] 0F B6 84 3E 9D 01 00 00 8B 4B 30 0F B7 54 41 52 01 97 D8 12 00
Now, to fix the exploit, all you have to do is change the 70 [XX] to 90 90, so after doing the change on the first line, it will end up being like this:

Code:
[COLOR="Red"][B]90 90[/B][/COLOR] 0F B6 84 3E 9D 01 00 00 8B 4B 30 0F B7 54 41 52 01 97 D8 12 00
Just remember, these lines are separate one from another, so, while searching, you must do it one-by-one.
08/29/2012 19:18 Aveline#2
i always wonder how do ppl analyze this kinda stuff and find the right codes o.o
08/29/2012 22:24 JohnHeatz#3
Well, most of the work for this was done by a retired member under the name of [GM]Father, based on his work is that most fixes are done, as well as LPH's work.
09/01/2012 00:43 thetruestarr1337#4
Thank you John.
And BTW, nice new Signature
09/01/2012 23:57 ..Zeus..#5
  1. Very Nice thank you
12/01/2012 15:13 jhoonyboy#6
please, can not I apply their corrections JohnHeatz, this ps-game.exe is episode 3 could help me fix the bug ranger?
ps_game.exe
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
12/01/2012 19:49 JohnHeatz#7
Currently I don't have my computer, and will not have it until next Friday (probably) so I can't really check on it right now, if no one has helped with it by the time I get my computer back, I'll give it a shot
02/19/2013 21:09 jhoonyboy#8
waiting.... :D
05/25/2013 16:46 jhoonyboy#9
Quote:
Originally Posted by JohnHeatz View Post
Currently I don't have my computer, and will not have it until next Friday (probably) so I can't really check on it right now, if no one has helped with it by the time I get my computer back, I'll give it a shot

please JohnHeatz, I'm still trying a solution, but I had no success maybe you can help me?
05/25/2013 19:12 JohnHeatz#10
I'm sorry I forgot about this, plus I've stopped any and every development for Shaiya for the time being, maybe some of those "super developers" get to help you...yet known some of them would probably simply charge you for the work, hopefully one of the real developers get to help you for free
05/26/2013 15:02 castor4878#11
does the file loaded at [Only registered and activated users can see links. Click Here To Register...] is actually working??

at first view, it seems that it was patched but bytes '00 00' were used instead of '90 90'.
'90' is the opcode for 'NOP' (no operations) '00' is ADD r/m8,r8

if you have a backup of a 100% clean ps_game, compare it with this one, if they differ, use the right opcode (90) to fix the bug.
if they are identical, the instructions to clear (the 70 xx which means "Jump by xx bytes If Overflow") is not applicable due to the actual coding (may be the test is before, of after or in a diffrent part of the worflow or simply doesn't exist -- and the right answer can not be guess w/o analysis of significant part of the code); in this case, if the bug must be fixed, I would suggest you to use a episo 4+ ps_game.exe (u may have to upgrade the skills table (and npcskill.sdata) but nothing hard, nothing unknown).