Jean Pereira
Jean Pereira

Reputation: 21

Decompiling Lua Issue

I'm working with the game GeminiLost from playfirst, they have an assets.pfp file that can be extracted using a BMS Script

After extraction it is possible to see lua scripts that were compiled using lua 5.0

I try to use ChunkBake, luadec, unluac and they all always give the same error, using ChunkSpy it is possible to see that you can identify a large part of the file but at the end it shows an error at the end Output Log

ChunkSpy:392: bad argument #1 to `len' (string expected, got nil)

using ChunkBake:

ChunkBake: A Lua 5 binary chunk assembler
Version 0.7.0 (20050512)  Copyright (c) 2005 Kein-Hong Man
The COPYRIGHT file describes the conditions under which this
software may be distributed (basically a Lua 5-style license.)

* Run with option -h or --help for usage information
ChunkBake:260: ok.lua:1: Error: unknown character or control character

using luadec:

luadec.exe: bad code in ok.lua

using unluac:

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "unluac.decompile.Op.ordinal()" because the return value of "unluac.decompile.Code.op(int)" is null
        at unluac.decompile.ControlFlowHandler.find_branches(ControlFlowHandler.java:344)
        at unluac.decompile.ControlFlowHandler.process(ControlFlowHandler.java:118)
        at unluac.decompile.Decompiler.decompile(Decompiler.java:136)
        at unluac.Main.main(Main.java:98)

I'm confused, do I need to make any changes to all the .lua files in the game or is there an error when unzipping the .pfp file? .lua file examples

Upvotes: 2

Views: 183

Answers (0)

Related Questions