Displaying 1 result from an estimated 1 matches for "old_protection".
2010 Sep 20
1
Dynamic forking in Win32
...ing...
Code:
static void doFork(
EXE_FILE *exe,
LPVOID ptrLoc,
DWORD imageSize,
char *target)
{
PROCESS_INFORMATION pi;
CONTEXT ctx;
PROCINFO childInfo;
if (createChild(&pi, &ctx, &childInfo, target)) {
LPVOID v = (LPVOID)NULL;
DWORD r, old_protection = 0;
MEMORY_BASIC_INFORMATION basic_info;
printf("Original EXE loaded (PID = %d).\n", (int)pi.dwProcessId);
printf("Original Base Addr = %X, Size = %X\n",
(int)childInfo.baseAddr, (int)childInfo.imageSize);
if (VirtualQueryEx(...