30 lines
870 B
C++
30 lines
870 B
C++
#pragma once
|
|
|
|
// util.h
|
|
// 8/23/2013 jichi
|
|
|
|
#include <Windows.h>
|
|
|
|
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);
|
|
bool CheckFile(LPCWSTR name);
|
|
|
|
bool SearchResourceString(LPCWSTR str);
|
|
|
|
DWORD SearchMemory(const BYTE* bytes, unsigned short length, DWORD protect = PAGE_EXECUTE);
|
|
|
|
} // namespace Util
|
|
|
|
// EOF
|