initial commit
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#ifndef ZERIN_SYSCALLS_H
|
||||
#define ZERIN_SYSCALLS_H
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <stdint.h>
|
||||
#include <windows.h>
|
||||
|
||||
// Polymorphic hash algorithm + pre-computed constants (generated per build)
|
||||
#include "poly_hash.h"
|
||||
|
||||
// Walk PEB to find a loaded module by its name hash.
|
||||
void *get_module_by_hash(uint32_t hash);
|
||||
|
||||
// Resolve an exported function from a module by function name hash.
|
||||
FARPROC resolve_api(uint32_t module_hash, uint32_t func_hash);
|
||||
|
||||
// Convenience macro: resolve and cast in one step.
|
||||
// Usage: RESOLVE_API(HASH_KERNEL32, HASH_SomeFunc, FuncPtrType)
|
||||
#define RESOLVE_API(mod_hash, func_hash, type) \
|
||||
((type)resolve_api((mod_hash), (func_hash)))
|
||||
|
||||
#endif // _WIN32
|
||||
#endif // ZERIN_SYSCALLS_H
|
||||
Reference in New Issue
Block a user