diff --git a/test/testdrv1/main.cpp b/test/testdrv1/main.cpp index 0b67a82..59bb625 100644 --- a/test/testdrv1/main.cpp +++ b/test/testdrv1/main.cpp @@ -8,6 +8,26 @@ LibWinDrvDriverUnLoad(__in DRIVER_OBJECT *DriverObject) dprintf("world hello\n"); } +// ULONG_PTR g_addr = 0; +//__declspec(naked) __declspec("volatile") void myfunc2() +//{ +// _asm { +// mov rax, g_addr +// add rax, 3 +// jmp rax +// } +// } +// +//__declspec(naked) __declspec("volatile") void myfunc1(void *p) +//{ +// _asm { +// mov rax, [rsp] +// mov g_addr, rax +// mov [rsp], rcx +// ret +// } +// } + EXTERN_C NTSTATUS LibWinDrvDriverEntry(__in DRIVER_OBJECT *DriverObject, __in UNICODE_STRING *RegistryPath) @@ -16,5 +36,12 @@ LibWinDrvDriverEntry(__in DRIVER_OBJECT *DriverObject, __in UNICODE_STRING *Regi UNREFERENCED_PARAMETER(RegistryPath); dprintf("hello world\n"); + /*myfunc1((void *)myfunc2); + _asm { + nop + nop + nop + } + dprintf("hello world2\n");*/ return -1; }