Advertisement
asdasd12341df23dqcwa

Untitled

Jun 21st, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.88 KB | None | 0 0
  1. local DODDDDDDOOODODODDDDDODOODDODDOOODODDDDODDDDDO = '\27\76\117\97\81\0\1\4\4\4\8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\2\39\0\0\0\5\0\0\0\6\64\64\0\66\0\128\0\28\128\0\1\26\0\0\0\22\192\0\128\5\0\0\0\6\128\64\0\66\0\0\0\28\64\0\1\5\0\0\0\6\192\64\0\65\0\1\0\28\64\0\1\5\0\0\0\6\192\64\0\65\64\1\0\28\64\0\1\36\0\0\0\7\128\1\0\10\192\0\0\100\64\0\0\9\64\0\132\100\128\0\0\9\64\128\132\100\192\0\0\9\64\0\133\7\192\1\0\10\192\0\0\100\0\1\0\9\64\0\134\100\64\1\0\9\64\128\134\100\128\1\0\9\64\0\133\7\192\2\0\5\128\1\0\28\64\128\0\30\0\128\0\14\0\0\0\4\3\0\0\0\103\103\0\4\10\0\0\0\105\115\86\105\115\105\98\108\101\0\4\11\0\0\0\115\101\116\86\105\115\105\98\108\101\0\4\6\0\0\0\97\108\101\114\116\0\4\54\0\0\0\85\115\101\32\116\104\105\115\32\111\110\32\99\117\115\116\111\109\32\103\97\109\101\32\102\111\114\32\101\100\117\99\97\116\105\111\110\97\108\32\112\117\114\112\111\115\101\115\32\111\110\108\121\0\4\29\0\0\0\83\99\114\105\112\116\32\99\111\100\101\100\32\98\121\32\85\110\100\105\102\105\110\101\48\57\48\57\0\4\5\0\0\0\109\97\105\110\0\4\8\0\0\0\108\111\119\109\97\110\97\0\4\6\0\0\0\102\97\110\110\121\0\4\7\0\0\0\107\97\103\117\114\97\0\4\5\0\0\0\115\104\111\119\0\4\8\0\0\0\109\97\112\104\97\99\107\0\4\8\0\0\0\101\110\97\98\108\101\100\0\4\9\0\0\0\108\100\105\115\97\98\108\101\0\7\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0\0\0\4\21\0\0\0\5\64\0\0\6\128\64\0\74\0\0\1\129\192\0\0\193\0\1\0\98\64\0\1\28\128\0\1\7\0\0\0\5\0\0\0\23\64\65\0\22\128\0\128\5\128\1\0\6\192\65\0\28\64\128\0\5\0\0\0\23\0\66\0\22\128\0\128\5\64\2\0\6\192\65\0\28\64\128\0\30\0\128\0\10\0\0\0\4\7\0\0\0\115\101\108\101\99\116\0\4\3\0\0\0\103\103\0\4\7\0\0\0\99\104\111\105\99\101\0\4\17\0\0\0\77\97\112\32\72\97\99\107\32\40\32\86\73\80\32\41\0\4\14\0\0\0\76\111\119\32\77\97\110\97\32\67\111\115\116\0\3\0\0\0\0\0\0\240\63\4\8\0\0\0\109\97\112\104\97\99\107\0\4\5\0\0\0\115\104\111\119\0\3\0\0\0\0\0\0\0\64\4\8\0\0\0\108\111\119\109\97\110\97\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0\0\0\3\83\0\0\0\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\128\64\0\65\192\0\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\64\0\65\64\1\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\65\0\65\192\1\0\28\64\0\1\5\0\0\0\6\0\66\0\65\64\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\128\64\0\65\128\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\64\0\65\192\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\65\0\65\192\1\0\28\64\0\1\5\0\0\0\6\0\66\0\65\64\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\128\64\0\65\0\3\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\64\0\65\64\3\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\65\0\65\128\3\0\28\64\0\1\5\0\0\0\6\0\66\0\65\64\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\192\67\0\65\0\4\0\28\64\0\1\30\0\128\0\17\0\0\0\4\3\0\0\0\103\103\0\4\13\0\0\0\99\108\101\97\114\82\101\115\117\108\116\115\0\4\13\0\0\0\115\101\97\114\99\104\78\117\109\98\101\114\0\4\7\0\0\0\50\53\58\58\51\51\0\4\11\0\0\0\84\89\80\69\95\68\87\79\82\68\0\4\3\0\0\0\50\53\0\4\11\0\0\0\103\101\116\82\101\115\117\108\116\115\0\3\0\0\0\0\0\0\24\64\4\8\0\0\0\101\100\105\116\65\108\108\0\4\2\0\0\0\49\0\4\3\0\0\0\51\51\0\4\6\0\0\0\49\51\126\49\56\0\4\9\0\0\0\48\59\51\48\58\58\51\51\0\4\3\0\0\0\51\48\0\3\0\0\0\0\0\0\8\64\4\6\0\0\0\116\111\97\115\116\0\4\21\0\0\0\70\97\110\110\121\32\115\107\105\108\108\32\109\111\100\32\100\111\110\101\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0\0\0\3\133\0\0\0\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\128\64\0\65\192\0\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\64\0\65\64\1\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\65\0\65\192\1\0\28\64\0\1\5\0\0\0\6\0\66\0\65\64\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\128\64\0\65\128\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\64\0\65\192\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\65\0\65\0\3\0\28\64\0\1\5\0\0\0\6\0\66\0\65\64\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\128\64\0\65\64\3\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\64\0\65\192\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\65\0\65\0\3\0\28\64\0\1\5\0\0\0\6\0\66\0\65\64\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\128\64\0\65\128\3\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\64\0\65\192\3\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\65\0\65\0\4\0\28\64\0\1\5\0\0\0\6\0\66\0\65\64\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\128\64\0\65\64\4\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\64\0\65\192\3\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\65\0\65\128\4\0\28\64\0\1\5\0\0\0\6\0\66\0\65\64\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\192\68\0\65\0\5\0\28\64\0\1\30\0\128\0\21\0\0\0\4\3\0\0\0\103\103\0\4\13\0\0\0\99\108\101\97\114\82\101\115\117\108\116\115\0\4\13\0\0\0\115\101\97\114\99\104\78\117\109\98\101\114\0\4\8\0\0\0\49\49\48\58\58\50\57\0\4\11\0\0\0\84\89\80\69\95\68\87\79\82\68\0\4\7\0\0\0\54\48\126\49\49\48\0\4\11\0\0\0\103\101\116\82\101\115\117\108\116\115\0\3\0\0\0\0\0\0\40\64\4\8\0\0\0\101\100\105\116\65\108\108\0\4\3\0\0\0\52\48\0\4\8\0\0\0\49\48\53\58\58\50\57\0\4\7\0\0\0\56\48\126\49\48\53\0\3\0\0\0\0\0\0\24\64\4\10\0\0\0\48\48\48\48\53\58\58\50\57\0\4\8\0\0\0\48\48\48\58\58\50\57\0\4\7\0\0\0\56\53\126\49\49\53\0\3\0\0\0\0\0\0\8\64\4\9\0\0\0\48\48\48\48\58\58\50\57\0\3\0\0\0\0\0\0\46\64\4\6\0\0\0\116\111\97\115\116\0\4\22\0\0\0\75\97\103\117\114\97\32\115\107\105\108\108\32\109\111\100\32\100\111\110\101\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0\0\0\6\23\0\0\0\5\64\0\0\6\128\64\0\74\0\0\2\129\192\0\0\193\0\1\0\1\65\1\0\65\129\1\0\98\64\0\2\28\128\0\1\7\0\0\0\5\0\0\0\23\192\65\0\22\128\0\128\5\0\2\0\6\64\66\0\28\64\128\0\5\0\0\0\23\128\66\0\22\128\0\128\5\0\2\0\6\192\66\0\28\64\128\0\30\0\128\0\12\0\0\0\4\7\0\0\0\115\101\108\101\99\116\0\4\3\0\0\0\103\103\0\4\7\0\0\0\99\104\111\105\99\101\0\4\20\0\0\0\70\97\110\110\121\32\49\32\101\110\101\114\103\121\32\99\111\115\116\0\4\20\0\0\0\75\97\103\117\114\97\32\52\48\32\109\97\110\97\32\99\111\115\116\0\4\7\0\0\0\65\110\103\101\108\97\0\4\8\0\0\0\67\121\99\108\111\112\115\0\3\0\0\0\0\0\0\240\63\4\8\0\0\0\108\111\119\109\97\110\97\0\4\6\0\0\0\102\97\110\110\121\0\3\0\0\0\0\0\0\0\64\4\7\0\0\0\107\97\103\117\114\97\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0\0\0\3\34\0\0\0\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\128\64\0\65\192\0\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\64\0\65\64\1\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\192\65\0\65\0\2\0\28\128\0\1\7\128\1\0\5\0\0\0\6\64\66\0\65\128\2\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\192\66\0\65\0\3\0\28\64\0\1\30\0\128\0\13\0\0\0\4\3\0\0\0\103\103\0\4\13\0\0\0\99\108\101\97\114\82\101\115\117\108\116\115\0\4\13\0\0\0\115\101\97\114\99\104\78\117\109\98\101\114\0\4\10\0\0\0\48\48\48\48\48\58\58\49\51\0\4\11\0\0\0\84\89\80\69\95\68\87\79\82\68\0\4\9\0\0\0\48\48\48\48\48\58\58\57\0\4\4\0\0\0\114\101\115\0\4\11\0\0\0\103\101\116\82\101\115\117\108\116\115\0\3\0\0\0\0\0\0\8\64\4\8\0\0\0\101\100\105\116\65\108\108\0\4\7\0\0\0\48\48\48\48\48\48\0\4\6\0\0\0\116\111\97\115\116\0\4\16\0\0\0\77\97\112\104\97\99\107\32\69\110\97\98\108\101\100\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0\0\0\3\35\0\0\0\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\128\64\0\65\192\0\0\133\0\0\0\134\0\65\1\28\64\128\1\5\0\0\0\6\128\65\0\65\192\1\0\28\128\0\1\7\64\1\0\5\64\1\0\6\0\66\0\9\128\194\132\5\64\1\0\6\192\66\0\9\128\194\132\5\64\1\0\6\192\65\0\9\128\194\132\5\0\0\0\6\0\67\0\69\64\1\0\28\64\0\1\5\0\0\0\6\64\64\0\28\64\128\0\5\0\0\0\6\64\67\0\65\128\3\0\28\64\0\1\30\0\128\0\15\0\0\0\4\3\0\0\0\103\103\0\4\13\0\0\0\99\108\101\97\114\82\101\115\117\108\116\115\0\4\13\0\0\0\115\101\97\114\99\104\78\117\109\98\101\114\0\4\11\0\0\0\48\48\48\48\48\48\48\58\58\57\0\4\11\0\0\0\84\89\80\69\95\68\87\79\82\68\0\4\4\0\0\0\114\101\115\0\4\11\0\0\0\103\101\116\82\101\115\117\108\116\115\0\3\0\0\0\0\0\0\8\64\3\0\0\0\0\0\0\240\63\4\6\0\0\0\118\97\108\117\101\0\3\0\0\0\0\0\0\0\0\3\0\0\0\0\0\0\0\64\4\10\0\0\0\115\101\116\86\97\108\117\101\115\0\4\6\0\0\0\116\111\97\115\116\0\4\16\0\0\0\77\97\112\104\97\99\107\32\68\105\115\97\98\108\101\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0\0\0\4\21\0\0\0\5\64\0\0\6\128\64\0\74\0\0\1\129\192\0\0\193\0\1\0\98\64\0\1\28\128\0\1\7\0\0\0\5\0\0\0\23\64\65\0\22\128\0\128\5\128\1\0\6\192\65\0\28\64\128\0\5\0\0\0\23\0\66\0\22\128\0\128\5\128\1\0\6\64\66\0\28\64\128\0\30\0\128\0\10\0\0\0\4\7\0\0\0\115\101\108\101\99\116\0\4\3\0\0\0\103\103\0\4\7\0\0\0\99\104\111\105\99\101\0\4\12\0\0\0\77\97\112\32\72\97\99\107\32\79\110\0\4\13\0\0\0\77\97\112\32\72\97\99\107\32\79\102\102\0\3\0\0\0\0\0\0\240\63\4\8\0\0\0\109\97\112\104\97\99\107\0\4\8\0\0\0\101\110\97\98\108\101\100\0\3\0\0\0\0\0\0\0\64\4\8\0\0\0\100\105\115\97\98\108\101\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
  2.  
  3. local DOOOOOOODDOOOOODDOODDODOODDODOOOODOODDDDOODDD
  4. local DDDODDDOODDOODOODDDOOODDOODDDDDODODODDODODDDD
  5. local DODDDODOOODDDDDODDDDODDDDDDDODDDODOODOOOODOOD
  6.  
  7. local ODDOOODODDDDDDDOOODOODDDOOOODOOOOOOODOODOOODD = {
  8. "ABC", "ABx", "ABC", "ABC",
  9. "ABC", "ABx", "ABC", "ABx",
  10. "ABC", "ABC", "ABC", "ABC",
  11. "ABC", "ABC", "ABC", "ABC",
  12. "ABC", "ABC", "ABC", "ABC",
  13. "ABC", "ABC", "AsBx", "ABC",
  14. "ABC", "ABC", "ABC", "ABC",
  15. "ABC", "ABC", "ABC", "AsBx",
  16. "AsBx", "ABC", "ABC", "ABC",
  17. "ABx", "ABC",
  18. }
  19.  
  20. local lua_opcode_names = {
  21. "MOVE", "LOADK", "LOADBOOL", "LOADNIL",
  22. "GETUPVAL", "GETGLOBAL", "GETTABLE", "SETGLOBAL",
  23. "SETUPVAL", "SETTABLE", "NEWTABLE", "SELF",
  24. "ADD", "SUB", "MUL", "DIV",
  25. "MOD", "POW", "UNM", "NOT",
  26. "LEN", "CONCAT", "JMP", "EQ",
  27. "LT", "LE", "TEST", "TESTSET",
  28. "CALL", "TAILCALL", "RETURN", "FORLOOP",
  29. "FORPREP", "TFORLOOP", "SETLIST", "CLOSE",
  30. "CLOSURE", "VARARG"
  31. };
  32. local DODDOODOOOODDDDODOOODODODDOOODODOOOODDDOODOOO = getfenv()
  33. local function get_bits(input, n, n2)
  34. if n2 then
  35. local total = 0
  36. local digitn = 0
  37. for i = n, n2 do
  38. total = total + 2^digitn*get_bits(input, i)
  39. digitn = digitn + 1
  40. end
  41. return total
  42. else
  43. local pn = 2^(n-1)
  44. return (input % (pn + pn) >= pn) and 1 or 0
  45. end
  46. end
  47.  
  48. local function decode_bytecode(DDDOOOODDDOOOOOOOOODDDOODODOODDOODOODDODDOODD)
  49. local index = 1
  50. local big_endian = false
  51. local int_size;
  52. local size_t;
  53. local get_int, get_size_t;
  54. local get_int8, get_int32, get_int64, get_float64, get_string;
  55. do
  56. function get_int8()
  57. local a = DDDOOOODDDOOOOOOOOODDDOODODOODDOODOODDODDOODD:byte(index, index);
  58. index = index + 1
  59. return a
  60. end
  61. function get_int32()
  62. local a, b, c, d = DDDOOOODDDOOOOOOOOODDDOODODOODDOODOODDODDOODD:byte(index, index + 3);
  63. index = index + 4;
  64. return d*16777216 + c*65536 + b*256 + a
  65. end
  66. function get_int64()
  67. local a = get_int32();
  68. local b = get_int32();
  69. return b*4294967296 + a;
  70. end
  71. function get_float64()
  72. local a = get_int32()
  73. local b = get_int32()
  74. return (-2*get_bits(b, 32)+1)*(2^(get_bits(b, 21, 31)-1023))*
  75. ((get_bits(b, 1, 20)*(2^32) + a)/(2^52)+1)
  76. end
  77. function get_string(len)
  78. local str;
  79. if len then
  80. str = DDDOOOODDDOOOOOOOOODDDOODODOODDOODOODDODDOODD:sub(index, index + len - 1);
  81. index = index + len;
  82. else
  83. len = get_size_t();
  84. if len == 0 then return; end
  85. str = DDDOOOODDDOOOOOOOOODDDOODODOODDOODOODDODDOODD:sub(index, index + len - 1);
  86. index = index + len;
  87. end
  88. return str;
  89. end
  90. end
  91.  
  92. local function decode_chunk()
  93. local chunk;
  94. local instructions = {};
  95. local constants = {};
  96. local prototypes = {};
  97. local debug = {
  98. lines = {};
  99. };
  100.  
  101. chunk = {
  102. instructions = instructions;
  103. constants = constants;
  104. prototypes = prototypes;
  105. debug = debug;
  106. };
  107.  
  108. local num;
  109.  
  110. chunk.name = get_string();
  111. chunk.first_line = get_int();
  112. chunk.last_line = get_int();
  113.  
  114. if chunk.name then chunk.name = chunk.name:sub(1, -2); end
  115.  
  116. chunk.upvalues = get_int8();
  117. chunk.arguments = get_int8();
  118. chunk.varg = get_int8();
  119. chunk.stack = get_int8();
  120. do
  121. num = get_int();
  122. for i = 1, num do
  123. local instruction = {
  124. };
  125.  
  126. local data = get_int32();
  127. local DDDODODDODDOOODDOOODDDOODDOOOODODDODDOOOODOOD = get_bits(data, 1, 6);
  128. local type = ODDOOODODDDDDDDOOODOODDDOOOODOOOOOOODOODOOODD[DDDODODDODDOOODDOOODDDOODDOOOODODDODDOOOODOOD + 1];
  129.  
  130. instruction.DDDODODDODDOOODDOOODDDOODDOOOODODDODDOOOODOOD = DDDODODDODDOOODDOOODDDOODDOOOODODDODDOOOODOOD;
  131. instruction.type = type;
  132.  
  133. instruction.A = get_bits(data, 7, 14);
  134. if type == "ABC" then
  135. instruction.B = get_bits(data, 24, 32);
  136. instruction.C = get_bits(data, 15, 23);
  137. elseif type == "ABx" then
  138. instruction.Bx = get_bits(data, 15, 32);
  139. elseif type == "AsBx" then
  140. instruction.sBx = get_bits(data, 15, 32) - 131071;
  141. end
  142.  
  143. instructions[i] = instruction;
  144. end
  145. end
  146.  
  147.  
  148. do
  149. num = get_int();
  150. for i = 1, num do
  151. local constant = {
  152.  
  153. };
  154. local type = get_int8();
  155. constant.type = type;
  156.  
  157. if type == 1 then
  158. constant.data = (get_int8() ~= 0);
  159. elseif type == 3 then
  160. constant.data = get_float64();
  161. elseif type == 4 then
  162. constant.data = get_string():sub(1, -2);
  163. end
  164.  
  165. constants[i-1] = constant;
  166. end
  167. end
  168.  
  169. do
  170. num = get_int();
  171. for i = 1, num do
  172. prototypes[i-1] = decode_chunk();
  173. end
  174. end
  175.  
  176. do
  177. local data = debug.lines
  178. num = get_int();
  179. for i = 1, num do
  180. data[i] = get_int32();
  181. end
  182.  
  183.  
  184. num = get_int();
  185. for i = 1, num do
  186. get_string():sub(1, -2);
  187. get_int32();
  188. get_int32();
  189. end
  190. num = get_int();
  191. for i = 1, num do
  192. get_string();
  193. end
  194. end
  195.  
  196. return chunk;
  197. end
  198.  
  199. do
  200. assert(get_string(4) == "\27Lua", "XIPHER: B71EC0D5 3XP3CT3D.");
  201. assert(get_int8() == 0x51, "M2K3 S8RE Y0U'R3 U$1NG LU6 5.1");
  202. get_int8();
  203. big_endian = (get_int8() == 0);
  204. int_size = get_int8();
  205. size_t = get_int8();
  206.  
  207. if int_size == 4 then
  208. get_int = get_int32;
  209. elseif int_size == 8 then
  210. get_int = get_int64;
  211. else
  212.  
  213. error("Unsupported bytecode target platform");
  214. end
  215.  
  216. if size_t == 4 then
  217. get_size_t = get_int32;
  218. elseif size_t == 8 then
  219. get_size_t = get_int64;
  220. else
  221. error("Unsupported bytecode target platform");
  222. end
  223.  
  224. assert(get_string(3) == "\4\8\0",
  225. "Unsupported bytecode target platform");
  226. end
  227.  
  228. return decode_chunk();
  229. end
  230.  
  231. local function handle_return(...)
  232. local c = select("#", ...)
  233. local t = {...}
  234. return c, t
  235. end
  236.  
  237. local function DDDOODDDDDODDDODOODDDODODODOODOODDOOOOODDOOOD(cache, upvalues)
  238. local instructions = cache.instructions;
  239. local constants = cache.constants;
  240. local prototypes = cache.prototypes;
  241.  
  242. local stack, top
  243. local environment
  244. local IP = 1;
  245. local vararg, vararg_size
  246.  
  247. local opcode_funcs = {
  248. [0] = function(instruction)
  249. stack[instruction.A] = stack[instruction.B];
  250. end,
  251. [1] = function(instruction)
  252. stack[instruction.A] = constants[instruction.Bx].data;
  253. end,
  254. [2] = function(instruction)
  255. stack[instruction.A] = instruction.B ~= 0
  256. if instruction.C ~= 0 then
  257. IP = IP + 1
  258. end
  259. end,
  260. [3] = function(instruction)
  261. local stack = stack
  262. for i = instruction.A, instruction.B do
  263. stack[i] = nil
  264. end
  265. end,
  266. [4] = function(instruction)
  267. stack[instruction.A] = upvalues[instruction.B]
  268. end,
  269. [5] = function(instruction)
  270. local key = constants[instruction.Bx].data;
  271. stack[instruction.A] = environment[key];
  272. end,
  273. [6] = function(instruction)
  274. local C = instruction.C
  275. local stack = stack
  276. C = C > 255 and constants[C-256].data or stack[C]
  277. stack[instruction.A] = stack[instruction.B][C];
  278. end,
  279. [7] = function(instruction)
  280. local key = constants[instruction.Bx].data;
  281. environment[key] = stack[instruction.A];
  282. end,
  283. [8] = function (instruction)
  284. upvalues[instruction.B] = stack[instruction.A]
  285. end,
  286. [9] = function (instruction)
  287. local B = instruction.B;
  288. local C = instruction.C;
  289. local stack, constants = stack, constants;
  290.  
  291. B = B > 255 and constants[B-256].data or stack[B];
  292. C = C > 255 and constants[C-256].data or stack[C];
  293.  
  294. stack[instruction.A][B] = C
  295. end,
  296. [10] = function (instruction)
  297. stack[instruction.A] = {}
  298. end,
  299. [11] = function (instruction)
  300. local A = instruction.A
  301. local B = instruction.B
  302. local C = instruction.C
  303. local stack = stack
  304.  
  305. B = stack[B]
  306. C = C > 255 and constants[C-256].data or stack[C]
  307.  
  308. stack[A+1] = B
  309. stack[A] = B[C]
  310. end,
  311. [12] = function(instruction)
  312. local B = instruction.B;
  313. local C = instruction.C;
  314. local stack, constants = stack, constants;
  315.  
  316. B = B > 255 and constants[B-256].data or stack[B];
  317. C = C > 255 and constants[C-256].data or stack[C];
  318.  
  319. stack[instruction.A] = B+C;
  320. end,
  321. [13] = function(instruction)
  322. local B = instruction.B;
  323. local C = instruction.C;
  324. local stack, constants = stack, constants;
  325.  
  326. B = B > 255 and constants[B-256].data or stack[B];
  327. C = C > 255 and constants[C-256].data or stack[C];
  328.  
  329. stack[instruction.A] = B - C;
  330. end,
  331. [14] = function(instruction)
  332. local B = instruction.B;
  333. local C = instruction.C;
  334. local stack, constants = stack, constants;
  335.  
  336. B = B > 255 and constants[B-256].data or stack[B];
  337. C = C > 255 and constants[C-256].data or stack[C];
  338.  
  339. stack[instruction.A] = B * C;
  340. end,
  341. [15] = function(instruction)
  342. local B = instruction.B;
  343. local C = instruction.C;
  344. local stack, constants = stack, constants;
  345.  
  346. B = B > 255 and constants[B-256].data or stack[B];
  347. C = C > 255 and constants[C-256].data or stack[C];
  348.  
  349. stack[instruction.A] = B / C;
  350. end,
  351. [16] = function(instruction)
  352. local B = instruction.B;
  353. local C = instruction.C;
  354. local stack, constants = stack, constants;
  355.  
  356. B = B > 255 and constants[B-256].data or stack[B];
  357. C = C > 255 and constants[C-256].data or stack[C];
  358.  
  359. stack[instruction.A] = B % C;
  360. end,
  361. [17] = function(instruction)
  362. local B = instruction.B;
  363. local C = instruction.C;
  364. local stack, constants = stack, constants;
  365.  
  366. B = B > 255 and constants[B-256].data or stack[B];
  367. C = C > 255 and constants[C-256].data or stack[C];
  368.  
  369. stack[instruction.A] = B ^ C;
  370. end,
  371. [18] = function(instruction)
  372. stack[instruction.A] = -stack[instruction.B]
  373. end,
  374. [19] = function(instruction)
  375. stack[instruction.A] = not stack[instruction.B]
  376. end,
  377. [20] = function(instruction)
  378. stack[instruction.A] = #stack[instruction.B]
  379. end,
  380. [21] = function(instruction)
  381. local B = instruction.B
  382. local result = stack[B]
  383. for i = B+1, instruction.C do
  384. result = result .. stack[i]
  385. end
  386. stack[instruction.A] = result
  387. end,
  388. [22] = function(instruction)
  389. IP = IP + instruction.sBx
  390. end,
  391. [23] = function(instruction)
  392. local A = instruction.A
  393. local B = instruction.B
  394. local C = instruction.C
  395. local stack, constants = stack, constants
  396.  
  397. A = A ~= 0
  398. B = B > 255 and constants[B-256].data or stack[B]
  399. C = C > 255 and constants[C-256].data or stack[C]
  400. if (B == C) ~= A then
  401. IP = IP + 1
  402. end
  403. end,
  404. [24] = function(instruction)
  405. local A = instruction.A
  406. local B = instruction.B
  407. local C = instruction.C
  408. local stack, constants = stack, constants
  409.  
  410. A = A ~= 0
  411. B = B > 255 and constants[B-256].data or stack[B]
  412. C = C > 255 and constants[C-256].data or stack[C]
  413. if (B < C) ~= A then
  414. IP = IP + 1
  415. end
  416. end,
  417. [25] = function(instruction)
  418. local A = instruction.A
  419. local B = instruction.B
  420. local C = instruction.C
  421. local stack, constants = stack, constants
  422.  
  423. A = A ~= 0
  424. B = B > 255 and constants[B-256].data or stack[B]
  425. C = C > 255 and constants[C-256].data or stack[C]
  426. if (B <= C) ~= A then
  427. IP = IP + 1
  428. end
  429. end,
  430. [26] = function(instruction)
  431. if (not not stack[instruction.A]) == (instruction.C == 0) then
  432. IP = IP + 1
  433. end
  434. end,
  435. [27] = function(instruction)
  436. local stack = stack
  437. local B = stack[instruction.B]
  438. if (not not B) == (instruction.C == 0) then
  439. IP = IP + 1
  440. else
  441. stack[instruction.A] = B
  442. end
  443. end,
  444. [28] = function(instruction)
  445. local A = instruction.A;
  446. local B = instruction.B;
  447. local C = instruction.C;
  448. local stack = stack;
  449. local args, results;
  450. local limit, loop
  451.  
  452. args = {};
  453. if B ~= 1 then
  454. if B ~= 0 then
  455. limit = A+B-1;
  456. else
  457. limit = top
  458. end
  459.  
  460. loop = 0
  461. for i = A+1, limit do
  462. loop = loop + 1
  463. args[loop] = stack[i];
  464. end
  465.  
  466. limit, results = handle_return(stack[A](unpack(args, 1, limit-A)))
  467. else
  468. limit, results = handle_return(stack[A]())
  469. end
  470.  
  471. top = A - 1
  472.  
  473. if C ~= 1 then
  474. if C ~= 0 then
  475. limit = A+C-2;
  476. else
  477. limit = limit+A
  478. end
  479.  
  480. loop = 0;
  481. for i = A, limit do
  482. loop = loop + 1;
  483. stack[i] = results[loop];
  484. end
  485. end
  486. end,
  487. [29] = function (instruction)
  488. local A = instruction.A;
  489. local B = instruction.B;
  490. local C = instruction.C;
  491. local stack = stack;
  492. local args, results;
  493. local top, limit, loop = top
  494.  
  495. args = {};
  496. if B ~= 1 then
  497. if B ~= 0 then
  498. limit = A+B-1;
  499. else
  500. limit = top
  501. end
  502.  
  503. loop = 0
  504. for i = A+1, limit do
  505. loop = loop + 1
  506. args[#args+1] = stack[i];
  507. end
  508.  
  509. results = {stack[A](unpack(args, 1, limit-A))};
  510. else
  511. results = {stack[A]()};
  512. end
  513.  
  514. return true, results
  515. end,
  516. [30] = function(instruction)
  517. local A = instruction.A;
  518. local B = instruction.B;
  519. local stack = stack;
  520. local limit;
  521. local loop, output;
  522.  
  523. if B == 1 then
  524. return true;
  525. end
  526. if B == 0 then
  527. limit = top
  528. else
  529. limit = A + B - 2;
  530. end
  531.  
  532. output = {};
  533. local loop = 0
  534. for i = A, limit do
  535. loop = loop + 1
  536. output[loop] = stack[i];
  537. end
  538. return true, output;
  539. end,
  540. [31] = function(instruction)
  541. local A = instruction.A
  542. local stack = stack
  543.  
  544. local step = stack[A+2]
  545. local index = stack[A] + step
  546. stack[A] = index
  547.  
  548. if step > 0 then
  549. if index <= stack[A+1] then
  550. IP = IP + instruction.sBx
  551. stack[A+3] = index
  552. end
  553. else
  554. if index >= stack[A+1] then
  555. IP = IP + instruction.sBx
  556. stack[A+3] = index
  557. end
  558. end
  559. end,
  560. [32] = function(instruction)
  561. local A = instruction.A
  562. local stack = stack
  563.  
  564. stack[A] = stack[A] - stack[A+2]
  565. IP = IP + instruction.sBx
  566. end,
  567. [33] = function(instruction)
  568. local A = instruction.A
  569. local B = instruction.B
  570. local C = instruction.C
  571. local stack = stack
  572.  
  573. local offset = A+2
  574. local result = {stack[A](stack[A+1], stack[A+2])}
  575. for i = 1, C do
  576. stack[offset+i] = result[i]
  577. end
  578.  
  579. if stack[A+3] ~= nil then
  580. stack[A+2] = stack[A+3]
  581. else
  582. IP = IP + 1
  583. end
  584. end,
  585. [34] = function(instruction)
  586. local A = instruction.A
  587. local B = instruction.B
  588. local C = instruction.C
  589. local stack = stack
  590.  
  591. if C == 0 then
  592. error("NYI: extended SETLIST")
  593. else
  594. local offset = (C - 1) * 50
  595. local t = stack[A]
  596.  
  597. if B == 0 then
  598. B = top
  599. end
  600. for i = 1, B do
  601. t[offset+i] = stack[A+i]
  602. end
  603. end
  604. end,
  605. [35] = function(instruction)
  606. end,
  607. [36] = function(instruction)
  608. local proto = prototypes[instruction.Bx]
  609. local instructions = instructions
  610. local stack = stack
  611.  
  612. local indices = {}
  613. local new_upvals = setmetatable({},
  614. {
  615. __index = function(t, k)
  616. local upval = indices[k]
  617. return upval.segment[upval.offset]
  618. end,
  619. __newindex = function(t, k, v)
  620. local upval = indices[k]
  621. upval.segment[upval.offset] = v
  622. end
  623. }
  624. )
  625. for i = 1, proto.upvalues do
  626. local movement = instructions[IP]
  627. if movement.DDDODODDODDOOODDOOODDDOODDOOOODODDODDOOOODOOD == 0 then
  628. indices[i-1] = {segment = stack, offset = movement.B}
  629. elseif instructions[IP].DDDODODDODDOOODDOOODDDOODDOOOODODDODDOOOODOOD == 4 then
  630. indices[i-1] = {segment = upvalues, offset = movement.B}
  631. end
  632. IP = IP + 1
  633. end
  634.  
  635. local _, OODDODODODDDDODDOODOODODDOODDDDOOOOOOOOODDDOD = DDDOODDDDDODDDODOODDDODODODOODOODDOOOOODDOOOD(proto, new_upvals)
  636. stack[instruction.A] = OODDODODODDDDODDOODOODODDOODDDDOOOOOOOOODDDOD
  637. end,
  638. [37] = function(instruction)
  639. local A = instruction.A
  640. local B = instruction.B
  641. local stack, vararg = stack, vararg
  642.  
  643. for i = A, A + (B > 0 and B - 1 or vararg_size) do
  644. stack[i] = vararg[i - A]
  645. end
  646. end,
  647. }
  648.  
  649. local function DOODDDOOODDDODDDOODOOODODDDDDDODDDDOODDDODODO(b)
  650. local name = cache.name;
  651. local line = cache.debug.lines[IP];
  652. local err = (b:match("^.+:(.+)") or b)
  653. local output = "Error: ";
  654.  
  655. if name then
  656. output = name
  657. end
  658.  
  659. if line then
  660. output = output.." - Line: "..line
  661. end
  662.  
  663. if b and type(b) == "string" then
  664. output = output.." - Error: ".. err
  665. end
  666.  
  667. if DODDDODOOODDDDDODDDDODDDDDDDODDDODOODOOOODOOD then
  668. DODDDODOOODDDDDODDDDODDDDDDDODDDODOODOOOODOOD(tostring(line)..":"..tostring(err))
  669. else
  670. error(tostring(line)..":"..tostring(err),3)
  671. end
  672. end
  673.  
  674. local function loop()
  675. local instructions = instructions
  676. local instruction, a, b, ran
  677.  
  678. while true do
  679. instruction = instructions[IP];
  680. IP = IP + 1
  681. ran, a, b = pcall(function() return opcode_funcs[instruction.DDDODODDODDOOODDOOODDDOODDOOOODODDODDOOOODOOD](instruction); end);
  682. if not ran then
  683. DOODDDOOODDDODDDOODOOODODDDDDDODDDDOODDDODODO(a);
  684. break;
  685. elseif a then
  686. return b;
  687. end
  688. end
  689. end
  690.  
  691. local DDDOODOOODDDODDDDODOOODDDOOODDDOOODDODODDDDDD = {
  692. get_stack = function()
  693. return stack;
  694. end;
  695. get_IP = function()
  696. return IP;
  697. end
  698. };
  699.  
  700. local function OODDODODODDDDODDOODOODODDOODDDDOOOOOOOOODDDOD(...)
  701. local local_stack = {};
  702. local ghost_stack = {};
  703.  
  704. top = -1
  705. stack = setmetatable(local_stack, {
  706. __index = ghost_stack;
  707. __newindex = function(t, k, v)
  708. if k > top and v then
  709. top = k
  710. end
  711. ghost_stack[k] = v
  712. end;
  713. })
  714. local args = {...};
  715. vararg = {}
  716. vararg_size = select("#", ...) - 1
  717. for i = 0, vararg_size do
  718. local_stack[i] = args[i+1];
  719. vararg[i] = args[i+1]
  720. end
  721.  
  722. environment = DDDODDDOODDOODOODDDOOODDOODDDDDODODODDODODDDD or getfenv();
  723. IP = 1;
  724. local thread = coroutine.create(loop)
  725. local a, b = coroutine.resume(thread)
  726.  
  727. if a then
  728. if b then
  729. return unpack(b);
  730. end
  731. return;
  732. else
  733. if DOOOOOOODDOOOOODDOODDODOODDODOOOODOODDDDOODDD then
  734. else
  735. DOODDDOOODDDODDDOODOOODODDDDDDODDDDOODDDODODO(b)
  736. end
  737. end
  738. end
  739.  
  740. return DDDOODOOODDDODDDDODOOODDDOOODDDOOODDODODDDDDD, OODDODODODDDDODDOODOODODDOODDDDOOOOOOOOODDDOD;
  741. end
  742.  
  743. DDDDDDODODDOODDDDDDDOODDDODDDODOOODDDOOODDDOO = function(DDDOOOODDDOOOOOOOOODDDOODODOODDOODOODDODDOODD, env, ODDOODDDDODOOODDOODOOOODODOOOOODODDOOODODDDOO)
  744. DDDODDDOODDOODOODDDOOODDOODDDDDODODODDODODDDD = ODDODODDDODDDODODDODOODDDODODDDOOODDOODODDOOO or getfenv(2)
  745. DODDDODOOODDDDDODDDDODDDDDDDODDDODOODOOOODOOD = ODDOODDDDODOOODDOODOOOODODOOOOODODDOOODODDDOO
  746. local cache = decode_bytecode(DDDOOOODDDOOOOOOOOODDDOODODOODDOODOODDODDOODD);
  747. local _, OODDODODODDDDODDOODOODODDOODDDDOOOOOOOOODDDOD = DDDOODDDDDODDDODOODDDODODODOODOODDOOOOODDOOOD(cache);
  748. return OODDODODODDDDODDOODOODODDOODDDDOOOOOOOOODDDOD;
  749. end;
  750.  
  751. DDDDDDODODDOODDDDDDDOODDDODDDODOOODDDOOODDDOO(DODDDDDDOOODODODDDDDODOODDODDOOODODDDDODDDDDO, DODDOODOOOODDDDODOOODODODDOOODODOOOODDDOODOOO)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement