[API]
GetCurrentProcessId
OpenProcess
WriteProcessMemory
CloseHandle

[PATCH]
EventTimeToFileTime

[CODE]
Private Sub EventTimeToFileTime_Prepare(hProcess, ByVal InjectedProcAddress As Long)
  Dim xLongA1(8) As Long
  xLongA1(0) = &H0C24448B
  xLongA1(1) = &H989680B9
  xLongA1(2) = &H8BE1F700
  xLongA1(3) = &H0510244C

  xLongA1(4) = &HD53E8000
  xLongA1(5) = &HD2810189
  xLongA1(6) = &H019DB1DE
  xLongA1(7) = &HC2045189

  xLongA1(8) = &H0001 ' word
  Call WriteProcessMemory(hProcess, ByVal InjectedProcAddress, ByVal VarPtr(xLongA1(0)), 34&, 0&)
  End Sub

Public Sub EventTimeToFileTime(ByVal EventTime As Long, ByRef xType1 As FILETIME)
  Dim xDbl1 As Double
  Dim xDbl2 As Double

  If EventTime < 0& Then
    xDbl1 = ((EventTime And &H7FFFFFFF) + 2147483648# + 11644473600#) * 10000000#
    Else
    xDbl1 = (EventTime + 11644473600#) * 10000000#
    End If
  xDbl2 = Fix(xDbl1 / 4294967296#)
  If xDbl2 > &H7FFFFFFF Then
    xType1.dwHighDateTime = &H80000000 Or CLng(xDbl2 - 2147483648#)
    Else
    xType1.dwHighDateTime = xDbl2
    End If
  
  xDbl2 = xDbl1 - xType1.dwHighDateTime * 4294967296#
  If xDbl2 > &H7FFFFFFF Then
    xType1.dwLowDateTime = &H80000000 Or CLng(xDbl2 - 2147483648#)
    Else
    xType1.dwLowDateTime = xDbl2
    End If
  End Sub