2016-01-05 23:01:17 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// util.h
|
|
|
|
// 8/23/2013 jichi
|
|
|
|
|
|
|
|
namespace Util {
|
|
|
|
|
|
|
|
bool unloadCurrentModule();
|
|
|
|
|
|
|
|
DWORD GetCodeRange(DWORD hModule,DWORD *low, DWORD *high);
|
|
|
|
DWORD FindCallAndEntryBoth(DWORD fun, DWORD size, DWORD pt, DWORD sig);
|
|
|
|
DWORD FindCallOrJmpRel(DWORD fun, DWORD size, DWORD pt, bool jmp);
|
|
|
|
DWORD FindCallOrJmpAbs(DWORD fun, DWORD size, DWORD pt, bool jmp);
|
|
|
|
DWORD FindCallBoth(DWORD fun, DWORD size, DWORD pt);
|
|
|
|
DWORD FindCallAndEntryAbs(DWORD fun, DWORD size, DWORD pt, DWORD sig);
|
|
|
|
DWORD FindCallAndEntryRel(DWORD fun, DWORD size, DWORD pt, DWORD sig);
|
|
|
|
DWORD FindEntryAligned(DWORD start, DWORD back_range);
|
|
|
|
DWORD FindImportEntry(DWORD hModule, DWORD fun);
|
2018-06-15 16:32:35 +08:00
|
|
|
bool CheckFile(LPCWSTR name);
|
2016-01-05 23:01:17 +08:00
|
|
|
|
|
|
|
bool SearchResourceString(LPCWSTR str);
|
|
|
|
|
2019-11-11 03:13:54 +08:00
|
|
|
std::pair<uint64_t, uint64_t> QueryModuleLimits(HMODULE module);
|
2019-06-09 12:48:30 +08:00
|
|
|
std::vector<uint64_t> SearchMemory(const void* bytes, short length, DWORD protect = PAGE_EXECUTE, uintptr_t minAddr = 0, uintptr_t maxAddr = -1ULL);
|
2021-03-17 13:49:07 +08:00
|
|
|
uintptr_t FindFunction(const char* function);
|
2018-08-29 10:05:56 +08:00
|
|
|
|
2016-01-05 23:01:17 +08:00
|
|
|
} // namespace Util
|
|
|
|
|
|
|
|
// EOF
|