Denis Alves
03-19-2023, 12:40 PM
Esse código utilizo em meu emulador 1.4j já faz algum tempo. Segue a baixo:
.cpp
**Hidden Content: Check the thread to see hidden data.**
.h
**Hidden Content: Check the thread to see hidden data.**
extras
DWORD SetJmp2(const LPVOID dwEnterFunction, const LPVOID dwJMPAddress)
{
BYTE btBuf[5];
DWORD dwShift= (ULONG_PTR)dwJMPAddress - (ULONG_PTR)dwEnterFunction - 5;
// ----
btBuf[0]= 0xE9;
memcpy( (LPVOID) & btBuf[1], (LPVOID) & dwShift, sizeof(ULONG_PTR));
// ----
return WriteMemory(dwEnterFunction, (LPVOID) btBuf, sizeof(btBuf));
}
void HookThis(DWORD dwMyFuncOffset,DWORD dwJmpOffset)
{
*(DWORD*)(dwJmpOffset+1) = dwMyFuncOffset-(dwJmpOffset+5);
}
https://i.imgur.com/1iZCbu7.png
.cpp
**Hidden Content: Check the thread to see hidden data.**
.h
**Hidden Content: Check the thread to see hidden data.**
extras
DWORD SetJmp2(const LPVOID dwEnterFunction, const LPVOID dwJMPAddress)
{
BYTE btBuf[5];
DWORD dwShift= (ULONG_PTR)dwJMPAddress - (ULONG_PTR)dwEnterFunction - 5;
// ----
btBuf[0]= 0xE9;
memcpy( (LPVOID) & btBuf[1], (LPVOID) & dwShift, sizeof(ULONG_PTR));
// ----
return WriteMemory(dwEnterFunction, (LPVOID) btBuf, sizeof(btBuf));
}
void HookThis(DWORD dwMyFuncOffset,DWORD dwJmpOffset)
{
*(DWORD*)(dwJmpOffset+1) = dwMyFuncOffset-(dwJmpOffset+5);
}
https://i.imgur.com/1iZCbu7.png