05-04-2010, 12:05 PM
وعليكم السلام ورحمة الله
![[صورة: 2yugapg.jpg]](http://i40.tinypic.com/2yugapg.jpg)
القيمة التي أصبحت 74 هي PokeValue. وهي قيمة واحدة لذلك NumberOfBytes =1
ملاحظة: تغيرت العناوين بعد الـ Compile بدلفي 7 كما في الصورة.
ربما يساعدك هذا:
مثال للحصول على EP برمجيا:
بالتوفيق.
إقتباس :المشكل هو كيف الحصول على BaseAddress لهده القيمة (برمجيا).تم الحصول على BaseAddress من هنا:
![[صورة: 2yugapg.jpg]](http://i40.tinypic.com/2yugapg.jpg)
القيمة التي أصبحت 74 هي PokeValue. وهي قيمة واحدة لذلك NumberOfBytes =1
ملاحظة: تغيرت العناوين بعد الـ Compile بدلفي 7 كما في الصورة.
إقتباس :برمجياممم... لكن على أساس ماذا؟
ربما يساعدك هذا:
مثال للحصول على EP برمجيا:
PHP كود :
const
// PE header constants
CENEWHDR = $003C; // offset of new EXE header
CEMAGIC = $5A4D; // old EXE magic id: 'MZ'
CPEMAGIC = $4550; // NT portable executable
function GetImageNtHeaders(module: dword) : PImageNtHeaders;
begin
result := nil;
try
if word(pointer(module)^) = CEMAGIC then begin
result := pointer(module + dword(pointer(module + CENEWHDR)^));
if result^.signature <> CPEMAGIC then
result := nil;
end;
except result := nil end;
end;
function GetEntryPoint(module: dword) : pointer;
var nh : PImageNtHeaders;
begin
nh := GetImageNtHeaders(module);
if (nh <> nil) and (nh^.OptionalHeader.AddressOfEntryPoint <> 0) then
dword(result) := module + nh^.OptionalHeader.AddressOfEntryPoint
else
result := nil;
end;
اللهم احقن دماء المسلمين، لا تنسوهم بالدعاء...

