diff --git a/docs/md/development/dump_data.md b/docs/md/development/dump_data.md index 7aeed7d..fb89c1e 100644 --- a/docs/md/development/dump_data.md +++ b/docs/md/development/dump_data.md @@ -21,12 +21,16 @@ To be specific, we make the checks of battleye and certificate checking always r We also add logic for saving received data from the server to save data obtained. We use the "swap exploit" by quickly replacing the assembly when the game starts to load our custom assembly. +To be able to make patches, we deobfuscate the assembly. +But since de4dot isn't capable of understanding the obfuscation algorithm fully, we use an additional specialized deobfuscator command. +In addition, we save the assembly in the gamefiles before making modifications to fix the resolutionscope error. + ## Legenda ```markdown **path** **what** | **example** ------------ | ----------------------------- | ---------------------- -`%gamedir%` | Escape From Tarkov (Live) | `C:/games/EFT (Live)` +`%gamedir%` | Escape From Tarkov (Live) | `C:/games/EFT/ (Live)` ``` ## Requirements @@ -36,45 +40,43 @@ We use the "swap exploit" by quickly replacing the assembly when the game starts - [de4dot](https://dev.offline-tarkov.com/innohurrytocode/de4dot/releases) - [AssetStudio](https://github.com/Perfare/AssetStudio/releases/latest) -## 1. Assembly deobfuscation +## 1. Dumper -1. Go to `%gamedir%/EscapeFromTarkov_Data/Managed/` -2. Copy-paste `Assembly-CSharp.dll` to your de4dot folder -3. Drag `Assembly-CSharp.dll` on top of `de4ot-x64.exe` -4. Open `Assembly-CSharp-cleaned.dll` from the de4dot folder in dnSpy -5. Find the deobfuscation method (appendix 1.1) -6. Run the specialized cleaning command using the token from the deobfuscation method (appendix 1.2) -7. Cut-paste `Assembly-CSharp-cleaned-cleaned.dll` into `%gamedir%/EscapeFromTarkov_Data/Managed/` -8. Open `Assembly-CSharp-cleaned-cleaned.dll` from Managed in dnSpy -9. dnSpy > File > Save Module +1. Copy-paste `%gamedir%/EscapeFromTarkov_Data/Managed/Assembly-CSharp.dll` to your de4dot folder +2. Drag `Assembly-CSharp.dll` on top of `de4ot-x64.exe` +3. Open `Assembly-CSharp-cleaned.dll` in dnSpy +4. Find the deobfuscation method (appendix 1.1) +5. Run the deobfuscate command with the token from the deobfuscation method (appendix 1.2) +6. Cut-paste `Assembly-CSharp-cleaned-cleaned.dll` to `%gamedir%/EscapeFromTarkov_Data/Managed/` +7. Open `Assembly-CSharp-cleaned-cleaned.dll` in dnSpy +8. dnSpy > File > Save Module. +9. Apply dumper patch (appendix 1.3) +10. Apply ssl patch (appendix 1.4) +11. Apply battleye patch (appendix 1.5) +12. dnSpy > File > Save Module -## 2. Create dumper +## 2. Backup -1. Create `%gamedir%/EscapeFromTarkov_Data/Managed/backup/` -2. Copy-paste `Assembly-CSharp.dll` to `%gamedir%/EscapeFromTarkov_Data/Managed/backup/` -3. Rename `Assembly-CSharp.dll` in backup to `Assembly-CSharp.dll.bak` -4. Open `Assembly-CSharp-cleaned-cleaned.dll` from Managed in dnSpy -5. Apply dumper patch (appendix 1.3) -6. Apply ssl patch (appendix 1.4) -7. Apply battleye patch (appendix 1.5) -8. dnSpy > File > Save Module -9. Cut-paste `Assembly-CSharp-cleaned-cleaned.dll` to `%gamedir%/EscapeFromTarkov_Data/Managed/backup/` -10. Rename `Assembly-CSharp-cleaned-cleaned.dll` in backup to `Assembly-CSharp.dll` +1. Create `%gamedir%/backup/` +2. Copy-paste `Assembly-CSharp.dll` to `%gamedir%/backup/` +3. Rename `Assembly-CSharp.dll` in `%gamedir%/backup/` to `Assembly-CSharp.dll.bak` +4. Cut-paste `Assembly-CSharp-cleaned-cleaned.dll` to `%gamedir%/backup/` +5. Rename `Assembly-CSharp-cleaned-cleaned.dll` in `%gamedir%/backup/` to `Assembly-CSharp.dll` ## 3. Dumping server data 1. Open Battlestate Games Launcher 2. Battlestate Games Launcher > settings > close launcher when game starts -3. Copy-paste (wait when prompted to override) `Assembly-CSharp.dll` from backup into `%gamedir%/EscapeFromTarkov_Data/Managed/` -4. Start the game -5. As soon as the launcher closes, override the file -6. When you reached the main menu, the folder `%gamedir%/HTTP_DATA/` will appear -7. Dump the data you need (appendix 2) -8. When the game closed, replace `Assembly-CSharp.dll` with `Assembly-CSharp.dll.bak` +3. Start the game +4. Copy-paste `%gamedir%/backup/Assembly-CSharp.dll` to `%gamedir%/EscapeFromTarkov_Data/Managed/` when the launcher closes +5. `%gamedir%/HTTP_DATA/` appears when you reached the main menu +6. Dump the data (appendix 2) +7. Close the game +8. Replace `Assembly-CSharp.dll` with the original assembly ## 4. Dumping asset data -1. Open AssetStudio +1. Open AssetStudio. 2. AssetStudio > File > Load File > `%gamedir%/EscapeFromTarkov_Data/sharedassets2.assets` 3. Switch from Scene Hierarchy to Asset List 4. AssetStudio > Filter Type > what you look for (example: `TextAsset`) @@ -91,11 +93,11 @@ In order to use it in Aki's database, you have 2 options: The data does contain sensitive information such as you account id, so be careful whom you share it with. `aki-analyzer` strips out the sensitive information when it converts the data to the right format. -And no, the data dumped from the game server cannot be uploaded back to the game server. +And no, the data dumped from the game server cannot be uploaded back to the game server. ## Appendix 1: Code -All code is based on Escape From Tarkov 0.12.8.9819 +All code is based on Escape From Tarkov 0.12.8.9819. ### 1.1. Deobfuscation method in assembly @@ -107,7 +109,7 @@ Class2019.smethod_0() } ``` -### 1.2. Specialized deobfuscation command +### 1.2. Deobfuscation command ```powershell de4dot-x64.exe --un-name "!^<>[a-z0-9]$&!^<>[a-z0-9]__.$&![A-Z][A-Z]\$<>.$&^[a-zA-Z_<{$][a-zA-Z_0-9<>{}$.`-]*$" "Assembly-CSharp-cleaned.dll" --strtyp delegate --strtok 0x0600C93A @@ -154,16 +156,16 @@ This discusses how you can obtain certain data with the dumper installed. ```markdown **Type** | **How** ---------------- | ---------------------------------------------------------------------------------------------------- -Startup locales | Start the game in the locale you want to dump -Game locales | Select the locale in game settings -Common data | Start the game -Assort | Open the trader you want to dump from -Bots | Do an offline raid on a map containing that bot -Item events | Do the specifiic item event -Images | Open the menu containing the image, it's dumped to `%TEMP%\Battlestate Games\EscapeFromTarkov\files` -Location (loot) | Rip from game files -Models | Rip from game files -Textures | Rip from game files -Audio | Rip from game files +--------------- | ----------------------------------------------------------------------------------------------------- +Startup locales | Start the game in the locale you want to dump. +Game locales | Select the locale in game settings. +Common data | Start the game. +Assort | Open the trader you want to dump from. +Bots | Do an offline raid on a map containing that bot. +Item events | Do the specifiic item event. +Images | Open the menu containing the image, it's dumped to `%TEMP%\Battlestate Games\EscapeFromTarkov\files`. +Location (loot) | Rip from game files. +Models | Rip from game files. +Textures | Rip from game files. +Audio | Rip from game files. ```