Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __BARRY_COD_INTERNAL_H__
00029 #define __BARRY_COD_INTERNAL_H__
00030
00031 #include "dll.h"
00032 #include <stdint.h>
00033 #include <sys/types.h>
00034
00035 #define CODFILE_TYPE_SIMPLE {0xDE, 0xC0}
00036 #define CODFILE_TYPE_PKZIP {0x50, 0x4B}
00037 #define PKZIP_LOCAL_FILE_SIG {0x50, 0x4B, 0x03, 0x04}
00038 #define PKZIP_DIRECTORY_SIG {0x50, 0x4B, 0x01, 0x02}
00039 #define PKZIP_END_DIRECTORY_SIG {0x50, 0x4B, 0x05, 0x06}
00040
00041
00042 typedef struct BXLOCAL {
00043 uint16_t hour:5;
00044 uint16_t minute:6;
00045 uint16_t second:5;
00046 } __attribute__ ((packed)) msdos_time_t;
00047
00048
00049 typedef struct BXLOCAL {
00050 uint16_t year:7;
00051 uint16_t month:4;
00052 uint16_t day:5;
00053 } __attribute__ ((packed)) msdos_date_t;
00054
00055
00056 typedef struct BXLOCAL {
00057
00058 uint16_t version_needed;
00059 uint16_t general_flag;
00060 uint16_t compression_method;
00061 msdos_time_t last_mod_time;
00062 msdos_date_t last_mod_date;
00063 uint32_t crc_32;
00064 uint32_t compressed_size;
00065 uint32_t uncompressed_size;
00066 uint16_t file_name_length;
00067 uint16_t extra_field_length;
00068
00069
00070 } __attribute__ ((packed)) pkzip_local_header_t;
00071
00072
00073 typedef struct BXLOCAL {
00074
00075 uint16_t version_madeby;
00076 uint16_t version_needed;
00077 uint16_t general_flag;
00078 uint16_t compression_method;
00079 msdos_time_t last_mod_time;
00080 msdos_date_t last_mod_date;
00081 uint32_t crc_32;
00082 uint32_t compressed_size;
00083 uint32_t uncompressed_size;
00084 uint16_t file_name_length;
00085 uint16_t extra_field_length;
00086 uint16_t file_comment_length;
00087 uint16_t disk_number;
00088 uint16_t internal_file_attr;
00089 uint32_t external_file_attr;
00090 uint32_t relative_offset;
00091
00092
00093
00094
00095 } __attribute__ ((packed)) pkzip_directory_t;
00096
00097
00098 typedef struct BXLOCAL {
00099
00100 uint16_t this_disk_number;
00101 uint16_t disk_with_first;
00102
00103 uint16_t this_disk_entry_count;
00104 uint16_t total_entry_count;
00105
00106 uint32_t directory_length;
00107 uint32_t directory_offset;
00108
00109 uint16_t file_comment_length;
00110
00111 } __attribute__ ((packed)) pkzip_end_directory_t;
00112
00113
00114 typedef struct BXLOCAL {
00115 uint16_t type;
00116 uint8_t unknown1[8];
00117 uint8_t unknown2[4];
00118 uint8_t unknown3[4];
00119 uint32_t size1;
00120 uint32_t size2;
00121 uint8_t strsize;
00122 uint8_t reserved2;
00123 uint8_t strfree;
00124 uint8_t reserved3;
00125 } __attribute__ ((packed)) codfile_header_t;
00126
00127
00128 typedef struct BXLOCAL {
00129 uint32_t flashid;
00130 uint32_t section_number;
00131 uint32_t vtable_pointer;
00132 time_t timestamp;
00133 uint32_t user_version;
00134 uint32_t fieldref_pointer;
00135 uint16_t maxtype_list_size;
00136 uint16_t reserved;
00137 int32_t data_section;
00138 int32_t module_info;
00139 uint16_t version;
00140 uint16_t code_size;
00141 uint16_t data_size;
00142 uint16_t flags;
00143 } __attribute__ ((packed)) code_header_t;
00144
00145
00146 typedef struct BXLOCAL {
00147 uint8_t flags;
00148 uint8_t version;
00149 uint16_t num_icalls;
00150 uint8_t num_modules;
00151 uint8_t num_classes ;
00152 uint16_t exported_string_offset;
00153 uint16_t data_uint8_ts_offset;
00154 uint16_t empty_field;
00155 uint16_t class_definitions;
00156 uint16_t array_of_unknow1_fields[14];
00157 uint16_t aliases;
00158 uint16_t array_of_unknow2_fields[22];
00159 } __attribute__ ((packed)) data_header_t;
00160
00161 #endif
00162