ReactOS
0.4.15-dev-4616-g17e0e44
|
#include "ntndk.h"
#include "shimlib.h"
#include <strsafe.h>
#include "apphelp.h"
#include "shimeng.h"
Go to the source code of this file.
Macros | |
#define | WIN32_NO_STATUS |
#define | IN_APPHELP |
#define | APPHELP_NOSDBPAPI |
#define | ARRAY_Init(Array, TypeOfArray) ARRAY_InitWorker((Array), sizeof(TypeOfArray)) |
#define | ARRAY_Append(Array, TypeOfArray) (TypeOfArray*)ARRAY_AppendWorker((Array), sizeof(TypeOfArray), 5) |
#define | ARRAY_At(Array, TypeOfArray, at) (TypeOfArray*)ARRAY_AtWorker((Array), sizeof(TypeOfArray), at) |
#define | ARRAY_Size(Array) (Array)->Size__ |
#define | MAX_LAYER_LENGTH 256 |
#define | SYSTEM32 L"\\system32" |
#define | WINSXS L"\\winsxs" |
Typedefs | |
typedef FARPROC(WINAPI * | GETPROCADDRESSPROC) (HINSTANCE, LPCSTR) |
Variables | |
static const UNICODE_STRING | Ntdll = RTL_CONSTANT_STRING(L"ntdll.dll") |
static const UNICODE_STRING | Kernel32 = RTL_CONSTANT_STRING(L"kernel32.dll") |
static const UNICODE_STRING | Verifier = RTL_CONSTANT_STRING(L"verifier.dll") |
HMODULE | g_hInstance |
static UNICODE_STRING | g_WindowsDirectory |
static UNICODE_STRING | g_System32Directory |
static UNICODE_STRING | g_SxsDirectory |
static UNICODE_STRING | g_LoadingShimDll |
ULONG | g_ShimEngDebugLevel = 0xffffffff |
BOOL | g_bComPlusImage = FALSE |
BOOL | g_bShimDuringInit = FALSE |
BOOL | g_bInternalHooksUsed = FALSE |
static ARRAY | g_pShimInfo |
static ARRAY | g_pHookArray |
static ARRAY | g_InExclude |
HOOKAPIEX | g_IntHookEx [] |
#define ARRAY_Append | ( | Array, | |
TypeOfArray | |||
) | (TypeOfArray*)ARRAY_AppendWorker((Array), sizeof(TypeOfArray), 5) |
#define ARRAY_At | ( | Array, | |
TypeOfArray, | |||
at | |||
) | (TypeOfArray*)ARRAY_AtWorker((Array), sizeof(TypeOfArray), at) |
#define ARRAY_Init | ( | Array, | |
TypeOfArray | |||
) | ARRAY_InitWorker((Array), sizeof(TypeOfArray)) |
Definition at line 94 of file shimeng.c.
Definition at line 63 of file shimeng.c.
Referenced by ARRAY_AppendWorker().
Definition at line 254 of file shimeng.c.
Referenced by SE_DllLoaded(), SE_DllUnloaded(), SE_InstallAfterInit(), SE_ProcessDying(), and SeiCreateShimModuleInfo().
Definition at line 1058 of file shimeng.c.
Referenced by SeiInit().
VOID WINAPI SE_DllLoaded | ( | PLDR_DATA_TABLE_ENTRY | LdrEntry | ) |
Definition at line 1433 of file shimeng.c.
Referenced by LdrpGetShimEngineInterface(), and LdrpLoadDll().
VOID WINAPI SE_DllUnloaded | ( | PLDR_DATA_TABLE_ENTRY | LdrEntry | ) |
Definition at line 1451 of file shimeng.c.
Referenced by LdrpGetShimEngineInterface(), and LdrUnloadDll().
VOID NTAPI SE_InstallAfterInit | ( | PUNICODE_STRING | ProcessImage, |
PVOID | pShimData | ||
) |
Definition at line 1422 of file shimeng.c.
Referenced by LdrpGetShimEngineInterface(), and LdrpInitializeProcess().
VOID NTAPI SE_InstallBeforeInit | ( | PUNICODE_STRING | ProcessImage, |
PVOID | pShimData | ||
) |
Definition at line 1403 of file shimeng.c.
Referenced by LdrpGetShimEngineInterface(), and LdrpLoadShimEngine().
Definition at line 1460 of file shimeng.c.
Referenced by SeiHookImports(), SeiResetEntryProcessed(), SeiSetEntryProcessed(), and StubGetProcAddress().
Definition at line 1427 of file shimeng.c.
Referenced by LdrpGetShimEngineInterface(), and LdrShutdownProcess().
Definition at line 438 of file shimeng.c.
Referenced by SeiBuildShimRefArray().
VOID SeiAddHooks | ( | PHOOKAPIEX | hooks, |
DWORD | dwHookCount, | ||
PSHIMINFO | pShim | ||
) |
Definition at line 555 of file shimeng.c.
Referenced by SeiAddInternalHooks(), and SeiCombineHookInfo().
Definition at line 750 of file shimeng.c.
Referenced by SeiInit().
Definition at line 427 of file shimeng.c.
Referenced by SeiBuildShimRefArray().
PSHIMINFO SeiAppendHookInfo | ( | PSHIMMODULE | pShimModuleInfo, |
PHOOKAPIEX | pHookApi, | ||
DWORD | dwHookCount, | ||
PCWSTR | ShimName | ||
) |
Definition at line 326 of file shimeng.c.
Referenced by SeiInit().
Definition at line 859 of file shimeng.c.
Referenced by SeiBuildInclExclList(), and SeiReadInExclude().
Definition at line 908 of file shimeng.c.
Referenced by SeiInit().
Definition at line 935 of file shimeng.c.
Referenced by SeiInit().
|
static |
Definition at line 473 of file shimeng.c.
Referenced by SeiInit().
Definition at line 270 of file shimeng.c.
Referenced by SeiInit().
Definition at line 726 of file shimeng.c.
Referenced by SeiInit().
PSHIMMODULE SeiCreateShimModuleInfo | ( | PCWSTR | DllName, |
PVOID | BaseAddress | ||
) |
Definition at line 293 of file shimeng.c.
Referenced by SeiInit().
BOOL WINAPIV SeiDbgPrint | ( | SEI_LOG_LEVEL | Level, |
PCSTR | Function, | ||
PCSTR | Format, | ||
... | |||
) |
Outputs diagnostic info.
[in] | Level | The level to log this message with, choose any of [SHIM_ERR, SHIM_WARN, SHIM_INFO]. |
[in] | FunctionName | The function this log should be attributed to. |
[in] | Format | The format string. |
... | Variable arguments providing additional information. |
Definition at line 159 of file shimeng.c.
Referenced by SeiBuildShimRefArray(), and SeiInit().
PHOOKMODULEINFO SeiFindHookModuleInfo | ( | PUNICODE_STRING | ModuleName, |
PVOID | BaseAddress | ||
) |
Definition at line 351 of file shimeng.c.
Referenced by SE_DllLoaded(), SeiAddHooks(), SeiFindHookModuleInfoForImportDescriptor(), and StubGetProcAddress().
PHOOKMODULEINFO SeiFindHookModuleInfoForImportDescriptor | ( | PBYTE | DllBase, |
PIMAGE_IMPORT_DESCRIPTOR | ImportDescriptor | ||
) |
Definition at line 374 of file shimeng.c.
Referenced by SeiHookImports().
PINEXCLUDE SeiFindInExclude | ( | PARRAY | InExclude, |
PCUNICODE_STRING | DllName | ||
) |
Definition at line 796 of file shimeng.c.
Referenced by SeiAppendInExclude(), and SeiIsExcluded().
Definition at line 409 of file shimeng.c.
Referenced by SeiAddFlag(), and SeiInit().
Definition at line 245 of file shimeng.c.
Referenced by StubGetProcAddress().
Definition at line 418 of file shimeng.c.
Referenced by SeiAddFlag().
BOOL SeiGetShimData | ( | PUNICODE_STRING | ProcessImage, |
PVOID | pShimData, | ||
HSDB * | pHsdb, | ||
SDBQUERYRESULT * | pQuery | ||
) |
Definition at line 1353 of file shimeng.c.
Referenced by SE_InstallBeforeInit().
PSHIMMODULE SeiGetShimModuleInfo | ( | PVOID | BaseAddress | ) |
Definition at line 279 of file shimeng.c.
Referenced by SE_IsShimDll(), and SeiInit().
Definition at line 400 of file shimeng.c.
Referenced by SeiBuildShimRefArray(), and SeiInit().
VOID SeiHookImports | ( | PLDR_DATA_TABLE_ENTRY | LdrEntry | ) |
Definition at line 951 of file shimeng.c.
Referenced by PatchNewModules(), and SE_DllLoaded().
VOID SeiInit | ( | PUNICODE_STRING | ProcessImage, |
HSDB | hsdb, | ||
SDBQUERYRESULT * | pQuery | ||
) |
Definition at line 1178 of file shimeng.c.
Referenced by SE_InstallBeforeInit().
Definition at line 127 of file shimeng.c.
Referenced by SeiDbgPrint().
Definition at line 1076 of file shimeng.c.
Referenced by SeiInit().
BOOL SeiIsExcluded | ( | PLDR_DATA_TABLE_ENTRY | LdrEntry, |
PHOOKAPIEX | HookApi | ||
) |
Definition at line 811 of file shimeng.c.
Referenced by SeiHookImports().
Definition at line 212 of file shimeng.c.
Referenced by SeiCompareFunctionName(), SeiHookImports(), SeiPrintFunctionName(), and SeiResolveAPI().
VOID SeiPatchNewImport | ( | PIMAGE_THUNK_DATA | FirstThunk, |
PHOOKAPIEX | HookApi, | ||
PLDR_DATA_TABLE_ENTRY | LdrEntry | ||
) |
Definition at line 763 of file shimeng.c.
Referenced by SeiHookImports().
Definition at line 217 of file shimeng.c.
Referenced by SeiHookImports(), SeiIsExcluded(), SeiPatchNewImport(), SeiResolveAPI(), and StubGetProcAddress().
Definition at line 882 of file shimeng.c.
Referenced by SeiBuildGlobalInclExclList(), and SeiBuildInclExclList().
Definition at line 1149 of file shimeng.c.
Referenced by SeiInit().
VOID SeiResolveAPI | ( | PHOOKMODULEINFO | HookModuleInfo | ) |
Definition at line 664 of file shimeng.c.
Referenced by SE_DllLoaded(), and SeiResolveAPIs().
Definition at line 1098 of file shimeng.c.
Referenced by SeiInit().
Definition at line 455 of file shimeng.c.
Referenced by SeiBuildShimRefArray().
Definition at line 627 of file shimeng.c.
Definition at line 33 of file shimeng.c.
Referenced by SeiCheckComPlusImage().
Definition at line 35 of file shimeng.c.
Referenced by SeiAddInternalHooks().
Definition at line 34 of file shimeng.c.
Referenced by SE_DllLoaded(), and SE_InstallBeforeInit().
HMODULE g_hInstance |
Definition at line 18 of file MainWindow.cpp.
Referenced by SeiHookImports(), and SeiResetEntryProcessed().
|
static |
Definition at line 38 of file shimeng.c.
Referenced by SeiBuildGlobalInclExclList(), SeiBuildInclExclList(), and SeiInit().
HOOKAPIEX g_IntHookEx[] |
Definition at line 42 of file shimeng.c.
Referenced by SeiAddInternalHooks(), and StubGetProcAddress().
|
static |
Definition at line 31 of file shimeng.c.
Referenced by SeiHookImports(), SeiInit(), and SeiSetEntryProcessed().
|
static |
Definition at line 37 of file shimeng.c.
Referenced by SeiAddHooks(), SeiFindHookModuleInfo(), SeiInit(), and SeiResolveAPIs().
|
static |
Definition at line 36 of file shimeng.c.
Referenced by NotifyShims(), SeiCombineHookInfo(), SeiCreateShimModuleInfo(), SeiGetShimModuleInfo(), and SeiInit().
ULONG g_ShimEngDebugLevel = 0xffffffff |
Definition at line 32 of file shimeng.c.
Referenced by SeiDbgPrint(), and SeiInitDebugSupport().
|
static |
Definition at line 30 of file shimeng.c.
Referenced by SeiInitPaths(), and SeiIsExcluded().
|
static |
Definition at line 29 of file shimeng.c.
Referenced by SeiInitPaths(), and SeiIsExcluded().
|
static |
Definition at line 28 of file shimeng.c.
Referenced by SeiInitPaths().
|
static |
Definition at line 24 of file shimeng.c.
Referenced by SeiResetEntryProcessed(), and SeiSetEntryProcessed().
|
static |
Definition at line 23 of file shimeng.c.
Referenced by SeiResetEntryProcessed(), and SeiSetEntryProcessed().
|
static |
Definition at line 25 of file shimeng.c.
Referenced by SeiResetEntryProcessed(), and SeiSetEntryProcessed().