Only problem with that is I 1) Don't know exactly what i'd be overwriting 2) Need to use CreateProcess... Though I could try calling Address+5 and see what that does....
Humm..... CreateProcessInternal
Also, Do you have any clue why WriteProcessMemory and mpmcpy would have diff offsets?
[EXA:]
HMODULE m = GetModuleHandle("Kernel32.dll");
WriteProcessMemory(m, 100, "\x0", 1, 0);
is not
mpmcpy(m+100, "\x0", 1);??
HMODULE gwStart = GetModuleHandleA(0);
char* CreateAPatch = "\xE8\x00\x00\x00\x00";
char* CreateWPatch = "\xE8\x00\x00\x00\x00";
WriteMemory(CreateWPatch+1, &CreateProcessWHook, 4);
WriteMemory(CreateAPatch+1, &CreateProcessAHook, 4);
HMODULE kernel = GetModuleHandleA("Kernel32.dll");
FARPROC CreateA = GetProcAddress(kernel, "CreateProcessA");
FARPROC CreateW = GetProcAddress(kernel, "CreateProcessW");
WriteProcessMemory(gwStart, CreateA, CreateAPatch, 5, NULL);
WriteProcessMemory(gwStart, CreateW, CreateWPatch, 5, NULL);
My WriteProcessMemory is failing [returning false]
VirtualProctect obviously did not work [VirtualProtect(CreateA, 5, PAGE_READWRITE, null)]