Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/taviso/loadlibrary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTavis Ormandy <taviso@gmail.com>2019-08-21 00:09:22 +0300
committerTavis Ormandy <taviso@gmail.com>2019-08-21 00:09:22 +0300
commiteb7b94e36fc7c23316f25c7e36b94b76335fa491 (patch)
treedc930c78a90054a9c27312c1aa305dc2e197cbb1
parent4e2655ae855b6262bfdaf98e5822b8e0252182b1 (diff)
add some stubs for vista threadpools
-rw-r--r--peloader/winapi/ProcessThreads.c2
-rw-r--r--peloader/winapi/Threads.c87
2 files changed, 87 insertions, 2 deletions
diff --git a/peloader/winapi/ProcessThreads.c b/peloader/winapi/ProcessThreads.c
index 6429453..594f405 100644
--- a/peloader/winapi/ProcessThreads.c
+++ b/peloader/winapi/ProcessThreads.c
@@ -30,8 +30,6 @@ static VOID WINAPI InitializeSRWLock(PVOID SRWLock)
static VOID WINAPI SetThreadpoolTimer(PVOID pti, PVOID pftDueTime, DWORD msPeriod, DWORD msWindowLength)
{
DebugLog("%p, %p, %u, %u", pti, pftDueTime, msPeriod, msWindowLength);
-
- assert(pftDueTime == NULL);
}
static VOID WINAPI WaitForThreadpoolTimerCallbacks(PVOID pti, BOOL fCancelPendingCallbacks)
diff --git a/peloader/winapi/Threads.c b/peloader/winapi/Threads.c
new file mode 100644
index 0000000..e4ff8fe
--- /dev/null
+++ b/peloader/winapi/Threads.c
@@ -0,0 +1,87 @@
+#include <stdint.h>
+#include <stddef.h>
+#include <string.h>
+#include <stdbool.h>
+#include <search.h>
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+
+#include "winnt_types.h"
+#include "pe_linker.h"
+#include "ntoskernel.h"
+#include "log.h"
+#include "winexports.h"
+#include "util.h"
+#include "winstrings.h"
+
+static __stdcall PVOID CreateThreadPoolWait(PVOID pwa)
+{
+ DebugLog("");
+ return 0x41414141;
+}
+
+static __stdcall PVOID CreateThreadPool(PVOID reserved)
+{
+ DebugLog("");
+ return 0x41414141;
+}
+
+static __stdcall PVOID CreateThreadpoolTimer(PVOID pfnti, PVOID pv, PVOID pcbe)
+{
+ DebugLog("");
+ return 0x41414141;
+}
+
+static __stdcall PVOID CreateThreadpoolWork(PVOID pfnwk, PVOID pv, PVOID pcbe)
+{
+ DebugLog("");
+ return 0x41414141;
+}
+
+static __stdcall PVOID CloseThreadpoolTimer(PVOID pti)
+{
+ DebugLog("");
+ return NULL;
+}
+
+static __stdcall PVOID CreateThreadpoolWait() { DebugLog(""); return NULL; }
+static __stdcall PVOID SetThreadpoolWait() { DebugLog(""); return NULL; }
+static __stdcall PVOID SubmitThreadpoolWork() { DebugLog(""); return NULL; }
+static __stdcall PVOID CancelThreadpoolIo() { DebugLog(""); return NULL; }
+static __stdcall PVOID CloseThreadpool() { DebugLog(""); return NULL; }
+static __stdcall PVOID CloseThreadpoolIo() { DebugLog(""); return NULL; }
+static __stdcall PVOID CloseThreadpoolWait() { DebugLog(""); return NULL; }
+static __stdcall PVOID CloseThreadpoolWork() { DebugLog(""); return NULL; }
+static __stdcall PVOID CreateThreadpool() { DebugLog(""); return NULL; }
+static __stdcall PVOID CreateThreadpoolIo() { DebugLog(""); return NULL; }
+static __stdcall PVOID SetThreadpoolThreadMaximum() { DebugLog(""); return NULL; }
+static __stdcall PVOID SetThreadpoolThreadMinimum() { DebugLog(""); return NULL; }
+static __stdcall PVOID StartThreadpoolIo() { DebugLog(""); return NULL; }
+static __stdcall PVOID WaitForThreadpoolIoCallbacks() { DebugLog(""); return NULL; }
+static __stdcall PVOID WaitForThreadpoolWaitCallbacks() { DebugLog(""); return NULL; }
+static __stdcall PVOID WaitForThreadpoolWorkCallbacks() { DebugLog(""); return NULL; }
+
+
+DECLARE_CRT_EXPORT("CreateThreadPoolWait", CreateThreadPoolWait);
+DECLARE_CRT_EXPORT("CreateThreadPool", CreateThreadPool);
+
+DECLARE_CRT_EXPORT("CreateThreadpoolTimer", CreateThreadpoolTimer);
+DECLARE_CRT_EXPORT("CloseThreadpoolTimer", CloseThreadpoolTimer);
+DECLARE_CRT_EXPORT("CreateThreadpoolWait", CreateThreadpoolWait);
+DECLARE_CRT_EXPORT("SetThreadpoolWait", SetThreadpoolWait);
+DECLARE_CRT_EXPORT("CloseThreadpoolWait", CloseThreadpoolWait);
+DECLARE_CRT_EXPORT("CreateThreadpoolWork", CreateThreadpoolWork);
+DECLARE_CRT_EXPORT("SubmitThreadpoolWork", SubmitThreadpoolWork);
+DECLARE_CRT_EXPORT("CancelThreadpoolIo", CancelThreadpoolIo);
+DECLARE_CRT_EXPORT("CloseThreadpool", CloseThreadpool);
+DECLARE_CRT_EXPORT("CloseThreadpoolIo", CloseThreadpoolIo);
+DECLARE_CRT_EXPORT("CloseThreadpoolWork", CloseThreadpoolWork);
+DECLARE_CRT_EXPORT("CreateThreadpool", CreateThreadpool);
+DECLARE_CRT_EXPORT("CreateThreadpoolIo", CreateThreadpoolIo);
+DECLARE_CRT_EXPORT("SetThreadpoolThreadMaximum", SetThreadpoolThreadMaximum);
+DECLARE_CRT_EXPORT("SetThreadpoolThreadMinimum", SetThreadpoolThreadMinimum);
+DECLARE_CRT_EXPORT("StartThreadpoolIo", StartThreadpoolIo);
+DECLARE_CRT_EXPORT("WaitForThreadpoolIoCallbacks", WaitForThreadpoolIoCallbacks);
+DECLARE_CRT_EXPORT("WaitForThreadpoolWaitCallbacks", WaitForThreadpoolWaitCallbacks);
+DECLARE_CRT_EXPORT("WaitForThreadpoolWorkCallbacks", WaitForThreadpoolWorkCallbacks);