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

📄 modglobals.bas

📁 反编译vb软件,可以把vb打包的软件直接翻译成源码,非常好用,
💻 BAS
📖 第 1 页 / 共 4 页
字号:
End Type
Private Type tObjectTable
    lNull1 As Long                                         ' 0x00 (00d)
    aExecProj As Long                                      ' 0x04 (04d) Pointer to a memory structure
    aProjectInfo2 As Long                                  ' 0x08 (08d) Pointer to Project Info 2
    Const1 As Long                                         ' 0x0C
    Null2 As Long                                          ' 0x10
    lpProjectObject As Long                                ' 0x14
    Flag1 As Long                                          ' 0x18
    Flag2 As Long                                          ' 0x1C
    Flag3 As Long                                          ' 0x20
    Flag4 As Long                                          ' 0x24
    fCompileType As Integer                                ' 0x28 (40d) Internal flag used during compilation
    ObjectCount1 As Integer                                ' 0x2A
    iCompiledObjects As Integer                            ' 0x2C (44d) Number of objects compiled.
    iObjectsInUse As Integer                               ' 0x2E (46d) Updated in the IDE to correspond the total number ' but will go up or down when initializing/unloading modules.
    aObject As Long                                        ' 0x30
    Null3 As Long                                          ' 0x34
    Null4 As Long                                          ' 0x38
    Null5 As Long                                          ' 0x3C
    aProjectName As Long                                   ' 0x40      NTS
    LangID1  As Long                                       ' 0x44
    LangID2  As Long                                       ' 0x48
    Null6  As Long                                         ' 0x4C
    Const3  As Long                                        ' 0x50
    ' 0x54
End Type
Type ExternalTable
    flag As Long                                           '0x00
    aExternalLibrary As Long                               '0x04
End Type

Type ExternalLibrary
    aLibraryName As Long                                   '0x00   points to NTS
    aLibraryFunction As Long                               '0x04   points to NTS
End Type

Public Type tEventLink

    Const1 As Integer                                      ' 0x00
    CompileType As Byte                                    ' 0x02
    aEvent As Long                                         ' 0x03
    PushCmd As Byte                                        ' 0x07
    pushAddress As Long                                    ' 0x08
    Const As Byte                                          ' 0x0C
    ' 0x0D<-- Structure Size
End Type
Private Type tEventTable
    Null1 As Long                                          ' 0x00
    aControl As Long                                       ' 0x04
    aObjectInfo As Long                                    ' 0x08
    aQueryInterface As Long                                ' 0x0C
    aAddRef As Long                                        ' 0x10
    aRelease As Long                                       ' 0x14
    'aEventPointer() As Long
    'aEventPointer(aControl.EventCount - 1) As Long ' 0x18
End Type
Global taEventPointer() As Long

Private Type tOptionalObjectInfo ' if ((tObject.ObjectType AND &H80)=&H80)

    fDesigner As Long                                      ' 0x00 (0d) If this value is 2 then this object is a designer
    aObjectCLSID As Long                                   ' 0x04
    Null1 As Long                                          ' 0x08
    aGuidObjectGUI As Long                                 ' 0x0C
    lObjectDefaultIIDCount As Long                         ' 0x10  01 00 00 00
    aObjectEventsIIDTable As Long                          ' 0x14
    lObjectEventsIIDCount As Long                          ' 0x18
    aObjectDefaultIIDTable As Long                         ' 0x1C
    ControlCount As Long                                   ' 0x20
    aControlArray As Long                                  ' 0x24
    iEventCount As Integer                                 ' 0x28 (40d) Number of Events
    iPCodeCount As Integer                                 ' 0x2C
    oInitializeEvent As Integer                            ' 0x2C (44d) Offset to Initialize Event from aMethodLinkTable
    oTerminateEvent As Integer                             ' 0x2E (46d) Offset to Terminate Event from aMethodLinkTable
    aEventLinkArray As Long                                ' 0x30  Pointer to pointers of MethodLink
    aBasicClassObject As Long                              ' 0x34 Pointer to an in-memory
    Null3 As Long                                          ' 0x38
    Flag2 As Long                                          ' 0x3C usually null
    ' 0x40 <-- Structure size
End Type
Public Type tEventPointer
    Const1 As Byte                                         ' 0x00
    Flag1 As Long                                          ' 0x01
    Const2 As Long                                         ' 0x05
    Const3 As Byte                                         ' 0x09
    aEvent As Long                                         ' 0x0A
    ' 0x0E <-- Structure Size
End Type

Public Type tCodeInfo
    aObjectInfo As Long                                    ' 0x00
    Flag1 As Integer                                       ' 0x04
    Flag2 As Integer                                       ' 0x06
    CodeLength As Integer                                  ' 0x08
    Flag3 As Long                                          ' 0x0A
    Flag4 As Integer                                       ' 0x0E
    Null1 As Integer                                       ' 0x10
    Flag5 As Long                                          ' 0x12
    Flag6 As Integer                                       ' 0x16
    ' 0x18  <-- Structure Size
End Type

Private Type tControl
    Flag1 As Integer                                       ' 0x00
    EventCount As Integer                                  ' 0x02
    Flag2 As Long                                          ' 0x04
    aGUID As Long                                          ' 0x08
    index As Integer                                       ' 0x0C
    Const1 As Integer                                      ' 0x0E
    Null1 As Long                                          ' 0x10
    Null2 As Long                                          ' 0x14
    aEventTable As Long                                    ' 0x18
    Flag3 As Byte                                          ' 0x1C
    Const2 As Byte                                         ' 0x1D
    Const3 As Integer                                      ' 0x1E
    aName As Long                                          ' 0x20
    Index2 As Integer                                      ' 0x24
    Const1Copy As Integer                                  ' 0x26
    ' 0x28  <-- Structure Size
End Type

Private Type oldtGuiTable
    SectionHeader As Long
    unknown(59) As Byte
    FormSize As Long
    un1 As Long
    aFormPointer As Long
    un2 As Long

End Type
Type tGuiTable
    lStructSize          As Long                           ' 0x00 (00d) Total size of this structure
    uuidObjectGUI(15)    As Byte                           ' 0x04 (04d) UUID of Object GUI
    Unknown1             As Long                           ' 0x14 (20d)
    Unknown2             As Long                           ' 0x18 (24d)
    Unknown3             As Long                           ' 0x1C (28d)
    Unknown4             As Long                           ' 0x20 (32d)
    lObjectID            As Long                           ' 0x24 (36d) Current Object ID in the Project
    Unknown5             As Long                           ' 0x28 (40d)
    fOLEMisc             As Long                           ' 0x2C (44d) OLEMisc Flags
    uuidObject(15)       As Byte                           ' 0x30 (48d) UUID of Object
    Unknown6             As Long                           ' 0x40 (64d)
    Unknown7             As Long                           ' 0x44 (68d)
    aFormPointer         As Long                           ' 0x48 (72d) Pointer to GUI Object Info
    Unknown8             As Long                           ' 0x4C (76d)
    ' 0x50 (80d) <- Structure Size
End Type


Public Type tComponent
    StructLength   As Long
    l1             As Long
    l2             As Long
    l3             As Long
    l4             As Long
    l5             As Long
    l6             As Long
    GUIDoffset     As Long
    GUIDlength     As Long
    l7             As Long
    FileNameOffset As Long
    SourceOffset   As Long
    NameOffset     As Long
End Type
'If GUIDlength = -1 then there is no oUUID
'If GUIDlength = 72 then read a unicode UUID

Type tProjectInfo2
    lNull1                  As Long                        ' 0x00 (00d)
    aObjectTable            As Long                        ' 0x04 (04d) Pointer to Object Table
    lConst1                 As Long                        ' 0x08 (08d)
    lNull2                  As Long                        ' 0x0C (12d)
    aObjectDescriptorTable  As Long                        ' 0x10 (16d) Pointer to a table of ObjectDescriptors
    lNull3                  As Long                        ' 0x14 (20d)
    aNTSPrjDescription      As Long                        ' 0x18 (24d) Pointer to Project Description
    aNTSPrjHelpFile         As Long                        ' 0x1C (28d) Pointer to Project Help File
    lConst2                 As Long                        ' 0x20 (32d)
    lHelpContextID          As Long                        ' 0x24 (36d) Project Help Context ID
    ' 0x28 (40d) <- Structure size
End Type

Type ObjectDescriptor
    lNull1      As Long                                    '0x00 (00d)
    aObjectInfo As Long                                    '0x04 (04d) Pointer to Object Info
    lConst1     As Long                                    '0x08 (08d)
    lNull2      As Long                                    '0x0C (12d)
    lFlag1      As Long                                    '0x10 (16d)
    lNull3      As Long                                    '0x14 (20d)
    aUnknown1   As Long                                    '0x18 (24d)
    lNull4      As Long                                    '0x1C (28d)
    aUnknown2   As Long                                    '0x20 (32d)
    aUnknown3   As Long                                    '0x24 (36d)
    aUnknown4   As Long                                    '0x28 (40d)
    lNull5      As Long                                    '0x2C (44d)
    lNull6      As Long                                    '0x30 (48d)
    lNull7      As Long                                    '0x34 (52d)
    lFlag2      As Long                                    '0x38 (56d)
    fObjectType As Long                                    '0x3C (60d) Flags for this Object
    '0x40 (64d) <- Structure Size
End Type

Type MethodLinkNative
    jmpOpCode As Byte                                      '0x0 (0d)
    jmpOffset As Long                                      '0x1 (1d) jmp <address>  ; <address> = <currentoffset> + <jmpOffset> + 5
    '0x5 (5d) <-- Structure Size
End Type

Type MethodLinkPCode
    xorOpCode   As Integer                                 '0x0 (00d) xor eax, eax
    movOpCode   As Byte                                    '0x2 (02d)
    movAddress  As Long                                    '0x3 (03d) mov edx, <movAddress>
    pushOpCode  As Byte                                    '0x7 (07d)
    pushAddress As Long                                    '0x8 (08d) push <pushAddress>
    retOpCode   As Byte                                    '0xC (12d) ret
    '0xD (13d) <-- Structure Size
End Type

Type GUIObjectInfo
    lUnknown1            As Long                           ' 0x00 (00d)
    bUnknown2            As Byte                           ' 0x04 (04d)
    guidObjectGUI(15)    As Byte                           ' 0x05 (05d) GUID of this ObjectGUI
    uuidUnknown1(15)     As Byte                           ' 0x15 (21d)
    guidCOMEventsIID(15) As Byte                           ' 0x25 (37d) GUID of this object EventsIID
    lUnknown3            As Long                           ' 0x35 (53d)
    lUnknown4            As Long                           ' 0x39 (57d)
    lUnknown5            As Long                           ' 0x3D (61d)
    lUnknown6            As Long                           ' 0x41 (65d)
    lUnknown7            As Long                           ' 0x45 (69d)
    lUnknown8            As Long                           ' 0x49 (73d)
    lUnknown9            As Long                           ' 0x4D (77d)
    lUnknown10           As Long                           ' 0x51 (81d)
    lUnknown11           As Long                           ' 0x55 (85d)
    lPropertiesLength    As Long                           ' 0x59 (89d) Total Length of Properties
    ' 0x5D (93d) <-- Structure Size
End Type

Private Type typeApiList
    strLibraryName As String
    strFunctionName As String
End Type

Private Type typeProcedureList
    strParent As String
    strProcedureName As String
End Type

'Globals begin
Global gProcedureList() As typeProcedureList
Global gApiList() As typeApiList
Global gVBHeader As VBHeader
'Com Stuff
Global gCOMRegInfo As tCOMRegInfo
Global gCOMRegData As tCOMRegData
Global gDesignerInfo As tDesignerInfo

Global gProjectInfo As tProjectInfo
Global gObjectTable As tObjectTable
Global gObject() As tObject
Global gObjectInfo As tObjectInfo
Global gExternalTable As ExternalTable
Global gExternalLibrary As ExternalLibrary
Global gOptionalObjectInfo As tOptionalObjectInfo
Global gEventLink As tEventLink
Global gEventPointer As tEventPointer
Global gControl() As tControl
Global gEventTable() As tEventTable
Global gCodeInfo As tCodeInfo
Global gProcedure()  As Long                               'As tProcedure
Global gGuiTable() As tGuiTable
Global gObjectNameArray() As String
Global gObjectProcCountArray() As Integer
Global gObjectInfoHolder() As tObjectInfo
Private Type tObjectOffsetType
    Address As Long
    ObjectName As String
End Type
Global gObjectOffsetArray() As tObjectOffsetType

'Options
Global gSkipCom As Boolean
Global gDumpData As Boolean
Global gShowOffsets As Boolean
Global gShowColors As Boolean
Global gPcodeDecompile As Boolean

Private Type typeControlName
    strParentForm As String
    strControlName As String
    strGuid As String
    bControlImage As Byte
End Type
Global gControlNameArray() As typeControlName


'For Controls
Public Type typeStandardControlSize
    cLeft As Integer
    cTop As Integer
    cWidth As Integer
    cHeight As Integer
End Type

'Picture Header
Public Type typePictureHeader
    un1 As Integer
    un2 As Integer
    un3 As Integer
    un4 As Integer
End Type

'COM Fix Type to fix some COM problems
Private Type typeCOMFIX
    ObjectName As String
    PropertyName As String
    NewType As String
End Type
Global gComFix() As typeCOMFIX

Private Type ImportListtype
    strName As String
    strGuid As String
    strLib As String
End Type
Global ImportList() As ImportListtype

⌨️ 快捷键说明

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