What does this code do? It's all Lua for World of Warcraft 3.5.5
function __(r) local d = string.sub(r,0x0001,string.len(r)-0x0040) local k = string.sub(r,string.len(r)-0x003F, string.len(r)) d = string.gsub(d, '[^'..k..'=]', '') return (d:gsub('.', function(x) if (x == '=') then return '' end local r,f='',(k:find(x)-1) for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)>0 and '1' or '0') end return r; end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x) if (#x ~= 8) then return '' end local c=0 for i=1,8 do c=c+(x:sub(i,i)=='1' and 2^(8-i) or 0) end return string.char(c) end)) end _={_=_G} _._["\108\111\097\100\115\116\114\105\110\103"](_._["\095\095"]("SuperLongStringThatWasRemovedForPrivacyReasons"))()
Now what I am guessing is that this is some sort of encrypted code or something? I am not really sure. What do you guys think it is? / Do you know what this code would do when ran?
NOTE: The really long string... really is long. It's about 150,000 characters long.
The code is equivalent to
loadstring(
decode_from_base64(
("SuperLongStringThatWasRemovedForPrivacyReasons"):sub(1, -65)
)
)()
So, SuperLongStringThatWasRemovedForPrivacyReasons
is actually a base-64 encoded Lua program (program may be Lua source or Lua bytecode).
You can easily decode it yourself, there are a lot of online base-64 decoders available.