Ver Mensaje Individual
  #2  
Antiguo 30-01-2009
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
 lpBuffer: PChar;
 hFile, uBytes, Index: Integer;
begin
 hFile := _lopen('C:\WINDOWS\Web\Wallpaper\Felicidad.bmp', OF_READ);
 uBytes := GetFileSize(hFile, nil);
 lpBuffer := Ptr(LocalAlloc(0, uBytes));
 _lread(hFile, lpBuffer, uBytes);
 CloseHandle(hFile);
 
// begin sample
 for Index := Cardinal(PBitmap(lpBuffer + 2).bmBits) to uBytes - 1 do
  lpBuffer[Index] := Chr(Ord(lpBuffer[Index]) xor $FF);
 
 hFile := _lcreat('XORed.bmp', 0);
 _lwrite(hFile, lpBuffer, uBytes);
 CloseHandle(hFile);
// end sample
 
 LocalFree(Cardinal(lpBuffer));
end;
__________________
RTFM > STFW > Foro > Truco > Post > cHackAll > KeBugCheckEx
Responder Con Cita