#22 Chinese Version (YuanShen) Support?

Open
opened 10 months ago by dfc643 · 23 comments
dfc643 commented 10 months ago

Thanks for the awesome project,
Its very nice.

It seem does not supports the Chinese version,
which named YuanShen from mihoyo offcial website.

which difference to the international version

  • folder stucture not same
  • UnityPlayer.dll not same

patch output

/Genshin Impact Game$ bash ../GI-on-Linux/120/patch.sh
Wrong file version or patch is already applied
md5sum: 56e2e96af341db2b9db07c18cee14b08

strictly abide the rules

  • I have not share this project in official channels
  • I have not abuse this project for cheating
  • I just wanna play the game

LINK REMOVED BY KROCK (after download)

↑↑↑ I will delete it after 48 hours.

Regards,
Pekaikon Norckon

截图录屏_选择区域_20201224173642.png
come to my house to blow the air conditioner tonight

Thanks for the awesome project, Its very nice. It seem does not supports the Chinese version, which named YuanShen from mihoyo offcial website. ### which difference to the international version * folder stucture not same * ```UnityPlayer.dll``` not same ### patch output ``` /Genshin Impact Game$ bash ../GI-on-Linux/120/patch.sh Wrong file version or patch is already applied md5sum: 56e2e96af341db2b9db07c18cee14b08 ``` ### strictly abide the rules * I have not share this project in official channels * I have not abuse this project for cheating * I just wanna play the game *LINK REMOVED BY KROCK (after download)* ↑↑↑ I will delete it after 48 hours. Regards, Pekaikon Norckon ![截图录屏_选择区域_20201224173642.png](https://i.loli.net/2020/12/24/rPxOBLg6sQoJf2k.png) come to my house to blow the air conditioner tonight
iczero commented 10 months ago

Does it work if you remove the hash check? It could be some error messages different or something. Make sure to use an account you don't mind getting banned though.

Does it work if you remove the hash check? It could be some error messages different or something. Make sure to use an account you don't mind getting banned though.
dfc643 commented 10 months ago
Poster

thanks for the memtion,
i dont mind getting banned :D

i have tried remove the hash check,
but still not working.

$ bash ../GI-on-Linux/120/patch.sh
Wrong file version or patch is already applied
md5sum: 56e2e96af341db2b9db07c18cee14b08

[...]

--- Patching UnityPlayer
xdelta3: target window checksum mismatch: XD3_INVALID_INPUT
xdelta3: normally this indicates that the source file is incorrect
xdelta3: please verify the source file with sha1sum or equivalent
==> Patch applied! Enjoy the game.

xdelta3 report errors here.

thanks for the memtion, i dont mind getting banned :D i have tried remove the hash check, but still not working. ``` $ bash ../GI-on-Linux/120/patch.sh Wrong file version or patch is already applied md5sum: 56e2e96af341db2b9db07c18cee14b08 [...] --- Patching UnityPlayer xdelta3: target window checksum mismatch: XD3_INVALID_INPUT xdelta3: normally this indicates that the source file is incorrect xdelta3: please verify the source file with sha1sum or equivalent ==> Patch applied! Enjoy the game. ``` ```xdelta3``` report errors here.
iczero commented 10 months ago

RIP.

Are you unable to use the international version? It has Chinese as a language option and server select has an Asia server (I'm not sure if the Asia server is the same as the china server though).

Download link: https://ys-api-os.mihoyo.com/event/download_porter/link/ys_global/genshinimpactpc/default

Direct link if that doesn't work: https://genshinimpact.mihoyo.com/client_app/launcher/20201223_d3fcf5785e92e37a/GenshinImpact_install_20201211165103.exe

RIP. Are you unable to use the international version? It has Chinese as a language option and server select has an Asia server (I'm not sure if the Asia server is the same as the china server though). Download link: https://ys-api-os.mihoyo.com/event/download_porter/link/ys_global/genshinimpactpc/default Direct link if that doesn't work: https://genshinimpact.mihoyo.com/client_app/launcher/20201223_d3fcf5785e92e37a/GenshinImpact_install_20201211165103.exe
dfc643 commented 10 months ago
Poster

thank you for the fast reply,

unfortunately,
the asian server is for all of asia without china,
due to chinese law and payment.

i can play chinese version in cloud gamming service,
but have a little bit of frame loss

and thanks for your suggestion,
maybe transform to international server is another choice.

thank you for the fast reply, unfortunately, the asian server is for all of asia without china, due to chinese law and payment. i can play chinese version in cloud gamming service, but have a little bit of frame loss and thanks for your suggestion, maybe transform to international server is another choice. ![HH5OJF95GE`FE__N~_R5L2Y.jpg](https://i.loli.net/2020/12/24/36e1b7jWdKPDwo4.jpg)
Krock commented 10 months ago
Owner

Are you sure this is the 1.2.0 binary? Its timestamp is 09 Dec, rather than the official release date of 23 Dec.

Progress (editing gradually)

  • This is 1.2.0
  • Largely identical
  • A few data blobs changed
  • The changes at binary offset 0x01A7F600 are due to their obfuscation tool (random?)
  • Changed certificates
  • Important addresses are the same
  • CN UnityPlayer is compatible with the international version

We can try to use the globally accepted values, maybe they work on all servers.

EDIT99: need some more time.

Are you sure this is the 1.2.0 binary? Its timestamp is 09 Dec, rather than the official release date of 23 Dec. **Progress** (editing gradually) * This is 1.2.0 * Largely identical * A few data blobs changed * The changes at binary offset 0x01A7F600 are due to their obfuscation tool (random?) * Changed certificates * Important addresses are the same * CN UnityPlayer is compatible with the international version We can try to use the globally accepted values, maybe they work on all servers. EDIT99: need some more time.
Krock commented 10 months ago
Owner

@dfc643 With some luck this patch here should work. https://www.privfile.com/download.php?fid=5fe488e5343c3-NDk4NQ==

Please report back whether this results in the error code 31-4302.

@dfc643 With some luck this patch here should work. https://www.privfile.com/download.php?fid=5fe488e5343c3-NDk4NQ== Please report back whether this results in the error code 31-4302.
dfc643 commented 10 months ago
Poster

@Krock Thanks for your soooo quickly reply!

i am make sure thats 1.2.0 (in downloader title shows)
i will try this patch and reply soon :D

@Krock Thanks for your soooo quickly reply! i am make sure thats 1.2.0 (in downloader title shows) i will try this patch and reply soon :D
dfc643 commented 10 months ago
Poster

@Krock yeh the new patch it works!
but its really reports error 31-4302

i modified laucnher.bat like this

@echo off

REM ============ AVOID CHANGES HERE ============

REM Emulate the games behaviour
copy mhyprot2.sys "%TEMP%\"
regedit mhyprot2_running.reg

REM Disable crash reporting
IF EXIST YuanShen_Data\upload_crash.exe (
	move "YuanShen_Data\upload_crash.exe" "YuanShen_Data\upload_crash.exe.bak"
)

REM ============= Launch the game =============
REM Add custom launch params here
REM https://docs.unity3d.com/Manual/CommandLineArguments.html

YuanShen.exe

and there two new domain detected from my router

log-upload.mihoyo.com
ys.mihoyo.com

the china standard time is 10:11 pm now,
if i have no reply, i will test and reply after 8 hours.

and MERRY XMAS !!!!

8856eac7gy1ffaq0u9psyg204x04xq54.gif

@Krock yeh the new patch it works! but its really reports error 31-4302 ### i modified laucnher.bat like this ``` @echo off REM ============ AVOID CHANGES HERE ============ REM Emulate the games behaviour copy mhyprot2.sys "%TEMP%\" regedit mhyprot2_running.reg REM Disable crash reporting IF EXIST YuanShen_Data\upload_crash.exe ( move "YuanShen_Data\upload_crash.exe" "YuanShen_Data\upload_crash.exe.bak" ) REM ============= Launch the game ============= REM Add custom launch params here REM https://docs.unity3d.com/Manual/CommandLineArguments.html YuanShen.exe ``` ### and there two new domain detected from my router ``` log-upload.mihoyo.com ys.mihoyo.com ``` the china standard time is 10:11 pm now, if i have no reply, i will test and reply after 8 hours. ### and MERRY XMAS !!!! ![8856eac7gy1ffaq0u9psyg204x04xq54.gif](https://i.loli.net/2020/12/24/JFyT4jQGY5sRkNc.gif)
Krock commented 10 months ago
Owner

So to get your version running you'd need to check whether UserAssembly.dll is the same (as in addresses), run the game on a Windows machine, and dump the correct values from memory. If you know how assembly/pointers/Cheat Engine works we could give that a try, otherwise try to use the international version somehow, or play it in the cloud.

Merry Christmas.

So to get your version running you'd need to check whether UserAssembly.dll is the same (as in addresses), run the game on a Windows machine, and dump the correct values from memory. If you know how assembly/pointers/Cheat Engine works we could give that a try, otherwise try to use the international version somehow, or play it in the cloud. Merry Christmas.
dfc643 commented 10 months ago
Poster

Morning,

thats sorry,
i donot know how to dump from memory.

here is chinese version dl link:
https://ys-api.mihoyo.com/event/download_porter/link/ys_cn/official/pc_default
https://autopatchcn.yuanshen.com/client_app/launcher/20201223_0e73b7176043c3a1/yuanshen_setup_mihoyo_20201211012054.exe

if you dont mind,
i repost this issue to bbs.deepin.org linux forum
to get someone helps?

if you need a account to do the test,
i can provide one.

Merry Christmas

Morning, thats sorry, i donot know how to dump from memory. here is chinese version dl link: https://ys-api.mihoyo.com/event/download_porter/link/ys_cn/official/pc_default https://autopatchcn.yuanshen.com/client_app/launcher/20201223_0e73b7176043c3a1/yuanshen_setup_mihoyo_20201211012054.exe if you dont mind, i repost this issue to ```bbs.deepin.org``` linux forum to get someone helps? if you need a account to do the test, i can provide one. Merry Christmas
Krock commented 10 months ago
Owner

How many people are interested in this? How bad is the cloud service?

Patching the international version already takes a few hours of work and a good amount of nerves. Thus I am not keen setting up another (Chinese) game variant on my machine. However, only if...

  1. there are multiple people IN NEED for this patch
  2. and the cloud service sucks somewhat
  3. and there's a working Windows setup with Admin access I could use for a few hours

.. then I might set up the patch files for you.

Otherwise decompile your UserAssembly version, read out the hash values on a working Windows machine and complete the patch I sent earlier.

Or tweak your cloud service for better gameplay, if that is possible.

That's all I can offer. Sorry for being so direct, but I cannot find a better way to express myself.

How many people are interested in this? How bad is the cloud service? Patching the international version already takes a few hours of work and a good amount of nerves. Thus I am not keen setting up another (Chinese) game variant on my machine. However, only if... 1. there are multiple people *IN NEED* for this patch 2. and the cloud service sucks somewhat 3. and there's a working Windows setup with Admin access I could use for a few hours .. then I might set up the patch files for you. Otherwise decompile your UserAssembly version, read out the hash values on a working Windows machine and complete the patch I sent earlier. Or tweak your cloud service for better gameplay, if that is possible. That's all I can offer. Sorry for being so direct, but I cannot find a better way to express myself.
dfc643 commented 10 months ago
Poster

hello,
thank you do a lot things of the project

there so many linux user want play in china,
the cloud service is expensive (2 rmb/hrs) and slowly...

that i am a linux server maintenance staff,
isnt know more things of reverse engineering.

but i think repost the issue to chinese linux forum,
there will have someone can helps to finish the patch of chinese version.

i think that is the best way if you not mind.

hello, thank you do a lot things of the project there so many linux user want play in china, the cloud service is expensive (2 rmb/hrs) and slowly... that i am a linux server maintenance staff, isnt know more things of reverse engineering. but i think repost the issue to chinese linux forum, there will have someone can helps to finish the patch of chinese version. i think that is the best way if you not mind.
Krock commented 10 months ago
Owner

@dfc643 Feel free to ask for volunteers on the deepin forums. My conditions will remain the same as stated above.

Please keep in mind that each public mention of this repository increases the chances for miHoYo to find it.

EDIT: Interesting domains. I did not capture those in Wireshark, hence I don't know whether they need blocking.

@dfc643 Feel free to ask for volunteers on the deepin forums. My conditions will remain the same as stated above. Please keep in mind that each public mention of this repository increases the chances for miHoYo to find it. EDIT: Interesting domains. I did not capture those in Wireshark, hence I don't know whether they need blocking.
dfc643 commented 9 months ago
Poster

@Krock Happy New Year,
Thats looooooong time no see due to my works.

I tried ask for somebody at deepin forum,
https://bbs.deepin.org/post/209242
and using wrong character instead the game name.

the two domains is report from my router traffic list.

@Krock Happy New Year, Thats looooooong time no see due to my works. I tried ask for somebody at deepin forum, https://bbs.deepin.org/post/209242 and using wrong character instead the game name. the two domains is report from my router traffic list.
vero commented 9 months ago

How do you find addresses for patching? I managed to find first function, but can't figure out location for second one. Any tips?

How do you find addresses for patching? I managed to find first function, but can't figure out location for second one. Any tips?
Krock commented 9 months ago
Owner

@vero I re-uploaded the skeleton patch to the repository just now. <-- contains all basic functions you need.

EDIT: Instructions removed from this post. Please write me an email

If you're successful, the game will crash before showing the 7 element symbols after login. If you got that far, try to apply the anti_logincrash patch or migrate that to the CN version as well.

EDIT3 (I think?): If you found all addresses you can use byte matching to find the functions in the next release -- given they did not add any additional hurdles.

@vero I re-uploaded the skeleton patch [to the repository](https://notabug.org/Krock/GI-on-Linux/src/master/120/patch_files/unityplayer_patch_cn.vcdiff) just now. <-- contains all basic functions you need. **EDIT: Instructions removed from this post. Please write me an email** If you're successful, the game will crash before showing the 7 element symbols after login. If you got that far, try to apply the anti_logincrash patch or migrate that to the CN version as well. EDIT3 (I think?): If you found all addresses you can use byte matching to find the functions in the next release -- given they did not add any additional hurdles.
Alex72 commented 7 months ago

Chinese version 1.4.0 is already available for pre-download:

https://autopatchcn.yuanshen.com/client_app/pc_mihoyo/20210317_67c8f1002bb26672/YuanShen_1.4.0.zip

Maybe it's worth looking at in preparation for global 1.4.0?

(Feel free to delete/edit this message if you think it's dangerous in some way. I think it's not, but your word is last here, @Krock.)

Chinese version 1.4.0 is already available for pre-download: `https://autopatchcn.yuanshen.com/client_app/pc_mihoyo/20210317_67c8f1002bb26672/YuanShen_1.4.0.zip` Maybe it's worth looking at in preparation for global 1.4.0? (Feel free to delete/edit this message if you think it's dangerous in some way. I think it's not, but your word is last here, @Krock.)
Krock commented 7 months ago
Owner

@Alex72 Thank you for the input. Whereas this would allow some preparation, it would only cause more effort to partially decompile the international version afterwards. Not worth the hassle IMO.

@Alex72 Thank you for the input. Whereas this would allow some preparation, it would only cause more effort to partially decompile the international version afterwards. Not worth the hassle IMO.
Alex72 commented 7 months ago

Actually with a bit of magic you can get a global version:

https://autopatchhk.yuanshen.com/client_app/pc_mihoyo/20210317_67c8f1002bb26672/GenshinImpact_1.4.0.zip

Actually with a bit of magic you can get a global version: `https://autopatchhk.yuanshen.com/client_app/pc_mihoyo/20210317_67c8f1002bb26672/GenshinImpact_1.4.0.zip`

i have replaced all the modified files,it doesn't work.

but i find you can replace 20527480.blk change to chinese version.

so I uploaded the file to the mega

https://mega.nz/file/6pwwSAYL#-4ssj9vXCYE9hlqfdMnl1OPtMts0rf4vmK64nVrdt6g

i have replaced all the modified files,it doesn't work. but i find you can replace 20527480.blk change to chinese version. so I uploaded the file to the mega https://mega.nz/file/6pwwSAYL#-4ssj9vXCYE9hlqfdMnl1OPtMts0rf4vmK64nVrdt6g
Krock commented 5 months ago
Owner

The Chinese server uses slightly different binary files which need another patch file in order to join the game.

Simply copying files from the international version won't let you enter the CN game server. Would you mind elaborating what's special about this *.blk file?

The Chinese server uses slightly different binary files which need another patch file in order to join the game. Simply copying files from the international version won't let you enter the CN game server. Would you mind elaborating what's special about this *.blk file?
Alex72 commented 1 month ago

20527480.blk contains channel config (dispatch server URL) as well as logging servers URLs and some other stuff.

Technically it may be possible to swap it between CN and global versions to make it connect to the server it's not supposed to, but I can't confirm nor deny this. Probably you'll need to patch asset_index too, because it contains hash of all assets used in the game.

`20527480.blk` contains channel config (dispatch server URL) as well as logging servers URLs and some other stuff. Technically it may be possible to swap it between CN and global versions to make it connect to the server it's not supposed to, but I can't confirm nor deny this. Probably you'll need to patch `asset_index` too, because it contains hash of all assets used in the game.
Krock commented 1 month ago
Owner

Furthermore it would require to modify the client name to match the international version, or the sent login data would be highly suspicious. It it were that simple, an /etc/hosts rule might work too once UnityPlayer.dll is patched.

It could be that the international server domains are blocked in China, unless proven otherwise, it might be only wasted effort.

Furthermore it would require to modify the client name to match the international version, or the sent login data would be highly suspicious. It it were that simple, an `/etc/hosts` rule might work too once UnityPlayer.dll is patched. It could be that the international server domains are blocked in China, unless proven otherwise, it might be only wasted effort.
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.