Advertisement
HEX0x29A

SDK for Scylla Imports Reconstruction

Mar 19th, 2014
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 3.14 KB | None | 0 0
  1. unit uScylla;
  2. (*
  3.   SDK for Scylla Imports Reconstruction
  4.  
  5.   https://forum.tuts4you.com/files/go/33527f76821a0cde32ae196fa9ac4180/scylla-imports-reconstruction
  6.   https://github.com/NtQuery/Scylla
  7. *)
  8. interface
  9.  
  10. uses
  11.   Windows;
  12.  
  13. const
  14.   {$IFDEF WIN64}
  15.   ScyllaDll = 'Scylla_x64.dll';
  16.   {$ELSE}
  17.   ScyllaDll = 'Scylla_x86.dll';
  18.   {$ENDIF}
  19.  
  20.   SCY_ERROR_SUCCESS    : integer = 0;
  21.   SCY_ERROR_PROCOPEN   : integer = -1;
  22.   SCY_ERROR_IATWRITE   : integer = -2;
  23.   SCY_ERROR_IATSEARCH  : integer = -3;
  24.   SCY_ERROR_IATNOTFOUND: integer = -4;
  25.   SCY_ERROR_PIDNOTFOUND: integer = -5;
  26.  
  27. function ScyllaDumpCurrentProcessW(fileToDump: LPWSTR;
  28.                                    imagebase : DWORD_PTR;
  29.                                    entrypoint: DWORD;
  30.                                    fileResult: LPWSTR): BOOL; stdcall; external ScyllaDll;
  31. function ScyllaDumpCurrentProcessA(fileToDump: LPCSTR;
  32.                                    imagebase : DWORD_PTR;
  33.                                    entrypoint: DWORD;
  34.                                    fileResult: LPCSTR): BOOL; stdcall; external ScyllaDll;
  35.  
  36. function ScyllaDumpProcessW(pid       : DWORD_PTR;
  37.                             fileToDump: LPWSTR;
  38.                             imagebase : DWORD_PTR;
  39.                             entrypoint: DWORD_PTR;
  40.                             fileResult: LPWSTR): BOOL; stdcall; external ScyllaDll;
  41. function ScyllaDumpProcessA(pid       : DWORD_PTR;
  42.                             fileToDump: LPCSTR;
  43.                             imagebase : DWORD_PTR;
  44.                             entrypoint: DWORD_PTR;
  45.                             fileResult: LPCSTR): BOOL; stdcall; external ScyllaDll;
  46.  
  47. function ScyllaRebuildFileW(fileToRebuild         : LPWSTR;
  48.                             removeDosStub         : BOOL;
  49.                             updatePeHeaderChecksum: BOOL;
  50.                             createBackup          : BOOL): BOOL; stdcall; external ScyllaDll;
  51. function ScyllaRebuildFileA(fileToRebuild         : LPCSTR;
  52.                             removeDosStub         : BOOL;
  53.                             updatePeHeaderChecksum: BOOL;
  54.                             createBackup          : BOOL): BOOL; stdcall; external ScyllaDll;
  55.  
  56. function ScyllaVersionInformationW(): LPWSTR; stdcall; external ScyllaDll;
  57. function ScyllaVersionInformationA(): LPCSTR; stdcall; external ScyllaDll;
  58. function ScyllaVersionInformationDword(): DWORD; stdcall; external ScyllaDll;
  59.  
  60. function ScyllaStartGui(dwProcessId: DWORD;
  61.                         hmod       : DWORD): integer; stdcall; external ScyllaDll;
  62.  
  63. function ScyllaIatSearch(dwProcessId   : DWORD;
  64.                          iatStart      : PDWORD;
  65.                          iatSize       : PDWORD;
  66.                          searchStart   : DWORD_PTR;
  67.                          advancedSearch: BOOL): integer; stdcall; external ScyllaDll;
  68.  
  69. function ScyllaIatFixAutoW(iatAddr    : DWORD_PTR;
  70.                            iatSize    : DWORD;
  71.                            dwProcessId: DWORD;
  72.                            dumpFile   : LPWSTR;
  73.                            iatFixFile : LPWSTR): integer; stdcall; external ScyllaDll;
  74.  
  75. implementation
  76.  
  77. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement