Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
gmh5225 committed Oct 31, 2023
1 parent f1ed98d commit 200f489
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/testdrv1/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}

0 comments on commit 200f489

Please sign in to comment.