XexGetProcedureAddress by name implemented.

This commit is contained in:
Dr. Chat
2015-05-04 17:38:34 -05:00
parent 78921c1a7e
commit 49c8efdc6d
8 changed files with 101 additions and 1 deletions

View File

@@ -148,6 +148,17 @@ void* XUserModule::GetProcAddressByOrdinal(uint16_t ordinal) {
return NULL;
}
void* XUserModule::GetProcAddressByName(const char* name) {
PEExport export;
int ret = xe_xex2_lookup_export(xex_, name, export);
// Failure.
if (ret)
return NULL;
return (void *)export.addr;
}
X_STATUS XUserModule::GetSection(const char* name, uint32_t* out_section_data,
uint32_t* out_section_size) {
auto header = xe_xex2_get_header(xex_);