[Source Code] Version.dll Full source code with examples by TonyWeb
NOW FOR SALE!!! Only $50
Once I have the enough likes I will sell the complete set of code. For now I can only post some of the code.
Meanwhile. some titbits for you:
//Test1.exe
void DoPatch1()
{
SuspendMainThread();
#if _WIN64
PatchMemory(PatternFind(szFile1,
β74 12 48 8D 15β, 1),
β\x00β, 1);
#else
//patch the Test1.exe
PatchMemory(PatternFind(szFile1,
β74 22 68β, 1), //Offset 1 means we want to start replacing from
//the beginning of address +1 which in this
//case is the byte 22 hex
β\x00β, 1); //size is 1
#endif
ResumeMainThread();
CloseHandle(hMainThread);
hMainThread = nullptr;
}
As you can see from the log, a search was made for β74 12 48 8d 15β in Test1.exe and the patch was made at that address. Patching this way means that most likely the crack will work in the next version of the software.
Example 2:
For example 2 I will use the same Test1 program but another button has been added that calls the IsRegistered() function from an external library named license.dll. What Iβm going to show you is how to patch Test2.exe and license.dll at once.
C++:
#include "lic.h"
bool IsRegistered()
{
return false;
}
Now copy the version.dll file that is inside the Crack folder to the folder where Test1.exe is like you deed before.
C++:
//Test2.exe
void DoPatch1()
{
//We need to make sure that the Test2.exe has already loaded the library license.dll,
//before proceeding with the patch.
if (!IsModuleLoaded(szFile2.c_str()))
{
MY_LOG(__FUNCTION__ Lβ :: Waiting for module %ls to be loaded into memory.β, szFile2.c_str());
do
{
Sleep(10);
} while (!IsModuleLoaded(szFile2.c_str()));
MY_LOG(__FUNCTION__ Lβ :: Module %ls has been loaded into memory.β, szFile2.c_str());
}
else
MY_LOG(__FUNCTION__ Lβ :: Module %ls is already loaded in memory.β, szFile2.c_str());
SuspendMainThread();
#if _WIN64
PatchMemory(PatternFind(szFile1,
β74 12 48 8D 15β, 1),
β\x00β, 1);
//patch the license.dll
PatchMemory(PatternFind(szFile2,
β32 C0 C3β, 0),
β\xB0\x01β, 2); //mov al,1
#else
//patch the Test2.exe
PatchMemory(PatternFind(szFile1,
β74 23 68β, 1), //Offset 1 means we want to start replacing from
//the beginning of address +1 which in this
//case is the byte 23 hex
β\x00β, 1); //size is 1
//patch the license.dll
PatchMemory(PatternFind(szFile2,
β32 C0 C3 3B 0Dβ, 0), //Offset 0 means we want to start replacing from
//the beginning of the address where the pattern was found
β\xB0\x01β, 2); //size is 2
#endif
ResumeMainThread();
CloseHandle(hMainThread);
hMainThread = nullptr;
}