Changeset 312

Show
Ignore:
Timestamp:
01/26/10 18:11:11 (6 weeks ago)
Author:
dark_byte
Message:
 
Location:
Cheat Engine
Files:
34 modified

Legend:

Unmodified
Added
Removed
  • Cheat Engine/CEFuncProc.pas

    r309 r312  
    26152615    scanvalue:=copy(scanvalue,1,length(scanvalue)-1); 
    26162616 
    2617   if (pos('-',scanvalue)>0) or (pos(' ',scanvalue)>0) then 
     2617  if (pos('-',scanvalue)>0) or (pos(' ',scanvalue)>0) or (pos(',',scanvalue)>0) then 
    26182618  begin 
    26192619    //syntax is xx-xx-xx or xx xx xx 
     
    26242624    for i:=1 to length(scanvalue) do 
    26252625    begin 
    2626       if (scanvalue[i]=' ') or (scanvalue[i]='-') then 
     2626      if (scanvalue[i] in [' ', '-', ',']) then 
    26272627      begin 
    26282628        helpstr:=copy(scanvalue,j,i-j); 
  • Cheat Engine/DissectCodeunit.pas

    r303 r312  
    7575  begin 
    7676    timer1.Enabled:=false; 
    77     dissectcode.terminate; 
    78     dissectcode.WaitFor; 
    79     dissectcode.done:=true; 
     77    if dissectcode<>nil then 
     78    begin 
     79      dissectcode.terminate; 
     80      dissectcode.WaitFor; 
     81      dissectcode.done:=true; 
     82    end; 
    8083    Timer1Timer(timer1); 
    8184 
     
    8588  end; 
    8689 
     90 
     91 
     92  if listbox1.SelCount=0 then raise exception.Create('Please select something to scan'); 
     93 
    8794  if dissectcode<>nil then 
    8895  begin 
     
    93100 
    94101  dissectcode:=TDissectCodeThread.create(true); 
    95  
    96   
    97   begin 
    98     setlength(dissectcode.memoryregion,0); 
    99     if listbox1.SelCount=0 then raise exception.Create('Please select something to scan'); 
    100     for i:=0 to listbox1.items.count-1 do 
    101     begin 
    102       if listbox1.Selected[i] then 
     102  setlength(dissectcode.memoryregion,0); 
     103 
     104  for i:=0 to listbox1.items.count-1 do 
     105  begin 
     106    if listbox1.Selected[i] then 
     107    begin 
     108      getexecutablememoryregionsfromregion(tmoduledata(listbox1.Items.Objects[i]).moduleaddress,tmoduledata(listbox1.Items.Objects[i]).moduleaddress+tmoduledata(listbox1.Items.Objects[i]).modulesize,tempregions); 
     109      setlength(dissectcode.memoryregion,length(dissectcode.memoryregion)+length(tempregions)); 
     110 
     111      for j:=0 to length(tempregions)-1 do 
     112        dissectcode.memoryregion[length(dissectcode.memoryregion)-length(tempregions)+j]:=tempregions[j]; 
     113    end; 
     114  end; 
     115 
     116 
     117  //sort the regions so they are from big to small (bubblesort) 
     118  n:=length(dissectcode.memoryregion); 
     119  for i:=0 to n-1 do 
     120  begin 
     121    flipped:=false; 
     122    for j:=0 to n-2-i do 
     123    begin 
     124      if dissectcode.memoryregion[j+1].BaseAddress<dissectcode.memoryregion[j].BaseAddress then//swap 
    103125      begin 
    104         getexecutablememoryregionsfromregion(tmoduledata(listbox1.Items.Objects[i]).moduleaddress,tmoduledata(listbox1.Items.Objects[i]).moduleaddress+tmoduledata(listbox1.Items.Objects[i]).modulesize,tempregions); 
    105         setlength(dissectcode.memoryregion,length(dissectcode.memoryregion)+length(tempregions)); 
    106  
    107         for j:=0 to length(tempregions)-1 do 
    108           dissectcode.memoryregion[length(dissectcode.memoryregion)-length(tempregions)+j]:=tempregions[j]; 
     126        temp:=dissectcode.memoryregion[j+1]; 
     127        dissectcode.memoryregion[j+1]:=dissectcode.memoryregion[j]; 
     128        dissectcode.memoryregion[j]:=temp; 
     129        flipped:=true; 
    109130      end; 
    110131    end; 
    111132 
    112  
    113     //sort the regions so they are from big to small (bubblesort) 
    114     n:=length(dissectcode.memoryregion); 
    115     for i:=0 to n-1 do 
    116     begin 
    117       flipped:=false; 
    118       for j:=0 to n-2-i do 
    119       begin 
    120         if dissectcode.memoryregion[j+1].BaseAddress<dissectcode.memoryregion[j].BaseAddress then//swap 
    121         begin 
    122           temp:=dissectcode.memoryregion[j+1]; 
    123           dissectcode.memoryregion[j+1]:=dissectcode.memoryregion[j]; 
    124           dissectcode.memoryregion[j]:=temp; 
    125           flipped:=true; 
    126         end; 
    127       end; 
    128  
    129       if not flipped then break; 
    130     end; 
    131  
     133    if not flipped then break; 
    132134  end; 
    133135 
     
    181183  if dissectcode.done then 
    182184  begin 
    183     close; 
     185    timer1.Enabled:=false; 
     186    btnStart.Caption:='Start'; 
     187    ProgressBar1.Position:=0; 
     188    label7.Caption:='done'; 
     189 
     190 
    184191 
    185192    if ondone=odOpenReferedStringList then 
    186193    begin 
     194      close; 
    187195      if frmReferencedStrings=nil then 
    188196        frmReferencedStrings:=tfrmReferencedStrings.Create(self); 
  • Cheat Engine/FoundCodeUnit.pas

    r311 r312  
    443443  for i:=0 to FoundcodeList.Items.count-1 do 
    444444    if FoundcodeList.Selected[i] then 
    445       s:=s+FoundcodeList.Items[i]+#13; 
     445      s:=s+FoundcodeList.Items[i]+#13#10; 
    446446 
    447447  clipboard.AsText:=s; 
  • Cheat Engine/MainUnit.dfm

    r309 r312  
    29672967      object Helpindex1: TMenuItem 
    29682968        Caption = 'Cheat Engine Help' 
     2969        ShortCut = 112 
    29692970        OnClick = Helpindex1Click 
    29702971      end 
  • Cheat Engine/MainUnit.pas

    r309 r312  
    1089510895  getprocesslist(pl); 
    1089610896 
    10897   for i:=0 to autoattachlist.Count-1 do 
    10898   begin 
    10899     for j:=0 to pl.Count-1 do //can't do indexof 
    10900     begin 
    10901       if pos(uppercase(autoattachlist.Strings[i]),uppercase(pl.strings[j]))=10 then 
     10897  try 
     10898 
     10899    for i:=0 to autoattachlist.Count-1 do 
     10900    begin 
     10901      for j:=0 to pl.Count-1 do //can't do indexof 
    1090210902      begin 
    10903         //the process is found 
    10904  
    10905         val('$'+pl.strings[j],newPID,k); 
    10906         if processid=newPID then exit; //already attached to this one 
    10907  
    10908         ProcessHandler.processid:=newPID; 
    10909         unpause; 
    10910         DetachIfPossible; 
    10911  
    10912         MainForm.ProcessLabel.caption:=pl.strings[j]; 
    10913         Open_Process; 
    10914         enablegui(false); 
    10915  
    10916         openProcessEpilogue('',0,0); 
    10917  
    10918         symhandler.reinitialize; 
    10919         reinterpretaddresses; 
     10903        if pos(uppercase(autoattachlist.Strings[i]),uppercase(pl.strings[j]))=10 then 
     10904        begin 
     10905          //the process is found 
     10906 
     10907          val('$'+pl.strings[j],newPID,k); 
     10908          if processid=newPID then exit; //already attached to this one 
     10909 
     10910          ProcessHandler.processid:=newPID; 
     10911          unpause; 
     10912          DetachIfPossible; 
     10913 
     10914          MainForm.ProcessLabel.caption:=pl.strings[j]; 
     10915          Open_Process; 
     10916          enablegui(false); 
     10917 
     10918          openProcessEpilogue('',0,0); 
     10919 
     10920          symhandler.reinitialize; 
     10921          reinterpretaddresses; 
     10922        end; 
    1092010923      end; 
    10921     end; 
    10922  
    10923   end; 
    10924 //  pl.IndexOf(autoattachlist.items[i]); 
    10925  
    10926   for i:=0 to pl.count-1 do 
    10927     if pl.Objects[i]<>nil then 
    10928     begin 
    10929       pli:=pointer(pl.Objects[i]); 
    10930       if pli.processIcon>0 then 
    10931         DestroyIcon(pli.processIcon); 
    10932       freemem(pli); 
    10933     end; 
    10934  
    10935   pl.free; 
     10924 
     10925    end; 
     10926  //  pl.IndexOf(autoattachlist.items[i]); 
     10927 
     10928  finally 
     10929    for i:=0 to pl.count-1 do 
     10930      if pl.Objects[i]<>nil then 
     10931      begin 
     10932        pli:=pointer(pl.Objects[i]); 
     10933        if pli.processIcon>0 then 
     10934          DestroyIcon(pli.processIcon); 
     10935        freemem(pli); 
     10936      end; 
     10937 
     10938    pl.free; 
     10939  end; 
    1093610940end; 
    1093710941 
  • Cheat Engine/MemoryBrowserFormUnit.dfm

    r309 r312  
    176176          Top = 115 
    177177          Width = 96 
    178           Height = 14 
     178          Height = 13 
    179179          Cursor = crHandPoint 
    180180          Caption = 'EBP 00000000' 
     
    192192          Top = 131 
    193193          Width = 96 
    194           Height = 14 
     194          Height = 13 
    195195          Cursor = crHandPoint 
    196196          Caption = 'ESP 00000000' 
     
    208208          Top = 147 
    209209          Width = 96 
    210           Height = 15 
     210          Height = 13 
    211211          Cursor = crHandPoint 
    212212          Caption = 'EIP 00000000' 
  • Cheat Engine/MemoryBrowserFormUnit.pas

    r309 r312  
    16521652            disassemble(b); //b gets increased with size of selected instruction 
    16531653            edit1.Text:=inttohex(a,8); 
    1654             edit2.Text:=inttohex(b,8); 
     1654            edit2.Text:=inttohex(b-1,8); 
    16551655            copymode:=true; 
    16561656            showmodal; 
     
    30703070    freeandnil(frmMemoryAllocHandler); 
    30713071 
     3072 
     3073 
    30723074  if frmheaps=nil then 
    30733075    frmheaps:=tfrmheaps.create(self); 
     
    37203722    disassemble(b); //b gets increased with size of selected instruction 
    37213723    edit1.Text:=inttohex(a,8); 
    3722     edit2.Text:=inttohex(b,8); 
     3724    edit2.Text:=inttohex(b-1,8); 
    37233725    copymode:=true; 
    37243726 
     
    39263928 
    39273929  if frmMemoryAllocHandler=nil then 
    3928   begin 
    3929     {if MessageDlg('This function will inject a dll into the target process and hook some memory allocation/free routines. Continue?',mtConfirmation, [mbyes,mbno],0)<>mryes then exit; 
    3930  
    3931     } 
    39323930    frmMemoryAllocHandler:=TfrmMemoryAllocHandler.Create(self); 
    3933   end; 
    39343931 
    39353932  frmMemoryAllocHandler.Show; 
  • Cheat Engine/PointerscanresultReader.pas

    r291 r312  
    198198begin 
    199199  FFilename:=filename; 
    200   configfile:=TFileStream.Create(filename, fmOpenRead or fmShareDenyNone); 
     200  configfile:=TFileStream.Create(filename, fmOpenRead or fmShareDenyWrite); 
    201201  configfile.ReadBuffer(modulelistlength,sizeof(modulelistlength)); 
    202202  modulelist:=tstringlist.create; 
     
    250250 
    251251 
    252     files[i].f:=TFileStream.Create(ExtractFilePath(filename)+temppchar, fmOpenRead or fmShareDenyNone); 
     252    files[i].f:=TFileStream.Create(ExtractFilePath(filename)+temppchar, fmOpenRead or fmShareDenyWrite); 
    253253    files[i].startindex:=fcount; 
    254254    fcount:=fcount+uint64(files[i].f.Size div uint64(sizeofentry)); 
  • Cheat Engine/Release/Cheat Engine.iss

    r309 r312  
    33 
    44[Setup] 
    5 AppName=Cheat Engine 5.6 BETA 5 
    6 AppVerName=Cheat Engine 5.6 BETA 5 
     5AppName=Cheat Engine 5.6 BETA 7 
     6AppVerName=Cheat Engine 5.6 BETA 7 
    77AppPublisher=Dark Byte 
    88AppPublisherURL=http://www.cheatengine.org/ 
    99AppSupportURL=http://www.cheatengine.org/ 
    1010AppUpdatesURL=http://www.cheatengine.org/ 
    11 DefaultDirName={pf}\Cheat Engine Beta5 
    12 DefaultGroupName=Cheat Engine 5.6 BETA 5 
     11DefaultDirName={pf}\Cheat Engine Beta7 
     12DefaultGroupName=Cheat Engine 5.6 BETA 7 
    1313AllowNoIcons=yes 
    1414LicenseFile=..\Release\License.txt 
    1515InfoAfterFile=..\Release\readme.txt 
    16 OutputBaseFilename=CheatEngine56Beta5 
     16OutputBaseFilename=CheatEngine56Beta7 
    1717PrivilegesRequired=admin 
    1818ChangesAssociations=yes 
     
    248248 
    249249[Run] 
    250 Filename: "{app}\Cheat Engine.exe"; Description: "Launch Cheat Engine 5.6 Beta 5"; Flags: nowait postinstall skipifsilent runascurrentuser 
     250Filename: "{app}\Cheat Engine.exe"; Description: "Launch Cheat Engine 5.6 Beta 7"; Flags: nowait postinstall skipifsilent runascurrentuser 
  • Cheat Engine/Structuresfrm.pas

    r311 r312  
    19941994    begin 
    19951995      sender.Canvas.Brush.Style:=bsSolid; 
    1996       sender.Canvas.Brush.Color:=clHighlight;    
     1996      sender.Canvas.Brush.Color:=clHighlight; 
    19971997      sender.Canvas.FillRect(textlinerect); 
    19981998      sender.Canvas.DrawFocusRect(textlinerect); 
     
    20202020      tvStructureView.canvas.Font.Color:=groupcolors[currentgroup]; 
    20212021 
     2022      if (cdsSelected in State) then 
     2023      begin 
     2024        case groupcolors[currentgroup] of 
     2025          clGreen: sender.Canvas.font.Color:=clBlack; 
     2026          clRed: sender.Canvas.font.Color:=clMaroon; 
     2027          clBlue: sender.Canvas.font.Color:=clNavy; 
     2028        end; 
     2029 
     2030      end; 
     2031 
    20222032      clip.Left:=headercontrol1.Sections[i].Left; 
    20232033      clip.Right:=headercontrol1.Sections[i].Left+headercontrol1.Sections[i].Width; 
     
    20542064  n6.Visible:=remove1.Visible; 
    20552065 
    2056   if groups[x.Tag]<>0 then 
    2057     setgroup1.Caption:='Change group ('+inttostr(groups[x.tag])+')' 
    2058   else 
    2059     setgroup1.Caption:='Set group'; 
     2066  setgroup1.Caption:='Change group ('+inttostr(groups[x.tag])+')'; 
    20602067end; 
    20612068 
  • Cheat Engine/Tutorial/Unit1.dfm

    r181 r312  
    55  BorderStyle = bsDialog 
    66  Caption = 'Cheat Engine Tutorial v3' 
    7   ClientHeight = 232 
    8   ClientWidth = 571 
     7  ClientHeight = 286 
     8  ClientWidth = 703 
    99  Color = clBtnFace 
    1010  Font.Charset = DEFAULT_CHARSET 
    1111  Font.Color = clWindowText 
    12   Font.Height = -11 
     12  Font.Height = -14 
    1313  Font.Name = 'MS Sans Serif' 
    1414  Font.Style = [] 
     
    1717  OnCloseQuery = FormCloseQuery 
    1818  OnCreate = FormCreate 
    19   PixelsPerInch = 96 
    20   TextHeight = 13 
     19  PixelsPerInch = 120 
     20  TextHeight = 16 
    2121  object Label1: TLabel 
    22     Left = 448 
    23     Top = 192 
    24     Width = 46 
    25     Height = 13 
     22    Left = 551 
     23    Top = 236 
     24    Width = 60 
     25    Height = 16 
    2626    Caption = 'Password' 
    2727  end 
     
    2929    Left = 0 
    3030    Top = 0 
    31     Width = 571 
    32     Height = 185 
     31    Width = 703 
     32    Height = 228 
    3333    Align = alTop 
    3434    Color = clBtnFace 
     
    4747       
    4848        'When the process window is open find this tutorial. The process ' + 
    49         'name is probably '#39'tutorial.exe'#39' unless you renamed ' 
     49        'name is probably '#39'tutorial.exe'#39' unless you ' 
     50      'renamed ' 
    5051      'it.' 
    5152       
     
    6667  end 
    6768  object Button1: TButton 
    68     Left = 248 
    69     Top = 200 
    70     Width = 75 
    71     Height = 25 
     69    Left = 305 
     70    Top = 246 
     71    Width = 93 
     72    Height = 31 
    7273    Caption = 'Next' 
    7374    TabOrder = 1 
     
    7576  end 
    7677  object Edit1: TEdit 
    77     Left = 412 
    78     Top = 208 
    79     Width = 121 
     78    Left = 507 
     79    Top = 256 
     80    Width = 149 
    8081    Height = 21 
    8182    Hint = 'Use this to go imeadiatly to the step you want to try' 
     
    8788  end 
    8889  object Button2: TButton 
    89     Left = 536 
    90     Top = 211 
    91     Width = 25 
    92     Height = 17 
     90    Left = 660 
     91    Top = 260 
     92    Width = 30 
     93    Height = 21 
    9394    Caption = 'OK' 
    9495    TabOrder = 3 
  • Cheat Engine/Tutorial/Unit1.pas

    r13 r312  
    173173procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); 
    174174begin 
    175   canclose:=MessageDlg('First step too hard eh? Better give up now!',mtconfirmation,[mbyes,mbno],0)=mryes; 
     175  canclose:=MessageDlg('First step too hard? Better give up now!',mtconfirmation,[mbyes,mbno],0)=mryes; 
    176176end; 
    177177 
  • Cheat Engine/Tutorial/Unit10.dfm

    r181 r312  
    22  Left = 630 
    33  Top = 563 
    4   Caption = 'Form10' 
     4  Caption = 'Step 9' 
    55  OldCreateOrder = True 
    66  Visible = True 
    7   PixelsPerInch = 96 
    8   TextHeight = 13 
     7  PixelsPerInch = 120 
     8  TextHeight = 16 
    99  inherited Memo1: TMemo 
    1010    Lines.Strings = ( 
  • Cheat Engine/Tutorial/Unit2.dfm

    r181 r312  
    55  BorderStyle = bsDialog 
    66  Caption = 'Step 2' 
    7   ClientHeight = 251 
    8   ClientWidth = 570 
     7  ClientHeight = 309 
     8  ClientWidth = 702 
    99  Color = clBtnFace 
    1010  Font.Charset = DEFAULT_CHARSET 
    1111  Font.Color = clWindowText 
    12   Font.Height = -11 
     12  Font.Height = -14 
    1313  Font.Name = 'MS Sans Serif' 
    1414  Font.Style = [] 
     
    1818  OnCloseQuery = FormCloseQuery 
    1919  OnCreate = FormCreate 
    20   PixelsPerInch = 96 
    21   TextHeight = 13 
     20  PixelsPerInch = 120 
     21  TextHeight = 16 
    2222  object Label1: TLabel 
    23     Left = 40 
    24     Top = 232 
    25     Width = 18 
    26     Height = 13 
     23    Left = 49 
     24    Top = 286 
     25    Width = 21 
     26    Height = 16 
    2727    Caption = '100' 
    2828  end 
    2929  object Label2: TLabel 
    3030    Left = 0 
    31     Top = 232 
    32     Width = 34 
    33     Height = 13 
     31    Top = 286 
     32    Width = 42 
     33    Height = 16 
    3434    Caption = 'Health:' 
    3535  end 
    3636  object SpeedButton1: TSpeedButton 
    37     Left = 544 
    38     Top = 232 
    39     Width = 25 
    40     Height = 17 
     37    Left = 670 
     38    Top = 286 
     39    Width = 30 
     40    Height = 20 
    4141    Caption = 'Skip' 
    4242    Flat = True 
     
    4646    Left = 0 
    4747    Top = 0 
    48     Width = 570 
    49     Height = 185 
     48    Width = 702 
     49    Height = 228 
    5050    Align = alTop 
    5151    Color = clBtnFace 
     
    8383        'ck '#39'First Scan'#39 
    8484       
    85         'After a while (if you have a extremly slow pc) the scan is done ' + 
    86         'and the results are shown in the list on the ' 
     85        'After a while (if you have a extremely slow pc) the scan is done' + 
     86        ' and the results are shown in the list on the ' 
    8787      'left' 
    8888      '' 
    8989       
    90         'If you find more than 1 address and you dont know for sure wich ' + 
    91         'address it is, click '#39'Hit me'#39', fill in the new ' 
     90        'If you find more than 1 address and you don'#39't know for sure whic' + 
     91        'h address it is, click '#39'Hit me'#39', fill in the new ' 
    9292      'health value into the value box, and click '#39'Next Scan'#39 
    9393       
     
    118118  end 
    119119  object Button1: TButton 
    120     Left = 248 
    121     Top = 192 
    122     Width = 75 
    123     Height = 25 
     120    Left = 305 
     121    Top = 236 
     122    Width = 93 
     123    Height = 31 
    124124    Caption = 'Next' 
    125125    Enabled = False 
     
    128128  end 
    129129  object Button2: TButton 
    130     Left = 64 
    131     Top = 230 
    132     Width = 41 
    133     Height = 17 
     130    Left = 79 
     131    Top = 283 
     132    Width = 50 
     133    Height = 21 
    134134    Caption = 'Hit me' 
    135135    TabOrder = 2 
  • Cheat Engine/Tutorial/Unit9.dfm

    r181 r312  
    11object Form9: TForm9 
    2   Left = 437 
    3   Top = 446 
     2  Left = 411 
     3  Top = 229 
    44  BorderStyle = bsDialog 
    55  Caption = 'Step 8' 
    6   ClientHeight = 250 
    7   ClientWidth = 571 
     6  ClientHeight = 308 
     7  ClientWidth = 703 
    88  Color = clBtnFace 
    99  Font.Charset = DEFAULT_CHARSET 
    1010  Font.Color = clWindowText 
    11   Font.Height = -11 
     11  Font.Height = -14 
    1212  Font.Name = 'MS Sans Serif' 
    1313  Font.Style = [] 
     
    1818  OnCloseQuery = FormCloseQuery 
    1919  OnCreate = FormCreate 
    20   PixelsPerInch = 96 
    21   TextHeight = 13 
     20  PixelsPerInch = 120 
     21  TextHeight = 16 
    2222  object Label1: TLabel 
    23     Left = 8 
    24     Top = 216 
    25     Width = 18 
    26     Height = 13 
     23    Left = 10 
     24    Top = 266 
     25    Width = 21 
     26    Height = 16 
    2727    Caption = '100' 
    2828  end 
    2929  object Label2: TLabel 
    30     Left = 96 
    31     Top = 215 
    32     Width = 6 
    33     Height = 13 
     30    Left = 118 
     31    Top = 265 
     32    Width = 7 
     33    Height = 16 
    3434    Caption = '3' 
    3535    Visible = False 
    3636  end 
    3737  object SpeedButton1: TSpeedButton 
    38     Left = 544 
    39     Top = 232 
    40     Width = 25 
    41     Height = 17 
     38    Left = 670 
     39    Top = 286 
     40    Width = 30 
     41    Height = 20 
    4242    Caption = 'Skip' 
    4343    Flat = True 
     
    4747    Left = 0 
    4848    Top = 0 
    49     Width = 571 
    50     Height = 185 
     49    Width = 703 
     50    Height = 228 
    5151    Align = alTop 
    5252    Color = clBtnFace 
     
    113113  end 
    114114  object Button2: TButton 
    115     Left = 248 
    116     Top = 192 
    117     Width = 75 
    118     Height = 25 
     115    Left = 305 
     116    Top = 236 
     117    Width = 93 
     118    Height = 31 
    119119    Caption = 'Next' 
    120120    Enabled = False 
     
    123123  end 
    124124  object Button1: TButton 
    125     Left = 8 
    126     Top = 228 
    127     Width = 81 
    128     Height = 19 
     125    Left = 10 
     126    Top = 281 
     127    Width = 100 
     128    Height = 23 
    129129    Caption = 'Change value' 
    130130    TabOrder = 2 
     
    132132  end 
    133133  object Button3: TButton 
    134     Left = 93 
    135     Top = 228 
    136     Width = 81 
    137     Height = 19 
     134    Left = 114 
     135    Top = 281 
     136    Width = 100 
     137    Height = 23 
    138138    Caption = 'Change pointer' 
    139139    TabOrder = 3 
  • Cheat Engine/aboutunit.dfm

    r295 r312  
    5050    end 
    5151    object Label4: TLabel 
    52       Left = 133 
     52      Left = 110 
    5353      Top = 158 
    5454      Width = 72 
     
    382382    end 
    383383    object Label6: TLabel 
    384       Left = 68 
     384      Left = 61 
    385385      Top = 158 
    386386      Width = 40 
     
    389389    end 
    390390    object Label7: TLabel 
    391       Left = 223 
     391      Left = 193 
    392392      Top = 158 
    393393      Width = 84 
     
    438438      Height = 16 
    439439      OnClick = lblDBVMClick 
     440    end 
     441    object Label11: TLabel 
     442      Left = 288 
     443      Top = 158 
     444      Width = 23 
     445      Height = 16 
     446      Caption = 'Psy' 
    440447    end 
    441448    object Button1: TButton 
  • Cheat Engine/aboutunit.pas

    r298 r312  
    2626    Label10: TLabel; 
    2727    lblDBVM: TLabel; 
     28    Label11: TLabel; 
    2829    procedure Button1Click(Sender: TObject); 
    2930    procedure FormClose(Sender: TObject; var Action: TCloseAction); 
  • Cheat Engine/autoassembler.pas

    r311 r312  
    419419              begin 
    420420                s1:=copy(currentline,a+1,b-a-1); 
    421                 s2:=copy(currentline,b+1,c-b-1); 
     421                s2:=trim(copy(currentline,b+1,c-b-1)); 
     422 
    422423                testdword:= symhandler.getAddressFromName(s1,false); 
    423424 
    424425                setlength(bytes,0); 
    425                 ConvertStringToBytes(s2, true, bytes); 
     426                try 
     427                  ConvertStringToBytes(s2, true, bytes); 
     428                except 
     429                  raise exception.create(s2+' is not a valid bytestring'); 
     430                end; 
     431 
    426432                if length(bytes)>0 then 
    427433                begin 
    428434                  getmem(bytebuf,length(bytes)); 
    429                   if ReadProcessMemory(processhandle, pointer(testdword), bytebuf, length(bytes),x) then 
    430                   begin 
    431                     try 
    432                       for j:=0 to length(bytes)-1 do 
    433                       begin 
    434                         if bytes[j]>=0 then 
    435                           if byte(bytes[j])<>bytebuf[j] then 
    436                             raise exception.Create('The bytes at '+s1+' are not what was expected'); 
    437                       end; 
    438                     finally 
    439                       freemem(bytebuf); 
    440                     end; 
    441                   end else raise exception.Create('The memory at +'+s1+' can not be read'); 
     435                  try 
     436                    if ReadProcessMemory(processhandle, pointer(testdword), bytebuf, length(bytes),x) then 
     437                    begin 
     438 
     439                        for j:=0 to length(bytes)-1 do 
     440                        begin 
     441                          if bytes[j]>=0 then 
     442                            if byte(bytes[j])<>bytebuf[j] then 
     443                              raise exception.Create('The bytes at '+s1+' are not what was expected'); 
     444                        end; 
     445                    end else raise exception.Create('The memory at +'+s1+' can not be read'); 
     446                  finally 
     447                    freemem(bytebuf); 
     448                  end; 
    442449 
    443450                end 
    444451                else raise exception.Create(s2+' is not a valid bytestring'); 
    445452 
    446  
    447  
    448                 setlength(assemblerlines,length(assemblerlines)-1); 
    449                 continue; 
    450453              end 
    451454              else 
    452                 raise exception.Create('Wrong syntax. ASSERT(address,bytes)'); 
    453             end; 
     455                raise exception.Create('Wrong syntax. ASSERT(address,11 22 33 ** 55 66)'); 
     456            end; 
     457 
     458            setlength(assemblerlines,length(assemblerlines)-1); 
     459            continue; 
    454460          end; 
    455461 
     
    713719            begin 
    714720              s1:=copy(currentline,a+1,b-a-1); 
    715               s2:=copy(currentline,b+1,c-b-1); 
     721              s2:=trim(copy(currentline,b+1,c-b-1)); 
    716722 
    717723              //s1=varname 
  • Cheat Engine/cheatengine.dof

    r311 r312  
    189189MinorVer=6 
    190190Release=0 
    191 Build=55 
     191Build=56 
    192192Debug=0 
    193193PreRelease=1 
     
    200200CompanyName= 
    201201FileDescription=Cheat Engine 5.6 
    202 FileVersion=5.6.0.55 
     202FileVersion=5.6.0.56 
    203203InternalName=CheatEngine 
    204204LegalCopyright=none 
  • Cheat Engine/cheatengine.drc

    r311 r312  
    99*/ 
    1010 
    11 #define AdvancedOptionsUnit_strCode 64944 
    12 #define AdvancedOptionsUnit_strFindWhatCodeaccesses 64945 
    13 #define AdvancedOptionsUnit_strFindWhatCodeReads 64946 
    14 #define AdvancedOptionsUnit_strFindWhatCodeWrites 64947 
    15 #define AdvancedOptionsUnit_strcouldntrestorecode 64948 
    16 #define AdvancedOptionsUnit_strnotthesame 64949 
    17 #define AdvancedOptionsUnit_strcouldntwrite 64950 
    18 #define AdvancedOptionsUnit_StrSelectExeFor3D 64951 
    19 #define AdvancedOptionsUnit_StrSelectExeForOpenGL3D 64952 
    20 #define formsettingsunit_strProcessWatcherWillPreventUnloader 64953 
    21 #define FoundCodeUnit_strClose 64954 
    22 #define MainUnit_strIncorrectspeed 64960 
    23 #define MainUnit_strCantSetSpeed 64961 
    24 #define MainUnit_strHyperscanFailed 64962 
    25 #define MainUnit_strUnknownExtension 64963 
    26 #define MainUnit_strCustomScanConfig 64964 
    27 #define frmFindstaticsUnit_strScan 64965 
    28 #define frmFindstaticsUnit_strStop 64966 
    29 #define frmFindstaticsUnit_strStopping 64967 
    30 #define frmLoadMemoryunit_strinvalidfile 64968 
    31 #define AdvancedOptionsUnit_strnotreadable 64969 
    32 #define AdvancedOptionsUnit_strNotWhatitshouldbe 64970 
    33 #define AdvancedOptionsUnit_stralreadyinthelist 64971 
    34 #define AdvancedOptionsUnit_strPartOfOpcodeInTheList 64972 
    35 #define AdvancedOptionsUnit_strCECode 64973 
    36 #define AdvancedOptionsUnit_strNameCECode 64974 
    37 #define AdvancedOptionsUnit_strChangeOf 64975 
    38 #define MainUnit_strFindWhatWritesToPointer 64976 
    39 #define MainUnit_strFindWhatWritesToPointer2 64977 
    40 #define MainUnit_strcantdebugnow 64978 
    41 #define MainUnit_strpointercantberead 64979 
    42 #define MainUnit_strconfirmUndo 64980 
    43 #define MainUnit_strHideForeground 64981 
    44 #define MainUnit_strHideAll 64982 
    45 #define MainUnit_strUnHideForeground 64983 
    46 #define MainUnit_strUnhideAll 64984 
    47 #define MainUnit_strhappybirthday 64985 
    48 #define MainUnit_strXMess 64986 
    49 #define MainUnit_strNewyear 64987 
    50 #define MainUnit_strfuture 64988 
    51 #define MainUnit_strdontbother 64989 
    52 #define MainUnit_strneeddebugger 64990 
    53 #define MainUnit_strfailuretosetspeed 64991 
    54 #define MainUnit_stralreadyin 64992 
    55 #define MainUnit_stralreadyinlistmultiple 64993 
    56 #define MainUnit_strsethotkey 64994 
    57 #define MainUnit_strshowasdecimal 64995 
    58 #define MainUnit_strshowashex 64996 
    59 #define MainUnit_strFreezeAddressInList 64997 
    60 #define MainUnit_strFreezeAllAddresses 64998 
    61 #define MainUnit_strUnfreezeAllAddresses 64999 
    62 #define MainUnit_strUnfreezeAddressInList 65000 
    63 #define MainUnit_strDeleteAddress 65001 
    64 #define MainUnit_strRecalculateAddress 65002 
    65 #define MainUnit_strRecalculateSelectedAddresses 65003 
    66 #define MainUnit_strRecalculateAllAddresses 65004 
    67 #define MainUnit_strRemoveFromGroup 65005 
    68 #define MainUnit_strEnableCheat 65006 
    69 #define MainUnit_strDisableCheat 65007 
    70 #define MainUnit_strAdd0 65008 
    71 #define MainUnit_strNotAValidNotation 65009 
    72 #define MainUnit_strNotSameAmmountofBytes 65010 
    73 #define MainUnit_strNotAValidBinaryNotation 65011 
    74 #define MainUnit_strValue 65012 
    75 #define MainUnit_strChange1Value 65013 
    76 #define MainUnit_strChangeMoreValues 65014 
    77 #define MainUnit_strDelete1Address 65015 
    78 #define MainUnit_strDeleteMultipleAddresses 65016 
    79 #define MainUnit_strDelete1Group 65017 
    80 #define MainUnit_strDeleteMoreGroups 65018 
    81 #define MainUnit_strSelectedAddressIsAPointer 65019 
    82 #define MainUnit_strMorePointers 65020 
    83 #define MainUnit_strMorePointers2 65021 
    84 #define MainUnit_strNotAValidValue 65022 
    85 #define MainUnit_strdeleteall 65023 
    86 #define MainUnit_strsearchForText 65024 
    87 #define MainUnit_strSearchForArray 65025 
    88 #define MainUnit_strConfirmProcessTermination 65026 
    89 #define MainUnit_strError 65027 
    90 #define MainUnit_strErrorwhileOpeningProcess 65028 
    91 #define MainUnit_strKeepList 65029 
    92 #define MainUnit_strInfoAboutTable 65030 
    93 #define MainUnit_strPhysicalMemory 65031 
    94 #define MainUnit_strfillInSomething 65032 
    95 #define MainUnit_strFirstSelectAProcess 65033 
    96 #define MainUnit_strCantdoNextScan 65034 
    97 #define MainUnit_strClickToGoHome 65035 
    98 #define MainUnit_strChangeDescription1 65036 
    99 #define MainUnit_strChangeDescription2 65037 
    100 #define MainUnit_strNotTheSameSize1 65038 
    101 #define MainUnit_strNotTheSameSize2 65039 
    102 #define SynEditStrConst_SYNS_EDuplicateShortcut 65040 
    103 #define SynEditStrConst_SYNS_FilterPascal 65041 
    104 #define SynEditStrConst_SYNS_FilterCPP 65042 
    105 #define SynEditStrConst_SYNS_LangCPP 65043 
    106 #define SynEditStrConst_SYNS_LangPascal 65044 
    107 #define SynEditTextBuffer_SListIndexOutOfBounds 65045 
    108 #define SynEditTextBuffer_SInvalidCapacity 65046 
    109 #define MainUnit_strWindowFailedToHide 65047 
    110 #define MainUnit_strAccessed 65048 
    111 #define MainUnit_strOpcodeChanged 65049 
    112 #define MainUnit_strAllowNegative 65050 
    113 #define MainUnit_strAllowPositive 65051 
    114 #define MainUnit_strNormalFreeze 65052 
    115 #define MainUnit_strAskToSave 65053 
    116 #define MainUnit_strScantextcaptiontotext 65054 
    117 #define MainUnit_strScantextcaptiontoValue 65055 
    118 #define SynEditStrConst_SYNS_AttrAssembler 65056 
    119 #define SynEditStrConst_SYNS_AttrCharacter 65057 
    120 #define SynEditStrConst_SYNS_AttrComment 65058 
    121 #define SynEditStrConst_SYNS_AttrFloat 65059 
    122 #define SynEditStrConst_SYNS_AttrHexadecimal 65060 
    123 #define SynEditStrConst_SYNS_AttrIdentifier 65061 
    124 #define SynEditStrConst_SYNS_AttrIllegalChar 65062 
    125 #define SynEditStrConst_SYNS_AttrNumber 65063 
    126 #define SynEditStrConst_SYNS_AttrOctal 65064 
    127 #define SynEditStrConst_SYNS_AttrPreprocessor 65065 
    128 #define SynEditStrConst_SYNS_AttrReservedWord 65066 
    129 #define SynEditStrConst_SYNS_AttrSpace 65067 
    130 #define SynEditStrConst_SYNS_AttrString 65068 
    131 #define SynEditStrConst_SYNS_AttrSymbol 65069 
    132 #define SynEditStrConst_SYNS_ScrollInfoFmt 65070 
    133 #define SynEditStrConst_SYNS_ScrollInfoFmtTop 65071 
    134 #define MainUnit2_strIncreasedValue 65072 
    135 #define MainUnit2_strIncreasedValueBy 65073 
    136 #define MainUnit2_strDecreasedValue 65074 
    137 #define MainUnit2_strDecreasedValueBy 65075 
    138 #define MainUnit2_strValueBetween 65076 
    139 #define MainUnit2_strChangedValue 65077 
    140 #define MainUnit2_strUnchangedValue 65078 
    141 #define MainUnit2_strUnknownInitialValue 65079 
    142 #define MainUnit2_strSameAsFirstScan 65080 
    143 #define MainUnit2_strtoolong 65081 
    144 #define OpenSave_strunknowncomponent 65082 
    145 #define OpenSave_strCorruptIcon 65083 
    146 #define OpenSave_strCantLoadFilepatcher 65084 
    147 #define OpenSave_strNotACETrainer 65085 
    148 #define OpenSave_strUnknownTrainerVersion 65086 
    149 #define OpenSave_strCantLoadProtectedfile 65087 
     11#define MainUnit_strXMess 64944 
     12#define MainUnit_strNewyear 64945 
     13#define MainUnit_strfuture 64946 
     14#define MainUnit_strdontbother 64947 
     15#define MainUnit_strneeddebugger 64948 
     16#define MainUnit_strfailuretosetspeed 64949 
     17#define MainUnit_strIncorrectspeed 64950 
     18#define MainUnit_strCantSetSpeed 64951 
     19#define MainUnit_strHyperscanFailed 64952 
     20#define MainUnit_strUnknownExtension 64953 
     21#define MainUnit_strCustomScanConfig 64954 
     22#define MainUnit_strRecalculateAddress 64960 
     23#define MainUnit_strRecalculateSelectedAddresses 64961 
     24#define MainUnit_strRecalculateAllAddresses 64962 
     25#define MainUnit_strRemoveFromGroup 64963 
     26#define MainUnit_strEnableCheat 64964 
     27#define MainUnit_strDisableCheat 64965 
     28#define MainUnit_strFindWhatWritesToPointer 64966 
     29#define MainUnit_strFindWhatWritesToPointer2 64967 
     30#define MainUnit_strcantdebugnow 64968 
     31#define MainUnit_strpointercantberead 64969 
     32#define MainUnit_strconfirmUndo 64970 
     33#define MainUnit_strHideForeground 64971 
     34#define MainUnit_strHideAll 64972 
     35#define MainUnit_strUnHideForeground 64973 
     36#define MainUnit_strUnhideAll 64974 
     37#define MainUnit_strhappybirthday 64975 
     38#define MainUnit_strDeleteMoreGroups 64976 
     39#define MainUnit_strSelectedAddressIsAPointer 64977 
     40#define MainUnit_strMorePointers 64978 
     41#define MainUnit_strMorePointers2 64979 
     42#define MainUnit_strNotAValidValue 64980 
     43#define MainUnit_strdeleteall 64981 
     44#define MainUnit_stralreadyin 64982 
     45#define MainUnit_stralreadyinlistmultiple 64983 
     46#define MainUnit_strsethotkey 64984 
     47#define MainUnit_strshowasdecimal 64985 
     48#define MainUnit_strshowashex 64986 
     49#define MainUnit_strFreezeAddressInList 64987 
     50#define MainUnit_strFreezeAllAddresses 64988 
     51#define MainUnit_strUnfreezeAllAddresses 64989 
     52#define MainUnit_strUnfreezeAddressInList 64990 
     53#define MainUnit_strDeleteAddress 64991 
     54#define MainUnit_strCantdoNextScan 64992 
     55#define MainUnit_strClickToGoHome 64993 
     56#define MainUnit_strChangeDescription1 64994 
     57#define MainUnit_strChangeDescription2 64995 
     58#define MainUnit_strNotTheSameSize1 64996 
     59#define MainUnit_strNotTheSameSize2 64997 
     60#define MainUnit_strAdd0 64998 
     61#define MainUnit_strNotAValidNotation 64999 
     62#define MainUnit_strNotSameAmmountofBytes 65000 
     63#define MainUnit_strNotAValidBinaryNotation 65001 
     64#define MainUnit_strValue 65002 
     65#define MainUnit_strChange1Value 65003 
     66#define MainUnit_strChangeMoreValues 65004 
     67#define MainUnit_strDelete1Address 65005 
     68#define MainUnit_strDeleteMultipleAddresses 65006 
     69#define MainUnit_strDelete1Group 65007 
     70#define MainUnit_strAllowNegative 65008 
     71#define MainUnit_strAllowPositive 65009 
     72#define MainUnit_strNormalFreeze 65010 
     73#define MainUnit_strAskToSave 65011 
     74#define MainUnit_strScantextcaptiontotext 65012 
     75#define MainUnit_strScantextcaptiontoValue 65013 
     76#define MainUnit_strsearchForText 65014 
     77#define MainUnit_strSearchForArray 65015 
     78#define MainUnit_strConfirmProcessTermination 65016 
     79#define MainUnit_strError 65017 
     80#define MainUnit_strErrorwhileOpeningProcess 65018 
     81#define MainUnit_strKeepList 65019 
     82#define MainUnit_strInfoAboutTable 65020 
     83#define MainUnit_strPhysicalMemory 65021 
     84#define MainUnit_strfillInSomething 65022 
     85#define MainUnit_strFirstSelectAProcess 65023 
     86#define MainUnit2_strbiggerThan 65024 
     87#define MainUnit2_strSmallerThan 65025 
     88#define MainUnit2_strIncreasedValue 65026 
     89#define MainUnit2_strIncreasedValueBy 65027 
     90#define MainUnit2_strDecreasedValue 65028 
     91#define MainUnit2_strDecreasedValueBy 65029 
     92#define MainUnit2_strValueBetween 65030 
     93#define MainUnit2_strChangedValue 65031 
     94#define MainUnit2_strUnchangedValue 65032 
     95#define MainUnit2_strUnknownInitialValue 65033 
     96#define MainUnit2_strSameAsFirstScan 65034 
     97#define MainUnit2_strtoolong 65035 
     98#define FoundCodeUnit_strClose 65036 
     99#define MainUnit_strWindowFailedToHide 65037 
     100#define MainUnit_strAccessed 65038 
     101#define MainUnit_strOpcodeChanged 65039 
     102#define AdvancedOptionsUnit_strcouldntwrite 65040 
     103#define AdvancedOptionsUnit_StrSelectExeFor3D 65041 
     104#define AdvancedOptionsUnit_StrSelectExeForOpenGL3D 65042 
     105#define formsettingsunit_strProcessWatcherWillPreventUnloader 65043 
     106#define MainUnit2_strStart 65044 
     107#define MainUnit2_strStop 65045 
     108#define MainUnit2_strOK 65046 
     109#define MainUnit2_strBug 65047 
     110#define MainUnit2_strAutoAssemble 65048 
     111#define MainUnit2_strAddressHasToBeReadable 65049 
     112#define MainUnit2_strNewScan 65050 
     113#define MainUnit2_strFirstScan 65051 
     114#define MainUnit2_strNoDescription 65052 
     115#define MainUnit2_strNeedNewerWindowsVersion 65053 
     116#define MainUnit2_strexact 65054 
     117#define MainUnit2_strexactvalue 65055 
     118#define frmFindstaticsUnit_strStop 65056 
     119#define frmFindstaticsUnit_strStopping 65057 
     120#define frmLoadMemoryunit_strinvalidfile 65058 
     121#define AdvancedOptionsUnit_strnotreadable 65059 
     122#define AdvancedOptionsUnit_strNotWhatitshouldbe 65060 
     123#define AdvancedOptionsUnit_stralreadyinthelist 65061 
     124#define AdvancedOptionsUnit_strPartOfOpcodeInTheList 65062 
     125#define AdvancedOptionsUnit_strCECode 65063 
     126#define AdvancedOptionsUnit_strNameCECode 65064 
     127#define AdvancedOptionsUnit_strChangeOf 65065 
     128#define AdvancedOptionsUnit_strCode 65066 
     129#define AdvancedOptionsUnit_strFindWhatCodeaccesses 65067 
     130#define AdvancedOptionsUnit_strFindWhatCodeReads 65068 
     131#define AdvancedOptionsUnit_strFindWhatCodeWrites 65069 
     132#define AdvancedOptionsUnit_strcouldntrestorecode 65070 
     133#define AdvancedOptionsUnit_strnotthesame 65071 
     134#define SynEditStrConst_SYNS_AttrOctal 65072 
     135#define SynEditStrConst_SYNS_AttrPreprocessor 65073 
     136#define SynEditStrConst_SYNS_AttrReservedWord 65074 
     137#define SynEditStrConst_SYNS_AttrSpace 65075 
     138#define SynEditStrConst_SYNS_AttrString 65076 
     139#define SynEditStrConst_SYNS_AttrSymbol 65077 
     140#define SynEditStrConst_SYNS_ScrollInfoFmt 65078 
     141#define SynEditStrConst_SYNS_ScrollInfoFmtTop 65079 
     142#define SynEditStrConst_SYNS_EDuplicateShortcut 65080 
     143#define SynEditStrConst_SYNS_FilterPascal 65081 
     144#define SynEditStrConst_SYNS_FilterCPP 65082 
     145#define SynEditStrConst_SYNS_LangCPP 65083 
     146#define SynEditStrConst_SYNS_LangPascal 65084 
     147#define SynEditTextBuffer_SListIndexOutOfBounds 65085 
     148#define SynEditTextBuffer_SInvalidCapacity 65086 
     149#define frmFindstaticsUnit_strScan 65087 
    150150#define XMLConst_SMissingFileName 65088 
    151151#define XMLConst_SLine 65089 
    152 #define MainUnit2_strStart 65090 
    153 #define MainUnit2_strStop 65091 
    154 #define MainUnit2_strOK 65092 
    155 #define MainUnit2_strBug 65093 
    156 #define MainUnit2_strAutoAssemble 65094 
    157 #define MainUnit2_strAddressHasToBeReadable 65095 
    158 #define MainUnit2_strNewScan 65096 
    159 #define MainUnit2_strFirstScan 65097 
    160 #define MainUnit2_strNoDescription 65098 
    161 #define MainUnit2_strNeedNewerWindowsVersion 65099 
    162 #define MainUnit2_strexact 65100 
    163 #define MainUnit2_strexactvalue 65101 
    164 #define MainUnit2_strbiggerThan 65102 
    165 #define MainUnit2_strSmallerThan 65103 
     152#define OpenSave_strunknowncomponent 65090 
     153#define OpenSave_strCorruptIcon 65091 
     154#define OpenSave_strCantLoadFilepatcher 65092 
     155#define OpenSave_strNotACETrainer 65093 
     156#define OpenSave_strUnknownTrainerVersion 65094 
     157#define OpenSave_strCantLoadProtectedfile 65095 
     158#define SynEditStrConst_SYNS_AttrAssembler 65096 
     159#define SynEditStrConst_SYNS_AttrCharacter 65097 
     160#define SynEditStrConst_SYNS_AttrComment 65098 
     161#define SynEditStrConst_SYNS_AttrFloat 65099 
     162#define SynEditStrConst_SYNS_AttrHexadecimal 65100 
     163#define SynEditStrConst_SYNS_AttrIdentifier 65101 
     164#define SynEditStrConst_SYNS_AttrIllegalChar 65102 
     165#define SynEditStrConst_SYNS_AttrNumber 65103 
    166166#define XMLConst_SDuplicateRegistration 65104 
    167167#define XMLConst_SNoMatchingDOMVendor 65105 
     
    598598STRINGTABLE 
    599599BEGIN 
    600         AdvancedOptionsUnit_strCode,    "Code :" 
    601         AdvancedOptionsUnit_strFindWhatCodeaccesses,    "Find out what addresses this code accesses" 
    602         AdvancedOptionsUnit_strFindWhatCodeReads,       "Find out what addresses this code reads from" 
    603         AdvancedOptionsUnit_strFindWhatCodeWrites,      "Find out what addresses this code writes to" 
    604         AdvancedOptionsUnit_strcouldntrestorecode,      "Error when trying to restore this code!" 
    605         AdvancedOptionsUnit_strnotthesame,      "The memory at this address isn't what it should be! Continue?" 
    606         AdvancedOptionsUnit_strcouldntwrite,    "The memory at this address couldn't be written" 
    607         AdvancedOptionsUnit_StrSelectExeFor3D,  "Select the executable of the Direct-3D game" 
    608         AdvancedOptionsUnit_StrSelectExeForOpenGL3D,    "Select the executable of the OpenGL game" 
    609         formsettingsunit_strProcessWatcherWillPreventUnloader,  "Enabling the process watcher will prevent the unloader from working" 
    610         FoundCodeUnit_strClose, "Close" 
     600        MainUnit_strXMess,      "Merry christmas and happy new year" 
     601        MainUnit_strNewyear,    "And what are your good intentions for this year? ;-)" 
     602        MainUnit_strfuture,     "Wow,I never imagined people would use Cheat Engine up to today" 
     603        MainUnit_strdontbother, "Don't even bother. Cheat Engine uses the main thread to receive messages when the scan is done, freeze it and CE will crash!" 
     604        MainUnit_strneeddebugger,       "To use this option the debugger must be attached to the game" 
     605        MainUnit_strfailuretosetspeed,  "Failure to set the speed" 
    611606        MainUnit_strIncorrectspeed,     "The speed value is incorrect" 
    612607        MainUnit_strCantSetSpeed,       "I can't set this speed. (must be bigger than 0)" 
     
    614609        MainUnit_strUnknownExtension,   "Unknown extension" 
    615610        MainUnit_strCustomScanConfig,   "Custom scan config" 
    616         frmFindstaticsUnit_strScan,     "Scan" 
    617         frmFindstaticsUnit_strStop,     "Stop" 
    618         frmFindstaticsUnit_strStopping, "Stopping..." 
    619         frmLoadMemoryunit_strinvalidfile,       "This is a invalid memory region file. I'll assume this file has no header data" 
    620         AdvancedOptionsUnit_strnotreadable,     "This address is not readable" 
    621         AdvancedOptionsUnit_strNotWhatitshouldbe,       "The memory at this address is'nt what it should be! Continue?" 
    622         AdvancedOptionsUnit_stralreadyinthelist,        "This byte is already part of another opcode already present in the list" 
    623         AdvancedOptionsUnit_strPartOfOpcodeInTheList,   "At least one of these bytes is already in the list" 
    624         AdvancedOptionsUnit_strCECode,  "Cheat Engine code:" 
    625         AdvancedOptionsUnit_strNameCECode,      "What name do you want to give this code?" 
    626         AdvancedOptionsUnit_strChangeOf,        "Change of " 
     611        MainUnit_strRecalculateAddress, "Recalculate address" 
     612        MainUnit_strRecalculateSelectedAddresses,       "Recalculate selected addresses" 
     613        MainUnit_strRecalculateAllAddresses,    "Recalculate all addresses" 
     614        MainUnit_strRemoveFromGroup,    "Remove from group " 
     615        MainUnit_strEnableCheat,        "Enable cheat" 
     616        MainUnit_strDisableCheat,       "Disable cheat" 
    627617        MainUnit_strFindWhatWritesToPointer,    "Find out what writes to this pointer" 
    628618        MainUnit_strFindWhatWritesToPointer2,   "Find what reads from the address pointed at by this pointer" 
     
    635625        MainUnit_strUnhideAll,  "will bring all windows back" 
    636626        MainUnit_strhappybirthday,      "Let's sing Happy Birthday for Dark Byte today!" 
    637         MainUnit_strXMess,      "Merry christmas and happy new year" 
    638         MainUnit_strNewyear,    "And what are your good intentions for this year? ;-)" 
    639         MainUnit_strfuture,     "Wow,I never imagined people would use Cheat Engine up to today" 
    640         MainUnit_strdontbother, "Don't even bother. Cheat Engine uses the main thread to receive messages when the scan is done, freeze it and CE will crash!" 
    641         MainUnit_strneeddebugger,       "To use this option the debugger must be attached to the game" 
    642         MainUnit_strfailuretosetspeed,  "Failure to set the speed" 
     627        MainUnit_strDeleteMoreGroups,   "Also delete the groups of the addresses you selected?" 
     628        MainUnit_strSelectedAddressIsAPointer,  "The selected address is a pointer. Are you sure? (the base pointer will get the address)" 
     629        MainUnit_strMorePointers,       "There are more pointers selected. Do you want to change them as well?" 
     630        MainUnit_strMorePointers2,      "You have selected one or more pointers. Do you want to change them as well?" 
     631        MainUnit_strNotAValidValue,     "This is not an valid value" 
     632        MainUnit_strdeleteall,  "Are you sure you want to delete all addresses?" 
    643633        MainUnit_stralreadyin,  "This address is already in the list" 
    644634        MainUnit_stralreadyinlistmultiple,      "One or more addresses where already in the list" 
     
    651641        MainUnit_strUnfreezeAddressInList,      "Unfreeze the address in this list" 
    652642        MainUnit_strDeleteAddress,      "Delete this address" 
    653         MainUnit_strRecalculateAddress, "Recalculate address" 
    654         MainUnit_strRecalculateSelectedAddresses,       "Recalculate selected addresses" 
    655         MainUnit_strRecalculateAllAddresses,    "Recalculate all addresses" 
    656         MainUnit_strRemoveFromGroup,    "Remove from group " 
    657         MainUnit_strEnableCheat,        "Enable cheat" 
    658         MainUnit_strDisableCheat,       "Disable cheat" 
     643        MainUnit_strCantdoNextScan,     "You can't do a Next Scan with the current selected way of scanning!" 
     644        MainUnit_strClickToGoHome,      "Click here to go to the Cheat Engine homepage" 
     645        MainUnit_strChangeDescription1, "Description" 
     646        MainUnit_strChangeDescription2, "Change the description to:" 
     647        MainUnit_strNotTheSameSize1,    "The text you entered isn't the same size as the original. Continue?" 
     648        MainUnit_strNotTheSameSize2,    "Not the same size!" 
    659649        MainUnit_strAdd0,       "Do you want to add a '0'-terminator at the end?" 
    660650        MainUnit_strNotAValidNotation,  "This is not a valid notation" 
     
    667657        MainUnit_strDeleteMultipleAddresses,    "Delete these addresses?" 
    668658        MainUnit_strDelete1Group,       "Also delete the group this address is a member of?" 
    669         MainUnit_strDeleteMoreGroups,   "Also delete the groups of the addresses you selected?" 
    670         MainUnit_strSelectedAddressIsAPointer,  "The selected address is a pointer. Are you sure? (the base pointer will get the address)" 
    671         MainUnit_strMorePointers,       "There are more pointers selected. Do you want to change them as well?" 
    672         MainUnit_strMorePointers2,      "You have selected one or more pointers. Do you want to change them as well?" 
    673         MainUnit_strNotAValidValue,     "This is not an valid value" 
    674         MainUnit_strdeleteall,  "Are you sure you want to delete all addresses?" 
     659        MainUnit_strAllowNegative,      "Allow negative changes" 
     660        MainUnit_strAllowPositive,      "Allow positive changes" 
     661        MainUnit_strNormalFreeze,       "Don't allow any change" 
     662        MainUnit_strAskToSave,  "You haven't saved your last changes yet. Save Now?" 
     663        MainUnit_strScantextcaptiontotext,      "Text:" 
     664        MainUnit_strScantextcaptiontoValue,     "Value:" 
    675665        MainUnit_strsearchForText,      "Search for text" 
    676666        MainUnit_strSearchForArray,     "Search for this array" 
     
    683673        MainUnit_strfillInSomething,    "Please fill in something!" 
    684674        MainUnit_strFirstSelectAProcess,        "First select a process" 
    685         MainUnit_strCantdoNextScan,     "You can't do a Next Scan with the current selected way of scanning!" 
    686         MainUnit_strClickToGoHome,      "Click here to go to the Cheat Engine homepage" 
    687         MainUnit_strChangeDescription1, "Description" 
    688         MainUnit_strChangeDescription2, "Change the description to:" 
    689         MainUnit_strNotTheSameSize1,    "The text you entered isn't the same size as the original. Continue?" 
    690         MainUnit_strNotTheSameSize2,    "Not the same size!" 
    691         SynEditStrConst_SYNS_EDuplicateShortcut,        "Shortcut already exists" 
    692         SynEditStrConst_SYNS_FilterPascal,      "Pascal Files (*.pas;*.pp;*.dpr;*.dpk;*.inc)|*.pas;*.pp;*.dpr;*.dpk;*.inc" 
    693         SynEditStrConst_SYNS_FilterCPP, "C/C++ Files (*.c;*.cpp;*.h;*.hpp)|*.c;*.cpp;*.h;*.hpp" 
    694         SynEditStrConst_SYNS_LangCPP,   "C/C++" 
    695         SynEditStrConst_SYNS_LangPascal,        "Object Pascal" 
    696         SynEditTextBuffer_SListIndexOutOfBounds,        "Invalid stringlist index %d" 
    697         SynEditTextBuffer_SInvalidCapacity,     "Stringlist capacity cannot be smaller than count" 
    698         MainUnit_strWindowFailedToHide, "A window failed to hide" 
    699         MainUnit_strAccessed,   "The following opcodes accessed the selected address" 
    700         MainUnit_strOpcodeChanged,      "The following opcodes changed the selected address" 
    701         MainUnit_strAllowNegative,      "Allow negative changes" 
    702         MainUnit_strAllowPositive,      "Allow positive changes" 
    703         MainUnit_strNormalFreeze,       "Don't allow any change" 
    704         MainUnit_strAskToSave,  "You haven't saved your last changes yet. Save Now?" 
    705         MainUnit_strScantextcaptiontotext,      "Text:" 
    706         MainUnit_strScantextcaptiontoValue,     "Value:" 
    707         SynEditStrConst_SYNS_AttrAssembler,     "Assembler" 
    708         SynEditStrConst_SYNS_AttrCharacter,     "Character" 
    709         SynEditStrConst_SYNS_AttrComment,       "Comment" 
    710         SynEditStrConst_SYNS_AttrFloat, "Float" 
    711         SynEditStrConst_SYNS_AttrHexadecimal,   "Hexadecimal" 
    712         SynEditStrConst_SYNS_AttrIdentifier,    "Identifier" 
    713         SynEditStrConst_SYNS_AttrIllegalChar,   "Illegal Char" 
    714         SynEditStrConst_SYNS_AttrNumber,        "Number" 
    715         SynEditStrConst_SYNS_AttrOctal, "Octal" 
    716         SynEditStrConst_SYNS_AttrPreprocessor,  "Preprocessor" 
    717         SynEditStrConst_SYNS_AttrReservedWord,  "Reserved Word" 
    718         SynEditStrConst_SYNS_AttrSpace, "Space" 
    719         SynEditStrConst_SYNS_AttrString,        "String" 
    720         SynEditStrConst_SYNS_AttrSymbol,        "Symbol" 
    721         SynEditStrConst_SYNS_ScrollInfoFmt,     "%d - %d" 
    722         SynEditStrConst_SYNS_ScrollInfoFmtTop,  "Top Line: %d" 
     675        MainUnit2_strbiggerThan,        "Bigger than..." 
     676        MainUnit2_strSmallerThan,       "Smaller than..." 
    723677        MainUnit2_strIncreasedValue,    "Increased value" 
    724678        MainUnit2_strIncreasedValueBy,  "Increased value by ..." 
     
    731685        MainUnit2_strSameAsFirstScan,   "Same as first scan" 
    732686        MainUnit2_strtoolong,   "Too long" 
    733         OpenSave_strunknowncomponent,   "There is a unknown component in the trainer! compnr=" 
    734         OpenSave_strCorruptIcon,        "The icon has been corrupted" 
    735         OpenSave_strCantLoadFilepatcher,        "The file patcher can't be loaded by Cheat Engine!" 
    736         OpenSave_strNotACETrainer,      "This is not a trainer made by Cheat Engine (If it is a trainer at all!)" 
    737         OpenSave_strUnknownTrainerVersion,      "This version of Cheat Engine doesn't know how to read this trainer! Trainerversion=" 
    738         OpenSave_strCantLoadProtectedfile,      "This trainer is protected from being opened by CE. Now go away!!!" 
    739         XMLConst_SMissingFileName,      "FileName cannot be blank" 
    740         XMLConst_SLine, "Line" 
     687        FoundCodeUnit_strClose, "Close" 
     688        MainUnit_strWindowFailedToHide, "A window failed to hide" 
     689        MainUnit_strAccessed,   "The following opcodes accessed the selected address" 
     690        MainUnit_strOpcodeChanged,      "The following opcodes changed the selected address" 
     691        AdvancedOptionsUnit_strcouldntwrite,    "The memory at this address couldn't be written" 
     692        AdvancedOptionsUnit_StrSelectExeFor3D,  "Select the executable of the Direct-3D game" 
     693        AdvancedOptionsUnit_StrSelectExeForOpenGL3D,    "Select the executable of the OpenGL game" 
     694        formsettingsunit_strProcessWatcherWillPreventUnloader,  "Enabling the process watcher will prevent the unloader from working" 
    741695        MainUnit2_strStart,     "Start" 
    742696        MainUnit2_strStop,      "Stop" 
     
    751705        MainUnit2_strexact,     "Exact" 
    752706        MainUnit2_strexactvalue,        "Exact Value" 
    753         MainUnit2_strbiggerThan,        "Bigger than..." 
    754         MainUnit2_strSmallerThan,       "Smaller than..." 
     707        frmFindstaticsUnit_strStop,     "Stop" 
     708        frmFindstaticsUnit_strStopping, "Stopping..." 
     709        frmLoadMemoryunit_strinvalidfile,       "This is a invalid memory region file. I'll assume this file has no header data" 
     710        AdvancedOptionsUnit_strnotreadable,     "This address is not readable" 
     711        AdvancedOptionsUnit_strNotWhatitshouldbe,       "The memory at this address is'nt what it should be! Continue?" 
     712        AdvancedOptionsUnit_stralreadyinthelist,        "This byte is already part of another opcode already present in the list" 
     713        AdvancedOptionsUnit_strPartOfOpcodeInTheList,   "At least one of these bytes is already in the list" 
     714        AdvancedOptionsUnit_strCECode,  "Cheat Engine code:" 
     715        AdvancedOptionsUnit_strNameCECode,      "What name do you want to give this code?" 
     716        AdvancedOptionsUnit_strChangeOf,        "Change of " 
     717        AdvancedOptionsUnit_strCode,    "Code :" 
     718        AdvancedOptionsUnit_strFindWhatCodeaccesses,    "Find out what addresses this code accesses" 
     719        AdvancedOptionsUnit_strFindWhatCodeReads,       "Find out what addresses this code reads from" 
     720        AdvancedOptionsUnit_strFindWhatCodeWrites,      "Find out what addresses this code writes to" 
     721        AdvancedOptionsUnit_strcouldntrestorecode,      "Error when trying to restore this code!" 
     722        AdvancedOptionsUnit_strnotthesame,      "The memory at this address isn't what it should be! Continue?" 
     723        SynEditStrConst_SYNS_AttrOctal, "Octal" 
     724        SynEditStrConst_SYNS_AttrPreprocessor,  "Preprocessor" 
     725        SynEditStrConst_SYNS_AttrReservedWord,  "Reserved Word" 
     726        SynEditStrConst_SYNS_AttrSpace, "Space" 
     727        SynEditStrConst_SYNS_AttrString,        "String" 
     728        SynEditStrConst_SYNS_AttrSymbol,        "Symbol" 
     729        SynEditStrConst_SYNS_ScrollInfoFmt,     "%d - %d" 
     730        SynEditStrConst_SYNS_ScrollInfoFmtTop,  "Top Line: %d" 
     731        SynEditStrConst_SYNS_EDuplicateShortcut,        "Shortcut already exists" 
     732        SynEditStrConst_SYNS_FilterPascal,      "Pascal Files (*.pas;*.pp;*.dpr;*.dpk;*.inc)|*.pas;*.pp;*.dpr;*.dpk;*.inc" 
     733        SynEditStrConst_SYNS_FilterCPP, "C/C++ Files (*.c;*.cpp;*.h;*.hpp)|*.c;*.cpp;*.h;*.hpp" 
     734        SynEditStrConst_SYNS_LangCPP,   "C/C++" 
     735        SynEditStrConst_SYNS_LangPascal,        "Object Pascal" 
     736        SynEditTextBuffer_SListIndexOutOfBounds,        "Invalid stringlist index %d" 
     737        SynEditTextBuffer_SInvalidCapacity,     "Stringlist capacity cannot be smaller than count" 
     738        frmFindstaticsUnit_strScan,     "Scan" 
     739        XMLConst_SMissingFileName,      "FileName cannot be blank" 
     740        XMLConst_SLine, "Line" 
     741        OpenSave_strunknowncomponent,   "There is a unknown component in the trainer! compnr=" 
     742        OpenSave_strCorruptIcon,        "The icon has been corrupted" 
     743        OpenSave_strCantLoadFilepatcher,        "The file patcher can't be loaded by Cheat Engine!" 
     744        OpenSave_strNotACETrainer,      "This is not a trainer made by Cheat Engine (If it is a trainer at all!)" 
     745        OpenSave_strUnknownTrainerVersion,      "This version of Cheat Engine doesn't know how to read this trainer! Trainerversion=" 
     746        OpenSave_strCantLoadProtectedfile,      "This trainer is protected from being opened by CE. Now go away!!!" 
     747        SynEditStrConst_SYNS_AttrAssembler,     "Assembler" 
     748        SynEditStrConst_SYNS_AttrCharacter,     "Character" 
     749        SynEditStrConst_SYNS_AttrComment,       "Comment" 
     750        SynEditStrConst_SYNS_AttrFloat, "Float" 
     751        SynEditStrConst_SYNS_AttrHexadecimal,   "Hexadecimal" 
     752        SynEditStrConst_SYNS_AttrIdentifier,    "Identifier" 
     753        SynEditStrConst_SYNS_AttrIllegalChar,   "Illegal Char" 
     754        SynEditStrConst_SYNS_AttrNumber,        "Number" 
    755755        XMLConst_SDuplicateRegistration,        "\"%s\" DOMImplementation already registered" 
    756756        XMLConst_SNoMatchingDOMVendor,  "No matching DOM Vendor: \"%s\"" 
  • Cheat Engine/disassembler.pas

    r306 r312  
    90379037  i: integer; 
    90389038begin 
     9039  result:=false; 
    90399040  hexcount:=0; 
    9040   for i:=length(d) downto 1 do  
     9041  for i:=length(d) downto 1 do 
    90419042  begin 
    90429043    if d[i] in ['a'..'f','A'..'F','0'..'9'] then 
     
    90469047      begin 
    90479048        //it has a 4 byte hexadecimal value 
    9048         hexstring:=copy('$'+d,i-6,8); 
     9049        hexstring:='$'+copy(d,i,8); 
     9050        result:=true; 
    90499051        exit; 
    90509052      end; 
     
    90849086    if has4ByteHexString(d,s) then 
    90859087    begin 
    9086       address:=strtoint('$'+s); 
     9088      address:=strtoint(s); //s already has the $ in front 
    90879089      result:=isAddress(address); 
    90889090    end; 
     
    91889190    fvalue: single; 
    91899191    fvalue2: double; 
    9190     tempbuf: array [0..16] of byte; 
     9192    tempbuf: array [0..127] of byte; 
    91919193 
    91929194    pc: pchar; 
     
    93609362          5: 
    93619363          begin 
    9362             tempbuf[15]:=0; 
     9364            actualread:=0; 
     9365            ReadProcessMemory(processhandle, pointer(tempaddress), @tempbuf[0], 128, actualread); 
     9366 
     9367            tempbuf[127]:=0; 
     9368            tempbuf[126]:=ord('.'); 
     9369            tempbuf[125]:=ord('.'); 
     9370            tempbuf[124]:=ord('.'); 
     9371 
     9372            if actualread>0 then 
     9373              tempbuf[actualread-1]:=0; 
     9374               
    93639375            pc:=@tempbuf[0]; 
    93649376            ts:='"'+ pc+'"'; 
     
    93679379          6: 
    93689380          begin 
    9369             tempbuf[15]:=0; 
    9370             tempbuf[14]:=0; 
     9381            actualread:=0; 
     9382            ReadProcessMemory(processhandle, pointer(tempaddress), @tempbuf[0], 128, actualread); 
     9383                       
     9384            tempbuf[127]:=0; 
     9385            tempbuf[126]:=0; 
     9386 
     9387            tempbuf[125]:=0; 
     9388            tempbuf[124]:=ord('.'); 
     9389            tempbuf[123]:=0; 
     9390            tempbuf[122]:=ord('.'); 
     9391            tempbuf[121]:=0;             
     9392            tempbuf[120]:=ord('.'); 
     9393 
     9394            if actualread>1 then 
     9395            begin 
     9396              tempbuf[actualread-1]:=0; 
     9397              tempbuf[actualread-2]:=0; 
     9398            end; 
     9399 
    93719400            pwc:=@tempbuf[0]; 
    93729401            ts:='""'+ pwc+'""'; 
  • Cheat Engine/disassemblerviewunit.pas

    r301 r312  
    370370    //not the selected address 
    371371 
    372     if disassembleDescription.caption<>line.description then disassembleDescription.caption:=line.description; 
    373372    fSelectedAddress:=line.address; 
    374373 
     
    464463 
    465464  selstart, selstop: dword; 
     465  description: string; 
     466  x: dword; 
    466467begin 
    467468  if (not symhandler.isloaded) and (not symhandler.haserror) then 
     
    515516 
    516517  fTotalvisibledisassemblerlines:=i; 
     518 
     519  x:=fSelectedAddress; 
     520  disassemble(x,description); 
     521  if disassembleDescription.caption<>description then disassembleDescription.caption:=description; 
     522 
    517523 
    518524  if ShowJumplines then 
  • Cheat Engine/frmHeapsUnit.dfm

    r281 r312  
    22  Left = 408 
    33  Top = 186 
    4   Width = 220 
     4  Width = 253 
    55  Height = 316 
    66  BorderIcons = [biSystemMenu] 
     
    2121    Left = 0 
    2222    Top = 221 
    23     Width = 202 
     23    Width = 235 
    2424    Height = 50 
    2525    Align = alBottom 
     
    2727    TabOrder = 0 
    2828    DesignSize = ( 
    29       202 
     29      235 
    3030      50) 
    3131    object Button1: TButton 
    32       Left = 54 
     32      Left = 70 
    3333      Top = 10 
    3434      Width = 92 
     
    4444    Left = 0 
    4545    Top = 0 
    46     Width = 202 
     46    Width = 235 
    4747    Height = 221 
    4848    Align = alClient 
     
    5050      item 
    5151        Caption = 'Address' 
    52         Width = 128 
     52        Width = 120 
    5353      end 
    5454      item 
  • Cheat Engine/frmHeapsUnit.pas

    r309 r312  
    1010  private 
    1111    c: integer; 
    12     list: array [0..14] of record 
     12    list: array [0..63] of record 
    1313      address: dword; 
    1414      size: integer; 
    1515    end; 
    1616    expanded: boolean; 
    17     procedure enumerateHeapList(memreclist: PMemRecTableArray; level: integer); 
     17    procedure enumerateHeapList(const memreclist: PMemRecTableArray; level: integer); 
    1818    procedure updatelist; 
    1919  public 
     
    5151  li: tlistitem; 
    5252begin 
     53  if GetCurrentThreadID <> MainThreadID then 
     54    exit; 
     55 
    5356  if frmheaps<>nil then 
    5457  begin 
     
    7073end; 
    7174 
    72 procedure TFillHeapList.enumerateHeapList(memreclist: PMemRecTableArray; level: integer); 
     75procedure TFillHeapList.enumerateHeapList(const memreclist: PMemRecTableArray; level: integer); 
    7376var i: integer; 
    7477begin 
     
    8588        list[c].size:=memreclist[i].memallocevent.HookEvent.HeapAllocEvent.Size; 
    8689        inc(c); 
    87         if c=15 then 
     90        if c=64 then 
     91        begin 
    8892          synchronize(updatelist); 
     93          sleep(100); 
     94        end; 
    8995      end; 
    9096    end; 
     
    99105    end; 
    100106  end; 
     107 
     108 
    101109end; 
    102110 
     
    107115begin 
    108116  c:=0; 
    109  
    110   enumerateHeapList(@frmMemoryAllocHandler.HeapBaselevel, 0); 
     117  frmMemoryAllocHandler.memrecCS.Enter; 
     118  try 
     119    enumerateHeapList(@frmMemoryAllocHandler.HeapBaselevel, 0); 
     120  finally 
     121    frmMemoryAllocHandler.memrecCS.Leave; 
     122  end; 
    111123 
    112124  if c>0 then 
     
    116128procedure TfrmHeaps.FormClose(Sender: TObject; var Action: TCloseAction); 
    117129begin 
    118   fillthread.Terminate; 
    119   fillthread.WaitFor; 
    120   fillthread.Free; 
    121    
     130  if fillthread<>nil then 
     131  begin 
     132    fillthread.Terminate; 
     133    fillthread.WaitFor; 
     134    fillthread.Free; 
     135  end; 
     136 
    122137  action:=caFree; 
    123138  frmheaps:=nil; 
     
    127142begin 
    128143  if frmMemoryAllocHandler=nil then 
    129     frmMemoryAllocHandler:=TfrmMemoryAllocHandler.Create(self); //just not show 
     144    frmMemoryAllocHandler:=TfrmMemoryAllocHandler.Create(memorybrowser); //just not show 
    130145 
    131   frmMemoryAllocHandler.WaitForInitializationToFinish; 
     146  if frmMemoryAllocHandler.WaitForInitializationToFinish then 
     147  begin 
     148    //start the thread that enumerates the heaplist 
     149    button1.Left:=(clientwidth div 2) - (button1.Width div 2); 
    132150 
    133   //start the thread that enumerates the heaplist 
    134   button1.Left:=(clientwidth div 2) - (button1.Width div 2); 
    135  
    136   fillthread:=TFillHeapList.Create(false); 
     151    fillthread:=TFillHeapList.Create(false); 
     152  end; 
    137153end; 
    138154 
  • Cheat Engine/frmMemoryAllocHandlerUnit.pas

    r309 r312  
    226226 
    227227    if addresslist=@frmMemoryAllocHandler.HeapBaselevel then 
    228      dec(heapcount); 
     228      dec(heapcount); 
    229229      
    230230    temp.Free; 
  • Cheat Engine/frmReferencedStringsUnit.pas

    r300 r312  
    259259      stringlist.Objects[i]:=nil; 
    260260    end; 
    261     stringlist.Free; 
     261    freeandnil(stringlist); 
    262262  end; 
    263263 
  • Cheat Engine/frmSaveMemoryRegionUnit.dfm

    r109 r312  
    1616  Scaled = False 
    1717  OnClose = FormClose 
    18   PixelsPerInch = 96 
     18  PixelsPerInch = 120 
    1919  TextHeight = 13 
    2020  object Panel1: TPanel 
    2121    Left = 0 
    2222    Top = 0 
    23     Width = 262 
    24     Height = 196 
     23    Width = 252 
     24    Height = 185 
    2525    Align = alClient 
    2626    BevelOuter = bvNone 
     
    2929      Left = 0 
    3030      Top = 0 
    31       Width = 262 
     31      Width = 252 
    3232      Height = 13 
    3333      Align = alTop 
     
    3838      Left = 0 
    3939      Top = 13 
    40       Width = 155 
    41       Height = 183 
     40      Width = 145 
     41      Height = 172 
    4242      Align = alClient 
    4343      ItemHeight = 13 
     
    4646    end 
    4747    object Panel4: TPanel 
    48       Left = 155 
     48      Left = 145 
    4949      Top = 13 
    5050      Width = 107 
    51       Height = 183 
     51      Height = 172 
    5252      Align = alRight 
    5353      BevelOuter = bvNone 
     
    9696  object Panel2: TPanel 
    9797    Left = 0 
    98     Top = 196 
    99     Width = 262 
     98    Top = 185 
     99    Width = 252 
    100100    Height = 48 
    101101    Align = alBottom 
     
    103103    TabOrder = 1 
    104104    DesignSize = ( 
    105       262 
     105      252 
    106106      48) 
    107107    object DontInclude: TCheckBox 
  • Cheat Engine/frmSaveMemoryRegionUnit.pas

    r109 r312  
    100100    toaddress:=tregion(lbregions.Items.Objects[i]).toaddress; 
    101101 
    102     size:=toaddress-fromaddress; 
     102    size:=toaddress-fromaddress+1; 
    103103    getmem(buf[i],size); 
    104104 
  • Cheat Engine/memscan.pas

    r311 r312  
    20142014      maxsvalue:=svalue+(1/(power(10,floataccuracy))); 
    20152015    end; 
    2016  
     2016                   
    20172017    if variableType = vtString then 
    20182018    begin 
  • Cheat Engine/pointerscannerfrm.pas

    r311 r312  
    4646    evaluated: uint64; 
    4747    procedure execute; override; 
    48     destructor destroy; 
     48    destructor destroy; override; 
    4949  end; 
    5050 
     
    5252  Trescanpointers=class(tthread) 
    5353  private 
     54    procedure closeOldFile; 
    5455  public 
    5556    ownerform: TFrmPointerScanner; 
    5657    progressbar: tprogressbar; 
    5758    filename: string; 
     59    overwrite: boolean; 
    5860    address: dword; 
    5961    forvalue: boolean; 
     
    14191421end; 
    14201422 
     1423procedure TRescanpointers.closeOldFile; 
     1424begin 
     1425  ownerform.New1Click(ownerform.new1); 
     1426end; 
     1427 
    14211428procedure TRescanpointers.execute; 
    14221429var offsetsize: dword; 
     
    14501457    temp: dword; 
    14511458begin 
     1459  
    14521460  progressbar.Min:=0; 
    14531461  progressbar.Max:=100; 
     
    15011509      rescanworkers[i].rescanhelper:=rescanhelper; 
    15021510 
    1503       rescanworkers[i].filename:=self.filename+'.'+inttostr(i); 
     1511      if overwrite then 
     1512        rescanworkers[i].filename:=self.filename+'.'+inttostr(i)+'.overwrite'       
     1513      else 
     1514        rescanworkers[i].filename:=self.filename+'.'+inttostr(i); 
    15041515 
    15051516      rescanworkers[i].startEntry:=blocksize*i; 
     
    15131524 
    15141525 
    1515     result:=TFileStream.Create(filename,fmCreate); 
     1526    if overwrite then 
     1527      result:=TFileStream.Create(filename+'.overwrite',fmCreate) 
     1528    else 
     1529      result:=TFileStream.Create(filename,fmCreate); 
    15161530 
    15171531    //write header 
     
    15281542    begin 
    15291543      tempstring:=ExtractFileName(rescanworkers[i].filename); 
     1544      if overwrite then 
     1545        tempstring:=copy(tempstring,1,length(tempstring)-10); 
     1546         
    15301547      temp:=length(tempstring); 
    15311548      result.Write(temp,sizeof(temp)); 
     
    15331550    end; 
    15341551 
    1535     //loop: 
     1552    result.Free; 
    15361553 
    15371554    while WaitForMultipleObjects(rescanworkercount, @threadhandles[0], true, 1000) = WAIT_TIMEOUT do      //wait 
     
    15461563    //no timeout, so finished or crashed 
    15471564 
     1565    if overwrite then //delete the old ptr file 
     1566    begin 
     1567      synchronize(closeoldfile); 
     1568      DeleteFile(filename); 
     1569      RenameFile(filename+'.overwrite',filename); 
     1570    end; 
    15481571 
    15491572    //destroy workers 
     
    15521575      rescanworkers[i].WaitFor; //just to be sure 
    15531576      rescanworkers[i].Free; 
    1554     end; 
    1555     result.Free; 
     1577 
     1578      if overwrite then 
     1579      begin 
     1580        DeleteFile(filename+'.'+inttostr(i)); 
     1581        RenameFile(filename+'.'+inttostr(i)+'.overwrite', filename+'.'+inttostr(i)); 
     1582      end; 
     1583    end; 
     1584 
    15561585 
    15571586    rescanworkercount:=0; 
     
    15631592    postmessage(ownerform.Handle,rescan_done,0,0); 
    15641593    if rescanhelper<>nil then 
    1565       freeandnil(rescanhelper);     
     1594      freeandnil(rescanhelper); 
    15661595  end; 
    15671596 
     
    15981627          begin 
    15991628            rescan.filename:=savedialog1.filename; 
     1629 
     1630            if uppercase(rescan.filename)=uppercase(pointerscanresults.filename) then 
     1631              rescan.overwrite:=true; 
     1632 
     1633 
    16001634 
    16011635            Rescanmemory1.Enabled:=false; 
  • Cheat Engine/savedisassemblyfrm.pas

    r301 r312  
    8080  i:=0; 
    8181 
    82   while (not terminated) and (currentaddress<stop) do 
     82  while (not terminated) and (currentaddress<=stop) do 
    8383  begin 
    8484    oldaddress:=currentaddress; 
  • Cheat Engine/symbolhandler.pas

    r303 r312  
    12031203            modulelist[modulelistpos].modulename:=extractfilename(x); 
    12041204            modulelist[modulelistpos].modulepath:=x; 
    1205             //I say that physxcore is also a system module even if it isn't located in the windows dir 
    1206             modulelist[modulelistpos].isSystemModule:=(pos(lowercase(windowsdir),lowercase(x))>0); 
     1205 
     1206            //all windows folder files are system modules, except when it is an .exe (minesweeper in xp) 
     1207            modulelist[modulelistpos].isSystemModule:=(pos(lowercase(windowsdir),lowercase(x))>0) and (ExtractFileExt(lowercase(x))<>'.exe'); 
    12071208 
    12081209            if (not modulelist[modulelistpos].isSystemModule) and (commonModuleList<>nil) then //check if it's a common module (e.g nvidia physx dll's) 
    12091210              modulelist[modulelistpos].isSystemModule:=commonModuleList.IndexOf(lowercase(modulelist[modulelistpos].modulename))<>-1; 
    1210  
    1211  
    12121211 
    12131212            modulelist[modulelistpos].baseaddress:=dword(me32.modBaseAddr);