TALES OF HEARTS R *.l7c

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

TALES OF HEARTS R *.l7c

Post by sigroon365 »

Hi, I'm trying to unpack tohdata.l7c file.
In the '_CodeSignature' folder, I found some key value.
However, I'm not sure whether it needs or not to unpack the *.l7c file.

Code: Select all

<key>tohdata.l7c</key>
<data>
7trYUY9YxDnMoV46/dNx5xkl8hY=
</data>


I found some meaningful value.

200h data 0.file
10C00h data 1.file
52CDA200h Last data
52D7325Ah Header Offset?
52D73262h data 0 offset => 00 02 00 00 F3 BD D8 7B 36 06 01 00 C2 C5 01 00 02 00 00 00 02 00 00 00
52D7327Ah data 1 offset => 00 0C 01 00 2C 1C 09 9A C5 06 01 00 C2 C5 01 00 04 00 00 00 02 00 00 00
52D73292h data 2 offset => 00 14 02 00 62 9C C8 8D 7E 25 01 00 C2 C5 01 00 06 00 00 00 02 00 00 00
52D732AAh data 3 offset => 00 1C 03 00 0F 2F F0 9F 5F 04 01 00 C2 C5 01 00 08 00 00 00 02 00 00 00
52DE7212h Last data offset => 00 A2 CD 52 CD 41 A2 17 DD 88 00 80 00 00 00 00 5F 80 00 80 00 00 01 00
52DE722Ah Unkown new value Start
52E50DC8h File or Dir Name?

Header Information - 52 E9 CB FD [Total Size] = 52 CF C0 62 [Sub Total Data 1] + 00 1A 0B 9B [Sub Total Data 2]

Code: Select all

idstring "L7CA"
get UNK1 long
get Total_Size long
get Sub_Total_Data 1 long
get Sub_Total_Data 2 long
get UNK2 long
...

I don't know what 6A 4F 00 00 17 02 00 00 53 4D 00 00 76 D3 00 00 33 BE 04 00 05 00 00 00 means yet.
Image

data 0.file Start at 200h
Image

data0 offset => 00 02 00 00 means 200h
Image

Last data offset and Unkown new value Start
Image

Dir or file name..?
Image

Hmm.. I don't know Size and ZSize value and the number of files yet.
Data File https://drive.google.com/file/d/0B8JGJb-FRy_bX2RYZ2RIYzhEOG8/view?usp=sharing
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: TALES OF HEARTS R *.l7c

Post by sigroon365 »

I found more information.

Header information
1) 52 E9 CB FD [Total Size] = 52 CF C0 62 [Sub Total Data 1] + 00 1A 0B 9B [Sub Total Data 2]
2) 00 00 4F 6A(= Size of tohdata_DATA2_01.l7c / 18h) = 00 00 02 17 + 00 00 4D 53
3) Don't know what 00 00 02 17 means yet.
4) 00 00 4D 53 = Size of tohdata_DATA2_02.l7c(73FC8h) / 18h = # of files.
5) 00 00 D3 76 = Size of tohdata_DATA2_03.l7c(69BB0h) / 8h
6) 00 04 BE 33 =Size of tohdata_DATA2_04.l7c(file name)
Image

And, I cut tohdata.l7c File from 52CFC062h to End of the file.
Rename it tohdata_DATA2.l7c the size of this is already known 00 1A 0B 9B [Sub Total Data 2]

And I think it reads 18h patterns. Not sure what it means ecxept ID value. 0000 to 4D52 = # of Files;4D53h
Image
...
Image

Code: Select all

Patterns
FF FF FF FF 92 49 C2 B4 00 00 00 00 00 00 00 00 40 8B BB 03 19 7D CE 01
FF FF FF FF BD F2 19 25 06 00 00 00 00 00 00 00 CC 08 48 AD 15 7D CE 01
00 00 00 00 2C 56 4E 4A 06 00 00 00 17 00 00 00 80 AB B6 D0 E6 72 CE 01
01 00 00 00 B1 60 7D ED 06 00 00 00 1F 00 00 00 80 AB B6 D0 E6 72 CE 01
02 00 00 00 C2 B3 F6 9E 06 00 00 00 27 00 00 00 00 42 4F D1 E6 72 CE 01
...
50 4D 00 00 85 9D 4A 27 96 B1 04 00 0C BE 04 00 80 D2 6F A0 84 70 CE 01
51 4D 00 00 AC D6 35 5E 96 B1 04 00 19 BE 04 00 80 76 5B 1E 58 58 CE 01
52 4D 00 00 14 09 02 48 96 B1 04 00 26 BE 04 00 80 A3 8C 1F 58 58 CE 01


Ok.. It means name offset.
00 00 00 00 => 17 00 00 00
01 00 00 00 => 1F 00 00 00
02 00 00 00 => 27 00 00 00
...
52 4D 00 00 => 26 BE 04 00

Start of File Information. ★Confirmed. Total Size 73FC8h = 18h * 4D53h
Image

Code: Select all

3C 09 01 00 C2 C5 01 00 00 00 00 00 02 00 00 00 00 02 00 00 F3 BD D8 7B
3C 09 01 00 ZSIZE
C2 C5 01 00 SIZE
00 00 00 00 Null
02 00 00 00 UNK2
00 02 00 00 Offset
F3 BD D8 7B UNK3

=> Pattern
36 06 01 00 C2 C5 01 00 02 00 00 00 02 00 00 00 00 0C 01 00 2C 1C 09 9A
C5 06 01 00 C2 C5 01 00 04 00 00 00 02 00 00 00 00 14 02 00 62 9C C8 8D
...
20 A2 02 00 A0 B0 07 00 67 D3 00 00 08 00 00 00 00 FE CA 52 04 6F 83 D9
62 1E 02 00 C0 65 06 00 6F D3 00 00 07 00 00 00 00 A2 CD 52 CD 41 A2 17


File offset end. And start of Unknown.
Image

Unkown end. And start of Dir and file name. - Length value + name. ★Confirmed
Image
Last edited by sigroon365 on Fri May 01, 2015 10:21 am, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: TALES OF HEARTS R *.l7c

Post by aluigi »

I did everything except the compression:
http://aluigi.org/papers/bms/others/tales_of_hearts.bms
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: TALES OF HEARTS R *.l7c

Post by sigroon365 »

aluigi wrote:I did everything except the compression:
http://aluigi.org/papers/bms/others/tales_of_hearts.bms


Thanks a lot! I also found some values in embedded.mobileprovision file. Would it be compression key?
Here is remain files. https://www.sendspace.com/file/29pnh1

Code: Select all

<data>
      MIIFyDCCBLCgAwIBAgIIKqDsnqSaRewwDQYJKoZIhvcNAQEFBQAwgZYxCzAJ
      BgNVBAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBs
      ZSBXb3JsZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBw
      bGUgV29ybGR3aWRlIERldmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlv
      biBBdXRob3JpdHkwHhcNMTMwMjE3MDkxOTUwWhcNMTYwMjE0MTg1NjM1WjCB
      yzEaMBgGCgmSJomT8ixkAQEMCk00TlJOS0VaRzUxTzBNBgNVBAMMRmlQaG9u
      ZSBEaXN0cmlidXRpb246IFhpbnlpIFNoaSBUaWVyZW4gTmV0d29yayBUZWNo
      bm9sb2d5IFNlcnZpY2VzIEx0ZC4xEzARBgNVBAsMCk00TlJOS0VaRzUxOjA4
      BgNVBAoMMVhpbnlpIFNoaSBUaWVyZW4gTmV0d29yayBUZWNobm9sb2d5IFNl
      cnZpY2VzIEx0ZC4xCzAJBgNVBAYTAkNOMIIBIjANBgkqhkiG9w0BAQEFAAOC
      AQ8AMIIBCgKCAQEAvh7MhmmSNhHvGTrTzhZunnF/pBOw5IglBiRCo2UQIdsl
      Ngdcib/s0NRz5biulsBdKJ75c2OjpiK5ulNkgRaNARrTkgOJKJZ32BbYWo6J
      kfDHDUci66FNUXNA9wUKv26eFhMu/G0Ijd7XDYFJrBBsM67NnbsJ3qk6OTZs
      98JJlYTSULqIcTFV+jBqrZ/XoDch4BcDMsgkjwsnuwZL3xiYTie9kXfUJ0kI
      xwcSCqK5aMuxGWybRXcPRYYwg7SkIv385SWVcVXqU5kO3jCsgGyoD0tkKJYI
      nBcIYloe2xDw9KOclPqBzKgRjdD+h1Qczt07CvvdeA2OIczdlWeaEFNPWQID
      AQABo4IB4TCCAd0wPQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRw
      Oi8vb2NzcC5hcHBsZS5jb20vb2NzcC13d2RyMDEwHQYDVR0OBBYEFE7eb91G
      /cgK3oS6DNdfsz092YD8MAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUiCcX
      Cam2GGCL7Ou69kdZxVJUo7cwggEPBgNVHSAEggEGMIIBAjCB/wYJKoZIhvdj
      ZAUBMIHxMIHDBggrBgEFBQcCAjCBtgyBs1JlbGlhbmNlIG9uIHRoaXMgY2Vy
      dGlmaWNhdGUgYnkgYW55IHBhcnR5IGFzc3VtZXMgYWNjZXB0YW5jZSBvZiB0
      aGUgdGhlbiBhcHBsaWNhYmxlIHN0YW5kYXJkIHRlcm1zIGFuZCBjb25kaXRp
      b25zIG9mIHVzZSwgY2VydGlmaWNhdGUgcG9saWN5IGFuZCBjZXJ0aWZpY2F0
      aW9uIHByYWN0aWNlIHN0YXRlbWVudHMuMCkGCCsGAQUFBwIBFh1odHRwOi8v
      d3d3LmFwcGxlLmNvbS9hcHBsZWNhLzAOBgNVHQ8BAf8EBAMCB4AwFgYDVR0l
      AQH/BAwwCgYIKwYBBQUHAwMwEwYKKoZIhvdjZAYBBAEB/wQCBQAwDQYJKoZI
      hvcNAQEFBQADggEBAAiPoi0iOkpzjnjCQDfD9ZiskGtJxrKxUR3MOPKa5X1E
      DHnyw17Qz0159hsH+U5wQhh18uMCSVNn9IEPqY37XhvOB0nbSEC49QqAe2U+
      iqq2mK/7+N8qcyQhSxXKxnEr1YkaNUDYLpjckfMsygtUUJ9DsEjPspw+GpCZ
      BCOnxwtphJChQnzNpDVi0eDVcWpwtNOQhrfz3TbQHKhCYjpB/tca8AFM3gLo
      B+yuKptbVMNXD92C2wHct+Jp48+AXaI9rgezrs/y0xSMtLmiP52BH2fIG3vA
      P0x6WNRSVEhoY54kFTKN0U0rdaf2CrZWmpLkHOqZ3Tm2LJyWHdrvCdrzYB8=
      </data>
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: TALES OF HEARTS R *.l7c

Post by aluigi »

That one is a certificate.

I forgot to say that the other file you provided (Soma) can be opened with 7zip.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: TALES OF HEARTS R *.l7c

Post by sigroon365 »

aluigi wrote:That one is a certificate.

I forgot to say that the other file you provided (Soma) can be opened with 7zip.

Hmm.. even if I rename Soma to Soma.7z, I can't unzip it by 7zip.

And I understand that..
tohdata_DATA2_01.l7c has Name offset information.
tohdata_DATA2_02.l7c has ZSIZE and SIZE information.
tohdata_DATA2_04.l7c has Dir and file name information.

However, I don't know what tohdata_DATA2_03.l7c means.

tohdata_DATA2 splited files. https://www.sendspace.com/file/5brxpn
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: TALES OF HEARTS R *.l7c

Post by aluigi »

What is that tohdata_DATA2_* stuff you uploaded?
Are they part of a file you cutted or what?

My script works perfectly with that tohdata.l7c you provided.

Anyway the 3rd one is a reference table with the offsets of the 1st one.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: TALES OF HEARTS R *.l7c

Post by sigroon365 »

aluigi wrote:What is that tohdata_DATA2_* stuff you uploaded?
Are they part of a file you cutted or what?

My script works perfectly with that tohdata.l7c you provided.

Anyway the 3rd one is a reference table with the offsets of the 1st one.


Yes. Just cut it from tohdata.l7c.
Hmm.. compression problems is the last thing to solve.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: TALES OF HEARTS R *.l7c

Post by aluigi »

I have tried the scanner of the last quickbms which contains almost 550 compressions but found nothing.
I tried both from offset 0 and offset 3 of the compressed file.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: TALES OF HEARTS R *.l7c

Post by sigroon365 »

aluigi wrote:I have tried the scanner of the last quickbms which contains almost 550 compressions but found nothing.
I tried both from offset 0 and offset 3 of the compressed file.


1) I tried to search about the compression of tales of heart R. There is someone who also asked compression method of this game on xentax. http://forum.xentax.com/viewtopic.php?f=21&t=10914 However, there are no useful information. :cry:

2) I also tried to use PSNPKGDecryptor&Extractor.exe but it doesn't work.
Image