Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WzLib: Treat multiple Wz_CryptoKeyType of Wz_Image in single Wz_Structure #73

Closed
KENNYSOFT opened this issue Jan 2, 2021 · 0 comments
Closed
Labels
Milestone

Comments

@KENNYSOFT
Copy link
Owner

KENNYSOFT commented Jan 2, 2021

대상

JMS 335 ← 334, '추가된 img 출력' 옵션이 있는 경우

미리보기

Npc\9270088.img에서 다음과 같이 실패

9270088

System.IO.InvalidDataException: 알 수 없는 블록 형식입니다. 스트림이 손상되었을 수 있습니다.
위치: System.IO.Compression.Inflater.Decode()
위치: System.IO.Compression.Inflater.Inflate(Byte[] bytes, Int32 offset, Int32 length)
위치: System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count)
위치: WzComparerR2.WzLib.Wz_Png.GetRawData() 파일 WzComparerR2.WzLib\Wz_Png.cs:줄 128
위치: WzComparerR2.WzLib.Wz_Png.ExtractPng() 파일 WzComparerR2.WzLib\Wz_Png.cs:줄 168
위치: WzComparerR2.BitmapOrigin.CreateFromNode(Wz_Node node, GlobalFindNodeFunction findNode) 파일 WzComparerR2.Common\BitmapOrigin.cs:줄 88
위치: WzComparerR2.CharaSim.Npc.CreateFromNode(Wz_Node node, GlobalFindNodeFunction findNode) 파일 WzComparerR2.Common\CharaSim\Npc.cs:줄 73
위치: WzComparerR2.MainForm.quickView(Node node) 파일 WzComparerR2\MainForm.cs:줄 2777
위치: WzComparerR2.MainForm.advTree1_AfterNodeSelect_2(Object sender, AdvTreeNodeEventArgs e) 파일 WzComparerR2\MainForm.cs:줄 2644

원인

  • JMS335의 Npc\1092006.imgWz_CryptoKeyType.KMS, Npc\9270088.imgWz_CryptoKeyType.BMS
  • 이처럼 한 파일 내에 여러 Wz_CryptoKeyType이 있어서 나중 Wz_Image를 extract할 때 Wz_Structure.encryption이 덮어씌워짐
  • 한편 9270088 안의 Wz_PngsourceNpc/1092006.img/...를 보고 있는 것이 있는데, 비교 과정에서 link를 따라가지만(WzCompare: Output link cannot be followed #49) encryption이 안 맞아서 decrypt 실패

수정

Wz_ImageWz_Crypto를 들고 있도록 변경 (왜 static을 쓰지 않았는지는 알 수 없음)

@KENNYSOFT KENNYSOFT added the bug label Jan 2, 2021
@KENNYSOFT KENNYSOFT added this to the KMS-v3.4.1 milestone Jan 2, 2021
@KENNYSOFT KENNYSOFT changed the title WzLib: Treat multiple Wz_CryptoKeyType in single Wz_Structure WzLib: Treat multiple Wz_CryptoKeyType of Wz_Image in single Wz_Structure Jan 2, 2021
@KENNYSOFT KENNYSOFT reopened this Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant