Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2021, 18:49
mcr4ck mcr4ck is offline
Friend
 
Join Date: Nov 2019
Location: iran
Posts: 53
Rept. Given: 0
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 39
Thanks Rcvd at 30 Times in 16 Posts
mcr4ck Reputation: 1
how do use this
https://github.com/GautamGreat/LoaderEngine

please example
Reply With Quote
The Following User Says Thank You to mcr4ck For This Useful Post:
niculaita (07-22-2021)
  #2  
Old 02-05-2021, 17:37
GautamGreat GautamGreat is offline
Friend
 
Join Date: Jul 2019
Posts: 8
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 2
Thanks Rcvd at 29 Times in 6 Posts
GautamGreat Reputation: 0
Quote:
Originally Posted by mcr4ck View Post
how do use this
https://github.com/GautamGreat/LoaderEngine

please example
here is a example code I wrote for a target long ago

Code:
program Project1;

{$APPTYPE GUI}

uses
  Winapi.Windows, System.SysUtils,
  Loader_Engine in '..\..\..\..\..\Coding-and-Programming\Delphi_Projects\Loader_Engine.pas';

const
  patchAddrRVA = $05234536;

var
  patchAsm : array[0..24] of Byte = ($9C, $52, $89, $2C, $24, $3E, $8B, $44, $24, $F4, $8B, $00, $C6, $00, $01, $B8, $FF, $FF, $FF, $FF, $E9, $00, $00, $00, $00);
  lE : TLoaderEngine;
  newMem : Pointer;
  patchAddr : DWORD;
  jmp_byte : Byte = $E9;
  jmp_write : DWORD;

function jmpCalc(src, dst : DWORD) : DWORD;
begin
  Result := dst - src - 5;
end;

begin

  try
    lE := TLoaderEngine.Create('test_program.exe', True, False);
    try
      if lE.WaitTillFirstWindow(1000) then
      begin

        lE.SuspendPThread;
        newMem := le.AllocMemory($1000);
        patchAddr := patchAddrRVA + lE.GetModuleBaseAddress;

        jmp_write := jmpCalc(patchAddr, DWORD(newMem));
        lE.WriteMemory(DWORD(newMem), patchAsm[0], Length(patchAsm));
        lE.WriteMemory(patchAddr, jmp_byte, 1);
        lE.WriteMemory(patchAddr+1, jmp_write, 4);

        jmp_write := jmpCalc(DWORD(newMem)+$14, patchAddr+5);
        lE.WriteMemory(DWORD(newMem)+$15, jmp_write, 4);
        lE.ResumePThread;

      end
      else
        MessageBox(0, 'Failed to detect Windows', 'Error', MB_ICONERROR);
    finally
      lE.Destroy;
    end;
  except
    on E:exception do
      MessageBox(0, PChar(E.Message), PChar(E.ClassName), MB_ICONERROR);

  end;

end.
Reply With Quote
The Following 2 Users Say Thank You to GautamGreat For This Useful Post:
countryboy (09-22-2021), niculaita (02-06-2021)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
QLoader - Quickly create a non-exe loader for application vic4key Community Tools 6 07-07-2022 23:11
dot net - how to create keygen using program's code Maltese General Discussion 5 06-15-2011 09:02


All times are GMT +8. The time now is 20:05.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )