Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- DWORD dwXignInitFnc = 0x006F1DE0;
- BOOL WriteBytes(DWORD dwAddress, LPBYTE lpBuffer, DWORD nBytes) {
- if (nBytes == 0) {
- OutputDebugString("WriteBytes:: Tried to write 0 bytes to memory.");
- return FALSE;
- }
- DWORD dwOldProtect;
- if (!VirtualProtect((LPVOID)dwAddress, nBytes, PAGE_EXECUTE_READWRITE, &dwOldProtect)) {
- OutputDebugString("WriteBytes:: Failed to change access protection on memory address.");
- return FALSE;
- }
- memcpy((LPVOID)dwAddress, lpBuffer, nBytes);
- if (!VirtualProtect((LPVOID)dwAddress, nBytes, dwOldProtect, &dwOldProtect)) {
- OutputDebugString("WriteBytes:: Failed to change access protection on memory address.");
- return FALSE;
- }
- return TRUE;
- }
- BOOL StopXignInit() {
- /*
- Modify code to:
- mov eax, 1
- ret
- nop
- nop
- nop
- */
- return WriteBytes(dwXignInitFnc, (PBYTE)"\xB8\x01\x00\x00\x00\xC3\x90\x90\x90", 9);
- }
- BOOL APIENTRY DllMain(__in HINSTANCE hInstance, __in DWORD fdwReason, __in __reserved LPVOID lpReserved) {
- UNREFERENCED_PARAMETER(lpReserved);
- if (fdwReason == DLL_PROCESS_ATTACH) {
- if (StopXignInit()) {
- OutputDebugString("Successfully stopped XIGNCODE3 from initializing!");
- }
- else {
- OutputDebugString("Failed to stop XIGNCODE3 from initializing!");
- }
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement