
Disclaimer:
The user of this program assumes all responsibly for the use of this program and shall not hold the author liable
  for any losses that might incurred (including time and money) through the use of this program.

=============================================

 written by Tim Goossen  a.k.a.  handyman

    designed mainly for use with FASMW programs debugged with  Ollydbg v110,
         but other debuggers may work if they can use exported values

    Note: flbls.ini  must be setup first to match your system.
           copy the Fasmw.ini [Environment] section to the flbls.ini [Environment] section.

    If you rename flbls.exe to to another name, then you must also rename flbls.ini to match.
       ( i.e.:  flbls.exe --> flbls2.exe  then also do:  flbls.ini --> flbls2.ini )


    Label Export creator for fasmw asm files.

      flbls uses comment commands and the ';' of the command  must be  the first ';' on the line.
          If it is not then command is ignored, NOTE: there is no space between ';' and command
          Any comment string sequence can follow command, white space is required between
             command and rest of text on comment line.
      use ";export"   to turn on export function to collect and generate possible export values
          ";structonly" to only extract struct info and skip everything else (including code labels)
          ";noexport" to turn off all export functions
          ";localexport" to only export labels from current module and skip includes

               following can occur anywhere in the scanned code stream
          ";exportdata"  to create export output as a data export data stream
          ";exportsection"  creates export file as an export section    (default))

          ";exportfile name"   sets export file to value of "name".  (no spaces in 'name')
                This overrides .INI export filename mask.

    all labels in locals and virtual areas cannot be exported
          (virtual lablels use register values as base and
              local labels point to addresses on the stack so the RVA command used in the compiler
              cannot generate a compile time absolute address for these)

    program will try to follow include paths if ";export" or ";structonly" is turned on.
       defaults to an automatic mode of ";structonly" at program start and ";export" at all sections
           except the "import" and "export" sections which default to ";noexport"

         Note:
            Using any of the export commands (;export,;structonly,;noexport,;localexport) disables
            the automatic mode in the current file and all lower level include files called from the
            current file level. The changed modes are used only in the current include file level
            and any files included below that level. Higher (Previous) include/file level export
            modes are not changed.

    label definitions:
        section must be code or data and cannot be import or export
         name followed by colon ":"  in code    ( xx: )
         name followed by dataype    in data    ([dr][bdqtw])

           keyword "label"?         label xx??   (currently not supported)

       in data section
        label name is followed by data directive   ex.   yy dd,
            where data directive is in form of [dr][bdfpqtuw] or 'file'

       Label replacement name in data section is first word on line with only two words

       all labels in 'locals' to 'endl' are skipped for export because their addresses cannot
            be generated for export since they point somewhere into the stack.
             (RVA cannot generate address)

-------------------------------------------

 LIMITATIONS:  virtual and local labels cannot be flagged for export - system limitaton
               'struc' not supported - use 'struct' instead and these will be expanded.
               All other macro expansions are skipped.

===========================================

      screen has 5 buttons
          File
             Select asm file to parse

          ListAll
             Right window will list labels,words and usages in right window

          LabelsOnly
             Right window will list only exportable labels in right window

          Export
             Export label list in right window to export file. Only the exportable labels will be exported

          Exit
             exit program

      Screen has 3 windows:

          Left window shows expanded 'Struct's found.
               double clicking on an item that has been expanded will jump to the struct
                   definition of the expansion
               window also contains the actual order of the items as found in the includes, and the
                   expansion definition if available
               single clicking an item causes bottom window to show the file location of the item definition

            window is sorted in ASCII order according to main struct name and order found in struct.

         Right window shows the expanded label names in the source, type of name, number of times used in source
             and structure expansion information if available.

             left click on item to position right window to struct definition if struct, and
             to cause the bottom window to display definition location(s), and usage location(s) of the item

           window is sorted in ASCII order with exportable labels displayed first, and then the
               non-exportable words.
               Note: ASCII order implies a case sensitive order, so 'A...' words and 'a...' words may be
                     separated by some distance.

         Bottom window shows label locations.
           left click on item to jump to actual location in file where found. Location found will be top
           line in the souce display.

           left click on bottom window when it shows the souce code to return to redisplay locations found

           location window is in file-accessed/line order

           source window is in source code order



===========================================

in Olldbg

   widen the address columns to see the labels

       (For labels do not use Ctrl+G which is for Hex addresses - see Ollydbg documentation)

   use Ctrl+N to bring up the names window and you can select a label name with a double left click.
       this works for both source and data windows at any time and whatever window the label is in will be
       adjusted to show that label. You can also type in a text string and the names window will try to show
       names beginning with the entered character sequence.

   use Ctrl+^ or Ctrl+v  (up&down arrows) to shift data window 1 character left or right. This may need to be
       done to show label names for data items that are not currently on the left edge of the data window
       value column. Only data locations on the left edge of the value column will have displayed labels.


   if the hex code Hex dump column in the disassembly window is not necessary, then the column can be narrowed
      to show only the jump predictions and so that more data in the columns to the right can be displayed.
      (you may have to set the CPU flags in the 'Options/Debugging options' setup screen (or use Alt+O) to see
          the jump predictions.)

   To keep column width selections more permanemt, then be sure to exit Ollydbg after setting the column widths
      without running progam, and then restart to do the debugging session. (It seemed to me that if I did not do
      this first without running the program then the column width changes may or may not be kept.)

===========================================

This program currenly uses list views for data display and a pretty efficient (speed and size) variable length
   string sort routine for data collection. These may be changed in future releases.

===========================================

             