Arnuh / HaSuite

All in one .wz file/map editor for MapleStory game files
Mozilla Public License 2.0
21 stars 7 forks source link

HaRepacker-BUG occurs when transferring via custom key #44

Closed disguisebilly closed 5 months ago

disguisebilly commented 5 months ago

tried to use source code debugging to solve the problem. Maybe it was caused by my lack of understanding of the architecture, but I couldn't find the key points. I hope to get some tips.

Prerequisite: Cosmic’s own Wz file.

  1. After I open WZ, click "Save" and select "Use custom encryption key".
  2. Just change an IV and a USER KEY.
  3. When you click save, WZ can be generated correctly, but the nodes in the img under the folder will disappear. for example: item.wz Special ETC..All nodes in the img below will be lost map.wz Title/WordMap/Obj/ETC.. All nodes in the img below will be lost. The same goes for character.wz

I discovered a pattern, If WZ contains WzDirectory, the WzSubProperty under all WzImages in the WzDirectory will disappear.

So I probably located the problem in SaveImage or its superior function SaveToDisk, but I haven't found a specific solution yet. I will continue to look for solutions and hope that experienced friends can give some suggestions to fix it.

Arnuh commented 5 months ago

HaSuite-x64-2.0-8906.zip try this or compile from master branch

disguisebilly commented 5 months ago

I encrypted and tested all wz and it works fine now. I looked at the source code and it turns out that the IV and USER KEY were not correctly passed to the following function. Learned, thank you Arnuh