Class: Exerb::ResourceLibrary::Stab
- Inherits:
-
Object
- Object
- Exerb::ResourceLibrary::Stab
- Defined in:
- lib/exerb/resource_library.rb
Overview
#
Constant Summary collapse
- BASE_BINARY =
"\x4D\x5A\x90\x00\x03\x00\x00\x00\x04\x00\x00\x00\xFF\xFF\x00\x00" + "\xB8\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xB0\x00\x00\x00" + "\x0E\x1F\xBA\x0E\x00\xB4\x09\xCD\x21\xB8\x01\x4C\xCD\x21\x54\x68" + "\x69\x73\x20\x70\x72\x6F\x67\x72\x61\x6D\x20\x63\x61\x6E\x6E\x6F" + "\x74\x20\x62\x65\x20\x72\x75\x6E\x20\x69\x6E\x20\x44\x4F\x53\x20" + "\x6D\x6F\x64\x65\x2E\x0D\x0D\x0A\x24\x00\x00\x00\x00\x00\x00\x00" + "\xEB\x20\x35\xDB\xAF\x41\x5B\x88\xAF\x41\x5B\x88\xAF\x41\x5B\x88" + "\x68\x47\x5D\x88\xAE\x41\x5B\x88\x52\x69\x63\x68\xAF\x41\x5B\x88" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x50\x45\x00\x00\x4C\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\xE0\x00\x0F\x21\x0B\x01\x06\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00" + "\x00\x10\x00\x00\x00\x00\x00\x10\x00\x10\x00\x00\x00\x10\x00\x00" + "\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00" + "\x00\x00\x10\x00\x00\x10\x00\x00\x00\x00\x10\x00\x00\x10\x00\x00" + "\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x2E\x72\x73\x72\x63\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x40"
Instance Attribute Summary collapse
-
#rsrc_section_raw_size ⇒ Object
Returns the value of attribute rsrc_section_raw_size.
-
#rsrc_section_virtual_address ⇒ Object
Returns the value of attribute rsrc_section_virtual_address.
-
#rsrc_section_virtual_size ⇒ Object
Returns the value of attribute rsrc_section_virtual_size.
-
#size_of_image ⇒ Object
Returns the value of attribute size_of_image.
-
#size_of_initialized_data ⇒ Object
Returns the value of attribute size_of_initialized_data.
-
#time_date_stamp ⇒ Object
Returns the value of attribute time_date_stamp.
Instance Method Summary collapse
-
#initialize ⇒ Stab
constructor
A new instance of Stab.
- #pack ⇒ Object
Constructor Details
#initialize ⇒ Stab
Returns a new instance of Stab.
91 92 93 94 95 96 97 98 |
# File 'lib/exerb/resource_library.rb', line 91 def initialize @time_date_stamp = 0 @size_of_initialized_data = 0 @size_of_image = 0 @rsrc_section_virtual_address = 0 @rsrc_section_virtual_size = 0 @rsrc_section_raw_size = 0 end |
Instance Attribute Details
#rsrc_section_raw_size ⇒ Object
Returns the value of attribute rsrc_section_raw_size.
100 101 102 |
# File 'lib/exerb/resource_library.rb', line 100 def rsrc_section_raw_size @rsrc_section_raw_size end |
#rsrc_section_virtual_address ⇒ Object
Returns the value of attribute rsrc_section_virtual_address.
100 101 102 |
# File 'lib/exerb/resource_library.rb', line 100 def rsrc_section_virtual_address @rsrc_section_virtual_address end |
#rsrc_section_virtual_size ⇒ Object
Returns the value of attribute rsrc_section_virtual_size.
100 101 102 |
# File 'lib/exerb/resource_library.rb', line 100 def rsrc_section_virtual_size @rsrc_section_virtual_size end |
#size_of_image ⇒ Object
Returns the value of attribute size_of_image.
100 101 102 |
# File 'lib/exerb/resource_library.rb', line 100 def size_of_image @size_of_image end |
#size_of_initialized_data ⇒ Object
Returns the value of attribute size_of_initialized_data.
100 101 102 |
# File 'lib/exerb/resource_library.rb', line 100 def size_of_initialized_data @size_of_initialized_data end |
#time_date_stamp ⇒ Object
Returns the value of attribute time_date_stamp.
100 101 102 |
# File 'lib/exerb/resource_library.rb', line 100 def time_date_stamp @time_date_stamp end |
Instance Method Details
#pack ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/exerb/resource_library.rb', line 102 def pack binary = BASE_BINARY.dup binary[0x00B8, 4] = [@time_date_stamp].pack('L') binary[0x00D0, 4] = [@size_of_initialized_data].pack('L') binary[0x0100, 4] = [@size_of_image].pack('L') binary[0x0138, 4] = [@rsrc_section_virtual_address].pack('L') binary[0x013C, 4] = [@rsrc_section_virtual_size].pack('L') binary[0x01B0, 4] = [@rsrc_section_virtual_size].pack('L') binary[0x01B4, 4] = [@rsrc_section_virtual_address].pack('L') binary[0x01B8, 4] = [@rsrc_section_raw_size].pack('L') return binary end |