So originally you pass arguments in this order
def Decompilepy2exe(data, pythonversion):
data = data[0x010:]
offset = data.find(b"\x00")
if offset == -1:
return
pythoncode = marshal.loads(data[offset + 1:])
oStringIO = StringIO()
decompile(pythonversion, pythoncode[-1], oStringIO)
print(oStringIO.getvalue())
However, it seems to be outdated now and you need to swap pythonversion and pythoncode
def Decompilepy2exe(data, pythonversion):
data = data[0x010:]
offset = data.find(b"\x00")
if offset == -1:
return
pythoncode = marshal.loads(data[offset + 1:])
oStringIO = StringIO()
decompile(pythoncode[-1], pythonversion, oStringIO)
print(oStringIO.getvalue())
And pythonversion needs to be a tuple as well.
So originally you pass arguments in this order
However, it seems to be outdated now and you need to swap pythonversion and pythoncode
And pythonversion needs to be a tuple as well.