Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Guides & Templates
You last visited: Today at 06:43

  • Please register to post and access all features, it's quick, easy and FREE!

[Guide] How to patch any client into an English client

Discussion on [Guide] How to patch any client into an English client within the SRO Guides & Templates forum part of the Silkroad Online category.

Old   #1
elite*gold: 260
Join Date: Aug 2008
Posts: 526
Received Thanks: 3,347
[Guide] How to patch any client into an English client

Here is a new guide I think a lot of people will find useful. I came up with this one recently after having tried some foreign Silkroad versions and did not want to have to track down an English media.pk2. This should be pretty safe to use for most Silkroad versions, but it might not work out fine on the ones with protections like cSRO and kSRO.

How to patch any client into an English client

I. Purpose

With the release of more and more private servers and the increase in popularity of foreign Silkroad versions, there is a high demand for the ability to play those Silkroad versions in English. However, the current method of turning any given Silkroad version into English requires a lot of PK2 editing and a redistribution of a 50+ MB compressed Media.pk2.

This is very inefficient and generally not that safe. As a result, I have come up with a method that is easy to implement on generally any client that is not protected and would require only a ~3 MB compressed file redistribution. In addition, it would work on any Silkroad that does not currently use protection of their client, such as iSRO, vSRO, and tSRO. I’ve not tested on cSRO or kSRO due to the security they have in place as well as their troublesome registration process.

This guide will show you my method for creating this patch and hopefully eliminate the need for anyone to ever waste time messing with PK2s again for this task!

II. Requirements

This guide is entirely assembly driven. There are no programming concepts needed since I am showing how to do inline patching. If you wanted to make a loader to handle all of this, you can refer to my previous guides for the code and examples of doing so.

In order to be able to follow along this guide, you will need:
• OllyDbg 1.10 (or equivalent)

Of course, once you patch a client it never has to be repatched until a new client is part of an update. Even if the media.pk2 updates but there is no client patch, you are fine!

III. Theory

The game client is a two part shell for Silkroad. The first layer of the shell is PK2 driven. Everything about the game is generally loaded from PK2s now. This includes everything form GUI layouts, to the IDs used in packets, as well as the data used in the client’s algorithms.

The second part of the shell is the hard coded stuff. This generally is anything that is packet related such as how to build packets to send to the server as well as how to parse packets received from the server. Generally speaking, it is a bad idea to reuse an older client on newer versions simply due to this fact. All it takes is one packet change and the server could detect an invalid packet format sent to the server and correlate it with an older version of the client.

We will be modifying the first shell of the client. When it comes to the language features of the client, Silkroad has a very nice design of loading the language from the PK2 files and then loading the corresponding strings in the data files for the client to use. As a result, Silkroad can support multiple languages with the same client with only changes needed in the PK2 files.

However, there is a catch to this. Each version of Silkroad has its own unique language identifier that is used as part of the spawn packet logic, so if you just change the version in the language file for Silkroad, your character might not spawn correctly!

To get around this small problem, I’ve come up with some basic code that will fix that for us and effectively tricks the client into being English, yet still work correctly. We will let the client load the English files, and then set the language flag back to our original so it thinks we are using that language! Sneaky! With that said, let’s get started!

IV. Implementation

For this guide, I’ll be using the tSRO client. You will be able to apply these concepts in any client that is not packed or protected though. I’ve tested with iSRO and vSRO and have had no problems.

The first thing we will do is locate the language logic for the client. This is easy because we just need to search for a client string that is a name of a language, such as English! Load up the client in Olly and right click on the main pane and “Search for -> All referenced text strings”.

In the new window that pops up with all of our strings hit the Home key to go to the top of the list. Right click on the search results and choose: “Search for text”.

In the new search dialog, type in English and hit Ok.

Double click on the first result to get to the client area that has the string.

We are now in the language logic handling section of the client. The way this work is the client loads the PK2 file “type.txt” which contains game specific locale information. The client then checks the strings and will then setup the language settings based on that.

What we will do now is change the logic from using Taiwan to English. Let’s have a closer look at the Taiwan code.

Above is an annotated version of the logic. There are only two things we need to be concerned with. The first thing is the language flag, which for Taiwan is 2 and the second is making sure this logic does not actually execute/ In order to make this logic never execute, we will simply change the JNZ to a JMP to make it so the client always skips over it. We will write down our 2 value for later use. Hit the Spacebar on the JNZ line and change the JNZ text to JMP. When you are done, hit Assemble and you should see the line change.

At this point, the client will never ever load the Taiwan language. We can replicate this for other languages as well simply by changing the JNZ that corresponds to that language to a JMP.

Now we must do the opposite for the English logic. We always want to execute the English language so we have to remove the JNZ. Here’s the second relating to the English language:

Now we can simply remove the JNZ altogether to skip the check and always execute the language specific logic. Simply click on the JNZ light hit Spacebar and change the entire text to NOP and hit Assemble.

Now our client will always load the English language files! We are only half way done though. As a side effect of changing the language, we now have to fix the language flag that the client uses to generate the spawn opcode.

Click on the aqua R icon at the top of Olly to go back to our reference text strings. Hit the Home key again to go to the top of the list. Right click on the main window and choose “Search for text” again and this time type in “CharSelect”.

The first result is not what we want, so hit Ctrl + L to find the next string. When you do, double click on the line to go to the client code. You should arrive in this area:

This is our language flag check to generate the opcode for the client to spawn in game. The 3rd call listed will get the global client settings variable. The next line that checks EAX + 0x160 against 4 is checking to see if our language flag is English. If we are not playing iSRO, this of course turns out to give the wrong results since the language flag changed.

We cannot change anything here, but I wanted to show you how I located the language flag that we saw earlier. If you set a memory break point on that static address, you would end up in the previous language logic we just patched.

It is important to note the address of the 3rd call as well as the next line logic because we will be using that to fake the client! For now, we will go to an area where we can easily make a change in the client code to change the value of this data. I choose one area that seemed best to overwrite as it’s generally note needed.

Click on the aqua R icon at the top of Olly to go back to our reference text strings. Hit the Home key again to go to the top of the list. Right click on the main window and choose “Search for text” again and this time type in “Please Execute”. You should land in this area:

Now scroll down some until you see the next block of logic:

This code will simply register a hotkey, Alt + Enter I believe, not very important compared to being able to play in English We will just NOP all this code so highlight the logic in your client as the previous image shows, right click on it, choose Binary-> Fill with NOPs.

When we are done, we should see a huge NOP sled that replaced all the code.

Finally, we can add in our new logic to trick the client into using the right language flag after the game data files have been loaded! At this point you need to remember the language flag of our original language form before as well as the call address from the global data variable function. The first thing we will do is call the function to get the global data variable and then change the language flag to the desired value.

This is what the original code looked like that we will be referencing from above:

We will simply use this code except rather than comparing the flag we will change the value! Click on the first NOP and hit Spacebar. Type in “CALL 0x04C3D80” and hit assemble. If you are using another Silkroad version, you would use that client’s address of the function.

Now we just need to write the new value, so click on the next empty NOP line and type in ” MOV DWORD PTR DS:[EAX+0x160], 2”. Of course, if the original language flag was different, you would want to use that in place of 2! Here is what the code looks like now:

Now we are all done! It is time to save the changes and test. To save the new client, right click on the main window and choose “Copy to executable->All Modifications”.

In the new dialog that pops up, choose Copy All.

We will get a new window that opens:

In the new window that opens, right click and choose Save File. Type in a new name for the client and hit Save. I choose “[eng]sro_client.exe”. Close Olly now. Go to your Silkroad folder and change your original “sro_client.exe” to “sro_client.exe.bak”. Rename your new client to “sro_client.exe”.

Start the “Silkroad.exe” launcher and start the game. If all goes well, you should see the login screen in English!

Now for the real test, you need to login. If all goes well, you should be able to login, select your character and spawn in game with no problems. Here’s my lovely tSRO character in game in English!

Congratulations! Now you know the method I use to patch clients to make them English. While it may be a bit of work at first, once you get the method down it should be quick to repatch any other client and redistribute that client to others to save on having to download a new Media.pk2.

Just be careful of malicious users that might try to send you fake clients infected! Only perform the patch yourself or download from a verified trusted source!

V. Conclusion

Hopefully by now you understand how to manually edit your client into English rather than the PK2 files. In doing so, you have a new approach to go about playing in English. This method is more advanced than editing the PK2s, but it is a lot faster and simpler and can be easily replicated on any client that does not have protections on it.

I hope you enjoyed this guide, stay tuned for more exiting information! I've been holding off on anything new until after any possibly upcoming client updates are in place, but this one is more relevant for everything but iSRO.

Drew “pushedx” Benton

pushedx is offline  
62 Users
Old 07/07/2009, 16:09   #2
elite*gold: 260
Join Date: Aug 2008
Posts: 526
Received Thanks: 3,347
I just wanted to add that I've tested this and it works fine in sunsro private server. However, their client is really old, so things are not as straight forward. For example, you have to find the GetGlobalData function by looking at other clients to identify a location where it is used. Once you do that though and follow the rest of the guide, you can have an English version. You do need to patch the CRC check on the client though, but that's pretty simple.

Here's an image of the patch for sunsro:

Here is the patch for their CRC check:

With that in hand, you can easily do this guide now for that version. The same applies for any other private server version that uses really old clients, you just have to find the location of the function to call!

pushedx is offline  
9 Users
Old 07/07/2009, 19:09   #3
elite*gold: 20
Join Date: Jul 2007
Posts: 1,617
Received Thanks: 574
I really hope that only a small (that will do it already) amount of knowledge gets over in all our brains you are really doing a great job here.
recking is offline  
1 User
Old 07/08/2009, 01:30   #4
elite*gold: 20
Join Date: Nov 2008
Posts: 1,579
Received Thanks: 716
Now thats a Guide!

Low_Riders is offline  
Old 07/08/2009, 02:22   #5
elite*gold: 20
Join Date: Nov 2008
Posts: 746
Received Thanks: 147
Great As Usual
x_king_x is offline  
Old 07/08/2009, 03:16   #6
elite*gold: 0
Join Date: Sep 2008
Posts: 92
Received Thanks: 32
Argh, I got stuck around the end and the client failed
I must go get my arm scan done now but later I'll try again

Kind Regards
S3RK is offline  
Old 07/13/2009, 00:19   #7
elite*gold: 0
Join Date: Jul 2009
Posts: 2
Received Thanks: 0
Awesome job! Keep it up.
fulcrum9 is offline  
Old 07/18/2009, 14:20   #8

elite*gold: 41
Join Date: Nov 2007
Posts: 3,395
Received Thanks: 2,699
for lazy ppl , done it for sunworld, it's attached.
thx drew for you nice tutorial!would be nice if you could explain a no dc for sunworld too used to do it like it was written in blub22, but dunno which part off the code i should copy now.
kindly regards Yo123
Attached Files
File Type: rar SRO_Clienteng.rar (1.64 MB, 827 views)
Yo123 is offline  
Old 07/28/2009, 22:42   #9
elite*gold: 0
Join Date: Mar 2007
Posts: 77
Received Thanks: 110
Hello drew
nice guide!
But one problem for me: If i patch evrything like you said (tried also other positions to get the byte back) my vSro is now in english
ok so far. But not evrything is in english: All names (NPCs, Items, Masterys, Skills, some Quests) are Vietnamese or ****** up...
its a funny thing if you have the item name not readable but the description...

is there anyone who got the same and knows how to fix it?
wanted to try this to avoid pk2 editing...
hack0r89 is offline  
Old 07/28/2009, 23:25   #10
elite*gold: 260
Join Date: Aug 2008
Posts: 526
Received Thanks: 3,347
Originally Posted by hack0r89 View Post
Hello drew
is there anyone who got the same and knows how to fix it?
wanted to try this to avoid pk2 editing...
I think you made a small mistake somewhere in the process. I just updated VSRO to 1.151 and applied the patch and have not seen any issues with it.

You will want to make sure to NOP the English check, JMP the Vietnam check, and use the right regional byte for VSRO (don't forget the call to load the correct EAX register!).

I've attached the client I just made for you to compare to and hopefully you can see where your client messed up on. If there's a step that's not really clear, just let me know! Hope that helps.
Attached Files
File Type: zip (3.46 MB, 458 views)
pushedx is offline  
4 Users
Old 07/29/2009, 09:44   #11
elite*gold: 4
Join Date: Feb 2009
Posts: 1,270
Received Thanks: 79
This is a great Guide.
Thank you
BloodyUser is offline  
Old 07/29/2009, 11:50   #12
elite*gold: 0
Join Date: Mar 2007
Posts: 77
Received Thanks: 110
i did not use that call
the call just moves an adress in the eax
so i added 0x180 to that adress and used it directly
my first method was:
there is a call after the textdatafiles loading that does nothing (just mov eax,1) and eax is never used
there i placed my code. so nothing important is overwritten.
using your position causes the same problems

maybe my pk2 is ****** up. have the same problems with your client :-(
will dl it again

EDIT: works now. thx
hack0r89 is offline  
Old 08/09/2009, 01:59   #13
elite*gold: 0
Join Date: Dec 2008
Posts: 211
Received Thanks: 52
I get up to the part where i want to change the JNZ on the english part to NOP but it says too many operands.
dueben is offline  
Old 08/09/2009, 19:17   #14
elite*gold: 260
Join Date: Aug 2008
Posts: 526
Received Thanks: 3,347
Originally Posted by dueben View Post
I get up to the part where i want to change the JNZ on the english part to NOP but it says too many operands.
You should just have the JNZ line hilighted, hit space bar, type in NOP, make sure the "Fill with NOPs" box has a check in it and hit Assemble. Your box should look like this:

That should do it for you, but if not, make sure you are doing those steps exactly, not sure why you'd be getting that error otherwise.
pushedx is offline  
Old 08/09/2009, 20:29   #15
elite*gold: 0
Join Date: Dec 2008
Posts: 211
Received Thanks: 52
ok yea i see my mistake now i have one more question which should be it for me....When you do the part where you fill that whole hotkey area with NOPs what exactly do you have to select to fill it?

dueben is offline  

« [Videoguide] Create silkroad server | Silkroad - Beginner Support Quests »

Similar Threads Similar Threads
English Patch for CN client?
08/15/2008 - Dekaron Private Server - 6 Replies
Okay... I was wondering since everything you see on screen (in 2moons) is client based.. If someone translated the names of npcs, items, skills etc.. wouldnt that show on your screen? Example. My bagi gets a new weapon -> 台风 Now translated that is Typhoon. If the name of the item were changed on the client files it would show up as Typhoon on MY screen instead. I am not 100% positive but if someone had a Chinese client modified for english it SHOULD work on pretty much ANY private server...

All times are GMT +2. The time now is 06:43.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2020 elitepvpers All Rights Reserved.