March 29, 2024, 19:26
bigger smaller reset     1020px Wide width Full width Reset   * *

Gildor's Forums

  Homepage Facebook Read news on Twitter Youtube channel Github page
Welcome, Guest. Please login or register.
Did you miss your activation email?

« previous next »
Print
Author Topic: Lost Ark  (Read 63232 times)
Icos
Newbie
*
Posts: 12


View Profile
« Reply #240 on: February 02, 2024, 21:21 »

Thanks for the link @ethan048. I was hoping spiritovod would also update his custom version of umodel, which supports lostark, though. Looks like it's not the case yet.
Logged
ethan048
Newbie
*
Posts: 8


View Profile
« Reply #241 on: February 05, 2024, 06:30 »

Wow took me over a year but I finally managed to build a .upk decryptor for this game. Now time for some modding.  Cheesy

Great work.
You succeeded in the end.
I want to talk about modding, but I don't think we should talk about modding here.
Can you make a new topic ?
Logged
3dartsro
Newbie
*
Posts: 22


View Profile
« Reply #242 on: February 12, 2024, 22:13 »

hello guys any know lostark extract audio files Sad
Logged
Aurorans
Newbie
*
Posts: 11


View Profile
« Reply #243 on: February 13, 2024, 01:26 »

Spent some time diving into the code to figure out the name obfuscation algorithm. The description from @sylvester334 helped a ton with this, but also cheers to smilegate for leaving the appropriately named FFileManagerWindows::ObfuscateFilename symbol in the EFGame DLL Wink

In short, the names are shifted around by a fixed amount based on the length of the string. Certain characters are first escaped before they are obfuscated, using a pair of characters based on the position % 4 inside the input string. The following table is used for that purpose:

Code:
TABLE = {
    "Q": ["QP", "QD", "QW", "Q4"],
    "-": ["QL", "QB", "QO", "Q5"],
    "_": ["QC", "QN", "QT", "Q9"],
    "X": ["XU", "XN", "XH", "X3"],
    "!": ["XW", "XS", "XZ", "X0"],
}

If Q, -, _, X or ! appear in the input string, they will be replaced by one of these based on the position in the string, % 4. In other words, if the 3rd character (idx = 2) is a _, it will be replaced by QT (since 2 % 4 == 2, TABLE['_'][2] == "QT").

Some examples:

Code:
LV_LUT_Commander_Valtan_Extreme becomes LVQTLUTQ9COMMANDERQTVALTANQTEXNTREME
LV_ELG_Kayangel_ED_01_H         becomes LVQTELGQ9KAYANGELQNEDQN01QNH
SGintro_Warning                 becomes SGINTROQ9WARNING

Afterwards, the ascii values will be rotated according to a simple caesar cipher, where rotation is offset by the length of the escaped string. This works for all strings longer than 20 characters.

For inputs shorter than 20 characters, the input will be padded by adding a `!` and several `.`s until 20 characters are reached. This string is then escaped. The obfuscation loop then overwrites the period characters with earlier emitted characters, roughly according to the following pseudocode:

Code:
if input[i + unpadded_length] == '.' {
  input[i + unpadded_length] = output[i]
}

For deobfuscation of filenames, you simply reverse the shift, undo the escaping (by checking every pair of characters, seeing if they are in the table and the position % 4 matches the expected substitution, and then replacing the pair with the original character), and possibly split by ! if the original input was padded.

Here's an implementation in Rust capable of replicating both obfuscation and deobfuscation, matching 1-to-1 with the values produced by the game: https://gist.github.com/molenzwiebel/284318d9e963672b239f9fca901be89a. The result after renaming is pretty good!



Hello! I'm trying to implement this with the rust-script and rust itself

I run into a build warning when using rust itself. Rust-Script runs it, but doesn't build. Nothing happens when using rust-script name-obfuscation.rs.

Here's my powershell command:

Code:
rust-script name_obfuscation.rs

Running it in the Packages directory also does nothing, even if the script is located in that directory.

I am new to rust, what am I doing wrong?

Logged
d07riv
Newbie
*
Posts: 7


View Profile
« Reply #244 on: February 17, 2024, 01:09 »

any idea about editing EFTable_GameMsg.db?
a small edit works, "too much edits" and the messages in the game starts to glitch and some appears empty, but a "big edit" break the file , well the file is still working ofc , but the game it self stop reading it.
I tried many different sqlite versions, including the same one that is used by Smilegate

I also tried binary edit on the file to not change the sqlite information atall , but this take too much time so I cannot do a "big edit" I could do "too much edits" which made the messages in the game starts to glitch just like when I do "too much edits" in sqlite.
I wonder how LaoTranslation edited the database , also the Chinese currently editing and adding the CN translation up to date.

maybe a custom version of sqlite ?
I would have said that there is something other than the file preventing the process , however incase of the Chinese translation they are only editing the EFTable_GameMsg file and putting it in the font.lpk, so it should be something related only to this file

I also tried to rebuild the EFTable_GameMsg with the same original entries just incase , and it didn't work , the game stop reading it (just like doing a "big edit").
it would help there was a console or an error logs, i did try to find if the game write any error logs , but no luck.

I almost consumed all my ideas , what left is decompiling the game and trying to get the sqlite files and codes from it, which I doubt I would do anytime soon.

am up for any ideas, I need fresh ideas, a fresh mind other than mine ~.

I spent a lot of time investigating this today. It seems that replacing entries in the DB file in a way that leads to an extra page appearing can break the game.

I took GameMsg .db from RU version, which is 120414208 bytes. If I take the entire GameMsg_English table from steam version and run UPDATE FROM statement, the .db grows to 120415232, so 1 page larger. And that breaks all strings in-game.

If I instead add `length(en.MSG) < length(GameMsg.MSG) * 2` condition to the UPDATE statement, the file size does not change and everything works fine. Of course this leads to a lot of untranslated strings, but idk how to deal with it any better.

I'm assuming some updates lead to sqlite reorganizing the tree (as the cells no longer fit within a page) and breaking something. It still loads fine through with the library so something must be wrong with the version the game uses. I tried downgrading sqlite version to match the game (3.9.2 apparently), doesn't help.

It's possible that the CN version does not run into this issue as their strings are generally quite short. Custom LaoTranslation files are also handmade or google translated and should work fine. Only using AGS translations which often have much longer text or different markup is causing this problem.
« Last Edit: February 17, 2024, 02:02 by d07riv » Logged
sader1992
Newbie
*
Posts: 2


View Profile
« Reply #245 on: February 18, 2024, 20:49 »

thank you for the information
for the CN they have a different way to pack the file inside the .lpk , not sure what it is , they insert the game messages database inside the font.lpk instead of replacing the one inside the data2.lpk
so i assume that their way allow them to make the file work anyway.
Logged
3dartsro
Newbie
*
Posts: 22


View Profile
« Reply #246 on: February 19, 2024, 19:56 »

hello guys any know lostark extract audio files ?
Logged
TheDeadNorth
Newbie
*
Posts: 3


View Profile
« Reply #247 on: February 24, 2024, 04:19 »

Am I using an outdated version of UEViewer (LA BUILD) or is the file "LOD9LS7OEDEP1EBMOHOT5O.upk" still not able to be opened?

I've extracted every texture that's able to be extracted and I cannot find the textures for "Engraving Icons" so I just assume they're inside that file.. grrrrr
« Last Edit: February 24, 2024, 04:21 by TheDeadNorth » Logged
Brother
Newbie
*
Posts: 3


View Profile
« Reply #248 on: February 25, 2024, 15:38 »

Hi guys! I have a VK version of a game, their using another method of filenames obfuscation. Any know how to deobfuscating that? Maybe just need a different conversion table?

Example:
      Filename: 9G1MBIV4N1GZZEF4H0RG63S.upk
      Object: mn_cdkbo_00_ani_sk
      Class: SkeletalMesh

I'm uploaded a txt file which contains of all obfuscated names.
https://filebin.net/0m9xcpf33zob5wvw/LostArkNames.txt
« Last Edit: March 01, 2024, 15:40 by Brother » Logged
Brother
Newbie
*
Posts: 3


View Profile
« Reply #249 on: March 01, 2024, 15:40 »

Hmm, not all packages can be scanned...
Quote
LZ4_decompress_safe returned -11
appDecompress: CompSize=17609 UncompSize=47661 Flags=0x44 Bytes=7538 <- DecompressBlock: block=ED+44C9 <- FUE3ArchiveReader::PrepareBuffer <- FUE3ArchiveReader::Serialize <- FArchive::ByteOrderSerialize <- FString<< <- Name: 0 <- UnPackage::LoadNameTable3 <- UnPackage::UnPackage: ReleasePC/Packages/185TDNTNZS9YE9RD21SNDN1C1SYD29C9Y9K.upk, ver=868/16, game=lostark <- UnPackage::LoadPackage(info): ReleasePC/Packages/185TDNTNZS9YE9RD21SNDN1C1SYD29C9Y9K.upk <- ScanContent <- UIMenuItem::HandleCommand <- UIMenu::Popup <- UIBaseDialog::WndProc <- UIBaseDialog::CustomMessageLoop <- UIBaseDialog::ShowDialog: modal=1, title="Choose a package to open" <- CUmodelApp::ShowPackageUI <- Main: umodel_build=1544 based

Version: umodel_lostark_v5.exe / Compiled Jul 7 2023 (build 1544 based) / VK Version of Game
File: https://filebin.net/0m9xcpf33zob5wvw/185TDNTNZS9YE9RD21SNDN1C1SYD29C9Y9K.upk
Logged
TheDeadNorth
Newbie
*
Posts: 3


View Profile
« Reply #250 on: March 07, 2024, 21:29 »

Hi guys! I have a VK version of a game, their using another method of filenames obfuscation. Any know how to deobfuscating that? Maybe just need a different conversion table?

Example:
      Filename: 9G1MBIV4N1GZZEF4H0RG63S.upk
      Object: mn_cdkbo_00_ani_sk
      Class: SkeletalMesh

I'm uploaded a txt file which contains of all obfuscated names.
https://filebin.net/0m9xcpf33zob5wvw/LostArkNames.txt

There was a post where someone wrote a tool in Rust that deobfuscates the filenames. I'm a C# guy and was able to convert it and made my own program to convert the names of the files.

Here's your txt file converted:
https://filebin.net/jj1h2wo70c4bqw5u/deobfuscated.txt
Logged
Serpicos
Newbie
*
Posts: 7


View Profile
« Reply #251 on: March 08, 2024, 20:39 »

having all the names deobfuscated could help with the meshes that miss textures?
Logged
Brother
Newbie
*
Posts: 3


View Profile
« Reply #252 on: March 12, 2024, 23:55 »

TheDeadNorth
> Here's your txt file converted
Wow, thank you!)
Logged
TheDeadNorth
Newbie
*
Posts: 3


View Profile
« Reply #253 on: March 14, 2024, 06:46 »

Np, ill release my program on GitHub when i get the chance to clean it up and make the repo
Logged
shadowy
Newbie
*
Posts: 1


View Profile
« Reply #254 on: March 18, 2024, 11:20 »

Hi y'all, did anyone figure out how to export your lost ark character? I'd imagine it's something along the lines of reading the customization (.cus) files and combining assets in the right places. Are character customization options common across UE or completely unique to Lost Ark? Any help is greatly appreciated!
Logged
Print 
« previous next »
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS