Implement some more missing APIs

This commit is contained in:
Duncan Ogilvie 2020-11-12 04:05:45 +01:00
parent 3c02faea83
commit 5bc2e682e9
2 changed files with 19 additions and 0 deletions

View File

@ -300,6 +300,14 @@ public:
return &mMainProcess;
}
ULONG_PTR GetDebuggedFileBaseAddress()
{
auto itr = mProcesses.find(mMainProcess.dwProcessId);
if (itr != mProcesses.end())
return (ULONG_PTR)itr->second->createProcessInfo.lpBaseOfImage;
return 0;
}
//Stepping
void StepOver(LPVOID CallBack)
{

View File

@ -135,6 +135,17 @@ __declspec(dllexport) ULONG_PTR TITCALL ImporterGetRemoteAPIAddressEx(const char
return 0;
}
__declspec(dllexport) ULONG_PTR TITCALL GetDebuggedFileBaseAddress()
{
return emu.GetDebuggedFileBaseAddress();
}
__declspec(dllexport) bool TITCALL DumpProcess(HANDLE hProcess, LPVOID ImageBase, const char* szDumpFileName, ULONG_PTR EntryPoint)
{
// Just fails https://github.com/x64dbg/testplugin/blob/4ceae85ca8e8b63ff155495311c2c4b92febce99/test.cpp#L289, so not worth implementing
return false;
}
//Registers
__declspec(dllexport) ULONG_PTR TITCALL GetContextDataEx(HANDLE hActiveThread, DWORD IndexOfRegister)
{