Add support for SetUnhandledExceptionFilter

This commit is contained in:
Boring
2022-12-09 11:12:58 +08:00
parent 5f60d93890
commit 3c9a88e78b
5 changed files with 67 additions and 7 deletions
+16 -3
View File
@@ -1,4 +1,5 @@
#include "../MemoryModule/stdafx.h"
#include "../MemoryModule/LoadDllMemoryApi.h"
#include <cstdio>
static PVOID ReadDllFile(LPCSTR FileName) {
@@ -115,10 +116,22 @@ end:
return 0;
}
int main() {
DisplayStatus();
void test_uef() {
auto buffer = ReadDllFile("a.dll");
test();
HMODULE hm = LoadLibraryMemory(buffer);
auto pfn = GetProcAddress(hm, "unhandled_exception");
auto result = pfn();
if (result == 1234) {
printf("mmpp success\n");
}
return;
}
int main() {
test_uef();
return 0;
}