I've been trying to (reverse) a Lua script to source code again. Only problem I've got is that all variables are named "L**", is there a way to decode that ?

it looks like this if I decompile it with unluac (with chunk spy it isn't really readable)

    if L5_1415 then
  if L5_1415 then
    if L5_1415 == L6_1416 then
      if L5_1415 > 0 then
        if L5_1415 then
        elseif L5_1415 >= L6_1416 then
          if L5_1415 then
            L8_1418 = A0_1410
  • 1
    Hint: you'll achieve better feedback to a question by paying attention to spelling and formatting. You can use the "help" link at the top to find out more.
    – 0xC0000022L
    Apr 12 '16 at 17:01

You can't retrieve function or variable names from compiled lua because the compiler strips it out of the compiled file, however you can make an educated guess by looking at what the decompiled lua code does.

  • thanks for the comment :), its kinda hard since it use a api, is there a way to detect what type the variable has.
    – lunar
    May 30 '15 at 21:48
  • Isn't Lua dynamically typed?
    – Maurice
    Apr 12 '16 at 23:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.