View previous topic :: View next topic |
Author |
Message |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Sat Feb 19, 2011 3:52 am Post subject: Free Code |
|
|
Deleted.
Last edited by DeletedUser14087 on Sat Feb 19, 2011 3:57 am; edited 1 time in total |
|
Back to top |
|
 |
SGL Grandmaster Cheater
Reputation: 14
Joined: 04 May 2007 Posts: 758
|
Posted: Sat Feb 19, 2011 3:54 am Post subject: Re: Free Code |
|
|
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 |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Sat Feb 19, 2011 3:57 am Post subject: |
|
|
Don't listen to SGL loves MajjikelKitty, that wasn't the code.
|
|
Back to top |
|
 |
PunkMilitia Grandmaster Cheater Supreme
Reputation: -1
Joined: 14 Jun 2007 Posts: 1270 Location: South England.
|
Posted: Sat Feb 19, 2011 8:22 am Post subject: |
|
|
That's some really shitty coding right there
|
|
Back to top |
|
 |
Aniblaze Grandmaster Cheater Supreme
Reputation: 138
Joined: 23 Apr 2006 Posts: 1757 Location: The Netherlands
|
Posted: Sat Feb 19, 2011 8:38 am Post subject: |
|
|
Rot1 wrote: | Don't listen to SGL loves MajjikelKitty, that wasn't the code. |
Don't lie.
|
|
Back to top |
|
 |
ce4life How do I cheat?
Reputation: 0
Joined: 27 Feb 2011 Posts: 0
|
Posted: Sun Feb 27, 2011 3:12 pm Post subject: |
|
|
cool
|
|
Back to top |
|
 |
|