Advertisement
Guest User

Untitled

a guest
May 27th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 21.29 KB | None | 0 0
  1. unit Unit1;
  2. //Created by #CoderPro!
  3. interface
  4.  
  5. uses
  6.   Winapi.TlHelp32, AobScanner,
  7.   Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  8.   Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, sCheckBox, sButton,
  9.   Vcl.ExtCtrls, sPanel, sSkinManager, Vcl.ComCtrls, sStatusBar, ShellApi,
  10.   Vcl.Menus, MMSystem, acTitleBar, Vcl.Buttons, sSpeedButton, acProgressBar,
  11.   IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, uInjectDLL, IdHTTP;
  12.  
  13. type
  14.   TForm1 = class(TForm)
  15.     sPanel1: TsPanel;
  16.     sButton1: TsButton;
  17.     sPanel2: TsPanel;
  18.     sCheckBox1: TsCheckBox;
  19.     sCheckBox2: TsCheckBox;
  20.     sCheckBox3: TsCheckBox;
  21.     sSkinManager1: TsSkinManager;
  22.     sPanel3: TsPanel;
  23.     sPanel4: TsPanel;
  24.     sButton2: TsButton;
  25.     sStatusBar1: TsStatusBar;
  26.     pm1: TPopupMenu;
  27.     N1: TMenuItem;
  28.     schckbx1: TsCheckBox;
  29.     schckbx2: TsCheckBox;
  30.     schckbx3: TsCheckBox;
  31.     schckbx4: TsCheckBox;
  32.     sCheckBox5: TsCheckBox;
  33.     sPanel5: TsPanel;
  34.     sButton3: TsButton;
  35.     sPanel7: TsPanel;
  36.     sCheckBox4: TsCheckBox;
  37.     sCheckBox6: TsCheckBox;
  38.     sCheckBox7: TsCheckBox;
  39.     sPanel8: TsPanel;
  40.     sProgressBar1: TsProgressBar;
  41.     IdHTTP1: TIdHTTP;
  42.     Timer1: TTimer;
  43.     Timer2: TTimer;
  44.     sCheckBox8: TsCheckBox;
  45.     Timer3: TTimer;
  46.     sPanel6: TsPanel;
  47.     sSpeedButton1: TsSpeedButton;
  48.     sSpeedButton2: TsSpeedButton;
  49.     procedure sButton1Click(Sender: TObject);
  50.     procedure sCheckBox1Click(Sender: TObject);
  51.     procedure sCheckBox2Click(Sender: TObject);
  52.     procedure sCheckBox3Click(Sender: TObject);
  53.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  54.     procedure N1Click(Sender: TObject);
  55.     procedure sButton2Click(Sender: TObject);
  56.     procedure schckbx1Click(Sender: TObject);
  57.     procedure schckbx2Click(Sender: TObject);
  58.     procedure schckbx3Click(Sender: TObject);
  59.     procedure schckbx4Click(Sender: TObject);
  60.     procedure sButton3Click(Sender: TObject);
  61.     procedure sButton4Click(Sender: TObject);
  62.     procedure sStatusBar1Click(Sender: TObject);
  63.     procedure sSpeedButton1Click(Sender: TObject);
  64.     procedure sCheckBox5Click(Sender: TObject);
  65.     procedure sCheckBox4Click(Sender: TObject);
  66.     procedure sCheckBox6Click(Sender: TObject);
  67.     procedure sCheckBox7Click(Sender: TObject);
  68.     procedure tmr1Timer(Sender: TObject);
  69.     procedure Timer1Timer(Sender: TObject);
  70.     procedure Timer2Timer(Sender: TObject);
  71.     procedure FormCreate(Sender: TObject);
  72.     procedure sCheckBox8Click(Sender: TObject);
  73.     procedure Timer3Timer(Sender: TObject);
  74.     procedure FormShow(Sender: TObject);
  75.     procedure sSpeedButton2Click(Sender: TObject);
  76.   private
  77.     { Private declarations }
  78.   public
  79.     { Public declarations }
  80.   end;
  81.  
  82. var
  83.   Form1: TForm1;
  84.   Cheat1, Cheat2, Cheat3, Cheat4, Cheat5, Cheat6, Cheat7 : Integer;
  85.   //pid: Thandle;
  86.   //a: TStringList;
  87.   pid:Cardinal;
  88.   i : integer;
  89.   v : string;
  90.   Procces : Integer;
  91.   Kl_Procces : Integer;
  92.   f6s1,f6s2,f6s3,f6s4: string;
  93.   Silka1,Silka2,Silka3,Silka4,Silka5,inf,inf2,inf3,naz,pereb,pg,ziser,meh: String;
  94.   pName : string;
  95.   Data : TSTringList;
  96.   inv : Integer = 0;
  97.   a : string;
  98.  
  99. implementation
  100.  
  101. {$R *.dfm}
  102.  
  103. uses Unit2, Unit3, Unit4, Unit5, Unit7, Unit8, Unit9;
  104. {$R Музыка.res}
  105. {$R Res.RES}
  106.  
  107. //Выбор процесса
  108. ////////////////////////////////////////////////////////////////////////////////
  109. function FindGame(nModule: string; var pName: string): Integer;
  110. var
  111. pe32: TProcessEntry32;
  112. me32: ModuleEntry32;
  113. hSnap: THandle;
  114. hSnap_m: THandle;
  115. begin
  116. Result := 0;
  117. pe32.dwSize:=SizeOf(pe32);
  118. hSnap := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
  119. if Process32First(hSnap,pe32) then
  120. repeat
  121. me32.dwSize := SizeOf(me32);
  122. hSnap_m := CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pe32.th32ProcessID);
  123. if Module32First(hSnap_m, me32) then
  124. repeat
  125. if me32.szModule = nModule then
  126. begin
  127. pName := pe32.szExeFile;
  128. Result := pe32.th32ProcessID;
  129. Exit
  130. end;
  131. until not (Module32Next(hSnap_m, me32));
  132. CloseHandle(hSnap_m);
  133. until not(Process32Next(hSnap,pe32));
  134. CloseHandle(hSnap);
  135. end;
  136.  
  137. procedure SaveResourceAsFile(const FN, Name: string; const TYPE_: PChar);
  138. var
  139.   Res: TResourceStream;
  140.   File_: TFileStream;
  141. begin
  142.   Res := TResourceStream.Create(HInstance, Name, TYPE_);
  143.   if FileExists(FN) then
  144.     DeleteFile(FN);
  145.   File_ := TFileStream.Create(FN, fmOpenReadWrite or fmCreate);
  146.   try
  147.     File_.CopyFrom(Res, Res.Size);
  148.   finally
  149.     File_.Free;
  150.     Res.Free;
  151.   end;
  152. end;
  153.  
  154. function GetTmpDir: string;
  155. begin
  156.   SetLength(Result, MAX_PATH);
  157.   SetLength(Result, GetTempPath(MAX_PATH, PChar(Result)));
  158. end;
  159.  
  160. function OpenThread(dwDesiredAccess: DWORD; bInheritHandle: BOOLEAN; dwThreadId: DWORD): THandle; stdcall; external 'Kernel32.dll';
  161. function setBreakpoint(const GameHandle: DWORD): Boolean;
  162. var
  163. hSnap: THandle;
  164. THR32: THREADENTRY32;
  165. hOpen: THandle;
  166. begin
  167. Result := FALSE;
  168. hSnap := CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
  169. if hSnap <> INVALID_HANDLE_VALUE then
  170. begin
  171. THR32.dwSize := SizeOf(THR32);
  172. Thread32First(hSnap, THR32);
  173. repeat
  174. if THR32.th32OwnerProcessID = GameHandle then
  175. begin
  176. hOpen := OpenThread($0002, FALSE, THR32.th32ThreadID);
  177. if hOpen <> INVALID_HANDLE_VALUE then
  178. begin
  179. Result := TRUE;
  180. SuspendThread(hOpen);
  181. CloseHandle(hOpen);
  182. end;
  183. end;
  184. until Thread32Next(hSnap, THR32) = FALSE;
  185. CloseHandle(hSnap);
  186. end;
  187. end;
  188.  
  189.  
  190. //Старт процесс
  191. ////////////////////////////////////////////////////////////////////////////////
  192. function removeBreakpoint(const GameHandle: DWORD): Boolean;
  193. var
  194. Snapshot,cThr: DWORD;
  195. ThrHandle: THandle;
  196. Thread: TThreadEntry32;
  197. begin
  198. Result := False;
  199. cThr := GetCurrentThreadId;
  200. Snapshot := CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
  201. if Snapshot <> INVALID_HANDLE_VALUE then
  202. begin
  203. Thread.dwSize := SizeOf(TThreadEntry32);
  204. if Thread32First(Snapshot, Thread) then repeat
  205. if (Thread.th32ThreadID <> cThr) and (Thread.th32OwnerProcessID = GameHandle) then
  206. begin
  207. ThrHandle := OpenThread($0002, false, Thread.th32ThreadID);
  208. if ThrHandle = 0 then Exit;
  209. ResumeThread(ThrHandle);
  210. CloseHandle(ThrHandle);
  211. end;
  212. until not Thread32Next(Snapshot, Thread);
  213. Result := CloseHandle(Snapshot);
  214. end;
  215. end;
  216.  
  217. function FindGameByModule(var pID: Cardinal; var pName: string; uModules: array of string): Boolean;
  218. var
  219. hSnap: THandle;
  220. hSnap_md: THandle;
  221. PE: TProcessEntry32;
  222. ME: TModuleEntry32;
  223. i: Integer;
  224. LenM: Integer;
  225. begin
  226. Result := False;
  227. hSnap := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
  228. PE.dwSize := SizeOf(PE);
  229. ME.dwSize := SizeOf(ME);
  230. LenM := Length(uModules);
  231. if Process32First(hSnap, PE) then
  232. repeat
  233. hSnap_md := CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, PE.th32ProcessID);
  234. if Module32First(hSnap_md, ME) then
  235. repeat
  236. for i := 0 to LenM -1 do
  237. begin
  238. if Pos(uModules[i], ME.szModule) > 0 then
  239. begin
  240. if Application.MessageBox(PWideChar('При поиске игры был найден следующий процесс:'#13#10+
  241. 'PID:' + IntToStr(PE.th32ProcessID) + '-' + PE.szExeFile + #13#10 +
  242. 'Вы хотите к нему подключиться?'), 'Вопрос', MB_YESNO + MB_ICONQUESTION) = 6 then
  243. begin
  244. pID := PE.th32ProcessID;
  245. pName := PE.szExeFile;
  246. Result := True;
  247. Exit;
  248. end;
  249. end;
  250. end;
  251. until not Module32Next(hSnap_md, ME);;
  252. CloseHandle(hSnap_md);
  253. until not Process32Next(hSnap, PE);
  254. CloseHandle(hSnap);
  255. end;
  256.  
  257. procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
  258. begin
  259. ShellExecute(0, nil, pChar('https://vk.com/id307717813'), nil, nil, SW_SHOWNORMAL);
  260. ShellExecute(0, nil, pChar('https://www.youtube.com/channel/UCn-LVQG4FdRbd61eSzqj-vw'), nil, nil, SW_SHOWNORMAL);
  261. end;
  262.  
  263. procedure TForm1.FormCreate(Sender: TObject);
  264. begin
  265. SaveResourceAsFile(GetTmpDir + 'res.dll', 'MonsterByte', RT_RCDATA);
  266. end;
  267.  
  268. procedure TForm1.FormShow(Sender: TObject);
  269. var
  270. ms:TMemoryStream;
  271. v : string;
  272. begin
  273. try
  274. ms := TMemoryStream.Create;
  275. Data := TSTringList.Create;
  276. v := '1.7';
  277. IdHTTP1.Get('http://r97804yj.beget.tech/BatlaCheat', ms);
  278. ms.Position := 0;
  279. Data.LoadFromStream(ms);
  280. Data.Text:=UTF8Decode(Data.Text);
  281. AnsiToUTF8(Data.Text);
  282. except
  283. Halt;
  284. end;
  285. if Data.Strings[0] <> v then
  286. begin
  287. Silka1 := Data.Strings[0];
  288. Form9.ShowModal;
  289. Halt;
  290. end;
  291.  
  292. end;
  293.  
  294. procedure TForm1.N1Click(Sender: TObject);
  295. begin
  296. if N1.Checked then
  297. Form1.FormStyle:=fsStayOnTop
  298. else
  299. Form1.FormStyle:=fsNormal;
  300. end;
  301.  
  302. procedure TForm1.sButton1Click(Sender: TObject);
  303. var
  304. name:string;
  305. begin
  306. if FindGameByModule(pid, name, ['mono-1-vc.dll']) then
  307. begin
  308. sButton1.Caption := 'PID:' + IntToStr(pid) + '-' + name;
  309. pid := OpenProcess(PROCESS_ALL_ACCESS, False, pid);
  310. Application.ProcessMessages;
  311. MessageBeep(MB_OK);
  312. if pid <> 0 then
  313. begin
  314. sCheckBox1.Enabled := True;
  315. sCheckBox2.Enabled := True;
  316. sCheckBox3.Enabled := True;
  317. schckbx1.Enabled := True;
  318. schckbx2.Enabled := True;
  319. schckbx3.Enabled := True;
  320. schckbx4.Enabled := True;
  321. sCheckBox5.Enabled := True;
  322. sCheckBox6.Enabled := True;
  323. sCheckBox7.Enabled := True;
  324. sCheckBox8.Enabled := True;
  325. sSpeedButton1.Enabled := True;
  326. end;
  327. end
  328. else
  329. begin
  330. MessageBox(Handle, 'Не удалось найти процесс с игрой!', 'Error', MB_OK + MB_ICONSTOP);
  331. end;
  332. end;
  333.  
  334. procedure TForm1.sButton2Click(Sender: TObject);
  335. begin
  336. form2.showmodal;
  337. end;
  338.  
  339. procedure TForm1.sButton3Click(Sender: TObject);
  340. begin
  341. form3.ShowModal;
  342. end;
  343.  
  344. procedure TForm1.sButton4Click(Sender: TObject);
  345. begin
  346. //Form4.ShowModal;
  347. end;
  348.  
  349. procedure TForm1.schckbx1Click(Sender: TObject);
  350. const
  351.   Scan: array [1 .. 12] of Byte = ($87, $69, $01, $00, $00, $F3, $0F, $10, $46, $44, $F3, $0F);
  352. begin
  353.   if schckbx1.Checked = true then
  354.   begin
  355.   PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  356.   Timer1.Enabled := true;
  357.     Cheat3 := AobScan(pid, @Scan, 'xxxxxxxxxxxx');
  358.     if Cheat3 <> 0 then
  359.     begin
  360.       //PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  361.       WriteB(pid, Cheat3, [$87, $69, $01, $00, $00, $90, $90, $90, $90, $90, $F3, $0F]);
  362.       //MessageBeep(MB_OK);
  363.      //PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  364.      //Timer1.Enabled := False;
  365.       //sProgressBar1.Position := 0;
  366.       //Timer1.Enabled := False;
  367.     end
  368.     else
  369.     begin
  370.       MessageBeep(MB_ICONSTOP);
  371.       Application.MessageBox('Не удалось активировать!', 'Ошибка',
  372.         MB_OK + MB_ICONSTOP + MB_TOPMOST);
  373.     end;
  374.   end
  375.   else
  376.   begin
  377.   PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  378.     WriteB(pid, Cheat3, [$87, $69, $01, $00, $00, $F3, $0F, $10, $46, $44, $F3, $0F]);
  379.       //PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  380.        //Timer1.Enabled := False;
  381.       //sProgressBar1.Position := 0;
  382.   end;
  383. end;
  384.  
  385. procedure TForm1.schckbx2Click(Sender: TObject);
  386. const
  387.   Scan: array [1 .. 8] of Byte = ($A5, $74, $27, $83, $C0, $38, $50, $8D);
  388. begin
  389.   if schckbx2.Checked = true then
  390.   begin
  391.   PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  392.   Timer1.Enabled := true;
  393.     Cheat4 := AobScan(pid, @Scan, 'xxxxxxxx');
  394.     if Cheat4 <> 0 then
  395.     begin
  396.      //PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  397.       WriteB(pid, Cheat4, [$A5, $74, $27, $83, $C0, $38, $50, $8D]);
  398.       //MessageBeep(MB_OK);
  399.      //PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  400.        //Timer1.Enabled := False;
  401.       //sProgressBar1.Position := 0;
  402.       //Timer1.Enabled := False;
  403.     end
  404.     else
  405.     begin
  406.       MessageBeep(MB_ICONSTOP);
  407.       Application.MessageBox('Не удалось активировать!', 'Ошибка',
  408.         MB_OK + MB_ICONSTOP + MB_TOPMOST);
  409.     end;
  410.   end
  411.   else
  412.   begin
  413.   PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  414.     WriteB(pid, Cheat4, [$A5, $74, $27, $83, $C0, $38, $50, $8D]);
  415.        //PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  416.        //Timer1.Enabled := False;
  417.       //sProgressBar1.Position := 0;
  418.   end;
  419. end;
  420.  
  421.  
  422. procedure TForm1.schckbx3Click(Sender: TObject);
  423. const
  424.   Scan: array [1 .. 16] of Byte = ($D9, $5E, $14, $D9, $56, $24, $D9, $56, $34, $D9, $56, $08, $D9, $56, $18, $D9);
  425. begin
  426.   if schckbx3.Checked = true then
  427.   begin
  428.   PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  429.   Timer1.Enabled := true;
  430.     Cheat5 := AobScan(pid, @Scan, 'xxxxxxxxxxxxxxxx');
  431.     if Cheat5 <> 0 then
  432.     begin
  433.      //PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  434.       WriteB(pid, Cheat5, [$90, $90, $90, $D9, $56, $24, $D9, $56, $34, $D9, $56, $08, $D9, $56, $18, $D9]);
  435.      //PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  436.      //Timer1.Enabled := False;
  437.       //sProgressBar1.Position := 0;
  438.       //Timer1.Enabled := False;
  439.     end
  440.     else
  441.     begin
  442.       MessageBeep(MB_ICONSTOP);
  443.       Application.MessageBox('Не удалось активировать!', 'Ошибка',
  444.         MB_OK + MB_ICONSTOP + MB_TOPMOST);
  445.     end;
  446.   end
  447.   else
  448.   begin
  449.    PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  450.     WriteB(pid, Cheat5, [$D9, $5E, $14, $D9, $56, $24, $D9, $56, $34, $D9, $56, $08, $D9, $56, $18, $D9]);
  451.        //PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  452.        //Timer1.Enabled := False;
  453.       //sProgressBar1.Position := 0;
  454.   end;
  455. end;
  456.  
  457. procedure TForm1.schckbx4Click(Sender: TObject);
  458. const
  459.   Scan: array [1 .. 10] of Byte = ($D8, $66, $30, $DC, $6E, $10, $EB, $06, $D8, $46);
  460. begin
  461.   if schckbx4.Checked = true then
  462.   begin
  463.   PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  464.   Timer1.Enabled := true;
  465.     Cheat6 := AobScan(pid, @Scan, 'xxxxxxxxxx');
  466.     if Cheat6 <> 0 then
  467.     begin
  468.       //PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  469.       WriteB(pid, Cheat6, [$90, $90, $90, $90, $90, $90]);
  470.       //MessageBeep(MB_OK);
  471.      //PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  472.      //Timer1.Enabled := False;
  473.       //sProgressBar1.Position := 0;
  474.       //Timer1.Enabled := False;
  475.     end
  476.     else
  477.     begin
  478.       MessageBeep(MB_ICONSTOP);
  479.       Application.MessageBox('Не удалось активировать!', 'Ошибка',
  480.         MB_OK + MB_ICONSTOP + MB_TOPMOST);
  481.     end;
  482.   end
  483.   else
  484.   begin
  485.    PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  486.     WriteB(pid, Cheat6, [$D8, $66, $30, $DC, $6E, $10, $EB, $06, $D8, $46]);
  487.     //Timer1.Enabled := False;
  488.       //sProgressBar1.Position := 0;
  489.   end;
  490. end;
  491.  
  492. procedure TForm1.sCheckBox5Click(Sender: TObject);
  493. begin
  494. if sCheckBox5.Checked then
  495. begin
  496. PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  497. Form5.showmodal
  498. end
  499. else
  500. begin
  501. PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  502. //Нечего не происходит
  503. end;
  504. end;
  505.  
  506. procedure TForm1.sCheckBox6Click(Sender: TObject);
  507. begin
  508. if sCheckBox6.Checked then
  509. begin
  510. PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  511. form7.ShowModal;
  512. end
  513. else
  514. PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  515. end;
  516.  
  517. procedure TForm1.sCheckBox7Click(Sender: TObject);
  518. begin
  519. if sCheckBox7.Checked then
  520. begin
  521. PlaySound('ON',0,SND_ResOURCE or SND_ASYNC);
  522. form8.showmodal;
  523. end
  524. else
  525. begin
  526. PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC);
  527. end;
  528. end;
  529.  
  530. procedure TForm1.sCheckBox8Click(Sender: TObject);
  531. begin
  532. if sCheckBox8.Checked then
  533. begin
  534. Form4.ShowModal;
  535. PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  536. end
  537. else
  538. begin
  539. PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  540. end;
  541. end;
  542.  
  543. procedure TForm1.sCheckBox1Click(Sender: TObject);
  544. begin
  545. PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  546. Sleep(1000);
  547.  //PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  548. sCheckBox1.Enabled := False;
  549. end;
  550.  
  551. procedure TForm1.sCheckBox2Click(Sender: TObject);
  552. const
  553.   Scan: array [1 .. 12] of Byte = ($87, $69, $01, $00, $00, $F3, $0F, $10, $46, $44, $F3, $0F);
  554. begin
  555.   if sCheckBox2.Checked = true then
  556.   begin
  557.     PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  558.     //Timer1.Enabled := true;
  559.     Cheat1 := AobScan(pid, @Scan, 'xxxxxxxxxxxx');
  560.     if Cheat1 <> 0 then
  561.     begin
  562.       WriteB(pid, Cheat1, [$87, $69, $01, $00, $00, $90, $90, $90, $90, $90, $F3, $0F]);
  563.       // Timer1.Enabled := False;
  564.       //sProgressBar1.Position := 0;
  565.       //Timer1.Enabled := False;
  566.     end
  567.     else
  568.     begin
  569.       MessageBeep(MB_ICONSTOP);
  570.       Application.MessageBox('Не удалось активировать!', 'Ошибка',
  571.         MB_OK + MB_ICONSTOP + MB_TOPMOST);
  572.        //Timer1.Enabled := False;
  573.         //sProgressBar1.Position := 0;
  574.     end;
  575.   end
  576.   else
  577.   begin
  578.    PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  579.     WriteB(pid, Cheat1, [$87, $69, $01, $00, $00, $F3, $0F, $10, $46, $44, $F3, $0F]);
  580.   end;
  581.  
  582. end;
  583.  
  584. procedure TForm1.sCheckBox3Click(Sender: TObject);
  585. const
  586.   Scan: array [1 .. 6] of Byte = ($5C, $24, $10, $0F, $28, $E3);
  587. begin
  588.   if sCheckBox3.Checked = true then
  589.   begin
  590.   PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  591.   //Timer1.Enabled := true;
  592.     Cheat2 := AobScan(pid, @Scan, 'xxxxxx');
  593.     if Cheat2 <> 0 then
  594.     begin
  595.       //PlaySound('ON',0,SND_ResOURCE or SND_ASYNC );
  596.       WriteB(pid, Cheat2, [$5C, $24, $10, $90, $90, $90]);
  597.       //MessageBeep(MB_OK);
  598.        //Timer1.Enabled := False;
  599.       //sProgressBar1.Position := 100;
  600.       //Timer1.Enabled := False;
  601.     end
  602.     else
  603.     begin
  604.       MessageBeep(MB_ICONSTOP);
  605.       Application.MessageBox('Не удалось активировать!', 'Ошибка',
  606.         MB_OK + MB_ICONSTOP + MB_TOPMOST);
  607.     end;
  608.   end
  609.   else
  610.   begin
  611.     PlaySound('OFF',0,SND_ResOURCE or SND_ASYNC );
  612.     WriteB(pid, Cheat2, [$5C, $24, $10, $0F, $28, $E3]);
  613.    // Timer1.Enabled := False;
  614.     //sProgressBar1.Position := 0;
  615. end;
  616. end;
  617. procedure TForm1.sCheckBox4Click(Sender: TObject);
  618. begin
  619. if unit1.pid = 0 then
  620. begin
  621. if sCheckBox4.Checked then
  622. begin
  623. MessageBox(Handle, 'Процесс не выбран!', 'Error', MB_OK + MB_ICONSTOP);
  624. sCheckBox4.Checked := False;
  625. end
  626. else
  627. //
  628. end
  629. else
  630. if scheckbox4.Checked then
  631. begin
  632.   sCheckBox1.Enabled := False;
  633.   sCheckBox2.Enabled := False;
  634.   sCheckBox3.Enabled := false;
  635.   schckbx2.Enabled := False;
  636.   schckbx3.Enabled := False;
  637.   schckbx4.Enabled:= False;
  638.   schckbx1.Enabled:= False;
  639.   sCheckBox8.Enabled:= False;
  640.   sCheckBox7.Enabled:= False;
  641.   sCheckBox5.Enabled:= False;
  642.   sCheckBox6.Enabled:= False;
  643.   Timer1.Enabled := True;
  644.   sProgressBar1.Position :=0;
  645.   sCheckBox1.Checked := true;
  646.   sCheckBox2.Checked := true;
  647.   sCheckBox3.Checked := true;
  648.   schckbx2.Checked := True;
  649.   schckbx3.Checked := True;
  650.   schckbx4.Checked := True;
  651.   //sCheckBox7.Checked := True;
  652. end
  653. else
  654. begin
  655.   sCheckBox1.Enabled := False;
  656.   sCheckBox2.Enabled := False;
  657.   sCheckBox3.Enabled := false;
  658.   schckbx2.Enabled := False;
  659.   schckbx3.Enabled := False;
  660.   schckbx4.Enabled:= False;
  661.   sCheckBox7.Enabled:= False;
  662.   sCheckBox5.Enabled:= False;
  663.   sCheckBox6.Enabled:= False;
  664.   sCheckBox8.Enabled:= False;
  665.   schckbx1.Enabled:= False;
  666.   schckbx1.Checked := False;
  667.   sCheckBox1.Checked := False;
  668.   sCheckBox2.Checked := False;
  669.   sCheckBox3.Checked := False;
  670.   schckbx2.Checked := False;
  671.   schckbx3.Checked := False;
  672.   schckbx4.Checked := False;
  673.   Timer2.Enabled := True;
  674.   sProgressBar1.Position :=0;
  675.   //sCheckBox7.Checked := False;
  676.   scheckbox4.Caption := 'Активировать все функции';
  677. end;
  678. end;
  679.  
  680. procedure TForm1.sSpeedButton1Click(Sender: TObject);
  681. var
  682. name: string;
  683. begin
  684. try
  685. begin
  686. pid := FindGame('mono-1-vc.dll', name);
  687. Application.ProcessMessages;
  688. if pid <> 0 then
  689. begin
  690. //sButton1.Caption := 'PID:' + IntToStr(pid) + '-' + name;
  691. //MessageBeep(MB_OK);
  692. setBreakpoint(pid);
  693. sSpeedButton1.Enabled := False;
  694. sSpeedButton2.Enabled := True;
  695. end
  696. else
  697. begin
  698. MessageBox(Handle, 'Не удалось найти процесс с игрой!', 'Error', MB_OK +
  699.   MB_ICONSTOP);
  700. end;
  701. end;
  702. except
  703. end;
  704.  
  705. end;
  706.  
  707. procedure TForm1.sSpeedButton2Click(Sender: TObject);
  708. begin
  709. removeBreakpoint(pid);
  710. sSpeedButton1.Enabled := True;
  711. sSpeedButton2.Enabled := False;
  712. end;
  713.  
  714. procedure TForm1.sStatusBar1Click(Sender: TObject);
  715. begin
  716. ShellExecute(0, nil, pChar('https://vk.com/id307717813'), nil, nil, SW_SHOWNORMAL);
  717. end;
  718.  
  719. procedure TForm1.Timer1Timer(Sender: TObject);
  720. begin
  721. sProgressBar1.Position := sProgressbar1.Position+1;
  722. if sprogressbar1.Position = 100 then
  723. begin
  724. timer1.Enabled := False;
  725.   MessageBox(Handle, 'Функции успешно активированы!', 'Информация', MB_OK +
  726.     MB_ICONINFORMATION);
  727.   scheckbox4.Caption := 'Деактивировать функции';
  728.   sCheckBox1.Enabled := true;
  729.   sCheckBox2.Enabled := true;
  730.   sCheckBox3.Enabled := true;
  731.   sCheckBox7.Enabled:= True;
  732.   sCheckBox5.Enabled:= True;
  733.   sCheckBox6.Enabled:= True;
  734.   schckbx1.Enabled:= True;
  735.   sCheckBox8.Enabled:= True;
  736.   schckbx2.Enabled := True;
  737.   schckbx3.Enabled := True;
  738.   schckbx4.Enabled:= True;
  739. end;
  740. end;
  741.  
  742. procedure TForm1.Timer2Timer(Sender: TObject);
  743. begin
  744. sProgressBar1.Position := sProgressbar1.Position+1;
  745. if sProgressBar1.Position = 100 then
  746. begin
  747. Timer2.Enabled := False;
  748.     MessageBox(Handle, 'Функции успешно Деактивированы!', 'Информация', MB_OK +
  749.   MB_ICONINFORMATION);
  750.   sCheckBox1.Enabled := true;
  751.   sCheckBox2.Enabled := true;
  752.   sCheckBox3.Enabled := true;
  753.   sCheckBox7.Enabled:= True;
  754.   sCheckBox5.Enabled:= True;
  755.   sCheckBox6.Enabled:= True;
  756.   schckbx1.Enabled:= True;
  757.   schckbx2.Enabled := True;
  758.   schckbx3.Enabled := True;
  759.   schckbx4.Enabled:= True;
  760.   sCheckBox8.Enabled:= True;
  761. end;
  762. end;
  763.  
  764. procedure TForm1.Timer3Timer(Sender: TObject);
  765. begin
  766. if Form1.AlphaBlendValue <255 then
  767. begin
  768. Form1.AlphaBlendValue := Form1.AlphaBlendValue+3;
  769. end
  770. else
  771. begin
  772.   Timer1.Enabled := False;
  773. end;
  774. end;
  775.  
  776. procedure TForm1.tmr1Timer(Sender: TObject);
  777. begin
  778. //sProgressBar1.Position := AobScanner.MBTScProgress;
  779. end;
  780.  
  781. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement