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

UnboundLocalError: local variable 'n' referenced before assignment #17

Open
broadsword-revenge opened this issue Jul 25, 2020 · 1 comment

Comments

@broadsword-revenge
Copy link

broadsword-revenge commented Jul 25, 2020

Hi @YJBeetle, I m trying to reverse another NetEase NeoX Game, Eve Echoes. Your unnpk make a great job unpacking script.npk. I think all the files were unpacked, but when I try to decrypt, some of them failed like this:
https://www.mediafire.com/file/6hiff3ypxne31ct/0B103ACD.out/file

$ ./unnpk/tools/pyc_decryptor.py ./script/application/octet-stream/0B103ACD.out ./0B103ACD.pyc
...
./unnpk/tools/pymarshal.py", line 241, in _transform_opcode
    opcode[c] = n
UnboundLocalError: local variable 'n' referenced before assignment

As you stated, looks like file FB54F059 is the redirect.pyc, but I fails decrypting, or decompyling it:
https://www.mediafire.com/file/rs7gxahpoe34r9s/FB54F059/file
Maybe it will help to decrypt all the files, but I dont know how to handle it.

At this point I´m stuck.

I got a lot of source files and resources, but what I really want to grab is the game's staticdata. The problem is that the py missing files contains the key methods to read .sd files I need.

Any help would be greatly apreciated.

@qq1214052592
Copy link

Hellow @broadsword-revenge ,I can't unpack successfully. Do you have the NPK directory after unpacking? i get the error about :| Index | Offset | Size | Unzip size | zip | MIME Type | Extension |
| 5FE59905 | 0x002EE6AC | 4.67 MB | 4.67 MB | Yes | application/octet-stream | None |
W: Uncompress failed!
Z_DATA_ERROR: Data is not zlib, The raw data will be output

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

2 participants