diff options
| author | Tannin <devnull@localhost> | 2015-01-24 19:34:12 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-01-24 19:34:12 +0100 |
| commit | c3a95bdef1d989a54684b966e042b12bf682046d (patch) | |
| tree | 83a09ca9252b9d5a060acb415b8c3c0923cfe2c3 /src/shared/inject.cpp | |
| parent | 9edc39633b82b5e02d33c4b0a395fe110af28eb4 (diff) | |
| parent | f756aede08edb315ebe5882098191ebfe971fd81 (diff) | |
Merge with branch1.2
Diffstat (limited to 'src/shared/inject.cpp')
| -rw-r--r-- | src/shared/inject.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/shared/inject.cpp b/src/shared/inject.cpp index 143652c2..36db7840 100644 --- a/src/shared/inject.cpp +++ b/src/shared/inject.cpp @@ -93,7 +93,7 @@ void injectDLL(HANDLE processHandle, HANDLE threadHandle, const std::string &dll 0x68, 0xBA, 0xAD, 0xF0, 0x0D, // PUSH imm32 ("Init")
0x50, // PUSH EAX
0xB8, 0xBA, 0xAD, 0xF0, 0x0D, // MOVE EAX, imm32 (GetProcAddress)
- 0xFF, 0xD0, // CALL EAX (GetProcAddress)
+ 0xFF, 0xD0, // CALL EAX (=GetProcAddress, leaves address of init function in eax)
0x68, 0xBA, 0xAD, 0xF0, 0x0D, // PUSH imm32 (profile name)
0x68, 0xBA, 0xAD, 0xF0, 0x0D, // PUSH imm32 (log level)
0xFF, 0xD0, // CALL EAX (=InitFunction)
@@ -109,9 +109,6 @@ void injectDLL(HANDLE processHandle, HANDLE threadHandle, const std::string &dll throw windows_error("failed to allocate memory for stub");
}
TParameters *remoteParams = reinterpret_cast<TParameters*>(remoteMem);
- // determine the remote addresses of each of the parameters
-// ULONG remoteDLLName = reinterpret_cast<ULONG>(remoteMem);
-// ULONG remoteInitString = remoteDLLName + MAX_PATH * sizeof(char);
// dizzy yet? we still have to calculate the entry point as an address relative to our stub
ULONG entryPoint = 0;
|
