---------------------------------
   IDA to SoftIce symbol loader
   version: 0.02 release
---------------------------------

1)Author words
2)How to use
3)Problems
4)How to compile
5)Utilities

--------------------------------------------------------------------------------------------------------------------------
Author: Mostek
mail:  mostekaccess@mailcity.com

Authors requests:

1st
If you don't like or you want to add something please write to me.
I would be more than happy to help.

If you find a bug, it would be nice to mail me.

Because my 1st language isn't C/C++, I don't know much about it.
If anything could be done easier I'm waiting for your mail.

2nd
Included in this version:
  Local/Global Variables
  Local/Global Procedures
  Structures/Unions
  Local Labels
  Variables in CODE segment (Useful for other than PE file types (vxd,..) (There are still problems with this one.)
                             At least you'll see that variable if you'll want.)

3rd
A Big thanks to : Tsehp, The Owl, Ousir, Ice and BlindnAngel for testing.

--------------------------------------------------------------------------------------------------------------------------
2)How to use

1st
You must add next 3 lines to ..IDA\PlugIns\PlugIns.cfg file (in this order exactly):
        I2S_Setup       i2s              Ctrl-F12        2
        I2S_Save_NMS    i2s              Shift-F12       1
        I2S_Conversion  i2s              F12             0

2nd
PlugIn must be used under Windows as it uses Windows functions.
Why? 1. NM32.h was set/reversed only for 32bit programs.
     2. PlugIn uses windows function fot allocating memory and for loading nms file to softice.

3rd
You can have spaces in your names if you want. PlugIn replaces them with '_'.

--------------------------------------------------------------------------------------------------------------------------
3)Problems

1st
If plugIn would find unknown segment type it will try to fix that automatically.
If that would fail user will have to fix that (it will request segment class string from the user).
(Don't worry instructions will be in a dialogBox.)

2nd
PlugIn can't handle code in DATA segment.
This will be fixed in one of the next versions when NE and LE file types will be added.
(As they really like to have data and code mixed up.)
PlugIn "can" handle data in CODE segment, but it can't handle code in DATA segment.

3rd
Sometimes plugIn will report "Align directive (ea:xxxxxxx) isn't allowed to have a name." even
if an Align directive is not there.
This is a bug in a IDA, so I can't help (well at least in IDA4.04).
SOLUTION:
Define that byte/word/dword (press 'd') and if you'll at it fix a few next ones too.

4th
PlugIn only supports EBP based local variable. I tried to make it for ESP, but I failed.
NO SOLUTION at this time.
(I just need to read a little more about function symbols.)

--------------------------------------------------------------------------------------------------------------------------
4)How to compile

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1st
I can only define this for 'Borlands free compiler' as I'm using it,
for any other you're on your own.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2nd
In Laboratory dir are all source files and obj files will be saved here too.
In Programing dir we have IDA SDK 's and C++.

Look how directories are defined.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3rd
Compile with IDA 4.04 SDK(51) Borland Lib file will fail as it isn't complete.
So replace it with IDA 4.10 SDK(52) Borland lib.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4th
Fixes before compile:
(1st)
In '..\Laboratory\Source' dir read and fix the paths in 'm.bat'. (And in 'n.bat'.)

(2nd)
In '..\Laboratory' dir read and fix the paths in 'plugIn.mak'.

(3rd)
In autoexec.bat set the path to 'peutil.exe' (In IDA SDK.)
This can already be defined.
Test it with typeing 'peutil' in dos command line (anywhere).
If it loads it, than skip this line.

(4th)
In '..\IDA SDK' dir read and fix the paths in 'allmake.mak'.
This one is changed quite hardly so it will only work for Borland
compilers.

(5th)
In '..\IDA SDK\xx\INCLUDE' dir. I deleted all the header files as they are not
public, add those that you have.
So if you have 'IDASDKxx.ZIP' file, copy header files to '..\IDA SDJ\xx\INCLUDE' dir.

(6th)
In i2s.h you must uncomment:
//#define WINDOWS2000		//uncomment this line to compile for WIndows2000
//#define IDA55UP			//uncomment this line to compile for IDA55 and up
If you want a Win2000 and/or IDA55 (and up) version.


--------------------------------------------------------------------------------------------------------------------------
5)Utilities

1st (n2t)
For testers there's another utility => n2t.exe

It converts nms file to text file
command line: n2t nmsName.nms textName.txt

You can define only 'nmsName.nms' and util will create nmsName.txt.

You MUST use this command line or it will fail.
Source is included. (I'll not explain what to do to assemble it, source is here just to see what and where.)
(Well in some parts I changed eax<->edi to get even more speed, but because of that the registers eax and edi are some kind
strangely used.)

2nd (map2sice)
This one is intended for other file types.
