deguix 65 Report post Posted August 24, 2017 (edited) These are the apple.luc and pear.luc files that I decompiled with the help from LuaDec. They can be used instead of the compiled ones with any clients available (just replace them). pear.luc is exactly what was outputted from LuaDec, but apple.luc had some issues. Basically, I replaced the "do break end" parts with "else" and with 1 function, I had to rearrange the ifs so that "if b == true then" and "else" if blocks covered the whole function. The following are the more functional versions of the originals. These were tested with the client built from v2 source (my modifications to it to be published), and should work with any client of any version: apple.luc apple = {} apple_cnt = 0 apple_size = 6 apple_funcs = { [true] = {{lua_fox_boff,true}, {lua_dog_blog,false}}, [false] = {{lua_dog_brog,false}, {lua_fox_boff,true}} } function _fv(b, b2, p, w, v) apple_funcs[b][b2][1](p, w, v) end function _fv2(b, b2, p, w, _v1, _v2) local t = {[true]=_v1,[false]=_v2} _fv(b, b2, p, w, t[apple_funcs[b][b2][2]]) end _k = {0,0,0,0,0,0} _v = {0,0,0,0,0,0} apple_loop1 = function(loop, b, p) for j=0,loop-1 do local w = j * apple_size for i=1,apple_size do _fv2(b, 1, p, w, _k[i], _v[i]) _fv2(b, 2, p, w, _k[i], _v[i]) w = w + 1 end end end apple_loop2 = function(loop, rcnt, b, p) for i=1,rcnt do local w = loop * apple_cnt + i - 1 local a, v = lua_cat_fish(apple[i], apple_cnt) v = v + 1 _fv2(b, 1, p, w, apple[i], v) _fv2(b, 2, p, w, apple[i], v) end end apple_eat = function(p, l, b) local loop, rcnt = lua_cat_fish(l, apple_cnt) for j=0,loop-1 do apple_loop2(j, apple_cnt, b, p) end apple_loop2(loop, rcnt, b, p) end apple_eat2 = function(p, l, b) local loop, rcnt = lua_cat_fish(l, apple_cnt) apple_loop1(loop, b, p) apple_loop2(loop, rcnt, b, p) end apple_eat2_1 = function(p, l, b) local loop, rcnt = lua_cat_fish(l, apple_size) apple_loop1(loop, b, p) local w = loop * apple_size for i=1,apple_size-1 do --yes, it only uses the first 5 items here _fv(b, 1, p, w, _k[i]) _fv(b, 2, p, w, _v[i]) w = w + 1 if i > rcnt then break end end end apple_allot = function(c, i) local a_ i = i + 1 apple[i] = c apple_cnt = i if i <= apple_size then _k[i] = c a_, _v[i] = lua_cat_fish(c, apple_size) _v[i] = _v[i] + 1 else print("wrong index") end end pear.luc - it's originally the simplest possible already: pear = "" pear_cnt = 0 pear_eat = function(po, pi, l, b) lua_fox_pear(po, pi, l, pear, pear_cnt, b) end pear_allot = function(s, l) pear = s pear_cnt = l end The following is the original apple.luc (with exactly matching assembly chunks compared to original): apple = {} apple_cnt = 0 apple_eat = function(p, l, b) local j = 0 local i = 0 local a = 0 local v = 0 local w = 0 local loop = 0 local rcnt = 0 loop, rcnt = lua_cat_fish(l, apple_cnt) if b == true then while j < loop do i = 0 while i < apple_cnt do w = j * apple_cnt + i a, v = lua_cat_fish(apple[i], apple_cnt) v = v + 1 lua_fox_boff(p, w, apple[i]) lua_dog_blog(p, w, v) i = i + 1 end j = j + 1 end i = 0 while i < rcnt do w = loop * apple_cnt + i a, v = lua_cat_fish(apple[i], apple_cnt) v = v + 1 lua_fox_boff(p, w, apple[i]) lua_dog_blog(p, w, v) i = i + 1 end else while j < loop do i = 0 while i < apple_cnt do w = (j) * apple_cnt + i a, v = lua_cat_fish(apple[i], apple_cnt) v = v + 1 lua_dog_brog(p, w, v) lua_fox_boff(p, w, apple[i]) i = i + 1 end j = j + 1 end i = 0 while i < rcnt do w = loop * apple_cnt + i a, v = lua_cat_fish(apple[i], apple_cnt) v = v + 1 lua_dog_brog(p, w, v) lua_fox_boff(p, w, apple[i]) i = i + 1 end end end a0 = 0 a1 = 0 a2 = 0 a3 = 0 a4 = 0 a5 = 0 k0 = 0 k1 = 0 k2 = 0 k3 = 0 k4 = 0 k5 = 0 v0 = 0 v1 = 0 v2 = 0 v3 = 0 v4 = 0 v5 = 0 apple_eat2 = function(p, l, b) local j = 0 local i = 0 local a = 0 local v = 0 local w = 0 local loop = 0 local rcnt = 0 loop, rcnt = lua_cat_fish(l, apple_cnt) if b == true then while j < loop do w = j * 6 lua_fox_boff(p, w, k0) lua_dog_blog(p, w, v0) w = w + 1 lua_fox_boff(p, w, k1) lua_dog_blog(p, w, v1) w = w + 1 lua_fox_boff(p, w, k2) lua_dog_blog(p, w, v2) w = w + 1 lua_fox_boff(p, w, k3) lua_dog_blog(p, w, v3) w = w + 1 lua_fox_boff(p, w, k4) lua_dog_blog(p, w, v4) w = w + 1 lua_fox_boff(p, w, k5) lua_dog_blog(p, w, v5) j = j + 1 end i = 0 while i < rcnt do w = loop * apple_cnt + i a, v = lua_cat_fish(apple[i], apple_cnt) v = v + 1 lua_fox_boff(p, w, apple[i]) lua_dog_blog(p, w, v) i = i + 1 end else while j < loop do w = (j) * 6 lua_dog_brog(p, w, v0) lua_fox_boff(p, w, k0) w = w + 1 lua_dog_brog(p, w, v1) lua_fox_boff(p, w, k1) w = w + 1 lua_dog_brog(p, w, v2) lua_fox_boff(p, w, k2) w = w + 1 lua_dog_brog(p, w, v3) lua_fox_boff(p, w, k3) w = w + 1 lua_dog_brog(p, w, v4) lua_fox_boff(p, w, k4) w = w + 1 lua_dog_brog(p, w, v5) lua_fox_boff(p, w, k5) j = j + 1 end i = 0 while i < rcnt do w = loop * apple_cnt + i a, v = lua_cat_fish(apple[i], apple_cnt) v = v + 1 lua_dog_brog(p, w, v) lua_fox_boff(p, w, apple[i]) i = i + 1 end end end apple_eat2_1 = function(p, l, b) local j = 0 local i = 0 local a = 0 local v = 0 local w = 0 local loop = 0 local rcnt = 0 loop, rcnt = lua_cat_fish(l, 6) if b == true then while j < loop do w = j * 6 lua_fox_boff(p, w, k0) lua_dog_blog(p, w, v0) w = w + 1 lua_fox_boff(p, w, k1) lua_dog_blog(p, w, v1) w = w + 1 lua_fox_boff(p, w, k2) lua_dog_blog(p, w, v2) w = w + 1 lua_fox_boff(p, w, k3) lua_dog_blog(p, w, v3) w = w + 1 lua_fox_boff(p, w, k4) lua_dog_blog(p, w, v4) w = w + 1 lua_fox_boff(p, w, k5) lua_dog_blog(p, w, v5) j = j + 1 end i = 0 if i < rcnt then w = loop * 6 lua_fox_boff(p, w, k0) lua_dog_blog(p, w, v0) i = i + 1 if i < rcnt then w = w + 1 lua_fox_boff(p, w, k1) lua_dog_blog(p, w, v1) i = i + 1 if i < rcnt then w = w + 1 lua_fox_boff(p, w, k2) lua_dog_blog(p, w, v2) i = i + 1 if i < rcnt then w = w + 1 lua_fox_boff(p, w, k3) lua_dog_blog(p, w, v3) i = i + 1 if i < rcnt then w = w + 1 lua_fox_boff(p, w, k4) lua_dog_blog(p, w, v4) end end end end end else while j < loop do w = (j) * 6 lua_dog_brog(p, w, v0) lua_fox_boff(p, w, k0) w = w + 1 lua_dog_brog(p, w, v1) lua_fox_boff(p, w, k1) w = w + 1 lua_dog_brog(p, w, v2) lua_fox_boff(p, w, k2) w = w + 1 lua_dog_brog(p, w, v3) lua_fox_boff(p, w, k3) w = w + 1 lua_dog_brog(p, w, v4) lua_fox_boff(p, w, k4) w = w + 1 lua_dog_brog(p, w, v5) lua_fox_boff(p, w, k5) j = j + 1 end i = 0 if i < rcnt then w = loop * 6 lua_dog_brog(p, w, k0) lua_fox_boff(p, w, v0) i = i + 1 if i < rcnt then w = w + 1 lua_dog_brog(p, w, k1) lua_fox_boff(p, w, v1) i = i + 1 if i < rcnt then w = w + 1 lua_dog_brog(p, w, k2) lua_fox_boff(p, w, v2) i = i + 1 if i < rcnt then w = w + 1 lua_dog_brog(p, w, k3) lua_fox_boff(p, w, v3) i = i + 1 if i < rcnt then w = w + 1 lua_dog_brog(p, w, k4) lua_fox_boff(p, w, v4) end end end end end end end apple_allot = function(c, i) apple[i] = c apple_cnt = i + 1 if i == 0 then k0 = c a0, v0 = lua_cat_fish(c, 6) v0 = v0 + 1 elseif i == 1 then k1 = c a1, v1 = lua_cat_fish(c, 6) v1 = v1 + 1 elseif i == 2 then k2 = c a2, v2 = lua_cat_fish(c, 6) v2 = v2 + 1 elseif i == 3 then k3 = c a3, v3 = lua_cat_fish(c, 6) v3 = v3 + 1 elseif i == 4 then k4 = c a4, v4 = lua_cat_fish(c, 6) v4 = v4 + 1 elseif i == 5 then k5 = c a5, v5 = lua_cat_fish(c, 6) v5 = v5 + 1 else print("wrong index") end end Edited August 30, 2017 by deguix 1 Quote Share this post Link to post Share on other sites
NoWinFate 40 Report post Posted December 6, 2023 What is the function of these files? Why are they needed? Quote Share this post Link to post Share on other sites
V3ct0r 2,145 Report post Posted December 7, 2023 10 hours ago, NoWinFate said: What is the function of these files? Why are they needed? Something related with the game protocol encryption, they are used by class NetIF. 1 Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
NoWinFate 40 Report post Posted December 7, 2023 Понятно, судя по всему легаси для проекта, для шифрования там 3DES и ещё какой-то самопальный xor на максималках. Можно смело выкидывать, тем более реализаций вышеописанных функций - нет. Quote Share this post Link to post Share on other sites