Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions inc/usersim/ob.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ _IRQL_requires_max_(DISPATCH_LEVEL) USERSIM_API LONG_PTR ObfDereferenceObject(_I
typedef struct _OBJECT_TYPE* POBJECT_TYPE;

USERSIM_API extern POBJECT_TYPE* ExEventObjectType;
USERSIM_API extern POBJECT_TYPE* IoFileObjectType;

typedef struct _OBJECT_HANDLE_INFORMATION
{
Expand Down
1 change: 1 addition & 0 deletions src/Source.def
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
LIBRARY
EXPORTS
ExEventObjectType
IoFileObjectType

FwpmCalloutAdd0
FwpmCalloutDeleteByKey0
Expand Down
3 changes: 3 additions & 0 deletions src/ob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ static std::map<PVOID, ULONG> _object_references;
static POBJECT_TYPE _ExEventObjectType = nullptr;
USERSIM_API __declspec(align(8)) POBJECT_TYPE* ExEventObjectType = &_ExEventObjectType;

static POBJECT_TYPE _IoFileObjectType = nullptr;
USERSIM_API __declspec(align(8)) POBJECT_TYPE* IoFileObjectType = &_IoFileObjectType;

_IRQL_requires_max_(DISPATCH_LEVEL) USERSIM_API LONG_PTR
ObfReferenceObject(_In_ PVOID object)
{
Expand Down