Überblick

Avihex a Hex-Editor for Files and Drives

This Program can be used to
- view
- edit
- compare
- search
- copy
- append
- and so on
of Data.

AviHex does not have to be installed, you can run it from hard Disk, CD-ROM, Floppy, and so on.

A special Feature of AviHex is the Journal File. Editing a File or Drive means recording projected Changes in the Journal File; the Main File (or Drive) keeps unchanged until you tell AviHex to Write the File.

Unusual Functions sind

- Scrolling automaticly (no Need for holding the PageUp / PageDn Key)
- Comparison is a bit like superposing plastic Film (Differences are highlighted in green Color)
- Comparison of different Data Areas in the same File / Drive
- Disassembly of Data at any Position (x86-Code including SSE-4)
- Identification of Video- and Audio Packets (Chunks) in Avi Files and automaticly scrolling of Video / Adio Packets ("playing")
- allocation of Memory by enlarging Files


Grundeinstellungen

General Settings

->Specials->Options lets you make some important Settings

File Access

Direct Access Lets you write directly to the Main File !
Write Protection as Standard proposes each File to be opened in Read-Only-Mode (can be changed by clicking each time)

Undo-Options

Keep Data for Restoring Main File allows Restoring the original Main File after having altered it
Undo for all Changes lets you cancel projected Changes and Write Operations
Many Operations e.g. Decrease or Enlargement of Files, appending to and of Files and so on can not be canceled!

Journal File

If you don't specify a fixed Path for the Journal File, it will be written into the same Path where the Main File is.
Never same Drive as Main File tries to ensure that Main File and Journal File are not located on the same Drive.
Specifying an alternative Path can be very useful.

Resolution

determines the Scrolling Steps of the Window

Double Click Aktion

determines what happens when double clicking into the Data Area, e.g.:
- show Values
- disassemble
- Edit Menu
- Specials Menu


Navigation

Navigation inside a File / Drive

Scrolling

- Cursor Keys (up / down / right / left)
- Alt + Cursor Keys (up / down / right / left)
- automatic Scrolling by ->Goto->Auto Scroll Up / Dn or Strg-Up / -Dn
- Start / End of Line: Pos1 / Ende
- Start / End of File: Strg-Pos1 / Strg-Ende
- Scroll Bar on the right Side
- Scroll Wheel on the Mouse

Goto Position

->Goto->Address oder Strg-G opens a Dialog Box for entering the absolute or relative Address (is calculated automaticly)

Goto Edition or Bookmarkt

->Goto->Next Change oder Strg-N
jumps to the next Position containing Changes or Bookmarks
->Goto->Previous Change oder Strg-P
jumps to the previous Position containing Changes or Bookmarks

Finding of Text or a Sequence of binary Numbers (hexadecimal)

->Search->Find Text or Strg-F or Find Hex or Strg-H
- F3 opens the last Search Dialog with the same Settings

Avi Files

->AVI->Goto first RIFF Chunk jumps to the first Chunk in File
->AVI->Goto next RIFF Chunk oder Strg-R jumps to the next following Chunk
->AVI->Goto next Sub Chunk oder Strg-S jumps to the next Sub Chunk
->AVI->Goto Film Start jumps to the first Chunk containing Film Data


Zahleneingabe

Entering Numbers

There is a comfortable way of entering Numbers in AviHex in different Formats

- ->Specials->Show Values (or if configured double click) the Dialog starts for the actual Cursor Position

- the Value is interpreted as 8-Bit-, 16-Bit-, 32-Bit- and as 64-Bit-Value

- it is displayed as well hexadecimal, decimal and binarily

- each Input is converted in all shown Formats

- hitting Return can be linked to (one or more) different Actions:
- accept Value as Change
- go to the next Word
- select Field
- finish Dialog


Suchen

Searching for Text and binary sequences

There are two Search Functions:

- Find Text
->Search->Find Text or Strg-F
- Find binary
->Search->Find Hex or Strg-H

Hints on the binary Search

- entered Search Text is understood as hexadecimale Byte Sequence.
- Each Byte consits of 2 Chars, e.g.: 1F or B5 oder 42
- 1 Char is accepted as well, if it can be recognized as one Byte: A2 F 2D,B,46
- a Separator is not necessary: 7B39F4AA6DE (= 7B 39 F4 AA 6D 0E)
- general Text can be entered as well: 3A"Textinput"F7CD (Case sensitive for Text!)


Vergleichen

Hints on Comparing Files and Positions

There are the following Possibilities:

- Comparison of two Files; they may have different Size
- Comparison of a Drive with a File
- Comparison of Data at differnt Positions on the same File or Drive
- you can specify an Offset for any Kind of Comparison

How it works:

- open the 'Foreground' File ->File->Open
- open the 'Background' File ->Compare->to other File
Only the Foreground Source can be a Drive !
- Data is superposed like plastic Film
- the Differences are marked green
- hitting F6 exchanges Foreground and Background
- ->Compare->Find Differences or Strg-U shows the next Position with differnt Data

Offset Adjustment (various Options):

A. ->Compare->Set Cursor Position as Start for Compare File (= Background File)
B. ->Compare->Set Offset
enter Offset manually or by clicking into the Data Area:
left Field: Position in Foreground File (enter or click in Data Area)
right Field: Position in Background File (enter or F6 + click ...)
C. Strg + Alt + Cursor Key changes Offset step by step (is displayed top left)


Speichern

Saving

In AviHex there are different Kinds of Saving:

- Recording in the Journal File (= projected Changes)

This is the first Step of Editing (if you did'n choose direct Access in the Options Menu).
- projected Changes are highlighted orange
- this way the Main File keeps unchanged
- projected Changes keep available as long as the Journal File exists
- hitting F5 shows at any time the real Content of the Main File
- according to the Settings (Options) you can compare and re-activate different Versions of an edited Page (hitting F2 and F4 - and then Return if desired)
- saving to the Main File requires an additional Save Command (->File->Save Page or ->File->Save File or ->Datei->Save selected Data)

- Saving into the Main File

Thus the Main File (or Drive) is being changed !
->File->Save File saves all projected Changes (as they are shown on the Screen)
->File->Save selected Data saves the projected Changes which are located inside the Selection.
->File->Save Page saves only those Changes which are shown in the actual Window
- according to the Settings (Options) you can compare and re-activate different Versions of an edited Page (hitting F2 and F4 - and then Return if desired)

- further Possibilities

->File / selected Data / Page ... save as writes into another File (which is created if necessary)
->File / selected Data / Page ... append to File appends the Data to another File


Undo

Undo und Redo

IMPORTANT: After making a big Amount of Changes the Undo-Possibilities are limited !

There is a Preview Function for the different Versions of the actual Page (512 Bytes): F2 and F4; thus you can choose the desired Version (by hitting Return).

All Undo Possibilities require the suitable Settings (->Specials->Options->File Access->Undo Options) !

- ->Edit->Undo and Redo respectively cancels the last Action or Undo Operation

- ->Edit->Undo and Redo per Page or Strg-F2 / Strg-F4 limits the Actions to the last changed Page.

- ->Edit->Undo and Redo all cancels or restores all made Changes as far as they have been recorded in the Journal File.


Disassemblieren

Remarks about the Journal File

Main File
File which is to be edited

Journal File
File in which the projected Changes are recorded

- while opening a File or a Drive (->File->open e.g. ->File->open Drive) the suiting Journal File is opened as well if it exists

- the Journal File (Ending .jnl) holds importent Information about the Main File, e.g.
- projected Changes
- and their Positions
- Undo-Information
- the latest Cursor-Position
- the Position of the latest Selection

- you may not delete the Journal File if
- there are still unwritten Changes
- you want to correct something
- you want to keep Information about the Position of Changes made

- the Journal File has become invalid if
- the Main File has been changed by another Program
- the Main File has been edited using another Journal File
- IMPORTANT : the Validity of the Journal File is being checked by AviHex
using an 'invald' Journal File requires Checking each changing Page by pressing F5 to compare it with the Main File

- Changing the Journal File (->File->open other Journal File) one can work with different Edit-Versions
(as long as no Savings have been made)

- by Saving the Journal File (->File->Save Journal File as) one can keep the last State of Editing

- Deleting the Journal File (->File->Delete Journal File) all Information about saved and not saved Changes are lost;
this can be useful if the Journal File has grown too big


Disassemblieren

Disassembly

You can identify x86-Code at Assembler Level with AviHex

AviHex should recognize all Instructions including Coprocessor- MMX- and SSE Instructions (up to SSE4) in 16, 32 and 64 Bit Mode.

IMPORTANT : Unfornately the Dokumentation by Intel was not definite enough relating to some 64 Bit Instructions, especially concerning Access to the Registers sil, dil, bpl and spl. So in this Case I can not guarantee for Correctmess.

IMPORTANT : Correct Interpretation depends on a suitable Starting Position;
an arbitrary Starting Point in the Mid of the File mostly causes useless Results.

- Here You go: ->Specials->disassemble
- or (depending on the Settings): Double Click.
- By Request a complete Listing is made (Size may be limited by the amount of available Memory).
- If a Selection has been made the Listing is bounded by the Selection.
- After Disassembly the relevant Data Region is highlighted.
- Clicking on the Listing (Address of an Instruction) the according Bytes in File are highlighted.
- You can even scroll through the Listing and watch the according Bytes in File.


Avifunktionen

Special Features for Avi Files

AviHex can examine the Strucure of an AVI File and check the Indexes

- ->AVI->AVI File Information shows glabal Information about the File.

- mit ->AVI->Check AVI File opens a special Dialog.
- Hitting O.K. withot further Selection shows the general Chunk Tree and checks the Superindex (Index of Indexes).
- Check Data Indexes checks each Entry in den Data Indexes and shows Errors if any.
- Check Data Packages continuously jumps from one entry to the next and stops after an Error.
- automatic Repair tries to correct Errors. Mostly doesn't help and thus has to be considered as EXPERIMENTAL !

- Play Video and Play Audio scrolls automaticly through Data Chunks. Only 512 Bytes of each Chunk are displayed (Position can be adjusted).
ESC or Space Key can stop the Procedure.

- Goto Film Start leads to the first Film Chunk.
- Goto next Chunk or Strg-R jumps to the following Chunk.
- Goto next Sub Chunk or Strg-S jumps to the next Sub Chunk.

- + and - lets you move the Position of the displayed Section in the Chunk.
- squared Brackeds move the Section by Bytes.


Deleting an Amount of Data

- select Data
->Edit->Selection Start or F9 and ->Edit->Selection End or F10 or with your Mouse
- overwrite Selection with a fixed Value (mostly 0) (->Edit->Fill Selection with Hex Value)


Convert Numbers to different Formats

This is done by the Show Values Dialog:

->Specials->Show Values or (with suitable Setting) by double click.
- Entering a Value into a Field initiates its Conversion into all possible Formats
- CAUTION: clicking the Save Buttons or (depending on the Configuration) hitting the O.K. Button or Return Key accepts the entered Value as Change.


Compose a File from Pieces

You can do the following:

- open a File, select wanted Data (in chronological Order as required!) and build the File with ->File->append selected Data to File


Find Changes or Bookmarks

You can jump from one Change to the next (or the previous):

->Goto->next / previous Change or Strg-N / Strg-P


Find Files or Parts of Files on a Drive

- open Drive: ->File->Open Drive or Strg-L
- open Compare File (->Compare->To other File)
- try to find the first Bytes of the Compare File on Drive
- 'move' the Compare File to the found Position (->Compare->Set Cursor Position as Start for Compare File)
- repeat this while Differences are schown (highlighted in green color)
(F3) and 'move' again ...


Save State of Editing

- ->File->Save Journal File as creates a Copy of the Journal File
- ->File->Open other Journal File restores the saved Version
- CAUTION: Re-Opening a Main File opens a Standard Journal File; if you want another File to be the Standard Journal File you have to replace the Standard File with the new one.


Changing the Start and End of a Selection

- move Cursor to the Position of Change (Keyboard or Click)
- this Position can now be choosen as Start (->Edit->Selection Start / F9) or End of the Selection (->Edit->Selection End / F10)


What about Auto Scroll ?

->Goto->Auto Scroll Up / Down oder Strg-Up / -Dn

- the File Content ist running automaticly
- is faster and more comfortable than hitting a Key
- each Byte is shown once on the Screen
- helps to find conspicuous Data Areas (Text, Tables, ...) quickly


Wat is the "Play"-Function for AVI Files ?

->AVI->Play Video / Play Audio

- shows successively one Page of each Data Chunk (audio respectively video)
- does not use any Indexes
- after Appearance of an Error it will stop


What is "Show Pointers and Flags" for ?

->Specials->Show Pointers and Flags

- shows the value of some Variables that are used inside the Program
- helped me finding Bugs ...


What is "Fill Page with all Characters" for ?

->Edit->Fill Page with all Characters

- inserts all 256 ASCII-Chars


What is "Discard selected Changes" and "Discard Changes in Page" for ?

it is here: ->Edit

- deletes projected Changes which have not yet been written do the Main File