├── AboutDlg.dfm ├── AboutDlg.pas ├── ActiveProcesses.dfm ├── ActiveProcesses.pas ├── Decompiler.pas ├── Def_decomp.pas ├── Def_disasm.pas ├── Def_info.pas ├── Def_know.pas ├── Def_main.pas ├── Def_res.pas ├── Def_thread.pas ├── Disasm.pas ├── EditFieldsDlg.dfm ├── EditFieldsDlg.pas ├── EditFunctionDlg.dfm ├── EditFunctionDlg.pas ├── Exit.dfm ├── Exit.pas ├── Explorer.dfm ├── Explorer.pas ├── FindDlg.dfm ├── FindDlg.pas ├── Heuristic.pas ├── Hex2Double.dfm ├── Hex2Double.pas ├── IDCGen.pas ├── IdcSplitSize.dfm ├── IdcSplitSize.pas ├── Idr.cfg ├── Idr.dof ├── Idr.dpr ├── Idr.res ├── Infos.pas ├── InputDlg.dfm ├── InputDlg.pas ├── KBViewer.dfm ├── KBViewer.pas ├── KnowledgeBase.pas ├── Legend.dfm ├── Legend.pas ├── Main.dfm ├── Main.pas ├── Misc.pas ├── Plugins.dfm ├── Plugins.pas ├── README.md ├── Resources.pas ├── Scanf.pas ├── Scanf_c.pas ├── StringInfo.dfm ├── StringInfo.pas ├── Threads.pas ├── TypeInfos.dfm ├── TypeInfos.pas ├── UFileDropper.pas ├── UfrmFormTree.dfm ├── UfrmFormTree.pas ├── idp2txt ├── Main.dfm ├── Main.pas ├── idp2txt.cfg ├── idp2txt.dof ├── idp2txt.dpr └── idp2txt.res ├── idr.manifest ├── manifest.rc └── manifest.res /AboutDlg.pas: -------------------------------------------------------------------------------- 1 | unit AboutDlg; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, 7 | Controls, Forms, Dialogs, StdCtrls, Buttons, jpeg, ExtCtrls, ComCtrls; 8 | 9 | type 10 | TFAboutDlg=class(TForm) 11 | Panel3: TPanel; 12 | Button2: TButton; 13 | PageControl1: TPageControl; 14 | tsIDR: TTabSheet; 15 | tsCrypto: TTabSheet; 16 | Icon: TImage; 17 | lProduct: TLabel; 18 | Shape1: TShape; 19 | Shape2: TShape; 20 | lVer: TLabel; 21 | lEmail: TLabel; 22 | lWWW: TLabel; 23 | Label1: TLabel; 24 | Label2: TLabel; 25 | Label3: TLabel; 26 | Label4: TLabel; 27 | Label5: TLabel; 28 | Label6: TLabel; 29 | Image1: TImage; 30 | bDonate: TBitBtn; 31 | Label7: TLabel; 32 | Label8: TLabel; 33 | lblHint: TLabel; 34 | procedure FormCreate(Sender : TObject); 35 | procedure lEmailClick(Sender : TObject); 36 | procedure lWWWClick(Sender : TObject); 37 | procedure bDonateClick(Sender : TObject); 38 | private 39 | { Private declarations } 40 | public 41 | { Public declarations } 42 | end; 43 | 44 | var 45 | FAboutDlg:TFAboutDlg; 46 | 47 | implementation 48 | 49 | {$R *.DFM} 50 | 51 | Uses Misc,ShellAPI; 52 | 53 | procedure TFAboutDlg.FormCreate(Sender : TObject); 54 | begin 55 | lVer.Caption:='Version: '+IDRVersion; 56 | end; 57 | 58 | procedure TFAboutDlg.lEmailClick(Sender : TObject); 59 | begin 60 | ShellExecute(Handle,'open','mailto:crypto2011@gmail.com',Nil,Nil,SHOW_OPENWINDOW); 61 | end; 62 | 63 | procedure TFAboutDlg.lWWWClick(Sender : TObject); 64 | begin 65 | ShellExecute(Handle,'open','http://kpnc.org/idr32/en/',Nil,Nil,SHOW_OPENWINDOW); 66 | end; 67 | 68 | procedure TFAboutDlg.bDonateClick(Sender : TObject); 69 | begin 70 | ShellExecute(Handle,'open','http://kpnc.org/idr32/en/donation.htm',Nil,Nil,SHOW_OPENWINDOW); 71 | end; 72 | 73 | end. -------------------------------------------------------------------------------- /ActiveProcesses.dfm: -------------------------------------------------------------------------------- 1 | object FActiveProcesses: TFActiveProcesses 2 | Left = 390 3 | Top = 440 4 | BorderStyle = bsSingle 5 | Caption = 'Active Processes' 6 | ClientHeight = 310 7 | ClientWidth = 792 8 | Color = clBtnFace 9 | Font.Charset = DEFAULT_CHARSET 10 | Font.Color = clWindowText 11 | Font.Height = -10 12 | Font.Name = 'MS Sans Serif' 13 | Font.Style = [] 14 | OldCreateOrder = False 15 | Position = poScreenCenter 16 | OnCreate = FormCreate 17 | OnDestroy = FormDestroy 18 | OnShow = FormShow 19 | PixelsPerInch = 96 20 | TextHeight = 13 21 | object btnDump: TButton 22 | Left = 171 23 | Top = 286 24 | Width = 61 25 | Height = 20 26 | Caption = 'Dump' 27 | TabOrder = 1 28 | OnClick = btnDumpClick 29 | end 30 | object btnCancel: TButton 31 | Left = 561 32 | Top = 286 33 | Width = 61 34 | Height = 20 35 | Caption = 'Cancel' 36 | TabOrder = 2 37 | OnClick = btnCancelClick 38 | end 39 | object lvProcesses: TListView 40 | Left = 0 41 | Top = 0 42 | Width = 792 43 | Height = 280 44 | Align = alTop 45 | Columns = < 46 | item 47 | Caption = 'PID' 48 | Width = 65 49 | end 50 | item 51 | Caption = 'Name' 52 | Width = 325 53 | end 54 | item 55 | Caption = 'Image Size' 56 | Width = 122 57 | end 58 | item 59 | Caption = 'EP' 60 | Width = 122 61 | end 62 | item 63 | Caption = 'Base' 64 | Width = 122 65 | end> 66 | Font.Charset = RUSSIAN_CHARSET 67 | Font.Color = clWindowText 68 | Font.Height = -12 69 | Font.Name = 'Courier New' 70 | Font.Style = [] 71 | RowSelect = True 72 | ParentFont = False 73 | TabOrder = 0 74 | ViewStyle = vsReport 75 | OnClick = lvProcessesClick 76 | end 77 | end 78 | -------------------------------------------------------------------------------- /ActiveProcesses.pas: -------------------------------------------------------------------------------- 1 | Unit ActiveProcesses; 2 | 3 | Interface 4 | 5 | Uses Classes, Windows, SysUtils, Controls, StdCtrls, Forms, ComCtrls, PsApi, TlHelp32; 6 | 7 | Type 8 | TFActiveProcesses=class(TForm) 9 | btnDump:TButton; 10 | btnCancel:TButton; 11 | lvProcesses:TListView; 12 | procedure btnCancelClick(Sender: TObject); 13 | procedure btnDumpClick(Sender: TObject); 14 | procedure FormDestroy(Sender: TObject); 15 | procedure FormCreate(Sender: TObject); 16 | procedure FormShow(Sender: TObject); 17 | procedure lvProcessesClick(Sender: TObject); 18 | private 19 | InstKernel32:THandle; 20 | InstPSAPI:THandle; 21 | ProcessesNum:Cardinal; 22 | ModulesNum:Cardinal; 23 | ProcessIds:Array of Integer; // 1024 24 | ModuleHandles:Array Of HModule; // 1024 25 | lpCreateToolhelp32Snapshot:TCreateToolhelp32Snapshot; 26 | lpProcess32First:TProcess32First; 27 | lpProcess32Next:TProcess32Next; 28 | lpModule32First:TModule32First; 29 | lpModule32Next:TModule32Next; 30 | lpEnumProcesses:TEnumProcesses; 31 | lpEnumProcessModules:TEnumProcessModules; 32 | lpGetModuleFileNameEx:TGetModuleFileNameEx; 33 | lpGetModuleInformation:TGetModuleInformation; 34 | function IsWindows2000OrHigher:Boolean; 35 | procedure ShowProcesses95; 36 | procedure ShowProcessesNT; 37 | public 38 | procedure ShowProcesses; 39 | procedure EnumSections(HProcess:THandle; PProcessBase:Pointer; Buffer:PImageSectionHeader; var Secnum:Cardinal); 40 | procedure DumpProcess(PID:Cardinal; MemStream:TMemoryStream; var BoC, PoC, ImB:Integer); 41 | end; 42 | 43 | Var 44 | FActiveProcesses:TFActiveProcesses; 45 | 46 | Implementation 47 | 48 | {$R *.DFM} 49 | 50 | Uses Main,Dialogs,Def_main; 51 | 52 | procedure TFActiveProcesses.FormCreate(Sender: TObject); 53 | begin 54 | InstPSAPI := 0; 55 | lpEnumProcesses := Nil; 56 | lpEnumProcessModules := Nil; 57 | 58 | InstKernel32 := 0; 59 | lpCreateToolhelp32Snapshot := Nil; 60 | lpProcess32First := Nil; 61 | lpProcess32Next := Nil; 62 | lpModule32First := Nil; 63 | lpModule32Next := Nil; 64 | 65 | //Load PSAPI 66 | if IsWindows2000OrHigher then 67 | begin 68 | //Supported starting from Windows XP/Server 2003 69 | InstPSAPI := LoadLibrary('PSAPI.DLL'); 70 | if InstPSAPI<>0 then 71 | begin 72 | lpEnumProcesses := GetProcAddress(InstPSAPI, 'EnumProcesses'); 73 | lpEnumProcessModules := GetProcAddress(InstPSAPI, 'EnumProcessModules'); 74 | lpGetModuleFileNameEx := GetProcAddress(InstPSAPI, 'GetModuleFileNameExA'); 75 | lpGetModuleInformation := GetProcAddress(InstPSAPI, 'GetModuleInformation'); 76 | End; 77 | end 78 | else 79 | begin 80 | InstKernel32 := LoadLibrary('kernel32.dll'); 81 | if InstKernel32<>0 then 82 | begin 83 | lpCreateToolhelp32Snapshot := GetProcAddress(InstKernel32, 'CreateToolhelp32Snapshot'); 84 | lpProcess32First := GetProcAddress(InstKernel32, 'Process32First'); 85 | lpProcess32Next := GetProcAddress(InstKernel32, 'Process32Next'); 86 | lpModule32First := GetProcAddress(InstKernel32, 'Module32First'); 87 | lpModule32Next := GetProcAddress(InstKernel32, 'Module32Next'); 88 | End; 89 | End; 90 | SetLength(ProcessIds,1024); 91 | SetLength(ModuleHandles,1024); 92 | end; 93 | 94 | procedure TFActiveProcesses.FormDestroy(Sender: TObject); 95 | begin 96 | if InstPSAPI<>0 then FreeLibrary(InstPSAPI); 97 | if InstKernel32<>0 then FreeLibrary(InstKernel32); 98 | SetLength(ProcessIds,0); 99 | SetLength(ModuleHandles,0); 100 | end; 101 | 102 | Procedure TFActiveProcesses.ShowProcesses95; 103 | var 104 | _hSnapshot, _hSnapshotM:THandle; 105 | _ppe:PROCESSENTRY32; 106 | _pme:MODULEENTRY32; 107 | Begin 108 | FillMemory(@_ppe,SizeOf(_ppe),0); 109 | FillMemory(@_pme,SizeOf(_pme),0); 110 | lvProcesses.Items.BeginUpdate; 111 | lvProcesses.Clear; 112 | 113 | _hSnapshot := lpCreateToolhelp32Snapshot(TH32CS_SNAPALL, GetCurrentProcessId); 114 | if _hSnapshot <> INVALID_HANDLE_VALUE then 115 | try 116 | _ppe.dwSize := sizeof(PROCESSENTRY32); 117 | _pme.dwSize := sizeof(MODULEENTRY32); 118 | lpProcess32First(_hSnapshot, _ppe); 119 | Repeat 120 | _hSnapshotM := lpCreateToolhelp32Snapshot(TH32CS_SNAPMODULE, _ppe.th32ProcessID); 121 | if _hSnapshotM = INVALID_HANDLE_VALUE then continue; 122 | if lpModule32First(_hSnapshotM, _pme) then 123 | With lvProcesses.Items.Add do 124 | begin 125 | Caption := IntToHex(_ppe.th32ProcessID, 4); 126 | SubItems.Add(ExtractFileName(_ppe.szExeFile)); 127 | SubItems.Add(IntToHex(_pme.modBaseSize, 8)); 128 | SubItems.Add('-'); 129 | SubItems.Add(IntToHex(Integer(_pme.modBaseAddr), 8)); 130 | End; 131 | CloseHandle(_hSnapshotM); 132 | Until not lpProcess32Next(_hSnapshot, _ppe); 133 | 134 | CloseHandle(_hSnapshot); 135 | Finally 136 | lvProcesses.Items.EndUpdate; 137 | End; 138 | end; 139 | 140 | Function TFActiveProcesses.IsWindows2000OrHigher:Boolean; 141 | var 142 | osvi:OSVERSIONINFO; 143 | Begin 144 | FillMemory(@osvi,SizeOf(osvi),0); 145 | osvi.dwOSVersionInfoSize := sizeof(OSVERSIONINFO); 146 | GetVersionEx(osvi); 147 | //https://msdn.microsoft.com/en-us/library/windows/desktop/ms724834%28v=vs.85%29.aspx 148 | Result:=osvi.dwMajorVersion >= 5; //win XP+ 149 | end; 150 | 151 | Procedure TFActiveProcesses.ShowProcesses; 152 | Begin 153 | if Not IsWindows2000OrHigher then ShowProcesses95 154 | else ShowProcessesNT; 155 | end; 156 | 157 | Procedure TFActiveProcesses.ShowProcessesNT; 158 | var 159 | n, _len, _pos:Integer; 160 | _moduleName:AnsiString; 161 | _hProcess:THandle; 162 | _moduleInfo:TModuleInfo; 163 | _buf:Array[0..511] of Char; 164 | Begin 165 | lpEnumProcesses(@ProcessIds[0], sizeof(ProcessIds), ProcessesNum); 166 | ProcessesNum := ProcessesNum div sizeof(Integer); 167 | 168 | lvProcesses.Items.BeginUpdate; 169 | lvProcesses.Clear; 170 | try 171 | for n := 0 To ProcessesNum-1 do 172 | if ProcessIds[n]<>0 then 173 | begin 174 | _hProcess := OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ, False, ProcessIds[n]); 175 | if _hProcess<>0 then 176 | begin 177 | if lpEnumProcessModules(_hProcess, @ModuleHandles[0], sizeof(ModuleHandles), ModulesNum) then 178 | begin 179 | ModulesNum := ModulesNum Div sizeof(Integer); 180 | _len := lpGetModuleFileNameEx(_hProcess, ModuleHandles[0], @_buf[0], sizeof(_buf)); 181 | SetLength(_moduleName,_len); 182 | StrLCopy(@_moduleName[1],_buf,_len); 183 | lpGetModuleInformation(_hProcess, ModuleHandles[0], @_moduleInfo, sizeof(_moduleInfo)); 184 | if _moduleName <> '' then 185 | begin 186 | _pos := LastDelimiter('\',_moduleName); 187 | if _pos<>0 then _moduleName := Copy(_moduleName,_pos + 1, _len); 188 | With lvProcesses.Items.Add Do 189 | begin 190 | Caption := IntToHex(ProcessIds[n], 4); 191 | SubItems.Add(_moduleName); 192 | SubItems.Add(IntToHex(_moduleInfo.SizeOfImage, 8)); 193 | SubItems.Add(IntToHex(Integer(_moduleInfo.EntryPoint), 8)); 194 | End; 195 | End; 196 | End; 197 | CloseHandle(_hProcess); 198 | End; 199 | end; 200 | Finally 201 | lvProcesses.Items.EndUpdate; 202 | End; 203 | end; 204 | 205 | procedure TFActiveProcesses.btnCancelClick(Sender: TObject); 206 | begin 207 | Close; 208 | end; 209 | 210 | procedure TFActiveProcesses.FormShow(Sender: TObject); 211 | begin 212 | btnDump.Enabled:=Assigned(lvProcesses.Selected); 213 | end; 214 | 215 | procedure TFActiveProcesses.lvProcessesClick(Sender: TObject); 216 | begin 217 | btnDump.Enabled:=Assigned(lvProcesses.Selected); 218 | end; 219 | 220 | Procedure TFActiveProcesses.EnumSections (HProcess:THandle; PProcessBase:Pointer; Buffer:PImageSectionHeader; var Secnum:Cardinal); 221 | var 222 | i:Integer; 223 | _pBuf, _pSection:Pointer; 224 | _peHdrOffset:Pointer; 225 | _sz:Cardinal; 226 | _ntHdr:IMAGE_NT_HEADERS; 227 | _section:IMAGE_SECTION_HEADER; 228 | Begin 229 | //Read offset of PE header 230 | if Not ReadProcessMemory(HProcess, PAnsiChar(PProcessBase)+$3C, @_peHdrOffset, sizeof(_peHdrOffset), _sz) Then Exit; 231 | //Read IMAGE_NT_HEADERS.OptionalHeader.BaseOfCode 232 | if not ReadProcessMemory(HProcess, PAnsiChar(PProcessBase) + Cardinal(_peHdrOffset), @_ntHdr, sizeof(_ntHdr), _sz) then Exit; 233 | 234 | _pSection := PAnsiChar(PProcessBase) + Cardinal(_peHdrOffset) + 4 + sizeof(_ntHdr.FileHeader) + _ntHdr.FileHeader.SizeOfOptionalHeader; 235 | FillMemory(@_section, sizeof(_section),0); 236 | 237 | Secnum := _ntHdr.FileHeader.NumberOfSections; 238 | _pBuf := Buffer; 239 | for i := 0 to _ntHdr.FileHeader.NumberOfSections-1 do 240 | begin 241 | if Not ReadProcessMemory(HProcess, PAnsiChar(_pSection) + i * sizeof(_section), @_section, sizeof(_section), _sz) then Exit; 242 | MoveMemory(_pBuf, @_section, sizeof(_section)); 243 | _pBuf:=PAnsiChar(_pBuf)+ sizeof(_section); 244 | end; 245 | end; 246 | 247 | Procedure TFActiveProcesses.DumpProcess (PID:Cardinal; MemStream:TMemoryStream; var BoC, PoC, ImB:Integer); 248 | Var 249 | secNum:WORD; 250 | peHdrOffset:Pointer; 251 | sz, sizeOfCode:Cardinal; 252 | resPhys, dd:Integer; 253 | buf:Pointer; 254 | b:Array[0..7] of Char; 255 | _hProcess, hSnapshot:THandle; 256 | _moduleInfo:MODULEINFO; 257 | ntHdr:IMAGE_NT_HEADERS; 258 | ppe:PROCESSENTRY32; 259 | pme:MODULEENTRY32; 260 | sections:Array [0..63] of IMAGE_SECTION_HEADER; 261 | Begin 262 | FillMemory(@_moduleInfo,SizeOf(_moduleInfo),0); 263 | _hProcess := OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ, False, PID); //0x1F0FFF 264 | if _hProcess<>0 then 265 | begin 266 | //If Win9x 267 | if not IsWindows2000OrHigher then 268 | begin 269 | hSnapshot := lpCreateToolhelp32Snapshot(TH32CS_SNAPALL, GetCurrentProcessId); 270 | if hSnapshot <> INVALID_HANDLE_VALUE then 271 | begin 272 | ppe.dwSize := sizeof(PROCESSENTRY32); 273 | pme.dwSize := sizeof(MODULEENTRY32); 274 | FillMemory(@ppe.szExeFile, SizeOf(ppe.szExeFile),0); 275 | lpProcess32First(hSnapshot, ppe); 276 | lpModule32First(hSnapshot, pme); 277 | while lpProcess32Next(hSnapshot, ppe) do 278 | begin 279 | lpModule32Next(hSnapshot, pme); 280 | if ppe.th32ProcessID = PID then 281 | begin 282 | _moduleInfo.lpBaseOfDll := pme.modBaseAddr; 283 | //_moduleInfo.lpBaseOfDll := $400000; 284 | end; 285 | End; 286 | CloseHandle(hSnapshot); 287 | end; 288 | end 289 | else 290 | begin 291 | lpEnumProcessModules(_hProcess, @ModuleHandles[0], sizeof(ModuleHandles), ModulesNum); 292 | lpGetModuleInformation(_hProcess, ModuleHandles[0], @_moduleInfo, sizeof(_moduleInfo)); 293 | end; 294 | if not Assigned(_moduleInfo.lpBaseOfDll) then 295 | Raise Exception.Create('Invalid process, PID: ' + IntToStr(PID)); 296 | ReadProcessMemory(_hProcess, PAnsiChar(_moduleInfo.lpBaseOfDll) + $3C, @peHdrOffset, sizeof(peHdrOffset), sz); 297 | ReadProcessMemory(_hProcess, PAnsiChar(_moduleInfo.lpBaseOfDll) + Cardinal(peHdrOffset), @ntHdr, sizeof(ntHdr), sz); 298 | EnumSections(_hProcess, _moduleInfo.lpBaseOfDll, @sections, sz); 299 | MemStream.Clear; 300 | //Dump Header 301 | GetMem(buf,ntHdr.OptionalHeader.SizeOfHeaders); 302 | ReadProcessMemory(_hProcess, _moduleInfo.lpBaseOfDll, buf, ntHdr.OptionalHeader.SizeOfHeaders, sz); 303 | MemStream.WriteBuffer(buf, ntHdr.OptionalHeader.SizeOfHeaders); 304 | FreeMem(buf); 305 | //!!!! - SizeOfCode is not initialized !!! 306 | if sizeOfCode < sections[1].Misc.VirtualSize then 307 | sizeOfCode := sections[1].Misc.VirtualSize 308 | else 309 | sizeOfCode := ntHdr.OptionalHeader.SizeOfCode; 310 | //!!! 311 | MemStream.Clear; 312 | GetMem(buf,ntHdr.OptionalHeader.SizeOfImage); 313 | ReadProcessMemory(_hProcess, _moduleInfo.lpBaseOfDll, buf, ntHdr.OptionalHeader.SizeOfImage, sz); 314 | MemStream.WriteBuffer(buf, ntHdr.OptionalHeader.SizeOfImage); 315 | FreeMem(buf); 316 | //!!! 317 | { 318 | //Dump Code 319 | GetMem(buf,sizeOfCode); 320 | ReadProcessMemory(_hProcess, _moduleInfo.lpBaseOfDll + ntHdr.OptionalHeader.BaseOfCode, buf, sizeOfCode, sz); 321 | MemStream.WriteBuffer(buf, sizeOfCode); 322 | FreeMem(buf); 323 | } 324 | //Find EP 325 | //Dump Resources 326 | MemStream.Seek(0, soFromEnd); 327 | resPhys := MemStream.Size; 328 | { 329 | GetMem(buf,ntHdr.OptionalHeader.DataDirectory[2].Size); 330 | ReadProcessMemory(_hProcess, _moduleInfo.lpBaseOfDll + ntHdr.OptionalHeader.DataDirectory[2].VirtualAddress, buf, ntHdr.OptionalHeader.DataDirectory[2].Size, sz); 331 | MemStream.WriteBuffer(buf, ntHdr.OptionalHeader.DataDirectory[2].Size); 332 | FreeMem(buf); 333 | } 334 | //Correct PE Header 335 | //Set SectionNum = 2 336 | MemStream.Seek(6 + Cardinal(peHdrOffset), soFromBeginning); 337 | secNum := 2; 338 | MemStream.WriteBuffer(secNum, sizeof(secNum)); 339 | //Set EP 340 | //Set sections 341 | MemStream.Seek($F8 + Cardinal(peHdrOffset), soFromBeginning); 342 | //"CODE" 343 | FillMemory(@b, SizeOf(b),0); 344 | b[0] := 'C'; 345 | b[1] := 'O'; 346 | b[2] := 'D'; 347 | b[3] := 'E'; 348 | MemStream.WriteBuffer(b, 8); 349 | dd := sizeOfCode; 350 | MemStream.WriteBuffer(dd, 4);//VIRTUAL_SIZE 351 | dd := ntHdr.OptionalHeader.BaseOfCode; 352 | MemStream.WriteBuffer(dd, 4);//RVA 353 | dd := sizeOfCode; 354 | MemStream.WriteBuffer(dd, 4);//PHYSICAL_SIZE 355 | dd := ntHdr.OptionalHeader.SizeOfHeaders; 356 | MemStream.WriteBuffer(dd, 4);//PHYSICAL_OFFSET 357 | dd := 0; 358 | MemStream.WriteBuffer(dd, 4);//RELOC_PTR 359 | MemStream.WriteBuffer(dd, 4);//LINENUM_PTR 360 | MemStream.WriteBuffer(dd, 4);//RELOC_NUM,LINENUM_NUM 361 | dd := $60000020; 362 | MemStream.WriteBuffer(dd, 4);//FLAGS 363 | (* 364 | //"DATA" 365 | FillMemory(@_b, SizeOf(_b),0); 366 | _b[0] := 'D'; 367 | _b[1] := 'A'; 368 | _b[2] := 'T'; 369 | _b[3] := 'A'; 370 | MemStream.WriteBuffer(_b, 8); 371 | _dd := 0; 372 | MemStream.WriteBuffer(_dd, 4);//VIRTUAL_SIZE 373 | MemStream.WriteBuffer(_dd, 4);//RVA 374 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_SIZE 375 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_OFFSET 376 | MemStream.WriteBuffer(_dd, 4);//RELOC_PTR 377 | MemStream.WriteBuffer(_dd, 4);//LINENUM_PTR 378 | MemStream.WriteBuffer(_dd, 4);//RELOC_NUM,LINENUM_NUM 379 | _dd := $C0000040; 380 | MemStream.WriteBuffer(_dd, 4);//FLAGS 381 | //"BSS" 382 | FillMemory(@_b, SizeOf(_b),0); 383 | _b[0] := 'B'; 384 | _b[1] := 'S'; 385 | _b[2] := 'S'; 386 | MemStream.WriteBuffer(_b, 8); 387 | _dd := 0; 388 | MemStream.WriteBuffer(_dd, 4);//VIRTUAL_SIZE 389 | MemStream.WriteBuffer(_dd, 4);//RVA 390 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_SIZE 391 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_OFFSET 392 | MemStream.WriteBuffer(_dd, 4);//RELOC_PTR 393 | MemStream.WriteBuffer(_dd, 4);//LINENUM_PTR 394 | MemStream.WriteBuffer(_dd, 4);//RELOC_NUM,LINENUM_NUM 395 | _dd := $C0000040; 396 | MemStream.WriteBuffer(_dd, 4);//FLAGS 397 | //".idata" 398 | FillMemory(@_b, SizeOf(_b),0); 399 | _b[0] := '.'; 400 | _b[1] := 'i'; 401 | _b[2] := 'd'; 402 | _b[3] := 'a'; 403 | _b[4] := 't'; 404 | _b[5] := 'a'; 405 | MemStream.WriteBuffer(_b, 8); 406 | _dd := 0; 407 | MemStream.WriteBuffer(_dd, 4);//VIRTUAL_SIZE 408 | MemStream.WriteBuffer(_dd, 4);//RVA 409 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_SIZE 410 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_OFFSET 411 | MemStream.WriteBuffer(_dd, 4);//RELOC_PTR 412 | MemStream.WriteBuffer(_dd, 4);//LINENUM_PTR 413 | MemStream.WriteBuffer(_dd, 4);//RELOC_NUM,LINENUM_NUM 414 | _dd := $C0000040; 415 | MemStream.WriteBuffer(_dd, 4);//FLAGS 416 | //".tls" 417 | FillMemory(@_b, SizeOf(_b),0); 418 | _b[0] := '.'; 419 | _b[1] := 't'; 420 | _b[2] := 'l'; 421 | _b[3] := 's'; 422 | MemStream.WriteBuffer(_b, 8); 423 | _dd := 0; 424 | MemStream.WriteBuffer(_dd, 4);//VIRTUAL_SIZE 425 | MemStream.WriteBuffer(_dd, 4);//RVA 426 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_SIZE 427 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_OFFSET 428 | MemStream.WriteBuffer(_dd, 4);//RELOC_PTR 429 | MemStream.WriteBuffer(_dd, 4);//LINENUM_PTR 430 | MemStream.WriteBuffer(_dd, 4);//RELOC_NUM,LINENUM_NUM 431 | _dd := $C0000000; 432 | MemStream.WriteBuffer(_dd, 4);//FLAGS 433 | //".rdata" 434 | FillMemory(@_b, SizeOf(_b),0); 435 | _b[0] := '.'; 436 | _b[1] := 'r'; 437 | _b[2] := 'd'; 438 | _b[3] := 'a'; 439 | _b[4] := 't'; 440 | _b[5] := 'a'; 441 | MemStream.WriteBuffer(_b, 8); 442 | _dd := 0; 443 | MemStream.WriteBuffer(_dd, 4);//VIRTUAL_SIZE 444 | MemStream.WriteBuffer(_dd, 4);//RVA 445 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_SIZE 446 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_OFFSET 447 | MemStream.WriteBuffer(_dd, 4);//RELOC_PTR 448 | MemStream.WriteBuffer(_dd, 4);//LINENUM_PTR 449 | MemStream.WriteBuffer(_dd, 4);//RELOC_NUM,LINENUM_NUM 450 | _dd := $50000040; 451 | MemStream.WriteBuffer(_dd, 4);//FLAGS 452 | //".reloc" 453 | memset(_b, 0, 8); 454 | _b[0] := '.'; 455 | _b[1] := 'r'; 456 | _b[2] := 'e'; 457 | _b[3] := 'l'; 458 | _b[4] := 'o'; 459 | _b[5] := 'c'; 460 | MemStream.WriteBuffer(_b, 8); 461 | _dd := 0; 462 | MemStream.WriteBuffer(_dd, 4);//VIRTUAL_SIZE 463 | MemStream.WriteBuffer(_dd, 4);//RVA 464 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_SIZE 465 | MemStream.WriteBuffer(_dd, 4);//PHYSICAL_OFFSET 466 | MemStream.WriteBuffer(_dd, 4);//RELOC_PTR 467 | MemStream.WriteBuffer(_dd, 4);//LINENUM_PTR 468 | MemStream.WriteBuffer(_dd, 4);//RELOC_NUM,LINENUM_NUM 469 | _dd := $50000040; 470 | MemStream.WriteBuffer(_dd, 4);//FLAGS 471 | *) 472 | //".rsrc" 473 | FillMemory(@b, SizeOf(b),0); 474 | b[0] := '.'; 475 | b[1] := 'r'; 476 | b[2] := 's'; 477 | b[3] := 'r'; 478 | b[4] := 'c'; 479 | MemStream.WriteBuffer(b, 8); 480 | dd := ntHdr.OptionalHeader.DataDirectory[2].Size; 481 | MemStream.WriteBuffer(dd, 4);//VIRTUAL_SIZE 482 | dd := ntHdr.OptionalHeader.DataDirectory[2].VirtualAddress; 483 | MemStream.WriteBuffer(dd, 4);//RVA 484 | dd := ntHdr.OptionalHeader.DataDirectory[2].Size; 485 | MemStream.WriteBuffer(dd, 4);//PHYSICAL_SIZE 486 | dd := resPhys; 487 | MemStream.WriteBuffer(dd, 4);//PHYSICAL_OFFSET 488 | dd := 0; 489 | MemStream.WriteBuffer(dd, 4);//RELOC_PTR 490 | MemStream.WriteBuffer(dd, 4);//LINENUM_PTR 491 | MemStream.WriteBuffer(dd, 4);//RELOC_NUM,LINENUM_NUM 492 | dd := $50000040; 493 | MemStream.WriteBuffer(dd, 4);//FLAGS 494 | (* 495 | //Correct directories 496 | MemStream.Seek($78 + Cardinal(_peHdrOffset), soFromBeginning); 497 | //Export table 498 | _dd := 0; 499 | MemStream.WriteBuffer(_dd, 4);//VA 500 | MemStream.WriteBuffer(_dd, 4);//Size 501 | //Import table 502 | _dd := 0; 503 | MemStream.WriteBuffer(_dd, 4);//VA 504 | MemStream.WriteBuffer(_dd, 4);//Size 505 | //Resource table 506 | _dd := _ntHdr.OptionalHeader.SizeOfHeaders; 507 | MemStream.WriteBuffer(_dd, 4);//RVA 508 | _dd := _ntHdr.OptionalHeader.DataDirectory[2].Size; 509 | MemStream.WriteBuffer(_dd, 4);//VIRTUAL_SIZE 510 | *) 511 | FMain.EvaluateInitTable(MemStream.Memory, MemStream.Size, ntHdr.OptionalHeader.ImageBase + ntHdr.OptionalHeader.SizeOfHeaders); 512 | CloseHandle(_hProcess); 513 | end; 514 | end; 515 | 516 | procedure TFActiveProcesses.btnDumpClick(Sender: TObject); 517 | var 518 | pid, boc, poc, imb:Integer; 519 | li:TListItem; 520 | stream:TMemoryStream; 521 | Begin 522 | if Assigned(lvProcesses.Selected) then 523 | try 524 | li := lvProcesses.Selected; 525 | pid := StrToInt('$' + li.Caption); 526 | stream := TMemoryStream.Create; 527 | try 528 | DumpProcess(pid, stream, boc, poc, imb); 529 | if stream.Size=0 then Exit; 530 | stream.SaveToFile('__idrtmp__.exe'); 531 | Finally 532 | stream.Free; 533 | End; 534 | FMain.DoOpenDelphiFile(DELHPI_VERSION_AUTO, '__idrtmp__.exe', false, false); 535 | except 536 | on ex:Exception do ShowMessage('Dumper failed: ' + ex.Message); 537 | End; 538 | Close; 539 | end; 540 | 541 | end. 542 | -------------------------------------------------------------------------------- /Def_decomp.pas: -------------------------------------------------------------------------------- 1 | unit Def_decomp; 2 | 3 | interface 4 | 5 | Type 6 | TDecomIflag = ( 7 | IF_ARG, // 1; 8 | IF_VAR, // 2; 9 | IF_STACK_PTR, // 4; 10 | IF_CALL_RESULT, // 8; 11 | IF_VMT_ADR, // 16; 12 | IF_CYCLE_VAR, // 32; 13 | IF_FIELD, // 64; 14 | IF_ARRAY_PTR, // 128; 15 | IF_INTVAL, // 256; 16 | IF_INTERFACE, // 512; 17 | IF_EXTERN_VAR, // 1024; // Used for embedded procedures 18 | IF_RECORD_FOFS // 2048; // Offset inside record 19 | ); 20 | TDecomIset = Set of TDecomIflag; 21 | 22 | TDecomCflag = ( 23 | CF_CONSTRUCTOR, // 1; 24 | CF_DESTRUCTOR, // 2; 25 | CF_FINALLY, // 4; 26 | CF_EXCEPT, // 8; 27 | CF_LOOP, // 16; 28 | CF_BJL, // 32; 29 | CF_ELSE // 64; 30 | ); 31 | TDecomCset = Set Of TDecomCflag; 32 | 33 | Const 34 | //Precedence of operations 35 | PRECEDENCE_ATOM = 24; 36 | PRECEDENCE_UNARY = 16; 37 | PRECEDENCE_MULT = 15; //*,/,div, mod,and,shl,shr,as 38 | PRECEDENCE_ADD = 14; //+,-,or,xor 39 | PRECEDENCE_NOT = 6; //@,not 40 | PRECEDENCE_CMP = 9; //=,<>,<,>,<=,>=,in,is 41 | PRECEDENCE_NONE = 0; 42 | 43 | TAB_SIZE = 2; 44 | 45 | CMP_FAILED = 0; 46 | CMP_BRANCH = 1; 47 | CMP_SET = 2; 48 | 49 | //BJL 50 | MAXSEQNUM = 1024; 51 | 52 | BJL_USED = -1; 53 | BJL_EMPTY = 0; 54 | BJL_BRANCH = 1; 55 | BJL_JUMP = 2; 56 | BJL_LOC = 3; 57 | BJL_SKIP_BRANCH = 4; //branches for IntOver, BoundErr,... 58 | 59 | itUNK = 0; 60 | itREG = 1; 61 | itLVAR = 2; 62 | itGVAR = 3; 63 | 64 | Type 65 | TBJLInfo = record 66 | state:Char; //'U' not defined; 'B' branch; 'J' jump; '@' label; 'R' return; 'S' switch 67 | bcnt:Integer; //branches to... count 68 | address:Integer; 69 | dExpr:AnsiString; //condition of direct expression 70 | iExpr:AnsiString; //condition of inverse expression 71 | result:AnsiString; 72 | end; 73 | PBJLInfo = ^TBJLInfo; 74 | 75 | TBJL = record 76 | branch:Boolean; 77 | loc:Boolean; 78 | _type:Integer; 79 | address:Integer; 80 | idx:Integer; //IDX in BJLseq 81 | end; 82 | PBJL = ^TBJL; 83 | 84 | TCmpItem = record 85 | L:AnsiString; 86 | O:Char; 87 | R:AnsiString; 88 | End; 89 | PCmpItem = ^TCmpItem; 90 | 91 | TItem = record 92 | Precedence:Byte; 93 | Size:Integer; //Size in bytes 94 | Offset:Integer; //Offset from beginning of type 95 | IntValue:Integer; //For array element size calculation 96 | Flags:TDecomIset; 97 | Value:AnsiString; 98 | Value1:AnsiString; //For various purposes 99 | _Type:AnsiString; 100 | Name:AnsiString; 101 | End; 102 | PItem = ^TItem; 103 | PItemArr = Array of TItem; 104 | 105 | WHAT = record 106 | Value:AnsiString; 107 | Name:AnsiString; 108 | End; 109 | PWHAT = ^WHAT; 110 | 111 | IdxInfo = record 112 | IdxType:Byte; 113 | IdxValue:Integer; 114 | IdxStr:AnsiString; 115 | End; 116 | PIdxInfo = ^IdxInfo; 117 | 118 | //cmpStack Format: "XYYYYYYY^ZZZZ" (== YYYYYY X ZZZZ) 119 | //'A'-JO;'B'-JNO;'C'-JB;'D'-'JNB';'E'-JZ;'F'-JNZ;'G'-JBE;'H'-JA; 120 | //'I'-'JS';'J'-JNS;'K'-JP;'L'-JNP;'M'-JL;'N'-JGE;'O'-JLE;'P'-JG 121 | 122 | //Only registers eax, ecx, edx, ebx, esp, ebp, esi, edi 123 | Regs = Array [0..7] of TItem; 124 | 125 | PCaseTreeNode = ^TCaseTreeNode; 126 | TCaseTreeNode = record 127 | LNode,RNode:PCaseTreeNode; 128 | ZProc:Integer; 129 | FromVal:Integer; 130 | ToVal:Integer; 131 | end; 132 | 133 | //structure for saving context of all registers 134 | DContext = record 135 | adr:Integer; 136 | gregs:Regs; //general registers 137 | fregs:Regs; //floating point registers 138 | fregsd:Regs; //floating point registers (copy) 139 | End; 140 | PDContext = ^DContext; 141 | 142 | Const 143 | //'A'-JO;'B'-JNO;'C'-JB;'D'-JNB;'E'-JZ;'F'-JNZ;'G'-JBE;'H'-JA; 144 | //'I'-JS;'J'-JNS;'K'-JP;'L'-JNP;'M'-JL;'N'-JGE;'O'-JLE;'P'-JG 145 | //'Q'-in;'R'-not in;'S'-is 146 | DirectConditions:Array[0..18] of AnsiString = ( 147 | '', '', '<', '>=', '=', '<>', '<=', '>', '', '', '', '', '<', '>=', '<=', '>', 'not in', 'in', 'is'); 148 | InvertConditions:Array[0..18] of AnsiString = ( 149 | '', '', '>=', '<', '<>', '=', '>', '<=', '', '', '', '', '>=', '<', '>', '<=', 'in', 'not in', 'is not'); 150 | 151 | implementation 152 | 153 | end. 154 | -------------------------------------------------------------------------------- /Def_disasm.pas: -------------------------------------------------------------------------------- 1 | unit Def_disasm; 2 | 3 | interface 4 | 5 | Uses SysUtils; 6 | 7 | Const 8 | ASMMAXCOPLEN = 12; 9 | 10 | OP_RESET = $80; 11 | OP_A2 = $40; //2 or 3 operands 12 | 13 | OP_UNK = 0; 14 | OP_ADC = $81; //1 OP_RESET 15 | OP_ADD = $C2; //2 OP_RESET OP_A2 16 | OP_AND = $C3; //3 OP_RESET OP_A2 17 | OP_BT = $44; //4 OP_A2 18 | OP_BTC = $45; //5 OP_A2 19 | OP_BTR = $46; //6 OP_A2 20 | OP_BTS = $47; //7 OP_A2 21 | OP_CDQ = $88; //8 OP_RESET 22 | OP_CMP = $49; //9 OP_A2 23 | OP_DEC = $8A; //A OP_RESET 24 | OP_DIV = $8B; //B OP_RESET 25 | OP_IDIV = $CC; //C OP_RESET OP_A2 26 | OP_IMUL = $CD; //D OP_RESET OP_A2 27 | OP_INC = $8E; //E OP_RESET 28 | OP_JMP = $8F; //F OP_RESET 29 | OP_LEA = $D0; //10 OP_RESET OP_A2 30 | OP_MOV = $D1; //11 OP_RESET OP_A2 31 | OP_MOVS = $92; //12 OP_RESET 32 | OP_MUL = $93; //13 OP_RESET 33 | OP_NEG = $94; //14 OP_RESET 34 | OP_OR = $D5; //15 OP_RESET OP_A2 35 | OP_POP = $96; //16 OP_RESET 36 | OP_PUSH = $97; //17 OP_RESET 37 | OP_SAR = $98; //18 OP_RESET 38 | OP_SBB = $99; //19 OP_RESET 39 | OP_SET = $9A; //1A OP_RESET 40 | OP_SUB = $9B; //1B OP_RESET 41 | OP_TEST = $5C; //1C OP_A2 42 | OP_XCHG = $DD; //1D OP_RESET OP_A2 43 | OP_XOR = $DE; //1E OP_RESET OP_A2 44 | OP_SHR = $9F; //1F OP_RESET 45 | OP_SAL = $A0; //20 OP_RESET 46 | OP_SHL = $A1; //21 OP_RESET 47 | OP_NOT = $A2; //22 OP_RESET 48 | 49 | Reg8Tab:Array[0..7] of AnsiString = 50 | ( 51 | //0 1 2 3 4 5 6 7 52 | 'al', 'cl', 'dl', 'bl', 'ah', 'ch', 'dh', 'bh' 53 | ); 54 | Reg16Tab:Array[0..7] of AnsiString = 55 | ( 56 | //8 9 10 11 12 13 14 15 57 | 'ax', 'cx', 'dx', 'bx', 'sp', 'bp', 'si', 'di' 58 | ); 59 | Reg32Tab:Array[0..7] of AnsiString = 60 | ( 61 | //16 17 18 19 20 21 22 23 62 | 'eax', 'ecx', 'edx', 'ebx', 'esp', 'ebp', 'esi', 'edi' 63 | ); 64 | SegRegTab:Array[0..7] of AnsiString = 65 | ( 66 | //24 25 26 27 28 29 30 31 67 | 'es', 'cs', 'ss', 'ds', 'fs', 'gs', '??', '??' 68 | ); 69 | RegCombTab:Array[0..7] of AnsiString = 70 | ( 71 | 'bx+si', 'bx+di', 'bp+si', 'bp+di', 'si', 'di', 'bp', 'bx' 72 | ); 73 | RepPrefixTab:Array[0..3] of AnsiString = 74 | ( 75 | 'lock', 'repne', 'repe', 'rep' 76 | ); 77 | 78 | Type 79 | TOperType = (otUND, otIMM, otREG, otMEM, otFST); 80 | 81 | TDisInfo = record 82 | Mnem:String[32]; 83 | Op1:String[64]; 84 | //Op2:Array [0..63] of Char; 85 | //Op3:Array [0..63] of Char; 86 | //InstrType:Byte; 87 | Float:Boolean; 88 | Call:Boolean; 89 | Branch:Boolean; 90 | Conditional:Boolean; 91 | Ret:Boolean; 92 | //Register indexes, used as operands 93 | OpRegIdx:Array[0..2] of Integer; 94 | //[BaseReg + IndxReg*Scale + Offset] 95 | BaseReg:Integer; 96 | IndxReg:Integer; 97 | Scale:Integer; 98 | Offset:Integer; 99 | //ImmPresent:Boolean; 100 | Immediate:Integer; 101 | OpSize:Byte; 102 | sSize:String[32]; 103 | RepPrefix:Integer; 104 | SegPrefix:Integer; 105 | OpNum:Byte; 106 | OpType:Array [0..2] of TOperType; 107 | End; 108 | PDisInfo = ^TDisInfo; 109 | 110 | implementation 111 | 112 | end. 113 | -------------------------------------------------------------------------------- /Def_info.pas: -------------------------------------------------------------------------------- 1 | unit Def_info; 2 | 3 | interface 4 | 5 | type 6 | //procflags 7 | TProcFlag = ( 8 | pf_1,pf_2,pf_3,pf_4,pf_5,pf_6,pf_7,pf_8, 9 | pf_9,pf_10,pf_11,pf_12,pf_13,pf_14,pf_15,pf_16, 10 | pf_17,pf_18,pf_19,pf_20, 11 | PF_PUBLISHED, // $00100000; //published 12 | PF_METHOD, // $00200000; //is method of class (other than virtual, dynamic or event) 13 | PF_ARGSIZEL, // $00400000; //If delta between retN and total arguments size < 0 14 | PF_ARGSIZEG, // $00800000; //If delta between retN and total arguments size > 0 15 | PF_BPBASED, // $01000000; 16 | PF_KBPROTO, // $02000000; //if prototype for kb was got 17 | PF_OUTEAX, // $04000000; 18 | PF_EVENT, // $08000000; 19 | PF_DYNAMIC, // $10000000; 20 | PF_VIRTUAL, // $20000000; 21 | PF_EMBED, // $40000000; 22 | PF_MAYBEEMBED // $80000000; 23 | ); 24 | TProcFlagSet = Set of TProcFlag; 25 | 26 | Const 27 | PF_ALLMETHODS = [PF_METHOD, PF_VIRTUAL, PF_DYNAMIC, PF_EVENT]; 28 | 29 | //Information about class fields (look VmtSelfPtr) 30 | FIELD_PRIVATE = 9; 31 | FIELD_PROTECTED = 10; 32 | FIELD_PUBLIC = 11; 33 | FIELD_PUBLISHED = 12; 34 | 35 | OP_COMMENT = $10; 36 | OP_CALL = $11; 37 | 38 | //--------------------------------------------------------------------------- 39 | //lastVar 40 | //vmtAdr 41 | //typeIdx??? - for Type search 42 | //--------------------------------------------------------------------------- 43 | 44 | Type 45 | //Class Methods Information 46 | MethodRec = record 47 | _abstract:Boolean;//call @AbstractError 48 | kind:Char; //'M' - method; 'V' - virtual; 'D' - dynamic 49 | id:Integer; //ID (for virtual methods - offset, for dynamics - MsgId) 50 | address:Integer; //Call Address 51 | name:AnsiString; //Method Name 52 | End; 53 | PMethodRec = ^MethodRec; 54 | 55 | //InfoResStringInfo = Array of AnsiString; 56 | 57 | PICODE = record 58 | Op:BYTE; //Operation 59 | Offset:Integer; //Field offset or Proc address for OP_CALL 60 | Name:AnsiString; //Type name 61 | End; 62 | PPICODE = ^PICODE; 63 | 64 | implementation 65 | 66 | end. 67 | -------------------------------------------------------------------------------- /Def_know.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmcdos/IDR/805f6011d44d1b4ab404768dea9b69c5b6b2b94b/Def_know.pas -------------------------------------------------------------------------------- /Def_res.pas: -------------------------------------------------------------------------------- 1 | unit Def_res; 2 | 3 | interface 4 | 5 | Uses Classes; 6 | 7 | Const 8 | FF_INHERITED = 1; 9 | FF_HASNOTEBOOK = 2; 10 | 11 | Type 12 | TFindMethodSourceEvent = Procedure (Sender:TObject; ClasName, MethodName:AnsiString) of object; 13 | 14 | EventListItem = record 15 | CompName:AnsiString; //Component Name 16 | EventName:AnsiString; //Event Name 17 | Adr:Integer; //Event Address 18 | End; 19 | PEventListItem = ^EventListItem; 20 | 21 | RegClassInfo = Record 22 | RegClass:TPersistentClass; 23 | ClasName:PAnsiChar; 24 | End; 25 | PRegClassInfo = ^RegClassInfo; 26 | 27 | EventInfo = record 28 | EventName:AnsiString; //Event name (OnClose) 29 | ProcName:AnsiString; //Event handler name (CloseBtnClick) 30 | End; 31 | PEventInfo = ^EventInfo; 32 | 33 | ComponentInfo = record 34 | Inherit:Boolean; //Component is inherited 35 | HasGlyph:Boolean; //Component has property "Glyph" 36 | Name:AnsiString; //Component name 37 | ClasName:AnsiString; //Component class 38 | Events:TList; //EventInfo list 39 | End; 40 | PComponentInfo = ^ComponentInfo; 41 | 42 | 43 | implementation 44 | 45 | end. 46 | -------------------------------------------------------------------------------- /Def_thread.pas: -------------------------------------------------------------------------------- 1 | unit Def_thread; 2 | 3 | interface 4 | 5 | Const 6 | LAST_ANALYZE_STEP = 19; 7 | 8 | Type 9 | ThreadAnalysisOperation = 10 | ( 11 | taStartPrBar, taUpdatePrBar, taStopPrBar, taUpdateStBar, 12 | taUpdateUnits, taUpdateRTTIs, taUpdateVmtList, taUpdateStrings, taUpdateCode, taUpdateXrefs, 13 | taUpdateShortClassViewer, taUpdateClassViewer, taUpdateBeforeClassViewer, 14 | taFinished 15 | ); 16 | 17 | ThreadAnalysisData = record 18 | pbSteps:Integer; 19 | sbText:AnsiString; 20 | end; 21 | PThreadAnalysisData = ^ThreadAnalysisData; 22 | 23 | CVPair = record 24 | height:Integer; 25 | vmtAdr:Integer; 26 | end; 27 | PCVPair = ^CVPair; 28 | 29 | implementation 30 | 31 | end. 32 | -------------------------------------------------------------------------------- /EditFieldsDlg.dfm: -------------------------------------------------------------------------------- 1 | object FEditFieldsDlg: TFEditFieldsDlg 2 | Left = 239 3 | Top = 263 4 | BorderStyle = bsToolWindow 5 | ClientHeight = 331 6 | ClientWidth = 650 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'MS Sans Serif' 12 | Font.Style = [] 13 | FormStyle = fsStayOnTop 14 | OldCreateOrder = False 15 | Position = poScreenCenter 16 | OnCreate = FormCreate 17 | OnDestroy = FormDestroy 18 | OnShow = FormShow 19 | PixelsPerInch = 96 20 | TextHeight = 13 21 | object Panel1: TPanel 22 | Left = 0 23 | Top = 290 24 | Width = 650 25 | Height = 41 26 | Align = alBottom 27 | TabOrder = 0 28 | object bAdd: TButton 29 | Left = 288 30 | Top = 8 31 | Width = 74 32 | Height = 25 33 | Caption = 'Add' 34 | TabOrder = 1 35 | OnClick = bAddClick 36 | end 37 | object bRemove: TButton 38 | Left = 384 39 | Top = 8 40 | Width = 74 41 | Height = 25 42 | Caption = 'Remove' 43 | TabOrder = 2 44 | OnClick = bRemoveClick 45 | end 46 | object bEdit: TButton 47 | Left = 192 48 | Top = 8 49 | Width = 75 50 | Height = 25 51 | Caption = 'Edit' 52 | Enabled = False 53 | TabOrder = 0 54 | OnClick = bEditClick 55 | end 56 | end 57 | object panel2: TPanel 58 | Left = 0 59 | Top = 0 60 | Width = 523 61 | Height = 290 62 | Align = alClient 63 | Caption = 'panel2' 64 | TabOrder = 1 65 | object lbFields: TListBox 66 | Left = 1 67 | Top = 1 68 | Width = 521 69 | Height = 182 70 | Align = alClient 71 | Font.Charset = DEFAULT_CHARSET 72 | Font.Color = clWindowText 73 | Font.Height = -12 74 | Font.Name = 'Fixedsys' 75 | Font.Style = [] 76 | ItemHeight = 16 77 | ParentFont = False 78 | TabOrder = 0 79 | OnClick = lbFieldsClick 80 | end 81 | object edtPanel: TPanel 82 | Left = 1 83 | Top = 183 84 | Width = 521 85 | Height = 106 86 | Align = alBottom 87 | TabOrder = 1 88 | object edtName: TLabeledEdit 89 | Left = 104 90 | Top = 40 91 | Width = 306 92 | Height = 24 93 | EditLabel.Width = 40 94 | EditLabel.Height = 16 95 | EditLabel.Caption = 'Name:' 96 | EditLabel.Font.Charset = RUSSIAN_CHARSET 97 | EditLabel.Font.Color = clWindowText 98 | EditLabel.Font.Height = -12 99 | EditLabel.Font.Name = 'Fixedsys' 100 | EditLabel.Font.Style = [] 101 | EditLabel.ParentFont = False 102 | Font.Charset = DEFAULT_CHARSET 103 | Font.Color = clWindowText 104 | Font.Height = -12 105 | Font.Name = 'Fixedsys' 106 | Font.Style = [] 107 | LabelPosition = lpLeft 108 | ParentFont = False 109 | TabOrder = 1 110 | OnChange = edtNameChange 111 | end 112 | object edtType: TLabeledEdit 113 | Left = 104 114 | Top = 72 115 | Width = 306 116 | Height = 24 117 | EditLabel.Width = 40 118 | EditLabel.Height = 16 119 | EditLabel.Caption = 'Type:' 120 | EditLabel.Font.Charset = RUSSIAN_CHARSET 121 | EditLabel.Font.Color = clWindowText 122 | EditLabel.Font.Height = -12 123 | EditLabel.Font.Name = 'Fixedsys' 124 | EditLabel.Font.Style = [] 125 | EditLabel.ParentFont = False 126 | Font.Charset = DEFAULT_CHARSET 127 | Font.Color = clWindowText 128 | Font.Height = -12 129 | Font.Name = 'Fixedsys' 130 | Font.Style = [] 131 | LabelPosition = lpLeft 132 | ParentFont = False 133 | TabOrder = 2 134 | OnChange = edtTypeChange 135 | end 136 | object bApply: TButton 137 | Left = 428 138 | Top = 24 139 | Width = 75 140 | Height = 25 141 | Caption = 'Apply' 142 | Default = True 143 | TabOrder = 3 144 | OnClick = bApplyClick 145 | end 146 | object bClose: TButton 147 | Left = 428 148 | Top = 56 149 | Width = 75 150 | Height = 25 151 | Caption = 'Close' 152 | Default = True 153 | TabOrder = 4 154 | OnClick = bCloseClick 155 | end 156 | object edtOffset: TLabeledEdit 157 | Left = 104 158 | Top = 8 159 | Width = 306 160 | Height = 24 161 | EditLabel.Width = 80 162 | EditLabel.Height = 16 163 | EditLabel.Caption = 'HexOffset:' 164 | EditLabel.Font.Charset = RUSSIAN_CHARSET 165 | EditLabel.Font.Color = clWindowText 166 | EditLabel.Font.Height = -12 167 | EditLabel.Font.Name = 'Fixedsys' 168 | EditLabel.Font.Style = [] 169 | EditLabel.ParentFont = False 170 | Font.Charset = DEFAULT_CHARSET 171 | Font.Color = clWindowText 172 | Font.Height = -12 173 | Font.Name = 'Fixedsys' 174 | Font.Style = [] 175 | LabelPosition = lpLeft 176 | ParentFont = False 177 | TabOrder = 0 178 | OnChange = edtNameChange 179 | end 180 | end 181 | end 182 | object lbFXrefs: TListBox 183 | Left = 523 184 | Top = 0 185 | Width = 127 186 | Height = 290 187 | Align = alRight 188 | Font.Charset = DEFAULT_CHARSET 189 | Font.Color = clWindowText 190 | Font.Height = -12 191 | Font.Name = 'Fixedsys' 192 | Font.Style = [] 193 | ItemHeight = 16 194 | ParentFont = False 195 | TabOrder = 2 196 | OnDblClick = lbFXrefsDblClick 197 | end 198 | end 199 | -------------------------------------------------------------------------------- /EditFieldsDlg.pas: -------------------------------------------------------------------------------- 1 | unit EditFieldsDlg; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, 7 | Controls, Forms, Dialogs, StdCtrls, ExtCtrls; 8 | 9 | type 10 | TFieldOp = (FD_OP_EDIT, FD_OP_ADD, FD_OP_DELETE); 11 | 12 | TFEditFieldsDlg=class(TForm) 13 | lbFXrefs: TListBox; 14 | lbFields: TListBox; 15 | Panel1: TPanel; 16 | bAdd: TButton; 17 | bRemove: TButton; 18 | edtPanel: TPanel; 19 | edtName: TLabeledEdit; 20 | edtType: TLabeledEdit; 21 | bApply: TButton; 22 | bClose: TButton; 23 | edtOffset: TLabeledEdit; 24 | bEdit: TButton; 25 | panel2: TPanel; 26 | procedure FormDestroy(Sender: TObject); 27 | procedure FormShow(Sender : TObject); 28 | procedure lbFXrefsDblClick(Sender : TObject); 29 | procedure lbFieldsClick(Sender : TObject); 30 | procedure edtNameChange(Sender : TObject); 31 | procedure edtTypeChange(Sender : TObject); 32 | procedure bCloseClick(Sender : TObject); 33 | procedure bApplyClick(Sender : TObject); 34 | procedure bEditClick(Sender : TObject); 35 | procedure bRemoveClick(Sender : TObject); 36 | procedure bAddClick(Sender : TObject); 37 | procedure FormCreate(Sender : TObject); 38 | private 39 | { Private declarations } 40 | Procedure ShowFields; 41 | public 42 | { Public declarations } 43 | Op:TFieldOp; 44 | SelIndex:Integer; 45 | FieldOffset:Integer; 46 | VmtAdr:Integer; 47 | fieldsList:TList; 48 | end; 49 | 50 | var 51 | FEditFieldsDlg:TFEditFieldsDlg; 52 | 53 | implementation 54 | 55 | {$R *.DFM} 56 | 57 | Uses Main,KnowledgeBase,Misc,Infos,Def_main,Def_info,Def_know,Scanf; 58 | 59 | procedure TFEditFieldsDlg.FormCreate(Sender : TObject); 60 | begin 61 | Op := FD_OP_EDIT; 62 | SelIndex := -1; 63 | FieldOffset := -1; 64 | VmtAdr := 0; 65 | fieldsList := TList.Create; 66 | end; 67 | 68 | procedure TFEditFieldsDlg.FormDestroy(Sender: TObject); 69 | begin 70 | fieldsList.Free; 71 | end; 72 | 73 | Procedure TFEditFieldsDlg.ShowFields; 74 | Var 75 | n, fieldsNum:Integer; 76 | fInfo:FieldInfo; 77 | line:AnsiString; 78 | Begin 79 | lbFields.Enabled := true; 80 | lbFields.Clear; 81 | fieldsList.Clear; 82 | fieldsNum := FMain.LoadFieldTable(VmtAdr, fieldsList); 83 | if fieldsNum<>0 then 84 | begin 85 | SelIndex := -1; 86 | for n := 0 To fieldsNum-1 do 87 | begin 88 | fInfo := fieldsList.Items[n]; 89 | line := Val2Str(fInfo.Offset,5) + ' '; 90 | if fInfo.Name <> '' then line := line + fInfo.Name 91 | else line := line + '?'; 92 | line := line + ':'; 93 | if fInfo._Type <> '' then line := line + fInfo._Type 94 | else line := line + '?'; 95 | lbFields.Items.Add(line); 96 | if fInfo.Offset = FieldOffset then SelIndex := n; 97 | End; 98 | End; 99 | end; 100 | 101 | procedure TFEditFieldsDlg.FormShow(Sender : TObject); 102 | begin 103 | Caption := GetClsName(VmtAdr) + ' fields'; 104 | edtPanel.Visible := false; 105 | lbFields.Height := lbFXrefs.Height; 106 | 107 | lbFXrefs.Clear; 108 | ShowFields; 109 | lbFields.ItemIndex := SelIndex; 110 | 111 | bEdit.Enabled := (lbFields.Count<>0) and (lbFields.ItemIndex <> -1); 112 | bAdd.Enabled := true; 113 | bRemove.Enabled := (lbFields.Count<>0) and (lbFields.ItemIndex <> -1); 114 | bClose.Enabled := true; 115 | end; 116 | 117 | procedure TFEditFieldsDlg.lbFXrefsDblClick(Sender : TObject); 118 | var 119 | //_type:Array[0..1] of Char; 120 | adr:Integer; 121 | item:AnsiString; 122 | m:Integer; 123 | _type:Array[1..2] of Char; 124 | begin 125 | item := lbFXrefs.Items[lbFXrefs.ItemIndex]; 126 | adr:=StrToInt(item); 127 | //sscanf(item.c_str() + 1, "%lX%2c", &adr, type); 128 | sscanf(PAnsiChar(item) + 1, '%lX%2c', [@adr, @_type]); 129 | 130 | for m := Adr2Pos(adr) Downto 0 do 131 | if IsFlagSet([cfProcStart], m) then 132 | begin 133 | FMain.ShowCode(Pos2Adr(m), adr, -1, -1); 134 | break; 135 | End; 136 | end; 137 | 138 | procedure TFEditFieldsDlg.lbFieldsClick(Sender : TObject); 139 | var 140 | line:AnsiString; 141 | fInfo:FieldInfo; 142 | n:Integer; 143 | recX:PXrefRec; 144 | begin 145 | lbFXrefs.Clear; 146 | if lbFields.ItemIndex = -1 then Exit; 147 | fInfo := fieldsList.Items[lbFields.ItemIndex]; 148 | if Assigned(fInfo.xrefs) then 149 | for n := 0 to fInfo.xrefs.Count-1 do 150 | begin 151 | recX := fInfo.xrefs.Items[n]; 152 | line := Val2Str(recX.adr + recX.offset,8); 153 | if recX._type = 'c' then line := line + ' <-'; 154 | lbFXrefs.Items.Add(line); 155 | End; 156 | bEdit.Enabled := (lbFields.Count<>0) and (lbFields.ItemIndex <> -1); 157 | bRemove.Enabled := (lbFields.Count<>0) and (lbFields.ItemIndex <> -1); 158 | end; 159 | 160 | procedure TFEditFieldsDlg.bEditClick(Sender : TObject); 161 | Var 162 | fInfo:FieldInfo; 163 | begin 164 | Op := FD_OP_EDIT; 165 | edtPanel.Visible := true; 166 | 167 | fInfo := fieldsList.Items[lbFields.ItemIndex]; 168 | edtOffset.Text := Val2Str(fInfo.Offset); 169 | edtOffset.Enabled := false; 170 | edtName.Text := fInfo.Name; 171 | edtName.Enabled := true; 172 | edtType.Text := fInfo._Type; 173 | edtType.Enabled := true; 174 | edtName.SetFocus; 175 | 176 | lbFields.Enabled := false; 177 | bApply.Enabled := false; 178 | bClose.Enabled := true; 179 | bEdit.Enabled := false; 180 | bAdd.Enabled := false; 181 | bRemove.Enabled := false; 182 | end; 183 | 184 | procedure TFEditFieldsDlg.edtNameChange(Sender : TObject); 185 | begin 186 | bApply.Enabled := true; 187 | end; 188 | 189 | procedure TFEditFieldsDlg.edtTypeChange(Sender : TObject); 190 | begin 191 | bApply.Enabled := true; 192 | end; 193 | 194 | procedure TFEditFieldsDlg.bApplyClick(Sender : TObject); 195 | var 196 | vmt:Boolean; 197 | adr,n,size,offset,fromOfs,toOfs:Integer; 198 | recN:InfoRec; 199 | fInfo:FieldInfo; 200 | txt:AnsiString; 201 | itemidx,topidx:Integer; 202 | rtti:AnsiString; 203 | begin 204 | recN:=GetInfoRec(VmtAdr); 205 | edtName.Text:=Trim(edtName.Text); 206 | edtType.Text:=Trim(edtType.Text); 207 | edtOffset.Text:=Trim(edtOffset.Text); 208 | Case Op of 209 | FD_OP_EDIT: 210 | begin 211 | fInfo := fieldsList.Items[lbFields.ItemIndex]; 212 | fInfo.Name := edtName.text; 213 | fInfo._Type := edtType.text; 214 | //Delete all fields (if exists) that covered by new type 215 | fromOfs := fInfo.Offset; 216 | if GetTypeKind(edtType.Text, size) = ikRecord then 217 | begin 218 | toOfs := fromOfs + size; 219 | for n := 0 to fieldsList.Count-1 do 220 | begin 221 | fInfo := fieldsList[n]; 222 | offset := fInfo.Offset; 223 | if (offset > fromOfs) and (offset < toOfs) then 224 | recN.vmtInfo.RemoveField(offset); 225 | end; 226 | end; 227 | End; 228 | FD_OP_ADD, 229 | FD_OP_DELETE: 230 | begin 231 | sscanf(PAnsiChar(edtOffset.Text),'%lX',[@offset]); 232 | if Op = FD_OP_ADD then 233 | begin 234 | fInfo := FMain.GetField(recN.Name, offset, vmt, adr,''); 235 | if Not Assigned(fInfo) Or (Application.MessageBox('Field already exists', 'Replace?', MB_YESNO) = IDYES) then 236 | recN.vmtInfo.AddField(0, 0, FIELD_PUBLIC, offset, -1, edtName.text, edtType.text); 237 | if Assigned(fInfo) and (fInfo.Scope=SCOPE_TMP) then fInfo.Free; 238 | end 239 | else if Application.MessageBox('Delete field?', 'Confirmation', MB_YESNO) = IDYES then 240 | recN.vmtInfo.RemoveField(offset); 241 | End; 242 | End; 243 | itemidx := lbFields.ItemIndex; 244 | topidx := lbFields.TopIndex; 245 | ShowFields; 246 | lbFields.ItemIndex := itemidx; 247 | lbFields.TopIndex := topidx; 248 | 249 | FMain.RedrawCode; 250 | FMain.ShowClassViewer(VmtAdr); 251 | 252 | edtPanel.Visible := false; 253 | lbFields.Enabled := true; 254 | bEdit.Enabled := (lbFields.Count<>0) and (lbFields.ItemIndex <> -1); 255 | bAdd.Enabled := true; 256 | bRemove.Enabled := (lbFields.Count<>0) and (lbFields.ItemIndex <> -1); 257 | 258 | ProjectModified := true; 259 | end; 260 | 261 | procedure TFEditFieldsDlg.bCloseClick(Sender : TObject); 262 | begin 263 | edtPanel.Visible := false; 264 | lbFields.Height := lbFXrefs.Height; 265 | 266 | lbFields.Enabled := true; 267 | bEdit.Enabled := (lbFields.Count<>0) and (lbFields.ItemIndex <> -1); 268 | bAdd.Enabled := true; 269 | bRemove.Enabled := (lbFields.Count<>0) and (lbFields.ItemIndex <> -1); 270 | end; 271 | 272 | procedure TFEditFieldsDlg.bAddClick(Sender : TObject); 273 | begin 274 | Op := FD_OP_ADD; 275 | edtPanel.Visible := true; 276 | 277 | edtOffset.Text := ''; 278 | edtOffset.Enabled := true; 279 | edtName.Text := ''; 280 | edtName.Enabled := true; 281 | edtType.Text := ''; 282 | edtType.Enabled := true; 283 | edtOffset.SetFocus; 284 | 285 | lbFields.Enabled := false; 286 | bApply.Enabled := false; 287 | bClose.Enabled := true; 288 | bEdit.Enabled := false; 289 | bAdd.Enabled := false; 290 | bRemove.Enabled := false; 291 | end; 292 | 293 | procedure TFEditFieldsDlg.bRemoveClick(Sender : TObject); 294 | Var 295 | fInfo:FieldInfo; 296 | begin 297 | Op := FD_OP_DELETE; 298 | edtPanel.Visible := true; 299 | 300 | fInfo := fieldsList.Items[lbFields.ItemIndex]; 301 | edtOffset.Text := Val2Str(fInfo.Offset); 302 | edtOffset.Enabled := false; 303 | edtName.Text := fInfo.Name; 304 | edtName.Enabled := false; 305 | edtType.Text := fInfo._Type; 306 | edtType.Enabled := false; 307 | 308 | lbFields.Enabled := false; 309 | bApply.Enabled := true; 310 | bClose.Enabled := true; 311 | bEdit.Enabled := false; 312 | bAdd.Enabled := false; 313 | bRemove.Enabled := false; 314 | end; 315 | 316 | end. 317 | -------------------------------------------------------------------------------- /EditFunctionDlg.dfm: -------------------------------------------------------------------------------- 1 | object FEditFunctionDlg: TFEditFunctionDlg 2 | Left = 374 3 | Top = 200 4 | BorderStyle = bsToolWindow 5 | Caption = 'Edit Prototype' 6 | ClientHeight = 509 7 | ClientWidth = 713 8 | Color = clBtnFace 9 | ParentFont = True 10 | KeyPreview = True 11 | OldCreateOrder = True 12 | Position = poScreenCenter 13 | OnClose = FormClose 14 | OnKeyDown = FormKeyDown 15 | OnShow = FormShow 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object Panel1: TPanel 19 | Left = 0 20 | Top = 472 21 | Width = 713 22 | Height = 37 23 | Align = alBottom 24 | TabOrder = 0 25 | object bEdit: TButton 26 | Left = 20 27 | Top = 5 28 | Width = 75 29 | Height = 25 30 | Caption = 'Edit' 31 | TabOrder = 0 32 | OnClick = bEditClick 33 | end 34 | object bAdd: TButton 35 | Left = 116 36 | Top = 5 37 | Width = 75 38 | Height = 25 39 | Caption = 'Add' 40 | Default = True 41 | Enabled = False 42 | TabOrder = 1 43 | OnClick = bAddClick 44 | end 45 | object bRemoveSelected: TButton 46 | Left = 212 47 | Top = 5 48 | Width = 100 49 | Height = 25 50 | Caption = 'Remove Selected' 51 | TabOrder = 2 52 | OnClick = bRemoveSelectedClick 53 | end 54 | object bOk: TButton 55 | Left = 625 56 | Top = 5 57 | Width = 75 58 | Height = 25 59 | Caption = 'Ok' 60 | ModalResult = 1 61 | TabOrder = 3 62 | OnClick = bOkClick 63 | end 64 | object bRemoveAll: TButton 65 | Left = 368 66 | Top = 5 67 | Width = 97 68 | Height = 25 69 | Caption = 'Remove All' 70 | TabOrder = 4 71 | OnClick = bRemoveAllClick 72 | end 73 | end 74 | object pc: TPageControl 75 | Left = 0 76 | Top = 0 77 | Width = 713 78 | Height = 472 79 | ActivePage = tsType 80 | Align = alClient 81 | TabOrder = 1 82 | OnChange = pcChange 83 | object tsType: TTabSheet 84 | Caption = 'Type' 85 | object Label1: TLabel 86 | Left = 14 87 | Top = 403 88 | Width = 56 89 | Height = 13 90 | Alignment = taRightJustify 91 | Caption = 'RetBytes:' 92 | Font.Charset = DEFAULT_CHARSET 93 | Font.Color = clWindowText 94 | Font.Height = -11 95 | Font.Name = 'MS Sans Serif' 96 | Font.Style = [fsBold] 97 | ParentFont = False 98 | end 99 | object lRetBytes: TLabel 100 | Left = 78 101 | Top = 403 102 | Width = 5 103 | Height = 13 104 | Font.Charset = DEFAULT_CHARSET 105 | Font.Color = clWindowText 106 | Font.Height = -11 107 | Font.Name = 'MS Sans Serif' 108 | Font.Style = [fsBold] 109 | ParentFont = False 110 | end 111 | object Label2: TLabel 112 | Left = 9 113 | Top = 421 114 | Width = 61 115 | Height = 13 116 | Alignment = taRightJustify 117 | Caption = 'ArgsBytes:' 118 | Font.Charset = DEFAULT_CHARSET 119 | Font.Color = clWindowText 120 | Font.Height = -11 121 | Font.Name = 'MS Sans Serif' 122 | Font.Style = [fsBold] 123 | ParentFont = False 124 | end 125 | object lArgsBytes: TLabel 126 | Left = 78 127 | Top = 421 128 | Width = 5 129 | Height = 13 130 | Font.Charset = DEFAULT_CHARSET 131 | Font.Color = clWindowText 132 | Font.Height = -11 133 | Font.Name = 'MS Sans Serif' 134 | Font.Style = [fsBold] 135 | ParentFont = False 136 | end 137 | object cbEmbedded: TCheckBox 138 | Left = 30 139 | Top = 317 140 | Width = 111 141 | Height = 17 142 | Caption = 'Embedded' 143 | Font.Charset = DEFAULT_CHARSET 144 | Font.Color = clWindowText 145 | Font.Height = -11 146 | Font.Name = 'MS Sans Serif' 147 | Font.Style = [fsBold] 148 | ParentFont = False 149 | TabOrder = 3 150 | end 151 | object mType: TMemo 152 | Left = 143 153 | Top = 33 154 | Width = 560 155 | Height = 377 156 | Font.Charset = RUSSIAN_CHARSET 157 | Font.Color = clWindowText 158 | Font.Height = -11 159 | Font.Name = 'Fixedsys' 160 | Font.Style = [] 161 | ParentFont = False 162 | TabOrder = 0 163 | WantReturns = False 164 | end 165 | object rgCallKind: TRadioGroup 166 | Left = 11 167 | Top = 170 168 | Width = 126 169 | Height = 144 170 | Caption = 'Function Call Kind: ' 171 | Font.Charset = DEFAULT_CHARSET 172 | Font.Color = clWindowText 173 | Font.Height = -11 174 | Font.Name = 'MS Sans Serif' 175 | Font.Style = [fsBold] 176 | ItemIndex = 0 177 | Items.Strings = ( 178 | 'fastcall' 179 | 'cdecl' 180 | 'pascal' 181 | 'stdcall' 182 | 'safecall') 183 | ParentFont = False 184 | TabOrder = 2 185 | end 186 | object bApplyType: TButton 187 | Left = 325 188 | Top = 416 189 | Width = 75 190 | Height = 24 191 | Caption = 'Apply' 192 | Default = True 193 | TabOrder = 8 194 | OnClick = bApplyTypeClick 195 | end 196 | object bCancelType: TButton 197 | Left = 455 198 | Top = 416 199 | Width = 75 200 | Height = 25 201 | Caption = 'Cancel' 202 | Default = True 203 | TabOrder = 9 204 | OnClick = bCancelTypeClick 205 | end 206 | object rgFunctionKind: TRadioGroup 207 | Left = 11 208 | Top = 14 209 | Width = 126 210 | Height = 144 211 | Caption = 'Function Kind: ' 212 | Font.Charset = DEFAULT_CHARSET 213 | Font.Color = clWindowText 214 | Font.Height = -11 215 | Font.Name = 'MS Sans Serif' 216 | Font.Style = [fsBold] 217 | Items.Strings = ( 218 | 'constructor' 219 | 'destructor' 220 | 'procedure' 221 | 'function') 222 | ParentFont = False 223 | TabOrder = 1 224 | end 225 | object cbVmtCandidates: TComboBox 226 | Left = 280 227 | Top = 7 228 | Width = 423 229 | Height = 21 230 | Font.Charset = DEFAULT_CHARSET 231 | Font.Color = clWindowText 232 | Font.Height = -11 233 | Font.Name = 'MS Sans Serif' 234 | Font.Style = [fsBold] 235 | ItemHeight = 13 236 | ParentFont = False 237 | Sorted = True 238 | TabOrder = 7 239 | end 240 | object cbMethod: TCheckBox 241 | Left = 156 242 | Top = 7 243 | Width = 111 244 | Height = 20 245 | Caption = 'Method of Class:' 246 | Font.Charset = RUSSIAN_CHARSET 247 | Font.Color = clWindowText 248 | Font.Height = -11 249 | Font.Name = 'MS Sans Serif' 250 | Font.Style = [fsBold] 251 | ParentFont = False 252 | TabOrder = 6 253 | OnClick = cbMethodClick 254 | end 255 | object lEndAdr: TLabeledEdit 256 | Left = 43 257 | Top = 345 258 | Width = 92 259 | Height = 21 260 | EditLabel.Width = 31 261 | EditLabel.Height = 13 262 | EditLabel.Caption = 'End: ' 263 | EditLabel.Font.Charset = DEFAULT_CHARSET 264 | EditLabel.Font.Color = clWindowText 265 | EditLabel.Font.Height = -11 266 | EditLabel.Font.Name = 'MS Sans Serif' 267 | EditLabel.Font.Style = [fsBold] 268 | EditLabel.ParentFont = False 269 | Font.Charset = RUSSIAN_CHARSET 270 | Font.Color = clWindowText 271 | Font.Height = -11 272 | Font.Name = 'MS Sans Serif' 273 | Font.Style = [fsBold] 274 | LabelPosition = lpLeft 275 | ParentFont = False 276 | TabOrder = 4 277 | end 278 | object lStackSize: TLabeledEdit 279 | Left = 43 280 | Top = 371 281 | Width = 92 282 | Height = 21 283 | EditLabel.Width = 34 284 | EditLabel.Height = 13 285 | EditLabel.Caption = 'Stack' 286 | EditLabel.Font.Charset = DEFAULT_CHARSET 287 | EditLabel.Font.Color = clWindowText 288 | EditLabel.Font.Height = -11 289 | EditLabel.Font.Name = 'MS Sans Serif' 290 | EditLabel.Font.Style = [fsBold] 291 | EditLabel.ParentFont = False 292 | Font.Charset = DEFAULT_CHARSET 293 | Font.Color = clWindowText 294 | Font.Height = -11 295 | Font.Name = 'MS Sans Serif' 296 | Font.Style = [fsBold] 297 | LabelPosition = lpLeft 298 | ParentFont = False 299 | TabOrder = 5 300 | end 301 | end 302 | object tsArgs: TTabSheet 303 | Caption = 'Arguments' 304 | object lbArgs: TListBox 305 | Left = 0 306 | Top = 0 307 | Width = 705 308 | Height = 444 309 | Align = alClient 310 | Font.Charset = RUSSIAN_CHARSET 311 | Font.Color = clWindowText 312 | Font.Height = -11 313 | Font.Name = 'Fixedsys' 314 | Font.Style = [] 315 | ItemHeight = 16 316 | ParentFont = False 317 | TabOrder = 0 318 | end 319 | end 320 | object tsVars: TTabSheet 321 | Caption = 'Var' 322 | ImageIndex = 1 323 | object lbVars: TListBox 324 | Left = 0 325 | Top = 0 326 | Width = 705 327 | Height = 298 328 | Align = alClient 329 | Font.Charset = RUSSIAN_CHARSET 330 | Font.Color = clWindowText 331 | Font.Height = -11 332 | Font.Name = 'Fixedsys' 333 | Font.Style = [] 334 | ItemHeight = 16 335 | MultiSelect = True 336 | ParentFont = False 337 | TabOrder = 0 338 | OnClick = lbVarsClick 339 | end 340 | object pnlVars: TPanel 341 | Left = 0 342 | Top = 298 343 | Width = 705 344 | Height = 146 345 | Align = alBottom 346 | TabOrder = 1 347 | object rgLocBase: TRadioGroup 348 | Left = 260 349 | Top = 2 350 | Width = 260 351 | Height = 32 352 | Columns = 2 353 | Font.Charset = DEFAULT_CHARSET 354 | Font.Color = clWindowText 355 | Font.Height = -11 356 | Font.Name = 'MS Sans Serif' 357 | Font.Style = [fsBold] 358 | Items.Strings = ( 359 | 'ESP-based' 360 | 'EBP-based') 361 | ParentFont = False 362 | TabOrder = 0 363 | end 364 | object edtVarOfs: TLabeledEdit 365 | Left = 111 366 | Top = 39 367 | Width = 468 368 | Height = 21 369 | EditLabel.Width = 39 370 | EditLabel.Height = 13 371 | EditLabel.Caption = 'Offset:' 372 | EditLabel.Font.Charset = RUSSIAN_CHARSET 373 | EditLabel.Font.Color = clWindowText 374 | EditLabel.Font.Height = -11 375 | EditLabel.Font.Name = 'MS Sans Serif' 376 | EditLabel.Font.Style = [fsBold] 377 | EditLabel.ParentFont = False 378 | Font.Charset = RUSSIAN_CHARSET 379 | Font.Color = clWindowText 380 | Font.Height = -11 381 | Font.Name = 'MS Sans Serif' 382 | Font.Style = [fsBold] 383 | LabelPosition = lpLeft 384 | ParentFont = False 385 | TabOrder = 1 386 | end 387 | object edtVarSize: TLabeledEdit 388 | Left = 111 389 | Top = 65 390 | Width = 468 391 | Height = 21 392 | EditLabel.Width = 29 393 | EditLabel.Height = 13 394 | EditLabel.Caption = 'Size:' 395 | EditLabel.Font.Charset = RUSSIAN_CHARSET 396 | EditLabel.Font.Color = clWindowText 397 | EditLabel.Font.Height = -11 398 | EditLabel.Font.Name = 'MS Sans Serif' 399 | EditLabel.Font.Style = [fsBold] 400 | EditLabel.ParentFont = False 401 | Font.Charset = RUSSIAN_CHARSET 402 | Font.Color = clWindowText 403 | Font.Height = -11 404 | Font.Name = 'MS Sans Serif' 405 | Font.Style = [fsBold] 406 | LabelPosition = lpLeft 407 | ParentFont = False 408 | TabOrder = 2 409 | end 410 | object edtVarName: TLabeledEdit 411 | Left = 111 412 | Top = 91 413 | Width = 468 414 | Height = 21 415 | EditLabel.Width = 37 416 | EditLabel.Height = 13 417 | EditLabel.Caption = 'Name:' 418 | EditLabel.Font.Charset = RUSSIAN_CHARSET 419 | EditLabel.Font.Color = clWindowText 420 | EditLabel.Font.Height = -11 421 | EditLabel.Font.Name = 'MS Sans Serif' 422 | EditLabel.Font.Style = [fsBold] 423 | EditLabel.ParentFont = False 424 | Font.Charset = RUSSIAN_CHARSET 425 | Font.Color = clWindowText 426 | Font.Height = -11 427 | Font.Name = 'MS Sans Serif' 428 | Font.Style = [fsBold] 429 | LabelPosition = lpLeft 430 | ParentFont = False 431 | TabOrder = 3 432 | end 433 | object edtVarType: TLabeledEdit 434 | Left = 111 435 | Top = 117 436 | Width = 468 437 | Height = 21 438 | EditLabel.Width = 33 439 | EditLabel.Height = 13 440 | EditLabel.Caption = 'Type:' 441 | EditLabel.Font.Charset = RUSSIAN_CHARSET 442 | EditLabel.Font.Color = clWindowText 443 | EditLabel.Font.Height = -11 444 | EditLabel.Font.Name = 'MS Sans Serif' 445 | EditLabel.Font.Style = [fsBold] 446 | EditLabel.ParentFont = False 447 | Font.Charset = RUSSIAN_CHARSET 448 | Font.Color = clWindowText 449 | Font.Height = -11 450 | Font.Name = 'MS Sans Serif' 451 | Font.Style = [fsBold] 452 | LabelPosition = lpLeft 453 | ParentFont = False 454 | TabOrder = 4 455 | end 456 | object bApplyVar: TButton 457 | Left = 592 458 | Top = 59 459 | Width = 74 460 | Height = 24 461 | Caption = 'Apply' 462 | Default = True 463 | TabOrder = 5 464 | OnClick = bApplyVarClick 465 | end 466 | object bCancelVar: TButton 467 | Left = 592 468 | Top = 91 469 | Width = 74 470 | Height = 25 471 | Caption = 'Cancel' 472 | Default = True 473 | TabOrder = 6 474 | OnClick = bCancelVarClick 475 | end 476 | end 477 | end 478 | end 479 | end 480 | -------------------------------------------------------------------------------- /Exit.dfm: -------------------------------------------------------------------------------- 1 | object FExit: TFExit 2 | Left = 482 3 | Top = 333 4 | BorderStyle = bsDialog 5 | Caption = 'Save Project' 6 | ClientHeight = 127 7 | ClientWidth = 313 8 | Color = clBtnFace 9 | ParentFont = True 10 | OldCreateOrder = True 11 | Position = poScreenCenter 12 | PixelsPerInch = 96 13 | TextHeight = 13 14 | object Bevel1: TBevel 15 | Left = 8 16 | Top = 8 17 | Width = 297 18 | Height = 81 19 | Shape = bsFrame 20 | end 21 | object OKBtn: TButton 22 | Left = 63 23 | Top = 100 24 | Width = 75 25 | Height = 25 26 | Caption = 'OK' 27 | Default = True 28 | ModalResult = 1 29 | TabOrder = 0 30 | OnClick = OKBtnClick 31 | end 32 | object CancelBtn: TButton 33 | Left = 175 34 | Top = 100 35 | Width = 75 36 | Height = 25 37 | Cancel = True 38 | Caption = 'Cancel' 39 | ModalResult = 2 40 | TabOrder = 1 41 | OnClick = CancelBtnClick 42 | end 43 | object cbDontSaveProject: TCheckBox 44 | Left = 52 45 | Top = 40 46 | Width = 209 47 | Height = 17 48 | Caption = 'Don'#39't save Project' 49 | TabOrder = 2 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /Exit.pas: -------------------------------------------------------------------------------- 1 | Unit Exit; 2 | 3 | Interface 4 | 5 | Uses Windows, SysUtils, Classes, StdCtrls, Forms, Controls, Buttons, ExtCtrls; 6 | 7 | Type 8 | 9 | TFExit = class(TForm) 10 | OKBtn:TButton; 11 | CancelBtn:TButton; 12 | Bevel1:TBevel; 13 | cbDontSaveProject:TCheckBox; 14 | procedure OKBtnClick(Sender:TObject); 15 | procedure CancelBtnClick(Sender:TObject); 16 | private 17 | public 18 | end; 19 | 20 | Implementation 21 | 22 | {$R *.DFM} 23 | 24 | Procedure TFExit.OKBtnClick (Sender:TObject); 25 | Begin 26 | ModalResult:=mrOk; 27 | end; 28 | 29 | Procedure TFExit.CancelBtnClick (Sender:TObject); 30 | Begin 31 | ModalResult:=mrCancel; 32 | end; 33 | 34 | End. 35 | -------------------------------------------------------------------------------- /Explorer.dfm: -------------------------------------------------------------------------------- 1 | object FExplorer: TFExplorer 2 | Left = 422 3 | Top = 205 4 | BorderStyle = bsToolWindow 5 | Caption = 'Explorer' 6 | ClientHeight = 527 7 | ClientWidth = 655 8 | Color = clBtnFace 9 | Font.Charset = DEFAULT_CHARSET 10 | Font.Color = clWindowText 11 | Font.Height = -10 12 | Font.Name = 'MS Sans Serif' 13 | Font.Style = [] 14 | KeyPreview = True 15 | OldCreateOrder = False 16 | Position = poScreenCenter 17 | OnKeyDown = FormKeyDown 18 | OnShow = FormShow 19 | PixelsPerInch = 96 20 | TextHeight = 13 21 | object pc1: TPageControl 22 | Left = 0 23 | Top = 0 24 | Width = 655 25 | Height = 527 26 | ActivePage = tsCode 27 | Align = alClient 28 | PopupMenu = pm1 29 | TabOrder = 0 30 | object tsCode: TTabSheet 31 | Caption = 'Code' 32 | object lbCode: TListBox 33 | Left = 0 34 | Top = 0 35 | Width = 647 36 | Height = 458 37 | Align = alClient 38 | Font.Charset = DEFAULT_CHARSET 39 | Font.Color = clWindowText 40 | Font.Height = -12 41 | Font.Name = 'Fixedsys' 42 | Font.Style = [] 43 | ItemHeight = 16 44 | ParentFont = False 45 | PopupMenu = pm1 46 | TabOrder = 0 47 | end 48 | object Panel3: TPanel 49 | Left = 0 50 | Top = 458 51 | Width = 647 52 | Height = 41 53 | Align = alBottom 54 | TabOrder = 1 55 | object btnDefCode: TButton 56 | Left = 223 57 | Top = 9 58 | Width = 89 59 | Height = 24 60 | Cursor = crHandPoint 61 | Caption = 'Define' 62 | TabOrder = 0 63 | OnClick = btnDefCodeClick 64 | end 65 | object btnUndefCode: TButton 66 | Left = 344 67 | Top = 9 68 | Width = 87 69 | Height = 24 70 | Cursor = crHandPoint 71 | Caption = 'Undefine' 72 | TabOrder = 1 73 | OnClick = btnUndefCodeClick 74 | end 75 | end 76 | end 77 | object tsData: TTabSheet 78 | Caption = 'Data' 79 | ImageIndex = 1 80 | object lbData: TListBox 81 | Left = 0 82 | Top = 41 83 | Width = 647 84 | Height = 458 85 | Align = alClient 86 | Font.Charset = DEFAULT_CHARSET 87 | Font.Color = clWindowText 88 | Font.Height = -12 89 | Font.Name = 'Fixedsys' 90 | Font.Style = [] 91 | ItemHeight = 16 92 | ParentFont = False 93 | PopupMenu = pm1 94 | TabOrder = 0 95 | end 96 | object Panel2: TPanel 97 | Left = 0 98 | Top = 0 99 | Width = 647 100 | Height = 41 101 | Align = alTop 102 | TabOrder = 1 103 | object rgDataViewStyle: TRadioGroup 104 | Left = 1 105 | Top = 1 106 | Width = 645 107 | Height = 39 108 | Align = alClient 109 | Columns = 6 110 | ItemIndex = 0 111 | Items.Strings = ( 112 | 'Hex' 113 | 'Single (32bit)' 114 | 'Double (64)' 115 | 'Extended (80)' 116 | 'Real (32)' 117 | 'Comp (64)') 118 | TabOrder = 0 119 | OnClick = rgDataViewStyleClick 120 | end 121 | end 122 | end 123 | object tsString: TTabSheet 124 | Caption = 'String' 125 | ImageIndex = 2 126 | object rgStringViewStyle: TRadioGroup 127 | Left = 0 128 | Top = 358 129 | Width = 647 130 | Height = 100 131 | Align = alClient 132 | Caption = ' String Styles ' 133 | Columns = 2 134 | ItemIndex = 0 135 | Items.Strings = ( 136 | 'PAnsiChar' 137 | 'PWideChar' 138 | 'ShortString' 139 | 'AnsiString' 140 | 'WideString') 141 | TabOrder = 0 142 | OnClick = rgStringViewStyleClick 143 | end 144 | object lbString: TMemo 145 | Left = 0 146 | Top = 0 147 | Width = 647 148 | Height = 358 149 | Align = alTop 150 | Font.Charset = DEFAULT_CHARSET 151 | Font.Color = clWindowText 152 | Font.Height = -12 153 | Font.Name = 'Fixedsys' 154 | Font.Style = [] 155 | ParentFont = False 156 | TabOrder = 1 157 | end 158 | object Panel1: TPanel 159 | Left = 0 160 | Top = 458 161 | Width = 647 162 | Height = 41 163 | Align = alBottom 164 | TabOrder = 2 165 | object btnDefString: TButton 166 | Left = 223 167 | Top = 9 168 | Width = 89 169 | Height = 24 170 | Cursor = crHandPoint 171 | Caption = 'Define' 172 | Enabled = False 173 | TabOrder = 0 174 | OnClick = btnDefStringClick 175 | end 176 | object btnUndefString: TButton 177 | Left = 344 178 | Top = 9 179 | Width = 87 180 | Height = 24 181 | Cursor = crHandPoint 182 | Caption = 'Undefine' 183 | Enabled = False 184 | TabOrder = 1 185 | end 186 | end 187 | end 188 | object tsText: TTabSheet 189 | Caption = 'Text' 190 | ImageIndex = 4 191 | object lbText: TListBox 192 | Left = 0 193 | Top = 0 194 | Width = 647 195 | Height = 499 196 | Align = alClient 197 | Font.Charset = RUSSIAN_CHARSET 198 | Font.Color = clWindowText 199 | Font.Height = -12 200 | Font.Name = 'Fixedsys' 201 | Font.Style = [] 202 | ItemHeight = 16 203 | ParentFont = False 204 | PopupMenu = pm1 205 | TabOrder = 0 206 | end 207 | end 208 | end 209 | object pm1: TPopupMenu 210 | Left = 576 211 | Top = 336 212 | object miCopy2Clipboard: TMenuItem 213 | Caption = 'Copy to Clipboard' 214 | OnClick = miCopy2ClipboardClick 215 | end 216 | end 217 | end 218 | -------------------------------------------------------------------------------- /Explorer.pas: -------------------------------------------------------------------------------- 1 | unit Explorer; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, 7 | Controls, Forms, Dialogs, StdCtrls, Menus, ExtCtrls, ComCtrls; 8 | 9 | type 10 | DefKind = (UNDEFINE, DEFINE_AS_CODE, DEFINE_AS_STRING); 11 | 12 | TFExplorer=class(TForm) 13 | pc1: TPageControl; 14 | tsCode: TTabSheet; 15 | tsData: TTabSheet; 16 | lbCode: TListBox; 17 | lbData: TListBox; 18 | tsString: TTabSheet; 19 | rgStringViewStyle: TRadioGroup; 20 | tsText: TTabSheet; 21 | lbText: TListBox; 22 | pm1: TPopupMenu; 23 | miCopy2Clipboard: TMenuItem; 24 | Panel2: TPanel; 25 | rgDataViewStyle: TRadioGroup; 26 | lbString: TMemo; 27 | Panel3: TPanel; 28 | btnDefCode: TButton; 29 | btnUndefCode: TButton; 30 | Panel1: TPanel; 31 | btnDefString: TButton; 32 | btnUndefString: TButton; 33 | procedure btnDefCodeClick(Sender : TObject); 34 | procedure btnUndefCodeClick(Sender : TObject); 35 | procedure rgStringViewStyleClick(Sender : TObject); 36 | procedure miCopy2ClipboardClick(Sender : TObject); 37 | procedure FormKeyDown(Sender : TObject; var Key:Word; Shift:TShiftState); 38 | procedure FormShow(Sender : TObject); 39 | procedure rgDataViewStyleClick(Sender : TObject); 40 | procedure btnDefStringClick(Sender : TObject); 41 | private 42 | { Private declarations } 43 | Adr:Integer; // Starting address 44 | public 45 | { Public declarations } 46 | DefineAs:DefKind; //1- Define as Code, 2 - Undefine 47 | WAlign:Integer; //Alignment for WideString visualization 48 | Procedure ShowCode(fromAdr:Integer; maxBytes:Integer); 49 | Procedure ShowData(fromAdr:Integer; maxBytes:Integer); 50 | Procedure ShowString(fromAdr:Integer; maxbytes:Integer); 51 | end; 52 | 53 | Var 54 | FExplorer:TFExplorer; 55 | 56 | implementation 57 | 58 | {$R *.DFM} 59 | 60 | Uses Disasm,Misc,Def_disasm,Main; 61 | 62 | Type 63 | PReal = ^Real; 64 | 65 | Procedure TFExplorer.ShowCode (fromAdr:Integer; maxBytes:Integer); 66 | var 67 | _pos:Integer; 68 | DisInfo:TDisInfo; 69 | curAdr:Integer; 70 | disLine:AnsiString; 71 | n,instrLen:Integer; 72 | Begin 73 | lbCode.Clear; 74 | _pos := Adr2Pos(fromAdr); 75 | if _pos = -1 then Exit; 76 | 77 | Adr := fromAdr; 78 | curAdr := Adr; 79 | n:=0; 80 | while n < maxBytes do 81 | begin 82 | instrLen := frmDisasm.Disassemble(Code + _pos, curAdr, @DisInfo, @disLine); 83 | if instrLen=0 then 84 | begin 85 | instrLen := 1; 86 | lbCode.Items.Add(Val2Str(curAdr,8) + ' ???'); 87 | end 88 | else lbCode.Items.Add(Val2Str(curAdr,8) + ' ' + disLine); 89 | if n + instrLen > maxBytes then break; 90 | if _pos + instrLen >= CodeSize then break; 91 | Inc(_pos,instrLen); 92 | Inc(curAdr,instrLen); 93 | Inc(n,instrLen); 94 | end; 95 | end; 96 | 97 | Procedure TFExplorer.ShowData (fromAdr:Integer; maxBytes:Integer); 98 | var 99 | b:Char; 100 | n, k, m, _pos:Integer; 101 | singleVal:Single; 102 | doubleVal:Double; 103 | extendedVal:Extended; 104 | realVal:Real; 105 | compVal:Comp; 106 | line1, line2:AnsiString; 107 | curAdr:Integer; 108 | Begin 109 | lbData.Clear; 110 | _pos := Adr2Pos(fromAdr); 111 | if _pos = -1 Then Exit; 112 | Adr := fromAdr; 113 | curAdr := Adr; 114 | Case rgDataViewStyle.ItemIndex of 115 | 0: // Hex (default) 116 | begin 117 | k:=0; 118 | for n := 0 to maxBytes-1 do 119 | begin 120 | if _pos > ImageSize then break; 121 | if k=0 then 122 | begin 123 | line1 := Val2Str(curAdr,8) + ' '; 124 | line2 := ' '; 125 | End; 126 | line1 :=line1 + ' ' + Val2Str(Ord(Image[_pos]),2); 127 | b := Image[_pos]; 128 | if b < ' ' then b := ' '; 129 | line2 :=line2 + b; 130 | Inc(k); 131 | if k = 16 then 132 | begin 133 | lbData.Items.Add(line1 + line2); 134 | Inc(curAdr,16); 135 | k := 0; 136 | End; 137 | Inc(_pos); 138 | End; 139 | if (k > 0) and (k < 16) then 140 | begin 141 | for m := k To 15 do line1 := line1 + ' '; 142 | lbData.Items.Add(line1 + line2); 143 | End; 144 | End; 145 | //Single = float 146 | 1: 147 | begin 148 | singleVal := PSingle(Image + _pos)^; 149 | line1 := Val2Str(curAdr,8) + ' ' + FloatToStr(singleVal); 150 | lbData.Items.Add(line1); 151 | end; 152 | //Double = doulbe 153 | 2: 154 | begin 155 | doubleVal := PDouble(Image + _pos)^; 156 | line1 := Val2Str(curAdr,8) + ' ' + FloatToStr(doubleVal); 157 | lbData.Items.Add(line1); 158 | end; 159 | //Extended = long double 160 | 3: 161 | begin 162 | try 163 | extendedVal := PExtended(Image + _pos)^; 164 | line1 := Val2Str(curAdr,8) + ' ' + FloatToStr(extendedVal); 165 | Except 166 | line1 := 'Impossible!'; 167 | End; 168 | lbData.Items.Add(line1); 169 | end; 170 | //Real = double 171 | 4: 172 | begin 173 | realVal := PReal(Image + _pos)^; 174 | line1 := Val2Str(curAdr,8) + ' ' + FloatToStr(realVal); 175 | lbData.Items.Add(line1); 176 | end; 177 | //Comp = Comp 178 | 5: 179 | begin 180 | compVal := PComp(Image + _pos)^; 181 | line1 := Val2Str(curAdr,8) + ' ' + FloatToStr(compVal); 182 | lbData.Items.Add(line1); 183 | end; 184 | end; 185 | lbData.Update; 186 | end; 187 | 188 | Procedure TFExplorer.ShowString (fromAdr:Integer; maxbytes:Integer); 189 | var 190 | len, size, _pos:Integer; 191 | str:AnsiString; 192 | wStr:WideString; 193 | Begin 194 | lbString.Clear; 195 | _pos := Adr2Pos(fromAdr); 196 | if _pos = -1 then Exit; 197 | Case rgStringViewStyle.ItemIndex of 198 | 0: //PAnsiChar 199 | begin 200 | len := StrLen(Image + _pos); 201 | if len < 0 then len := 0; 202 | if len > maxBytes then len := maxBytes; 203 | str := TransformString(Image + _pos, len); 204 | end; 205 | 1: //PWideChar 206 | begin 207 | len := lstrlenW(PWideChar(Image) + _pos); 208 | if len < 0 then len := 0; 209 | if len > maxBytes then len := maxBytes; 210 | wStr := WideString(PWideChar(Image + _pos)); 211 | size := WideCharToMultiByte(CP_ACP, 0, PWideChar(wStr), len, Nil, 0, Nil, Nil); 212 | if size<>0 then 213 | begin 214 | SetLength(str,size); 215 | WideCharToMultiByte(CP_ACP, 0, PWideChar(wStr), len, PAnsiChar(str), size, Nil, Nil); 216 | End; 217 | end; 218 | 2: //ShortString 219 | begin 220 | len := PByte(Image + _pos)^; 221 | //if len < 0 len = 0; 222 | if len > maxBytes then len := maxBytes; 223 | str := TransformString(Image + _pos + 1, len); 224 | end; 225 | 3: //AnsiString 226 | begin 227 | len := PLongInt(Image + _pos)^; 228 | if len < 0 then len := 0; 229 | if len > maxBytes then len := maxBytes; 230 | str := TransformString(Image + _pos + 4, len); 231 | end; 232 | 4: //WideString 233 | begin 234 | len := PLongInt(Image + _pos + WAlign)^; 235 | if len < 0 then len := 0; 236 | if len > maxBytes then len := maxBytes; 237 | wStr := WideString(PWideChar(Image + _pos + WAlign + 4)); 238 | size := WideCharToMultiByte(CP_ACP, 0, PWideChar(wStr), len, Nil, 0, Nil, Nil); 239 | if size<>0 then 240 | begin 241 | SetLength(str,size); 242 | WideCharToMultiByte(CP_ACP, 0, PWideChar(wStr), len, PAnsiChar(str), size, Nil, Nil); 243 | end; 244 | end; 245 | end; 246 | lbString.Lines.Add(str); 247 | end; 248 | 249 | procedure TFExplorer.btnDefCodeClick(Sender : TObject); 250 | begin 251 | DefineAs:=DEFINE_AS_CODE; 252 | ModalResult:=mrOk; 253 | end; 254 | 255 | procedure TFExplorer.btnUndefCodeClick(Sender : TObject); 256 | begin 257 | DefineAs:=UNDEFINE; 258 | ModalResult:=mrCancel; 259 | end; 260 | 261 | procedure TFExplorer.btnDefStringClick(Sender : TObject); 262 | begin 263 | DefineAs:=DEFINE_AS_STRING; 264 | ModalResult:=mrOk; 265 | end; 266 | 267 | procedure TFExplorer.rgStringViewStyleClick(Sender : TObject); 268 | begin 269 | ShowString(Adr,1024); 270 | end; 271 | 272 | procedure TFExplorer.miCopy2ClipboardClick(Sender : TObject); 273 | var 274 | items:TStrings; 275 | begin 276 | if pc1.ActivePage = tsCode then items := lbCode.Items 277 | Else if pc1.ActivePage = tsData then items := lbData.Items 278 | Else If pc1.ActivePage = tsString then items := lbString.Lines 279 | Else If pc1.ActivePage = tsText then items := lbText.Items 280 | Else items:=Nil; 281 | Copy2Clipboard(items, 0, false); 282 | end; 283 | 284 | procedure TFExplorer.FormKeyDown(Sender : TObject; var Key:Word; Shift:TShiftState); 285 | begin 286 | if Key=VK_ESCAPE then ModalResult:=mrCancel; 287 | end; 288 | 289 | procedure TFExplorer.FormShow(Sender : TObject); 290 | begin 291 | DefineAs:=UNDEFINE; 292 | end; 293 | 294 | procedure TFExplorer.rgDataViewStyleClick(Sender : TObject); 295 | begin 296 | ShowData(Adr,1024); 297 | end; 298 | 299 | end. 300 | -------------------------------------------------------------------------------- /FindDlg.dfm: -------------------------------------------------------------------------------- 1 | object FindDlg: TFFindDlg 2 | Left = 487 3 | Top = 325 4 | BorderStyle = bsToolWindow 5 | Caption = 'Find' 6 | ClientHeight = 96 7 | ClientWidth = 384 8 | Color = clBtnFace 9 | ParentFont = True 10 | OldCreateOrder = True 11 | Position = poScreenCenter 12 | OnShow = FormShow 13 | PixelsPerInch = 96 14 | TextHeight = 13 15 | object Bevel1: TBevel 16 | Left = 8 17 | Top = 8 18 | Width = 345 19 | Height = 49 20 | Shape = bsFrame 21 | end 22 | object Label1: TLabel 23 | Left = 24 24 | Top = 24 25 | Width = 60 26 | Height = 13 27 | Caption = 'Text to find:' 28 | end 29 | object OKBtn: TButton 30 | Left = 115 31 | Top = 68 32 | Width = 75 33 | Height = 25 34 | Cursor = crHandPoint 35 | Caption = 'OK' 36 | Default = True 37 | ModalResult = 1 38 | TabOrder = 0 39 | end 40 | object CancelBtn: TButton 41 | Left = 195 42 | Top = 68 43 | Width = 75 44 | Height = 25 45 | Cursor = crHandPoint 46 | Cancel = True 47 | Caption = 'Cancel' 48 | ModalResult = 2 49 | TabOrder = 1 50 | end 51 | object cbText: TComboBox 52 | Left = 88 53 | Top = 20 54 | Width = 249 55 | Height = 21 56 | ItemHeight = 13 57 | TabOrder = 2 58 | OnEnter = cbTextEnter 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /FindDlg.pas: -------------------------------------------------------------------------------- 1 | unit FindDlg; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, 7 | Controls, Forms, Dialogs, StdCtrls, ExtCtrls; 8 | 9 | type 10 | TFFindDlg=class(TForm) 11 | OKBtn: TButton; 12 | CancelBtn: TButton; 13 | Bevel1: TBevel; 14 | cbText: TComboBox; 15 | Label1: TLabel; 16 | procedure FormShow(Sender : TObject); 17 | procedure cbTextEnter(Sender : TObject); 18 | private 19 | { Private declarations } 20 | public 21 | { Public declarations } 22 | end; 23 | 24 | var 25 | FFindDlg:TFFindDlg; 26 | 27 | implementation 28 | 29 | {$R *.DFM} 30 | 31 | procedure TFFindDlg.FormShow(Sender : TObject); 32 | begin 33 | if cbText.Items.Count<>0 then cbText.Text := cbText.Items[0]; 34 | ActiveControl := cbText; 35 | end; 36 | 37 | procedure TFFindDlg.cbTextEnter(Sender : TObject); 38 | begin 39 | cbText.SelectAll; 40 | end; 41 | 42 | end. 43 | -------------------------------------------------------------------------------- /Hex2Double.dfm: -------------------------------------------------------------------------------- 1 | object FHex2DoubleDlg: TFHex2DoubleDlg 2 | Left = 384 3 | Top = 341 4 | BorderStyle = bsDialog 5 | Caption = 'Hex->Double Converter' 6 | ClientHeight = 77 7 | ClientWidth = 655 8 | Color = clBtnFace 9 | ParentFont = True 10 | OldCreateOrder = True 11 | Position = poScreenCenter 12 | OnShow = FormShow 13 | PixelsPerInch = 96 14 | TextHeight = 13 15 | object rgDataViewStyle: TRadioGroup 16 | Left = 0 17 | Top = 0 18 | Width = 655 19 | Height = 40 20 | Align = alTop 21 | Columns = 6 22 | ItemIndex = 0 23 | Items.Strings = ( 24 | 'Hex' 25 | 'Single (32bit)' 26 | 'Double (64)' 27 | 'Extended (80)' 28 | 'Real (32)' 29 | 'Comp (64)') 30 | TabOrder = 0 31 | OnClick = rgDataViewStyleClick 32 | end 33 | object edtValue: TLabeledEdit 34 | Left = 65 35 | Top = 46 36 | Width = 566 37 | Height = 24 38 | EditLabel.Width = 48 39 | EditLabel.Height = 16 40 | EditLabel.Caption = 'Value:' 41 | EditLabel.Font.Charset = RUSSIAN_CHARSET 42 | EditLabel.Font.Color = clWindowText 43 | EditLabel.Font.Height = -11 44 | EditLabel.Font.Name = 'Fixedsys' 45 | EditLabel.Font.Style = [] 46 | EditLabel.ParentFont = False 47 | Font.Charset = RUSSIAN_CHARSET 48 | Font.Color = clWindowText 49 | Font.Height = -11 50 | Font.Name = 'Fixedsys' 51 | Font.Style = [] 52 | LabelPosition = lpLeft 53 | ParentFont = False 54 | TabOrder = 1 55 | OnEnter = edtValueEnter 56 | end 57 | end 58 | -------------------------------------------------------------------------------- /Hex2Double.pas: -------------------------------------------------------------------------------- 1 | unit Hex2Double; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, 7 | Controls, Forms, Dialogs, StdCtrls, ExtCtrls; 8 | 9 | type 10 | TFHex2DoubleDlg=class(TForm) 11 | rgDataViewStyle: TRadioGroup; 12 | edtValue: TLabeledEdit; 13 | procedure FormShow(Sender : TObject); 14 | procedure edtValueEnter(Sender : TObject); 15 | procedure rgDataViewStyleClick(Sender : TObject); 16 | private 17 | { Private declarations } 18 | PrevIdx:Integer; 19 | BinData:Array[0..15] of Byte; 20 | Procedure Str2Binary(const AStr:AnsiString); 21 | Function Binary2Str(BytesNum:Integer):AnsiString; 22 | public 23 | { Public declarations } 24 | end; 25 | 26 | var 27 | FHex2DoubleDlg:TFHex2DoubleDlg; 28 | 29 | implementation 30 | 31 | {$R *.DFM} 32 | 33 | Uses Def_main,Misc,Scanf; 34 | 35 | procedure TFHex2DoubleDlg.FormShow(Sender : TObject); 36 | begin 37 | rgDataViewStyle.ItemIndex := 0; 38 | PrevIdx := 0; 39 | edtValue.Text := ''; 40 | if edtValue.CanFocus then ActiveControl := edtValue; 41 | end; 42 | 43 | procedure TFHex2DoubleDlg.edtValueEnter(Sender : TObject); 44 | begin 45 | edtValue.SelectAll; 46 | end; 47 | 48 | Procedure TFHex2DoubleDlg.Str2Binary (Const AStr:AnsiString); 49 | var 50 | c:Char; 51 | n:Integer; 52 | src:PAnsiChar; 53 | Begin 54 | src := PAnsiChar(AStr); 55 | FillMemory(@BinData, SizeOf(BinData),0); 56 | n := 0; 57 | while True do 58 | begin 59 | c := src^; 60 | if c=#0 then break; 61 | if c <> ' ' then 62 | begin 63 | sscanf(src, '%l8X', [@BinData[n]]); 64 | Inc(n); 65 | while True do 66 | begin 67 | c := src^; 68 | if (c=#0) or (c = ' ') then break; 69 | Inc(src); 70 | End; 71 | if c=#0 then break; 72 | End; 73 | Inc(src); 74 | End; 75 | end; 76 | 77 | Function TFHex2DoubleDlg.Binary2Str (BytesNum:Integer):AnsiString; 78 | var 79 | n:Integer; 80 | Begin 81 | result := ''; 82 | for n := 0 To BytesNum-1 do 83 | begin 84 | if n<>0 then result :=Result+' '; 85 | result :=Result + Val2Str(BinData[n],2); 86 | end; 87 | end; 88 | 89 | procedure TFHex2DoubleDlg.rgDataViewStyleClick(Sender : TObject); 90 | var 91 | singleVal:Single; 92 | doubleVal:Double; 93 | extendedVal:Extended; 94 | realVal:Real; 95 | compVal:Comp; 96 | result:AnsiString; 97 | begin 98 | if edtValue.Text = '' then 99 | begin 100 | PrevIdx := rgDataViewStyle.ItemIndex; 101 | Exit; 102 | End; 103 | if rgDataViewStyle.ItemIndex = PrevIdx then Exit; 104 | result := edtValue.Text; 105 | try 106 | if rgDataViewStyle.ItemIndex = 0 Then 107 | Begin 108 | //Hex 109 | FillMemory(@BinData, SizeOf(BinData),0); 110 | Case TFloatKind(PrevIdx) Of 111 | FT_SINGLE: 112 | begin 113 | singleVal := StrToFloat(edtValue.Text); 114 | MoveMemory(@BinData, @singleVal, SizeOf(singleVal)); 115 | result := Binary2Str(SizeOf(singleVal)); 116 | end; 117 | FT_DOUBLE: 118 | begin 119 | doubleVal := StrToFloat(edtValue.Text); 120 | MoveMemory(@BinData, @doubleVal, SizeOf(doubleVal)); 121 | result := Binary2Str(SizeOf(doubleVal)); 122 | end; 123 | FT_EXTENDED: 124 | begin 125 | extendedVal := StrToFloat(edtValue.Text); 126 | MoveMemory(@BinData, @extendedVal, SizeOf(extendedVal)); 127 | result := Binary2Str(SizeOf(extendedVal)); 128 | end; 129 | FT_REAL: 130 | begin 131 | realVal := StrToFloat(edtValue.Text); 132 | MoveMemory(@BinData, @realVal, SizeOf(realVal)); 133 | result := Binary2Str(SizeOf(realVal)); 134 | end; 135 | FT_COMP: 136 | begin 137 | compVal := StrToFloat(edtValue.Text); 138 | MoveMemory(@BinData, @compVal, SizeOf(compVal)); 139 | result := Binary2Str(SizeOf(compVal)); 140 | End; 141 | end; 142 | end 143 | else 144 | begin 145 | Case TFloatKind(PrevIdx) of 146 | FT_NONE: Str2Binary(edtValue.Text); 147 | FT_SINGLE: 148 | begin 149 | singleVal := StrToFloat(edtValue.Text); 150 | MoveMemory(@BinData, @singleVal, SizeOf(singleVal)); 151 | End; 152 | FT_DOUBLE: 153 | begin 154 | doubleVal := StrToFloat(edtValue.Text); 155 | MoveMemory(@BinData, @doubleVal, SizeOf(doubleVal)); 156 | End; 157 | FT_EXTENDED: 158 | begin 159 | extendedVal := StrToFloat(edtValue.Text); 160 | MoveMemory(@BinData, @extendedVal, SizeOf(extendedVal)); 161 | end; 162 | FT_REAL: 163 | begin 164 | realVal := StrToFloat(edtValue.Text); 165 | MoveMemory(@BinData, @realVal, SizeOf(realVal)); 166 | End; 167 | FT_COMP: 168 | begin 169 | compVal := StrToFloat(edtValue.Text); 170 | MoveMemory(@BinData, @compVal, SizeOf(compVal)); 171 | end; 172 | End; 173 | Case TFloatKind(rgDataViewStyle.ItemIndex) of 174 | FT_SINGLE: 175 | begin 176 | MoveMemory(@singleVal, @BinData, SizeOf(singleVal)); 177 | result := FloatToStr(singleVal); 178 | End; 179 | FT_DOUBLE: 180 | begin 181 | MoveMemory(@doubleVal, @BinData, SizeOf(doubleVal)); 182 | result := FloatToStr(doubleVal); 183 | End; 184 | FT_EXTENDED: 185 | begin 186 | MoveMemory(@extendedVal, @BinData, SizeOf(extendedVal)); 187 | result := FloatToStr(extendedVal); 188 | End; 189 | FT_REAL: 190 | begin 191 | MoveMemory(@realVal, @BinData, SizeOf(realVal)); 192 | result := FloatToStr(realVal); 193 | End; 194 | FT_COMP: 195 | begin 196 | MoveMemory(@compVal, @BinData, SizeOf(compVal)); 197 | result := FloatToStr(compVal); 198 | end; 199 | End; 200 | end; 201 | Except 202 | result := 'Impossible!'; 203 | End; 204 | PrevIdx := rgDataViewStyle.ItemIndex; 205 | edtValue.Text := result; 206 | end; 207 | 208 | end. 209 | -------------------------------------------------------------------------------- /IdcSplitSize.dfm: -------------------------------------------------------------------------------- 1 | object FIdcSplitSize: TFIdcSplitSize 2 | Left = 455 3 | Top = 379 4 | BorderStyle = bsToolWindow 5 | ClientHeight = 108 6 | ClientWidth = 313 7 | Color = clBtnFace 8 | ParentFont = True 9 | OldCreateOrder = True 10 | Position = poScreenCenter 11 | OnShow = FormShow 12 | PixelsPerInch = 96 13 | TextHeight = 13 14 | object Bevel1: TBevel 15 | Left = 8 16 | Top = 8 17 | Width = 297 18 | Height = 65 19 | Shape = bsFrame 20 | end 21 | object OKBtn: TButton 22 | Left = 55 23 | Top = 76 24 | Width = 75 25 | Height = 25 26 | Caption = 'OK' 27 | Default = True 28 | ModalResult = 1 29 | TabOrder = 0 30 | OnClick = OKBtnClick 31 | end 32 | object CancelBtn: TButton 33 | Left = 183 34 | Top = 76 35 | Width = 75 36 | Height = 25 37 | Cancel = True 38 | Caption = 'Cancel' 39 | ModalResult = 2 40 | TabOrder = 1 41 | OnClick = CancelBtnClick 42 | end 43 | object tbSplitSize: TTrackBar 44 | Left = 16 45 | Top = 24 46 | Width = 281 47 | Height = 45 48 | Min = 1 49 | PageSize = 1 50 | Position = 1 51 | TabOrder = 2 52 | TickMarks = tmTopLeft 53 | OnChange = tbSplitSizeChange 54 | end 55 | end 56 | -------------------------------------------------------------------------------- /IdcSplitSize.pas: -------------------------------------------------------------------------------- 1 | unit IdcSplitSize; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, ComCtrls, StdCtrls, ExtCtrls; 8 | 9 | type 10 | TFIdcSplitSize = class(TForm) 11 | OKbtn:TButton; 12 | CancelBtn:TButton; 13 | Bevel1:TBevel; 14 | tbSplitSize:TTrackBar; 15 | Procedure OKBtnClick(Sender:TObject); 16 | procedure CancelBtnClick(Sender:TObject); 17 | procedure FormShow(Sender: TObject); 18 | procedure tbSplitSizeChange(Sender:TObject); 19 | private 20 | { Private declarations } 21 | public 22 | { Public declarations } 23 | end; 24 | 25 | var 26 | FIdcSplitSize: TFIdcSplitSize; 27 | 28 | implementation 29 | 30 | {$R *.dfm} 31 | 32 | uses Main; 33 | 34 | Procedure TFIdcSplitSize.OKBtnClick (Sender:TObject); 35 | Begin 36 | SplitSize := (1 SHL (tbSplitSize.Position + 19)); //MBytes 37 | ModalResult := mrOk; 38 | end; 39 | 40 | Procedure TFIdcSplitSize.CancelBtnClick (Sender:TObject); 41 | Begin 42 | SplitSize:=0; 43 | ModalResult:=mrCancel; 44 | end; 45 | 46 | procedure TFIdcSplitSize.FormShow(Sender: TObject); 47 | begin 48 | Caption:='Split size: 1 Mbyte'; 49 | end; 50 | 51 | Procedure TFIdcSplitSize.tbSplitSizeChange (Sender:TObject); 52 | Begin 53 | Caption:='Split size: '+IntToStr(tbSplitSize.position)+' MByte'; 54 | end; 55 | 56 | 57 | end. 58 | -------------------------------------------------------------------------------- /Idr.cfg: -------------------------------------------------------------------------------- 1 | -$A8 2 | -$B- 3 | -$C- 4 | -$D+ 5 | -$E- 6 | -$F- 7 | -$G+ 8 | -$H+ 9 | -$I+ 10 | -$J+ 11 | -$K- 12 | -$L+ 13 | -$M- 14 | -$N+ 15 | -$O- 16 | -$P+ 17 | -$Q- 18 | -$R- 19 | -$S- 20 | -$T- 21 | -$U- 22 | -$V+ 23 | -$W+ 24 | -$X+ 25 | -$YD 26 | -$Z1 27 | -GD 28 | -cg 29 | -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 30 | -H+ 31 | -W+ 32 | -M 33 | -$M16384,1048576 34 | -K$00400000 35 | -N".\DCU" 36 | -LE"c:\program files (x86)\borland\delphi7\..\Bpl" 37 | -LN"c:\program files (x86)\borland\delphi7\..\Bpl" 38 | -DEUREKALOG;EUREKALOG_VER6;USE_CODESITE 39 | -w-UNSAFE_TYPE 40 | -w-UNSAFE_CODE 41 | -w-UNSAFE_CAST 42 | -------------------------------------------------------------------------------- /Idr.dof: -------------------------------------------------------------------------------- 1 | [FileVersion] 2 | Version=7.0 3 | [Compiler] 4 | A=8 5 | B=0 6 | C=0 7 | D=1 8 | E=0 9 | F=0 10 | G=1 11 | H=1 12 | I=1 13 | J=1 14 | K=0 15 | L=1 16 | M=0 17 | N=1 18 | O=0 19 | P=1 20 | Q=0 21 | R=0 22 | S=0 23 | T=0 24 | U=0 25 | V=1 26 | W=1 27 | X=1 28 | Y=1 29 | Z=1 30 | ShowHints=1 31 | ShowWarnings=1 32 | UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 33 | NamespacePrefix= 34 | SymbolDeprecated=1 35 | SymbolLibrary=1 36 | SymbolPlatform=1 37 | UnitLibrary=1 38 | UnitPlatform=1 39 | UnitDeprecated=1 40 | HResultCompat=1 41 | HidingMember=1 42 | HiddenVirtual=1 43 | Garbage=1 44 | BoundsError=1 45 | ZeroNilCompat=1 46 | StringConstTruncated=1 47 | ForLoopVarVarPar=1 48 | TypedConstVarPar=1 49 | AsgToTypedConst=1 50 | CaseLabelRange=1 51 | ForVariable=1 52 | ConstructingAbstract=1 53 | ComparisonFalse=1 54 | ComparisonTrue=1 55 | ComparingSignedUnsigned=1 56 | CombiningSignedUnsigned=1 57 | UnsupportedConstruct=1 58 | FileOpen=1 59 | FileOpenUnitSrc=1 60 | BadGlobalSymbol=1 61 | DuplicateConstructorDestructor=1 62 | InvalidDirective=1 63 | PackageNoLink=1 64 | PackageThreadVar=1 65 | ImplicitImport=1 66 | HPPEMITIgnored=1 67 | NoRetVal=1 68 | UseBeforeDef=1 69 | ForLoopVarUndef=1 70 | UnitNameMismatch=1 71 | NoCFGFileFound=1 72 | MessageDirective=1 73 | ImplicitVariants=1 74 | UnicodeToLocale=1 75 | LocaleToUnicode=1 76 | ImagebaseMultiple=1 77 | SuspiciousTypecast=1 78 | PrivatePropAccessor=1 79 | UnsafeType=0 80 | UnsafeCode=0 81 | UnsafeCast=0 82 | [Linker] 83 | MapFile=3 84 | OutputObjs=0 85 | ConsoleApp=1 86 | DebugInfo=0 87 | RemoteSymbols=0 88 | MinStackSize=16384 89 | MaxStackSize=1048576 90 | ImageBase=4194304 91 | ExeDescription= 92 | [Directories] 93 | OutputDir= 94 | UnitOutputDir=.\DCU 95 | PackageDLLOutputDir= 96 | PackageDCPOutputDir= 97 | SearchPath= 98 | Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;vcldb;dsnapcon;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;localizer7;EmbeddedWebBrowser_D7;EzBasic;EzSpecials;TMSUnicodeD7;EzPlanIT;KGrid_R7;tb2k_d7;RVHTMLD7;dclusr;rxctl;kprocs7;Misc;TBX_D7;llPDFLibD7;frxe7;frx7;frxDB7;frxTee7;fs7;fsTee7;NiceGridD7;TBXTaskBar_D7;TwoDesk_D7R;vc2;xhCntrls70;xhStd70;xhChart70;xhExport70;RaizeComponentsVcl;HotKeyMan;siplib7;kbmMemRunD7Pro;OverbyteIcsD7Run;NativeExcelD7;SpTBXTaskBar_D7;SpTBXLib_d7;RVword;tntExtendedEditors;VirtualTreesD7;VSTEditors;VirtualShellToolsD7;EasyListviewD7;GLvis;KZ;prgInternet6;XLS_ReadWrite;sgGrpVw7;zDesign7;EhLib70;GR32_DSGN_D7;GR32_D7;NxTBX;NxCollectionRun;NxCommonRun;clinetsuited7;EJ100R70 99 | Conditionals=EUREKALOG;EUREKALOG_VER6;USE_CODESITE 100 | DebugSourceDirs= 101 | UsePackages=0 102 | [Parameters] 103 | RunParams= 104 | HostApplication= 105 | Launcher= 106 | UseLauncher=0 107 | DebugCWD= 108 | [Language] 109 | ActiveLang= 110 | ProjectLang= 111 | RootDir=C:\Program Files (x86)\Borland\Delphi7\Bin\ 112 | [Version Info] 113 | IncludeVerInfo=1 114 | AutoIncBuild=0 115 | MajorVer=1 116 | MinorVer=2 117 | Release=0 118 | Build=34 119 | Debug=0 120 | PreRelease=0 121 | Special=0 122 | Private=0 123 | DLL=0 124 | Locale=1026 125 | CodePage=1251 126 | [Version Info Keys] 127 | CompanyName= 128 | FileDescription= 129 | FileVersion=1.2.0.34 130 | InternalName= 131 | LegalCopyright= 132 | LegalTrademarks= 133 | OriginalFilename= 134 | ProductName= 135 | ProductVersion=1.0.0.0 136 | Comments= 137 | [Excluded Packages] 138 | c:\Program Files (x86)\Borland\Bpl\kctrls6.bpl=KStringGrid component 139 | [HistoryLists\hlConditionals] 140 | Count=1 141 | Item0=EUREKALOG;EUREKALOG_VER6;USE_CODESITE 142 | [HistoryLists\hlUnitAliases] 143 | Count=1 144 | Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 145 | [HistoryLists\hlUnitOutputDirectory] 146 | Count=1 147 | Item0=.\DCU 148 | [Exception Log] 149 | EurekaLog Version=6105 150 | Activate=1 151 | Activate Handle=0 152 | Save Log File=0 153 | Foreground Tab=1 154 | Freeze Activate=0 155 | Freeze Timeout=60 156 | SMTP From=eurekalog@email.com 157 | SMTP Host= 158 | SMTP Port=25 159 | SMTP UserID= 160 | SMTP Password= 161 | Append to Log=0 162 | TerminateBtn Operation=0 163 | Errors Number=32 164 | Errors Terminate=3 165 | Email Address= 166 | Email Object= 167 | Email Send Options=0 168 | Output Path= 169 | Encrypt Password= 170 | AutoCloseDialogSecs=0 171 | WebSendMode=0 172 | SupportULR= 173 | HTMLLayout Count=15 174 | HTMLLine0="%3Chtml%3E" 175 | HTMLLine1=" %3Chead%3E" 176 | HTMLLine2=" %3C/head%3E" 177 | HTMLLine3=" %3Cbody TopMargin=10 LeftMargin=10%3E" 178 | HTMLLine4=" %3Ctable width="100%%" border="0"%3E" 179 | HTMLLine5=" %3Ctr%3E" 180 | HTMLLine6=" %3Ctd nowrap%3E" 181 | HTMLLine7=" %3Cfont face="Lucida Console, Courier" size="2"%3E" 182 | HTMLLine8=" %3C%%HTML_TAG%%%3E" 183 | HTMLLine9=" %3C/font%3E" 184 | HTMLLine10=" %3C/td%3E" 185 | HTMLLine11=" %3C/tr%3E" 186 | HTMLLine12=" %3C/table%3E" 187 | HTMLLine13=" %3C/body%3E" 188 | HTMLLine14="%3C/html%3E" 189 | AutoCrashOperation=0 190 | AutoCrashNumber=10 191 | AutoCrashMinutes=1 192 | WebURL= 193 | WebUserID= 194 | WebPassword= 195 | WebPort=0 196 | AttachedFiles= 197 | ProxyURL= 198 | ProxyUser= 199 | ProxyPassword= 200 | ProxyPort=8080 201 | TrakerUser= 202 | TrakerPassword= 203 | TrakerAssignTo= 204 | TrakerProject= 205 | TrakerCategory= 206 | TrakerTrialID= 207 | ZipPassword= 208 | PreBuildEvent= 209 | PostSuccessfulBuildEvent= 210 | PostFailureBuildEvent= 211 | ExceptionDialogType=3 212 | Count=0 213 | EMail Message Line Count=0 214 | loNoDuplicateErrors=0 215 | loAppendReproduceText=0 216 | loDeleteLogAtVersionChange=0 217 | loAddComputerNameInLogFileName=0 218 | loSaveModulesAndProcessesSections=1 219 | loSaveAssemblerAndCPUSections=1 220 | soAppStartDate=1 221 | soAppName=1 222 | soAppVersionNumber=1 223 | soAppParameters=1 224 | soAppCompilationDate=1 225 | soAppUpTime=1 226 | soExcDate=1 227 | soExcAddress=1 228 | soExcModuleName=1 229 | soExcModuleVersion=1 230 | soExcType=1 231 | soExcMessage=1 232 | soExcID=1 233 | soExcCount=1 234 | soExcStatus=1 235 | soExcNote=1 236 | soUserID=1 237 | soUserName=1 238 | soUserEmail=1 239 | soUserPrivileges=1 240 | soUserCompany=1 241 | soActCtlsFormClass=1 242 | soActCtlsFormText=1 243 | soActCtlsControlClass=1 244 | soActCtlsControlText=1 245 | soCmpName=1 246 | soCmpTotalMemory=1 247 | soCmpFreeMemory=1 248 | soCmpTotalDisk=1 249 | soCmpFreeDisk=1 250 | soCmpSysUpTime=1 251 | soCmpProcessor=1 252 | soCmpDisplayMode=1 253 | soCmpDisplayDPI=1 254 | soCmpVideoCard=1 255 | soCmpPrinter=1 256 | soOSType=1 257 | soOSBuildN=1 258 | soOSUpdate=1 259 | soOSLanguage=1 260 | soOSCharset=1 261 | soNetIP=1 262 | soNetSubmask=1 263 | soNetGateway=1 264 | soNetDNS1=1 265 | soNetDNS2=1 266 | soNetDHCP=1 267 | soCustomData=1 268 | sndShowSendDialog=1 269 | sndShowSuccessFailureMsg=0 270 | sndSendEntireLog=0 271 | sndSendXMLLogCopy=0 272 | sndSendScreenshot=1 273 | sndUseOnlyActiveWindow=0 274 | sndSendLastHTMLPage=1 275 | sndSendInSeparatedThread=0 276 | sndAddDateInFileName=0 277 | sndAddComputerNameInFileName=0 278 | edoSendErrorReportChecked=1 279 | edoAttachScreenshotChecked=1 280 | edoShowCopyToClipOption=0 281 | edoShowDetailsButton=1 282 | edoShowInDetailedMode=1 283 | edoShowInTopMostMode=0 284 | edoUseEurekaLogLookAndFeel=0 285 | edoShowSendErrorReportOption=0 286 | edoShowAttachScreenshotOption=0 287 | edoShowCustomButton=0 288 | csoShowDLLs=1 289 | csoShowBPLs=1 290 | csoShowBorlandThreads=1 291 | csoShowWindowsThreads=1 292 | csoDoNotStoreProcNames=0 293 | boPauseBorlandThreads=1 294 | boDoNotPauseMainThread=0 295 | boPauseWindowsThreads=1 296 | boUseMainModuleOptions=1 297 | boCopyLogInCaseOfError=0 298 | boSaveCompressedCopyInCaseOfError=0 299 | boHandleSafeCallExceptions=1 300 | boCallRTLExceptionEvent=0 301 | boCatchHandledExceptions=0 302 | loCatchLeaks=0 303 | loGroupsSonLeaks=1 304 | loHideBorlandLeaks=1 305 | loFreeAllLeaks=1 306 | loCatchLeaksExceptions=1 307 | cfoReduceFileSize=0 308 | cfoCheckFileCorruption=0 309 | cfoUseEL7=0 310 | Count mtInformationMsgCaption=1 311 | mtInformationMsgCaption0="Information." 312 | Count mtQuestionMsgCaption=1 313 | mtQuestionMsgCaption0="Question." 314 | Count mtErrorMsgCaption=1 315 | mtErrorMsgCaption0="Error." 316 | Count mtDialog_Caption=1 317 | mtDialog_Caption0="Error occurred" 318 | Count mtDialog_ErrorMsgCaption=2 319 | mtDialog_ErrorMsgCaption0="An error has occurred during program execution." 320 | mtDialog_ErrorMsgCaption1="Please read the following information for further details." 321 | Count mtDialog_GeneralCaption=1 322 | mtDialog_GeneralCaption0="General" 323 | Count mtDialog_GeneralHeader=1 324 | mtDialog_GeneralHeader0="General Information" 325 | Count mtDialog_CallStackCaption=1 326 | mtDialog_CallStackCaption0="Call Stack" 327 | Count mtDialog_CallStackHeader=1 328 | mtDialog_CallStackHeader0="Call Stack Information" 329 | Count mtDialog_ModulesCaption=1 330 | mtDialog_ModulesCaption0="Modules" 331 | Count mtDialog_ModulesHeader=1 332 | mtDialog_ModulesHeader0="Modules Information" 333 | Count mtDialog_ProcessesCaption=1 334 | mtDialog_ProcessesCaption0="Processes" 335 | Count mtDialog_ProcessesHeader=1 336 | mtDialog_ProcessesHeader0="Processes Information" 337 | Count mtDialog_AsmCaption=1 338 | mtDialog_AsmCaption0="Assembler" 339 | Count mtDialog_AsmHeader=1 340 | mtDialog_AsmHeader0="Assembler Information" 341 | Count mtDialog_CPUCaption=1 342 | mtDialog_CPUCaption0="CPU" 343 | Count mtDialog_CPUHeader=1 344 | mtDialog_CPUHeader0="CPU Information" 345 | Count mtDialog_OKButtonCaption=1 346 | mtDialog_OKButtonCaption0="%26OK" 347 | Count mtDialog_TerminateButtonCaption=1 348 | mtDialog_TerminateButtonCaption0="%26Terminate" 349 | Count mtDialog_RestartButtonCaption=1 350 | mtDialog_RestartButtonCaption0="%26Restart" 351 | Count mtDialog_DetailsButtonCaption=1 352 | mtDialog_DetailsButtonCaption0="%26Details" 353 | Count mtDialog_CustomButtonCaption=1 354 | mtDialog_CustomButtonCaption0="%26Help" 355 | Count mtDialog_SendMessage=1 356 | mtDialog_SendMessage0="%26Send this error via Internet" 357 | Count mtDialog_ScreenshotMessage=1 358 | mtDialog_ScreenshotMessage0="%26Attach a Screenshot image" 359 | Count mtDialog_CopyMessage=1 360 | mtDialog_CopyMessage0="%26Copy to Clipboard" 361 | Count mtDialog_SupportMessage=1 362 | mtDialog_SupportMessage0="Go to the Support Page" 363 | Count mtMSDialog_ErrorMsgCaption=1 364 | mtMSDialog_ErrorMsgCaption0="The application has encountered a problem. We are sorry for the inconvenience." 365 | Count mtMSDialog_RestartCaption=1 366 | mtMSDialog_RestartCaption0="Restart application." 367 | Count mtMSDialog_TerminateCaption=1 368 | mtMSDialog_TerminateCaption0="Terminate application." 369 | Count mtMSDialog_PleaseCaption=1 370 | mtMSDialog_PleaseCaption0="Please tell us about this problem." 371 | Count mtMSDialog_DescriptionCaption=1 372 | mtMSDialog_DescriptionCaption0="We have created an error report that you can send to us. We will treat this report as confidential and anonymous." 373 | Count mtMSDialog_SeeDetailsCaption=1 374 | mtMSDialog_SeeDetailsCaption0="To see what data the error report contains," 375 | Count mtMSDialog_SeeClickCaption=1 376 | mtMSDialog_SeeClickCaption0="click here." 377 | Count mtMSDialog_HowToReproduceCaption=1 378 | mtMSDialog_HowToReproduceCaption0="What were you doing when the problem happened (optional)?" 379 | Count mtMSDialog_EmailCaption=1 380 | mtMSDialog_EmailCaption0="Email address (optional):" 381 | Count mtMSDialog_SendButtonCaption=1 382 | mtMSDialog_SendButtonCaption0="%26Send Error Report" 383 | Count mtMSDialog_NoSendButtonCaption=1 384 | mtMSDialog_NoSendButtonCaption0="%26Don't Send" 385 | Count mtLog_AppHeader=1 386 | mtLog_AppHeader0="Application" 387 | Count mtLog_AppStartDate=1 388 | mtLog_AppStartDate0="Start Date" 389 | Count mtLog_AppName=1 390 | mtLog_AppName0="Name/Description" 391 | Count mtLog_AppVersionNumber=1 392 | mtLog_AppVersionNumber0="Version Number" 393 | Count mtLog_AppParameters=1 394 | mtLog_AppParameters0="Parameters" 395 | Count mtLog_AppCompilationDate=1 396 | mtLog_AppCompilationDate0="Compilation Date" 397 | Count mtLog_AppUpTime=1 398 | mtLog_AppUpTime0="Up Time" 399 | Count mtLog_ExcHeader=1 400 | mtLog_ExcHeader0="Exception" 401 | Count mtLog_ExcDate=1 402 | mtLog_ExcDate0="Date" 403 | Count mtLog_ExcAddress=1 404 | mtLog_ExcAddress0="Address" 405 | Count mtLog_ExcModuleName=1 406 | mtLog_ExcModuleName0="Module Name" 407 | Count mtLog_ExcModuleVersion=1 408 | mtLog_ExcModuleVersion0="Module Version" 409 | Count mtLog_ExcType=1 410 | mtLog_ExcType0="Type" 411 | Count mtLog_ExcMessage=1 412 | mtLog_ExcMessage0="Message" 413 | Count mtLog_ExcID=1 414 | mtLog_ExcID0="ID" 415 | Count mtLog_ExcCount=1 416 | mtLog_ExcCount0="Count" 417 | Count mtLog_ExcStatus=1 418 | mtLog_ExcStatus0="Status" 419 | Count mtLog_ExcNote=1 420 | mtLog_ExcNote0="Note" 421 | Count mtLog_UserHeader=1 422 | mtLog_UserHeader0="User" 423 | Count mtLog_UserID=1 424 | mtLog_UserID0="ID" 425 | Count mtLog_UserName=1 426 | mtLog_UserName0="Name" 427 | Count mtLog_UserEmail=1 428 | mtLog_UserEmail0="Email" 429 | Count mtLog_UserCompany=1 430 | mtLog_UserCompany0="Company" 431 | Count mtLog_UserPrivileges=1 432 | mtLog_UserPrivileges0="Privileges" 433 | Count mtLog_ActCtrlsHeader=1 434 | mtLog_ActCtrlsHeader0="Active Controls" 435 | Count mtLog_ActCtrlsFormClass=1 436 | mtLog_ActCtrlsFormClass0="Form Class" 437 | Count mtLog_ActCtrlsFormText=1 438 | mtLog_ActCtrlsFormText0="Form Text" 439 | Count mtLog_ActCtrlsControlClass=1 440 | mtLog_ActCtrlsControlClass0="Control Class" 441 | Count mtLog_ActCtrlsControlText=1 442 | mtLog_ActCtrlsControlText0="Control Text" 443 | Count mtLog_CmpHeader=1 444 | mtLog_CmpHeader0="Computer" 445 | Count mtLog_CmpName=1 446 | mtLog_CmpName0="Name" 447 | Count mtLog_CmpTotalMemory=1 448 | mtLog_CmpTotalMemory0="Total Memory" 449 | Count mtLog_CmpFreeMemory=1 450 | mtLog_CmpFreeMemory0="Free Memory" 451 | Count mtLog_CmpTotalDisk=1 452 | mtLog_CmpTotalDisk0="Total Disk" 453 | Count mtLog_CmpFreeDisk=1 454 | mtLog_CmpFreeDisk0="Free Disk" 455 | Count mtLog_CmpSystemUpTime=1 456 | mtLog_CmpSystemUpTime0="System Up Time" 457 | Count mtLog_CmpProcessor=1 458 | mtLog_CmpProcessor0="Processor" 459 | Count mtLog_CmpDisplayMode=1 460 | mtLog_CmpDisplayMode0="Display Mode" 461 | Count mtLog_CmpDisplayDPI=1 462 | mtLog_CmpDisplayDPI0="Display DPI" 463 | Count mtLog_CmpVideoCard=1 464 | mtLog_CmpVideoCard0="Video Card" 465 | Count mtLog_CmpPrinter=1 466 | mtLog_CmpPrinter0="Printer" 467 | Count mtLog_OSHeader=1 468 | mtLog_OSHeader0="Operating System" 469 | Count mtLog_OSType=1 470 | mtLog_OSType0="Type" 471 | Count mtLog_OSBuildN=1 472 | mtLog_OSBuildN0="Build #" 473 | Count mtLog_OSUpdate=1 474 | mtLog_OSUpdate0="Update" 475 | Count mtLog_OSLanguage=1 476 | mtLog_OSLanguage0="Language" 477 | Count mtLog_OSCharset=1 478 | mtLog_OSCharset0="Charset" 479 | Count mtLog_NetHeader=1 480 | mtLog_NetHeader0="Network" 481 | Count mtLog_NetIP=1 482 | mtLog_NetIP0="IP Address" 483 | Count mtLog_NetSubmask=1 484 | mtLog_NetSubmask0="Submask" 485 | Count mtLog_NetGateway=1 486 | mtLog_NetGateway0="Gateway" 487 | Count mtLog_NetDNS1=1 488 | mtLog_NetDNS10="DNS 1" 489 | Count mtLog_NetDNS2=1 490 | mtLog_NetDNS20="DNS 2" 491 | Count mtLog_NetDHCP=1 492 | mtLog_NetDHCP0="DHCP" 493 | Count mtLog_CustInfoHeader=1 494 | mtLog_CustInfoHeader0="Custom Information" 495 | Count mtCallStack_Address=1 496 | mtCallStack_Address0="Address" 497 | Count mtCallStack_Name=1 498 | mtCallStack_Name0="Module" 499 | Count mtCallStack_Unit=1 500 | mtCallStack_Unit0="Unit" 501 | Count mtCallStack_Class=1 502 | mtCallStack_Class0="Class" 503 | Count mtCallStack_Procedure=1 504 | mtCallStack_Procedure0="Procedure/Method" 505 | Count mtCallStack_Line=1 506 | mtCallStack_Line0="Line" 507 | Count mtCallStack_MainThread=1 508 | mtCallStack_MainThread0="Main" 509 | Count mtCallStack_ExceptionThread=1 510 | mtCallStack_ExceptionThread0="Exception Thread" 511 | Count mtCallStack_RunningThread=1 512 | mtCallStack_RunningThread0="Running Thread" 513 | Count mtCallStack_CallingThread=1 514 | mtCallStack_CallingThread0="Calling Thread" 515 | Count mtCallStack_ThreadID=1 516 | mtCallStack_ThreadID0="ID" 517 | Count mtCallStack_ThreadPriority=1 518 | mtCallStack_ThreadPriority0="Priority" 519 | Count mtCallStack_ThreadClass=1 520 | mtCallStack_ThreadClass0="Class" 521 | Count mtCallStack_LeakCaption=1 522 | mtCallStack_LeakCaption0="Memory Leak" 523 | Count mtCallStack_LeakData=1 524 | mtCallStack_LeakData0="Data" 525 | Count mtCallStack_LeakType=1 526 | mtCallStack_LeakType0="Type" 527 | Count mtCallStack_LeakSize=1 528 | mtCallStack_LeakSize0="Total size" 529 | Count mtCallStack_LeakCount=1 530 | mtCallStack_LeakCount0="Count" 531 | Count mtSendDialog_Caption=1 532 | mtSendDialog_Caption0="Send." 533 | Count mtSendDialog_Message=1 534 | mtSendDialog_Message0="Message" 535 | Count mtSendDialog_Resolving=1 536 | mtSendDialog_Resolving0="Resolving DNS..." 537 | Count mtSendDialog_Login=1 538 | mtSendDialog_Login0="Login..." 539 | Count mtSendDialog_Connecting=1 540 | mtSendDialog_Connecting0="Connecting with server..." 541 | Count mtSendDialog_Connected=1 542 | mtSendDialog_Connected0="Connected with server." 543 | Count mtSendDialog_Sending=1 544 | mtSendDialog_Sending0="Sending message..." 545 | Count mtSendDialog_Sent=1 546 | mtSendDialog_Sent0="Message sent." 547 | Count mtSendDialog_SelectProject=1 548 | mtSendDialog_SelectProject0="Select project..." 549 | Count mtSendDialog_Searching=1 550 | mtSendDialog_Searching0="Searching..." 551 | Count mtSendDialog_Modifying=1 552 | mtSendDialog_Modifying0="Modifying..." 553 | Count mtSendDialog_Disconnecting=1 554 | mtSendDialog_Disconnecting0="Disconnecting..." 555 | Count mtSendDialog_Disconnected=1 556 | mtSendDialog_Disconnected0="Disconnected." 557 | Count mtReproduceDialog_Caption=1 558 | mtReproduceDialog_Caption0="Request" 559 | Count mtReproduceDialog_Request=1 560 | mtReproduceDialog_Request0="Please describe the steps to reproduce the error:" 561 | Count mtReproduceDialog_OKButtonCaption=1 562 | mtReproduceDialog_OKButtonCaption0="%26OK" 563 | Count mtModules_Handle=1 564 | mtModules_Handle0="Handle" 565 | Count mtModules_Name=1 566 | mtModules_Name0="Name" 567 | Count mtModules_Description=1 568 | mtModules_Description0="Description" 569 | Count mtModules_Version=1 570 | mtModules_Version0="Version" 571 | Count mtModules_Size=1 572 | mtModules_Size0="Size" 573 | Count mtModules_LastModified=1 574 | mtModules_LastModified0="Modified" 575 | Count mtModules_Path=1 576 | mtModules_Path0="Path" 577 | Count mtProcesses_ID=1 578 | mtProcesses_ID0="ID" 579 | Count mtProcesses_Name=1 580 | mtProcesses_Name0="Name" 581 | Count mtProcesses_Description=1 582 | mtProcesses_Description0="Description" 583 | Count mtProcesses_Version=1 584 | mtProcesses_Version0="Version" 585 | Count mtProcesses_Memory=1 586 | mtProcesses_Memory0="Memory" 587 | Count mtProcesses_Priority=1 588 | mtProcesses_Priority0="Priority" 589 | Count mtProcesses_Threads=1 590 | mtProcesses_Threads0="Threads" 591 | Count mtProcesses_Path=1 592 | mtProcesses_Path0="Path" 593 | Count mtCPU_Registers=1 594 | mtCPU_Registers0="Registers" 595 | Count mtCPU_Stack=1 596 | mtCPU_Stack0="Stack" 597 | Count mtCPU_MemoryDump=1 598 | mtCPU_MemoryDump0="Memory Dump" 599 | Count mtSend_SuccessMsg=1 600 | mtSend_SuccessMsg0="The message was sent successfully." 601 | Count mtSend_FailureMsg=1 602 | mtSend_FailureMsg0="Sorry, sending the message didn't work." 603 | Count mtSend_BugClosedMsg=2 604 | mtSend_BugClosedMsg0="These BUG is just closed." 605 | mtSend_BugClosedMsg1="Contact the program support to obtain an update." 606 | Count mtSend_UnknownErrorMsg=1 607 | mtSend_UnknownErrorMsg0="Unknown error." 608 | Count mtSend_InvalidLoginMsg=1 609 | mtSend_InvalidLoginMsg0="Invalid login request." 610 | Count mtSend_InvalidSearchMsg=1 611 | mtSend_InvalidSearchMsg0="Invalid search request." 612 | Count mtSend_InvalidSelectionMsg=1 613 | mtSend_InvalidSelectionMsg0="Invalid selection request." 614 | Count mtSend_InvalidInsertMsg=1 615 | mtSend_InvalidInsertMsg0="Invalid insert request." 616 | Count mtSend_InvalidModifyMsg=1 617 | mtSend_InvalidModifyMsg0="Invalid modify request." 618 | Count mtFileCrackedMsg=2 619 | mtFileCrackedMsg0="This file is cracked." 620 | mtFileCrackedMsg1="The application will be closed." 621 | Count mtException_LeakMultiFree=1 622 | mtException_LeakMultiFree0="Multi Free memory leak." 623 | Count mtException_LeakMemoryOverrun=1 624 | mtException_LeakMemoryOverrun0="Memory Overrun leak." 625 | Count mtException_AntiFreeze=1 626 | mtException_AntiFreeze0="The application seems to be frozen." 627 | Count mtInvalidEmailMsg=1 628 | mtInvalidEmailMsg0="Invalid email." 629 | TextsCollection= 630 | 631 | 632 | -------------------------------------------------------------------------------- /Idr.dpr: -------------------------------------------------------------------------------- 1 | Program Idr; 2 | 3 | {$R 'manifest.res' 'manifest.rc'} 4 | {$SetPEFlags $20} // IMAGE_FILE_LARGE_ADDRESS_AWARE 5 | 6 | uses 7 | ExceptionLog, 8 | Forms, 9 | Classes, 10 | TypeInfos in 'TypeInfos.pas' {FTypeInfo}, 11 | StringInfo in 'StringInfo.pas' {FStringInfo}, 12 | Main in 'Main.pas' {FMain}, 13 | Explorer in 'Explorer.pas' {FExplorer}, 14 | InputDlg in 'InputDlg.pas' {FInputDlg}, 15 | FindDlg in 'FindDlg.pas' {FindDlg}, 16 | EditFunctionDlg in 'EditFunctionDlg.pas' {FEditFunctionDlg}, 17 | AboutDlg in 'AboutDlg.pas' {FAboutDlg}, 18 | EditFieldsDlg in 'EditFieldsDlg.pas' {FEditFieldsDlg}, 19 | KBViewer in 'KBViewer.pas' {FKBViewer}, 20 | UfrmFormTree in 'UfrmFormTree.pas' {IdrDfmFormTree}, 21 | Legend in 'Legend.pas' {FLegend}, 22 | Hex2Double in 'Hex2Double.pas' {FHex2DoubleDlg}, 23 | Plugins in 'Plugins.pas' {FPlugins}, 24 | Misc in 'Misc.pas', 25 | ActiveProcesses in 'ActiveProcesses.pas' {FActiveProcesses}, 26 | Def_main in 'Def_main.pas', 27 | Def_disasm in 'Def_disasm.pas', 28 | Def_thread in 'Def_thread.pas', 29 | Def_info in 'Def_info.pas', 30 | Def_decomp in 'Def_decomp.pas', 31 | Def_res in 'Def_res.pas', 32 | Def_know in 'Def_know.pas', 33 | IDCGen in 'IDCGen.pas', 34 | Heuristic in 'Heuristic.pas', 35 | Disasm in 'Disasm.pas', 36 | Threads in 'Threads.pas', 37 | Infos in 'Infos.pas', 38 | Decompiler in 'Decompiler.pas', 39 | Resources in 'Resources.pas', 40 | KnowledgeBase in 'KnowledgeBase.pas', 41 | IdcSplitSize in 'IdcSplitSize.pas'; 42 | 43 | {$R *.RES} 44 | 45 | begin 46 | Application.Initialize; 47 | Application.Title:='Interactive Delphi Reconstructor'; 48 | Application.CreateForm(TFMain, FMain); 49 | Application.CreateForm(TFExplorer, FExplorer); 50 | Application.CreateForm(TFTypeInfo, FTypeInfo); 51 | Application.CreateForm(TFStringInfo, FStringInfo); 52 | Application.CreateForm(TFInputDlg, FInputDlg); 53 | Application.CreateForm(TFFindDlg, FFindDlg); 54 | Application.CreateForm(TFEditFunctionDlg, FEditFunctionDlg); 55 | Application.CreateForm(TFEditFieldsDlg, FEditFieldsDlg); 56 | Application.CreateForm(TFAboutDlg, FAboutDlg); 57 | Application.CreateForm(TFKBViewer, FKBViewer); 58 | Application.CreateForm(TFLegend, FLegend); 59 | Application.CreateForm(TFHex2DoubleDlg, FHex2DoubleDlg); 60 | Application.CreateForm(TFPlugins, FPlugins); 61 | Application.CreateForm(TFActiveProcesses, FActiveProcesses); 62 | Application.CreateForm(TFIdcSplitSize, FIdcSplitSize); 63 | Application.Run; 64 | end. 65 | -------------------------------------------------------------------------------- /Idr.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmcdos/IDR/805f6011d44d1b4ab404768dea9b69c5b6b2b94b/Idr.res -------------------------------------------------------------------------------- /InputDlg.dfm: -------------------------------------------------------------------------------- 1 | object FInputDlg: TFInputDlg 2 | Left = 463 3 | Top = 456 4 | BorderStyle = bsDialog 5 | ClientHeight = 71 6 | ClientWidth = 566 7 | Color = clBtnFace 8 | ParentFont = True 9 | OldCreateOrder = True 10 | Position = poScreenCenter 11 | OnShow = FormShow 12 | PixelsPerInch = 96 13 | TextHeight = 13 14 | object OKBtn: TButton 15 | Left = 205 16 | Top = 40 17 | Width = 75 18 | Height = 25 19 | Cursor = crHandPoint 20 | Caption = 'OK' 21 | Default = True 22 | ModalResult = 1 23 | TabOrder = 0 24 | end 25 | object CancelBtn: TButton 26 | Left = 285 27 | Top = 40 28 | Width = 75 29 | Height = 25 30 | Cursor = crHandPoint 31 | Cancel = True 32 | Caption = 'Cancel' 33 | ModalResult = 2 34 | TabOrder = 1 35 | end 36 | object edtName: TLabeledEdit 37 | Left = 104 38 | Top = 8 39 | Width = 409 40 | Height = 24 41 | EditLabel.Width = 40 42 | EditLabel.Height = 16 43 | EditLabel.Caption = 'Name:' 44 | EditLabel.Font.Charset = RUSSIAN_CHARSET 45 | EditLabel.Font.Color = clWindowText 46 | EditLabel.Font.Height = -12 47 | EditLabel.Font.Name = 'Fixedsys' 48 | EditLabel.Font.Style = [] 49 | EditLabel.ParentFont = False 50 | Font.Charset = DEFAULT_CHARSET 51 | Font.Color = clWindowText 52 | Font.Height = -12 53 | Font.Name = 'Fixedsys' 54 | Font.Style = [] 55 | LabelPosition = lpLeft 56 | ParentFont = False 57 | TabOrder = 2 58 | OnEnter = edtNameEnter 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /InputDlg.pas: -------------------------------------------------------------------------------- 1 | unit InputDlg; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, 7 | Controls, Forms, Dialogs, StdCtrls, ExtCtrls; 8 | 9 | type 10 | TFInputDlg=class(TForm) 11 | OKBtn: TButton; 12 | CancelBtn: TButton; 13 | edtName: TLabeledEdit; 14 | procedure FormShow(Sender : TObject); 15 | procedure edtNameEnter(Sender : TObject); 16 | private 17 | { Private declarations } 18 | public 19 | { Public declarations } 20 | end; 21 | 22 | var 23 | FInputDlg:TFInputDlg; 24 | 25 | implementation 26 | 27 | {$R *.DFM} 28 | 29 | procedure TFInputDlg.FormShow(Sender : TObject); 30 | begin 31 | if edtName.CanFocus then ActiveControl := edtName; 32 | end; 33 | 34 | procedure TFInputDlg.edtNameEnter(Sender : TObject); 35 | begin 36 | edtName.SelectAll; 37 | end; 38 | 39 | end. 40 | -------------------------------------------------------------------------------- /KBViewer.dfm: -------------------------------------------------------------------------------- 1 | object FKBViewer: TFKBViewer 2 | Left = 340 3 | Top = 178 4 | BorderStyle = bsToolWindow 5 | Caption = 'KBViewer' 6 | ClientHeight = 566 7 | ClientWidth = 821 8 | Color = clBtnFace 9 | Font.Charset = DEFAULT_CHARSET 10 | Font.Color = clWindowText 11 | Font.Height = -10 12 | Font.Name = 'MS Sans Serif' 13 | Font.Style = [] 14 | FormStyle = fsStayOnTop 15 | OldCreateOrder = False 16 | Position = poScreenCenter 17 | OnCreate = FormCreate 18 | OnShow = FormShow 19 | PixelsPerInch = 96 20 | TextHeight = 13 21 | object Splitter1: TSplitter 22 | Left = 378 23 | Top = 27 24 | Width = 2 25 | Height = 563 26 | Align = alNone 27 | end 28 | object lbKB: TListBox 29 | Left = 378 30 | Top = 33 31 | Width = 380 32 | Height = 533 33 | AutoComplete = False 34 | Align = alClient 35 | Color = 15597544 36 | Font.Charset = DEFAULT_CHARSET 37 | Font.Color = clWindowText 38 | Font.Height = -11 39 | Font.Name = 'Fixedsys' 40 | Font.Style = [] 41 | ItemHeight = 16 42 | MultiSelect = True 43 | ParentFont = False 44 | TabOrder = 2 45 | end 46 | object lbIDR: TListBox 47 | Left = 0 48 | Top = 33 49 | Width = 378 50 | Height = 533 51 | AutoComplete = False 52 | Align = alLeft 53 | Font.Charset = RUSSIAN_CHARSET 54 | Font.Color = clWindowText 55 | Font.Height = -11 56 | Font.Name = 'Fixedsys' 57 | Font.Style = [] 58 | ItemHeight = 16 59 | MultiSelect = True 60 | ParentFont = False 61 | TabOrder = 1 62 | end 63 | object Panel3: TPanel 64 | Left = 758 65 | Top = 33 66 | Width = 63 67 | Height = 533 68 | Align = alRight 69 | TabOrder = 3 70 | object lPosition: TLabel 71 | Left = 7 72 | Top = 237 73 | Width = 52 74 | Height = 13 75 | Alignment = taCenter 76 | AutoSize = False 77 | Caption = 'Position' 78 | Font.Charset = DEFAULT_CHARSET 79 | Font.Color = clWindowText 80 | Font.Height = -12 81 | Font.Name = 'MS Sans Serif' 82 | Font.Style = [fsBold] 83 | ParentFont = False 84 | end 85 | object lKBIdx: TLabel 86 | Left = 4 87 | Top = 10 88 | Width = 52 89 | Height = 13 90 | Alignment = taCenter 91 | AutoSize = False 92 | Caption = 'KB Index' 93 | Font.Charset = DEFAULT_CHARSET 94 | Font.Color = clWindowText 95 | Font.Height = -12 96 | Font.Name = 'MS Sans Serif' 97 | Font.Style = [fsBold] 98 | ParentFont = False 99 | end 100 | object bPrev: TButton 101 | Left = 7 102 | Top = 186 103 | Width = 52 104 | Height = 24 105 | Caption = 'Prev' 106 | Font.Charset = DEFAULT_CHARSET 107 | Font.Color = clWindowText 108 | Font.Height = -11 109 | Font.Name = 'MS Sans Serif' 110 | Font.Style = [] 111 | ParentFont = False 112 | TabOrder = 0 113 | OnClick = bPrevClick 114 | end 115 | object bNext: TButton 116 | Left = 7 117 | Top = 284 118 | Width = 52 119 | Height = 24 120 | Caption = 'Next' 121 | Font.Charset = DEFAULT_CHARSET 122 | Font.Color = clWindowText 123 | Font.Height = -11 124 | Font.Name = 'MS Sans Serif' 125 | Font.Style = [] 126 | ParentFont = False 127 | TabOrder = 1 128 | OnClick = bNextClick 129 | end 130 | object btnOk: TButton 131 | Left = 7 132 | Top = 477 133 | Width = 52 134 | Height = 24 135 | Cursor = crHandPoint 136 | Caption = 'Use' 137 | Font.Charset = DEFAULT_CHARSET 138 | Font.Color = clWindowText 139 | Font.Height = -11 140 | Font.Name = 'MS Sans Serif' 141 | Font.Style = [] 142 | ParentFont = False 143 | TabOrder = 2 144 | OnClick = btnOkClick 145 | end 146 | object btnCancel: TButton 147 | Left = 7 148 | Top = 503 149 | Width = 52 150 | Height = 24 151 | Cursor = crHandPoint 152 | Caption = 'Cancel' 153 | Font.Charset = DEFAULT_CHARSET 154 | Font.Color = clWindowText 155 | Font.Height = -11 156 | Font.Name = 'MS Sans Serif' 157 | Font.Style = [] 158 | ParentFont = False 159 | TabOrder = 3 160 | OnClick = btnCancelClick 161 | end 162 | object edtCurrIdx: TEdit 163 | Left = 5 164 | Top = 26 165 | Width = 53 166 | Height = 21 167 | TabOrder = 4 168 | OnChange = edtCurrIdxChange 169 | end 170 | end 171 | object Panel1: TPanel 172 | Left = 0 173 | Top = 0 174 | Width = 821 175 | Height = 33 176 | Align = alTop 177 | TabOrder = 0 178 | object Label1: TLabel 179 | Left = 143 180 | Top = 9 181 | Width = 48 182 | Height = 13 183 | Caption = 'KB Unit:' 184 | Font.Charset = DEFAULT_CHARSET 185 | Font.Color = clWindowText 186 | Font.Height = -11 187 | Font.Name = 'MS Sans Serif' 188 | Font.Style = [fsBold] 189 | ParentFont = False 190 | end 191 | object lblKbIdxs: TLabel 192 | Left = 631 193 | Top = 7 194 | Width = 3 195 | Height = 13 196 | end 197 | object cbUnits: TComboBox 198 | Left = 195 199 | Top = 7 200 | Width = 430 201 | Height = 21 202 | Font.Charset = DEFAULT_CHARSET 203 | Font.Color = clWindowText 204 | Font.Height = -11 205 | Font.Name = 'MS Sans Serif' 206 | Font.Style = [fsBold] 207 | ItemHeight = 13 208 | ParentFont = False 209 | TabOrder = 0 210 | OnChange = cbUnitsChange 211 | end 212 | end 213 | end 214 | -------------------------------------------------------------------------------- /KBViewer.pas: -------------------------------------------------------------------------------- 1 | unit KBViewer; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, 7 | Controls, Forms, Dialogs, StdCtrls, ExtCtrls; 8 | 9 | type 10 | TFKBViewer=class(TForm) 11 | lbKB: TListBox; 12 | lbIDR: TListBox; 13 | Panel3: TPanel; 14 | bPrev: TButton; 15 | bNext: TButton; 16 | btnOk: TButton; 17 | btnCancel: TButton; 18 | lPosition: TLabel; 19 | Splitter1: TSplitter; 20 | edtCurrIdx: TEdit; 21 | lKBIdx: TLabel; 22 | Panel1: TPanel; 23 | cbUnits: TComboBox; 24 | Label1: TLabel; 25 | lblKbIdxs: TLabel; 26 | procedure bPrevClick(Sender : TObject); 27 | procedure bNextClick(Sender : TObject); 28 | procedure btnOkClick(Sender : TObject); 29 | procedure btnCancelClick(Sender : TObject); 30 | procedure FormCreate(Sender : TObject); 31 | procedure edtCurrIdxChange(Sender : TObject); 32 | procedure FormShow(Sender : TObject); 33 | procedure cbUnitsChange(Sender : TObject); 34 | private 35 | { Private declarations } 36 | UnitsNum:Integer; 37 | CurrIdx:Integer; 38 | CurrAdr:Integer; 39 | public 40 | { Public declarations } 41 | Position:Integer; 42 | FromIdx:Integer;//First Unit idx 43 | ToIdx:Integer; //Last Unit idx 44 | Procedure ShowCode(adr:Integer; idx:Integer); 45 | end; 46 | 47 | Var 48 | FKBViewer:TFKBViewer; 49 | 50 | implementation 51 | 52 | {$R *.DFM} 53 | 54 | Uses Def_know,Def_Disasm,Main,KnowledgeBase,Infos,Heuristic,Misc,Types,Def_main; 55 | 56 | procedure TFKBViewer.FormCreate(Sender : TObject); 57 | begin 58 | CurrIdx:=-1; 59 | lbIDR.Canvas.Font.Assign(lbIDR.Font); 60 | lbKB.Canvas.Font.Assign(lbKB.Font); 61 | end; 62 | 63 | Procedure TFKBViewer.ShowCode (adr:Integer; idx:Integer); 64 | var 65 | outfixup:Boolean; 66 | n, m, wid, maxwid, row:Integer; 67 | firstProcIdx, lastProcIdx:Integer; 68 | Val, Adres:Integer; 69 | canva:TCanvas; 70 | line,disLine:AnsiString; 71 | DisInfo:TDisInfo; 72 | pInfo:MProcInfo; 73 | _bytes:Integer; 74 | instrLen, _pos:Integer; 75 | curAdr:Integer; 76 | p:PAnsiChar; 77 | fixupType:Char; 78 | fixupOfs:Integer; 79 | len:Word; 80 | fixupName:AnsiString; 81 | Op:Byte; 82 | Begin 83 | CurrIdx := idx; 84 | CurrAdr := adr; 85 | edtCurrIdx.Text := IntToStr(CurrIdx); 86 | lPosition.Caption := IntToStr(CurrIdx - Position); 87 | lbIDR.Clear; 88 | canva := lbIDR.canvas; 89 | maxwid := 0; 90 | for m := 0 To FMain.lbCode.Count-1 do 91 | begin 92 | line := FMain.lbCode.Items[m]; 93 | //Ignore first byte (for symbol <) 94 | _bytes := Length(line) - 1; 95 | //If instruction, ignore flags (last byte) 96 | if m<>0 then Dec(_bytes); 97 | //Extract original instruction 98 | line := Copy(line,2, _bytes); 99 | //For first row add prefix IDR: 100 | if m=0 then line := 'IDR:' + line; 101 | lbIDR.Items.Add(line); 102 | wid := canva.TextWidth(line); 103 | if wid > maxwid then maxwid := wid; 104 | End; 105 | lbIDR.ScrollWidth := maxwid + 2; 106 | lbKB.Clear; 107 | row := 0; 108 | maxwid := 0; 109 | if KBase.GetProcInfo(CurrIdx, [INFO_DUMP], pInfo) then 110 | begin 111 | cbUnits.Text := KBase.GetModuleName(pInfo.ModuleID); 112 | KBase.GetProcIdxs(pInfo.ModuleID, @firstProcIdx, @lastProcIdx); 113 | lblKbIdxs.Caption := IntToStr(firstProcIdx) + ' - ' + IntToStr(lastProcIdx); 114 | canva := lbKB.canvas; 115 | line := 'KB:' + pInfo.ProcName; 116 | lbKB.Items.Add(line); 117 | Inc(row); 118 | wid := canva.TextWidth(line); 119 | if wid > maxwid then maxwid := wid; 120 | _pos := 0; 121 | curAdr := adr; 122 | if pInfo.FixupNum<>0 then 123 | begin 124 | p := PAnsiChar(pInfo.Dump) + 2*pInfo.DumpSz; 125 | for n := 0 To pInfo.FixupNum-1 do 126 | begin 127 | fixupType := p^; 128 | Inc(p); 129 | fixupOfs := PInteger(p)^; 130 | Inc(p,4); 131 | len := PWord(p)^; 132 | Inc(p,2); 133 | SetLength(fixupName,len); 134 | StrLCopy(PAnsiChar(fixupName),p,len); 135 | Inc(p,len + 1); 136 | while (_pos <= fixupOfs) and (_pos < pInfo.DumpSz) do 137 | begin 138 | instrLen := frmDisasm.Disassemble(pInfo.Dump + _pos, curAdr, @DisInfo, @disLine); 139 | if instrLen=0 then 140 | begin 141 | lbKB.Items.Add(Val2Str(curAdr,8) + ' ???'); 142 | Inc(row); 143 | Inc(_pos); 144 | Inc(curAdr); 145 | continue; 146 | End; 147 | op := frmDisasm.GetOp(DisInfo.Mnem); 148 | line := Val2Str(curAdr,8) + ' ' + disLine; 149 | outfixup := false; 150 | if _pos + instrLen > fixupOfs then 151 | begin 152 | if DisInfo.Call then 153 | begin 154 | line := Val2Str(curAdr,8) + ' call '; 155 | outfixup := true; 156 | end 157 | else if op = OP_JMP then 158 | line := Val2Str(curAdr,8) + ' jmp ' 159 | else line:=line + ';'; 160 | if not SameText(fixupName, pInfo.ProcName) then line:=line + fixupName 161 | else 162 | begin 163 | Val := PInteger(Code + Adr2Pos(CurrAdr) + fixupOfs)^; 164 | if fixupType = 'J' then 165 | Adres := CurrAdr + fixupOfs + Val + 4 166 | else Adres := Val; 167 | line:=line + Val2Str(Adres,8); 168 | End; 169 | End; 170 | lbKB.Items.Add(line); 171 | if outfixup then lbKB.Selected[row] := true; 172 | Inc(row); 173 | wid := canva.TextWidth(line); 174 | if wid > maxwid then maxwid := wid; 175 | Inc(_pos,instrLen); 176 | Inc(curAdr,instrLen); 177 | End; 178 | End; 179 | End; 180 | while _pos < pInfo.DumpSz do 181 | begin 182 | instrLen := frmDisasm.Disassemble(pInfo.Dump + _pos, curAdr, @DisInfo, @disLine); 183 | if instrLen=0 then 184 | begin 185 | lbKB.Items.Add(Val2Str(curAdr,8) + ' ???'); 186 | Inc(_pos); 187 | Inc(curAdr); 188 | continue; 189 | End; 190 | line := Val2Str(curAdr,8) + ' ' + disLine; 191 | lbKB.Items.Add(line); 192 | wid := canva.TextWidth(line); 193 | if wid > maxwid then maxwid := wid; 194 | Inc(_pos,instrLen); 195 | Inc(curAdr,instrLen); 196 | End; 197 | End; 198 | lbKB.ScrollWidth := maxwid + 2; 199 | lbKB.TopIndex := 0; 200 | end; 201 | 202 | procedure TFKBViewer.bPrevClick(Sender : TObject); 203 | begin 204 | if CurrIdx <> -1 then ShowCode(CurrAdr, CurrIdx - 1); 205 | end; 206 | 207 | procedure TFKBViewer.bNextClick(Sender : TObject); 208 | begin 209 | if CurrIdx <> -1 then ShowCode(CurrAdr, CurrIdx + 1); 210 | end; 211 | 212 | procedure TFKBViewer.btnOkClick(Sender : TObject); 213 | Var 214 | m, k1, k2, ap, _pos, pos1, pos2, Idx, val:Integer; 215 | adr:Integer; 216 | pInfo:MProcInfo; 217 | recN:InfoRec; 218 | kbName, idrName, kbLine, idrLine:AnsiString; 219 | use:TWordDynArray; 220 | dat:PProcNode; 221 | begin 222 | if KBase.GetProcInfo(CurrIdx, [INFO_DUMP, INFO_ARGS], pInfo) then 223 | begin 224 | adr := CurProcAdr; 225 | ap := Adr2Pos(adr); 226 | if ap < 0 then Exit; 227 | recN := GetInfoRec(adr); 228 | if Not Assigned(recN) Then Exit; 229 | recN.procInfo.DeleteArgs; 230 | FMain.StrapProc(ap, CurrIdx, @pInfo, false, FMain.EstimateProcSize(CurProcAdr)); 231 | //Strap all selected items (in IDR list box) 232 | if lbKB.SelCount = lbIDR.SelCount then 233 | begin 234 | k1 := 0; 235 | k2 := 0; 236 | for m := 0 To lbKB.SelCount-1 do 237 | begin 238 | kbLine := ''; 239 | idrLine := ''; 240 | while k1 < lbKB.Items.Count do 241 | begin 242 | if lbKB.Selected[k1] then 243 | begin 244 | kbLine := lbKB.Items[k1]; 245 | Inc(k1); 246 | break; 247 | End; 248 | Inc(k1); 249 | End; 250 | while k2 < lbIDR.Items.Count do 251 | begin 252 | if lbIDR.Selected[k2] then 253 | begin 254 | idrLine := lbIDR.Items[k2]; 255 | Inc(k2); 256 | break; 257 | End; 258 | Inc(k2); 259 | End; 260 | if (kbLine <> '') and (idrLine <> '') then 261 | begin 262 | pos1 := Pos('call',kbLine); 263 | pos2 := Pos('call',idrLine); 264 | if (pos1<>0) and (pos2<>0) then 265 | begin 266 | kbName := Trim(Copy(kbLine,pos1 + 4, Length(kbLine))); 267 | idrName := Trim(Copy(idrLine,pos2 + 4, Length(idrLine))); 268 | _pos := Pos(';',idrName); 269 | if _pos<>0 then idrName := Copy(idrName,1, _pos - 1); 270 | adr := 0; 271 | if TryStrToInt('$' + idrName, val) then adr := val; 272 | ap := Adr2Pos(adr); 273 | if (kbName <> '') and (ap >= 0) then 274 | begin 275 | recN := GetInfoRec(adr); 276 | recN.procInfo.DeleteArgs; 277 | use := KBase.GetModuleUses(KBase.GetModuleID(PAnsiChar(cbUnits.Text))); 278 | Idx := KBase.GetProcIdx(use, PAnsiChar(kbName), Code+ap); 279 | if Idx <> -1 then 280 | begin 281 | Idx := KBase.ProcOffsets[Idx].NamId; 282 | if not KBase.IsUsedProc(Idx) then 283 | if KBase.GetProcInfo(Idx, [INFO_DUMP, INFO_ARGS], pInfo) then 284 | FMain.StrapProc(ap, Idx, @pInfo, true, pInfo.DumpSz); 285 | end 286 | else 287 | begin 288 | Idx := KBase.GetProcIdx(use, PAnsiChar(kbName), Nil); 289 | if Idx <> -1 then 290 | begin 291 | Idx := KBase.ProcOffsets[Idx].NamId; 292 | if Not KBase.IsUsedProc(Idx) then 293 | if KBase.GetProcInfo(Idx, [INFO_DUMP, INFO_ARGS], pInfo) then 294 | FMain.StrapProc(ap, Idx, @pInfo, false, FMain.EstimateProcSize(adr)); 295 | End; 296 | End; 297 | End; 298 | End; 299 | End; 300 | End; 301 | End; 302 | FMain.RedrawCode; 303 | dat:=FMain.vtProc.GetNodeData(FMain.vtProc.FocusedNode); 304 | Idx:=0; 305 | if Assigned(dat) then Idx:=Dat.adres; 306 | FMain.ShowUnitItems(FMain.GetUnit(CurUnitAdr), 0{FMain.lbUnitItems.TopIndex}, Idx); 307 | End; 308 | Close; 309 | end; 310 | 311 | procedure TFKBViewer.btnCancelClick(Sender : TObject); 312 | begin 313 | Close; 314 | end; 315 | 316 | procedure TFKBViewer.edtCurrIdxChange(Sender : TObject); 317 | begin 318 | try 319 | ShowCode(CurrAdr, StrToInt(edtCurrIdx.Text)); 320 | Except 321 | on E:Exception do Application.ShowException(E); 322 | end; 323 | end; 324 | 325 | procedure TFKBViewer.cbUnitsChange(Sender : TObject); 326 | Var 327 | _moduleID:Word; 328 | k, firstProcIdx, lastProcIdx, idx:Integer; 329 | pInfo:MProcInfo; 330 | begin 331 | Position := -1; 332 | _moduleID := KBase.GetModuleID(PAnsiChar(cbUnits.Text)); 333 | if _moduleID <> $FFFF then 334 | begin 335 | if KBase.GetProcIdxs(_moduleID, @firstProcIdx, @lastProcIdx) then 336 | begin 337 | edtCurrIdx.Text := IntToStr(firstProcIdx); 338 | lblKbIdxs.Caption := IntToStr(firstProcIdx) + ' - ' + IntToStr(lastProcIdx); 339 | for k := firstProcIdx To lastProcIdx do 340 | begin 341 | idx := KBase.ProcOffsets[k].ModId; 342 | if not KBase.IsUsedProc(idx) then 343 | if KBase.GetProcInfo(idx, [INFO_DUMP, INFO_ARGS], pInfo) then 344 | if MatchCode(Code + Adr2Pos(CurProcAdr), @pInfo) then 345 | begin 346 | edtCurrIdx.Text := IntToStr(idx); 347 | Position := idx; 348 | break; 349 | End; 350 | End; 351 | End; 352 | End; 353 | if Position = -1 then ShowCode(CurProcAdr, firstProcIdx) 354 | else ShowCode(CurProcAdr, Position); 355 | end; 356 | 357 | procedure TFKBViewer.FormShow(Sender : TObject); 358 | Var 359 | n,ID:Integer; 360 | p:PAnsiChar; 361 | begin 362 | if UnitsNum=0 then 363 | for n := 0 To KBase.ModuleCount-1 do 364 | begin 365 | ID := KBase.ModuleOffsets[n].NamId; 366 | p := KBase.GetKBCachePtr(KBase.ModuleOffsets[ID].Offset, KBase.ModuleOffsets[ID].Size); 367 | cbUnits.Items.Add(String(p + 4)); 368 | Inc(UnitsNum); 369 | End; 370 | end; 371 | 372 | end. 373 | -------------------------------------------------------------------------------- /Legend.dfm: -------------------------------------------------------------------------------- 1 | object FLegend: TFLegend 2 | Left = 452 3 | Top = 306 4 | BorderStyle = bsDialog 5 | Caption = 'Legend' 6 | ClientHeight = 228 7 | ClientWidth = 245 8 | Color = clBtnFace 9 | Font.Charset = DEFAULT_CHARSET 10 | Font.Color = clWindowText 11 | Font.Height = -11 12 | Font.Name = 'MS Sans Serif' 13 | Font.Style = [] 14 | KeyPreview = True 15 | OldCreateOrder = False 16 | Position = poScreenCenter 17 | OnCreate = FormCreate 18 | OnKeyDown = FormKeyDown 19 | PixelsPerInch = 96 20 | TextHeight = 13 21 | object gb1: TGroupBox 22 | Left = 4 23 | Top = 3 24 | Width = 235 25 | Height = 105 26 | Caption = 'Unit colors' 27 | TabOrder = 0 28 | object Label1: TLabel 29 | Left = 79 30 | Top = 19 31 | Width = 109 32 | Height = 13 33 | Caption = 'Standard unit (from KB)' 34 | end 35 | object Label2: TLabel 36 | Left = 79 37 | Top = 40 38 | Width = 42 39 | Height = 13 40 | Caption = 'User unit' 41 | end 42 | object Label3: TLabel 43 | Left = 79 44 | Top = 61 45 | Width = 48 46 | Height = 13 47 | Caption = 'Trivial unit' 48 | end 49 | object Label5: TLabel 50 | Left = 79 51 | Top = 83 52 | Width = 125 53 | Height = 13 54 | Caption = 'Unrecognized bytes in unit' 55 | end 56 | object lblUnitStd: TLabel 57 | Left = 7 58 | Top = 19 59 | Width = 65 60 | Height = 16 61 | AutoSize = False 62 | Caption = 'system' 63 | Color = clWhite 64 | Font.Charset = RUSSIAN_CHARSET 65 | Font.Color = clWindowText 66 | Font.Height = -12 67 | Font.Name = 'Fixedsys' 68 | Font.Style = [] 69 | ParentColor = False 70 | ParentFont = False 71 | end 72 | object lblUnitUser: TLabel 73 | Left = 7 74 | Top = 39 75 | Width = 65 76 | Height = 16 77 | AutoSize = False 78 | Caption = 'Unit5' 79 | Color = clWhite 80 | Font.Charset = RUSSIAN_CHARSET 81 | Font.Color = clWindowText 82 | Font.Height = -12 83 | Font.Name = 'Fixedsys' 84 | Font.Style = [] 85 | ParentColor = False 86 | ParentFont = False 87 | end 88 | object lblUnitTrivial: TLabel 89 | Left = 7 90 | Top = 60 91 | Width = 65 92 | Height = 16 93 | AutoSize = False 94 | Caption = 'Unit25' 95 | Color = clWhite 96 | Font.Charset = RUSSIAN_CHARSET 97 | Font.Color = clWindowText 98 | Font.Height = -12 99 | Font.Name = 'Fixedsys' 100 | Font.Style = [] 101 | ParentColor = False 102 | ParentFont = False 103 | end 104 | object lblUnitUserUnk: TLabel 105 | Left = 7 106 | Top = 81 107 | Width = 65 108 | Height = 16 109 | AutoSize = False 110 | Caption = 'dlgPass' 111 | Color = clWhite 112 | Font.Charset = RUSSIAN_CHARSET 113 | Font.Color = clWindowText 114 | Font.Height = -12 115 | Font.Name = 'Fixedsys' 116 | Font.Style = [] 117 | ParentColor = False 118 | ParentFont = False 119 | end 120 | end 121 | object gb2: TGroupBox 122 | Left = 4 123 | Top = 112 124 | Width = 235 125 | Height = 84 126 | Caption = 'Unit types' 127 | TabOrder = 1 128 | object Label4: TLabel 129 | Left = 79 130 | Top = 19 131 | Width = 128 132 | Height = 13 133 | Caption = 'Non trivial Initializaiton proc' 134 | end 135 | object Label6: TLabel 136 | Left = 79 137 | Top = 40 138 | Width = 126 139 | Height = 13 140 | Caption = 'Non trivial Finalization proc' 141 | end 142 | object Label7: TLabel 143 | Left = 79 144 | Top = 61 145 | Width = 43 146 | Height = 13 147 | Caption = 'ask me :)' 148 | end 149 | object lblInit: TLabel 150 | Left = 7 151 | Top = 19 152 | Width = 65 153 | Height = 16 154 | AutoSize = False 155 | Caption = 'I' 156 | Color = clWhite 157 | Font.Charset = RUSSIAN_CHARSET 158 | Font.Color = clWindowText 159 | Font.Height = -12 160 | Font.Name = 'Fixedsys' 161 | Font.Style = [] 162 | ParentColor = False 163 | ParentFont = False 164 | end 165 | object lblFin: TLabel 166 | Left = 7 167 | Top = 39 168 | Width = 65 169 | Height = 16 170 | AutoSize = False 171 | Caption = 'F' 172 | Color = clWhite 173 | Font.Charset = RUSSIAN_CHARSET 174 | Font.Color = clWindowText 175 | Font.Height = -12 176 | Font.Name = 'Fixedsys' 177 | Font.Style = [] 178 | ParentColor = False 179 | ParentFont = False 180 | end 181 | object lblUnk: TLabel 182 | Left = 7 183 | Top = 60 184 | Width = 65 185 | Height = 16 186 | AutoSize = False 187 | Caption = '?' 188 | Color = clWhite 189 | Font.Charset = RUSSIAN_CHARSET 190 | Font.Color = clWindowText 191 | Font.Height = -12 192 | Font.Name = 'Fixedsys' 193 | Font.Style = [] 194 | ParentColor = False 195 | ParentFont = False 196 | end 197 | end 198 | object btnOK: TButton 199 | Left = 82 200 | Top = 200 201 | Width = 75 202 | Height = 25 203 | Cursor = crHandPoint 204 | Caption = 'OK' 205 | ModalResult = 1 206 | TabOrder = 2 207 | end 208 | end 209 | -------------------------------------------------------------------------------- /Legend.pas: -------------------------------------------------------------------------------- 1 | unit Legend; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, 7 | Controls, Forms, Dialogs, StdCtrls; 8 | 9 | type 10 | TFLegend=class(TForm) 11 | gb1: TGroupBox; 12 | Label1: TLabel; 13 | Label2: TLabel; 14 | Label3: TLabel; 15 | Label5: TLabel; 16 | lblUnitStd: TLabel; 17 | lblUnitUser: TLabel; 18 | lblUnitTrivial: TLabel; 19 | lblUnitUserUnk: TLabel; 20 | gb2: TGroupBox; 21 | Label4: TLabel; 22 | Label6: TLabel; 23 | Label7: TLabel; 24 | lblInit: TLabel; 25 | lblFin: TLabel; 26 | lblUnk: TLabel; 27 | btnOK: TButton; 28 | procedure FormKeyDown(Sender : TObject; var Key:Word; Shift:TShiftState); 29 | procedure FormCreate(Sender : TObject); 30 | private 31 | { Private declarations } 32 | public 33 | { Public declarations } 34 | end; 35 | 36 | var 37 | FLegend:TFLegend; 38 | 39 | implementation 40 | 41 | {$R *.DFM} 42 | 43 | procedure TFLegend.FormKeyDown(Sender : TObject; var Key:Word; Shift:TShiftState); 44 | begin 45 | if Key=VK_ESCAPE then Close; 46 | end; 47 | 48 | procedure TFLegend.FormCreate(Sender : TObject); 49 | begin 50 | lblUnitStd.Font.Color := $C08000; //blue 51 | lblUnitUser.Font.Color := $00B000; //green 52 | lblUnitTrivial.Font.Color := $0000B0; //brown 53 | lblUnitUserUnk.Font.Color := $8080FF; //red 54 | end; 55 | 56 | end. -------------------------------------------------------------------------------- /Main.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmcdos/IDR/805f6011d44d1b4ab404768dea9b69c5b6b2b94b/Main.pas -------------------------------------------------------------------------------- /Misc.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmcdos/IDR/805f6011d44d1b4ab404768dea9b69c5b6b2b94b/Misc.pas -------------------------------------------------------------------------------- /Plugins.dfm: -------------------------------------------------------------------------------- 1 | object FPlugins: TFPlugins 2 | Left = 550 3 | Top = 365 4 | Width = 548 5 | Height = 233 6 | Caption = 'Plugins' 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -10 11 | Font.Name = 'MS Sans Serif' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | Position = poScreenCenter 15 | OnCreate = FormCreate 16 | OnShow = FormShow 17 | PixelsPerInch = 96 18 | TextHeight = 13 19 | object cklbPluginsList: TCheckListBox 20 | Left = 0 21 | Top = 0 22 | Width = 540 23 | Height = 170 24 | OnClickCheck = cklbPluginsListClickCheck 25 | Align = alTop 26 | ItemHeight = 13 27 | TabOrder = 0 28 | OnDblClick = cklbPluginsListDblClick 29 | end 30 | object bOk: TButton 31 | Left = 117 32 | Top = 176 33 | Width = 61 34 | Height = 20 35 | Caption = 'Ok' 36 | TabOrder = 1 37 | OnClick = bOkClick 38 | end 39 | object bCancel: TButton 40 | Left = 260 41 | Top = 176 42 | Width = 61 43 | Height = 20 44 | Caption = 'Cancel' 45 | TabOrder = 2 46 | OnClick = bCancelClick 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /Plugins.pas: -------------------------------------------------------------------------------- 1 | unit Plugins; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, 7 | Controls, Forms, Dialogs, StdCtrls, CheckLst; 8 | 9 | type 10 | _RegisterPlugIn = Procedure (var PlugName:AnsiString); Stdcall; 11 | _AboutPlugIn = Procedure; Stdcall; 12 | 13 | TFPlugins=class(TForm) 14 | cklbPluginsList: TCheckListBox; 15 | bOk: TButton; 16 | bCancel: TButton; 17 | procedure bCancelClick(Sender: TObject); 18 | procedure bOkClick(Sender: TObject); 19 | procedure cklbPluginsListClickCheck(Sender: TObject); 20 | procedure cklbPluginsListDblClick(Sender: TObject); 21 | procedure FormShow(Sender : TObject); 22 | procedure FormCreate(Sender : TObject); 23 | private 24 | { Private declarations } 25 | public 26 | { Public declarations } 27 | PluginsPath:AnsiString; 28 | PluginName:AnsiString; 29 | end; 30 | 31 | var 32 | FPlugins:TFPlugins; 33 | 34 | implementation 35 | 36 | {$R *.DFM} 37 | 38 | Var 39 | fnRegisterPlugIn:_RegisterPlugIn; 40 | fnAboutPlugIn:_AboutPlugIn; 41 | 42 | procedure TFPlugins.FormCreate(Sender : TObject); 43 | begin 44 | PluginsPath:=''; 45 | PluginName:=''; 46 | end; 47 | 48 | procedure TFPlugins.FormShow(Sender : TObject); 49 | Var 50 | sr:TSearchRec; 51 | curDir,info,ptr:AnsiString; 52 | hModule:HINST; 53 | begin 54 | cklbPluginsList.Clear; 55 | if PluginsPath <> '' then 56 | begin 57 | curDir := GetCurrentDir; 58 | try 59 | Screen.Cursor := crHourGlass; 60 | ChDir(PluginsPath); 61 | if FindFirst('*.dll', faArchive, sr)<>0 then 62 | begin 63 | Repeat 64 | hModule := LoadLibrary(PAnsiChar(sr.Name)); 65 | if hModule<>0 then 66 | begin 67 | info := ''; 68 | @fnRegisterPlugIn := GetProcAddress(hModule, 'RegisterPlugIn'); 69 | if Assigned(fnRegisterPlugIn) then 70 | begin 71 | fnRegisterPlugIn(ptr); 72 | info := ptr; 73 | End; 74 | cklbPluginsList.Items.Add(sr.Name + ' - ' + info); 75 | FreeLibrary(hModule); 76 | End; 77 | Until FindNext(sr)=0; 78 | FindClose(sr); 79 | End; 80 | Finally 81 | ChDir(curDir); 82 | Screen.Cursor := crDefault; 83 | end; 84 | End; 85 | end; 86 | 87 | procedure TFPlugins.cklbPluginsListClickCheck(Sender: TObject); 88 | var 89 | N:Integer; 90 | begin 91 | if cklbPluginsList.State[cklbPluginsList.ItemIndex]<>cbUnchecked then 92 | for n := 0 to cklbPluginsList.Items.Count-1 do 93 | if n = cklbPluginsList.ItemIndex then cklbPluginsList.State[n] := cbChecked 94 | Else cklbPluginsList.State[n]:=cbUnchecked; 95 | end; 96 | 97 | procedure TFPlugins.cklbPluginsListDblClick(Sender: TObject); 98 | var 99 | filename, line:AnsiString; 100 | _pos:Integer; 101 | hModule:HINST; 102 | begin 103 | filename := ''; 104 | line := cklbPluginsList.Items[cklbPluginsList.ItemIndex]; 105 | _pos := pos('-',line); 106 | if _pos <> 0 then filename := Trim(Copy(line,1, _pos - 1)); 107 | if filename <> '' then 108 | begin 109 | hModule := LoadLibrary(PAnsiChar(PluginsPath + '\' + filename)); 110 | if hModule<>0 then 111 | begin 112 | @fnAboutPlugIn := GetProcAddress(hModule, 'AboutPlugIn'); 113 | if Assigned(fnAboutPlugIn) then fnAboutPlugIn; 114 | FreeLibrary(hModule); 115 | End; 116 | End; 117 | end; 118 | 119 | procedure TFPlugins.bOkClick(Sender: TObject); 120 | var 121 | n,_pos:Integer; 122 | line:AnsiString; 123 | begin 124 | PluginName := ''; 125 | for n := 0 to cklbPluginsList.Items.Count-1 do 126 | if cklbPluginsList.State[n]<>cbUnchecked then 127 | begin 128 | line := cklbPluginsList.Items[n]; 129 | _pos := Pos('-',line); 130 | if _pos <> 0 then PluginName := Trim(Copy(line,1, _pos - 1)); 131 | break; 132 | End; 133 | ModalResult := mrOk; 134 | end; 135 | 136 | procedure TFPlugins.bCancelClick(Sender: TObject); 137 | begin 138 | PluginName:=''; 139 | ModalResult:=mrCancel; 140 | end; 141 | 142 | end. 143 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IDR 2 | Interactive Delphi Reconstructor (Pascal version) 3 | 4 | This is a translation of the original C++ code (can be found on https://github.com/crypto2011/IDR) into Pascal. 5 | Use Delphi 7 to build the project. 6 | There is also a simple tool **IDP2TXT** which may be used to convert an IDP (IDR project file) to its textual representation. 7 | -------------------------------------------------------------------------------- /Resources.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmcdos/IDR/805f6011d44d1b4ab404768dea9b69c5b6b2b94b/Resources.pas -------------------------------------------------------------------------------- /Scanf.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmcdos/IDR/805f6011d44d1b4ab404768dea9b69c5b6b2b94b/Scanf.pas -------------------------------------------------------------------------------- /StringInfo.dfm: -------------------------------------------------------------------------------- 1 | object FStringInfo: TFStringInfo 2 | Left = 270 3 | Top = 390 4 | Width = 853 5 | Height = 190 6 | Color = clBtnFace 7 | Font.Charset = DEFAULT_CHARSET 8 | Font.Color = clWindowText 9 | Font.Height = -10 10 | Font.Name = 'MS Sans Serif' 11 | Font.Style = [] 12 | KeyPreview = True 13 | OldCreateOrder = False 14 | Position = poScreenCenter 15 | OnKeyDown = FormKeyDown 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object memStringInfo: TMemo 19 | Left = 0 20 | Top = 0 21 | Width = 845 22 | Height = 163 23 | Align = alClient 24 | Font.Charset = DEFAULT_CHARSET 25 | Font.Color = clWindowText 26 | Font.Height = -12 27 | Font.Name = 'Fixedsys' 28 | Font.Style = [] 29 | ParentFont = False 30 | ReadOnly = True 31 | ScrollBars = ssVertical 32 | TabOrder = 0 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /StringInfo.pas: -------------------------------------------------------------------------------- 1 | unit StringInfo; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, 7 | Controls, Forms, Dialogs, StdCtrls; 8 | 9 | type 10 | TFStringInfo=class(TForm) 11 | memStringInfo: TMemo; 12 | procedure FormKeyDown(Sender : TObject; var Key:Word; Shift:TShiftState); 13 | private 14 | { Private declarations } 15 | public 16 | { Public declarations } 17 | end; 18 | 19 | var 20 | FStringInfo:TFStringInfo; 21 | 22 | implementation 23 | 24 | {$R *.DFM} 25 | 26 | procedure TFStringInfo.FormKeyDown(Sender : TObject; var Key:Word; Shift:TShiftState); 27 | begin 28 | if Key=VK_ESCAPE then ModalResult:=mrCancel; 29 | end; 30 | 31 | end. 32 | -------------------------------------------------------------------------------- /Threads.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmcdos/IDR/805f6011d44d1b4ab404768dea9b69c5b6b2b94b/Threads.pas -------------------------------------------------------------------------------- /TypeInfos.dfm: -------------------------------------------------------------------------------- 1 | object FTypeInfo: TFTypeInfo 2 | Left = 267 3 | Top = 331 4 | Width = 700 5 | Height = 434 6 | Color = clBtnFace 7 | Font.Charset = DEFAULT_CHARSET 8 | Font.Color = clWindowText 9 | Font.Height = -11 10 | Font.Name = 'MS Sans Serif' 11 | Font.Style = [] 12 | KeyPreview = True 13 | OldCreateOrder = False 14 | Position = poScreenCenter 15 | OnKeyDown = FormKeyDown 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object memDescription: TMemo 19 | Left = 0 20 | Top = 0 21 | Width = 692 22 | Height = 374 23 | Align = alClient 24 | Font.Charset = DEFAULT_CHARSET 25 | Font.Color = clWindowText 26 | Font.Height = -12 27 | Font.Name = 'Fixedsys' 28 | Font.Style = [] 29 | ParentFont = False 30 | ReadOnly = True 31 | ScrollBars = ssVertical 32 | TabOrder = 0 33 | end 34 | object Panel1: TPanel 35 | Left = 0 36 | Top = 374 37 | Width = 692 38 | Height = 33 39 | Align = alBottom 40 | TabOrder = 1 41 | Visible = False 42 | object bSave: TButton 43 | Left = 251 44 | Top = 7 45 | Width = 61 46 | Height = 20 47 | Caption = 'Save' 48 | TabOrder = 0 49 | OnClick = bSaveClick 50 | end 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /UFileDropper.pas: -------------------------------------------------------------------------------- 1 | Unit UFileDropper; 2 | 3 | Interface 4 | 5 | Uses Classes,Windows,ShellAPI; 6 | 7 | // simple class that allow/disallow drag-drop support for window 8 | 9 | Type 10 | TDragDropHelper=class 11 | private 12 | wndHandle:HWND; 13 | public 14 | constructor Create(const wnd:HWND); 15 | destructor Destroy; Override; 16 | end; 17 | 18 | // simple class that accepts dropped files and stores names + droppoint 19 | TFileDropper=class 20 | private 21 | DropHandle:HDrop; 22 | function GetFile(Index:Integer):AnsiString; 23 | function GetFileCount:Integer; 24 | function GetPoint:TPoint; 25 | public 26 | constructor Create(Handle:HDrop); 27 | destructor Destroy; override; 28 | public 29 | property FileCount:Integer read GetFileCount; 30 | property Files[Index:Integer]:AnsiString read GetFile; 31 | property DropPoint:TPoint read GetPoint; 32 | end; 33 | 34 | Implementation 35 | 36 | Constructor TDragDropHelper.Create (Const wnd:HWND); 37 | Begin 38 | wndHandle:=wnd; 39 | DragAcceptFiles(wndHandle,True); 40 | end; 41 | 42 | Destructor TDragDropHelper.Destroy; 43 | Begin 44 | DragAcceptFiles(wndHandle,False); 45 | Inherited; 46 | end; 47 | 48 | Constructor TFileDropper.Create (Handle:HDrop); 49 | Begin 50 | DropHandle:=Handle; 51 | end; 52 | 53 | Destructor TFileDropper.Destroy; 54 | Begin 55 | DragFinish(DropHandle); 56 | Inherited; 57 | end; 58 | 59 | Function TFileDropper.GetFile (Index:Integer):AnsiString; 60 | Var 61 | FileNameLength:Integer; 62 | Begin 63 | FileNameLength:=DragQueryFile(DropHandle,Index,Nil,0); 64 | SetLength(Result,FileNameLength); 65 | DragQueryFile(DropHandle,Index,PAnsiChar(Result),FileNameLength); 66 | end; 67 | 68 | Function TFileDropper.GetFileCount:Integer; 69 | Begin 70 | Result:=DragQueryFile(DropHandle,$FFFFFFFF,Nil,0); 71 | end; 72 | 73 | Function TFileDropper.GetPoint:TPoint; 74 | Begin 75 | Result:=Point(0,0); 76 | DragQueryPoint(DropHandle,Result); 77 | end; 78 | 79 | End. 80 | -------------------------------------------------------------------------------- /UfrmFormTree.dfm: -------------------------------------------------------------------------------- 1 | object IdrDfmFormTree: TIdrDfmFormTree 2 | Left = 638 3 | Top = 371 4 | Width = 331 5 | Height = 465 6 | BorderStyle = bsSizeToolWin 7 | Caption = 'frmDfmTree' 8 | Color = clBtnFace 9 | Font.Charset = DEFAULT_CHARSET 10 | Font.Color = clWindowText 11 | Font.Height = -11 12 | Font.Name = 'MS Sans Serif' 13 | Font.Style = [] 14 | FormStyle = fsStayOnTop 15 | KeyPreview = True 16 | OldCreateOrder = False 17 | OnClose = FormClose 18 | OnCreate = FormCreate 19 | OnDestroy = FormDestroy 20 | OnKeyDown = FormKeyDown 21 | PixelsPerInch = 96 22 | TextHeight = 13 23 | object tvForm: TTreeView 24 | Left = 0 25 | Top = 0 26 | Width = 323 27 | Height = 438 28 | Align = alClient 29 | Font.Charset = RUSSIAN_CHARSET 30 | Font.Color = clWindowText 31 | Font.Height = -12 32 | Font.Name = 'Fixedsys' 33 | Font.Style = [] 34 | Indent = 19 35 | ParentFont = False 36 | PopupMenu = mnuTree 37 | ReadOnly = True 38 | TabOrder = 0 39 | OnDblClick = tvFormDblClick 40 | OnKeyPress = tvFormKeyPress 41 | end 42 | object dlgFind: TFindDialog 43 | Options = [frDown, frDisableUpDown, frDisableWholeWord] 44 | OnFind = dlgFindFind 45 | Left = 112 46 | Top = 80 47 | end 48 | object mnuTree: TPopupMenu 49 | Left = 120 50 | Top = 144 51 | object Expand1: TMenuItem 52 | Caption = 'Expand' 53 | OnClick = Expand1Click 54 | end 55 | object Collapse1: TMenuItem 56 | Caption = 'Collapse' 57 | OnClick = Collapse1Click 58 | end 59 | object Find1: TMenuItem 60 | Caption = 'Find' 61 | OnClick = Find1Click 62 | end 63 | end 64 | end 65 | -------------------------------------------------------------------------------- /UfrmFormTree.pas: -------------------------------------------------------------------------------- 1 | unit UfrmFormTree; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, 7 | Controls, Forms, Dialogs, StdCtrls, Menus, ComCtrls; 8 | 9 | type 10 | TIdrDfmFormTree=class(TForm) 11 | tvForm: TTreeView; 12 | dlgFind: TFindDialog; 13 | mnuTree: TPopupMenu; 14 | Expand1: TMenuItem; 15 | Collapse1: TMenuItem; 16 | Find1: TMenuItem; 17 | procedure FormDestroy(Sender: TObject); 18 | procedure tvFormKeyPress(Sender : TObject; Var Key:Char); 19 | procedure tvFormDblClick(Sender : TObject); 20 | procedure dlgFindFind(Sender : TObject); 21 | procedure Expand1Click(Sender : TObject); 22 | procedure Collapse1Click(Sender : TObject); 23 | procedure Find1Click(Sender : TObject); 24 | procedure FormClose(Sender : TObject; var Action:TCloseAction); 25 | procedure FormKeyDown(Sender : TObject; var Key:Word; Shift:TShiftState); 26 | procedure FormCreate(Sender : TObject); 27 | private 28 | { Private declarations } 29 | prevCursor:TCursor; 30 | //TTreeNodeMap NodesMap; 31 | Function MakeNodeCaption(curComp:TComponent):AnsiString; 32 | Function MakeNodeEventCaption(item:Pointer):AnsiString; 33 | Procedure BorderTheControl(aControl:TControl); 34 | Procedure AddEventsToNode(compName:AnsiString; dstNode:TTreeNode; evList:TList); 35 | Function FindTreeNodeByText(nodeFrom:TTreeNode; const txt:AnsiString; caseSensitive:Boolean):TTreeNode; 36 | Function FindTreeNodeByTag(tag:Pointer):TTreeNode; 37 | Procedure AddTreeNodeWithTag(node:TTreeNode; tag:Pointer); 38 | Function IsEventNode(selNode:TTreeNode):Boolean; 39 | public 40 | { Public declarations } 41 | end; 42 | 43 | implementation 44 | 45 | {$R *.DFM} 46 | 47 | Uses Def_res,Def_main,Main,Resources,Infos,Misc,StrUtils; 48 | 49 | procedure TIdrDfmFormTree.AddEventsToNode(compName:AnsiString; dstNode:TTreeNode; evList:TList); 50 | Var 51 | m:Integer; 52 | item:PEventListItem; 53 | Begin 54 | for m := 0 To evList.Count-1 do 55 | begin 56 | item := evList.Items[m]; 57 | if SameText(item.CompName, compName) then 58 | tvForm.Items.AddChildObject(dstNode, MakeNodeEventCaption(item), Pointer(item.Adr)); 59 | End; 60 | end; 61 | 62 | procedure TIdrDfmFormTree.FormCreate(Sender : TObject); 63 | var 64 | compCnt,i:Integer; 65 | frmOwner:TForm; 66 | evList:TList; 67 | rootNode,parentNode,parentNode2,childNode:TTreeNode; 68 | curComp, parComp, parComp2:TComponent; 69 | externalNames, tnCaption:AnsiString; 70 | parName, parName2, ownName:AnsiString; 71 | externalParent:Boolean; 72 | begin 73 | prevCursor:=Screen.Cursor; 74 | Screen.Cursor:=crHourGlass; 75 | Application.ProcessMessages; 76 | frmOwner:=TForm(Owner); 77 | compCnt := frmOwner.ComponentCount; 78 | if compCnt > 1 then Caption := frmOwner.Name + ' (' + IntToStr(compCnt) + ' components)' 79 | else Caption := frmOwner.Name + ' (1 component)'; 80 | evList:=TList.Create; 81 | ResInfo.GetEventsList(frmOwner.Name, evList); 82 | tvForm.Items.BeginUpdate; 83 | try 84 | rootNode := tvForm.Items.AddObject(Nil, frmOwner.Name, frmOwner); 85 | AddTreeNodeWithTag(rootNode, frmOwner); 86 | AddEventsToNode(frmOwner.Name, rootNode, evList); 87 | externalParent := false; 88 | for i := 0 To compCnt-1 do 89 | begin 90 | curComp := frmOwner.Components[i]; 91 | if curComp = Self Then continue; //Don't display Form TreeView 92 | tnCaption := MakeNodeCaption(curComp); 93 | parComp := curComp.GetParentComponent; 94 | if curComp.HasParent then 95 | begin 96 | //in some very rare cases parent could be located in another module! 97 | //so in this case we have true for currComp->HasParent() but NULL for parCompo 98 | if not Assigned(parComp) then 99 | begin 100 | externalParent := true; 101 | if externalNames<>'' then externalNames:= externalNames + ', '; 102 | externalNames := externalNames + tnCaption; 103 | End; 104 | if Assigned(parComp) Then parName:=parComp.Name 105 | Else parName:='N/A'; 106 | ownName := curComp.Owner.Name; 107 | parentNode := FindTreeNodeByTag(parComp); 108 | 109 | //tricky case for special components (eg: TPage, TTabPage) 110 | //they are a) noname (but renamed in IDR) 111 | // b) not present in Components[] array 112 | if Not Assigned(parentNode) and Assigned(parComp) then 113 | begin 114 | parComp2 := parComp.GetParentComponent; 115 | parName2 := parComp2.Name; 116 | parentNode2 := FindTreeNodeByTag(parComp2); 117 | 118 | // add noname parent 119 | parentNode := tvForm.Items.AddChildObject(parentNode2, MakeNodeCaption(parComp), parComp); 120 | AddTreeNodeWithTag(parentNode, parComp); 121 | End; 122 | end 123 | else parentNode := FindTreeNodeByTag(curComp.Owner); 124 | childNode := tvForm.Items.AddChildObject(parentNode, tnCaption, curComp); 125 | AddTreeNodeWithTag(childNode, curComp); 126 | AddEventsToNode(curComp.Name, childNode, evList); 127 | End; 128 | rootNode.Expand(false); 129 | Finally 130 | tvForm.Items.EndUpdate; 131 | End; 132 | if externalParent then 133 | Application.MessageBox(PAnsiChar('Form has some component classes defined in external modules:'+#13+#10 134 | + externalNames + #13+#10+#13+#10+'Visualization of these components is not yet implemented'), 135 | 'Warning', MB_OK or MB_ICONWARNING); 136 | end; 137 | 138 | procedure TIdrDfmFormTree.FormDestroy(Sender: TObject); 139 | begin 140 | Screen.Cursor:=prevCursor; 141 | end; 142 | 143 | Function TIdrDfmFormTree.MakeNodeCaption (curComp:TComponent):AnsiString; 144 | Var 145 | clasName:AnsiString; 146 | Begin 147 | clasName := curComp.ClassName; 148 | if curComp Is IdrDfmDefaultControl then 149 | clasName := '!' + IdrDfmDefaultControl(curComp).OrigClassName; 150 | Result:=curComp.Name + ':' + clasName; 151 | end; 152 | 153 | Function TIdrDfmFormTree.MakeNodeEventCaption (item:Pointer):AnsiString; 154 | Var 155 | recN:InfoRec; 156 | Begin 157 | if PEventListItem(item).Adr<>0 then 158 | begin 159 | recN := GetInfoRec(PEventListItem(item).Adr); 160 | if Assigned(recN) and recN.HasName then 161 | begin 162 | Result:=PEventListItem(item).EventName + '=' + recN.Name; 163 | Exit; 164 | End; 165 | End; 166 | Result:=PEventListItem(item).EventName; 167 | end; 168 | 169 | Function TIdrDfmFormTree.FindTreeNodeByTag (tag:Pointer):TTreeNode; 170 | Begin 171 | // TTreeNodeMap::const_iterator it = NodesMap.find(tag); 172 | // if (it != NodesMap.end()) return it->second; 173 | Result:=Nil; 174 | end; 175 | 176 | Function TIdrDfmFormTree.FindTreeNodeByText (nodeFrom:TTreeNode; Const txt:AnsiString; caseSensitive:Boolean):TTreeNode; 177 | Var 178 | nodes:TTreeNodes; 179 | i:Integer; 180 | ttt:AnsiString; 181 | startScan:Boolean; 182 | Begin 183 | Result := Nil; 184 | If Assigned(nodeFrom) Then startScan:=False 185 | Else startScan:=True; 186 | nodes := tvForm.Items; 187 | for i:=0 to nodes.Count-1 do 188 | begin 189 | if not startScan then 190 | begin 191 | if nodeFrom = nodes.Item[i] then startScan := true; 192 | continue; 193 | End; 194 | ttt := nodes.Item[i].Text; 195 | if ((caseSensitive and AnsiContainsStr(nodes.Item[i].Text, txt)) 196 | or (not caseSensitive and AnsiContainsText(nodes.Item[i].Text, txt)) 197 | ) then 198 | begin 199 | Result := nodes.Item[i]; 200 | break; 201 | end; 202 | End; 203 | end; 204 | 205 | Procedure TIdrDfmFormTree.AddTreeNodeWithTag (node:TTreeNode; tag:Pointer); 206 | Begin 207 | //NodesMap[tag] = node; 208 | end; 209 | 210 | Function TIdrDfmFormTree.IsEventNode (selNode:TTreeNode):Boolean; 211 | Begin 212 | Result:= Assigned(selNode) and (selNode.Text<>'') and (Pos('=',selNode.Text)<>0); 213 | end; 214 | 215 | procedure TIdrDfmFormTree.FormKeyDown(Sender : TObject; var Key:Word; Shift:TShiftState); 216 | begin 217 | if Key=VK_ESCAPE then 218 | begin 219 | Key := 0; 220 | Close; 221 | TForm(Owner).SetFocus; 222 | end 223 | else if Key=VK_F3 then dlgFindFind(Sender) 224 | else if (ssCtrl in Shift) and (Key=Ord('F')) then dlgFind.Execute; 225 | end; 226 | 227 | procedure TIdrDfmFormTree.tvFormKeyPress(Sender : TObject; Var Key:Char); 228 | begin 229 | if Key=#13 Then 230 | Begin 231 | Key:=#0; 232 | tvFormDblClick(Sender); 233 | end; 234 | end; 235 | 236 | Procedure TIdrDfmFormTree.BorderTheControl (aControl:TControl); 237 | Var 238 | can:TControlCanvas; 239 | parCtrl:TWinControl; 240 | aDC:HDC; 241 | aRect:TRect; 242 | aHandle:HWND; 243 | frm:TForm; 244 | bMenu:Boolean; 245 | Begin 246 | can:=TControlCanvas.create; 247 | parCtrl := aControl.Parent; 248 | if Not Assigned(parCtrl) Then parCtrl := TWinControl(aControl); 249 | can.Control := parCtrl; 250 | aHandle := parCtrl.Handle; 251 | aDC := GetWindowDC(aHandle); 252 | with Can do 253 | begin 254 | Handle := aDC; 255 | Brush.Style := bsSolid; 256 | Pen.Width := 1; 257 | Pen.Color := clRed; 258 | end; 259 | aRect := aControl.ClientRect; 260 | frm := parCtrl as TForm; 261 | bMenu := Assigned(frm) and Assigned(frm.Menu); 262 | AdjustWindowRectEx(aRect, 263 | GetWindowLong(aHandle, GWL_STYLE), 264 | bMenu, 265 | GetWindowLong(aHandle, GWL_EXSTYLE)); 266 | MoveWindowOrg(aDC, -aRect.Left, -aRect.Top); 267 | if parCtrl = aControl then aRect := aControl.ClientRect 268 | else 269 | begin 270 | aRect := aControl.BoundsRect; 271 | InflateRect(aRect, 2, 2); 272 | End; 273 | //C->Rectangle(aRect); 274 | can.DrawFocusRect(aRect); 275 | ReleaseDC(aHandle, aDC); 276 | end; 277 | 278 | procedure TIdrDfmFormTree.tvFormDblClick(Sender : TObject); 279 | var 280 | selNode:TTreeNode; 281 | Adr,i:Integer; 282 | recN:InfoRec; 283 | selControl:TControl; 284 | parControl:TWinControl; 285 | ownerForm:TForm; 286 | begin 287 | selNode := tvForm.Selected; 288 | if not Assigned(selNode) Then Exit; 289 | if IsEventNode(selNode) then 290 | begin 291 | Adr := Integer(selNode.Data); 292 | if (Adr<>0) and IsValidCodeAdr(Adr) then 293 | begin 294 | recN := GetInfoRec(Adr); 295 | if Assigned(recN) then 296 | begin 297 | if recN.kind = ikVMT then FMain.ShowClassViewer(Adr) 298 | else FMain.ShowCode(Adr, 0, -1, -1); 299 | end; 300 | End; 301 | Exit; 302 | End; 303 | selControl := TControl(selNode.Data); 304 | if Not Assigned(selControl) Then Exit; 305 | parControl := selControl.Parent; 306 | if Not Assigned(parControl) Then Exit; 307 | ownerForm := TForm(Owner); 308 | ownerForm.BringToFront; 309 | selControl.BringToFront; 310 | for i := 0 to 1 do 311 | begin 312 | BorderTheControl(selControl); 313 | selControl.Hide; 314 | selControl.Update; 315 | Sleep(150); 316 | BorderTheControl(selControl); 317 | selControl.Show; 318 | selControl.Update; 319 | Sleep(150); 320 | End; 321 | BringToFront; 322 | end; 323 | 324 | procedure TIdrDfmFormTree.dlgFindFind(Sender : TObject); 325 | var 326 | caseSensitive:Boolean; 327 | tn:TTreeNode; 328 | begin 329 | caseSensitive := frMatchCase in dlgFind.Options; 330 | tn := FindTreeNodeByText(tvForm.Selected, dlgFind.FindText, caseSensitive); 331 | if Not Assigned(tn) Then tn := FindTreeNodeByText(Nil, Trim(dlgFind.FindText), caseSensitive); 332 | if Assigned(tn) Then 333 | begin 334 | tvForm.Selected := tn; 335 | tn.Expand(false); 336 | tvForm.SetFocus; 337 | end; 338 | end; 339 | 340 | procedure TIdrDfmFormTree.Expand1Click(Sender : TObject); 341 | begin 342 | if Assigned(tvForm.Selected) Then tvForm.Selected.Expand(true); 343 | end; 344 | 345 | procedure TIdrDfmFormTree.Collapse1Click(Sender : TObject); 346 | begin 347 | if Assigned(tvForm.Selected) then tvForm.Selected.Collapse(false); 348 | end; 349 | 350 | procedure TIdrDfmFormTree.Find1Click(Sender : TObject); 351 | begin 352 | dlgFind.Execute; 353 | end; 354 | 355 | procedure TIdrDfmFormTree.FormClose(Sender : TObject; var Action:TCloseAction); 356 | begin 357 | dlgFind.CloseDialog; 358 | end; 359 | 360 | end. 361 | -------------------------------------------------------------------------------- /idp2txt/Main.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 474 3 | Top = 266 4 | Width = 612 5 | Height = 240 6 | Caption = 'Form1' 7 | Color = clBtnFace 8 | Constraints.MinHeight = 240 9 | Constraints.MinWidth = 600 10 | Font.Charset = DEFAULT_CHARSET 11 | Font.Color = clWindowText 12 | Font.Height = -11 13 | Font.Name = 'Tahoma' 14 | Font.Style = [] 15 | OldCreateOrder = False 16 | Position = poScreenCenter 17 | PixelsPerInch = 96 18 | TextHeight = 13 19 | object panel2: TPanel 20 | Left = 0 21 | Top = 0 22 | Width = 604 23 | Height = 65 24 | Align = alTop 25 | TabOrder = 0 26 | object btnLoad: TButton 27 | Left = 16 28 | Top = 7 29 | Width = 89 30 | Height = 22 31 | Caption = 'Choose IDP file' 32 | TabOrder = 0 33 | OnClick = btnLoadClick 34 | end 35 | object btnUpdate: TButton 36 | Left = 232 37 | Top = 34 38 | Width = 89 39 | Height = 25 40 | Caption = 'Save IDP-3' 41 | TabOrder = 3 42 | OnClick = btnUpdateClick 43 | end 44 | object btnText: TButton 45 | Left = 124 46 | Top = 34 47 | Width = 75 48 | Height = 25 49 | Caption = 'Save TXT' 50 | TabOrder = 2 51 | OnClick = btnTextClick 52 | end 53 | object txt1: TEdit 54 | Left = 124 55 | Top = 8 56 | Width = 313 57 | Height = 21 58 | AutoSize = False 59 | Color = clBtnFace 60 | ReadOnly = True 61 | TabOrder = 1 62 | end 63 | end 64 | object panel3: TPanel 65 | Left = 0 66 | Top = 65 67 | Width = 604 68 | Height = 28 69 | Align = alTop 70 | TabOrder = 1 71 | object txtInfos: TLabel 72 | Left = 60 73 | Top = 6 74 | Width = 58 75 | Height = 13 76 | Alignment = taRightJustify 77 | Caption = 'Info objects' 78 | end 79 | object progInfos: TProgressBar 80 | Left = 124 81 | Top = 1 82 | Width = 479 83 | Height = 26 84 | Align = alRight 85 | TabOrder = 0 86 | end 87 | end 88 | object panel4: TPanel 89 | Left = 0 90 | Top = 93 91 | Width = 604 92 | Height = 28 93 | Align = alTop 94 | TabOrder = 2 95 | object txtBSS: TLabel 96 | Left = 62 97 | Top = 6 98 | Width = 56 99 | Height = 13 100 | Alignment = taRightJustify 101 | Caption = 'BSS objects' 102 | end 103 | object progBSS: TProgressBar 104 | Left = 124 105 | Top = 1 106 | Width = 479 107 | Height = 26 108 | Align = alRight 109 | TabOrder = 0 110 | end 111 | end 112 | object panel5: TPanel 113 | Left = 0 114 | Top = 121 115 | Width = 604 116 | Height = 28 117 | Align = alTop 118 | TabOrder = 3 119 | object txtUnit: TLabel 120 | Left = 89 121 | Top = 6 122 | Width = 29 123 | Height = 13 124 | Alignment = taRightJustify 125 | Caption = 'Types' 126 | end 127 | object progUnit: TProgressBar 128 | Left = 124 129 | Top = 1 130 | Width = 479 131 | Height = 26 132 | Align = alRight 133 | TabOrder = 0 134 | end 135 | end 136 | object panel6: TPanel 137 | Left = 0 138 | Top = 177 139 | Width = 604 140 | Height = 28 141 | Align = alTop 142 | TabOrder = 5 143 | object txtType: TLabel 144 | Left = 89 145 | Top = 6 146 | Width = 29 147 | Height = 13 148 | Alignment = taRightJustify 149 | Caption = 'Forms' 150 | end 151 | object progType: TProgressBar 152 | Left = 124 153 | Top = 1 154 | Width = 479 155 | Height = 26 156 | Align = alRight 157 | TabOrder = 0 158 | end 159 | end 160 | object panel7: TPanel 161 | Left = 0 162 | Top = 149 163 | Width = 604 164 | Height = 28 165 | Align = alTop 166 | TabOrder = 4 167 | object txtForm: TLabel 168 | Left = 94 169 | Top = 6 170 | Width = 24 171 | Height = 13 172 | Alignment = taRightJustify 173 | Caption = 'Units' 174 | end 175 | object progForm: TProgressBar 176 | Left = 124 177 | Top = 1 178 | Width = 479 179 | Height = 26 180 | Align = alRight 181 | TabOrder = 0 182 | end 183 | end 184 | object dlgOpen1: TOpenDialog 185 | DefaultExt = '.IDP' 186 | Filter = 'IDR projects|*.idp' 187 | Options = [ofNoChangeDir, ofPathMustExist, ofFileMustExist, ofShareAware, ofEnableIncludeNotify, ofEnableSizing] 188 | Left = 512 189 | Top = 12 190 | end 191 | object dlgSave1: TSaveDialog 192 | DefaultExt = '.TXT' 193 | Filter = 'Text files|*.TXT' 194 | Options = [ofOverwritePrompt, ofHideReadOnly, ofNoChangeDir, ofPathMustExist, ofEnableIncludeNotify, ofEnableSizing] 195 | Left = 556 196 | Top = 12 197 | end 198 | end 199 | -------------------------------------------------------------------------------- /idp2txt/Main.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmcdos/IDR/805f6011d44d1b4ab404768dea9b69c5b6b2b94b/idp2txt/Main.pas -------------------------------------------------------------------------------- /idp2txt/idp2txt.cfg: -------------------------------------------------------------------------------- 1 | -$A8 2 | -$B- 3 | -$C+ 4 | -$D+ 5 | -$E- 6 | -$F- 7 | -$G+ 8 | -$H+ 9 | -$I+ 10 | -$J+ 11 | -$K- 12 | -$L+ 13 | -$M- 14 | -$N+ 15 | -$O- 16 | -$P+ 17 | -$Q- 18 | -$R- 19 | -$S- 20 | -$T- 21 | -$U- 22 | -$V+ 23 | -$W+ 24 | -$X+ 25 | -$YD 26 | -$Z1 27 | -GD 28 | -cg 29 | -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 30 | -H+ 31 | -W+ 32 | -M 33 | -$M16384,1048576 34 | -K$00400000 35 | -LE"c:\program files (x86)\borland\delphi7\..\Bpl" 36 | -LN"c:\program files (x86)\borland\delphi7\..\Bpl" 37 | -U".." 38 | -O".." 39 | -I".." 40 | -R".." 41 | -w-UNSAFE_TYPE 42 | -w-UNSAFE_CODE 43 | -w-UNSAFE_CAST 44 | -------------------------------------------------------------------------------- /idp2txt/idp2txt.dof: -------------------------------------------------------------------------------- 1 | [FileVersion] 2 | Version=7.0 3 | [Compiler] 4 | A=8 5 | B=0 6 | C=1 7 | D=1 8 | E=0 9 | F=0 10 | G=1 11 | H=1 12 | I=1 13 | J=1 14 | K=0 15 | L=1 16 | M=0 17 | N=1 18 | O=0 19 | P=1 20 | Q=0 21 | R=0 22 | S=0 23 | T=0 24 | U=0 25 | V=1 26 | W=1 27 | X=1 28 | Y=1 29 | Z=1 30 | ShowHints=1 31 | ShowWarnings=1 32 | UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 33 | NamespacePrefix= 34 | SymbolDeprecated=1 35 | SymbolLibrary=1 36 | SymbolPlatform=1 37 | UnitLibrary=1 38 | UnitPlatform=1 39 | UnitDeprecated=1 40 | HResultCompat=1 41 | HidingMember=1 42 | HiddenVirtual=1 43 | Garbage=1 44 | BoundsError=1 45 | ZeroNilCompat=1 46 | StringConstTruncated=1 47 | ForLoopVarVarPar=1 48 | TypedConstVarPar=1 49 | AsgToTypedConst=1 50 | CaseLabelRange=1 51 | ForVariable=1 52 | ConstructingAbstract=1 53 | ComparisonFalse=1 54 | ComparisonTrue=1 55 | ComparingSignedUnsigned=1 56 | CombiningSignedUnsigned=1 57 | UnsupportedConstruct=1 58 | FileOpen=1 59 | FileOpenUnitSrc=1 60 | BadGlobalSymbol=1 61 | DuplicateConstructorDestructor=1 62 | InvalidDirective=1 63 | PackageNoLink=1 64 | PackageThreadVar=1 65 | ImplicitImport=1 66 | HPPEMITIgnored=1 67 | NoRetVal=1 68 | UseBeforeDef=1 69 | ForLoopVarUndef=1 70 | UnitNameMismatch=1 71 | NoCFGFileFound=1 72 | MessageDirective=1 73 | ImplicitVariants=1 74 | UnicodeToLocale=1 75 | LocaleToUnicode=1 76 | ImagebaseMultiple=1 77 | SuspiciousTypecast=1 78 | PrivatePropAccessor=1 79 | UnsafeType=0 80 | UnsafeCode=0 81 | UnsafeCast=0 82 | [Linker] 83 | MapFile=3 84 | OutputObjs=0 85 | ConsoleApp=1 86 | DebugInfo=0 87 | RemoteSymbols=0 88 | MinStackSize=16384 89 | MaxStackSize=1048576 90 | ImageBase=4194304 91 | ExeDescription= 92 | [Directories] 93 | OutputDir= 94 | UnitOutputDir= 95 | PackageDLLOutputDir= 96 | PackageDCPOutputDir= 97 | SearchPath=.. 98 | Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;vcldb;dsnapcon;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;localizer7;EmbeddedWebBrowser_D7;EzBasic;EzSpecials;TMSUnicodeD7;EzPlanIT;KGrid_R7;tb2k_d7;RVHTMLD7;dclusr;rxctl;kprocs7;Misc;TBX_D7;llPDFLibD7;frxe7;frx7;frxDB7;frxTee7;fs7;fsTee7;NiceGridD7;TBXTaskBar_D7;TwoDesk_D7R;vc2;xhCntrls70;xhStd70;xhChart70;xhExport70;RaizeComponentsVcl;HotKeyMan;siplib7;kbmMemRunD7Pro;OverbyteIcsD7Run;NativeExcelD7;SpTBXTaskBar_D7;SpTBXLib_d7;RVword;tntExtendedEditors;VirtualTreesD7;VSTEditors;VirtualShellToolsD7;EasyListviewD7;GLvis;KZ;prgInternet6;XLS_ReadWrite;sgGrpVw7;zDesign7;EhLib70;GR32_DSGN_D7;GR32_D7;NxTBX;NxCollectionRun;NxCommonRun;clinetsuited7;EJ100R70;CodeSiteLoggingVcl;CodeSiteDBToolsVcl 99 | Conditionals= 100 | DebugSourceDirs= 101 | UsePackages=0 102 | [Parameters] 103 | RunParams= 104 | HostApplication= 105 | Launcher= 106 | UseLauncher=0 107 | DebugCWD= 108 | [Language] 109 | ActiveLang= 110 | ProjectLang= 111 | RootDir=C:\Program Files (x86)\Borland\Delphi7\Bin\ 112 | [Version Info] 113 | IncludeVerInfo=0 114 | AutoIncBuild=0 115 | MajorVer=1 116 | MinorVer=0 117 | Release=0 118 | Build=0 119 | Debug=0 120 | PreRelease=0 121 | Special=0 122 | Private=0 123 | DLL=0 124 | Locale=1026 125 | CodePage=1251 126 | [Version Info Keys] 127 | CompanyName= 128 | FileDescription= 129 | FileVersion=1.0.0.0 130 | InternalName= 131 | LegalCopyright= 132 | LegalTrademarks= 133 | OriginalFilename= 134 | ProductName= 135 | ProductVersion=1.0.0.0 136 | Comments= 137 | [Excluded Packages] 138 | c:\Program Files (x86)\Borland\Bpl\kctrls6.bpl=KStringGrid component 139 | [HistoryLists\hlUnitAliases] 140 | Count=1 141 | Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 142 | [HistoryLists\hlSearchPath] 143 | Count=1 144 | Item0=.. 145 | [Exception Log] 146 | EurekaLog Version=6105 147 | Activate=0 148 | Activate Handle=1 149 | Save Log File=0 150 | Foreground Tab=1 151 | Freeze Activate=0 152 | Freeze Timeout=60 153 | SMTP From=eurekalog@email.com 154 | SMTP Host= 155 | SMTP Port=25 156 | SMTP UserID= 157 | SMTP Password= 158 | Append to Log=0 159 | TerminateBtn Operation=0 160 | Errors Number=32 161 | Errors Terminate=3 162 | Email Address= 163 | Email Object= 164 | Email Send Options=0 165 | Output Path= 166 | Encrypt Password= 167 | AutoCloseDialogSecs=0 168 | WebSendMode=0 169 | SupportULR= 170 | HTMLLayout Count=15 171 | HTMLLine0="%3Chtml%3E" 172 | HTMLLine1=" %3Chead%3E" 173 | HTMLLine2=" %3C/head%3E" 174 | HTMLLine3=" %3Cbody TopMargin=10 LeftMargin=10%3E" 175 | HTMLLine4=" %3Ctable width="100%%" border="0"%3E" 176 | HTMLLine5=" %3Ctr%3E" 177 | HTMLLine6=" %3Ctd nowrap%3E" 178 | HTMLLine7=" %3Cfont face="Lucida Console, Courier" size="2"%3E" 179 | HTMLLine8=" %3C%%HTML_TAG%%%3E" 180 | HTMLLine9=" %3C/font%3E" 181 | HTMLLine10=" %3C/td%3E" 182 | HTMLLine11=" %3C/tr%3E" 183 | HTMLLine12=" %3C/table%3E" 184 | HTMLLine13=" %3C/body%3E" 185 | HTMLLine14="%3C/html%3E" 186 | AutoCrashOperation=0 187 | AutoCrashNumber=10 188 | AutoCrashMinutes=1 189 | WebURL= 190 | WebUserID= 191 | WebPassword= 192 | WebPort=0 193 | AttachedFiles= 194 | ProxyURL= 195 | ProxyUser= 196 | ProxyPassword= 197 | ProxyPort=8080 198 | TrakerUser= 199 | TrakerPassword= 200 | TrakerAssignTo= 201 | TrakerProject= 202 | TrakerCategory= 203 | TrakerTrialID= 204 | ZipPassword= 205 | PreBuildEvent= 206 | PostSuccessfulBuildEvent= 207 | PostFailureBuildEvent= 208 | ExceptionDialogType=3 209 | Count=0 210 | EMail Message Line Count=0 211 | loNoDuplicateErrors=0 212 | loAppendReproduceText=0 213 | loDeleteLogAtVersionChange=0 214 | loAddComputerNameInLogFileName=0 215 | loSaveModulesAndProcessesSections=1 216 | loSaveAssemblerAndCPUSections=1 217 | soAppStartDate=1 218 | soAppName=1 219 | soAppVersionNumber=1 220 | soAppParameters=1 221 | soAppCompilationDate=1 222 | soAppUpTime=1 223 | soExcDate=1 224 | soExcAddress=1 225 | soExcModuleName=1 226 | soExcModuleVersion=1 227 | soExcType=1 228 | soExcMessage=1 229 | soExcID=1 230 | soExcCount=1 231 | soExcStatus=1 232 | soExcNote=1 233 | soUserID=1 234 | soUserName=1 235 | soUserEmail=1 236 | soUserPrivileges=1 237 | soUserCompany=1 238 | soActCtlsFormClass=1 239 | soActCtlsFormText=1 240 | soActCtlsControlClass=1 241 | soActCtlsControlText=1 242 | soCmpName=1 243 | soCmpTotalMemory=1 244 | soCmpFreeMemory=1 245 | soCmpTotalDisk=1 246 | soCmpFreeDisk=1 247 | soCmpSysUpTime=1 248 | soCmpProcessor=1 249 | soCmpDisplayMode=1 250 | soCmpDisplayDPI=1 251 | soCmpVideoCard=1 252 | soCmpPrinter=1 253 | soOSType=1 254 | soOSBuildN=1 255 | soOSUpdate=1 256 | soOSLanguage=1 257 | soOSCharset=1 258 | soNetIP=1 259 | soNetSubmask=1 260 | soNetGateway=1 261 | soNetDNS1=1 262 | soNetDNS2=1 263 | soNetDHCP=1 264 | soCustomData=1 265 | sndShowSendDialog=1 266 | sndShowSuccessFailureMsg=0 267 | sndSendEntireLog=0 268 | sndSendXMLLogCopy=0 269 | sndSendScreenshot=1 270 | sndUseOnlyActiveWindow=0 271 | sndSendLastHTMLPage=1 272 | sndSendInSeparatedThread=0 273 | sndAddDateInFileName=0 274 | sndAddComputerNameInFileName=0 275 | edoSendErrorReportChecked=1 276 | edoAttachScreenshotChecked=1 277 | edoShowCopyToClipOption=0 278 | edoShowDetailsButton=0 279 | edoShowInDetailedMode=1 280 | edoShowInTopMostMode=0 281 | edoUseEurekaLogLookAndFeel=0 282 | edoShowSendErrorReportOption=0 283 | edoShowAttachScreenshotOption=0 284 | edoShowCustomButton=0 285 | csoShowDLLs=1 286 | csoShowBPLs=1 287 | csoShowBorlandThreads=1 288 | csoShowWindowsThreads=1 289 | csoDoNotStoreProcNames=0 290 | boPauseBorlandThreads=0 291 | boDoNotPauseMainThread=0 292 | boPauseWindowsThreads=0 293 | boUseMainModuleOptions=1 294 | boCopyLogInCaseOfError=1 295 | boSaveCompressedCopyInCaseOfError=0 296 | boHandleSafeCallExceptions=1 297 | boCallRTLExceptionEvent=0 298 | boCatchHandledExceptions=0 299 | loCatchLeaks=0 300 | loGroupsSonLeaks=1 301 | loHideBorlandLeaks=1 302 | loFreeAllLeaks=1 303 | loCatchLeaksExceptions=1 304 | cfoReduceFileSize=1 305 | cfoCheckFileCorruption=0 306 | cfoUseEL7=0 307 | Count mtInformationMsgCaption=1 308 | mtInformationMsgCaption0="Information." 309 | Count mtQuestionMsgCaption=1 310 | mtQuestionMsgCaption0="Question." 311 | Count mtErrorMsgCaption=1 312 | mtErrorMsgCaption0="Error." 313 | Count mtDialog_Caption=1 314 | mtDialog_Caption0="Error occurred" 315 | Count mtDialog_ErrorMsgCaption=2 316 | mtDialog_ErrorMsgCaption0="An error has occurred during program execution." 317 | mtDialog_ErrorMsgCaption1="Please read the following information for further details." 318 | Count mtDialog_GeneralCaption=1 319 | mtDialog_GeneralCaption0="General" 320 | Count mtDialog_GeneralHeader=1 321 | mtDialog_GeneralHeader0="General Information" 322 | Count mtDialog_CallStackCaption=1 323 | mtDialog_CallStackCaption0="Call Stack" 324 | Count mtDialog_CallStackHeader=1 325 | mtDialog_CallStackHeader0="Call Stack Information" 326 | Count mtDialog_ModulesCaption=1 327 | mtDialog_ModulesCaption0="Modules" 328 | Count mtDialog_ModulesHeader=1 329 | mtDialog_ModulesHeader0="Modules Information" 330 | Count mtDialog_ProcessesCaption=1 331 | mtDialog_ProcessesCaption0="Processes" 332 | Count mtDialog_ProcessesHeader=1 333 | mtDialog_ProcessesHeader0="Processes Information" 334 | Count mtDialog_AsmCaption=1 335 | mtDialog_AsmCaption0="Assembler" 336 | Count mtDialog_AsmHeader=1 337 | mtDialog_AsmHeader0="Assembler Information" 338 | Count mtDialog_CPUCaption=1 339 | mtDialog_CPUCaption0="CPU" 340 | Count mtDialog_CPUHeader=1 341 | mtDialog_CPUHeader0="CPU Information" 342 | Count mtDialog_OKButtonCaption=1 343 | mtDialog_OKButtonCaption0="%26OK" 344 | Count mtDialog_TerminateButtonCaption=1 345 | mtDialog_TerminateButtonCaption0="%26Terminate" 346 | Count mtDialog_RestartButtonCaption=1 347 | mtDialog_RestartButtonCaption0="%26Restart" 348 | Count mtDialog_DetailsButtonCaption=1 349 | mtDialog_DetailsButtonCaption0="%26Details" 350 | Count mtDialog_CustomButtonCaption=1 351 | mtDialog_CustomButtonCaption0="%26Help" 352 | Count mtDialog_SendMessage=1 353 | mtDialog_SendMessage0="%26Send this error via Internet" 354 | Count mtDialog_ScreenshotMessage=1 355 | mtDialog_ScreenshotMessage0="%26Attach a Screenshot image" 356 | Count mtDialog_CopyMessage=1 357 | mtDialog_CopyMessage0="%26Copy to Clipboard" 358 | Count mtDialog_SupportMessage=1 359 | mtDialog_SupportMessage0="Go to the Support Page" 360 | Count mtMSDialog_ErrorMsgCaption=1 361 | mtMSDialog_ErrorMsgCaption0="The application has encountered a problem. We are sorry for the inconvenience." 362 | Count mtMSDialog_RestartCaption=1 363 | mtMSDialog_RestartCaption0="Restart application." 364 | Count mtMSDialog_TerminateCaption=1 365 | mtMSDialog_TerminateCaption0="Terminate application." 366 | Count mtMSDialog_PleaseCaption=1 367 | mtMSDialog_PleaseCaption0="Please tell us about this problem." 368 | Count mtMSDialog_DescriptionCaption=1 369 | mtMSDialog_DescriptionCaption0="We have created an error report that you can send to us. We will treat this report as confidential and anonymous." 370 | Count mtMSDialog_SeeDetailsCaption=1 371 | mtMSDialog_SeeDetailsCaption0="To see what data the error report contains," 372 | Count mtMSDialog_SeeClickCaption=1 373 | mtMSDialog_SeeClickCaption0="click here." 374 | Count mtMSDialog_HowToReproduceCaption=1 375 | mtMSDialog_HowToReproduceCaption0="What were you doing when the problem happened (optional)?" 376 | Count mtMSDialog_EmailCaption=1 377 | mtMSDialog_EmailCaption0="Email address (optional):" 378 | Count mtMSDialog_SendButtonCaption=1 379 | mtMSDialog_SendButtonCaption0="%26Send Error Report" 380 | Count mtMSDialog_NoSendButtonCaption=1 381 | mtMSDialog_NoSendButtonCaption0="%26Don't Send" 382 | Count mtLog_AppHeader=1 383 | mtLog_AppHeader0="Application" 384 | Count mtLog_AppStartDate=1 385 | mtLog_AppStartDate0="Start Date" 386 | Count mtLog_AppName=1 387 | mtLog_AppName0="Name/Description" 388 | Count mtLog_AppVersionNumber=1 389 | mtLog_AppVersionNumber0="Version Number" 390 | Count mtLog_AppParameters=1 391 | mtLog_AppParameters0="Parameters" 392 | Count mtLog_AppCompilationDate=1 393 | mtLog_AppCompilationDate0="Compilation Date" 394 | Count mtLog_AppUpTime=1 395 | mtLog_AppUpTime0="Up Time" 396 | Count mtLog_ExcHeader=1 397 | mtLog_ExcHeader0="Exception" 398 | Count mtLog_ExcDate=1 399 | mtLog_ExcDate0="Date" 400 | Count mtLog_ExcAddress=1 401 | mtLog_ExcAddress0="Address" 402 | Count mtLog_ExcModuleName=1 403 | mtLog_ExcModuleName0="Module Name" 404 | Count mtLog_ExcModuleVersion=1 405 | mtLog_ExcModuleVersion0="Module Version" 406 | Count mtLog_ExcType=1 407 | mtLog_ExcType0="Type" 408 | Count mtLog_ExcMessage=1 409 | mtLog_ExcMessage0="Message" 410 | Count mtLog_ExcID=1 411 | mtLog_ExcID0="ID" 412 | Count mtLog_ExcCount=1 413 | mtLog_ExcCount0="Count" 414 | Count mtLog_ExcStatus=1 415 | mtLog_ExcStatus0="Status" 416 | Count mtLog_ExcNote=1 417 | mtLog_ExcNote0="Note" 418 | Count mtLog_UserHeader=1 419 | mtLog_UserHeader0="User" 420 | Count mtLog_UserID=1 421 | mtLog_UserID0="ID" 422 | Count mtLog_UserName=1 423 | mtLog_UserName0="Name" 424 | Count mtLog_UserEmail=1 425 | mtLog_UserEmail0="Email" 426 | Count mtLog_UserCompany=1 427 | mtLog_UserCompany0="Company" 428 | Count mtLog_UserPrivileges=1 429 | mtLog_UserPrivileges0="Privileges" 430 | Count mtLog_ActCtrlsHeader=1 431 | mtLog_ActCtrlsHeader0="Active Controls" 432 | Count mtLog_ActCtrlsFormClass=1 433 | mtLog_ActCtrlsFormClass0="Form Class" 434 | Count mtLog_ActCtrlsFormText=1 435 | mtLog_ActCtrlsFormText0="Form Text" 436 | Count mtLog_ActCtrlsControlClass=1 437 | mtLog_ActCtrlsControlClass0="Control Class" 438 | Count mtLog_ActCtrlsControlText=1 439 | mtLog_ActCtrlsControlText0="Control Text" 440 | Count mtLog_CmpHeader=1 441 | mtLog_CmpHeader0="Computer" 442 | Count mtLog_CmpName=1 443 | mtLog_CmpName0="Name" 444 | Count mtLog_CmpTotalMemory=1 445 | mtLog_CmpTotalMemory0="Total Memory" 446 | Count mtLog_CmpFreeMemory=1 447 | mtLog_CmpFreeMemory0="Free Memory" 448 | Count mtLog_CmpTotalDisk=1 449 | mtLog_CmpTotalDisk0="Total Disk" 450 | Count mtLog_CmpFreeDisk=1 451 | mtLog_CmpFreeDisk0="Free Disk" 452 | Count mtLog_CmpSystemUpTime=1 453 | mtLog_CmpSystemUpTime0="System Up Time" 454 | Count mtLog_CmpProcessor=1 455 | mtLog_CmpProcessor0="Processor" 456 | Count mtLog_CmpDisplayMode=1 457 | mtLog_CmpDisplayMode0="Display Mode" 458 | Count mtLog_CmpDisplayDPI=1 459 | mtLog_CmpDisplayDPI0="Display DPI" 460 | Count mtLog_CmpVideoCard=1 461 | mtLog_CmpVideoCard0="Video Card" 462 | Count mtLog_CmpPrinter=1 463 | mtLog_CmpPrinter0="Printer" 464 | Count mtLog_OSHeader=1 465 | mtLog_OSHeader0="Operating System" 466 | Count mtLog_OSType=1 467 | mtLog_OSType0="Type" 468 | Count mtLog_OSBuildN=1 469 | mtLog_OSBuildN0="Build #" 470 | Count mtLog_OSUpdate=1 471 | mtLog_OSUpdate0="Update" 472 | Count mtLog_OSLanguage=1 473 | mtLog_OSLanguage0="Language" 474 | Count mtLog_OSCharset=1 475 | mtLog_OSCharset0="Charset" 476 | Count mtLog_NetHeader=1 477 | mtLog_NetHeader0="Network" 478 | Count mtLog_NetIP=1 479 | mtLog_NetIP0="IP Address" 480 | Count mtLog_NetSubmask=1 481 | mtLog_NetSubmask0="Submask" 482 | Count mtLog_NetGateway=1 483 | mtLog_NetGateway0="Gateway" 484 | Count mtLog_NetDNS1=1 485 | mtLog_NetDNS10="DNS 1" 486 | Count mtLog_NetDNS2=1 487 | mtLog_NetDNS20="DNS 2" 488 | Count mtLog_NetDHCP=1 489 | mtLog_NetDHCP0="DHCP" 490 | Count mtLog_CustInfoHeader=1 491 | mtLog_CustInfoHeader0="Custom Information" 492 | Count mtCallStack_Address=1 493 | mtCallStack_Address0="Address" 494 | Count mtCallStack_Name=1 495 | mtCallStack_Name0="Module" 496 | Count mtCallStack_Unit=1 497 | mtCallStack_Unit0="Unit" 498 | Count mtCallStack_Class=1 499 | mtCallStack_Class0="Class" 500 | Count mtCallStack_Procedure=1 501 | mtCallStack_Procedure0="Procedure/Method" 502 | Count mtCallStack_Line=1 503 | mtCallStack_Line0="Line" 504 | Count mtCallStack_MainThread=1 505 | mtCallStack_MainThread0="Main" 506 | Count mtCallStack_ExceptionThread=1 507 | mtCallStack_ExceptionThread0="Exception Thread" 508 | Count mtCallStack_RunningThread=1 509 | mtCallStack_RunningThread0="Running Thread" 510 | Count mtCallStack_CallingThread=1 511 | mtCallStack_CallingThread0="Calling Thread" 512 | Count mtCallStack_ThreadID=1 513 | mtCallStack_ThreadID0="ID" 514 | Count mtCallStack_ThreadPriority=1 515 | mtCallStack_ThreadPriority0="Priority" 516 | Count mtCallStack_ThreadClass=1 517 | mtCallStack_ThreadClass0="Class" 518 | Count mtCallStack_LeakCaption=1 519 | mtCallStack_LeakCaption0="Memory Leak" 520 | Count mtCallStack_LeakData=1 521 | mtCallStack_LeakData0="Data" 522 | Count mtCallStack_LeakType=1 523 | mtCallStack_LeakType0="Type" 524 | Count mtCallStack_LeakSize=1 525 | mtCallStack_LeakSize0="Total size" 526 | Count mtCallStack_LeakCount=1 527 | mtCallStack_LeakCount0="Count" 528 | Count mtSendDialog_Caption=1 529 | mtSendDialog_Caption0="Send." 530 | Count mtSendDialog_Message=1 531 | mtSendDialog_Message0="Message" 532 | Count mtSendDialog_Resolving=1 533 | mtSendDialog_Resolving0="Resolving DNS..." 534 | Count mtSendDialog_Login=1 535 | mtSendDialog_Login0="Login..." 536 | Count mtSendDialog_Connecting=1 537 | mtSendDialog_Connecting0="Connecting with server..." 538 | Count mtSendDialog_Connected=1 539 | mtSendDialog_Connected0="Connected with server." 540 | Count mtSendDialog_Sending=1 541 | mtSendDialog_Sending0="Sending message..." 542 | Count mtSendDialog_Sent=1 543 | mtSendDialog_Sent0="Message sent." 544 | Count mtSendDialog_SelectProject=1 545 | mtSendDialog_SelectProject0="Select project..." 546 | Count mtSendDialog_Searching=1 547 | mtSendDialog_Searching0="Searching..." 548 | Count mtSendDialog_Modifying=1 549 | mtSendDialog_Modifying0="Modifying..." 550 | Count mtSendDialog_Disconnecting=1 551 | mtSendDialog_Disconnecting0="Disconnecting..." 552 | Count mtSendDialog_Disconnected=1 553 | mtSendDialog_Disconnected0="Disconnected." 554 | Count mtReproduceDialog_Caption=1 555 | mtReproduceDialog_Caption0="Request" 556 | Count mtReproduceDialog_Request=1 557 | mtReproduceDialog_Request0="Please describe the steps to reproduce the error:" 558 | Count mtReproduceDialog_OKButtonCaption=1 559 | mtReproduceDialog_OKButtonCaption0="%26OK" 560 | Count mtModules_Handle=1 561 | mtModules_Handle0="Handle" 562 | Count mtModules_Name=1 563 | mtModules_Name0="Name" 564 | Count mtModules_Description=1 565 | mtModules_Description0="Description" 566 | Count mtModules_Version=1 567 | mtModules_Version0="Version" 568 | Count mtModules_Size=1 569 | mtModules_Size0="Size" 570 | Count mtModules_LastModified=1 571 | mtModules_LastModified0="Modified" 572 | Count mtModules_Path=1 573 | mtModules_Path0="Path" 574 | Count mtProcesses_ID=1 575 | mtProcesses_ID0="ID" 576 | Count mtProcesses_Name=1 577 | mtProcesses_Name0="Name" 578 | Count mtProcesses_Description=1 579 | mtProcesses_Description0="Description" 580 | Count mtProcesses_Version=1 581 | mtProcesses_Version0="Version" 582 | Count mtProcesses_Memory=1 583 | mtProcesses_Memory0="Memory" 584 | Count mtProcesses_Priority=1 585 | mtProcesses_Priority0="Priority" 586 | Count mtProcesses_Threads=1 587 | mtProcesses_Threads0="Threads" 588 | Count mtProcesses_Path=1 589 | mtProcesses_Path0="Path" 590 | Count mtCPU_Registers=1 591 | mtCPU_Registers0="Registers" 592 | Count mtCPU_Stack=1 593 | mtCPU_Stack0="Stack" 594 | Count mtCPU_MemoryDump=1 595 | mtCPU_MemoryDump0="Memory Dump" 596 | Count mtSend_SuccessMsg=1 597 | mtSend_SuccessMsg0="The message was sent successfully." 598 | Count mtSend_FailureMsg=1 599 | mtSend_FailureMsg0="Sorry, sending the message didn't work." 600 | Count mtSend_BugClosedMsg=2 601 | mtSend_BugClosedMsg0="These BUG is just closed." 602 | mtSend_BugClosedMsg1="Contact the program support to obtain an update." 603 | Count mtSend_UnknownErrorMsg=1 604 | mtSend_UnknownErrorMsg0="Unknown error." 605 | Count mtSend_InvalidLoginMsg=1 606 | mtSend_InvalidLoginMsg0="Invalid login request." 607 | Count mtSend_InvalidSearchMsg=1 608 | mtSend_InvalidSearchMsg0="Invalid search request." 609 | Count mtSend_InvalidSelectionMsg=1 610 | mtSend_InvalidSelectionMsg0="Invalid selection request." 611 | Count mtSend_InvalidInsertMsg=1 612 | mtSend_InvalidInsertMsg0="Invalid insert request." 613 | Count mtSend_InvalidModifyMsg=1 614 | mtSend_InvalidModifyMsg0="Invalid modify request." 615 | Count mtFileCrackedMsg=2 616 | mtFileCrackedMsg0="This file is cracked." 617 | mtFileCrackedMsg1="The application will be closed." 618 | Count mtException_LeakMultiFree=1 619 | mtException_LeakMultiFree0="Multi Free memory leak." 620 | Count mtException_LeakMemoryOverrun=1 621 | mtException_LeakMemoryOverrun0="Memory Overrun leak." 622 | Count mtException_AntiFreeze=1 623 | mtException_AntiFreeze0="The application seems to be frozen." 624 | Count mtInvalidEmailMsg=1 625 | mtInvalidEmailMsg0="Invalid email." 626 | TextsCollection= 627 | 628 | 629 | -------------------------------------------------------------------------------- /idp2txt/idp2txt.dpr: -------------------------------------------------------------------------------- 1 | program idp2txt; 2 | 3 | uses 4 | Forms, 5 | Main in 'Main.pas' {Form1}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.CreateForm(TForm1, Form1); 12 | Application.Run; 13 | end. 14 | -------------------------------------------------------------------------------- /idp2txt/idp2txt.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmcdos/IDR/805f6011d44d1b4ab404768dea9b69c5b6b2b94b/idp2txt/idp2txt.res -------------------------------------------------------------------------------- /idr.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | true 36 | 37 | 38 | -------------------------------------------------------------------------------- /manifest.rc: -------------------------------------------------------------------------------- 1 | #define MANIFEST 24 2 | #define IDR_MANIFEST 1 3 | IDR_MANIFEST MANIFEST "idr.manifest" -------------------------------------------------------------------------------- /manifest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmcdos/IDR/805f6011d44d1b4ab404768dea9b69c5b6b2b94b/manifest.res --------------------------------------------------------------------------------