⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 使用此类不需要任何第三方软件支持,并且开源~~~ 内带两个实例
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3885
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5610
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   10.5
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   3885
   ScaleWidth      =   5610
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1200
      TabIndex        =   10
      Text            =   "55"
      Top             =   3000
      Width           =   975
   End
   Begin VB.Frame Frame1 
      Caption         =   "汇编码算术操作"
      Height          =   2655
      Left            =   120
      TabIndex        =   1
      Top             =   240
      Width           =   5175
      Begin VB.CommandButton Command5 
         Caption         =   "得到机器码"
         Height          =   495
         Left            =   240
         TabIndex        =   8
         Top             =   1080
         Width           =   2055
      End
      Begin VB.CommandButton Command4 
         Caption         =   "得到数值"
         Height          =   495
         Left            =   3720
         TabIndex        =   7
         Top             =   1080
         Width           =   1335
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Index           =   0
         Left            =   240
         TabIndex        =   4
         Text            =   "11"
         Top             =   360
         Width           =   1335
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Index           =   1
         Left            =   2040
         TabIndex        =   3
         Text            =   "22"
         Top             =   360
         Width           =   1335
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Index           =   2
         Left            =   3720
         TabIndex        =   2
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label Label2 
         Caption         =   "OPCODE"
         Height          =   375
         Left            =   360
         TabIndex        =   9
         Top             =   1800
         Width           =   4575
      End
      Begin VB.Label Label1 
         Caption         =   "+"
         Height          =   255
         Index           =   0
         Left            =   1680
         TabIndex        =   6
         Top             =   360
         Width           =   135
      End
      Begin VB.Label Label1 
         Caption         =   "="
         Height          =   255
         Index           =   1
         Left            =   3480
         TabIndex        =   5
         Top             =   360
         Width           =   135
      End
   End
   Begin VB.CommandButton Command3 
      Caption         =   "过程注入"
      Height          =   495
      Left            =   3960
      TabIndex        =   0
      Top             =   3000
      Width           =   1335
   End
   Begin VB.Label Label3 
      Caption         =   "参数="
      Height          =   375
      Left            =   240
      TabIndex        =   11
      Top             =   3120
      Width           =   855
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Long, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesRead As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Const PROCESS_ALL_ACCESS = &H1F0FFF
Dim h As Long
Dim asm2 As New clsASM

Private Sub Command3_Click()
Dim hWnd As Long, hpid As Long
hWnd = FindWindow("TApplication", "Project1")
GetWindowThreadProcessId hWnd, hpid
h = OpenProcess(PROCESS_ALL_ACCESS, False, hpid)

Dim asm As New clsASM
With asm                             '  asm
     .Pushad
     .Mov_EAX Val(Text1.Text)
     .Mov_EBX &H4537C4
     .Call_EBX
     .Popad                          '  popad
     .ret
End With                             '  end

asm.RUN_ASM h
CloseHandle h

End Sub

Private Sub Command4_Click()
With asm2                             '  asm
     .Mov_EAX Val(Text2(0).Text)
     .Add_EAX Val(Text2(1).Text)
     .ret
End With
Text2(2).Text = asm2.GET_Result
End Sub

Private Sub Command5_Click()
Label2.Caption = asm2.GET_CODE
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -