YJBeetle/unnpk

UnboundLocalError: local variable 'n' referenced before assignment

Opened this issue · 1 comments

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.

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