diff --git a/.gitignore b/.gitignore index d969d5c..d50b807 100644 --- a/.gitignore +++ b/.gitignore @@ -149,8 +149,8 @@ $RECYCLE.BIN/ # Mac crap .DS_Store - -*.cscope_file_list -*.bmarks -*.depend -*.layout + +*.cscope_file_list +*.bmarks +*.depend +*.layout \ No newline at end of file diff --git a/TitanEngine/TitanEngine.cpp b/TitanEngine/TitanEngine.cpp index 9056ee6..4c90da1 100644 --- a/TitanEngine/TitanEngine.cpp +++ b/TitanEngine/TitanEngine.cpp @@ -625,12 +625,20 @@ bool EngineIsPointedMemoryString(ULONG_PTR PossibleStringPtr) { i = MaxDisassmSize; } + else + { + MaxDisassmSize = 512; + } + } + else + { + MaxDisassmSize = 512; } - TestChar = *((BYTE*)PossibleStringPtr); + TestChar = *((BYTE*)PossibleStringPtr); while(i > NULL && StringIsValid == true && TestChar != 0x00) { - TestChar = *((BYTE*)PossibleStringPtr); + TestChar = *((BYTE*)PossibleStringPtr); if(TestChar < 32 || TestChar > 126) { @@ -3912,6 +3920,10 @@ __declspec(dllexport) bool TITCALL AddOverlayW(wchar_t* szFileName, wchar_t* szO } else { + return false; + } + else + { return false; } @@ -18717,6 +18729,38 @@ __declspec(dllexport) long long TITCALL ImporterGetRemoteDLLBaseEx(HANDLE hProce } return(NULL); } +__declspec(dllexport) bool TITCALL ImporterRelocateWriteLocation(ULONG_PTR AddValue) +{ + + unsigned int i; + ULONG_PTR RealignData = NULL; + + if(impDLLNumber) + { + for(i = 0; i < impDLLNumber + 1; i++) + { + RtlMoveMemory(&RealignData, (LPVOID)impDLLDataList[i][0], sizeof ULONG_PTR); + RealignData = RealignData + AddValue; + RtlMoveMemory((LPVOID)impDLLDataList[i][0], &RealignData, sizeof ULONG_PTR); + RtlMoveMemory(&RealignData, (LPVOID)((ULONG_PTR)impDLLDataList[i][0] + sizeof ULONG_PTR), sizeof ULONG_PTR); + RealignData = RealignData + AddValue; + RtlMoveMemory((LPVOID)((ULONG_PTR)impDLLDataList[i][0] + sizeof ULONG_PTR), &RealignData, sizeof ULONG_PTR); + } + for(i = 0; i < 1000; i++) + { + if(impOrdinalList[i][0] != NULL && impOrdinalList[i][1] != NULL) + { + impOrdinalList[i][0] = impOrdinalList[i][0] + AddValue; + } + } + return(true); + } + else + { + return(false); + } + return(false); +} __declspec(dllexport) bool TITCALL ImporterIsForwardedAPI(HANDLE hProcess, ULONG_PTR APIAddress) { if((ULONG_PTR)EngineGlobalAPIHandler(hProcess, NULL, APIAddress, NULL, UE_OPTION_IMPORTER_RETURN_FORWARDER_DLLINDEX) > NULL)