#ifndef ZERIN_SYSCALLS_H #define ZERIN_SYSCALLS_H #ifdef _WIN32 #include #include // 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