Advertisement
hWREpHV0ZKcVd

Untitled

Mar 1st, 2022 (edited)
81,292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifdef _M_X64
  2. C_ASSERT(FIELD_OFFSET(OBJECT_HEADER, Body) == 0x030);
  3. C_ASSERT(sizeof(OBJECT_HEADER) == 0x038);
  4. #else
  5. C_ASSERT(FIELD_OFFSET(OBJECT_HEADER, Body) == 0x018);
  6. C_ASSERT(sizeof(OBJECT_HEADER) == 0x020);
  7. #endif
  8.  
  9.  
  10. #define OBJECT_TO_OBJECT_HEADER(Object) CONTAINING_RECORD((Object), OBJECT_HEADER, Body)
  11.  
  12. NTKERNELAPI
  13. POBJECT_TYPE
  14. NTAPI
  15. ObGetObjectType(
  16.     _In_ PVOID Object
  17.     );
  18.  
  19. NTKERNELAPI
  20. NTSTATUS
  21. NTAPI
  22. ObOpenObjectByName(
  23.     _In_ POBJECT_ATTRIBUTES ObjectAttributes,
  24.     _In_ POBJECT_TYPE ObjectType,
  25.     _In_ KPROCESSOR_MODE PreviousMode,
  26.     _In_opt_ PACCESS_STATE AccessState,
  27.     _In_opt_ ACCESS_MASK DesiredAccess,
  28.     _In_opt_ PVOID ParseContext,
  29.     _Out_ PHANDLE Handle
  30.     );
  31.  
  32. NTKERNELAPI
  33. NTSTATUS
  34. NTAPI
  35. ObSetHandleAttributes(
  36.     _In_ HANDLE Handle,
  37.     _In_ POBJECT_HANDLE_FLAG_INFORMATION HandleFlags,
  38.     _In_ KPROCESSOR_MODE PreviousMode
  39.     );
  40.  
  41. // PS
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement