Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Free Code

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Sat Feb 19, 2011 3:52 am    Post subject: Free Code Reply with quote

Deleted.

Last edited by DeletedUser14087 on Sat Feb 19, 2011 3:57 am; edited 1 time in total
Back to top
View user's profile Send private message
SGL
Grandmaster Cheater
Reputation: 14

Joined: 04 May 2007
Posts: 758

PostPosted: Sat Feb 19, 2011 3:54 am    Post subject: Re: Free Code Reply with quote

Rot1 wrote:
Code:
unit ToolHelp;

interface

uses Tlhelp32, Windows;

procedure SuspendProcessThreads( pid: cardinal );
procedure ResumeProcessThreads( pid: cardinal );

Procedure UnprotectRegion(nRegion: Integer; dwRegionSize: DWORD);
Procedure ByteJmp(Address : Integer);

function WCharToStr(wideStr: PChar): String;
procedure DbgLog(DbgStr: String);

implementation

Procedure UnprotectRegion(nRegion: Integer; dwRegionSize: DWORD);
var
  oldProtect: DWORD;
Begin
  VirtualProtect( Ptr(nRegion), dwRegionSize, PAGE_READWRITE, oldProtect );
End;

Procedure ByteJmp(Address : Integer);
Begin
  UnprotectRegion(Address, SizeOf(BYTE));
  PBYTE( Ptr(Address) )^ := $EB;
End;

function WCharToStr(wideStr: PChar): String;
begin
  Result := WideCharToString( wideStr );
end;

procedure DbgLog(DbgStr: String);
var
  Dest: Array [0..254] Of WideChar;
begin
  if Length(DbgStr) > 255 then Exit;
  FillChar( Dest, SizeOf(Dest), #0 ); // initialize local variable
  StringToWideChar( DbgStr, Dest, sizeof(Dest) );
  OutputDebugString( Dest );
end;

procedure SuspendProcessThreads( pid: cardinal );
var
 lppe: TThreadEntry32;
 hSnapShot: Cardinal;
begin
  lppe.dwSize := sizeof(lppe);
  hSnapShot := CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, pid );
  if Thread32First( hSnapShot, lppe ) <> False then
   begin
    SuspendThread( lppe.th32ThreadID );
    while Thread32Next( hSnapShot, lppe ) do
     begin
      SuspendThread( lppe.th32ThreadID );
     end;
   end
   else
   begin
     CloseHandle( hSnapShot );
     Exit;
   end;
   CloseHandle( hSnapShot );
end;

procedure ResumeProcessThreads( pid: cardinal );
var
 lppe: TThreadEntry32;
 hSnapShot: Cardinal;
begin
  lppe.dwSize := sizeof(lppe);
  hSnapShot := CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, pid );
  if Thread32First( hSnapShot, lppe ) <> False then
   begin
    ResumeThread( lppe.th32ThreadID );
    while Thread32Next( hSnapShot, lppe ) do
     begin
      ResumeThread( lppe.th32ThreadID );
     end;
   end
   else
   begin
     CloseHandle( hSnapShot );
     Exit;
   end;
   CloseHandle( hSnapShot );
end;

end.

Reported and copied in case of deletion.

_________________
I'm SirGodlike
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Sat Feb 19, 2011 3:57 am    Post subject: Reply with quote

Don't listen to SGL loves MajjikelKitty, that wasn't the code.
Back to top
View user's profile Send private message
PunkMilitia
Grandmaster Cheater Supreme
Reputation: -1

Joined: 14 Jun 2007
Posts: 1270
Location: South England.

PostPosted: Sat Feb 19, 2011 8:22 am    Post subject: Reply with quote

That's some really shitty coding right there Very Happy
Back to top
View user's profile Send private message
Aniblaze
Grandmaster Cheater Supreme
Reputation: 138

Joined: 23 Apr 2006
Posts: 1757
Location: The Netherlands

PostPosted: Sat Feb 19, 2011 8:38 am    Post subject: Reply with quote

Rot1 wrote:
Don't listen to SGL loves MajjikelKitty, that wasn't the code.

Don't lie.
Back to top
View user's profile Send private message
ce4life
How do I cheat?
Reputation: 0

Joined: 27 Feb 2011
Posts: 0

PostPosted: Sun Feb 27, 2011 3:12 pm    Post subject: Reply with quote

cool
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites