- renamed EngineGetAPIAddressRemote & EngineGetAPIAddressLocal

- updated .def file
This commit is contained in:
Mr. eXoDia 2014-03-11 15:36:57 +01:00
parent 96d726d156
commit 708485a5ce
4 changed files with 15 additions and 13 deletions

View File

@ -148,9 +148,9 @@ ULONG_PTR EngineGetModuleBaseRemote(HANDLE hProcess, const char* szDLLName)
} }
} }
ULONG_PTR EngineGetAPIAddressRemote(HANDLE hProcess, ULONG_PTR APIAddress) ULONG_PTR EngineGetAddressRemote(HANDLE hProcess, ULONG_PTR Address)
{ {
HMODULE localModuleBase=(HMODULE)EngineGetModuleBaseRemote(GetCurrentProcess(), APIAddress); HMODULE localModuleBase=(HMODULE)EngineGetModuleBaseRemote(GetCurrentProcess(), Address);
if(localModuleBase) if(localModuleBase)
{ {
wchar_t szModuleName[MAX_PATH]=L""; wchar_t szModuleName[MAX_PATH]=L"";
@ -163,8 +163,8 @@ ULONG_PTR EngineGetAPIAddressRemote(HANDLE hProcess, ULONG_PTR APIAddress)
ULONG_PTR remoteModuleBase=EngineGetModuleBaseRemote(hProcess, dllName); ULONG_PTR remoteModuleBase=EngineGetModuleBaseRemote(hProcess, dllName);
if(remoteModuleBase) if(remoteModuleBase)
{ {
APIAddress-=(ULONG_PTR)localModuleBase; //rva Address-=(ULONG_PTR)localModuleBase; //rva
return APIAddress+remoteModuleBase; return Address+remoteModuleBase;
} }
} }
} }
@ -172,9 +172,9 @@ ULONG_PTR EngineGetAPIAddressRemote(HANDLE hProcess, ULONG_PTR APIAddress)
return 0; return 0;
} }
ULONG_PTR EngineGetAPIAddressLocal(HANDLE hProcess, ULONG_PTR APIAddress) ULONG_PTR EngineGetAddressLocal(HANDLE hProcess, ULONG_PTR Address)
{ {
HMODULE remoteModuleBase=(HMODULE)EngineGetModuleBaseRemote(hProcess, APIAddress); HMODULE remoteModuleBase=(HMODULE)EngineGetModuleBaseRemote(hProcess, Address);
if(remoteModuleBase) if(remoteModuleBase)
{ {
wchar_t szModuleName[MAX_PATH]=L""; wchar_t szModuleName[MAX_PATH]=L"";
@ -187,8 +187,8 @@ ULONG_PTR EngineGetAPIAddressLocal(HANDLE hProcess, ULONG_PTR APIAddress)
ULONG_PTR localModuleBase=EngineGetModuleBaseRemote(GetCurrentProcess(), dllName); ULONG_PTR localModuleBase=EngineGetModuleBaseRemote(GetCurrentProcess(), dllName);
if(localModuleBase) if(localModuleBase)
{ {
APIAddress-=(ULONG_PTR)remoteModuleBase; //rva Address-=(ULONG_PTR)remoteModuleBase; //rva
return APIAddress+localModuleBase; return Address+localModuleBase;
} }
} }
} }

View File

@ -7,7 +7,7 @@ ULONG_PTR EngineGetProcAddressRemote(HANDLE hProcess, const char* szDLLName, con
ULONG_PTR EngineGetModuleBaseRemote(HANDLE hProcess, ULONG_PTR APIAddress); ULONG_PTR EngineGetModuleBaseRemote(HANDLE hProcess, ULONG_PTR APIAddress);
ULONG_PTR EngineGetModuleBaseRemote(HANDLE hProcess, const wchar_t* szDLLName); ULONG_PTR EngineGetModuleBaseRemote(HANDLE hProcess, const wchar_t* szDLLName);
ULONG_PTR EngineGetModuleBaseRemote(HANDLE hProcess, const char* szDLLName); ULONG_PTR EngineGetModuleBaseRemote(HANDLE hProcess, const char* szDLLName);
ULONG_PTR EngineGetAPIAddressRemote(HANDLE hProcess, ULONG_PTR APIAddress); ULONG_PTR EngineGetAddressRemote(HANDLE hProcess, ULONG_PTR APIAddress);
ULONG_PTR EngineGetAPIAddressLocal(HANDLE hProcess, ULONG_PTR APIAddress); ULONG_PTR EngineGetAddressLocal(HANDLE hProcess, ULONG_PTR APIAddress);
#endif //_GLOBAL_ENGINE_IMPORTER_H #endif //_GLOBAL_ENGINE_IMPORTER_H

View File

@ -104,7 +104,7 @@ __declspec(dllexport) void* TITCALL ImporterGetDLLNameW(ULONG_PTR APIAddress)
__declspec(dllexport) long long TITCALL ImporterGetRemoteAPIAddress(HANDLE hProcess, ULONG_PTR APIAddress) __declspec(dllexport) long long TITCALL ImporterGetRemoteAPIAddress(HANDLE hProcess, ULONG_PTR APIAddress)
{ {
return EngineGetAPIAddressRemote(hProcess, APIAddress); return EngineGetAddressRemote(hProcess, APIAddress);
} }
__declspec(dllexport) long long TITCALL ImporterGetRemoteAPIAddressEx(char* szDLLName, char* szAPIName) __declspec(dllexport) long long TITCALL ImporterGetRemoteAPIAddressEx(char* szDLLName, char* szAPIName)
@ -114,7 +114,7 @@ __declspec(dllexport) long long TITCALL ImporterGetRemoteAPIAddressEx(char* szDL
__declspec(dllexport) long long TITCALL ImporterGetLocalAPIAddress(HANDLE hProcess, ULONG_PTR APIAddress) __declspec(dllexport) long long TITCALL ImporterGetLocalAPIAddress(HANDLE hProcess, ULONG_PTR APIAddress)
{ {
return EngineGetAPIAddressLocal(hProcess, APIAddress); return EngineGetAddressLocal(hProcess, APIAddress);
} }
__declspec(dllexport) void* TITCALL ImporterGetDLLNameFromDebugee(HANDLE hProcess, ULONG_PTR APIAddress) __declspec(dllexport) void* TITCALL ImporterGetDLLNameFromDebugee(HANDLE hProcess, ULONG_PTR APIAddress)
@ -153,7 +153,7 @@ __declspec(dllexport) long long TITCALL ImporterGetRemoteDLLBaseEx(HANDLE hProce
__declspec(dllexport) long long TITCALL ImporterGetRemoteDLLBase(HANDLE hProcess, HMODULE LocalModuleBase) __declspec(dllexport) long long TITCALL ImporterGetRemoteDLLBase(HANDLE hProcess, HMODULE LocalModuleBase)
{ {
return EngineGetAPIAddressRemote(hProcess, (ULONG_PTR)LocalModuleBase); return EngineGetAddressRemote(hProcess, (ULONG_PTR)LocalModuleBase);
} }
__declspec(dllexport) void* TITCALL ImporterGetAPIName(ULONG_PTR APIAddress) __declspec(dllexport) void* TITCALL ImporterGetAPIName(ULONG_PTR APIAddress)

View File

@ -173,6 +173,7 @@ ImporterFindOrdinalAPIWriteLocation
ImporterFindAPIByWriteLocation ImporterFindAPIByWriteLocation
ImporterFindDLLByWriteLocation ImporterFindDLLByWriteLocation
ImporterGetDLLName ImporterGetDLLName
ImporterGetDLLNameW
ImporterGetAPIName ImporterGetAPIName
ImporterGetAPINameEx ImporterGetAPINameEx
ImporterGetAPIOrdinalNumber ImporterGetAPIOrdinalNumber
@ -180,6 +181,7 @@ ImporterGetRemoteAPIAddress
ImporterGetRemoteAPIAddressEx ImporterGetRemoteAPIAddressEx
ImporterGetLocalAPIAddress ImporterGetLocalAPIAddress
ImporterGetDLLNameFromDebugee ImporterGetDLLNameFromDebugee
ImporterGetDLLNameFromDebugeeW
ImporterGetAPINameFromDebugee ImporterGetAPINameFromDebugee
ImporterGetAPIOrdinalNumberFromDebugee ImporterGetAPIOrdinalNumberFromDebugee
ImporterGetDLLIndexEx ImporterGetDLLIndexEx