Skip to content

Instantly share code, notes, and snippets.

@AlexeyTolstopyatov
Created July 31, 2025 06:52
Show Gist options
  • Select an option

  • Save AlexeyTolstopyatov/fc19496b8b1a9a5bbb5f12c415c0c1f3 to your computer and use it in GitHub Desktop.

Select an option

Save AlexeyTolstopyatov/fc19496b8b1a9a5bbb5f12c415c0c1f3 to your computer and use it in GitHub Desktop.

Found VB 3.0 Runtime structures

NE segmented image divides per-segment. First segment follows alter segmented header: .CODE16 segment

For Microsoft Visual Basic 3.0 runtime this segment has next structure:

Type Vb3CodeSegment
  sUnknown1 As String * 1
  Token As String * 1
  sizeOfUnknown__ As Integer
  wUnknown__ As Integer
  wUnknown__ As Integer
End Type

Every Module describes by this data-structure

Type VBModuleDef_struc
  Type_3 As Integer ' <-- version "3.0"
  wUnknown As Integer  ' 
  frmOffset As Integer
  wUnknown2 As Integer
  wUnknown3 As Integer
  wUnknown4 As Integer
  procedureOrFunction As Integer
  publicOrPrivate As Integer
  wUnknown5 As Integer
  wUnknown6 As Integer
  m5Size As Integer
  isExtOrLocal As Integer
  Offset As Integer
  wUnknown7 As Integer
  wUnknown8 As Integer
  Reserved(15 To 17) As Integer
  size As Integer
  wUnknown9 As Integer
  wUnknown10 As Integer
  M1592(21 To 22) As Integer
  wUnknown11 As Integer
  wUnknown12 As Integer
  wUnknown13 As Integer
  wUnknown14 As Long
End Type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment