iniitl;a commit

This commit is contained in:
SEGA CORPORATION 2022-07-12 15:57:08 -04:00
commit 492c079215
Signed by untrusted user who does not match committer: SEGA
GPG key ID: 825D2D66108A4F0E
86 changed files with 225 additions and 0 deletions

View file

@ -0,0 +1,7 @@
Possible crackproof decrypter made by @skyan, @Maji tested it and it decrypted ongeki 1.35's main exe + uni+'s main exe and both ran fine
afaik and from what ive seen/tested, some amdaemon exes cant be decrypted
(Edit: maji decrypted ongeki's amdaemon and it worked: "the game boots and connects to aqua")
I tried it on initial D the arcade's main exe, and it does an error called 0xc0000005, so some other exes might not boot

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,15 @@
odd.sys (crackproof driver) for umamusume, you can edit the string of the driver with the one needed for whatever game you're trying to run.
to figure out the string, run the game via a debugger, at a certain point, it will crash and it will tell you which string it's looking for
Obfuscated HEX:
E8 85 FA FF FF 48 8D 4C 24 50
Deobfuscated HEX :
48 74 73 79 73 6D 36 45 38 43
Raw Text : Htsysm6E8C
8D 4C 24 50 would be the hex which would be edited with the string of the game you're trying to run. you have to obfuscate the string after finding it(dont know how to do it yet)

View file

@ -0,0 +1,42 @@
╔═════════════════════╗
SEGA Decryption Guide
╚═════════════════════╝
╭─────────╮
app files
╰─────────╯
1. create a new file titled <PCB CODE>.bin
2. fill in the first 16 bytes of <PCB CODE>.bin with
the AES key. (e.g. 9D 0B BA 20 D1 E8 4F 24 59 39 9F 53 83 BE EE 72)
3. the next 16 bytes will be the NTFS header (EB 52 90 4E 54 46 53 20 20 20 20 00 10 01 00 00)
the NTFS header is always the same
4. save this file, then decrypt the app files with the following command:
fsdecrypt <PCB CODE>.bin 0x200000 <path/to/app> <out.vhd>
5. once it finishes decrypting, run the calculate_iv.py script
save the output of key 1. script is found here: https://discord.com/channels/162861213309599744/243895668790394882/995170669329391706
6. open <PCB CODE>.bin inside the hex editor once more, replace the NTFS header with
the key 1
7. run "fsdecrypt <PCB CODE>.bin 0x200000 <path/to/app> <out.vhd>" once more
8. your app is now decrypted, you can extract the internal_0 with poweriso or any other tool
╭─────────╮
opt files
╰─────────╯
1. decrypt the opt file using fstools with the following command:
fstool dec OPT.bin in.opt out.vhd
2. run the calculate_iv.py script and save key 3
script is found here: https://discord.com/channels/162861213309599744/243895668790394882/995170669329391706
3. replace the IV key of the OPT.bin with key 3, the IV key of OPT.bin are the second 16 bytes
4. decrypt the opt file once more with the new key

View file

@ -0,0 +1,39 @@
# Get the IV key from OPT.bin (this is the second 16 bytes of the file)
# decrypt the .opt using OPT.bin and get the first 16 bytes of the vhd. this is key1
# key1 xor EB769045584641542020200000000000 (exfat file header) this will give you key2
# key2 xor OPT IV key -> key3
# replace OPT.bin's IV with key3 and decrypt
import os
import glob
#function for taking bytes and xor'ing them
def byte_xor(ba1, ba2):
return bytes([_a ^ _b for _a, _b in zip(ba1, ba2)])
print("You must decrypt the opt first using fstools and the OPT.bin\nPlace everything in the same directory\nONLY HAVE ONE VHD IN THE DIRECTORY AT A TIME")
cwd = os.getcwd()
#necessary because i couldn't figure out how else to do this, it's the exfat header duh
with open(str(cwd) + "/exfat.bin", "rb") as f:
exfat_HEADER = f.read(-1)
print("exFAT Header = " + str(exfat_HEADER.hex()))
#reads all bytees from OPT.bin then saves bytes (17, 32) and converts it to hexadecimal
with open(str(cwd) + "/OPT.bin", "rb") as f:
opt_IV = f.read(-1)
opt_IV = opt_IV[16:]
print("OPT IV = " + str(opt_IV.hex()))
#puts all files with .vhd extension in a list, then pulls the first one in the list, will read first 16 bytes and convert to hexadecimal
placeholder = glob.glob("*.vhd")
vhd = str(placeholder[0])
with open(str(cwd) + "/" + vhd, "rb") as f:
key1 = f.read(16)
print("key1 =" + str(key1.hex()))
#calculates key 2 and key 3 then converts to hex
key2 = byte_xor(key1, exfat_HEADER)
print("key2 = " + str(key2.hex()))
key3 = byte_xor(key2, opt_IV)
print("key3 = " + str(key3.hex()))

View file

@ -0,0 +1,2 @@
i saw some of you guys were struggling with calculating the key3 so i went ahead and wrote a script for you all that does it for you. no external libraries are used, everything is just python3
exfat.bin is necessary, it stores the exfat header within it

Binary file not shown.

Binary file not shown.

BIN
tools/Filesystem/fstool.exe Normal file

Binary file not shown.

View file

@ -0,0 +1,6 @@
1.Create SDDT.bin with 16 bytes of 0 written in the iv key
2.Decrypt only the first 16 bytes once with fsdecrypt or fstool
3.The first 16 bytes of the decrypted file is the iv key
1.创建SDDT.bin在iv键中写入16个字节的0
2.用fsdecrypt或fstool只对前16个字节进行一次解密
3.解密后的文件的前16个字节是iv密钥