1

When I tried to unpack the corona archive from one of application developed using Corona SDK, I found an obfuscated code for Lua scripts as of below:

function L0_0.createBgOverlay(A0_8, A1_9, A2_10)
  local L3_11
  L3_11 = display
  L3_11 = L3_11.newRect
  L3_11 = L3_11(A0_8, _UPVALUE0_.x, _UPVALUE0_.y, _UPVALUE1_, _UPVALUE2_)
  L3_11:setFillColor(0, 0, 0, A1_9 or 0.3)
  transition.from(L3_11, {
    alpha = 0,
    time = 600,
    delay = A2_10
  })

Here I have two question:
1- how can I do the same to obfuscate my lua scripts when building my app using Corona Build.

2- inside above code there are frequen`enter code here`tly used the following variable _UPVALUE0_, _UPVALUE1_,_UPVALUE2_ , my question is what are those variables and who pass values for them.
MobTech
  • 59
  • 6
  • This "obfuscation" is just renaming of variables (examples: argument `A0_8`, local `L3_11`, external local (local in an outer scope) `_UPVALUE0_` – Egor Skriptunoff Jan 01 '18 at 19:05
  • Thanks, but how can I obfuscate my lua code. – MobTech Jan 01 '18 at 19:18
  • one more thing related to those global variables like _UPVALUE0_ , actually there were used in the main lua file without any declaration or assignment, so I'm wondering to whose these variables referring? – MobTech Jan 01 '18 at 19:46

0 Answers0