morkt / GARbro

Visual Novels resource browser
MIT License
2.33k stars 246 forks source link

QLIE engine (Imosurume/Imoscripter) pack function? #417

Open Veshurik opened 4 years ago

Veshurik commented 4 years ago

I didn't find pack for .pack archives for QLIE engine (Imosurume/Imoscripter).

Tried on that demo version, but usual .rar acrhive as .pack doesn't help - game doesn't run. Maybe, anyone can suggest something?

Thank you!

image

jszhtian commented 4 years ago

Search ".s" string in code segment, and analysis the assembly code. If you use IDA pro. It will show that some of functions which are nearby these ".s" are Delphi standard library function ”SysUtils.FileRead“. So if you can bypass some condition jump operand. You can force QLIE directly read unpacked files.

jszhtian commented 4 years ago

annabel_trial_example.zip This is a example. Normally, this should be work until new version QLIE are announced. For QLIE 3 and QLIE 3.1. There is only a little different.

Veshurik commented 4 years ago

Thanks, I think I understood. Also, I have other problems, how to edit text position in window? annabel_text_example

kazurabakouta commented 4 years ago

annabel_trial_example.zip This is a example. Normally, this should be work until new version QLIE are announced. For QLIE 3 and QLIE 3.1. There is only a little different.

Do you have more specific instruction on how to patch game executable file? I browse your repositories and find something under Fragment/QLIE3.1 but I can't read chinese. Or can I just duplicate the step you did on annabel to every other QLIE games, provided that I know what to replace and what to delete? Thanks

jszhtian commented 4 years ago

annabel_trial_example.zip This is a example. Normally, this should be work until new version QLIE are announced. For QLIE 3 and QLIE 3.1. There is only a little different.

Do you have more specific instruction on how to patch game executable file? I browse your repositories and find something under Fragment/QLIE3.1 but I can't read chinese. Or can I just duplicate the step you did on annabel to every other QLIE games, provided that I know what to replace and what to delete? Thanks

image image

Focus on these ".s" string. Qlie 3.1 Games only have 2 ".s" string. and patch the jmp asm code like above picture. It should be work.

kazurabakouta commented 4 years ago

Focus on these ".s" string. Qlie 3.1 Games only have 2 ".s" string. and patch the jmp asm code like above picture. It should be work.

I tried to patch it, and look for another example to try it. Somehow Navel and Omegastar doesn't have ".s" on their executable files. Are they somehow any different or use modified version of Qlie engine thus having different code? Sorry for the reply, I've been swamped by work this past week

jszhtian commented 4 years ago

Focus on these ".s" string. Qlie 3.1 Games only have 2 ".s" string. and patch the jmp asm code like above picture. It should be work.

I tried to patch it, and look for another example to try it. Somehow Navel and Omegastar doesn't have ".s" on their executable files. Are they somehow any different or use modified version of Qlie engine thus having different code? Sorry for the reply, I've been swamped by work this past week

".s" string is not store in MBCS but in Unicode charset. If you use ollydbg or some older debugger without unicode string searching plugin, you maybe miss these string. I have confirmed that Navel's games 乙女理論とその周辺 and 月に寄りそう乙女の作法2have the ".s" string. but these Qlie3.0 games don't have "cmp byte_xxxx,0 jz xxx_Label". Omegastar's games can also find these strings. Actually, the screenshots are coming from 美少女万華鏡_理と迷宮の少女 which is the newest game from Omegastar. I also confirm that 美少女万華鏡 -罪と罰の少女- and 美少女万華鏡 神が造りたもうた少女たち have ".s" string. And for Caramel Box games, I can also guarantee that you can find ".s" string. Because I have made a patch for 処女はお姉さまに恋してる 3 to read files outside the package.

kazurabakouta commented 4 years ago

unicode string searching plugin

I use IDA freeware 7.0. I enable unicode in string sub view and still can't find it. Sorry for the obnoxious question. But glad that they can be patched. What debugger did you use?

jszhtian commented 4 years ago

unicode string searching plugin

I use IDA freeware 7.0. I enable unicode in string sub view and still can't find it. Sorry for the obnoxious question. But glad that they can be patched. What debugger did you use?

I also use IDA 7. Use search text image then you can find something like this image

kazurabakouta commented 4 years ago

then you can find something like this image

2nd 1st Thanks for the detailed help so far. Alright. How'd I do? I manage to find and patch it although didn't manage to make it look like yours. But the bad news is I can't put the text back inside .s scenario files. That's why I don't know how I hold up I usually use text packer form Biman Games. I can edit Tsuki no Yorisou2 scenario files but failed to insert Kimineza scenario files back. F my life.

jszhtian commented 4 years ago

I can't put the text back inside .s scenario files.

.s files are Cp932 or UTF-16 text files. normally you can direct put them in ".\scenario\". But you need keep directory struct correct. You can focus on GetFileAttritubeW API. Qlie will check if the file is exist. To get text from .s or insert to .s, you need write a program to split text and system command in .s files

kazurabakouta commented 4 years ago

I can't put the text back inside .s scenario files.

.s files are Cp932 or UTF-16 text files. normally you can direct put them in ".\scenario". But you need keep directory struct correct. You can focus on GetFileAttritubeW API. Qlie will check if the file is exist. To get text from .s or insert to .s, you need write a program to split text and system command in .s files

I hate my life so I will scourge through the command and text manually. So in game directory i create a folder ".scenario" and I need to keep all sub directories from the .pack there right? so in my case since the ".s" file contained inside \scenario\本編\act1\, Do I have to make .scenario\本編\act1 in game directories?

jszhtian commented 4 years ago

so in my case since the ".s" file contained inside \scenario\本編\act1, Do I have to make .scenario\本編\act1 in game directories?

In Windows&DOS Operating System, dot means the current directory. Not like Linux, dot plus a file name means hidden directory or files.

If you use API Monitor, you will see these capture infomation. image That means you need keep directory struct like in pack. And even you don't modify the original executable files. Qlie will also search files in these postitions. but Qlie will throw a Error like this. image

kazurabakouta commented 4 years ago

so in my case since the ".s" file contained inside \scenario\本編\act1, Do I have to make .scenario\本編\act1 in game directories?

In Windows&DOS Operating System, dot means the current directory. Not like Linux, dot plus a file name means hidden directory or files.

If you use API Monitor, you will see these capture infomation. image That means you need keep directory struct like in pack. And even you don't modify the original executable files. Qlie will also search files in these postitions. but Qlie will throw a Error like this. image

Well in my case. Wrong repack format always gave me nightmare. But It works wonder now. I won't need to worry about repacking the files. Thanks a lot Great

shun9092 commented 4 years ago

Could you please tell me about dataX.pack repack?

Game name is '美少女万華鏡_理と迷宮の少女'

I don't know how to repack those file.

If you know about repack, please tell me.

I waiting for your answer.

Thank you.

MyWork1908 commented 4 years ago

Hello, can you give more detailed instructions on how to remove the jump commands and if you remove the jump commands you can read the uncompressed file you mean the directories containing the uncompressed .pack file data?You can send instructional videos

Cosetto commented 2 years ago

Guys I just found out arc_conv can pack qlie and it works for ver 3.0, 3.1

shun9092 commented 2 years ago

@Cosetto

How? Would you please tell me that?

Darken-kun commented 2 years ago

Guys I just found out arc_conv can pack qlie and it works for ver 3.0, 3.1

@Cosetto I'd like to know how to do it as well, could you please explain it?

Cosetto commented 2 years ago

Sorry for late reply @shun9092. @Darken-kun https://github.com/amayra/arc_conv download this and run build.bat After that open cmd and run arc_conv.exe --pack qlie dataxx dataxx.pack. You must keep the same structure when unpack with garbro. Note if your lastest file is data10.pack, for example, then name the new .pack data11.pack, the game will recognize it so you don't need to overwrite

shun9092 commented 2 years ago

@Cosetto It doesn't work. Can u help me more? How to know a structure of pack file? You said 'must keep the same structure when unpack with Garbro.' How to use text_conv.exe ?

Cosetto commented 2 years ago

@Cosetto It doesn't work. Can u help me more? How to know a structure of pack file? You said 'must keep the same structure when unpack with Garbro.' How to use text_conv.exe ?

what game are you trying with

shun9092 commented 2 years ago

@Cosetto 美少女万華鏡_理と迷宮の少女

Cosetto commented 2 years ago

man this gonna take time since the game is too big, can you send the data.pack which is the scenario?

shun9092 commented 2 years ago

maybe 6.pack

Cosetto commented 2 years ago

can you send because I can't download the game now

shun9092 commented 2 years ago

Do u have a discord?

Cosetto commented 2 years ago

yes Yggdrasill#0473

shun9092 commented 2 years ago

can't find!

Cosetto commented 2 years ago

Yggdrasill# 0473

Bocchama213 commented 2 years ago

Thanks, I think I understood. Also, I have other problems, how to edit text position in window? annabel_text_example

Can you make a video on how to bypass .pack for scenario in IDA? DM me in discord if you have one Valarant#0898

Lilislv commented 10 months ago

Can anyone help me sort out the ".s" scripts from the Kara no Shojo The last episode?

Refrain69 commented 10 months ago

Can anyone help me sort out the ".s" scripts from the Kara no Shojo The last episode?

https://github.com/lennylxx/IG_tools

Lilislv commented 10 months ago

Can anyone help me sort out the ".s" scripts from the Kara no Shojo The last episode?

https://github.com/lennylxx/IG_tools

doesn't work

Cosetto commented 10 months ago

outdated tool, only Oneline has modified version for KnS 3