Перехват функций + вызов функций игр написанных на Delphi library sr2;uses Windows , SysUtils , DDetours // https://code.google.com/p/delphi-detours-library/ ;{$R *.res}var dwThrdHack: Dword = 0; dwThrdMain: Dword = 0; dwThrdKeys: Dword = 0; CALL: Boolean = False; Trampoline: function( p0: Integer; p1: Integer; p2: Integer; p3: WideString): Integer; dwLoadOffset: Dword;function TrampolineFunc( p0: Integer; p1: Integer; p2: Integer; p3: WideString): Integer;begin OutputDebugString(PWideChar(p3)); Result := Trampoline(p0, p1, p2, p3);end;Function FuncKeys(const LPVOID: variant): Boolean;begin while (True) do begin if (GetAsyncKeyState(VK_END) <> 0) then CALL := True; sleep(100); end;end;function FuncMain(const LPVOID: variant): Boolean;begin while (True) do begin asm pushad; end; if CALL then begin OutputDebugString('FPS'); CALL := False; end; sleep(100); asm popad; end; end;end;Function HackThread(): Dword;var cHandle: Cardinal;begin repeat sleep(500); until (dwThrdMain = 0); dwLoadOffset := GetModuleHandle(nil); Dec(dwLoadOffset, $400000); @Trampoline := InterceptCreate(Pointer($0051DD38 + dwLoadOffset), @TrampolineFunc); CreateThread(nil, 0, @FuncKeys, nil, 0, dwThrdKeys); CreateThread(nil, 0, @FuncMain, nil, 0, dwThrdMain); Result := 0;end;procedure DllMain(reason: Integer);begin case reason of DLL_PROCESS_ATTACH: begin CreateThread(nil, 0, @HackThread, nil, 0, dwThrdHack); end; DLL_PROCESS_DETACH: begin if dwThrdMain <> 0 then CloseHandle(dwThrdMain); if dwThrdKeys <> 0 then CloseHandle(dwThrdKeys); end; end;end;begin OutputDebugString('inject'); DisableThreadLibraryCalls(hInstance); DllProc := @DllMain; DllProc(DLL_PROCESS_ATTACH);end.