From ed5fbad687e4f4bf1720b21f93c7deca1d3e6277 Mon Sep 17 00:00:00 2001
From: "Mr. eXoDia"
Module Entry Points + + : To +access a module entry point you can write "[module]:entry", "[module]:oep" or "[module]:ep". Notice that when +there are exports with the names "entry", "oep" or "ep" the address of these will be +returned instead.
labels/symbols: user-defined labels and symbols are a valid expressions.
Input for arguments can always be done in any of
diff --git a/x64_dbg_dbg/value.cpp b/x64_dbg_dbg/value.cpp
index 83fc6559..82ab63c3 100644
--- a/x64_dbg_dbg/value.cpp
+++ b/x64_dbg_dbg/value.cpp
@@ -1213,8 +1213,10 @@ bool valapifromstring(const char* name, uint* value, int* value_size, bool print
uint addr = (uint)GetProcAddress(mod, apiname);
if(!addr) //not found
{
- if(!_stricmp(apiname, "base") or !_stricmp(apiname, "imagebase") or !_stricmp(apiname, "header"))
+ if(scmp(apiname, "base") or scmp(apiname, "imagebase") or scmp(apiname, "header")) //get loaded base
addr = modbase;
+ else if(scmp(apiname, "entry") or scmp(apiname, "oep") or scmp(apiname, "ep")) //get entry point
+ addr = modbase + GetPE32DataW(szModName, 0, UE_OEP);
else if(*apiname == '$') //RVA
{
uint rva;
@@ -1233,7 +1235,7 @@ bool valapifromstring(const char* name, uint* value, int* value_size, bool print
if(valfromstring(apiname, &ordinal))
{
addr = (uint)GetProcAddress(mod, (LPCSTR)(ordinal & 0xFFFF));
- if(!addr and !ordinal)
+ if(!addr and !ordinal) //support for getting the image base using