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

Some path find with \x50\x4B\x01\x02 cant be decode #6

Open
Little2-9487 opened this issue Sep 15, 2021 · 4 comments
Open

Some path find with \x50\x4B\x01\x02 cant be decode #6

Little2-9487 opened this issue Sep 15, 2021 · 4 comments

Comments

@Little2-9487
Copy link

Little2-9487 commented Sep 15, 2021

Hi, first of all, thx for sharing the code. its really helpful.
And second, English is not my first language, so if you have any question, feel free to ask me about it. :)

I try use unpacker and found some .pak file cant be unpack cuz there's exception when decoding the path
e.g. DataStrm-part2.pak this .pak file.
the problem is, when using \x50\x4B\x01\x02 to find all 'ret' (in code variable), some path it find cant be decode
so it jump an exception and program stop.

I use hex editor to check the file and find with \x50\x4B\x01\x02. and yes, some \x50\x4B\x01\x02 didn't show the path.
I don't know why and how it happen. and I just a normal game programmer who have lack of knowledge about Reverse Engineering.

so, I just use try/except to ignore the exception and keep program going, and it worked.

I just wanna share some ideal for any who want to use this program and have same issue like me.

there my code below:
ex = False
try:
entry.path = fbin[offset+0x2E:offset+(0x2E+entry.path_length)].decode('ansi')
except:
ex = True
print('path cant decode')
if ex == True:
continue

add it on first time decode the entry
I'm not familiar with python, so the code might be dirty. buy work XD

Anyway, really thx the sharing code.
I just wanna to find out how to localization the new world game to the language it's not support.
and this code really helpful.

@Daantis
Copy link

Daantis commented Oct 3, 2021

Hi, did you manage to unpack the new DataStrm-part2.pak on the release version?
maybe I did something wrong, but in my console "path cant decode"

@EV0LV3
Copy link

EV0LV3 commented Oct 3, 2021

Hi, did you manage to unpack the new DataStrm-part2.pak on the release version? maybe I did something wrong, but in my console "path cant decode"

I got the same message

@whispertante
Copy link

whispertante commented Oct 3, 2021

Hi, did you manage to unpack the new DataStrm-part2.pak on the release version? maybe I did something wrong, but in my console "path cant decode"

I got the same message

I am getting "Unpack done" but the output folder is empty..

@whispertante
Copy link

whispertante commented Oct 3, 2021

I made a fix here: #10
works for all paks in the assets folder.
The fix above is not necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants