summaryrefslogtreecommitdiff
path: root/src/shared/inject.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-01-22 19:44:38 +0100
committerTannin <devnull@localhost>2015-01-22 19:44:38 +0100
commit2400e2c99ed3aa44152147ea7402c7f05f984aec (patch)
treeeff19629cdbeed469e0daebcfb91f5fa3491e54e /src/shared/inject.cpp
parentaf1e3d0187930c565c23e32652ab03dc11a8b0e8 (diff)
cleanup (mostly removing unused includes)
Diffstat (limited to 'src/shared/inject.cpp')
-rw-r--r--src/shared/inject.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/shared/inject.cpp b/src/shared/inject.cpp
index 5a111c4a..cf2a8972 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;