├── .gitattributes
├── .gitignore
├── CleanExEx_x64_dbg
├── CleanupEx.pas
├── CleanupExEx.dpr
├── CleanupExEx.dproj
├── CleanupExEx.res
├── _plugins.pas
├── bin
│ └── CleanupExEx.dp32
└── bridgemain.pas
├── README.md
├── pluginsdk_c
├── TitanEngine
│ ├── TitanEngine.h
│ ├── TitanEngine_x64.a
│ ├── TitanEngine_x64.lib
│ ├── TitanEngine_x86.a
│ └── TitanEngine_x86.lib
├── _plugin_types.h
├── _plugins.h
├── bridgemain.h
├── dbghelp
│ ├── dbghelp.h
│ ├── dbghelp_x64.a
│ ├── dbghelp_x64.lib
│ ├── dbghelp_x86.a
│ └── dbghelp_x86.lib
├── libx32_bridge.a
├── libx32_dbg.a
├── libx64_bridge.a
├── libx64_dbg.a
├── testplugin_002.rar
├── x32_bridge.lib
├── x32_dbg.lib
├── x64_bridge.lib
└── x64_dbg.lib
└── pluginsdk_delphi
├── TitanEngine.pas
├── TitanEngine_2010.pas
├── _plugins.pas
└── bridgemain.pas
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear in the root of a volume
35 | .DocumentRevisions-V100
36 | .fseventsd
37 | .Spotlight-V100
38 | .TemporaryItems
39 | .Trashes
40 | .VolumeIcon.icns
41 |
42 | # Directories potentially created on remote AFP share
43 | .AppleDB
44 | .AppleDesktop
45 | Network Trash Folder
46 | Temporary Items
47 | .apdisk
48 |
--------------------------------------------------------------------------------
/CleanExEx_x64_dbg/CleanupEx.pas:
--------------------------------------------------------------------------------
1 | unit CleanupEx;
2 | (*
3 | * CleanupExEx v1.0
4 | * Author: quygia128
5 | * IDE: Delphi 7
6 | * Date: 06.26.2014
7 | * Debugger: x64_dbg Plugin
8 | *
9 | *)
10 |
11 | interface
12 |
13 | uses
14 | windows, SysUtils, _plugins, bridgemain;
15 | {$WARN UNSAFE_CODE OFF}
16 | {$WARN UNSAFE_TYPE OFF}
17 | {$WARN UNSAFE_CAST OFF}
18 |
19 | var
20 | g_loadedname:array[0..8] of PAnsiChar;
21 | function ShellExecuteA(hWnd: HWND; Operation, FileName, Parameters, Directory: PAnsiChar; ShowCmd: Integer): HINST; stdcall; external 'shell32.dll' name 'ShellExecuteA';
22 | function DeletelatestData: Boolean;
23 | function DeleteFilesProc(DelType: LongInt): Boolean;
24 | function GetdbDir: PAnsiChar; cdecl;
25 |
26 | implementation
27 |
28 | function GetdbDir: PAnsiChar;
29 | var
30 | i: LongInt;
31 | x64dir:array[0..MAX_PATH*4-1] of Char;
32 | begin
33 | ZeroMemory(@x64dir,SizeOf(x64dir));
34 | GetModuleFileNameA(GetModuleHandleA(nil),@x64dir,MAX_PATH*4-1);
35 | for i:= lstrlenA(@x64dir) downto 0 do begin
36 | if x64dir[i] <> '\' then x64dir[i]:= #0
37 | else begin
38 | lstrcatA(@x64dir,'db');
39 | Break;
40 | end;
41 | end;
42 | Result:= @x64dir;
43 | end;
44 |
45 | function DeletelatestData: Boolean;
46 | var
47 | szOllyPath:array[0..MAX_PATH-1] of CHAR;
48 | szInfomation:array[0..MAX_PATH-1] of CHAR;
49 | szUDDFullPath:array[0..MAX_PATH-1] of CHAR;
50 | szFileNameW:array[0..MAX_PATH-1] of CHAR;
51 | szFName:array[0..MAX_PATH-1] of CHAR;
52 | datadir:array[0..MAX_PATH-1] of Char;
53 | x64dir:array[0..MAX_PATH-1] of Char;
54 | i: LongInt;
55 | Begin
56 | Result:= False;
57 | if 6 = MessageBox(0,'Are you sure you want to delete the latest data ?','Confirm!',MB_ICONQUESTION + MB_YESNO) then begin
58 | //Zero initmemory
59 | ZeroMemory(@x64dir,SizeOf(x64dir));
60 | ZeroMemory(@szFileNameW,SizeOf(szFileNameW));
61 | ZeroMemory(@datadir,SizeOf(datadir));
62 | ZeroMemory(@szInfomation,SizeOf(szInfomation));
63 | // Get UDD path and backslash
64 | GetModuleFileNameA(GetModuleHandleA(nil),@x64dir,MAX_PATH);
65 | for i:= lstrlenA(@x64dir) downto 0 do begin
66 | if x64dir[i] <> '\' then x64dir[i]:= #0
67 | else begin
68 | lstrcatA(@x64dir,'db\');
69 | Break;
70 | end;
71 | end;
72 | lstrcatA(@datadir,@x64dir);
73 | // Case Delete data type
74 | // Delete debug data
75 | BridgeSettingGet('Recent Files','01',@szFileNameW);
76 | if lstrlenA(@szFileNameW) < 4 then
77 | BridgeSettingGet('Last File','Last',@szFileNameW);
78 |
79 | if not(lstrlenA(@szFileNameW) > 0) then begin
80 | _plugin_logputs('WARNING: File Not Found!');
81 | Exit;
82 | end
83 | else lstrcpyA(@szInfomation,@szFileNameW);
84 | lstrcatA(@szInfomation,'.dd32');
85 | lstrcatA(@x64dir,PAnsiChar(ExtractFileName(string(szInfomation))));
86 | ZeroMemory(@szInfomation,SizeOf(szInfomation));
87 | lstrcatA(@szInfomation,@x64dir);
88 | if DeleteFileA(@szInfomation) then begin
89 | _plugin_logprintf('CleanupExEx: Deleted file : %s', szInfomation);
90 | Result:= True;
91 | end;
92 | // Delete dd64
93 | //Zero initmemory
94 | ZeroMemory(@x64dir,SizeOf(x64dir));
95 | ZeroMemory(@szFileNameW,SizeOf(szFileNameW));
96 | ZeroMemory(@datadir,SizeOf(datadir));
97 | ZeroMemory(@szInfomation,SizeOf(szInfomation));
98 | // Get UDD path and backslash
99 | GetModuleFileNameA(GetModuleHandleA(nil),@x64dir,MAX_PATH);
100 | for i:= lstrlenA(@x64dir) downto 0 do begin
101 | if x64dir[i] <> '\' then x64dir[i]:= #0
102 | else begin
103 | lstrcatA(@x64dir,'db\');
104 | Break;
105 | end;
106 | end;
107 | lstrcatA(@datadir,@x64dir);
108 | // Case Delete data type
109 | // Delete debug data
110 | BridgeSettingGet('Recent Files','01',@szFileNameW);
111 | if lstrlenA(@szFileNameW) < 4 then
112 | BridgeSettingGet('Last File','Last',@szFileNameW);
113 |
114 | if not(lstrlenA(@szFileNameW) > 0) then begin
115 | Exit;
116 | end
117 | else lstrcpyA(@szInfomation,@szFileNameW);
118 | lstrcatA(@szInfomation,'.dd64');
119 | lstrcatA(@x64dir,PAnsiChar(ExtractFileName(string(szInfomation))));
120 | ZeroMemory(@szInfomation,SizeOf(szInfomation));
121 | lstrcatA(@szInfomation,@x64dir);
122 | if DeleteFileA(@szInfomation) then begin
123 | _plugin_logprintf('CleanupExEx: Deleted file : %s', @szInfomation);
124 | Result:= True;
125 | end;
126 | end;
127 | End;
128 | ////////////////////////////////////////////////////////////////////////////////
129 | ////////////////////////////////////////////////////////////////////////////////
130 | function DeleteFilesProc(DelType: LongInt): Boolean;
131 | var
132 | wfd: WIN32_FIND_DATAA;
133 | hsnapshot: THandle;
134 | szFileNameA:array[0..MAX_PATH-1] of CHAR;
135 | szExtensionNameA:array[0..MAX_PATH-1] of CHAR;
136 | szExtensionNameBuffA:array[0..31] of CHAR;
137 | n,DelDataCt,i: LongInt;
138 | datadir:array[0..MAX_PATH-1] of Char;
139 | x64dir:array[0..MAX_PATH-1] of Char;
140 | Begin
141 | Result:= False;
142 | DelDataCt:= 0;
143 | ZeroMemory(@x64dir,SizeOf(x64dir));
144 | ZeroMemory(@datadir,SizeOf(datadir));
145 | ZeroMemory(@szFileNameA,SizeOf(szFileNameA));
146 | ZeroMemory(@szExtensionNameA,SizeOf(szExtensionNameA));
147 | ZeroMemory(@szExtensionNameBuffA,SizeOf(szExtensionNameBuffA));
148 | ZeroMemory(@wfd,SizeOf(wfd));
149 |
150 | GetModuleFileNameA(GetModuleHandleA(nil),@x64dir,MAX_PATH);
151 | for i:= lstrlenA(@x64dir) downto 0 do begin
152 | if x64dir[i] <> '\' then x64dir[i]:= #0
153 | else begin
154 | x64dir[i]:= #0;
155 | Break;
156 | end;
157 | end;
158 | // Get UDD path and backslash
159 | lstrcatA(@datadir,@x64dir);
160 | lstrcatA(@datadir,'\db\');
161 | // Case Delete data type
162 | case DelType of
163 | 1:begin
164 | // All ollydbg data
165 | lstrcatA(@szExtensionNameA,@datadir);
166 | lstrcatA(@szExtensionNameA,'*.*');
167 | end;
168 | 2:begin
169 | // All Debug data
170 | lstrcatA(@szExtensionNameA,@datadir);
171 | lstrcatA(@szExtensionNameA,'*.dd32');
172 | end;
173 | 3:begin
174 | // All Backup data
175 | lstrcatA(@szExtensionNameA,@datadir);
176 | lstrcatA(@szExtensionNameA,'*.dd64');
177 | end;
178 | 4:begin
179 | // All Backup data
180 | //DeletelatestData;
181 | end;
182 | 5:begin
183 | // For Future (Edit extentions(XXX))
184 | //Stringfromini('CleanupExEx','Extension',szExtensionNameBuffW,TEXTLEN);
185 | lstrcatA(@szExtensionNameA,@datadir);
186 | lstrcatA(@szExtensionNameA,'*.xxxx');
187 | end;
188 | end;
189 | if 6 = MessageBoxA(GuiGetWindowHandle,'Are you sure you want to delete all x64_dbg data ?','Confirm!',MB_ICONQUESTION + MB_YESNO) then begin
190 | hSnapshot:= FindFirstFileA(@szExtensionNameA,wfd);
191 | Try
192 | if (hSnapshot <> INVALID_HANDLE_VALUE) then begin
193 | lstrcatA(@szFileNameA,@datadir);
194 | lstrcatA(@szFileNameA,wfd.cFileName);
195 | if not(DeleteFileA(@szFileNameA)) then
196 | _plugin_logprintf('Failed to delete the file: %s',wfd.cFileName)
197 | else Inc(DelDataCt);
198 | ZeroMemory(@szFileNameA,SizeOf(szFileNameA));
199 | while FindNextFileA(hSnapshot,wfd) do begin
200 | lstrcatA(@szFileNameA,@datadir);
201 | lstrcatA(@szFileNameA,wfd.cFileName);
202 | if not(DeleteFileA(@szFileNameA)) then
203 | _plugin_logprintf('Failed to delete the file: %s',wfd.cFileName)
204 | else Inc(DelDataCt);
205 | ZeroMemory(@szFileNameA,SizeOf(szFileNameA));
206 | end;
207 | _plugin_logprintf('CleanupExEx Deleted: %i Files!',DelDataCt);
208 | end
209 | else begin
210 | _plugin_logprintf('WARNING: File Not Found!');
211 | end;
212 | Result:= True;
213 | except
214 | Result:= False;
215 | end;
216 | end;
217 | End;
218 |
219 | end.
--------------------------------------------------------------------------------
/CleanExEx_x64_dbg/CleanupExEx.dpr:
--------------------------------------------------------------------------------
1 | Library CleanExEx;
2 |
3 | uses
4 | Windows, Messages, CleanupEx, _plugins, bridgemain;
5 |
6 | {$ALIGN 1}
7 | {$WARN UNSAFE_CODE OFF}
8 | {$WARN UNSAFE_TYPE OFF}
9 | {$WARN UNSAFE_CAST OFF}
10 | //{$DEFINE WIN64}
11 |
12 | {$IFDEF WIN64}
13 | //{$E dp64} // Extension supported is 3 in Delphi 7
14 | {$ELSE}
15 | //{$E dp32}
16 | {$ENDIF}
17 |
18 | var
19 | SaveDLLProc: TDLLProc;
20 | g_pluginHandle: THandle = 0;
21 | g_hMenu: Cardinal = 0;
22 | g_hsMenu: Cardinal = 0;
23 | g_hWnD: Cardinal = 0;
24 | g_Inst: Cardinal = 0;
25 |
26 | const
27 | PLUGIN_NAME: PAChar = 'CleanupExEx';
28 | PLUGIN_AUTH: PAChar = 'quygia128';
29 | PLUGIN_HOME: PAChar = 'http://cin1team.biz';
30 | PLUGIN_BLOG: PAChar = 'http://crackertool.tk';
31 | PLUGIN_VERS: Integer = 10;
32 | //
33 | MENU_DELALLS = 1;
34 | MENU_DELDP32 = 2;
35 | MENU_DELDP64 = 3;
36 | MENU_DELLDAT = 4;
37 | MENU_DELXXXX = 5;
38 | MENU_DELABUT = 6;
39 |
40 | ////////////////////////////////////////////////////////////////////////////////
41 | {$R CleanupExEx.res}
42 | ////////////////////////////////////////////////////////////////////////////////
43 | procedure RegisterInitProc(cbType: CBTYPE;callbackInfo: Pointer); cdecl;
44 | var
45 | info: PPLUG_CB_INITDEBUG;
46 | begin
47 | ZeroMemory(@g_loadedname,SizeOf(g_loadedname));
48 | info:= PPLUG_CB_INITDEBUG(callbackInfo);
49 | g_loadedname[0]:= info^.szFileName;
50 | BridgeSettingSet('Last File','Last',g_loadedname[0]);
51 | end;
52 |
53 | procedure RegisterMenuProc(cbType: CBTYPE;callbackinfo: Pointer); cdecl;
54 | var
55 | info: PPLUG_CB_MENUENTRY;
56 | db: PAnsiChar;
57 | begin
58 | info:= PPLUG_CB_MENUENTRY(callbackInfo);
59 | case (info^.hEntry) of
60 | MENU_DELALLS:
61 | begin
62 | //DeleteFilesProc(MENU_DELALLS);
63 | db:= GetdbDir;
64 | ShellExecuteA(GuiGetWindowHandle,'OPEN',db,nil,nil,1);
65 | end;
66 | MENU_DELDP32:
67 | begin
68 | DeleteFilesProc(MENU_DELDP32);
69 | end;
70 | MENU_DELDP64:
71 | Begin
72 | DeleteFilesProc(MENU_DELDP64);
73 | end;
74 | MENU_DELLDAT:
75 | Begin
76 | DeletelatestData;
77 | end;
78 | MENU_DELXXXX:
79 | Begin
80 | DeleteFilesProc(MENU_DELXXXX);
81 | end;
82 | MENU_DELABUT:
83 | Begin
84 | MessageBoxA(g_hWnD,'CleanupExEx v0.1 - 07.07.2014'#10' by quygia128 '#10#10'Home: http://cin1team.biz '#10#13'Greetz fly go to all my friends','x64_dbg: CleanupExEx',MB_ICONINFORMATION);
85 | end;
86 | end;
87 | end;
88 |
89 | function cbDeldd32Command(argc: Integer; argv: PPAnsiChar): Boolean; cdecl;
90 | begin
91 | DeleteFilesProc(MENU_DELDP32);
92 | end;
93 |
94 | function cbDeldd64Command(argc: Integer; argv: PPAnsiChar): Boolean; cdecl;
95 | begin
96 | DeleteFilesProc(MENU_DELDP64);
97 | end;
98 |
99 | function cbDellddCommand(argc: Integer; argv: PPAnsiChar): Boolean; cdecl;
100 | begin
101 | DeletelatestData;
102 | end;
103 |
104 | function cbDelddAllCommand(argc: Integer; argv: PPAnsiChar): Boolean; cdecl;
105 | var
106 | db: PAnsiChar;
107 | begin
108 | //
109 | db:= GetdbDir;
110 | ShellExecuteA(GuiGetWindowHandle,'OPEN',db,nil,nil,SW_SHOWNORMAL);
111 | end;
112 |
113 | function x_dbg_Plugininit(PlugInitInfo: PPLUG_INITSTRUCT): Boolean; cdecl;
114 | begin
115 | g_pluginHandle:= PlugInitInfo^.pluginHandle; //Address: 0043E7DC
116 | PlugInitInfo^.sdkVersion:= PLUG_SDKVERSION;
117 | PlugInitInfo^.PluginVersion:= PLUGIN_VERS;
118 | lstrcpyA(PlugInitInfo^.pluginName,PLUGIN_NAME);
119 | _plugin_registercallback(g_pluginHandle, CB_MENUENTRY, RegisterMenuProc);
120 | _plugin_registercallback(g_pluginHandle, CB_INITDEBUG, RegisterInitProc);
121 | Result:= True;
122 | end;
123 |
124 | procedure x_dbg_Pluginsetup(PlugSetupInfo: PPLUG_SETUPSTRUCT); cdecl;
125 | begin
126 | g_hWnD:= PlugSetupInfo^.hwndDlg;
127 | g_hMenu:= PlugSetupInfo^.hMenu;
128 | // Add plugin Menu
129 | _plugin_menuaddentry(g_hMenu,MENU_DELDP32,'Clear Alls *.dd32');
130 | //g_hsMenu:= _plugin_menuadd(hMenu, '&Load Config');
131 | _plugin_menuaddseparator(g_hMenu);
132 | //_plugin_menuaddentry(g_hMenu,MENU_DELDP64,'Clear Alls *.dd64');
133 | //_plugin_menuaddseparator(g_hMenu);
134 | _plugin_menuaddentry(g_hMenu,MENU_DELLDAT,'Clear Latest Debug Data');
135 | _plugin_menuaddseparator(g_hMenu);
136 | _plugin_menuaddentry(g_hMenu,MENU_DELALLS,'Open Data Directory');
137 | _plugin_menuaddseparator(g_hMenu);
138 | _plugin_menuaddentry(g_hMenu,MENU_DELABUT,'About..');
139 | // Register Command
140 | if not(_plugin_registercommand(g_pluginHandle, 'Deldd32', cbDeldd32Command, false)) then
141 | _plugin_logputs('[MapMaster] ErroR Registering The "Deldd32" command! ');
142 | //if not(_plugin_registercommand(g_pluginHandle, 'Deldd64', cbDeldd64Command, false)) then
143 | //_plugin_logputs('[MapMaster] ErroR Registering The "Deldd64" command! ');
144 | if not(_plugin_registercommand(g_pluginHandle, 'Delldd', cbDellddCommand, false)) then
145 | _plugin_logputs('[MapMaster] ErroR Registering The "Delldd" command! ');
146 | if not(_plugin_registercommand(g_pluginHandle, 'Opendb', cbDelddAllCommand, false)) then
147 | _plugin_logputs('[MapMaster] ErroR Registering The "Opendb" command! ');
148 | // Add Plugin info
149 | _plugin_logprintf('[***] HOME: %s - BLOG: %s '#10,PLUGIN_HOME,PLUGIN_BLOG);
150 | _plugin_logprintf('[***] %s Plugin v%i by %s '#10,PLUGIN_NAME, PLUGIN_VERS, PLUGIN_AUTH);
151 |
152 | end;
153 |
154 | function x_dbg_plugstop(): Boolean; cdecl;
155 | begin
156 | //
157 | _plugin_unregistercallback(g_pluginHandle,CB_MENUENTRY);
158 | _plugin_unregistercallback(g_pluginHandle,CB_INITDEBUG);
159 | Result:= True;
160 | end;
161 |
162 | exports
163 |
164 | x_dbg_Plugininit name 'pluginit',
165 | x_dbg_Pluginsetup name 'plugsetup',
166 | x_dbg_plugstop name 'plugstop';
167 |
168 | procedure DLLEntryPoint(dwReason: DWORD);
169 | var
170 | szPluginName:array[0..MAX_PATH-1] of ACHAR;
171 | begin
172 | if (dwReason = DLL_PROCESS_DETACH) then
173 | begin
174 | // Uninitialize code here
175 | lstrcatA(szPluginName,PLUGIN_NAME);
176 | lstrcatA(szPluginName,' Unloaded By DLL_PROCESS_DETACH');
177 | OutputDebugStringA(szPluginName);
178 | end;
179 | // Call saved entry point procedure
180 | if Assigned(SaveDLLProc) then SaveDLLProc(dwReason);
181 | end;
182 |
183 | begin
184 | //Initialize code here
185 | g_Inst:= HInstance;
186 | SaveDLLProc:= @DLLProc;
187 | DLLProc:= @DLLEntryPoint;
188 | end.
189 |
--------------------------------------------------------------------------------
/CleanExEx_x64_dbg/CleanupExEx.dproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {502C8950-3906-4751-8A80-4E7A52434AD7}
4 | CleanupExEx.dpr
5 | True
6 | Release
7 | 3
8 | Library
9 | None
10 | 14.6
11 | Win64
12 |
13 |
14 | true
15 |
16 |
17 | true
18 | Base
19 | true
20 |
21 |
22 | true
23 | Base
24 | true
25 |
26 |
27 | true
28 | Base
29 | true
30 |
31 |
32 | true
33 | Base
34 | true
35 |
36 |
37 | false
38 | true
39 | 1033
40 | System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)
41 | true
42 | true
43 | 00400000
44 | false
45 | true
46 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=;CFBundleDisplayName=;UIDeviceFamily=;CFBundleIdentifier=;CFBundleVersion=;CFBundlePackageType=;CFBundleSignature=;CFBundleAllowMixedLocalizations=;UISupportedInterfaceOrientations=;CFBundleExecutable=;CFBundleResourceSpecification=;LSRequiresIPhoneOS=;CFBundleInfoDictionaryVersion=;CFBundleDevelopmentRegion=
47 | true
48 | 1
49 | false
50 | false
51 | true
52 |
53 |
54 | 1033
55 | System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
56 | CleanupExEx_Icon.ico
57 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
58 | true
59 |
60 |
61 | System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)
62 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
63 | CleanupExEx_Icon.ico
64 |
65 |
66 | false
67 | RELEASE;$(DCC_Define)
68 | false
69 | 0
70 |
71 |
72 | true
73 | DEBUG;$(DCC_Define)
74 | false
75 |
76 |
77 |
78 | MainSource
79 |
80 |
81 | Cfg_2
82 | Base
83 |
84 |
85 | Base
86 |
87 |
88 | Cfg_1
89 | Base
90 |
91 |
92 |
93 | Delphi.Personality.12
94 |
95 |
96 |
97 |
98 | CleanupExEx.dpr
99 |
100 |
101 | C:\Users\MrQuy\Desktop\CleanExEx_x64_dbg\
102 |
103 |
104 | True
105 | False
106 | 1
107 | 0
108 | 0
109 | 0
110 | False
111 | False
112 | False
113 | False
114 | False
115 | 1033
116 | 1252
117 |
118 |
119 |
120 |
121 | 1.0.0.0
122 |
123 |
124 |
125 |
126 |
127 | 1.0.0.0
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 | False
147 | True
148 | True
149 |
150 |
151 | 12
152 |
153 |
154 |
155 |
156 |
--------------------------------------------------------------------------------
/CleanExEx_x64_dbg/CleanupExEx.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/CleanExEx_x64_dbg/CleanupExEx.res
--------------------------------------------------------------------------------
/CleanExEx_x64_dbg/_plugins.pas:
--------------------------------------------------------------------------------
1 | Unit _plugins;
2 |
3 | (**
4 | *
5 | * Ported form _plugins.h (x64_dbg-PluginSDK v0.10) to Unit Delphi by quygia128
6 | * Home: http://cin1team.biz
7 | * Blog: http://crackertool.blogspot.com (www.crackertool.tk)
8 | * Last Edit: 06.30.2014 by quygia128
9 | *
10 | * Update: https://github.com/quygia128
11 | *
12 | * Thanks to TQN for Delphi Coding, phpbb3 and BOB for Nice Plugin(Tools) Power By Delphi,
13 | * all my friends at CiN1Team(ALL CIN1'S MEMBER) & Other RCE Team.
14 | * Of course thanks to Mr.eXodia author of x64_dbg, Nice Work!
15 | *
16 | **)
17 |
18 | interface
19 |
20 | uses
21 | Windows, bridgemain;
22 |
23 | {$ALIGN 1} // Struct byte alignment
24 | {$WARN UNSAFE_CODE OFF}
25 | {$WARN UNSAFE_TYPE OFF}
26 | {$WARN UNSAFE_CAST OFF}
27 | //{$DEFINE WIN64}
28 |
29 | Type
30 |
31 | {$IFDEF WIN64}
32 | {$MINENUMSIZE 8} // Size of enumerated types are 8 bytes
33 | duint = UInt64;
34 | dsint = Int64;
35 | pduint = ^duint;
36 | pdsint = ^dsint;
37 | {$ELSE}
38 | {$MINENUMSIZE 4} // Size of enumerated types are 4 bytes
39 | duint = ULong;
40 | dsint = LongInt;
41 | pduint = ^duint;
42 | pdsint = ^dsint;
43 | {$ENDIF} //WIN64
44 |
45 | {$IFDEF UNICODE}
46 | AChar = AnsiChar; // Delphi 6,7 SRC Work With Delphi 2009, 2010, XE.x
47 | PAChar = PAnsiChar; // Delphi 6,7 SRC Work With Delphi 2009, 2010, XE.x
48 | {$ELSE}
49 | AChar = Char;
50 | PAChar = PChar;
51 | {$ENDIF}
52 |
53 | const
54 | PLUG_SDKVERSION = $1;
55 | {$IFDEF WIN64}
56 | x32_DBG = 'x64_dbg.dll';
57 | {$ELSE}
58 | x32_DBG = 'x32_dbg.dll';
59 | {$ENDIF}
60 |
61 |
62 | Type
63 |
64 | PPLUG_INITSTRUCT = ^PLUG_INITSTRUCT;
65 | PLUG_INITSTRUCT = packed record
66 | //provided by the debugger
67 | pluginHandle: Integer;
68 | //provided by the pluginit function
69 | sdkVersion: Integer;
70 | pluginVersion: Integer;
71 | pluginName:array[0..255] of AChar;
72 | end;
73 |
74 | PPLUG_SETUPSTRUCT = ^PLUG_SETUPSTRUCT;
75 | PLUG_SETUPSTRUCT = packed record
76 | //provided by the debugger
77 | hwndDlg: HWND; //gui window handle
78 | hMenu: Integer; //plugin menu handle
79 | end;
80 |
81 | //callback structures
82 | PPLUG_CB_INITDEBUG = ^PLUG_CB_INITDEBUG;
83 | PLUG_CB_INITDEBUG = packed record
84 | szFileName: PAChar;
85 | end;
86 |
87 | PPLUG_CB_STOPDEBUG = ^PLUG_CB_STOPDEBUG;
88 | PLUG_CB_STOPDEBUG = packed record
89 | reserved: Pointer;
90 | end;
91 |
92 | PPLUG_CB_CREATEPROCESS = ^PLUG_CB_CREATEPROCESS;
93 | PLUG_CB_CREATEPROCESS = Packed record
94 | CreateProcessInfo: {CREATE_PROCESS_DEBUG_INFO*}PCreateProcessDebugInfo;
95 | modInfo: PIMAGEHLP_MODULE64;
96 | DebugFileName: PAChar;
97 | fdProcessInfo: {PROCESS_INFORMATION*}PProcessInformation;
98 | end;
99 |
100 | PPLUG_CB_EXITPROCESS = ^PLUG_CB_EXITPROCESS;
101 | PLUG_CB_EXITPROCESS = packed record
102 | ExitProcess: {EXIT_PROCESS_DEBUG_INFO*}PExitProcessDebugInfo;
103 | end;
104 |
105 | PPLUG_CB_CREATETHREAD = ^PLUG_CB_CREATETHREAD;
106 | PLUG_CB_CREATETHREAD = packed record
107 | CreateThread: {CREATE_THREAD_DEBUG_INFO*}PCreateThreadDebugInfo;
108 | dwThreadId: DWORD;
109 | end;
110 |
111 | PPLUG_CB_EXITTHREAD = ^PLUG_CB_EXITTHREAD;
112 | PLUG_CB_EXITTHREAD = packed record
113 | ExitThread: {EXIT_THREAD_DEBUG_INFO*}PExitThreadDebugInfo;
114 | dwThreadId: DWORD;
115 | end;
116 |
117 | PPLUG_CB_SYSTEMBREAKPOINT = ^PLUG_CB_SYSTEMBREAKPOINT;
118 | PLUG_CB_SYSTEMBREAKPOINT = packed record
119 | reserved: Pointer;
120 | end;
121 |
122 | PPLUG_CB_LOADDLL = ^PLUG_CB_LOADDLL;
123 | PLUG_CB_LOADDLL = packed record
124 | LoadDll: {LOAD_DLL_DEBUG_INFO*}PLoadDLLDebugInfo;
125 | modInfo: PIMAGEHLP_MODULE64;
126 | modname: PAChar;
127 | end;
128 |
129 | PPLUG_CB_UNLOADDLL = ^PLUG_CB_UNLOADDLL;
130 | PLUG_CB_UNLOADDLL = packed record
131 | UnloadDll: {UNLOAD_DLL_DEBUG_INFO*}PUnloadDLLDebugInfo;
132 | end;
133 |
134 | PPLUG_CB_OUTPUTDEBUGSTRING = ^PLUG_CB_OUTPUTDEBUGSTRING;
135 | PLUG_CB_OUTPUTDEBUGSTRING = packed record
136 | DebugString: {OUTPUT_DEBUG_STRING_INFO*}POutputDebugStringInfo;
137 | end;
138 |
139 | PPLUG_CB_EXCEPTION = ^PLUG_CB_EXCEPTION;
140 | PLUG_CB_EXCEPTION = packed record
141 | Exception: {EXCEPTION_DEBUG_INFO*}PExceptionDebugInfo;
142 | end;
143 |
144 | PPLUG_CB_BREAKPOINT = ^PLUG_CB_BREAKPOINT;
145 | PLUG_CB_BREAKPOINT = packed record
146 | breakpoint: PBRIDGEBP;
147 | end;
148 |
149 | PPLUG_CB_PAUSEDEBUG = ^PLUG_CB_PAUSEDEBUG;
150 | PLUG_CB_PAUSEDEBUG = packed record
151 | reserved: Pointer;
152 | end;
153 |
154 | PPLUG_CB_RESUMEDEBUG = ^PLUG_CB_RESUMEDEBUG;
155 | PLUG_CB_RESUMEDEBUG = packed record
156 | reserved: Pointer;
157 | end;
158 |
159 | PPLUG_CB_STEPPED = ^PLUG_CB_STEPPED;
160 | PLUG_CB_STEPPED = packed record
161 | reserved: Pointer;
162 | end;
163 |
164 | PPLUG_CB_ATTACH = ^PLUG_CB_ATTACH;
165 | PLUG_CB_ATTACH = packed record
166 | dwProcessId: DWORD;
167 | end;
168 |
169 | PPLUG_CB_DETACH = ^PLUG_CB_DETACH;
170 | PLUG_CB_DETACH = packed record
171 | fdProcessInfo: {PROCESS_INFORMATION*}PProcessInformation;
172 | end;
173 |
174 | PPLUG_CB_DEBUGEVENT = ^PLUG_CB_DEBUGEVENT;
175 | PLUG_CB_DEBUGEVENT = packed record
176 | DebugEvent: {DEBUG_EVENT*}PDebugEvent;
177 | end;
178 |
179 | PPLUG_CB_MENUENTRY = ^PLUG_CB_MENUENTRY;
180 | PLUG_CB_MENUENTRY = packed record
181 | hEntry: Integer;
182 | end;
183 |
184 | Type
185 | CBTYPE = (
186 | CB_INITDEBUG, //PLUG_CB_INITDEBUG
187 | CB_STOPDEBUG, //PLUG_CB_STOPDEBUG
188 | CB_CREATEPROCESS, //PLUG_CB_CREATEPROCESS
189 | CB_EXITPROCESS, //PLUG_CB_EXITPROCESS
190 | CB_CREATETHREAD, //PLUG_CB_CREATETHREAD
191 | CB_EXITTHREAD, //PLUG_CB_EXITTHREAD
192 | CB_SYSTEMBREAKPOINT, //PLUG_CB_SYSTEMBREAKPOINT
193 | CB_LOADDLL, //PLUG_CB_LOADDLL
194 | CB_UNLOADDLL, //PLUG_CB_UNLOADDLL
195 | CB_OUTPUTDEBUGSTRING, //PLUG_CB_OUTPUTDEBUGSTRING
196 | CB_EXCEPTION, //PLUG_CB_EXCEPTION
197 | CB_BREAKPOINT, //PLUG_CB_BREAKPOINT
198 | CB_PAUSEDEBUG, //PLUG_CB_PAUSEDEBUG
199 | CB_RESUMEDEBUG, //PLUG_CB_RESUMEDEBUG
200 | CB_STEPPED, //PLUG_CB_STEPPED
201 | CB_ATTACH, //PLUG_CB_ATTACHED (before attaching, after CB_INITDEBUG)
202 | CB_DETACH, //PLUG_CB_DETACH (before detaching, before CB_STOPDEBUG)
203 | CB_DEBUGEVENT, //PLUG_CB_DEBUGEVENT (called on any debug event)
204 | CB_MENUENTRY //PLUG_CB_MENUENTRY
205 | );
206 |
207 | //typedef void (*CBPLUGIN)(CBTYPE cbType, void* callbackInfo);
208 | //typedef bool (*CBPLUGINCOMMAND)(int, char**);
209 | CBPLUGIN = procedure(cbType: CBTYPE;callbackInfo: Pointer); cdecl;
210 | CBPLUGINCOMMAND = function(argc: Integer;Command: PPAnsiChar): Boolean; cdecl;
211 |
212 |
213 | {PLUG_IMPEXP void} procedure _plugin_registercallback(pluginHandle: Integer;CB_Type: CBTYPE;cb_Plugin: CBPLUGIN); cdecl; external x32_DBG;
214 | {PLUG_IMPEXP bool} function _plugin_unregistercallback(pluginHandle: Integer;CB_Type: CBTYPE): Boolean; cdecl; external x32_DBG;
215 | {PLUG_IMPEXP bool} function _plugin_registercommand(pluginHandle: Integer;const command: PAChar;cbCommand: CBPLUGINCOMMAND;debugonly: Boolean): Boolean; cdecl; external x32_DBG;
216 | {PLUG_IMPEXP bool} function _plugin_unregistercommand(pluginHandle: Integer;const command: PAChar): Boolean; cdecl; external x32_DBG;
217 | {PLUG_IMPEXP void} procedure _plugin_logprintf(const format: PAChar); cdecl; varargs; external x32_DBG;
218 | {PLUG_IMPEXP void} procedure _plugin_logputs(const text: PAChar); cdecl; external x32_DBG;
219 | {PLUG_IMPEXP void} procedure _plugin_debugpause(); cdecl; external x32_DBG;
220 | {PLUG_IMPEXP void} procedure _plugin_debugskipexceptions(skip: Boolean); cdecl; external x32_DBG;
221 | {PLUG_IMPEXP int} function _plugin_menuadd(hMenu: Integer;const title: PAChar): Integer; cdecl; external x32_DBG;
222 | {PLUG_IMPEXP bool} function _plugin_menuaddentry(hMenu,hEntry: Integer;const title: PAChar): Boolean; cdecl; external x32_DBG;
223 | {PLUG_IMPEXP bool} function _plugin_menuaddseparator(hMenu: Integer): Boolean; cdecl; external x32_DBG;
224 | {PLUG_IMPEXP bool} function _plugin_menuclear(hMenu: Integer): Boolean; cdecl; external x32_DBG;
225 |
226 | implementation
227 |
228 | end.
--------------------------------------------------------------------------------
/CleanExEx_x64_dbg/bin/CleanupExEx.dp32:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/CleanExEx_x64_dbg/bin/CleanupExEx.dp32
--------------------------------------------------------------------------------
/CleanExEx_x64_dbg/bridgemain.pas:
--------------------------------------------------------------------------------
1 | Unit bridgemain;
2 |
3 | (**
4 | *
5 | * Ported form bridgemain.h (x64_dbg-PluginSDK v0.10) to Unit Delphi by quygia128
6 | * Home: http://cin1team.biz
7 | * Blog: http://crackertool.blogspot.com (www.crackertool.tk)
8 | * Last Edit: 06.30.2014 by quygia128
9 | *
10 | * Update: https://github.com/quygia128
11 | *
12 | * Thanks to TQN for Delphi Coding, phpbb3 and BOB for Nice Plugin(Tools) Power By Delphi,
13 | * all my friends at CiN1Team(ALL CIN1'S MEMBER) & Other RCE Team.
14 | * Of course thanks to Mr.eXodia author of x64_dbg, Nice Work!
15 | *
16 | **)
17 |
18 | interface
19 |
20 | uses
21 | Windows;
22 |
23 | {$ALIGN 1} // Struct byte alignment
24 | {$WARN UNSAFE_CODE OFF}
25 | {$WARN UNSAFE_TYPE OFF}
26 | {$WARN UNSAFE_CAST OFF}
27 | //{$DEFINE WIN64}
28 |
29 | Type
30 | DWORD64 = Int64;
31 | PDWORD64 = PInt64;
32 |
33 | {$IFDEF WIN64}
34 | duint = UInt64;
35 | dsint = Int64;
36 | pduint = ^duint;
37 | pdsint = ^dsint;
38 | {$ELSE}
39 | duint = ULong;
40 | dsint = LongInt;
41 | pduint = ^duint;
42 | pdsint = ^dsint;
43 | {$ENDIF} //WIN64
44 |
45 |
46 | {$IFDEF UNICODE}
47 | AChar = AnsiChar; // Delphi 6,7 SRC Work With Delphi 2009, 2010, XE.x
48 | PAChar = PAnsiChar; // Delphi 6,7 SRC Work With Delphi 2009, 2010, XE.x
49 | {$ELSE}
50 | AChar = Char;
51 | PAChar = PChar;
52 | {$ENDIF}
53 |
54 | Const
55 | //Bridge defines
56 | MAX_SETTING_SIZE = 65536;
57 | DBG_VERSION = 18;
58 | {$IFDEF WIN64}
59 | x32_BRIDGE = 'x64_bridge.dll';
60 | {$ELSE}
61 | x32_BRIDGE = 'x32_bridge.dll';
62 | {$ENDIF}
63 |
64 | //Bridge functions
65 | {BRIDGE_IMPEXP char*} function BridgeInit(): PAChar; cdecl; external x32_BRIDGE;
66 | {BRIDGE_IMPEXP char*} function BridgeStart(): PAChar; cdecl; external x32_BRIDGE;
67 | {BRIDGE_IMPEXP void*} function BridgeAlloc(size: LongInt): Pointer; cdecl; external x32_BRIDGE;
68 | {BRIDGE_IMPEXP void} procedure BridgeFree(ptr: Pointer); cdecl; external x32_BRIDGE;
69 | {BRIDGE_IMPEXP bool} function BridgeSettingGet(const section: PAChar; const key:PAChar;value: PAChar): Boolean; cdecl; external x32_BRIDGE;
70 | {BRIDGE_IMPEXP bool} function BridgeSettingGetUint(const section: PAChar;const key: PAChar;value: duint): Boolean; cdecl; external x32_BRIDGE;
71 | {BRIDGE_IMPEXP bool} function BridgeSettingSet(const section: PAChar; const key: PAChar; const value: PAChar): Boolean; cdecl; external x32_BRIDGE;
72 | {BRIDGE_IMPEXP bool} function BridgeSettingSetUint(const section: PAChar; const key: PAChar;value: duint): Boolean; cdecl; external x32_BRIDGE;
73 |
74 | Const
75 | //Debugger defines
76 | MAX_LABEL_SIZE = 256;
77 | MAX_COMMENT_SIZE = 512;
78 | MAX_MODULE_SIZE = 256;
79 | MAX_BREAKPOINT_SIZE = 256;
80 | MAX_SCRIPT_LINE_SIZE = 2048;
81 |
82 | TYPE_VALUE = 1;
83 | TYPE_MEMORY = 2;
84 | TYPE_ADDR = 4;
85 | MAX_MNEMONIC_SIZE = 64;
86 |
87 | Type
88 | //Debugger enums
89 | DBGSTATE = (
90 | initialized,
91 | paused,
92 | running,
93 | stopped
94 | );
95 |
96 | SEGMENTREG = (
97 | SEG_DEFAULT,
98 | SEG_ES,
99 | SEG_DS,
100 | SEG_FS,
101 | SEG_GS,
102 | SEG_CS,
103 | SEG_SS
104 | );
105 |
106 | ADDRINFOFLAGS = (
107 | flagmodule=1,
108 | flaglabel=2,
109 | flagcomment=4,
110 | flagbookmark=8,
111 | flagfunction=16
112 | );
113 |
114 | BPXTYPE = (
115 | bp_none=0,
116 | bp_normal=1,
117 | bp_hardware=2,
118 | bp_memory=4
119 | );
120 |
121 | FUNCTYPE = (
122 | FUNC_NONE,
123 | FUNC_BEGIN,
124 | FUNC_MIDDLE,
125 | FUNC_END,
126 | FUNC_SINGLE
127 | );
128 |
129 | LOOPTYPE = (
130 | LOOP_NONE,
131 | LOOP_BEGIN,
132 | LOOP_MIDDLE,
133 | LOOP_ENTRY,
134 | LOOP_END
135 | );
136 |
137 | DBGMSG = (
138 | DBG_SCRIPT_LOAD, // param1=const char* filename, param2=unused
139 | DBG_SCRIPT_UNLOAD, // param1=unused, param2=unused
140 | DBG_SCRIPT_RUN, // param1=int destline, param2=unused
141 | DBG_SCRIPT_STEP, // param1=unused, param2=unused
142 | DBG_SCRIPT_BPTOGGLE, // param1=int line, param2=unused
143 | DBG_SCRIPT_BPGET, // param1=int line, param2=unused
144 | DBG_SCRIPT_CMDEXEC, // param1=const char* command, param2=unused
145 | DBG_SCRIPT_ABORT, // param1=unused, param2=unused
146 | DBG_SCRIPT_GETLINETYPE, // param1=int line, param2=unused
147 | DBG_SCRIPT_SETIP, // param1=int line, param2=unused
148 | DBG_SCRIPT_GETBRANCHINFO, // param1=int line, param2=SCRIPTBRANCH* info
149 | DBG_SYMBOL_ENUM, // param1=SYMBOLCBINFO* cbInfo, param2=unused
150 | DBG_ASSEMBLE_AT, // param1=duint addr, param2=const char* instruction
151 | DBG_MODBASE_FROM_NAME, // param1=const char* modname, param2=unused
152 | DBG_DISASM_AT, // param1=duint addr, param2=DISASM_INSTR* instr
153 | DBG_STACK_COMMENT_GET, // param1=duint addr, param2=STACK_COMMENT* comment
154 | DBG_GET_THREAD_LIST, // param1=THREADALLINFO* list, param2=unused
155 | DBG_SETTINGS_UPDATED, // param1=unused, param2=unused
156 | DBG_DISASM_FAST_AT, // param1=duint addr, param2=BASIC_INSTRUCTION_INFO* basicinfo
157 | DBG_MENU_ENTRY_CLICKED // param1=int hEntry, param2=unused
158 | );
159 |
160 | SCRIPTLINETYPE = (
161 | linecommand,
162 | linebranch,
163 | linelabel,
164 | linecomment,
165 | lineempty
166 | );
167 |
168 | SCRIPTBRANCHTYPE = (
169 | scriptnobranch,
170 | scriptjmp,
171 | scriptjnejnz,
172 | scriptjejz,
173 | scriptjbjl,
174 | scriptjajg,
175 | scriptjbejle,
176 | scriptjaejge,
177 | scriptcall
178 | );
179 |
180 | DISASM_INSTRTYPE = (
181 | instr_normal,
182 | instr_branch,
183 | instr_stack
184 | );
185 |
186 | DISASM_ARGTYPE = (
187 | arg_normal,
188 | arg_memory
189 | );
190 |
191 | STRING_TYPE = (
192 | str_none,
193 | str_ascii,
194 | str_unicode
195 | );
196 |
197 | THREADPRIORITY = (
198 | PriorityIdle = -15,
199 | PriorityAboveNormal = 1,
200 | PriorityBelowNormal = -1,
201 | PriorityHighest = 2,
202 | PriorityLowest = -2,
203 | PriorityNormal = 0,
204 | PriorityTimeCritical = 15,
205 | PriorityUnknown = $7FFFFFFF
206 | );
207 |
208 | THREADWAITREASON = (
209 | Executive = 0,
210 | FreePage = 1,
211 | PageIn = 2,
212 | PoolAllocation = 3,
213 | DelayExecution = 4,
214 | Suspended = 5,
215 | UserRequest = 6,
216 | WrExecutive = 7,
217 | WrFreePage = 8,
218 | WrPageIn = 9,
219 | WrPoolAllocation = 10,
220 | WrDelayExecution = 11,
221 | WrSuspended = 12,
222 | WrUserRequest = 13,
223 | WrEventPair = 14,
224 | WrQueue = 15,
225 | WrLpcReceive = 16,
226 | WrLpcReply = 17,
227 | WrVirtualMemory = 18,
228 | WrPageOut = 19,
229 | WrRendezvous = 20,
230 | Spare2 = 21,
231 | Spare3 = 22,
232 | Spare4 = 23,
233 | Spare5 = 24,
234 | WrCalloutStack = 25,
235 | WrKernel = 26,
236 | WrResource = 27,
237 | WrPushLock = 28,
238 | WrMutex = 29,
239 | WrQuantumEnd = 30,
240 | WrDispatchInt = 31,
241 | WrPreempted = 32,
242 | WrYieldExecution = 33,
243 | WrFastMutex = 34,
244 | WrGuardedMutex = 35,
245 | WrRundown = 36
246 | );
247 |
248 | MEMORY_SIZE =(
249 | size_byte,
250 | size_word,
251 | size_dword,
252 | size_qword
253 | );
254 |
255 | //const
256 | //Debugger typedefs
257 | //VALUE_SIZE = MEMORY_SIZE;
258 |
259 | Type
260 |
261 | SYM_TYPE = (
262 | SymNone,
263 | SymCoff,
264 | SymCv,
265 | SymPdb,
266 | SymExport,
267 | SymDeferred,
268 | SymSym, // .sym file
269 | SymDia,
270 | SymVirtual,
271 | NumSymTypes
272 | );
273 |
274 | GUID = packed record
275 | Data1: DWord; //4
276 | Data2: WORD; //2
277 | Data3: WORD; //2
278 | Data4:array[0..8-1] of Byte;//8
279 | end;
280 |
281 | PIMAGEHLP_MODULE = ^IMAGEHLP_MODULE;
282 | IMAGEHLP_MODULE = packed record
283 | SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE)
284 | BaseOfImage: DWORD; // base load address of module
285 | ImageSize: DWORD; // virtual size of the loaded module
286 | TimeDateStamp: DWORD; // date/time stamp from pe header
287 | CheckSum: DWORD; // checksum from the pe header
288 | NumSyms: DWORD; // number of symbols in the symbol table
289 | SymType: SYM_TYPE; // type of symbols loaded
290 | ModuleName:array[0..32-1] of AnsiChar; // module name
291 | ImageName:array[0..255-1] of AnsiChar; // image name
292 | LoadedImageName:array[0..255-1] of AnsiChar; // symbol file name
293 | end;
294 |
295 | PIMAGEHLP_MODULE64 = ^IMAGEHLP_MODULE64;
296 | IMAGEHLP_MODULE64 = packed record
297 | SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE64)
298 | BaseOfImage: int64; // base load address of module
299 | ImageSize: DWORD; // virtual size of the loaded module
300 | TimeDateStamp: DWORD; // date/time stamp from pe header
301 | CheckSum: DWORD; // checksum from the pe header
302 | NumSyms: DWORD; // number of symbols in the symbol table
303 | SymType: SYM_TYPE; // type of symbols loaded
304 | ModuleName:array[0..32-1] of ACHAR; // module name
305 | ImageName:array[0..256-1] of ACHAR; // image name
306 | LoadedImageName:array[0..256-1] of ACHAR; // symbol file name
307 | // new elements: 07-Jun-2002
308 | LoadedPdbName:array[0..256-1] of ACHAR; // pdb file name
309 | CVSig: DWORD; // Signature of the CV record in the debug directories
310 | CVData:array[0..(MAX_PATH * 3)-1] of ACHAR; // Contents of the CV record
311 | PdbSig:DWORD; // Signature of PDB
312 | PdbSig70: GUID; // Signature of PDB (VC 7 and up)
313 | PdbAge: DWORD; // DBI age of pdb
314 | PdbUnmatched: LongBool; // loaded an unmatched pdb
315 | DbgUnmatched: LongBool; // loaded an unmatched dbg
316 | LineNumbers: LongBool; // we have line number information
317 | GlobalSymbols: LongBool; // we have internal symbol information
318 | TypeInfo: LongBool; // we have type information
319 | // new elements: 17-Dec-2003
320 | SourceIndexed: LongBool; // pdb supports source server
321 | Publics: LongBool; // contains public symbols
322 | end;
323 |
324 | PIMAGEHLP_MODULEW64 = ^IMAGEHLP_MODULEW64;
325 | IMAGEHLP_MODULEW64 = packed record
326 | SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE64)
327 | BaseOfImage: Int64; // base load address of module
328 | ImageSize: DWORD; // virtual size of the loaded module
329 | TimeDateStamp: DWORD; // date/time stamp from pe header
330 | CheckSum: DWORD; // checksum from the pe header
331 | NumSyms: DWORD; // number of symbols in the symbol table
332 | SymType: SYM_TYPE; // type of symbols loaded
333 | ModuleName:array[0..32-1] of WCHAR; // module name
334 | ImageName:array[0..256-1] of WCHAR; // image name
335 | LoadedImageName:array[0..256-1] of WCHAR; // symbol file name
336 | // new elements: 07-Jun-2002
337 | LoadedPdbName:array[0..256-1] of WCHAR; // pdb file name
338 | CVSig: DWORD; // Signature of the CV record in the debug directories
339 | CVData:array[0..(MAX_PATH * 3)-1] of WCHAR; // Contents of the CV record
340 | PdbSig: DWORD; // Signature of PDB
341 | PdbSig70: GUID; // Signature of PDB (VC 7 and up)
342 | PdbAge: DWORD; // DBI age of pdb
343 | PdbUnmatched: LongBool; // loaded an unmatched pdb
344 | DbgUnmatched: LongBool; // loaded an unmatched dbg
345 | LineNumbers: LongBool; // we have line number information
346 | GlobalSymbols: LongBool; // we have internal symbol information
347 | TypeInfo: LongBool; // we have type information
348 | // new elements: 17-Dec-2003
349 | SourceIndexed: LongBool; // pdb supports source server
350 | Publics: LongBool; // contains public symbols
351 | end;
352 |
353 | PSYMBOLINFO = ^SYMBOLCBINFO;
354 | //typedef void (*CBSYMBOLENUM)(SYMBOLINFO* symbol, void* user);
355 | CBSYMBOLENUM = procedure(symbol: PSYMBOLINFO;user: Pointer);
356 |
357 | //Debugger structs
358 | PMEMPAGE = ^MEMPAGE;
359 | MEMPAGE = packed record
360 | mbi: MEMORY_BASIC_INFORMATION;
361 | info:array[0..MAX_MODULE_SIZE-1] of AChar;
362 | end;
363 |
364 | PMEMMAP = ^MEMMAP;
365 | MEMMAP = packed record
366 | count: Integer;
367 | page: PMEMPAGE;
368 | end;
369 |
370 | PBRIDGEBP = ^BRIDGEBP;
371 | BRIDGEBP = packed record
372 | bptype: BPXTYPE;
373 | addr: duint;
374 | enabled,
375 | singleshoot,
376 | active: Boolean;
377 | name:array[0..MAX_BREAKPOINT_SIZE-1] of AChar;
378 | module:array[0..MAX_MODULE_SIZE-1] of AChar;
379 | slot: WORD;
380 | end;
381 |
382 | PBPMAP = ^BPMAP;
383 | BPMAP = Packed record
384 | count: Integer;
385 | bp: PBRIDGEBP;
386 | end;
387 |
388 | PslFUNCTION = ^slFUNCTION;
389 | slFUNCTION = packed record
390 | start,
391 | slend: duint;
392 | end;
393 |
394 | PADDRINFO = ^ADDRINFO;
395 | ADDRINFO = packed record
396 | flags: Integer; //ADDRINFOFLAGS
397 | module:array[0..MAX_MODULE_SIZE-1] of AChar; //module the address is in
398 | ilabel:array[0..MAX_LABEL_SIZE-1] of AChar;
399 | comment:array[0..MAX_COMMENT_SIZE-1] of AChar;
400 | isbookmark: Boolean;
401 | ifunction: slFUNCTION;
402 | end;
403 |
404 | //PSYMBOLINFO = ^SYMBOLINFO;
405 | SYMBOLINFO = packed record
406 | addr: duint;
407 | decoratedSymbol: PAChar;
408 | undecoratedSymbol: PAChar;
409 | end;
410 |
411 | PSYMBOLMODULEINFO = ^SYMBOLMODULEINFO;
412 | SYMBOLMODULEINFO = packed record
413 | base: duint;
414 | name:array[0..MAX_MODULE_SIZE-1] of AChar;
415 | end;
416 |
417 | PSYMBOLCBINFO = ^SYMBOLCBINFO;
418 | SYMBOLCBINFO = packed record
419 | base: duint ;
420 | cbSymbolEnum: CBSYMBOLENUM;
421 | user: Pointer;
422 | end;
423 |
424 | PFLAGS = ^FLAGS;
425 | FLAGS = packed record
426 | c,
427 | p,
428 | a,
429 | z,
430 | s,
431 | t,
432 | i,
433 | d,
434 | o: BOOL;
435 | end;
436 |
437 | PREGDUMP = ^REGDUMP;
438 | REGDUMP = packed record
439 | cax,
440 | ccx,
441 | cdx,
442 | cbx,
443 | csp,
444 | cbp,
445 | csi,
446 | cdi: duint;
447 | {$IFDEF WIN64}
448 | r8,
449 | r9,
450 | r10,
451 | r11,
452 | r12,
453 | r13,
454 | r14,
455 | r15: duint;
456 | {$ELSE} //WIN64
457 | cip: duint;
458 | eflags: Cardinal;
459 | flags: FLAGS;
460 | gs,
461 | fs,
462 | es,
463 | ds,
464 | cs,
465 | ss: WORD;
466 | dr0,
467 | dr1,
468 | dr2,
469 | dr3,
470 | dr6,
471 | dr7: duint;
472 | {$ENDIF}
473 | end;
474 |
475 | PDISASM_ARG = ^DISASM_ARG;
476 | DISASM_ARG = packed record
477 | distype:DISASM_ARGTYPE;
478 | segment: SEGMENTREG;
479 | mnemonic:array[0..64-1] of AChar;
480 | constant,
481 | value,
482 | memvalue: duint;
483 | end;
484 |
485 | PDISASM_INSTR = ^DISASM_INSTR;
486 | DISASM_INSTR = packed record
487 | instruction:array[0..64-1] of AChar;
488 | distype: DISASM_INSTRTYPE;
489 | argcount,
490 | instr_size: Integer;
491 | arg:array[0..3-1] of DISASM_ARG;
492 | end;
493 |
494 | PSTACK_COMMENT = ^STACK_COMMENT;
495 | STACK_COMMENT = packed record
496 | color:array[0..8-1] of AChar; //hex color-code
497 | comment:array[0..MAX_COMMENT_SIZE-1] of AChar;
498 | end;
499 |
500 | PTHREADINFO = ^THREADINFO;
501 | THREADINFO = packed record
502 | ThreadNumber: Integer;
503 | hThread: THANDLE;
504 | dwThreadId: DWORD;
505 | ThreadStartAddress,
506 | ThreadLocalBase: duint;
507 | end;
508 |
509 | PTHREADALLINFO = ^THREADALLINFO;
510 | THREADALLINFO = packed record
511 | BasicInfo: THREADINFO;
512 | ThreadCip: duint;
513 | SuspendCount: DWORD;
514 | Priority:THREADPRIORITY;
515 | WaitReason: THREADWAITREASON;
516 | LastError: DWORD;
517 | end;
518 |
519 | PTHREADLIST = ^THREADLIST;
520 | THREADLIST = packed record
521 | count: Integer;
522 | list: PTHREADALLINFO;
523 | CurrentThread: Integer;
524 | end;
525 |
526 | PMEMORY_INFO = ^MEMORY_INFO;
527 | MEMORY_INFO = packed record
528 | value: ULONG_PTR; //displacement / addrvalue (rip-relative)
529 | size: MEMORY_SIZE; //byte/word/dword/qword
530 | mnemonic:array[0..MAX_MNEMONIC_SIZE-1] of AChar;
531 | end;
532 |
533 | PVALUE_INFO = ^VALUE_INFO;
534 | VALUE_INFO = packed record
535 | value: ULONG_PTR;
536 | size: MEMORY_SIZE{VALUE_SIZE};
537 | end;
538 |
539 | PBASIC_INSTRUCTION_INFO = ^BASIC_INSTRUCTION_INFO;
540 | BASIC_INSTRUCTION_INFO = packed record
541 | biitype: DWORD; //value|memory|addr
542 | value: VALUE_INFO; //immediat
543 | memory:MEMORY_INFO;
544 | addr:ULONG_PTR; //addrvalue (jumps + calls)
545 | branch: Boolean; //jumps/calls
546 | end;
547 |
548 | PSCRIPTBRANCH = ^SCRIPTBRANCH;
549 | SCRIPTBRANCH = packed record
550 | scbtype: SCRIPTBRANCHTYPE;
551 | dest: Integer;
552 | branchlabel:array[0..256-1] of AChar;
553 | end;
554 |
555 | //Debugger functions
556 | {BRIDGE_IMPEXP char*} function DbgInit(): PAChar; cdecl; external x32_BRIDGE;
557 | {BRIDGE_IMPEXP bool} function DbgMemRead(va:duint;dest: PByte;size: duint): Boolean; cdecl; external x32_BRIDGE;
558 | {BRIDGE_IMPEXP bool} function DbgMemWrite(va: duint; const src: PByte;size: duint): Boolean; cdecl; external x32_BRIDGE;
559 | {BRIDGE_IMPEXP duint} function DbgMemGetPageSize(base: duint): duint; cdecl; external x32_BRIDGE;
560 | {BRIDGE_IMPEXP duint} function DbgMemFindBaseAddr(addr: duint;size: Pduint): duint; cdecl; external x32_BRIDGE;
561 | {BRIDGE_IMPEXP bool} function DbgCmdExec(const cmd: PAChar): Boolean; cdecl; external x32_BRIDGE;
562 | {BRIDGE_IMPEXP bool} function DbgCmdExecDirect(const cmd: PAChar): Boolean; cdecl; external x32_BRIDGE;
563 | {BRIDGE_IMPEXP bool} function DbgMemMap(memmap: PMEMMAP): Boolean; cdecl; external x32_BRIDGE;
564 | {BRIDGE_IMPEXP bool} function DbgIsValidExpression(const expression: PAChar): Boolean; cdecl; external x32_BRIDGE;
565 | {BRIDGE_IMPEXP bool} function DbgIsDebugging(): Boolean; cdecl; external x32_BRIDGE;
566 | {BRIDGE_IMPEXP bool} function DbgIsJumpGoingToExecute(addr: duint): Boolean; cdecl; external x32_BRIDGE;
567 | {BRIDGE_IMPEXP bool} function DbgGetLabelAt(addr: duint;segment:SEGMENTREG;text: PAChar): Boolean; cdecl; external x32_BRIDGE;
568 | {BRIDGE_IMPEXP bool} function DbgSetLabelAt(addr: duint; const text: PAChar): Boolean; cdecl; external x32_BRIDGE;
569 | {BRIDGE_IMPEXP bool} function DbgGetCommentAt(addr: duint;text: PAChar): Boolean; cdecl; external x32_BRIDGE;
570 | {BRIDGE_IMPEXP bool} function DbgSetCommentAt(addr:duint; const text: PAChar): Boolean; cdecl; external x32_BRIDGE;
571 | {BRIDGE_IMPEXP bool} function DbgGetBookmarkAt(addr: duint): Boolean; cdecl; external x32_BRIDGE;
572 | {BRIDGE_IMPEXP bool} function DbgSetBookmarkAt(addr: duint;isbookmark: Boolean): Boolean; cdecl; external x32_BRIDGE;
573 | {BRIDGE_IMPEXP bool} function DbgGetModuleAt(addr: duint;text: PAChar): Boolean; cdecl; external x32_BRIDGE;
574 | {BRIDGE_IMPEXP BPXTYPE} function DbgGetBpxTypeAt(addr: duint): BPXTYPE; cdecl; external x32_BRIDGE;
575 | {BRIDGE_IMPEXP duint} function DbgValFromString(const szstring: PAChar): duint; cdecl; external x32_BRIDGE;
576 | {BRIDGE_IMPEXP bool} function DbgGetRegDump(regdump: PREGDUMP): Boolean; cdecl; external x32_BRIDGE;
577 | {BRIDGE_IMPEXP bool} function DbgValToString(const szstring: PAChar;value: duint): Boolean; cdecl; external x32_BRIDGE;
578 | {BRIDGE_IMPEXP bool} function DbgMemIsValidReadPtr(addr: duint): Boolean; cdecl; external x32_BRIDGE;
579 | {BRIDGE_IMPEXP int} function DbgGetBpList(bptype:BPXTYPE;list: PBPMAP): Integer; cdecl; external x32_BRIDGE;
580 | {BRIDGE_IMPEXP FUNCTYPE}function DbgGetFunctionTypeAt(addr: duint): FUNCTYPE; cdecl; external x32_BRIDGE;
581 | {BRIDGE_IMPEXP LOOPTYPE}function DbgGetLoopTypeAt(addr: duint;depth: Integer): LOOPTYPE; cdecl; external x32_BRIDGE;
582 | {BRIDGE_IMPEXP duint} function DbgGetBranchDestination(addr: duint): duint; cdecl; external x32_BRIDGE;
583 | {BRIDGE_IMPEXP bool} function DbgFunctionOverlaps(fOstart: duint;fOend: duint): Boolean; cdecl; external x32_BRIDGE;
584 | {BRIDGE_IMPEXP bool} function DbgFunctionGet(addr: duint;fGstart: Pduint; fGend: pduint): Boolean; cdecl; external x32_BRIDGE;
585 | {BRIDGE_IMPEXP void} procedure DbgScriptLoad(const filename: PAChar); cdecl; external x32_BRIDGE;
586 | {BRIDGE_IMPEXP void} procedure DbgScriptUnload(); cdecl; external x32_BRIDGE;
587 | {BRIDGE_IMPEXP void} procedure DbgScriptRun(destline: Integer); cdecl; external x32_BRIDGE;
588 | {BRIDGE_IMPEXP void} procedure DbgScriptStep(); cdecl; external x32_BRIDGE;
589 | {BRIDGE_IMPEXP bool} function DbgScriptBpToggle(line: Integer): Boolean; cdecl; external x32_BRIDGE;
590 | {BRIDGE_IMPEXP bool} function DbgScriptBpGet(line: Integer): Boolean; cdecl; external x32_BRIDGE;
591 | {BRIDGE_IMPEXP bool} function DbgScriptCmdExec(const command: PAChar): Boolean; cdecl; external x32_BRIDGE;
592 | {BRIDGE_IMPEXP void} procedure DbgScriptAbort(); cdecl; external x32_BRIDGE;
593 | {BRIDGE_IMPEXP SCRIPTLINETYPE}function DbgScriptGetLineType(line: Integer): SCRIPTLINETYPE; cdecl; external x32_BRIDGE;
594 | {BRIDGE_IMPEXP void} procedure DbgScriptSetIp(line: Integer); cdecl; external x32_BRIDGE;
595 | {BRIDGE_IMPEXP bool} function DbgScriptGetBranchInfo(line: Integer;info: PSCRIPTBRANCH): Boolean; cdecl; external x32_BRIDGE;
596 | {BRIDGE_IMPEXP void} procedure DbgSymbolEnum(base: duint;cbSymbolEnum: CBSYMBOLENUM;user: Pointer); cdecl; external x32_BRIDGE;
597 | {BRIDGE_IMPEXP bool} function DbgAssembleAt(addr: duint; const instruction: PAChar): Boolean; cdecl; external x32_BRIDGE;
598 | {BRIDGE_IMPEXP duint} function DbgModBaseFromName(const name: PAChar): duint; cdecl; external x32_BRIDGE;
599 | {BRIDGE_IMPEXP void} procedure DbgDisasmAt(addr: duint;instr: PDISASM_INSTR); cdecl; external x32_BRIDGE;
600 | {BRIDGE_IMPEXP bool} function DbgStackCommentGet(addr: duint;comment: PSTACK_COMMENT):Boolean; cdecl; external x32_BRIDGE;
601 | {BRIDGE_IMPEXP void} procedure DbgGetThreadList(list: PTHREADLIST); cdecl; external x32_BRIDGE;
602 | {BRIDGE_IMPEXP void} procedure DbgSettingsUpdated(); cdecl; external x32_BRIDGE;
603 | {BRIDGE_IMPEXP void} procedure DbgDisasmFastAt(addr: duint; basicinfo: PBASIC_INSTRUCTION_INFO); cdecl; external x32_BRIDGE;
604 | {BRIDGE_IMPEXP void} procedure DbgMenuEntryClicked(hEntry: Integer); cdecl; external x32_BRIDGE;
605 |
606 | Const
607 | //Gui defines
608 | GUI_PLUGIN_MENU = 0;
609 | GUI_DISASSEMBLY = 0;
610 | GUI_DUMP = 1;
611 | GUI_STACK = 2;
612 |
613 | GUI_MAX_LINE_SIZE = 65536;
614 |
615 | Type
616 | //Gui enums
617 | GUIMSG = (
618 | GUI_DISASSEMBLE_AT, // param1=(duint)va, param2=(duint)cip
619 | GUI_SET_DEBUG_STATE, // param1=(DBGSTATE)state, param2=unused
620 | GUI_ADD_MSG_TO_LOG, // param1=(const char*)msg, param2=unused
621 | GUI_CLEAR_LOG, // param1=unused, param2=unused
622 | GUI_UPDATE_REGISTER_VIEW, // param1=unused, param2=unused
623 | GUI_UPDATE_DISASSEMBLY_VIEW, // param1=unused, param2=unused
624 | GUI_UPDATE_BREAKPOINTS_VIEW, // param1=unused, param2=unused
625 | GUI_UPDATE_WINDOW_TITLE, // param1=(const char*)file, param2=unused
626 | GUI_GET_WINDOW_HANDLE, // param1=unused, param2=unused
627 | GUI_DUMP_AT, // param1=(duint)va param2=unused
628 | GUI_SCRIPT_ADD, // param1=int count, param2=const char** lines
629 | GUI_SCRIPT_CLEAR, // param1=unused, param2=unused
630 | GUI_SCRIPT_SETIP, // param1=int line, param2=unused
631 | GUI_SCRIPT_ERROR, // param1=int line, param2=const char* message
632 | GUI_SCRIPT_SETTITLE, // param1=const char* title, param2=unused
633 | GUI_SCRIPT_SETINFOLINE, // param1=int line, param2=const char* info
634 | GUI_SCRIPT_MESSAGE, // param1=const char* message, param2=unused
635 | GUI_SCRIPT_MSGYN, // param1=const char* message, param2=unused
636 | GUI_SYMBOL_LOG_ADD, // param1(const char*)msg, param2=unused
637 | GUI_SYMBOL_LOG_CLEAR, // param1=unused, param2=unused
638 | GUI_SYMBOL_SET_PROGRESS, // param1=int percent param2=unused
639 | GUI_SYMBOL_UPDATE_MODULE_LIST, // param1=int count, param2=SYMBOLMODULEINFO* modules
640 | GUI_REF_ADDCOLUMN, // param1=int width, param2=(const char*)title
641 | GUI_REF_SETROWCOUNT, // param1=int rows, param2=unused
642 | GUI_REF_GETROWCOUNT, // param1=unused, param2=unused
643 | GUI_REF_DELETEALLCOLUMNS, // param1=unused, param2=unused
644 | GUI_REF_SETCELLCONTENT, // param1=(CELLINFO*)info, param2=unused
645 | GUI_REF_GETCELLCONTENT, // param1=int row, param2=int col
646 | GUI_REF_RELOADDATA, // param1=unused, param2=unused
647 | GUI_REF_SETSINGLESELECTION, // param1=int index, param2=bool scroll
648 | GUI_REF_SETPROGRESS, // param1=int progress, param2=unused
649 | GUI_REF_SETSEARCHSTARTCOL, // param1=int col param2=unused
650 | GUI_STACK_DUMP_AT, // param1=duint addr, param2=duint csp
651 | GUI_UPDATE_DUMP_VIEW, // param1=unused, param2=unused
652 | GUI_UPDATE_THREAD_VIEW, // param1=unused, param2=unused
653 | GUI_ADD_RECENT_FILE, // param1=(const char*)file, param2=unused
654 | GUI_SET_LAST_EXCEPTION, // param1=unsigned int code, param2=unused
655 | GUI_GET_DISASSEMBLY, // param1=duint addr, param2=char* text
656 | GUI_MENU_ADD, // param1=int hMenu, param2=const char* title
657 | GUI_MENU_ADD_ENTRY, // param1=int hMenu, param2=const char* title
658 | GUI_MENU_ADD_SEPARATOR, // param1=int hMenu, param2=unused
659 | GUI_MENU_CLEAR, // param1=int hMenu, param2=unused
660 | GUI_SELECTION_GET, // param1=int hWindow, param2=SELECTIONDATA* selection
661 | GUI_SELECTION_SET, // param1=int hWindow, param2=const SELECTIONDATA* selection
662 | GUI_GETLINE_WINDOW // param1=const char* title, param2=char* text
663 | );
664 |
665 | //GUI structures
666 | PCELLINFO = ^CELLINFO;
667 | CELLINFO = packed record
668 | row,
669 | col: Integer;
670 | str: PAChar;
671 | end;
672 |
673 | PSELECTIONDATA = ^SELECTIONDATA;
674 | SELECTIONDATA = packed record
675 | adrstart,
676 | adrend: duint;
677 | end;
678 |
679 | //GUI functions
680 | {BRIDGE_IMPEXP void} procedure GuiDisasmAt(addr: duint;cip: duint); cdecl; external x32_BRIDGE;
681 | {BRIDGE_IMPEXP void} procedure GuiSetDebugState(state: DBGSTATE); cdecl; external x32_BRIDGE;
682 | {BRIDGE_IMPEXP void} procedure GuiAddLogMessage(const msg: PAChar); cdecl; external x32_BRIDGE;
683 | {BRIDGE_IMPEXP void} procedure GuiLogClear(); cdecl; external x32_BRIDGE;
684 | {BRIDGE_IMPEXP void} procedure GuiUpdateAllViews(); cdecl; external x32_BRIDGE;
685 | {BRIDGE_IMPEXP void} procedure GuiUpdateRegisterView(); cdecl; external x32_BRIDGE;
686 | {BRIDGE_IMPEXP void} procedure GuiUpdateDisassemblyView(); cdecl; external x32_BRIDGE;
687 | {BRIDGE_IMPEXP void} procedure GuiUpdateBreakpointsView(); cdecl; external x32_BRIDGE;
688 | {BRIDGE_IMPEXP void} procedure GuiUpdateWindowTitle(const filename: PACHar); cdecl; external x32_BRIDGE;
689 | {BRIDGE_IMPEXP HWND} function GuiGetWindowHandle(): HWND; cdecl; external x32_BRIDGE;
690 | {BRIDGE_IMPEXP void} procedure GuiDumpAt(va: duint); cdecl; external x32_BRIDGE;
691 | {BRIDGE_IMPEXP void} procedure GuiScriptAdd(count: Integer; const lines: PPAnsiChar); cdecl; external x32_BRIDGE;
692 | {BRIDGE_IMPEXP void} procedure GuiScriptClear(); cdecl; external x32_BRIDGE;
693 | {BRIDGE_IMPEXP void} procedure GuiScriptSetIp(line: Integer); cdecl; external x32_BRIDGE;
694 | {BRIDGE_IMPEXP void} procedure GuiScriptError(line: Integer; const szmessage: PAChar); cdecl; external x32_BRIDGE;
695 | {BRIDGE_IMPEXP void} procedure GuiScriptSetTitle(const title: PAChar); cdecl; external x32_BRIDGE;
696 | {BRIDGE_IMPEXP void} procedure GuiScriptSetInfoLine(line: integer; const info: PAChar); cdecl; external x32_BRIDGE;
697 | {BRIDGE_IMPEXP void} procedure GuiScriptMessage(const szmessage: PAChar); cdecl; external x32_BRIDGE;
698 | {BRIDGE_IMPEXP int} function GuiScriptMsgyn(const szmessage: PAChar): integer; cdecl; external x32_BRIDGE;
699 | {BRIDGE_IMPEXP void} procedure GuiSymbolLogAdd(const szmessage: PAChar); cdecl; external x32_BRIDGE;
700 | {BRIDGE_IMPEXP void} procedure GuiSymbolLogClear(); cdecl; external x32_BRIDGE;
701 | {BRIDGE_IMPEXP void} procedure GuiSymbolSetProgress(percent: Integer); cdecl; external x32_BRIDGE;
702 | {BRIDGE_IMPEXP void} procedure GuiSymbolUpdateModuleList(count: integer;modules: PSYMBOLMODULEINFO); cdecl; external x32_BRIDGE;
703 | {BRIDGE_IMPEXP void} procedure GuiReferenceAddColumn(width: Integer; const title: PAChar); cdecl; external x32_BRIDGE;
704 | {BRIDGE_IMPEXP void} procedure GuiReferenceSetRowCount(count: Integer); cdecl; external x32_BRIDGE;
705 | {BRIDGE_IMPEXP int} function GuiReferenceGetRowCount(): Integer; cdecl; external x32_BRIDGE;
706 | {BRIDGE_IMPEXP void} procedure GuiReferenceDeleteAllColumns(); cdecl; external x32_BRIDGE;
707 | {BRIDGE_IMPEXP void} procedure GuiReferenceSetCellContent(row: Integer;col: Integer; const st: PAChar); cdecl; external x32_BRIDGE;
708 | {BRIDGE_IMPEXP char*} function GuiReferenceGetCellContent(row: Integer;col: Integer): PAChar; cdecl; external x32_BRIDGE;
709 | {BRIDGE_IMPEXP void} procedure GuiReferenceReloadData(); cdecl; external x32_BRIDGE;
710 | {BRIDGE_IMPEXP void} procedure GuiReferenceSetSingleSelection(index: Integer;scroll: Boolean); cdecl; external x32_BRIDGE;
711 | {BRIDGE_IMPEXP void} procedure GuiReferenceSetProgress(progress: Integer); cdecl; external x32_BRIDGE;
712 | {BRIDGE_IMPEXP void} procedure GuiReferenceSetSearchStartCol(col: Integer); cdecl; external x32_BRIDGE;
713 | {BRIDGE_IMPEXP void} procedure GuiStackDumpAt(addr: duint;csp: duint); cdecl; external x32_BRIDGE;
714 | {BRIDGE_IMPEXP void} procedure GuiUpdateDumpView(); cdecl; external x32_BRIDGE;
715 | {BRIDGE_IMPEXP void} procedure GuiUpdateThreadView(); cdecl; external x32_BRIDGE;
716 | {BRIDGE_IMPEXP void} procedure GuiAddRecentFile(const filename: PAChar); cdecl; external x32_BRIDGE;
717 | {BRIDGE_IMPEXP void} procedure GuiSetLastException(exception: LongWord); cdecl; external x32_BRIDGE;
718 | {BRIDGE_IMPEXP bool} function GuiGetDisassembly(addr: duint;text: PAChar): Boolean; cdecl; external x32_BRIDGE;
719 | {BRIDGE_IMPEXP int} function GuiMenuAdd(hMenu: Integer; const title: PAChar): Integer; cdecl; external x32_BRIDGE;
720 | {BRIDGE_IMPEXP int} function GuiMenuAddEntry(hMenu: Integer; const title: PAChar): Integer; cdecl; external x32_BRIDGE;
721 | {BRIDGE_IMPEXP void} procedure GuiMenuAddSeparator(hMenu: Integer); cdecl; external x32_BRIDGE;
722 | {BRIDGE_IMPEXP void} procedure GuiMenuClear(hMenu: Integer); cdecl; external x32_BRIDGE;
723 | {BRIDGE_IMPEXP bool} function GuiSelectionGet(hWindow: Integer;selection: PSELECTIONDATA): Boolean; cdecl; external x32_BRIDGE;
724 | {BRIDGE_IMPEXP bool} function GuiSelectionSet(hWindow: Integer;const selection: SELECTIONDATA): Boolean; cdecl; external x32_BRIDGE;
725 | {BRIDGE_IMPEXP bool} function GuiGetLineWindow(const title: PACHar;text: PAChar): Boolean; cdecl; external x32_BRIDGE;
726 |
727 | implementation
728 |
729 | initialization
730 |
731 | end.
732 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # x64_dbg_SDK_Delphi
2 | x64_dbg SDK version 010 in Delphi
3 |
4 | Hi,
5 | A long time ago, i didn't develop any of my Project because i was busy with my job :((
6 | Today, i want to puplic the project "x64_dbg_SDK in Delphi" which was developed in 2 years ago.
7 | I hope someone will be continue my work for the most debuger in the world.
8 |
9 | *** Check newest version by Wuhao13
10 | https://gitee.com/suxuss/DELPHI-x96dbg-Plugins-SDK
11 |
12 | BR,
13 | quygia128
14 |
--------------------------------------------------------------------------------
/pluginsdk_c/TitanEngine/TitanEngine_x64.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/TitanEngine/TitanEngine_x64.a
--------------------------------------------------------------------------------
/pluginsdk_c/TitanEngine/TitanEngine_x64.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/TitanEngine/TitanEngine_x64.lib
--------------------------------------------------------------------------------
/pluginsdk_c/TitanEngine/TitanEngine_x86.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/TitanEngine/TitanEngine_x86.a
--------------------------------------------------------------------------------
/pluginsdk_c/TitanEngine/TitanEngine_x86.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/TitanEngine/TitanEngine_x86.lib
--------------------------------------------------------------------------------
/pluginsdk_c/_plugin_types.h:
--------------------------------------------------------------------------------
1 | #ifndef _PLUGIN_DATA_H
2 | #define _PLUGIN_DATA_H
3 |
4 | #ifdef BUILD_DBG
5 |
6 | #include "_global.h"
7 |
8 | #else
9 |
10 | #ifdef __GNUC__
11 | #include "dbghelp\dbghelp.h"
12 | #else
13 | #include
14 | #endif // __GNUC__
15 |
16 | #ifndef deflen
17 | #define deflen 1024
18 | #endif // deflen
19 |
20 | #include "bridgemain.h"
21 |
22 | #endif // BUILD_DBG
23 |
24 | #endif // _PLUGIN_DATA_H
25 |
--------------------------------------------------------------------------------
/pluginsdk_c/_plugins.h:
--------------------------------------------------------------------------------
1 | #ifndef _PLUGINS_H
2 | #define _PLUGINS_H
3 |
4 | #ifndef PLUG_IMPEXP
5 | #ifdef BUILD_DBG
6 | #define PLUG_IMPEXP __declspec(dllexport)
7 | #else
8 | #define PLUG_IMPEXP __declspec(dllimport)
9 | #endif //BUILD_DBG
10 | #endif //PLUG_IMPEXP
11 |
12 | #include "_plugin_types.h"
13 |
14 | //defines
15 | #define PLUG_SDKVERSION 1
16 |
17 | //structures
18 | struct PLUG_INITSTRUCT
19 | {
20 | //provided by the debugger
21 | int pluginHandle;
22 | //provided by the pluginit function
23 | int sdkVersion;
24 | int pluginVersion;
25 | char pluginName[256];
26 | };
27 |
28 | struct PLUG_SETUPSTRUCT
29 | {
30 | //provided by the debugger
31 | HWND hwndDlg; //gui window handle
32 | int hMenu; //plugin menu handle
33 | };
34 |
35 | //callback structures
36 | struct PLUG_CB_INITDEBUG
37 | {
38 | const char* szFileName;
39 | };
40 |
41 | struct PLUG_CB_STOPDEBUG
42 | {
43 | void* reserved;
44 | };
45 |
46 | struct PLUG_CB_CREATEPROCESS
47 | {
48 | CREATE_PROCESS_DEBUG_INFO* CreateProcessInfo;
49 | IMAGEHLP_MODULE64* modInfo;
50 | const char* DebugFileName;
51 | PROCESS_INFORMATION* fdProcessInfo;
52 | };
53 |
54 | struct PLUG_CB_EXITPROCESS
55 | {
56 | EXIT_PROCESS_DEBUG_INFO* ExitProcess;
57 | };
58 |
59 | struct PLUG_CB_CREATETHREAD
60 | {
61 | CREATE_THREAD_DEBUG_INFO* CreateThread;
62 | DWORD dwThreadId;
63 | };
64 |
65 | struct PLUG_CB_EXITTHREAD
66 | {
67 | EXIT_THREAD_DEBUG_INFO* ExitThread;
68 | DWORD dwThreadId;
69 | };
70 |
71 | struct PLUG_CB_SYSTEMBREAKPOINT
72 | {
73 | void* reserved;
74 | };
75 |
76 | struct PLUG_CB_LOADDLL
77 | {
78 | LOAD_DLL_DEBUG_INFO* LoadDll;
79 | IMAGEHLP_MODULE64* modInfo;
80 | const char* modname;
81 | };
82 |
83 | struct PLUG_CB_UNLOADDLL
84 | {
85 | UNLOAD_DLL_DEBUG_INFO* UnloadDll;
86 | };
87 |
88 | struct PLUG_CB_OUTPUTDEBUGSTRING
89 | {
90 | OUTPUT_DEBUG_STRING_INFO* DebugString;
91 | };
92 |
93 | struct PLUG_CB_EXCEPTION
94 | {
95 | EXCEPTION_DEBUG_INFO* Exception;
96 | };
97 |
98 | struct PLUG_CB_BREAKPOINT
99 | {
100 | BRIDGEBP* breakpoint;
101 | };
102 |
103 | struct PLUG_CB_PAUSEDEBUG
104 | {
105 | void* reserved;
106 | };
107 |
108 | struct PLUG_CB_RESUMEDEBUG
109 | {
110 | void* reserved;
111 | };
112 |
113 | struct PLUG_CB_STEPPED
114 | {
115 | void* reserved;
116 | };
117 |
118 | struct PLUG_CB_ATTACH
119 | {
120 | DWORD dwProcessId;
121 | };
122 |
123 | struct PLUG_CB_DETACH
124 | {
125 | PROCESS_INFORMATION* fdProcessInfo;
126 | };
127 |
128 | struct PLUG_CB_DEBUGEVENT
129 | {
130 | DEBUG_EVENT* DebugEvent;
131 | };
132 |
133 | struct PLUG_CB_MENUENTRY
134 | {
135 | int hEntry;
136 | };
137 |
138 | //enums
139 | enum CBTYPE
140 | {
141 | CB_INITDEBUG, //PLUG_CB_INITDEBUG
142 | CB_STOPDEBUG, //PLUG_CB_STOPDEBUG
143 | CB_CREATEPROCESS, //PLUG_CB_CREATEPROCESS
144 | CB_EXITPROCESS, //PLUG_CB_EXITPROCESS
145 | CB_CREATETHREAD, //PLUG_CB_CREATETHREAD
146 | CB_EXITTHREAD, //PLUG_CB_EXITTHREAD
147 | CB_SYSTEMBREAKPOINT, //PLUG_CB_SYSTEMBREAKPOINT
148 | CB_LOADDLL, //PLUG_CB_LOADDLL
149 | CB_UNLOADDLL, //PLUG_CB_UNLOADDLL
150 | CB_OUTPUTDEBUGSTRING, //PLUG_CB_OUTPUTDEBUGSTRING
151 | CB_EXCEPTION, //PLUG_CB_EXCEPTION
152 | CB_BREAKPOINT, //PLUG_CB_BREAKPOINT
153 | CB_PAUSEDEBUG, //PLUG_CB_PAUSEDEBUG
154 | CB_RESUMEDEBUG, //PLUG_CB_RESUMEDEBUG
155 | CB_STEPPED, //PLUG_CB_STEPPED
156 | CB_ATTACH, //PLUG_CB_ATTACHED (before attaching, after CB_INITDEBUG)
157 | CB_DETACH, //PLUG_CB_DETACH (before detaching, before CB_STOPDEBUG)
158 | CB_DEBUGEVENT, //PLUG_CB_DEBUGEVENT (called on any debug event)
159 | CB_MENUENTRY //PLUG_CB_MENUENTRY
160 | };
161 |
162 | //typedefs
163 | typedef void (*CBPLUGIN)(CBTYPE cbType, void* callbackInfo);
164 | typedef bool (*CBPLUGINCOMMAND)(int, char**);
165 |
166 | //exports
167 | #ifdef __cplusplus
168 | extern "C"
169 | {
170 | #endif
171 |
172 | PLUG_IMPEXP void _plugin_registercallback(int pluginHandle, CBTYPE cbType, CBPLUGIN cbPlugin);
173 | PLUG_IMPEXP bool _plugin_unregistercallback(int pluginHandle, CBTYPE cbType);
174 | PLUG_IMPEXP bool _plugin_registercommand(int pluginHandle, const char* command, CBPLUGINCOMMAND cbCommand, bool debugonly);
175 | PLUG_IMPEXP bool _plugin_unregistercommand(int pluginHandle, const char* command);
176 | PLUG_IMPEXP void _plugin_logprintf(const char* format, ...);
177 | PLUG_IMPEXP void _plugin_logputs(const char* text);
178 | PLUG_IMPEXP void _plugin_debugpause();
179 | PLUG_IMPEXP void _plugin_debugskipexceptions(bool skip);
180 | PLUG_IMPEXP int _plugin_menuadd(int hMenu, const char* title);
181 | PLUG_IMPEXP bool _plugin_menuaddentry(int hMenu, int hEntry, const char* title);
182 | PLUG_IMPEXP bool _plugin_menuaddseparator(int hMenu);
183 | PLUG_IMPEXP bool _plugin_menuclear(int hMenu);
184 |
185 | #ifdef __cplusplus
186 | }
187 | #endif
188 |
189 | #endif // _PLUGINS_H
190 |
--------------------------------------------------------------------------------
/pluginsdk_c/bridgemain.h:
--------------------------------------------------------------------------------
1 | #ifndef _BRIDGEMAIN_H_
2 | #define _BRIDGEMAIN_H_
3 |
4 | #include
5 |
6 | #ifdef _WIN64
7 | typedef unsigned long long duint;
8 | typedef signed long long dsint;
9 | #else
10 | typedef unsigned long duint;
11 | typedef signed long dsint;
12 | #endif //_WIN64
13 |
14 | #ifndef BRIDGE_IMPEXP
15 | #ifdef BUILD_BRIDGE
16 | #define BRIDGE_IMPEXP __declspec(dllexport)
17 | #else
18 | #define BRIDGE_IMPEXP __declspec(dllimport)
19 | #endif //BUILD_BRIDGE
20 | #endif //BRIDGE_IMPEXP
21 |
22 | #ifdef __cplusplus
23 | extern "C"
24 | {
25 | #endif
26 |
27 | //Bridge defines
28 | #define MAX_SETTING_SIZE 65536
29 | #define DBG_VERSION 15
30 |
31 | //Bridge functions
32 | BRIDGE_IMPEXP const char* BridgeInit();
33 | BRIDGE_IMPEXP const char* BridgeStart();
34 | BRIDGE_IMPEXP void* BridgeAlloc(size_t size);
35 | BRIDGE_IMPEXP void BridgeFree(void* ptr);
36 | BRIDGE_IMPEXP bool BridgeSettingGet(const char* section, const char* key, char* value);
37 | BRIDGE_IMPEXP bool BridgeSettingGetUint(const char* section, const char* key, duint* value);
38 | BRIDGE_IMPEXP bool BridgeSettingSet(const char* section, const char* key, const char* value);
39 | BRIDGE_IMPEXP bool BridgeSettingSetUint(const char* section, const char* key, duint value);
40 |
41 | //Debugger defines
42 | #define MAX_LABEL_SIZE 256
43 | #define MAX_COMMENT_SIZE 512
44 | #define MAX_MODULE_SIZE 256
45 | #define MAX_BREAKPOINT_SIZE 256
46 | #define MAX_SCRIPT_LINE_SIZE 2048
47 |
48 | #define TYPE_VALUE 1
49 | #define TYPE_MEMORY 2
50 | #define TYPE_ADDR 4
51 | #define MAX_MNEMONIC_SIZE 64
52 |
53 | //Debugger enums
54 | enum DBGSTATE
55 | {
56 | initialized,
57 | paused,
58 | running,
59 | stopped
60 | };
61 |
62 | enum SEGMENTREG
63 | {
64 | SEG_DEFAULT,
65 | SEG_ES,
66 | SEG_DS,
67 | SEG_FS,
68 | SEG_GS,
69 | SEG_CS,
70 | SEG_SS
71 | };
72 |
73 | enum ADDRINFOFLAGS
74 | {
75 | flagmodule=1,
76 | flaglabel=2,
77 | flagcomment=4,
78 | flagbookmark=8,
79 | flagfunction=16
80 | };
81 |
82 | enum BPXTYPE
83 | {
84 | bp_none=0,
85 | bp_normal=1,
86 | bp_hardware=2,
87 | bp_memory=4
88 | };
89 |
90 | enum FUNCTYPE
91 | {
92 | FUNC_NONE,
93 | FUNC_BEGIN,
94 | FUNC_MIDDLE,
95 | FUNC_END,
96 | FUNC_SINGLE
97 | };
98 |
99 | enum LOOPTYPE
100 | {
101 | LOOP_NONE,
102 | LOOP_BEGIN,
103 | LOOP_MIDDLE,
104 | LOOP_ENTRY,
105 | LOOP_END
106 | };
107 |
108 | enum DBGMSG
109 | {
110 | DBG_SCRIPT_LOAD, // param1=const char* filename, param2=unused
111 | DBG_SCRIPT_UNLOAD, // param1=unused, param2=unused
112 | DBG_SCRIPT_RUN, // param1=int destline, param2=unused
113 | DBG_SCRIPT_STEP, // param1=unused, param2=unused
114 | DBG_SCRIPT_BPTOGGLE, // param1=int line, param2=unused
115 | DBG_SCRIPT_BPGET, // param1=int line, param2=unused
116 | DBG_SCRIPT_CMDEXEC, // param1=const char* command, param2=unused
117 | DBG_SCRIPT_ABORT, // param1=unused, param2=unused
118 | DBG_SCRIPT_GETLINETYPE, // param1=int line, param2=unused
119 | DBG_SCRIPT_SETIP, // param1=int line, param2=unused
120 | DBG_SCRIPT_GETBRANCHINFO, // param1=int line, param2=SCRIPTBRANCH* info
121 | DBG_SYMBOL_ENUM, // param1=SYMBOLCBINFO* cbInfo, param2=unused
122 | DBG_ASSEMBLE_AT, // param1=duint addr, param2=const char* instruction
123 | DBG_MODBASE_FROM_NAME, // param1=const char* modname, param2=unused
124 | DBG_DISASM_AT, // param1=duint addr, param2=DISASM_INSTR* instr
125 | DBG_STACK_COMMENT_GET, // param1=duint addr, param2=STACK_COMMENT* comment
126 | DBG_GET_THREAD_LIST, // param1=THREADALLINFO* list, param2=unused
127 | DBG_SETTINGS_UPDATED, // param1=unused, param2=unused
128 | DBG_DISASM_FAST_AT, // param1=duint addr, param2=BASIC_INSTRUCTION_INFO* basicinfo
129 | DBG_MENU_ENTRY_CLICKED // param1=int hEntry, param2=unused
130 | };
131 |
132 | enum SCRIPTLINETYPE
133 | {
134 | linecommand,
135 | linebranch,
136 | linelabel,
137 | linecomment,
138 | lineempty,
139 | };
140 |
141 | enum SCRIPTBRANCHTYPE
142 | {
143 | scriptnobranch,
144 | scriptjmp,
145 | scriptjnejnz,
146 | scriptjejz,
147 | scriptjbjl,
148 | scriptjajg,
149 | scriptjbejle,
150 | scriptjaejge,
151 | scriptcall
152 | };
153 |
154 | enum DISASM_INSTRTYPE
155 | {
156 | instr_normal,
157 | instr_branch,
158 | instr_stack
159 | };
160 |
161 | enum DISASM_ARGTYPE
162 | {
163 | arg_normal,
164 | arg_memory
165 | };
166 |
167 | enum STRING_TYPE
168 | {
169 | str_none,
170 | str_ascii,
171 | str_unicode
172 | };
173 |
174 | enum THREADPRIORITY
175 | {
176 | PriorityIdle = -15,
177 | PriorityAboveNormal = 1,
178 | PriorityBelowNormal = -1,
179 | PriorityHighest = 2,
180 | PriorityLowest = -2,
181 | PriorityNormal = 0,
182 | PriorityTimeCritical = 15,
183 | PriorityUnknown = 0x7FFFFFFF
184 | };
185 |
186 | enum THREADWAITREASON
187 | {
188 | Executive = 0,
189 | FreePage = 1,
190 | PageIn = 2,
191 | PoolAllocation = 3,
192 | DelayExecution = 4,
193 | Suspended = 5,
194 | UserRequest = 6,
195 | WrExecutive = 7,
196 | WrFreePage = 8,
197 | WrPageIn = 9,
198 | WrPoolAllocation = 10,
199 | WrDelayExecution = 11,
200 | WrSuspended = 12,
201 | WrUserRequest = 13,
202 | WrEventPair = 14,
203 | WrQueue = 15,
204 | WrLpcReceive = 16,
205 | WrLpcReply = 17,
206 | WrVirtualMemory = 18,
207 | WrPageOut = 19,
208 | WrRendezvous = 20,
209 | Spare2 = 21,
210 | Spare3 = 22,
211 | Spare4 = 23,
212 | Spare5 = 24,
213 | WrCalloutStack = 25,
214 | WrKernel = 26,
215 | WrResource = 27,
216 | WrPushLock = 28,
217 | WrMutex = 29,
218 | WrQuantumEnd = 30,
219 | WrDispatchInt = 31,
220 | WrPreempted = 32,
221 | WrYieldExecution = 33,
222 | WrFastMutex = 34,
223 | WrGuardedMutex = 35,
224 | WrRundown = 36,
225 | };
226 |
227 | enum MEMORY_SIZE
228 | {
229 | size_byte,
230 | size_word,
231 | size_dword,
232 | size_qword
233 | };
234 |
235 | //Debugger typedefs
236 | typedef MEMORY_SIZE VALUE_SIZE;
237 | struct SYMBOLINFO;
238 |
239 | typedef void (*CBSYMBOLENUM)(SYMBOLINFO* symbol, void* user);
240 |
241 | //Debugger structs
242 | struct MEMPAGE
243 | {
244 | MEMORY_BASIC_INFORMATION mbi;
245 | char mod[MAX_MODULE_SIZE];
246 | };
247 |
248 | struct MEMMAP
249 | {
250 | int count;
251 | MEMPAGE* page;
252 | };
253 |
254 | struct BRIDGEBP
255 | {
256 | BPXTYPE type;
257 | duint addr;
258 | bool enabled;
259 | bool singleshoot;
260 | bool active;
261 | char name[MAX_BREAKPOINT_SIZE];
262 | char mod[MAX_MODULE_SIZE];
263 | unsigned short slot;
264 | };
265 |
266 | struct BPMAP
267 | {
268 | int count;
269 | BRIDGEBP* bp;
270 | };
271 |
272 | struct FUNCTION
273 | {
274 | duint start;
275 | duint end;
276 | };
277 |
278 | struct ADDRINFO
279 | {
280 | int flags; //ADDRINFOFLAGS
281 | char module[MAX_MODULE_SIZE]; //module the address is in
282 | char label[MAX_LABEL_SIZE];
283 | char comment[MAX_COMMENT_SIZE];
284 | bool isbookmark;
285 | FUNCTION function;
286 | };
287 |
288 | struct SYMBOLINFO
289 | {
290 | duint addr;
291 | char* decoratedSymbol;
292 | char* undecoratedSymbol;
293 | };
294 |
295 | struct SYMBOLMODULEINFO
296 | {
297 | duint base;
298 | char name[MAX_MODULE_SIZE];
299 | };
300 |
301 | struct SYMBOLCBINFO
302 | {
303 | duint base;
304 | CBSYMBOLENUM cbSymbolEnum;
305 | void* user;
306 | };
307 |
308 | struct FLAGS
309 | {
310 | bool c;
311 | bool p;
312 | bool a;
313 | bool z;
314 | bool s;
315 | bool t;
316 | bool i;
317 | bool d;
318 | bool o;
319 | };
320 |
321 | struct REGDUMP
322 | {
323 | duint cax;
324 | duint ccx;
325 | duint cdx;
326 | duint cbx;
327 | duint csp;
328 | duint cbp;
329 | duint csi;
330 | duint cdi;
331 | #ifdef _WIN64
332 | duint r8;
333 | duint r9;
334 | duint r10;
335 | duint r11;
336 | duint r12;
337 | duint r13;
338 | duint r14;
339 | duint r15;
340 | #endif //_WIN64
341 | duint cip;
342 | unsigned int eflags;
343 | FLAGS flags;
344 | unsigned short gs;
345 | unsigned short fs;
346 | unsigned short es;
347 | unsigned short ds;
348 | unsigned short cs;
349 | unsigned short ss;
350 | duint dr0;
351 | duint dr1;
352 | duint dr2;
353 | duint dr3;
354 | duint dr6;
355 | duint dr7;
356 | };
357 |
358 | struct DISASM_ARG
359 | {
360 | DISASM_ARGTYPE type;
361 | SEGMENTREG segment;
362 | char mnemonic[64];
363 | duint constant;
364 | duint value;
365 | duint memvalue;
366 | };
367 |
368 | struct DISASM_INSTR
369 | {
370 | char instruction[64];
371 | DISASM_INSTRTYPE type;
372 | int argcount;
373 | int instr_size;
374 | DISASM_ARG arg[3];
375 | };
376 |
377 | struct STACK_COMMENT
378 | {
379 | char color[8]; //hex color-code
380 | char comment[MAX_COMMENT_SIZE];
381 | };
382 |
383 | struct THREADINFO
384 | {
385 | int ThreadNumber;
386 | HANDLE hThread;
387 | DWORD dwThreadId;
388 | duint ThreadStartAddress;
389 | duint ThreadLocalBase;
390 | };
391 |
392 | struct THREADALLINFO
393 | {
394 | THREADINFO BasicInfo;
395 | duint ThreadCip;
396 | DWORD SuspendCount;
397 | THREADPRIORITY Priority;
398 | THREADWAITREASON WaitReason;
399 | DWORD LastError;
400 | };
401 |
402 | struct THREADLIST
403 | {
404 | int count;
405 | THREADALLINFO* list;
406 | int CurrentThread;
407 | };
408 |
409 | struct MEMORY_INFO
410 | {
411 | ULONG_PTR value; //displacement / addrvalue (rip-relative)
412 | MEMORY_SIZE size; //byte/word/dword/qword
413 | char mnemonic[MAX_MNEMONIC_SIZE];
414 | };
415 |
416 | struct VALUE_INFO
417 | {
418 | ULONG_PTR value;
419 | VALUE_SIZE size;
420 | };
421 |
422 | struct BASIC_INSTRUCTION_INFO
423 | {
424 | DWORD type; //value|memory|addr
425 | VALUE_INFO value; //immediat
426 | MEMORY_INFO memory;
427 | ULONG_PTR addr; //addrvalue (jumps + calls)
428 | bool branch; //jumps/calls
429 | };
430 |
431 | struct SCRIPTBRANCH
432 | {
433 | SCRIPTBRANCHTYPE type;
434 | int dest;
435 | char branchlabel[256];
436 | };
437 |
438 | //Debugger functions
439 | BRIDGE_IMPEXP const char* DbgInit();
440 | BRIDGE_IMPEXP bool DbgMemRead(duint va, unsigned char* dest, duint size);
441 | BRIDGE_IMPEXP bool DbgMemWrite(duint va, const unsigned char* src, duint size);
442 | BRIDGE_IMPEXP duint DbgMemGetPageSize(duint base);
443 | BRIDGE_IMPEXP duint DbgMemFindBaseAddr(duint addr, duint* size);
444 | BRIDGE_IMPEXP bool DbgCmdExec(const char* cmd);
445 | BRIDGE_IMPEXP bool DbgCmdExecDirect(const char* cmd);
446 | BRIDGE_IMPEXP bool DbgMemMap(MEMMAP* memmap);
447 | BRIDGE_IMPEXP bool DbgIsValidExpression(const char* expression);
448 | BRIDGE_IMPEXP bool DbgIsDebugging();
449 | BRIDGE_IMPEXP bool DbgIsJumpGoingToExecute(duint addr);
450 | BRIDGE_IMPEXP bool DbgGetLabelAt(duint addr, SEGMENTREG segment, char* text);
451 | BRIDGE_IMPEXP bool DbgSetLabelAt(duint addr, const char* text);
452 | BRIDGE_IMPEXP bool DbgGetCommentAt(duint addr, char* text);
453 | BRIDGE_IMPEXP bool DbgSetCommentAt(duint addr, const char* text);
454 | BRIDGE_IMPEXP bool DbgGetBookmarkAt(duint addr);
455 | BRIDGE_IMPEXP bool DbgSetBookmarkAt(duint addr, bool isbookmark);
456 | BRIDGE_IMPEXP bool DbgGetModuleAt(duint addr, char* text);
457 | BRIDGE_IMPEXP BPXTYPE DbgGetBpxTypeAt(duint addr);
458 | BRIDGE_IMPEXP duint DbgValFromString(const char* string);
459 | BRIDGE_IMPEXP bool DbgGetRegDump(REGDUMP* regdump);
460 | BRIDGE_IMPEXP bool DbgValToString(const char* string, duint value);
461 | BRIDGE_IMPEXP bool DbgMemIsValidReadPtr(duint addr);
462 | BRIDGE_IMPEXP int DbgGetBpList(BPXTYPE type, BPMAP* list);
463 | BRIDGE_IMPEXP FUNCTYPE DbgGetFunctionTypeAt(duint addr);
464 | BRIDGE_IMPEXP LOOPTYPE DbgGetLoopTypeAt(duint addr, int depth);
465 | BRIDGE_IMPEXP duint DbgGetBranchDestination(duint addr);
466 | BRIDGE_IMPEXP bool DbgFunctionOverlaps(duint start, duint end);
467 | BRIDGE_IMPEXP bool DbgFunctionGet(duint addr, duint* start, duint* end);
468 | BRIDGE_IMPEXP void DbgScriptLoad(const char* filename);
469 | BRIDGE_IMPEXP void DbgScriptUnload();
470 | BRIDGE_IMPEXP void DbgScriptRun(int destline);
471 | BRIDGE_IMPEXP void DbgScriptStep();
472 | BRIDGE_IMPEXP bool DbgScriptBpToggle(int line);
473 | BRIDGE_IMPEXP bool DbgScriptBpGet(int line);
474 | BRIDGE_IMPEXP bool DbgScriptCmdExec(const char* command);
475 | BRIDGE_IMPEXP void DbgScriptAbort();
476 | BRIDGE_IMPEXP SCRIPTLINETYPE DbgScriptGetLineType(int line);
477 | BRIDGE_IMPEXP void DbgScriptSetIp(int line);
478 | BRIDGE_IMPEXP bool DbgScriptGetBranchInfo(int line, SCRIPTBRANCH* info);
479 | BRIDGE_IMPEXP void DbgSymbolEnum(duint base, CBSYMBOLENUM cbSymbolEnum, void* user);
480 | BRIDGE_IMPEXP bool DbgAssembleAt(duint addr, const char* instruction);
481 | BRIDGE_IMPEXP duint DbgModBaseFromName(const char* name);
482 | BRIDGE_IMPEXP void DbgDisasmAt(duint addr, DISASM_INSTR* instr);
483 | BRIDGE_IMPEXP bool DbgStackCommentGet(duint addr, STACK_COMMENT* comment);
484 | BRIDGE_IMPEXP void DbgGetThreadList(THREADLIST* list);
485 | BRIDGE_IMPEXP void DbgSettingsUpdated();
486 | BRIDGE_IMPEXP void DbgDisasmFastAt(duint addr, BASIC_INSTRUCTION_INFO* basicinfo);
487 | BRIDGE_IMPEXP void DbgMenuEntryClicked(int hEntry);
488 |
489 | //Gui defines
490 | #define GUI_PLUGIN_MENU 0
491 |
492 | //Gui enums
493 | enum GUIMSG
494 | {
495 | GUI_DISASSEMBLE_AT, // param1=(duint)va, param2=(duint)cip
496 | GUI_SET_DEBUG_STATE, // param1=(DBGSTATE)state, param2=unused
497 | GUI_ADD_MSG_TO_LOG, // param1=(const char*)msg, param2=unused
498 | GUI_CLEAR_LOG, // param1=unused, param2=unused
499 | GUI_UPDATE_REGISTER_VIEW, // param1=unused, param2=unused
500 | GUI_UPDATE_DISASSEMBLY_VIEW, // param1=unused, param2=unused
501 | GUI_UPDATE_BREAKPOINTS_VIEW, // param1=unused, param2=unused
502 | GUI_UPDATE_WINDOW_TITLE, // param1=(const char*)file, param2=unused
503 | GUI_GET_WINDOW_HANDLE, // param1=unused, param2=unused
504 | GUI_DUMP_AT, // param1=(duint)va param2=unused
505 | GUI_SCRIPT_ADD, // param1=int count, param2=const char** lines
506 | GUI_SCRIPT_CLEAR, // param1=unused, param2=unused
507 | GUI_SCRIPT_SETIP, // param1=int line, param2=unused
508 | GUI_SCRIPT_ERROR, // param1=int line, param2=const char* message
509 | GUI_SCRIPT_SETTITLE, // param1=const char* title, param2=unused
510 | GUI_SCRIPT_SETINFOLINE, // param1=int line, param2=const char* info
511 | GUI_SCRIPT_MESSAGE, // param1=const char* message, param2=unused
512 | GUI_SCRIPT_MSGYN, // param1=const char* message, param2=unused
513 | GUI_SYMBOL_LOG_ADD, // param1(const char*)msg, param2=unused
514 | GUI_SYMBOL_LOG_CLEAR, // param1=unused, param2=unused
515 | GUI_SYMBOL_SET_PROGRESS, // param1=int percent param2=unused
516 | GUI_SYMBOL_UPDATE_MODULE_LIST, // param1=int count, param2=SYMBOLMODULEINFO* modules
517 | GUI_REF_ADDCOLUMN, // param1=int width, param2=(const char*)title
518 | GUI_REF_SETROWCOUNT, // param1=int rows, param2=unused
519 | GUI_REF_GETROWCOUNT, // param1=unused, param2=unused
520 | GUI_REF_DELETEALLCOLUMNS, // param1=unused, param2=unused
521 | GUI_REF_SETCELLCONTENT, // param1=(CELLINFO*)info, param2=unused
522 | GUI_REF_GETCELLCONTENT, // param1=int row, param2=int col
523 | GUI_REF_RELOADDATA, // param1=unused, param2=unused
524 | GUI_REF_SETSINGLESELECTION, // param1=int index, param2=bool scroll
525 | GUI_REF_SETPROGRESS, // param1=int progress, param2=unused
526 | GUI_REF_SETSEARCHSTARTCOL, // param1=int col param2=unused
527 | GUI_STACK_DUMP_AT, // param1=duint addr, param2=duint csp
528 | GUI_UPDATE_DUMP_VIEW, // param1=unused, param2=unused
529 | GUI_UPDATE_THREAD_VIEW, // param1=unused, param2=unused
530 | GUI_ADD_RECENT_FILE, // param1=(const char*)file, param2=unused
531 | GUI_SET_LAST_EXCEPTION, // param1=unsigned int code, param2=unused
532 | GUI_GET_DISASSEMBLY, // param1=duint addr, param2=char* text
533 | GUI_MENU_ADD, // param1=int hMenu, param2=const char* title
534 | GUI_MENU_ADD_ENTRY, // param1=int hMenu, param2=const char* title
535 | GUI_MENU_ADD_SEPARATOR, // param1=int hMenu, param2=unused
536 | GUI_MENU_CLEAR // param1=int hMenu, param2=unused
537 | };
538 |
539 | //GUI structures
540 | struct CELLINFO
541 | {
542 | int row;
543 | int col;
544 | const char* str;
545 | };
546 |
547 | //GUI functions
548 | BRIDGE_IMPEXP void GuiDisasmAt(duint addr, duint cip);
549 | BRIDGE_IMPEXP void GuiSetDebugState(DBGSTATE state);
550 | BRIDGE_IMPEXP void GuiAddLogMessage(const char* msg);
551 | BRIDGE_IMPEXP void GuiLogClear();
552 | BRIDGE_IMPEXP void GuiUpdateAllViews();
553 | BRIDGE_IMPEXP void GuiUpdateRegisterView();
554 | BRIDGE_IMPEXP void GuiUpdateDisassemblyView();
555 | BRIDGE_IMPEXP void GuiUpdateBreakpointsView();
556 | BRIDGE_IMPEXP void GuiUpdateWindowTitle(const char* filename);
557 | BRIDGE_IMPEXP HWND GuiGetWindowHandle();
558 | BRIDGE_IMPEXP void GuiDumpAt(duint va);
559 | BRIDGE_IMPEXP void GuiScriptAdd(int count, const char** lines);
560 | BRIDGE_IMPEXP void GuiScriptClear();
561 | BRIDGE_IMPEXP void GuiScriptSetIp(int line);
562 | BRIDGE_IMPEXP void GuiScriptError(int line, const char* message);
563 | BRIDGE_IMPEXP void GuiScriptSetTitle(const char* title);
564 | BRIDGE_IMPEXP void GuiScriptSetInfoLine(int line, const char* info);
565 | BRIDGE_IMPEXP void GuiScriptMessage(const char* message);
566 | BRIDGE_IMPEXP int GuiScriptMsgyn(const char* message);
567 | BRIDGE_IMPEXP void GuiSymbolLogAdd(const char* message);
568 | BRIDGE_IMPEXP void GuiSymbolLogClear();
569 | BRIDGE_IMPEXP void GuiSymbolSetProgress(int percent);
570 | BRIDGE_IMPEXP void GuiSymbolUpdateModuleList(int count, SYMBOLMODULEINFO* modules);
571 | BRIDGE_IMPEXP void GuiReferenceAddColumn(int width, const char* title);
572 | BRIDGE_IMPEXP void GuiReferenceSetRowCount(int count);
573 | BRIDGE_IMPEXP int GuiReferenceGetRowCount();
574 | BRIDGE_IMPEXP void GuiReferenceDeleteAllColumns();
575 | BRIDGE_IMPEXP void GuiReferenceSetCellContent(int row, int col, const char* str);
576 | BRIDGE_IMPEXP const char* GuiReferenceGetCellContent(int row, int col);
577 | BRIDGE_IMPEXP void GuiReferenceReloadData();
578 | BRIDGE_IMPEXP void GuiReferenceSetSingleSelection(int index, bool scroll);
579 | BRIDGE_IMPEXP void GuiReferenceSetProgress(int progress);
580 | BRIDGE_IMPEXP void GuiReferenceSetSearchStartCol(int col);
581 | BRIDGE_IMPEXP void GuiStackDumpAt(duint addr, duint csp);
582 | BRIDGE_IMPEXP void GuiUpdateDumpView();
583 | BRIDGE_IMPEXP void GuiUpdateThreadView();
584 | BRIDGE_IMPEXP void GuiAddRecentFile(const char* file);
585 | BRIDGE_IMPEXP void GuiSetLastException(unsigned int exception);
586 | BRIDGE_IMPEXP bool GuiGetDisassembly(duint addr, char* text);
587 | BRIDGE_IMPEXP int GuiMenuAdd(int hMenu, const char* title);
588 | BRIDGE_IMPEXP int GuiMenuAddEntry(int hMenu, const char* title);
589 | BRIDGE_IMPEXP void GuiMenuAddSeparator(int hMenu);
590 | BRIDGE_IMPEXP void GuiMenuClear(int hMenu);
591 |
592 | #ifdef __cplusplus
593 | }
594 | #endif
595 |
596 | #endif // _BRIDGEMAIN_H_
597 |
--------------------------------------------------------------------------------
/pluginsdk_c/dbghelp/dbghelp_x64.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/dbghelp/dbghelp_x64.a
--------------------------------------------------------------------------------
/pluginsdk_c/dbghelp/dbghelp_x64.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/dbghelp/dbghelp_x64.lib
--------------------------------------------------------------------------------
/pluginsdk_c/dbghelp/dbghelp_x86.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/dbghelp/dbghelp_x86.a
--------------------------------------------------------------------------------
/pluginsdk_c/dbghelp/dbghelp_x86.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/dbghelp/dbghelp_x86.lib
--------------------------------------------------------------------------------
/pluginsdk_c/libx32_bridge.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/libx32_bridge.a
--------------------------------------------------------------------------------
/pluginsdk_c/libx32_dbg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/libx32_dbg.a
--------------------------------------------------------------------------------
/pluginsdk_c/libx64_bridge.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/libx64_bridge.a
--------------------------------------------------------------------------------
/pluginsdk_c/libx64_dbg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/libx64_dbg.a
--------------------------------------------------------------------------------
/pluginsdk_c/testplugin_002.rar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/testplugin_002.rar
--------------------------------------------------------------------------------
/pluginsdk_c/x32_bridge.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/x32_bridge.lib
--------------------------------------------------------------------------------
/pluginsdk_c/x32_dbg.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/x32_dbg.lib
--------------------------------------------------------------------------------
/pluginsdk_c/x64_bridge.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/x64_bridge.lib
--------------------------------------------------------------------------------
/pluginsdk_c/x64_dbg.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/quygia128/x64_dbg_SDK_Delphi/7e4fa460df07a49a2963e458cf93ea1333b62a5e/pluginsdk_c/x64_dbg.lib
--------------------------------------------------------------------------------
/pluginsdk_delphi/TitanEngine_2010.pas:
--------------------------------------------------------------------------------
1 | unit SDK;
2 |
3 | interface
4 |
5 | {TitanEngine Delphi SDK - 2.0.3}
6 | {http://www.reversinglabs.com/}
7 | {Types}
8 | type
9 | PE32Structure = ^PE_32_STRUCT;
10 | PE_32_STRUCT = packed record
11 | PE32Offset : LongInt;
12 | ImageBase : LongInt;
13 | OriginalEntryPoint : LongInt;
14 | NtSizeOfImage : LongInt;
15 | NtSizeOfHeaders : LongInt;
16 | SizeOfOptionalHeaders : SmallInt;
17 | FileAlignment : LongInt;
18 | SectionAligment : LongInt;
19 | ImportTableAddress : LongInt;
20 | ImportTableSize : LongInt;
21 | ResourceTableAddress : LongInt;
22 | ResourceTableSize : LongInt;
23 | ExportTableAddress : LongInt;
24 | ExportTableSize : LongInt;
25 | TLSTableAddress : LongInt;
26 | TLSTableSize : LongInt;
27 | RelocationTableAddress : LongInt;
28 | RelocationTableSize : LongInt;
29 | TimeDateStamp : LongInt;
30 | SectionNumber : SmallInt;
31 | CheckSum : LongInt;
32 | SubSystem : SmallInt;
33 | Characteristics : SmallInt;
34 | NumberOfRvaAndSizes : LongInt;
35 | end;
36 |
37 | FileStatusInfo = ^FILE_STATUS_INFO;
38 | FILE_STATUS_INFO = packed record
39 | OveralEvaluation : BYTE;
40 | EvaluationTerminatedByException : boolean;
41 | FileIs64Bit : boolean;
42 | FileIsDLL : boolean;
43 | FileIsConsole : boolean;
44 | MissingDependencies : boolean;
45 | MissingDeclaredAPIs : boolean;
46 | SignatureMZ : BYTE;
47 | SignaturePE : BYTE;
48 | EntryPoint : BYTE;
49 | ImageBase : BYTE;
50 | SizeOfImage : BYTE;
51 | FileAlignment : BYTE;
52 | SectionAlignment : BYTE;
53 | ExportTable : BYTE;
54 | RelocationTable : BYTE;
55 | ImportTable : BYTE;
56 | ImportTableSection : BYTE;
57 | ImportTableData : BYTE;
58 | IATTable : BYTE;
59 | TLSTable : BYTE;
60 | LoadConfigTable : BYTE;
61 | BoundImportTable : BYTE;
62 | COMHeaderTable : BYTE;
63 | ResourceTable : BYTE;
64 | ResourceData : BYTE;
65 | SectionTable : BYTE;
66 | end;
67 |
68 | FileFixInfo = ^FILE_FIX_INFO;
69 | FILE_FIX_INFO = packed record
70 | OveralEvaluation : BYTE;
71 | FixingTerminatedByException : boolean;
72 | FileFixPerformed : boolean;
73 | StrippedRelocation : boolean;
74 | DontFixRelocations : boolean;
75 | OriginalRelocationTableAddress : LongInt;
76 | OriginalRelocationTableSize : LongInt;
77 | StrippedExports : boolean;
78 | DontFixExports : boolean;
79 | OriginalExportTableAddress : LongInt;
80 | OriginalExportTableSize : LongInt;
81 | StrippedResources : boolean;
82 | DontFixResources : boolean;
83 | OriginalResourceTableAddress : LongInt;
84 | OriginalResourceTableSize : LongInt;
85 | StrippedTLS : boolean;
86 | DontFixTLS : boolean;
87 | OriginalTLSTableAddress : LongInt;
88 | OriginalTLSTableSize : LongInt;
89 | StrippedLoadConfig : boolean;
90 | DontFixLoadConfig : boolean;
91 | OriginalLoadConfigTableAddress : LongInt;
92 | OriginalLoadConfigTableSize : LongInt;
93 | StrippedBoundImports : boolean;
94 | DontFixBoundImports : boolean;
95 | OriginalBoundImportTableAddress : LongInt;
96 | OriginalBoundImportTableSize : LongInt;
97 | StrippedIAT : boolean;
98 | DontFixIAT : boolean;
99 | OriginalImportAddressTableAddress : LongInt;
100 | OriginalImportAddressTableSize : LongInt;
101 | StrippedCOM : boolean;
102 | DontFixCOM : boolean;
103 | OriginalCOMTableAddress : LongInt;
104 | OriginalCOMTableSize : LongInt;
105 | end;
106 |
107 | ImportEnumData = ^IMPORT_ENUM_DATA;
108 | IMPORT_ENUM_DATA = packed record
109 | NewDll : boolean;
110 | NumberOfImports : LongInt;
111 | ImageBase : LongInt;
112 | BaseImportThunk : LongInt;
113 | ImportThunk : LongInt;
114 | APIName : PAnsiChar;
115 | DLLName : PAnsiChar;
116 | end;
117 |
118 | ThreadItemData = ^THREAD_ITEM_DATA;
119 | THREAD_ITEM_DATA = packed record
120 | hThread : THandle;
121 | dwThreadId : LongInt;
122 | ThreadStartAddress : LongInt;
123 | ThreadLocalBase : LongInt;
124 | end;
125 |
126 | LibraryItemData = ^LIBRARY_ITEM_DATA;
127 | LIBRARY_ITEM_DATA = packed record
128 | hFile : THandle;
129 | BaseOfDll : Pointer;
130 | hFileMapping : THandle;
131 | hFileMappingView : Pointer;
132 | szLibraryPath:array[1..260] of AnsiChar;
133 | szLibraryName:array[1..260] of AnsiChar;
134 | end;
135 |
136 | ProcessItemData = ^PROCESS_ITEM_DATA;
137 | PROCESS_ITEM_DATA = packed record
138 | hProcess : THandle;
139 | dwProcessId : LongInt;
140 | hThread : THandle;
141 | dwThreadId : LongInt;
142 | hFile : THandle;
143 | BaseOfImage : Pointer;
144 | ThreadStartAddress : Pointer;
145 | ThreadLocalBase : Pointer;
146 | end;
147 |
148 | HandlerArray = ^HANDLER_ARRAY;
149 | HANDLER_ARRAY = packed record
150 | ProcessId : LongInt;
151 | hHandle : THandle;
152 | end;
153 |
154 | HookEntry = ^HOOK_ENTRY;
155 | HOOK_ENTRY = packed record
156 | IATHook : boolean;
157 | HookType : BYTE;
158 | HookSize : LongInt;
159 | HookAddress : Pointer;
160 | RedirectionAddress : Pointer;
161 | HookBytes:array[1..14] of BYTE;
162 | OriginalBytes:array[1..14] of BYTE;
163 | IATHookModuleBase : Pointer;
164 | IATHookNameHash : LongInt;
165 | HookIsEnabled : boolean;
166 | HookIsRemote : boolean;
167 | PatchedEntry : Pointer;
168 | RelocationInfo:array[1..7] of LongInt;
169 | RelocationCount : LongInt;
170 | end;
171 |
172 | PluginInformation = ^PLUGIN_INFORMATION;
173 | PLUGIN_INFORMATION = packed record
174 | PluginName:array[1..64] of AnsiChar;
175 | PluginMajorVersion : LongInt;
176 | PluginMinorVersion : LongInt;
177 | PluginBaseAddress : LongInt;
178 | TitanDebuggingCallBack : Pointer;
179 | TitanRegisterPlugin : Pointer;
180 | TitanReleasePlugin : Pointer;
181 | TitanResetPlugin : Pointer;
182 | PluginDisabled : boolean;
183 | end;
184 | const
185 | {Registers}
186 | UE_EAX = 1;
187 | UE_EBX = 2;
188 | UE_ECX = 3;
189 | UE_EDX = 4;
190 | UE_EDI = 5;
191 | UE_ESI = 6;
192 | UE_EBP = 7;
193 | UE_ESP = 8;
194 | UE_EIP = 9;
195 | UE_EFLAGS = 10;
196 | UE_DR0 = 11;
197 | UE_DR1 = 12;
198 | UE_DR2 = 13;
199 | UE_DR3 = 14;
200 | UE_DR6 = 15;
201 | UE_DR7 = 16;
202 | UE_CIP = 35;
203 | UE_CSP = 36;
204 | UE_SEG_GS = 37;
205 | UE_SEG_FS = 38;
206 | UE_SEG_ES = 39;
207 | UE_SEG_DS = 40;
208 | UE_SEG_CS = 41;
209 | UE_SEG_SS = 42;
210 | {Constants}
211 | UE_PE_OFFSET = 0;
212 | UE_IMAGEBASE = 1;
213 | UE_OEP = 2;
214 | UE_SIZEOFIMAGE = 3;
215 | UE_SIZEOFHEADERS = 4;
216 | UE_SIZEOFOPTIONALHEADER = 5;
217 | UE_SECTIONALIGNMENT = 6;
218 | UE_IMPORTTABLEADDRESS = 7;
219 | UE_IMPORTTABLESIZE = 8;
220 | UE_RESOURCETABLEADDRESS = 9;
221 | UE_RESOURCETABLESIZE = 10;
222 | UE_EXPORTTABLEADDRESS = 11;
223 | UE_EXPORTTABLESIZE = 12;
224 | UE_TLSTABLEADDRESS = 13;
225 | UE_TLSTABLESIZE = 14;
226 | UE_RELOCATIONTABLEADDRESS = 15;
227 | UE_RELOCATIONTABLESIZE = 16;
228 | UE_TIMEDATESTAMP = 17;
229 | UE_SECTIONNUMBER = 18;
230 | UE_CHECKSUM = 19;
231 | UE_SUBSYSTEM = 20;
232 | UE_CHARACTERISTICS = 21;
233 | UE_NUMBEROFRVAANDSIZES = 22;
234 | UE_SECTIONNAME = 23;
235 | UE_SECTIONVIRTUALOFFSET = 24;
236 | UE_SECTIONVIRTUALSIZE = 25;
237 | UE_SECTIONRAWOFFSET = 26;
238 | UE_SECTIONRAWSIZE = 27;
239 | UE_SECTIONFLAGS = 28;
240 |
241 | UE_CH_BREAKPOINT = 1;
242 | UE_CH_SINGLESTEP = 2;
243 | UE_CH_ACCESSVIOLATION = 3;
244 | UE_CH_ILLEGALINSTRUCTION = 4;
245 | UE_CH_NONCONTINUABLEEXCEPTION = 5;
246 | UE_CH_ARRAYBOUNDSEXCEPTION = 6;
247 | UE_CH_FLOATDENORMALOPERAND = 7;
248 | UE_CH_FLOATDEVIDEBYZERO = 8;
249 | UE_CH_INTEGERDEVIDEBYZERO = 9;
250 | UE_CH_INTEGEROVERFLOW = 10;
251 | UE_CH_PRIVILEGEDINSTRUCTION = 11;
252 | UE_CH_PAGEGUARD = 12;
253 | UE_CH_EVERYTHINGELSE = 13;
254 | UE_CH_CREATETHREAD = 14;
255 | UE_CH_EXITTHREAD = 15;
256 | UE_CH_CREATEPROCESS = 16;
257 | UE_CH_EXITPROCESS = 17;
258 | UE_CH_LOADDLL = 18;
259 | UE_CH_UNLOADDLL = 19;
260 | UE_CH_OUTPUTDEBUGSTRING = 20;
261 |
262 | UE_FUNCTION_STDCALL = 1;
263 | UE_FUNCTION_CCALL = 2;
264 | UE_FUNCTION_FASTCALL = 3;
265 | UE_FUNCTION_STDCALL_RET = 4;
266 | UE_FUNCTION_CCALL_RET = 5;
267 | UE_FUNCTION_FASTCALL_RET = 6;
268 | UE_FUNCTION_STDCALL_CALL = 7;
269 | UE_FUNCTION_CCALL_CALL = 8;
270 | UE_FUNCTION_FASTCALL_CALL = 9;
271 | UE_PARAMETER_BYTE = 0;
272 | UE_PARAMETER_WORD = 1;
273 | UE_PARAMETER_DWORD = 2;
274 | UE_PARAMETER_QWORD = 3;
275 | UE_PARAMETER_PTR_BYTE = 4;
276 | UE_PARAMETER_PTR_WORD = 5;
277 | UE_PARAMETER_PTR_DWORD = 6;
278 | UE_PARAMETER_PTR_QWORD = 7;
279 | UE_PARAMETER_STRING = 8;
280 | UE_PARAMETER_UNICODE = 9;
281 |
282 | UE_CMP_NOCONDITION = 0;
283 | UE_CMP_EQUAL = 1;
284 | UE_CMP_NOTEQUAL = 2;
285 | UE_CMP_GREATER = 3;
286 | UE_CMP_GREATEROREQUAL = 4;
287 | UE_CMP_LOWER = 5;
288 | UE_CMP_LOWEROREQUAL = 6;
289 | UE_CMP_REG_EQUAL = 7;
290 | UE_CMP_REG_NOTEQUAL = 8;
291 | UE_CMP_REG_GREATER = 9;
292 | UE_CMP_REG_GREATEROREQUAL = 10;
293 | UE_CMP_REG_LOWER = 11;
294 | UE_CMP_REG_LOWEROREQUAL = 12;
295 | UE_CMP_ALWAYSFALSE = 13;
296 | UE_OPTION_HANDLER_RETURN_HANDLECOUNT = 1;
297 | UE_OPTION_HANDLER_RETURN_ACCESS = 2;
298 | UE_OPTION_HANDLER_RETURN_FLAGS = 3;
299 | UE_OPTION_HANDLER_RETURN_TYPENAME = 4;
300 |
301 | UE_BREAKPOINT_INT3 = 1;
302 | UE_BREAKPOINT_LONG_INT3 = 2;
303 | UE_BREAKPOINT_UD2 = 3;
304 |
305 | UE_BPXREMOVED = 0;
306 | UE_BPXACTIVE = 1;
307 | UE_BPXINACTIVE = 2;
308 |
309 | UE_BREAKPOINT = 0;
310 | UE_SINGLESHOOT = 1;
311 | UE_HARDWARE = 2;
312 | UE_MEMORY = 3;
313 | UE_MEMORY_READ = 4;
314 | UE_MEMORY_WRITE = 5;
315 | UE_BREAKPOINT_TYPE_INT3 = $10000000;
316 | UE_BREAKPOINT_TYPE_LONG_INT3 = $20000000;
317 | UE_BREAKPOINT_TYPE_UD2 = $30000000;
318 |
319 | UE_HARDWARE_EXECUTE = 4;
320 | UE_HARDWARE_WRITE = 5;
321 | UE_HARDWARE_READWRITE = 6;
322 |
323 | UE_HARDWARE_SIZE_1 = 7;
324 | UE_HARDWARE_SIZE_2 = 8;
325 | UE_HARDWARE_SIZE_4 = 9;
326 |
327 | UE_ON_LIB_LOAD = 1;
328 | UE_ON_LIB_UNLOAD = 2;
329 | UE_ON_LIB_ALL = 3;
330 |
331 | UE_APISTART = 0;
332 | UE_APIEND = 1;
333 |
334 | UE_PLATFORM_x86 = 1;
335 | UE_PLATFORM_x64 = 2;
336 | UE_PLATFORM_ALL = 3;
337 |
338 | UE_ACCESS_READ = 0;
339 | UE_ACCESS_WRITE = 1;
340 | UE_ACCESS_ALL = 2;
341 |
342 | UE_HIDE_BASIC = 1;
343 |
344 | UE_ENGINE_ALOW_MODULE_LOADING = 1;
345 | UE_ENGINE_AUTOFIX_FORWARDERS = 2;
346 | UE_ENGINE_PASS_ALL_EXCEPTIONS = 3;
347 | UE_ENGINE_NO_CONSOLE_WINDOW = 4;
348 | UE_ENGINE_BACKUP_FOR_CRITICAL_FUNCTIONS = 5;
349 | UE_ENGINE_CALL_PLUGIN_CALLBACK = 6;
350 | UE_ENGINE_RESET_CUSTOM_HANDLER = 7;
351 | UE_ENGINE_CALL_PLUGIN_DEBUG_CALLBACK = 8;
352 |
353 | UE_OPTION_REMOVEALL = 1;
354 | UE_OPTION_DISABLEALL = 2;
355 | UE_OPTION_REMOVEALLDISABLED = 3;
356 | UE_OPTION_REMOVEALLENABLED = 4;
357 |
358 | UE_STATIC_DECRYPTOR_XOR = 1;
359 | UE_STATIC_DECRYPTOR_SUB = 2;
360 | UE_STATIC_DECRYPTOR_ADD = 3;
361 |
362 | UE_STATIC_DECRYPTOR_FOREWARD = 1;
363 | UE_STATIC_DECRYPTOR_BACKWARD = 2;
364 |
365 | UE_STATIC_KEY_SIZE_1 = 1;
366 | UE_STATIC_KEY_SIZE_2 = 2;
367 | UE_STATIC_KEY_SIZE_4 = 4;
368 | UE_STATIC_KEY_SIZE_8 = 8;
369 |
370 | UE_STATIC_APLIB = 1;
371 | UE_STATIC_APLIB_DEPACK = 2;
372 | UE_STATIC_LZMA = 3;
373 |
374 | UE_STATIC_HASH_MD5 = 1;
375 | UE_STATIC_HASH_SHA1 = 2;
376 | UE_STATIC_HASH_CRC32 = 3;
377 |
378 | UE_RESOURCE_LANGUAGE_ANY = -1;
379 |
380 | UE_DEPTH_SURFACE = 0;
381 | UE_DEPTH_DEEP = 1;
382 |
383 | UE_UNPACKER_CONDITION_SEARCH_FROM_EP = 1;
384 |
385 | UE_UNPACKER_CONDITION_LOADLIBRARY = 1;
386 | UE_UNPACKER_CONDITION_GETPROCADDRESS = 2;
387 | UE_UNPACKER_CONDITION_ENTRYPOINTBREAK = 3;
388 | UE_UNPACKER_CONDITION_RELOCSNAPSHOT1 = 4;
389 | UE_UNPACKER_CONDITION_RELOCSNAPSHOT2 = 5;
390 |
391 | UE_FIELD_OK = 0;
392 | UE_FIELD_BROKEN_NON_FIXABLE = 1;
393 | UE_FIELD_BROKEN_NON_CRITICAL = 2;
394 | UE_FIELD_BROKEN_FIXABLE_FOR_STATIC_USE = 3;
395 | UE_FIELD_BROKEN_BUT_CAN_BE_EMULATED = 4;
396 | UE_FILED_FIXABLE_NON_CRITICAL = 5;
397 | UE_FILED_FIXABLE_CRITICAL = 6;
398 | UE_FIELD_NOT_PRESET = 7;
399 | UE_FIELD_NOT_PRESET_WARNING = 8;
400 |
401 | UE_RESULT_FILE_OK = 10;
402 | UE_RESULT_FILE_INVALID_BUT_FIXABLE = 11;
403 | UE_RESULT_FILE_INVALID_AND_NON_FIXABLE = 12;
404 | UE_RESULT_FILE_INVALID_FORMAT = 13;
405 |
406 | UE_PLUGIN_CALL_REASON_PREDEBUG = 1;
407 | UE_PLUGIN_CALL_REASON_EXCEPTION = 2;
408 | UE_PLUGIN_CALL_REASON_POSTDEBUG = 3;
409 |
410 | TEE_HOOK_NRM_JUMP = 1;
411 | TEE_HOOK_NRM_CALL = 3;
412 | TEE_HOOK_IAT = 5;
413 |
414 | {TitanEngine.Dumper.functions}
415 | function DumpProcess(hProcess:THandle; ImageBase:LongInt; szDumpFileName:PAnsiChar; EntryPoint:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'DumpProcess';
416 | function DumpProcessEx(ProcessId:LongInt; ImageBase:LongInt; szDumpFileName:PAnsiChar; EntryPoint:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'DumpProcessEx';
417 | function DumpMemory(hProcess:THandle; MemoryStart,MemorySize:LongInt; szDumpFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'DumpMemory';
418 | function DumpMemoryEx(ProcessId:LongInt; MemoryStart,MemorySize:LongInt; szDumpFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'DumpMemoryEx';
419 | function DumpRegions(hProcess:THandle; szDumpFolder:PAnsiChar; DumpAboveImageBaseOnly:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'DumpRegions';
420 | function DumpRegionsEx(ProcessId:LongInt; szDumpFolder:PAnsiChar; DumpAboveImageBaseOnly:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'DumpRegionsEx';
421 | function DumpModule(hProcess:THandle; ModuleBase:LongInt; szDumpFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'DumpModule';
422 | function DumpModuleEx(ProcessId:LongInt; ModuleBase:LongInt; szDumpFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'DumpModuleEx';
423 | function PastePEHeader(hProcess:THandle; ImageBase:LongInt; szDebuggedFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'PastePEHeader';
424 | function ExtractSection(szFileName,szDumpFileName:PAnsiChar; SectionNumber:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'ExtractSection';
425 | function ResortFileSections(szFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ResortFileSections';
426 | function FindOverlay(szFileName:PAnsiChar; OverlayStart,OverlaySize:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'FindOverlay';
427 | function ExtractOverlay(szFileName,szExtactedFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ExtractOverlay';
428 | function AddOverlay(szFileName,szOverlayFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'AddOverlay';
429 | function CopyOverlay(szInFileName,szOutFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'CopyOverlay';
430 | function RemoveOverlay(szFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'RemoveOverlay';
431 | function MakeAllSectionsRWE(szFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'MakeAllSectionsRWE';
432 | function AddNewSectionEx(szFileName,szSectionName:PAnsiChar; SectionSize,SectionAttributes:LongInt; SectionContent:Pointer; ContentSize:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'AddNewSectionEx';
433 | function AddNewSection(szFileName,szSectionName:PAnsiChar; SectionSize:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'AddNewSection';
434 | function ResizeLastSection(szFileName:PAnsiChar; NumberOfExpandBytes:LongInt; AlignResizeData:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'ResizeLastSection';
435 | procedure SetSharedOverlay(szFileName:PAnsiChar); stdcall; external 'TitanEngine.dll' name 'SetSharedOverlay';
436 | function GetSharedOverlay():PAnsiChar; stdcall; external 'TitanEngine.dll' name 'GetSharedOverlay';
437 | function DeleteLastSection(szFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'DeleteLastSection';
438 | function DeleteLastSectionEx(szFileName:PAnsiChar; NumberOfSections:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'DeleteLastSectionEx';
439 | function GetPE32DataFromMappedFile(FileMapVA,WhichSection,WhichData:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'GetPE32DataFromMappedFile';
440 | function GetPE32Data(szFileName:PAnsiChar; WhichSection,WhichData:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'GetPE32Data';
441 | function GetPE32DataFromMappedFileEx(FileMapVA:LongInt; DataStorage:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'GetPE32DataFromMappedFileEx';
442 | function GetPE32DataEx(szFileName:PAnsiChar; DataStorage:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'GetPE32DataEx';
443 | function SetPE32DataForMappedFile(FileMapVA,WhichSection,WhichData,NewDataValue:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'SetPE32DataForMappedFile';
444 | function SetPE32Data(szFileName:PAnsiChar; WhichSection,WhichData,NewDataValue:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'SetPE32Data';
445 | function SetPE32DataForMappedFileEx(szFileName:PAnsiChar; DataStorage:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'SetPE32DataForMappedFileEx';
446 | function SetPE32DataEx(szFileName:PAnsiChar; DataStorage:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'SetPE32DataEx';
447 | function GetPE32SectionNumberFromVA(FileMapVA,AddressToConvert:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'GetPE32SectionNumberFromVA';
448 | function ConvertVAtoFileOffset(FileMapVA,AddressToConvert:LongInt; ReturnType:boolean):LongInt; stdcall; external 'TitanEngine.dll' name 'ConvertVAtoFileOffset';
449 | function ConvertVAtoFileOffsetEx(FileMapVA,FileSize,ImageBase,AddressToConvert:LongInt; AddressIsRVA,ReturnType:boolean):LongInt; stdcall; external 'TitanEngine.dll' name 'ConvertVAtoFileOffsetEx';
450 | function ConvertFileOffsetToVA(FileMapVA,AddressToConvert:LongInt; ReturnType:boolean):LongInt; stdcall; external 'TitanEngine.dll' name 'ConvertFileOffsetToVA';
451 | function ConvertFileOffsetToVAEx(FileMapVA,FileSize,ImageBase,AddressToConvert:LongInt; ReturnType:boolean):LongInt; stdcall; external 'TitanEngine.dll' name 'ConvertFileOffsetToVAEx';
452 | {TitanEngine.Realigner.functions}
453 | function FixHeaderCheckSum(szFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'FixHeaderCheckSum';
454 | function RealignPE(FileMapVA,FileSize,RealingMode:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'RealignPE';
455 | function RealignPEEx(szFileName:PAnsiChar; RealingFileSize,ForcedFileAlignment:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'RealignPEEx';
456 | function WipeSection(szFileName:PAnsiChar; WipeSectionNumber:LongInt; RemovePhysically:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'WipeSection';
457 | function IsPE32FileValidEx(szFileName:PAnsiChar; CheckDepth:LongInt; FileStatusInfo:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'IsPE32FileValidEx';
458 | function FixBrokenPE32FileEx(szFileName:PAnsiChar; FileStatusInfo,FileFixInfo:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'FixBrokenPE32FileEx';
459 | function IsFileDLL(szFileName:PAnsiChar; FileMapVA:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'IsFileDLL';
460 | {TitanEngine.Hider.functions}
461 | function GetPEBLocation(hProcess:THandle):LongInt; stdcall; external 'TitanEngine.dll' name 'GetPEBLocation';
462 | function HideDebugger(hProcess:THandle; PatchAPILevel:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'HideDebugger';
463 | function UnHideDebugger(hProcess:THandle; PatchAPILevel:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'UnHideDebugger';
464 | {TitanEngine.Relocater.functions}
465 | procedure RelocaterCleanup(); stdcall; external 'TitanEngine.dll' name 'RelocaterCleanup';
466 | procedure RelocaterInit(MemorySize,OldImageBase,NewImageBase:LongInt); stdcall; external 'TitanEngine.dll' name 'RelocaterInit';
467 | procedure RelocaterAddNewRelocation(hProcess:THandle; RelocateAddress,RelocateState:LongInt); stdcall; external 'TitanEngine.dll' name 'RelocaterAddNewRelocation';
468 | function RelocaterEstimatedSize():LongInt; stdcall; external 'TitanEngine.dll' name 'RelocaterEstimatedSize';
469 | function RelocaterExportRelocation(StorePlace,StorePlaceRVA,FileMapVA:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'RelocaterExportRelocation';
470 | function RelocaterExportRelocationEx(szFileName,szSectionName:PAnsiChar; StorePlace,StorePlaceRVA:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'RelocaterExportRelocationEx';
471 | function RelocaterGrabRelocationTable(hProcess:THandle; MemoryStart,MemorySize:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'RelocaterGrabRelocationTable';
472 | function RelocaterGrabRelocationTableEx(hProcess:THandle; MemoryStart,MemorySize,NtSizeOfImage:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'RelocaterGrabRelocationTableEx';
473 | function RelocaterMakeSnapshot(hProcess:THandle; szSaveFileName:PAnsiChar; MemoryStart,MemorySize:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'RelocaterMakeSnapshot';
474 | function RelocaterCompareTwoSnapshots(hProcess:THandle; LoadedImageBase,NtSizeOfImage:LongInt; szDumpFile1,szDumpFile2:PAnsiChar; MemStart:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'RelocaterCompareTwoSnapshots';
475 | function RelocaterChangeFileBase(szFileName:PAnsiChar; NewImageBase:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'RelocaterChangeFileBase';
476 | function RelocaterRelocateMemoryBlock(FileMapVA,MemoryLocation:LongInt; RelocateMemory:Pointer; RelocateMemorySize,CurrentLoadedBase,RelocateBase:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'RelocaterRelocateMemoryBlock';
477 | function RelocaterWipeRelocationTable(szFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'RelocaterWipeRelocationTable';
478 | {TitanEngine.Resourcer.functions}
479 | function ResourcerLoadFileForResourceUse(szFileName:PAnsiChar):LongInt; stdcall; external 'TitanEngine.dll' name 'ResourcerLoadFileForResourceUse';
480 | function ResourcerFreeLoadedFile(LoadedFileBase:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'ResourcerFreeLoadedFile';
481 | function ResourcerExtractResourceFromFileEx(FileMapVA:LongInt; szResourceType,szResourceName,szExtractedFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ResourcerExtractResourceFromFileEx';
482 | function ResourcerExtractResourceFromFile(szFileName,szResourceType,szResourceName,szExtractedFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ResourcerExtractResourceFromFile';
483 | function ResourcerFindResource(szFileName,szResourceType:PAnsiChar; ResourceType:LongInt; szResourceName:PAnsiChar; ResourceName,ResourceLanguage:LongInt; pResourceData,pResourceSize:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'ResourcerFindResource';
484 | function ResourcerFindResourceEx(FileMapVA,FileSize:LongInt; szResourceType:PAnsiChar; ResourceType:LongInt; szResourceName:PAnsiChar; ResourceName,ResourceLanguage:LongInt; pResourceData,pResourceSize:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'ResourcerFindResourceEx';
485 | procedure ResourcerEnumerateResource(szFileName:PAnsiChar; CallBack:LongInt); stdcall; external 'TitanEngine.dll' name 'ResourcerEnumerateResource';
486 | procedure ResourcerEnumerateResourceEx(FileMapVA,FileSize:LongInt; CallBack:LongInt); stdcall; external 'TitanEngine.dll' name 'ResourcerEnumerateResourceEx';
487 | {TitanEngine.FindOEP.functions}
488 | procedure FindOEPInit(); stdcall; external 'TitanEngine.dll' name 'FindOEPInit';
489 | procedure FindOEPGenerically(szFileName:PAnsiChar; TraceInitCallBack,CallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'FindOEPGenerically';
490 | {TitanEngine.Threader.functions}
491 | function ThreaderImportRunningThreadData(ProcessId:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderImportRunningThreadData';
492 | function ThreaderGetThreadInfo(hThread:THandle; ThreadId:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'ThreaderGetThreadInfo';
493 | procedure ThreaderEnumThreadInfo(EnumCallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'ThreaderGetThreadInfo';
494 | function ThreaderPauseThread(hThread:THandle):boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderPauseThread';
495 | function ThreaderResumeThread(hThread:THandle):boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderResumeThread';
496 | function ThreaderTerminateThread(hThread:THandle; ThreadExitCode:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderTerminateThread';
497 | function ThreaderPauseAllThreads(LeaveMainRunning:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderPauseAllThreads';
498 | function ThreaderResumeAllThreads(LeaveMainPaused:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderResumeAllThreads';
499 | function ThreaderPauseProcess():boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderPauseProcess';
500 | function ThreaderResumeProcess():boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderResumeProcess';
501 | function ThreaderCreateRemoteThread(ThreadStartAddress:LongInt; AutoCloseTheHandle:boolean; ThreadPassParameter,ThreadId:Pointer):LongInt; stdcall; external 'TitanEngine.dll' name 'ThreaderCreateRemoteThread';
502 | function ThreaderInjectAndExecuteCode(InjectCode:Pointer; StartDelta,InjectSize:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderInjectAndExecuteCode';
503 | function ThreaderCreateRemoteThreadEx(hProcess:THandle; ThreadStartAddress:LongInt; AutoCloseTheHandle:boolean; ThreadPassParameter,ThreadId:Pointer):LongInt; stdcall; external 'TitanEngine.dll' name 'ThreaderCreateRemoteThreadEx';
504 | function ThreaderInjectAndExecuteCodeEx(hProcess:THandle; InjectCode:Pointer; StartDelta,InjectSize:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderInjectAndExecuteCodeEx';
505 | procedure ThreaderSetCallBackForNextExitThreadEvent(exitThreadCallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'ThreaderSetCallBackForNextExitThreadEvent';
506 | function ThreaderIsThreadStillRunning(hThread:THandle):boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderIsThreadStillRunning';
507 | function ThreaderIsThreadActive(hThread:THandle):boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderIsThreadActive';
508 | function ThreaderIsAnyThreadActive():boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderIsAnyThreadActive';
509 | function ThreaderExecuteOnlyInjectedThreads():boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderExecuteOnlyInjectedThreads';
510 | function ThreaderGetOpenHandleForThread(ThreadId:LongInt):THandle; stdcall; external 'TitanEngine.dll' name 'ThreaderGetOpenHandleForThread';
511 | function ThreaderGetThreadData():Pointer; stdcall; external 'TitanEngine.dll' name 'ThreaderGetThreadData';
512 | function ThreaderIsExceptionInMainThread():boolean; stdcall; external 'TitanEngine.dll' name 'ThreaderIsExceptionInMainThread';
513 | {TitanEngine.Debugger.functions}
514 | function StaticDisassembleEx(DisassmStart:LongInt; DisassmAddress:Pointer):PAnsiChar; stdcall; external 'TitanEngine.dll' name 'StaticDisassembleEx';
515 | function StaticDisassemble(DisassmAddress:Pointer):PAnsiChar; stdcall; external 'TitanEngine.dll' name 'StaticDisassemble';
516 | function DisassembleEx(hProcess:THandle; DisassmAddress:Pointer):PAnsiChar; stdcall; external 'TitanEngine.dll' name 'DisassembleEx';
517 | function Disassemble(DisassmAddress:Pointer):PAnsiChar; stdcall; external 'TitanEngine.dll' name 'Disassemble';
518 | function StaticLengthDisassemble(DisassmAddress:Pointer):LongInt; stdcall; external 'TitanEngine.dll' name 'StaticLengthDisassemble';
519 | function LengthDisassembleEx(hProcess:THandle; DisassmAddress:Pointer):LongInt; stdcall; external 'TitanEngine.dll' name 'LengthDisassembleEx';
520 | function LengthDisassemble(DisassmAddress:Pointer):LongInt; stdcall; external 'TitanEngine.dll' name 'LengthDisassemble';
521 | function InitDebug(szFileName,szCommandLine,szCurrentFolder:PAnsiChar): Pointer; stdcall; external 'TitanEngine.dll' name 'InitDebug';
522 | function InitDebugEx(szFileName,szCommandLine,szCurrentFolder:PAnsiChar; EntryCallBack:Pointer): Pointer; stdcall; external 'TitanEngine.dll' name 'InitDebugEx';
523 | function InitDLLDebug(szFileName:PAnsiChar; ReserveModuleBase:boolean; szCommandLine,szCurrentFolder:PAnsiChar; EntryCallBack:Pointer): Pointer; stdcall; external 'TitanEngine.dll' name 'InitDLLDebug';
524 | function StopDebug(): Boolean; stdcall; external 'TitanEngine.dll' name 'StopDebug';
525 | procedure SetBPXOptions(DefaultBreakPointType:LongInt); stdcall; external 'TitanEngine.dll' name 'SetBPXOptions';
526 | function IsBPXEnabled(bpxAddress:LongInt): boolean; stdcall; external 'TitanEngine.dll' name 'IsBPXEnabled';
527 | function EnableBPX(bpxAddress:LongInt): boolean; stdcall; external 'TitanEngine.dll' name 'EnableBPX';
528 | function DisableBPX(bpxAddress:LongInt): boolean; stdcall; external 'TitanEngine.dll' name 'DisableBPX';
529 | function SetBPX(bpxAddress,bpxType:LongInt; bpxCallBack:Pointer): boolean; stdcall; external 'TitanEngine.dll' name 'SetBPX';
530 | function SetBPXEx(bpxAddress,bpxType,NumberOfExecution,CmpRegister,CmpCondition,CmpValue:LongInt; bpxCallBack,bpxCompareCallBack,bpxRemoveCallBack:Pointer): boolean; stdcall; external 'TitanEngine.dll' name 'SetBPXEx';
531 | function DeleteBPX(bpxAddress:LongInt): boolean; stdcall; external 'TitanEngine.dll' name 'DeleteBPX';
532 | function SafeDeleteBPX(bpxAddress:LongInt): boolean; stdcall; external 'TitanEngine.dll' name 'SafeDeleteBPX';
533 | function SetAPIBreakPoint(szDLLName,szAPIName:PAnsiChar; bpxType,bpxPlace:LongInt; bpxCallBack:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'SetAPIBreakPoint';
534 | function DeleteAPIBreakPoint(szDLLName,szAPIName:PAnsiChar; bpxPlace:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'DeleteAPIBreakPoint';
535 | function SafeDeleteAPIBreakPoint(szDLLName,szAPIName:PAnsiChar; bpxPlace:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'SafeDeleteAPIBreakPoint';
536 | function SetMemoryBPX(MemoryStart,SizeOfMemory:LongInt; bpxCallBack:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'SetMemoryBPX';
537 | function SetMemoryBPXEx(MemoryStart,SizeOfMemory,BreakPointType:LongInt; RestoreOnHit:boolean; bpxCallBack:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'SetMemoryBPXEx';
538 | function RemoveMemoryBPX(MemoryStart,SizeOfMemory:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'RemoveMemoryBPX';
539 | function GetContextFPUDataEx(hActiveThread:THandle; FPUSaveArea:Pointer): boolean; stdcall; external 'TitanEngine.dll' name 'GetContextFPUDataEx';
540 | function GetContextDataEx(hActiveThread:THandle; IndexOfRegister:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'GetContextDataEx';
541 | function GetContextData(IndexOfRegister:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'GetContextData';
542 | function SetContextFPUDataEx(hActiveThread:THandle; FPUSaveArea:Pointer): boolean; stdcall; external 'TitanEngine.dll' name 'SetContextFPUDataEx';
543 | function SetContextDataEx(hActiveThread:THandle; IndexOfRegister,NewRegisterValue:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'SetContextDataEx';
544 | function SetContextData(IndexOfRegister,NewRegisterValue:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'SetContextData';
545 | procedure ClearExceptionNumber(); stdcall; external 'TitanEngine.dll' name 'ClearExceptionNumber';
546 | function CurrentExceptionNumber(): LongInt; stdcall; external 'TitanEngine.dll' name 'CurrentExceptionNumber';
547 | function MatchPatternEx(hProcess:THandle; MemoryToCheck,SizeOfMemoryToCheck:LongInt; PatternToMatch:Pointer; SizeOfPatternToMatch:LongInt; WildCard:Pointer): boolean; stdcall; external 'TitanEngine.dll' name 'MatchPatternEx';
548 | function MatchPattern(MemoryToCheck,SizeOfMemoryToCheck:LongInt; PatternToMatch:Pointer; SizeOfPatternToMatch:LongInt; WildCard:Pointer): boolean; stdcall; external 'TitanEngine.dll' name 'MatchPattern';
549 | function FindEx(hProcess:THandle; MemoryStart,MemorySize:LongInt; SearchPattern:Pointer; PatternSize:LongInt; WildCard:Pointer): LongInt; stdcall; external 'TitanEngine.dll' name 'FindEx';
550 | function Find(MemoryStart,MemorySize:LongInt; SearchPattern:Pointer; PatternSize:LongInt; WildCard:Pointer): LongInt; stdcall; external 'TitanEngine.dll' name 'Find';
551 | function FillEx(hProcess:THandle; MemoryStart,MemorySize:LongInt; FillByte:Pointer): boolean; stdcall; external 'TitanEngine.dll' name 'FillEx';
552 | function Fill(MemoryStart,MemorySize:LongInt; FillByte:Pointer): boolean; stdcall; external 'TitanEngine.dll' name 'Fill';
553 | function PatchEx(hProcess:THandle; MemoryStart,MemorySize:LongInt; ReplacePattern:Pointer; ReplaceSize:LongInt; AppendNOP,PrependNOP:boolean): boolean; stdcall; external 'TitanEngine.dll' name 'PatchEx';
554 | function Patch(MemoryStart,MemorySize:LongInt; ReplacePattern:Pointer; ReplaceSize:LongInt; AppendNOP,PrependNOP:boolean): boolean; stdcall; external 'TitanEngine.dll' name 'Patch';
555 | function ReplaceEx(hProcess:THandle; MemoryStart,MemorySize:LongInt; SearchPattern:Pointer; PatternSize,NumberOfRepetitions:LongInt; ReplacePattern:Pointer; ReplaceSize:LongInt; WildCard:Pointer): boolean; stdcall; external 'TitanEngine.dll' name 'ReplaceEx';
556 | function Replace(MemoryStart,MemorySize:LongInt; SearchPattern:Pointer; PatternSize,NumberOfRepetitions:LongInt; ReplacePattern:Pointer; ReplaceSize:LongInt; WildCard:Pointer): boolean; stdcall; external 'TitanEngine.dll' name 'Replace';
557 | function GetDebugData(): Pointer; stdcall; external 'TitanEngine.dll' name 'GetDebugData';
558 | function GetTerminationData(): Pointer; stdcall; external 'TitanEngine.dll' name 'GetTerminationData';
559 | function GetExitCode():LongInt; stdcall; external 'TitanEngine.dll' name 'GetExitCode';
560 | function GetDebuggedDLLBaseAddress(): LongInt; stdcall; external 'TitanEngine.dll' name 'GetDebuggedDLLBaseAddress';
561 | function GetDebuggedFileBaseAddress(): LongInt; stdcall; external 'TitanEngine.dll' name 'GetDebuggedFileBaseAddress';
562 | function GetRemoteString(hProcess:THandle; StringAddress:LongInt; StringStorage:Pointer; MaximumStringSize:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'GetRemoteString';
563 | function GetFunctionParameter(hProcess:THandle; FunctionType,ParameterNumber,ParameterType:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'GetFunctionParameter';
564 | function GetJumpDestinationEx(hProcess:THandle; InstructionAddress:LongInt; JustJumps:boolean): LongInt; stdcall; external 'TitanEngine.dll' name 'GetJumpDestinationEx';
565 | function GetJumpDestination(hProcess:THandle; InstructionAddress:LongInt; JustJumps:boolean): LongInt; stdcall; external 'TitanEngine.dll' name 'GetJumpDestination';
566 | function IsJumpGoingToExecuteEx(hProcess,hThread:THandle; InstructionAddress,RegFlags:LongInt): boolean; stdcall; external 'TitanEngine.dll' name 'IsJumpGoingToExecuteEx';
567 | function IsJumpGoingToExecute(): boolean; stdcall; external 'TitanEngine.dll' name 'IsJumpGoingToExecute';
568 | procedure SetCustomHandler(WhichException:LongInt; CallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'SetCustomHandler';
569 | procedure ForceClose(); stdcall; external 'TitanEngine.dll' name 'ForceClose';
570 | procedure StepInto(traceCallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'StepInto';
571 | procedure StepOver(traceCallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'StepOver';
572 | procedure SingleStep(StepCount:LongInt; StepCallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'SingleStep';
573 | function GetUnusedHardwareBreakPointRegister(RegisterIndex:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'GetUnusedHardwareBreakPointRegister';
574 | function SetHardwareBreakPointEx(hActiveThread:THandle; bpxAddress,IndexOfRegister,bpxType,bpxSize:LongInt; bpxCallBack,IndexOfSelectedRegister:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'SetHardwareBreakPointEx';
575 | function SetHardwareBreakPoint(bpxAddress,IndexOfRegister,bpxType,bpxSize:LongInt; bpxCallBack:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'SetHardwareBreakPoint';
576 | function DeleteHardwareBreakPoint(IndexOfRegister:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'DeleteHardwareBreakPoint';
577 | function RemoveAllBreakPoints(RemoveOption:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'RemoveAllBreakPoints';
578 | function GetProcessInformation(): Pointer; stdcall; external 'TitanEngine.dll' name 'GetProcessInformation';
579 | function GetStartupInformation(): Pointer; stdcall; external 'TitanEngine.dll' name 'GetStartupInformation';
580 | procedure DebugLoop(); stdcall; external 'TitanEngine.dll' name 'DebugLoop';
581 | procedure SetDebugLoopTimeOut(TimeOut:LongInt); stdcall; external 'TitanEngine.dll' name 'SetDebugLoopTimeOut';
582 | procedure SetNextDbgContinueStatus(SetDbgCode:LongInt); stdcall; external 'TitanEngine.dll' name 'SetNextDbgContinueStatus';
583 | function AttachDebugger(ProcessId:LongInt; KillOnExit:Boolean; DebugInfo,CallBack:Pointer): Pointer; stdcall; external 'TitanEngine.dll' name 'AttachDebugger';
584 | function DetachDebugger(ProcessId:LongInt): Pointer; stdcall; external 'TitanEngine.dll' name 'DetachDebugger';
585 | function DetachDebuggerEx(ProcessId:LongInt): Pointer; stdcall; external 'TitanEngine.dll' name 'DetachDebuggerEx';
586 | function DebugLoopEx(TimeOut:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'DebugLoopEx';
587 | procedure AutoDebugEx(szFileName:PAnsiChar; ReserveModuleBase:boolean; szCommandLine,szCurrentFolder:PAnsiChar; TimeOut:LongInt; EntryCallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'AutoDebugEx';
588 | function IsFileBeingDebugged(): boolean; stdcall; external 'TitanEngine.dll' name 'IsFileBeingDebugged';
589 | procedure SetErrorModel(DisplayErrorMessages:boolean); stdcall; external 'TitanEngine.dll' name 'SetErrorModel';
590 | {TitanEngine.Importer.functions}
591 | procedure ImporterCleanup(); stdcall; external 'TitanEngine.dll' name 'ImporterCleanup';
592 | procedure ImporterSetImageBase(ImageBase:LongInt); stdcall; external 'TitanEngine.dll' name 'ImporterSetImageBase';
593 | procedure ImporterSetUnknownDelta(DeltaAddress:LongInt); stdcall; external 'TitanEngine.dll' name 'ImporterSetUnknownDelta';
594 | function ImporterGetCurrentDelta():LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetCurrentDelta';
595 | procedure ImporterInit(MemorySize,ImageBase:LongInt); stdcall; external 'TitanEngine.dll' name 'ImporterInit';
596 | procedure ImporterAddNewDll(DLLName:PAnsiChar; FirstThunk:LongInt); stdcall; external 'TitanEngine.dll' name 'ImporterAddNewDll';
597 | procedure ImporterAddNewAPI(APIName:PAnsiChar; FirstThunk:LongInt); stdcall; external 'TitanEngine.dll' name 'ImporterAddNewAPI';
598 | procedure ImporterAddNewOrdinalAPI(dwAPIName,FirstThunk:LongInt); stdcall; external 'TitanEngine.dll' name 'ImporterAddNewAPI';
599 | function ImporterGetAddedDllCount(): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetAddedDllCount';
600 | function ImporterGetAddedAPICount(): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetAddedAPICount';
601 | function ImporterGetLastAddedDLLName(): PAnsiChar; stdcall; external 'TitanEngine.dll' name 'ImporterGetLastAddedDLLName';
602 | procedure ImporterMoveIAT(); stdcall; external 'TitanEngine.dll' name 'ImporterMoveIAT';
603 | function ImporterExportIAT(StorePlace,FileMap:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'ImporterExportIAT';
604 | function ImporterEstimatedSize(): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterEstimatedSize';
605 | function ImporterExportIATEx(szExportFileName,szSectionName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ImporterExportIATEx';
606 | function ImporterFindAPIWriteLocation(szAPIName:PAnsiChar): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterFindAPIWriteLocation';
607 | function ImporterFindOrdinalAPIWriteLocation(OrdinalNumber:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterFindOrdinalAPIWriteLocation';
608 | function ImporterFindAPIByWriteLocation(APIWriteLocation:PAnsiChar): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterFindAPIByWriteLocation';
609 | function ImporterFindDLLByWriteLocation(APIWriteLocation:PAnsiChar): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterFindDLLByWriteLocation';
610 | function ImporterGetDLLName(APIAddress:LongInt): PAnsiChar; stdcall; external 'TitanEngine.dll' name 'ImporterGetDLLName';
611 | function ImporterGetAPIName(APIAddress:LongInt): PAnsiChar; stdcall; external 'TitanEngine.dll' name 'ImporterGetAPIName';
612 | function ImporterGetAPIOrdinalNumber(APIAddress:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetAPIOrdinalNumber';
613 | function ImporterGetAPINameEx(APIAddress:LongInt; pDLLBases:Pointer): PAnsiChar; stdcall; external 'TitanEngine.dll' name 'ImporterGetAPINameEx';
614 | function ImporterGetRemoteAPIAddress(hProcess:THandle; APIAddress:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetRemoteAPIAddress';
615 | function ImporterGetRemoteAPIAddressEx(szDLLName,szAPIName:PAnsiChar): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetRemoteAPIAddressEx';
616 | function ImporterGetLocalAPIAddress(hProcess:THandle; APIAddress:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetLocalAPIAddress';
617 | function ImporterGetDLLNameFromDebugee(hProcess:THandle; APIAddress:LongInt): PAnsiChar; stdcall; external 'TitanEngine.dll' name 'ImporterGetDLLNameFromDebugee';
618 | function ImporterGetAPINameFromDebugee(hProcess:THandle; APIAddress:LongInt): PAnsiChar; stdcall; external 'TitanEngine.dll' name 'ImporterGetAPINameFromDebugee';
619 | function ImporterGetAPIOrdinalNumberFromDebugee(hProcess:THandle; APIAddress:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetAPIOrdinalNumberFromDebugee';
620 | function ImporterGetDLLIndexEx(APIAddress:LongInt; pDLLBases:Pointer): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetDLLIndexEx';
621 | function ImporterGetDLLIndex(hProcess:THandle; APIAddress:LongInt; pDLLBases:Pointer): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetDLLIndex';
622 | function ImporterGetRemoteDLLBase(hProcess:THandle; LocalModuleBase:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetRemoteDLLBase';
623 | function ImporterRelocateWriteLocation(AddValue:LongInt): boolean; stdcall; external 'TitanEngine.dll' name 'ImporterRelocateWriteLocation';
624 | function ImporterIsForwardedAPI(hProcess:THandle; APIAddress:LongInt): boolean; stdcall; external 'TitanEngine.dll' name 'ImporterIsForwardedAPI';
625 | function ImporterGetForwardedAPIName(hProcess:THandle; APIAddress:LongInt): PAnsiChar; stdcall; external 'TitanEngine.dll' name 'ImporterGetForwardedAPIName';
626 | function ImporterGetForwardedDLLName(hProcess:THandle; APIAddress:LongInt): PAnsiChar; stdcall; external 'TitanEngine.dll' name 'ImporterGetForwardedDLLName';
627 | function ImporterGetForwardedDLLIndex(hProcess:THandle; APIAddress:LongInt; pDLLBases:Pointer): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetForwardedDLLIndex';
628 | function ImporterGetForwardedAPIOrdinalNumber(hProcess:THandle; APIAddress:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetForwardedAPIOrdinalNumber';
629 | function ImporterGetNearestAPIAddress(hProcess:THandle; APIAddress:LongInt): LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterGetNearestAPIAddress';
630 | function ImporterGetNearestAPIName(hProcess:THandle; APIAddress:LongInt): PAnsiChar; stdcall; external 'TitanEngine.dll' name 'ImporterGetNearestAPIName';
631 | function ImporterCopyOriginalIAT(szOriginalFile,szDumpFile:PAnsiChar): boolean; stdcall; external 'TitanEngine.dll' name 'ImporterCopyOriginalIAT';
632 | function ImporterLoadImportTable(szFileName:PAnsiChar): boolean; stdcall; external 'TitanEngine.dll' name 'ImporterLoadImportTable';
633 | function ImporterMoveOriginalIAT(szOriginalFile,szDumpFile,szSectionName:PAnsiChar): boolean; stdcall; external 'TitanEngine.dll' name 'ImporterMoveOriginalIAT';
634 | procedure ImporterAutoSearchIAT(pFileName:PAnsiChar;ImageBase,SearchStart,SearchSize:LongInt;pIATStart,pIATSize:Pointer); stdcall; external 'TitanEngine.dll' name 'ImporterAutoSearchIAT';
635 | procedure ImporterAutoSearchIATEx(hProcess:LongInt;ImageBase,SearchStart,SearchSize:LongInt;pIATStart,pIATSize:Pointer); stdcall; external 'TitanEngine.dll' name 'ImporterAutoSearchIATEx';
636 | procedure ImporterEnumAddedData(EnumCallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'ImporterEnumAddedData';
637 | function ImporterAutoFixIAT(hProcess:LongInt;pFileName:PAnsiChar;ImageBase,SearchStart,SearchSize,SearchStep:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterAutoFixIAT';
638 | function ImporterAutoFixIATEx(hProcess:LongInt;pFileName,szSectionName:PAnsiChar;DumpRunningProcess,RealignFile:boolean;EntryPointAddress,ImageBase,SearchStart,SearchSize,SearchStep:LongInt;TryAutoFix,FixEliminations:boolean;UnknownPointerFixCallback:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'ImporterAutoFixIATEx';
639 | {TitanEngine.Hooks.functions}
640 | function HooksSafeTransitionEx(HookAddressArray:Pointer; NumberOfHooks:LongInt; TransitionStart:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'HooksSafeTransitionEx';
641 | function HooksSafeTransition(HookAddressArray:Pointer; TransitionStart:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'HooksSafeTransition';
642 | function HooksIsAddressRedirected(HookAddressArray:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'HooksIsAddressRedirected';
643 | function HooksGetTrampolineAddress(HookAddressArray:Pointer):Pointer; stdcall; external 'TitanEngine.dll' name 'HooksGetTrampolineAddress';
644 | function HooksGetHookEntryDetails(HookAddressArray:Pointer):Pointer; stdcall; external 'TitanEngine.dll' name 'HooksGetHookEntryDetails';
645 | function HooksInsertNewRedirection(HookAddressArray,RedirectTo:Pointer; HookType:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'HooksInsertNewRedirection';
646 | function HooksInsertNewIATRedirectionEx(FileMapVA,LoadedModuleBase:LongInt; szHookFunction:PAnsiChar; RedirectTo:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'HooksInsertNewIATRedirectionEx';
647 | function HooksInsertNewIATRedirection(szModuleName,szHookFunction:PAnsiChar; RedirectTo:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'HooksInsertNewIATRedirection';
648 | function HooksRemoveRedirection(HookAddressArray:Pointer; RemoveAll:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'HooksRemoveRedirection';
649 | function HooksRemoveRedirectionsForModule(ModuleBase:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'HooksRemoveRedirectionsForModule';
650 | function HooksDisableRedirection(HookAddressArray:Pointer; DisableAll:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'HooksDisableRedirection';
651 | function HooksDisableRedirectionsForModule(ModuleBase:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'HooksDisableRedirectionsForModule';
652 | function HooksEnableRedirection(HookAddressArray:Pointer; EnableAll:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'HooksEnableRedirection';
653 | function HooksEnableRedirectionsForModule(ModuleBase:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'HooksEnableRedirectionsForModule';
654 | function HooksRemoveIATRedirection(szModuleName,szHookFunction:PAnsiChar; RemoveAll:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'HooksRemoveIATRedirection';
655 | function HooksDisableIATRedirection(szModuleName,szHookFunction:PAnsiChar; DisableAll:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'HooksDisableIATRedirection';
656 | function HooksEnableIATRedirection(szModuleName,szHookFunction:PAnsiChar; EnableAll:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'HooksEnableIATRedirection';
657 | procedure HooksScanModuleMemory(ModuleBase:LongInt; CallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'HooksScanModuleMemory';
658 | procedure HooksScanEntireProcessMemory(CallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'HooksScanEntireProcessMemory';
659 | procedure HooksScanEntireProcessMemoryEx(); stdcall; external 'TitanEngine.dll' name 'HooksScanEntireProcessMemoryEx';
660 | {TitanEngine.Tracer.functions}
661 | procedure TracerInit(); stdcall; external 'TitanEngine.dll' name 'TracerInit';
662 | function TracerLevel1(hProcess,APIAddress:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'TracerLevel1';
663 | function HashTracerLevel1(hProcess,APIAddress,NumberOfInstructions:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'HashTracerLevel1';
664 | function TracerDetectRedirection(hProcess,APIAddress:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'TracerDetectRedirection';
665 | function TracerFixKnownRedirection(hProcess,APIAddress,RedirectionId:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'TracerFixKnownRedirection';
666 | function TracerFixRedirectionViaImpRecPlugin(hProcess:LongInt;szPluginName:PAnsiChar;APIAddress:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'TracerFixRedirectionViaImpRecPlugin';
667 | {TitanEngine.Exporter.functions}
668 | procedure ExporterCleanup(); stdcall; external 'TitanEngine.dll' name 'ExporterCleanup';
669 | procedure ExporterSetImageBase(ImageBase:LongInt); stdcall; external 'TitanEngine.dll' name 'ExporterSetImageBase';
670 | procedure ExporterInit(MemorySize,ImageBase,ExportOrdinalBase:LongInt; szExportModuleName:PAnsiChar); stdcall; external 'TitanEngine.dll' name 'ExporterInit';
671 | function ExporterAddNewExport(szExportName:PAnsiChar; ExportRelativeAddress:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'ExporterAddNewExport';
672 | function ExporterAddNewOrdinalExport(OrdinalNumber,ExportRelativeAddress:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'ExporterAddNewOrdinalExport';
673 | function ExporterGetAddedExportCount():LongInt; stdcall; external 'TitanEngine.dll' name 'ExporterGetAddedExportCount';
674 | function ExporterEstimatedSize():LongInt; stdcall; external 'TitanEngine.dll' name 'ExporterEstimatedSize';
675 | function ExporterBuildExportTable(StorePlace,FileMapVA:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'ExporterBuildExportTable';
676 | function ExporterBuildExportTableEx(szExportFileName,szSectionName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ExporterBuildExportTableEx';
677 | function ExporterLoadExportTable(szFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ExporterLoadExportTable';
678 | {TitanEngine.Librarian.functions}
679 | function LibrarianSetBreakPoint(szLibraryName:PAnsiChar; bpxType:LongInt; SingleShoot:boolean; bpxCallBack:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'LibrarianSetBreakPoint';
680 | function LibrarianRemoveBreakPoint(szLibraryName:PAnsiChar; bpxType:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'LibrarianRemoveBreakPoint';
681 | function LibrarianGetLibraryInfo(szLibraryName:PAnsiChar):Pointer; stdcall; external 'TitanEngine.dll' name 'LibrarianGetLibraryInfo';
682 | function LibrarianGetLibraryInfoEx(BaseOfDll:Pointer):Pointer; stdcall; external 'TitanEngine.dll' name 'LibrarianGetLibraryInfoEx';
683 | procedure LibrarianEnumLibraryInfo(BaseOfDll:Pointer); stdcall; external 'TitanEngine.dll' name 'LibrarianEnumLibraryInfo';
684 | {TitanEngine.Process.functions}
685 | function GetActiveProcessId(szImageName:PAnsiChar):LongInt; stdcall; external 'TitanEngine.dll' name 'GetActiveProcessId';
686 | function EnumProcessesWithLibrary(szLibraryName:PAnsiChar; EnumFunction:Pointer):LongInt; stdcall; external 'TitanEngine.dll' name 'EnumProcessesWithLibrary';
687 | {TitanEngine.TLSFixer.functions}
688 | function TLSBreakOnCallBack(ArrayOfCallBacks:Pointer; NumberOfCallBacks:LongInt; bpxCallBack:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'TLSBreakOnCallBack';
689 | function TLSGrabCallBackData(szFileName:PAnsiChar; ArrayOfCallBacks,NumberOfCallBacks:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'TLSGrabCallBackData';
690 | function TLSBreakOnCallBackEx(szFileName:PAnsiChar; bpxCallBack:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'TLSBreakOnCallBackEx';
691 | function TLSRemoveCallback(szFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'TLSRemoveCallback';
692 | function TLSRemoveTable(szFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'TLSRemoveTable';
693 | function TLSBackupData(szFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'TLSBackupData';
694 | function TLSRestoreData():boolean; stdcall; external 'TitanEngine.dll' name 'TLSRestoreData';
695 | function TLSBuildNewTable(FileMapVA,StorePlace,StorePlaceRVA:LongInt; ArrayOfCallBacks:Pointer; NumberOfCallBacks:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'TLSBuildNewTable';
696 | function TLSBuildNewTableEx(szFileName,szSectionName:PAnsiChar; ArrayOfCallBacks:Pointer; NumberOfCallBacks:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'TLSBuildNewTableEx';
697 | {TitanEngine.TranslateName.functions}
698 | function TranslateNativeName(szNativeName:PAnsiChar):PAnsiChar; stdcall; external 'TitanEngine.dll' name 'TranslateNativeName';
699 | {TitanEngine.Handler.functions}
700 | function HandlerGetActiveHandleCount(ProcessId:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'HandlerGetActiveHandleCount';
701 | function HandlerIsHandleOpen(ProcessId:LongInt; hHandle:THandle):boolean; stdcall; external 'TitanEngine.dll' name 'HandlerIsHandleOpen';
702 | function HandlerGetHandleName(hProcess:THandle; ProcessId:LongInt; hHandle:THandle; TranslateName:boolean):PAnsiChar; stdcall; external 'TitanEngine.dll' name 'HandlerGetHandleName';
703 | function HandlerEnumerateOpenHandles(ProcessId:LongInt; HandleBuffer:Pointer; MaxHandleCount:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'HandlerEnumerateOpenHandles';
704 | function HandlerGetHandleDetails(hProcess:THandle; ProcessId:LongInt; hHandle:THandle; InformationReturn:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'HandlerGetHandleDetails';
705 | function HandlerCloseRemoteHandle(ProcessId:LongInt; hHandle:THandle):boolean; stdcall; external 'TitanEngine.dll' name 'HandlerCloseRemoteHandle';
706 | function HandlerEnumerateLockHandles(szFileOrFolderName:PAnsiChar; NameIsFolder,NameIsTranslated:boolean; HandleDataBuffer:Pointer; MaxHandleCount:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'HandlerEnumerateLockHandles';
707 | function HandlerCloseAllLockHandles(szFileOrFolderName:PAnsiChar; NameIsFolder,NameIsTranslated:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'HandlerCloseAllLockHandles';
708 | function HandlerIsFileLocked(szFileOrFolderName:PAnsiChar; NameIsFolder,NameIsTranslated:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'HandlerIsFileLocked';
709 | function HandlerEnumerateOpenMutexes(hProcess:THandle; ProcessId:LongInt; HandleBuffer:Pointer; MaxHandleCount:LongInt):LongInt; stdcall; external 'TitanEngine.dll' name 'HandlerEnumerateOpenMutexes';
710 | function HandlerGetOpenMutexHandle(hProcess:THandle; ProcessId:LongInt; szMutexString:PAnsiChar):LongInt; stdcall; external 'TitanEngine.dll' name 'HandlerGetOpenMutexHandle';
711 | function HandlerGetProcessIdWhichCreatedMutex(szMutexString:PAnsiChar):LongInt; stdcall; external 'TitanEngine.dll' name 'HandlerGetProcessIdWhichCreatedMutex';
712 | {TitanEngine.Injector.functions}
713 | function RemoteLoadLibrary(hProcess:THandle; szLibraryFile:PAnsiChar; WaitForThreadExit:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'RemoteLoadLibrary';
714 | function RemoteFreeLibrary(hProcess:THandle; hModule:LongInt; szLibraryFile:PAnsiChar; WaitForThreadExit:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'RemoteFreeLibrary';
715 | function RemoteExitProcess(hProcess:THandle; ExitCode:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'RemoteExitProcess';
716 | {TitanEngine.StaticUnpacker.functions}
717 | function StaticFileLoad(szFileName:PAnsiChar; DesiredAccess:LongInt; SimulateLoad:boolean; FileHandle,LoadedSize,FileMap,FileMapVA:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'StaticFileLoad';
718 | function StaticFileUnload(szFileName:PAnsiChar; CommitChanges:boolean; FileHandle,LoadedSize,FileMap,FileMapVA:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'StaticFileUnload';
719 | function StaticFileOpen(szFileName:PAnsiChar; DesiredAccess:LongInt; FileHandle,FileSizeLow,FileSizeHigh:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'StaticFileOpen';
720 | function StaticFileGetContent(FileHandle:THandle; FilePositionLow:LongInt; FilePositionHigh,Buffer:Pointer; Size:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'StaticFileGetContent';
721 | procedure StaticFileClose(FileHandle:THandle); stdcall; external 'TitanEngine.dll' name 'StaticFileClose';
722 | procedure StaticMemoryDecrypt(MemoryStart,MemorySize,DecryptionType,DecryptionKeySize,DecryptionKey:LongInt); stdcall; external 'TitanEngine.dll' name 'StaticMemoryDecrypt';
723 | procedure StaticMemoryDecryptEx(MemoryStart,MemorySize,DecryptionKeySize:LongInt; DecryptionCallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'StaticMemoryDecryptEx';
724 | procedure StaticMemoryDecryptSpecial(MemoryStart,MemorySize,DecryptionKeySize,SpecDecryptionType:LongInt; DecryptionCallBack:Pointer); stdcall; external 'TitanEngine.dll' name 'StaticMemoryDecryptSpecial';
725 | procedure StaticSectionDecrypt(FileMapVA,SectionNumber:LongInt; SimulateLoad:boolean; DecryptionType,DecryptionKeySize,DecryptionKey:LongInt); stdcall; external 'TitanEngine.dll' name 'StaticSectionDecrypt';
726 | function StaticMemoryDecompress(Source,SourceSize,Destination,DestinationSize,Algorithm:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'StaticMemoryDecompress';
727 | function StaticRawMemoryCopy(hFile:THandle; FileMapVA,VitualAddressToCopy,Size:LongInt; AddressIsRVA:boolean; szDumpFileName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'StaticRawMemoryCopy';
728 | function StaticHashMemory(MemoryToHash:Pointer; SizeOfMemory:LongInt; HashDigest:Pointer; OutputString:boolean; Algorithm:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'StaticHashMemory';
729 | function StaticHashFile(szFileName,HashDigest:PAnsiChar; OutputString:boolean; Algorithm:LongInt):boolean; stdcall; external 'TitanEngine.dll' name 'StaticHashFile';
730 | {TitanEngine.Engine.functions}
731 | procedure SetEngineVariable(VariableId:LongInt; VariableSet:boolean); stdcall; external 'TitanEngine.dll' name 'SetEngineVariable';
732 | function EngineCreateMissingDependencies(szFileName,szOutputFolder:PAnsiChar; LogCreatedFiles:boolean):boolean; stdcall; external 'TitanEngine.dll' name 'EngineCreateMissingDependencies';
733 | function EngineFakeMissingDependencies(hProcess:THandle):boolean; stdcall; external 'TitanEngine.dll' name 'EngineCreateMissingDependencies';
734 | function EngineDeleteCreatedDependencies():boolean; stdcall; external 'TitanEngine.dll' name 'EngineDeleteCreatedDependencies';
735 | function EngineCreateUnpackerWindow(WindowUnpackerTitle,WindowUnpackerLongTitleWindowUnpackerName,WindowUnpackerAuthor:PChar; StartUnpackingCallBack:Pointer):boolean; stdcall; external 'TitanEngine.dll' name 'EngineCreateUnpackerWindow';
736 | procedure EngineAddUnpackerWindowLogMessage(szLogMessage:PChar); stdcall; external 'TitanEngine.dll' name 'EngineAddUnpackerWindowLogMessage';
737 | {TitanEngine.Extension.functions}
738 | function ExtensionManagerIsPluginLoaded(szPluginName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ExtensionManagerIsPluginLoaded';
739 | function ExtensionManagerIsPluginEnabled(szPluginName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ExtensionManagerIsPluginEnabled';
740 | function ExtensionManagerDisableAllPlugins():boolean; stdcall; external 'TitanEngine.dll' name 'ExtensionManagerDisableAllPlugins';
741 | function ExtensionManagerDisablePlugin(szPluginName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ExtensionManagerDisablePlugin';
742 | function ExtensionManagerEnableAllPlugins():boolean; stdcall; external 'TitanEngine.dll' name 'ExtensionManagerEnableAllPlugins';
743 | function ExtensionManagerEnablePlugin(szPluginName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ExtensionManagerEnablePlugin';
744 | function ExtensionManagerUnloadAllPlugins():boolean; stdcall; external 'TitanEngine.dll' name 'ExtensionManagerUnloadAllPlugins';
745 | function ExtensionManagerUnloadPlugin(szPluginName:PAnsiChar):boolean; stdcall; external 'TitanEngine.dll' name 'ExtensionManagerUnloadPlugin';
746 | function ExtensionManagerGetPluginInfo(szPluginName:PAnsiChar):Pointer; stdcall; external 'TitanEngine.dll' name 'ExtensionManagerGetPluginInfo';
747 |
748 | implementation
749 |
750 | end.
751 |
--------------------------------------------------------------------------------
/pluginsdk_delphi/_plugins.pas:
--------------------------------------------------------------------------------
1 | Unit _plugins;
2 |
3 | (**
4 | *
5 | * Ported form _plugins.h (x64_dbg-PluginSDK v0.10) to Unit Delphi by quygia128
6 | * Home: http://cin1team.biz
7 | * Blog: http://crackertool.blogspot.com (www.crackertool.tk)
8 | * Last Edit: 06.30.2014 by quygia128
9 | *
10 | * Update: https://github.com/quygia128
11 | *
12 | * Thanks to TQN for Delphi Coding, phpbb3 and BOB for Nice Plugin(Tools) Power By Delphi,
13 | * all my friends at CiN1Team(ALL CIN1'S MEMBER) & Other RCE Team.
14 | * Of course thanks to Mr.eXodia author of x64_dbg, Nice Work!
15 | *
16 | **)
17 |
18 | interface
19 |
20 | uses
21 | Windows, bridgemain;
22 |
23 | {$ALIGN 1} // Struct byte alignment
24 | {$WARN UNSAFE_CODE OFF}
25 | {$WARN UNSAFE_TYPE OFF}
26 | {$WARN UNSAFE_CAST OFF}
27 | //{$DEFINE WIN64}
28 |
29 | Type
30 |
31 | {$IFDEF WIN64}
32 | {$MINENUMSIZE 8} // Size of enumerated types are 8 bytes
33 | duint = UInt64;
34 | dsint = Int64;
35 | pduint = ^duint;
36 | pdsint = ^dsint;
37 | {$ELSE}
38 | {$MINENUMSIZE 4} // Size of enumerated types are 4 bytes
39 | duint = ULong;
40 | dsint = LongInt;
41 | pduint = ^duint;
42 | pdsint = ^dsint;
43 | {$ENDIF} //WIN64
44 |
45 | {$IFDEF UNICODE}
46 | AChar = AnsiChar; // Delphi 6,7 SRC Work With Delphi 2009, 2010, XE.x
47 | PAChar = PAnsiChar; // Delphi 6,7 SRC Work With Delphi 2009, 2010, XE.x
48 | {$ELSE}
49 | AChar = Char;
50 | PAChar = PChar;
51 | {$ENDIF}
52 |
53 | const
54 | PLUG_SDKVERSION = $1;
55 | {$IFDEF WIN64}
56 | x32_DBG = 'x64_dbg.dll';
57 | {$ELSE}
58 | x32_DBG = 'x32_dbg.dll';
59 | {$ENDIF}
60 |
61 |
62 | Type
63 |
64 | PPLUG_INITSTRUCT = ^PLUG_INITSTRUCT;
65 | PLUG_INITSTRUCT = packed record
66 | //provided by the debugger
67 | pluginHandle: Integer;
68 | //provided by the pluginit function
69 | sdkVersion: Integer;
70 | pluginVersion: Integer;
71 | pluginName:array[0..255] of AChar;
72 | end;
73 |
74 | PPLUG_SETUPSTRUCT = ^PLUG_SETUPSTRUCT;
75 | PLUG_SETUPSTRUCT = packed record
76 | //provided by the debugger
77 | hwndDlg: HWND; //gui window handle
78 | hMenu: Integer; //plugin menu handle
79 | end;
80 |
81 | //callback structures
82 | PPLUG_CB_INITDEBUG = ^PLUG_CB_INITDEBUG;
83 | PLUG_CB_INITDEBUG = packed record
84 | szFileName: PAChar;
85 | end;
86 |
87 | PPLUG_CB_STOPDEBUG = ^PLUG_CB_STOPDEBUG;
88 | PLUG_CB_STOPDEBUG = packed record
89 | reserved: Pointer;
90 | end;
91 |
92 | PPLUG_CB_CREATEPROCESS = ^PLUG_CB_CREATEPROCESS;
93 | PLUG_CB_CREATEPROCESS = Packed record
94 | CreateProcessInfo: {CREATE_PROCESS_DEBUG_INFO*}PCreateProcessDebugInfo;
95 | modInfo: PIMAGEHLP_MODULE64;
96 | DebugFileName: PAChar;
97 | fdProcessInfo: {PROCESS_INFORMATION*}PProcessInformation;
98 | end;
99 |
100 | PPLUG_CB_EXITPROCESS = ^PLUG_CB_EXITPROCESS;
101 | PLUG_CB_EXITPROCESS = packed record
102 | ExitProcess: {EXIT_PROCESS_DEBUG_INFO*}PExitProcessDebugInfo;
103 | end;
104 |
105 | PPLUG_CB_CREATETHREAD = ^PLUG_CB_CREATETHREAD;
106 | PLUG_CB_CREATETHREAD = packed record
107 | CreateThread: {CREATE_THREAD_DEBUG_INFO*}PCreateThreadDebugInfo;
108 | dwThreadId: DWORD;
109 | end;
110 |
111 | PPLUG_CB_EXITTHREAD = ^PLUG_CB_EXITTHREAD;
112 | PLUG_CB_EXITTHREAD = packed record
113 | ExitThread: {EXIT_THREAD_DEBUG_INFO*}PExitThreadDebugInfo;
114 | dwThreadId: DWORD;
115 | end;
116 |
117 | PPLUG_CB_SYSTEMBREAKPOINT = ^PLUG_CB_SYSTEMBREAKPOINT;
118 | PLUG_CB_SYSTEMBREAKPOINT = packed record
119 | reserved: Pointer;
120 | end;
121 |
122 | PPLUG_CB_LOADDLL = ^PLUG_CB_LOADDLL;
123 | PLUG_CB_LOADDLL = packed record
124 | LoadDll: {LOAD_DLL_DEBUG_INFO*}PLoadDLLDebugInfo;
125 | modInfo: PIMAGEHLP_MODULE64;
126 | modname: PAChar;
127 | end;
128 |
129 | PPLUG_CB_UNLOADDLL = ^PLUG_CB_UNLOADDLL;
130 | PLUG_CB_UNLOADDLL = packed record
131 | UnloadDll: {UNLOAD_DLL_DEBUG_INFO*}PUnloadDLLDebugInfo;
132 | end;
133 |
134 | PPLUG_CB_OUTPUTDEBUGSTRING = ^PLUG_CB_OUTPUTDEBUGSTRING;
135 | PLUG_CB_OUTPUTDEBUGSTRING = packed record
136 | DebugString: {OUTPUT_DEBUG_STRING_INFO*}POutputDebugStringInfo;
137 | end;
138 |
139 | PPLUG_CB_EXCEPTION = ^PLUG_CB_EXCEPTION;
140 | PLUG_CB_EXCEPTION = packed record
141 | Exception: {EXCEPTION_DEBUG_INFO*}PExceptionDebugInfo;
142 | end;
143 |
144 | PPLUG_CB_BREAKPOINT = ^PLUG_CB_BREAKPOINT;
145 | PLUG_CB_BREAKPOINT = packed record
146 | breakpoint: PBRIDGEBP;
147 | end;
148 |
149 | PPLUG_CB_PAUSEDEBUG = ^PLUG_CB_PAUSEDEBUG;
150 | PLUG_CB_PAUSEDEBUG = packed record
151 | reserved: Pointer;
152 | end;
153 |
154 | PPLUG_CB_RESUMEDEBUG = ^PLUG_CB_RESUMEDEBUG;
155 | PLUG_CB_RESUMEDEBUG = packed record
156 | reserved: Pointer;
157 | end;
158 |
159 | PPLUG_CB_STEPPED = ^PLUG_CB_STEPPED;
160 | PLUG_CB_STEPPED = packed record
161 | reserved: Pointer;
162 | end;
163 |
164 | PPLUG_CB_ATTACH = ^PLUG_CB_ATTACH;
165 | PLUG_CB_ATTACH = packed record
166 | dwProcessId: DWORD;
167 | end;
168 |
169 | PPLUG_CB_DETACH = ^PLUG_CB_DETACH;
170 | PLUG_CB_DETACH = packed record
171 | fdProcessInfo: {PROCESS_INFORMATION*}PProcessInformation;
172 | end;
173 |
174 | PPLUG_CB_DEBUGEVENT = ^PLUG_CB_DEBUGEVENT;
175 | PLUG_CB_DEBUGEVENT = packed record
176 | DebugEvent: {DEBUG_EVENT*}PDebugEvent;
177 | end;
178 |
179 | PPLUG_CB_MENUENTRY = ^PLUG_CB_MENUENTRY;
180 | PLUG_CB_MENUENTRY = packed record
181 | hEntry: Integer;
182 | end;
183 |
184 | Type
185 | CBTYPE = (
186 | CB_INITDEBUG, //PLUG_CB_INITDEBUG
187 | CB_STOPDEBUG, //PLUG_CB_STOPDEBUG
188 | CB_CREATEPROCESS, //PLUG_CB_CREATEPROCESS
189 | CB_EXITPROCESS, //PLUG_CB_EXITPROCESS
190 | CB_CREATETHREAD, //PLUG_CB_CREATETHREAD
191 | CB_EXITTHREAD, //PLUG_CB_EXITTHREAD
192 | CB_SYSTEMBREAKPOINT, //PLUG_CB_SYSTEMBREAKPOINT
193 | CB_LOADDLL, //PLUG_CB_LOADDLL
194 | CB_UNLOADDLL, //PLUG_CB_UNLOADDLL
195 | CB_OUTPUTDEBUGSTRING, //PLUG_CB_OUTPUTDEBUGSTRING
196 | CB_EXCEPTION, //PLUG_CB_EXCEPTION
197 | CB_BREAKPOINT, //PLUG_CB_BREAKPOINT
198 | CB_PAUSEDEBUG, //PLUG_CB_PAUSEDEBUG
199 | CB_RESUMEDEBUG, //PLUG_CB_RESUMEDEBUG
200 | CB_STEPPED, //PLUG_CB_STEPPED
201 | CB_ATTACH, //PLUG_CB_ATTACHED (before attaching, after CB_INITDEBUG)
202 | CB_DETACH, //PLUG_CB_DETACH (before detaching, before CB_STOPDEBUG)
203 | CB_DEBUGEVENT, //PLUG_CB_DEBUGEVENT (called on any debug event)
204 | CB_MENUENTRY //PLUG_CB_MENUENTRY
205 | );
206 |
207 | //typedef void (*CBPLUGIN)(CBTYPE cbType, void* callbackInfo);
208 | //typedef bool (*CBPLUGINCOMMAND)(int, char**);
209 | CBPLUGIN = procedure(cbType: CBTYPE;callbackInfo: Pointer); cdecl;
210 | CBPLUGINCOMMAND = function(argc: Integer;Command: PPAnsiChar): Boolean; cdecl;
211 |
212 |
213 | {PLUG_IMPEXP void} procedure _plugin_registercallback(pluginHandle: Integer;CB_Type: CBTYPE;cb_Plugin: CBPLUGIN); cdecl; external x32_DBG;
214 | {PLUG_IMPEXP bool} function _plugin_unregistercallback(pluginHandle: Integer;CB_Type: CBTYPE): Boolean; cdecl; external x32_DBG;
215 | {PLUG_IMPEXP bool} function _plugin_registercommand(pluginHandle: Integer;const command: PAChar;cbCommand: CBPLUGINCOMMAND;debugonly: Boolean): Boolean; cdecl; external x32_DBG;
216 | {PLUG_IMPEXP bool} function _plugin_unregistercommand(pluginHandle: Integer;const command: PAChar): Boolean; cdecl; external x32_DBG;
217 | {PLUG_IMPEXP void} procedure _plugin_logprintf(const format: PAChar); cdecl; varargs; external x32_DBG;
218 | {PLUG_IMPEXP void} procedure _plugin_logputs(const text: PAChar); cdecl; external x32_DBG;
219 | {PLUG_IMPEXP void} procedure _plugin_debugpause(); cdecl; external x32_DBG;
220 | {PLUG_IMPEXP void} procedure _plugin_debugskipexceptions(skip: Boolean); cdecl; external x32_DBG;
221 | {PLUG_IMPEXP int} function _plugin_menuadd(hMenu: Integer;const title: PAChar): Integer; cdecl; external x32_DBG;
222 | {PLUG_IMPEXP bool} function _plugin_menuaddentry(hMenu,hEntry: Integer;const title: PAChar): Boolean; cdecl; external x32_DBG;
223 | {PLUG_IMPEXP bool} function _plugin_menuaddseparator(hMenu: Integer): Boolean; cdecl; external x32_DBG;
224 | {PLUG_IMPEXP bool} function _plugin_menuclear(hMenu: Integer): Boolean; cdecl; external x32_DBG;
225 |
226 | implementation
227 |
228 | end.
--------------------------------------------------------------------------------
/pluginsdk_delphi/bridgemain.pas:
--------------------------------------------------------------------------------
1 | Unit bridgemain;
2 |
3 | (**
4 | *
5 | * Ported form bridgemain.h (x64_dbg-PluginSDK v0.10) to Unit Delphi by quygia128
6 | * Home: http://cin1team.biz
7 | * Blog: http://crackertool.blogspot.com (www.crackertool.tk)
8 | * Last Edit: 06.30.2014 by quygia128
9 | *
10 | * Update: https://github.com/quygia128
11 | *
12 | * Thanks to TQN for Delphi Coding, phpbb3 and BOB for Nice Plugin(Tools) Power By Delphi,
13 | * all my friends at CiN1Team(ALL CIN1'S MEMBER) & Other RCE Team.
14 | * Of course thanks to Mr.eXodia author of x64_dbg, Nice Work!
15 | *
16 | **)
17 |
18 | interface
19 |
20 | uses
21 | Windows;
22 |
23 | {$ALIGN 1} // Struct byte alignment
24 | {$WARN UNSAFE_CODE OFF}
25 | {$WARN UNSAFE_TYPE OFF}
26 | {$WARN UNSAFE_CAST OFF}
27 | //{$DEFINE WIN64}
28 |
29 | Type
30 | DWORD64 = Int64;
31 | PDWORD64 = PInt64;
32 |
33 | {$IFDEF WIN64}
34 | duint = UInt64;
35 | dsint = Int64;
36 | pduint = ^duint;
37 | pdsint = ^dsint;
38 | {$ELSE}
39 | duint = ULong;
40 | dsint = LongInt;
41 | pduint = ^duint;
42 | pdsint = ^dsint;
43 | {$ENDIF} //WIN64
44 |
45 |
46 | {$IFDEF UNICODE}
47 | AChar = AnsiChar; // Delphi 6,7 SRC Work With Delphi 2009, 2010, XE.x
48 | PAChar = PAnsiChar; // Delphi 6,7 SRC Work With Delphi 2009, 2010, XE.x
49 | {$ELSE}
50 | AChar = Char;
51 | PAChar = PChar;
52 | {$ENDIF}
53 |
54 | Const
55 | //Bridge defines
56 | MAX_SETTING_SIZE = 65536;
57 | DBG_VERSION = 18;
58 | {$IFDEF WIN64}
59 | x32_BRIDGE = 'x64_bridge.dll';
60 | {$ELSE}
61 | x32_BRIDGE = 'x32_bridge.dll';
62 | {$ENDIF}
63 |
64 | //Bridge functions
65 | {BRIDGE_IMPEXP char*} function BridgeInit(): PAChar; cdecl; external x32_BRIDGE;
66 | {BRIDGE_IMPEXP char*} function BridgeStart(): PAChar; cdecl; external x32_BRIDGE;
67 | {BRIDGE_IMPEXP void*} function BridgeAlloc(size: LongInt): Pointer; cdecl; external x32_BRIDGE;
68 | {BRIDGE_IMPEXP void} procedure BridgeFree(ptr: Pointer); cdecl; external x32_BRIDGE;
69 | {BRIDGE_IMPEXP bool} function BridgeSettingGet(const section: PAChar; const key:PAChar;value: PAChar): Boolean; cdecl; external x32_BRIDGE;
70 | {BRIDGE_IMPEXP bool} function BridgeSettingGetUint(const section: PAChar;const key: PAChar;value: duint): Boolean; cdecl; external x32_BRIDGE;
71 | {BRIDGE_IMPEXP bool} function BridgeSettingSet(const section: PAChar; const key: PAChar; const value: PAChar): Boolean; cdecl; external x32_BRIDGE;
72 | {BRIDGE_IMPEXP bool} function BridgeSettingSetUint(const section: PAChar; const key: PAChar;value: duint): Boolean; cdecl; external x32_BRIDGE;
73 |
74 | Const
75 | //Debugger defines
76 | MAX_LABEL_SIZE = 256;
77 | MAX_COMMENT_SIZE = 512;
78 | MAX_MODULE_SIZE = 256;
79 | MAX_BREAKPOINT_SIZE = 256;
80 | MAX_SCRIPT_LINE_SIZE = 2048;
81 |
82 | TYPE_VALUE = 1;
83 | TYPE_MEMORY = 2;
84 | TYPE_ADDR = 4;
85 | MAX_MNEMONIC_SIZE = 64;
86 |
87 | Type
88 | //Debugger enums
89 | DBGSTATE = (
90 | initialized,
91 | paused,
92 | running,
93 | stopped
94 | );
95 |
96 | SEGMENTREG = (
97 | SEG_DEFAULT,
98 | SEG_ES,
99 | SEG_DS,
100 | SEG_FS,
101 | SEG_GS,
102 | SEG_CS,
103 | SEG_SS
104 | );
105 |
106 | ADDRINFOFLAGS = (
107 | flagmodule=1,
108 | flaglabel=2,
109 | flagcomment=4,
110 | flagbookmark=8,
111 | flagfunction=16
112 | );
113 |
114 | BPXTYPE = (
115 | bp_none=0,
116 | bp_normal=1,
117 | bp_hardware=2,
118 | bp_memory=4
119 | );
120 |
121 | FUNCTYPE = (
122 | FUNC_NONE,
123 | FUNC_BEGIN,
124 | FUNC_MIDDLE,
125 | FUNC_END,
126 | FUNC_SINGLE
127 | );
128 |
129 | LOOPTYPE = (
130 | LOOP_NONE,
131 | LOOP_BEGIN,
132 | LOOP_MIDDLE,
133 | LOOP_ENTRY,
134 | LOOP_END
135 | );
136 |
137 | DBGMSG = (
138 | DBG_SCRIPT_LOAD, // param1=const char* filename, param2=unused
139 | DBG_SCRIPT_UNLOAD, // param1=unused, param2=unused
140 | DBG_SCRIPT_RUN, // param1=int destline, param2=unused
141 | DBG_SCRIPT_STEP, // param1=unused, param2=unused
142 | DBG_SCRIPT_BPTOGGLE, // param1=int line, param2=unused
143 | DBG_SCRIPT_BPGET, // param1=int line, param2=unused
144 | DBG_SCRIPT_CMDEXEC, // param1=const char* command, param2=unused
145 | DBG_SCRIPT_ABORT, // param1=unused, param2=unused
146 | DBG_SCRIPT_GETLINETYPE, // param1=int line, param2=unused
147 | DBG_SCRIPT_SETIP, // param1=int line, param2=unused
148 | DBG_SCRIPT_GETBRANCHINFO, // param1=int line, param2=SCRIPTBRANCH* info
149 | DBG_SYMBOL_ENUM, // param1=SYMBOLCBINFO* cbInfo, param2=unused
150 | DBG_ASSEMBLE_AT, // param1=duint addr, param2=const char* instruction
151 | DBG_MODBASE_FROM_NAME, // param1=const char* modname, param2=unused
152 | DBG_DISASM_AT, // param1=duint addr, param2=DISASM_INSTR* instr
153 | DBG_STACK_COMMENT_GET, // param1=duint addr, param2=STACK_COMMENT* comment
154 | DBG_GET_THREAD_LIST, // param1=THREADALLINFO* list, param2=unused
155 | DBG_SETTINGS_UPDATED, // param1=unused, param2=unused
156 | DBG_DISASM_FAST_AT, // param1=duint addr, param2=BASIC_INSTRUCTION_INFO* basicinfo
157 | DBG_MENU_ENTRY_CLICKED // param1=int hEntry, param2=unused
158 | );
159 |
160 | SCRIPTLINETYPE = (
161 | linecommand,
162 | linebranch,
163 | linelabel,
164 | linecomment,
165 | lineempty
166 | );
167 |
168 | SCRIPTBRANCHTYPE = (
169 | scriptnobranch,
170 | scriptjmp,
171 | scriptjnejnz,
172 | scriptjejz,
173 | scriptjbjl,
174 | scriptjajg,
175 | scriptjbejle,
176 | scriptjaejge,
177 | scriptcall
178 | );
179 |
180 | DISASM_INSTRTYPE = (
181 | instr_normal,
182 | instr_branch,
183 | instr_stack
184 | );
185 |
186 | DISASM_ARGTYPE = (
187 | arg_normal,
188 | arg_memory
189 | );
190 |
191 | STRING_TYPE = (
192 | str_none,
193 | str_ascii,
194 | str_unicode
195 | );
196 |
197 | THREADPRIORITY = (
198 | PriorityIdle = -15,
199 | PriorityAboveNormal = 1,
200 | PriorityBelowNormal = -1,
201 | PriorityHighest = 2,
202 | PriorityLowest = -2,
203 | PriorityNormal = 0,
204 | PriorityTimeCritical = 15,
205 | PriorityUnknown = $7FFFFFFF
206 | );
207 |
208 | THREADWAITREASON = (
209 | Executive = 0,
210 | FreePage = 1,
211 | PageIn = 2,
212 | PoolAllocation = 3,
213 | DelayExecution = 4,
214 | Suspended = 5,
215 | UserRequest = 6,
216 | WrExecutive = 7,
217 | WrFreePage = 8,
218 | WrPageIn = 9,
219 | WrPoolAllocation = 10,
220 | WrDelayExecution = 11,
221 | WrSuspended = 12,
222 | WrUserRequest = 13,
223 | WrEventPair = 14,
224 | WrQueue = 15,
225 | WrLpcReceive = 16,
226 | WrLpcReply = 17,
227 | WrVirtualMemory = 18,
228 | WrPageOut = 19,
229 | WrRendezvous = 20,
230 | Spare2 = 21,
231 | Spare3 = 22,
232 | Spare4 = 23,
233 | Spare5 = 24,
234 | WrCalloutStack = 25,
235 | WrKernel = 26,
236 | WrResource = 27,
237 | WrPushLock = 28,
238 | WrMutex = 29,
239 | WrQuantumEnd = 30,
240 | WrDispatchInt = 31,
241 | WrPreempted = 32,
242 | WrYieldExecution = 33,
243 | WrFastMutex = 34,
244 | WrGuardedMutex = 35,
245 | WrRundown = 36
246 | );
247 |
248 | MEMORY_SIZE =(
249 | size_byte,
250 | size_word,
251 | size_dword,
252 | size_qword
253 | );
254 |
255 | //const
256 | //Debugger typedefs
257 | //VALUE_SIZE = MEMORY_SIZE;
258 |
259 | Type
260 |
261 | SYM_TYPE = (
262 | SymNone,
263 | SymCoff,
264 | SymCv,
265 | SymPdb,
266 | SymExport,
267 | SymDeferred,
268 | SymSym, // .sym file
269 | SymDia,
270 | SymVirtual,
271 | NumSymTypes
272 | );
273 |
274 | GUID = packed record
275 | Data1: DWord; //4
276 | Data2: WORD; //2
277 | Data3: WORD; //2
278 | Data4:array[0..8-1] of Byte;//8
279 | end;
280 |
281 | PIMAGEHLP_MODULE = ^IMAGEHLP_MODULE;
282 | IMAGEHLP_MODULE = packed record
283 | SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE)
284 | BaseOfImage: DWORD; // base load address of module
285 | ImageSize: DWORD; // virtual size of the loaded module
286 | TimeDateStamp: DWORD; // date/time stamp from pe header
287 | CheckSum: DWORD; // checksum from the pe header
288 | NumSyms: DWORD; // number of symbols in the symbol table
289 | SymType: SYM_TYPE; // type of symbols loaded
290 | ModuleName:array[0..32-1] of AnsiChar; // module name
291 | ImageName:array[0..255-1] of AnsiChar; // image name
292 | LoadedImageName:array[0..255-1] of AnsiChar; // symbol file name
293 | end;
294 |
295 | PIMAGEHLP_MODULE64 = ^IMAGEHLP_MODULE64;
296 | IMAGEHLP_MODULE64 = packed record
297 | SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE64)
298 | BaseOfImage: int64; // base load address of module
299 | ImageSize: DWORD; // virtual size of the loaded module
300 | TimeDateStamp: DWORD; // date/time stamp from pe header
301 | CheckSum: DWORD; // checksum from the pe header
302 | NumSyms: DWORD; // number of symbols in the symbol table
303 | SymType: SYM_TYPE; // type of symbols loaded
304 | ModuleName:array[0..32-1] of ACHAR; // module name
305 | ImageName:array[0..256-1] of ACHAR; // image name
306 | LoadedImageName:array[0..256-1] of ACHAR; // symbol file name
307 | // new elements: 07-Jun-2002
308 | LoadedPdbName:array[0..256-1] of ACHAR; // pdb file name
309 | CVSig: DWORD; // Signature of the CV record in the debug directories
310 | CVData:array[0..(MAX_PATH * 3)-1] of ACHAR; // Contents of the CV record
311 | PdbSig:DWORD; // Signature of PDB
312 | PdbSig70: GUID; // Signature of PDB (VC 7 and up)
313 | PdbAge: DWORD; // DBI age of pdb
314 | PdbUnmatched: LongBool; // loaded an unmatched pdb
315 | DbgUnmatched: LongBool; // loaded an unmatched dbg
316 | LineNumbers: LongBool; // we have line number information
317 | GlobalSymbols: LongBool; // we have internal symbol information
318 | TypeInfo: LongBool; // we have type information
319 | // new elements: 17-Dec-2003
320 | SourceIndexed: LongBool; // pdb supports source server
321 | Publics: LongBool; // contains public symbols
322 | end;
323 |
324 | PIMAGEHLP_MODULEW64 = ^IMAGEHLP_MODULEW64;
325 | IMAGEHLP_MODULEW64 = packed record
326 | SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE64)
327 | BaseOfImage: Int64; // base load address of module
328 | ImageSize: DWORD; // virtual size of the loaded module
329 | TimeDateStamp: DWORD; // date/time stamp from pe header
330 | CheckSum: DWORD; // checksum from the pe header
331 | NumSyms: DWORD; // number of symbols in the symbol table
332 | SymType: SYM_TYPE; // type of symbols loaded
333 | ModuleName:array[0..32-1] of WCHAR; // module name
334 | ImageName:array[0..256-1] of WCHAR; // image name
335 | LoadedImageName:array[0..256-1] of WCHAR; // symbol file name
336 | // new elements: 07-Jun-2002
337 | LoadedPdbName:array[0..256-1] of WCHAR; // pdb file name
338 | CVSig: DWORD; // Signature of the CV record in the debug directories
339 | CVData:array[0..(MAX_PATH * 3)-1] of WCHAR; // Contents of the CV record
340 | PdbSig: DWORD; // Signature of PDB
341 | PdbSig70: GUID; // Signature of PDB (VC 7 and up)
342 | PdbAge: DWORD; // DBI age of pdb
343 | PdbUnmatched: LongBool; // loaded an unmatched pdb
344 | DbgUnmatched: LongBool; // loaded an unmatched dbg
345 | LineNumbers: LongBool; // we have line number information
346 | GlobalSymbols: LongBool; // we have internal symbol information
347 | TypeInfo: LongBool; // we have type information
348 | // new elements: 17-Dec-2003
349 | SourceIndexed: LongBool; // pdb supports source server
350 | Publics: LongBool; // contains public symbols
351 | end;
352 |
353 | PSYMBOLINFO = ^SYMBOLCBINFO;
354 | //typedef void (*CBSYMBOLENUM)(SYMBOLINFO* symbol, void* user);
355 | CBSYMBOLENUM = procedure(symbol: PSYMBOLINFO;user: Pointer);
356 |
357 | //Debugger structs
358 | PMEMPAGE = ^MEMPAGE;
359 | MEMPAGE = packed record
360 | mbi: MEMORY_BASIC_INFORMATION;
361 | info:array[0..MAX_MODULE_SIZE-1] of AChar;
362 | end;
363 |
364 | PMEMMAP = ^MEMMAP;
365 | MEMMAP = packed record
366 | count: Integer;
367 | page: PMEMPAGE;
368 | end;
369 |
370 | PBRIDGEBP = ^BRIDGEBP;
371 | BRIDGEBP = packed record
372 | bptype: BPXTYPE;
373 | addr: duint;
374 | enabled,
375 | singleshoot,
376 | active: Boolean;
377 | name:array[0..MAX_BREAKPOINT_SIZE-1] of AChar;
378 | module:array[0..MAX_MODULE_SIZE-1] of AChar;
379 | slot: WORD;
380 | end;
381 |
382 | PBPMAP = ^BPMAP;
383 | BPMAP = Packed record
384 | count: Integer;
385 | bp: PBRIDGEBP;
386 | end;
387 |
388 | PslFUNCTION = ^slFUNCTION;
389 | slFUNCTION = packed record
390 | start,
391 | slend: duint;
392 | end;
393 |
394 | PADDRINFO = ^ADDRINFO;
395 | ADDRINFO = packed record
396 | flags: Integer; //ADDRINFOFLAGS
397 | module:array[0..MAX_MODULE_SIZE-1] of AChar; //module the address is in
398 | ilabel:array[0..MAX_LABEL_SIZE-1] of AChar;
399 | comment:array[0..MAX_COMMENT_SIZE-1] of AChar;
400 | isbookmark: Boolean;
401 | ifunction: slFUNCTION;
402 | end;
403 |
404 | //PSYMBOLINFO = ^SYMBOLINFO;
405 | SYMBOLINFO = packed record
406 | addr: duint;
407 | decoratedSymbol: PAChar;
408 | undecoratedSymbol: PAChar;
409 | end;
410 |
411 | PSYMBOLMODULEINFO = ^SYMBOLMODULEINFO;
412 | SYMBOLMODULEINFO = packed record
413 | base: duint;
414 | name:array[0..MAX_MODULE_SIZE-1] of AChar;
415 | end;
416 |
417 | PSYMBOLCBINFO = ^SYMBOLCBINFO;
418 | SYMBOLCBINFO = packed record
419 | base: duint ;
420 | cbSymbolEnum: CBSYMBOLENUM;
421 | user: Pointer;
422 | end;
423 |
424 | PFLAGS = ^FLAGS;
425 | FLAGS = packed record
426 | c,
427 | p,
428 | a,
429 | z,
430 | s,
431 | t,
432 | i,
433 | d,
434 | o: BOOL;
435 | end;
436 |
437 | PREGDUMP = ^REGDUMP;
438 | REGDUMP = packed record
439 | cax,
440 | ccx,
441 | cdx,
442 | cbx,
443 | csp,
444 | cbp,
445 | csi,
446 | cdi: duint;
447 | {$IFDEF WIN64}
448 | r8,
449 | r9,
450 | r10,
451 | r11,
452 | r12,
453 | r13,
454 | r14,
455 | r15: duint;
456 | {$ELSE} //WIN64
457 | cip: duint;
458 | eflags: Cardinal;
459 | flags: FLAGS;
460 | gs,
461 | fs,
462 | es,
463 | ds,
464 | cs,
465 | ss: WORD;
466 | dr0,
467 | dr1,
468 | dr2,
469 | dr3,
470 | dr6,
471 | dr7: duint;
472 | {$ENDIF}
473 | end;
474 |
475 | PDISASM_ARG = ^DISASM_ARG;
476 | DISASM_ARG = packed record
477 | distype:DISASM_ARGTYPE;
478 | segment: SEGMENTREG;
479 | mnemonic:array[0..64-1] of AChar;
480 | constant,
481 | value,
482 | memvalue: duint;
483 | end;
484 |
485 | PDISASM_INSTR = ^DISASM_INSTR;
486 | DISASM_INSTR = packed record
487 | instruction:array[0..64-1] of AChar;
488 | distype: DISASM_INSTRTYPE;
489 | argcount,
490 | instr_size: Integer;
491 | arg:array[0..3-1] of DISASM_ARG;
492 | end;
493 |
494 | PSTACK_COMMENT = ^STACK_COMMENT;
495 | STACK_COMMENT = packed record
496 | color:array[0..8-1] of AChar; //hex color-code
497 | comment:array[0..MAX_COMMENT_SIZE-1] of AChar;
498 | end;
499 |
500 | PTHREADINFO = ^THREADINFO;
501 | THREADINFO = packed record
502 | ThreadNumber: Integer;
503 | hThread: THANDLE;
504 | dwThreadId: DWORD;
505 | ThreadStartAddress,
506 | ThreadLocalBase: duint;
507 | end;
508 |
509 | PTHREADALLINFO = ^THREADALLINFO;
510 | THREADALLINFO = packed record
511 | BasicInfo: THREADINFO;
512 | ThreadCip: duint;
513 | SuspendCount: DWORD;
514 | Priority:THREADPRIORITY;
515 | WaitReason: THREADWAITREASON;
516 | LastError: DWORD;
517 | end;
518 |
519 | PTHREADLIST = ^THREADLIST;
520 | THREADLIST = packed record
521 | count: Integer;
522 | list: PTHREADALLINFO;
523 | CurrentThread: Integer;
524 | end;
525 |
526 | PMEMORY_INFO = ^MEMORY_INFO;
527 | MEMORY_INFO = packed record
528 | value: ULONG_PTR; //displacement / addrvalue (rip-relative)
529 | size: MEMORY_SIZE; //byte/word/dword/qword
530 | mnemonic:array[0..MAX_MNEMONIC_SIZE-1] of AChar;
531 | end;
532 |
533 | PVALUE_INFO = ^VALUE_INFO;
534 | VALUE_INFO = packed record
535 | value: ULONG_PTR;
536 | size: MEMORY_SIZE{VALUE_SIZE};
537 | end;
538 |
539 | PBASIC_INSTRUCTION_INFO = ^BASIC_INSTRUCTION_INFO;
540 | BASIC_INSTRUCTION_INFO = packed record
541 | biitype: DWORD; //value|memory|addr
542 | value: VALUE_INFO; //immediat
543 | memory:MEMORY_INFO;
544 | addr:ULONG_PTR; //addrvalue (jumps + calls)
545 | branch: Boolean; //jumps/calls
546 | end;
547 |
548 | PSCRIPTBRANCH = ^SCRIPTBRANCH;
549 | SCRIPTBRANCH = packed record
550 | scbtype: SCRIPTBRANCHTYPE;
551 | dest: Integer;
552 | branchlabel:array[0..256-1] of AChar;
553 | end;
554 |
555 | //Debugger functions
556 | {BRIDGE_IMPEXP char*} function DbgInit(): PAChar; cdecl; external x32_BRIDGE;
557 | {BRIDGE_IMPEXP bool} function DbgMemRead(va:duint;dest: PByte;size: duint): Boolean; cdecl; external x32_BRIDGE;
558 | {BRIDGE_IMPEXP bool} function DbgMemWrite(va: duint; const src: PByte;size: duint): Boolean; cdecl; external x32_BRIDGE;
559 | {BRIDGE_IMPEXP duint} function DbgMemGetPageSize(base: duint): duint; cdecl; external x32_BRIDGE;
560 | {BRIDGE_IMPEXP duint} function DbgMemFindBaseAddr(addr: duint;size: Pduint): duint; cdecl; external x32_BRIDGE;
561 | {BRIDGE_IMPEXP bool} function DbgCmdExec(const cmd: PAChar): Boolean; cdecl; external x32_BRIDGE;
562 | {BRIDGE_IMPEXP bool} function DbgCmdExecDirect(const cmd: PAChar): Boolean; cdecl; external x32_BRIDGE;
563 | {BRIDGE_IMPEXP bool} function DbgMemMap(memmap: PMEMMAP): Boolean; cdecl; external x32_BRIDGE;
564 | {BRIDGE_IMPEXP bool} function DbgIsValidExpression(const expression: PAChar): Boolean; cdecl; external x32_BRIDGE;
565 | {BRIDGE_IMPEXP bool} function DbgIsDebugging(): Boolean; cdecl; external x32_BRIDGE;
566 | {BRIDGE_IMPEXP bool} function DbgIsJumpGoingToExecute(addr: duint): Boolean; cdecl; external x32_BRIDGE;
567 | {BRIDGE_IMPEXP bool} function DbgGetLabelAt(addr: duint;segment:SEGMENTREG;text: PAChar): Boolean; cdecl; external x32_BRIDGE;
568 | {BRIDGE_IMPEXP bool} function DbgSetLabelAt(addr: duint; const text: PAChar): Boolean; cdecl; external x32_BRIDGE;
569 | {BRIDGE_IMPEXP bool} function DbgGetCommentAt(addr: duint;text: PAChar): Boolean; cdecl; external x32_BRIDGE;
570 | {BRIDGE_IMPEXP bool} function DbgSetCommentAt(addr:duint; const text: PAChar): Boolean; cdecl; external x32_BRIDGE;
571 | {BRIDGE_IMPEXP bool} function DbgGetBookmarkAt(addr: duint): Boolean; cdecl; external x32_BRIDGE;
572 | {BRIDGE_IMPEXP bool} function DbgSetBookmarkAt(addr: duint;isbookmark: Boolean): Boolean; cdecl; external x32_BRIDGE;
573 | {BRIDGE_IMPEXP bool} function DbgGetModuleAt(addr: duint;text: PAChar): Boolean; cdecl; external x32_BRIDGE;
574 | {BRIDGE_IMPEXP BPXTYPE} function DbgGetBpxTypeAt(addr: duint): BPXTYPE; cdecl; external x32_BRIDGE;
575 | {BRIDGE_IMPEXP duint} function DbgValFromString(const szstring: PAChar): duint; cdecl; external x32_BRIDGE;
576 | {BRIDGE_IMPEXP bool} function DbgGetRegDump(regdump: PREGDUMP): Boolean; cdecl; external x32_BRIDGE;
577 | {BRIDGE_IMPEXP bool} function DbgValToString(const szstring: PAChar;value: duint): Boolean; cdecl; external x32_BRIDGE;
578 | {BRIDGE_IMPEXP bool} function DbgMemIsValidReadPtr(addr: duint): Boolean; cdecl; external x32_BRIDGE;
579 | {BRIDGE_IMPEXP int} function DbgGetBpList(bptype:BPXTYPE;list: PBPMAP): Integer; cdecl; external x32_BRIDGE;
580 | {BRIDGE_IMPEXP FUNCTYPE}function DbgGetFunctionTypeAt(addr: duint): FUNCTYPE; cdecl; external x32_BRIDGE;
581 | {BRIDGE_IMPEXP LOOPTYPE}function DbgGetLoopTypeAt(addr: duint;depth: Integer): LOOPTYPE; cdecl; external x32_BRIDGE;
582 | {BRIDGE_IMPEXP duint} function DbgGetBranchDestination(addr: duint): duint; cdecl; external x32_BRIDGE;
583 | {BRIDGE_IMPEXP bool} function DbgFunctionOverlaps(fOstart: duint;fOend: duint): Boolean; cdecl; external x32_BRIDGE;
584 | {BRIDGE_IMPEXP bool} function DbgFunctionGet(addr: duint;fGstart: Pduint; fGend: pduint): Boolean; cdecl; external x32_BRIDGE;
585 | {BRIDGE_IMPEXP void} procedure DbgScriptLoad(const filename: PAChar); cdecl; external x32_BRIDGE;
586 | {BRIDGE_IMPEXP void} procedure DbgScriptUnload(); cdecl; external x32_BRIDGE;
587 | {BRIDGE_IMPEXP void} procedure DbgScriptRun(destline: Integer); cdecl; external x32_BRIDGE;
588 | {BRIDGE_IMPEXP void} procedure DbgScriptStep(); cdecl; external x32_BRIDGE;
589 | {BRIDGE_IMPEXP bool} function DbgScriptBpToggle(line: Integer): Boolean; cdecl; external x32_BRIDGE;
590 | {BRIDGE_IMPEXP bool} function DbgScriptBpGet(line: Integer): Boolean; cdecl; external x32_BRIDGE;
591 | {BRIDGE_IMPEXP bool} function DbgScriptCmdExec(const command: PAChar): Boolean; cdecl; external x32_BRIDGE;
592 | {BRIDGE_IMPEXP void} procedure DbgScriptAbort(); cdecl; external x32_BRIDGE;
593 | {BRIDGE_IMPEXP SCRIPTLINETYPE}function DbgScriptGetLineType(line: Integer): SCRIPTLINETYPE; cdecl; external x32_BRIDGE;
594 | {BRIDGE_IMPEXP void} procedure DbgScriptSetIp(line: Integer); cdecl; external x32_BRIDGE;
595 | {BRIDGE_IMPEXP bool} function DbgScriptGetBranchInfo(line: Integer;info: PSCRIPTBRANCH): Boolean; cdecl; external x32_BRIDGE;
596 | {BRIDGE_IMPEXP void} procedure DbgSymbolEnum(base: duint;cbSymbolEnum: CBSYMBOLENUM;user: Pointer); cdecl; external x32_BRIDGE;
597 | {BRIDGE_IMPEXP bool} function DbgAssembleAt(addr: duint; const instruction: PAChar): Boolean; cdecl; external x32_BRIDGE;
598 | {BRIDGE_IMPEXP duint} function DbgModBaseFromName(const name: PAChar): duint; cdecl; external x32_BRIDGE;
599 | {BRIDGE_IMPEXP void} procedure DbgDisasmAt(addr: duint;instr: PDISASM_INSTR); cdecl; external x32_BRIDGE;
600 | {BRIDGE_IMPEXP bool} function DbgStackCommentGet(addr: duint;comment: PSTACK_COMMENT):Boolean; cdecl; external x32_BRIDGE;
601 | {BRIDGE_IMPEXP void} procedure DbgGetThreadList(list: PTHREADLIST); cdecl; external x32_BRIDGE;
602 | {BRIDGE_IMPEXP void} procedure DbgSettingsUpdated(); cdecl; external x32_BRIDGE;
603 | {BRIDGE_IMPEXP void} procedure DbgDisasmFastAt(addr: duint; basicinfo: PBASIC_INSTRUCTION_INFO); cdecl; external x32_BRIDGE;
604 | {BRIDGE_IMPEXP void} procedure DbgMenuEntryClicked(hEntry: Integer); cdecl; external x32_BRIDGE;
605 |
606 | Const
607 | //Gui defines
608 | GUI_PLUGIN_MENU = 0;
609 | GUI_DISASSEMBLY = 0;
610 | GUI_DUMP = 1;
611 | GUI_STACK = 2;
612 |
613 | GUI_MAX_LINE_SIZE = 65536;
614 |
615 | Type
616 | //Gui enums
617 | GUIMSG = (
618 | GUI_DISASSEMBLE_AT, // param1=(duint)va, param2=(duint)cip
619 | GUI_SET_DEBUG_STATE, // param1=(DBGSTATE)state, param2=unused
620 | GUI_ADD_MSG_TO_LOG, // param1=(const char*)msg, param2=unused
621 | GUI_CLEAR_LOG, // param1=unused, param2=unused
622 | GUI_UPDATE_REGISTER_VIEW, // param1=unused, param2=unused
623 | GUI_UPDATE_DISASSEMBLY_VIEW, // param1=unused, param2=unused
624 | GUI_UPDATE_BREAKPOINTS_VIEW, // param1=unused, param2=unused
625 | GUI_UPDATE_WINDOW_TITLE, // param1=(const char*)file, param2=unused
626 | GUI_GET_WINDOW_HANDLE, // param1=unused, param2=unused
627 | GUI_DUMP_AT, // param1=(duint)va param2=unused
628 | GUI_SCRIPT_ADD, // param1=int count, param2=const char** lines
629 | GUI_SCRIPT_CLEAR, // param1=unused, param2=unused
630 | GUI_SCRIPT_SETIP, // param1=int line, param2=unused
631 | GUI_SCRIPT_ERROR, // param1=int line, param2=const char* message
632 | GUI_SCRIPT_SETTITLE, // param1=const char* title, param2=unused
633 | GUI_SCRIPT_SETINFOLINE, // param1=int line, param2=const char* info
634 | GUI_SCRIPT_MESSAGE, // param1=const char* message, param2=unused
635 | GUI_SCRIPT_MSGYN, // param1=const char* message, param2=unused
636 | GUI_SYMBOL_LOG_ADD, // param1(const char*)msg, param2=unused
637 | GUI_SYMBOL_LOG_CLEAR, // param1=unused, param2=unused
638 | GUI_SYMBOL_SET_PROGRESS, // param1=int percent param2=unused
639 | GUI_SYMBOL_UPDATE_MODULE_LIST, // param1=int count, param2=SYMBOLMODULEINFO* modules
640 | GUI_REF_ADDCOLUMN, // param1=int width, param2=(const char*)title
641 | GUI_REF_SETROWCOUNT, // param1=int rows, param2=unused
642 | GUI_REF_GETROWCOUNT, // param1=unused, param2=unused
643 | GUI_REF_DELETEALLCOLUMNS, // param1=unused, param2=unused
644 | GUI_REF_SETCELLCONTENT, // param1=(CELLINFO*)info, param2=unused
645 | GUI_REF_GETCELLCONTENT, // param1=int row, param2=int col
646 | GUI_REF_RELOADDATA, // param1=unused, param2=unused
647 | GUI_REF_SETSINGLESELECTION, // param1=int index, param2=bool scroll
648 | GUI_REF_SETPROGRESS, // param1=int progress, param2=unused
649 | GUI_REF_SETSEARCHSTARTCOL, // param1=int col param2=unused
650 | GUI_STACK_DUMP_AT, // param1=duint addr, param2=duint csp
651 | GUI_UPDATE_DUMP_VIEW, // param1=unused, param2=unused
652 | GUI_UPDATE_THREAD_VIEW, // param1=unused, param2=unused
653 | GUI_ADD_RECENT_FILE, // param1=(const char*)file, param2=unused
654 | GUI_SET_LAST_EXCEPTION, // param1=unsigned int code, param2=unused
655 | GUI_GET_DISASSEMBLY, // param1=duint addr, param2=char* text
656 | GUI_MENU_ADD, // param1=int hMenu, param2=const char* title
657 | GUI_MENU_ADD_ENTRY, // param1=int hMenu, param2=const char* title
658 | GUI_MENU_ADD_SEPARATOR, // param1=int hMenu, param2=unused
659 | GUI_MENU_CLEAR, // param1=int hMenu, param2=unused
660 | GUI_SELECTION_GET, // param1=int hWindow, param2=SELECTIONDATA* selection
661 | GUI_SELECTION_SET, // param1=int hWindow, param2=const SELECTIONDATA* selection
662 | GUI_GETLINE_WINDOW // param1=const char* title, param2=char* text
663 | );
664 |
665 | //GUI structures
666 | PCELLINFO = ^CELLINFO;
667 | CELLINFO = packed record
668 | row,
669 | col: Integer;
670 | str: PAChar;
671 | end;
672 |
673 | PSELECTIONDATA = ^SELECTIONDATA;
674 | SELECTIONDATA = packed record
675 | adrstart,
676 | adrend: duint;
677 | end;
678 |
679 | //GUI functions
680 | {BRIDGE_IMPEXP void} procedure GuiDisasmAt(addr: duint;cip: duint); cdecl; external x32_BRIDGE;
681 | {BRIDGE_IMPEXP void} procedure GuiSetDebugState(state: DBGSTATE); cdecl; external x32_BRIDGE;
682 | {BRIDGE_IMPEXP void} procedure GuiAddLogMessage(const msg: PAChar); cdecl; external x32_BRIDGE;
683 | {BRIDGE_IMPEXP void} procedure GuiLogClear(); cdecl; external x32_BRIDGE;
684 | {BRIDGE_IMPEXP void} procedure GuiUpdateAllViews(); cdecl; external x32_BRIDGE;
685 | {BRIDGE_IMPEXP void} procedure GuiUpdateRegisterView(); cdecl; external x32_BRIDGE;
686 | {BRIDGE_IMPEXP void} procedure GuiUpdateDisassemblyView(); cdecl; external x32_BRIDGE;
687 | {BRIDGE_IMPEXP void} procedure GuiUpdateBreakpointsView(); cdecl; external x32_BRIDGE;
688 | {BRIDGE_IMPEXP void} procedure GuiUpdateWindowTitle(const filename: PACHar); cdecl; external x32_BRIDGE;
689 | {BRIDGE_IMPEXP HWND} function GuiGetWindowHandle(): HWND; cdecl; external x32_BRIDGE;
690 | {BRIDGE_IMPEXP void} procedure GuiDumpAt(va: duint); cdecl; external x32_BRIDGE;
691 | {BRIDGE_IMPEXP void} procedure GuiScriptAdd(count: Integer; const lines: PPAnsiChar); cdecl; external x32_BRIDGE;
692 | {BRIDGE_IMPEXP void} procedure GuiScriptClear(); cdecl; external x32_BRIDGE;
693 | {BRIDGE_IMPEXP void} procedure GuiScriptSetIp(line: Integer); cdecl; external x32_BRIDGE;
694 | {BRIDGE_IMPEXP void} procedure GuiScriptError(line: Integer; const szmessage: PAChar); cdecl; external x32_BRIDGE;
695 | {BRIDGE_IMPEXP void} procedure GuiScriptSetTitle(const title: PAChar); cdecl; external x32_BRIDGE;
696 | {BRIDGE_IMPEXP void} procedure GuiScriptSetInfoLine(line: integer; const info: PAChar); cdecl; external x32_BRIDGE;
697 | {BRIDGE_IMPEXP void} procedure GuiScriptMessage(const szmessage: PAChar); cdecl; external x32_BRIDGE;
698 | {BRIDGE_IMPEXP int} function GuiScriptMsgyn(const szmessage: PAChar): integer; cdecl; external x32_BRIDGE;
699 | {BRIDGE_IMPEXP void} procedure GuiSymbolLogAdd(const szmessage: PAChar); cdecl; external x32_BRIDGE;
700 | {BRIDGE_IMPEXP void} procedure GuiSymbolLogClear(); cdecl; external x32_BRIDGE;
701 | {BRIDGE_IMPEXP void} procedure GuiSymbolSetProgress(percent: Integer); cdecl; external x32_BRIDGE;
702 | {BRIDGE_IMPEXP void} procedure GuiSymbolUpdateModuleList(count: integer;modules: PSYMBOLMODULEINFO); cdecl; external x32_BRIDGE;
703 | {BRIDGE_IMPEXP void} procedure GuiReferenceAddColumn(width: Integer; const title: PAChar); cdecl; external x32_BRIDGE;
704 | {BRIDGE_IMPEXP void} procedure GuiReferenceSetRowCount(count: Integer); cdecl; external x32_BRIDGE;
705 | {BRIDGE_IMPEXP int} function GuiReferenceGetRowCount(): Integer; cdecl; external x32_BRIDGE;
706 | {BRIDGE_IMPEXP void} procedure GuiReferenceDeleteAllColumns(); cdecl; external x32_BRIDGE;
707 | {BRIDGE_IMPEXP void} procedure GuiReferenceSetCellContent(row: Integer;col: Integer; const st: PAChar); cdecl; external x32_BRIDGE;
708 | {BRIDGE_IMPEXP char*} function GuiReferenceGetCellContent(row: Integer;col: Integer): PAChar; cdecl; external x32_BRIDGE;
709 | {BRIDGE_IMPEXP void} procedure GuiReferenceReloadData(); cdecl; external x32_BRIDGE;
710 | {BRIDGE_IMPEXP void} procedure GuiReferenceSetSingleSelection(index: Integer;scroll: Boolean); cdecl; external x32_BRIDGE;
711 | {BRIDGE_IMPEXP void} procedure GuiReferenceSetProgress(progress: Integer); cdecl; external x32_BRIDGE;
712 | {BRIDGE_IMPEXP void} procedure GuiReferenceSetSearchStartCol(col: Integer); cdecl; external x32_BRIDGE;
713 | {BRIDGE_IMPEXP void} procedure GuiStackDumpAt(addr: duint;csp: duint); cdecl; external x32_BRIDGE;
714 | {BRIDGE_IMPEXP void} procedure GuiUpdateDumpView(); cdecl; external x32_BRIDGE;
715 | {BRIDGE_IMPEXP void} procedure GuiUpdateThreadView(); cdecl; external x32_BRIDGE;
716 | {BRIDGE_IMPEXP void} procedure GuiAddRecentFile(const filename: PAChar); cdecl; external x32_BRIDGE;
717 | {BRIDGE_IMPEXP void} procedure GuiSetLastException(exception: LongWord); cdecl; external x32_BRIDGE;
718 | {BRIDGE_IMPEXP bool} function GuiGetDisassembly(addr: duint;text: PAChar): Boolean; cdecl; external x32_BRIDGE;
719 | {BRIDGE_IMPEXP int} function GuiMenuAdd(hMenu: Integer; const title: PAChar): Integer; cdecl; external x32_BRIDGE;
720 | {BRIDGE_IMPEXP int} function GuiMenuAddEntry(hMenu: Integer; const title: PAChar): Integer; cdecl; external x32_BRIDGE;
721 | {BRIDGE_IMPEXP void} procedure GuiMenuAddSeparator(hMenu: Integer); cdecl; external x32_BRIDGE;
722 | {BRIDGE_IMPEXP void} procedure GuiMenuClear(hMenu: Integer); cdecl; external x32_BRIDGE;
723 | {BRIDGE_IMPEXP bool} function GuiSelectionGet(hWindow: Integer;selection: PSELECTIONDATA): Boolean; cdecl; external x32_BRIDGE;
724 | {BRIDGE_IMPEXP bool} function GuiSelectionSet(hWindow: Integer;const selection: SELECTIONDATA): Boolean; cdecl; external x32_BRIDGE;
725 | {BRIDGE_IMPEXP bool} function GuiGetLineWindow(const title: PACHar;text: PAChar): Boolean; cdecl; external x32_BRIDGE;
726 |
727 | implementation
728 |
729 | initialization
730 |
731 | end.
732 |
--------------------------------------------------------------------------------