Jump to content

wongerlt

Members
  • Posts

    522
  • Credits

  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    0%

Posts posted by wongerlt

  1. Sharing is caring

     

    This is similar topic to just with it u can decrypt 1.5.2.2 version files.

     

     

    Everything same just source code different:

    main.cpp

    #include <string>
    #include <iostream>
    #include <fstream>
    #include <map>
    #include "hook.h"
    
    typedef BOOL(WINAPI *_ReadFile) (HANDLE hFile, char *lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped);
    _ReadFile true_ReadFile;
    
    typedef HANDLE(WINAPI *_CreateFileW) (LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
    _CreateFileW true_CreateFileW;
    
    
    std::map<int, DWORD> Handles;
    
    void fileputcontents(const std::string& name, char* content, DWORD size, bool append = false) {
    	std::ofstream outfile;
    	if (append)
    		outfile.open(name, std::ios::app | std::ios::binary);
    	else
    		outfile.open(name, std::ios::binary);
    	outfile.write(content, size);
    }
    
    int file = 0;
    BOOL WINAPI new_ReadFile(HANDLE hFile, char *lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped) {
    
    	bool result = true_ReadFile(hFile, lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead, lpOverlapped);
    	std::map<int, DWORD>::iterator it = it = Handles.find((int)hFile);
    	if (it != Handles.end()) {
    		std::string filename;
    		file++;
    		filename = "decrypted_file.txt";
    		if (file == 1) {
    			fileputcontents(filename, lpBuffer, nNumberOfBytesToRead);	
    		}
    		else {	
    			fileputcontents(filename, lpBuffer, nNumberOfBytesToRead, true);
    		}
    	}
    	
    	return result;
    
    }
    
    HANDLE WINAPI new_CreateFileW(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) {
    
    	HANDLE true_handle = true_CreateFileW(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
    	if (wcsstr(lpFileName, L"SysString-e.dat") != 0) {
    		std::map<int, DWORD>::iterator iter = Handles.find((int)true_handle);
    		Handles.insert(std::make_pair((int)true_handle, (DWORD)0));
    	}
    	else {
    		std::map<int, DWORD>::iterator iter = Handles.find((int)true_handle);
    		if (iter != Handles.end())
    			Handles.erase(iter);
    	}
    	return true_handle;
    
    }
    
    bool SetHooks(void)
    {
    	FARPROC addr;
    
    	HANDLE hEngine = LoadLibraryA("engine.dll");
    	if ((addr = GetProcAddress(LoadLibraryA("kernel32.dll"), "ReadFile")) == 0)
    		return false;
    		true_ReadFile = (_ReadFile)splice((unsigned char*)addr, new_ReadFile);
    
    	if ((addr = GetProcAddress(LoadLibraryA("kernel32.dll"), "CreateFileW")) == 0)
    		return false;
    		true_CreateFileW = (_CreateFileW)splice((unsigned char*)addr, new_CreateFileW);
    		return true;
    
    }
    
    int load(void)
    {
    	return 0;
    }
    BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
    {
    
    	if (fdwReason == DLL_PROCESS_ATTACH)
    	{
    		if (!SetHooks()) {
    			return false;
    		}
    	}
    	return true;
    }

     

    hook.h

    https://pastebin.com/V90efrHJ

    hook.cpp

    https://pastebin.com/LG92sS4b

     

    1. CFF Explorer part: in ogg.dll file.

    https://prnt.sc/sl91ylUn1B18

    https://prnt.sc/NkkBPbailjZH

     SmartDecrypt.dll must be before npkscrypt.dll

     

    Compiled Version: vs2017 (v141 xp)

    https://drive.google.com/file/d/1J4_OQS0dq5UD119xHi06Ve5028Ht-IWg/view?usp=sharing

    If u want decrypt example interface.u/xdat/or other file then just rename it to SysString-e.dat and run l2.exe (you will get error just click ok) after all in system folder must appear decrypted_file.txt. (this file will be encrypted with regular l2encrypt (413/111 and etc..)

    • Like 2
  2. One idea which i just tested is just replace `UIAPI_MULTISELLNEEDEDITEM` to `UIAPI_HTMLCTRL` and just create how  want via html code.

    https://prnt.sc/TaxhUdUma-U1

     

    function OnClickItem( String strID, int index )			// ItemWindow
    {
    	local int i;
    	local int Index2;
    	local int have;
    	local string param;
    	local string html;
    	local string multi;
    	local ItemInfo a_ItemInfo;
    	InventoryItem = ItemWindowHandle(GetHandle("InventoryWnd.InventoryItem"));
    	
    	class'UIAPI_MULTISELLITEMINFO'.static.Clear("MultiSellWnd.ItemInfo");
    	class'UIAPI_MULTISELLNEEDEDITEM'.static.Clear("MultiSellWnd.NeededItem");
    	//debug("OnClickItem : " $ strID $ ", index : " $ index );
    	if( strID == "ItemList" )
    	{
    		if( index >= 0 && index < m_itemList.Length )
    		{
    			for( i=0 ; i < m_itemList[index].NeededItemList.Length ; ++i )
    			{
    				have = 0;
    				param = "";
    				//ParamAdd( param, "Name", m_itemList[index].NeededItemList[i].Name $ "\r\n99999");
    				//ParamAdd( param, "ID", string(m_itemList[index].NeededItemList[i].ID ));
    				//ParamAdd( param, "Num", string(m_itemList[index].NeededItemList[i].Count ));
    				//ParamAdd( param, "Icon", m_itemList[index].NeededItemList[i].IconName );
    				//ParamAdd( param, "enchant", string(m_itemList[index].NeededItemList[i].Enchant) );
    				//ParamAdd( param, "CrystalType", string(m_itemList[index].NeededItemList[i].CrystalType) );
    				//ParamAdd( param, "ItemType", string(m_itemList[index].NeededItemList[i].ItemType) );
    
    				//debug("AddData " $ param );
    				//class'UIAPI_MULTISELLNEEDEDITEM'.static.AddData("MultiSellWnd.NeededItem", param);
    					Index2 = InventoryItem.FindItemWithClassID(m_itemList[index].NeededItemList[i].ID);
    					if (Index2 > -1) {
    					InventoryItem.GetItem(Index2,a_ItemInfo);
    						have = a_ItemInfo.ItemNum;
    					}
    				multi = multi $ "<tr><td width=32><button width=32 height=32 back=\""$m_itemList[index].NeededItemList[i].IconName$"\" fore=\""$m_itemList[index].NeededItemList[i].IconName$"\"></td><td width=188 align=left><table cellspacing=0 cellpadding=0 width=188><tr><td>"$m_itemList[index].NeededItemList[i].Name$"</td></tr><tr><td>x "$string(m_itemList[index].NeededItemList[i].Count )$" (x"$string(have)$")</td></tr></table></td></tr>";
    			}
    			html = "<html><body><table width=220>"$multi$"</table></body></html>";
    			class'UIAPI_HTMLCTRL'.static.LoadHtmlFromString("MultiSellWnd.NeededItemHtml", html);
    			for( i=0 ; i < m_itemList[index].NeededItemNum ; ++i )
    			{
    				class'UIAPI_MULTISELLITEMINFO'.static.SetItemInfo("MultiSellWnd.ItemInfo", i, m_itemList[index].ItemInfoList[i] );
    			}

     

    xdat:

    https://prnt.sc/1GenJx567s-N

  3. L2Custom Server Information

    Website: https://l2custom.com

    Start Date: 2024/02/17 18:00

     

    Interlude (C6) PVP server with custom modifications. Server has high rates and 80 level. at start. In server shops you can get free A/S grade and farm with it for better custom gears. You don't need buy many potions, soul/spirit-shots, arrows and etc., because this items is not consumable.


    Start Level: 80 lv.
    Max Level: 90 lv.
    Custom Items.
    All Interlude monsters with modified levels (80-95lv).
    All Interlude Zones.
    All Interlude Quests with modified rewards.
    GM Shop.
    Global Gatekeeper with all Interlude Zones.
    Raid Boss Gatekeeper with over ~200 Raid/Grand Bosses (All bosses levels modified 80-96).
    AIO/Scheme Buffer with all buffs with modified durations (1-2 hours).
    Free Sub-Class.
    Free Noblesse
    Olympiad from 86 Lv.
    Rebirth System.
    Skin System - Skin use as normal item (special inventory slots for skins)
    Auction House (Marketer) System.
    Auto Hunting system (2 hours per day)
    Mastery System.
    Changed Augment system (less mouse clicks)
    Fast Login Feature
    Giant/Champion Monsters (Normal Monsters have chance respawn as Champion/Giant with better drop/stats.)
    And much more...

    Fast Login
    fastlogin.png

     

    Giant/Champion Monsters
    giant.png

     

    AIO Buffer
    buffer.png

     

    Global Gatekepper
    GK.png

     

    Auto Hunt Feature
    autohunt.png

     

    Mastery Skills Feature
    mastery.png

     

    GM Shop
    gm-shop.png

     

    Rebirth System
    rebirth.png

     

    Skins System
    skin.png

     

    Auction House System
    marketer.png

     

    Raid/Grand Boss Gatekepper
    rb.png

     

    Custom Crystal Scrolls
    enchant.png

     

    Monster Drop List Feature
    droplist.png

     

  4. 2 hours ago, 911reg said:

    You can literally delete everything from inside LineagePawn, and just leave this:
    class LineagePawn extends Pawn;

    since you won't be using any of the functions that are stored inside of LineagePawn.uc when compiling LineageMonster. Same with LineageNpc.HerdNpc, same with LineageMonster.HerdMonster, etc.
    You can also delete all files from LineageWarrior's folder, and only leave LineagePawn

    If you need help with that kind of stuff, send me a DM on Discord

    Oh thanks you. finally compiled, but another problem animations gone from monster which im editing

  5. Hello,

     

    I'm trying compile unreal script (LineageMonster.u) but stucked.

    https://prnt.sc/s51Fd4cF1OnY

    Looks cant find superclass LineagePawn , ok then im trying recompile LineageWarrior where is LineagePawn but get error:
    https://prnt.sc/lBm0aA2HwHVZ

     

    on these lines are
     

    simulated function AnimateRunning ()
    {
      TurnLeftAnim = GetWalkAnimName(); // 400 line
      TurnRightAnim = GetWalkAnimName();
      MovementAnims[0] = GetCurMoveAnimName();
      MovementAnims[1] = GetCurMoveAnimName();
      MovementAnims[2] = GetCurMoveAnimName();
      MovementAnims[3] = GetCurMoveAnimName();
    }

    if i comment this line then next line with same error.

     

    Very unclear all these errors, can't understand where is problem...

     

    Maybe someone had this problem?

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock