Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[SOURCE] Edit Version&Magickey in cabalmain

Newbie Spellweaver
Joined
Mar 30, 2013
Messages
82
Reaction score
164
Well, it's been a long time since I've used this method to make these edits, so I'll post a simple source for you to use.The source is pretty basic, and it's commented on where you should change the version and magickey.
Make good use.

IDE Used: Visual Studio 2013
Language: C++

Download:

 
Experienced Elementalist
Joined
Feb 17, 2015
Messages
260
Reaction score
112
with that, magickey comes out of xdata to stay in that dll, correct?so I can use fake code in xdata, what will be true in the dll?
 
█║▌║▌║TheMerc iful║▌║▌║█
Loyal Member
Joined
Jan 29, 2005
Messages
1,361
Reaction score
80
Well, it's been a long time since I've used this method to make these edits, so I'll post a simple source for you to use.The source is pretty basic, and it's commented on where you should change the version and magickey.
Make good use.

IDE Used: Visual Studio 2013
Language: C++

Download:


update link please?!

thank you!
 
Experienced Elementalist
Joined
Feb 17, 2015
Messages
260
Reaction score
112
> dllmain.cpp

Code:
#include "header.h"

DWORD Version = 5928;
BYTE VerArray[6] = { 0x68, 0, 0, 0, 0, 0x58 };
DWORD MagicKey = 494375268;

__declspec(naked) void MagicEdit()
{
	_asm
	{
		PUSH[MagicKey]
		POP DWORD PTR DS : [ECX + 0Ch]
		PUSH 0049D77Dh
		RET
	}
}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)
{
	DWORD Old;
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
		SetJMP((DWORD)MagicEdit, 0x0040125D);
		VirtualProtect((void*)0x005DB5CB, 6, PAGE_EXECUTE_READWRITE, &Old);
		memcpy((void*)&VerArray[1], &Version, sizeof(Version));
		memcpy((void*)0x005DB5CB, &VerArray, sizeof(VerArray));
		VirtualProtect((void*)0x005DB5CB, 6, Old, &Old);

		break;
	}
	return TRUE;
}

> header.h

Code:
#include <Windows.h>

void SetJMP(DWORD NewFunc, DWORD LocalAddr)
{
	DWORD Old;

	VirtualProtect((void*)LocalAddr, 5, PAGE_EXECUTE_READWRITE, &Old);
	*(BYTE*)LocalAddr = 0xE9;
	*(DWORD*)(LocalAddr + 1) = (NewFunc - (LocalAddr + 5));
	VirtualProtect((void*)LocalAddr, 5, Old, &Old);
}
 
Back
Top