CSV.VLX (v7.0) — Visual LISP Compiled Binary Analysis

File: src/x86/v7.0(patch)/CSV.VLX
Size: 813,096 bytes (794 KB)
Format: Visual LISP eXecutable (VLX)
Compiler: AutoCAD R15.0+ (AutoCAD 2000+) VLISP compiler

Warning

Drastically Different from v3.60

The v7.0 VLX is fundamentally different from v3.60:

  • ? Only 1 FAS module (vs v3.60’s 109 modules!)

  • ? 26% smaller (794 KB vs 1.05 MB)

  • ? Monolithic compilation (everything in one CSV.FAS)

  • ? Plain LSP auto-loading (modules not pre-compiled into VLX)

See: v3.60 vs v7.0 Comparison for architectural differences.


File Header Analysis

Magic Bytes (first 16 bytes, hex):

5652544C49422D31 18680C0062000000

Header Signature: VRTLIB-1 (Visual Runtime Library, version 1)

Protection Mode: :protected . T (Protected/encrypted compilation)
ActiveX Support: :active-x . T (Uses ActiveX/COM features)
Namespace: :separate-namespace (Isolated from global AutoLISP)


Module Structure (from LOAD directive)

The VLX contains ONLY 1 compiled FAS module:

LOAD((:protected . T) 
     (:active-x . T) 
     (:separate-namespace) 
     (:load-file-list (:fas "csv")))

Single Module

(:fas "csv")        ; Entire application compiled into single FAS

This is the COMPLETE APPLICATION! Unlike v3.60’s 109 separate modules, v7.0 compiles everything into one monolithic csv.fas file.


Key Differences from v3.60

Module Organization

v3.60 VLX:

(:load-file-list 
  (:fas "CSV")       ; Main entry
  (:fas "ENABLE")    ; Module 1
  (:fas "SETVARS")   ; Module 2
  ; ... 106 more modules ...
  (:fas "WELDCONN")) ; Module 109

v7.0 VLX:

(:load-file-list 
  (:fas "csv"))      ; Everything in one file!

Why This Change?

Hypothesis 1: Monolithic Compilation

  • All 70+ LSP modules compiled into single CSV.FAS

  • Reduces VLX overhead (no per-module headers)

  • Faster loading (one file vs 109 files)

  • Explains 26% size reduction

Hypothesis 2: Auto-Loading Strategy

  • VLX only contains main entry point

  • Other modules loaded as plain LSP files at runtime

  • Matches v7.0 CSV.lsp’s (foreach a csvlst (load a)) pattern

  • Allows development without recompilation

Hypothesis 3: Hybrid Approach

  • CSV.FAS contains core logic + auto-loader

  • Individual LSP files loaded on-demand

  • Best of both worlds: protected core + flexible modules


File Size Comparison

Metric

v3.60

v7.0

Change

VLX Size

1,103,600 bytes

813,096 bytes

-26%

VLX Size (KB)

1,077 KB

794 KB

-283 KB

FAS Modules

109 modules

1 module

-108 modules

Average Module Size

~10 KB

N/A

N/A

Monolithic Module

No

Yes

?

Size Reduction Explained

v3.60 Overhead:

  • 109 FAS headers (~100 bytes each = ~11 KB)

  • 109 module boundaries

  • VLX packaging overhead per module

v7.0 Optimization:

  • Single FAS header (~100 bytes total)

  • No module boundaries

  • Minimal VLX packaging overhead

Result: 26% reduction (290 KB saved)


Protection & Security

Same as v3.60

  • Protected Compilation: :protected . T - source code is encrypted

  • Cannot be decompiled without AutoCAD’s internal VLISP tools

  • FAS bytecode is proprietary to AutoCAD’s Visual LISP interpreter

Implications

  • Even though v7.0 has only 1 FAS module, it’s still protected

  • Source code remains secure

  • Runtime inspection still possible (function names in memory)


Module Loading Architecture

v3.60 Approach

User runs CSV command
  ?
AutoCAD loads CSV.VLX
  ?
VLX loads 109 FAS modules into memory
  ?
All functions available immediately

v7.0 Approach (Hypothesis)

User runs CSV command
  ?
AutoCAD loads CSV.VLX
  ?
VLX loads single CSV.FAS
  ?
CSV.FAS initializes and runs csvlst auto-loader
  ?
Individual LSP modules loaded on-demand
  ?
Functions available as needed

Benefits:

  • Faster initial load (only CSV.FAS)

  • Lower memory footprint (load only what’s needed)

  • Easier development (modify LSP without VLX rebuild)


Runtime Module Loading

From v7.0 CSV.lsp

; Define complete module list (70+ modules)
(set 'csvlst '("bp_dlg" "bpauto" "brace" "btch" ... "weld"))

; Check if VLISP/ARX environment available
(set 'ok nil)
(foreach a (arx)
  (if (or (wcmatch a "*vlide*") (wcmatch a "*csv*"))
    (set 'ok "t")))

(if ok
  ; Export all functions to ARX namespace
  (progn 
    (vl-acad-defun 'wall_dlg)
    (vl-acad-defun 'slab_dlg)
    ; ... 70+ exports ...
  )
  ; Auto-load all modules from LSP files
  (if (not panatt)
    (foreach a csvlst (load a))))

This explains the architecture:

  1. VLX contains only CSV.FAS (main entry + loader)

  2. CSV.FAS checks if running in VLISP environment

  3. If yes: Export functions (ARX can call them)

  4. If no: Auto-load all modules from plain LSP files

Benefit: Development flexibility without sacrificing security (core logic still protected in VLX).


Decompilation Possibilities

Same as v3.60

Option 1: Official AutoCAD VLISP

(vl-load-vlx "Csv.vlx")  ; Load the VLX
(vlax-dump-object (vlax-get-acad-object))  ; Inspect loaded functions

Option 2: Runtime Inspection

  • Since v7.0 auto-loads plain LSP files, you can:

    • Examine the LSP source directly

    • Modify LSP files for testing

    • Only CSV.FAS remains opaque

Option 3: Binary Analysis

  • Single FAS file easier to analyze than 109 files

  • But still protected/encrypted


Modernization Implications

For P3 (AutoCAD 2026)

v7.0 Advantages:

  • ? Simpler VLX structure (1 module vs 109)

  • ? Easier to test (modify LSP without VLX rebuild)

  • ? Smaller file size (faster download/install)

v7.0 Challenges:

  • ?? Monolithic CSV.FAS harder to maintain long-term

  • ?? Must rebuild entire VLX for core logic changes

  • ?? No module-level protection (LSP files are plain text)

For P4 (Cloud)

Not Compatible:

  • AutoLISP NOT available in AutoCAD Web

  • VLX cannot run in browser

  • Must rewrite in JavaScript/AutoCAD Core Console API


Analysis Tools

Used: scripts/analyze-vlx.ps1 - PowerShell VLX analyzer
Command: .\scripts\analyze-vlx.ps1 -VlxPath "src\x86\v7.0(patch)\CSV.VLX"

Results:

  • Header: VRTLIB-1 (same format as v3.60)

  • Module count: 1 (vs v3.60’s 109)

  • Protection: Enabled (:protected . T)

  • ActiveX: Enabled (:active-x . T)



Document Metadata

Created: 2025
Analysis Method: Binary string extraction + VLX header parsing using analyze-vlx.ps1
Limitations: Cannot decompile protected FAS bytecode; CSV.FAS internals opaque
Completeness: Module structure complete (1 module identified); auto-loading architecture documented

Key Insight: v7.0’s monolithic VLX structure (1 module vs 109) explains the 26% size reduction and matches the auto-loading strategy seen in CSV.lsp. This is a deliberate architectural change for development flexibility.


End of Document