• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 26 رای - 3 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: Write 64 Bit Program Delphi
حالت خطی
#2
ust test code a crypter in xe2 (64bit). Bcoz in 64bit peb location moved and sizeof pointer is 8, some walking peb failed and u will get error .

Btw here u go alternative getmodulehandle compatible 32 and 64bit pe (xe2)

کد:
function GetLdr:Pointer; stdcall;
asm
{$IFDEF CPUX86}
  xor   eax, eax
  mov   eax, fs:[eax+$18] //teb
  mov   eax, [eax+$30] //peb
  mov   eax, [eax+$0C] //ldr
{$ELSE}
  xor   rax, rax
  mov   rax, gs:[rax+$30] //teb
  mov   rax, [rax+$60] //peb
  mov   rax, [rax+$18] //ldr
{$ENDIF}
end;

function ExGetmoduleHandle(name: PWideChar): THANDLE;
var
  x, f, cur  : NativeUint;
begin
  result := 0;
  //getLdr
  x := NativeUint(GetLdr);  
{$IFDEF CPUX86}
  //InMemoryOrderModuleList    
  f := x+$14;  
  //InMemoryOrderModuleList.Flink
  cur := PNativeUint(f)^;
  while (cur <> f) do begin
    x := cur - $8;
    //BaseDllName
    if (StrComp(PWideChar(PNativeUint(x+$30)^), name) = 0) then begin
      //DllBase
      result := PNativeUint(x+$18)^;
      exit;
    end;
    cur := PNativeUint(cur)^;
  end;
{$ELSE}
  //InMemoryOrderModuleList    
  f := x+$20;
  //InMemoryOrderModuleList.Flink
  cur := PNativeUint(f)^;
  while (cur <> f) do begin
    x := cur - $10;
    //BaseDllName
    if (StrComp(PWideChar(PNativeUint(x+$60)^), name) = 0) then begin
      //DllBase
      result := PNativeUint(x+$30)^;
      exit;
    end;
    cur := PNativeUint(cur)^;
  end;
{$ENDIF}
end;
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
 
پاسخ
  


پیام‌های این موضوع
Write 64 Bit Program Delphi - توسط Amin_Mansouri - 10-24-2011، 04:45 PM
RE: Write 64 Bit Program Delphi - توسط Amin_Mansouri - 10-24-2011، 04:58 PM

موضوعات مشابه ...
موضوع نویسنده پاسخ بازدید آخرین ارسال
  Delphi XE3 Saeed7007 5 7,536 09-10-2012، 08:30 PM
آخرین ارسال: Amin_Mansouri
  LiveBinding در TStringGrid - Delphi XE2 Oep 0 3,332 05-16-2012، 09:12 AM
آخرین ارسال: Oep
  app inside Delphi Saeed7007 7 7,615 04-25-2012، 11:24 PM
آخرین ارسال: Amin_Mansouri
  Delphi 7 Lite Full Edition v3.0.7.6 Amin_Mansouri 0 3,473 01-31-2012، 05:29 PM
آخرین ارسال: Amin_Mansouri
  Native File Read And Write Example Amin_Mansouri 0 2,649 11-27-2011، 02:36 PM
آخرین ارسال: Amin_Mansouri
  RE: Delphi XE2 به زودی منتشر می شود Amin_Mansouri 1 4,448 09-13-2011، 10:57 AM
آخرین ارسال: Amin_Mansouri
  source code hook (Delphi) Amin_Mansouri 0 3,266 05-22-2011، 10:34 AM
آخرین ارسال: Amin_Mansouri
  Source Code WinPCap Delphi Amin_Mansouri 0 4,536 04-24-2011، 01:14 PM
آخرین ارسال: Amin_Mansouri
  Delphi Source Code and Tutorials Amin_Mansouri 2 5,065 04-16-2011، 02:09 PM
آخرین ارسال: Amin_Mansouri

پرش به انجمن:


Browsing: 1 مهمان