diff --git a/.gitignore b/.gitignore
index 567d830..e7e5350 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,18 +1,267 @@
-#generic files/directories to ignore
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Visual Studio 2015 cache/options directory
+.vs/
+.vscode/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
Win32/
-x64/
+[Dd]ebug/
+[Rr]elease/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
ipch/
+*.aps
+*.ncb
+*.opendb
*.opensdf
*.sdf
-*.aps
-*.suo
-Scylla.vcxproj.user
+*.cachefile
+*.VC.db
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+
+# TODO: Un-comment the next line if you do not want to checkin
+# your web deploy settings because they may include unencrypted
+# passwords
+#*.pubxml
+*.publishproj
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Microsoft Azure ApplicationInsights config file
+ApplicationInsights.config
+
+# Windows Store app package directory
+AppPackages/
+BundleArtifacts/
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# LightSwitch generated files
+GeneratedArtifacts/
+ModelManifest.xml
+
+# Paket dependency manager
+.paket/paket.exe
+
+# FAKE - F# Make
+.fake/
+/src/presentations/web/wwwroot
+/src/services/webjob/lucene
+appsettings.Development.json
+
+# CMake
+CMakeCache.txt
+CMakeFiles/
+CMakeScripts
+Testing
+Makefile
+cmake_install.cmake
+install_manifest.txt
+compile_commands.json
+CTestTestfile.cmake
+CPackConfig.cmake
+CPackSourceConfig.cmake
+build/
+build.*/
+
+# Python
+*.pyc
+
+# .idea
+.idea/
-#tinyxml ignore + exceptions
-tinyxml/*
-!tinyxml/README
-!tinyxml/tinyxml.vcxproj*
+# bin
+bin/
+*.a
-#WTL ignore + exceptions
-WTL/*
-!WTL/README
\ No newline at end of file
+mason_packages/
\ No newline at end of file
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..33d258d
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,9 @@
+[submodule "libs/distorm"]
+ path = libs/distorm
+ url = https://github.com/gdabah/distorm.git
+[submodule "libs/tinyxml"]
+ path = libs/tinyxml
+ url = https://github.com/icebreaker/TinyXML.git
+[submodule "libs/wtl"]
+ path = libs/wtl
+ url = https://github.com/dacci/wtl.git
diff --git a/COMPILING b/COMPILING
index c7782c6..92011ec 100644
--- a/COMPILING
+++ b/COMPILING
@@ -1,7 +1,15 @@
-To compile Scylla you need to have VS2008 installed.
-In addition to that you need source codes for the following libraries:
-diStorm
-tinyxml
-WTL
+Building
+--------
-See the corresponding README files for installation instructions.
\ No newline at end of file
+ Prerequisite:
+ * Visual Studio 2017 or newer
+ * Windows Desktop Development components
+ * Windows SDK version 8.1+
+ * Git for Windows
+
+Clone this repo and open up your `Developer Command Prompt for VS` to the code folder.
+
+```shell
+> git submodule update --init --recursive
+> msbuild Scylla
+```
\ No newline at end of file
diff --git a/Plugins/ImpRec_Plugins/Imprec_Wrapper_DLL.dll b/Plugins/ImpRec_Plugins/Imprec_Wrapper_DLL.dll
deleted file mode 100644
index 6cd85b2..0000000
Binary files a/Plugins/ImpRec_Plugins/Imprec_Wrapper_DLL.dll and /dev/null differ
diff --git a/Plugins/ImpRec_Plugins/PECompact 2.7.x.dll b/Plugins/ImpRec_Plugins/PECompact 2.7.x.dll
deleted file mode 100644
index 13f044a..0000000
Binary files a/Plugins/ImpRec_Plugins/PECompact 2.7.x.dll and /dev/null differ
diff --git a/Plugins/PECompact.dll b/Plugins/PECompact.dll
deleted file mode 100644
index 667e26d..0000000
Binary files a/Plugins/PECompact.dll and /dev/null differ
diff --git a/Plugins/PESpin_x64_v1.dll b/Plugins/PESpin_x64_v1.dll
deleted file mode 100644
index 092e2c3..0000000
Binary files a/Plugins/PESpin_x64_v1.dll and /dev/null differ
diff --git a/Plugins/Scylla.Plugins.sln b/Plugins/Scylla.Plugins.sln
new file mode 100644
index 0000000..2052732
--- /dev/null
+++ b/Plugins/Scylla.Plugins.sln
@@ -0,0 +1,51 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.28315.86
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImprecWrapper", "src\ImprecWrapper\ImprecWrapper.vcxproj", "{9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PECompact", "src\PECompact\PECompact.vcxproj", "{01F5FC2E-0917-49A4-8AF1-ACA87604C66A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PESpin", "src\PESpin\PESpin.vcxproj", "{972D5174-2D85-4842-88FF-48426B23C56F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Debug|x64.ActiveCfg = Debug|x64
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Debug|x64.Build.0 = Debug|x64
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Debug|x86.ActiveCfg = Debug|Win32
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Debug|x86.Build.0 = Debug|Win32
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Release|x64.ActiveCfg = Release|x64
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Release|x64.Build.0 = Release|x64
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Release|x86.ActiveCfg = Release|Win32
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Release|x86.Build.0 = Release|Win32
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Debug|x64.ActiveCfg = Debug|x64
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Debug|x64.Build.0 = Debug|x64
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Debug|x86.ActiveCfg = Debug|Win32
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Debug|x86.Build.0 = Debug|Win32
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Release|x64.ActiveCfg = Release|x64
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Release|x64.Build.0 = Release|x64
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Release|x86.ActiveCfg = Release|Win32
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Release|x86.Build.0 = Release|Win32
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Debug|x64.ActiveCfg = Debug|x64
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Debug|x64.Build.0 = Debug|x64
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Debug|x86.ActiveCfg = Debug|Win32
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Debug|x86.Build.0 = Debug|Win32
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Release|x64.ActiveCfg = Release|x64
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Release|x64.Build.0 = Release|x64
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Release|x86.ActiveCfg = Release|Win32
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {D8C3EC6B-083F-4C08-A4A0-693F3D7542A6}
+ EndGlobalSection
+EndGlobal
diff --git a/Plugins/Sources/scyllatoimprectree.rar b/Plugins/Sources/scyllatoimprectree.rar
deleted file mode 100644
index 81211c5..0000000
Binary files a/Plugins/Sources/scyllatoimprectree.rar and /dev/null differ
diff --git a/Plugins/Include_Headers/ScyllaPlugin.h b/Plugins/include/ScyllaPlugin.h
similarity index 100%
rename from Plugins/Include_Headers/ScyllaPlugin.h
rename to Plugins/include/ScyllaPlugin.h
diff --git a/Plugins/src/ImprecWrapper/ImprecWrapper.vcxproj b/Plugins/src/ImprecWrapper/ImprecWrapper.vcxproj
new file mode 100644
index 0000000..660f906
--- /dev/null
+++ b/Plugins/src/ImprecWrapper/ImprecWrapper.vcxproj
@@ -0,0 +1,100 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ 15.0
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}
+ Win32Proj
+ ImprecWrapper
+ 10.0.17763.0
+
+
+
+ DynamicLibrary
+ true
+ v141_xp
+ Unicode
+
+
+ DynamicLibrary
+ false
+ v141_xp
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ true
+ WIN32;_DEBUG;IMPRECWRAPPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ $(ProjectDir)..\..\include;%(AdditionalIncludeDirectories)
+
+
+ Windows
+ true
+
+
+
+
+ Use
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ WIN32;NDEBUG;IMPRECWRAPPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ $(ProjectDir)..\..\include;%(AdditionalIncludeDirectories)
+
+
+ Windows
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+ Create
+ Create
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tinyxml/tinyxml.vcxproj.filters b/Plugins/src/ImprecWrapper/ImprecWrapper.vcxproj.filters
similarity index 72%
rename from tinyxml/tinyxml.vcxproj.filters
rename to Plugins/src/ImprecWrapper/ImprecWrapper.vcxproj.filters
index 86cc631..7ddc4d2 100644
--- a/tinyxml/tinyxml.vcxproj.filters
+++ b/Plugins/src/ImprecWrapper/ImprecWrapper.vcxproj.filters
@@ -7,7 +7,7 @@
{93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hpp;hxx;hm;inl;inc;xsd
+ h;hh;hpp;hxx;hm;inl;inc;ipp;xsd
{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
@@ -15,25 +15,19 @@
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
+
Header Files
-
+
Header Files
+
+
+ Source Files
+
+
+ Source Files
+
+
\ No newline at end of file
diff --git a/Plugins/Sources/Imprec_Wrapper_DLL.cpp b/Plugins/src/ImprecWrapper/Imprec_Wrapper_DLL.cpp
similarity index 97%
rename from Plugins/Sources/Imprec_Wrapper_DLL.cpp
rename to Plugins/src/ImprecWrapper/Imprec_Wrapper_DLL.cpp
index cf8a5fb..806e93e 100644
--- a/Plugins/Sources/Imprec_Wrapper_DLL.cpp
+++ b/Plugins/src/ImprecWrapper/Imprec_Wrapper_DLL.cpp
@@ -1,3 +1,5 @@
+#include "stdafx.h"
+
#include "ScyllaPlugin.h"
//remove c runtime library
@@ -7,6 +9,7 @@
//typedef DWORD (__cdecl * def_ImpREC_TraceCDE)(DWORD hFileMap, DWORD dwSizeMap, DWORD dwTimeOut, DWORD dwToTrace, DWORD dwExactCall);
typedef DWORD (* def_voidFunction)();
+#define PLUGIN_NAME "ImprecWrapper"
#define PLUGIN_IMPREC_EXCHANGE_DLL_PATH "ScyllaImprecPluginExchangePath"
#define PLUGIN_MAPPING_NAME "Imprec_plugin_exchanging"
@@ -82,6 +85,18 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,LPVOID lpvReserved)
return TRUE; // Successful DLL_PROCESS_ATTACH.
}
+#ifdef UNICODE
+DllExport wchar_t * __cdecl ScyllaPluginNameW()
+{
+ return (wchar_t*)TEXT(PLUGIN_NAME);
+}
+#else
+DllExport char * __cdecl ScyllaPluginNameA()
+{
+ return PLUGIN_NAME;
+}
+#endif
+
/*void checkCallingConvention()
{
__asm {
diff --git a/Plugins/src/ImprecWrapper/stdafx.cpp b/Plugins/src/ImprecWrapper/stdafx.cpp
new file mode 100644
index 0000000..fd4f341
--- /dev/null
+++ b/Plugins/src/ImprecWrapper/stdafx.cpp
@@ -0,0 +1 @@
+#include "stdafx.h"
diff --git a/Plugins/src/ImprecWrapper/stdafx.h b/Plugins/src/ImprecWrapper/stdafx.h
new file mode 100644
index 0000000..f380517
--- /dev/null
+++ b/Plugins/src/ImprecWrapper/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files
+#include
+
+
+
+// reference additional headers your program requires here
diff --git a/Plugins/src/ImprecWrapper/targetver.h b/Plugins/src/ImprecWrapper/targetver.h
new file mode 100644
index 0000000..87c0086
--- /dev/null
+++ b/Plugins/src/ImprecWrapper/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// Including SDKDDKVer.h defines the highest available Windows platform.
+
+// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
+// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
+
+#include
diff --git a/Plugins/Sources/PECompact.cpp b/Plugins/src/PECompact/PECompact.cpp
similarity index 92%
rename from Plugins/Sources/PECompact.cpp
rename to Plugins/src/PECompact/PECompact.cpp
index 03cc7b2..498d501 100644
--- a/Plugins/Sources/PECompact.cpp
+++ b/Plugins/src/PECompact/PECompact.cpp
@@ -1,3 +1,4 @@
+#include "stdafx.h"
#include "ScyllaPlugin.h"
@@ -20,10 +21,10 @@ void resolveImports();
#define PLUGIN_NAME "PECompact v2.x"
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,LPVOID lpvReserved)
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
- switch(fdwReason)
- {
+ switch (fdwReason)
+ {
case DLL_PROCESS_ATTACH:
// Initialize once for each new process.
// Return FALSE to fail DLL load.
@@ -63,7 +64,7 @@ BOOL getMappedView()
return FALSE;
}
- lpViewOfFile = MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, 0); //map the view with full access
+ lpViewOfFile = MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, 0); //map the view with full access
if (lpViewOfFile == 0)
{
@@ -126,7 +127,7 @@ void resolveImports()
scyllaExchange->status = SCYLLA_STATUS_UNSUPPORTED_PROTECTION;
break;
}
-
+
unresolvedImport++; //next pointer to struct
}
}
@@ -148,12 +149,12 @@ BOOL writeToLogFile(const char * text)
{
if (buffer[i] == '\\')
{
- buffer[i+1] = 0x00;
+ buffer[i + 1] = 0x00;
break;
}
}
- if (lstrcatA(buffer,logFileName) == 0) //append log file name to path
+ if (lstrcatA(buffer, logFileName) == 0) //append log file name to path
{
return FALSE;
}
@@ -175,7 +176,7 @@ BOOL writeToLogFile(const char * text)
{
wfRet = FALSE;
}
-
+
CloseHandle(hFile);
return wfRet;
}
@@ -184,7 +185,7 @@ BOOL writeToLogFile(const char * text)
#ifdef UNICODE
DllExport wchar_t * __cdecl ScyllaPluginNameW()
{
- return TEXT(PLUGIN_NAME);
+ return (wchar_t*)TEXT(PLUGIN_NAME);
}
#else
DllExport char * __cdecl ScyllaPluginNameA()
diff --git a/Plugins/src/PECompact/PECompact.vcxproj b/Plugins/src/PECompact/PECompact.vcxproj
new file mode 100644
index 0000000..35574a7
--- /dev/null
+++ b/Plugins/src/PECompact/PECompact.vcxproj
@@ -0,0 +1,169 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}
+ Win32Proj
+ ImprecWrapper
+ 10.0.17763.0
+
+
+
+ DynamicLibrary
+ true
+ v141_xp
+ Unicode
+
+
+ DynamicLibrary
+ false
+ v141_xp
+ true
+ Unicode
+
+
+ DynamicLibrary
+ true
+ v141_xp
+ Unicode
+
+
+ DynamicLibrary
+ false
+ v141_xp
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ true
+ WIN32;_DEBUG;IMPRECWRAPPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ $(ProjectDir)..\..\include;%(AdditionalIncludeDirectories)
+
+
+ Windows
+ true
+
+
+
+
+ Use
+ Level3
+ Disabled
+ true
+ _DEBUG;IMPRECWRAPPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ $(ProjectDir)..\..\include;%(AdditionalIncludeDirectories)
+
+
+ Windows
+ true
+
+
+
+
+ Use
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ WIN32;NDEBUG;IMPRECWRAPPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ $(ProjectDir)..\..\include;%(AdditionalIncludeDirectories)
+
+
+ Windows
+ true
+ true
+ true
+
+
+
+
+ Use
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ NDEBUG;IMPRECWRAPPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ $(ProjectDir)..\..\include;%(AdditionalIncludeDirectories)
+
+
+ Windows
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+ Create
+ Create
+ Create
+ Create
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Plugins/src/PECompact/PECompact.vcxproj.filters b/Plugins/src/PECompact/PECompact.vcxproj.filters
new file mode 100644
index 0000000..515421e
--- /dev/null
+++ b/Plugins/src/PECompact/PECompact.vcxproj.filters
@@ -0,0 +1,33 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;ipp;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/Plugins/src/PECompact/stdafx.cpp b/Plugins/src/PECompact/stdafx.cpp
new file mode 100644
index 0000000..fd4f341
--- /dev/null
+++ b/Plugins/src/PECompact/stdafx.cpp
@@ -0,0 +1 @@
+#include "stdafx.h"
diff --git a/Plugins/src/PECompact/stdafx.h b/Plugins/src/PECompact/stdafx.h
new file mode 100644
index 0000000..f380517
--- /dev/null
+++ b/Plugins/src/PECompact/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files
+#include
+
+
+
+// reference additional headers your program requires here
diff --git a/Plugins/src/PECompact/targetver.h b/Plugins/src/PECompact/targetver.h
new file mode 100644
index 0000000..87c0086
--- /dev/null
+++ b/Plugins/src/PECompact/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// Including SDKDDKVer.h defines the highest available Windows platform.
+
+// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
+// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
+
+#include
diff --git a/Plugins/src/PESpin/PESpin.vcxproj b/Plugins/src/PESpin/PESpin.vcxproj
new file mode 100644
index 0000000..9a86ae7
--- /dev/null
+++ b/Plugins/src/PESpin/PESpin.vcxproj
@@ -0,0 +1,169 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {972D5174-2D85-4842-88FF-48426B23C56F}
+ Win32Proj
+ ImprecWrapper
+ 10.0.17763.0
+
+
+
+ DynamicLibrary
+ true
+ v141_xp
+ Unicode
+
+
+ DynamicLibrary
+ false
+ v141_xp
+ true
+ Unicode
+
+
+ DynamicLibrary
+ true
+ v141_xp
+ Unicode
+
+
+ DynamicLibrary
+ false
+ v141_xp
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ true
+ WIN32;_DEBUG;IMPRECWRAPPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ $(ProjectDir)..\..\include;%(AdditionalIncludeDirectories)
+
+
+ Windows
+ true
+
+
+
+
+ Use
+ Level3
+ Disabled
+ true
+ _DEBUG;IMPRECWRAPPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ $(ProjectDir)..\..\include;%(AdditionalIncludeDirectories)
+
+
+ Windows
+ true
+
+
+
+
+ Use
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ WIN32;NDEBUG;IMPRECWRAPPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ $(ProjectDir)..\..\include;%(AdditionalIncludeDirectories)
+
+
+ Windows
+ true
+ true
+ true
+
+
+
+
+ Use
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ NDEBUG;IMPRECWRAPPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ $(ProjectDir)..\..\include;%(AdditionalIncludeDirectories)
+
+
+ Windows
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+ Create
+ Create
+ Create
+ Create
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Plugins/src/PESpin/PESpin.vcxproj.filters b/Plugins/src/PESpin/PESpin.vcxproj.filters
new file mode 100644
index 0000000..6be47c9
--- /dev/null
+++ b/Plugins/src/PESpin/PESpin.vcxproj.filters
@@ -0,0 +1,33 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;ipp;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/Plugins/Sources/PESpin_x64_v1.cpp b/Plugins/src/PESpin/PESpin_x64_v1.cpp
similarity index 99%
rename from Plugins/Sources/PESpin_x64_v1.cpp
rename to Plugins/src/PESpin/PESpin_x64_v1.cpp
index bdfde65..e9d2ef0 100644
--- a/Plugins/Sources/PESpin_x64_v1.cpp
+++ b/Plugins/src/PESpin/PESpin_x64_v1.cpp
@@ -1,3 +1,5 @@
+#include "stdafx.h"
+
#include "ScyllaPlugin.h"
const char logFileName[] = "logfile_scylla_plugin.txt";
@@ -486,7 +488,7 @@ BOOL writeToLogFile(const char * text)
#ifdef UNICODE
DllExport wchar_t * __cdecl ScyllaPluginNameW()
{
- return TEXT(PLUGIN_NAME);
+ return (wchar_t*)TEXT(PLUGIN_NAME);
}
#else
DllExport char * __cdecl ScyllaPluginNameA()
diff --git a/Plugins/src/PESpin/stdafx.cpp b/Plugins/src/PESpin/stdafx.cpp
new file mode 100644
index 0000000..fd4f341
--- /dev/null
+++ b/Plugins/src/PESpin/stdafx.cpp
@@ -0,0 +1 @@
+#include "stdafx.h"
diff --git a/Plugins/src/PESpin/stdafx.h b/Plugins/src/PESpin/stdafx.h
new file mode 100644
index 0000000..f380517
--- /dev/null
+++ b/Plugins/src/PESpin/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files
+#include
+
+
+
+// reference additional headers your program requires here
diff --git a/Plugins/src/PESpin/targetver.h b/Plugins/src/PESpin/targetver.h
new file mode 100644
index 0000000..87c0086
--- /dev/null
+++ b/Plugins/src/PESpin/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// Including SDKDDKVer.h defines the highest available Windows platform.
+
+// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
+// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
+
+#include
diff --git a/README.md b/README.md
index 1403e3a..bd6188a 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,21 @@ But it may work with XP and Vista, too.
Source code is licensed under GNU GENERAL PUBLIC LICENSE v3.0
+Building
+--------
+
+ Prerequisite:
+ * Visual Studio 2017 or newer
+ * Windows Desktop Development components
+ * Windows SDK version 8.1+
+ * Git for Windows
+
+Clone this repo and open up your `Developer Command Prompt for VS` to the code folder.
+
+```shell
+> git submodule update --init --recursive
+> msbuild Scylla
+```
Known Bugs
----------
diff --git a/Scylla.sln b/Scylla.sln
index 801aca6..a1386f9 100644
--- a/Scylla.sln
+++ b/Scylla.sln
@@ -1,17 +1,27 @@

-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.28315.86
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Scylla", "Scylla\Scylla.vcxproj", "{710434C9-FC4B-4F1D-B318-E10ADC78499F}"
ProjectSection(ProjectDependencies) = postProject
{187A751B-B47D-4A95-9F24-55D3D7ABB570} = {187A751B-B47D-4A95-9F24-55D3D7ABB570}
{A4B94DE4-BE0E-4E7D-95E7-7B84E6F117A1} = {A4B94DE4-BE0E-4E7D-95E7-7B84E6F117A1}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "diStorm", "diStorm\diStorm.vcxproj", "{A4B94DE4-BE0E-4E7D-95E7-7B84E6F117A1}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{84166737-F51E-44F2-9D9D-5E8CC48CEEBE}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4814523D-1988-4131-A72B-32C7881F3A32}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "diStorm", "libs\diStorm.vcxproj", "{A4B94DE4-BE0E-4E7D-95E7-7B84E6F117A1}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml", "tinyxml\tinyxml.vcxproj", "{187A751B-B47D-4A95-9F24-55D3D7ABB570}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml", "libs\tinyxml.vcxproj", "{187A751B-B47D-4A95-9F24-55D3D7ABB570}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugins", "plugins", "{A9A244B4-918B-4C5C-A6E3-B93918592E4B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImprecWrapper", "Plugins\src\ImprecWrapper\ImprecWrapper.vcxproj", "{9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PECompact", "Plugins\src\PECompact\PECompact.vcxproj", "{01F5FC2E-0917-49A4-8AF1-ACA87604C66A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PESpin", "Plugins\src\PESpin\PESpin.vcxproj", "{972D5174-2D85-4842-88FF-48426B23C56F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -45,8 +55,42 @@ Global
{187A751B-B47D-4A95-9F24-55D3D7ABB570}.Release|Win32.Build.0 = Release|Win32
{187A751B-B47D-4A95-9F24-55D3D7ABB570}.Release|x64.ActiveCfg = Release|x64
{187A751B-B47D-4A95-9F24-55D3D7ABB570}.Release|x64.Build.0 = Release|x64
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Debug|Win32.Build.0 = Debug|Win32
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Debug|x64.ActiveCfg = Debug|Win32
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Debug|x64.Build.0 = Debug|Win32
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Release|Win32.ActiveCfg = Release|Win32
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Release|Win32.Build.0 = Release|Win32
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Release|x64.ActiveCfg = Release|x64
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B}.Release|x64.Build.0 = Release|x64
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Debug|Win32.Build.0 = Debug|Win32
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Debug|x64.ActiveCfg = Debug|x64
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Debug|x64.Build.0 = Debug|x64
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Release|Win32.ActiveCfg = Release|Win32
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Release|Win32.Build.0 = Release|Win32
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Release|x64.ActiveCfg = Release|x64
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A}.Release|x64.Build.0 = Release|x64
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Debug|Win32.Build.0 = Debug|Win32
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Debug|x64.ActiveCfg = Debug|x64
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Debug|x64.Build.0 = Debug|x64
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Release|Win32.ActiveCfg = Release|Win32
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Release|Win32.Build.0 = Release|Win32
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Release|x64.ActiveCfg = Release|x64
+ {972D5174-2D85-4842-88FF-48426B23C56F}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {A4B94DE4-BE0E-4E7D-95E7-7B84E6F117A1} = {84166737-F51E-44F2-9D9D-5E8CC48CEEBE}
+ {187A751B-B47D-4A95-9F24-55D3D7ABB570} = {84166737-F51E-44F2-9D9D-5E8CC48CEEBE}
+ {9E21BF66-17A6-4EC9-A8C9-1CAF895CFE9B} = {A9A244B4-918B-4C5C-A6E3-B93918592E4B}
+ {01F5FC2E-0917-49A4-8AF1-ACA87604C66A} = {A9A244B4-918B-4C5C-A6E3-B93918592E4B}
+ {972D5174-2D85-4842-88FF-48426B23C56F} = {A9A244B4-918B-4C5C-A6E3-B93918592E4B}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {D8C3EC6B-083F-4C08-A4A0-693F3D7542A6}
+ EndGlobalSection
EndGlobal
diff --git a/Scylla/ApiReader.cpp b/Scylla/ApiReader.cpp
index ed2b764..5786103 100644
--- a/Scylla/ApiReader.cpp
+++ b/Scylla/ApiReader.cpp
@@ -7,7 +7,7 @@
#include "StringConversion.h"
#include "PeParser.h"
-stdext::hash_multimap ApiReader::apiList; //api look up table
+std::unordered_map ApiReader::apiList; //api look up table
std::map * ApiReader::moduleThunkList; //store found apis
DWORD_PTR ApiReader::minApiAddress = (DWORD_PTR)-1;
@@ -679,7 +679,7 @@ bool ApiReader::isApiAddressValid(DWORD_PTR virtualAddress)
ApiInfo * ApiReader::getApiByVirtualAddress(DWORD_PTR virtualAddress, bool * isSuspect)
{
- stdext::hash_multimap::iterator it1, it2;
+ std::unordered_map::iterator it1, it2;
size_t c = 0;
size_t countDuplicates = apiList.count(virtualAddress);
int countHighPriority = 0;
@@ -762,7 +762,7 @@ ApiInfo * ApiReader::getApiByVirtualAddress(DWORD_PTR virtualAddress, bool * isS
return (ApiInfo *) 1;
}
-ApiInfo * ApiReader::getScoredApi(stdext::hash_multimap::iterator it1,size_t countDuplicates, bool hasName, bool hasUnicodeAnsiName, bool hasNoUnderlineInName, bool hasPrioDll,bool hasPrio0Dll,bool hasPrio1Dll, bool hasPrio2Dll, bool firstWin )
+ApiInfo * ApiReader::getScoredApi(std::unordered_map::iterator it1,size_t countDuplicates, bool hasName, bool hasUnicodeAnsiName, bool hasNoUnderlineInName, bool hasPrioDll,bool hasPrio0Dll,bool hasPrio1Dll, bool hasPrio2Dll, bool firstWin )
{
ApiInfo * foundApi = 0;
ApiInfo * foundMatchingApi = 0;
@@ -1096,7 +1096,7 @@ void ApiReader::clearAll()
minApiAddress = (DWORD_PTR)-1;
maxApiAddress = 0;
- for ( stdext::hash_map::iterator it = apiList.begin(); it != apiList.end(); ++it )
+ for ( std::unordered_map::iterator it = apiList.begin(); it != apiList.end(); ++it )
{
delete it->second;
}
diff --git a/Scylla/ApiReader.h b/Scylla/ApiReader.h
index 5ebab30..6941f63 100644
--- a/Scylla/ApiReader.h
+++ b/Scylla/ApiReader.h
@@ -2,7 +2,8 @@
#include
#include