1 // copyright (c) 2019-2021 hors<horsicq@gmail.com> 2 // 3 // Permission is hereby granted, free of charge, to any person obtaining a copy 4 // of this software and associated documentation files (the "Software"), to deal 5 // in the Software without restriction, including without limitation the rights 6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 // copies of the Software, and to permit persons to whom the Software is 8 // furnished to do so, subject to the following conditions: 9 10 // The above copyright notice and this permission notice shall be included in all 11 // copies or substantial portions of the Software. 12 13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 // SOFTWARE. 20 // 21 #ifndef LE_DEFS_H 22 #define LE_DEFS_H 23 24 #include "../formatwidget.h" 25 #include "xle.h" 26 27 namespace SLE 28 { 29 enum TYPE 30 { 31 TYPE_HEX=0, 32 TYPE_DISASM, 33 TYPE_STRINGS, 34 TYPE_MEMORYMAP, 35 TYPE_ENTROPY, 36 TYPE_HEURISTICSCAN, 37 TYPE_DOS_HEADER, 38 TYPE_VXD_HEADER, 39 TYPE_OBJECTS, 40 TYPE_OVERLAY, 41 __TYPE_size 42 }; 43 } 44 45 namespace N_LE_DOS_HEADER 46 { 47 enum DATA 48 { 49 e_magic=0, 50 e_cblp, 51 e_cp, 52 e_crlc, 53 e_cparhdr, 54 e_minalloc, 55 e_maxalloc, 56 e_ss, 57 e_sp, 58 e_csum, 59 e_ip, 60 e_cs, 61 e_lfarlc, 62 e_ovno, 63 e_res_0, 64 e_res_1, 65 e_res_2, 66 e_res_3, 67 e_oemid, 68 e_oeminfo, 69 e_res2_0, 70 e_res2_1, 71 e_res2_2, 72 e_res2_3, 73 e_res2_4, 74 e_res2_5, 75 e_res2_6, 76 e_res2_7, 77 e_res2_8, 78 e_res2_9, 79 e_lfanew, 80 __data_size 81 }; 82 83 extern const FW_DEF::HEADER_RECORD records[__data_size]; 84 } 85 86 namespace N_VXD_HEADER 87 { 88 enum DATA 89 { 90 e32_magic=0, 91 e32_border, 92 e32_worder, 93 e32_level, 94 e32_cpu, 95 e32_os, 96 e32_ver, 97 e32_mflags, 98 e32_mpages, 99 e32_startobj, 100 e32_eip, 101 e32_stackobj, 102 e32_esp, 103 e32_pagesize, 104 e32_lastpagesize, 105 e32_fixupsize, 106 e32_fixupsum, 107 e32_ldrsize, 108 e32_ldrsum, 109 e32_objtab, 110 e32_objcnt, 111 e32_objmap, 112 e32_itermap, 113 e32_rsrctab, 114 e32_rsrccnt, 115 e32_restab, 116 e32_enttab, 117 e32_dirtab, 118 e32_dircnt, 119 e32_fpagetab, 120 e32_frectab, 121 e32_impmod, 122 e32_impmodcnt, 123 e32_impproc, 124 e32_pagesum, 125 e32_datapage, 126 e32_preload, 127 e32_nrestab, 128 e32_cbnrestab, 129 e32_nressum, 130 e32_autodata, 131 e32_debuginfo, 132 e32_debuglen, 133 e32_instpreload, 134 e32_instdemand, 135 e32_heapsize, 136 __data_size 137 }; 138 139 extern const FW_DEF::HEADER_RECORD records[__data_size]; 140 } 141 142 namespace N_O32_OBJ 143 { 144 enum DATA 145 { 146 o32_size=0, 147 o32_base, 148 o32_flags, 149 o32_pagemap, 150 o32_mapsize, 151 o32_reserved, 152 __data_size 153 }; 154 155 extern const FW_DEF::HEADER_RECORD records[__data_size]; 156 } 157 158 #endif // LE_DEFS_H 159