38 lines
769 B
C
38 lines
769 B
C
#ifndef MISC_H
|
|
#define MISC_H
|
|
|
|
/**
|
|
\brief Checks if the page at addr is executable
|
|
*/
|
|
BOOL is_executable(LPVOID addr);
|
|
|
|
/**
|
|
\brief Checks if the process is running on WOW64 by examing Heaven's Gate
|
|
*/
|
|
BOOL is_WOW64();
|
|
|
|
/**
|
|
\brief Computes the djb2 hash of the input string
|
|
\param str The data to be hashed
|
|
\return The value.
|
|
*/
|
|
DWORD hash(const char* str);
|
|
|
|
/**
|
|
\brief Computes the djb2 hash of the input
|
|
\param buf The data to be hashed
|
|
\param sz The size of the data
|
|
\return The value.
|
|
*/
|
|
DWORD hash(const unsigned char* buf, const size_t sz);
|
|
|
|
/**
|
|
\brief Prints a small summarization of the current OS
|
|
*/
|
|
VOID print_os_info();
|
|
|
|
BOOL is_Win8();
|
|
|
|
#define GET_KUSER_SHARED_DATA() ((_KUSER_SHARED_DATA*)0x7FFE0000)
|
|
|
|
#endif |