Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- STARTUPINFO si = {0};
- PROCESS_INFORMATION pi = {0};
- if (CreateProcess(L"test.exe", NULL,NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi))
- {
- HANDLE processHandle = OpenProcess(PROCESS_VM_WRITE, FALSE, pi.dwProcessId);
- void (*ADDRESS) = (void*)0x402CB6;
- BYTE buffer[2] = {0xEB, 0x19};
- int lengthOfBuffer = 2;
- WriteProcessMemory(pi.hProcess, ADDRESS, buffer, lengthOfBuffer, 0);
- CloseHandle(processHandle);
- ResumeThread(pi.hThread);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement