• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[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
263
Reaction score
119
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,367
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
263
Reaction score
119
> 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