From e24cb247fff9d960211a80b8f10c42e3aa86aa34 Mon Sep 17 00:00:00 2001 From: Anders Liu Date: Thu, 14 Jun 2018 22:03:54 -0700 Subject: [PATCH] Ship 0.2.0 * Shows basic data of all metadata streams. --- latest/ui.css | 2 +- latest/ui.css.map | 2 +- latest/ui.js | 2 +- latest/ui.js.map | 2 +- latest/worker.js | 2 +- latest/worker.js.map | 2 +- ui.css | 2 +- ui.css.map | 2 +- ui.js | 2 +- ui.js.map | 2 +- worker.js | 2 +- worker.js.map | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/latest/ui.css b/latest/ui.css index acf2c72..4892ab9 100644 --- a/latest/ui.css +++ b/latest/ui.css @@ -1,3 +1,3 @@ -body,input,select{font-family:"Roboto",sans-serif;font-weight:400;color:#222;font-size:14px;margin:0;padding:0}strong,.strong{font-family:"Roboto",sans-serif;font-weight:700}.info{color:#004085;border:1px solid #b8daff;border-radius:5px;background:#cce5ff;padding:10px;margin:10px}.nav{cursor:pointer}.pgn{margin:4px 0}.pgn select{margin:0 10px}#app{display:grid;position:absolute;width:100%;height:100%;grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}#app-header{grid-column:1/3;grid-row:1;color:#222;background:#83d0f2;padding:10px}#app-header .pg-title{display:inline-block;margin:0 0 4px 0;font-size:28px}#app-header .pg-finfo{display:inline-block;vertical-align:baseline;margin-left:20px}#app-nav-list{grid-column:1;grid-row:2;padding:10px;background:#e4f0f5;overflow:auto}#app-nav-list .nav{margin-left:10px}#app-nav-list .nav:hover{text-decoration:underline}#app-nav-list th{font-family:"Roboto",sans-serif;font-weight:700;text-align:left}#app-content{grid-column:2;grid-row:2;overflow:auto;padding:10px}#app-content .struct-title{font-size:18px;margin:10px 0;padding:4px 6px;border-left:4px solid;color:#3f87a6}#app-content .struct-table{font-family:"Roboto Mono",monospace;border-collapse:collapse;border-bottom:2px solid #777}#app-content .struct-table th,#app-content .struct-table td{white-space:nowrap;padding:2px 10px;vertical-align:text-top}#app-content .struct-table th.wrap,#app-content .struct-table td.wrap{white-space:normal;overflow-wrap:break-word;word-break:break-word}#app-content .struct-table th{font-family:"Roboto",sans-serif;font-weight:700;text-align:left}#app-content .struct-table .st-hdr{border-bottom:1px solid #777;background:#3f87a6;color:#fff}#app-content .struct-table .st-grphdr{border-top:1px solid #777;border-bottom:1px solid #777;background:#83d0f2}#app-content .struct-table .st-tr:nth-child(even){background:#fff}#app-content .struct-table .st-tr:nth-child(odd){background:#e4f0f5}#app-content .file-opener{margin-top:100px;text-align:center;font-size:18px}#app-content .file-opener input{font-size:18px}#app-content .file-opener .info{margin-left:auto;margin-right:auto;width:fit-content}#app-content .top-lnk{text-align:right;margin:4px 0}#app-footer{grid-column:1/3;grid-row:3;color:#fff;background:#222;padding:10px;white-space:nowrap;font-size:12px}#app-footer a{color:#fff}#app-footer>div{display:inline-block;vertical-align:baseline}#app-footer>div:not(:first-child){margin-left:20px}#app-footer>div>strong{font-size:18px} +body,input,select{font-family:"Roboto",sans-serif;font-weight:400;color:#222;font-size:14px;margin:0;padding:0}strong,.strong{font-family:"Roboto",sans-serif;font-weight:700}.info{color:#004085;border:1px solid #b8daff;border-radius:5px;background:#cce5ff;padding:10px;margin:10px}.nav{cursor:pointer}.pgn{margin:4px 0}.pgn select{margin:0 10px}#app{display:grid;position:absolute;width:100%;height:100%;grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}#app-header{grid-column:1/3;grid-row:1;color:#222;background:#83d0f2;padding:10px}#app-header .pg-finame{display:inline-block;margin:0 0 4px 0;font-size:28px}#app-header .pg-finame:not(:last-child){padding-right:10px;border-right:2px solid #3f87a6}#app-header .pg-title{font-family:"Roboto",sans-serif;font-weight:400;display:inline-block;margin-left:10px;font-size:18px}#app-nav-list{grid-column:1;grid-row:2;padding:10px;background:#e4f0f5;overflow:auto}#app-nav-list .nav{margin-left:10px}#app-nav-list .nav:hover{text-decoration:underline}#app-nav-list>ul{margin:0;padding:0;list-style:none}#app-content{grid-column:2;grid-row:2;overflow:auto;padding:10px}#app-content .struct-title{font-size:18px;margin:10px 0;padding:4px 6px;border-left:4px solid;color:#3f87a6}#app-content .struct-table{font-family:"Roboto Mono",monospace;border-collapse:collapse;border-bottom:2px solid #777}#app-content .struct-table th,#app-content .struct-table td{white-space:nowrap;padding:2px 10px;vertical-align:text-top}#app-content .struct-table th.wrap,#app-content .struct-table td.wrap{white-space:normal;overflow-wrap:break-word;word-break:break-word}#app-content .struct-table th{font-family:"Roboto",sans-serif;font-weight:700;text-align:left}#app-content .struct-table .st-hdr{border-bottom:1px solid #777;background:#3f87a6;color:#fff}#app-content .struct-table .st-grphdr{border-top:1px solid #777;border-bottom:1px solid #777;background:#83d0f2}#app-content .struct-table .st-tr:nth-child(even){background:#fff}#app-content .struct-table .st-tr:nth-child(odd){background:#e4f0f5}#app-content .file-opener{margin-top:100px;text-align:center;font-size:18px}#app-content .file-opener input{font-size:18px}#app-content .file-opener .info{margin-left:auto;margin-right:auto;width:fit-content}#app-content .top-lnk{text-align:right;margin:4px 0}#app-footer{grid-column:1/3;grid-row:3;color:#fff;background:#222;padding:10px;white-space:nowrap;font-size:12px}#app-footer a{color:#fff}#app-footer>div{display:inline-block;vertical-align:baseline}#app-footer>div:not(:first-child){margin-left:20px}#app-footer>div>strong{font-size:18px} /*# sourceMappingURL=ui.css.map */ diff --git a/latest/ui.css.map b/latest/ui.css.map index 95dee56..9e33f6d 100644 --- a/latest/ui.css.map +++ b/latest/ui.css.map @@ -1 +1 @@ -{"version":3,"file":"ui.css","sources":["ui.scss","_var.scss","_mixin.scss"],"sourcesContent":["@import \"var\";\n@import \"mixin\";\n\nbody, input, select {\n @include txt-normal;\n \n color: $color-txt;\n font-size: $size-txt-mid;\n margin: 0;\n padding: 0;\n}\n\nstrong, .strong {\n @include txt-bold;\n}\n\n.info {\n color: $color-info-txt;\n border: 1px solid $color-info-bdr;\n border-radius: 5px;\n background: $color-info-bg;\n padding: $size-pad-lg;\n margin: $size-pad-lg;\n}\n\n.nav {\n cursor: pointer;\n}\n\n.pgn {\n margin: $size-pad-mid 0;\n\n select {\n margin:0 $size-pad-lg;\n }\n}\n\n#app {\n display: grid;\n position: absolute;\n width: 100%;\n height: 100%;\n grid-template-rows: auto 1fr auto;\n grid-template-columns: auto 1fr;\n}\n\n#app-header {\n grid-column: 1/3;\n grid-row: 1;\n color: $color-txt;\n background: $color-bg-mid;\n padding: $size-pad-lg;\n\n .pg-title {\n display: inline-block;\n margin: 0 0 $size-pad-mid 0;\n font-size: $size-txt-lg;\n }\n\n .pg-finfo {\n display: inline-block;\n vertical-align: baseline;\n margin-left: 2 * $size-pad-lg;\n }\n}\n\n#app-nav-list {\n grid-column: 1;\n grid-row: 2;\n padding: $size-pad-lg;\n background: $color-bg-mid-lt;\n overflow: auto;\n\n .nav {\n margin-left: $size-pad-lg;\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n th {\n @include txt-bold;\n text-align: left;\n }\n}\n\n#app-content {\n grid-column: 2;\n grid-row: 2;\n overflow: auto;\n padding: $size-pad-lg;\n\n .struct-title {\n font-size: $size-txt-mid-lg;\n margin: $size-pad-lg 0;\n padding: $size-pad-mid $size-pad-lg - $size-pad-mid;\n border-left: $size-pad-mid solid;\n color: $color-bg-mid-dk;\n }\n\n .struct-table {\n @include txt-code;\n border-collapse: collapse;\n border-bottom: 2px solid $color-txt-mid-lt;\n \n th, td {\n white-space: nowrap;\n padding: $size-pad-sm $size-pad-lg;\n vertical-align: text-top;\n\n &.wrap {\n white-space: normal;\n //max-width: 395px;\n overflow-wrap: break-word;\n word-break: break-word;\n }\n }\n \n th {\n @include txt-bold;\n text-align: left;\n }\n\n .st-hdr {\n border-bottom: 1px solid $color-txt-mid-lt;\n background: $color-bg-mid-dk;\n color: $color-txt-lt;\n }\n\n .st-grphdr{\n border-top: 1px solid $color-txt-mid-lt;\n border-bottom: 1px solid $color-txt-mid-lt;\n background: $color-bg-mid;\n }\n\n .st-tr{\n &:nth-child(even) {\n background: $color-bg-lt;\n }\n\n &:nth-child(odd) {\n background: $color-bg-mid-lt;\n }\n }\n }\n\n .file-opener {\n margin-top: 100px;\n text-align: center;\n font-size: $size-txt-mid-lg;\n\n input {\n font-size: $size-txt-mid-lg;\n }\n\n .info {\n margin-left: auto;\n margin-right: auto;\n width: fit-content;\n }\n }\n\n .top-lnk {\n text-align: right;\n margin: $size-pad-mid 0;\n }\n}\n\n#app-footer {\n grid-column: 1/3;\n grid-row: 3;\n color: $color-txt-lt;\n background: $color-bg-dk;\n padding: $size-pad-lg;\n white-space: nowrap;\n font-size: $size-txt-sm;\n\n a {\n color: $color-txt-lt;\n }\n\n &>div {\n display: inline-block;\n vertical-align: baseline;\n\n &:not(:first-child) {\n margin-left: 2 * $size-pad-lg;\n }\n\n &>strong {\n font-size: $size-txt-mid-lg;\n }\n }\n}","$font-mono: 'Roboto Mono', monospace;\n$font-text: 'Roboto', sans-serif;\n\n$font-w-reg: 400;\n$font-w-bold: 700;\n\n$color-bg-lt: #ffffff;\n$color-bg-mid-lt: #e4f0f5;\n$color-bg-mid: #83d0f2;\n$color-bg-mid-dk: #3f87a6;\n$color-bg-dk: #222222;\n$color-txt-lt: #ffffff;\n$color-txt-mid-lt: #777777;\n$color-txt: #222222;\n\n$color-info-txt: #004085;\n$color-info-bg: #cce5ff;\n$color-info-bdr: #b8daff;\n\n$size-pad-sm: 2px;\n$size-pad-mid: 4px;\n$size-pad-lg: 10px;\n\n$size-txt-sm: 12px;\n$size-txt-mid: 14px;\n$size-txt-mid-lg: 18px;\n$size-txt-lg: 28px;\n\n$size-ln-height-normal: 24px;\n","@import \"var\";\n@mixin txt-normal {\n font-family: $font-text;\n font-weight: $font-w-reg;\n}\n\n@mixin txt-bold {\n font-family: $font-text;\n font-weight: $font-w-bold;\n}\n\n@mixin txt-code {\n font-family: $font-mono;\n}"],"names":[],"mappings":"AAGA,AAAA,IAAI,CAAE,KAAK,CAAE,MAAM,AAAC,CEDhB,WAAW,CDDH,QAAQ,CAAE,UAAU,CCE5B,WAAW,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Y,CAAC,CAC1B,AAGL,AAAA,WAAW,AAAC,CACR,WAAW,CAAE,GAAG,CAChB,QAAQ,CAAE,CAAC,CACX,KAAK,CCjKM,IAAO,CDkKlB,UAAU,CCnKA,IAAO,CDoKjB,OAAO,CCzJG,IAAI,CD0Jd,WAAW,CAAE,MAAM,CACnB,SAAS,CCzJC,IAAI,CD2KjB,AAzBD,AASI,WATO,CASP,CAAC,AAAC,CACE,KAAK,CCxKE,IAAO,CDyKjB,AAXL,AAaI,WAbO,CAaL,GAAG,AAAC,CACF,OAAO,CAAE,YAAY,CACrB,cAAc,CAAE,QAAQ,CAS3B,AAxBL,AAiBQ,WAjBG,CAaL,GAAG,AAIA,IAAK,CAAA,YAAY,CAAE,CAChB,WAAW,CAAE,IAAgB,CAChC,AAnBT,AAqBQ,WArBG,CAaL,GAAG,CAQC,MAAM,AAAC,CACL,SAAS,CCtKH,IAAI,CDuKb"} \ No newline at end of file +{"version":3,"file":"ui.css","sources":["ui.scss","_var.scss","_mixin.scss"],"sourcesContent":["@import \"var\";\n@import \"mixin\";\n\nbody, input, select {\n @include txt-normal;\n \n color: $color-txt;\n font-size: $size-txt-mid;\n margin: 0;\n padding: 0;\n}\n\nstrong, .strong {\n @include txt-bold;\n}\n\n.info {\n color: $color-info-txt;\n border: 1px solid $color-info-bdr;\n border-radius: 5px;\n background: $color-info-bg;\n padding: $size-pad-lg;\n margin: $size-pad-lg;\n}\n\n.nav {\n cursor: pointer;\n}\n\n.pgn {\n margin: $size-pad-mid 0;\n\n select {\n margin:0 $size-pad-lg;\n }\n}\n\n#app {\n display: grid;\n position: absolute;\n width: 100%;\n height: 100%;\n grid-template-rows: auto 1fr auto;\n grid-template-columns: auto 1fr;\n}\n\n#app-header {\n grid-column: 1/3;\n grid-row: 1;\n color: $color-txt;\n background: $color-bg-mid;\n padding: $size-pad-lg;\n\n .pg-finame {\n display: inline-block;\n margin: 0 0 $size-pad-mid 0;\n font-size: $size-txt-lg;\n &:not(:last-child) {\n padding-right: $size-pad-lg;\n border-right: 2px solid $color-bg-mid-dk;\n }\n }\n\n .pg-title {\n @include txt-normal;\n display: inline-block;\n margin-left: $size-pad-lg;\n font-size: $size-txt-mid-lg;\n }\n}\n\n#app-nav-list {\n grid-column: 1;\n grid-row: 2;\n padding: $size-pad-lg;\n background: $color-bg-mid-lt;\n overflow: auto;\n\n .nav {\n margin-left: $size-pad-lg;\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n &>ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n}\n\n#app-content {\n grid-column: 2;\n grid-row: 2;\n overflow: auto;\n padding: $size-pad-lg;\n\n .struct-title {\n font-size: $size-txt-mid-lg;\n margin: $size-pad-lg 0;\n padding: $size-pad-mid $size-pad-lg - $size-pad-mid;\n border-left: $size-pad-mid solid;\n color: $color-bg-mid-dk;\n }\n\n .struct-table {\n @include txt-code;\n border-collapse: collapse;\n border-bottom: 2px solid $color-txt-mid-lt;\n \n th, td {\n white-space: nowrap;\n padding: $size-pad-sm $size-pad-lg;\n vertical-align: text-top;\n\n &.wrap {\n white-space: normal;\n //max-width: 395px;\n overflow-wrap: break-word;\n word-break: break-word;\n }\n }\n \n th {\n @include txt-bold;\n text-align: left;\n }\n\n .st-hdr {\n border-bottom: 1px solid $color-txt-mid-lt;\n background: $color-bg-mid-dk;\n color: $color-txt-lt;\n }\n\n .st-grphdr{\n border-top: 1px solid $color-txt-mid-lt;\n border-bottom: 1px solid $color-txt-mid-lt;\n background: $color-bg-mid;\n }\n\n .st-tr{\n &:nth-child(even) {\n background: $color-bg-lt;\n }\n\n &:nth-child(odd) {\n background: $color-bg-mid-lt;\n }\n }\n }\n\n .file-opener {\n margin-top: 100px;\n text-align: center;\n font-size: $size-txt-mid-lg;\n\n input {\n font-size: $size-txt-mid-lg;\n }\n\n .info {\n margin-left: auto;\n margin-right: auto;\n width: fit-content;\n }\n }\n\n .top-lnk {\n text-align: right;\n margin: $size-pad-mid 0;\n }\n}\n\n#app-footer {\n grid-column: 1/3;\n grid-row: 3;\n color: $color-txt-lt;\n background: $color-bg-dk;\n padding: $size-pad-lg;\n white-space: nowrap;\n font-size: $size-txt-sm;\n\n a {\n color: $color-txt-lt;\n }\n\n &>div {\n display: inline-block;\n vertical-align: baseline;\n\n &:not(:first-child) {\n margin-left: 2 * $size-pad-lg;\n }\n\n &>strong {\n font-size: $size-txt-mid-lg;\n }\n }\n}","$font-mono: 'Roboto Mono', monospace;\n$font-text: 'Roboto', sans-serif;\n\n$font-w-reg: 400;\n$font-w-bold: 700;\n\n$color-bg-lt: #ffffff;\n$color-bg-mid-lt: #e4f0f5;\n$color-bg-mid: #83d0f2;\n$color-bg-mid-dk: #3f87a6;\n$color-bg-dk: #222222;\n$color-txt-lt: #ffffff;\n$color-txt-mid-lt: #777777;\n$color-txt: #222222;\n\n$color-info-txt: #004085;\n$color-info-bg: #cce5ff;\n$color-info-bdr: #b8daff;\n\n$size-pad-sm: 2px;\n$size-pad-mid: 4px;\n$size-pad-lg: 10px;\n\n$size-txt-sm: 12px;\n$size-txt-mid: 14px;\n$size-txt-mid-lg: 18px;\n$size-txt-lg: 28px;\n\n$size-ln-height-normal: 24px;\n","@import \"var\";\n@mixin txt-normal {\n font-family: $font-text;\n font-weight: $font-w-reg;\n}\n\n@mixin txt-bold {\n font-family: $font-text;\n font-weight: $font-w-bold;\n}\n\n@mixin txt-code {\n font-family: $font-mono;\n}"],"names":[],"mappings":"AAGA,AAAA,IAAI,CAAE,KAAK,CAAE,MAAM,AAAC,CEDhB,WAAW,CDDH,QAAQ,CAAE,UAAU,CCE5B,WAAW,CDAF,GAAG,CDGZ,KAAK,CCOG,IAAO,CDNf,SAAS,CCiBE,IAAI,CDhBf,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CACb,AAED,AAAA,MAAM,CAAE,OAAO,AAAC,CELZ,WAAW,CDNH,QAAQ,CAAE,UAAU,CCO5B,WAAW,CDJD,GAAG,CDUhB,AAED,AAAA,KAAK,AAAC,CACF,KAAK,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GAAG,CAChB,QAAQ,CAAE,CAAC,CACX,KAAK,CCvKM,IAAO,CDwKlB,UAAU,CCzKA,IAAO,CD0KjB,OAAO,CC/JG,IAAI,CDgKd,WAAW,CAAE,MAAM,CACnB,SAAS,CC/JC,IAAI,CDiLjB,AAzBD,AASI,WATO,CASP,CAAC,AAAC,CACE,KAAK,CC9KE,IAAO,CD+KjB,AAXL,AAaI,WAbO,CAaL,GAAG,AAAC,CACF,OAAO,CAAE,YAAY,CACrB,cAAc,CAAE,QAAQ,CAS3B,AAxBL,AAiBQ,WAjBG,CAaL,GAAG,AAIA,IAAK,CAAA,YAAY,CAAE,CAChB,WAAW,CAAE,IAAgB,CAChC,AAnBT,AAqBQ,WArBG,CAaL,GAAG,CAQC,MAAM,AAAC,CACL,SAAS,CC5KH,IAAI,CD6Kb"} \ No newline at end of file diff --git a/latest/ui.js b/latest/ui.js index c28b6f7..eb500b9 100644 --- a/latest/ui.js +++ b/latest/ui.js @@ -1,2 +1,2 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=24)}([function(e,t){e.exports=React},function(e,t){e.exports=ReactRedux},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(5);var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.pageID;if(e){var t={pageID:e,title:"TOP"};return o.createElement("div",{className:"top-lnk"},o.createElement(l.NavLink,{target:t,title:"Back to top"}))}return null},t}(o.Component);t.TopLink=i.connect(function(e){var t=e.pageData;return{pageID:t&&t.nav.pageID}})(c)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0);function i(e,t){return o.createElement("h2",{id:t,className:"struct-title"},e)}function l(e){return i(e.title,e.elemID)}function c(e,t){var n=e.offset,r=e.size,a=e.rawData,i=e.name,l=e.value;e.descriptions;return o.createElement("tr",{key:t,className:"st-tr"},o.createElement("td",null,n),o.createElement("td",null,r),o.createElement("td",null,a.map(function(e,t){return o.createElement("div",{className:"td-line",key:t},e)})),o.createElement("td",null,i),o.createElement("td",{className:"wrap"},l),o.createElement("td",null))}t.renderTableTitle=i,t.renderSimpleStruct=function(e){return o.createElement("div",{className:"struct-data"},l(e),o.createElement(u,null,e.items&&e.items.map(function(e,t){return c(e,t.toString())})))},t.renderGroupedStruct=function(e){return o.createElement("div",{className:"struct-data"},l(e),o.createElement(u,null,e.groups&&e.groups.map(function(e,t){return[(n=e.title,r=t.toString(),n?o.createElement("tr",{key:r,className:"st-grphdr"},o.createElement("th",{colSpan:6},n)):null)].concat(e.items&&e.items.map(function(e,n){return c(e,t+"."+n)})||[]);var n,r})))};var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement("table",{className:"struct-table"},o.createElement("thead",null,o.createElement("tr",{className:"st-hdr"},o.createElement("th",null,"Offset"),o.createElement("th",null,"Size"),o.createElement("th",null,"Raw Data"),o.createElement("th",null,"Name"),o.createElement("th",null,"Value"),o.createElement("th",null,"Description"))),o.createElement("tbody",null,this.props.children))},t}(o.Component)},function(e,t,n){"use strict";t.__esModule=!0,t.createOpenFileAction=function(e){return{type:"OPEN_FILE",file:e}},t.createOpenNavAction=function(e){return{type:"OPEN_NAV",target:e}},t.createSetNavListAction=function(e){return{type:"SET_NAV_LIST",navList:e}},t.createSetPageDataAction=function(e){return{type:"SET_PAGE_DATA",data:e}},t.createSetPEPropsAction=function(e,t){return{type:"SET_PE_PROPS",is32Bit:e,isManaged:t}}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(4);var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props,t=e.target,n=e.disable,r=e.text,a=e.title,i=e.extraClass,l=e.onClick,c="nav";return n&&(c+=" disabled"),i&&(c+=" "+i),n||!t?o.createElement("span",{className:c,title:a},r):o.createElement("a",{className:c,title:a||t.title,onClick:l},r||t.title)},t}(o.Component);t.NavLink=i.connect(null,function(e,t){return{onClick:function(){e(l.createOpenNavAction(t.target))}}})(c)},function(e,t){e.exports=Redux},function(e,t,n){"use strict";t.__esModule=!0,t.createReqOpenFileMessage=function(e){return{type:"REQ_OPEN_FILE",file:e}},t.createReqOpenNavMessage=function(e){return{type:"REQ_OPEN_NAV",target:e}}},function(e,t,n){"use strict";t.__esModule=!0;var r,a,o=n(4),i=n(7);t.workerClientMiddleware=function(e){return function(t){return function(n){switch(n.type){case"OPEN_FILE":var a=n.file;r.postMessage(i.createReqOpenFileMessage(a));break;case"OPEN_NAV":var o=n.target,l=e.getState().pageData,c=o.pageID,u=o.pageNum;l&&l.nav.pageID==c&&l.nav.pageNum==u||r.postMessage(i.createReqOpenNavMessage(o))}return t(n)}}},t.initWorkerClient=function(e){a=e,(r=new Worker("worker.js")).onmessage=function(e){return function(e){switch(e.type){case"RES_NAV_DATA":var t=e.navList;a.dispatch(o.createSetNavListAction(t));break;case"RES_PAGE_DATA":var n=e.pageData;a.dispatch(o.createSetPageDataAction(n));break;case"RES_PE_PROPS":var r=e,i=r.is32Bit,l=r.isManaged;a.dispatch(o.createSetPEPropsAction(i,l))}}(e.data)}}},function(e,t,n){"use strict";function r(e){setTimeout(function(){var t;e?(t=document.getElementById(e))&&t.scrollIntoView():(t=document.getElementById("app-content"))&&(t.scrollTop=0)},1)}t.__esModule=!0,t.actionListenerMiddleware=function(e){return function(t){return function(n){switch(n.type){case"OPEN_FILE":var a=e.getState().appInfo,o=n.file;document.title=o.name+" - "+a.title;break;case"OPEN_NAV":var i=e.getState().pageData,l=n.target,c=l.pageID,u=l.elemID;i&&i.nav.pageID===c&&r(u);break;case"SET_PAGE_DATA":r(n.data.nav.elemID)}return t(n)}}}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1);var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.appInfo,t=e.title,n=e.version,r=e.author,a=e.homepage,i=e.bugsUrl,l=e.releaseNotesUrl,c=e.buildTimeLocal,u=e.year;return o.createElement("footer",{id:"app-footer"},o.createElement("div",null,o.createElement("strong",null,t)),o.createElement("div",null,"© ",u," ",r),o.createElement("div",null,"Version ",n),o.createElement("div",null,"Last build: ",c),o.createElement("div",null,o.createElement("a",{href:l+"#"+n,target:"_blank"},"Release Notes")),o.createElement("div",null,o.createElement("a",{href:"/latest",target:"_blank"},"Try Latest Build")),o.createElement("div",null,o.createElement("a",{href:a,target:"_blank"},"View on GitHub")),o.createElement("div",null,o.createElement("a",{href:i,target:"_blank"},"Report Issue")))},t}(o.Component);t.PageFooter=i.connect(function(e){return{appInfo:e.appInfo}})(l)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(4),c=n(5);var u=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSelectChange=n.handleSelectChange.bind(n),n}return a(t,e),t.prototype.render=function(){var e=this.props,t=e.paging,n=e.pageData;if(!t||!n||t.pageNavList.length<=1)return null;var r=t.currentPageNumber,a=t.pageNavList;n.nav;return o.createElement("div",{className:"pgn"},o.createElement(c.NavLink,{target:a[r-1],disable:r<=0,text:"< prev"}),o.createElement("select",{onChange:this.handleSelectChange,value:a[r].title},t.pageNavList.map(function(e,t){return o.createElement("option",{key:t},e.title)})),o.createElement(c.NavLink,{target:a[r+1],disable:r>=a.length-1,text:"next >"}))},t.prototype.handleSelectChange=function(e){var t=this.props,n=t.paging;(0,t.onSelectionChange)(n.pageNavList[e.currentTarget.selectedIndex])},t}(o.Component);t.Paginate=i.connect(function(e){var t=e.pageData;return{paging:t&&t.paging,pageData:t}},function(e){return{onSelectionChange:function(t){e(l.createOpenNavAction(t))}}})(u)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=n(11),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},o.createElement(c.Paginate,null),i.renderGroupedStruct(e.items),o.createElement(c.Paginate,null),o.createElement(l.TopLink,null))},t}(o.Component);t.PagedItemListPage=u},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},i.renderGroupedStruct(e.tableHeader),o.createElement(l.TopLink,null),this.renderTableList(),o.createElement(l.TopLink,null))},t.prototype.renderTableList=function(){return o.createElement("div",{className:"struct-data"},i.renderTableTitle("Metadata Table List","mdt-lst"),o.createElement("table",{className:"struct-table"},o.createElement("thead",null,o.createElement("tr",{className:"st-hdr"},o.createElement("th",null,"Index"),o.createElement("th",null,"Name"),o.createElement("th",null,"Rows"),o.createElement("th",null,"Valid"),o.createElement("th",null,"Sorted"),o.createElement("th",null,"Link"))),o.createElement("tbody",null,this.props.data.tableInfo.map(function(e,t){return o.createElement("tr",{key:t,className:"st-tr"},o.createElement("td",null,e.index),o.createElement("td",null,e.name),o.createElement("td",null,e.rows),o.createElement("td",null,e.valid?"X":""),o.createElement("td",null,e.sorted?"X":""),o.createElement("td",null))}))))},t}(o.Component);t.MdsTablePage=c},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},i.renderSimpleStruct(e.cliHeader),o.createElement(l.TopLink,null),this.renderMetadataRoot(),this.renderStreamHeaders(),this.renderSNSignature())},t.prototype.renderMetadataRoot=function(){var e=this.props.data;return e.metadataRoot&&o.createElement(o.Fragment,null,i.renderSimpleStruct(e.metadataRoot),o.createElement(l.TopLink,null))},t.prototype.renderStreamHeaders=function(){var e=this.props.data;return e.streamHeaders&&o.createElement(o.Fragment,null,i.renderGroupedStruct(e.streamHeaders),o.createElement(l.TopLink,null))},t.prototype.renderSNSignature=function(){var e=this.props.data;return e.snSignature&&o.createElement(o.Fragment,null,i.renderSimpleStruct(e.snSignature),o.createElement(l.TopLink,null))},t}(o.Component);t.MetadataHeadersPage=c},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},i.renderSimpleStruct(e.dosHeader),o.createElement(l.TopLink,null),i.renderSimpleStruct(e.peSignature),o.createElement(l.TopLink,null),i.renderSimpleStruct(e.fileHeader),o.createElement(l.TopLink,null),i.renderGroupedStruct(e.optionalHeader),o.createElement(l.TopLink,null),i.renderGroupedStruct(e.dataDirectories),o.createElement(l.TopLink,null),i.renderGroupedStruct(e.sectionHeaders),o.createElement(l.TopLink,null))},t}(o.Component);t.HeadersPage=c},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(4);var c=function(e){function t(t){var n=e.call(this,t)||this;return n.onFileChange=n.onFileChange.bind(n),n}return a(t,e),t.prototype.render=function(){return o.createElement("section",{className:"file-opener"},o.createElement("div",null,"Select a file:"),o.createElement("div",null,o.createElement("input",{type:"file",onChange:this.onFileChange})),o.createElement("div",{className:"info"},"No data would be uploaded, everything is parsed locally."))},t.prototype.onFileChange=function(e){var t=this.props.onFileSelected,n=e.target.files;n&&n.length>0&&t(n[0])},t}(o.Component);t.OpenFilePage=i.connect(null,function(e){return{onFileSelected:function(t){return e(l.createOpenFileAction(t))}}})(c)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(16),c=n(15),u=n(14),s=n(13),p=n(12);var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement("section",{id:"app-content"},this.renderContent())},t.prototype.renderContent=function(){var e=this.props.pageData;if(null==e)return o.createElement(l.OpenFilePage,null);switch(e.nav.pageID){case"HEADERS":return o.createElement(c.HeadersPage,{data:e});case"MD_HEADERS":return o.createElement(u.MetadataHeadersPage,{data:e});case"MDS_TABLE":return o.createElement(s.MdsTablePage,{data:e});case"MDS_STRINGS":case"MDS_US":case"MDS_GUID":case"MDS_BLOB":case"MDT_TBL":return o.createElement(p.PagedItemListPage,{data:e});default:return o.createElement("div",null,"Page not found.")}},t}(o.Component);t.PageContent=i.connect(function(e){return{pageData:e.pageData}})(f)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(5);var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.navList;return e&&0!=e.length?o.createElement("section",{id:"app-nav-list"},this.renderNavList(e)):null},t.prototype.renderNavList=function(e){var t=this;this.props.pageData;return o.createElement("ul",null,e.map(function(e,n){return o.createElement("li",{key:n},o.createElement(l.NavLink,{target:e.target,extraClass:t.isSelected(e.target)?"strong":""}),e.children&&t.renderNavList(e.children))}))},t.prototype.isSelected=function(e){var t=this.props.pageData;if(!t)return!1;var n=t.nav,r=n.pageID,a=n.subID;return r==e.pageID&&null==e.elemID&&(null==a||a==e.subID)},t}(o.Component);t.PageNavList=i.connect(function(e){return{pageData:e.pageData,navList:e.navList}})(c)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1);var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.fileInfo;return o.createElement("header",{id:"app-header"},e?this.renderFileInfo(e):this.renderWelcome(),!e&&o.createElement("div",null,"PE Viewer is a simple single-page web application for viewing content of a PE (Portable Executable) file, which is the executabule file on Windows operating system and Microsoft .NET."))},t.prototype.renderWelcome=function(){return o.createElement("div",{className:"pg-title-line"},o.createElement("h1",{className:"pg-title"},"Welcome to PE Viewer."))},t.prototype.renderFileInfo=function(e){var t=e.name,n=e.size,r=e.is32Bit,a=e.isManaged;return o.createElement("div",{className:"pg-title-line"},o.createElement("h1",{className:"pg-title"},t),o.createElement("div",{className:"pg-finfo"},o.createElement("span",null,n.toLocaleString()," bytes."),null!=r&&o.createElement(o.Fragment,null,o.createElement("span",null," | "),o.createElement("span",null,r?"32-bit":"64-bit")),null!=a&&o.createElement(o.Fragment,null,o.createElement("span",null," | "),o.createElement("span",null,a?"managed":"unmanaged"))))},t}(o.Component);t.PageHeader=i.connect(function(e){return{fileInfo:e.fileInfo,navList:e.navList}})(l)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(19),l=n(18),c=n(17),u=n(10),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement(o.Fragment,null,o.createElement(i.PageHeader,null),o.createElement(l.PageNavList,null),o.createElement(c.PageContent,null),o.createElement(u.PageFooter,null))},t}(o.Component);t.App=s},function(e,t,n){"use strict";t.__esModule=!0;var r=n(6);t.appReducer=r.combineReducers({appInfo:function(e,t){void 0===e&&(e=null);return e},fileInfo:function(e,t){void 0===e&&(e=null);switch(t.type){case"OPEN_FILE":var n=t.file,r=n.name,a=n.size;return Object.assign({},e,{name:r,size:a});case"SET_PE_PROPS":var o=t,i=o.is32Bit,l=o.isManaged;return Object.assign({},e,{is32Bit:i,isManaged:l});default:return e}},pageData:function(e,t){void 0===e&&(e=null);switch(t.type){case"SET_PAGE_DATA":var n=t.data;return n;default:return e}},navList:function(e,t){void 0===e&&(e=[]);switch(t.type){case"SET_NAV_LIST":var n=t.navList;return n;default:return e}}})},function(e){e.exports={title:"PE Viewer",version:"0.1.2",author:"Anders Liu",homepage:"https://github.com/anders-liu/peviewer-dev#readme",bugs_url:"https://github.com/anders-liu/peviewer-dev/issues",release_notes:"https://github.com/anders-liu/peviewer/blob/master/RELEASES.md",build_time:"Thu, 14 Jun 2018 04:45:04 GMT"}},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";t.__esModule=!0;var r=n(0),a=n(23),o=n(6),i=n(1),l=n(22),c=n(21),u=n(20),s=n(9),p=n(8),f={title:l.title,version:l.version,author:l.author,homepage:l.homepage,bugsUrl:l.bugs_url,releaseNotesUrl:l.release_notes,buildTimeLocal:new Date(Date.parse(l.build_time)).toLocaleString(),year:(new Date).getFullYear().toString()},d={appInfo:f,navList:[]};document.title=""+f.title;var m=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||o.compose,_=o.createStore(c.appReducer,d,m(o.applyMiddleware(s.actionListenerMiddleware,p.workerClientMiddleware)));p.initWorkerClient(_),a.render(r.createElement(i.Provider,{store:_},r.createElement(u.App,null)),document.getElementById("app"))}]); +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=24)}([function(e,t){e.exports=React},function(e,t){e.exports=ReactRedux},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(5);var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.pageID;if(e){var t={pageID:e,title:"TOP"};return o.createElement("div",{className:"top-lnk"},o.createElement(l.NavLink,{target:t,title:"Back to top"}))}return null},t}(o.Component);t.TopLink=i.connect(function(e){var t=e.pageData;return{pageID:t&&t.nav.pageID}})(c)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0);function i(e,t){return o.createElement("h2",{id:t,className:"struct-title"},e)}function l(e){return i(e.title,e.elemID)}function c(e,t){var n=e.offset,r=e.size,a=e.rawData,i=e.name,l=e.value;e.descriptions;return o.createElement("tr",{key:t,className:"st-tr"},o.createElement("td",null,n),o.createElement("td",null,r),o.createElement("td",null,a.map(function(e,t){return o.createElement("div",{className:"td-line",key:t},e)})),o.createElement("td",null,i),o.createElement("td",{className:"wrap"},l),o.createElement("td",null))}t.renderTableTitle=i,t.renderSimpleStruct=function(e){return o.createElement("div",{className:"struct-data"},l(e),o.createElement(u,null,e.items&&e.items.map(function(e,t){return c(e,t.toString())})))},t.renderGroupedStruct=function(e){return o.createElement("div",{className:"struct-data"},l(e),o.createElement(u,null,e.groups&&e.groups.map(function(e,t){return[(n=e.title,r=t.toString(),n?o.createElement("tr",{key:r,className:"st-grphdr"},o.createElement("th",{colSpan:6},n)):null)].concat(e.items&&e.items.map(function(e,n){return c(e,t+"."+n)})||[]);var n,r})))};var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement("table",{className:"struct-table"},o.createElement("thead",null,o.createElement("tr",{className:"st-hdr"},o.createElement("th",null,"Offset"),o.createElement("th",null,"Size"),o.createElement("th",null,"Raw Data"),o.createElement("th",null,"Name"),o.createElement("th",null,"Value"),o.createElement("th",null,"Description"))),o.createElement("tbody",null,this.props.children))},t}(o.Component)},function(e,t,n){"use strict";t.__esModule=!0,t.createOpenFileAction=function(e){return{type:"OPEN_FILE",file:e}},t.createOpenNavAction=function(e){return{type:"OPEN_NAV",target:e}},t.createSetNavListAction=function(e){return{type:"SET_NAV_LIST",navList:e}},t.createSetPageDataAction=function(e){return{type:"SET_PAGE_DATA",data:e}},t.createSetPEPropsAction=function(e,t){return{type:"SET_PE_PROPS",is32Bit:e,isManaged:t}}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(4);var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props,t=e.target,n=e.disable,r=e.text,a=e.title,i=e.extraClass,l=e.onClick,c="nav";return n&&(c+=" disabled"),i&&(c+=" "+i),n||!t?o.createElement("span",{className:c,title:a},r):o.createElement("a",{className:c,title:a||t.title,onClick:l},r||t.title)},t}(o.Component);t.NavLink=i.connect(null,function(e,t){return{onClick:function(){e(l.createOpenNavAction(t.target))}}})(c)},function(e,t){e.exports=Redux},function(e,t,n){"use strict";t.__esModule=!0,t.createReqOpenFileMessage=function(e){return{type:"REQ_OPEN_FILE",file:e}},t.createReqOpenNavMessage=function(e){return{type:"REQ_OPEN_NAV",target:e}}},function(e,t,n){"use strict";t.__esModule=!0;var r,a,o=n(4),i=n(7);t.workerClientMiddleware=function(e){return function(t){return function(n){switch(n.type){case"OPEN_FILE":var a=n.file;r.postMessage(i.createReqOpenFileMessage(a));break;case"OPEN_NAV":var o=n.target,l=e.getState().pageData,c=o.pageID,u=o.pageNum;l&&l.nav.pageID==c&&l.nav.pageNum==u||r.postMessage(i.createReqOpenNavMessage(o))}return t(n)}}},t.initWorkerClient=function(e){a=e,(r=new Worker("worker.js")).onmessage=function(e){return function(e){switch(e.type){case"RES_NAV_DATA":var t=e.navList;a.dispatch(o.createSetNavListAction(t));break;case"RES_PAGE_DATA":var n=e.pageData;a.dispatch(o.createSetPageDataAction(n));break;case"RES_PE_PROPS":var r=e,i=r.is32Bit,l=r.isManaged;a.dispatch(o.createSetPEPropsAction(i,l))}}(e.data)}}},function(e,t,n){"use strict";function r(e){setTimeout(function(){var t;e?(t=document.getElementById(e))&&t.scrollIntoView():(t=document.getElementById("app-content"))&&(t.scrollTop=0)},1)}t.__esModule=!0,t.actionListenerMiddleware=function(e){return function(t){return function(n){switch(n.type){case"OPEN_FILE":var a=e.getState().appInfo,o=n.file;document.title=o.name+" - "+a.title;break;case"OPEN_NAV":var i=e.getState().pageData,l=n.target,c=l.pageID,u=l.elemID;i&&i.nav.pageID===c&&r(u);break;case"SET_PAGE_DATA":r(n.data.nav.elemID)}return t(n)}}}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1);var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.appInfo,t=e.title,n=e.version,r=e.author,a=e.homepage,i=e.bugsUrl,l=e.releaseNotesUrl,c=e.buildTimeLocal,u=e.year;return o.createElement("footer",{id:"app-footer"},o.createElement("div",null,o.createElement("strong",null,t)),o.createElement("div",null,"© ",u," ",r),o.createElement("div",null,"Version ",n),o.createElement("div",null,"Last build: ",c),o.createElement("div",null,o.createElement("a",{href:l+"#"+n.replace(/\./g,""),target:"_blank"},"Release Notes")),o.createElement("div",null,o.createElement("a",{href:"/latest",target:"_blank"},"Try Latest Build")),o.createElement("div",null,o.createElement("a",{href:a,target:"_blank"},"View on GitHub")),o.createElement("div",null,o.createElement("a",{href:i,target:"_blank"},"Report Issue")))},t}(o.Component);t.PageFooter=i.connect(function(e){return{appInfo:e.appInfo}})(l)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(4),c=n(5);var u=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSelectChange=n.handleSelectChange.bind(n),n}return a(t,e),t.prototype.render=function(){var e=this.props,t=e.paging,n=e.pageData;if(!t||!n||t.pageNavList.length<=1)return null;var r=t.currentPageNumber,a=t.pageNavList;n.nav;return o.createElement("div",{className:"pgn"},o.createElement(c.NavLink,{target:a[r-1],disable:r<=0,text:"< prev"}),o.createElement("select",{onChange:this.handleSelectChange,value:a[r].title},t.pageNavList.map(function(e,t){return o.createElement("option",{key:t},e.title)})),o.createElement(c.NavLink,{target:a[r+1],disable:r>=a.length-1,text:"next >"}))},t.prototype.handleSelectChange=function(e){var t=this.props,n=t.paging;(0,t.onSelectionChange)(n.pageNavList[e.currentTarget.selectedIndex])},t}(o.Component);t.Paginate=i.connect(function(e){var t=e.pageData;return{paging:t&&t.paging,pageData:t}},function(e){return{onSelectionChange:function(t){e(l.createOpenNavAction(t))}}})(u)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=n(11),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},o.createElement(c.Paginate,null),i.renderGroupedStruct(e.items),o.createElement(c.Paginate,null),o.createElement(l.TopLink,null))},t}(o.Component);t.PagedItemListPage=u},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},i.renderGroupedStruct(e.tableHeader),o.createElement(l.TopLink,null),this.renderTableList(),o.createElement(l.TopLink,null))},t.prototype.renderTableList=function(){return o.createElement("div",{className:"struct-data"},i.renderTableTitle("Metadata Table List","mdt-lst"),o.createElement("table",{className:"struct-table"},o.createElement("thead",null,o.createElement("tr",{className:"st-hdr"},o.createElement("th",null,"Index"),o.createElement("th",null,"Name"),o.createElement("th",null,"Rows"),o.createElement("th",null,"Valid"),o.createElement("th",null,"Sorted"),o.createElement("th",null,"Link"))),o.createElement("tbody",null,this.props.data.tableInfo.map(function(e,t){return o.createElement("tr",{key:t,className:"st-tr"},o.createElement("td",null,e.index),o.createElement("td",null,e.name),o.createElement("td",null,e.rows),o.createElement("td",null,e.valid?"X":""),o.createElement("td",null,e.sorted?"X":""),o.createElement("td",null))}))))},t}(o.Component);t.MdsTablePage=c},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},i.renderSimpleStruct(e.cliHeader),o.createElement(l.TopLink,null),this.renderMetadataRoot(),this.renderStreamHeaders(),this.renderSNSignature())},t.prototype.renderMetadataRoot=function(){var e=this.props.data;return e.metadataRoot&&o.createElement(o.Fragment,null,i.renderSimpleStruct(e.metadataRoot),o.createElement(l.TopLink,null))},t.prototype.renderStreamHeaders=function(){var e=this.props.data;return e.streamHeaders&&o.createElement(o.Fragment,null,i.renderGroupedStruct(e.streamHeaders),o.createElement(l.TopLink,null))},t.prototype.renderSNSignature=function(){var e=this.props.data;return e.snSignature&&o.createElement(o.Fragment,null,i.renderSimpleStruct(e.snSignature),o.createElement(l.TopLink,null))},t}(o.Component);t.MetadataHeadersPage=c},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},i.renderSimpleStruct(e.dosHeader),o.createElement(l.TopLink,null),i.renderSimpleStruct(e.peSignature),o.createElement(l.TopLink,null),i.renderSimpleStruct(e.fileHeader),o.createElement(l.TopLink,null),i.renderGroupedStruct(e.optionalHeader),o.createElement(l.TopLink,null),i.renderGroupedStruct(e.dataDirectories),o.createElement(l.TopLink,null),i.renderGroupedStruct(e.sectionHeaders),o.createElement(l.TopLink,null))},t}(o.Component);t.HeadersPage=c},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(4);var c=function(e){function t(t){var n=e.call(this,t)||this;return n.onFileChange=n.onFileChange.bind(n),n}return a(t,e),t.prototype.render=function(){return o.createElement("section",{className:"file-opener"},o.createElement("div",null,"Select a file:"),o.createElement("div",null,o.createElement("input",{type:"file",onChange:this.onFileChange})),o.createElement("div",{className:"info"},"No data would be uploaded, everything is parsed locally."))},t.prototype.onFileChange=function(e){var t=this.props.onFileSelected,n=e.target.files;n&&n.length>0&&t(n[0])},t}(o.Component);t.OpenFilePage=i.connect(null,function(e){return{onFileSelected:function(t){return e(l.createOpenFileAction(t))}}})(c)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(16),c=n(15),u=n(14),s=n(13),p=n(12);var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement("section",{id:"app-content"},this.renderContent())},t.prototype.renderContent=function(){var e=this.props.pageData;if(null==e)return o.createElement(l.OpenFilePage,null);switch(e.nav.pageID){case"HEADERS":return o.createElement(c.HeadersPage,{data:e});case"MD_HEADERS":return o.createElement(u.MetadataHeadersPage,{data:e});case"MDS_TABLE":return o.createElement(s.MdsTablePage,{data:e});case"MDS_STRINGS":case"MDS_US":case"MDS_GUID":case"MDS_BLOB":case"MDT_TBL":return o.createElement(p.PagedItemListPage,{data:e});default:return o.createElement("div",null,"Page not found.")}},t}(o.Component);t.PageContent=i.connect(function(e){return{pageData:e.pageData}})(f)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(5);var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.navList;return e&&0!=e.length?o.createElement("section",{id:"app-nav-list"},this.renderNavList(e)):null},t.prototype.renderNavList=function(e){var t=this;this.props.pageData;return o.createElement("ul",null,e.map(function(e,n){return o.createElement("li",{key:n},o.createElement(l.NavLink,{target:e.target,extraClass:t.isSelected(e.target)?"strong":""}),e.children&&t.renderNavList(e.children))}))},t.prototype.isSelected=function(e){var t=this.props.pageData;if(!t)return!1;var n=t.nav,r=n.pageID,a=n.subID;return r==e.pageID&&null==e.elemID&&(null==a||a==e.subID)},t}(o.Component);t.PageNavList=i.connect(function(e){return{pageData:e.pageData,navList:e.navList}})(c)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1);var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.fileInfo;return o.createElement("header",{id:"app-header"},e?this.renderFileInfo():this.renderWelcome(),!e&&o.createElement("div",null,"PE Viewer is a simple single-page web application for viewing content of a PE (Portable Executable) file, which is the executabule file on Windows operating system and Microsoft .NET."))},t.prototype.renderWelcome=function(){return o.createElement("div",{className:"pg-title-line"},o.createElement("h1",{className:"pg-finame"},"Welcome to PE Viewer."))},t.prototype.renderFileInfo=function(){var e=this.props.fileInfo,t=e.name,n=e.size,r=e.is32Bit,a=e.isManaged;return o.createElement("div",{className:"pg-title-line"},o.createElement("h1",{className:"pg-finame"},t),this.renderPageTitle(),o.createElement("div",{className:"pg-finfo"},o.createElement("span",null,n.toLocaleString()," bytes."),null!=r&&o.createElement(o.Fragment,null,o.createElement("span",null," | "),o.createElement("span",null,r?"32-bit":"64-bit")),null!=a&&o.createElement(o.Fragment,null,o.createElement("span",null," | "),o.createElement("span",null,a?"managed":"unmanaged"))))},t.prototype.renderPageTitle=function(){var e=this.props.pageData;return e&&e.nav&&e.nav.title?o.createElement("h1",{className:"pg-title"},e.nav.title):null},t}(o.Component);t.PageHeader=i.connect(function(e){return{fileInfo:e.fileInfo,pageData:e.pageData,navList:e.navList}})(l)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(19),l=n(18),c=n(17),u=n(10),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement(o.Fragment,null,o.createElement(i.PageHeader,null),o.createElement(l.PageNavList,null),o.createElement(c.PageContent,null),o.createElement(u.PageFooter,null))},t}(o.Component);t.App=s},function(e,t,n){"use strict";t.__esModule=!0;var r=n(6);t.appReducer=r.combineReducers({appInfo:function(e,t){void 0===e&&(e=null);return e},fileInfo:function(e,t){void 0===e&&(e=null);switch(t.type){case"OPEN_FILE":var n=t.file,r=n.name,a=n.size;return Object.assign({},e,{name:r,size:a});case"SET_PE_PROPS":var o=t,i=o.is32Bit,l=o.isManaged;return Object.assign({},e,{is32Bit:i,isManaged:l});default:return e}},pageData:function(e,t){void 0===e&&(e=null);switch(t.type){case"SET_PAGE_DATA":var n=t.data;return n;default:return e}},navList:function(e,t){void 0===e&&(e=[]);switch(t.type){case"SET_NAV_LIST":var n=t.navList;return n;default:return e}}})},function(e){e.exports={title:"PE Viewer",version:"0.2.0",author:"Anders Liu",homepage:"https://github.com/anders-liu/peviewer-dev#readme",bugs_url:"https://github.com/anders-liu/peviewer-dev/issues",release_notes:"https://github.com/anders-liu/peviewer/blob/master/RELEASES.md",build_time:"Fri, 15 Jun 2018 05:00:43 GMT"}},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";t.__esModule=!0;var r=n(0),a=n(23),o=n(6),i=n(1),l=n(22),c=n(21),u=n(20),s=n(9),p=n(8),f={title:l.title,version:l.version,author:l.author,homepage:l.homepage,bugsUrl:l.bugs_url,releaseNotesUrl:l.release_notes,buildTimeLocal:new Date(Date.parse(l.build_time)).toLocaleString(),year:(new Date).getFullYear().toString()},d={appInfo:f,navList:[]};document.title=""+f.title;var m=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||o.compose,_=o.createStore(c.appReducer,d,m(o.applyMiddleware(s.actionListenerMiddleware,p.workerClientMiddleware)));p.initWorkerClient(_),a.render(r.createElement(i.Provider,{store:_},r.createElement(u.App,null)),document.getElementById("app"))}]); //# sourceMappingURL=ui.js.map \ No newline at end of file diff --git a/latest/ui.js.map b/latest/ui.js.map index bb2eea5..6ed229e 100644 --- a/latest/ui.js.map +++ b/latest/ui.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"React\"","webpack:///external \"ReactRedux\"","webpack:///./src/ui/scripts/components/top-link.tsx","webpack:///./src/ui/scripts/components/struct-data.tsx","webpack:///./src/ui/scripts/store/actions.ts","webpack:///./src/ui/scripts/components/nav-link.tsx","webpack:///external \"Redux\"","webpack:///./src/ui/scripts/worker-message.ts","webpack:///./src/ui/scripts/worker-client.ts","webpack:///./src/ui/scripts/action-listener.ts","webpack:///./src/ui/scripts/components/page-footer.tsx","webpack:///./src/ui/scripts/components/paginate.tsx","webpack:///./src/ui/scripts/components/paged-item-list-page.tsx","webpack:///./src/ui/scripts/components/mds-table-page.tsx","webpack:///./src/ui/scripts/components/md-headers-page.tsx","webpack:///./src/ui/scripts/components/headers-page.tsx","webpack:///./src/ui/scripts/components/open-file-page.tsx","webpack:///./src/ui/scripts/components/page-content.tsx","webpack:///./src/ui/scripts/components/page-nav-list.tsx","webpack:///./src/ui/scripts/components/page-header.tsx","webpack:///./src/ui/scripts/components/app.tsx","webpack:///./src/ui/scripts/store/reducers.ts","webpack:///external \"ReactDOM\"","webpack:///./src/ui/scripts/index.tsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","React","ReactRedux","nav_link_1","TopLinkClass","_super","__extends","render","pageID","this","props","target","title","createElement","className","NavLink","Component","TopLink","connect","state","pageData","nav","renderTableTitle","elemID","id","renderStructTitle","renderStructItemRow","item","offset","size","rawData","descriptions","map","v","renderSimpleStruct","StructTable","items","toString","renderGroupedStruct","groups","gv","gi","colSpan","concat","children","createOpenFileAction","file","type","createOpenNavAction","createSetNavListAction","navList","createSetPageDataAction","data","createSetPEPropsAction","is32Bit","isManaged","A","NavLinkClass","_a","disable","text","extraClass","onClick","dispatch","ownProps","Redux","createReqOpenFileMessage","createReqOpenNavMessage","_worker","_store","WM","workerClientMiddleware","store","next","action","postMessage","getState","pageNum","initWorkerClient","Worker","onmessage","ev","msg","handleMessage","scrollElement","setTimeout","elem","document","getElementById","scrollIntoView","scrollTop","actionListenerMiddleware","appInfo","PageFooterClass","version","author","homepage","bugsUrl","releaseNotesUrl","buildTimeLocal","year","href","PageFooter","PaginateClass","_this","handleSelectChange","paging","pageNavList","length","currentPageNumber","onChange","evt","onSelectionChange","currentTarget","selectedIndex","Paginate","struct_data_1","top_link_1","paginate_1","PagedItemListPage","MdsTablePage","tableHeader","renderTableList","tableInfo","index","rows","valid","sorted","MetadataHeadersPage","cliHeader","renderMetadataRoot","renderStreamHeaders","renderSNSignature","metadataRoot","Fragment","streamHeaders","snSignature","HeadersPage","dosHeader","peSignature","fileHeader","optionalHeader","dataDirectories","sectionHeaders","OpenFilePageClass","onFileChange","onFileSelected","fileList","files","OpenFilePage","open_file_page_1","headers_page_1","md_headers_page_1","mds_table_page_1","paged_item_list_page_1","PageContentClass","renderContent","PageContent","PageNavListClass","renderNavList","isSelected","subID","PageNavList","PageHeaderClass","fileInfo","renderFileInfo","renderWelcome","toLocaleString","PageHeader","page_header_1","page_nav_list_1","page_content_1","page_footer_1","App","appReducer","combineReducers","name_1","assign","navList_1","ReactDOM","packageJson","R","app_1","action_listener_1","worker_client_1","bugs_url","release_notes","Date","parse","build_time","getFullYear","defaultState","composeEnhancers","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","createStore","applyMiddleware","Provider"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,aAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAArB,EAAAU,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAzB,EAAA6B,EAAA,SAAA1B,GACA,IAAAS,EAAAT,KAAAqB,WACA,WAA2B,OAAArB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAH,EAAAU,EA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eAAe","file":"ui.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 24);\n","module.exports = React;","module.exports = ReactRedux;","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as S from \"../store/state\";\r\nimport { NavLink } from \"./nav-link\";\r\n\r\nexport interface ConnectedProps {\r\n pageID?: W.PageID;\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const { pageData } = state;\r\n\r\n return {\r\n pageID: pageData && pageData.nav.pageID\r\n };\r\n}\r\n\r\nclass TopLinkClass extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { pageID } = this.props;\r\n\r\n if (!pageID) {\r\n return null;\r\n } else {\r\n const target: W.NavTarget = {\r\n pageID,\r\n title: W.KnownTitle.TOP\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n }\r\n}\r\n\r\nexport const TopLink = ReactRedux.connect(mapStateToProps)(TopLinkClass);","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nexport function renderTableTitle(title: string, elemID?: string): JSX.Element {\r\n return

{title}

;\r\n}\r\n\r\nexport function renderSimpleStruct(s: W.SimpleStruct): JSX.Element {\r\n return (\r\n
\r\n {renderStructTitle(s)}\r\n \r\n {s.items && s.items.map((v, i) => renderStructItemRow(v, i.toString()))}\r\n \r\n
\r\n );\r\n}\r\n\r\nexport function renderGroupedStruct(s: W.GroupedStruct): JSX.Element {\r\n return (\r\n
\r\n {renderStructTitle(s)}\r\n \r\n {s.groups && s.groups.map((gv, gi) => {\r\n return [\r\n renderStructGroupTitleRow(gv.title, gi.toString())\r\n ].concat(gv.items && gv.items.map((v, i) =>\r\n renderStructItemRow(v, `${gi}.${i}`)) || []);\r\n })}\r\n \r\n
\r\n );\r\n}\r\n\r\nfunction renderStructTitle(s: W.StructData): JSX.Element {\r\n return renderTableTitle(s.title, s.elemID);\r\n}\r\n\r\nfunction renderStructItemRow(item: W.StructItem, key: string): JSX.Element {\r\n const { offset, size, rawData, name, value, descriptions } = item;\r\n return (\r\n \r\n {offset}\r\n {size}\r\n {rawData.map((v, i) =>
{v}
)}\r\n {name}\r\n {value}\r\n \r\n \r\n );\r\n}\r\n\r\nfunction renderStructGroupTitleRow(title: string, key: string): JSX.Element | null {\r\n return title ? ({title}) : null;\r\n}\r\n\r\nclass StructTable extends React.Component {\r\n public render(): JSX.Element {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.props.children}\r\n \r\n
OffsetSizeRaw DataNameValueDescription
\r\n );\r\n }\r\n}","import * as Redux from \"redux\";\r\n\r\nexport const enum ActionType {\r\n OPEN_FILE = \"OPEN_FILE\",\r\n OPEN_NAV = \"OPEN_NAV\",\r\n\r\n SET_NAV_LIST = \"SET_NAV_LIST\",\r\n SET_PAGE_DATA = \"SET_PAGE_DATA\",\r\n SET_PE_PROPS = \"SET_PE_PROPS\",\r\n SET_WORKER_ERROR = \"SET_WORKER_ERROR\",\r\n}\r\n\r\nexport interface OpenFileAction extends Redux.Action {\r\n file: File;\r\n}\r\n\r\nexport function createOpenFileAction(file: File): OpenFileAction {\r\n return { type: ActionType.OPEN_FILE, file };\r\n}\r\n\r\nexport interface OpenNavAction extends Redux.Action {\r\n target: W.NavTarget;\r\n}\r\n\r\nexport function createOpenNavAction(target: W.NavTarget): OpenNavAction {\r\n return { type: ActionType.OPEN_NAV, target };\r\n}\r\n\r\nexport interface SetNavListAction extends Redux.Action {\r\n navList: W.NavData[];\r\n}\r\n\r\nexport function createSetNavListAction(navList: W.NavData[]): SetNavListAction {\r\n return { type: ActionType.SET_NAV_LIST, navList };\r\n}\r\n\r\nexport interface SetPageDataAction extends Redux.Action {\r\n data: W.PageData;\r\n}\r\n\r\nexport function createSetPageDataAction(data: W.PageData): SetPageDataAction {\r\n return { type: ActionType.SET_PAGE_DATA, data };\r\n}\r\n\r\nexport interface SetPEPropsAction extends Redux.Action {\r\n is32Bit?: boolean;\r\n isManaged?: boolean;\r\n}\r\n\r\nexport function createSetPEPropsAction(is32Bit?: boolean, isManaged?: boolean): SetPEPropsAction {\r\n return { type: ActionType.SET_PE_PROPS, is32Bit, isManaged };\r\n}","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as A from \"../store/actions\";\r\nimport * as S from \"../store/state\";\r\n\r\nexport interface NavLinkProps {\r\n target: W.NavTarget;\r\n disable?: boolean;\r\n text?: string;\r\n title?: string;\r\n extraClass?: string;\r\n}\r\n\r\ninterface ConnectedEvents {\r\n onClick: () => void;\r\n}\r\n\r\nfunction mapDispatchToEvents(dispatch: ReactRedux.Dispatch, ownProps: NavLinkProps): ConnectedEvents {\r\n return {\r\n onClick: () => { dispatch(A.createOpenNavAction(ownProps.target)); }\r\n };\r\n}\r\n\r\nclass NavLinkClass extends React.Component {\r\n public render(): JSX.Element {\r\n const { target, disable, text, title, extraClass, onClick } = this.props;\r\n\r\n let className = \"nav\";\r\n if (disable) {\r\n className += \" disabled\"\r\n }\r\n if (extraClass) {\r\n className += \" \" + extraClass;\r\n }\r\n\r\n if (disable || !target) {\r\n return (\r\n \r\n {text}\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n {text || target.title}\r\n \r\n );\r\n }\r\n }\r\n}\r\n\r\nexport const NavLink = ReactRedux.connect(null, mapDispatchToEvents)(NavLinkClass);","module.exports = Redux;","/// \r\n\r\nexport function createReqOpenFileMessage(file: File): W.ReqOpenFileMessage {\r\n return {\r\n type: W.WorkerMessageType.REQ_OPEN_FILE,\r\n file\r\n };\r\n}\r\n\r\nexport function createReqOpenNavMessage(target: W.NavTarget): W.ReqOpenNavMessage {\r\n return {\r\n type: W.WorkerMessageType.REQ_OPEN_NAV,\r\n target\r\n };\r\n}","/// \r\n\r\nimport * as Redux from \"redux\";\r\n\r\nimport * as A from \"./store/actions\";\r\nimport * as S from \"./store/state\";\r\nimport * as WM from \"./worker-message\";\r\n\r\nexport const workerClientMiddleware = ((store: Redux.MiddlewareAPI) => (next: Redux.Dispatch) => (action: Redux.Action) => {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { file } = action as A.OpenFileAction;\r\n _worker.postMessage(WM.createReqOpenFileMessage(file));\r\n break;\r\n }\r\n\r\n case A.ActionType.OPEN_NAV: {\r\n const { target } = action as A.OpenNavAction;\r\n const { pageData } = store.getState();\r\n const { pageID, pageNum } = target;\r\n if (!pageData || pageData.nav.pageID != pageID || pageData.nav.pageNum != pageNum) {\r\n _worker.postMessage(WM.createReqOpenNavMessage(target));\r\n }\r\n break;\r\n }\r\n }\r\n return next(action);\r\n}) as Redux.Middleware;\r\n\r\nexport function initWorkerClient(store: Redux.Store): void {\r\n _store = store;\r\n _worker = new Worker(\"worker.js\");\r\n _worker.onmessage = ev => handleMessage(ev.data);\r\n}\r\n\r\nfunction handleMessage(msg: W.WorkerMessage): void {\r\n switch (msg.type) {\r\n case W.WorkerMessageType.RES_NAV_DATA:\r\n const { navList } = msg;\r\n _store.dispatch(A.createSetNavListAction(navList));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PAGE_DATA:\r\n const { pageData } = msg;\r\n _store.dispatch(A.createSetPageDataAction(pageData));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PE_PROPS:\r\n const { is32Bit, isManaged } = msg;\r\n _store.dispatch(A.createSetPEPropsAction(is32Bit, isManaged));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PE_ERROR:\r\n break;\r\n }\r\n}\r\n\r\nlet _worker: Worker;\r\nlet _store: Redux.Store;\r\n","import * as Redux from \"redux\";\r\n\r\nimport * as A from \"./store/actions\";\r\nimport * as S from \"./store/state\";\r\n\r\nexport const actionListenerMiddleware = ((store: Redux.MiddlewareAPI) => (next: Redux.Dispatch) => (action: Redux.Action) => {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { appInfo } = store.getState();\r\n const { file } = action as A.OpenFileAction;\r\n document.title = `${file.name} - ${appInfo.title}`\r\n break;\r\n }\r\n\r\n case A.ActionType.OPEN_NAV: {\r\n const { pageData } = store.getState();\r\n const { target } = action as A.OpenNavAction;\r\n const { pageID, elemID } = target;\r\n if (pageData && pageData.nav.pageID === pageID) {\r\n scrollElement(elemID);\r\n }\r\n break;\r\n }\r\n\r\n case A.ActionType.SET_PAGE_DATA: {\r\n const { data } = action as A.SetPageDataAction;\r\n scrollElement(data.nav.elemID);\r\n break;\r\n }\r\n }\r\n return next(action);\r\n}) as Redux.Middleware;\r\n\r\nfunction scrollElement(elemID?: string): void {\r\n setTimeout(() => {\r\n if (elemID) {\r\n const elem = document.getElementById(elemID);\r\n if (elem) {\r\n elem.scrollIntoView();\r\n }\r\n } else {\r\n const elem = document.getElementById(\"app-content\");\r\n if (elem) {\r\n elem.scrollTop = 0;\r\n }\r\n }\r\n }, 1);\r\n}","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport * as S from \"../store/state\";\n\ninterface ConnectedProps {\n appInfo: S.AppInfo;\n}\n\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\n const { appInfo } = state;\n return {\n appInfo\n };\n}\n\nclass PageFooterClass extends React.Component {\n public render(): JSX.Element {\n const { appInfo } = this.props;\n const { title, version, author, homepage, bugsUrl, releaseNotesUrl, buildTimeLocal, year } = appInfo;\n\n return (\n \n )\n }\n}\n\nexport const PageFooter = ReactRedux.connect(mapStateToProps)(PageFooterClass);\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as A from \"../store/actions\";\r\nimport * as S from \"../store/state\";\r\n\r\nimport { NavLink } from \"./nav-link\";\r\n\r\ninterface ConnectedProps {\r\n paging?: W.Paging;\r\n pageData?: W.PageData;\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const pageData = state.pageData as W.PagedItemListPageData;\r\n const paging = pageData && pageData.paging;\r\n\r\n return {\r\n paging,\r\n pageData,\r\n };\r\n}\r\n\r\ninterface ConnectedEvents {\r\n onSelectionChange: (target: W.NavTarget) => void;\r\n}\r\n\r\nfunction mapDispatchToEvents(dispatch: ReactRedux.Dispatch): ConnectedEvents {\r\n return {\r\n onSelectionChange: (target: W.NavTarget) => { dispatch(A.createOpenNavAction(target)); }\r\n };\r\n}\r\n\r\nclass PaginateClass extends React.Component {\r\n constructor(props: any) {\r\n super(props);\r\n this.handleSelectChange = this.handleSelectChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { paging, pageData } = this.props;\r\n if (!paging || !pageData || paging.pageNavList.length <= 1) {\r\n return null;\r\n }\r\n\r\n const { currentPageNumber, pageNavList } = paging;\r\n const { nav } = pageData;\r\n\r\n return (\r\n
\r\n \r\n \r\n {paging.pageNavList.map((v, i) => (\r\n \r\n ))}\r\n \r\n = pageNavList.length - 1}\r\n text=\"next >\" />\r\n
\r\n );\r\n }\r\n\r\n private handleSelectChange(evt: React.ChangeEvent): void {\r\n const { paging, onSelectionChange } = this.props;\r\n onSelectionChange(paging!.pageNavList[evt.currentTarget.selectedIndex]);\r\n }\r\n}\r\n\r\nexport const Paginate = ReactRedux.connect(mapStateToProps, mapDispatchToEvents)(PaginateClass);\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport { renderTableTitle, renderGroupedStruct } from \"./struct-data\";\r\nimport { TopLink } from \"./top-link\";\r\nimport { Paginate } from \"./paginate\";\r\n\r\ninterface PagedItemListPageProps {\r\n data: W.PagedItemListPageData;\r\n}\r\n\r\nexport class PagedItemListPage extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { data } = this.props;\r\n\r\n return (\r\n
\r\n \r\n {renderGroupedStruct(data.items)}\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport { renderTableTitle, renderSimpleStruct, renderGroupedStruct } from \"./struct-data\";\r\nimport { TopLink } from \"./top-link\";\r\n\r\ninterface MdsTablePageProps {\r\n data: W.MdsTablePageData;\r\n}\r\n\r\nexport class MdsTablePage extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { data } = this.props;\r\n\r\n return (\r\n
\r\n {renderGroupedStruct(data.tableHeader)}\r\n \r\n {this.renderTableList()}\r\n \r\n
\r\n );\r\n }\r\n\r\n private renderTableList(): JSX.Element {\r\n return (\r\n
\r\n {renderTableTitle(W.KnownTitle.MDT_LIST, W.KnownElemID.MDT_LIST)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.props.data.tableInfo.map((v, i) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
IndexNameRowsValidSortedLink
{v.index}{v.name}{v.rows}{v.valid ? \"X\" : \"\"}{v.sorted ? \"X\" : \"\"}
\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport { renderSimpleStruct, renderGroupedStruct } from \"./struct-data\";\nimport { TopLink } from \"./top-link\";\n\ninterface MetadataHeadersPageProps {\n data: W.MetadataHeadersPageData;\n}\n\nexport class MetadataHeadersPage extends React.Component {\n public render(): JSX.Element | null {\n const { data } = this.props;\n\n return (\n
\n {renderSimpleStruct(data.cliHeader)}\n \n {this.renderMetadataRoot()}\n {this.renderStreamHeaders()}\n {this.renderSNSignature()}\n
\n );\n }\n\n private renderMetadataRoot(): JSX.Element | undefined {\n const { data } = this.props;\n return data.metadataRoot && (\n \n {renderSimpleStruct(data.metadataRoot)}\n \n \n );\n }\n\n private renderStreamHeaders(): JSX.Element | undefined {\n const { data } = this.props;\n return data.streamHeaders && (\n \n {renderGroupedStruct(data.streamHeaders)}\n \n \n );\n }\n\n private renderSNSignature(): JSX.Element | undefined {\n const { data } = this.props;\n return data.snSignature && (\n \n {renderSimpleStruct(data.snSignature)}\n \n \n );\n }\n}\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport { renderSimpleStruct, renderGroupedStruct } from \"./struct-data\";\r\nimport { TopLink } from \"./top-link\";\r\n\r\ninterface HeadersPageProps {\r\n data: W.HeadersPageData;\r\n}\r\n\r\nexport class HeadersPage extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { data } = this.props;\r\n\r\n return (\r\n
\r\n {renderSimpleStruct(data.dosHeader)}\r\n \r\n {renderSimpleStruct(data.peSignature)}\r\n \r\n {renderSimpleStruct(data.fileHeader)}\r\n \r\n {renderGroupedStruct(data.optionalHeader)}\r\n \r\n {renderGroupedStruct(data.dataDirectories)}\r\n \r\n {renderGroupedStruct(data.sectionHeaders)}\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as A from \"../store/actions\";\r\nimport * as S from \"../store/state\";\r\n\r\ninterface ConnectedEvents {\r\n onFileSelected: (file: File) => void;\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: ReactRedux.Dispatch): ConnectedEvents {\r\n return {\r\n onFileSelected: (file) => dispatch(A.createOpenFileAction(file))\r\n };\r\n}\r\n\r\nclass OpenFilePageClass extends React.Component {\r\n public constructor(props: any) {\r\n super(props);\r\n this.onFileChange = this.onFileChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n
Select a file:
\r\n
\r\n
No data would be uploaded, everything is parsed locally.
\r\n
\r\n )\r\n }\r\n\r\n private onFileChange(ev: React.ChangeEvent): void {\r\n const { onFileSelected } = this.props;\r\n const fileList = ev.target.files;\r\n if (fileList && fileList.length > 0) {\r\n onFileSelected(fileList[0]);\r\n }\r\n }\r\n}\r\n\r\nexport const OpenFilePage = ReactRedux.connect(null, mapDispatchToProps)(OpenFilePageClass);\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as S from \"../store/state\";\r\n\r\nimport { OpenFilePage } from \"./open-file-page\";\r\nimport { HeadersPage } from \"./headers-page\";\r\nimport { MetadataHeadersPage } from \"./md-headers-page\";\r\nimport { MdsTablePage } from \"./mds-table-page\";\r\nimport { PagedItemListPage } from \"./paged-item-list-page\";\r\n\r\ninterface ConnectedProps {\r\n pageData?: W.PageData;\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const { pageData } = state;\r\n\r\n return {\r\n pageData\r\n };\r\n}\r\n\r\nclass PageContentClass extends React.Component {\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n {this.renderContent()}\r\n
\r\n )\r\n }\r\n\r\n private renderContent(): JSX.Element {\r\n const { pageData } = this.props;\r\n\r\n if (pageData == null) {\r\n return ;\r\n }\r\n\r\n switch (pageData.nav.pageID) {\r\n case W.PageID.HEADERS:\r\n return ;\r\n case W.PageID.MD_HEADERS:\r\n return ;\r\n case W.PageID.MDS_TABLE:\r\n return ;\r\n case W.PageID.MDS_STRINGS:\r\n case W.PageID.MDS_US:\r\n case W.PageID.MDS_GUID:\r\n case W.PageID.MDS_BLOB:\r\n case W.PageID.MDT_TBL:\r\n return ;\r\n default:\r\n return
Page not found.
;\r\n }\r\n }\r\n}\r\n\r\nexport const PageContent = ReactRedux.connect(mapStateToProps)(PageContentClass);\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as S from \"../store/state\";\r\nimport { NavLink } from \"./nav-link\";\r\n\r\ninterface ConnectedProps {\r\n pageData?: W.PageData;\r\n navList: W.NavData[];\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const { pageData, navList } = state;\r\n\r\n return {\r\n pageData,\r\n navList\r\n };\r\n}\r\n\r\nclass PageNavListClass extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { navList } = this.props;\r\n\r\n if (!navList || navList.length == 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {this.renderNavList(navList)}\r\n
\r\n )\r\n }\r\n\r\n private renderNavList(data: W.NavData[]): JSX.Element {\r\n const { pageData } = this.props;\r\n return (\r\n
    \r\n {data.map((v, i) => (\r\n
  • \r\n \r\n {v.children && this.renderNavList(v.children)}\r\n
  • \r\n ))}\r\n
\r\n );\r\n }\r\n\r\n private isSelected(target: W.NavTarget): boolean {\r\n const { pageData } = this.props;\r\n if (!pageData) return false;\r\n\r\n const { pageID, subID } = pageData.nav;\r\n return pageID == target.pageID && target.elemID == null\r\n && (subID == null || subID == target.subID);\r\n }\r\n}\r\n\r\nexport const PageNavList = ReactRedux.connect(mapStateToProps)(PageNavListClass);","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport * as S from \"../store/state\";\nimport { NavLink } from \"./nav-link\";\n\ninterface ConnectedProps {\n fileInfo?: S.FileInfo;\n navList: W.NavData[];\n}\n\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\n const { fileInfo, navList } = state;\n\n return {\n fileInfo,\n navList\n };\n}\n\nclass PageHeaderClass extends React.Component {\n public render(): JSX.Element {\n const { fileInfo } = this.props;\n\n return (\n
\n {fileInfo ? this.renderFileInfo(fileInfo) : this.renderWelcome()}\n {!fileInfo && (\n
PE Viewer is a simple single-page web application for viewing content of a PE (Portable Executable) file, which is the executabule file on Windows operating system and Microsoft .NET.
\n )}\n
\n )\n }\n\n private renderWelcome(): JSX.Element {\n return (\n
\n

Welcome to PE Viewer.

\n
\n );\n }\n\n private renderFileInfo(fileInfo: S.FileInfo): JSX.Element {\n const { name, size, is32Bit, isManaged } = fileInfo;\n\n return (\n
\n

{name}

\n
\n {size.toLocaleString()} bytes.\n\n {is32Bit != null && (\n \n | \n {is32Bit ? \"32-bit\" : \"64-bit\"}\n \n )}\n\n {isManaged != null && (\n \n | \n {isManaged ? \"managed\" : \"unmanaged\"}\n \n )}\n
\n
\n );\n }\n}\n\nexport const PageHeader = ReactRedux.connect(mapStateToProps)(PageHeaderClass);","import * as React from \"react\";\n\nimport { PageHeader } from \"./page-header\";\nimport { PageNavList } from \"./page-nav-list\";\nimport { PageContent } from \"./page-content\";\nimport { PageFooter } from \"./page-footer\";\n\nexport class App extends React.Component {\n public render(): JSX.Element {\n return (\n \n \n \n \n \n \n )\n }\n}","import * as Redux from \"redux\";\r\nimport * as A from \"./actions\";\r\nimport * as S from \"./state\";\r\n\r\nexport const appReducer = Redux.combineReducers({\r\n appInfo,\r\n fileInfo,\r\n pageData,\r\n navList,\r\n}) as Redux.Reducer;\r\n\r\nfunction appInfo(state: S.AppInfo | null = null, action: Redux.Action): S.AppInfo | null {\r\n return state;\r\n}\r\n\r\nfunction fileInfo(state: S.FileInfo | null = null, action: Redux.Action): S.FileInfo | null {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { file } = action as A.OpenFileAction;\r\n const { name, size } = file;\r\n return Object.assign({}, state, { name, size });\r\n }\r\n\r\n case A.ActionType.SET_PE_PROPS: {\r\n const { is32Bit, isManaged } = action as A.SetPEPropsAction;\r\n return Object.assign({}, state, { is32Bit, isManaged });\r\n }\r\n\r\n default: return state;\r\n }\r\n}\r\n\r\nfunction pageData(state: W.PageData | null = null, action: Redux.Action): W.PageData | null {\r\n switch (action.type) {\r\n case A.ActionType.SET_PAGE_DATA: {\r\n const { data } = action as A.SetPageDataAction;\r\n return data;\r\n }\r\n\r\n default: return state;\r\n }\r\n}\r\n\r\nfunction navList(state: W.NavData[] = [], action: Redux.Action): W.NavData[] {\r\n switch (action.type) {\r\n case A.ActionType.SET_NAV_LIST: {\r\n const { navList } = action as A.SetNavListAction;\r\n return navList;\r\n }\r\n\r\n default: return state;\r\n }\r\n}","module.exports = ReactDOM;","import * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport * as Redux from \"redux\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as packageJson from \"package.json\";\r\nimport * as S from \"./store/state\";\r\nimport * as R from \"./store/reducers\";\r\nimport { App } from \"./components/app\";\r\nimport { actionListenerMiddleware } from \"./action-listener\";\r\nimport { workerClientMiddleware, initWorkerClient } from \"./worker-client\";\r\n\r\nconst appInfo: S.AppInfo = {\r\n title: packageJson.title,\r\n version: packageJson.version,\r\n author: packageJson.author,\r\n homepage: packageJson.homepage,\r\n bugsUrl: packageJson.bugs_url,\r\n releaseNotesUrl: packageJson.release_notes,\r\n buildTimeLocal: new Date(Date.parse(packageJson.build_time)).toLocaleString(),\r\n year: new Date().getFullYear().toString(),\r\n};\r\n\r\nconst defaultState: S.AppState = {\r\n appInfo,\r\n navList: []\r\n};\r\n\r\ndocument.title = `${appInfo.title}`;\r\n\r\nconst _w = window as any;\r\nconst composeEnhancers = _w.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || Redux.compose;\r\nconst store = Redux.createStore(R.appReducer, defaultState, composeEnhancers(\r\n Redux.applyMiddleware(\r\n actionListenerMiddleware,\r\n workerClientMiddleware)\r\n));\r\n\r\ninitWorkerClient(store);\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById(\"app\")\r\n);\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"React\"","webpack:///external \"ReactRedux\"","webpack:///./src/ui/scripts/components/top-link.tsx","webpack:///./src/ui/scripts/components/struct-data.tsx","webpack:///./src/ui/scripts/store/actions.ts","webpack:///./src/ui/scripts/components/nav-link.tsx","webpack:///external \"Redux\"","webpack:///./src/ui/scripts/worker-message.ts","webpack:///./src/ui/scripts/worker-client.ts","webpack:///./src/ui/scripts/action-listener.ts","webpack:///./src/ui/scripts/components/page-footer.tsx","webpack:///./src/ui/scripts/components/paginate.tsx","webpack:///./src/ui/scripts/components/paged-item-list-page.tsx","webpack:///./src/ui/scripts/components/mds-table-page.tsx","webpack:///./src/ui/scripts/components/md-headers-page.tsx","webpack:///./src/ui/scripts/components/headers-page.tsx","webpack:///./src/ui/scripts/components/open-file-page.tsx","webpack:///./src/ui/scripts/components/page-content.tsx","webpack:///./src/ui/scripts/components/page-nav-list.tsx","webpack:///./src/ui/scripts/components/page-header.tsx","webpack:///./src/ui/scripts/components/app.tsx","webpack:///./src/ui/scripts/store/reducers.ts","webpack:///external \"ReactDOM\"","webpack:///./src/ui/scripts/index.tsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","React","ReactRedux","nav_link_1","TopLinkClass","_super","__extends","render","pageID","this","props","target","title","createElement","className","NavLink","Component","TopLink","connect","state","pageData","nav","renderTableTitle","elemID","id","renderStructTitle","renderStructItemRow","item","offset","size","rawData","descriptions","map","v","renderSimpleStruct","StructTable","items","toString","renderGroupedStruct","groups","gv","gi","colSpan","concat","children","createOpenFileAction","file","type","createOpenNavAction","createSetNavListAction","navList","createSetPageDataAction","data","createSetPEPropsAction","is32Bit","isManaged","A","NavLinkClass","_a","disable","text","extraClass","onClick","dispatch","ownProps","Redux","createReqOpenFileMessage","createReqOpenNavMessage","_worker","_store","WM","workerClientMiddleware","store","next","action","postMessage","getState","pageNum","initWorkerClient","Worker","onmessage","ev","msg","handleMessage","scrollElement","setTimeout","elem","document","getElementById","scrollIntoView","scrollTop","actionListenerMiddleware","appInfo","PageFooterClass","version","author","homepage","bugsUrl","releaseNotesUrl","buildTimeLocal","year","href","replace","PageFooter","PaginateClass","_this","handleSelectChange","paging","pageNavList","length","currentPageNumber","onChange","evt","onSelectionChange","currentTarget","selectedIndex","Paginate","struct_data_1","top_link_1","paginate_1","PagedItemListPage","MdsTablePage","tableHeader","renderTableList","tableInfo","index","rows","valid","sorted","MetadataHeadersPage","cliHeader","renderMetadataRoot","renderStreamHeaders","renderSNSignature","metadataRoot","Fragment","streamHeaders","snSignature","HeadersPage","dosHeader","peSignature","fileHeader","optionalHeader","dataDirectories","sectionHeaders","OpenFilePageClass","onFileChange","onFileSelected","fileList","files","OpenFilePage","open_file_page_1","headers_page_1","md_headers_page_1","mds_table_page_1","paged_item_list_page_1","PageContentClass","renderContent","PageContent","PageNavListClass","renderNavList","isSelected","subID","PageNavList","PageHeaderClass","fileInfo","renderFileInfo","renderWelcome","renderPageTitle","toLocaleString","PageHeader","page_header_1","page_nav_list_1","page_content_1","page_footer_1","App","appReducer","combineReducers","name_1","assign","navList_1","ReactDOM","packageJson","R","app_1","action_listener_1","worker_client_1","bugs_url","release_notes","Date","parse","build_time","getFullYear","defaultState","composeEnhancers","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","createStore","applyMiddleware","Provider"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,aAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAE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AzN,EAAA,IAEA0N,EAAA1N,EAAA,IACA2N,EAAA3N,EAAA,IACA4N,EAAA5N,EAAA,GACA6N,EAAA7N,EAAA,GAEM+H,GACFhF,MAAO0K,EAAY1K,MACnBkF,QAASwF,EAAYxF,QACrBC,OAAQuF,EAAYvF,OACpBC,SAAUsF,EAAYtF,SACtBC,QAASqF,EAAYK,SACrBzF,gBAAiBoF,EAAYM,cAC7BzF,eAAgB,IAAI0F,KAAKA,KAAKC,MAAMR,EAAYS,aAAatB,iBAC7DrE,MAAM,IAAIyF,MAAOG,cAAc3J,YAG7B4J,GACFrG,QAAOA,EACP1C,YAGJqC,SAAS3E,MAAQ,GAAGgF,EAAQhF,MAE5B,IACMsL,EADKC,OACiBC,sCAAwCnI,EAAMoI,QACpE7H,EAAQP,EAAMqI,YAAYf,EAAEP,WAAYiB,EAAcC,EACxDjI,EAAMsI,gBACFd,EAAA9F,yBACA+F,EAAAnH,0BAGRmH,EAAA5G,iBAAiBN,GAEjB6G,EAAS9K,OACLN,EAAAY,cAACX,EAAWsM,UAAShI,MAAOA,GACxBvE,EAAAY,cAAC2K,EAAAT,IAAG,OAERxF,SAASC,eAAe","file":"ui.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 24);\n","module.exports = React;","module.exports = ReactRedux;","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as S from \"../store/state\";\r\nimport { NavLink } from \"./nav-link\";\r\n\r\nexport interface ConnectedProps {\r\n pageID?: W.PageID;\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const { pageData } = state;\r\n\r\n return {\r\n pageID: pageData && pageData.nav.pageID\r\n };\r\n}\r\n\r\nclass TopLinkClass extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { pageID } = this.props;\r\n\r\n if (!pageID) {\r\n return null;\r\n } else {\r\n const target: W.NavTarget = {\r\n pageID,\r\n title: W.KnownTitle.TOP\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n }\r\n}\r\n\r\nexport const TopLink = ReactRedux.connect(mapStateToProps)(TopLinkClass);","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nexport function renderTableTitle(title: string, elemID?: string): JSX.Element {\r\n return

{title}

;\r\n}\r\n\r\nexport function renderSimpleStruct(s: W.SimpleStruct): JSX.Element {\r\n return (\r\n
\r\n {renderStructTitle(s)}\r\n \r\n {s.items && s.items.map((v, i) => renderStructItemRow(v, i.toString()))}\r\n \r\n
\r\n );\r\n}\r\n\r\nexport function renderGroupedStruct(s: W.GroupedStruct): JSX.Element {\r\n return (\r\n
\r\n {renderStructTitle(s)}\r\n \r\n {s.groups && s.groups.map((gv, gi) => {\r\n return [\r\n renderStructGroupTitleRow(gv.title, gi.toString())\r\n ].concat(gv.items && gv.items.map((v, i) =>\r\n renderStructItemRow(v, `${gi}.${i}`)) || []);\r\n })}\r\n \r\n
\r\n );\r\n}\r\n\r\nfunction renderStructTitle(s: W.StructData): JSX.Element {\r\n return renderTableTitle(s.title, s.elemID);\r\n}\r\n\r\nfunction renderStructItemRow(item: W.StructItem, key: string): JSX.Element {\r\n const { offset, size, rawData, name, value, descriptions } = item;\r\n return (\r\n \r\n {offset}\r\n {size}\r\n {rawData.map((v, i) =>
{v}
)}\r\n {name}\r\n {value}\r\n \r\n \r\n );\r\n}\r\n\r\nfunction renderStructGroupTitleRow(title: string, key: string): JSX.Element | null {\r\n return title ? ({title}) : null;\r\n}\r\n\r\nclass StructTable extends React.Component {\r\n public render(): JSX.Element {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.props.children}\r\n \r\n
OffsetSizeRaw DataNameValueDescription
\r\n );\r\n }\r\n}","import * as Redux from \"redux\";\r\n\r\nexport const enum ActionType {\r\n OPEN_FILE = \"OPEN_FILE\",\r\n OPEN_NAV = \"OPEN_NAV\",\r\n\r\n SET_NAV_LIST = \"SET_NAV_LIST\",\r\n SET_PAGE_DATA = \"SET_PAGE_DATA\",\r\n SET_PE_PROPS = \"SET_PE_PROPS\",\r\n SET_WORKER_ERROR = \"SET_WORKER_ERROR\",\r\n}\r\n\r\nexport interface OpenFileAction extends Redux.Action {\r\n file: File;\r\n}\r\n\r\nexport function createOpenFileAction(file: File): OpenFileAction {\r\n return { type: ActionType.OPEN_FILE, file };\r\n}\r\n\r\nexport interface OpenNavAction extends Redux.Action {\r\n target: W.NavTarget;\r\n}\r\n\r\nexport function createOpenNavAction(target: W.NavTarget): OpenNavAction {\r\n return { type: ActionType.OPEN_NAV, target };\r\n}\r\n\r\nexport interface SetNavListAction extends Redux.Action {\r\n navList: W.NavData[];\r\n}\r\n\r\nexport function createSetNavListAction(navList: W.NavData[]): SetNavListAction {\r\n return { type: ActionType.SET_NAV_LIST, navList };\r\n}\r\n\r\nexport interface SetPageDataAction extends Redux.Action {\r\n data: W.PageData;\r\n}\r\n\r\nexport function createSetPageDataAction(data: W.PageData): SetPageDataAction {\r\n return { type: ActionType.SET_PAGE_DATA, data };\r\n}\r\n\r\nexport interface SetPEPropsAction extends Redux.Action {\r\n is32Bit?: boolean;\r\n isManaged?: boolean;\r\n}\r\n\r\nexport function createSetPEPropsAction(is32Bit?: boolean, isManaged?: boolean): SetPEPropsAction {\r\n return { type: ActionType.SET_PE_PROPS, is32Bit, isManaged };\r\n}","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as A from \"../store/actions\";\r\nimport * as S from \"../store/state\";\r\n\r\nexport interface NavLinkProps {\r\n target: W.NavTarget;\r\n disable?: boolean;\r\n text?: string;\r\n title?: string;\r\n extraClass?: string;\r\n}\r\n\r\ninterface ConnectedEvents {\r\n onClick: () => void;\r\n}\r\n\r\nfunction mapDispatchToEvents(dispatch: ReactRedux.Dispatch, ownProps: NavLinkProps): ConnectedEvents {\r\n return {\r\n onClick: () => { dispatch(A.createOpenNavAction(ownProps.target)); }\r\n };\r\n}\r\n\r\nclass NavLinkClass extends React.Component {\r\n public render(): JSX.Element {\r\n const { target, disable, text, title, extraClass, onClick } = this.props;\r\n\r\n let className = \"nav\";\r\n if (disable) {\r\n className += \" disabled\"\r\n }\r\n if (extraClass) {\r\n className += \" \" + extraClass;\r\n }\r\n\r\n if (disable || !target) {\r\n return (\r\n \r\n {text}\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n {text || target.title}\r\n \r\n );\r\n }\r\n }\r\n}\r\n\r\nexport const NavLink = ReactRedux.connect(null, mapDispatchToEvents)(NavLinkClass);","module.exports = Redux;","/// \r\n\r\nexport function createReqOpenFileMessage(file: File): W.ReqOpenFileMessage {\r\n return {\r\n type: W.WorkerMessageType.REQ_OPEN_FILE,\r\n file\r\n };\r\n}\r\n\r\nexport function createReqOpenNavMessage(target: W.NavTarget): W.ReqOpenNavMessage {\r\n return {\r\n type: W.WorkerMessageType.REQ_OPEN_NAV,\r\n target\r\n };\r\n}","/// \r\n\r\nimport * as Redux from \"redux\";\r\n\r\nimport * as A from \"./store/actions\";\r\nimport * as S from \"./store/state\";\r\nimport * as WM from \"./worker-message\";\r\n\r\nexport const workerClientMiddleware = ((store: Redux.MiddlewareAPI) => (next: Redux.Dispatch) => (action: Redux.Action) => {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { file } = action as A.OpenFileAction;\r\n _worker.postMessage(WM.createReqOpenFileMessage(file));\r\n break;\r\n }\r\n\r\n case A.ActionType.OPEN_NAV: {\r\n const { target } = action as A.OpenNavAction;\r\n const { pageData } = store.getState();\r\n const { pageID, pageNum } = target;\r\n if (!pageData || pageData.nav.pageID != pageID || pageData.nav.pageNum != pageNum) {\r\n _worker.postMessage(WM.createReqOpenNavMessage(target));\r\n }\r\n break;\r\n }\r\n }\r\n return next(action);\r\n}) as Redux.Middleware;\r\n\r\nexport function initWorkerClient(store: Redux.Store): void {\r\n _store = store;\r\n _worker = new Worker(\"worker.js\");\r\n _worker.onmessage = ev => handleMessage(ev.data);\r\n}\r\n\r\nfunction handleMessage(msg: W.WorkerMessage): void {\r\n switch (msg.type) {\r\n case W.WorkerMessageType.RES_NAV_DATA:\r\n const { navList } = msg;\r\n _store.dispatch(A.createSetNavListAction(navList));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PAGE_DATA:\r\n const { pageData } = msg;\r\n _store.dispatch(A.createSetPageDataAction(pageData));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PE_PROPS:\r\n const { is32Bit, isManaged } = msg;\r\n _store.dispatch(A.createSetPEPropsAction(is32Bit, isManaged));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PE_ERROR:\r\n break;\r\n }\r\n}\r\n\r\nlet _worker: Worker;\r\nlet _store: Redux.Store;\r\n","import * as Redux from \"redux\";\r\n\r\nimport * as A from \"./store/actions\";\r\nimport * as S from \"./store/state\";\r\n\r\nexport const actionListenerMiddleware = ((store: Redux.MiddlewareAPI) => (next: Redux.Dispatch) => (action: Redux.Action) => {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { appInfo } = store.getState();\r\n const { file } = action as A.OpenFileAction;\r\n document.title = `${file.name} - ${appInfo.title}`\r\n break;\r\n }\r\n\r\n case A.ActionType.OPEN_NAV: {\r\n const { pageData } = store.getState();\r\n const { target } = action as A.OpenNavAction;\r\n const { pageID, elemID } = target;\r\n if (pageData && pageData.nav.pageID === pageID) {\r\n scrollElement(elemID);\r\n }\r\n break;\r\n }\r\n\r\n case A.ActionType.SET_PAGE_DATA: {\r\n const { data } = action as A.SetPageDataAction;\r\n scrollElement(data.nav.elemID);\r\n break;\r\n }\r\n }\r\n return next(action);\r\n}) as Redux.Middleware;\r\n\r\nfunction scrollElement(elemID?: string): void {\r\n setTimeout(() => {\r\n if (elemID) {\r\n const elem = document.getElementById(elemID);\r\n if (elem) {\r\n elem.scrollIntoView();\r\n }\r\n } else {\r\n const elem = document.getElementById(\"app-content\");\r\n if (elem) {\r\n elem.scrollTop = 0;\r\n }\r\n }\r\n }, 1);\r\n}","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport * as S from \"../store/state\";\n\ninterface ConnectedProps {\n appInfo: S.AppInfo;\n}\n\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\n const { appInfo } = state;\n return {\n appInfo\n };\n}\n\nclass PageFooterClass extends React.Component {\n public render(): JSX.Element {\n const { appInfo } = this.props;\n const { title, version, author, homepage, bugsUrl, releaseNotesUrl, buildTimeLocal, year } = appInfo;\n\n return (\n \n )\n }\n}\n\nexport const PageFooter = ReactRedux.connect(mapStateToProps)(PageFooterClass);\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as A from \"../store/actions\";\r\nimport * as S from \"../store/state\";\r\n\r\nimport { NavLink } from \"./nav-link\";\r\n\r\ninterface ConnectedProps {\r\n paging?: W.Paging;\r\n pageData?: W.PageData;\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const pageData = state.pageData as W.PagedItemListPageData;\r\n const paging = pageData && pageData.paging;\r\n\r\n return {\r\n paging,\r\n pageData,\r\n };\r\n}\r\n\r\ninterface ConnectedEvents {\r\n onSelectionChange: (target: W.NavTarget) => void;\r\n}\r\n\r\nfunction mapDispatchToEvents(dispatch: ReactRedux.Dispatch): ConnectedEvents {\r\n return {\r\n onSelectionChange: (target: W.NavTarget) => { dispatch(A.createOpenNavAction(target)); }\r\n };\r\n}\r\n\r\nclass PaginateClass extends React.Component {\r\n constructor(props: any) {\r\n super(props);\r\n this.handleSelectChange = this.handleSelectChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { paging, pageData } = this.props;\r\n if (!paging || !pageData || paging.pageNavList.length <= 1) {\r\n return null;\r\n }\r\n\r\n const { currentPageNumber, pageNavList } = paging;\r\n const { nav } = pageData;\r\n\r\n return (\r\n
\r\n \r\n \r\n {paging.pageNavList.map((v, i) => (\r\n \r\n ))}\r\n \r\n = pageNavList.length - 1}\r\n text=\"next >\" />\r\n
\r\n );\r\n }\r\n\r\n private handleSelectChange(evt: React.ChangeEvent): void {\r\n const { paging, onSelectionChange } = this.props;\r\n onSelectionChange(paging!.pageNavList[evt.currentTarget.selectedIndex]);\r\n }\r\n}\r\n\r\nexport const Paginate = ReactRedux.connect(mapStateToProps, mapDispatchToEvents)(PaginateClass);\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport { renderTableTitle, renderGroupedStruct } from \"./struct-data\";\r\nimport { TopLink } from \"./top-link\";\r\nimport { Paginate } from \"./paginate\";\r\n\r\ninterface PagedItemListPageProps {\r\n data: W.PagedItemListPageData;\r\n}\r\n\r\nexport class PagedItemListPage extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { data } = this.props;\r\n\r\n return (\r\n
\r\n \r\n {renderGroupedStruct(data.items)}\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport { renderTableTitle, renderSimpleStruct, renderGroupedStruct } from \"./struct-data\";\r\nimport { TopLink } from \"./top-link\";\r\n\r\ninterface MdsTablePageProps {\r\n data: W.MdsTablePageData;\r\n}\r\n\r\nexport class MdsTablePage extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { data } = this.props;\r\n\r\n return (\r\n
\r\n {renderGroupedStruct(data.tableHeader)}\r\n \r\n {this.renderTableList()}\r\n \r\n
\r\n );\r\n }\r\n\r\n private renderTableList(): JSX.Element {\r\n return (\r\n
\r\n {renderTableTitle(W.KnownTitle.MDT_LIST, W.KnownElemID.MDT_LIST)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.props.data.tableInfo.map((v, i) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
IndexNameRowsValidSortedLink
{v.index}{v.name}{v.rows}{v.valid ? \"X\" : \"\"}{v.sorted ? \"X\" : \"\"}
\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport { renderSimpleStruct, renderGroupedStruct } from \"./struct-data\";\nimport { TopLink } from \"./top-link\";\n\ninterface MetadataHeadersPageProps {\n data: W.MetadataHeadersPageData;\n}\n\nexport class MetadataHeadersPage extends React.Component {\n public render(): JSX.Element | null {\n const { data } = this.props;\n\n return (\n
\n {renderSimpleStruct(data.cliHeader)}\n \n {this.renderMetadataRoot()}\n {this.renderStreamHeaders()}\n {this.renderSNSignature()}\n
\n );\n }\n\n private renderMetadataRoot(): JSX.Element | undefined {\n const { data } = this.props;\n return data.metadataRoot && (\n \n {renderSimpleStruct(data.metadataRoot)}\n \n \n );\n }\n\n private renderStreamHeaders(): JSX.Element | undefined {\n const { data } = this.props;\n return data.streamHeaders && (\n \n {renderGroupedStruct(data.streamHeaders)}\n \n \n );\n }\n\n private renderSNSignature(): JSX.Element | undefined {\n const { data } = this.props;\n return data.snSignature && (\n \n {renderSimpleStruct(data.snSignature)}\n \n \n );\n }\n}\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport { renderSimpleStruct, renderGroupedStruct } from \"./struct-data\";\r\nimport { TopLink } from \"./top-link\";\r\n\r\ninterface HeadersPageProps {\r\n data: W.HeadersPageData;\r\n}\r\n\r\nexport class HeadersPage extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { data } = this.props;\r\n\r\n return (\r\n
\r\n {renderSimpleStruct(data.dosHeader)}\r\n \r\n {renderSimpleStruct(data.peSignature)}\r\n \r\n {renderSimpleStruct(data.fileHeader)}\r\n \r\n {renderGroupedStruct(data.optionalHeader)}\r\n \r\n {renderGroupedStruct(data.dataDirectories)}\r\n \r\n {renderGroupedStruct(data.sectionHeaders)}\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as A from \"../store/actions\";\r\nimport * as S from \"../store/state\";\r\n\r\ninterface ConnectedEvents {\r\n onFileSelected: (file: File) => void;\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: ReactRedux.Dispatch): ConnectedEvents {\r\n return {\r\n onFileSelected: (file) => dispatch(A.createOpenFileAction(file))\r\n };\r\n}\r\n\r\nclass OpenFilePageClass extends React.Component {\r\n public constructor(props: any) {\r\n super(props);\r\n this.onFileChange = this.onFileChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n
Select a file:
\r\n
\r\n
No data would be uploaded, everything is parsed locally.
\r\n
\r\n )\r\n }\r\n\r\n private onFileChange(ev: React.ChangeEvent): void {\r\n const { onFileSelected } = this.props;\r\n const fileList = ev.target.files;\r\n if (fileList && fileList.length > 0) {\r\n onFileSelected(fileList[0]);\r\n }\r\n }\r\n}\r\n\r\nexport const OpenFilePage = ReactRedux.connect(null, mapDispatchToProps)(OpenFilePageClass);\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as S from \"../store/state\";\r\n\r\nimport { OpenFilePage } from \"./open-file-page\";\r\nimport { HeadersPage } from \"./headers-page\";\r\nimport { MetadataHeadersPage } from \"./md-headers-page\";\r\nimport { MdsTablePage } from \"./mds-table-page\";\r\nimport { PagedItemListPage } from \"./paged-item-list-page\";\r\n\r\ninterface ConnectedProps {\r\n pageData?: W.PageData;\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const { pageData } = state;\r\n\r\n return {\r\n pageData\r\n };\r\n}\r\n\r\nclass PageContentClass extends React.Component {\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n {this.renderContent()}\r\n
\r\n )\r\n }\r\n\r\n private renderContent(): JSX.Element {\r\n const { pageData } = this.props;\r\n\r\n if (pageData == null) {\r\n return ;\r\n }\r\n\r\n switch (pageData.nav.pageID) {\r\n case W.PageID.HEADERS:\r\n return ;\r\n case W.PageID.MD_HEADERS:\r\n return ;\r\n case W.PageID.MDS_TABLE:\r\n return ;\r\n case W.PageID.MDS_STRINGS:\r\n case W.PageID.MDS_US:\r\n case W.PageID.MDS_GUID:\r\n case W.PageID.MDS_BLOB:\r\n case W.PageID.MDT_TBL:\r\n return ;\r\n default:\r\n return
Page not found.
;\r\n }\r\n }\r\n}\r\n\r\nexport const PageContent = ReactRedux.connect(mapStateToProps)(PageContentClass);\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as S from \"../store/state\";\r\nimport { NavLink } from \"./nav-link\";\r\n\r\ninterface ConnectedProps {\r\n pageData?: W.PageData;\r\n navList: W.NavData[];\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const { pageData, navList } = state;\r\n\r\n return {\r\n pageData,\r\n navList\r\n };\r\n}\r\n\r\nclass PageNavListClass extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { navList } = this.props;\r\n\r\n if (!navList || navList.length == 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {this.renderNavList(navList)}\r\n
\r\n )\r\n }\r\n\r\n private renderNavList(data: W.NavData[]): JSX.Element {\r\n const { pageData } = this.props;\r\n return (\r\n
    \r\n {data.map((v, i) => (\r\n
  • \r\n \r\n {v.children && this.renderNavList(v.children)}\r\n
  • \r\n ))}\r\n
\r\n );\r\n }\r\n\r\n private isSelected(target: W.NavTarget): boolean {\r\n const { pageData } = this.props;\r\n if (!pageData) return false;\r\n\r\n const { pageID, subID } = pageData.nav;\r\n return pageID == target.pageID && target.elemID == null\r\n && (subID == null || subID == target.subID);\r\n }\r\n}\r\n\r\nexport const PageNavList = ReactRedux.connect(mapStateToProps)(PageNavListClass);","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport * as S from \"../store/state\";\nimport { NavLink } from \"./nav-link\";\n\ninterface ConnectedProps {\n fileInfo?: S.FileInfo;\n pageData?: W.PageData;\n navList: W.NavData[];\n}\n\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\n const { fileInfo, pageData, navList } = state;\n return { fileInfo, pageData, navList };\n}\n\nclass PageHeaderClass extends React.Component {\n public render(): JSX.Element {\n const { fileInfo } = this.props;\n\n return (\n
\n {fileInfo ? this.renderFileInfo() : this.renderWelcome()}\n {!fileInfo && (\n
PE Viewer is a simple single-page web application for viewing content of a PE (Portable Executable) file, which is the executabule file on Windows operating system and Microsoft .NET.
\n )}\n
\n )\n }\n\n private renderWelcome(): JSX.Element {\n return (\n
\n

Welcome to PE Viewer.

\n
\n );\n }\n\n private renderFileInfo(): JSX.Element {\n const { fileInfo } = this.props;\n const { name, size, is32Bit, isManaged } = fileInfo!;\n\n return (\n
\n

{name}

\n {this.renderPageTitle()}\n
\n {size.toLocaleString()} bytes.\n\n {is32Bit != null && (\n \n | \n {is32Bit ? \"32-bit\" : \"64-bit\"}\n \n )}\n\n {isManaged != null && (\n \n | \n {isManaged ? \"managed\" : \"unmanaged\"}\n \n )}\n
\n
\n );\n }\n\n private renderPageTitle(): JSX.Element | null {\n const { pageData } = this.props;\n\n if (pageData && pageData.nav && pageData.nav.title) {\n return

{pageData.nav.title}

;\n } else {\n return null;\n }\n }\n}\n\nexport const PageHeader = ReactRedux.connect(mapStateToProps)(PageHeaderClass);","import * as React from \"react\";\n\nimport { PageHeader } from \"./page-header\";\nimport { PageNavList } from \"./page-nav-list\";\nimport { PageContent } from \"./page-content\";\nimport { PageFooter } from \"./page-footer\";\n\nexport class App extends React.Component {\n public render(): JSX.Element {\n return (\n \n \n \n \n \n \n )\n }\n}","import * as Redux from \"redux\";\r\nimport * as A from \"./actions\";\r\nimport * as S from \"./state\";\r\n\r\nexport const appReducer = Redux.combineReducers({\r\n appInfo,\r\n fileInfo,\r\n pageData,\r\n navList,\r\n}) as Redux.Reducer;\r\n\r\nfunction appInfo(state: S.AppInfo | null = null, action: Redux.Action): S.AppInfo | null {\r\n return state;\r\n}\r\n\r\nfunction fileInfo(state: S.FileInfo | null = null, action: Redux.Action): S.FileInfo | null {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { file } = action as A.OpenFileAction;\r\n const { name, size } = file;\r\n return Object.assign({}, state, { name, size });\r\n }\r\n\r\n case A.ActionType.SET_PE_PROPS: {\r\n const { is32Bit, isManaged } = action as A.SetPEPropsAction;\r\n return Object.assign({}, state, { is32Bit, isManaged });\r\n }\r\n\r\n default: return state;\r\n }\r\n}\r\n\r\nfunction pageData(state: W.PageData | null = null, action: Redux.Action): W.PageData | null {\r\n switch (action.type) {\r\n case A.ActionType.SET_PAGE_DATA: {\r\n const { data } = action as A.SetPageDataAction;\r\n return data;\r\n }\r\n\r\n default: return state;\r\n }\r\n}\r\n\r\nfunction navList(state: W.NavData[] = [], action: Redux.Action): W.NavData[] {\r\n switch (action.type) {\r\n case A.ActionType.SET_NAV_LIST: {\r\n const { navList } = action as A.SetNavListAction;\r\n return navList;\r\n }\r\n\r\n default: return state;\r\n }\r\n}","module.exports = ReactDOM;","import * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport * as Redux from \"redux\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as packageJson from \"package.json\";\r\nimport * as S from \"./store/state\";\r\nimport * as R from \"./store/reducers\";\r\nimport { App } from \"./components/app\";\r\nimport { actionListenerMiddleware } from \"./action-listener\";\r\nimport { workerClientMiddleware, initWorkerClient } from \"./worker-client\";\r\n\r\nconst appInfo: S.AppInfo = {\r\n title: packageJson.title,\r\n version: packageJson.version,\r\n author: packageJson.author,\r\n homepage: packageJson.homepage,\r\n bugsUrl: packageJson.bugs_url,\r\n releaseNotesUrl: packageJson.release_notes,\r\n buildTimeLocal: new Date(Date.parse(packageJson.build_time)).toLocaleString(),\r\n year: new Date().getFullYear().toString(),\r\n};\r\n\r\nconst defaultState: S.AppState = {\r\n appInfo,\r\n navList: []\r\n};\r\n\r\ndocument.title = `${appInfo.title}`;\r\n\r\nconst _w = window as any;\r\nconst composeEnhancers = _w.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || Redux.compose;\r\nconst store = Redux.createStore(R.appReducer, defaultState, composeEnhancers(\r\n Redux.applyMiddleware(\r\n actionListenerMiddleware,\r\n workerClientMiddleware)\r\n));\r\n\r\ninitWorkerClient(store);\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById(\"app\")\r\n);\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/latest/worker.js b/latest/worker.js index 889a455..141d218 100644 --- a/latest/worker.js +++ b/latest/worker.js @@ -1,2 +1,2 @@ -!function(e){var t={};function a(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)a.d(r,i,function(t){return e[t]}.bind(null,i));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=13)}([function(e,t,a){"use strict";var r;t.__esModule=!0,t.IMAGE_DOS_SIGNATURE=23117,t.IMAGE_NT_SIGNATURE=17744,t.IMAGE_NT_OPTIONAL_HDR32_MAGIC=267,t.IMAGE_NT_OPTIONAL_HDR64_MAGIC=523,function(e){e[e.IMAGE_FILE_RELOCS_STRIPPED=1]="IMAGE_FILE_RELOCS_STRIPPED",e[e.IMAGE_FILE_EXECUTABLE_IMAGE=2]="IMAGE_FILE_EXECUTABLE_IMAGE",e[e.IMAGE_FILE_LINE_NUMS_STRIPPED=4]="IMAGE_FILE_LINE_NUMS_STRIPPED",e[e.IMAGE_FILE_LOCAL_SYMS_STRIPPED=8]="IMAGE_FILE_LOCAL_SYMS_STRIPPED",e[e.IMAGE_FILE_AGGRESIVE_WS_TRIM=16]="IMAGE_FILE_AGGRESIVE_WS_TRIM",e[e.IMAGE_FILE_LARGE_ADDRESS_AWARE=32]="IMAGE_FILE_LARGE_ADDRESS_AWARE",e[e.IMAGE_FILE_BYTES_REVERSED_LO=128]="IMAGE_FILE_BYTES_REVERSED_LO",e[e.IMAGE_FILE_32BIT_MACHINE=256]="IMAGE_FILE_32BIT_MACHINE",e[e.IMAGE_FILE_DEBUG_STRIPPED=512]="IMAGE_FILE_DEBUG_STRIPPED",e[e.IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP=1024]="IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP",e[e.IMAGE_FILE_NET_RUN_FROM_SWAP=2048]="IMAGE_FILE_NET_RUN_FROM_SWAP",e[e.IMAGE_FILE_SYSTEM=4096]="IMAGE_FILE_SYSTEM",e[e.IMAGE_FILE_DLL=8192]="IMAGE_FILE_DLL",e[e.IMAGE_FILE_UP_SYSTEM_ONLY=16384]="IMAGE_FILE_UP_SYSTEM_ONLY",e[e.IMAGE_FILE_BYTES_REVERSED_HI=32768]="IMAGE_FILE_BYTES_REVERSED_HI"}(t.ImageFile||(t.ImageFile={})),function(e){e[e.IMAGE_FILE_MACHINE_UNKNOWN=0]="IMAGE_FILE_MACHINE_UNKNOWN",e[e.IMAGE_FILE_MACHINE_TARGET_HOST=1]="IMAGE_FILE_MACHINE_TARGET_HOST",e[e.IMAGE_FILE_MACHINE_I386=332]="IMAGE_FILE_MACHINE_I386",e[e.IMAGE_FILE_MACHINE_R3000=354]="IMAGE_FILE_MACHINE_R3000",e[e.IMAGE_FILE_MACHINE_R4000=358]="IMAGE_FILE_MACHINE_R4000",e[e.IMAGE_FILE_MACHINE_R10000=360]="IMAGE_FILE_MACHINE_R10000",e[e.IMAGE_FILE_MACHINE_WCEMIPSV2=361]="IMAGE_FILE_MACHINE_WCEMIPSV2",e[e.IMAGE_FILE_MACHINE_ALPHA=388]="IMAGE_FILE_MACHINE_ALPHA",e[e.IMAGE_FILE_MACHINE_SH3=418]="IMAGE_FILE_MACHINE_SH3",e[e.IMAGE_FILE_MACHINE_SH3DSP=419]="IMAGE_FILE_MACHINE_SH3DSP",e[e.IMAGE_FILE_MACHINE_SH3E=420]="IMAGE_FILE_MACHINE_SH3E",e[e.IMAGE_FILE_MACHINE_SH4=422]="IMAGE_FILE_MACHINE_SH4",e[e.IMAGE_FILE_MACHINE_SH5=424]="IMAGE_FILE_MACHINE_SH5",e[e.IMAGE_FILE_MACHINE_ARM=448]="IMAGE_FILE_MACHINE_ARM",e[e.IMAGE_FILE_MACHINE_THUMB=450]="IMAGE_FILE_MACHINE_THUMB",e[e.IMAGE_FILE_MACHINE_ARMNT=452]="IMAGE_FILE_MACHINE_ARMNT",e[e.IMAGE_FILE_MACHINE_AM33=467]="IMAGE_FILE_MACHINE_AM33",e[e.IMAGE_FILE_MACHINE_POWERPC=496]="IMAGE_FILE_MACHINE_POWERPC",e[e.IMAGE_FILE_MACHINE_POWERPCFP=497]="IMAGE_FILE_MACHINE_POWERPCFP",e[e.IMAGE_FILE_MACHINE_IA64=512]="IMAGE_FILE_MACHINE_IA64",e[e.IMAGE_FILE_MACHINE_MIPS16=614]="IMAGE_FILE_MACHINE_MIPS16",e[e.IMAGE_FILE_MACHINE_ALPHA64=644]="IMAGE_FILE_MACHINE_ALPHA64",e[e.IMAGE_FILE_MACHINE_MIPSFPU=870]="IMAGE_FILE_MACHINE_MIPSFPU",e[e.IMAGE_FILE_MACHINE_MIPSFPU16=1126]="IMAGE_FILE_MACHINE_MIPSFPU16",e[e.IMAGE_FILE_MACHINE_AXP64=644]="IMAGE_FILE_MACHINE_AXP64",e[e.IMAGE_FILE_MACHINE_TRICORE=1312]="IMAGE_FILE_MACHINE_TRICORE",e[e.IMAGE_FILE_MACHINE_CEF=3311]="IMAGE_FILE_MACHINE_CEF",e[e.IMAGE_FILE_MACHINE_EBC=3772]="IMAGE_FILE_MACHINE_EBC",e[e.IMAGE_FILE_MACHINE_AMD64=34404]="IMAGE_FILE_MACHINE_AMD64",e[e.IMAGE_FILE_MACHINE_M32R=36929]="IMAGE_FILE_MACHINE_M32R",e[e.IMAGE_FILE_MACHINE_ARM64=43620]="IMAGE_FILE_MACHINE_ARM64",e[e.IMAGE_FILE_MACHINE_CEE=49390]="IMAGE_FILE_MACHINE_CEE"}(t.ImageFileMachine||(t.ImageFileMachine={})),function(e){e[e.IMAGE_SUBSYSTEM_UNKNOWN=0]="IMAGE_SUBSYSTEM_UNKNOWN",e[e.IMAGE_SUBSYSTEM_NATIVE=1]="IMAGE_SUBSYSTEM_NATIVE",e[e.IMAGE_SUBSYSTEM_WINDOWS_GUI=2]="IMAGE_SUBSYSTEM_WINDOWS_GUI",e[e.IMAGE_SUBSYSTEM_WINDOWS_CUI=3]="IMAGE_SUBSYSTEM_WINDOWS_CUI",e[e.IMAGE_SUBSYSTEM_OS2_CUI=5]="IMAGE_SUBSYSTEM_OS2_CUI",e[e.IMAGE_SUBSYSTEM_POSIX_CUI=7]="IMAGE_SUBSYSTEM_POSIX_CUI",e[e.IMAGE_SUBSYSTEM_NATIVE_WINDOWS=8]="IMAGE_SUBSYSTEM_NATIVE_WINDOWS",e[e.IMAGE_SUBSYSTEM_WINDOWS_CE_GUI=9]="IMAGE_SUBSYSTEM_WINDOWS_CE_GUI",e[e.IMAGE_SUBSYSTEM_EFI_APPLICATION=10]="IMAGE_SUBSYSTEM_EFI_APPLICATION",e[e.IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER=11]="IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER",e[e.IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER=12]="IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER",e[e.IMAGE_SUBSYSTEM_EFI_ROM=13]="IMAGE_SUBSYSTEM_EFI_ROM",e[e.IMAGE_SUBSYSTEM_XBOX=14]="IMAGE_SUBSYSTEM_XBOX",e[e.IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION=16]="IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION",e[e.IMAGE_SUBSYSTEM_XBOX_CODE_CATALOG=17]="IMAGE_SUBSYSTEM_XBOX_CODE_CATALOG"}(t.ImageSubsystem||(t.ImageSubsystem={})),function(e){e[e.IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA=32]="IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA",e[e.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE=64]="IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE",e[e.IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY=128]="IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY",e[e.IMAGE_DLLCHARACTERISTICS_NX_COMPAT=256]="IMAGE_DLLCHARACTERISTICS_NX_COMPAT",e[e.IMAGE_DLLCHARACTERISTICS_NO_ISOLATION=512]="IMAGE_DLLCHARACTERISTICS_NO_ISOLATION",e[e.IMAGE_DLLCHARACTERISTICS_NO_SEH=1024]="IMAGE_DLLCHARACTERISTICS_NO_SEH",e[e.IMAGE_DLLCHARACTERISTICS_NO_BIND=2048]="IMAGE_DLLCHARACTERISTICS_NO_BIND",e[e.IMAGE_DLLCHARACTERISTICS_APPCONTAINER=4096]="IMAGE_DLLCHARACTERISTICS_APPCONTAINER",e[e.IMAGE_DLLCHARACTERISTICS_WDM_DRIVER=8192]="IMAGE_DLLCHARACTERISTICS_WDM_DRIVER",e[e.IMAGE_DLLCHARACTERISTICS_GUARD_CF=16384]="IMAGE_DLLCHARACTERISTICS_GUARD_CF",e[e.IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE=32768]="IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE"}(t.ImageDllCharacteristics||(t.ImageDllCharacteristics={})),function(e){e[e.IMAGE_DIRECTORY_ENTRY_EXPORT=0]="IMAGE_DIRECTORY_ENTRY_EXPORT",e[e.IMAGE_DIRECTORY_ENTRY_IMPORT=1]="IMAGE_DIRECTORY_ENTRY_IMPORT",e[e.IMAGE_DIRECTORY_ENTRY_RESOURCE=2]="IMAGE_DIRECTORY_ENTRY_RESOURCE",e[e.IMAGE_DIRECTORY_ENTRY_EXCEPTION=3]="IMAGE_DIRECTORY_ENTRY_EXCEPTION",e[e.IMAGE_DIRECTORY_ENTRY_SECURITY=4]="IMAGE_DIRECTORY_ENTRY_SECURITY",e[e.IMAGE_DIRECTORY_ENTRY_BASERELOC=5]="IMAGE_DIRECTORY_ENTRY_BASERELOC",e[e.IMAGE_DIRECTORY_ENTRY_DEBUG=6]="IMAGE_DIRECTORY_ENTRY_DEBUG",e[e.IMAGE_DIRECTORY_ENTRY_ARCHITECTURE=7]="IMAGE_DIRECTORY_ENTRY_ARCHITECTURE",e[e.IMAGE_DIRECTORY_ENTRY_GLOBALPTR=8]="IMAGE_DIRECTORY_ENTRY_GLOBALPTR",e[e.IMAGE_DIRECTORY_ENTRY_TLS=9]="IMAGE_DIRECTORY_ENTRY_TLS",e[e.IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG=10]="IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG",e[e.IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT=11]="IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT",e[e.IMAGE_DIRECTORY_ENTRY_IAT=12]="IMAGE_DIRECTORY_ENTRY_IAT",e[e.IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT=13]="IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT",e[e.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR=14]="IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR"}(t.ImageDirectoryEntry||(t.ImageDirectoryEntry={})),t.IMAGE_NUMBEROF_DIRECTORY_ENTRIES=16,function(e){e[e.IMAGE_SCN_TYPE_NO_PAD=8]="IMAGE_SCN_TYPE_NO_PAD",e[e.IMAGE_SCN_CNT_CODE=32]="IMAGE_SCN_CNT_CODE",e[e.IMAGE_SCN_CNT_INITIALIZED_DATA=64]="IMAGE_SCN_CNT_INITIALIZED_DATA",e[e.IMAGE_SCN_CNT_UNINITIALIZED_DATA=128]="IMAGE_SCN_CNT_UNINITIALIZED_DATA",e[e.IMAGE_SCN_LNK_OTHER=256]="IMAGE_SCN_LNK_OTHER",e[e.IMAGE_SCN_LNK_INFO=512]="IMAGE_SCN_LNK_INFO",e[e.IMAGE_SCN_LNK_REMOVE=2048]="IMAGE_SCN_LNK_REMOVE",e[e.IMAGE_SCN_LNK_COMDAT=4096]="IMAGE_SCN_LNK_COMDAT",e[e.IMAGE_SCN_NO_DEFER_SPEC_EXC=16384]="IMAGE_SCN_NO_DEFER_SPEC_EXC",e[e.IMAGE_SCN_GPREL=32768]="IMAGE_SCN_GPREL",e[e.IMAGE_SCN_MEM_PURGEABLE=131072]="IMAGE_SCN_MEM_PURGEABLE",e[e.IMAGE_SCN_MEM_16BIT=131072]="IMAGE_SCN_MEM_16BIT",e[e.IMAGE_SCN_MEM_LOCKED=262144]="IMAGE_SCN_MEM_LOCKED",e[e.IMAGE_SCN_MEM_PRELOAD=524288]="IMAGE_SCN_MEM_PRELOAD",e[e.IMAGE_SCN_ALIGN_1BYTES=1048576]="IMAGE_SCN_ALIGN_1BYTES",e[e.IMAGE_SCN_ALIGN_2BYTES=2097152]="IMAGE_SCN_ALIGN_2BYTES",e[e.IMAGE_SCN_ALIGN_4BYTES=3145728]="IMAGE_SCN_ALIGN_4BYTES",e[e.IMAGE_SCN_ALIGN_8BYTES=4194304]="IMAGE_SCN_ALIGN_8BYTES",e[e.IMAGE_SCN_ALIGN_16BYTES=5242880]="IMAGE_SCN_ALIGN_16BYTES",e[e.IMAGE_SCN_ALIGN_32BYTES=6291456]="IMAGE_SCN_ALIGN_32BYTES",e[e.IMAGE_SCN_ALIGN_64BYTES=7340032]="IMAGE_SCN_ALIGN_64BYTES",e[e.IMAGE_SCN_ALIGN_128BYTES=8388608]="IMAGE_SCN_ALIGN_128BYTES",e[e.IMAGE_SCN_ALIGN_256BYTES=9437184]="IMAGE_SCN_ALIGN_256BYTES",e[e.IMAGE_SCN_ALIGN_512BYTES=10485760]="IMAGE_SCN_ALIGN_512BYTES",e[e.IMAGE_SCN_ALIGN_1024BYTES=11534336]="IMAGE_SCN_ALIGN_1024BYTES",e[e.IMAGE_SCN_ALIGN_2048BYTES=12582912]="IMAGE_SCN_ALIGN_2048BYTES",e[e.IMAGE_SCN_ALIGN_4096BYTES=13631488]="IMAGE_SCN_ALIGN_4096BYTES",e[e.IMAGE_SCN_ALIGN_8192BYTES=14680064]="IMAGE_SCN_ALIGN_8192BYTES",e[e.IMAGE_SCN_LNK_NRELOC_OVFL=16777216]="IMAGE_SCN_LNK_NRELOC_OVFL",e[e.IMAGE_SCN_MEM_DISCARDABLE=33554432]="IMAGE_SCN_MEM_DISCARDABLE",e[e.IMAGE_SCN_MEM_NOT_CACHED=67108864]="IMAGE_SCN_MEM_NOT_CACHED",e[e.IMAGE_SCN_MEM_NOT_PAGED=134217728]="IMAGE_SCN_MEM_NOT_PAGED",e[e.IMAGE_SCN_MEM_SHARED=268435456]="IMAGE_SCN_MEM_SHARED",e[e.IMAGE_SCN_MEM_EXECUTE=536870912]="IMAGE_SCN_MEM_EXECUTE",e[e.IMAGE_SCN_MEM_READ=1073741824]="IMAGE_SCN_MEM_READ",e[e.IMAGE_SCN_MEM_WRITE=2147483648]="IMAGE_SCN_MEM_WRITE",e[e.IMAGE_SCN_SCALE_INDEX=1]="IMAGE_SCN_SCALE_INDEX"}(t.ImageSection||(t.ImageSection={})),function(e){e[e.COMIMAGE_FLAGS_ILONLY=1]="COMIMAGE_FLAGS_ILONLY",e[e.COMIMAGE_FLAGS_32BITREQUIRED=2]="COMIMAGE_FLAGS_32BITREQUIRED",e[e.COMIMAGE_FLAGS_IL_LIBRARY=4]="COMIMAGE_FLAGS_IL_LIBRARY",e[e.COMIMAGE_FLAGS_STRONGNAMESIGNED=8]="COMIMAGE_FLAGS_STRONGNAMESIGNED",e[e.COMIMAGE_FLAGS_NATIVE_ENTRYPOINT=16]="COMIMAGE_FLAGS_NATIVE_ENTRYPOINT",e[e.COMIMAGE_FLAGS_TRACKDEBUGDATA=65536]="COMIMAGE_FLAGS_TRACKDEBUGDATA",e[e.COMIMAGE_FLAGS_32BITPREFERRED=131072]="COMIMAGE_FLAGS_32BITPREFERRED"}(t.ComImageFlags||(t.ComImageFlags={})),t.MetadataSignature=1112167234,function(e){e[e.Module=0]="Module",e[e.TypeRef=1]="TypeRef",e[e.TypeDef=2]="TypeDef",e[e.FieldPtr=3]="FieldPtr",e[e.Field=4]="Field",e[e.MethodPtr=5]="MethodPtr",e[e.MethodDef=6]="MethodDef",e[e.ParamPtr=7]="ParamPtr",e[e.Param=8]="Param",e[e.InterfaceImpl=9]="InterfaceImpl",e[e.MemberRef=10]="MemberRef",e[e.Constant=11]="Constant",e[e.CustomAttribute=12]="CustomAttribute",e[e.FieldMarshal=13]="FieldMarshal",e[e.DeclSecurity=14]="DeclSecurity",e[e.ClassLayout=15]="ClassLayout",e[e.FieldLayout=16]="FieldLayout",e[e.StandAloneSig=17]="StandAloneSig",e[e.EventMap=18]="EventMap",e[e.EventPtr=19]="EventPtr",e[e.Event=20]="Event",e[e.PropertyMap=21]="PropertyMap",e[e.PropertyPtr=22]="PropertyPtr",e[e.Property=23]="Property",e[e.MethodSemantics=24]="MethodSemantics",e[e.MethodImpl=25]="MethodImpl",e[e.ModuleRef=26]="ModuleRef",e[e.TypeSpec=27]="TypeSpec",e[e.ImplMap=28]="ImplMap",e[e.FieldRVA=29]="FieldRVA",e[e.ENCLog=30]="ENCLog",e[e.ENCMap=31]="ENCMap",e[e.Assembly=32]="Assembly",e[e.AssemblyProcessor=33]="AssemblyProcessor",e[e.AssemblyOS=34]="AssemblyOS",e[e.AssemblyRef=35]="AssemblyRef",e[e.AssemblyRefProcessor=36]="AssemblyRefProcessor",e[e.AssemblyRefOS=37]="AssemblyRefOS",e[e.File=38]="File",e[e.ExportedType=39]="ExportedType",e[e.ManifestResource=40]="ManifestResource",e[e.NestedClass=41]="NestedClass",e[e.GenericParam=42]="GenericParam",e[e.MethodSpec=43]="MethodSpec",e[e.GenericParamConstraint=44]="GenericParamConstraint",e[e.String=112]="String"}(r=t.MetadataTableIndex||(t.MetadataTableIndex={})),t.NumberOfMdTables=45,function(e){e[e.TypeDefOrRef=0]="TypeDefOrRef",e[e.HasConstant=1]="HasConstant",e[e.HasCustomAttribute=2]="HasCustomAttribute",e[e.HasFieldMarshall=3]="HasFieldMarshall",e[e.HasDeclSecurity=4]="HasDeclSecurity",e[e.MemberRefParent=5]="MemberRefParent",e[e.HasSemantics=6]="HasSemantics",e[e.MethodDefOrRef=7]="MethodDefOrRef",e[e.MemberForwarded=8]="MemberForwarded",e[e.Implementation=9]="Implementation",e[e.CustomAttributeType=10]="CustomAttributeType",e[e.ResolutionScope=11]="ResolutionScope",e[e.TypeOrMethodDef=12]="TypeOrMethodDef"}(t.MetadataCodedTokenIndex||(t.MetadataCodedTokenIndex={})),t.ctc=[{tagSize:2,tables:[r.TypeDef,r.TypeRef,r.TypeSpec]},{tagSize:2,tables:[r.Field,r.Param,r.Property]},{tagSize:5,tables:[r.MethodDef,r.Field,r.TypeRef,r.TypeDef,r.Param,r.InterfaceImpl,r.MemberRef,r.Module,r.DeclSecurity,r.Property,r.Event,r.StandAloneSig,r.ModuleRef,r.TypeSpec,r.Assembly,r.AssemblyRef,r.File,r.ExportedType,r.ManifestResource,r.GenericParam,r.GenericParamConstraint,r.MethodSpec]},{tagSize:1,tables:[r.Field,r.Param]},{tagSize:2,tables:[r.TypeDef,r.MethodDef,r.Assembly]},{tagSize:3,tables:[r.TypeDef,r.TypeRef,r.ModuleRef,r.MethodDef,r.TypeSpec]},{tagSize:1,tables:[r.Event,r.Property]},{tagSize:1,tables:[r.MethodDef,r.MemberRef]},{tagSize:1,tables:[r.Field,r.MethodDef]},{tagSize:2,tables:[r.File,r.AssemblyRef,r.ExportedType]},{tagSize:3,tables:[r.TypeRef,r.TypeDef,r.MethodDef,r.MemberRef,r.String]},{tagSize:2,tables:[r.Module,r.ModuleRef,r.AssemblyRef,r.TypeRef]},{tagSize:1,tables:[r.TypeDef,r.MethodDef]}],function(e){e[e.None=0]="None",e[e.MD5=32771]="MD5",e[e.SHA1=32772]="SHA1"}(t.AssemblyHashAlgorithm||(t.AssemblyHashAlgorithm={})),function(e){e[e.PublicKey=1]="PublicKey",e[e.pa__Mask=112]="pa__Mask",e[e.pa_ProcessorArchitectureNone=0]="pa_ProcessorArchitectureNone",e[e.pa_ProcessorArchitectureMsil=16]="pa_ProcessorArchitectureMsil",e[e.pa_ProcessorArchitectureX86=32]="pa_ProcessorArchitectureX86",e[e.pa_ProcessorArchitectureIa64=48]="pa_ProcessorArchitectureIa64",e[e.pa_ProcessorArchitectureAmd64=64]="pa_ProcessorArchitectureAmd64",e[e.ProcessorArchitectureSpecified=128]="ProcessorArchitectureSpecified",e[e.EnableJitcompileTracking=32768]="EnableJitcompileTracking",e[e.DisableJitcompileOptimizer=16384]="DisableJitcompileOptimizer",e[e.Retargetable=256]="Retargetable"}(t.CorAssemblyFlags||(t.CorAssemblyFlags={})),function(e){e[e.SpecialName=512]="SpecialName",e[e.RtSpecialName=1024]="RtSpecialName"}(t.CorEventAttr||(t.CorEventAttr={})),function(e){e[e.fa__Mask=7]="fa__Mask",e[e.fa_PrivateScope=0]="fa_PrivateScope",e[e.fa_Private=1]="fa_Private",e[e.fa_FamAndAssem=2]="fa_FamAndAssem",e[e.fa_Assembly=3]="fa_Assembly",e[e.fa_Family=4]="fa_Family",e[e.fa_FamOrAssem=5]="fa_FamOrAssem",e[e.fa_Public=6]="fa_Public",e[e.Static=16]="Static",e[e.InitOnly=32]="InitOnly",e[e.Literal=64]="Literal",e[e.NotSerialized=128]="NotSerialized",e[e.SpecialName=512]="SpecialName",e[e.PinvokeImpl=8192]="PinvokeImpl",e[e.RtSpecialName=1024]="RtSpecialName",e[e.HasFieldMarshal=4096]="HasFieldMarshal",e[e.HasDefault=32768]="HasDefault",e[e.HasFieldRva=256]="HasFieldRva"}(t.CorFieldAttr||(t.CorFieldAttr={})),function(e){e[e.ContainsMetaData=0]="ContainsMetaData",e[e.ContainsNoMetaData=1]="ContainsNoMetaData"}(t.CorFileFlags||(t.CorFileFlags={})),function(e){e[e.v__Mask=3]="v__Mask",e[e.v_NonVariant=0]="v_NonVariant",e[e.v_Covariant=1]="v_Covariant",e[e.v_Contravariant=2]="v_Contravariant",e[e.NoSpecialConstraint=0]="NoSpecialConstraint",e[e.ReferenceTypeConstraint=4]="ReferenceTypeConstraint",e[e.NotNullableValueTypeConstraint=8]="NotNullableValueTypeConstraint",e[e.DefaultConstructorConstraint=16]="DefaultConstructorConstraint"}(t.CorGenericParamAttr||(t.CorGenericParamAttr={})),function(e){e[e.NoMangle=1]="NoMangle",e[e.cs__Mask=6]="cs__Mask",e[e.cs_CharSetNotSpec=0]="cs_CharSetNotSpec",e[e.cs_CharSetAnsi=2]="cs_CharSetAnsi",e[e.cs_CharSetUnicode=4]="cs_CharSetUnicode",e[e.cs_CharSetAuto=6]="cs_CharSetAuto",e[e.bf__Mask=48]="bf__Mask",e[e.bf_BestFitUseAssem=0]="bf_BestFitUseAssem",e[e.bf_BestFitEnabled=16]="bf_BestFitEnabled",e[e.bf_BestFitDisabled=32]="bf_BestFitDisabled",e[e.touc__Mask=12288]="touc__Mask",e[e.touc_ThrowOnUnmappableCharUseAssem=0]="touc_ThrowOnUnmappableCharUseAssem",e[e.touc_ThrowOnUnmappableCharEnabled=4096]="touc_ThrowOnUnmappableCharEnabled",e[e.touc_ThrowOnUnmappableCharDisabled=8192]="touc_ThrowOnUnmappableCharDisabled",e[e.SupportsLastError=64]="SupportsLastError",e[e.cc__Mask=1792]="cc__Mask",e[e.cc_CallConvWinapi=256]="cc_CallConvWinapi",e[e.cc_CallConvCdecl=512]="cc_CallConvCdecl",e[e.cc_CallConvStdcall=768]="cc_CallConvStdcall",e[e.cc_CallConvThiscall=1024]="cc_CallConvThiscall",e[e.cc_CallConvFastcall=1280]="cc_CallConvFastcall"}(t.CorPinvokeMap||(t.CorPinvokeMap={})),function(e){e[e.v__Mask=7]="v__Mask",e[e.v_Public=1]="v_Public",e[e.v_Private=2]="v_Private"}(t.CorManifestResourceFlags||(t.CorManifestResourceFlags={})),function(e){e[e.ma__Mask=7]="ma__Mask",e[e.ma_PrivateScope=0]="ma_PrivateScope",e[e.ma_Private=1]="ma_Private",e[e.ma_FamAndAssem=2]="ma_FamAndAssem",e[e.ma_Assem=3]="ma_Assem",e[e.ma_Family=4]="ma_Family",e[e.ma_FamOrAssem=5]="ma_FamOrAssem",e[e.ma_Public=6]="ma_Public",e[e.Static=16]="Static",e[e.Final=32]="Final",e[e.Virtual=64]="Virtual",e[e.HideBySig=128]="HideBySig",e[e.vl__Mask=256]="vl__Mask",e[e.vl_ReuseSlot=0]="vl_ReuseSlot",e[e.vl_NewSlot=256]="vl_NewSlot",e[e.CheckAccessOnOverride=512]="CheckAccessOnOverride",e[e.Abstract=1024]="Abstract",e[e.SpecialName=2048]="SpecialName",e[e.PInvokeImpl=8192]="PInvokeImpl",e[e.UnmanagedExport=8]="UnmanagedExport",e[e.RtSpecialName=4096]="RtSpecialName",e[e.HasSecurity=16384]="HasSecurity",e[e.RequireSecObject=32768]="RequireSecObject"}(t.CorMethodAttr||(t.CorMethodAttr={})),function(e){e[e.ct__Mask=3]="ct__Mask",e[e.ct_IL=0]="ct_IL",e[e.ct_Native=1]="ct_Native",e[e.ct_OptIL=2]="ct_OptIL",e[e.ct_Runtime=3]="ct_Runtime",e[e.m__Mask=4]="m__Mask",e[e.m_Unmanaged=4]="m_Unmanaged",e[e.m_Managed=0]="m_Managed",e[e.ForwardRef=16]="ForwardRef",e[e.PreserveSig=128]="PreserveSig",e[e.InternalCall=4096]="InternalCall",e[e.Synchronized=32]="Synchronized",e[e.NoInlining=8]="NoInlining"}(t.CorMethodImpl||(t.CorMethodImpl={})),function(e){e[e.Setter=1]="Setter",e[e.Getter=2]="Getter",e[e.Other=4]="Other",e[e.AddOn=8]="AddOn",e[e.RemoveOn=16]="RemoveOn",e[e.Fire=32]="Fire"}(t.CorMethodSemanticsAttr||(t.CorMethodSemanticsAttr={})),function(e){e[e.In=1]="In",e[e.Out=2]="Out",e[e.Optional=16]="Optional",e[e.HasDefault=4096]="HasDefault",e[e.HasFieldMarshal=8192]="HasFieldMarshal",e[e.Unused=53216]="Unused"}(t.CorParamAttr||(t.CorParamAttr={})),function(e){e[e.SpecialName=512]="SpecialName",e[e.RtSpecialName=1024]="RtSpecialName",e[e.HasDefault=4096]="HasDefault",e[e.Unused=59903]="Unused"}(t.CorPropertyAttr||(t.CorPropertyAttr={})),function(e){e[e.v__Mask=7]="v__Mask",e[e.v_NotPublic=0]="v_NotPublic",e[e.v_Public=1]="v_Public",e[e.v_NestedPublic=2]="v_NestedPublic",e[e.v_NestedPrivate=3]="v_NestedPrivate",e[e.v_NestedFamily=4]="v_NestedFamily",e[e.v_NestedAssembly=5]="v_NestedAssembly",e[e.v_NestedFamAndAssem=6]="v_NestedFamAndAssem",e[e.v_NestedFamOrAssem=7]="v_NestedFamOrAssem",e[e.l__Mask=24]="l__Mask",e[e.l_AutoLayout=0]="l_AutoLayout",e[e.l_SequentialLayout=8]="l_SequentialLayout",e[e.l_ExplicitLayout=16]="l_ExplicitLayout",e[e.cs__Mask=96]="cs__Mask",e[e.cs_Class=0]="cs_Class",e[e.cs_Interface=32]="cs_Interface",e[e.Abstract=128]="Abstract",e[e.Sealed=256]="Sealed",e[e.SpecialName=1024]="SpecialName",e[e.Import=4096]="Import",e[e.Serializable=8192]="Serializable",e[e.WindowsRuntime=16384]="WindowsRuntime",e[e.sf__Mask=196608]="sf__Mask",e[e.sf_AnsiClass=0]="sf_AnsiClass",e[e.sf_UnicodeClass=65536]="sf_UnicodeClass",e[e.sf_AutoClass=131072]="sf_AutoClass",e[e.sf_CustomFormatClass=196608]="sf_CustomFormatClass",e[e.CustomFormatMask=12582912]="CustomFormatMask",e[e.BeforeFieldInit=1048576]="BeforeFieldInit",e[e.Forwarder=2097152]="Forwarder",e[e.RtSpecialName=2048]="RtSpecialName",e[e.HasSecurity=262144]="HasSecurity"}(t.CorTypeAttr||(t.CorTypeAttr={})),function(e){e[e.ActionNil=0]="ActionNil",e[e.Request=1]="Request",e[e.Demand=2]="Demand",e[e.Assert=3]="Assert",e[e.Deny=4]="Deny",e[e.PermitOnly=5]="PermitOnly",e[e.LinktimeCheck=6]="LinktimeCheck",e[e.InheritanceCheck=7]="InheritanceCheck",e[e.RequestMinimum=8]="RequestMinimum",e[e.RequestOptional=9]="RequestOptional",e[e.RequestRefuse=10]="RequestRefuse",e[e.PrejitGrant=11]="PrejitGrant",e[e.PrejitDenied=12]="PrejitDenied",e[e.NonCasDemand=13]="NonCasDemand",e[e.NonCasLinkDemand=14]="NonCasLinkDemand",e[e.NonCasInheritance=15]="NonCasInheritance"}(t.CorDeclSecurity||(t.CorDeclSecurity={})),function(e){e[e.End=0]="End",e[e.Void=1]="Void",e[e.Boolean=2]="Boolean",e[e.Char=3]="Char",e[e.I1=4]="I1",e[e.U1=5]="U1",e[e.I2=6]="I2",e[e.U2=7]="U2",e[e.I4=8]="I4",e[e.U4=9]="U4",e[e.I8=10]="I8",e[e.U8=11]="U8",e[e.R4=12]="R4",e[e.R8=13]="R8",e[e.String=14]="String",e[e.Ptr=15]="Ptr",e[e.ByRef=16]="ByRef",e[e.ValueType=17]="ValueType",e[e.Class=18]="Class",e[e.Var=19]="Var",e[e.Array=20]="Array",e[e.GenericInst=21]="GenericInst",e[e.TypedByRef=22]="TypedByRef",e[e.I=24]="I",e[e.U=25]="U",e[e.FnPtr=27]="FnPtr",e[e.Object=28]="Object",e[e.SzArray=29]="SzArray",e[e.MVar=30]="MVar",e[e.CModReqd=31]="CModReqd",e[e.CModOpt=32]="CModOpt",e[e.Internal=33]="Internal",e[e.Modifier=64]="Modifier",e[e.Sentinel=65]="Sentinel",e[e.Pinned=69]="Pinned",e[e.R4HFA=70]="R4HFA",e[e.R8HFA=71]="R8HFA"}(t.CorElementType||(t.CorElementType={}))},function(e,t,a){"use strict";function r(e){return M(e.toString(16).toUpperCase(),2)}function i(e){return M(e.toString(16).toUpperCase(),4)}function o(e){return M(e.toString(16).toUpperCase(),8)}function s(e){return r(e)+"h"}function n(e){return i(e)+"h"}function d(e){return o(e)+"h"}function l(e){return e.toString(16).toUpperCase()+"h ("+e+")"}function f(e){return e.toLocaleString()}function _(e,t){void 0===t&&(t=16);for(var a=[],i=0;i=0&&a<64&&a<32&&0!=(t&1<=32&&0!=(e&1<>1;var a=e[0];if(0==(128&a))return t>>1|4294967232;if(128==(192&a))return t>>1|4294959104;if(192==(224&a))return t>>1|4026531840;throw new RangeError},t.getCompressedIntSize=function(e){if(0!=(4294967040&e))throw new RangeError;if(0==(128&e))return 1;if(128==(192&e))return 2;if(192==(224&e))return 4;throw new RangeError}},function(e,t,a){"use strict";t.__esModule=!0;var r=a(0);t.generateNavList=function(e){var t,a=[(t="HEADERS",{target:{pageID:t,title:"Headers"},children:[{target:{pageID:t,title:"DOS Header",elemID:"dos-hdr"}},{target:{pageID:t,title:"PE Signature",elemID:"pe-sig"}},{target:{pageID:t,title:"PE File Header",elemID:"pe-hdr"}},{target:{pageID:t,title:"Optional Header",elemID:"opt-hdr"}},{target:{pageID:t,title:"Data Directories",elemID:"data-dir"}},{target:{pageID:t,title:"Section Headers",elemID:"sec-hdrs"}}]})],i=function(e){var t="MD_HEADERS";if(e.isManaged()){var a=[{target:{pageID:t,title:"CLI Header",elemID:"cli-hdr"}}];return e.hasMetadata()&&(a.push({target:{pageID:t,title:"Metadata Root",elemID:"md-root"}}),a.push({target:{pageID:t,title:"Stream Headers",elemID:"md-hdrs"}})),e.hasStrongNameSignature()&&a.push({target:{pageID:t,title:"Strong Name Signature",elemID:"sn-sig"}}),e.getMetadataStreamHeader("#Strings")&&a.push({target:{pageID:"MDS_STRINGS",title:"#String Stream",pageNum:0}}),e.getMetadataStreamHeader("#US")&&a.push({target:{pageID:"MDS_US",title:"#US",pageNum:0}}),e.getMetadataStreamHeader("#GUID")&&a.push({target:{pageID:"MDS_GUID",title:"#GUID",pageNum:0}}),e.getMetadataStreamHeader("#Blob")&&a.push({target:{pageID:"MDS_BLOB",title:"#Blob",pageNum:0}}),e.getMetadataStreamHeader("#~")&&a.push(function(e){e.getMetadataTableHeader();for(var t=[],a=r.MetadataTableIndex,i=0;io&&(n=o),{start:s,end:n}}t.generateMdsTablePageData=function(e){return{nav:{pageID:"MDS_TABLE",title:"#~ Stream"},tableHeader:function(e){var t={title:"Metadata Table Header",elemID:"mdt-hdr"},a=e.getMetadataTableHeader();return a?(t.groups=[{title:"",items:[i.formatU4Field("Reserved",a.Reserved),i.formatU1Field("MajorVersion",a.MajorVersion,!0),i.formatU1Field("MinorVersion",a.MinorVersion,!0),i.formatU1Field("HeapSizes",a.HeapSizes),i.formatU1Field("Reserved2",a.Reserved2),i.formatU8Field("Valid",a.Valid),i.formatU8Field("Sorted",a.Sorted)]},{title:"Rows",items:a.Rows.items.map(function(e,t){return i.formatU4Field("Rows["+t+"]",e,!0)})}],t):t}(e),tableInfo:function(e){for(var t=[],a=0;a>a.tagSize}}t.loadU1Field=s,t.loadU2Field=n,t.loadU4Field=d,t.loadU8Field=l,t.loadCompressedUIntField=f,t.loadU1EnumField=_,t.loadU2EnumField=M,t.loadU4EnumField=m,t.loadFixedSizeByteArrayField=I,t.loadFixedSizeAsciiStringField=u,t.loadNullTerminatedStringField=c,t.loadFixedSizeUnicodeStringField=S,t.loadStructArrayByCount=E,t.loadImageDosHeader=function(e,t){var a=t,r=n(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=n(e,a+=o._size),l=n(e,a+=s._size),f=n(e,a+=l._size),_=n(e,a+=f._size),M=n(e,a+=_._size),m=n(e,a+=M._size),u=n(e,a+=m._size),c=n(e,a+=u._size),S=n(e,a+=c._size),E=n(e,a+=S._size),A=n(e,a+=E._size),p=I(e,a+=A._size,8),T=n(e,a+=p._size),b=n(e,a+=T._size),g=I(e,a+=b._size,20),z=d(e,a+=g._size);return{_offset:t,_size:(a+=z._size)-t,e_magic:r,e_cblp:i,e_cp:o,e_crlc:s,e_cparhdr:l,e_minalloc:f,e_maxalloc:_,e_ss:M,e_sp:m,e_csum:u,e_ip:c,e_cs:S,e_lfarlc:E,e_ovno:A,e_res:p,e_oemid:T,e_oeminfo:b,e_res2:g,e_lfanew:z}},t.loadImageFileHeader=function(e,t){var a=t,r=n(e,a),i=n(e,a+=r._size),o=d(e,a+=i._size),s=d(e,a+=o._size),l=d(e,a+=s._size),f=n(e,a+=l._size),_=M(e,a+=f._size);return{_offset:t,_size:(a+=_._size)-t,Machine:r,NumberOfSections:i,TimeDateStamp:o,PointerToSymbolTable:s,NumberOfSymbols:l,SizeOfOptionalHeader:f,Characteristics:_}},t.loadImageOptionalHeader32=function(e,t){var a=t,r=n(e,a),i=s(e,a+=r._size),o=s(e,a+=i._size),l=d(e,a+=o._size),f=d(e,a+=l._size),_=d(e,a+=f._size),m=d(e,a+=_._size),I=d(e,a+=m._size),u=d(e,a+=I._size),c=d(e,a+=u._size),S=d(e,a+=c._size),E=d(e,a+=S._size),A=n(e,a+=E._size),p=n(e,a+=A._size),T=n(e,a+=p._size),b=n(e,a+=T._size),g=n(e,a+=b._size),z=n(e,a+=g._size),C=d(e,a+=z._size),F=d(e,a+=C._size),R=d(e,a+=F._size),h=d(e,a+=R._size),N=M(e,a+=h._size),v=M(e,a+=N._size),O=d(e,a+=v._size),D=d(e,a+=O._size),y=d(e,a+=D._size),P=d(e,a+=y._size),U=d(e,a+=P._size),G=d(e,a+=U._size);return{_offset:t,_size:(a+=G._size)-t,Magic:r,MajorLinkerVersion:i,MinorLinkerVersion:o,SizeOfCode:l,SizeOfInitializedData:f,SizeOfUninitializedData:_,AddressOfEntryPoint:m,BaseOfCode:I,BaseOfData:u,ImageBase:c,SectionAlignment:S,FileAlignment:E,MajorOperatingSystemVersion:A,MinorOperatingSystemVersion:p,MajorImageVersion:T,MinorImageVersion:b,MajorSubsystemVersion:g,MinorSubsystemVersion:z,Win32VersionValue:C,SizeOfImage:F,SizeOfHeaders:R,CheckSum:h,Subsystem:N,DllCharacteristics:v,SizeOfStackReserve:O,SizeOfStackCommit:D,SizeOfHeapReserve:y,SizeOfHeapCommit:P,LoaderFlags:U,NumberOfRvaAndSizes:G}},t.loadImageOptionalHeader64=function(e,t){var a=t,r=n(e,a),i=s(e,a+=r._size),o=s(e,a+=i._size),f=d(e,a+=o._size),_=d(e,a+=f._size),m=d(e,a+=_._size),I=d(e,a+=m._size),u=d(e,a+=I._size),c=l(e,a+=u._size),S=d(e,a+=c._size),E=d(e,a+=S._size),A=n(e,a+=E._size),p=n(e,a+=A._size),T=n(e,a+=p._size),b=n(e,a+=T._size),g=n(e,a+=b._size),z=n(e,a+=g._size),C=d(e,a+=z._size),F=d(e,a+=C._size),R=d(e,a+=F._size),h=d(e,a+=R._size),N=M(e,a+=h._size),v=M(e,a+=N._size),O=l(e,a+=v._size),D=l(e,a+=O._size),y=l(e,a+=D._size),P=l(e,a+=y._size),U=d(e,a+=P._size),G=d(e,a+=U._size);return{_offset:t,_size:(a+=G._size)-t,Magic:r,MajorLinkerVersion:i,MinorLinkerVersion:o,SizeOfCode:f,SizeOfInitializedData:_,SizeOfUninitializedData:m,AddressOfEntryPoint:I,BaseOfCode:u,ImageBase:c,SectionAlignment:S,FileAlignment:E,MajorOperatingSystemVersion:A,MinorOperatingSystemVersion:p,MajorImageVersion:T,MinorImageVersion:b,MajorSubsystemVersion:g,MinorSubsystemVersion:z,Win32VersionValue:C,SizeOfImage:F,SizeOfHeaders:R,CheckSum:h,Subsystem:N,DllCharacteristics:v,SizeOfStackReserve:O,SizeOfStackCommit:D,SizeOfHeapReserve:y,SizeOfHeapCommit:P,LoaderFlags:U,NumberOfRvaAndSizes:G}},t.loadImageDataDirectory=A,t.loadImageSectionHeader=function(e,t){var a=t,r=u(e,a,8),i=d(e,a+=r._size),o=d(e,a+=i._size),s=d(e,a+=o._size),l=d(e,a+=s._size),f=d(e,a+=l._size),_=d(e,a+=f._size),M=n(e,a+=_._size),I=n(e,a+=M._size),c=m(e,a+=I._size);return{_offset:t,_size:(a+=c._size)-t,Name:r,VirtualSize:i,VirtualAddress:o,SizeOfRawData:s,PointerToRawData:l,PointerToRelocations:f,PointerToLinenumbers:_,NumberOfRelocations:M,NumberOfLinenumbers:I,Characteristics:c}},t.loadCliHeader=function(e,t){var a=t,r=d(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=A(e,a+=o._size),l=d(e,a+=s._size),f=d(e,a+=l._size),_=A(e,a+=f._size),M=A(e,a+=_._size),m=A(e,a+=M._size),I=A(e,a+=m._size),u=A(e,a+=I._size),c=A(e,a+=u._size);return{_offset:t,_size:(a+=c._size)-t,cb:r,MajorRuntimeVersion:i,MinorRuntimeVersion:o,MetaData:s,Flags:l,EntryPointToken:f,Resources:_,StrongNameSignature:M,CodeManagerTable:m,VTableFixups:I,ExportAddressTableJumps:u,ManagedNativeHeader:c}},t.loadMetadataRoot=function(e,t){var a=t,r=d(e,a),i=n(e,a+=r._size),s=n(e,a+=i._size),l=d(e,a+=s._size),f=d(e,a+=l._size),_=c(e,a+=f._size),M=I(e,a+=_._size,o.calculatePadding(_._size)),m=n(e,a+=M._size),u=n(e,a+=m._size);return{_offset:t,_size:(a+=u._size)-t,Signature:r,MajorVersion:i,MinorVersion:s,Reserved:l,VersionLength:f,VersionString:_,VersionPadding:M,Flags:m,Streams:u}},t.loadMetadataStreamHeader=function(e,t){var a=t,r=d(e,a),i=d(e,a+=r._size),s=c(e,a+=i._size),n=I(e,a+=s._size,o.calculatePadding(s._size));return{_offset:t,_size:(a+=n._size)-t,Offset:r,Size:i,Name:s,Padding:n}},t.loadMetadataTableHeader=function(e,t){var a=t,r=d(e,a),i=s(e,a+=r._size),n=s(e,a+=i._size),f=s(e,a+=n._size),_=s(e,a+=f._size),M=l(e,a+=_._size),m=l(e,a+=M._size),I=E(e,a+=m._size,d,o.count1(M.high)+o.count1(M.low));return{_offset:t,_size:(a+=I._size)-t,Reserved:r,MajorVersion:i,MinorVersion:n,HeapSizes:f,Reserved2:_,Valid:M,Sorted:m,Rows:I}},t.loadMetadataUSItem=function(e,t){var a=t,r=f(e,a);a+=r._size;var i=r.value,o=i>0?1:0,s=S(e,a,i>0?i-1:0),n=I(e,a+=s._size,o);return{_offset:t,_size:(a+=n._size)-t,Size:r,Value:s,Suffix:n}},t.loadMetadataBlobItem=function(e,t){var a=t,r=f(e,a),i=I(e,a+=r._size,r.value);return{_offset:t,_size:(a+=i._size)-t,Size:r,Value:i}},t.loadMdsStringsField=p,t.loadMdsGuidField=T,t.loadMdsBlobField=b,t.loadMdtRidField=g,t.loadMdCodedTokenField=z,t.loadMdTokenField=function(e,t){var a=d(e,t),i=(4278190080&a.value)>>24,o=16777215&a.value;return r({},a,{tid:i,rid:o})},t.decodeCodedToken=C,t.loadMdtModule=function(e,t){var a=t,r=n(e,a),i=p(e,a+=r._size),o=T(e,a+=i._size),s=T(e,a+=o._size),d=T(e,a+=s._size);return{_offset:t,_size:(a+=d._size)-t,Generation:r,Name:i,Mvid:o,EncId:s,EncBaseId:d}},t.loadMdtTypeRef=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.ResolutionScope,a),o=p(e,a+=r._size),s=p(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,ResolutionScope:r,Name:o,Namespace:s}},t.loadMdtTypeDef=function(e,t){var a=t,r=m(e,a),o=p(e,a+=r._size),s=p(e,a+=o._size);a+=s._size;var n=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);a+=n._size;var d=g(e,i.MetadataTableIndex.Field,a);a+=d._size;var l=g(e,i.MetadataTableIndex.MethodDef,a);return{_offset:t,_size:(a+=l._size)-t,Flags:r,Name:o,Namespace:s,Extends:n,FieldList:d,MethodList:l}},t.loadMdtFieldPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Field,a);return{_offset:t,_size:(a+=r._size)-t,Field:r}},t.loadMdtField=function(e,t){var a=t,r=M(e,a),i=p(e,a+=r._size),o=b(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,Flags:r,Name:i,Signature:o}},t.loadMdtMethodPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.MethodDef,a);return{_offset:t,_size:(a+=r._size)-t,Method:r}},t.loadMdtMethodDef=function(e,t){var a=t,r=d(e,a),o=M(e,a+=r._size),s=M(e,a+=o._size),n=p(e,a+=s._size),l=b(e,a+=n._size);a+=l._size;var f=g(e,i.MetadataTableIndex.Param,a);return{_offset:t,_size:(a+=f._size)-t,RVA:r,ImplFlags:o,Flags:s,Name:n,Signature:l,ParamList:f}},t.loadMdtParamPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Param,a);return{_offset:t,_size:(a+=r._size)-t,Param:r}},t.loadMdtParam=function(e,t){var a=t,r=M(e,a),i=n(e,a+=r._size),o=p(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,Flags:r,Sequence:i,Name:o}},t.loadMdtInterfaceImpl=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);return{_offset:t,_size:(a+=o._size)-t,Class:r,Interface:o}},t.loadMdtMemberRef=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.MemberRefParent,a),o=p(e,a+=r._size),s=b(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,Class:r,Name:o,Signature:s}},t.loadMdtConstant=function(e,t){var a=t,r=_(e,a),o=s(e,a+=r._size);a+=o._size;var n=z(e,i.MetadataCodedTokenIndex.HasConstant,a),d=b(e,a+=n._size);return{_offset:t,_size:(a+=d._size)-t,Type:r,PaddingZero:o,Parent:n,Value:d}},t.loadMdtCustomAttribute=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.HasCustomAttribute,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.CustomAttributeType,a),s=b(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,Parent:r,Type:o,Value:s}},t.loadMdtFieldMarshal=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.HasFieldMarshall,a),o=b(e,a+=r._size);return{_offset:t,_size:(a+=o._size)-t,Parent:r,NativeType:o}},t.loadMdtDeclSecurity=function(e,t){var a=t,r=M(e,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.HasDeclSecurity,a),s=b(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,Action:r,Parent:o,PermissionSet:s}},t.loadMdtClassLayout=function(e,t){var a=t,r=n(e,a),o=d(e,a+=r._size);a+=o._size;var s=g(e,i.MetadataTableIndex.TypeDef,a);return{_offset:t,_size:(a+=s._size)-t,PackingSize:r,ClassSize:o,Parent:s}},t.loadMdtFieldLayout=function(e,t){var a=t,r=d(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Field,a);return{_offset:t,_size:(a+=o._size)-t,OffSet:r,Field:o}},t.loadMdtStandAloneSig=function(e,t){var a=t,r=b(e,a);return{_offset:t,_size:(a+=r._size)-t,Signature:r}},t.loadMdtEventMap=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Event,a);return{_offset:t,_size:(a+=o._size)-t,Parent:r,EventList:o}},t.loadMdtEventPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Event,a);return{_offset:t,_size:(a+=r._size)-t,Event:r}},t.loadMdtEvent=function(e,t){var a=t,r=M(e,a),o=p(e,a+=r._size);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);return{_offset:t,_size:(a+=s._size)-t,EventFlags:r,Name:o,EventType:s}},t.loadMdtPropertyMap=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Property,a);return{_offset:t,_size:(a+=o._size)-t,Parent:r,PropertyList:o}},t.loadMdtPropertyPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Property,a);return{_offset:t,_size:(a+=r._size)-t,Property:r}},t.loadMdtProperty=function(e,t){var a=t,r=M(e,a),i=p(e,a+=r._size),o=b(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,PropFlags:r,Name:i,Type:o}},t.loadMdtMethodSemantics=function(e,t){var a=t,r=M(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.MethodDef,a);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.HasSemantics,a);return{_offset:t,_size:(a+=s._size)-t,Semantic:r,Method:o,Association:s}},t.loadMdtMethodImpl=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.MethodDefOrRef,a);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.MethodDefOrRef,a);return{_offset:t,_size:(a+=s._size)-t,Class:r,MethodBody:o,MethodDeclaration:s}},t.loadMdtModuleRef=function(e,t){var a=t,r=p(e,a);return{_offset:t,_size:(a+=r._size)-t,Name:r}},t.loadMdtTypeSpec=function(e,t){var a=t,r=b(e,a);return{_offset:t,_size:(a+=r._size)-t,Signature:r}},t.loadMdtImplMap=function(e,t){var a=t,r=M(e,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.MemberForwarded,a),s=p(e,a+=o._size);a+=s._size;var n=g(e,i.MetadataTableIndex.ModuleRef,a);return{_offset:t,_size:(a+=n._size)-t,MappingFlags:r,MemberForwarded:o,ImportName:s,ImportScope:n}},t.loadMdtFieldRVA=function(e,t){var a=t,r=d(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Field,a);return{_offset:t,_size:(a+=o._size)-t,RVA:r,Field:o}},t.loadMdtENCLog=function(e,t){var a=t,r=d(e,a),i=d(e,a+=r._size);return{_offset:t,_size:(a+=i._size)-t,Token:r,FuncCode:i}},t.loadMdtENCMap=function(e,t){var a=t,r=d(e,a);return{_offset:t,_size:(a+=r._size)-t,Token:r}},t.loadMdtAssembly=function(e,t){var a=t,r=m(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=n(e,a+=o._size),d=n(e,a+=s._size),l=m(e,a+=d._size),f=b(e,a+=l._size),_=p(e,a+=f._size),M=p(e,a+=_._size);return{_offset:t,_size:(a+=M._size)-t,HashAlgId:r,MajorVersion:i,MinorVersion:o,BuildNumber:s,RevisionNumber:d,Flags:l,PublicKey:f,Name:_,Locale:M}},t.loadMdtAssemblyProcessor=function(e,t){var a=t,r=d(e,a);return{_offset:t,_size:(a+=r._size)-t,Processor:r}},t.loadMdtAssemblyOS=function(e,t){var a=t,r=d(e,a),i=d(e,a+=r._size),o=d(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,OSPlatformID:r,OSMajorVersion:i,OSMinorVersion:o}},t.loadMdtAssemblyRef=function(e,t){var a=t,r=n(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=n(e,a+=o._size),d=m(e,a+=s._size),l=b(e,a+=d._size),f=p(e,a+=l._size),_=p(e,a+=f._size),M=b(e,a+=_._size);return{_offset:t,_size:(a+=M._size)-t,MajorVersion:r,MinorVersion:i,BuildNumber:o,RevisionNumber:s,Flags:d,PublicKeyOrToken:l,Name:f,Locale:_,HashValue:M}},t.loadMdtAssemblyRefProcessor=function(e,t){var a=t,r=d(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.AssemblyRef,a);return{_offset:t,_size:(a+=o._size)-t,Processor:r,AssemblyRef:o}},t.loadMdtAssemblyRefOS=function(e,t){var a=t,r=d(e,a),o=d(e,a+=r._size),s=d(e,a+=o._size);a+=s._size;var n=g(e,i.MetadataTableIndex.AssemblyRef,a);return{_offset:t,_size:(a+=n._size)-t,OSPlatformID:r,OSMajorVersion:o,OSMinorVersion:s,AssemblyRef:n}},t.loadMdtFile=function(e,t){var a=t,r=m(e,a),i=p(e,a+=r._size),o=b(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,Flags:r,Name:i,HashValue:o}},t.loadMdtExportedType=function(e,t){var a=t,r=m(e,a),o=d(e,a+=r._size),s=p(e,a+=o._size),n=p(e,a+=s._size);a+=n._size;var l=z(e,i.MetadataCodedTokenIndex.Implementation,a);return{_offset:t,_size:(a+=l._size)-t,Flags:r,TypeDefId:o,TypeName:s,TypeNamespace:n,Implementation:l}},t.loadMdtManifestResource=function(e,t){var a=t,r=d(e,a),o=m(e,a+=r._size),s=p(e,a+=o._size);a+=s._size;var n=z(e,i.MetadataCodedTokenIndex.Implementation,a);return{_offset:t,_size:(a+=n._size)-t,Offset:r,Flags:o,Name:s,Implementation:n}},t.loadMdtNestedClass=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=g(e,i.MetadataTableIndex.TypeDef,a);return{_offset:t,_size:(a+=o._size)-t,NestedClass:r,EnclosingClass:o}},t.loadMdtGenericParam=function(e,t){var a=t,r=n(e,a),o=M(e,a+=r._size);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.TypeOrMethodDef,a),d=p(e,a+=s._size);return{_offset:t,_size:(a+=d._size)-t,Number:r,Flags:o,Owner:s,Name:d}},t.loadMdtMethodSpec=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.MethodDefOrRef,a),o=b(e,a+=r._size);return{_offset:t,_size:(a+=o._size)-t,Method:r,Instantiation:o}},t.loadMdtGenericParamConstraint=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.GenericParam,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);return{_offset:t,_size:(a+=o._size)-t,Owner:r,Constraint:o}}},function(e,t,a){"use strict";t.__esModule=!0;var r=a(10),i=a(0),o=a(9),s=a(2),n=function(){function e(e){this.metadataSizingCache={},this.data=new DataView(e),this.loadHeaders()}return e.load=function(t){return new e(t)},e.prototype.getU1=function(e){return this.check(e,1),this.data.getUint8(e)},e.prototype.getU2=function(e){return this.check(e,2),this.data.getUint16(e,!0)},e.prototype.getU4=function(e){return this.check(e,3),this.data.getUint32(e,!0)},e.prototype.getData=function(e,t){return this.check(e,t),new Uint8Array(this.data.buffer.slice(e,e+t))},e.prototype.is32Bit=function(){var e=this.getOptionalHeader();if(null!=e)switch(e.Magic.value){case i.IMAGE_NT_OPTIONAL_HDR32_MAGIC:return!0;case i.IMAGE_NT_OPTIONAL_HDR64_MAGIC:return!1;default:return}},e.prototype.isManaged=function(){var e=this.getDataDirectories();return null!=e&&this.isDataDirectoryValid(e.items[i.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR])},e.prototype.hasMetadata=function(){var e=this.getCliHeader();return null!=e&&this.isDataDirectoryValid(e.MetaData)},e.prototype.hasManagedResources=function(){var e=this.getCliHeader();return null!=e&&this.isDataDirectoryValid(e.Resources)},e.prototype.hasStrongNameSignature=function(){var e=this.getCliHeader();return null!=e&&this.isDataDirectoryValid(e.StrongNameSignature)},e.prototype.isMetadataTableValid=function(e){var t=this.metadataTableInfo;return!(!t||!t[e])&&t[e].valid},e.prototype.isMetadataTableSorted=function(e){var t=this.metadataTableInfo;return!(!t||!t[e])&&t[e].sorted},e.prototype.getMetadataTableRows=function(e){var t=this.metadataTableInfo;return t&&t[e]?t[e].rows:0},e.prototype.getDosHeader=function(){return this.dosHeader},e.prototype.getPESignature=function(){return this.peSignature},e.prototype.getFileHeader=function(){return this.fileHeader},e.prototype.getOptionalHeader=function(){return this.optionalHeader},e.prototype.getDataDirectories=function(){return this.dataDirectories},e.prototype.getSectionHeaders=function(){return this.sectionHeaders},e.prototype.getCliHeader=function(){if(this.cliHeader)return this.cliHeader;if(this.isManaged()){var e=this.rvaToOffset(this.dataDirectories.items[i.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress.value);return this.cliHeader=r.loadCliHeader(this,e),this.cliHeader}},e.prototype.getMetadataRoot=function(){if(this.metadataRoot)return this.metadataRoot;var e=this.getCliHeader();if(e){var t=this.rvaToOffset(e.MetaData.VirtualAddress.value);if(t)return this.metadataRoot=r.loadMetadataRoot(this,t),this.metadataRoot}},e.prototype.getMetadataStreamHeaders=function(){if(this.metadataStreamHeaders)return this.metadataStreamHeaders;var e=this.getMetadataRoot();return e&&e.Streams.value?(this.metadataStreamHeaders=r.loadStructArrayByCount(this,e._offset+e._size,r.loadMetadataStreamHeader,e.Streams.value),this.metadataStreamHeaders):void 0},e.prototype.getMetadataStreamHeader=function(e){var t=this.getMetadataStreamHeaders();if(t)return t.items.filter(function(t){return t.Name.value==e}).shift()},e.prototype.getStrongNameSignature=function(){if(this.strongNameSignature)return this.strongNameSignature;var e=this.getCliHeader();if(e){var t=this.rvaToOffset(e.StrongNameSignature.VirtualAddress.value);if(t)return this.strongNameSignature=r.loadFixedSizeByteArrayField(this,t,e.StrongNameSignature.Size.value),this.strongNameSignature}},e.prototype.getMetadataTableHeader=function(){if(this.metadataTableHeader)return this.metadataTableHeader;var e=this.getMetadataRoot();if(e){var t=this.getMetadataStreamHeader("#~");if(t){var a=e._offset+t.Offset.value;return this.metadataTableHeader=r.loadMetadataTableHeader(this,a),this.fillMetadataTableInfo(),this.fillMetadataTableInfoExtra(),this.metadataTableHeader}}},e.prototype.getMdsStringsItem=function(e){var t=this.getMetadataRoot();if(t){var a=this.getMetadataStreamHeader("#Strings");if(a)return e<0||e>=a.Size.value?void 0:r.loadNullTerminatedStringField(this,t._offset+a.Offset.value+e)}},e.prototype.getMdsUSItem=function(e){var t=this.getMetadataRoot();if(t){var a=this.getMetadataStreamHeader("#US");if(a)return e<0||e>=a.Size.value?void 0:r.loadMetadataUSItem(this,t._offset+a.Offset.value+e)}},e.prototype.getMdsGuidItems=function(){var e=this.getMetadataRoot();if(e){var t=this.getMetadataStreamHeader("#GUID");if(t){var a=t.Size.value/16;return r.loadStructArrayByCount(this,e._offset+t.Offset.value,function(e,t){return r.loadFixedSizeByteArrayField(e,t,16)},a)}}},e.prototype.getMdsBlobItem=function(e){var t=this.getMetadataRoot();if(t){var a=this.getMetadataStreamHeader("#Blob");if(a)return e<0||e>=a.Size.value?void 0:r.loadMetadataBlobItem(this,t._offset+a.Offset.value+e)}},e.prototype.getMdtModuleItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Module,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Module];return r.loadMdtModule(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtTypeRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.TypeRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Module];return r.loadMdtTypeRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtTypeDefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.TypeDef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.TypeDef];return r.loadMdtTypeDef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldPtr];return r.loadMdtFieldPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Field,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Field];return r.loadMdtField(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodPtr];return r.loadMdtMethodPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodDefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodDef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodDef];return r.loadMdtMethodDef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtParamPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ParamPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ParamPtr];return r.loadMdtParamPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtParamItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Param,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Param];return r.loadMdtParam(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtInterfaceImplItem=function(e){if(this.checkMdt(i.MetadataTableIndex.InterfaceImpl,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.InterfaceImpl];return r.loadMdtInterfaceImpl(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMemberRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MemberRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MemberRef];return r.loadMdtMemberRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtConstantItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Constant,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Constant];return r.loadMdtConstant(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtCustomAttributeItem=function(e){if(this.checkMdt(i.MetadataTableIndex.CustomAttribute,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.CustomAttribute];return r.loadMdtCustomAttribute(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldMarshalItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldMarshal,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldMarshal];return r.loadMdtFieldMarshal(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtDeclSecurityItem=function(e){if(this.checkMdt(i.MetadataTableIndex.DeclSecurity,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.DeclSecurity];return r.loadMdtDeclSecurity(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtClassLayoutItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ClassLayout,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ClassLayout];return r.loadMdtClassLayout(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldLayoutItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldLayout,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldLayout];return r.loadMdtFieldLayout(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtStandAloneSigItem=function(e){if(this.checkMdt(i.MetadataTableIndex.StandAloneSig,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.StandAloneSig];return r.loadMdtStandAloneSig(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtEventMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.EventMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.EventMap];return r.loadMdtEventMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtEventPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.EventPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.EventPtr];return r.loadMdtEventPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtEventItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Event,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Event];return r.loadMdtEvent(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtPropertyMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.PropertyMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.PropertyMap];return r.loadMdtPropertyMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtPropertyPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.PropertyPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.PropertyPtr];return r.loadMdtPropertyPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtPropertyItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Property,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Property];return r.loadMdtProperty(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodSemanticsItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodSemantics,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodSemantics];return r.loadMdtMethodSemantics(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodImplItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodImpl,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodImpl];return r.loadMdtMethodImpl(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtModuleRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ModuleRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ModuleRef];return r.loadMdtModuleRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtTypeSpecItem=function(e){if(this.checkMdt(i.MetadataTableIndex.TypeSpec,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.TypeSpec];return r.loadMdtTypeSpec(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtImplMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ImplMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ImplMap];return r.loadMdtImplMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldRVAItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldRVA,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldRVA];return r.loadMdtFieldRVA(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtENCLogItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ENCLog,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ENCLog];return r.loadMdtENCLog(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtENCMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ENCMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ENCMap];return r.loadMdtENCMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Assembly,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Assembly];return r.loadMdtAssembly(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyProcessorItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyProcessor,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyProcessor];return r.loadMdtAssemblyProcessor(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyOSItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyOS,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyOS];return r.loadMdtAssemblyOS(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyRef];return r.loadMdtAssemblyRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyRefProcessorItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyRefProcessor,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyRefProcessor];return r.loadMdtAssemblyRefProcessor(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyRefOSItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyRefOS,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyRefOS];return r.loadMdtAssemblyRefOS(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFileItem=function(e){if(this.checkMdt(i.MetadataTableIndex.File,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.File];return r.loadMdtFile(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtExportedTypeItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ExportedType,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ExportedType];return r.loadMdtExportedType(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtManifestResourceItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ManifestResource,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ManifestResource];return r.loadMdtManifestResource(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtNestedClassItem=function(e){if(this.checkMdt(i.MetadataTableIndex.NestedClass,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.NestedClass];return r.loadMdtNestedClass(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtGenericParamItem=function(e){if(this.checkMdt(i.MetadataTableIndex.GenericParam,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.GenericParam];return r.loadMdtGenericParam(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodSpecItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodSpec,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodSpec];return r.loadMdtMethodSpec(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtGenericParamConstraintItem=function(e){if(this.checkMdt(i.MetadataTableIndex.GenericParamConstraint,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.GenericParamConstraint];return r.loadMdtGenericParamConstraint(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getHeapSize=function(e){if(this.metadataSizingCache.heap)return this.metadataSizingCache.heap[e];var t=this.getMetadataTableHeader();if(!t)return 0;return this.metadataSizingCache.heap=[0,1,2].map(function(e){return 0!=(t.HeapSizes.value&1<>e.tagSize,r=0,i=e.tables;ra)return 4}return 2}),this.metadataSizingCache.codedToken[e])},e.prototype.rvaToOffset=function(e){var t=this.getSectionHeaderByRva(e);return t?e-t.VirtualAddress.value+t.PointerToRawData.value:0},e.prototype.offsetToRva=function(e){var t=this.getSectionHeaderByOffset(e);return t?e-t.PointerToRawData.value+t.VirtualAddress.value:0},e.prototype.check=function(e,t){if(e<0||e>=this.data.byteLength||t<0||e+t>this.data.byteLength)throw new o.PEError("INVALID_DATA_POSITION",e,t)},e.prototype.loadHeaders=function(){var e=0;if(this.dosHeader=r.loadImageDosHeader(this,e),this.dosHeader.e_magic.value!=i.IMAGE_DOS_SIGNATURE)throw new o.PEError("INVALID_DOS_SIGNATURE",e,2);if(e=this.dosHeader.e_lfanew.value,this.peSignature=r.loadU4Field(this,e),this.peSignature.value!=i.IMAGE_NT_SIGNATURE)throw new o.PEError("INVALID_PE_SIGNATURE",e,4);switch(e+=this.peSignature._size,this.fileHeader=r.loadImageFileHeader(this,e),e+=this.fileHeader._size,r.loadU2Field(this,e).value){case i.IMAGE_NT_OPTIONAL_HDR32_MAGIC:this.optionalHeader=r.loadImageOptionalHeader32(this,e);break;case i.IMAGE_NT_OPTIONAL_HDR64_MAGIC:this.optionalHeader=r.loadImageOptionalHeader64(this,e);break;default:throw new o.PEError("INVALID_OPTIONAL_HEADER_MAGIC",e,2)}if(this.optionalHeader.NumberOfRvaAndSizes.value!=i.IMAGE_NUMBEROF_DIRECTORY_ENTRIES)throw new o.PEError("INVALID_DATA_DIRECTORY_COUNT",this.optionalHeader.NumberOfRvaAndSizes._offset,this.optionalHeader.NumberOfRvaAndSizes._size);e+=this.optionalHeader._size,this.dataDirectories=r.loadStructArrayByCount(this,e,r.loadImageDataDirectory,this.optionalHeader.NumberOfRvaAndSizes.value),e+=this.dataDirectories._size,this.sectionHeaders=r.loadStructArrayByCount(this,e,r.loadImageSectionHeader,this.fileHeader.NumberOfSections.value)},e.prototype.getSectionHeaderByOffset=function(e){return this.sectionHeaders&&this.sectionHeaders.items.filter(function(t){var a=t.PointerToRawData.value,r=t.SizeOfRawData.value;return e>=a&&e=a&&e0&&e.Size.value>0||!1},e.prototype.fillMetadataTableInfo=function(){var e=this.metadataTableHeader;if(e){for(var t={},a=0,r=0;r65535?4:2:0,baseOffset:0,rowSize:0}}this.metadataTableInfo=t}},e.prototype.fillMetadataTableInfoExtra=function(){var e=this.metadataTableHeader;if(e){var t=this.metadataTableInfo;if(t){var a=i.MetadataCodedTokenIndex,r=this.getCodedTokenSize.bind(this),o=i.MetadataTableIndex,s=this.getHeapSize(0),n=this.getHeapSize(1),d=this.getHeapSize(2),l=e._offset+e._size,f=t[o.Module];f.valid&&(f.baseOffset=l,f.rowSize=2+s+3*n),l+=f.rows*f.rowSize,(f=t[o.TypeRef]).valid&&(f.baseOffset=l,f.rowSize=r(a.ResolutionScope)+2*s),l+=f.rows*f.rowSize,(f=t[o.TypeDef]).valid&&(f.baseOffset=l,f.rowSize=4+2*s+r(a.TypeDefOrRef)+t[o.Field].idSize+t[o.MethodDef].idSize),l+=f.rows*f.rowSize,(f=t[o.FieldPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Field].idSize),l+=f.rows*f.rowSize,(f=t[o.Field]).valid&&(f.baseOffset=l,f.rowSize=2+s+d),l+=f.rows*f.rowSize,(f=t[o.MethodPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.MethodDef].idSize),l+=f.rows*f.rowSize,(f=t[o.MethodDef]).valid&&(f.baseOffset=l,f.rowSize=8+s+d+t[o.Param].idSize),l+=f.rows*f.rowSize,(f=t[o.ParamPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Param].idSize),l+=f.rows*f.rowSize,(f=t[o.Param]).valid&&(f.baseOffset=l,f.rowSize=4+s),l+=f.rows*f.rowSize,(f=t[o.InterfaceImpl]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+r(a.TypeDefOrRef)),l+=f.rows*f.rowSize,(f=t[o.MemberRef]).valid&&(f.baseOffset=l,f.rowSize=r(a.MemberRefParent)+s+d),l+=f.rows*f.rowSize,(f=t[o.Constant]).valid&&(f.baseOffset=l,f.rowSize=2+r(a.HasConstant)+d),l+=f.rows*f.rowSize,(f=t[o.CustomAttribute]).valid&&(f.baseOffset=l,f.rowSize=r(a.HasCustomAttribute)+r(a.CustomAttributeType)+d),l+=f.rows*f.rowSize,(f=t[o.FieldMarshal]).valid&&(f.baseOffset=l,f.rowSize=r(a.HasFieldMarshall)+d),l+=f.rows*f.rowSize,(f=t[o.DeclSecurity]).valid&&(f.baseOffset=l,f.rowSize=2+r(a.HasDeclSecurity)+d),l+=f.rows*f.rowSize,(f=t[o.ClassLayout]).valid&&(f.baseOffset=l,f.rowSize=6+t[o.TypeDef].idSize),l+=f.rows*f.rowSize,(f=t[o.FieldLayout]).valid&&(f.baseOffset=l,f.rowSize=4+t[o.Field].idSize),l+=f.rows*f.rowSize,(f=t[o.StandAloneSig]).valid&&(f.baseOffset=l,f.rowSize=d),l+=f.rows*f.rowSize,(f=t[o.EventMap]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+t[o.Event].idSize),l+=f.rows*f.rowSize,(f=t[o.EventPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Event].idSize),l+=f.rows*f.rowSize,(f=t[o.Event]).valid&&(f.baseOffset=l,f.rowSize=2+s+r(a.TypeDefOrRef)),l+=f.rows*f.rowSize,(f=t[o.PropertyMap]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+t[o.Property].idSize),l+=f.rows*f.rowSize,(f=t[o.PropertyPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Property].idSize),l+=f.rows*f.rowSize,(f=t[o.Property]).valid&&(f.baseOffset=l,f.rowSize=2+s+d),l+=f.rows*f.rowSize,(f=t[o.MethodSemantics]).valid&&(f.baseOffset=l,f.rowSize=2+t[o.MethodDef].idSize+r(a.HasSemantics)),l+=f.rows*f.rowSize,(f=t[o.MethodImpl]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+2*r(a.MethodDefOrRef)),l+=f.rows*f.rowSize,(f=t[o.ModuleRef]).valid&&(f.baseOffset=l,f.rowSize=s),l+=f.rows*f.rowSize,(f=t[o.TypeSpec]).valid&&(f.baseOffset=l,f.rowSize=d),l+=f.rows*f.rowSize,(f=t[o.ImplMap]).valid&&(f.baseOffset=l,f.rowSize=2+r(a.MemberForwarded)+s+t[o.ModuleRef].idSize),l+=f.rows*f.rowSize,(f=t[o.FieldRVA]).valid&&(f.baseOffset=l,f.rowSize=4+t[o.Field].idSize),l+=f.rows*f.rowSize,(f=t[o.ENCLog]).valid&&(f.baseOffset=l,f.rowSize=8),l+=f.rows*f.rowSize,(f=t[o.ENCMap]).valid&&(f.baseOffset=l,f.rowSize=4),l+=f.rows*f.rowSize,(f=t[o.Assembly]).valid&&(f.baseOffset=l,f.rowSize=16+d+2*s),l+=f.rows*f.rowSize,(f=t[o.AssemblyProcessor]).valid&&(f.baseOffset=l,f.rowSize=4),l+=f.rows*f.rowSize,(f=t[o.AssemblyOS]).valid&&(f.baseOffset=l,f.rowSize=12),l+=f.rows*f.rowSize,(f=t[o.AssemblyRef]).valid&&(f.baseOffset=l,f.rowSize=12+2*d+2*s),l+=f.rows*f.rowSize,(f=t[o.AssemblyRefProcessor]).valid&&(f.baseOffset=l,f.rowSize=4+t[o.AssemblyRef].idSize),l+=f.rows*f.rowSize,(f=t[o.AssemblyRefOS]).valid&&(f.baseOffset=l,f.rowSize=12+t[o.AssemblyRef].idSize),l+=f.rows*f.rowSize,(f=t[o.File]).valid&&(f.baseOffset=l,f.rowSize=4+s+d),l+=f.rows*f.rowSize,(f=t[o.ExportedType]).valid&&(f.baseOffset=l,f.rowSize=8+2*s+r(a.Implementation)),l+=f.rows*f.rowSize,(f=t[o.ManifestResource]).valid&&(f.baseOffset=l,f.rowSize=8+s+r(a.Implementation)),l+=f.rows*f.rowSize,(f=t[o.NestedClass]).valid&&(f.baseOffset=l,f.rowSize=2*t[o.TypeDef].idSize),l+=f.rows*f.rowSize,(f=t[o.GenericParam]).valid&&(f.baseOffset=l,f.rowSize=4+r(a.TypeOrMethodDef)+s),l+=f.rows*f.rowSize,(f=t[o.MethodSpec]).valid&&(f.baseOffset=l,f.rowSize=r(a.MethodDefOrRef)+d),l+=f.rows*f.rowSize,(f=t[o.GenericParamConstraint]).valid&&(f.baseOffset=l,f.rowSize=t[o.GenericParam].idSize+r(a.TypeDefOrRef)),l+=f.rows*f.rowSize}}},e.prototype.checkMdt=function(e,t){if(!this.metadataTableInfo)return!1;var a=this.metadataTableInfo[e];return null!=a&&a.valid&&t>0&&t<=a.rows},e}();t.PEImage=n},function(e,t,a){"use strict";t.__esModule=!0,t.createResNavDataMessage=function(e){return{type:"RES_NAV_DATA",navList:e}},t.createResPageDataMessage=function(e){return{type:"RES_PAGE_DATA",pageData:e}},t.createResPEPropsMessage=function(e,t){return{type:"RES_PE_PROPS",is32Bit:e,isManaged:t}},t.createResPEErrorMessage=function(e){return{type:"RES_PE_ERROR",error:e}}},function(e,t,a){"use strict";t.__esModule=!0;var r=a(12),i=a(11),o=a(8),s=a(3),n=null;onmessage=function(e){var t=e.data;switch(t.type){case"REQ_OPEN_FILE":!function(e){var t=new FileReader;t.onload=function(e){try{var t=e.target.result;n=i.PEImage.load(t),o.clearGeneratorCache();var a=o.generatePageData(n,"HEADERS"),d=r.createResPageDataMessage(a);postMessage(d);var l=n.is32Bit(),f=n.isManaged(),_=r.createResPEPropsMessage(l,f);postMessage(_);var M=s.generateNavList(n),m=r.createResNavDataMessage(M);postMessage(m)}catch(e){var I=r.createResPEErrorMessage(e.message||"Unknown error: "+JSON.stringify(e));postMessage(I)}},t.onerror=function(e){n=null;var t=r.createResPEErrorMessage("Can't open file.");postMessage(t)},t.readAsArrayBuffer(e.file)}(t);break;case"REQ_OPEN_NAV":!function(e){if(null!=n){var t=e.target,a=t.pageID,i=t.subID,s=t.pageNum,d=t.elemID,l=o.generatePageData(n,a,i,s);l.nav.elemID=d;var f=r.createResPageDataMessage(l);postMessage(f)}}(t)}}}]); +!function(e){var t={};function a(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)a.d(r,i,function(t){return e[t]}.bind(null,i));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=13)}([function(e,t,a){"use strict";var r;t.__esModule=!0,t.IMAGE_DOS_SIGNATURE=23117,t.IMAGE_NT_SIGNATURE=17744,t.IMAGE_NT_OPTIONAL_HDR32_MAGIC=267,t.IMAGE_NT_OPTIONAL_HDR64_MAGIC=523,function(e){e[e.IMAGE_FILE_RELOCS_STRIPPED=1]="IMAGE_FILE_RELOCS_STRIPPED",e[e.IMAGE_FILE_EXECUTABLE_IMAGE=2]="IMAGE_FILE_EXECUTABLE_IMAGE",e[e.IMAGE_FILE_LINE_NUMS_STRIPPED=4]="IMAGE_FILE_LINE_NUMS_STRIPPED",e[e.IMAGE_FILE_LOCAL_SYMS_STRIPPED=8]="IMAGE_FILE_LOCAL_SYMS_STRIPPED",e[e.IMAGE_FILE_AGGRESIVE_WS_TRIM=16]="IMAGE_FILE_AGGRESIVE_WS_TRIM",e[e.IMAGE_FILE_LARGE_ADDRESS_AWARE=32]="IMAGE_FILE_LARGE_ADDRESS_AWARE",e[e.IMAGE_FILE_BYTES_REVERSED_LO=128]="IMAGE_FILE_BYTES_REVERSED_LO",e[e.IMAGE_FILE_32BIT_MACHINE=256]="IMAGE_FILE_32BIT_MACHINE",e[e.IMAGE_FILE_DEBUG_STRIPPED=512]="IMAGE_FILE_DEBUG_STRIPPED",e[e.IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP=1024]="IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP",e[e.IMAGE_FILE_NET_RUN_FROM_SWAP=2048]="IMAGE_FILE_NET_RUN_FROM_SWAP",e[e.IMAGE_FILE_SYSTEM=4096]="IMAGE_FILE_SYSTEM",e[e.IMAGE_FILE_DLL=8192]="IMAGE_FILE_DLL",e[e.IMAGE_FILE_UP_SYSTEM_ONLY=16384]="IMAGE_FILE_UP_SYSTEM_ONLY",e[e.IMAGE_FILE_BYTES_REVERSED_HI=32768]="IMAGE_FILE_BYTES_REVERSED_HI"}(t.ImageFile||(t.ImageFile={})),function(e){e[e.IMAGE_FILE_MACHINE_UNKNOWN=0]="IMAGE_FILE_MACHINE_UNKNOWN",e[e.IMAGE_FILE_MACHINE_TARGET_HOST=1]="IMAGE_FILE_MACHINE_TARGET_HOST",e[e.IMAGE_FILE_MACHINE_I386=332]="IMAGE_FILE_MACHINE_I386",e[e.IMAGE_FILE_MACHINE_R3000=354]="IMAGE_FILE_MACHINE_R3000",e[e.IMAGE_FILE_MACHINE_R4000=358]="IMAGE_FILE_MACHINE_R4000",e[e.IMAGE_FILE_MACHINE_R10000=360]="IMAGE_FILE_MACHINE_R10000",e[e.IMAGE_FILE_MACHINE_WCEMIPSV2=361]="IMAGE_FILE_MACHINE_WCEMIPSV2",e[e.IMAGE_FILE_MACHINE_ALPHA=388]="IMAGE_FILE_MACHINE_ALPHA",e[e.IMAGE_FILE_MACHINE_SH3=418]="IMAGE_FILE_MACHINE_SH3",e[e.IMAGE_FILE_MACHINE_SH3DSP=419]="IMAGE_FILE_MACHINE_SH3DSP",e[e.IMAGE_FILE_MACHINE_SH3E=420]="IMAGE_FILE_MACHINE_SH3E",e[e.IMAGE_FILE_MACHINE_SH4=422]="IMAGE_FILE_MACHINE_SH4",e[e.IMAGE_FILE_MACHINE_SH5=424]="IMAGE_FILE_MACHINE_SH5",e[e.IMAGE_FILE_MACHINE_ARM=448]="IMAGE_FILE_MACHINE_ARM",e[e.IMAGE_FILE_MACHINE_THUMB=450]="IMAGE_FILE_MACHINE_THUMB",e[e.IMAGE_FILE_MACHINE_ARMNT=452]="IMAGE_FILE_MACHINE_ARMNT",e[e.IMAGE_FILE_MACHINE_AM33=467]="IMAGE_FILE_MACHINE_AM33",e[e.IMAGE_FILE_MACHINE_POWERPC=496]="IMAGE_FILE_MACHINE_POWERPC",e[e.IMAGE_FILE_MACHINE_POWERPCFP=497]="IMAGE_FILE_MACHINE_POWERPCFP",e[e.IMAGE_FILE_MACHINE_IA64=512]="IMAGE_FILE_MACHINE_IA64",e[e.IMAGE_FILE_MACHINE_MIPS16=614]="IMAGE_FILE_MACHINE_MIPS16",e[e.IMAGE_FILE_MACHINE_ALPHA64=644]="IMAGE_FILE_MACHINE_ALPHA64",e[e.IMAGE_FILE_MACHINE_MIPSFPU=870]="IMAGE_FILE_MACHINE_MIPSFPU",e[e.IMAGE_FILE_MACHINE_MIPSFPU16=1126]="IMAGE_FILE_MACHINE_MIPSFPU16",e[e.IMAGE_FILE_MACHINE_AXP64=644]="IMAGE_FILE_MACHINE_AXP64",e[e.IMAGE_FILE_MACHINE_TRICORE=1312]="IMAGE_FILE_MACHINE_TRICORE",e[e.IMAGE_FILE_MACHINE_CEF=3311]="IMAGE_FILE_MACHINE_CEF",e[e.IMAGE_FILE_MACHINE_EBC=3772]="IMAGE_FILE_MACHINE_EBC",e[e.IMAGE_FILE_MACHINE_AMD64=34404]="IMAGE_FILE_MACHINE_AMD64",e[e.IMAGE_FILE_MACHINE_M32R=36929]="IMAGE_FILE_MACHINE_M32R",e[e.IMAGE_FILE_MACHINE_ARM64=43620]="IMAGE_FILE_MACHINE_ARM64",e[e.IMAGE_FILE_MACHINE_CEE=49390]="IMAGE_FILE_MACHINE_CEE"}(t.ImageFileMachine||(t.ImageFileMachine={})),function(e){e[e.IMAGE_SUBSYSTEM_UNKNOWN=0]="IMAGE_SUBSYSTEM_UNKNOWN",e[e.IMAGE_SUBSYSTEM_NATIVE=1]="IMAGE_SUBSYSTEM_NATIVE",e[e.IMAGE_SUBSYSTEM_WINDOWS_GUI=2]="IMAGE_SUBSYSTEM_WINDOWS_GUI",e[e.IMAGE_SUBSYSTEM_WINDOWS_CUI=3]="IMAGE_SUBSYSTEM_WINDOWS_CUI",e[e.IMAGE_SUBSYSTEM_OS2_CUI=5]="IMAGE_SUBSYSTEM_OS2_CUI",e[e.IMAGE_SUBSYSTEM_POSIX_CUI=7]="IMAGE_SUBSYSTEM_POSIX_CUI",e[e.IMAGE_SUBSYSTEM_NATIVE_WINDOWS=8]="IMAGE_SUBSYSTEM_NATIVE_WINDOWS",e[e.IMAGE_SUBSYSTEM_WINDOWS_CE_GUI=9]="IMAGE_SUBSYSTEM_WINDOWS_CE_GUI",e[e.IMAGE_SUBSYSTEM_EFI_APPLICATION=10]="IMAGE_SUBSYSTEM_EFI_APPLICATION",e[e.IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER=11]="IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER",e[e.IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER=12]="IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER",e[e.IMAGE_SUBSYSTEM_EFI_ROM=13]="IMAGE_SUBSYSTEM_EFI_ROM",e[e.IMAGE_SUBSYSTEM_XBOX=14]="IMAGE_SUBSYSTEM_XBOX",e[e.IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION=16]="IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION",e[e.IMAGE_SUBSYSTEM_XBOX_CODE_CATALOG=17]="IMAGE_SUBSYSTEM_XBOX_CODE_CATALOG"}(t.ImageSubsystem||(t.ImageSubsystem={})),function(e){e[e.IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA=32]="IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA",e[e.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE=64]="IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE",e[e.IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY=128]="IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY",e[e.IMAGE_DLLCHARACTERISTICS_NX_COMPAT=256]="IMAGE_DLLCHARACTERISTICS_NX_COMPAT",e[e.IMAGE_DLLCHARACTERISTICS_NO_ISOLATION=512]="IMAGE_DLLCHARACTERISTICS_NO_ISOLATION",e[e.IMAGE_DLLCHARACTERISTICS_NO_SEH=1024]="IMAGE_DLLCHARACTERISTICS_NO_SEH",e[e.IMAGE_DLLCHARACTERISTICS_NO_BIND=2048]="IMAGE_DLLCHARACTERISTICS_NO_BIND",e[e.IMAGE_DLLCHARACTERISTICS_APPCONTAINER=4096]="IMAGE_DLLCHARACTERISTICS_APPCONTAINER",e[e.IMAGE_DLLCHARACTERISTICS_WDM_DRIVER=8192]="IMAGE_DLLCHARACTERISTICS_WDM_DRIVER",e[e.IMAGE_DLLCHARACTERISTICS_GUARD_CF=16384]="IMAGE_DLLCHARACTERISTICS_GUARD_CF",e[e.IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE=32768]="IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE"}(t.ImageDllCharacteristics||(t.ImageDllCharacteristics={})),function(e){e[e.IMAGE_DIRECTORY_ENTRY_EXPORT=0]="IMAGE_DIRECTORY_ENTRY_EXPORT",e[e.IMAGE_DIRECTORY_ENTRY_IMPORT=1]="IMAGE_DIRECTORY_ENTRY_IMPORT",e[e.IMAGE_DIRECTORY_ENTRY_RESOURCE=2]="IMAGE_DIRECTORY_ENTRY_RESOURCE",e[e.IMAGE_DIRECTORY_ENTRY_EXCEPTION=3]="IMAGE_DIRECTORY_ENTRY_EXCEPTION",e[e.IMAGE_DIRECTORY_ENTRY_SECURITY=4]="IMAGE_DIRECTORY_ENTRY_SECURITY",e[e.IMAGE_DIRECTORY_ENTRY_BASERELOC=5]="IMAGE_DIRECTORY_ENTRY_BASERELOC",e[e.IMAGE_DIRECTORY_ENTRY_DEBUG=6]="IMAGE_DIRECTORY_ENTRY_DEBUG",e[e.IMAGE_DIRECTORY_ENTRY_ARCHITECTURE=7]="IMAGE_DIRECTORY_ENTRY_ARCHITECTURE",e[e.IMAGE_DIRECTORY_ENTRY_GLOBALPTR=8]="IMAGE_DIRECTORY_ENTRY_GLOBALPTR",e[e.IMAGE_DIRECTORY_ENTRY_TLS=9]="IMAGE_DIRECTORY_ENTRY_TLS",e[e.IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG=10]="IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG",e[e.IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT=11]="IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT",e[e.IMAGE_DIRECTORY_ENTRY_IAT=12]="IMAGE_DIRECTORY_ENTRY_IAT",e[e.IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT=13]="IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT",e[e.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR=14]="IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR"}(t.ImageDirectoryEntry||(t.ImageDirectoryEntry={})),t.IMAGE_NUMBEROF_DIRECTORY_ENTRIES=16,function(e){e[e.IMAGE_SCN_TYPE_NO_PAD=8]="IMAGE_SCN_TYPE_NO_PAD",e[e.IMAGE_SCN_CNT_CODE=32]="IMAGE_SCN_CNT_CODE",e[e.IMAGE_SCN_CNT_INITIALIZED_DATA=64]="IMAGE_SCN_CNT_INITIALIZED_DATA",e[e.IMAGE_SCN_CNT_UNINITIALIZED_DATA=128]="IMAGE_SCN_CNT_UNINITIALIZED_DATA",e[e.IMAGE_SCN_LNK_OTHER=256]="IMAGE_SCN_LNK_OTHER",e[e.IMAGE_SCN_LNK_INFO=512]="IMAGE_SCN_LNK_INFO",e[e.IMAGE_SCN_LNK_REMOVE=2048]="IMAGE_SCN_LNK_REMOVE",e[e.IMAGE_SCN_LNK_COMDAT=4096]="IMAGE_SCN_LNK_COMDAT",e[e.IMAGE_SCN_NO_DEFER_SPEC_EXC=16384]="IMAGE_SCN_NO_DEFER_SPEC_EXC",e[e.IMAGE_SCN_GPREL=32768]="IMAGE_SCN_GPREL",e[e.IMAGE_SCN_MEM_PURGEABLE=131072]="IMAGE_SCN_MEM_PURGEABLE",e[e.IMAGE_SCN_MEM_16BIT=131072]="IMAGE_SCN_MEM_16BIT",e[e.IMAGE_SCN_MEM_LOCKED=262144]="IMAGE_SCN_MEM_LOCKED",e[e.IMAGE_SCN_MEM_PRELOAD=524288]="IMAGE_SCN_MEM_PRELOAD",e[e.IMAGE_SCN_ALIGN_1BYTES=1048576]="IMAGE_SCN_ALIGN_1BYTES",e[e.IMAGE_SCN_ALIGN_2BYTES=2097152]="IMAGE_SCN_ALIGN_2BYTES",e[e.IMAGE_SCN_ALIGN_4BYTES=3145728]="IMAGE_SCN_ALIGN_4BYTES",e[e.IMAGE_SCN_ALIGN_8BYTES=4194304]="IMAGE_SCN_ALIGN_8BYTES",e[e.IMAGE_SCN_ALIGN_16BYTES=5242880]="IMAGE_SCN_ALIGN_16BYTES",e[e.IMAGE_SCN_ALIGN_32BYTES=6291456]="IMAGE_SCN_ALIGN_32BYTES",e[e.IMAGE_SCN_ALIGN_64BYTES=7340032]="IMAGE_SCN_ALIGN_64BYTES",e[e.IMAGE_SCN_ALIGN_128BYTES=8388608]="IMAGE_SCN_ALIGN_128BYTES",e[e.IMAGE_SCN_ALIGN_256BYTES=9437184]="IMAGE_SCN_ALIGN_256BYTES",e[e.IMAGE_SCN_ALIGN_512BYTES=10485760]="IMAGE_SCN_ALIGN_512BYTES",e[e.IMAGE_SCN_ALIGN_1024BYTES=11534336]="IMAGE_SCN_ALIGN_1024BYTES",e[e.IMAGE_SCN_ALIGN_2048BYTES=12582912]="IMAGE_SCN_ALIGN_2048BYTES",e[e.IMAGE_SCN_ALIGN_4096BYTES=13631488]="IMAGE_SCN_ALIGN_4096BYTES",e[e.IMAGE_SCN_ALIGN_8192BYTES=14680064]="IMAGE_SCN_ALIGN_8192BYTES",e[e.IMAGE_SCN_LNK_NRELOC_OVFL=16777216]="IMAGE_SCN_LNK_NRELOC_OVFL",e[e.IMAGE_SCN_MEM_DISCARDABLE=33554432]="IMAGE_SCN_MEM_DISCARDABLE",e[e.IMAGE_SCN_MEM_NOT_CACHED=67108864]="IMAGE_SCN_MEM_NOT_CACHED",e[e.IMAGE_SCN_MEM_NOT_PAGED=134217728]="IMAGE_SCN_MEM_NOT_PAGED",e[e.IMAGE_SCN_MEM_SHARED=268435456]="IMAGE_SCN_MEM_SHARED",e[e.IMAGE_SCN_MEM_EXECUTE=536870912]="IMAGE_SCN_MEM_EXECUTE",e[e.IMAGE_SCN_MEM_READ=1073741824]="IMAGE_SCN_MEM_READ",e[e.IMAGE_SCN_MEM_WRITE=2147483648]="IMAGE_SCN_MEM_WRITE",e[e.IMAGE_SCN_SCALE_INDEX=1]="IMAGE_SCN_SCALE_INDEX"}(t.ImageSection||(t.ImageSection={})),function(e){e[e.COMIMAGE_FLAGS_ILONLY=1]="COMIMAGE_FLAGS_ILONLY",e[e.COMIMAGE_FLAGS_32BITREQUIRED=2]="COMIMAGE_FLAGS_32BITREQUIRED",e[e.COMIMAGE_FLAGS_IL_LIBRARY=4]="COMIMAGE_FLAGS_IL_LIBRARY",e[e.COMIMAGE_FLAGS_STRONGNAMESIGNED=8]="COMIMAGE_FLAGS_STRONGNAMESIGNED",e[e.COMIMAGE_FLAGS_NATIVE_ENTRYPOINT=16]="COMIMAGE_FLAGS_NATIVE_ENTRYPOINT",e[e.COMIMAGE_FLAGS_TRACKDEBUGDATA=65536]="COMIMAGE_FLAGS_TRACKDEBUGDATA",e[e.COMIMAGE_FLAGS_32BITPREFERRED=131072]="COMIMAGE_FLAGS_32BITPREFERRED"}(t.ComImageFlags||(t.ComImageFlags={})),t.MetadataSignature=1112167234,function(e){e[e.Module=0]="Module",e[e.TypeRef=1]="TypeRef",e[e.TypeDef=2]="TypeDef",e[e.FieldPtr=3]="FieldPtr",e[e.Field=4]="Field",e[e.MethodPtr=5]="MethodPtr",e[e.MethodDef=6]="MethodDef",e[e.ParamPtr=7]="ParamPtr",e[e.Param=8]="Param",e[e.InterfaceImpl=9]="InterfaceImpl",e[e.MemberRef=10]="MemberRef",e[e.Constant=11]="Constant",e[e.CustomAttribute=12]="CustomAttribute",e[e.FieldMarshal=13]="FieldMarshal",e[e.DeclSecurity=14]="DeclSecurity",e[e.ClassLayout=15]="ClassLayout",e[e.FieldLayout=16]="FieldLayout",e[e.StandAloneSig=17]="StandAloneSig",e[e.EventMap=18]="EventMap",e[e.EventPtr=19]="EventPtr",e[e.Event=20]="Event",e[e.PropertyMap=21]="PropertyMap",e[e.PropertyPtr=22]="PropertyPtr",e[e.Property=23]="Property",e[e.MethodSemantics=24]="MethodSemantics",e[e.MethodImpl=25]="MethodImpl",e[e.ModuleRef=26]="ModuleRef",e[e.TypeSpec=27]="TypeSpec",e[e.ImplMap=28]="ImplMap",e[e.FieldRVA=29]="FieldRVA",e[e.ENCLog=30]="ENCLog",e[e.ENCMap=31]="ENCMap",e[e.Assembly=32]="Assembly",e[e.AssemblyProcessor=33]="AssemblyProcessor",e[e.AssemblyOS=34]="AssemblyOS",e[e.AssemblyRef=35]="AssemblyRef",e[e.AssemblyRefProcessor=36]="AssemblyRefProcessor",e[e.AssemblyRefOS=37]="AssemblyRefOS",e[e.File=38]="File",e[e.ExportedType=39]="ExportedType",e[e.ManifestResource=40]="ManifestResource",e[e.NestedClass=41]="NestedClass",e[e.GenericParam=42]="GenericParam",e[e.MethodSpec=43]="MethodSpec",e[e.GenericParamConstraint=44]="GenericParamConstraint",e[e.String=112]="String"}(r=t.MetadataTableIndex||(t.MetadataTableIndex={})),t.NumberOfMdTables=45,function(e){e[e.TypeDefOrRef=0]="TypeDefOrRef",e[e.HasConstant=1]="HasConstant",e[e.HasCustomAttribute=2]="HasCustomAttribute",e[e.HasFieldMarshall=3]="HasFieldMarshall",e[e.HasDeclSecurity=4]="HasDeclSecurity",e[e.MemberRefParent=5]="MemberRefParent",e[e.HasSemantics=6]="HasSemantics",e[e.MethodDefOrRef=7]="MethodDefOrRef",e[e.MemberForwarded=8]="MemberForwarded",e[e.Implementation=9]="Implementation",e[e.CustomAttributeType=10]="CustomAttributeType",e[e.ResolutionScope=11]="ResolutionScope",e[e.TypeOrMethodDef=12]="TypeOrMethodDef"}(t.MetadataCodedTokenIndex||(t.MetadataCodedTokenIndex={})),t.ctc=[{tagSize:2,tables:[r.TypeDef,r.TypeRef,r.TypeSpec]},{tagSize:2,tables:[r.Field,r.Param,r.Property]},{tagSize:5,tables:[r.MethodDef,r.Field,r.TypeRef,r.TypeDef,r.Param,r.InterfaceImpl,r.MemberRef,r.Module,r.DeclSecurity,r.Property,r.Event,r.StandAloneSig,r.ModuleRef,r.TypeSpec,r.Assembly,r.AssemblyRef,r.File,r.ExportedType,r.ManifestResource,r.GenericParam,r.GenericParamConstraint,r.MethodSpec]},{tagSize:1,tables:[r.Field,r.Param]},{tagSize:2,tables:[r.TypeDef,r.MethodDef,r.Assembly]},{tagSize:3,tables:[r.TypeDef,r.TypeRef,r.ModuleRef,r.MethodDef,r.TypeSpec]},{tagSize:1,tables:[r.Event,r.Property]},{tagSize:1,tables:[r.MethodDef,r.MemberRef]},{tagSize:1,tables:[r.Field,r.MethodDef]},{tagSize:2,tables:[r.File,r.AssemblyRef,r.ExportedType]},{tagSize:3,tables:[r.TypeRef,r.TypeDef,r.MethodDef,r.MemberRef,r.String]},{tagSize:2,tables:[r.Module,r.ModuleRef,r.AssemblyRef,r.TypeRef]},{tagSize:1,tables:[r.TypeDef,r.MethodDef]}],function(e){e[e.None=0]="None",e[e.MD5=32771]="MD5",e[e.SHA1=32772]="SHA1"}(t.AssemblyHashAlgorithm||(t.AssemblyHashAlgorithm={})),function(e){e[e.PublicKey=1]="PublicKey",e[e.pa__Mask=112]="pa__Mask",e[e.pa_ProcessorArchitectureNone=0]="pa_ProcessorArchitectureNone",e[e.pa_ProcessorArchitectureMsil=16]="pa_ProcessorArchitectureMsil",e[e.pa_ProcessorArchitectureX86=32]="pa_ProcessorArchitectureX86",e[e.pa_ProcessorArchitectureIa64=48]="pa_ProcessorArchitectureIa64",e[e.pa_ProcessorArchitectureAmd64=64]="pa_ProcessorArchitectureAmd64",e[e.ProcessorArchitectureSpecified=128]="ProcessorArchitectureSpecified",e[e.EnableJitcompileTracking=32768]="EnableJitcompileTracking",e[e.DisableJitcompileOptimizer=16384]="DisableJitcompileOptimizer",e[e.Retargetable=256]="Retargetable"}(t.CorAssemblyFlags||(t.CorAssemblyFlags={})),function(e){e[e.SpecialName=512]="SpecialName",e[e.RtSpecialName=1024]="RtSpecialName"}(t.CorEventAttr||(t.CorEventAttr={})),function(e){e[e.fa__Mask=7]="fa__Mask",e[e.fa_PrivateScope=0]="fa_PrivateScope",e[e.fa_Private=1]="fa_Private",e[e.fa_FamAndAssem=2]="fa_FamAndAssem",e[e.fa_Assembly=3]="fa_Assembly",e[e.fa_Family=4]="fa_Family",e[e.fa_FamOrAssem=5]="fa_FamOrAssem",e[e.fa_Public=6]="fa_Public",e[e.Static=16]="Static",e[e.InitOnly=32]="InitOnly",e[e.Literal=64]="Literal",e[e.NotSerialized=128]="NotSerialized",e[e.SpecialName=512]="SpecialName",e[e.PinvokeImpl=8192]="PinvokeImpl",e[e.RtSpecialName=1024]="RtSpecialName",e[e.HasFieldMarshal=4096]="HasFieldMarshal",e[e.HasDefault=32768]="HasDefault",e[e.HasFieldRva=256]="HasFieldRva"}(t.CorFieldAttr||(t.CorFieldAttr={})),function(e){e[e.ContainsMetaData=0]="ContainsMetaData",e[e.ContainsNoMetaData=1]="ContainsNoMetaData"}(t.CorFileFlags||(t.CorFileFlags={})),function(e){e[e.v__Mask=3]="v__Mask",e[e.v_NonVariant=0]="v_NonVariant",e[e.v_Covariant=1]="v_Covariant",e[e.v_Contravariant=2]="v_Contravariant",e[e.NoSpecialConstraint=0]="NoSpecialConstraint",e[e.ReferenceTypeConstraint=4]="ReferenceTypeConstraint",e[e.NotNullableValueTypeConstraint=8]="NotNullableValueTypeConstraint",e[e.DefaultConstructorConstraint=16]="DefaultConstructorConstraint"}(t.CorGenericParamAttr||(t.CorGenericParamAttr={})),function(e){e[e.NoMangle=1]="NoMangle",e[e.cs__Mask=6]="cs__Mask",e[e.cs_CharSetNotSpec=0]="cs_CharSetNotSpec",e[e.cs_CharSetAnsi=2]="cs_CharSetAnsi",e[e.cs_CharSetUnicode=4]="cs_CharSetUnicode",e[e.cs_CharSetAuto=6]="cs_CharSetAuto",e[e.bf__Mask=48]="bf__Mask",e[e.bf_BestFitUseAssem=0]="bf_BestFitUseAssem",e[e.bf_BestFitEnabled=16]="bf_BestFitEnabled",e[e.bf_BestFitDisabled=32]="bf_BestFitDisabled",e[e.touc__Mask=12288]="touc__Mask",e[e.touc_ThrowOnUnmappableCharUseAssem=0]="touc_ThrowOnUnmappableCharUseAssem",e[e.touc_ThrowOnUnmappableCharEnabled=4096]="touc_ThrowOnUnmappableCharEnabled",e[e.touc_ThrowOnUnmappableCharDisabled=8192]="touc_ThrowOnUnmappableCharDisabled",e[e.SupportsLastError=64]="SupportsLastError",e[e.cc__Mask=1792]="cc__Mask",e[e.cc_CallConvWinapi=256]="cc_CallConvWinapi",e[e.cc_CallConvCdecl=512]="cc_CallConvCdecl",e[e.cc_CallConvStdcall=768]="cc_CallConvStdcall",e[e.cc_CallConvThiscall=1024]="cc_CallConvThiscall",e[e.cc_CallConvFastcall=1280]="cc_CallConvFastcall"}(t.CorPinvokeMap||(t.CorPinvokeMap={})),function(e){e[e.v__Mask=7]="v__Mask",e[e.v_Public=1]="v_Public",e[e.v_Private=2]="v_Private"}(t.CorManifestResourceFlags||(t.CorManifestResourceFlags={})),function(e){e[e.ma__Mask=7]="ma__Mask",e[e.ma_PrivateScope=0]="ma_PrivateScope",e[e.ma_Private=1]="ma_Private",e[e.ma_FamAndAssem=2]="ma_FamAndAssem",e[e.ma_Assem=3]="ma_Assem",e[e.ma_Family=4]="ma_Family",e[e.ma_FamOrAssem=5]="ma_FamOrAssem",e[e.ma_Public=6]="ma_Public",e[e.Static=16]="Static",e[e.Final=32]="Final",e[e.Virtual=64]="Virtual",e[e.HideBySig=128]="HideBySig",e[e.vl__Mask=256]="vl__Mask",e[e.vl_ReuseSlot=0]="vl_ReuseSlot",e[e.vl_NewSlot=256]="vl_NewSlot",e[e.CheckAccessOnOverride=512]="CheckAccessOnOverride",e[e.Abstract=1024]="Abstract",e[e.SpecialName=2048]="SpecialName",e[e.PInvokeImpl=8192]="PInvokeImpl",e[e.UnmanagedExport=8]="UnmanagedExport",e[e.RtSpecialName=4096]="RtSpecialName",e[e.HasSecurity=16384]="HasSecurity",e[e.RequireSecObject=32768]="RequireSecObject"}(t.CorMethodAttr||(t.CorMethodAttr={})),function(e){e[e.ct__Mask=3]="ct__Mask",e[e.ct_IL=0]="ct_IL",e[e.ct_Native=1]="ct_Native",e[e.ct_OptIL=2]="ct_OptIL",e[e.ct_Runtime=3]="ct_Runtime",e[e.m__Mask=4]="m__Mask",e[e.m_Unmanaged=4]="m_Unmanaged",e[e.m_Managed=0]="m_Managed",e[e.ForwardRef=16]="ForwardRef",e[e.PreserveSig=128]="PreserveSig",e[e.InternalCall=4096]="InternalCall",e[e.Synchronized=32]="Synchronized",e[e.NoInlining=8]="NoInlining"}(t.CorMethodImpl||(t.CorMethodImpl={})),function(e){e[e.Setter=1]="Setter",e[e.Getter=2]="Getter",e[e.Other=4]="Other",e[e.AddOn=8]="AddOn",e[e.RemoveOn=16]="RemoveOn",e[e.Fire=32]="Fire"}(t.CorMethodSemanticsAttr||(t.CorMethodSemanticsAttr={})),function(e){e[e.In=1]="In",e[e.Out=2]="Out",e[e.Optional=16]="Optional",e[e.HasDefault=4096]="HasDefault",e[e.HasFieldMarshal=8192]="HasFieldMarshal",e[e.Unused=53216]="Unused"}(t.CorParamAttr||(t.CorParamAttr={})),function(e){e[e.SpecialName=512]="SpecialName",e[e.RtSpecialName=1024]="RtSpecialName",e[e.HasDefault=4096]="HasDefault",e[e.Unused=59903]="Unused"}(t.CorPropertyAttr||(t.CorPropertyAttr={})),function(e){e[e.v__Mask=7]="v__Mask",e[e.v_NotPublic=0]="v_NotPublic",e[e.v_Public=1]="v_Public",e[e.v_NestedPublic=2]="v_NestedPublic",e[e.v_NestedPrivate=3]="v_NestedPrivate",e[e.v_NestedFamily=4]="v_NestedFamily",e[e.v_NestedAssembly=5]="v_NestedAssembly",e[e.v_NestedFamAndAssem=6]="v_NestedFamAndAssem",e[e.v_NestedFamOrAssem=7]="v_NestedFamOrAssem",e[e.l__Mask=24]="l__Mask",e[e.l_AutoLayout=0]="l_AutoLayout",e[e.l_SequentialLayout=8]="l_SequentialLayout",e[e.l_ExplicitLayout=16]="l_ExplicitLayout",e[e.cs__Mask=96]="cs__Mask",e[e.cs_Class=0]="cs_Class",e[e.cs_Interface=32]="cs_Interface",e[e.Abstract=128]="Abstract",e[e.Sealed=256]="Sealed",e[e.SpecialName=1024]="SpecialName",e[e.Import=4096]="Import",e[e.Serializable=8192]="Serializable",e[e.WindowsRuntime=16384]="WindowsRuntime",e[e.sf__Mask=196608]="sf__Mask",e[e.sf_AnsiClass=0]="sf_AnsiClass",e[e.sf_UnicodeClass=65536]="sf_UnicodeClass",e[e.sf_AutoClass=131072]="sf_AutoClass",e[e.sf_CustomFormatClass=196608]="sf_CustomFormatClass",e[e.CustomFormatMask=12582912]="CustomFormatMask",e[e.BeforeFieldInit=1048576]="BeforeFieldInit",e[e.Forwarder=2097152]="Forwarder",e[e.RtSpecialName=2048]="RtSpecialName",e[e.HasSecurity=262144]="HasSecurity"}(t.CorTypeAttr||(t.CorTypeAttr={})),function(e){e[e.ActionNil=0]="ActionNil",e[e.Request=1]="Request",e[e.Demand=2]="Demand",e[e.Assert=3]="Assert",e[e.Deny=4]="Deny",e[e.PermitOnly=5]="PermitOnly",e[e.LinktimeCheck=6]="LinktimeCheck",e[e.InheritanceCheck=7]="InheritanceCheck",e[e.RequestMinimum=8]="RequestMinimum",e[e.RequestOptional=9]="RequestOptional",e[e.RequestRefuse=10]="RequestRefuse",e[e.PrejitGrant=11]="PrejitGrant",e[e.PrejitDenied=12]="PrejitDenied",e[e.NonCasDemand=13]="NonCasDemand",e[e.NonCasLinkDemand=14]="NonCasLinkDemand",e[e.NonCasInheritance=15]="NonCasInheritance"}(t.CorDeclSecurity||(t.CorDeclSecurity={})),function(e){e[e.End=0]="End",e[e.Void=1]="Void",e[e.Boolean=2]="Boolean",e[e.Char=3]="Char",e[e.I1=4]="I1",e[e.U1=5]="U1",e[e.I2=6]="I2",e[e.U2=7]="U2",e[e.I4=8]="I4",e[e.U4=9]="U4",e[e.I8=10]="I8",e[e.U8=11]="U8",e[e.R4=12]="R4",e[e.R8=13]="R8",e[e.String=14]="String",e[e.Ptr=15]="Ptr",e[e.ByRef=16]="ByRef",e[e.ValueType=17]="ValueType",e[e.Class=18]="Class",e[e.Var=19]="Var",e[e.Array=20]="Array",e[e.GenericInst=21]="GenericInst",e[e.TypedByRef=22]="TypedByRef",e[e.I=24]="I",e[e.U=25]="U",e[e.FnPtr=27]="FnPtr",e[e.Object=28]="Object",e[e.SzArray=29]="SzArray",e[e.MVar=30]="MVar",e[e.CModReqd=31]="CModReqd",e[e.CModOpt=32]="CModOpt",e[e.Internal=33]="Internal",e[e.Modifier=64]="Modifier",e[e.Sentinel=65]="Sentinel",e[e.Pinned=69]="Pinned",e[e.R4HFA=70]="R4HFA",e[e.R8HFA=71]="R8HFA"}(t.CorElementType||(t.CorElementType={}))},function(e,t,a){"use strict";function r(e){return M(e.toString(16).toUpperCase(),2)}function i(e){return M(e.toString(16).toUpperCase(),4)}function o(e){return M(e.toString(16).toUpperCase(),8)}function s(e){return r(e)+"h"}function n(e){return i(e)+"h"}function d(e){return o(e)+"h"}function l(e){return e.toString(16).toUpperCase()+"h ("+e.toLocaleString()+")"}function f(e){return e.toLocaleString()}function _(e,t){void 0===t&&(t=16);for(var a=[],i=0;i=0&&a<64&&a<32&&0!=(t&1<=32&&0!=(e&1<>1;var a=e[0];if(0==(128&a))return t>>1|4294967232;if(128==(192&a))return t>>1|4294959104;if(192==(224&a))return t>>1|4026531840;throw new RangeError},t.getCompressedIntSize=function(e){if(0!=(4294967040&e))throw new RangeError;if(0==(128&e))return 1;if(128==(192&e))return 2;if(192==(224&e))return 4;throw new RangeError}},function(e,t,a){"use strict";t.__esModule=!0;var r=a(0);t.generateNavList=function(e){var t,a=[(t="HEADERS",{target:{pageID:t,title:"Headers"},children:[{target:{pageID:t,title:"DOS Header",elemID:"dos-hdr"}},{target:{pageID:t,title:"PE Signature",elemID:"pe-sig"}},{target:{pageID:t,title:"PE File Header",elemID:"pe-hdr"}},{target:{pageID:t,title:"Optional Header",elemID:"opt-hdr"}},{target:{pageID:t,title:"Data Directories",elemID:"data-dir"}},{target:{pageID:t,title:"Section Headers",elemID:"sec-hdrs"}}]})],i=function(e){var t="MD_HEADERS";if(e.isManaged()){var a=[{target:{pageID:t,title:"CLI Header",elemID:"cli-hdr"}}];return e.hasMetadata()&&(a.push({target:{pageID:t,title:"Metadata Root",elemID:"md-root"}}),a.push({target:{pageID:t,title:"Stream Headers",elemID:"md-hdrs"}})),e.hasStrongNameSignature()&&a.push({target:{pageID:t,title:"Strong Name Signature",elemID:"sn-sig"}}),e.getMetadataStreamHeader("#Strings")&&a.push({target:{pageID:"MDS_STRINGS",title:"#String Stream",pageNum:0}}),e.getMetadataStreamHeader("#US")&&a.push({target:{pageID:"MDS_US",title:"#US Stream",pageNum:0}}),e.getMetadataStreamHeader("#GUID")&&a.push({target:{pageID:"MDS_GUID",title:"#GUID Stream",pageNum:0}}),e.getMetadataStreamHeader("#Blob")&&a.push({target:{pageID:"MDS_BLOB",title:"#Blob Stream",pageNum:0}}),e.getMetadataStreamHeader("#~")&&a.push(function(e){e.getMetadataTableHeader();for(var t=[],a=r.MetadataTableIndex,i=0;io&&(n=o),{start:s,end:n}}t.generateMdsTablePageData=function(e){return{nav:{pageID:"MDS_TABLE",title:"#~ Stream"},tableHeader:function(e){var t={title:"Metadata Table Header",elemID:"mdt-hdr"},a=e.getMetadataTableHeader();return a?(t.groups=[{title:"",items:[i.formatU4Field("Reserved",a.Reserved),i.formatU1Field("MajorVersion",a.MajorVersion,!0),i.formatU1Field("MinorVersion",a.MinorVersion,!0),i.formatU1Field("HeapSizes",a.HeapSizes),i.formatU1Field("Reserved2",a.Reserved2),i.formatU8Field("Valid",a.Valid),i.formatU8Field("Sorted",a.Sorted)]},{title:"Rows",items:a.Rows.items.map(function(e,t){return i.formatU4Field("Rows["+t+"]",e,!0)})}],t):t}(e),tableInfo:function(e){for(var t=[],a=0;a>a.tagSize}}t.loadU1Field=s,t.loadU2Field=n,t.loadU4Field=d,t.loadU8Field=l,t.loadCompressedUIntField=f,t.loadU1EnumField=_,t.loadU2EnumField=M,t.loadU4EnumField=m,t.loadFixedSizeByteArrayField=I,t.loadFixedSizeAsciiStringField=u,t.loadNullTerminatedStringField=S,t.loadFixedSizeUnicodeStringField=c,t.loadStructArrayByCount=E,t.loadImageDosHeader=function(e,t){var a=t,r=n(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=n(e,a+=o._size),l=n(e,a+=s._size),f=n(e,a+=l._size),_=n(e,a+=f._size),M=n(e,a+=_._size),m=n(e,a+=M._size),u=n(e,a+=m._size),S=n(e,a+=u._size),c=n(e,a+=S._size),E=n(e,a+=c._size),A=n(e,a+=E._size),p=I(e,a+=A._size,8),T=n(e,a+=p._size),b=n(e,a+=T._size),g=I(e,a+=b._size,20),z=d(e,a+=g._size);return{_offset:t,_size:(a+=z._size)-t,e_magic:r,e_cblp:i,e_cp:o,e_crlc:s,e_cparhdr:l,e_minalloc:f,e_maxalloc:_,e_ss:M,e_sp:m,e_csum:u,e_ip:S,e_cs:c,e_lfarlc:E,e_ovno:A,e_res:p,e_oemid:T,e_oeminfo:b,e_res2:g,e_lfanew:z}},t.loadImageFileHeader=function(e,t){var a=t,r=n(e,a),i=n(e,a+=r._size),o=d(e,a+=i._size),s=d(e,a+=o._size),l=d(e,a+=s._size),f=n(e,a+=l._size),_=M(e,a+=f._size);return{_offset:t,_size:(a+=_._size)-t,Machine:r,NumberOfSections:i,TimeDateStamp:o,PointerToSymbolTable:s,NumberOfSymbols:l,SizeOfOptionalHeader:f,Characteristics:_}},t.loadImageOptionalHeader32=function(e,t){var a=t,r=n(e,a),i=s(e,a+=r._size),o=s(e,a+=i._size),l=d(e,a+=o._size),f=d(e,a+=l._size),_=d(e,a+=f._size),m=d(e,a+=_._size),I=d(e,a+=m._size),u=d(e,a+=I._size),S=d(e,a+=u._size),c=d(e,a+=S._size),E=d(e,a+=c._size),A=n(e,a+=E._size),p=n(e,a+=A._size),T=n(e,a+=p._size),b=n(e,a+=T._size),g=n(e,a+=b._size),z=n(e,a+=g._size),C=d(e,a+=z._size),F=d(e,a+=C._size),R=d(e,a+=F._size),h=d(e,a+=R._size),N=M(e,a+=h._size),v=M(e,a+=N._size),O=d(e,a+=v._size),D=d(e,a+=O._size),y=d(e,a+=D._size),P=d(e,a+=y._size),U=d(e,a+=P._size),G=d(e,a+=U._size);return{_offset:t,_size:(a+=G._size)-t,Magic:r,MajorLinkerVersion:i,MinorLinkerVersion:o,SizeOfCode:l,SizeOfInitializedData:f,SizeOfUninitializedData:_,AddressOfEntryPoint:m,BaseOfCode:I,BaseOfData:u,ImageBase:S,SectionAlignment:c,FileAlignment:E,MajorOperatingSystemVersion:A,MinorOperatingSystemVersion:p,MajorImageVersion:T,MinorImageVersion:b,MajorSubsystemVersion:g,MinorSubsystemVersion:z,Win32VersionValue:C,SizeOfImage:F,SizeOfHeaders:R,CheckSum:h,Subsystem:N,DllCharacteristics:v,SizeOfStackReserve:O,SizeOfStackCommit:D,SizeOfHeapReserve:y,SizeOfHeapCommit:P,LoaderFlags:U,NumberOfRvaAndSizes:G}},t.loadImageOptionalHeader64=function(e,t){var a=t,r=n(e,a),i=s(e,a+=r._size),o=s(e,a+=i._size),f=d(e,a+=o._size),_=d(e,a+=f._size),m=d(e,a+=_._size),I=d(e,a+=m._size),u=d(e,a+=I._size),S=l(e,a+=u._size),c=d(e,a+=S._size),E=d(e,a+=c._size),A=n(e,a+=E._size),p=n(e,a+=A._size),T=n(e,a+=p._size),b=n(e,a+=T._size),g=n(e,a+=b._size),z=n(e,a+=g._size),C=d(e,a+=z._size),F=d(e,a+=C._size),R=d(e,a+=F._size),h=d(e,a+=R._size),N=M(e,a+=h._size),v=M(e,a+=N._size),O=l(e,a+=v._size),D=l(e,a+=O._size),y=l(e,a+=D._size),P=l(e,a+=y._size),U=d(e,a+=P._size),G=d(e,a+=U._size);return{_offset:t,_size:(a+=G._size)-t,Magic:r,MajorLinkerVersion:i,MinorLinkerVersion:o,SizeOfCode:f,SizeOfInitializedData:_,SizeOfUninitializedData:m,AddressOfEntryPoint:I,BaseOfCode:u,ImageBase:S,SectionAlignment:c,FileAlignment:E,MajorOperatingSystemVersion:A,MinorOperatingSystemVersion:p,MajorImageVersion:T,MinorImageVersion:b,MajorSubsystemVersion:g,MinorSubsystemVersion:z,Win32VersionValue:C,SizeOfImage:F,SizeOfHeaders:R,CheckSum:h,Subsystem:N,DllCharacteristics:v,SizeOfStackReserve:O,SizeOfStackCommit:D,SizeOfHeapReserve:y,SizeOfHeapCommit:P,LoaderFlags:U,NumberOfRvaAndSizes:G}},t.loadImageDataDirectory=A,t.loadImageSectionHeader=function(e,t){var a=t,r=u(e,a,8),i=d(e,a+=r._size),o=d(e,a+=i._size),s=d(e,a+=o._size),l=d(e,a+=s._size),f=d(e,a+=l._size),_=d(e,a+=f._size),M=n(e,a+=_._size),I=n(e,a+=M._size),S=m(e,a+=I._size);return{_offset:t,_size:(a+=S._size)-t,Name:r,VirtualSize:i,VirtualAddress:o,SizeOfRawData:s,PointerToRawData:l,PointerToRelocations:f,PointerToLinenumbers:_,NumberOfRelocations:M,NumberOfLinenumbers:I,Characteristics:S}},t.loadCliHeader=function(e,t){var a=t,r=d(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=A(e,a+=o._size),l=d(e,a+=s._size),f=d(e,a+=l._size),_=A(e,a+=f._size),M=A(e,a+=_._size),m=A(e,a+=M._size),I=A(e,a+=m._size),u=A(e,a+=I._size),S=A(e,a+=u._size);return{_offset:t,_size:(a+=S._size)-t,cb:r,MajorRuntimeVersion:i,MinorRuntimeVersion:o,MetaData:s,Flags:l,EntryPointToken:f,Resources:_,StrongNameSignature:M,CodeManagerTable:m,VTableFixups:I,ExportAddressTableJumps:u,ManagedNativeHeader:S}},t.loadMetadataRoot=function(e,t){var a=t,r=d(e,a),i=n(e,a+=r._size),s=n(e,a+=i._size),l=d(e,a+=s._size),f=d(e,a+=l._size),_=S(e,a+=f._size),M=I(e,a+=_._size,o.calculatePadding(_._size)),m=n(e,a+=M._size),u=n(e,a+=m._size);return{_offset:t,_size:(a+=u._size)-t,Signature:r,MajorVersion:i,MinorVersion:s,Reserved:l,VersionLength:f,VersionString:_,VersionPadding:M,Flags:m,Streams:u}},t.loadMetadataStreamHeader=function(e,t){var a=t,r=d(e,a),i=d(e,a+=r._size),s=S(e,a+=i._size),n=I(e,a+=s._size,o.calculatePadding(s._size));return{_offset:t,_size:(a+=n._size)-t,Offset:r,Size:i,Name:s,Padding:n}},t.loadMetadataTableHeader=function(e,t){var a=t,r=d(e,a),i=s(e,a+=r._size),n=s(e,a+=i._size),f=s(e,a+=n._size),_=s(e,a+=f._size),M=l(e,a+=_._size),m=l(e,a+=M._size),I=E(e,a+=m._size,d,o.count1(M.high)+o.count1(M.low));return{_offset:t,_size:(a+=I._size)-t,Reserved:r,MajorVersion:i,MinorVersion:n,HeapSizes:f,Reserved2:_,Valid:M,Sorted:m,Rows:I}},t.loadMetadataUSItem=function(e,t){var a=t,r=f(e,a);a+=r._size;var i=r.value,o=i>0?1:0,s=c(e,a,i>0?i-1:0),n=I(e,a+=s._size,o);return{_offset:t,_size:(a+=n._size)-t,Size:r,Value:s,Suffix:n}},t.loadMetadataBlobItem=function(e,t){var a=t,r=f(e,a),i=I(e,a+=r._size,r.value);return{_offset:t,_size:(a+=i._size)-t,Size:r,Value:i}},t.loadMdsStringsField=p,t.loadMdsGuidField=T,t.loadMdsBlobField=b,t.loadMdtRidField=g,t.loadMdCodedTokenField=z,t.loadMdTokenField=function(e,t){var a=d(e,t),i=(4278190080&a.value)>>24,o=16777215&a.value;return r({},a,{tid:i,rid:o})},t.decodeCodedToken=C,t.loadMdtModule=function(e,t){var a=t,r=n(e,a),i=p(e,a+=r._size),o=T(e,a+=i._size),s=T(e,a+=o._size),d=T(e,a+=s._size);return{_offset:t,_size:(a+=d._size)-t,Generation:r,Name:i,Mvid:o,EncId:s,EncBaseId:d}},t.loadMdtTypeRef=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.ResolutionScope,a),o=p(e,a+=r._size),s=p(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,ResolutionScope:r,Name:o,Namespace:s}},t.loadMdtTypeDef=function(e,t){var a=t,r=m(e,a),o=p(e,a+=r._size),s=p(e,a+=o._size);a+=s._size;var n=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);a+=n._size;var d=g(e,i.MetadataTableIndex.Field,a);a+=d._size;var l=g(e,i.MetadataTableIndex.MethodDef,a);return{_offset:t,_size:(a+=l._size)-t,Flags:r,Name:o,Namespace:s,Extends:n,FieldList:d,MethodList:l}},t.loadMdtFieldPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Field,a);return{_offset:t,_size:(a+=r._size)-t,Field:r}},t.loadMdtField=function(e,t){var a=t,r=M(e,a),i=p(e,a+=r._size),o=b(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,Flags:r,Name:i,Signature:o}},t.loadMdtMethodPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.MethodDef,a);return{_offset:t,_size:(a+=r._size)-t,Method:r}},t.loadMdtMethodDef=function(e,t){var a=t,r=d(e,a),o=M(e,a+=r._size),s=M(e,a+=o._size),n=p(e,a+=s._size),l=b(e,a+=n._size);a+=l._size;var f=g(e,i.MetadataTableIndex.Param,a);return{_offset:t,_size:(a+=f._size)-t,RVA:r,ImplFlags:o,Flags:s,Name:n,Signature:l,ParamList:f}},t.loadMdtParamPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Param,a);return{_offset:t,_size:(a+=r._size)-t,Param:r}},t.loadMdtParam=function(e,t){var a=t,r=M(e,a),i=n(e,a+=r._size),o=p(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,Flags:r,Sequence:i,Name:o}},t.loadMdtInterfaceImpl=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);return{_offset:t,_size:(a+=o._size)-t,Class:r,Interface:o}},t.loadMdtMemberRef=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.MemberRefParent,a),o=p(e,a+=r._size),s=b(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,Class:r,Name:o,Signature:s}},t.loadMdtConstant=function(e,t){var a=t,r=_(e,a),o=s(e,a+=r._size);a+=o._size;var n=z(e,i.MetadataCodedTokenIndex.HasConstant,a),d=b(e,a+=n._size);return{_offset:t,_size:(a+=d._size)-t,Type:r,PaddingZero:o,Parent:n,Value:d}},t.loadMdtCustomAttribute=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.HasCustomAttribute,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.CustomAttributeType,a),s=b(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,Parent:r,Type:o,Value:s}},t.loadMdtFieldMarshal=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.HasFieldMarshall,a),o=b(e,a+=r._size);return{_offset:t,_size:(a+=o._size)-t,Parent:r,NativeType:o}},t.loadMdtDeclSecurity=function(e,t){var a=t,r=M(e,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.HasDeclSecurity,a),s=b(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,Action:r,Parent:o,PermissionSet:s}},t.loadMdtClassLayout=function(e,t){var a=t,r=n(e,a),o=d(e,a+=r._size);a+=o._size;var s=g(e,i.MetadataTableIndex.TypeDef,a);return{_offset:t,_size:(a+=s._size)-t,PackingSize:r,ClassSize:o,Parent:s}},t.loadMdtFieldLayout=function(e,t){var a=t,r=d(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Field,a);return{_offset:t,_size:(a+=o._size)-t,OffSet:r,Field:o}},t.loadMdtStandAloneSig=function(e,t){var a=t,r=b(e,a);return{_offset:t,_size:(a+=r._size)-t,Signature:r}},t.loadMdtEventMap=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Event,a);return{_offset:t,_size:(a+=o._size)-t,Parent:r,EventList:o}},t.loadMdtEventPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Event,a);return{_offset:t,_size:(a+=r._size)-t,Event:r}},t.loadMdtEvent=function(e,t){var a=t,r=M(e,a),o=p(e,a+=r._size);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);return{_offset:t,_size:(a+=s._size)-t,EventFlags:r,Name:o,EventType:s}},t.loadMdtPropertyMap=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Property,a);return{_offset:t,_size:(a+=o._size)-t,Parent:r,PropertyList:o}},t.loadMdtPropertyPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Property,a);return{_offset:t,_size:(a+=r._size)-t,Property:r}},t.loadMdtProperty=function(e,t){var a=t,r=M(e,a),i=p(e,a+=r._size),o=b(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,PropFlags:r,Name:i,Type:o}},t.loadMdtMethodSemantics=function(e,t){var a=t,r=M(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.MethodDef,a);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.HasSemantics,a);return{_offset:t,_size:(a+=s._size)-t,Semantic:r,Method:o,Association:s}},t.loadMdtMethodImpl=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.MethodDefOrRef,a);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.MethodDefOrRef,a);return{_offset:t,_size:(a+=s._size)-t,Class:r,MethodBody:o,MethodDeclaration:s}},t.loadMdtModuleRef=function(e,t){var a=t,r=p(e,a);return{_offset:t,_size:(a+=r._size)-t,Name:r}},t.loadMdtTypeSpec=function(e,t){var a=t,r=b(e,a);return{_offset:t,_size:(a+=r._size)-t,Signature:r}},t.loadMdtImplMap=function(e,t){var a=t,r=M(e,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.MemberForwarded,a),s=p(e,a+=o._size);a+=s._size;var n=g(e,i.MetadataTableIndex.ModuleRef,a);return{_offset:t,_size:(a+=n._size)-t,MappingFlags:r,MemberForwarded:o,ImportName:s,ImportScope:n}},t.loadMdtFieldRVA=function(e,t){var a=t,r=d(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Field,a);return{_offset:t,_size:(a+=o._size)-t,RVA:r,Field:o}},t.loadMdtENCLog=function(e,t){var a=t,r=d(e,a),i=d(e,a+=r._size);return{_offset:t,_size:(a+=i._size)-t,Token:r,FuncCode:i}},t.loadMdtENCMap=function(e,t){var a=t,r=d(e,a);return{_offset:t,_size:(a+=r._size)-t,Token:r}},t.loadMdtAssembly=function(e,t){var a=t,r=m(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=n(e,a+=o._size),d=n(e,a+=s._size),l=m(e,a+=d._size),f=b(e,a+=l._size),_=p(e,a+=f._size),M=p(e,a+=_._size);return{_offset:t,_size:(a+=M._size)-t,HashAlgId:r,MajorVersion:i,MinorVersion:o,BuildNumber:s,RevisionNumber:d,Flags:l,PublicKey:f,Name:_,Locale:M}},t.loadMdtAssemblyProcessor=function(e,t){var a=t,r=d(e,a);return{_offset:t,_size:(a+=r._size)-t,Processor:r}},t.loadMdtAssemblyOS=function(e,t){var a=t,r=d(e,a),i=d(e,a+=r._size),o=d(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,OSPlatformID:r,OSMajorVersion:i,OSMinorVersion:o}},t.loadMdtAssemblyRef=function(e,t){var a=t,r=n(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=n(e,a+=o._size),d=m(e,a+=s._size),l=b(e,a+=d._size),f=p(e,a+=l._size),_=p(e,a+=f._size),M=b(e,a+=_._size);return{_offset:t,_size:(a+=M._size)-t,MajorVersion:r,MinorVersion:i,BuildNumber:o,RevisionNumber:s,Flags:d,PublicKeyOrToken:l,Name:f,Locale:_,HashValue:M}},t.loadMdtAssemblyRefProcessor=function(e,t){var a=t,r=d(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.AssemblyRef,a);return{_offset:t,_size:(a+=o._size)-t,Processor:r,AssemblyRef:o}},t.loadMdtAssemblyRefOS=function(e,t){var a=t,r=d(e,a),o=d(e,a+=r._size),s=d(e,a+=o._size);a+=s._size;var n=g(e,i.MetadataTableIndex.AssemblyRef,a);return{_offset:t,_size:(a+=n._size)-t,OSPlatformID:r,OSMajorVersion:o,OSMinorVersion:s,AssemblyRef:n}},t.loadMdtFile=function(e,t){var a=t,r=m(e,a),i=p(e,a+=r._size),o=b(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,Flags:r,Name:i,HashValue:o}},t.loadMdtExportedType=function(e,t){var a=t,r=m(e,a),o=d(e,a+=r._size),s=p(e,a+=o._size),n=p(e,a+=s._size);a+=n._size;var l=z(e,i.MetadataCodedTokenIndex.Implementation,a);return{_offset:t,_size:(a+=l._size)-t,Flags:r,TypeDefId:o,TypeName:s,TypeNamespace:n,Implementation:l}},t.loadMdtManifestResource=function(e,t){var a=t,r=d(e,a),o=m(e,a+=r._size),s=p(e,a+=o._size);a+=s._size;var n=z(e,i.MetadataCodedTokenIndex.Implementation,a);return{_offset:t,_size:(a+=n._size)-t,Offset:r,Flags:o,Name:s,Implementation:n}},t.loadMdtNestedClass=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=g(e,i.MetadataTableIndex.TypeDef,a);return{_offset:t,_size:(a+=o._size)-t,NestedClass:r,EnclosingClass:o}},t.loadMdtGenericParam=function(e,t){var a=t,r=n(e,a),o=M(e,a+=r._size);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.TypeOrMethodDef,a),d=p(e,a+=s._size);return{_offset:t,_size:(a+=d._size)-t,Number:r,Flags:o,Owner:s,Name:d}},t.loadMdtMethodSpec=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.MethodDefOrRef,a),o=b(e,a+=r._size);return{_offset:t,_size:(a+=o._size)-t,Method:r,Instantiation:o}},t.loadMdtGenericParamConstraint=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.GenericParam,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);return{_offset:t,_size:(a+=o._size)-t,Owner:r,Constraint:o}}},function(e,t,a){"use strict";t.__esModule=!0;var r=a(10),i=a(0),o=a(9),s=a(2),n=function(){function e(e){this.metadataSizingCache={},this.data=new DataView(e),this.loadHeaders()}return e.load=function(t){return new e(t)},e.prototype.getU1=function(e){return this.check(e,1),this.data.getUint8(e)},e.prototype.getU2=function(e){return this.check(e,2),this.data.getUint16(e,!0)},e.prototype.getU4=function(e){return this.check(e,3),this.data.getUint32(e,!0)},e.prototype.getData=function(e,t){return this.check(e,t),new Uint8Array(this.data.buffer.slice(e,e+t))},e.prototype.is32Bit=function(){var e=this.getOptionalHeader();if(null!=e)switch(e.Magic.value){case i.IMAGE_NT_OPTIONAL_HDR32_MAGIC:return!0;case i.IMAGE_NT_OPTIONAL_HDR64_MAGIC:return!1;default:return}},e.prototype.isManaged=function(){var e=this.getDataDirectories();return null!=e&&this.isDataDirectoryValid(e.items[i.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR])},e.prototype.hasMetadata=function(){var e=this.getCliHeader();return null!=e&&this.isDataDirectoryValid(e.MetaData)},e.prototype.hasManagedResources=function(){var e=this.getCliHeader();return null!=e&&this.isDataDirectoryValid(e.Resources)},e.prototype.hasStrongNameSignature=function(){var e=this.getCliHeader();return null!=e&&this.isDataDirectoryValid(e.StrongNameSignature)},e.prototype.isMetadataTableValid=function(e){var t=this.metadataTableInfo;return!(!t||!t[e])&&t[e].valid},e.prototype.isMetadataTableSorted=function(e){var t=this.metadataTableInfo;return!(!t||!t[e])&&t[e].sorted},e.prototype.getMetadataTableRows=function(e){var t=this.metadataTableInfo;return t&&t[e]?t[e].rows:0},e.prototype.getDosHeader=function(){return this.dosHeader},e.prototype.getPESignature=function(){return this.peSignature},e.prototype.getFileHeader=function(){return this.fileHeader},e.prototype.getOptionalHeader=function(){return this.optionalHeader},e.prototype.getDataDirectories=function(){return this.dataDirectories},e.prototype.getSectionHeaders=function(){return this.sectionHeaders},e.prototype.getCliHeader=function(){if(this.cliHeader)return this.cliHeader;if(this.isManaged()){var e=this.rvaToOffset(this.dataDirectories.items[i.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress.value);return this.cliHeader=r.loadCliHeader(this,e),this.cliHeader}},e.prototype.getMetadataRoot=function(){if(this.metadataRoot)return this.metadataRoot;var e=this.getCliHeader();if(e){var t=this.rvaToOffset(e.MetaData.VirtualAddress.value);if(t)return this.metadataRoot=r.loadMetadataRoot(this,t),this.metadataRoot}},e.prototype.getMetadataStreamHeaders=function(){if(this.metadataStreamHeaders)return this.metadataStreamHeaders;var e=this.getMetadataRoot();return e&&e.Streams.value?(this.metadataStreamHeaders=r.loadStructArrayByCount(this,e._offset+e._size,r.loadMetadataStreamHeader,e.Streams.value),this.metadataStreamHeaders):void 0},e.prototype.getMetadataStreamHeader=function(e){var t=this.getMetadataStreamHeaders();if(t)return t.items.filter(function(t){return t.Name.value==e}).shift()},e.prototype.getStrongNameSignature=function(){if(this.strongNameSignature)return this.strongNameSignature;var e=this.getCliHeader();if(e){var t=this.rvaToOffset(e.StrongNameSignature.VirtualAddress.value);if(t)return this.strongNameSignature=r.loadFixedSizeByteArrayField(this,t,e.StrongNameSignature.Size.value),this.strongNameSignature}},e.prototype.getMetadataTableHeader=function(){if(this.metadataTableHeader)return this.metadataTableHeader;var e=this.getMetadataRoot();if(e){var t=this.getMetadataStreamHeader("#~");if(t){var a=e._offset+t.Offset.value;return this.metadataTableHeader=r.loadMetadataTableHeader(this,a),this.fillMetadataTableInfo(),this.fillMetadataTableInfoExtra(),this.metadataTableHeader}}},e.prototype.getMdsStringsItem=function(e){var t=this.getMetadataRoot();if(t){var a=this.getMetadataStreamHeader("#Strings");if(a)return e<0||e>=a.Size.value?void 0:r.loadNullTerminatedStringField(this,t._offset+a.Offset.value+e)}},e.prototype.getMdsUSItem=function(e){var t=this.getMetadataRoot();if(t){var a=this.getMetadataStreamHeader("#US");if(a)return e<0||e>=a.Size.value?void 0:r.loadMetadataUSItem(this,t._offset+a.Offset.value+e)}},e.prototype.getMdsGuidItems=function(){var e=this.getMetadataRoot();if(e){var t=this.getMetadataStreamHeader("#GUID");if(t){var a=t.Size.value/16;return r.loadStructArrayByCount(this,e._offset+t.Offset.value,function(e,t){return r.loadFixedSizeByteArrayField(e,t,16)},a)}}},e.prototype.getMdsBlobItem=function(e){var t=this.getMetadataRoot();if(t){var a=this.getMetadataStreamHeader("#Blob");if(a)return e<0||e>=a.Size.value?void 0:r.loadMetadataBlobItem(this,t._offset+a.Offset.value+e)}},e.prototype.getMdtModuleItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Module,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Module];return r.loadMdtModule(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtTypeRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.TypeRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Module];return r.loadMdtTypeRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtTypeDefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.TypeDef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.TypeDef];return r.loadMdtTypeDef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldPtr];return r.loadMdtFieldPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Field,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Field];return r.loadMdtField(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodPtr];return r.loadMdtMethodPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodDefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodDef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodDef];return r.loadMdtMethodDef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtParamPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ParamPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ParamPtr];return r.loadMdtParamPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtParamItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Param,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Param];return r.loadMdtParam(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtInterfaceImplItem=function(e){if(this.checkMdt(i.MetadataTableIndex.InterfaceImpl,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.InterfaceImpl];return r.loadMdtInterfaceImpl(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMemberRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MemberRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MemberRef];return r.loadMdtMemberRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtConstantItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Constant,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Constant];return r.loadMdtConstant(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtCustomAttributeItem=function(e){if(this.checkMdt(i.MetadataTableIndex.CustomAttribute,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.CustomAttribute];return r.loadMdtCustomAttribute(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldMarshalItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldMarshal,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldMarshal];return r.loadMdtFieldMarshal(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtDeclSecurityItem=function(e){if(this.checkMdt(i.MetadataTableIndex.DeclSecurity,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.DeclSecurity];return r.loadMdtDeclSecurity(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtClassLayoutItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ClassLayout,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ClassLayout];return r.loadMdtClassLayout(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldLayoutItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldLayout,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldLayout];return r.loadMdtFieldLayout(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtStandAloneSigItem=function(e){if(this.checkMdt(i.MetadataTableIndex.StandAloneSig,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.StandAloneSig];return r.loadMdtStandAloneSig(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtEventMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.EventMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.EventMap];return r.loadMdtEventMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtEventPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.EventPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.EventPtr];return r.loadMdtEventPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtEventItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Event,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Event];return r.loadMdtEvent(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtPropertyMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.PropertyMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.PropertyMap];return r.loadMdtPropertyMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtPropertyPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.PropertyPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.PropertyPtr];return r.loadMdtPropertyPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtPropertyItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Property,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Property];return r.loadMdtProperty(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodSemanticsItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodSemantics,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodSemantics];return r.loadMdtMethodSemantics(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodImplItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodImpl,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodImpl];return r.loadMdtMethodImpl(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtModuleRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ModuleRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ModuleRef];return r.loadMdtModuleRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtTypeSpecItem=function(e){if(this.checkMdt(i.MetadataTableIndex.TypeSpec,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.TypeSpec];return r.loadMdtTypeSpec(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtImplMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ImplMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ImplMap];return r.loadMdtImplMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldRVAItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldRVA,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldRVA];return r.loadMdtFieldRVA(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtENCLogItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ENCLog,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ENCLog];return r.loadMdtENCLog(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtENCMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ENCMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ENCMap];return r.loadMdtENCMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Assembly,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Assembly];return r.loadMdtAssembly(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyProcessorItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyProcessor,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyProcessor];return r.loadMdtAssemblyProcessor(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyOSItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyOS,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyOS];return r.loadMdtAssemblyOS(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyRef];return r.loadMdtAssemblyRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyRefProcessorItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyRefProcessor,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyRefProcessor];return r.loadMdtAssemblyRefProcessor(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyRefOSItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyRefOS,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyRefOS];return r.loadMdtAssemblyRefOS(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFileItem=function(e){if(this.checkMdt(i.MetadataTableIndex.File,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.File];return r.loadMdtFile(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtExportedTypeItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ExportedType,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ExportedType];return r.loadMdtExportedType(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtManifestResourceItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ManifestResource,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ManifestResource];return r.loadMdtManifestResource(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtNestedClassItem=function(e){if(this.checkMdt(i.MetadataTableIndex.NestedClass,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.NestedClass];return r.loadMdtNestedClass(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtGenericParamItem=function(e){if(this.checkMdt(i.MetadataTableIndex.GenericParam,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.GenericParam];return r.loadMdtGenericParam(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodSpecItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodSpec,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodSpec];return r.loadMdtMethodSpec(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtGenericParamConstraintItem=function(e){if(this.checkMdt(i.MetadataTableIndex.GenericParamConstraint,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.GenericParamConstraint];return r.loadMdtGenericParamConstraint(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getHeapSize=function(e){if(this.metadataSizingCache.heap)return this.metadataSizingCache.heap[e];var t=this.getMetadataTableHeader();if(!t)return 0;return this.metadataSizingCache.heap=[0,1,2].map(function(e){return 0!=(t.HeapSizes.value&1<>e.tagSize,r=0,i=e.tables;ra)return 4}return 2}),this.metadataSizingCache.codedToken[e])},e.prototype.rvaToOffset=function(e){var t=this.getSectionHeaderByRva(e);return t?e-t.VirtualAddress.value+t.PointerToRawData.value:0},e.prototype.offsetToRva=function(e){var t=this.getSectionHeaderByOffset(e);return t?e-t.PointerToRawData.value+t.VirtualAddress.value:0},e.prototype.check=function(e,t){if(e<0||e>=this.data.byteLength||t<0||e+t>this.data.byteLength)throw new o.PEError("INVALID_DATA_POSITION",e,t)},e.prototype.loadHeaders=function(){var e=0;if(this.dosHeader=r.loadImageDosHeader(this,e),this.dosHeader.e_magic.value!=i.IMAGE_DOS_SIGNATURE)throw new o.PEError("INVALID_DOS_SIGNATURE",e,2);if(e=this.dosHeader.e_lfanew.value,this.peSignature=r.loadU4Field(this,e),this.peSignature.value!=i.IMAGE_NT_SIGNATURE)throw new o.PEError("INVALID_PE_SIGNATURE",e,4);switch(e+=this.peSignature._size,this.fileHeader=r.loadImageFileHeader(this,e),e+=this.fileHeader._size,r.loadU2Field(this,e).value){case i.IMAGE_NT_OPTIONAL_HDR32_MAGIC:this.optionalHeader=r.loadImageOptionalHeader32(this,e);break;case i.IMAGE_NT_OPTIONAL_HDR64_MAGIC:this.optionalHeader=r.loadImageOptionalHeader64(this,e);break;default:throw new o.PEError("INVALID_OPTIONAL_HEADER_MAGIC",e,2)}if(this.optionalHeader.NumberOfRvaAndSizes.value!=i.IMAGE_NUMBEROF_DIRECTORY_ENTRIES)throw new o.PEError("INVALID_DATA_DIRECTORY_COUNT",this.optionalHeader.NumberOfRvaAndSizes._offset,this.optionalHeader.NumberOfRvaAndSizes._size);e+=this.optionalHeader._size,this.dataDirectories=r.loadStructArrayByCount(this,e,r.loadImageDataDirectory,this.optionalHeader.NumberOfRvaAndSizes.value),e+=this.dataDirectories._size,this.sectionHeaders=r.loadStructArrayByCount(this,e,r.loadImageSectionHeader,this.fileHeader.NumberOfSections.value)},e.prototype.getSectionHeaderByOffset=function(e){return this.sectionHeaders&&this.sectionHeaders.items.filter(function(t){var a=t.PointerToRawData.value,r=t.SizeOfRawData.value;return e>=a&&e=a&&e0&&e.Size.value>0||!1},e.prototype.fillMetadataTableInfo=function(){var e=this.metadataTableHeader;if(e){for(var t={},a=0,r=0;r65535?4:2:0,baseOffset:0,rowSize:0}}this.metadataTableInfo=t}},e.prototype.fillMetadataTableInfoExtra=function(){var e=this.metadataTableHeader;if(e){var t=this.metadataTableInfo;if(t){var a=i.MetadataCodedTokenIndex,r=this.getCodedTokenSize.bind(this),o=i.MetadataTableIndex,s=this.getHeapSize(0),n=this.getHeapSize(1),d=this.getHeapSize(2),l=e._offset+e._size,f=t[o.Module];f.valid&&(f.baseOffset=l,f.rowSize=2+s+3*n),l+=f.rows*f.rowSize,(f=t[o.TypeRef]).valid&&(f.baseOffset=l,f.rowSize=r(a.ResolutionScope)+2*s),l+=f.rows*f.rowSize,(f=t[o.TypeDef]).valid&&(f.baseOffset=l,f.rowSize=4+2*s+r(a.TypeDefOrRef)+t[o.Field].idSize+t[o.MethodDef].idSize),l+=f.rows*f.rowSize,(f=t[o.FieldPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Field].idSize),l+=f.rows*f.rowSize,(f=t[o.Field]).valid&&(f.baseOffset=l,f.rowSize=2+s+d),l+=f.rows*f.rowSize,(f=t[o.MethodPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.MethodDef].idSize),l+=f.rows*f.rowSize,(f=t[o.MethodDef]).valid&&(f.baseOffset=l,f.rowSize=8+s+d+t[o.Param].idSize),l+=f.rows*f.rowSize,(f=t[o.ParamPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Param].idSize),l+=f.rows*f.rowSize,(f=t[o.Param]).valid&&(f.baseOffset=l,f.rowSize=4+s),l+=f.rows*f.rowSize,(f=t[o.InterfaceImpl]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+r(a.TypeDefOrRef)),l+=f.rows*f.rowSize,(f=t[o.MemberRef]).valid&&(f.baseOffset=l,f.rowSize=r(a.MemberRefParent)+s+d),l+=f.rows*f.rowSize,(f=t[o.Constant]).valid&&(f.baseOffset=l,f.rowSize=2+r(a.HasConstant)+d),l+=f.rows*f.rowSize,(f=t[o.CustomAttribute]).valid&&(f.baseOffset=l,f.rowSize=r(a.HasCustomAttribute)+r(a.CustomAttributeType)+d),l+=f.rows*f.rowSize,(f=t[o.FieldMarshal]).valid&&(f.baseOffset=l,f.rowSize=r(a.HasFieldMarshall)+d),l+=f.rows*f.rowSize,(f=t[o.DeclSecurity]).valid&&(f.baseOffset=l,f.rowSize=2+r(a.HasDeclSecurity)+d),l+=f.rows*f.rowSize,(f=t[o.ClassLayout]).valid&&(f.baseOffset=l,f.rowSize=6+t[o.TypeDef].idSize),l+=f.rows*f.rowSize,(f=t[o.FieldLayout]).valid&&(f.baseOffset=l,f.rowSize=4+t[o.Field].idSize),l+=f.rows*f.rowSize,(f=t[o.StandAloneSig]).valid&&(f.baseOffset=l,f.rowSize=d),l+=f.rows*f.rowSize,(f=t[o.EventMap]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+t[o.Event].idSize),l+=f.rows*f.rowSize,(f=t[o.EventPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Event].idSize),l+=f.rows*f.rowSize,(f=t[o.Event]).valid&&(f.baseOffset=l,f.rowSize=2+s+r(a.TypeDefOrRef)),l+=f.rows*f.rowSize,(f=t[o.PropertyMap]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+t[o.Property].idSize),l+=f.rows*f.rowSize,(f=t[o.PropertyPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Property].idSize),l+=f.rows*f.rowSize,(f=t[o.Property]).valid&&(f.baseOffset=l,f.rowSize=2+s+d),l+=f.rows*f.rowSize,(f=t[o.MethodSemantics]).valid&&(f.baseOffset=l,f.rowSize=2+t[o.MethodDef].idSize+r(a.HasSemantics)),l+=f.rows*f.rowSize,(f=t[o.MethodImpl]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+2*r(a.MethodDefOrRef)),l+=f.rows*f.rowSize,(f=t[o.ModuleRef]).valid&&(f.baseOffset=l,f.rowSize=s),l+=f.rows*f.rowSize,(f=t[o.TypeSpec]).valid&&(f.baseOffset=l,f.rowSize=d),l+=f.rows*f.rowSize,(f=t[o.ImplMap]).valid&&(f.baseOffset=l,f.rowSize=2+r(a.MemberForwarded)+s+t[o.ModuleRef].idSize),l+=f.rows*f.rowSize,(f=t[o.FieldRVA]).valid&&(f.baseOffset=l,f.rowSize=4+t[o.Field].idSize),l+=f.rows*f.rowSize,(f=t[o.ENCLog]).valid&&(f.baseOffset=l,f.rowSize=8),l+=f.rows*f.rowSize,(f=t[o.ENCMap]).valid&&(f.baseOffset=l,f.rowSize=4),l+=f.rows*f.rowSize,(f=t[o.Assembly]).valid&&(f.baseOffset=l,f.rowSize=16+d+2*s),l+=f.rows*f.rowSize,(f=t[o.AssemblyProcessor]).valid&&(f.baseOffset=l,f.rowSize=4),l+=f.rows*f.rowSize,(f=t[o.AssemblyOS]).valid&&(f.baseOffset=l,f.rowSize=12),l+=f.rows*f.rowSize,(f=t[o.AssemblyRef]).valid&&(f.baseOffset=l,f.rowSize=12+2*d+2*s),l+=f.rows*f.rowSize,(f=t[o.AssemblyRefProcessor]).valid&&(f.baseOffset=l,f.rowSize=4+t[o.AssemblyRef].idSize),l+=f.rows*f.rowSize,(f=t[o.AssemblyRefOS]).valid&&(f.baseOffset=l,f.rowSize=12+t[o.AssemblyRef].idSize),l+=f.rows*f.rowSize,(f=t[o.File]).valid&&(f.baseOffset=l,f.rowSize=4+s+d),l+=f.rows*f.rowSize,(f=t[o.ExportedType]).valid&&(f.baseOffset=l,f.rowSize=8+2*s+r(a.Implementation)),l+=f.rows*f.rowSize,(f=t[o.ManifestResource]).valid&&(f.baseOffset=l,f.rowSize=8+s+r(a.Implementation)),l+=f.rows*f.rowSize,(f=t[o.NestedClass]).valid&&(f.baseOffset=l,f.rowSize=2*t[o.TypeDef].idSize),l+=f.rows*f.rowSize,(f=t[o.GenericParam]).valid&&(f.baseOffset=l,f.rowSize=4+r(a.TypeOrMethodDef)+s),l+=f.rows*f.rowSize,(f=t[o.MethodSpec]).valid&&(f.baseOffset=l,f.rowSize=r(a.MethodDefOrRef)+d),l+=f.rows*f.rowSize,(f=t[o.GenericParamConstraint]).valid&&(f.baseOffset=l,f.rowSize=t[o.GenericParam].idSize+r(a.TypeDefOrRef)),l+=f.rows*f.rowSize}}},e.prototype.checkMdt=function(e,t){if(!this.metadataTableInfo)return!1;var a=this.metadataTableInfo[e];return null!=a&&a.valid&&t>0&&t<=a.rows},e}();t.PEImage=n},function(e,t,a){"use strict";t.__esModule=!0,t.createResNavDataMessage=function(e){return{type:"RES_NAV_DATA",navList:e}},t.createResPageDataMessage=function(e){return{type:"RES_PAGE_DATA",pageData:e}},t.createResPEPropsMessage=function(e,t){return{type:"RES_PE_PROPS",is32Bit:e,isManaged:t}},t.createResPEErrorMessage=function(e){return{type:"RES_PE_ERROR",error:e}}},function(e,t,a){"use strict";t.__esModule=!0;var r=a(12),i=a(11),o=a(8),s=a(3),n=null;onmessage=function(e){var t=e.data;switch(t.type){case"REQ_OPEN_FILE":!function(e){var t=new FileReader;t.onload=function(e){try{var t=e.target.result;n=i.PEImage.load(t),o.clearGeneratorCache();var a=o.generatePageData(n,"HEADERS"),d=r.createResPageDataMessage(a);postMessage(d);var l=n.is32Bit(),f=n.isManaged(),_=r.createResPEPropsMessage(l,f);postMessage(_);var M=s.generateNavList(n),m=r.createResNavDataMessage(M);postMessage(m)}catch(e){var I=r.createResPEErrorMessage(e.message||"Unknown error: "+JSON.stringify(e));postMessage(I)}},t.onerror=function(e){n=null;var t=r.createResPEErrorMessage("Can't open file.");postMessage(t)},t.readAsArrayBuffer(e.file)}(t);break;case"REQ_OPEN_NAV":!function(e){if(null!=n){var t=e.target,a=t.pageID,i=t.subID,s=t.pageNum,d=t.elemID,l=o.generatePageData(n,a,i,s);l.nav.elemID=d;var f=r.createResPageDataMessage(l);postMessage(f)}}(t)}}}]); //# sourceMappingURL=worker.js.map \ No newline at end of file diff --git a/latest/worker.js.map b/latest/worker.js.map index 2b35ea8..0302a6c 100644 --- a/latest/worker.js.map +++ b/latest/worker.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/worker/pe/image-flags.ts","webpack:///./src/worker/page-data/formatter.ts","webpack:///./src/worker/pe/utils.ts","webpack:///./src/worker/page-data/nav-data.ts","webpack:///./src/worker/page-data/mds-list.ts","webpack:///./src/worker/page-data/mds-table.ts","webpack:///./src/worker/page-data/metadata-headers.ts","webpack:///./src/worker/page-data/headers.ts","webpack:///./src/worker/page-data/generator.ts","webpack:///./src/worker/pe/error.ts","webpack:///./src/worker/pe/loader.ts","webpack:///./src/worker/pe/image.ts","webpack:///./src/worker/message.ts","webpack:///./src/worker/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","MetadataTableIndex","IMAGE_DOS_SIGNATURE","IMAGE_NT_SIGNATURE","IMAGE_NT_OPTIONAL_HDR32_MAGIC","IMAGE_NT_OPTIONAL_HDR64_MAGIC","ImageFile","ImageFileMachine","ImageSubsystem","ImageDllCharacteristics","ImageDirectoryEntry","IMAGE_NUMBEROF_DIRECTORY_ENTRIES","ImageSection","ComImageFlags","MetadataSignature","NumberOfMdTables","MetadataCodedTokenIndex","ctc","tagSize","tables","TypeDef","TypeRef","TypeSpec","Field","Param","Property","MethodDef","InterfaceImpl","MemberRef","Module","DeclSecurity","Event","StandAloneSig","ModuleRef","Assembly","AssemblyRef","File","ExportedType","ManifestResource","GenericParam","GenericParamConstraint","MethodSpec","String","AssemblyHashAlgorithm","CorAssemblyFlags","CorEventAttr","CorFieldAttr","CorFileFlags","CorGenericParamAttr","CorPinvokeMap","CorManifestResourceFlags","CorMethodAttr","CorMethodImpl","CorMethodSemanticsAttr","CorParamAttr","CorPropertyAttr","CorTypeAttr","CorDeclSecurity","CorElementType","formatU1RawHex","padZeroLeft","toString","toUpperCase","formatU2RawHex","formatU4RawHex","formatU1Hex","formatU2Hex","formatU4Hex","formatHexDec","formatDec","v","toLocaleString","formatBytes","bytes","lineWidth","lines","start","length","line","Array","from","subarray","map","b","join","push","str","len","repeat","formatUIntField","f","sz","showDec","hex","offset","_offset","size","_size","rawData","data","formatStructTitle","title","formatU1Field","formatU2Field","formatU4Field","formatU8Field","high","low","formatCompressedUIntField","formatBytesField","formatStringField","formatGuidField","decompressUint","buffer","byteLength","RangeError","calculatePadding","dataSize","align","count1","mask","isSetLong","bit","decompressInt","u","fb","getCompressedIntSize","firstByte","F","generateNavList","pe","pageID","navList","target","children","elemID","navMD","isManaged","hasMetadata","hasStrongNameSignature","getMetadataStreamHeader","pageNum","getMetadataTableHeader","ti","tid","isMetadataTableValid","getMetadataTableRows","subID","generateMDTablesNavData","generateMDHeadersNavData","U","FM","getBlobIndexes","base","indexes","dtsz","getU1","getData","putIndexToPages","pageSize","pages","pageItems","pStart","pEnd","slice","generateMdsStringsPageData","cache","cfg","pgNum","mdsStrings","mdRoot","getMetadataRoot","sh","Offset","Size","mdsOffsetListPageSize","checkAndBuildCacheForMdsStrings","items","titleOf","nav","groups","index","getMdsStringsItem","paging","currentPageNumber","pageNavList","generateMdsUSPageData","mdsUS","checkAndBuildCacheForMdsUS","item","getMdsUSItem","Value","Suffix","generateMdsBlobPageData","mdsBlob","checkAndBuildCacheForMdsBlob","getMdsBlobItem","generateMdsGuidPageData","getMdsGuidItems","generateMdtModuleItems","Generation","Name","Mvid","EncId","EncBaseId","generateMdtTypeRefItems","ResolutionScope","Namespace","generateMdtTypeDefItems","Flags","Extends","FieldList","MethodList","generateMdtFieldPtrItems","generateMdtFieldItems","Signature","generateMdtMethodPtrItems","Method","generateMdtMethodDefItems","RVA","ImplFlags","ParamList","generateMdtParamPtrItems","generateMdtParamItems","Sequence","generateMdtInterfaceImplItems","Class","Interface","generateMdtMemberRefItems","generateMdtConstantItems","Type","PaddingZero","Parent","generateMdtCustomAttributeItems","generateMdtFieldMarshalItems","NativeType","generateMdtDeclSecurityItems","Action","PermissionSet","generateMdtClassLayoutItems","PackingSize","ClassSize","generateMdtFieldLayoutItems","OffSet","generateMdtStandAloneSigItems","generateMdtEventMapItems","EventList","generateMdtEventPtrItems","generateMdtEventItems","EventFlags","EventType","generateMdtPropertyMapItems","PropertyList","generateMdtPropertyPtrItems","generateMdtPropertyItems","PropFlags","generateMdtMethodSemanticsItems","Semantic","Association","generateMdtMethodImplItems","MethodBody","MethodDeclaration","generateMdtModuleRefItems","generateMdtTypeSpecItems","generateMdtImplMapItems","MappingFlags","MemberForwarded","ImportName","ImportScope","generateMdtFieldRVAItems","generateMdtENCLogItems","Token","FuncCode","generateMdtENCMapItems","generateMdtAssemblyItems","HashAlgId","MajorVersion","MinorVersion","BuildNumber","RevisionNumber","PublicKey","Locale","generateMdtAssemblyProcessorItems","Processor","generateMdtAssemblyOSItems","OSPlatformID","OSMajorVersion","OSMinorVersion","generateMdtAssemblyRefItems","PublicKeyOrToken","HashValue","generateMdtAssemblyRefProcessorItems","generateMdtAssemblyRefOSItems","generateMdtFileItems","generateMdtExportedTypeItems","TypeDefId","TypeName","TypeNamespace","Implementation","generateMdtManifestResourceItems","generateMdtNestedClassItems","NestedClass","EnclosingClass","generateMdtGenericParamItems","Number","Owner","generateMdtMethodSpecItems","Instantiation","generateMdtGenericParamConstraintItems","Constraint","getRidOnPage","psz","mdtPageSize","rows","end","generateMdsTablePageData","tableHeader","h","Reserved","HeapSizes","Reserved2","Valid","Sorted","Rows","generateMDTableHeader","tableInfo","id","valid","sorted","isMetadataTableSorted","generateMDTableList","generateMdtPageData","loader","builder","_a","getMdtModuleItem","getMdtTypeRefItem","getMdtTypeDefItem","FieldPtr","getMdtFieldPtrItem","getMdtFieldItem","MethodPtr","getMdtMethodPtrItem","getMdtMethodDefItem","ParamPtr","getMdtParamPtrItem","getMdtParamItem","getMdtInterfaceImplItem","getMdtMemberRefItem","Constant","getMdtConstantItem","CustomAttribute","getMdtCustomAttributeItem","FieldMarshal","getMdtFieldMarshalItem","getMdtDeclSecurityItem","ClassLayout","getMdtClassLayoutItem","FieldLayout","getMdtFieldLayoutItem","getMdtStandAloneSigItem","EventMap","getMdtEventMapItem","EventPtr","getMdtEventPtrItem","getMdtEventItem","PropertyMap","getMdtPropertyMapItem","PropertyPtr","getMdtPropertyPtrItem","getMdtPropertyItem","MethodSemantics","getMdtMethodSemanticsItem","MethodImpl","getMdtMethodImplItem","getMdtModuleRefItem","getMdtTypeSpecItem","ImplMap","getMdtImplMapItem","FieldRVA","getMdtFieldRVAItem","ENCLog","getMdtENCLogItem","ENCMap","getMdtENCMapItem","getMdtAssemblyItem","AssemblyProcessor","getMdtAssemblyProcessorItem","AssemblyOS","getMdtAssemblyOSItem","getMdtAssemblyRefItem","AssemblyRefProcessor","getMdtAssemblyRefProcessorItem","AssemblyRefOS","getMdtAssemblyRefOSItem","getMdtFileItem","getMdtExportedTypeItem","getMdtManifestResourceItem","getMdtNestedClassItem","getMdtGenericParamItem","getMdtMethodSpecItem","getMdtGenericParamConstraintItem","rid","generateSignleMdtTableItems","generateTalbeItems","Math","floor","tblName","generateMdtPaging","generateMetadataHeadersPageData","cliHeader","getCliHeader","cb","MajorRuntimeVersion","MinorRuntimeVersion","MetaData","VirtualAddress","EntryPointToken","Resources","StrongNameSignature","CodeManagerTable","VTableFixups","ExportAddressTableJumps","ManagedNativeHeader","generateCliHeader","metadataRoot","VersionLength","VersionString","VersionPadding","Streams","generateMetadataRoot","streamHeaders","getMetadataStreamHeaders","Padding","generateMetadataStreamHeader","snSignature","getStrongNameSignature","generateSNSignature","generateHeadersPageData","dosHeader","getDosHeader","e_magic","e_cblp","e_cp","e_crlc","e_cparhdr","e_minalloc","e_maxalloc","e_ss","e_sp","e_csum","e_ip","e_cs","e_lfarlc","e_ovno","e_res","e_oemid","e_oeminfo","e_res2","e_lfanew","generateDosHeader","peSignature","getPESignature","generatePESignature","fileHeader","getFileHeader","Machine","NumberOfSections","TimeDateStamp","PointerToSymbolTable","NumberOfSymbols","SizeOfOptionalHeader","Characteristics","generateFileHeader","optionalHeader","getOptionalHeader","Magic","MajorLinkerVersion","MinorLinkerVersion","SizeOfCode","SizeOfInitializedData","SizeOfUninitializedData","AddressOfEntryPoint","BaseOfCode","BaseOfData","ImageBase","SectionAlignment","FileAlignment","MajorOperatingSystemVersion","MinorOperatingSystemVersion","MajorImageVersion","MinorImageVersion","MajorSubsystemVersion","MinorSubsystemVersion","Win32VersionValue","SizeOfImage","SizeOfHeaders","CheckSum","Subsystem","DllCharacteristics","SizeOfStackReserve","SizeOfStackCommit","SizeOfHeapReserve","SizeOfHeapCommit","LoaderFlags","NumberOfRvaAndSizes","fillOptionalHeader32Fields","fillOptionalHeader64Fields","generateOptionalHeader","dataDirectories","getDataDirectories","generateDataDirectories","sectionHeaders","getSectionHeaders","VirtualSize","SizeOfRawData","PointerToRawData","PointerToRelocations","PointerToLinenumbers","NumberOfRelocations","NumberOfLinenumbers","generateSectionHeaders","headers_1","metadata_headers_1","mds_table_1","mds_list_1","generatePageData","clearGeneratorCache","PEError","_super","type","_this","this","__extends","Error","loadU1Field","loadU2Field","getU2","loadU4Field","getU4","loadU8Field","loadCompressedUIntField","Uint8Array","loadU1EnumField","loadU2EnumField","loadU4EnumField","loadFixedSizeByteArrayField","loadFixedSizeAsciiStringField","fromCharCode","apply","filter","loadNullTerminatedStringField","ptr","decodeURIComponent","loadFixedSizeUnicodeStringField","arr","Uint16Array","fromCodePoint","loadStructArrayByCount","count","loadImageDataDirectory","loadMdsStringsField","getHeapSize","loadMdsGuidField","loadMdsBlobField","loadMdtRidField","getTableIDSize","loadMdCodedTokenField","baseField","getCodedTokenSize","codedTokenInfo","decodeCodedToken","__assign","token","cti","loadImageDosHeader","loadImageFileHeader","loadImageOptionalHeader32","loadImageOptionalHeader64","loadImageSectionHeader","loadCliHeader","loadMetadataRoot","loadMetadataStreamHeader","loadMetadataTableHeader","loadMetadataUSItem","suffixSize","loadMetadataBlobItem","loadMdTokenField","loadMdtModule","loadMdtTypeRef","loadMdtTypeDef","TypeDefOrRef","loadMdtFieldPtr","loadMdtField","loadMdtMethodPtr","loadMdtMethodDef","loadMdtParamPtr","loadMdtParam","loadMdtInterfaceImpl","loadMdtMemberRef","MemberRefParent","loadMdtConstant","HasConstant","loadMdtCustomAttribute","HasCustomAttribute","CustomAttributeType","loadMdtFieldMarshal","HasFieldMarshall","loadMdtDeclSecurity","HasDeclSecurity","loadMdtClassLayout","loadMdtFieldLayout","loadMdtStandAloneSig","loadMdtEventMap","loadMdtEventPtr","loadMdtEvent","loadMdtPropertyMap","loadMdtPropertyPtr","loadMdtProperty","loadMdtMethodSemantics","HasSemantics","loadMdtMethodImpl","MethodDefOrRef","loadMdtModuleRef","loadMdtTypeSpec","loadMdtImplMap","loadMdtFieldRVA","loadMdtENCLog","loadMdtENCMap","loadMdtAssembly","loadMdtAssemblyProcessor","loadMdtAssemblyOS","loadMdtAssemblyRef","loadMdtAssemblyRefProcessor","loadMdtAssemblyRefOS","loadMdtFile","loadMdtExportedType","loadMdtManifestResource","loadMdtNestedClass","loadMdtGenericParam","TypeOrMethodDef","loadMdtMethodSpec","loadMdtGenericParamConstraint","L","E","PEImage","buf","metadataSizingCache","DataView","loadHeaders","load","check","getUint8","getUint16","getUint32","is32Bit","optHdr","dd","isDataDirectoryValid","IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR","hasManagedResources","info","metadataTableInfo","rvaToOffset","metadataStreamHeaders","headers","shift","strongNameSignature","metadataTableHeader","fillMetadataTableInfo","fillMetadataTableInfoExtra","checkMdt","baseOffset","rowSize","heap","idSize","codedToken","maxRows","_i","rva","getSectionHeaderByRva","offsetToRva","getSectionHeaderByOffset","nValid","ctid","ctsz","stringsSize","guidSize","blobSize","tbli","createResNavDataMessage","createResPageDataMessage","pageData","createResPEPropsMessage","createResPEErrorMessage","error","M","image_1","generator_1","nav_data_1","onmessage","ev","msg","reader","FileReader","onload","result","pageDataMsg","postMessage","pePropsMsg","navMsg","ex","msg_1","message","JSON","stringify","onerror","readAsArrayBuffer","file","handleReqOpenFile","res","handleReqOpenNav"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,E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M,QAASN,EAAAuM,EAAAvM,OAC1B6iB,EAAWM,EAAA5K,iBAAiB5Y,EAAIC,EAAQgB,EAAON,GACrDuiB,EAASjgB,IAAI5C,OAASA,EACtB,IAAMykB,EAAMxB,EAAEL,yBAAyBC,GACvCgB,YAAYY,IAnDRC,CAAiBnB","file":"worker.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 13);\n","export const IMAGE_DOS_SIGNATURE = 0x5A4D; // MZ\r\n\r\nexport const IMAGE_NT_SIGNATURE = 0x00004550; // PE00\r\n\r\nexport const IMAGE_NT_OPTIONAL_HDR32_MAGIC = 0x10b;\r\nexport const IMAGE_NT_OPTIONAL_HDR64_MAGIC = 0x20b;\r\n\r\nexport enum ImageFile {\r\n IMAGE_FILE_RELOCS_STRIPPED = 0x0001,\r\n IMAGE_FILE_EXECUTABLE_IMAGE = 0x0002,\r\n IMAGE_FILE_LINE_NUMS_STRIPPED = 0x0004,\r\n IMAGE_FILE_LOCAL_SYMS_STRIPPED = 0x0008,\r\n IMAGE_FILE_AGGRESIVE_WS_TRIM = 0x0010,\r\n IMAGE_FILE_LARGE_ADDRESS_AWARE = 0x0020,\r\n IMAGE_FILE_BYTES_REVERSED_LO = 0x0080,\r\n IMAGE_FILE_32BIT_MACHINE = 0x0100,\r\n IMAGE_FILE_DEBUG_STRIPPED = 0x0200,\r\n IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = 0x0400,\r\n IMAGE_FILE_NET_RUN_FROM_SWAP = 0x0800,\r\n IMAGE_FILE_SYSTEM = 0x1000,\r\n IMAGE_FILE_DLL = 0x2000,\r\n IMAGE_FILE_UP_SYSTEM_ONLY = 0x4000,\r\n IMAGE_FILE_BYTES_REVERSED_HI = 0x8000,\r\n}\r\n\r\nexport enum ImageFileMachine {\r\n IMAGE_FILE_MACHINE_UNKNOWN = 0,\r\n IMAGE_FILE_MACHINE_TARGET_HOST = 0x0001,\r\n IMAGE_FILE_MACHINE_I386 = 0x014c,\r\n IMAGE_FILE_MACHINE_R3000 = 0x0162,\r\n IMAGE_FILE_MACHINE_R4000 = 0x0166,\r\n IMAGE_FILE_MACHINE_R10000 = 0x0168,\r\n IMAGE_FILE_MACHINE_WCEMIPSV2 = 0x0169,\r\n IMAGE_FILE_MACHINE_ALPHA = 0x0184,\r\n IMAGE_FILE_MACHINE_SH3 = 0x01a2,\r\n IMAGE_FILE_MACHINE_SH3DSP = 0x01a3,\r\n IMAGE_FILE_MACHINE_SH3E = 0x01a4,\r\n IMAGE_FILE_MACHINE_SH4 = 0x01a6,\r\n IMAGE_FILE_MACHINE_SH5 = 0x01a8,\r\n IMAGE_FILE_MACHINE_ARM = 0x01c0,\r\n IMAGE_FILE_MACHINE_THUMB = 0x01c2,\r\n IMAGE_FILE_MACHINE_ARMNT = 0x01c4,\r\n IMAGE_FILE_MACHINE_AM33 = 0x01d3,\r\n IMAGE_FILE_MACHINE_POWERPC = 0x01F0,\r\n IMAGE_FILE_MACHINE_POWERPCFP = 0x01f1,\r\n IMAGE_FILE_MACHINE_IA64 = 0x0200,\r\n IMAGE_FILE_MACHINE_MIPS16 = 0x0266,\r\n IMAGE_FILE_MACHINE_ALPHA64 = 0x0284,\r\n IMAGE_FILE_MACHINE_MIPSFPU = 0x0366,\r\n IMAGE_FILE_MACHINE_MIPSFPU16 = 0x0466,\r\n IMAGE_FILE_MACHINE_AXP64 = IMAGE_FILE_MACHINE_ALPHA64,\r\n IMAGE_FILE_MACHINE_TRICORE = 0x0520,\r\n IMAGE_FILE_MACHINE_CEF = 0x0CEF,\r\n IMAGE_FILE_MACHINE_EBC = 0x0EBC,\r\n IMAGE_FILE_MACHINE_AMD64 = 0x8664,\r\n IMAGE_FILE_MACHINE_M32R = 0x9041,\r\n IMAGE_FILE_MACHINE_ARM64 = 0xAA64,\r\n IMAGE_FILE_MACHINE_CEE = 0xC0EE,\r\n}\r\n\r\nexport enum ImageSubsystem {\r\n IMAGE_SUBSYSTEM_UNKNOWN = 0,\r\n IMAGE_SUBSYSTEM_NATIVE = 1,\r\n IMAGE_SUBSYSTEM_WINDOWS_GUI = 2,\r\n IMAGE_SUBSYSTEM_WINDOWS_CUI = 3,\r\n IMAGE_SUBSYSTEM_OS2_CUI = 5,\r\n IMAGE_SUBSYSTEM_POSIX_CUI = 7,\r\n IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8,\r\n IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9,\r\n IMAGE_SUBSYSTEM_EFI_APPLICATION = 10,\r\n IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11,\r\n IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12,\r\n IMAGE_SUBSYSTEM_EFI_ROM = 13,\r\n IMAGE_SUBSYSTEM_XBOX = 14,\r\n IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16,\r\n IMAGE_SUBSYSTEM_XBOX_CODE_CATALOG = 17,\r\n}\r\n\r\nexport enum ImageDllCharacteristics {\r\n IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020,\r\n IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE = 0x0040,\r\n IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY = 0x0080,\r\n IMAGE_DLLCHARACTERISTICS_NX_COMPAT = 0x0100,\r\n IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = 0x0200,\r\n IMAGE_DLLCHARACTERISTICS_NO_SEH = 0x0400,\r\n IMAGE_DLLCHARACTERISTICS_NO_BIND = 0x0800,\r\n IMAGE_DLLCHARACTERISTICS_APPCONTAINER = 0x1000,\r\n IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = 0x2000,\r\n IMAGE_DLLCHARACTERISTICS_GUARD_CF = 0x4000,\r\n IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = 0x8000,\r\n}\r\n\r\nexport enum ImageDirectoryEntry {\r\n IMAGE_DIRECTORY_ENTRY_EXPORT = 0,\r\n IMAGE_DIRECTORY_ENTRY_IMPORT = 1,\r\n IMAGE_DIRECTORY_ENTRY_RESOURCE = 2,\r\n IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3,\r\n IMAGE_DIRECTORY_ENTRY_SECURITY = 4,\r\n IMAGE_DIRECTORY_ENTRY_BASERELOC = 5,\r\n IMAGE_DIRECTORY_ENTRY_DEBUG = 6,\r\n IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7,\r\n IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8,\r\n IMAGE_DIRECTORY_ENTRY_TLS = 9,\r\n IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10,\r\n IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11,\r\n IMAGE_DIRECTORY_ENTRY_IAT = 12,\r\n IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13,\r\n IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14,\r\n}\r\n\r\nexport const IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16;\r\n\r\nexport enum ImageSection {\r\n IMAGE_SCN_TYPE_NO_PAD = 0x00000008,\r\n\r\n IMAGE_SCN_CNT_CODE = 0x00000020,\r\n IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040,\r\n IMAGE_SCN_CNT_UNINITIALIZED_DATA = 0x00000080,\r\n\r\n IMAGE_SCN_LNK_OTHER = 0x00000100,\r\n IMAGE_SCN_LNK_INFO = 0x00000200,\r\n IMAGE_SCN_LNK_REMOVE = 0x00000800,\r\n IMAGE_SCN_LNK_COMDAT = 0x00001000,\r\n\r\n IMAGE_SCN_NO_DEFER_SPEC_EXC = 0x00004000,\r\n IMAGE_SCN_GPREL = 0x00008000,\r\n\r\n IMAGE_SCN_MEM_PURGEABLE = 0x00020000,\r\n IMAGE_SCN_MEM_16BIT = 0x00020000,\r\n IMAGE_SCN_MEM_LOCKED = 0x00040000,\r\n IMAGE_SCN_MEM_PRELOAD = 0x00080000,\r\n\r\n IMAGE_SCN_ALIGN_1BYTES = 0x00100000,\r\n IMAGE_SCN_ALIGN_2BYTES = 0x00200000,\r\n IMAGE_SCN_ALIGN_4BYTES = 0x00300000,\r\n IMAGE_SCN_ALIGN_8BYTES = 0x00400000,\r\n IMAGE_SCN_ALIGN_16BYTES = 0x00500000,\r\n IMAGE_SCN_ALIGN_32BYTES = 0x00600000,\r\n IMAGE_SCN_ALIGN_64BYTES = 0x00700000,\r\n IMAGE_SCN_ALIGN_128BYTES = 0x00800000,\r\n IMAGE_SCN_ALIGN_256BYTES = 0x00900000,\r\n IMAGE_SCN_ALIGN_512BYTES = 0x00A00000,\r\n IMAGE_SCN_ALIGN_1024BYTES = 0x00B00000,\r\n IMAGE_SCN_ALIGN_2048BYTES = 0x00C00000,\r\n IMAGE_SCN_ALIGN_4096BYTES = 0x00D00000,\r\n IMAGE_SCN_ALIGN_8192BYTES = 0x00E00000,\r\n\r\n IMAGE_SCN_LNK_NRELOC_OVFL = 0x01000000,\r\n IMAGE_SCN_MEM_DISCARDABLE = 0x02000000,\r\n IMAGE_SCN_MEM_NOT_CACHED = 0x04000000,\r\n IMAGE_SCN_MEM_NOT_PAGED = 0x08000000,\r\n IMAGE_SCN_MEM_SHARED = 0x10000000,\r\n IMAGE_SCN_MEM_EXECUTE = 0x20000000,\r\n IMAGE_SCN_MEM_READ = 0x40000000,\r\n IMAGE_SCN_MEM_WRITE = 0x80000000,\r\n\r\n IMAGE_SCN_SCALE_INDEX = 0x00000001,\r\n}\r\n\r\n//\r\n// Metadata structures.\r\n//\r\n\r\nexport enum ComImageFlags {\r\n COMIMAGE_FLAGS_ILONLY = 0x00000001,\r\n COMIMAGE_FLAGS_32BITREQUIRED = 0x00000002,\r\n COMIMAGE_FLAGS_IL_LIBRARY = 0x00000004,\r\n COMIMAGE_FLAGS_STRONGNAMESIGNED = 0x00000008,\r\n COMIMAGE_FLAGS_NATIVE_ENTRYPOINT = 0x00000010,\r\n COMIMAGE_FLAGS_TRACKDEBUGDATA = 0x00010000,\r\n COMIMAGE_FLAGS_32BITPREFERRED = 0x00020000,\r\n}\r\n\r\nexport const MetadataSignature = 0x424A5342;\r\n\r\nexport const enum MetadataStreamName {\r\n Table = \"#~\",\r\n Strings = \"#Strings\",\r\n US = \"#US\",\r\n GUID = \"#GUID\",\r\n Blob = \"#Blob\",\r\n}\r\n\r\nexport const enum MetadataHeapSizeID {\r\n String = 0,\r\n GUID = 1,\r\n Blob = 2,\r\n}\r\n\r\nexport enum MetadataTableIndex {\r\n Module = 0x00,\r\n TypeRef = 0x01,\r\n TypeDef = 0x02,\r\n FieldPtr = 0x03,\r\n Field = 0x04,\r\n MethodPtr = 0x05,\r\n MethodDef = 0x06,\r\n ParamPtr = 0x07,\r\n Param = 0x08,\r\n InterfaceImpl = 0x09,\r\n MemberRef = 0x0A,\r\n Constant = 0x0B,\r\n CustomAttribute = 0x0C,\r\n FieldMarshal = 0x0D,\r\n DeclSecurity = 0x0E,\r\n ClassLayout = 0x0F,\r\n FieldLayout = 0x10,\r\n StandAloneSig = 0x11,\r\n EventMap = 0x12,\r\n EventPtr = 0x13,\r\n Event = 0x14,\r\n PropertyMap = 0x15,\r\n PropertyPtr = 0x16,\r\n Property = 0x17,\r\n MethodSemantics = 0x18,\r\n MethodImpl = 0x19,\r\n ModuleRef = 0x1A,\r\n TypeSpec = 0x1B,\r\n ImplMap = 0x1C,\r\n FieldRVA = 0x1D,\r\n ENCLog = 0x1E,\r\n ENCMap = 0x1F,\r\n Assembly = 0x20,\r\n AssemblyProcessor = 0x21,\r\n AssemblyOS = 0x22,\r\n AssemblyRef = 0x23,\r\n AssemblyRefProcessor = 0x24,\r\n AssemblyRefOS = 0x25,\r\n File = 0x26,\r\n ExportedType = 0x27,\r\n ManifestResource = 0x28,\r\n NestedClass = 0x29,\r\n GenericParam = 0x2A,\r\n MethodSpec = 0x2B,\r\n GenericParamConstraint = 0x2C,\r\n\r\n String = 0x70,\r\n}\r\n\r\nexport const NumberOfMdTables = 45;\r\n\r\nexport enum MetadataCodedTokenIndex {\r\n TypeDefOrRef = 0,\r\n HasConstant = 1,\r\n HasCustomAttribute = 2,\r\n HasFieldMarshall = 3,\r\n HasDeclSecurity = 4,\r\n MemberRefParent = 5,\r\n HasSemantics = 6,\r\n MethodDefOrRef = 7,\r\n MemberForwarded = 8,\r\n Implementation = 9,\r\n CustomAttributeType = 10,\r\n ResolutionScope = 11,\r\n TypeOrMethodDef = 12,\r\n}\r\n\r\nexport interface MetadataCodedTokenInfo {\r\n tagSize: number;\r\n tables: MetadataTableIndex[];\r\n}\r\n\r\nexport const ctc: MetadataCodedTokenInfo[] = [{\r\n tagSize: 2, tables: [ // TypeDefOrRef\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.TypeSpec,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // HasConstant\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.Param,\r\n MetadataTableIndex.Property,\r\n ]\r\n}, {\r\n tagSize: 5, tables: [ // HasCustomAttribute\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.Param,\r\n MetadataTableIndex.InterfaceImpl,\r\n MetadataTableIndex.MemberRef,\r\n MetadataTableIndex.Module,\r\n MetadataTableIndex.DeclSecurity,\r\n MetadataTableIndex.Property,\r\n MetadataTableIndex.Event,\r\n MetadataTableIndex.StandAloneSig,\r\n MetadataTableIndex.ModuleRef,\r\n MetadataTableIndex.TypeSpec,\r\n MetadataTableIndex.Assembly,\r\n MetadataTableIndex.AssemblyRef,\r\n MetadataTableIndex.File,\r\n MetadataTableIndex.ExportedType,\r\n MetadataTableIndex.ManifestResource,\r\n MetadataTableIndex.GenericParam,\r\n MetadataTableIndex.GenericParamConstraint,\r\n MetadataTableIndex.MethodSpec,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // HasFieldMarshall\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.Param,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // HasDeclSecurity\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.Assembly,\r\n ]\r\n}, {\r\n tagSize: 3, tables: [ // MemberRefParent\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.ModuleRef,\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.TypeSpec,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // HasSemantics\r\n MetadataTableIndex.Event,\r\n MetadataTableIndex.Property,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // MethodDefOrRef\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.MemberRef,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // MemberForwarded\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.MethodDef,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // Implementation\r\n MetadataTableIndex.File,\r\n MetadataTableIndex.AssemblyRef,\r\n MetadataTableIndex.ExportedType,\r\n ]\r\n}, {\r\n tagSize: 3, tables: [ // CustomAttributeType\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.MemberRef,\r\n MetadataTableIndex.String,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // ResolutionScope\r\n MetadataTableIndex.Module,\r\n MetadataTableIndex.ModuleRef,\r\n MetadataTableIndex.AssemblyRef,\r\n MetadataTableIndex.TypeRef,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // TypeOrMethodDef\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.MethodDef,\r\n ]\r\n}];\r\n\r\nexport enum AssemblyHashAlgorithm {\r\n None = 0x0000,\r\n MD5 = 0x8003, // Reserved\r\n SHA1 = 0x8004,\r\n}\r\n\r\nexport enum CorAssemblyFlags {\r\n PublicKey = 0x0001,\r\n\r\n pa__Mask = 0x0070,\r\n pa_ProcessorArchitectureNone = 0x0000,\r\n pa_ProcessorArchitectureMsil = 0x0010,\r\n pa_ProcessorArchitectureX86 = 0x0020,\r\n pa_ProcessorArchitectureIa64 = 0x0030,\r\n pa_ProcessorArchitectureAmd64 = 0x0040,\r\n\r\n ProcessorArchitectureSpecified = 0x0080,\r\n\r\n EnableJitcompileTracking = 0x8000,\r\n DisableJitcompileOptimizer = 0x4000,\r\n\r\n Retargetable = 0x0100,\r\n}\r\n\r\nexport enum CorEventAttr {\r\n SpecialName = 0x0200,\r\n RtSpecialName = 0x0400,\r\n}\r\n\r\nexport enum CorFieldAttr {\r\n fa__Mask = 0x0007,\r\n fa_PrivateScope = 0x0000,\r\n fa_Private = 0x0001,\r\n fa_FamAndAssem = 0x0002,\r\n fa_Assembly = 0x0003,\r\n fa_Family = 0x0004,\r\n fa_FamOrAssem = 0x0005,\r\n fa_Public = 0x0006,\r\n\r\n Static = 0x0010,\r\n InitOnly = 0x0020,\r\n Literal = 0x0040,\r\n NotSerialized = 0x0080,\r\n\r\n SpecialName = 0x0200,\r\n\r\n PinvokeImpl = 0x2000,\r\n\r\n RtSpecialName = 0x0400,\r\n HasFieldMarshal = 0x1000,\r\n HasDefault = 0x8000,\r\n HasFieldRva = 0x0100,\r\n}\r\n\r\nexport enum CorFileFlags {\r\n ContainsMetaData = 0x0000,\r\n ContainsNoMetaData = 0x0001,\r\n}\r\n\r\nexport enum CorGenericParamAttr {\r\n v__Mask = 0x0003,\r\n v_NonVariant = 0x0000,\r\n v_Covariant = 0x0001,\r\n v_Contravariant = 0x0002,\r\n\r\n NoSpecialConstraint = 0x0000,\r\n ReferenceTypeConstraint = 0x0004,\r\n NotNullableValueTypeConstraint = 0x0008,\r\n DefaultConstructorConstraint = 0x0010,\r\n}\r\n\r\nexport enum CorPinvokeMap {\r\n NoMangle = 0x0001,\r\n cs__Mask = 0x0006,\r\n cs_CharSetNotSpec = 0x0000,\r\n cs_CharSetAnsi = 0x0002,\r\n cs_CharSetUnicode = 0x0004,\r\n cs_CharSetAuto = 0x0006,\r\n\r\n bf__Mask = 0x0030,\r\n bf_BestFitUseAssem = 0x0000,\r\n bf_BestFitEnabled = 0x0010,\r\n bf_BestFitDisabled = 0x0020,\r\n\r\n touc__Mask = 0x3000,\r\n touc_ThrowOnUnmappableCharUseAssem = 0x0000,\r\n touc_ThrowOnUnmappableCharEnabled = 0x1000,\r\n touc_ThrowOnUnmappableCharDisabled = 0x2000,\r\n\r\n SupportsLastError = 0x0040,\r\n\r\n cc__Mask = 0x0700,\r\n cc_CallConvWinapi = 0x0100,\r\n cc_CallConvCdecl = 0x0200,\r\n cc_CallConvStdcall = 0x0300,\r\n cc_CallConvThiscall = 0x0400,\r\n cc_CallConvFastcall = 0x0500,\r\n}\r\n\r\nexport enum CorManifestResourceFlags {\r\n v__Mask = 0x0007,\r\n v_Public = 0x0001,\r\n v_Private = 0x0002,\r\n}\r\n\r\nexport enum CorMethodAttr {\r\n ma__Mask = 0x0007,\r\n ma_PrivateScope = 0x0000,\r\n ma_Private = 0x0001,\r\n ma_FamAndAssem = 0x0002,\r\n ma_Assem = 0x0003,\r\n ma_Family = 0x0004,\r\n ma_FamOrAssem = 0x0005,\r\n ma_Public = 0x0006,\r\n\r\n Static = 0x0010,\r\n Final = 0x0020,\r\n Virtual = 0x0040,\r\n HideBySig = 0x0080,\r\n\r\n vl__Mask = 0x0100,\r\n vl_ReuseSlot = 0x0000,\r\n vl_NewSlot = 0x0100,\r\n\r\n CheckAccessOnOverride = 0x0200,\r\n Abstract = 0x0400,\r\n SpecialName = 0x0800,\r\n\r\n PInvokeImpl = 0x2000,\r\n UnmanagedExport = 0x0008,\r\n\r\n RtSpecialName = 0x1000,\r\n HasSecurity = 0x4000,\r\n RequireSecObject = 0x8000,\r\n}\r\n\r\nexport enum CorMethodImpl {\r\n ct__Mask = 0x0003,\r\n ct_IL = 0x0000,\r\n ct_Native = 0x0001,\r\n ct_OptIL = 0x0002,\r\n ct_Runtime = 0x0003,\r\n\r\n m__Mask = 0x0004,\r\n m_Unmanaged = 0x0004,\r\n m_Managed = 0x0000,\r\n\r\n ForwardRef = 0x0010,\r\n PreserveSig = 0x0080,\r\n\r\n InternalCall = 0x1000,\r\n\r\n Synchronized = 0x0020,\r\n NoInlining = 0x0008,\r\n}\r\n\r\nexport enum CorMethodSemanticsAttr {\r\n Setter = 0x0001,\r\n Getter = 0x0002,\r\n Other = 0x0004,\r\n AddOn = 0x0008,\r\n RemoveOn = 0x0010,\r\n Fire = 0x0020,\r\n}\r\n\r\nexport enum CorParamAttr {\r\n In = 0x0001,\r\n Out = 0x0002,\r\n Optional = 0x0010,\r\n\r\n HasDefault = 0x1000,\r\n HasFieldMarshal = 0x2000,\r\n\r\n Unused = 0xcfe0,\r\n}\r\n\r\nexport enum CorPropertyAttr {\r\n SpecialName = 0x0200,\r\n\r\n RtSpecialName = 0x0400,\r\n HasDefault = 0x1000,\r\n\r\n Unused = 0xe9ff,\r\n}\r\n\r\nexport enum CorTypeAttr {\r\n v__Mask = 0x00000007,\r\n v_NotPublic = 0x00000000,\r\n v_Public = 0x00000001,\r\n v_NestedPublic = 0x00000002,\r\n v_NestedPrivate = 0x00000003,\r\n v_NestedFamily = 0x00000004,\r\n v_NestedAssembly = 0x00000005,\r\n v_NestedFamAndAssem = 0x00000006,\r\n v_NestedFamOrAssem = 0x00000007,\r\n\r\n l__Mask = 0x00000018,\r\n l_AutoLayout = 0x00000000,\r\n l_SequentialLayout = 0x00000008,\r\n l_ExplicitLayout = 0x00000010,\r\n\r\n cs__Mask = 0x00000060,\r\n cs_Class = 0x00000000,\r\n cs_Interface = 0x00000020,\r\n\r\n Abstract = 0x00000080,\r\n Sealed = 0x00000100,\r\n SpecialName = 0x00000400,\r\n\r\n Import = 0x00001000,\r\n Serializable = 0x00002000,\r\n WindowsRuntime = 0x00004000,\r\n\r\n sf__Mask = 0x00030000,\r\n sf_AnsiClass = 0x00000000,\r\n sf_UnicodeClass = 0x00010000,\r\n sf_AutoClass = 0x00020000,\r\n sf_CustomFormatClass = 0x00030000,\r\n CustomFormatMask = 0x00C00000,\r\n\r\n BeforeFieldInit = 0x00100000,\r\n Forwarder = 0x00200000,\r\n\r\n RtSpecialName = 0x00000800,\r\n HasSecurity = 0x00040000,\r\n}\r\n\r\nexport enum CorDeclSecurity {\r\n ActionNil = 0x0000,\r\n Request = 0x0001,\r\n Demand = 0x0002,\r\n Assert = 0x0003,\r\n Deny = 0x0004,\r\n PermitOnly = 0x0005,\r\n LinktimeCheck = 0x0006,\r\n InheritanceCheck = 0x0007,\r\n RequestMinimum = 0x0008,\r\n RequestOptional = 0x0009,\r\n RequestRefuse = 0x000a,\r\n PrejitGrant = 0x000b,\r\n PrejitDenied = 0x000c,\r\n NonCasDemand = 0x000d,\r\n NonCasLinkDemand = 0x000e,\r\n NonCasInheritance = 0x000f,\r\n}\r\n\r\nexport enum CorElementType {\r\n End = 0x00,\r\n Void = 0x01,\r\n Boolean = 0x02,\r\n Char = 0x03,\r\n I1 = 0x04,\r\n U1 = 0x05,\r\n I2 = 0x06,\r\n U2 = 0x07,\r\n I4 = 0x08,\r\n U4 = 0x09,\r\n I8 = 0x0A,\r\n U8 = 0x0B,\r\n R4 = 0x0C,\r\n R8 = 0x0D,\r\n String = 0x0E,\r\n\r\n Ptr = 0x0F,\r\n ByRef = 0x10,\r\n\r\n ValueType = 0x11,\r\n Class = 0x12,\r\n Var = 0x13,\r\n Array = 0x14,\r\n GenericInst = 0x15,\r\n TypedByRef = 0x16,\r\n\r\n I = 0x18,\r\n U = 0x19,\r\n FnPtr = 0x1B,\r\n Object = 0x1C,\r\n SzArray = 0x1D,\r\n\r\n MVar = 0x1E,\r\n\r\n CModReqd = 0x1F,\r\n CModOpt = 0x20,\r\n Internal = 0x21,\r\n\r\n Modifier = 0x40,\r\n Sentinel = 0x01 | Modifier,\r\n Pinned = 0x05 | Modifier,\r\n R4HFA = 0x06 | Modifier,\r\n R8HFA = 0x07 | Modifier,\r\n}\r\n","import * as S from \"../pe/structures\";\r\n\r\nexport function formatU1RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 2);\r\n}\r\n\r\nexport function formatU2RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 4);\r\n}\r\n\r\nexport function formatU4RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 8);\r\n}\r\n\r\nexport function formatU1Hex(d: number): string {\r\n return `${formatU1RawHex(d)}h`;\r\n}\r\n\r\nexport function formatU2Hex(d: number): string {\r\n return `${formatU2RawHex(d)}h`;\r\n}\r\n\r\nexport function formatU4Hex(d: number): string {\r\n return `${formatU4RawHex(d)}h`;\r\n}\r\n\r\nexport function formatHexDec(d: number): string {\r\n return `${d.toString(16).toUpperCase()}h (${d})`;\r\n}\r\n\r\nexport function formatDec(v: number): string {\r\n return v.toLocaleString();\r\n}\r\n\r\nexport function formatBytes(bytes: Uint8Array, lineWidth: number = 16): string[] {\r\n let lines: string[] = [];\r\n for (let start = 0; start < bytes.length; start += lineWidth) {\r\n const line = Array.from(bytes.subarray(start, start + lineWidth))\r\n .map(b => formatU1RawHex(b)).join(\"-\");\r\n lines.push(line);\r\n }\r\n return lines;\r\n}\r\n\r\nexport function formatStructTitle(s: S.FileData, title: string): string {\r\n return `${title} [${formatU4Hex(s._offset)} - ${formatU4Hex(s._offset + s._size)} : ${formatHexDec(s._size)}]`;\r\n}\r\n\r\nexport function formatU1Field(name: string, f: S.U1Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 1, showDec);\r\n}\r\n\r\nexport function formatU2Field(name: string, f: S.U2Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 2, showDec);\r\n}\r\n\r\nexport function formatU4Field(name: string, f: S.U4Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 4, showDec);\r\n}\r\n\r\nexport function formatU8Field(name: string, f: S.U8Field, showDec?: boolean): W.StructItem {\r\n let value = `${formatU4RawHex(f.high)} ${formatU4Hex(f.low)}`;\r\n\r\n if (showDec && f.high < 0x1FFFFF) {\r\n const long = f.high * 0x100000000 + f.low;\r\n value += ` (${formatDec(long)})`;\r\n }\r\n\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value,\r\n };\r\n}\r\n\r\nexport function formatCompressedUIntField(name: string, f: S.CompressedUIntField): W.StructItem {\r\n return formatUIntField(name, f, f._size, true);\r\n}\r\n\r\nexport function formatBytesField(name: string, f: S.Field): W.StructItem {\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: \"\",\r\n };\r\n}\r\n\r\nexport function formatStringField(name: string, f: S.StringField): W.StructItem {\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: `\"${f.value}\"`,\r\n };\r\n}\r\n\r\nexport function formatGuidField(name: string, f: S.Field): W.StructItem {\r\n const b = (n: number) => formatU1RawHex(f.data[n]);\r\n const value = \"{\" + b(3) + b(2) + b(1) + b(0) + \"-\"\r\n + b(5) + b(4) + \"-\" + b(7) + b(6) + \"-\" + b(8) + b(9) + \"-\"\r\n + b(10) + b(11) + b(12) + b(13) + b(14) + b(15) + \"}\";\r\n\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value,\r\n };\r\n}\r\n\r\nfunction padZeroLeft(str: string, len: number): string {\r\n if (str.length < len) {\r\n return \"0\".repeat(len - str.length) + str;\r\n } else {\r\n return str;\r\n }\r\n}\r\n\r\nfunction formatUIntField(name: string, f: S.UIntField, sz: number, showDec?: boolean): W.StructItem {\r\n let hex: string;\r\n switch (sz) {\r\n case 1: hex = formatU1Hex(f.value); break;\r\n case 2: hex = formatU2Hex(f.value); break;\r\n case 4: hex = formatU4Hex(f.value); break;\r\n default: hex = f.value.toString(16).toUpperCase(); break;\r\n }\r\n\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: showDec ? `${hex} (${formatDec(f.value)})` : hex,\r\n }\r\n}\r\n","export function calculatePadding(dataSize: number, align: number = 4): number {\n const r = dataSize % align;\n if (r == 0) {\n return 0;\n } else {\n return align - r;\n }\n}\n\nexport function count1(n: number) {\n let c = 0;\n for (let i = 0, mask = 1; i < 32; i++ , mask <<= 1) {\n if (n & mask)\n c++;\n }\n return c;\n}\n\nexport function isSetLong(high: number, low: number, bit: number): boolean {\n return bit >= 0 && bit < 64 &&\n (bit < 32 && ((low & (1 << bit)) != 0)) ||\n (bit >= 32 && (high & (1 << (bit - 32))) != 0);\n}\n\nexport function decompressUint(data: Uint8Array): number {\n if ((data[0] & 0x80) == 0 && data.buffer.byteLength == 1)\n return data[0];\n else if ((data[0] & 0xC0) == 0x80 && data.buffer.byteLength == 2)\n return (data[0] & 0x3F) << 8 | data[1];\n else if ((data[0] & 0xE0) == 0xC0 && data.buffer.byteLength == 4)\n return (data[0] & 0x1F) << 24 | data[1] << 16 | data[2] << 8 | data[3];\n else\n throw new RangeError();\n}\n\nexport function decompressInt(data: Uint8Array): number {\n const u = decompressUint(data);\n if ((u & 0x00000001) == 0)\n return (u >> 1);\n\n const fb = data[0];\n if ((fb & 0x80) == 0)\n return (u >> 1) | 0xFFFFFFC0;\n else if ((fb & 0xC0) == 0x80)\n return (u >> 1) | 0xFFFFE000;\n else if ((fb & 0xE0) == 0xC0)\n return (u >> 1) | 0xF0000000;\n else\n throw new RangeError();\n}\n\nexport function getCompressedIntSize(firstByte: number): number {\n if ((firstByte & 0xFFFFFF00) != 0)\n throw new RangeError();\n else if ((firstByte & 0x80) == 0)\n return 1;\n else if ((firstByte & 0xC0) == 0x80)\n return 2;\n else if ((firstByte & 0xE0) == 0xC0)\n return 4;\n else\n throw new RangeError();\n}","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\n\r\nexport function generateNavList(pe: PEImage): W.NavData[] {\r\n let navList: W.NavData[] = [generateHeadersNavData(pe)];\r\n\r\n const navMD = generateMDHeadersNavData(pe);\r\n if (navMD) navList.push(navMD);\r\n\r\n return navList;\r\n}\r\n\r\nfunction generateHeadersNavData(pe: PEImage): W.NavData {\r\n const pageID = W.PageID.HEADERS;\r\n\r\n return {\r\n target: { pageID, title: W.KnownTitle.HEADERS },\r\n children: [{\r\n target: { pageID, title: W.KnownTitle.DOS_HEADER, elemID: W.KnownElemID.DOS_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.PE_SIGNATURE, elemID: W.KnownElemID.PE_SIGNATURE }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.FILE_HEADER, elemID: W.KnownElemID.FILE_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.OPTIONAL_HEADER, elemID: W.KnownElemID.OPTIONAL_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.DATA_DIRECTORIES, elemID: W.KnownElemID.DATA_DIRECTORIES }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.SECTION_HEADERS, elemID: W.KnownElemID.SECTION_HEADERS }\r\n }]\r\n };\r\n}\r\n\r\nfunction generateMDHeadersNavData(pe: PEImage): W.NavData | undefined {\r\n const pageID = W.PageID.MD_HEADERS;\r\n\r\n if (!pe.isManaged()) return undefined;\r\n\r\n let children: W.NavData[] = [{\r\n target: { pageID, title: W.KnownTitle.CLI_HEADER, elemID: W.KnownElemID.CLI_HEADER }\r\n }];\r\n\r\n if (pe.hasMetadata()) {\r\n children.push({\r\n target: { pageID, title: W.KnownTitle.MD_ROOT, elemID: W.KnownElemID.MD_ROOT }\r\n });\r\n children.push({\r\n target: { pageID, title: W.KnownTitle.MDS_HEADERS, elemID: W.KnownElemID.MDS_HEADERS }\r\n });\r\n }\r\n\r\n if (pe.hasStrongNameSignature()) {\r\n children.push({\r\n target: { pageID, title: W.KnownTitle.SN_SIG, elemID: W.KnownElemID.SN_SIG }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.Strings)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_STRINGS, title: W.KnownTitle.MDS_STRINGS, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.US)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_US, title: W.KnownTitle.MDS_US, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.GUID)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_GUID, title: W.KnownTitle.MDS_GUID, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.Blob)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_BLOB, title: W.KnownTitle.MDS_BLOB, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.Table)) {\r\n children.push(generateMDTablesNavData(pe));\r\n }\r\n\r\n return {\r\n target: { pageID, title: W.KnownTitle.MD_HEADERS },\r\n children\r\n };\r\n}\r\n\r\nfunction generateMDTablesNavData(pe: PEImage): W.NavData {\r\n const pageID = W.PageID.MDS_TABLE;\r\n const h = pe.getMetadataTableHeader();\r\n\r\n let children: W.NavData[] = [];\r\n const ti = F.MetadataTableIndex;\r\n const buildMdtNav = (t: F.MetadataTableIndex) => ({\r\n target: {\r\n pageID: W.PageID.MDT_TBL,\r\n title: `${ti[t]} (${pe.getMetadataTableRows(t)})`,\r\n subID: ti[t],\r\n pageNum: 0\r\n }\r\n } as W.NavData);\r\n\r\n for (let tid = 0; tid < F.NumberOfMdTables; tid++) {\r\n if (pe.isMetadataTableValid(tid)) {\r\n children.push(buildMdtNav(tid));\r\n }\r\n }\r\n\r\n return {\r\n target: { pageID, title: W.KnownTitle.MDS_TABLE },\r\n children\r\n };\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\nimport * as U from \"../pe/utils\";\r\nimport * as FM from \"./formatter\";\r\nimport * as G from \"./generator\";\r\n\r\nexport function generateMdsStringsPageData(pe: PEImage,\r\n cache: G.GeneratorCache, cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n\r\n checkAndBuildCacheForMdsStrings(pe, cache, cfg);\r\n const items = cache.mdsStrings && cache.mdsStrings.pages[pgNum];\r\n\r\n const titleOf = (i: number) => `#String [${FM.formatHexDec(i)}]`;\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_STRINGS,\r\n title: W.KnownTitle.MDS_STRINGS,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_STRINGS,\r\n groups: [{\r\n title: \"\",\r\n items: items && items.map(index =>\r\n FM.formatStringField(titleOf(index), pe.getMdsStringsItem(index)!)\r\n )\r\n }]\r\n },\r\n paging: {\r\n currentPageNumber: pgNum,\r\n pageNavList: cache.mdsStrings!.pages.map((v, i) => ({\r\n title: `Page [${i + 1}] (${titleOf(v[0])} - ${titleOf(v[v.length - 1])}})`,\r\n pageID: W.PageID.MDS_STRINGS,\r\n pageNum: i\r\n }))\r\n }\r\n };\r\n}\r\n\r\nexport function generateMdsUSPageData(pe: PEImage,\r\n cache: G.GeneratorCache, cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n\r\n checkAndBuildCacheForMdsUS(pe, cache, cfg);\r\n const items = cache.mdsUS && cache.mdsUS.pages[pgNum];\r\n\r\n const titleOf = (i: number) => `#US [${FM.formatHexDec(i)}]`;\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_US,\r\n title: W.KnownTitle.MDS_US,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_US,\r\n groups: items && items.map(index => {\r\n const item = pe.getMdsUSItem(index)!;\r\n return {\r\n title: titleOf(index),\r\n items: [\r\n FM.formatCompressedUIntField(\"Size\", item.Size),\r\n FM.formatStringField(\"Value\", item.Value),\r\n FM.formatBytesField(\"Suffix\", item.Suffix),\r\n ]\r\n }\r\n })\r\n },\r\n paging: {\r\n currentPageNumber: pgNum,\r\n pageNavList: cache.mdsUS!.pages.map((v, i) => ({\r\n title: `Page [${i + 1}] (${titleOf(v[0])} - ${titleOf(v[v.length - 1])}})`,\r\n pageID: W.PageID.MDS_US,\r\n pageNum: i\r\n }))\r\n }\r\n };\r\n}\r\n\r\nexport function generateMdsBlobPageData(pe: PEImage,\r\n cache: G.GeneratorCache, cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n\r\n checkAndBuildCacheForMdsBlob(pe, cache, cfg);\r\n const items = cache.mdsBlob && cache.mdsBlob.pages[pgNum];\r\n\r\n const titleOf = (i: number) => `#Blob [${FM.formatHexDec(i)}]`;\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_BLOB,\r\n title: W.KnownTitle.MDS_BLOB,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_BLOB,\r\n groups: items && items.map(index => {\r\n const item = pe.getMdsBlobItem(index)!;\r\n return {\r\n title: titleOf(index),\r\n items: [\r\n FM.formatCompressedUIntField(\"Size\", item.Size),\r\n FM.formatBytesField(\"Value\", item.Value),\r\n ]\r\n }\r\n })\r\n },\r\n paging: {\r\n currentPageNumber: pgNum,\r\n pageNavList: cache.mdsBlob!.pages.map((v, i) => ({\r\n title: `Page [${i + 1}] (${titleOf(v[0])} - ${titleOf(v[v.length - 1])}})`,\r\n pageID: W.PageID.MDS_BLOB,\r\n pageNum: i\r\n }))\r\n }\r\n };\r\n}\r\n\r\nexport function generateMdsGuidPageData(pe: PEImage): W.PagedItemListPageData {\r\n const titleOf = (i: number) => `#GUID[${FM.formatHexDec(i)}]`;\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_GUID,\r\n title: W.KnownTitle.MDS_GUID,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_GUID,\r\n groups: [{\r\n title: \"\",\r\n items: pe.getMdsGuidItems()!.items.map((v, i) =>\r\n FM.formatGuidField(titleOf(i + 1), v))\r\n }]\r\n },\r\n };\r\n}\r\n\r\nfunction checkAndBuildCacheForMdsStrings(pe: PEImage, cache: G.GeneratorCache, cfg: G.GeneratorConfig): void {\r\n if (cache.mdsStrings) return;\r\n\r\n const mdRoot = pe.getMetadataRoot();\r\n if (!mdRoot) return;\r\n\r\n const sh = pe.getMetadataStreamHeader(F.MetadataStreamName.Strings);\r\n if (!sh) return;\r\n\r\n let indexes: number[] = [0];\r\n const base = mdRoot._offset + sh.Offset.value;\r\n for (let p = 1; p < sh.Size.value; p++) {\r\n if (pe.getU1(base + p - 1) == 0) {\r\n indexes.push(p);\r\n }\r\n }\r\n\r\n cache.mdsStrings = {\r\n pages: putIndexToPages(indexes, cfg.mdsOffsetListPageSize)\r\n };\r\n}\r\n\r\nfunction checkAndBuildCacheForMdsUS(pe: PEImage, cache: G.GeneratorCache, cfg: G.GeneratorConfig): void {\r\n if (cache.mdsUS) return;\r\n\r\n const mdRoot = pe.getMetadataRoot();\r\n if (!mdRoot) return;\r\n\r\n const sh = pe.getMetadataStreamHeader(F.MetadataStreamName.US);\r\n if (!sh) return;\r\n\r\n const indexes = getBlobIndexes(pe, mdRoot._offset + sh.Offset.value, sh.Size.value);\r\n\r\n cache.mdsUS = {\r\n pages: putIndexToPages(indexes, cfg.mdsOffsetListPageSize)\r\n };\r\n}\r\n\r\nfunction checkAndBuildCacheForMdsBlob(pe: PEImage, cache: G.GeneratorCache, cfg: G.GeneratorConfig): void {\r\n if (cache.mdsBlob) return;\r\n\r\n const mdRoot = pe.getMetadataRoot();\r\n if (!mdRoot) return;\r\n\r\n const sh = pe.getMetadataStreamHeader(F.MetadataStreamName.Blob);\r\n if (!sh) return;\r\n\r\n const indexes = getBlobIndexes(pe, mdRoot._offset + sh.Offset.value, sh.Size.value);\r\n\r\n cache.mdsBlob = {\r\n pages: putIndexToPages(indexes, cfg.mdsOffsetListPageSize)\r\n };\r\n}\r\n\r\nfunction getBlobIndexes(pe: PEImage, base: number, size: number): number[] {\r\n let indexes: number[] = [];\r\n let p = 0;\r\n\r\n while (p < size) {\r\n indexes.push(p);\r\n const dtsz = U.getCompressedIntSize(pe.getU1(base + p));\r\n const szval = U.decompressUint(pe.getData(base + p, dtsz));\r\n p += szval + dtsz;\r\n }\r\n\r\n return indexes;\r\n}\r\n\r\nfunction putIndexToPages(indexes: number[], pageSize: number): G.MdsOffsetListPageCache[] {\r\n let pages: G.MdsOffsetListPageCache[] = [];\r\n let pageItems: G.MdsOffsetListPageCache = [];\r\n\r\n for (let pStart = 0, pEnd = 0; pStart < indexes.length; pStart = pEnd) {\r\n while (indexes[pEnd] - indexes[pStart] < pageSize\r\n && pEnd < indexes.length) {\r\n pageItems.push(indexes[pEnd++]);\r\n }\r\n pages.push(pageItems.slice());\r\n pageItems = [];\r\n }\r\n\r\n return pages;\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\nimport * as S from \"../pe/structures\";\r\nimport * as FM from \"./formatter\";\r\nimport * as G from \"./generator\";\r\n\r\nexport function generateMdsTablePageData(pe: PEImage): W.MdsTablePageData {\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_TABLE,\r\n title: W.KnownTitle.MDS_TABLE,\r\n },\r\n tableHeader: generateMDTableHeader(pe),\r\n tableInfo: generateMDTableList(pe),\r\n };\r\n}\r\n\r\nfunction generateMDTableHeader(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.MDT_HEADER,\r\n elemID: W.KnownElemID.MDT_HEADER,\r\n };\r\n\r\n const h = pe.getMetadataTableHeader();\r\n if (!h) return s;\r\n\r\n s.groups = [{\r\n title: \"\",\r\n items: [\r\n FM.formatU4Field(\"Reserved\", h.Reserved),\r\n FM.formatU1Field(\"MajorVersion\", h.MajorVersion, true),\r\n FM.formatU1Field(\"MinorVersion\", h.MinorVersion, true),\r\n FM.formatU1Field(\"HeapSizes\", h.HeapSizes),\r\n FM.formatU1Field(\"Reserved2\", h.Reserved2),\r\n FM.formatU8Field(\"Valid\", h.Valid),\r\n FM.formatU8Field(\"Sorted\", h.Sorted),\r\n ]\r\n }, {\r\n title: \"Rows\",\r\n items: h.Rows.items.map((v, i) => FM.formatU4Field(`Rows[${i}]`, v, true))\r\n }];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateMDTableList(pe: PEImage): W.MdTableInfo[] {\r\n let s: W.MdTableInfo[] = [];\r\n for (let id = 0; id < F.NumberOfMdTables; id++) {\r\n s.push({\r\n index: `${FM.formatU1Hex(id)} (${FM.formatDec(id)})`,\r\n name: F.MetadataTableIndex[id],\r\n valid: pe.isMetadataTableValid(id),\r\n sorted: pe.isMetadataTableSorted(id),\r\n rows: FM.formatDec(pe.getMetadataTableRows(id)),\r\n });\r\n }\r\n return s;\r\n}\r\n\r\nexport function generateMdtPageData(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n const ti = F.MetadataTableIndex;\r\n const title = ti[tid] + \" Table\";\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDT_TBL,\r\n subID: ti[tid],\r\n title,\r\n },\r\n items: generateTalbeItems(pe, tid, cfg, pgNum, title),\r\n paging: generateMdtPaging(pe, tid, cfg, pgNum)\r\n };\r\n}\r\n\r\nfunction generateTalbeItems(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number,\r\n title: string): W.GroupedStruct {\r\n const { start, end } = getRidOnPage(pe, tid, cfg, pgNum);\r\n\r\n let loader: (rid: number) => S.FileData;\r\n let builder: (item: S.FileData) => W.StructItem[];\r\n\r\n switch (tid) {\r\n case F.MetadataTableIndex.Module:\r\n loader = pe.getMdtModuleItem.bind(pe);\r\n builder = generateMdtModuleItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.TypeRef:\r\n loader = pe.getMdtTypeRefItem.bind(pe);\r\n builder = generateMdtTypeRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.TypeDef:\r\n loader = pe.getMdtTypeDefItem.bind(pe);\r\n builder = generateMdtTypeDefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldPtr:\r\n loader = pe.getMdtFieldPtrItem.bind(pe);\r\n builder = generateMdtFieldPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Field:\r\n loader = pe.getMdtFieldItem.bind(pe);\r\n builder = generateMdtFieldItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodPtr:\r\n loader = pe.getMdtMethodPtrItem.bind(pe);\r\n builder = generateMdtMethodPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodDef:\r\n loader = pe.getMdtMethodDefItem.bind(pe);\r\n builder = generateMdtMethodDefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ParamPtr:\r\n loader = pe.getMdtParamPtrItem.bind(pe);\r\n builder = generateMdtParamPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Param:\r\n loader = pe.getMdtParamItem.bind(pe);\r\n builder = generateMdtParamItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.InterfaceImpl:\r\n loader = pe.getMdtInterfaceImplItem.bind(pe);\r\n builder = generateMdtInterfaceImplItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MemberRef:\r\n loader = pe.getMdtMemberRefItem.bind(pe);\r\n builder = generateMdtMemberRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Constant:\r\n loader = pe.getMdtConstantItem.bind(pe);\r\n builder = generateMdtConstantItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.CustomAttribute:\r\n loader = pe.getMdtCustomAttributeItem.bind(pe);\r\n builder = generateMdtCustomAttributeItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldMarshal:\r\n loader = pe.getMdtFieldMarshalItem.bind(pe);\r\n builder = generateMdtFieldMarshalItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.DeclSecurity:\r\n loader = pe.getMdtDeclSecurityItem.bind(pe);\r\n builder = generateMdtDeclSecurityItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ClassLayout:\r\n loader = pe.getMdtClassLayoutItem.bind(pe);\r\n builder = generateMdtClassLayoutItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldLayout:\r\n loader = pe.getMdtFieldLayoutItem.bind(pe);\r\n builder = generateMdtFieldLayoutItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.StandAloneSig:\r\n loader = pe.getMdtStandAloneSigItem.bind(pe);\r\n builder = generateMdtStandAloneSigItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.EventMap:\r\n loader = pe.getMdtEventMapItem.bind(pe);\r\n builder = generateMdtEventMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.EventPtr:\r\n loader = pe.getMdtEventPtrItem.bind(pe);\r\n builder = generateMdtEventPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Event:\r\n loader = pe.getMdtEventItem.bind(pe);\r\n builder = generateMdtEventItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.PropertyMap:\r\n loader = pe.getMdtPropertyMapItem.bind(pe);\r\n builder = generateMdtPropertyMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.PropertyPtr:\r\n loader = pe.getMdtPropertyPtrItem.bind(pe);\r\n builder = generateMdtPropertyPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Property:\r\n loader = pe.getMdtPropertyItem.bind(pe);\r\n builder = generateMdtPropertyItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodSemantics:\r\n loader = pe.getMdtMethodSemanticsItem.bind(pe);\r\n builder = generateMdtMethodSemanticsItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodImpl:\r\n loader = pe.getMdtMethodImplItem.bind(pe);\r\n builder = generateMdtMethodImplItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ModuleRef:\r\n loader = pe.getMdtModuleRefItem.bind(pe);\r\n builder = generateMdtModuleRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.TypeSpec:\r\n loader = pe.getMdtTypeSpecItem.bind(pe);\r\n builder = generateMdtTypeSpecItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ImplMap:\r\n loader = pe.getMdtImplMapItem.bind(pe);\r\n builder = generateMdtImplMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldRVA:\r\n loader = pe.getMdtFieldRVAItem.bind(pe);\r\n builder = generateMdtFieldRVAItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ENCLog:\r\n loader = pe.getMdtENCLogItem.bind(pe);\r\n builder = generateMdtENCLogItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ENCMap:\r\n loader = pe.getMdtENCMapItem.bind(pe);\r\n builder = generateMdtENCMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Assembly:\r\n loader = pe.getMdtAssemblyItem.bind(pe);\r\n builder = generateMdtAssemblyItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyProcessor:\r\n loader = pe.getMdtAssemblyProcessorItem.bind(pe);\r\n builder = generateMdtAssemblyProcessorItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyOS:\r\n loader = pe.getMdtAssemblyOSItem.bind(pe);\r\n builder = generateMdtAssemblyOSItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyRef:\r\n loader = pe.getMdtAssemblyRefItem.bind(pe);\r\n builder = generateMdtAssemblyRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyRefProcessor:\r\n loader = pe.getMdtAssemblyRefProcessorItem.bind(pe);\r\n builder = generateMdtAssemblyRefProcessorItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyRefOS:\r\n loader = pe.getMdtAssemblyRefOSItem.bind(pe);\r\n builder = generateMdtAssemblyRefOSItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.File:\r\n loader = pe.getMdtFileItem.bind(pe);\r\n builder = generateMdtFileItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ExportedType:\r\n loader = pe.getMdtExportedTypeItem.bind(pe);\r\n builder = generateMdtExportedTypeItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ManifestResource:\r\n loader = pe.getMdtManifestResourceItem.bind(pe);\r\n builder = generateMdtManifestResourceItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.NestedClass:\r\n loader = pe.getMdtNestedClassItem.bind(pe);\r\n builder = generateMdtNestedClassItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.GenericParam:\r\n loader = pe.getMdtGenericParamItem.bind(pe);\r\n builder = generateMdtGenericParamItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodSpec:\r\n loader = pe.getMdtMethodSpecItem.bind(pe);\r\n builder = generateMdtMethodSpecItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.GenericParamConstraint:\r\n loader = pe.getMdtGenericParamConstraintItem.bind(pe);\r\n builder = generateMdtGenericParamConstraintItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n default:\r\n return { title };\r\n }\r\n\r\n return generateSignleMdtTableItems(pe, tid, title, start, end, loader, builder);\r\n}\r\n\r\nfunction generateSignleMdtTableItems(\r\n pe: PEImage, tid: F.MetadataTableIndex, title: string, start: number, end: number,\r\n loader: (rid: number) => T,\r\n builder: (item: T) => W.StructItem[]): W.GroupedStruct {\r\n let items: T[] = [];\r\n for (let rid = start; rid <= end; rid++) {\r\n items.push(loader(rid));\r\n }\r\n\r\n return {\r\n title,\r\n groups: items.map((v, i) => ({\r\n title: `${F.MetadataTableIndex[tid]} [${FM.formatHexDec(start + i)}]`,\r\n items: builder(v)\r\n }))\r\n };\r\n}\r\n\r\nfunction generateMdtModuleItems(item: S.MdtModuleItem): W.StructItem[] {\r\n return [\r\n FM.formatU2Field(\"Generation\", item.Generation),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Mvid\", item.Mvid),\r\n FM.formatU4Field(\"EncId\", item.EncId),\r\n FM.formatU4Field(\"EncBaseId\", item.EncBaseId),\r\n ];\r\n}\r\n\r\nfunction generateMdtTypeRefItems(item: S.MdtTypeRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"ResolutionScope\", item.ResolutionScope),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Namespace\", item.Namespace),\r\n ];\r\n}\r\n\r\nfunction generateMdtTypeDefItems(item: S.MdtTypeDefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Namespace\", item.Namespace),\r\n FM.formatU4Field(\"Extends\", item.Extends),\r\n FM.formatU4Field(\"FieldList\", item.FieldList),\r\n FM.formatU4Field(\"MethodList\", item.MethodList),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldPtrItems(item: S.MdtFieldPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Field\", item.Field),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldItems(item: S.MdtFieldItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodPtrItems(item: S.MdtMethodPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Method\", item.Method),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodDefItems(item: S.MdtMethodDefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"RVA\", item.RVA),\r\n FM.formatU4Field(\"ImplFlags\", item.ImplFlags),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n FM.formatU4Field(\"ParamList\", item.ParamList),\r\n ];\r\n}\r\n\r\nfunction generateMdtParamPtrItems(item: S.MdtParamPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Param\", item.Param),\r\n ];\r\n}\r\n\r\nfunction generateMdtParamItems(item: S.MdtParamItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Sequence\", item.Sequence),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n ];\r\n}\r\n\r\nfunction generateMdtInterfaceImplItems(item: S.MdtInterfaceImplItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Class\", item.Class),\r\n FM.formatU4Field(\"Interface\", item.Interface),\r\n ];\r\n}\r\n\r\nfunction generateMdtMemberRefItems(item: S.MdtMemberRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Class\", item.Class),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtConstantItems(item: S.MdtConstantItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Type\", item.Type),\r\n FM.formatU4Field(\"PaddingZero\", item.PaddingZero),\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"Value\", item.Value),\r\n ];\r\n}\r\n\r\nfunction generateMdtCustomAttributeItems(item: S.MdtCustomAttributeItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"Type\", item.Type),\r\n FM.formatU4Field(\"Value\", item.Value),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldMarshalItems(item: S.MdtFieldMarshalItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"NativeType\", item.NativeType),\r\n ];\r\n}\r\n\r\nfunction generateMdtDeclSecurityItems(item: S.MdtDeclSecurityItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Action\", item.Action),\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"PermissionSet\", item.PermissionSet),\r\n ];\r\n}\r\n\r\nfunction generateMdtClassLayoutItems(item: S.MdtClassLayoutItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"PackingSize\", item.PackingSize),\r\n FM.formatU4Field(\"ClassSize\", item.ClassSize),\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldLayoutItems(item: S.MdtFieldLayoutItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"OffSet\", item.OffSet),\r\n FM.formatU4Field(\"Field\", item.Field),\r\n ];\r\n}\r\n\r\nfunction generateMdtStandAloneSigItems(item: S.MdtStandAloneSigItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtEventMapItems(item: S.MdtEventMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"EventList\", item.EventList),\r\n ];\r\n}\r\n\r\nfunction generateMdtEventPtrItems(item: S.MdtEventPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Generation\", item.Event),\r\n ];\r\n}\r\n\r\nfunction generateMdtEventItems(item: S.MdtEventItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"EventFlags\", item.EventFlags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"EventType\", item.EventType),\r\n ];\r\n}\r\n\r\nfunction generateMdtPropertyMapItems(item: S.MdtPropertyMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"PropertyList\", item.PropertyList),\r\n ];\r\n}\r\n\r\nfunction generateMdtPropertyPtrItems(item: S.MdtPropertyPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Property\", item.Property),\r\n ];\r\n}\r\n\r\nfunction generateMdtPropertyItems(item: S.MdtPropertyItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"PropFlags\", item.PropFlags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Type\", item.Type),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodSemanticsItems(item: S.MdtMethodSemanticsItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Semantic\", item.Semantic),\r\n FM.formatU4Field(\"Method\", item.Method),\r\n FM.formatU4Field(\"Association\", item.Association),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodImplItems(item: S.MdtMethodImplItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Class\", item.Class),\r\n FM.formatU4Field(\"MethodBody\", item.MethodBody),\r\n FM.formatU4Field(\"MethodDeclaration\", item.MethodDeclaration),\r\n ];\r\n}\r\n\r\nfunction generateMdtModuleRefItems(item: S.MdtModuleRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Name\", item.Name),\r\n ];\r\n}\r\n\r\nfunction generateMdtTypeSpecItems(item: S.MdtTypeSpecItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtImplMapItems(item: S.MdtImplMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"MappingFlags\", item.MappingFlags),\r\n FM.formatU4Field(\"MemberForwarded\", item.MemberForwarded),\r\n FM.formatU4Field(\"ImportName\", item.ImportName),\r\n FM.formatU4Field(\"ImportScope\", item.ImportScope),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldRVAItems(item: S.MdtFieldRVAItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"RVA\", item.RVA),\r\n FM.formatU4Field(\"Field\", item.Field),\r\n ];\r\n}\r\n\r\nfunction generateMdtENCLogItems(item: S.MdtENCLogItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Token\", item.Token),\r\n FM.formatU4Field(\"FuncCode\", item.FuncCode),\r\n ];\r\n}\r\n\r\nfunction generateMdtENCMapItems(item: S.MdtENCMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Token\", item.Token),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyItems(item: S.MdtAssemblyItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"HashAlgId\", item.HashAlgId),\r\n FM.formatU4Field(\"MajorVersion\", item.MajorVersion),\r\n FM.formatU4Field(\"MinorVersion\", item.MinorVersion),\r\n FM.formatU4Field(\"BuildNumber\", item.BuildNumber),\r\n FM.formatU4Field(\"RevisionNumber\", item.RevisionNumber),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"PublicKey\", item.PublicKey),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Locale\", item.Locale),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyProcessorItems(item: S.MdtAssemblyProcessorItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Processor\", item.Processor),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyOSItems(item: S.MdtAssemblyOSItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"OSPlatformID\", item.OSPlatformID),\r\n FM.formatU4Field(\"OSMajorVersion\", item.OSMajorVersion),\r\n FM.formatU4Field(\"OSMinorVersion\", item.OSMinorVersion),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyRefItems(item: S.MdtAssemblyRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"MajorVersion\", item.MajorVersion),\r\n FM.formatU4Field(\"MinorVersion\", item.MinorVersion),\r\n FM.formatU4Field(\"BuildNumber\", item.BuildNumber),\r\n FM.formatU4Field(\"RevisionNumber\", item.RevisionNumber),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"PublicKeyOrToken\", item.PublicKeyOrToken),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Locale\", item.Locale),\r\n FM.formatU4Field(\"HashValue\", item.HashValue),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyRefProcessorItems(item: S.MdtAssemblyRefProcessorItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Processor\", item.Processor),\r\n FM.formatU4Field(\"AssemblyRef\", item.AssemblyRef),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyRefOSItems(item: S.MdtAssemblyRefOSItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"OSPlatformID\", item.OSPlatformID),\r\n FM.formatU4Field(\"OSMajorVersion\", item.OSMajorVersion),\r\n FM.formatU4Field(\"OSMinorVersion\", item.OSMinorVersion),\r\n FM.formatU4Field(\"AssemblyRef\", item.AssemblyRef),\r\n ];\r\n}\r\n\r\nfunction generateMdtFileItems(item: S.MdtFileItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"HashValue\", item.HashValue),\r\n ];\r\n}\r\n\r\nfunction generateMdtExportedTypeItems(item: S.MdtExportedTypeItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"TypeDefId\", item.TypeDefId),\r\n FM.formatU4Field(\"TypeName\", item.TypeName),\r\n FM.formatU4Field(\"TypeNamespace\", item.TypeNamespace),\r\n FM.formatU4Field(\"Implementation\", item.Implementation),\r\n ];\r\n}\r\n\r\nfunction generateMdtManifestResourceItems(item: S.MdtManifestResourceItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Offset\", item.Offset),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Implementation\", item.Implementation),\r\n ];\r\n}\r\n\r\nfunction generateMdtNestedClassItems(item: S.MdtNestedClassItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"NestedClass\", item.NestedClass),\r\n FM.formatU4Field(\"EnclosingClass\", item.EnclosingClass),\r\n ];\r\n}\r\n\r\nfunction generateMdtGenericParamItems(item: S.MdtGenericParamItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Number\", item.Number),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Owner\", item.Owner),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodSpecItems(item: S.MdtMethodSpecItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Method\", item.Method),\r\n FM.formatU4Field(\"Instantiation\", item.Instantiation),\r\n ];\r\n}\r\n\r\nfunction generateMdtGenericParamConstraintItems(item: S.MdtGenericParamConstraintItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Owner\", item.Owner),\r\n FM.formatU4Field(\"Constraint\", item.Constraint),\r\n ];\r\n}\r\n\r\nfunction generateMdtPaging(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number): W.Paging {\r\n const paging: W.Paging = {\r\n currentPageNumber: pgNum,\r\n pageNavList: []\r\n };\r\n\r\n const psz = cfg.mdtPageSize;\r\n const rows = pe.getMetadataTableRows(tid);\r\n const pages = Math.floor((rows + psz - 1) / psz);\r\n for (let p = 0; p < pages; p++) {\r\n const tblName = F.MetadataTableIndex[tid];\r\n const titleOf = (r: number) => `${tblName}[${FM.formatHexDec(r)}]`;\r\n const { start, end } = getRidOnPage(pe, tid, cfg, p);\r\n const target: W.NavTarget = {\r\n title: `Page[${p + 1}] (${titleOf(start)} - ${titleOf(end)})`,\r\n pageID: W.PageID.MDT_TBL,\r\n subID: tblName,\r\n pageNum: p,\r\n };\r\n paging.pageNavList.push(target);\r\n }\r\n\r\n return paging;\r\n}\r\n\r\nfunction getRidOnPage(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number): { start: number, end: number } {\r\n const psz = cfg.mdtPageSize;\r\n const rows = pe.getMetadataTableRows(tid);\r\n const start = pgNum * psz + 1;\r\n let end = start + psz - 1;\r\n if (end > rows) end = rows;\r\n return { start, end };\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as FM from \"./formatter\";\r\n\r\nexport function generateMetadataHeadersPageData(pe: PEImage): W.MetadataHeadersPageData {\r\n return {\r\n nav: {\r\n pageID: W.PageID.MD_HEADERS,\r\n title: W.KnownTitle.MD_HEADERS,\r\n },\r\n cliHeader: generateCliHeader(pe),\r\n metadataRoot: generateMetadataRoot(pe),\r\n streamHeaders: generateMetadataStreamHeader(pe),\r\n snSignature: generateSNSignature(pe),\r\n };\r\n}\r\n\r\nfunction generateCliHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.CLI_HEADER,\r\n elemID: W.KnownElemID.CLI_HEADER,\r\n };\r\n\r\n const h = pe.getCliHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU4Field(\"cb\", h.cb, true),\r\n FM.formatU2Field(\"MajorRuntimeVersion\", h.MajorRuntimeVersion, true),\r\n FM.formatU2Field(\"MinorRuntimeVersion\", h.MinorRuntimeVersion, true),\r\n FM.formatU4Field(\"MetaData.VirtualAddress\", h.MetaData.VirtualAddress),\r\n FM.formatU4Field(\"MetaData.Size\", h.MetaData.Size, true),\r\n FM.formatU4Field(\"Flags\", h.Flags),\r\n FM.formatU4Field(\"EntryPointToken\", h.EntryPointToken),\r\n FM.formatU4Field(\"Resources.VirtualAddress\", h.Resources.VirtualAddress),\r\n FM.formatU4Field(\"Resources.Size\", h.Resources.Size, true),\r\n FM.formatU4Field(\"StrongNameSignature.VirtualAddress\", h.StrongNameSignature.VirtualAddress),\r\n FM.formatU4Field(\"StrongNameSignature.Size\", h.StrongNameSignature.Size, true),\r\n FM.formatU4Field(\"CodeManagerTable.VirtualAddress\", h.CodeManagerTable.VirtualAddress),\r\n FM.formatU4Field(\"CodeManagerTable.Size\", h.CodeManagerTable.Size, true),\r\n FM.formatU4Field(\"VTableFixups.VirtualAddress\", h.VTableFixups.VirtualAddress),\r\n FM.formatU4Field(\"VTableFixups.Size\", h.VTableFixups.Size, true),\r\n FM.formatU4Field(\"ExportAddressTableJumps.VirtualAddress\", h.ExportAddressTableJumps.VirtualAddress),\r\n FM.formatU4Field(\"ExportAddressTableJumps.Size\", h.ExportAddressTableJumps.Size, true),\r\n FM.formatU4Field(\"ManagedNativeHeader.VirtualAddress\", h.ManagedNativeHeader.VirtualAddress),\r\n FM.formatU4Field(\"ManagedNativeHeader.Size\", h.ManagedNativeHeader.Size, true),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateSNSignature(pe: PEImage): W.SimpleStruct | undefined {\r\n const d = pe.getStrongNameSignature();\r\n if (!d) return undefined;\r\n\r\n const s: W.SimpleStruct = {\r\n title: W.KnownTitle.SN_SIG,\r\n elemID: W.KnownElemID.SN_SIG,\r\n items: [FM.formatBytesField(\"Signature\", d)]\r\n };\r\n return s;\r\n}\r\n\r\nfunction generateMetadataRoot(pe: PEImage): W.SimpleStruct | undefined {\r\n const h = pe.getMetadataRoot();\r\n if (!h) return undefined;\r\n\r\n const s: W.SimpleStruct = {\r\n title: W.KnownTitle.MD_ROOT,\r\n elemID: W.KnownElemID.MD_ROOT,\r\n items: [\r\n FM.formatU4Field(\"Signature\", h.Signature),\r\n FM.formatU2Field(\"MajorVersion\", h.MajorVersion, true),\r\n FM.formatU2Field(\"MinorVersion\", h.MinorVersion, true),\r\n FM.formatU4Field(\"Reserved\", h.Reserved),\r\n FM.formatU4Field(\"VersionLength\", h.VersionLength, true),\r\n FM.formatStringField(\"VersionString\", h.VersionString),\r\n FM.formatBytesField(\"VersionPadding\", h.VersionPadding),\r\n FM.formatU2Field(\"Flags\", h.Flags),\r\n FM.formatU2Field(\"Streams\", h.Streams, true),\r\n ]\r\n };\r\n return s;\r\n}\r\n\r\nfunction generateMetadataStreamHeader(pe: PEImage): W.GroupedStruct | undefined {\r\n const h = pe.getMetadataStreamHeaders();\r\n if (!h) return undefined;\r\n\r\n const s: W.GroupedStruct = {\r\n title: W.KnownTitle.MDS_HEADERS,\r\n elemID: W.KnownElemID.MDS_HEADERS,\r\n groups: h.items.map((v, i) => ({\r\n title: `[${i}] (${v.Name.value})`,\r\n items: [\r\n FM.formatU4Field(\"Offset\", v.Offset),\r\n FM.formatU4Field(\"Size\", v.Size, true),\r\n FM.formatStringField(\"Name\", v.Name),\r\n FM.formatBytesField(\"Padding\", v.Padding),\r\n ]\r\n }))\r\n };\r\n return s;\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as S from \"../pe/structures\";\r\nimport * as F from \"../pe/image-flags\";\r\nimport * as FM from \"./formatter\";\r\n\r\nexport function generateHeadersPageData(pe: PEImage): W.HeadersPageData {\r\n return {\r\n nav: {\r\n pageID: W.PageID.HEADERS,\r\n title: W.KnownTitle.HEADERS,\r\n },\r\n dosHeader: generateDosHeader(pe),\r\n peSignature: generatePESignature(pe),\r\n fileHeader: generateFileHeader(pe),\r\n optionalHeader: generateOptionalHeader(pe),\r\n dataDirectories: generateDataDirectories(pe),\r\n sectionHeaders: generateSectionHeaders(pe),\r\n };\r\n}\r\n\r\nfunction generateDosHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.DOS_HEADER,\r\n elemID: W.KnownElemID.DOS_HEADER,\r\n };\r\n\r\n const h = pe.getDosHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU2Field(\"e_magic\", h.e_magic),\r\n FM.formatU2Field(\"e_cblp\", h.e_cblp),\r\n FM.formatU2Field(\"e_cp\", h.e_cp),\r\n FM.formatU2Field(\"e_crlc\", h.e_crlc),\r\n FM.formatU2Field(\"e_cparhdr\", h.e_cparhdr),\r\n FM.formatU2Field(\"e_minalloc\", h.e_minalloc),\r\n FM.formatU2Field(\"e_maxalloc\", h.e_maxalloc),\r\n FM.formatU2Field(\"e_ss\", h.e_ss),\r\n FM.formatU2Field(\"e_sp\", h.e_sp),\r\n FM.formatU2Field(\"e_csum\", h.e_csum),\r\n FM.formatU2Field(\"e_ip\", h.e_ip),\r\n FM.formatU2Field(\"e_cs\", h.e_cs),\r\n FM.formatU2Field(\"e_lfarlc\", h.e_lfarlc),\r\n FM.formatU2Field(\"e_ovno\", h.e_ovno),\r\n FM.formatBytesField(\"e_res\", h.e_res),\r\n FM.formatU2Field(\"e_oemid\", h.e_oemid),\r\n FM.formatU2Field(\"e_oeminfo\", h.e_oeminfo),\r\n FM.formatBytesField(\"e_res2\", h.e_res2),\r\n FM.formatU4Field(\"e_lfanew\", h.e_lfanew),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generatePESignature(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.PE_SIGNATURE,\r\n elemID: W.KnownElemID.PE_SIGNATURE,\r\n };\r\n\r\n const h = pe.getPESignature();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU4Field(\"PE Signature\", h),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateFileHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.FILE_HEADER,\r\n elemID: W.KnownElemID.FILE_HEADER,\r\n };\r\n\r\n const h = pe.getFileHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU2Field(\"Machine\", h.Machine),\r\n FM.formatU2Field(\"NumberOfSections\", h.NumberOfSections, true),\r\n FM.formatU4Field(\"TimeDateStamp\", h.TimeDateStamp),\r\n FM.formatU4Field(\"PointerToSymbolTable\", h.PointerToSymbolTable),\r\n FM.formatU4Field(\"NumberOfSymbols\", h.NumberOfSymbols, true),\r\n FM.formatU2Field(\"SizeOfOptionalHeader\", h.SizeOfOptionalHeader, true),\r\n FM.formatU2Field(\"Characteristics\", h.Characteristics),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateOptionalHeader(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.OPTIONAL_HEADER,\r\n elemID: W.KnownElemID.OPTIONAL_HEADER,\r\n };\r\n\r\n const h = pe.getOptionalHeader();\r\n if (!h) return s;\r\n\r\n switch (h.Magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC:\r\n s.title += \" (32-bit)\";\r\n fillOptionalHeader32Fields(s, h);\r\n break;\r\n\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC:\r\n s.title += \" (64-bit)\";\r\n fillOptionalHeader64Fields(s, h);\r\n break;\r\n }\r\n\r\n return s;\r\n}\r\n\r\nfunction fillOptionalHeader32Fields(s: W.GroupedStruct, h: S.ImageOptionalHeader32): void {\r\n s.groups = [{\r\n title: \"Standard Fields\",\r\n items: [\r\n FM.formatU2Field(\"Magic\", h.Magic),\r\n FM.formatU1Field(\"MajorLinkerVersion\", h.MajorLinkerVersion, true),\r\n FM.formatU1Field(\"MinorLinkerVersion\", h.MinorLinkerVersion, true),\r\n FM.formatU4Field(\"SizeOfCode\", h.SizeOfCode, true),\r\n FM.formatU4Field(\"SizeOfInitializedData\", h.SizeOfInitializedData, true),\r\n FM.formatU4Field(\"SizeOfUninitializedData\", h.SizeOfUninitializedData, true),\r\n FM.formatU4Field(\"AddressOfEntryPoint\", h.AddressOfEntryPoint),\r\n FM.formatU4Field(\"BaseOfCode\", h.BaseOfCode),\r\n FM.formatU4Field(\"BaseOfData\", h.BaseOfData),\r\n ],\r\n }, {\r\n title: \"NT-specified Fields\",\r\n items: [\r\n FM.formatU4Field(\"ImageBase\", h.ImageBase),\r\n FM.formatU4Field(\"SectionAlignment\", h.SectionAlignment, true),\r\n FM.formatU4Field(\"FileAlignment\", h.FileAlignment, true),\r\n FM.formatU2Field(\"MajorOperatingSystemVersion\", h.MajorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MinorOperatingSystemVersion\", h.MinorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MajorImageVersion\", h.MajorImageVersion, true),\r\n FM.formatU2Field(\"MinorImageVersion\", h.MinorImageVersion, true),\r\n FM.formatU2Field(\"MajorSubsystemVersion\", h.MajorSubsystemVersion, true),\r\n FM.formatU2Field(\"MinorSubsystemVersion\", h.MinorSubsystemVersion, true),\r\n FM.formatU4Field(\"Win32VersionValue\", h.Win32VersionValue, true),\r\n FM.formatU4Field(\"SizeOfImage\", h.SizeOfImage, true),\r\n FM.formatU4Field(\"SizeOfHeaders\", h.SizeOfHeaders, true),\r\n FM.formatU4Field(\"CheckSum\", h.CheckSum),\r\n FM.formatU2Field(\"Subsystem\", h.Subsystem),\r\n FM.formatU2Field(\"DllCharacteristics\", h.DllCharacteristics),\r\n FM.formatU4Field(\"SizeOfStackReserve\", h.SizeOfStackReserve, true),\r\n FM.formatU4Field(\"SizeOfStackCommit\", h.SizeOfStackCommit, true),\r\n FM.formatU4Field(\"SizeOfHeapReserve\", h.SizeOfHeapReserve, true),\r\n FM.formatU4Field(\"SizeOfHeapCommit\", h.SizeOfHeapCommit, true),\r\n FM.formatU4Field(\"LoaderFlags\", h.LoaderFlags),\r\n FM.formatU4Field(\"NumberOfRvaAndSizes\", h.NumberOfRvaAndSizes, true),\r\n ],\r\n }];\r\n}\r\n\r\nfunction fillOptionalHeader64Fields(s: W.GroupedStruct, h: S.ImageOptionalHeader64): void {\r\n s.groups = [{\r\n title: \"Standard Fields\",\r\n items: [\r\n FM.formatU2Field(\"Magic\", h.Magic),\r\n FM.formatU1Field(\"MajorLinkerVersion\", h.MajorLinkerVersion, true),\r\n FM.formatU1Field(\"MinorLinkerVersion\", h.MinorLinkerVersion, true),\r\n FM.formatU4Field(\"SizeOfCode\", h.SizeOfCode, true),\r\n FM.formatU4Field(\"SizeOfInitializedData\", h.SizeOfInitializedData, true),\r\n FM.formatU4Field(\"SizeOfUninitializedData\", h.SizeOfUninitializedData, true),\r\n FM.formatU4Field(\"AddressOfEntryPoint\", h.AddressOfEntryPoint),\r\n FM.formatU4Field(\"BaseOfCode\", h.BaseOfCode),\r\n ],\r\n }, {\r\n title: \"NT-specified Fields\",\r\n items: [\r\n FM.formatU8Field(\"ImageBase\", h.ImageBase),\r\n FM.formatU4Field(\"SectionAlignment\", h.SectionAlignment, true),\r\n FM.formatU4Field(\"FileAlignment\", h.FileAlignment, true),\r\n FM.formatU2Field(\"MajorOperatingSystemVersion\", h.MajorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MinorOperatingSystemVersion\", h.MinorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MajorImageVersion\", h.MajorImageVersion, true),\r\n FM.formatU2Field(\"MinorImageVersion\", h.MinorImageVersion, true),\r\n FM.formatU2Field(\"MajorSubsystemVersion\", h.MajorSubsystemVersion, true),\r\n FM.formatU2Field(\"MinorSubsystemVersion\", h.MinorSubsystemVersion, true),\r\n FM.formatU4Field(\"Win32VersionValue\", h.Win32VersionValue, true),\r\n FM.formatU4Field(\"SizeOfImage\", h.SizeOfImage, true),\r\n FM.formatU4Field(\"SizeOfHeaders\", h.SizeOfHeaders, true),\r\n FM.formatU4Field(\"CheckSum\", h.CheckSum),\r\n FM.formatU2Field(\"Subsystem\", h.Subsystem),\r\n FM.formatU2Field(\"DllCharacteristics\", h.DllCharacteristics),\r\n FM.formatU8Field(\"SizeOfStackReserve\", h.SizeOfStackReserve, true),\r\n FM.formatU8Field(\"SizeOfStackCommit\", h.SizeOfStackCommit, true),\r\n FM.formatU8Field(\"SizeOfHeapReserve\", h.SizeOfHeapReserve, true),\r\n FM.formatU8Field(\"SizeOfHeapCommit\", h.SizeOfHeapCommit, true),\r\n FM.formatU4Field(\"LoaderFlags\", h.LoaderFlags),\r\n FM.formatU4Field(\"NumberOfRvaAndSizes\", h.NumberOfRvaAndSizes, true),\r\n ],\r\n }];\r\n}\r\n\r\nfunction generateDataDirectories(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.DATA_DIRECTORIES,\r\n elemID: W.KnownElemID.DATA_DIRECTORIES,\r\n };\r\n\r\n const h = pe.getDataDirectories();\r\n if (!h) return s;\r\n\r\n s.groups = h.items.map((v, i) => ({\r\n title: `[${i}] ${F.ImageDirectoryEntry[i] || \"\"}`,\r\n items: [\r\n FM.formatU4Field(\"VirtualAddress\", v.VirtualAddress),\r\n FM.formatU4Field(\"Size\", v.Size, true),\r\n ]\r\n } as W.SimpleStruct));\r\n\r\n return s;\r\n}\r\n\r\nfunction generateSectionHeaders(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.SECTION_HEADERS,\r\n elemID: W.KnownElemID.SECTION_HEADERS,\r\n };\r\n\r\n const h = pe.getSectionHeaders();\r\n if (!h) return s;\r\n\r\n s.groups = h.items.map((v, i) => ({\r\n title: `[${i}] (${v.Name.value})`,\r\n items: [\r\n FM.formatStringField(\"Name\", v.Name),\r\n FM.formatU4Field(\"VirtualSize\", v.VirtualSize, true),\r\n FM.formatU4Field(\"VirtualAddress\", v.VirtualAddress),\r\n FM.formatU4Field(\"SizeOfRawData\", v.SizeOfRawData, true),\r\n FM.formatU4Field(\"PointerToRawData\", v.PointerToRawData),\r\n FM.formatU4Field(\"PointerToRelocations\", v.PointerToRelocations),\r\n FM.formatU4Field(\"PointerToLinenumbers\", v.PointerToLinenumbers),\r\n FM.formatU2Field(\"NumberOfRelocations\", v.NumberOfRelocations, true),\r\n FM.formatU2Field(\"NumberOfLinenumbers\", v.NumberOfLinenumbers, true),\r\n FM.formatU4Field(\"Characteristics\", v.Characteristics),\r\n ]\r\n }));\r\n\r\n return s;\r\n}\r\n","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\n\r\nimport { generateHeadersPageData } from \"./headers\";\r\nimport { generateMetadataHeadersPageData } from \"./metadata-headers\";\r\nimport { generateMdsTablePageData, generateMdtPageData } from \"./mds-table\";\r\nimport {\r\n generateMdsStringsPageData,\r\n generateMdsUSPageData,\r\n generateMdsGuidPageData,\r\n generateMdsBlobPageData\r\n} from \"./mds-list\";\r\n\r\nexport function generatePageData(pe: PEImage, pageID: W.PageID, subID?: string, pageNum?: number): W.PageData {\r\n switch (pageID) {\r\n case W.PageID.HEADERS: return generateHeadersPageData(pe);\r\n case W.PageID.MD_HEADERS: return generateMetadataHeadersPageData(pe);\r\n case W.PageID.MDS_TABLE: return generateMdsTablePageData(pe);\r\n case W.PageID.MDS_STRINGS: return generateMdsStringsPageData(pe, cache, cfg, pageNum || 0);\r\n case W.PageID.MDS_US: return generateMdsUSPageData(pe, cache, cfg, pageNum || 0);\r\n case W.PageID.MDS_GUID: return generateMdsGuidPageData(pe);\r\n case W.PageID.MDS_BLOB: return generateMdsBlobPageData(pe, cache, cfg, pageNum || 0);\r\n case W.PageID.MDT_TBL: {\r\n const tid = F.MetadataTableIndex[subID! as any] as any as F.MetadataTableIndex;\r\n return generateMdtPageData(pe, tid, cfg, pageNum || 0);\r\n }\r\n default: return { nav: { pageID: W.PageID.NOTFOUND, title: W.KnownTitle.NOTFOUND } };\r\n }\r\n}\r\n\r\nexport interface GeneratorCache {\r\n mdsStrings?: MdsOffsetListCache;\r\n mdsUS?: MdsOffsetListCache;\r\n mdsBlob?: MdsOffsetListCache;\r\n}\r\n\r\nexport type MdsOffsetListCache = {\r\n pages: MdsOffsetListPageCache[];\r\n}\r\n\r\nexport type MdsOffsetListPageCache = number[];\r\n\r\nexport function clearGeneratorCache(): void {\r\n cache = {};\r\n}\r\n\r\nexport interface GeneratorConfig {\r\n mdsOffsetListPageSize: number; // Total bytes per page.\r\n mdtPageSize: number; // Total items per page.\r\n}\r\n\r\nlet cache: GeneratorCache = {};\r\n\r\nconst cfg: GeneratorConfig = {\r\n mdsOffsetListPageSize: 4000,\r\n mdtPageSize: 100,\r\n}\r\n","export const enum PEErrorType {\r\n INVALID_DATA_POSITION = \"INVALID_DATA_POSITION\",\r\n INVALID_DOS_SIGNATURE = \"INVALID_DOS_SIGNATURE\",\r\n INVALID_PE_SIGNATURE = \"INVALID_PE_SIGNATURE\",\r\n INVALID_OPTIONAL_HEADER_MAGIC = \"INVALID_OPTIONAL_HEADER_MAGIC\",\r\n INVALID_DATA_DIRECTORY_COUNT = \"INVALID_DATA_DIRECTORY_COUNT\",\r\n}\r\n\r\nexport class PEError extends Error {\r\n constructor(\r\n public type: PEErrorType,\r\n public offset?: number,\r\n public size?: number\r\n ) {\r\n super(type);\r\n }\r\n}\r\n","import * as S from \"./structures\";\r\nimport * as F from \"./image-flags\";\r\nimport * as U from \"./utils\";\r\n\r\nexport interface FileDataProvider {\r\n getU1(p: number): number;\r\n getU2(p: number): number;\r\n getU4(p: number): number;\r\n getData(p: number, sz: number): Uint8Array;\r\n}\r\n\r\nexport interface MetadataSizingProvider {\r\n getHeapSize(heap: F.MetadataHeapSizeID): number;\r\n getTableIDSize(t: F.MetadataTableIndex): number;\r\n getCodedTokenSize(t: F.MetadataCodedTokenIndex): number;\r\n}\r\n\r\n//\r\n// Basic structures.\r\n//\r\n\r\nexport function loadU1Field(d: FileDataProvider, p: number): S.U1Field {\r\n return {\r\n _offset: p, _size: 1, data: d.getData(p, 1), value: d.getU1(p)\r\n };\r\n}\r\n\r\nexport function loadU2Field(d: FileDataProvider, p: number): S.U2Field {\r\n return {\r\n _offset: p, _size: 2, data: d.getData(p, 2), value: d.getU2(p)\r\n };\r\n}\r\n\r\nexport function loadU4Field(d: FileDataProvider, p: number): S.U4Field {\r\n return {\r\n _offset: p, _size: 4, data: d.getData(p, 4), value: d.getU4(p)\r\n };\r\n}\r\n\r\nexport function loadU8Field(d: FileDataProvider, p: number): S.U8Field {\r\n const low = d.getU4(p);\r\n const high = d.getU4(p + 4);\r\n\r\n return {\r\n _offset: p, _size: 8, data: d.getData(p, 8), low, high\r\n };\r\n}\r\n\r\nexport function loadCompressedUIntField(d: FileDataProvider, p: number): S.CompressedUIntField {\r\n const sz = U.getCompressedIntSize(d.getU1(p));\r\n const data = new Uint8Array(d.getData(p, sz));\r\n const value = U.decompressUint(data);\r\n\r\n return { _offset: p, _size: sz, data, value };\r\n}\r\n\r\nexport function loadU1EnumField(d: FileDataProvider, p: number): S.U1EnumField {\r\n return {\r\n _offset: p, _size: 1, data: d.getData(p, 1), value: d.getU1(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadU2EnumField(d: FileDataProvider, p: number): S.U2EnumField {\r\n return {\r\n _offset: p, _size: 2, data: d.getData(p, 2), value: d.getU2(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadU4EnumField(d: FileDataProvider, p: number): S.U4EnumField {\r\n return {\r\n _offset: p, _size: 4, data: d.getData(p, 4), value: d.getU4(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadFixedSizeByteArrayField(d: FileDataProvider, p: number, sz: number): S.Field {\r\n return {\r\n _offset: p, _size: sz, data: d.getData(p, sz)\r\n };\r\n}\r\n\r\nexport function loadFixedSizeAsciiStringField(d: FileDataProvider, p: number, sz: number): S.StringField {\r\n const data = d.getData(p, sz);\r\n const value = String.fromCharCode.apply(null, Array.from(data).filter(v => v != 0));\r\n\r\n return {\r\n _offset: p, _size: sz, data, value\r\n };\r\n}\r\n\r\nexport function loadNullTerminatedStringField(d: FileDataProvider, p: number): S.StringField {\r\n let bytes: number[] = [];\r\n let ptr = p;\r\n let b: number;\r\n\r\n do {\r\n b = d.getU1(ptr++);\r\n bytes.push(b);\r\n } while (b != 0);\r\n const str = bytes.slice(0, bytes.length - 1).map(v => `%${v.toString(16)}`).join(\"\");\r\n const value = decodeURIComponent(str);\r\n\r\n return {\r\n _offset: p, _size: ptr - p, data: Uint8Array.from(bytes), value\r\n };\r\n}\r\n\r\nexport function loadFixedSizeUnicodeStringField(d: FileDataProvider, p: number, sz: number): S.StringField {\r\n const data = d.getData(p, sz);\r\n const arr = new Uint16Array(data.buffer);\r\n const value = String.fromCodePoint.apply(null, arr);\r\n\r\n return {\r\n _offset: p, _size: sz, data, value\r\n };\r\n}\r\n\r\nexport function loadStructArrayByCount(\r\n d: FileDataProvider,\r\n p: number,\r\n loader: (d: FileDataProvider, p: number) => T,\r\n count: number): S.StructArray {\r\n\r\n let items: T[] = [];\r\n let ptr = p;\r\n for (let i = 0; i < count; i++) {\r\n const s = loader(d, ptr);\r\n items.push(s);\r\n ptr += s._size;\r\n }\r\n\r\n return { _offset: p, _size: ptr - p, items };\r\n}\r\n\r\n//\r\n// Image headers.\r\n//\r\n\r\nexport function loadImageDosHeader(d: FileDataProvider, p: number): S.ImageDosHeader {\r\n let ptr = p;\r\n\r\n const e_magic = loadU2Field(d, ptr);\r\n ptr += e_magic._size;\r\n\r\n const e_cblp = loadU2Field(d, ptr);\r\n ptr += e_cblp._size;\r\n\r\n const e_cp = loadU2Field(d, ptr);\r\n ptr += e_cp._size;\r\n\r\n const e_crlc = loadU2Field(d, ptr);\r\n ptr += e_crlc._size;\r\n\r\n const e_cparhdr = loadU2Field(d, ptr);\r\n ptr += e_cparhdr._size;\r\n\r\n const e_minalloc = loadU2Field(d, ptr);\r\n ptr += e_minalloc._size;\r\n\r\n const e_maxalloc = loadU2Field(d, ptr);\r\n ptr += e_maxalloc._size;\r\n\r\n const e_ss = loadU2Field(d, ptr);\r\n ptr += e_ss._size;\r\n\r\n const e_sp = loadU2Field(d, ptr);\r\n ptr += e_sp._size;\r\n\r\n const e_csum = loadU2Field(d, ptr);\r\n ptr += e_csum._size;\r\n\r\n const e_ip = loadU2Field(d, ptr);\r\n ptr += e_ip._size;\r\n\r\n const e_cs = loadU2Field(d, ptr);\r\n ptr += e_cs._size;\r\n\r\n const e_lfarlc = loadU2Field(d, ptr);\r\n ptr += e_lfarlc._size;\r\n\r\n const e_ovno = loadU2Field(d, ptr);\r\n ptr += e_ovno._size;\r\n\r\n const e_res = loadFixedSizeByteArrayField(d, ptr, 4 * 2);\r\n ptr += e_res._size;\r\n\r\n const e_oemid = loadU2Field(d, ptr);\r\n ptr += e_oemid._size;\r\n\r\n const e_oeminfo = loadU2Field(d, ptr);\r\n ptr += e_oeminfo._size;\r\n\r\n const e_res2 = loadFixedSizeByteArrayField(d, ptr, 10 * 2);\r\n ptr += e_res2._size;\r\n\r\n const e_lfanew = loadU4Field(d, ptr);\r\n ptr += e_lfanew._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n e_magic,\r\n e_cblp,\r\n e_cp,\r\n e_crlc,\r\n e_cparhdr,\r\n e_minalloc,\r\n e_maxalloc,\r\n e_ss,\r\n e_sp,\r\n e_csum,\r\n e_ip,\r\n e_cs,\r\n e_lfarlc,\r\n e_ovno,\r\n e_res,\r\n e_oemid,\r\n e_oeminfo,\r\n e_res2,\r\n e_lfanew,\r\n };\r\n}\r\n\r\nexport function loadImageFileHeader(d: FileDataProvider, p: number): S.ImageFileHeader {\r\n let ptr = p;\r\n\r\n const Machine = loadU2Field(d, ptr);\r\n ptr += Machine._size;\r\n\r\n const NumberOfSections = loadU2Field(d, ptr);\r\n ptr += NumberOfSections._size;\r\n\r\n const TimeDateStamp = loadU4Field(d, ptr);\r\n ptr += TimeDateStamp._size;\r\n\r\n const PointerToSymbolTable = loadU4Field(d, ptr);\r\n ptr += PointerToSymbolTable._size;\r\n\r\n const NumberOfSymbols = loadU4Field(d, ptr);\r\n ptr += NumberOfSymbols._size;\r\n\r\n const SizeOfOptionalHeader = loadU2Field(d, ptr);\r\n ptr += SizeOfOptionalHeader._size;\r\n\r\n const Characteristics = loadU2EnumField(d, ptr);\r\n ptr += Characteristics._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Machine,\r\n NumberOfSections,\r\n TimeDateStamp,\r\n PointerToSymbolTable,\r\n NumberOfSymbols,\r\n SizeOfOptionalHeader,\r\n Characteristics,\r\n };\r\n}\r\n\r\nexport function loadImageOptionalHeader32(d: FileDataProvider, p: number): S.ImageOptionalHeader32 {\r\n let ptr = p;\r\n\r\n const Magic = loadU2Field(d, ptr);\r\n ptr += Magic._size;\r\n\r\n const MajorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MajorLinkerVersion._size;\r\n\r\n const MinorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MinorLinkerVersion._size;\r\n\r\n const SizeOfCode = loadU4Field(d, ptr);\r\n ptr += SizeOfCode._size;\r\n\r\n const SizeOfInitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfInitializedData._size;\r\n\r\n const SizeOfUninitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfUninitializedData._size;\r\n\r\n const AddressOfEntryPoint = loadU4Field(d, ptr);\r\n ptr += AddressOfEntryPoint._size;\r\n\r\n const BaseOfCode = loadU4Field(d, ptr);\r\n ptr += BaseOfCode._size;\r\n\r\n const BaseOfData = loadU4Field(d, ptr);\r\n ptr += BaseOfData._size;\r\n\r\n const ImageBase = loadU4Field(d, ptr);\r\n ptr += ImageBase._size;\r\n\r\n const SectionAlignment = loadU4Field(d, ptr);\r\n ptr += SectionAlignment._size;\r\n\r\n const FileAlignment = loadU4Field(d, ptr);\r\n ptr += FileAlignment._size;\r\n\r\n const MajorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorOperatingSystemVersion._size;\r\n\r\n const MinorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorOperatingSystemVersion._size;\r\n\r\n const MajorImageVersion = loadU2Field(d, ptr);\r\n ptr += MajorImageVersion._size;\r\n\r\n const MinorImageVersion = loadU2Field(d, ptr);\r\n ptr += MinorImageVersion._size;\r\n\r\n const MajorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorSubsystemVersion._size;\r\n\r\n const MinorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorSubsystemVersion._size;\r\n\r\n const Win32VersionValue = loadU4Field(d, ptr);\r\n ptr += Win32VersionValue._size;\r\n\r\n const SizeOfImage = loadU4Field(d, ptr);\r\n ptr += SizeOfImage._size;\r\n\r\n const SizeOfHeaders = loadU4Field(d, ptr);\r\n ptr += SizeOfHeaders._size;\r\n\r\n const CheckSum = loadU4Field(d, ptr);\r\n ptr += CheckSum._size;\r\n\r\n const Subsystem = loadU2EnumField(d, ptr);\r\n ptr += Subsystem._size;\r\n\r\n const DllCharacteristics = loadU2EnumField(d, ptr);\r\n ptr += DllCharacteristics._size;\r\n\r\n const SizeOfStackReserve = loadU4Field(d, ptr);\r\n ptr += SizeOfStackReserve._size;\r\n\r\n const SizeOfStackCommit = loadU4Field(d, ptr);\r\n ptr += SizeOfStackCommit._size;\r\n\r\n const SizeOfHeapReserve = loadU4Field(d, ptr);\r\n ptr += SizeOfHeapReserve._size;\r\n\r\n const SizeOfHeapCommit = loadU4Field(d, ptr);\r\n ptr += SizeOfHeapCommit._size;\r\n\r\n const LoaderFlags = loadU4Field(d, ptr);\r\n ptr += LoaderFlags._size;\r\n\r\n const NumberOfRvaAndSizes = loadU4Field(d, ptr);\r\n ptr += NumberOfRvaAndSizes._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Magic,\r\n MajorLinkerVersion,\r\n MinorLinkerVersion,\r\n SizeOfCode,\r\n SizeOfInitializedData,\r\n SizeOfUninitializedData,\r\n AddressOfEntryPoint,\r\n BaseOfCode,\r\n BaseOfData,\r\n ImageBase,\r\n SectionAlignment,\r\n FileAlignment,\r\n MajorOperatingSystemVersion,\r\n MinorOperatingSystemVersion,\r\n MajorImageVersion,\r\n MinorImageVersion,\r\n MajorSubsystemVersion,\r\n MinorSubsystemVersion,\r\n Win32VersionValue,\r\n SizeOfImage,\r\n SizeOfHeaders,\r\n CheckSum,\r\n Subsystem,\r\n DllCharacteristics,\r\n SizeOfStackReserve,\r\n SizeOfStackCommit,\r\n SizeOfHeapReserve,\r\n SizeOfHeapCommit,\r\n LoaderFlags,\r\n NumberOfRvaAndSizes,\r\n };\r\n}\r\n\r\nexport function loadImageOptionalHeader64(d: FileDataProvider, p: number): S.ImageOptionalHeader64 {\r\n let ptr = p;\r\n\r\n const Magic = loadU2Field(d, ptr);\r\n ptr += Magic._size;\r\n\r\n const MajorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MajorLinkerVersion._size;\r\n\r\n const MinorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MinorLinkerVersion._size;\r\n\r\n const SizeOfCode = loadU4Field(d, ptr);\r\n ptr += SizeOfCode._size;\r\n\r\n const SizeOfInitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfInitializedData._size;\r\n\r\n const SizeOfUninitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfUninitializedData._size;\r\n\r\n const AddressOfEntryPoint = loadU4Field(d, ptr);\r\n ptr += AddressOfEntryPoint._size;\r\n\r\n const BaseOfCode = loadU4Field(d, ptr);\r\n ptr += BaseOfCode._size;\r\n\r\n const ImageBase = loadU8Field(d, ptr);\r\n ptr += ImageBase._size;\r\n\r\n const SectionAlignment = loadU4Field(d, ptr);\r\n ptr += SectionAlignment._size;\r\n\r\n const FileAlignment = loadU4Field(d, ptr);\r\n ptr += FileAlignment._size;\r\n\r\n const MajorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorOperatingSystemVersion._size;\r\n\r\n const MinorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorOperatingSystemVersion._size;\r\n\r\n const MajorImageVersion = loadU2Field(d, ptr);\r\n ptr += MajorImageVersion._size;\r\n\r\n const MinorImageVersion = loadU2Field(d, ptr);\r\n ptr += MinorImageVersion._size;\r\n\r\n const MajorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorSubsystemVersion._size;\r\n\r\n const MinorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorSubsystemVersion._size;\r\n\r\n const Win32VersionValue = loadU4Field(d, ptr);\r\n ptr += Win32VersionValue._size;\r\n\r\n const SizeOfImage = loadU4Field(d, ptr);\r\n ptr += SizeOfImage._size;\r\n\r\n const SizeOfHeaders = loadU4Field(d, ptr);\r\n ptr += SizeOfHeaders._size;\r\n\r\n const CheckSum = loadU4Field(d, ptr);\r\n ptr += CheckSum._size;\r\n\r\n const Subsystem = loadU2EnumField(d, ptr);\r\n ptr += Subsystem._size;\r\n\r\n const DllCharacteristics = loadU2EnumField(d, ptr);\r\n ptr += DllCharacteristics._size;\r\n\r\n const SizeOfStackReserve = loadU8Field(d, ptr);\r\n ptr += SizeOfStackReserve._size;\r\n\r\n const SizeOfStackCommit = loadU8Field(d, ptr);\r\n ptr += SizeOfStackCommit._size;\r\n\r\n const SizeOfHeapReserve = loadU8Field(d, ptr);\r\n ptr += SizeOfHeapReserve._size;\r\n\r\n const SizeOfHeapCommit = loadU8Field(d, ptr);\r\n ptr += SizeOfHeapCommit._size;\r\n\r\n const LoaderFlags = loadU4Field(d, ptr);\r\n ptr += LoaderFlags._size;\r\n\r\n const NumberOfRvaAndSizes = loadU4Field(d, ptr);\r\n ptr += NumberOfRvaAndSizes._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Magic,\r\n MajorLinkerVersion,\r\n MinorLinkerVersion,\r\n SizeOfCode,\r\n SizeOfInitializedData,\r\n SizeOfUninitializedData,\r\n AddressOfEntryPoint,\r\n BaseOfCode,\r\n ImageBase,\r\n SectionAlignment,\r\n FileAlignment,\r\n MajorOperatingSystemVersion,\r\n MinorOperatingSystemVersion,\r\n MajorImageVersion,\r\n MinorImageVersion,\r\n MajorSubsystemVersion,\r\n MinorSubsystemVersion,\r\n Win32VersionValue,\r\n SizeOfImage,\r\n SizeOfHeaders,\r\n CheckSum,\r\n Subsystem,\r\n DllCharacteristics,\r\n SizeOfStackReserve,\r\n SizeOfStackCommit,\r\n SizeOfHeapReserve,\r\n SizeOfHeapCommit,\r\n LoaderFlags,\r\n NumberOfRvaAndSizes,\r\n };\r\n}\r\n\r\nexport function loadImageDataDirectory(d: FileDataProvider, p: number): S.ImageDataDirectory {\r\n let ptr = p;\r\n\r\n const VirtualAddress = loadU4Field(d, ptr);\r\n ptr += VirtualAddress._size;\r\n\r\n const Size = loadU4Field(d, ptr);\r\n ptr += Size._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n VirtualAddress,\r\n Size,\r\n };\r\n}\r\n\r\nexport function loadImageSectionHeader(d: FileDataProvider, p: number): S.ImageSectionHeader {\r\n let ptr = p;\r\n\r\n const Name = loadFixedSizeAsciiStringField(d, ptr, 8);\r\n ptr += Name._size;\r\n\r\n const VirtualSize = loadU4Field(d, ptr);\r\n ptr += VirtualSize._size;\r\n\r\n const VirtualAddress = loadU4Field(d, ptr);\r\n ptr += VirtualAddress._size;\r\n\r\n const SizeOfRawData = loadU4Field(d, ptr);\r\n ptr += SizeOfRawData._size;\r\n\r\n const PointerToRawData = loadU4Field(d, ptr);\r\n ptr += PointerToRawData._size;\r\n\r\n const PointerToRelocations = loadU4Field(d, ptr);\r\n ptr += PointerToRelocations._size;\r\n\r\n const PointerToLinenumbers = loadU4Field(d, ptr);\r\n ptr += PointerToLinenumbers._size;\r\n\r\n const NumberOfRelocations = loadU2Field(d, ptr);\r\n ptr += NumberOfRelocations._size;\r\n\r\n const NumberOfLinenumbers = loadU2Field(d, ptr);\r\n ptr += NumberOfLinenumbers._size;\r\n\r\n const Characteristics = loadU4EnumField(d, ptr);\r\n ptr += Characteristics._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Name,\r\n VirtualSize,\r\n VirtualAddress,\r\n SizeOfRawData,\r\n PointerToRawData,\r\n PointerToRelocations,\r\n PointerToLinenumbers,\r\n NumberOfRelocations,\r\n NumberOfLinenumbers,\r\n Characteristics,\r\n };\r\n}\r\n\r\n//\r\n// Metadata structures.\r\n//\r\n\r\nexport function loadCliHeader(d: FileDataProvider, p: number): S.CliHeader {\r\n let ptr = p;\r\n\r\n const cb = loadU4Field(d, ptr);\r\n ptr += cb._size;\r\n\r\n const MajorRuntimeVersion = loadU2Field(d, ptr);\r\n ptr += MajorRuntimeVersion._size;\r\n\r\n const MinorRuntimeVersion = loadU2Field(d, ptr);\r\n ptr += MinorRuntimeVersion._size;\r\n\r\n const MetaData = loadImageDataDirectory(d, ptr);\r\n ptr += MetaData._size;\r\n\r\n const Flags = loadU4Field(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const EntryPointToken = loadU4Field(d, ptr);\r\n ptr += EntryPointToken._size;\r\n\r\n const Resources = loadImageDataDirectory(d, ptr);\r\n ptr += Resources._size;\r\n\r\n const StrongNameSignature = loadImageDataDirectory(d, ptr);\r\n ptr += StrongNameSignature._size;\r\n\r\n const CodeManagerTable = loadImageDataDirectory(d, ptr);\r\n ptr += CodeManagerTable._size;\r\n\r\n const VTableFixups = loadImageDataDirectory(d, ptr);\r\n ptr += VTableFixups._size;\r\n\r\n const ExportAddressTableJumps = loadImageDataDirectory(d, ptr);\r\n ptr += ExportAddressTableJumps._size;\r\n\r\n const ManagedNativeHeader = loadImageDataDirectory(d, ptr);\r\n ptr += ManagedNativeHeader._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n cb,\r\n MajorRuntimeVersion,\r\n MinorRuntimeVersion,\r\n MetaData,\r\n Flags,\r\n EntryPointToken,\r\n Resources,\r\n StrongNameSignature,\r\n CodeManagerTable,\r\n VTableFixups,\r\n ExportAddressTableJumps,\r\n ManagedNativeHeader,\r\n };\r\n}\r\n\r\nexport function loadMetadataRoot(d: FileDataProvider, p: number): S.MetadataRoot {\r\n let ptr = p;\r\n\r\n const Signature = loadU4Field(d, ptr);\r\n ptr += Signature._size;\r\n\r\n const MajorVersion = loadU2Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU2Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const Reserved = loadU4Field(d, ptr);\r\n ptr += Reserved._size;\r\n\r\n const VersionLength = loadU4Field(d, ptr);\r\n ptr += VersionLength._size;\r\n\r\n const VersionString = loadNullTerminatedStringField(d, ptr);\r\n ptr += VersionString._size;\r\n\r\n const paddingSize = U.calculatePadding(VersionString._size);\r\n const VersionPadding = loadFixedSizeByteArrayField(d, ptr, paddingSize);\r\n ptr += VersionPadding._size;\r\n\r\n const Flags = loadU2Field(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Streams = loadU2Field(d, ptr);\r\n ptr += Streams._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Signature,\r\n MajorVersion,\r\n MinorVersion,\r\n Reserved,\r\n VersionLength,\r\n VersionString,\r\n VersionPadding,\r\n Flags,\r\n Streams,\r\n };\r\n}\r\n\r\nexport function loadMetadataStreamHeader(d: FileDataProvider, p: number): S.MetadataStreamHeader {\r\n let ptr = p;\r\n\r\n const Offset = loadU4Field(d, ptr);\r\n ptr += Offset._size;\r\n\r\n const Size = loadU4Field(d, ptr);\r\n ptr += Size._size;\r\n\r\n const Name = loadNullTerminatedStringField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const paddingSize = U.calculatePadding(Name._size);\r\n const Padding = loadFixedSizeByteArrayField(d, ptr, paddingSize);\r\n ptr += Padding._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Offset,\r\n Size,\r\n Name,\r\n Padding,\r\n };\r\n}\r\n\r\nexport function loadMetadataTableHeader(d: FileDataProvider, p: number): S.MetadataTableHeader {\r\n let ptr = p;\r\n\r\n const Reserved = loadU4Field(d, ptr);\r\n ptr += Reserved._size;\r\n\r\n const MajorVersion = loadU1Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU1Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const HeapSizes = loadU1Field(d, ptr);\r\n ptr += HeapSizes._size;\r\n\r\n const Reserved2 = loadU1Field(d, ptr);\r\n ptr += Reserved2._size;\r\n\r\n const Valid = loadU8Field(d, ptr);\r\n ptr += Valid._size;\r\n\r\n const Sorted = loadU8Field(d, ptr);\r\n ptr += Sorted._size;\r\n\r\n const tables = U.count1(Valid.high) + U.count1(Valid.low);\r\n const Rows = loadStructArrayByCount(d, ptr, loadU4Field, tables);\r\n ptr += Rows._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Reserved,\r\n MajorVersion,\r\n MinorVersion,\r\n HeapSizes,\r\n Reserved2,\r\n Valid,\r\n Sorted,\r\n Rows,\r\n };\r\n}\r\n\r\nexport function loadMetadataUSItem(d: FileDataProvider, p: number): S.MetadataUSItem {\r\n let ptr = p;\r\n\r\n const Size = loadCompressedUIntField(d, ptr);\r\n ptr += Size._size;\r\n\r\n const sz = Size.value;\r\n const strSize = sz > 0 ? sz - 1 : 0;\r\n const suffixSize = sz > 0 ? 1 : 0;\r\n\r\n const Value = loadFixedSizeUnicodeStringField(d, ptr, strSize);\r\n ptr += Value._size;\r\n\r\n const Suffix = loadFixedSizeByteArrayField(d, ptr, suffixSize);\r\n ptr += Suffix._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Size,\r\n Value,\r\n Suffix,\r\n };\r\n}\r\n\r\nexport function loadMetadataBlobItem(d: FileDataProvider, p: number): S.MetadataBlobItem {\r\n let ptr = p;\r\n\r\n const Size = loadCompressedUIntField(d, ptr);\r\n ptr += Size._size;\r\n\r\n const Value = loadFixedSizeByteArrayField(d, ptr, Size.value);\r\n ptr += Value._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Size,\r\n Value,\r\n };\r\n}\r\n\r\nexport function loadMdsStringsField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n p: number): S.MdsStringsField {\r\n\r\n return d.getHeapSize(F.MetadataHeapSizeID.String) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdsGuidField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n p: number): S.MdsGuidField {\r\n\r\n return d.getHeapSize(F.MetadataHeapSizeID.GUID) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdsBlobField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n p: number): S.MdsBlobField {\r\n\r\n return d.getHeapSize(F.MetadataHeapSizeID.Blob) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdtRidField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n t: F.MetadataTableIndex, p: number): S.MdtRidField {\r\n\r\n return d.getTableIDSize(t) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdCodedTokenField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n t: F.MetadataCodedTokenIndex, p: number): S.MdCodedTokenField {\r\n\r\n const baseField = d.getCodedTokenSize(t) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n const codedTokenInfo = decodeCodedToken(baseField.value, t);\r\n\r\n return {\r\n ...baseField, ...codedTokenInfo\r\n };\r\n}\r\n\r\nexport function loadMdTokenField(d: FileDataProvider, p: number): S.MdTokenField {\r\n const baseField = loadU4Field(d, p);\r\n const tid: F.MetadataTableIndex = (baseField.value & 0xFF000000) >> 24;\r\n const rid = baseField.value & 0x00FFFFFF;\r\n return {\r\n ...baseField, tid, rid\r\n };\r\n}\r\n\r\nexport function decodeCodedToken(token: number, t: F.MetadataCodedTokenIndex): { tid: F.MetadataTableIndex, rid: number } {\r\n const cti = F.ctc[t];\r\n const tid = cti.tables[token & ((1 << cti.tagSize) - 1)];\r\n const rid = token >> cti.tagSize;\r\n return { tid, rid };\r\n}\r\n\r\n//\r\n// Metadata tables.\r\n//\r\n\r\nexport function loadMdtModule(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtModuleItem {\r\n let ptr = p;\r\n\r\n const Generation = loadU2Field(d, ptr);\r\n ptr += Generation._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Mvid = loadMdsGuidField(d, ptr);\r\n ptr += Mvid._size;\r\n\r\n const EncId = loadMdsGuidField(d, ptr);\r\n ptr += EncId._size;\r\n\r\n const EncBaseId = loadMdsGuidField(d, ptr);\r\n ptr += EncBaseId._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Generation,\r\n Name,\r\n Mvid,\r\n EncId,\r\n EncBaseId,\r\n };\r\n}\r\n\r\nexport function loadMdtTypeRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtTypeRefItem {\r\n let ptr = p;\r\n\r\n const ResolutionScope = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.ResolutionScope, ptr);\r\n ptr += ResolutionScope._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Namespace = loadMdsStringsField(d, ptr);\r\n ptr += Namespace._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n ResolutionScope,\r\n Name,\r\n Namespace,\r\n };\r\n}\r\n\r\nexport function loadMdtTypeDef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtTypeDefItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Namespace = loadMdsStringsField(d, ptr);\r\n ptr += Namespace._size;\r\n\r\n const Extends = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += Extends._size;\r\n\r\n const FieldList = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += FieldList._size;\r\n\r\n const MethodList = loadMdtRidField(d, F.MetadataTableIndex.MethodDef, ptr);\r\n ptr += MethodList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Name,\r\n Namespace,\r\n Extends,\r\n FieldList,\r\n MethodList,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldPtrItem {\r\n let ptr = p;\r\n\r\n const Field = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += Field._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Field,\r\n };\r\n}\r\n\r\nexport function loadMdtField(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Name,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodPtrItem {\r\n let ptr = p;\r\n\r\n const Method = loadMdtRidField(d, F.MetadataTableIndex.MethodDef, ptr);\r\n ptr += Method._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Method,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodDef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodDefItem {\r\n let ptr = p;\r\n\r\n const RVA = loadU4Field(d, ptr);\r\n ptr += RVA._size;\r\n\r\n const ImplFlags = loadU2EnumField(d, ptr);\r\n ptr += ImplFlags._size;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n const ParamList = loadMdtRidField(d, F.MetadataTableIndex.Param, ptr);\r\n ptr += ParamList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n RVA,\r\n ImplFlags,\r\n Flags,\r\n Name,\r\n Signature,\r\n ParamList,\r\n };\r\n}\r\n\r\nexport function loadMdtParamPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtParamPtrItem {\r\n let ptr = p;\r\n\r\n const Param = loadMdtRidField(d, F.MetadataTableIndex.Param, ptr);\r\n ptr += Param._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Param,\r\n };\r\n}\r\n\r\nexport function loadMdtParam(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtParamItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Sequence = loadU2Field(d, ptr);\r\n ptr += Sequence._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Sequence,\r\n Name,\r\n };\r\n}\r\n\r\nexport function loadMdtInterfaceImpl(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtInterfaceImplItem {\r\n let ptr = p;\r\n\r\n const Class = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Class._size;\r\n\r\n const Interface = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += Interface._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Class,\r\n Interface,\r\n };\r\n}\r\n\r\nexport function loadMdtMemberRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMemberRefItem {\r\n let ptr = p;\r\n\r\n const Class = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MemberRefParent, ptr);\r\n ptr += Class._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Class,\r\n Name,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtConstant(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtConstantItem {\r\n let ptr = p;\r\n\r\n const Type = loadU1EnumField(d, ptr);\r\n ptr += Type._size;\r\n\r\n const PaddingZero = loadU1Field(d, ptr);\r\n ptr += PaddingZero._size;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasConstant, ptr);\r\n ptr += Parent._size;\r\n\r\n const Value = loadMdsBlobField(d, ptr);\r\n ptr += Value._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Type,\r\n PaddingZero,\r\n Parent,\r\n Value,\r\n };\r\n}\r\n\r\nexport function loadMdtCustomAttribute(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtCustomAttributeItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasCustomAttribute, ptr);\r\n ptr += Parent._size;\r\n\r\n const Type = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.CustomAttributeType, ptr);\r\n ptr += Type._size;\r\n\r\n const Value = loadMdsBlobField(d, ptr);\r\n ptr += Value._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n Type,\r\n Value,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldMarshal(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldMarshalItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasFieldMarshall, ptr);\r\n ptr += Parent._size;\r\n\r\n const NativeType = loadMdsBlobField(d, ptr);\r\n ptr += NativeType._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n NativeType,\r\n };\r\n}\r\n\r\nexport function loadMdtDeclSecurity(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtDeclSecurityItem {\r\n let ptr = p;\r\n\r\n const Action = loadU2EnumField(d, ptr);\r\n ptr += Action._size;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasDeclSecurity, ptr);\r\n ptr += Parent._size;\r\n\r\n const PermissionSet = loadMdsBlobField(d, ptr);\r\n ptr += PermissionSet._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Action,\r\n Parent,\r\n PermissionSet,\r\n };\r\n}\r\n\r\nexport function loadMdtClassLayout(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtClassLayoutItem {\r\n let ptr = p;\r\n\r\n const PackingSize = loadU2Field(d, ptr);\r\n ptr += PackingSize._size;\r\n\r\n const ClassSize = loadU4Field(d, ptr);\r\n ptr += ClassSize._size;\r\n\r\n const Parent = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Parent._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n PackingSize,\r\n ClassSize,\r\n Parent,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldLayout(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldLayoutItem {\r\n let ptr = p;\r\n\r\n const OffSet = loadU4Field(d, ptr);\r\n ptr += OffSet._size;\r\n\r\n const Field = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += Field._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n OffSet,\r\n Field,\r\n };\r\n}\r\n\r\nexport function loadMdtStandAloneSig(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtStandAloneSigItem {\r\n let ptr = p;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtEventMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtEventMapItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Parent._size;\r\n\r\n const EventList = loadMdtRidField(d, F.MetadataTableIndex.Event, ptr);\r\n ptr += EventList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n EventList,\r\n };\r\n}\r\n\r\nexport function loadMdtEventPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtEventPtrItem {\r\n let ptr = p;\r\n\r\n const Event = loadMdtRidField(d, F.MetadataTableIndex.Event, ptr);\r\n ptr += Event._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Event,\r\n };\r\n}\r\n\r\nexport function loadMdtEvent(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtEventItem {\r\n let ptr = p;\r\n\r\n const EventFlags = loadU2EnumField(d, ptr);\r\n ptr += EventFlags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const EventType = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += EventType._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n EventFlags,\r\n Name,\r\n EventType,\r\n };\r\n}\r\n\r\nexport function loadMdtPropertyMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtPropertyMapItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Parent._size;\r\n\r\n const PropertyList = loadMdtRidField(d, F.MetadataTableIndex.Property, ptr);\r\n ptr += PropertyList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n PropertyList,\r\n };\r\n}\r\n\r\nexport function loadMdtPropertyPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtPropertyPtrItem {\r\n let ptr = p;\r\n\r\n const Property = loadMdtRidField(d, F.MetadataTableIndex.Property, ptr);\r\n ptr += Property._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Property,\r\n };\r\n}\r\n\r\nexport function loadMdtProperty(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtPropertyItem {\r\n let ptr = p;\r\n\r\n const PropFlags = loadU2EnumField(d, ptr);\r\n ptr += PropFlags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Type = loadMdsBlobField(d, ptr);\r\n ptr += Type._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n PropFlags,\r\n Name,\r\n Type,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodSemantics(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodSemanticsItem {\r\n let ptr = p;\r\n\r\n const Semantic = loadU2EnumField(d, ptr);\r\n ptr += Semantic._size;\r\n\r\n const Method = loadMdtRidField(d, F.MetadataTableIndex.MethodDef, ptr);\r\n ptr += Method._size;\r\n\r\n const Association = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasSemantics, ptr);\r\n ptr += Association._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Semantic,\r\n Method,\r\n Association,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodImpl(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodImplItem {\r\n let ptr = p;\r\n\r\n const Class = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Class._size;\r\n\r\n const MethodBody = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MethodDefOrRef, ptr);\r\n ptr += MethodBody._size;\r\n\r\n const MethodDeclaration = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MethodDefOrRef, ptr);\r\n ptr += MethodDeclaration._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Class,\r\n MethodBody,\r\n MethodDeclaration,\r\n };\r\n}\r\n\r\nexport function loadMdtModuleRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtModuleRefItem {\r\n let ptr = p;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Name,\r\n };\r\n}\r\n\r\nexport function loadMdtTypeSpec(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtTypeSpecItem {\r\n let ptr = p;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtImplMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtImplMapItem {\r\n let ptr = p;\r\n\r\n const MappingFlags = loadU2EnumField(d, ptr);\r\n ptr += MappingFlags._size;\r\n\r\n const MemberForwarded = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MemberForwarded, ptr);\r\n ptr += MemberForwarded._size;\r\n\r\n const ImportName = loadMdsStringsField(d, ptr);\r\n ptr += ImportName._size;\r\n\r\n const ImportScope = loadMdtRidField(d, F.MetadataTableIndex.ModuleRef, ptr);\r\n ptr += ImportScope._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n MappingFlags,\r\n MemberForwarded,\r\n ImportName,\r\n ImportScope,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldRVA(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldRVAItem {\r\n let ptr = p;\r\n\r\n const RVA = loadU4Field(d, ptr);\r\n ptr += RVA._size;\r\n\r\n const Field = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += Field._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n RVA,\r\n Field,\r\n };\r\n}\r\n\r\nexport function loadMdtENCLog(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtENCLogItem {\r\n let ptr = p;\r\n\r\n const Token = loadU4Field(d, ptr);\r\n ptr += Token._size;\r\n\r\n const FuncCode = loadU4Field(d, ptr);\r\n ptr += FuncCode._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Token,\r\n FuncCode,\r\n };\r\n}\r\n\r\nexport function loadMdtENCMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtENCMapItem {\r\n let ptr = p;\r\n\r\n const Token = loadU4Field(d, ptr);\r\n ptr += Token._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Token,\r\n };\r\n}\r\n\r\nexport function loadMdtAssembly(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyItem {\r\n let ptr = p;\r\n\r\n const HashAlgId = loadU4EnumField(d, ptr);\r\n ptr += HashAlgId._size;\r\n\r\n const MajorVersion = loadU2Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU2Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const BuildNumber = loadU2Field(d, ptr);\r\n ptr += BuildNumber._size;\r\n\r\n const RevisionNumber = loadU2Field(d, ptr);\r\n ptr += RevisionNumber._size;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const PublicKey = loadMdsBlobField(d, ptr);\r\n ptr += PublicKey._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Locale = loadMdsStringsField(d, ptr);\r\n ptr += Locale._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n HashAlgId,\r\n MajorVersion,\r\n MinorVersion,\r\n BuildNumber,\r\n RevisionNumber,\r\n Flags,\r\n PublicKey,\r\n Name,\r\n Locale,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyProcessor(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyProcessorItem {\r\n let ptr = p;\r\n\r\n const Processor = loadU4Field(d, ptr);\r\n ptr += Processor._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Processor,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyOS(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyOSItem {\r\n let ptr = p;\r\n\r\n const OSPlatformID = loadU4Field(d, ptr);\r\n ptr += OSPlatformID._size;\r\n\r\n const OSMajorVersion = loadU4Field(d, ptr);\r\n ptr += OSMajorVersion._size;\r\n\r\n const OSMinorVersion = loadU4Field(d, ptr);\r\n ptr += OSMinorVersion._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n OSPlatformID,\r\n OSMajorVersion,\r\n OSMinorVersion,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyRefItem {\r\n let ptr = p;\r\n\r\n const MajorVersion = loadU2Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU2Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const BuildNumber = loadU2Field(d, ptr);\r\n ptr += BuildNumber._size;\r\n\r\n const RevisionNumber = loadU2Field(d, ptr);\r\n ptr += RevisionNumber._size;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const PublicKeyOrToken = loadMdsBlobField(d, ptr);\r\n ptr += PublicKeyOrToken._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Locale = loadMdsStringsField(d, ptr);\r\n ptr += Locale._size;\r\n\r\n const HashValue = loadMdsBlobField(d, ptr);\r\n ptr += HashValue._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n MajorVersion,\r\n MinorVersion,\r\n BuildNumber,\r\n RevisionNumber,\r\n Flags,\r\n PublicKeyOrToken,\r\n Name,\r\n Locale,\r\n HashValue,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyRefProcessor(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyRefProcessorItem {\r\n let ptr = p;\r\n\r\n const Processor = loadU4Field(d, ptr);\r\n ptr += Processor._size;\r\n\r\n const AssemblyRef = loadMdtRidField(d, F.MetadataTableIndex.AssemblyRef, ptr);\r\n ptr += AssemblyRef._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Processor,\r\n AssemblyRef,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyRefOS(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyRefOSItem {\r\n let ptr = p;\r\n\r\n const OSPlatformID = loadU4Field(d, ptr);\r\n ptr += OSPlatformID._size;\r\n\r\n const OSMajorVersion = loadU4Field(d, ptr);\r\n ptr += OSMajorVersion._size;\r\n\r\n const OSMinorVersion = loadU4Field(d, ptr);\r\n ptr += OSMinorVersion._size;\r\n\r\n const AssemblyRef = loadMdtRidField(d, F.MetadataTableIndex.AssemblyRef, ptr);\r\n ptr += AssemblyRef._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n OSPlatformID,\r\n OSMajorVersion,\r\n OSMinorVersion,\r\n AssemblyRef,\r\n };\r\n}\r\n\r\nexport function loadMdtFile(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFileItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const HashValue = loadMdsBlobField(d, ptr);\r\n ptr += HashValue._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Name,\r\n HashValue,\r\n };\r\n}\r\n\r\nexport function loadMdtExportedType(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtExportedTypeItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const TypeDefId = loadU4Field(d, ptr);\r\n ptr += TypeDefId._size;\r\n\r\n const TypeName = loadMdsStringsField(d, ptr);\r\n ptr += TypeName._size;\r\n\r\n const TypeNamespace = loadMdsStringsField(d, ptr);\r\n ptr += TypeNamespace._size;\r\n\r\n const Implementation = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.Implementation, ptr);\r\n ptr += Implementation._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n TypeDefId,\r\n TypeName,\r\n TypeNamespace,\r\n Implementation,\r\n };\r\n}\r\n\r\nexport function loadMdtManifestResource(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtManifestResourceItem {\r\n let ptr = p;\r\n\r\n const Offset = loadU4Field(d, ptr);\r\n ptr += Offset._size;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Implementation = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.Implementation, ptr);\r\n ptr += Implementation._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Offset,\r\n Flags,\r\n Name,\r\n Implementation,\r\n };\r\n}\r\n\r\nexport function loadMdtNestedClass(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtNestedClassItem {\r\n let ptr = p;\r\n\r\n const NestedClass = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += NestedClass._size;\r\n\r\n const EnclosingClass = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += EnclosingClass._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n NestedClass,\r\n EnclosingClass,\r\n };\r\n}\r\n\r\nexport function loadMdtGenericParam(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtGenericParamItem {\r\n let ptr = p;\r\n\r\n const Number = loadU2Field(d, ptr);\r\n ptr += Number._size;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Owner = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeOrMethodDef, ptr);\r\n ptr += Owner._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Number,\r\n Flags,\r\n Owner,\r\n Name,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodSpec(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodSpecItem {\r\n let ptr = p;\r\n\r\n const Method = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MethodDefOrRef, ptr);\r\n ptr += Method._size;\r\n\r\n const Instantiation = loadMdsBlobField(d, ptr);\r\n ptr += Instantiation._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Method,\r\n Instantiation,\r\n };\r\n}\r\n\r\nexport function loadMdtGenericParamConstraint(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtGenericParamConstraintItem {\r\n let ptr = p;\r\n\r\n const Owner = loadMdtRidField(d, F.MetadataTableIndex.GenericParam, ptr);\r\n ptr += Owner._size;\r\n\r\n const Constraint = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += Constraint._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Owner,\r\n Constraint,\r\n };\r\n}\r\n","import * as S from \"./structures\";\r\nimport * as A from \"./aux-structures\";\r\nimport * as L from \"./loader\";\r\nimport * as F from \"./image-flags\";\r\nimport * as E from \"./error\";\r\nimport * as U from \"./utils\";\r\n\r\nexport class PEImage implements L.FileDataProvider, L.MetadataSizingProvider {\r\n public static load(buf: ArrayBuffer): PEImage {\r\n return new PEImage(buf);\r\n }\r\n\r\n //\r\n // FileDataProvider functions.\r\n //\r\n\r\n public getU1(p: number): number {\r\n this.check(p, 1);\r\n return this.data.getUint8(p);\r\n }\r\n\r\n public getU2(p: number): number {\r\n this.check(p, 2);\r\n return this.data.getUint16(p, true);\r\n }\r\n\r\n public getU4(p: number): number {\r\n this.check(p, 3);\r\n return this.data.getUint32(p, true);\r\n }\r\n\r\n public getData(p: number, sz: number): Uint8Array {\r\n this.check(p, sz);\r\n return new Uint8Array(this.data.buffer.slice(p, p + sz));\r\n }\r\n\r\n //\r\n // Image attributes.\r\n //\r\n\r\n public is32Bit(): boolean | undefined {\r\n const optHdr = this.getOptionalHeader();\r\n if (optHdr == null) {\r\n return undefined;\r\n }\r\n\r\n switch (optHdr.Magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC: return true;\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC: return false;\r\n default: return undefined;\r\n }\r\n }\r\n\r\n public isManaged(): boolean {\r\n const dd = this.getDataDirectories();\r\n return dd != null && this.isDataDirectoryValid(\r\n dd.items[F.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR]\r\n );\r\n }\r\n\r\n public hasMetadata(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.MetaData);\r\n }\r\n\r\n public hasManagedResources(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.Resources);\r\n }\r\n\r\n public hasStrongNameSignature(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.StrongNameSignature);\r\n }\r\n\r\n public isMetadataTableValid(id: F.MetadataTableIndex): boolean {\r\n const info = this.metadataTableInfo;\r\n if (info && info[id]) {\r\n return info[id].valid;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public isMetadataTableSorted(id: F.MetadataTableIndex): boolean {\r\n const info = this.metadataTableInfo;\r\n if (info && info[id]) {\r\n return info[id].sorted;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public getMetadataTableRows(id: F.MetadataTableIndex): number {\r\n const info = this.metadataTableInfo;\r\n if (info && info[id]) {\r\n return info[id].rows;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n //\r\n // Image headers.\r\n //\r\n\r\n public getDosHeader(): S.ImageDosHeader | undefined {\r\n return this.dosHeader;\r\n }\r\n\r\n public getPESignature(): S.U4Field | undefined {\r\n return this.peSignature;\r\n }\r\n\r\n public getFileHeader(): S.ImageFileHeader | undefined {\r\n return this.fileHeader;\r\n }\r\n\r\n public getOptionalHeader(): S.ImageOptionalHeader32 | S.ImageOptionalHeader64 | undefined {\r\n return this.optionalHeader;\r\n }\r\n\r\n public getDataDirectories(): S.StructArray | undefined {\r\n return this.dataDirectories;\r\n }\r\n\r\n public getSectionHeaders(): S.StructArray | undefined {\r\n return this.sectionHeaders;\r\n }\r\n\r\n //\r\n // Metadata structures.\r\n //\r\n\r\n public getCliHeader(): S.CliHeader | undefined {\r\n if (this.cliHeader) return this.cliHeader;\r\n if (!this.isManaged()) return undefined;\r\n\r\n const offset = this.rvaToOffset(this.dataDirectories!\r\n .items[F.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR]\r\n .VirtualAddress.value);\r\n\r\n this.cliHeader = L.loadCliHeader(this, offset);\r\n return this.cliHeader;\r\n }\r\n\r\n public getMetadataRoot(): S.MetadataRoot | undefined {\r\n if (this.metadataRoot) return this.metadataRoot;\r\n\r\n const cliHeader = this.getCliHeader();\r\n if (!cliHeader) return undefined;\r\n\r\n const offset = this.rvaToOffset(cliHeader.MetaData.VirtualAddress.value);\r\n if (!offset) return undefined;\r\n\r\n this.metadataRoot = L.loadMetadataRoot(this, offset);\r\n return this.metadataRoot;\r\n }\r\n\r\n public getMetadataStreamHeaders(): S.StructArray | undefined {\r\n if (this.metadataStreamHeaders) return this.metadataStreamHeaders;\r\n\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot || !mdRoot.Streams.value) return undefined;\r\n\r\n this.metadataStreamHeaders = L.loadStructArrayByCount(\r\n this,\r\n mdRoot._offset + mdRoot._size,\r\n L.loadMetadataStreamHeader,\r\n mdRoot.Streams.value\r\n );\r\n return this.metadataStreamHeaders;\r\n }\r\n\r\n public getMetadataStreamHeader(name: F.MetadataStreamName): S.MetadataStreamHeader | undefined {\r\n const headers = this.getMetadataStreamHeaders();\r\n if (!headers) return undefined;\r\n\r\n return headers.items.filter(v => v.Name.value == name).shift();\r\n }\r\n\r\n public getStrongNameSignature(): S.Field | undefined {\r\n if (this.strongNameSignature) return this.strongNameSignature;\r\n\r\n const cliHeader = this.getCliHeader();\r\n if (!cliHeader) return undefined;\r\n\r\n const offset = this.rvaToOffset(cliHeader.StrongNameSignature.VirtualAddress.value);\r\n if (!offset) return undefined;\r\n\r\n this.strongNameSignature = L.loadFixedSizeByteArrayField(\r\n this, offset,\r\n cliHeader.StrongNameSignature.Size.value);\r\n return this.strongNameSignature;\r\n }\r\n\r\n public getMetadataTableHeader(): S.MetadataTableHeader | undefined {\r\n if (this.metadataTableHeader) return this.metadataTableHeader;\r\n\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.Table);\r\n if (!sh) return undefined;\r\n\r\n const offset = mdRoot._offset + sh.Offset.value;\r\n this.metadataTableHeader = L.loadMetadataTableHeader(this, offset);\r\n this.fillMetadataTableInfo();\r\n this.fillMetadataTableInfoExtra();\r\n\r\n return this.metadataTableHeader;\r\n }\r\n\r\n public getMdsStringsItem(offset: number): S.StringField | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.Strings);\r\n if (!sh) return undefined;\r\n\r\n if (offset < 0 || offset >= sh.Size.value) {\r\n return undefined;\r\n } else {\r\n return L.loadNullTerminatedStringField(this,\r\n mdRoot._offset + sh.Offset.value + offset);\r\n }\r\n }\r\n\r\n public getMdsUSItem(offset: number): S.MetadataUSItem | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.US);\r\n if (!sh) return undefined;\r\n\r\n if (offset < 0 || offset >= sh.Size.value) {\r\n return undefined;\r\n } else {\r\n return L.loadMetadataUSItem(this,\r\n mdRoot._offset + sh.Offset.value + offset);\r\n }\r\n }\r\n\r\n public getMdsGuidItems(): S.StructArray | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.GUID);\r\n if (!sh) return undefined;\r\n\r\n const count = sh.Size.value / 16;\r\n return L.loadStructArrayByCount(\r\n this,\r\n mdRoot._offset + sh.Offset.value,\r\n (d, p) => L.loadFixedSizeByteArrayField(d, p, 16),\r\n count);\r\n }\r\n\r\n public getMdsBlobItem(offset: number): S.MetadataBlobItem | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.Blob);\r\n if (!sh) return undefined;\r\n\r\n if (offset < 0 || offset >= sh.Size.value) {\r\n return undefined;\r\n } else {\r\n return L.loadMetadataBlobItem(this,\r\n mdRoot._offset + sh.Offset.value + offset);\r\n }\r\n }\r\n\r\n public getMdtModuleItem(rid /* 1-based */: number): S.MdtModuleItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Module, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Module];\r\n return L.loadMdtModule(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtTypeRefItem(rid /* 1-based */: number): S.MdtTypeRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.TypeRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Module];\r\n return L.loadMdtTypeRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtTypeDefItem(rid /* 1-based */: number): S.MdtTypeDefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.TypeDef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.TypeDef];\r\n return L.loadMdtTypeDef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldPtrItem(rid /* 1-based */: number): S.MdtFieldPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldPtr];\r\n return L.loadMdtFieldPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldItem(rid /* 1-based */: number): S.MdtFieldItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Field, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Field];\r\n return L.loadMdtField(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodPtrItem(rid /* 1-based */: number): S.MdtMethodPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodPtr];\r\n return L.loadMdtMethodPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodDefItem(rid /* 1-based */: number): S.MdtMethodDefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodDef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodDef];\r\n return L.loadMdtMethodDef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtParamPtrItem(rid /* 1-based */: number): S.MdtParamPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ParamPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ParamPtr];\r\n return L.loadMdtParamPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtParamItem(rid /* 1-based */: number): S.MdtParamItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Param, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Param];\r\n return L.loadMdtParam(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtInterfaceImplItem(rid /* 1-based */: number): S.MdtInterfaceImplItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.InterfaceImpl, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.InterfaceImpl];\r\n return L.loadMdtInterfaceImpl(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMemberRefItem(rid /* 1-based */: number): S.MdtMemberRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MemberRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MemberRef];\r\n return L.loadMdtMemberRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtConstantItem(rid /* 1-based */: number): S.MdtConstantItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Constant, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Constant];\r\n return L.loadMdtConstant(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtCustomAttributeItem(rid /* 1-based */: number): S.MdtCustomAttributeItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.CustomAttribute, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.CustomAttribute];\r\n return L.loadMdtCustomAttribute(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldMarshalItem(rid /* 1-based */: number): S.MdtFieldMarshalItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldMarshal, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldMarshal];\r\n return L.loadMdtFieldMarshal(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtDeclSecurityItem(rid /* 1-based */: number): S.MdtDeclSecurityItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.DeclSecurity, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.DeclSecurity];\r\n return L.loadMdtDeclSecurity(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtClassLayoutItem(rid /* 1-based */: number): S.MdtClassLayoutItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ClassLayout, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ClassLayout];\r\n return L.loadMdtClassLayout(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldLayoutItem(rid /* 1-based */: number): S.MdtFieldLayoutItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldLayout, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldLayout];\r\n return L.loadMdtFieldLayout(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtStandAloneSigItem(rid /* 1-based */: number): S.MdtStandAloneSigItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.StandAloneSig, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.StandAloneSig];\r\n return L.loadMdtStandAloneSig(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtEventMapItem(rid /* 1-based */: number): S.MdtEventMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.EventMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.EventMap];\r\n return L.loadMdtEventMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtEventPtrItem(rid /* 1-based */: number): S.MdtEventPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.EventPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.EventPtr];\r\n return L.loadMdtEventPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtEventItem(rid /* 1-based */: number): S.MdtEventItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Event, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Event];\r\n return L.loadMdtEvent(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtPropertyMapItem(rid /* 1-based */: number): S.MdtPropertyMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.PropertyMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.PropertyMap];\r\n return L.loadMdtPropertyMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtPropertyPtrItem(rid /* 1-based */: number): S.MdtPropertyPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.PropertyPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.PropertyPtr];\r\n return L.loadMdtPropertyPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtPropertyItem(rid /* 1-based */: number): S.MdtPropertyItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Property, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Property];\r\n return L.loadMdtProperty(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodSemanticsItem(rid /* 1-based */: number): S.MdtMethodSemanticsItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodSemantics, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodSemantics];\r\n return L.loadMdtMethodSemantics(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodImplItem(rid /* 1-based */: number): S.MdtMethodImplItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodImpl, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodImpl];\r\n return L.loadMdtMethodImpl(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtModuleRefItem(rid /* 1-based */: number): S.MdtModuleRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ModuleRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ModuleRef];\r\n return L.loadMdtModuleRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtTypeSpecItem(rid /* 1-based */: number): S.MdtTypeSpecItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.TypeSpec, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.TypeSpec];\r\n return L.loadMdtTypeSpec(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtImplMapItem(rid /* 1-based */: number): S.MdtImplMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ImplMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ImplMap];\r\n return L.loadMdtImplMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldRVAItem(rid /* 1-based */: number): S.MdtFieldRVAItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldRVA, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldRVA];\r\n return L.loadMdtFieldRVA(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtENCLogItem(rid /* 1-based */: number): S.MdtENCLogItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ENCLog, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ENCLog];\r\n return L.loadMdtENCLog(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtENCMapItem(rid /* 1-based */: number): S.MdtENCMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ENCMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ENCMap];\r\n return L.loadMdtENCMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyItem(rid /* 1-based */: number): S.MdtAssemblyItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Assembly, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Assembly];\r\n return L.loadMdtAssembly(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyProcessorItem(rid /* 1-based */: number): S.MdtAssemblyProcessorItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyProcessor, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyProcessor];\r\n return L.loadMdtAssemblyProcessor(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyOSItem(rid /* 1-based */: number): S.MdtAssemblyOSItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyOS, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyOS];\r\n return L.loadMdtAssemblyOS(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyRefItem(rid /* 1-based */: number): S.MdtAssemblyRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyRef];\r\n return L.loadMdtAssemblyRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyRefProcessorItem(rid /* 1-based */: number): S.MdtAssemblyRefProcessorItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyRefProcessor, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyRefProcessor];\r\n return L.loadMdtAssemblyRefProcessor(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyRefOSItem(rid /* 1-based */: number): S.MdtAssemblyRefOSItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyRefOS, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyRefOS];\r\n return L.loadMdtAssemblyRefOS(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFileItem(rid /* 1-based */: number): S.MdtFileItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.File, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.File];\r\n return L.loadMdtFile(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtExportedTypeItem(rid /* 1-based */: number): S.MdtExportedTypeItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ExportedType, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ExportedType];\r\n return L.loadMdtExportedType(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtManifestResourceItem(rid /* 1-based */: number): S.MdtManifestResourceItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ManifestResource, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ManifestResource];\r\n return L.loadMdtManifestResource(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtNestedClassItem(rid /* 1-based */: number): S.MdtNestedClassItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.NestedClass, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.NestedClass];\r\n return L.loadMdtNestedClass(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtGenericParamItem(rid /* 1-based */: number): S.MdtGenericParamItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.GenericParam, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.GenericParam];\r\n return L.loadMdtGenericParam(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodSpecItem(rid /* 1-based */: number): S.MdtMethodSpecItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodSpec, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodSpec];\r\n return L.loadMdtMethodSpec(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtGenericParamConstraintItem(rid /* 1-based */: number): S.MdtGenericParamConstraintItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.GenericParamConstraint, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.GenericParamConstraint];\r\n return L.loadMdtGenericParamConstraint(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n //\r\n // Metadata sizing.\r\n //\r\n\r\n public getHeapSize(heap: F.MetadataHeapSizeID): number {\r\n if (this.metadataSizingCache.heap) {\r\n return this.metadataSizingCache.heap[heap];\r\n }\r\n\r\n const h = this.getMetadataTableHeader();\r\n if (!h) return 0;\r\n\r\n const getHeapSizeFunc = (heap: F.MetadataHeapSizeID) =>\r\n (h.HeapSizes.value & (1 << heap)) != 0 ? 4 : 2;\r\n\r\n this.metadataSizingCache.heap = [\r\n F.MetadataHeapSizeID.String,\r\n F.MetadataHeapSizeID.GUID,\r\n F.MetadataHeapSizeID.Blob]\r\n .map(v => (h.HeapSizes.value & (1 << v)) != 0 ? 4 : 2);\r\n\r\n return this.metadataSizingCache.heap[heap];\r\n }\r\n\r\n public getTableIDSize(t: F.MetadataTableIndex): number {\r\n const info = this.metadataTableInfo;\r\n if (info && info[t]) {\r\n return info[t].idSize;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n public getCodedTokenSize(t: F.MetadataCodedTokenIndex): number {\r\n if (this.metadataSizingCache.codedToken) {\r\n return this.metadataSizingCache.codedToken[t];\r\n }\r\n\r\n this.metadataSizingCache.codedToken = F.ctc.map(c => {\r\n const maxRows = 0xFFFF >> c.tagSize;\r\n for (let tid of c.tables) {\r\n if (this.getMetadataTableRows(tid) > maxRows) {\r\n return 4;\r\n }\r\n }\r\n return 2;\r\n });\r\n\r\n return this.metadataSizingCache.codedToken[t];\r\n }\r\n\r\n\r\n //\r\n // Utilities.\r\n //\r\n\r\n public rvaToOffset(rva: number): number {\r\n const sh = this.getSectionHeaderByRva(rva);\r\n if (!sh) return 0;\r\n\r\n return rva - sh.VirtualAddress.value + sh.PointerToRawData.value;\r\n }\r\n\r\n public offsetToRva(offset: number): number {\r\n const sh = this.getSectionHeaderByOffset(offset);\r\n if (!sh) return 0;\r\n\r\n return offset - sh.PointerToRawData.value + sh.VirtualAddress.value;\r\n }\r\n\r\n //\r\n // Private implementations.\r\n //\r\n\r\n private check(p: number, sz: number): void {\r\n if (p < 0 || p >= this.data.byteLength\r\n || sz < 0 || p + sz > this.data.byteLength) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DATA_POSITION, p, sz);\r\n }\r\n }\r\n\r\n private constructor(buf: ArrayBuffer) {\r\n this.data = new DataView(buf);\r\n this.loadHeaders();\r\n }\r\n\r\n private loadHeaders(): void {\r\n let ptr = 0;\r\n this.dosHeader = L.loadImageDosHeader(this, ptr);\r\n\r\n if (this.dosHeader.e_magic.value != F.IMAGE_DOS_SIGNATURE) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DOS_SIGNATURE, ptr, 2);\r\n }\r\n\r\n ptr = this.dosHeader.e_lfanew.value;\r\n this.peSignature = L.loadU4Field(this, ptr);\r\n\r\n if (this.peSignature.value != F.IMAGE_NT_SIGNATURE) {\r\n throw new E.PEError(E.PEErrorType.INVALID_PE_SIGNATURE, ptr, 4);\r\n }\r\n\r\n ptr += this.peSignature._size;\r\n this.fileHeader = L.loadImageFileHeader(this, ptr);\r\n\r\n ptr += this.fileHeader._size;\r\n const magic = L.loadU2Field(this, ptr);\r\n switch (magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC:\r\n this.optionalHeader = L.loadImageOptionalHeader32(this, ptr);\r\n break;\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC:\r\n this.optionalHeader = L.loadImageOptionalHeader64(this, ptr);\r\n break;\r\n default:\r\n throw new E.PEError(E.PEErrorType.INVALID_OPTIONAL_HEADER_MAGIC, ptr, 2);\r\n }\r\n\r\n if (this.optionalHeader.NumberOfRvaAndSizes.value != F.IMAGE_NUMBEROF_DIRECTORY_ENTRIES) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DATA_DIRECTORY_COUNT,\r\n this.optionalHeader.NumberOfRvaAndSizes._offset,\r\n this.optionalHeader.NumberOfRvaAndSizes._size);\r\n }\r\n\r\n ptr += this.optionalHeader._size;\r\n this.dataDirectories = L.loadStructArrayByCount(this, ptr,\r\n L.loadImageDataDirectory,\r\n this.optionalHeader.NumberOfRvaAndSizes.value);\r\n\r\n ptr += this.dataDirectories._size;\r\n this.sectionHeaders = L.loadStructArrayByCount(this, ptr,\r\n L.loadImageSectionHeader,\r\n this.fileHeader.NumberOfSections.value);\r\n }\r\n\r\n private getSectionHeaderByOffset(offset: number): S.ImageSectionHeader | undefined {\r\n return this.sectionHeaders && this.sectionHeaders.items.filter(h => {\r\n const p = h.PointerToRawData.value;\r\n const sz = h.SizeOfRawData.value;\r\n return offset >= p && offset < p + sz;\r\n }).shift();\r\n }\r\n\r\n private getSectionHeaderByRva(rva: number): S.ImageSectionHeader | undefined {\r\n return this.sectionHeaders && this.sectionHeaders.items.filter(h => {\r\n const p = h.VirtualAddress.value;\r\n const sz = h.VirtualSize.value;\r\n return rva >= p && rva < p + sz;\r\n }).shift();\r\n }\r\n\r\n private isDataDirectoryValid(dd?: S.ImageDataDirectory): boolean {\r\n return (dd && dd.VirtualAddress.value > 0 && dd.Size.value > 0) || false;\r\n }\r\n\r\n private fillMetadataTableInfo(): void {\r\n const h = this.metadataTableHeader;\r\n if (!h) return;\r\n\r\n let info: A.MetadataTableInfo = {};\r\n let nValid = 0;\r\n for (let id = 0; id < F.NumberOfMdTables; id++) {\r\n const valid = U.isSetLong(h.Valid.high, h.Valid.low, id);\r\n const sorted = U.isSetLong(h.Sorted.high, h.Sorted.low, id);\r\n const rows = valid ? h.Rows.items[nValid++].value : 0;\r\n info[id] = {\r\n valid,\r\n sorted,\r\n rows,\r\n idSize: valid ? (rows > 0xFFFF ? 4 : 2) : 0,\r\n baseOffset: 0,\r\n rowSize: 0\r\n };\r\n }\r\n this.metadataTableInfo = info;\r\n }\r\n\r\n private fillMetadataTableInfoExtra(): void {\r\n const h = this.metadataTableHeader;\r\n if (!h) return;\r\n\r\n const ti = this.metadataTableInfo;\r\n if (!ti) return;\r\n\r\n const ctid = F.MetadataCodedTokenIndex;\r\n const ctsz = this.getCodedTokenSize.bind(this);\r\n\r\n const tid = F.MetadataTableIndex;\r\n\r\n const stringsSize = this.getHeapSize(F.MetadataHeapSizeID.String);\r\n const guidSize = this.getHeapSize(F.MetadataHeapSizeID.GUID);\r\n const blobSize = this.getHeapSize(F.MetadataHeapSizeID.Blob);\r\n\r\n let baseOffset = h._offset + h._size;\r\n\r\n let tbli = ti[tid.Module];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + 3 * guidSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.TypeRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.ResolutionScope) + 2 * stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.TypeDef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 2 * stringsSize + ctsz(ctid.TypeDefOrRef) + ti[tid.Field].idSize + ti[tid.MethodDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Field].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Field];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.MethodDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodDef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 2 + 2 + stringsSize + blobSize + ti[tid.Param].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ParamPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Param].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Param];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 2 + stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.InterfaceImpl];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + ctsz(ctid.TypeDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MemberRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.MemberRefParent) + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Constant];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 1 + 1 + ctsz(ctid.HasConstant) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.CustomAttribute];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.HasCustomAttribute) + ctsz(ctid.CustomAttributeType) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldMarshal];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.HasFieldMarshall) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.DeclSecurity];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + ctsz(ctid.HasDeclSecurity) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ClassLayout];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 4 + ti[tid.TypeDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldLayout];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + ti[tid.Field].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.StandAloneSig];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.EventMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + ti[tid.Event].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.EventPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Event].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Event];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + ctsz(ctid.TypeDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.PropertyMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + ti[tid.Property].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.PropertyPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Property].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Property];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodSemantics];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + ti[tid.MethodDef].idSize + ctsz(ctid.HasSemantics);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodImpl];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + 2 * ctsz(ctid.MethodDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ModuleRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.TypeSpec];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ImplMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + ctsz(ctid.MemberForwarded) + stringsSize + ti[tid.ModuleRef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldRVA];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + ti[tid.Field].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ENCLog];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ENCMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Assembly];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 2 + 2 + 2 + 2 + 4 + blobSize + 2 * stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyProcessor];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyOS];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 2 + 2 + 2 + 4 + 2 * blobSize + 2 * stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyRefProcessor];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + ti[tid.AssemblyRef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyRefOS];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + 4 + ti[tid.AssemblyRef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.File];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ExportedType];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + 2 * stringsSize + ctsz(ctid.Implementation);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ManifestResource];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + stringsSize + ctsz(ctid.Implementation);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.NestedClass];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 * ti[tid.TypeDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.GenericParam];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 2 + ctsz(ctid.TypeOrMethodDef) + stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodSpec];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.MethodDefOrRef) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.GenericParamConstraint];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.GenericParam].idSize + ctsz(ctid.TypeDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n }\r\n\r\n private checkMdt(tid: F.MetadataTableIndex, rid: number): boolean {\r\n if (!this.metadataTableInfo) {\r\n return false;\r\n }\r\n\r\n const ti = this.metadataTableInfo[tid];\r\n return ti != null && ti.valid && rid > 0 && rid <= ti.rows;\r\n }\r\n\r\n private readonly data: DataView;\r\n\r\n private dosHeader?: S.ImageDosHeader;\r\n private peSignature?: S.U4Field;\r\n private fileHeader?: S.ImageFileHeader;\r\n private optionalHeader?: S.ImageOptionalHeader32 | S.ImageOptionalHeader64;\r\n private dataDirectories?: S.StructArray;\r\n private sectionHeaders?: S.StructArray;\r\n\r\n private cliHeader?: S.CliHeader;\r\n private metadataRoot?: S.MetadataRoot;\r\n private metadataStreamHeaders?: S.StructArray;\r\n private strongNameSignature?: S.Field;\r\n\r\n private metadataTableHeader?: S.MetadataTableHeader;\r\n private metadataTableInfo?: A.MetadataTableInfo;\r\n\r\n private metadataSizingCache: {\r\n heap?: {\r\n [key: number /* F.MetadataHeapSizeID */]: number;\r\n };\r\n codedToken?: {\r\n [key: number /* F.MetadataCodedTokenIndex */]: number;\r\n }\r\n } = {};\r\n}\r\n","export function createResNavDataMessage(navList: W.NavData[]): W.ResNavDataMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_NAV_DATA,\r\n navList\r\n };\r\n}\r\n\r\nexport function createResPageDataMessage(pageData: W.PageData): W.ResPageDataMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PAGE_DATA,\r\n pageData\r\n };\r\n}\r\n\r\nexport function createResPEPropsMessage(is32Bit?: boolean, isManaged?: boolean): W.ResPEPropsMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PE_PROPS,\r\n is32Bit,\r\n isManaged\r\n };\r\n}\r\n\r\nexport function createResPEErrorMessage(error: string): W.ResPEErrorMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PE_ERROR,\r\n error\r\n };\r\n}\r\n","import * as M from \"./message\";\r\nimport { PEImage } from \"./pe/image\";\r\nimport { generatePageData, clearGeneratorCache } from \"./page-data/generator\";\r\nimport { generateNavList } from \"./page-data/nav-data\";\r\n\r\nlet pe: PEImage | null = null;\r\n\r\nonmessage = (ev) => {\r\n const msg = ev.data as W.WorkerMessage;\r\n switch (msg.type) {\r\n case W.WorkerMessageType.REQ_OPEN_FILE:\r\n handleReqOpenFile(msg as W.ReqOpenFileMessage);\r\n break;\r\n\r\n case W.WorkerMessageType.REQ_OPEN_NAV:\r\n handleReqOpenNav(msg as W.ReqOpenNavMessage);\r\n break;\r\n }\r\n};\r\n\r\nfunction handleReqOpenFile(msg: W.ReqOpenFileMessage): void {\r\n let reader = new FileReader();\r\n\r\n reader.onload = ev => {\r\n try {\r\n const buf = (ev.target).result;\r\n pe = PEImage.load(buf);\r\n clearGeneratorCache();\r\n\r\n // Response with page data.\r\n const pageData = generatePageData(pe, W.PageID.HEADERS);\r\n const pageDataMsg = M.createResPageDataMessage(pageData);\r\n postMessage(pageDataMsg);\r\n\r\n // Response with PE properties.\r\n const is32Bit = pe.is32Bit();\r\n const isManaged = pe.isManaged();\r\n const pePropsMsg = M.createResPEPropsMessage(is32Bit, isManaged);\r\n postMessage(pePropsMsg);\r\n\r\n // Response with navigation data.\r\n const navList = generateNavList(pe);\r\n const navMsg = M.createResNavDataMessage(navList);\r\n postMessage(navMsg);\r\n } catch (ex) {\r\n const msg = M.createResPEErrorMessage(ex.message\r\n || `Unknown error: ${JSON.stringify(ex)}`);\r\n postMessage(msg);\r\n }\r\n };\r\n\r\n reader.onerror = ev => {\r\n pe = null;\r\n const msg = M.createResPEErrorMessage(\"Can't open file.\");\r\n postMessage(msg);\r\n };\r\n\r\n reader.readAsArrayBuffer(msg.file);\r\n}\r\n\r\nfunction handleReqOpenNav(msg: W.ReqOpenNavMessage): void {\r\n if (pe != null) {\r\n const { pageID, subID, pageNum, elemID } = msg.target;\r\n const pageData = generatePageData(pe, pageID, subID, pageNum);\r\n pageData.nav.elemID = elemID;\r\n const res = M.createResPageDataMessage(pageData);\r\n postMessage(res);\r\n }\r\n}"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/worker/pe/image-flags.ts","webpack:///./src/worker/page-data/formatter.ts","webpack:///./src/worker/pe/utils.ts","webpack:///./src/worker/page-data/nav-data.ts","webpack:///./src/worker/page-data/mds-list.ts","webpack:///./src/worker/page-data/mds-table.ts","webpack:///./src/worker/page-data/metadata-headers.ts","webpack:///./src/worker/page-data/headers.ts","webpack:///./src/worker/page-data/generator.ts","webpack:///./src/worker/pe/error.ts","webpack:///./src/worker/pe/loader.ts","webpack:///./src/worker/pe/image.ts","webpack:///./src/worker/message.ts","webpack:///./src/worker/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","MetadataTableIndex","IMAGE_DOS_SIGNATURE","IMAGE_NT_SIGNATURE","IMAGE_NT_OPTIONAL_HDR32_MAGIC","IMAGE_NT_OPTIONAL_HDR64_MAGIC","ImageFile","ImageFileMachine","ImageSubsystem","ImageDllCharacteristics","ImageDirectoryEntry","IMAGE_NUMBEROF_DIRECTORY_ENTRIES","ImageSection","ComImageFlags","MetadataSignature","NumberOfMdTables","MetadataCodedTokenIndex","ctc","tagSize","tables","TypeDef","TypeRef","TypeSpec","Field","Param","Property","MethodDef","InterfaceImpl","MemberRef","Module","DeclSecurity","Event","StandAloneSig","ModuleRef","Assembly","AssemblyRef","File","ExportedType","ManifestResource","GenericParam","GenericParamConstraint","MethodSpec","String","AssemblyHashAlgorithm","CorAssemblyFlags","CorEventAttr","CorFieldAttr","CorFileFlags","CorGenericParamAttr","CorPinvokeMap","CorManifestResourceFlags","CorMethodAttr","CorMethodImpl","CorMethodSemanticsAttr","CorParamAttr","CorPropertyAttr","CorTypeAttr","CorDeclSecurity","CorElementType","formatU1RawHex","padZeroLeft","toString","toUpperCase","formatU2RawHex","formatU4RawHex","formatU1Hex","formatU2Hex","formatU4Hex","formatHexDec","toLocaleString","formatDec","v","formatBytes","bytes","lineWidth","lines","start","length","line","Array","from","subarray","map","b","join","push","str","len","repeat","formatUIntField","f","sz","showDec","hex","offset","_offset","size","_size","rawData","data","formatStructTitle","title","formatU1Field","formatU2Field","formatU4Field","formatU8Field","high","low","formatCompressedUIntField","formatBytesField","formatStringField","formatGuidField","decompressUint","buffer","byteLength","RangeError","calculatePadding","dataSize","align","count1","mask","isSetLong","bit","decompressInt","u","fb","getCompressedIntSize","firstByte","F","generateNavList","pe","pageID","navList","target","children","elemID","navMD","isManaged","hasMetadata","hasStrongNameSignature","getMetadataStreamHeader","pageNum","getMetadataTableHeader","ti","tid","isMetadataTableValid","getMetadataTableRows","subID","generateMDTablesNavData","generateMDHeadersNavData","U","FM","getBlobIndexes","base","indexes","dtsz","getU1","getData","putIndexToPages","pageSize","pages","pageItems","pStart","pEnd","slice","generateMdsStringsPageData","cache","cfg","pgNum","mdsStrings","mdRoot","getMetadataRoot","sh","Offset","Size","mdsOffsetListPageSize","checkAndBuildCacheForMdsStrings","items","titleOf","nav","groups","index","getMdsStringsItem","paging","currentPageNumber","pageNavList","generateMdsUSPageData","mdsUS","checkAndBuildCacheForMdsUS","item","getMdsUSItem","Value","Suffix","generateMdsBlobPageData","mdsBlob","checkAndBuildCacheForMdsBlob","getMdsBlobItem","generateMdsGuidPageData","getMdsGuidItems","generateMdtModuleItems","Generation","Name","Mvid","EncId","EncBaseId","generateMdtTypeRefItems","ResolutionScope","Namespace","generateMdtTypeDefItems","Flags","Extends","FieldList","MethodList","generateMdtFieldPtrItems","generateMdtFieldItems","Signature","generateMdtMethodPtrItems","Method","generateMdtMethodDefItems","RVA","ImplFlags","ParamList","generateMdtParamPtrItems","generateMdtParamItems","Sequence","generateMdtInterfaceImplItems","Class","Interface","generateMdtMemberRefItems","generateMdtConstantItems","Type","PaddingZero","Parent","generateMdtCustomAttributeItems","generateMdtFieldMarshalItems","NativeType","generateMdtDeclSecurityItems","Action","PermissionSet","generateMdtClassLayoutItems","PackingSize","ClassSize","generateMdtFieldLayoutItems","OffSet","generateMdtStandAloneSigItems","generateMdtEventMapItems","EventList","generateMdtEventPtrItems","generateMdtEventItems","EventFlags","EventType","generateMdtPropertyMapItems","PropertyList","generateMdtPropertyPtrItems","generateMdtPropertyItems","PropFlags","generateMdtMethodSemanticsItems","Semantic","Association","generateMdtMethodImplItems","MethodBody","MethodDeclaration","generateMdtModuleRefItems","generateMdtTypeSpecItems","generateMdtImplMapItems","MappingFlags","MemberForwarded","ImportName","ImportScope","generateMdtFieldRVAItems","generateMdtENCLogItems","Token","FuncCode","generateMdtENCMapItems","generateMdtAssemblyItems","HashAlgId","MajorVersion","MinorVersion","BuildNumber","RevisionNumber","PublicKey","Locale","generateMdtAssemblyProcessorItems","Processor","generateMdtAssemblyOSItems","OSPlatformID","OSMajorVersion","OSMinorVersion","generateMdtAssemblyRefItems","PublicKeyOrToken","HashValue","generateMdtAssemblyRefProcessorItems","generateMdtAssemblyRefOSItems","generateMdtFileItems","generateMdtExportedTypeItems","TypeDefId","TypeName","TypeNamespace","Implementation","generateMdtManifestResourceItems","generateMdtNestedClassItems","NestedClass","EnclosingClass","generateMdtGenericParamItems","Number","Owner","generateMdtMethodSpecItems","Instantiation","generateMdtGenericParamConstraintItems","Constraint","getRidOnPage","psz","mdtPageSize","rows","end","generateMdsTablePageData","tableHeader","h","Reserved","HeapSizes","Reserved2","Valid","Sorted","Rows","generateMDTableHeader","tableInfo","id","valid","sorted","isMetadataTableSorted","generateMDTableList","generateMdtPageData","loader","builder","_a","getMdtModuleItem","getMdtTypeRefItem","getMdtTypeDefItem","FieldPtr","getMdtFieldPtrItem","getMdtFieldItem","MethodPtr","getMdtMethodPtrItem","getMdtMethodDefItem","ParamPtr","getMdtParamPtrItem","getMdtParamItem","getMdtInterfaceImplItem","getMdtMemberRefItem","Constant","getMdtConstantItem","CustomAttribute","getMdtCustomAttributeItem","FieldMarshal","getMdtFieldMarshalItem","getMdtDeclSecurityItem","ClassLayout","getMdtClassLayoutItem","FieldLayout","getMdtFieldLayoutItem","getMdtStandAloneSigItem","EventMap","getMdtEventMapItem","EventPtr","getMdtEventPtrItem","getMdtEventItem","PropertyMap","getMdtPropertyMapItem","PropertyPtr","getMdtPropertyPtrItem","getMdtPropertyItem","MethodSemantics","getMdtMethodSemanticsItem","MethodImpl","getMdtMethodImplItem","getMdtModuleRefItem","getMdtTypeSpecItem","ImplMap","getMdtImplMapItem","FieldRVA","getMdtFieldRVAItem","ENCLog","getMdtENCLogItem","ENCMap","getMdtENCMapItem","getMdtAssemblyItem","AssemblyProcessor","getMdtAssemblyProcessorItem","AssemblyOS","getMdtAssemblyOSItem","getMdtAssemblyRefItem","AssemblyRefProcessor","getMdtAssemblyRefProcessorItem","AssemblyRefOS","getMdtAssemblyRefOSItem","getMdtFileItem","getMdtExportedTypeItem","getMdtManifestResourceItem","getMdtNestedClassItem","getMdtGenericParamItem","getMdtMethodSpecItem","getMdtGenericParamConstraintItem","rid","generateSignleMdtTableItems","generateTalbeItems","Math","floor","tblName","generateMdtPaging","generateMetadataHeadersPageData","cliHeader","getCliHeader","cb","MajorRuntimeVersion","MinorRuntimeVersion","MetaData","VirtualAddress","EntryPointToken","Resources","StrongNameSignature","CodeManagerTable","VTableFixups","ExportAddressTableJumps","ManagedNativeHeader","generateCliHeader","metadataRoot","VersionLength","VersionString","VersionPadding","Streams","generateMetadataRoot","streamHeaders","getMetadataStreamHeaders","Padding","generateMetadataStreamHeader","snSignature","getStrongNameSignature","generateSNSignature","generateHeadersPageData","dosHeader","getDosHeader","e_magic","e_cblp","e_cp","e_crlc","e_cparhdr","e_minalloc","e_maxalloc","e_ss","e_sp","e_csum","e_ip","e_cs","e_lfarlc","e_ovno","e_res","e_oemid","e_oeminfo","e_res2","e_lfanew","generateDosHeader","peSignature","getPESignature","generatePESignature","fileHeader","getFileHeader","Machine","NumberOfSections","TimeDateStamp","PointerToSymbolTable","NumberOfSymbols","SizeOfOptionalHeader","Characteristics","generateFileHeader","optionalHeader","getOptionalHeader","Magic","MajorLinkerVersion","MinorLinkerVersion","SizeOfCode","SizeOfInitializedData","SizeOfUninitializedData","AddressOfEntryPoint","BaseOfCode","BaseOfData","ImageBase","SectionAlignment","FileAlignment","MajorOperatingSystemVersion","MinorOperatingSystemVersion","MajorImageVersion","MinorImageVersion","MajorSubsystemVersion","MinorSubsystemVersion","Win32VersionValue","SizeOfImage","SizeOfHeaders","CheckSum","Subsystem","DllCharacteristics","SizeOfStackReserve","SizeOfStackCommit","SizeOfHeapReserve","SizeOfHeapCommit","LoaderFlags","NumberOfRvaAndSizes","fillOptionalHeader32Fields","fillOptionalHeader64Fields","generateOptionalHeader","dataDirectories","getDataDirectories","generateDataDirectories","sectionHeaders","getSectionHeaders","VirtualSize","SizeOfRawData","PointerToRawData","PointerToRelocations","PointerToLinenumbers","NumberOfRelocations","NumberOfLinenumbers","generateSectionHeaders","headers_1","metadata_headers_1","mds_table_1","mds_list_1","generatePageData","clearGeneratorCache","PEError","_super","type","_this","this","__extends","Error","loadU1Field","loadU2Field","getU2","loadU4Field","getU4","loadU8Field","loadCompressedUIntField","Uint8Array","loadU1EnumField","loadU2EnumField","loadU4EnumField","loadFixedSizeByteArrayField","loadFixedSizeAsciiStringField","fromCharCode","apply","filter","loadNullTerminatedStringField","ptr","decodeURIComponent","loadFixedSizeUnicodeStringField","arr","Uint16Array","fromCodePoint","loadStructArrayByCount","count","loadImageDataDirectory","loadMdsStringsField","getHeapSize","loadMdsGuidField","loadMdsBlobField","loadMdtRidField","getTableIDSize","loadMdCodedTokenField","baseField","getCodedTokenSize","codedTokenInfo","decodeCodedToken","__assign","token","cti","loadImageDosHeader","loadImageFileHeader","loadImageOptionalHeader32","loadImageOptionalHeader64","loadImageSectionHeader","loadCliHeader","loadMetadataRoot","loadMetadataStreamHeader","loadMetadataTableHeader","loadMetadataUSItem","suffixSize","loadMetadataBlobItem","loadMdTokenField","loadMdtModule","loadMdtTypeRef","loadMdtTypeDef","TypeDefOrRef","loadMdtFieldPtr","loadMdtField","loadMdtMethodPtr","loadMdtMethodDef","loadMdtParamPtr","loadMdtParam","loadMdtInterfaceImpl","loadMdtMemberRef","MemberRefParent","loadMdtConstant","HasConstant","loadMdtCustomAttribute","HasCustomAttribute","CustomAttributeType","loadMdtFieldMarshal","HasFieldMarshall","loadMdtDeclSecurity","HasDeclSecurity","loadMdtClassLayout","loadMdtFieldLayout","loadMdtStandAloneSig","loadMdtEventMap","loadMdtEventPtr","loadMdtEvent","loadMdtPropertyMap","loadMdtPropertyPtr","loadMdtProperty","loadMdtMethodSemantics","HasSemantics","loadMdtMethodImpl","MethodDefOrRef","loadMdtModuleRef","loadMdtTypeSpec","loadMdtImplMap","loadMdtFieldRVA","loadMdtENCLog","loadMdtENCMap","loadMdtAssembly","loadMdtAssemblyProcessor","loadMdtAssemblyOS","loadMdtAssemblyRef","loadMdtAssemblyRefProcessor","loadMdtAssemblyRefOS","loadMdtFile","loadMdtExportedType","loadMdtManifestResource","loadMdtNestedClass","loadMdtGenericParam","TypeOrMethodDef","loadMdtMethodSpec","loadMdtGenericParamConstraint","L","E","PEImage","buf","metadataSizingCache","DataView","loadHeaders","load","check","getUint8","getUint16","getUint32","is32Bit","optHdr","dd","isDataDirectoryValid","IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR","hasManagedResources","info","metadataTableInfo","rvaToOffset","metadataStreamHeaders","headers","shift","strongNameSignature","metadataTableHeader","fillMetadataTableInfo","fillMetadataTableInfoExtra","checkMdt","baseOffset","rowSize","heap","idSize","codedToken","maxRows","_i","rva","getSectionHeaderByRva","offsetToRva","getSectionHeaderByOffset","nValid","ctid","ctsz","stringsSize","guidSize","blobSize","tbli","createResNavDataMessage","createResPageDataMessage","pageData","createResPEPropsMessage","createResPEErrorMessage","error","M","image_1","generator_1","nav_data_1","onmessage","ev","msg","reader","FileReader","onload","result","pageDataMsg","postMessage","pePropsMsg","navMsg","ex","msg_1","message","JSON","stringify","onerror","readAsArrayBuffer","file","handleReqOpenFile","res","handleReqOpenNav"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,aAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,E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gB,GACtD2jB,YAAYC,GAGZ,IAAMjkB,EAAUujB,EAAA1jB,gBAAgBC,GAC1BokB,EAASd,EAAEN,wBAAwB9iB,GACzCgkB,YAAYE,GACd,MAAOC,GACL,IAAMC,EAAMhB,EAAEF,wBAAwBiB,EAAGE,SAClC,kBAAkBC,KAAKC,UAAUJ,IACxCH,YAAYI,KAIpBT,EAAOa,QAAU,SAAAf,GACb3jB,EAAK,KACL,IAAM4jB,EAAMN,EAAEF,wBAAwB,oBACtCc,YAAYN,IAGhBC,EAAOc,kBAAkBf,EAAIgB,MA9CrBC,CAAkBjB,GAClB,MAEJ,oBA8CR,SAA0BA,GACtB,GAAU,MAAN5jB,EAAY,CACN,IAAA4M,EAAAgX,EAAAzjB,OAAEF,EAAA2M,EAAA3M,OAAQgB,EAAA2L,EAAA3L,MAAON,EAAAiM,EAAAjM,QAASN,EAAAuM,EAAAvM,OAC1B6iB,EAAWM,EAAA5K,iBAAiB5Y,EAAIC,EAAQgB,EAAON,GACrDuiB,EAASjgB,IAAI5C,OAASA,EACtB,IAAMykB,EAAMxB,EAAEL,yBAAyBC,GACvCgB,YAAYY,IAnDRC,CAAiBnB","file":"worker.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 13);\n","export const IMAGE_DOS_SIGNATURE = 0x5A4D; // MZ\r\n\r\nexport const IMAGE_NT_SIGNATURE = 0x00004550; // PE00\r\n\r\nexport const IMAGE_NT_OPTIONAL_HDR32_MAGIC = 0x10b;\r\nexport const IMAGE_NT_OPTIONAL_HDR64_MAGIC = 0x20b;\r\n\r\nexport enum ImageFile {\r\n IMAGE_FILE_RELOCS_STRIPPED = 0x0001,\r\n IMAGE_FILE_EXECUTABLE_IMAGE = 0x0002,\r\n IMAGE_FILE_LINE_NUMS_STRIPPED = 0x0004,\r\n IMAGE_FILE_LOCAL_SYMS_STRIPPED = 0x0008,\r\n IMAGE_FILE_AGGRESIVE_WS_TRIM = 0x0010,\r\n IMAGE_FILE_LARGE_ADDRESS_AWARE = 0x0020,\r\n IMAGE_FILE_BYTES_REVERSED_LO = 0x0080,\r\n IMAGE_FILE_32BIT_MACHINE = 0x0100,\r\n IMAGE_FILE_DEBUG_STRIPPED = 0x0200,\r\n IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = 0x0400,\r\n IMAGE_FILE_NET_RUN_FROM_SWAP = 0x0800,\r\n IMAGE_FILE_SYSTEM = 0x1000,\r\n IMAGE_FILE_DLL = 0x2000,\r\n IMAGE_FILE_UP_SYSTEM_ONLY = 0x4000,\r\n IMAGE_FILE_BYTES_REVERSED_HI = 0x8000,\r\n}\r\n\r\nexport enum ImageFileMachine {\r\n IMAGE_FILE_MACHINE_UNKNOWN = 0,\r\n IMAGE_FILE_MACHINE_TARGET_HOST = 0x0001,\r\n IMAGE_FILE_MACHINE_I386 = 0x014c,\r\n IMAGE_FILE_MACHINE_R3000 = 0x0162,\r\n IMAGE_FILE_MACHINE_R4000 = 0x0166,\r\n IMAGE_FILE_MACHINE_R10000 = 0x0168,\r\n IMAGE_FILE_MACHINE_WCEMIPSV2 = 0x0169,\r\n IMAGE_FILE_MACHINE_ALPHA = 0x0184,\r\n IMAGE_FILE_MACHINE_SH3 = 0x01a2,\r\n IMAGE_FILE_MACHINE_SH3DSP = 0x01a3,\r\n IMAGE_FILE_MACHINE_SH3E = 0x01a4,\r\n IMAGE_FILE_MACHINE_SH4 = 0x01a6,\r\n IMAGE_FILE_MACHINE_SH5 = 0x01a8,\r\n IMAGE_FILE_MACHINE_ARM = 0x01c0,\r\n IMAGE_FILE_MACHINE_THUMB = 0x01c2,\r\n IMAGE_FILE_MACHINE_ARMNT = 0x01c4,\r\n IMAGE_FILE_MACHINE_AM33 = 0x01d3,\r\n IMAGE_FILE_MACHINE_POWERPC = 0x01F0,\r\n IMAGE_FILE_MACHINE_POWERPCFP = 0x01f1,\r\n IMAGE_FILE_MACHINE_IA64 = 0x0200,\r\n IMAGE_FILE_MACHINE_MIPS16 = 0x0266,\r\n IMAGE_FILE_MACHINE_ALPHA64 = 0x0284,\r\n IMAGE_FILE_MACHINE_MIPSFPU = 0x0366,\r\n IMAGE_FILE_MACHINE_MIPSFPU16 = 0x0466,\r\n IMAGE_FILE_MACHINE_AXP64 = IMAGE_FILE_MACHINE_ALPHA64,\r\n IMAGE_FILE_MACHINE_TRICORE = 0x0520,\r\n IMAGE_FILE_MACHINE_CEF = 0x0CEF,\r\n IMAGE_FILE_MACHINE_EBC = 0x0EBC,\r\n IMAGE_FILE_MACHINE_AMD64 = 0x8664,\r\n IMAGE_FILE_MACHINE_M32R = 0x9041,\r\n IMAGE_FILE_MACHINE_ARM64 = 0xAA64,\r\n IMAGE_FILE_MACHINE_CEE = 0xC0EE,\r\n}\r\n\r\nexport enum ImageSubsystem {\r\n IMAGE_SUBSYSTEM_UNKNOWN = 0,\r\n IMAGE_SUBSYSTEM_NATIVE = 1,\r\n IMAGE_SUBSYSTEM_WINDOWS_GUI = 2,\r\n IMAGE_SUBSYSTEM_WINDOWS_CUI = 3,\r\n IMAGE_SUBSYSTEM_OS2_CUI = 5,\r\n IMAGE_SUBSYSTEM_POSIX_CUI = 7,\r\n IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8,\r\n IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9,\r\n IMAGE_SUBSYSTEM_EFI_APPLICATION = 10,\r\n IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11,\r\n IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12,\r\n IMAGE_SUBSYSTEM_EFI_ROM = 13,\r\n IMAGE_SUBSYSTEM_XBOX = 14,\r\n IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16,\r\n IMAGE_SUBSYSTEM_XBOX_CODE_CATALOG = 17,\r\n}\r\n\r\nexport enum ImageDllCharacteristics {\r\n IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020,\r\n IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE = 0x0040,\r\n IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY = 0x0080,\r\n IMAGE_DLLCHARACTERISTICS_NX_COMPAT = 0x0100,\r\n IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = 0x0200,\r\n IMAGE_DLLCHARACTERISTICS_NO_SEH = 0x0400,\r\n IMAGE_DLLCHARACTERISTICS_NO_BIND = 0x0800,\r\n IMAGE_DLLCHARACTERISTICS_APPCONTAINER = 0x1000,\r\n IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = 0x2000,\r\n IMAGE_DLLCHARACTERISTICS_GUARD_CF = 0x4000,\r\n IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = 0x8000,\r\n}\r\n\r\nexport enum ImageDirectoryEntry {\r\n IMAGE_DIRECTORY_ENTRY_EXPORT = 0,\r\n IMAGE_DIRECTORY_ENTRY_IMPORT = 1,\r\n IMAGE_DIRECTORY_ENTRY_RESOURCE = 2,\r\n IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3,\r\n IMAGE_DIRECTORY_ENTRY_SECURITY = 4,\r\n IMAGE_DIRECTORY_ENTRY_BASERELOC = 5,\r\n IMAGE_DIRECTORY_ENTRY_DEBUG = 6,\r\n IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7,\r\n IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8,\r\n IMAGE_DIRECTORY_ENTRY_TLS = 9,\r\n IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10,\r\n IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11,\r\n IMAGE_DIRECTORY_ENTRY_IAT = 12,\r\n IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13,\r\n IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14,\r\n}\r\n\r\nexport const IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16;\r\n\r\nexport enum ImageSection {\r\n IMAGE_SCN_TYPE_NO_PAD = 0x00000008,\r\n\r\n IMAGE_SCN_CNT_CODE = 0x00000020,\r\n IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040,\r\n IMAGE_SCN_CNT_UNINITIALIZED_DATA = 0x00000080,\r\n\r\n IMAGE_SCN_LNK_OTHER = 0x00000100,\r\n IMAGE_SCN_LNK_INFO = 0x00000200,\r\n IMAGE_SCN_LNK_REMOVE = 0x00000800,\r\n IMAGE_SCN_LNK_COMDAT = 0x00001000,\r\n\r\n IMAGE_SCN_NO_DEFER_SPEC_EXC = 0x00004000,\r\n IMAGE_SCN_GPREL = 0x00008000,\r\n\r\n IMAGE_SCN_MEM_PURGEABLE = 0x00020000,\r\n IMAGE_SCN_MEM_16BIT = 0x00020000,\r\n IMAGE_SCN_MEM_LOCKED = 0x00040000,\r\n IMAGE_SCN_MEM_PRELOAD = 0x00080000,\r\n\r\n IMAGE_SCN_ALIGN_1BYTES = 0x00100000,\r\n IMAGE_SCN_ALIGN_2BYTES = 0x00200000,\r\n IMAGE_SCN_ALIGN_4BYTES = 0x00300000,\r\n IMAGE_SCN_ALIGN_8BYTES = 0x00400000,\r\n IMAGE_SCN_ALIGN_16BYTES = 0x00500000,\r\n IMAGE_SCN_ALIGN_32BYTES = 0x00600000,\r\n IMAGE_SCN_ALIGN_64BYTES = 0x00700000,\r\n IMAGE_SCN_ALIGN_128BYTES = 0x00800000,\r\n IMAGE_SCN_ALIGN_256BYTES = 0x00900000,\r\n IMAGE_SCN_ALIGN_512BYTES = 0x00A00000,\r\n IMAGE_SCN_ALIGN_1024BYTES = 0x00B00000,\r\n IMAGE_SCN_ALIGN_2048BYTES = 0x00C00000,\r\n IMAGE_SCN_ALIGN_4096BYTES = 0x00D00000,\r\n IMAGE_SCN_ALIGN_8192BYTES = 0x00E00000,\r\n\r\n IMAGE_SCN_LNK_NRELOC_OVFL = 0x01000000,\r\n IMAGE_SCN_MEM_DISCARDABLE = 0x02000000,\r\n IMAGE_SCN_MEM_NOT_CACHED = 0x04000000,\r\n IMAGE_SCN_MEM_NOT_PAGED = 0x08000000,\r\n IMAGE_SCN_MEM_SHARED = 0x10000000,\r\n IMAGE_SCN_MEM_EXECUTE = 0x20000000,\r\n IMAGE_SCN_MEM_READ = 0x40000000,\r\n IMAGE_SCN_MEM_WRITE = 0x80000000,\r\n\r\n IMAGE_SCN_SCALE_INDEX = 0x00000001,\r\n}\r\n\r\n//\r\n// Metadata structures.\r\n//\r\n\r\nexport enum ComImageFlags {\r\n COMIMAGE_FLAGS_ILONLY = 0x00000001,\r\n COMIMAGE_FLAGS_32BITREQUIRED = 0x00000002,\r\n COMIMAGE_FLAGS_IL_LIBRARY = 0x00000004,\r\n COMIMAGE_FLAGS_STRONGNAMESIGNED = 0x00000008,\r\n COMIMAGE_FLAGS_NATIVE_ENTRYPOINT = 0x00000010,\r\n COMIMAGE_FLAGS_TRACKDEBUGDATA = 0x00010000,\r\n COMIMAGE_FLAGS_32BITPREFERRED = 0x00020000,\r\n}\r\n\r\nexport const MetadataSignature = 0x424A5342;\r\n\r\nexport const enum MetadataStreamName {\r\n Table = \"#~\",\r\n Strings = \"#Strings\",\r\n US = \"#US\",\r\n GUID = \"#GUID\",\r\n Blob = \"#Blob\",\r\n}\r\n\r\nexport const enum MetadataHeapSizeID {\r\n String = 0,\r\n GUID = 1,\r\n Blob = 2,\r\n}\r\n\r\nexport enum MetadataTableIndex {\r\n Module = 0x00,\r\n TypeRef = 0x01,\r\n TypeDef = 0x02,\r\n FieldPtr = 0x03,\r\n Field = 0x04,\r\n MethodPtr = 0x05,\r\n MethodDef = 0x06,\r\n ParamPtr = 0x07,\r\n Param = 0x08,\r\n InterfaceImpl = 0x09,\r\n MemberRef = 0x0A,\r\n Constant = 0x0B,\r\n CustomAttribute = 0x0C,\r\n FieldMarshal = 0x0D,\r\n DeclSecurity = 0x0E,\r\n ClassLayout = 0x0F,\r\n FieldLayout = 0x10,\r\n StandAloneSig = 0x11,\r\n EventMap = 0x12,\r\n EventPtr = 0x13,\r\n Event = 0x14,\r\n PropertyMap = 0x15,\r\n PropertyPtr = 0x16,\r\n Property = 0x17,\r\n MethodSemantics = 0x18,\r\n MethodImpl = 0x19,\r\n ModuleRef = 0x1A,\r\n TypeSpec = 0x1B,\r\n ImplMap = 0x1C,\r\n FieldRVA = 0x1D,\r\n ENCLog = 0x1E,\r\n ENCMap = 0x1F,\r\n Assembly = 0x20,\r\n AssemblyProcessor = 0x21,\r\n AssemblyOS = 0x22,\r\n AssemblyRef = 0x23,\r\n AssemblyRefProcessor = 0x24,\r\n AssemblyRefOS = 0x25,\r\n File = 0x26,\r\n ExportedType = 0x27,\r\n ManifestResource = 0x28,\r\n NestedClass = 0x29,\r\n GenericParam = 0x2A,\r\n MethodSpec = 0x2B,\r\n GenericParamConstraint = 0x2C,\r\n\r\n String = 0x70,\r\n}\r\n\r\nexport const NumberOfMdTables = 45;\r\n\r\nexport enum MetadataCodedTokenIndex {\r\n TypeDefOrRef = 0,\r\n HasConstant = 1,\r\n HasCustomAttribute = 2,\r\n HasFieldMarshall = 3,\r\n HasDeclSecurity = 4,\r\n MemberRefParent = 5,\r\n HasSemantics = 6,\r\n MethodDefOrRef = 7,\r\n MemberForwarded = 8,\r\n Implementation = 9,\r\n CustomAttributeType = 10,\r\n ResolutionScope = 11,\r\n TypeOrMethodDef = 12,\r\n}\r\n\r\nexport interface MetadataCodedTokenInfo {\r\n tagSize: number;\r\n tables: MetadataTableIndex[];\r\n}\r\n\r\nexport const ctc: MetadataCodedTokenInfo[] = [{\r\n tagSize: 2, tables: [ // TypeDefOrRef\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.TypeSpec,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // HasConstant\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.Param,\r\n MetadataTableIndex.Property,\r\n ]\r\n}, {\r\n tagSize: 5, tables: [ // HasCustomAttribute\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.Param,\r\n MetadataTableIndex.InterfaceImpl,\r\n MetadataTableIndex.MemberRef,\r\n MetadataTableIndex.Module,\r\n MetadataTableIndex.DeclSecurity,\r\n MetadataTableIndex.Property,\r\n MetadataTableIndex.Event,\r\n MetadataTableIndex.StandAloneSig,\r\n MetadataTableIndex.ModuleRef,\r\n MetadataTableIndex.TypeSpec,\r\n MetadataTableIndex.Assembly,\r\n MetadataTableIndex.AssemblyRef,\r\n MetadataTableIndex.File,\r\n MetadataTableIndex.ExportedType,\r\n MetadataTableIndex.ManifestResource,\r\n MetadataTableIndex.GenericParam,\r\n MetadataTableIndex.GenericParamConstraint,\r\n MetadataTableIndex.MethodSpec,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // HasFieldMarshall\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.Param,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // HasDeclSecurity\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.Assembly,\r\n ]\r\n}, {\r\n tagSize: 3, tables: [ // MemberRefParent\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.ModuleRef,\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.TypeSpec,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // HasSemantics\r\n MetadataTableIndex.Event,\r\n MetadataTableIndex.Property,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // MethodDefOrRef\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.MemberRef,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // MemberForwarded\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.MethodDef,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // Implementation\r\n MetadataTableIndex.File,\r\n MetadataTableIndex.AssemblyRef,\r\n MetadataTableIndex.ExportedType,\r\n ]\r\n}, {\r\n tagSize: 3, tables: [ // CustomAttributeType\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.MemberRef,\r\n MetadataTableIndex.String,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // ResolutionScope\r\n MetadataTableIndex.Module,\r\n MetadataTableIndex.ModuleRef,\r\n MetadataTableIndex.AssemblyRef,\r\n MetadataTableIndex.TypeRef,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // TypeOrMethodDef\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.MethodDef,\r\n ]\r\n}];\r\n\r\nexport enum AssemblyHashAlgorithm {\r\n None = 0x0000,\r\n MD5 = 0x8003, // Reserved\r\n SHA1 = 0x8004,\r\n}\r\n\r\nexport enum CorAssemblyFlags {\r\n PublicKey = 0x0001,\r\n\r\n pa__Mask = 0x0070,\r\n pa_ProcessorArchitectureNone = 0x0000,\r\n pa_ProcessorArchitectureMsil = 0x0010,\r\n pa_ProcessorArchitectureX86 = 0x0020,\r\n pa_ProcessorArchitectureIa64 = 0x0030,\r\n pa_ProcessorArchitectureAmd64 = 0x0040,\r\n\r\n ProcessorArchitectureSpecified = 0x0080,\r\n\r\n EnableJitcompileTracking = 0x8000,\r\n DisableJitcompileOptimizer = 0x4000,\r\n\r\n Retargetable = 0x0100,\r\n}\r\n\r\nexport enum CorEventAttr {\r\n SpecialName = 0x0200,\r\n RtSpecialName = 0x0400,\r\n}\r\n\r\nexport enum CorFieldAttr {\r\n fa__Mask = 0x0007,\r\n fa_PrivateScope = 0x0000,\r\n fa_Private = 0x0001,\r\n fa_FamAndAssem = 0x0002,\r\n fa_Assembly = 0x0003,\r\n fa_Family = 0x0004,\r\n fa_FamOrAssem = 0x0005,\r\n fa_Public = 0x0006,\r\n\r\n Static = 0x0010,\r\n InitOnly = 0x0020,\r\n Literal = 0x0040,\r\n NotSerialized = 0x0080,\r\n\r\n SpecialName = 0x0200,\r\n\r\n PinvokeImpl = 0x2000,\r\n\r\n RtSpecialName = 0x0400,\r\n HasFieldMarshal = 0x1000,\r\n HasDefault = 0x8000,\r\n HasFieldRva = 0x0100,\r\n}\r\n\r\nexport enum CorFileFlags {\r\n ContainsMetaData = 0x0000,\r\n ContainsNoMetaData = 0x0001,\r\n}\r\n\r\nexport enum CorGenericParamAttr {\r\n v__Mask = 0x0003,\r\n v_NonVariant = 0x0000,\r\n v_Covariant = 0x0001,\r\n v_Contravariant = 0x0002,\r\n\r\n NoSpecialConstraint = 0x0000,\r\n ReferenceTypeConstraint = 0x0004,\r\n NotNullableValueTypeConstraint = 0x0008,\r\n DefaultConstructorConstraint = 0x0010,\r\n}\r\n\r\nexport enum CorPinvokeMap {\r\n NoMangle = 0x0001,\r\n cs__Mask = 0x0006,\r\n cs_CharSetNotSpec = 0x0000,\r\n cs_CharSetAnsi = 0x0002,\r\n cs_CharSetUnicode = 0x0004,\r\n cs_CharSetAuto = 0x0006,\r\n\r\n bf__Mask = 0x0030,\r\n bf_BestFitUseAssem = 0x0000,\r\n bf_BestFitEnabled = 0x0010,\r\n bf_BestFitDisabled = 0x0020,\r\n\r\n touc__Mask = 0x3000,\r\n touc_ThrowOnUnmappableCharUseAssem = 0x0000,\r\n touc_ThrowOnUnmappableCharEnabled = 0x1000,\r\n touc_ThrowOnUnmappableCharDisabled = 0x2000,\r\n\r\n SupportsLastError = 0x0040,\r\n\r\n cc__Mask = 0x0700,\r\n cc_CallConvWinapi = 0x0100,\r\n cc_CallConvCdecl = 0x0200,\r\n cc_CallConvStdcall = 0x0300,\r\n cc_CallConvThiscall = 0x0400,\r\n cc_CallConvFastcall = 0x0500,\r\n}\r\n\r\nexport enum CorManifestResourceFlags {\r\n v__Mask = 0x0007,\r\n v_Public = 0x0001,\r\n v_Private = 0x0002,\r\n}\r\n\r\nexport enum CorMethodAttr {\r\n ma__Mask = 0x0007,\r\n ma_PrivateScope = 0x0000,\r\n ma_Private = 0x0001,\r\n ma_FamAndAssem = 0x0002,\r\n ma_Assem = 0x0003,\r\n ma_Family = 0x0004,\r\n ma_FamOrAssem = 0x0005,\r\n ma_Public = 0x0006,\r\n\r\n Static = 0x0010,\r\n Final = 0x0020,\r\n Virtual = 0x0040,\r\n HideBySig = 0x0080,\r\n\r\n vl__Mask = 0x0100,\r\n vl_ReuseSlot = 0x0000,\r\n vl_NewSlot = 0x0100,\r\n\r\n CheckAccessOnOverride = 0x0200,\r\n Abstract = 0x0400,\r\n SpecialName = 0x0800,\r\n\r\n PInvokeImpl = 0x2000,\r\n UnmanagedExport = 0x0008,\r\n\r\n RtSpecialName = 0x1000,\r\n HasSecurity = 0x4000,\r\n RequireSecObject = 0x8000,\r\n}\r\n\r\nexport enum CorMethodImpl {\r\n ct__Mask = 0x0003,\r\n ct_IL = 0x0000,\r\n ct_Native = 0x0001,\r\n ct_OptIL = 0x0002,\r\n ct_Runtime = 0x0003,\r\n\r\n m__Mask = 0x0004,\r\n m_Unmanaged = 0x0004,\r\n m_Managed = 0x0000,\r\n\r\n ForwardRef = 0x0010,\r\n PreserveSig = 0x0080,\r\n\r\n InternalCall = 0x1000,\r\n\r\n Synchronized = 0x0020,\r\n NoInlining = 0x0008,\r\n}\r\n\r\nexport enum CorMethodSemanticsAttr {\r\n Setter = 0x0001,\r\n Getter = 0x0002,\r\n Other = 0x0004,\r\n AddOn = 0x0008,\r\n RemoveOn = 0x0010,\r\n Fire = 0x0020,\r\n}\r\n\r\nexport enum CorParamAttr {\r\n In = 0x0001,\r\n Out = 0x0002,\r\n Optional = 0x0010,\r\n\r\n HasDefault = 0x1000,\r\n HasFieldMarshal = 0x2000,\r\n\r\n Unused = 0xcfe0,\r\n}\r\n\r\nexport enum CorPropertyAttr {\r\n SpecialName = 0x0200,\r\n\r\n RtSpecialName = 0x0400,\r\n HasDefault = 0x1000,\r\n\r\n Unused = 0xe9ff,\r\n}\r\n\r\nexport enum CorTypeAttr {\r\n v__Mask = 0x00000007,\r\n v_NotPublic = 0x00000000,\r\n v_Public = 0x00000001,\r\n v_NestedPublic = 0x00000002,\r\n v_NestedPrivate = 0x00000003,\r\n v_NestedFamily = 0x00000004,\r\n v_NestedAssembly = 0x00000005,\r\n v_NestedFamAndAssem = 0x00000006,\r\n v_NestedFamOrAssem = 0x00000007,\r\n\r\n l__Mask = 0x00000018,\r\n l_AutoLayout = 0x00000000,\r\n l_SequentialLayout = 0x00000008,\r\n l_ExplicitLayout = 0x00000010,\r\n\r\n cs__Mask = 0x00000060,\r\n cs_Class = 0x00000000,\r\n cs_Interface = 0x00000020,\r\n\r\n Abstract = 0x00000080,\r\n Sealed = 0x00000100,\r\n SpecialName = 0x00000400,\r\n\r\n Import = 0x00001000,\r\n Serializable = 0x00002000,\r\n WindowsRuntime = 0x00004000,\r\n\r\n sf__Mask = 0x00030000,\r\n sf_AnsiClass = 0x00000000,\r\n sf_UnicodeClass = 0x00010000,\r\n sf_AutoClass = 0x00020000,\r\n sf_CustomFormatClass = 0x00030000,\r\n CustomFormatMask = 0x00C00000,\r\n\r\n BeforeFieldInit = 0x00100000,\r\n Forwarder = 0x00200000,\r\n\r\n RtSpecialName = 0x00000800,\r\n HasSecurity = 0x00040000,\r\n}\r\n\r\nexport enum CorDeclSecurity {\r\n ActionNil = 0x0000,\r\n Request = 0x0001,\r\n Demand = 0x0002,\r\n Assert = 0x0003,\r\n Deny = 0x0004,\r\n PermitOnly = 0x0005,\r\n LinktimeCheck = 0x0006,\r\n InheritanceCheck = 0x0007,\r\n RequestMinimum = 0x0008,\r\n RequestOptional = 0x0009,\r\n RequestRefuse = 0x000a,\r\n PrejitGrant = 0x000b,\r\n PrejitDenied = 0x000c,\r\n NonCasDemand = 0x000d,\r\n NonCasLinkDemand = 0x000e,\r\n NonCasInheritance = 0x000f,\r\n}\r\n\r\nexport enum CorElementType {\r\n End = 0x00,\r\n Void = 0x01,\r\n Boolean = 0x02,\r\n Char = 0x03,\r\n I1 = 0x04,\r\n U1 = 0x05,\r\n I2 = 0x06,\r\n U2 = 0x07,\r\n I4 = 0x08,\r\n U4 = 0x09,\r\n I8 = 0x0A,\r\n U8 = 0x0B,\r\n R4 = 0x0C,\r\n R8 = 0x0D,\r\n String = 0x0E,\r\n\r\n Ptr = 0x0F,\r\n ByRef = 0x10,\r\n\r\n ValueType = 0x11,\r\n Class = 0x12,\r\n Var = 0x13,\r\n Array = 0x14,\r\n GenericInst = 0x15,\r\n TypedByRef = 0x16,\r\n\r\n I = 0x18,\r\n U = 0x19,\r\n FnPtr = 0x1B,\r\n Object = 0x1C,\r\n SzArray = 0x1D,\r\n\r\n MVar = 0x1E,\r\n\r\n CModReqd = 0x1F,\r\n CModOpt = 0x20,\r\n Internal = 0x21,\r\n\r\n Modifier = 0x40,\r\n Sentinel = 0x01 | Modifier,\r\n Pinned = 0x05 | Modifier,\r\n R4HFA = 0x06 | Modifier,\r\n R8HFA = 0x07 | Modifier,\r\n}\r\n","import * as S from \"../pe/structures\";\r\n\r\nexport function formatU1RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 2);\r\n}\r\n\r\nexport function formatU2RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 4);\r\n}\r\n\r\nexport function formatU4RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 8);\r\n}\r\n\r\nexport function formatU1Hex(d: number): string {\r\n return `${formatU1RawHex(d)}h`;\r\n}\r\n\r\nexport function formatU2Hex(d: number): string {\r\n return `${formatU2RawHex(d)}h`;\r\n}\r\n\r\nexport function formatU4Hex(d: number): string {\r\n return `${formatU4RawHex(d)}h`;\r\n}\r\n\r\nexport function formatHexDec(d: number): string {\r\n return `${d.toString(16).toUpperCase()}h (${d.toLocaleString()})`;\r\n}\r\n\r\nexport function formatDec(v: number): string {\r\n return v.toLocaleString();\r\n}\r\n\r\nexport function formatBytes(bytes: Uint8Array, lineWidth: number = 16): string[] {\r\n let lines: string[] = [];\r\n for (let start = 0; start < bytes.length; start += lineWidth) {\r\n const line = Array.from(bytes.subarray(start, start + lineWidth))\r\n .map(b => formatU1RawHex(b)).join(\"-\");\r\n lines.push(line);\r\n }\r\n return lines;\r\n}\r\n\r\nexport function formatStructTitle(s: S.FileData, title: string): string {\r\n return `${title} [${formatU4Hex(s._offset)} - ${formatU4Hex(s._offset + s._size)} : ${formatHexDec(s._size)}]`;\r\n}\r\n\r\nexport function formatU1Field(name: string, f: S.U1Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 1, showDec);\r\n}\r\n\r\nexport function formatU2Field(name: string, f: S.U2Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 2, showDec);\r\n}\r\n\r\nexport function formatU4Field(name: string, f: S.U4Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 4, showDec);\r\n}\r\n\r\nexport function formatU8Field(name: string, f: S.U8Field, showDec?: boolean): W.StructItem {\r\n let value = `${formatU4RawHex(f.high)} ${formatU4Hex(f.low)}`;\r\n\r\n if (showDec && f.high < 0x1FFFFF) {\r\n const long = f.high * 0x100000000 + f.low;\r\n value += ` (${formatDec(long)})`;\r\n }\r\n\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value,\r\n };\r\n}\r\n\r\nexport function formatCompressedUIntField(name: string, f: S.CompressedUIntField): W.StructItem {\r\n return formatUIntField(name, f, f._size, true);\r\n}\r\n\r\nexport function formatBytesField(name: string, f: S.Field): W.StructItem {\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: \"\",\r\n };\r\n}\r\n\r\nexport function formatStringField(name: string, f: S.StringField): W.StructItem {\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: `\"${f.value}\"`,\r\n };\r\n}\r\n\r\nexport function formatGuidField(name: string, f: S.Field): W.StructItem {\r\n const b = (n: number) => formatU1RawHex(f.data[n]);\r\n const value = \"{\" + b(3) + b(2) + b(1) + b(0) + \"-\"\r\n + b(5) + b(4) + \"-\" + b(7) + b(6) + \"-\" + b(8) + b(9) + \"-\"\r\n + b(10) + b(11) + b(12) + b(13) + b(14) + b(15) + \"}\";\r\n\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value,\r\n };\r\n}\r\n\r\nfunction padZeroLeft(str: string, len: number): string {\r\n if (str.length < len) {\r\n return \"0\".repeat(len - str.length) + str;\r\n } else {\r\n return str;\r\n }\r\n}\r\n\r\nfunction formatUIntField(name: string, f: S.UIntField, sz: number, showDec?: boolean): W.StructItem {\r\n let hex: string;\r\n switch (sz) {\r\n case 1: hex = formatU1Hex(f.value); break;\r\n case 2: hex = formatU2Hex(f.value); break;\r\n case 4: hex = formatU4Hex(f.value); break;\r\n default: hex = f.value.toString(16).toUpperCase(); break;\r\n }\r\n\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: showDec ? `${hex} (${formatDec(f.value)})` : hex,\r\n }\r\n}\r\n","export function calculatePadding(dataSize: number, align: number = 4): number {\n const r = dataSize % align;\n if (r == 0) {\n return 0;\n } else {\n return align - r;\n }\n}\n\nexport function count1(n: number) {\n let c = 0;\n for (let i = 0, mask = 1; i < 32; i++ , mask <<= 1) {\n if (n & mask)\n c++;\n }\n return c;\n}\n\nexport function isSetLong(high: number, low: number, bit: number): boolean {\n return bit >= 0 && bit < 64 &&\n (bit < 32 && ((low & (1 << bit)) != 0)) ||\n (bit >= 32 && (high & (1 << (bit - 32))) != 0);\n}\n\nexport function decompressUint(data: Uint8Array): number {\n if ((data[0] & 0x80) == 0 && data.buffer.byteLength == 1)\n return data[0];\n else if ((data[0] & 0xC0) == 0x80 && data.buffer.byteLength == 2)\n return (data[0] & 0x3F) << 8 | data[1];\n else if ((data[0] & 0xE0) == 0xC0 && data.buffer.byteLength == 4)\n return (data[0] & 0x1F) << 24 | data[1] << 16 | data[2] << 8 | data[3];\n else\n throw new RangeError();\n}\n\nexport function decompressInt(data: Uint8Array): number {\n const u = decompressUint(data);\n if ((u & 0x00000001) == 0)\n return (u >> 1);\n\n const fb = data[0];\n if ((fb & 0x80) == 0)\n return (u >> 1) | 0xFFFFFFC0;\n else if ((fb & 0xC0) == 0x80)\n return (u >> 1) | 0xFFFFE000;\n else if ((fb & 0xE0) == 0xC0)\n return (u >> 1) | 0xF0000000;\n else\n throw new RangeError();\n}\n\nexport function getCompressedIntSize(firstByte: number): number {\n if ((firstByte & 0xFFFFFF00) != 0)\n throw new RangeError();\n else if ((firstByte & 0x80) == 0)\n return 1;\n else if ((firstByte & 0xC0) == 0x80)\n return 2;\n else if ((firstByte & 0xE0) == 0xC0)\n return 4;\n else\n throw new RangeError();\n}","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\n\r\nexport function generateNavList(pe: PEImage): W.NavData[] {\r\n let navList: W.NavData[] = [generateHeadersNavData(pe)];\r\n\r\n const navMD = generateMDHeadersNavData(pe);\r\n if (navMD) navList.push(navMD);\r\n\r\n return navList;\r\n}\r\n\r\nfunction generateHeadersNavData(pe: PEImage): W.NavData {\r\n const pageID = W.PageID.HEADERS;\r\n\r\n return {\r\n target: { pageID, title: W.KnownTitle.HEADERS },\r\n children: [{\r\n target: { pageID, title: W.KnownTitle.DOS_HEADER, elemID: W.KnownElemID.DOS_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.PE_SIGNATURE, elemID: W.KnownElemID.PE_SIGNATURE }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.FILE_HEADER, elemID: W.KnownElemID.FILE_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.OPTIONAL_HEADER, elemID: W.KnownElemID.OPTIONAL_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.DATA_DIRECTORIES, elemID: W.KnownElemID.DATA_DIRECTORIES }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.SECTION_HEADERS, elemID: W.KnownElemID.SECTION_HEADERS }\r\n }]\r\n };\r\n}\r\n\r\nfunction generateMDHeadersNavData(pe: PEImage): W.NavData | undefined {\r\n const pageID = W.PageID.MD_HEADERS;\r\n\r\n if (!pe.isManaged()) return undefined;\r\n\r\n let children: W.NavData[] = [{\r\n target: { pageID, title: W.KnownTitle.CLI_HEADER, elemID: W.KnownElemID.CLI_HEADER }\r\n }];\r\n\r\n if (pe.hasMetadata()) {\r\n children.push({\r\n target: { pageID, title: W.KnownTitle.MD_ROOT, elemID: W.KnownElemID.MD_ROOT }\r\n });\r\n children.push({\r\n target: { pageID, title: W.KnownTitle.MDS_HEADERS, elemID: W.KnownElemID.MDS_HEADERS }\r\n });\r\n }\r\n\r\n if (pe.hasStrongNameSignature()) {\r\n children.push({\r\n target: { pageID, title: W.KnownTitle.SN_SIG, elemID: W.KnownElemID.SN_SIG }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.Strings)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_STRINGS, title: W.KnownTitle.MDS_STRINGS, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.US)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_US, title: W.KnownTitle.MDS_US, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.GUID)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_GUID, title: W.KnownTitle.MDS_GUID, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.Blob)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_BLOB, title: W.KnownTitle.MDS_BLOB, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.Table)) {\r\n children.push(generateMDTablesNavData(pe));\r\n }\r\n\r\n return {\r\n target: { pageID, title: W.KnownTitle.MD_HEADERS },\r\n children\r\n };\r\n}\r\n\r\nfunction generateMDTablesNavData(pe: PEImage): W.NavData {\r\n const pageID = W.PageID.MDS_TABLE;\r\n const h = pe.getMetadataTableHeader();\r\n\r\n let children: W.NavData[] = [];\r\n const ti = F.MetadataTableIndex;\r\n const buildMdtNav = (t: F.MetadataTableIndex) => ({\r\n target: {\r\n pageID: W.PageID.MDT_TBL,\r\n title: `${ti[t]} (${pe.getMetadataTableRows(t).toLocaleString()})`,\r\n subID: ti[t],\r\n pageNum: 0\r\n }\r\n } as W.NavData);\r\n\r\n for (let tid = 0; tid < F.NumberOfMdTables; tid++) {\r\n if (pe.isMetadataTableValid(tid)) {\r\n children.push(buildMdtNav(tid));\r\n }\r\n }\r\n\r\n return {\r\n target: { pageID, title: W.KnownTitle.MDS_TABLE },\r\n children\r\n };\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\nimport * as U from \"../pe/utils\";\r\nimport * as FM from \"./formatter\";\r\nimport * as G from \"./generator\";\r\n\r\nexport function generateMdsStringsPageData(pe: PEImage,\r\n cache: G.GeneratorCache, cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n\r\n checkAndBuildCacheForMdsStrings(pe, cache, cfg);\r\n const items = cache.mdsStrings && cache.mdsStrings.pages[pgNum];\r\n\r\n const titleOf = (i: number) => `#String [${FM.formatHexDec(i)}]`;\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_STRINGS,\r\n title: W.KnownTitle.MDS_STRINGS,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_STRINGS,\r\n groups: [{\r\n title: \"\",\r\n items: items && items.map(index =>\r\n FM.formatStringField(titleOf(index), pe.getMdsStringsItem(index)!)\r\n )\r\n }]\r\n },\r\n paging: {\r\n currentPageNumber: pgNum,\r\n pageNavList: cache.mdsStrings!.pages.map((v, i) => ({\r\n title: `Page [${i + 1}] (${titleOf(v[0])} - ${titleOf(v[v.length - 1])}})`,\r\n pageID: W.PageID.MDS_STRINGS,\r\n pageNum: i\r\n }))\r\n }\r\n };\r\n}\r\n\r\nexport function generateMdsUSPageData(pe: PEImage,\r\n cache: G.GeneratorCache, cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n\r\n checkAndBuildCacheForMdsUS(pe, cache, cfg);\r\n const items = cache.mdsUS && cache.mdsUS.pages[pgNum];\r\n\r\n const titleOf = (i: number) => `#US [${FM.formatHexDec(i)}]`;\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_US,\r\n title: W.KnownTitle.MDS_US,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_US,\r\n groups: items && items.map(index => {\r\n const item = pe.getMdsUSItem(index)!;\r\n return {\r\n title: titleOf(index),\r\n items: [\r\n FM.formatCompressedUIntField(\"Size\", item.Size),\r\n FM.formatStringField(\"Value\", item.Value),\r\n FM.formatBytesField(\"Suffix\", item.Suffix),\r\n ]\r\n }\r\n })\r\n },\r\n paging: {\r\n currentPageNumber: pgNum,\r\n pageNavList: cache.mdsUS!.pages.map((v, i) => ({\r\n title: `Page [${i + 1}] (${titleOf(v[0])} - ${titleOf(v[v.length - 1])}})`,\r\n pageID: W.PageID.MDS_US,\r\n pageNum: i\r\n }))\r\n }\r\n };\r\n}\r\n\r\nexport function generateMdsBlobPageData(pe: PEImage,\r\n cache: G.GeneratorCache, cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n\r\n checkAndBuildCacheForMdsBlob(pe, cache, cfg);\r\n const items = cache.mdsBlob && cache.mdsBlob.pages[pgNum];\r\n\r\n const titleOf = (i: number) => `#Blob [${FM.formatHexDec(i)}]`;\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_BLOB,\r\n title: W.KnownTitle.MDS_BLOB,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_BLOB,\r\n groups: items && items.map(index => {\r\n const item = pe.getMdsBlobItem(index)!;\r\n return {\r\n title: titleOf(index),\r\n items: [\r\n FM.formatCompressedUIntField(\"Size\", item.Size),\r\n FM.formatBytesField(\"Value\", item.Value),\r\n ]\r\n }\r\n })\r\n },\r\n paging: {\r\n currentPageNumber: pgNum,\r\n pageNavList: cache.mdsBlob!.pages.map((v, i) => ({\r\n title: `Page [${i + 1}] (${titleOf(v[0])} - ${titleOf(v[v.length - 1])}})`,\r\n pageID: W.PageID.MDS_BLOB,\r\n pageNum: i\r\n }))\r\n }\r\n };\r\n}\r\n\r\nexport function generateMdsGuidPageData(pe: PEImage): W.PagedItemListPageData {\r\n const titleOf = (i: number) => `#GUID[${FM.formatHexDec(i)}]`;\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_GUID,\r\n title: W.KnownTitle.MDS_GUID,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_GUID,\r\n groups: [{\r\n title: \"\",\r\n items: pe.getMdsGuidItems()!.items.map((v, i) =>\r\n FM.formatGuidField(titleOf(i + 1), v))\r\n }]\r\n },\r\n };\r\n}\r\n\r\nfunction checkAndBuildCacheForMdsStrings(pe: PEImage, cache: G.GeneratorCache, cfg: G.GeneratorConfig): void {\r\n if (cache.mdsStrings) return;\r\n\r\n const mdRoot = pe.getMetadataRoot();\r\n if (!mdRoot) return;\r\n\r\n const sh = pe.getMetadataStreamHeader(F.MetadataStreamName.Strings);\r\n if (!sh) return;\r\n\r\n let indexes: number[] = [0];\r\n const base = mdRoot._offset + sh.Offset.value;\r\n for (let p = 1; p < sh.Size.value; p++) {\r\n if (pe.getU1(base + p - 1) == 0) {\r\n indexes.push(p);\r\n }\r\n }\r\n\r\n cache.mdsStrings = {\r\n pages: putIndexToPages(indexes, cfg.mdsOffsetListPageSize)\r\n };\r\n}\r\n\r\nfunction checkAndBuildCacheForMdsUS(pe: PEImage, cache: G.GeneratorCache, cfg: G.GeneratorConfig): void {\r\n if (cache.mdsUS) return;\r\n\r\n const mdRoot = pe.getMetadataRoot();\r\n if (!mdRoot) return;\r\n\r\n const sh = pe.getMetadataStreamHeader(F.MetadataStreamName.US);\r\n if (!sh) return;\r\n\r\n const indexes = getBlobIndexes(pe, mdRoot._offset + sh.Offset.value, sh.Size.value);\r\n\r\n cache.mdsUS = {\r\n pages: putIndexToPages(indexes, cfg.mdsOffsetListPageSize)\r\n };\r\n}\r\n\r\nfunction checkAndBuildCacheForMdsBlob(pe: PEImage, cache: G.GeneratorCache, cfg: G.GeneratorConfig): void {\r\n if (cache.mdsBlob) return;\r\n\r\n const mdRoot = pe.getMetadataRoot();\r\n if (!mdRoot) return;\r\n\r\n const sh = pe.getMetadataStreamHeader(F.MetadataStreamName.Blob);\r\n if (!sh) return;\r\n\r\n const indexes = getBlobIndexes(pe, mdRoot._offset + sh.Offset.value, sh.Size.value);\r\n\r\n cache.mdsBlob = {\r\n pages: putIndexToPages(indexes, cfg.mdsOffsetListPageSize)\r\n };\r\n}\r\n\r\nfunction getBlobIndexes(pe: PEImage, base: number, size: number): number[] {\r\n let indexes: number[] = [];\r\n let p = 0;\r\n\r\n while (p < size) {\r\n indexes.push(p);\r\n const dtsz = U.getCompressedIntSize(pe.getU1(base + p));\r\n const szval = U.decompressUint(pe.getData(base + p, dtsz));\r\n p += szval + dtsz;\r\n }\r\n\r\n return indexes;\r\n}\r\n\r\nfunction putIndexToPages(indexes: number[], pageSize: number): G.MdsOffsetListPageCache[] {\r\n let pages: G.MdsOffsetListPageCache[] = [];\r\n let pageItems: G.MdsOffsetListPageCache = [];\r\n\r\n for (let pStart = 0, pEnd = 0; pStart < indexes.length; pStart = pEnd) {\r\n while (indexes[pEnd] - indexes[pStart] < pageSize\r\n && pEnd < indexes.length) {\r\n pageItems.push(indexes[pEnd++]);\r\n }\r\n pages.push(pageItems.slice());\r\n pageItems = [];\r\n }\r\n\r\n return pages;\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\nimport * as S from \"../pe/structures\";\r\nimport * as FM from \"./formatter\";\r\nimport * as G from \"./generator\";\r\n\r\nexport function generateMdsTablePageData(pe: PEImage): W.MdsTablePageData {\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_TABLE,\r\n title: W.KnownTitle.MDS_TABLE,\r\n },\r\n tableHeader: generateMDTableHeader(pe),\r\n tableInfo: generateMDTableList(pe),\r\n };\r\n}\r\n\r\nfunction generateMDTableHeader(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.MDT_HEADER,\r\n elemID: W.KnownElemID.MDT_HEADER,\r\n };\r\n\r\n const h = pe.getMetadataTableHeader();\r\n if (!h) return s;\r\n\r\n s.groups = [{\r\n title: \"\",\r\n items: [\r\n FM.formatU4Field(\"Reserved\", h.Reserved),\r\n FM.formatU1Field(\"MajorVersion\", h.MajorVersion, true),\r\n FM.formatU1Field(\"MinorVersion\", h.MinorVersion, true),\r\n FM.formatU1Field(\"HeapSizes\", h.HeapSizes),\r\n FM.formatU1Field(\"Reserved2\", h.Reserved2),\r\n FM.formatU8Field(\"Valid\", h.Valid),\r\n FM.formatU8Field(\"Sorted\", h.Sorted),\r\n ]\r\n }, {\r\n title: \"Rows\",\r\n items: h.Rows.items.map((v, i) => FM.formatU4Field(`Rows[${i}]`, v, true))\r\n }];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateMDTableList(pe: PEImage): W.MdTableInfo[] {\r\n let s: W.MdTableInfo[] = [];\r\n for (let id = 0; id < F.NumberOfMdTables; id++) {\r\n s.push({\r\n index: `${FM.formatU1Hex(id)} (${FM.formatDec(id)})`,\r\n name: F.MetadataTableIndex[id],\r\n valid: pe.isMetadataTableValid(id),\r\n sorted: pe.isMetadataTableSorted(id),\r\n rows: FM.formatDec(pe.getMetadataTableRows(id)),\r\n });\r\n }\r\n return s;\r\n}\r\n\r\nexport function generateMdtPageData(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n const ti = F.MetadataTableIndex;\r\n const title = ti[tid] + \" Table\";\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDT_TBL,\r\n subID: ti[tid],\r\n title,\r\n },\r\n items: generateTalbeItems(pe, tid, cfg, pgNum, title),\r\n paging: generateMdtPaging(pe, tid, cfg, pgNum)\r\n };\r\n}\r\n\r\nfunction generateTalbeItems(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number,\r\n title: string): W.GroupedStruct {\r\n const { start, end } = getRidOnPage(pe, tid, cfg, pgNum);\r\n\r\n let loader: (rid: number) => S.FileData;\r\n let builder: (item: S.FileData) => W.StructItem[];\r\n\r\n switch (tid) {\r\n case F.MetadataTableIndex.Module:\r\n loader = pe.getMdtModuleItem.bind(pe);\r\n builder = generateMdtModuleItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.TypeRef:\r\n loader = pe.getMdtTypeRefItem.bind(pe);\r\n builder = generateMdtTypeRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.TypeDef:\r\n loader = pe.getMdtTypeDefItem.bind(pe);\r\n builder = generateMdtTypeDefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldPtr:\r\n loader = pe.getMdtFieldPtrItem.bind(pe);\r\n builder = generateMdtFieldPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Field:\r\n loader = pe.getMdtFieldItem.bind(pe);\r\n builder = generateMdtFieldItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodPtr:\r\n loader = pe.getMdtMethodPtrItem.bind(pe);\r\n builder = generateMdtMethodPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodDef:\r\n loader = pe.getMdtMethodDefItem.bind(pe);\r\n builder = generateMdtMethodDefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ParamPtr:\r\n loader = pe.getMdtParamPtrItem.bind(pe);\r\n builder = generateMdtParamPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Param:\r\n loader = pe.getMdtParamItem.bind(pe);\r\n builder = generateMdtParamItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.InterfaceImpl:\r\n loader = pe.getMdtInterfaceImplItem.bind(pe);\r\n builder = generateMdtInterfaceImplItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MemberRef:\r\n loader = pe.getMdtMemberRefItem.bind(pe);\r\n builder = generateMdtMemberRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Constant:\r\n loader = pe.getMdtConstantItem.bind(pe);\r\n builder = generateMdtConstantItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.CustomAttribute:\r\n loader = pe.getMdtCustomAttributeItem.bind(pe);\r\n builder = generateMdtCustomAttributeItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldMarshal:\r\n loader = pe.getMdtFieldMarshalItem.bind(pe);\r\n builder = generateMdtFieldMarshalItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.DeclSecurity:\r\n loader = pe.getMdtDeclSecurityItem.bind(pe);\r\n builder = generateMdtDeclSecurityItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ClassLayout:\r\n loader = pe.getMdtClassLayoutItem.bind(pe);\r\n builder = generateMdtClassLayoutItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldLayout:\r\n loader = pe.getMdtFieldLayoutItem.bind(pe);\r\n builder = generateMdtFieldLayoutItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.StandAloneSig:\r\n loader = pe.getMdtStandAloneSigItem.bind(pe);\r\n builder = generateMdtStandAloneSigItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.EventMap:\r\n loader = pe.getMdtEventMapItem.bind(pe);\r\n builder = generateMdtEventMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.EventPtr:\r\n loader = pe.getMdtEventPtrItem.bind(pe);\r\n builder = generateMdtEventPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Event:\r\n loader = pe.getMdtEventItem.bind(pe);\r\n builder = generateMdtEventItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.PropertyMap:\r\n loader = pe.getMdtPropertyMapItem.bind(pe);\r\n builder = generateMdtPropertyMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.PropertyPtr:\r\n loader = pe.getMdtPropertyPtrItem.bind(pe);\r\n builder = generateMdtPropertyPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Property:\r\n loader = pe.getMdtPropertyItem.bind(pe);\r\n builder = generateMdtPropertyItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodSemantics:\r\n loader = pe.getMdtMethodSemanticsItem.bind(pe);\r\n builder = generateMdtMethodSemanticsItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodImpl:\r\n loader = pe.getMdtMethodImplItem.bind(pe);\r\n builder = generateMdtMethodImplItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ModuleRef:\r\n loader = pe.getMdtModuleRefItem.bind(pe);\r\n builder = generateMdtModuleRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.TypeSpec:\r\n loader = pe.getMdtTypeSpecItem.bind(pe);\r\n builder = generateMdtTypeSpecItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ImplMap:\r\n loader = pe.getMdtImplMapItem.bind(pe);\r\n builder = generateMdtImplMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldRVA:\r\n loader = pe.getMdtFieldRVAItem.bind(pe);\r\n builder = generateMdtFieldRVAItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ENCLog:\r\n loader = pe.getMdtENCLogItem.bind(pe);\r\n builder = generateMdtENCLogItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ENCMap:\r\n loader = pe.getMdtENCMapItem.bind(pe);\r\n builder = generateMdtENCMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Assembly:\r\n loader = pe.getMdtAssemblyItem.bind(pe);\r\n builder = generateMdtAssemblyItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyProcessor:\r\n loader = pe.getMdtAssemblyProcessorItem.bind(pe);\r\n builder = generateMdtAssemblyProcessorItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyOS:\r\n loader = pe.getMdtAssemblyOSItem.bind(pe);\r\n builder = generateMdtAssemblyOSItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyRef:\r\n loader = pe.getMdtAssemblyRefItem.bind(pe);\r\n builder = generateMdtAssemblyRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyRefProcessor:\r\n loader = pe.getMdtAssemblyRefProcessorItem.bind(pe);\r\n builder = generateMdtAssemblyRefProcessorItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyRefOS:\r\n loader = pe.getMdtAssemblyRefOSItem.bind(pe);\r\n builder = generateMdtAssemblyRefOSItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.File:\r\n loader = pe.getMdtFileItem.bind(pe);\r\n builder = generateMdtFileItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ExportedType:\r\n loader = pe.getMdtExportedTypeItem.bind(pe);\r\n builder = generateMdtExportedTypeItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ManifestResource:\r\n loader = pe.getMdtManifestResourceItem.bind(pe);\r\n builder = generateMdtManifestResourceItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.NestedClass:\r\n loader = pe.getMdtNestedClassItem.bind(pe);\r\n builder = generateMdtNestedClassItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.GenericParam:\r\n loader = pe.getMdtGenericParamItem.bind(pe);\r\n builder = generateMdtGenericParamItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodSpec:\r\n loader = pe.getMdtMethodSpecItem.bind(pe);\r\n builder = generateMdtMethodSpecItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.GenericParamConstraint:\r\n loader = pe.getMdtGenericParamConstraintItem.bind(pe);\r\n builder = generateMdtGenericParamConstraintItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n default:\r\n return { title };\r\n }\r\n\r\n return generateSignleMdtTableItems(pe, tid, title, start, end, loader, builder);\r\n}\r\n\r\nfunction generateSignleMdtTableItems(\r\n pe: PEImage, tid: F.MetadataTableIndex, title: string, start: number, end: number,\r\n loader: (rid: number) => T,\r\n builder: (item: T) => W.StructItem[]): W.GroupedStruct {\r\n let items: T[] = [];\r\n for (let rid = start; rid <= end; rid++) {\r\n items.push(loader(rid));\r\n }\r\n\r\n return {\r\n title,\r\n groups: items.map((v, i) => ({\r\n title: `${F.MetadataTableIndex[tid]} [${FM.formatHexDec(start + i)}]`,\r\n items: builder(v)\r\n }))\r\n };\r\n}\r\n\r\nfunction generateMdtModuleItems(item: S.MdtModuleItem): W.StructItem[] {\r\n return [\r\n FM.formatU2Field(\"Generation\", item.Generation),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Mvid\", item.Mvid),\r\n FM.formatU4Field(\"EncId\", item.EncId),\r\n FM.formatU4Field(\"EncBaseId\", item.EncBaseId),\r\n ];\r\n}\r\n\r\nfunction generateMdtTypeRefItems(item: S.MdtTypeRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"ResolutionScope\", item.ResolutionScope),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Namespace\", item.Namespace),\r\n ];\r\n}\r\n\r\nfunction generateMdtTypeDefItems(item: S.MdtTypeDefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Namespace\", item.Namespace),\r\n FM.formatU4Field(\"Extends\", item.Extends),\r\n FM.formatU4Field(\"FieldList\", item.FieldList),\r\n FM.formatU4Field(\"MethodList\", item.MethodList),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldPtrItems(item: S.MdtFieldPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Field\", item.Field),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldItems(item: S.MdtFieldItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodPtrItems(item: S.MdtMethodPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Method\", item.Method),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodDefItems(item: S.MdtMethodDefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"RVA\", item.RVA),\r\n FM.formatU4Field(\"ImplFlags\", item.ImplFlags),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n FM.formatU4Field(\"ParamList\", item.ParamList),\r\n ];\r\n}\r\n\r\nfunction generateMdtParamPtrItems(item: S.MdtParamPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Param\", item.Param),\r\n ];\r\n}\r\n\r\nfunction generateMdtParamItems(item: S.MdtParamItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Sequence\", item.Sequence),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n ];\r\n}\r\n\r\nfunction generateMdtInterfaceImplItems(item: S.MdtInterfaceImplItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Class\", item.Class),\r\n FM.formatU4Field(\"Interface\", item.Interface),\r\n ];\r\n}\r\n\r\nfunction generateMdtMemberRefItems(item: S.MdtMemberRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Class\", item.Class),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtConstantItems(item: S.MdtConstantItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Type\", item.Type),\r\n FM.formatU4Field(\"PaddingZero\", item.PaddingZero),\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"Value\", item.Value),\r\n ];\r\n}\r\n\r\nfunction generateMdtCustomAttributeItems(item: S.MdtCustomAttributeItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"Type\", item.Type),\r\n FM.formatU4Field(\"Value\", item.Value),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldMarshalItems(item: S.MdtFieldMarshalItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"NativeType\", item.NativeType),\r\n ];\r\n}\r\n\r\nfunction generateMdtDeclSecurityItems(item: S.MdtDeclSecurityItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Action\", item.Action),\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"PermissionSet\", item.PermissionSet),\r\n ];\r\n}\r\n\r\nfunction generateMdtClassLayoutItems(item: S.MdtClassLayoutItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"PackingSize\", item.PackingSize),\r\n FM.formatU4Field(\"ClassSize\", item.ClassSize),\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldLayoutItems(item: S.MdtFieldLayoutItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"OffSet\", item.OffSet),\r\n FM.formatU4Field(\"Field\", item.Field),\r\n ];\r\n}\r\n\r\nfunction generateMdtStandAloneSigItems(item: S.MdtStandAloneSigItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtEventMapItems(item: S.MdtEventMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"EventList\", item.EventList),\r\n ];\r\n}\r\n\r\nfunction generateMdtEventPtrItems(item: S.MdtEventPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Generation\", item.Event),\r\n ];\r\n}\r\n\r\nfunction generateMdtEventItems(item: S.MdtEventItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"EventFlags\", item.EventFlags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"EventType\", item.EventType),\r\n ];\r\n}\r\n\r\nfunction generateMdtPropertyMapItems(item: S.MdtPropertyMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"PropertyList\", item.PropertyList),\r\n ];\r\n}\r\n\r\nfunction generateMdtPropertyPtrItems(item: S.MdtPropertyPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Property\", item.Property),\r\n ];\r\n}\r\n\r\nfunction generateMdtPropertyItems(item: S.MdtPropertyItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"PropFlags\", item.PropFlags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Type\", item.Type),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodSemanticsItems(item: S.MdtMethodSemanticsItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Semantic\", item.Semantic),\r\n FM.formatU4Field(\"Method\", item.Method),\r\n FM.formatU4Field(\"Association\", item.Association),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodImplItems(item: S.MdtMethodImplItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Class\", item.Class),\r\n FM.formatU4Field(\"MethodBody\", item.MethodBody),\r\n FM.formatU4Field(\"MethodDeclaration\", item.MethodDeclaration),\r\n ];\r\n}\r\n\r\nfunction generateMdtModuleRefItems(item: S.MdtModuleRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Name\", item.Name),\r\n ];\r\n}\r\n\r\nfunction generateMdtTypeSpecItems(item: S.MdtTypeSpecItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtImplMapItems(item: S.MdtImplMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"MappingFlags\", item.MappingFlags),\r\n FM.formatU4Field(\"MemberForwarded\", item.MemberForwarded),\r\n FM.formatU4Field(\"ImportName\", item.ImportName),\r\n FM.formatU4Field(\"ImportScope\", item.ImportScope),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldRVAItems(item: S.MdtFieldRVAItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"RVA\", item.RVA),\r\n FM.formatU4Field(\"Field\", item.Field),\r\n ];\r\n}\r\n\r\nfunction generateMdtENCLogItems(item: S.MdtENCLogItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Token\", item.Token),\r\n FM.formatU4Field(\"FuncCode\", item.FuncCode),\r\n ];\r\n}\r\n\r\nfunction generateMdtENCMapItems(item: S.MdtENCMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Token\", item.Token),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyItems(item: S.MdtAssemblyItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"HashAlgId\", item.HashAlgId),\r\n FM.formatU4Field(\"MajorVersion\", item.MajorVersion),\r\n FM.formatU4Field(\"MinorVersion\", item.MinorVersion),\r\n FM.formatU4Field(\"BuildNumber\", item.BuildNumber),\r\n FM.formatU4Field(\"RevisionNumber\", item.RevisionNumber),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"PublicKey\", item.PublicKey),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Locale\", item.Locale),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyProcessorItems(item: S.MdtAssemblyProcessorItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Processor\", item.Processor),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyOSItems(item: S.MdtAssemblyOSItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"OSPlatformID\", item.OSPlatformID),\r\n FM.formatU4Field(\"OSMajorVersion\", item.OSMajorVersion),\r\n FM.formatU4Field(\"OSMinorVersion\", item.OSMinorVersion),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyRefItems(item: S.MdtAssemblyRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"MajorVersion\", item.MajorVersion),\r\n FM.formatU4Field(\"MinorVersion\", item.MinorVersion),\r\n FM.formatU4Field(\"BuildNumber\", item.BuildNumber),\r\n FM.formatU4Field(\"RevisionNumber\", item.RevisionNumber),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"PublicKeyOrToken\", item.PublicKeyOrToken),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Locale\", item.Locale),\r\n FM.formatU4Field(\"HashValue\", item.HashValue),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyRefProcessorItems(item: S.MdtAssemblyRefProcessorItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Processor\", item.Processor),\r\n FM.formatU4Field(\"AssemblyRef\", item.AssemblyRef),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyRefOSItems(item: S.MdtAssemblyRefOSItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"OSPlatformID\", item.OSPlatformID),\r\n FM.formatU4Field(\"OSMajorVersion\", item.OSMajorVersion),\r\n FM.formatU4Field(\"OSMinorVersion\", item.OSMinorVersion),\r\n FM.formatU4Field(\"AssemblyRef\", item.AssemblyRef),\r\n ];\r\n}\r\n\r\nfunction generateMdtFileItems(item: S.MdtFileItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"HashValue\", item.HashValue),\r\n ];\r\n}\r\n\r\nfunction generateMdtExportedTypeItems(item: S.MdtExportedTypeItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"TypeDefId\", item.TypeDefId),\r\n FM.formatU4Field(\"TypeName\", item.TypeName),\r\n FM.formatU4Field(\"TypeNamespace\", item.TypeNamespace),\r\n FM.formatU4Field(\"Implementation\", item.Implementation),\r\n ];\r\n}\r\n\r\nfunction generateMdtManifestResourceItems(item: S.MdtManifestResourceItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Offset\", item.Offset),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Implementation\", item.Implementation),\r\n ];\r\n}\r\n\r\nfunction generateMdtNestedClassItems(item: S.MdtNestedClassItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"NestedClass\", item.NestedClass),\r\n FM.formatU4Field(\"EnclosingClass\", item.EnclosingClass),\r\n ];\r\n}\r\n\r\nfunction generateMdtGenericParamItems(item: S.MdtGenericParamItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Number\", item.Number),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Owner\", item.Owner),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodSpecItems(item: S.MdtMethodSpecItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Method\", item.Method),\r\n FM.formatU4Field(\"Instantiation\", item.Instantiation),\r\n ];\r\n}\r\n\r\nfunction generateMdtGenericParamConstraintItems(item: S.MdtGenericParamConstraintItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Owner\", item.Owner),\r\n FM.formatU4Field(\"Constraint\", item.Constraint),\r\n ];\r\n}\r\n\r\nfunction generateMdtPaging(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number): W.Paging {\r\n const paging: W.Paging = {\r\n currentPageNumber: pgNum,\r\n pageNavList: []\r\n };\r\n\r\n const psz = cfg.mdtPageSize;\r\n const rows = pe.getMetadataTableRows(tid);\r\n const pages = Math.floor((rows + psz - 1) / psz);\r\n for (let p = 0; p < pages; p++) {\r\n const tblName = F.MetadataTableIndex[tid];\r\n const titleOf = (r: number) => `${tblName}[${FM.formatHexDec(r)}]`;\r\n const { start, end } = getRidOnPage(pe, tid, cfg, p);\r\n const target: W.NavTarget = {\r\n title: `Page[${p + 1}] (${titleOf(start)} - ${titleOf(end)})`,\r\n pageID: W.PageID.MDT_TBL,\r\n subID: tblName,\r\n pageNum: p,\r\n };\r\n paging.pageNavList.push(target);\r\n }\r\n\r\n return paging;\r\n}\r\n\r\nfunction getRidOnPage(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number): { start: number, end: number } {\r\n const psz = cfg.mdtPageSize;\r\n const rows = pe.getMetadataTableRows(tid);\r\n const start = pgNum * psz + 1;\r\n let end = start + psz - 1;\r\n if (end > rows) end = rows;\r\n return { start, end };\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as FM from \"./formatter\";\r\n\r\nexport function generateMetadataHeadersPageData(pe: PEImage): W.MetadataHeadersPageData {\r\n return {\r\n nav: {\r\n pageID: W.PageID.MD_HEADERS,\r\n title: W.KnownTitle.MD_HEADERS,\r\n },\r\n cliHeader: generateCliHeader(pe),\r\n metadataRoot: generateMetadataRoot(pe),\r\n streamHeaders: generateMetadataStreamHeader(pe),\r\n snSignature: generateSNSignature(pe),\r\n };\r\n}\r\n\r\nfunction generateCliHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.CLI_HEADER,\r\n elemID: W.KnownElemID.CLI_HEADER,\r\n };\r\n\r\n const h = pe.getCliHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU4Field(\"cb\", h.cb, true),\r\n FM.formatU2Field(\"MajorRuntimeVersion\", h.MajorRuntimeVersion, true),\r\n FM.formatU2Field(\"MinorRuntimeVersion\", h.MinorRuntimeVersion, true),\r\n FM.formatU4Field(\"MetaData.VirtualAddress\", h.MetaData.VirtualAddress),\r\n FM.formatU4Field(\"MetaData.Size\", h.MetaData.Size, true),\r\n FM.formatU4Field(\"Flags\", h.Flags),\r\n FM.formatU4Field(\"EntryPointToken\", h.EntryPointToken),\r\n FM.formatU4Field(\"Resources.VirtualAddress\", h.Resources.VirtualAddress),\r\n FM.formatU4Field(\"Resources.Size\", h.Resources.Size, true),\r\n FM.formatU4Field(\"StrongNameSignature.VirtualAddress\", h.StrongNameSignature.VirtualAddress),\r\n FM.formatU4Field(\"StrongNameSignature.Size\", h.StrongNameSignature.Size, true),\r\n FM.formatU4Field(\"CodeManagerTable.VirtualAddress\", h.CodeManagerTable.VirtualAddress),\r\n FM.formatU4Field(\"CodeManagerTable.Size\", h.CodeManagerTable.Size, true),\r\n FM.formatU4Field(\"VTableFixups.VirtualAddress\", h.VTableFixups.VirtualAddress),\r\n FM.formatU4Field(\"VTableFixups.Size\", h.VTableFixups.Size, true),\r\n FM.formatU4Field(\"ExportAddressTableJumps.VirtualAddress\", h.ExportAddressTableJumps.VirtualAddress),\r\n FM.formatU4Field(\"ExportAddressTableJumps.Size\", h.ExportAddressTableJumps.Size, true),\r\n FM.formatU4Field(\"ManagedNativeHeader.VirtualAddress\", h.ManagedNativeHeader.VirtualAddress),\r\n FM.formatU4Field(\"ManagedNativeHeader.Size\", h.ManagedNativeHeader.Size, true),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateSNSignature(pe: PEImage): W.SimpleStruct | undefined {\r\n const d = pe.getStrongNameSignature();\r\n if (!d) return undefined;\r\n\r\n const s: W.SimpleStruct = {\r\n title: W.KnownTitle.SN_SIG,\r\n elemID: W.KnownElemID.SN_SIG,\r\n items: [FM.formatBytesField(\"Signature\", d)]\r\n };\r\n return s;\r\n}\r\n\r\nfunction generateMetadataRoot(pe: PEImage): W.SimpleStruct | undefined {\r\n const h = pe.getMetadataRoot();\r\n if (!h) return undefined;\r\n\r\n const s: W.SimpleStruct = {\r\n title: W.KnownTitle.MD_ROOT,\r\n elemID: W.KnownElemID.MD_ROOT,\r\n items: [\r\n FM.formatU4Field(\"Signature\", h.Signature),\r\n FM.formatU2Field(\"MajorVersion\", h.MajorVersion, true),\r\n FM.formatU2Field(\"MinorVersion\", h.MinorVersion, true),\r\n FM.formatU4Field(\"Reserved\", h.Reserved),\r\n FM.formatU4Field(\"VersionLength\", h.VersionLength, true),\r\n FM.formatStringField(\"VersionString\", h.VersionString),\r\n FM.formatBytesField(\"VersionPadding\", h.VersionPadding),\r\n FM.formatU2Field(\"Flags\", h.Flags),\r\n FM.formatU2Field(\"Streams\", h.Streams, true),\r\n ]\r\n };\r\n return s;\r\n}\r\n\r\nfunction generateMetadataStreamHeader(pe: PEImage): W.GroupedStruct | undefined {\r\n const h = pe.getMetadataStreamHeaders();\r\n if (!h) return undefined;\r\n\r\n const s: W.GroupedStruct = {\r\n title: W.KnownTitle.MDS_HEADERS,\r\n elemID: W.KnownElemID.MDS_HEADERS,\r\n groups: h.items.map((v, i) => ({\r\n title: `[${i}] (${v.Name.value})`,\r\n items: [\r\n FM.formatU4Field(\"Offset\", v.Offset),\r\n FM.formatU4Field(\"Size\", v.Size, true),\r\n FM.formatStringField(\"Name\", v.Name),\r\n FM.formatBytesField(\"Padding\", v.Padding),\r\n ]\r\n }))\r\n };\r\n return s;\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as S from \"../pe/structures\";\r\nimport * as F from \"../pe/image-flags\";\r\nimport * as FM from \"./formatter\";\r\n\r\nexport function generateHeadersPageData(pe: PEImage): W.HeadersPageData {\r\n return {\r\n nav: {\r\n pageID: W.PageID.HEADERS,\r\n title: W.KnownTitle.HEADERS,\r\n },\r\n dosHeader: generateDosHeader(pe),\r\n peSignature: generatePESignature(pe),\r\n fileHeader: generateFileHeader(pe),\r\n optionalHeader: generateOptionalHeader(pe),\r\n dataDirectories: generateDataDirectories(pe),\r\n sectionHeaders: generateSectionHeaders(pe),\r\n };\r\n}\r\n\r\nfunction generateDosHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.DOS_HEADER,\r\n elemID: W.KnownElemID.DOS_HEADER,\r\n };\r\n\r\n const h = pe.getDosHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU2Field(\"e_magic\", h.e_magic),\r\n FM.formatU2Field(\"e_cblp\", h.e_cblp),\r\n FM.formatU2Field(\"e_cp\", h.e_cp),\r\n FM.formatU2Field(\"e_crlc\", h.e_crlc),\r\n FM.formatU2Field(\"e_cparhdr\", h.e_cparhdr),\r\n FM.formatU2Field(\"e_minalloc\", h.e_minalloc),\r\n FM.formatU2Field(\"e_maxalloc\", h.e_maxalloc),\r\n FM.formatU2Field(\"e_ss\", h.e_ss),\r\n FM.formatU2Field(\"e_sp\", h.e_sp),\r\n FM.formatU2Field(\"e_csum\", h.e_csum),\r\n FM.formatU2Field(\"e_ip\", h.e_ip),\r\n FM.formatU2Field(\"e_cs\", h.e_cs),\r\n FM.formatU2Field(\"e_lfarlc\", h.e_lfarlc),\r\n FM.formatU2Field(\"e_ovno\", h.e_ovno),\r\n FM.formatBytesField(\"e_res\", h.e_res),\r\n FM.formatU2Field(\"e_oemid\", h.e_oemid),\r\n FM.formatU2Field(\"e_oeminfo\", h.e_oeminfo),\r\n FM.formatBytesField(\"e_res2\", h.e_res2),\r\n FM.formatU4Field(\"e_lfanew\", h.e_lfanew),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generatePESignature(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.PE_SIGNATURE,\r\n elemID: W.KnownElemID.PE_SIGNATURE,\r\n };\r\n\r\n const h = pe.getPESignature();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU4Field(\"PE Signature\", h),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateFileHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.FILE_HEADER,\r\n elemID: W.KnownElemID.FILE_HEADER,\r\n };\r\n\r\n const h = pe.getFileHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU2Field(\"Machine\", h.Machine),\r\n FM.formatU2Field(\"NumberOfSections\", h.NumberOfSections, true),\r\n FM.formatU4Field(\"TimeDateStamp\", h.TimeDateStamp),\r\n FM.formatU4Field(\"PointerToSymbolTable\", h.PointerToSymbolTable),\r\n FM.formatU4Field(\"NumberOfSymbols\", h.NumberOfSymbols, true),\r\n FM.formatU2Field(\"SizeOfOptionalHeader\", h.SizeOfOptionalHeader, true),\r\n FM.formatU2Field(\"Characteristics\", h.Characteristics),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateOptionalHeader(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.OPTIONAL_HEADER,\r\n elemID: W.KnownElemID.OPTIONAL_HEADER,\r\n };\r\n\r\n const h = pe.getOptionalHeader();\r\n if (!h) return s;\r\n\r\n switch (h.Magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC:\r\n s.title += \" (32-bit)\";\r\n fillOptionalHeader32Fields(s, h);\r\n break;\r\n\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC:\r\n s.title += \" (64-bit)\";\r\n fillOptionalHeader64Fields(s, h);\r\n break;\r\n }\r\n\r\n return s;\r\n}\r\n\r\nfunction fillOptionalHeader32Fields(s: W.GroupedStruct, h: S.ImageOptionalHeader32): void {\r\n s.groups = [{\r\n title: \"Standard Fields\",\r\n items: [\r\n FM.formatU2Field(\"Magic\", h.Magic),\r\n FM.formatU1Field(\"MajorLinkerVersion\", h.MajorLinkerVersion, true),\r\n FM.formatU1Field(\"MinorLinkerVersion\", h.MinorLinkerVersion, true),\r\n FM.formatU4Field(\"SizeOfCode\", h.SizeOfCode, true),\r\n FM.formatU4Field(\"SizeOfInitializedData\", h.SizeOfInitializedData, true),\r\n FM.formatU4Field(\"SizeOfUninitializedData\", h.SizeOfUninitializedData, true),\r\n FM.formatU4Field(\"AddressOfEntryPoint\", h.AddressOfEntryPoint),\r\n FM.formatU4Field(\"BaseOfCode\", h.BaseOfCode),\r\n FM.formatU4Field(\"BaseOfData\", h.BaseOfData),\r\n ],\r\n }, {\r\n title: \"NT-specified Fields\",\r\n items: [\r\n FM.formatU4Field(\"ImageBase\", h.ImageBase),\r\n FM.formatU4Field(\"SectionAlignment\", h.SectionAlignment, true),\r\n FM.formatU4Field(\"FileAlignment\", h.FileAlignment, true),\r\n FM.formatU2Field(\"MajorOperatingSystemVersion\", h.MajorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MinorOperatingSystemVersion\", h.MinorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MajorImageVersion\", h.MajorImageVersion, true),\r\n FM.formatU2Field(\"MinorImageVersion\", h.MinorImageVersion, true),\r\n FM.formatU2Field(\"MajorSubsystemVersion\", h.MajorSubsystemVersion, true),\r\n FM.formatU2Field(\"MinorSubsystemVersion\", h.MinorSubsystemVersion, true),\r\n FM.formatU4Field(\"Win32VersionValue\", h.Win32VersionValue, true),\r\n FM.formatU4Field(\"SizeOfImage\", h.SizeOfImage, true),\r\n FM.formatU4Field(\"SizeOfHeaders\", h.SizeOfHeaders, true),\r\n FM.formatU4Field(\"CheckSum\", h.CheckSum),\r\n FM.formatU2Field(\"Subsystem\", h.Subsystem),\r\n FM.formatU2Field(\"DllCharacteristics\", h.DllCharacteristics),\r\n FM.formatU4Field(\"SizeOfStackReserve\", h.SizeOfStackReserve, true),\r\n FM.formatU4Field(\"SizeOfStackCommit\", h.SizeOfStackCommit, true),\r\n FM.formatU4Field(\"SizeOfHeapReserve\", h.SizeOfHeapReserve, true),\r\n FM.formatU4Field(\"SizeOfHeapCommit\", h.SizeOfHeapCommit, true),\r\n FM.formatU4Field(\"LoaderFlags\", h.LoaderFlags),\r\n FM.formatU4Field(\"NumberOfRvaAndSizes\", h.NumberOfRvaAndSizes, true),\r\n ],\r\n }];\r\n}\r\n\r\nfunction fillOptionalHeader64Fields(s: W.GroupedStruct, h: S.ImageOptionalHeader64): void {\r\n s.groups = [{\r\n title: \"Standard Fields\",\r\n items: [\r\n FM.formatU2Field(\"Magic\", h.Magic),\r\n FM.formatU1Field(\"MajorLinkerVersion\", h.MajorLinkerVersion, true),\r\n FM.formatU1Field(\"MinorLinkerVersion\", h.MinorLinkerVersion, true),\r\n FM.formatU4Field(\"SizeOfCode\", h.SizeOfCode, true),\r\n FM.formatU4Field(\"SizeOfInitializedData\", h.SizeOfInitializedData, true),\r\n FM.formatU4Field(\"SizeOfUninitializedData\", h.SizeOfUninitializedData, true),\r\n FM.formatU4Field(\"AddressOfEntryPoint\", h.AddressOfEntryPoint),\r\n FM.formatU4Field(\"BaseOfCode\", h.BaseOfCode),\r\n ],\r\n }, {\r\n title: \"NT-specified Fields\",\r\n items: [\r\n FM.formatU8Field(\"ImageBase\", h.ImageBase),\r\n FM.formatU4Field(\"SectionAlignment\", h.SectionAlignment, true),\r\n FM.formatU4Field(\"FileAlignment\", h.FileAlignment, true),\r\n FM.formatU2Field(\"MajorOperatingSystemVersion\", h.MajorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MinorOperatingSystemVersion\", h.MinorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MajorImageVersion\", h.MajorImageVersion, true),\r\n FM.formatU2Field(\"MinorImageVersion\", h.MinorImageVersion, true),\r\n FM.formatU2Field(\"MajorSubsystemVersion\", h.MajorSubsystemVersion, true),\r\n FM.formatU2Field(\"MinorSubsystemVersion\", h.MinorSubsystemVersion, true),\r\n FM.formatU4Field(\"Win32VersionValue\", h.Win32VersionValue, true),\r\n FM.formatU4Field(\"SizeOfImage\", h.SizeOfImage, true),\r\n FM.formatU4Field(\"SizeOfHeaders\", h.SizeOfHeaders, true),\r\n FM.formatU4Field(\"CheckSum\", h.CheckSum),\r\n FM.formatU2Field(\"Subsystem\", h.Subsystem),\r\n FM.formatU2Field(\"DllCharacteristics\", h.DllCharacteristics),\r\n FM.formatU8Field(\"SizeOfStackReserve\", h.SizeOfStackReserve, true),\r\n FM.formatU8Field(\"SizeOfStackCommit\", h.SizeOfStackCommit, true),\r\n FM.formatU8Field(\"SizeOfHeapReserve\", h.SizeOfHeapReserve, true),\r\n FM.formatU8Field(\"SizeOfHeapCommit\", h.SizeOfHeapCommit, true),\r\n FM.formatU4Field(\"LoaderFlags\", h.LoaderFlags),\r\n FM.formatU4Field(\"NumberOfRvaAndSizes\", h.NumberOfRvaAndSizes, true),\r\n ],\r\n }];\r\n}\r\n\r\nfunction generateDataDirectories(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.DATA_DIRECTORIES,\r\n elemID: W.KnownElemID.DATA_DIRECTORIES,\r\n };\r\n\r\n const h = pe.getDataDirectories();\r\n if (!h) return s;\r\n\r\n s.groups = h.items.map((v, i) => ({\r\n title: `[${i}] ${F.ImageDirectoryEntry[i] || \"\"}`,\r\n items: [\r\n FM.formatU4Field(\"VirtualAddress\", v.VirtualAddress),\r\n FM.formatU4Field(\"Size\", v.Size, true),\r\n ]\r\n } as W.SimpleStruct));\r\n\r\n return s;\r\n}\r\n\r\nfunction generateSectionHeaders(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.SECTION_HEADERS,\r\n elemID: W.KnownElemID.SECTION_HEADERS,\r\n };\r\n\r\n const h = pe.getSectionHeaders();\r\n if (!h) return s;\r\n\r\n s.groups = h.items.map((v, i) => ({\r\n title: `[${i}] (${v.Name.value})`,\r\n items: [\r\n FM.formatStringField(\"Name\", v.Name),\r\n FM.formatU4Field(\"VirtualSize\", v.VirtualSize, true),\r\n FM.formatU4Field(\"VirtualAddress\", v.VirtualAddress),\r\n FM.formatU4Field(\"SizeOfRawData\", v.SizeOfRawData, true),\r\n FM.formatU4Field(\"PointerToRawData\", v.PointerToRawData),\r\n FM.formatU4Field(\"PointerToRelocations\", v.PointerToRelocations),\r\n FM.formatU4Field(\"PointerToLinenumbers\", v.PointerToLinenumbers),\r\n FM.formatU2Field(\"NumberOfRelocations\", v.NumberOfRelocations, true),\r\n FM.formatU2Field(\"NumberOfLinenumbers\", v.NumberOfLinenumbers, true),\r\n FM.formatU4Field(\"Characteristics\", v.Characteristics),\r\n ]\r\n }));\r\n\r\n return s;\r\n}\r\n","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\n\r\nimport { generateHeadersPageData } from \"./headers\";\r\nimport { generateMetadataHeadersPageData } from \"./metadata-headers\";\r\nimport { generateMdsTablePageData, generateMdtPageData } from \"./mds-table\";\r\nimport {\r\n generateMdsStringsPageData,\r\n generateMdsUSPageData,\r\n generateMdsGuidPageData,\r\n generateMdsBlobPageData\r\n} from \"./mds-list\";\r\n\r\nexport function generatePageData(pe: PEImage, pageID: W.PageID, subID?: string, pageNum?: number): W.PageData {\r\n switch (pageID) {\r\n case W.PageID.HEADERS: return generateHeadersPageData(pe);\r\n case W.PageID.MD_HEADERS: return generateMetadataHeadersPageData(pe);\r\n case W.PageID.MDS_TABLE: return generateMdsTablePageData(pe);\r\n case W.PageID.MDS_STRINGS: return generateMdsStringsPageData(pe, cache, cfg, pageNum || 0);\r\n case W.PageID.MDS_US: return generateMdsUSPageData(pe, cache, cfg, pageNum || 0);\r\n case W.PageID.MDS_GUID: return generateMdsGuidPageData(pe);\r\n case W.PageID.MDS_BLOB: return generateMdsBlobPageData(pe, cache, cfg, pageNum || 0);\r\n case W.PageID.MDT_TBL: {\r\n const tid = F.MetadataTableIndex[subID! as any] as any as F.MetadataTableIndex;\r\n return generateMdtPageData(pe, tid, cfg, pageNum || 0);\r\n }\r\n default: return { nav: { pageID: W.PageID.NOTFOUND, title: W.KnownTitle.NOTFOUND } };\r\n }\r\n}\r\n\r\nexport interface GeneratorCache {\r\n mdsStrings?: MdsOffsetListCache;\r\n mdsUS?: MdsOffsetListCache;\r\n mdsBlob?: MdsOffsetListCache;\r\n}\r\n\r\nexport type MdsOffsetListCache = {\r\n pages: MdsOffsetListPageCache[];\r\n}\r\n\r\nexport type MdsOffsetListPageCache = number[];\r\n\r\nexport function clearGeneratorCache(): void {\r\n cache = {};\r\n}\r\n\r\nexport interface GeneratorConfig {\r\n mdsOffsetListPageSize: number; // Total bytes per page.\r\n mdtPageSize: number; // Total items per page.\r\n}\r\n\r\nlet cache: GeneratorCache = {};\r\n\r\nconst cfg: GeneratorConfig = {\r\n mdsOffsetListPageSize: 4000,\r\n mdtPageSize: 100,\r\n}\r\n","export const enum PEErrorType {\r\n INVALID_DATA_POSITION = \"INVALID_DATA_POSITION\",\r\n INVALID_DOS_SIGNATURE = \"INVALID_DOS_SIGNATURE\",\r\n INVALID_PE_SIGNATURE = \"INVALID_PE_SIGNATURE\",\r\n INVALID_OPTIONAL_HEADER_MAGIC = \"INVALID_OPTIONAL_HEADER_MAGIC\",\r\n INVALID_DATA_DIRECTORY_COUNT = \"INVALID_DATA_DIRECTORY_COUNT\",\r\n}\r\n\r\nexport class PEError extends Error {\r\n constructor(\r\n public type: PEErrorType,\r\n public offset?: number,\r\n public size?: number\r\n ) {\r\n super(type);\r\n }\r\n}\r\n","import * as S from \"./structures\";\r\nimport * as F from \"./image-flags\";\r\nimport * as U from \"./utils\";\r\n\r\nexport interface FileDataProvider {\r\n getU1(p: number): number;\r\n getU2(p: number): number;\r\n getU4(p: number): number;\r\n getData(p: number, sz: number): Uint8Array;\r\n}\r\n\r\nexport interface MetadataSizingProvider {\r\n getHeapSize(heap: F.MetadataHeapSizeID): number;\r\n getTableIDSize(t: F.MetadataTableIndex): number;\r\n getCodedTokenSize(t: F.MetadataCodedTokenIndex): number;\r\n}\r\n\r\n//\r\n// Basic structures.\r\n//\r\n\r\nexport function loadU1Field(d: FileDataProvider, p: number): S.U1Field {\r\n return {\r\n _offset: p, _size: 1, data: d.getData(p, 1), value: d.getU1(p)\r\n };\r\n}\r\n\r\nexport function loadU2Field(d: FileDataProvider, p: number): S.U2Field {\r\n return {\r\n _offset: p, _size: 2, data: d.getData(p, 2), value: d.getU2(p)\r\n };\r\n}\r\n\r\nexport function loadU4Field(d: FileDataProvider, p: number): S.U4Field {\r\n return {\r\n _offset: p, _size: 4, data: d.getData(p, 4), value: d.getU4(p)\r\n };\r\n}\r\n\r\nexport function loadU8Field(d: FileDataProvider, p: number): S.U8Field {\r\n const low = d.getU4(p);\r\n const high = d.getU4(p + 4);\r\n\r\n return {\r\n _offset: p, _size: 8, data: d.getData(p, 8), low, high\r\n };\r\n}\r\n\r\nexport function loadCompressedUIntField(d: FileDataProvider, p: number): S.CompressedUIntField {\r\n const sz = U.getCompressedIntSize(d.getU1(p));\r\n const data = new Uint8Array(d.getData(p, sz));\r\n const value = U.decompressUint(data);\r\n\r\n return { _offset: p, _size: sz, data, value };\r\n}\r\n\r\nexport function loadU1EnumField(d: FileDataProvider, p: number): S.U1EnumField {\r\n return {\r\n _offset: p, _size: 1, data: d.getData(p, 1), value: d.getU1(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadU2EnumField(d: FileDataProvider, p: number): S.U2EnumField {\r\n return {\r\n _offset: p, _size: 2, data: d.getData(p, 2), value: d.getU2(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadU4EnumField(d: FileDataProvider, p: number): S.U4EnumField {\r\n return {\r\n _offset: p, _size: 4, data: d.getData(p, 4), value: d.getU4(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadFixedSizeByteArrayField(d: FileDataProvider, p: number, sz: number): S.Field {\r\n return {\r\n _offset: p, _size: sz, data: d.getData(p, sz)\r\n };\r\n}\r\n\r\nexport function loadFixedSizeAsciiStringField(d: FileDataProvider, p: number, sz: number): S.StringField {\r\n const data = d.getData(p, sz);\r\n const value = String.fromCharCode.apply(null, Array.from(data).filter(v => v != 0));\r\n\r\n return {\r\n _offset: p, _size: sz, data, value\r\n };\r\n}\r\n\r\nexport function loadNullTerminatedStringField(d: FileDataProvider, p: number): S.StringField {\r\n let bytes: number[] = [];\r\n let ptr = p;\r\n let b: number;\r\n\r\n do {\r\n b = d.getU1(ptr++);\r\n bytes.push(b);\r\n } while (b != 0);\r\n const str = bytes.slice(0, bytes.length - 1).map(v => `%${v.toString(16)}`).join(\"\");\r\n const value = decodeURIComponent(str);\r\n\r\n return {\r\n _offset: p, _size: ptr - p, data: Uint8Array.from(bytes), value\r\n };\r\n}\r\n\r\nexport function loadFixedSizeUnicodeStringField(d: FileDataProvider, p: number, sz: number): S.StringField {\r\n const data = d.getData(p, sz);\r\n const arr = new Uint16Array(data.buffer);\r\n const value = String.fromCodePoint.apply(null, arr);\r\n\r\n return {\r\n _offset: p, _size: sz, data, value\r\n };\r\n}\r\n\r\nexport function loadStructArrayByCount(\r\n d: FileDataProvider,\r\n p: number,\r\n loader: (d: FileDataProvider, p: number) => T,\r\n count: number): S.StructArray {\r\n\r\n let items: T[] = [];\r\n let ptr = p;\r\n for (let i = 0; i < count; i++) {\r\n const s = loader(d, ptr);\r\n items.push(s);\r\n ptr += s._size;\r\n }\r\n\r\n return { _offset: p, _size: ptr - p, items };\r\n}\r\n\r\n//\r\n// Image headers.\r\n//\r\n\r\nexport function loadImageDosHeader(d: FileDataProvider, p: number): S.ImageDosHeader {\r\n let ptr = p;\r\n\r\n const e_magic = loadU2Field(d, ptr);\r\n ptr += e_magic._size;\r\n\r\n const e_cblp = loadU2Field(d, ptr);\r\n ptr += e_cblp._size;\r\n\r\n const e_cp = loadU2Field(d, ptr);\r\n ptr += e_cp._size;\r\n\r\n const e_crlc = loadU2Field(d, ptr);\r\n ptr += e_crlc._size;\r\n\r\n const e_cparhdr = loadU2Field(d, ptr);\r\n ptr += e_cparhdr._size;\r\n\r\n const e_minalloc = loadU2Field(d, ptr);\r\n ptr += e_minalloc._size;\r\n\r\n const e_maxalloc = loadU2Field(d, ptr);\r\n ptr += e_maxalloc._size;\r\n\r\n const e_ss = loadU2Field(d, ptr);\r\n ptr += e_ss._size;\r\n\r\n const e_sp = loadU2Field(d, ptr);\r\n ptr += e_sp._size;\r\n\r\n const e_csum = loadU2Field(d, ptr);\r\n ptr += e_csum._size;\r\n\r\n const e_ip = loadU2Field(d, ptr);\r\n ptr += e_ip._size;\r\n\r\n const e_cs = loadU2Field(d, ptr);\r\n ptr += e_cs._size;\r\n\r\n const e_lfarlc = loadU2Field(d, ptr);\r\n ptr += e_lfarlc._size;\r\n\r\n const e_ovno = loadU2Field(d, ptr);\r\n ptr += e_ovno._size;\r\n\r\n const e_res = loadFixedSizeByteArrayField(d, ptr, 4 * 2);\r\n ptr += e_res._size;\r\n\r\n const e_oemid = loadU2Field(d, ptr);\r\n ptr += e_oemid._size;\r\n\r\n const e_oeminfo = loadU2Field(d, ptr);\r\n ptr += e_oeminfo._size;\r\n\r\n const e_res2 = loadFixedSizeByteArrayField(d, ptr, 10 * 2);\r\n ptr += e_res2._size;\r\n\r\n const e_lfanew = loadU4Field(d, ptr);\r\n ptr += e_lfanew._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n e_magic,\r\n e_cblp,\r\n e_cp,\r\n e_crlc,\r\n e_cparhdr,\r\n e_minalloc,\r\n e_maxalloc,\r\n e_ss,\r\n e_sp,\r\n e_csum,\r\n e_ip,\r\n e_cs,\r\n e_lfarlc,\r\n e_ovno,\r\n e_res,\r\n e_oemid,\r\n e_oeminfo,\r\n e_res2,\r\n e_lfanew,\r\n };\r\n}\r\n\r\nexport function loadImageFileHeader(d: FileDataProvider, p: number): S.ImageFileHeader {\r\n let ptr = p;\r\n\r\n const Machine = loadU2Field(d, ptr);\r\n ptr += Machine._size;\r\n\r\n const NumberOfSections = loadU2Field(d, ptr);\r\n ptr += NumberOfSections._size;\r\n\r\n const TimeDateStamp = loadU4Field(d, ptr);\r\n ptr += TimeDateStamp._size;\r\n\r\n const PointerToSymbolTable = loadU4Field(d, ptr);\r\n ptr += PointerToSymbolTable._size;\r\n\r\n const NumberOfSymbols = loadU4Field(d, ptr);\r\n ptr += NumberOfSymbols._size;\r\n\r\n const SizeOfOptionalHeader = loadU2Field(d, ptr);\r\n ptr += SizeOfOptionalHeader._size;\r\n\r\n const Characteristics = loadU2EnumField(d, ptr);\r\n ptr += Characteristics._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Machine,\r\n NumberOfSections,\r\n TimeDateStamp,\r\n PointerToSymbolTable,\r\n NumberOfSymbols,\r\n SizeOfOptionalHeader,\r\n Characteristics,\r\n };\r\n}\r\n\r\nexport function loadImageOptionalHeader32(d: FileDataProvider, p: number): S.ImageOptionalHeader32 {\r\n let ptr = p;\r\n\r\n const Magic = loadU2Field(d, ptr);\r\n ptr += Magic._size;\r\n\r\n const MajorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MajorLinkerVersion._size;\r\n\r\n const MinorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MinorLinkerVersion._size;\r\n\r\n const SizeOfCode = loadU4Field(d, ptr);\r\n ptr += SizeOfCode._size;\r\n\r\n const SizeOfInitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfInitializedData._size;\r\n\r\n const SizeOfUninitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfUninitializedData._size;\r\n\r\n const AddressOfEntryPoint = loadU4Field(d, ptr);\r\n ptr += AddressOfEntryPoint._size;\r\n\r\n const BaseOfCode = loadU4Field(d, ptr);\r\n ptr += BaseOfCode._size;\r\n\r\n const BaseOfData = loadU4Field(d, ptr);\r\n ptr += BaseOfData._size;\r\n\r\n const ImageBase = loadU4Field(d, ptr);\r\n ptr += ImageBase._size;\r\n\r\n const SectionAlignment = loadU4Field(d, ptr);\r\n ptr += SectionAlignment._size;\r\n\r\n const FileAlignment = loadU4Field(d, ptr);\r\n ptr += FileAlignment._size;\r\n\r\n const MajorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorOperatingSystemVersion._size;\r\n\r\n const MinorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorOperatingSystemVersion._size;\r\n\r\n const MajorImageVersion = loadU2Field(d, ptr);\r\n ptr += MajorImageVersion._size;\r\n\r\n const MinorImageVersion = loadU2Field(d, ptr);\r\n ptr += MinorImageVersion._size;\r\n\r\n const MajorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorSubsystemVersion._size;\r\n\r\n const MinorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorSubsystemVersion._size;\r\n\r\n const Win32VersionValue = loadU4Field(d, ptr);\r\n ptr += Win32VersionValue._size;\r\n\r\n const SizeOfImage = loadU4Field(d, ptr);\r\n ptr += SizeOfImage._size;\r\n\r\n const SizeOfHeaders = loadU4Field(d, ptr);\r\n ptr += SizeOfHeaders._size;\r\n\r\n const CheckSum = loadU4Field(d, ptr);\r\n ptr += CheckSum._size;\r\n\r\n const Subsystem = loadU2EnumField(d, ptr);\r\n ptr += Subsystem._size;\r\n\r\n const DllCharacteristics = loadU2EnumField(d, ptr);\r\n ptr += DllCharacteristics._size;\r\n\r\n const SizeOfStackReserve = loadU4Field(d, ptr);\r\n ptr += SizeOfStackReserve._size;\r\n\r\n const SizeOfStackCommit = loadU4Field(d, ptr);\r\n ptr += SizeOfStackCommit._size;\r\n\r\n const SizeOfHeapReserve = loadU4Field(d, ptr);\r\n ptr += SizeOfHeapReserve._size;\r\n\r\n const SizeOfHeapCommit = loadU4Field(d, ptr);\r\n ptr += SizeOfHeapCommit._size;\r\n\r\n const LoaderFlags = loadU4Field(d, ptr);\r\n ptr += LoaderFlags._size;\r\n\r\n const NumberOfRvaAndSizes = loadU4Field(d, ptr);\r\n ptr += NumberOfRvaAndSizes._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Magic,\r\n MajorLinkerVersion,\r\n MinorLinkerVersion,\r\n SizeOfCode,\r\n SizeOfInitializedData,\r\n SizeOfUninitializedData,\r\n AddressOfEntryPoint,\r\n BaseOfCode,\r\n BaseOfData,\r\n ImageBase,\r\n SectionAlignment,\r\n FileAlignment,\r\n MajorOperatingSystemVersion,\r\n MinorOperatingSystemVersion,\r\n MajorImageVersion,\r\n MinorImageVersion,\r\n MajorSubsystemVersion,\r\n MinorSubsystemVersion,\r\n Win32VersionValue,\r\n SizeOfImage,\r\n SizeOfHeaders,\r\n CheckSum,\r\n Subsystem,\r\n DllCharacteristics,\r\n SizeOfStackReserve,\r\n SizeOfStackCommit,\r\n SizeOfHeapReserve,\r\n SizeOfHeapCommit,\r\n LoaderFlags,\r\n NumberOfRvaAndSizes,\r\n };\r\n}\r\n\r\nexport function loadImageOptionalHeader64(d: FileDataProvider, p: number): S.ImageOptionalHeader64 {\r\n let ptr = p;\r\n\r\n const Magic = loadU2Field(d, ptr);\r\n ptr += Magic._size;\r\n\r\n const MajorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MajorLinkerVersion._size;\r\n\r\n const MinorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MinorLinkerVersion._size;\r\n\r\n const SizeOfCode = loadU4Field(d, ptr);\r\n ptr += SizeOfCode._size;\r\n\r\n const SizeOfInitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfInitializedData._size;\r\n\r\n const SizeOfUninitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfUninitializedData._size;\r\n\r\n const AddressOfEntryPoint = loadU4Field(d, ptr);\r\n ptr += AddressOfEntryPoint._size;\r\n\r\n const BaseOfCode = loadU4Field(d, ptr);\r\n ptr += BaseOfCode._size;\r\n\r\n const ImageBase = loadU8Field(d, ptr);\r\n ptr += ImageBase._size;\r\n\r\n const SectionAlignment = loadU4Field(d, ptr);\r\n ptr += SectionAlignment._size;\r\n\r\n const FileAlignment = loadU4Field(d, ptr);\r\n ptr += FileAlignment._size;\r\n\r\n const MajorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorOperatingSystemVersion._size;\r\n\r\n const MinorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorOperatingSystemVersion._size;\r\n\r\n const MajorImageVersion = loadU2Field(d, ptr);\r\n ptr += MajorImageVersion._size;\r\n\r\n const MinorImageVersion = loadU2Field(d, ptr);\r\n ptr += MinorImageVersion._size;\r\n\r\n const MajorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorSubsystemVersion._size;\r\n\r\n const MinorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorSubsystemVersion._size;\r\n\r\n const Win32VersionValue = loadU4Field(d, ptr);\r\n ptr += Win32VersionValue._size;\r\n\r\n const SizeOfImage = loadU4Field(d, ptr);\r\n ptr += SizeOfImage._size;\r\n\r\n const SizeOfHeaders = loadU4Field(d, ptr);\r\n ptr += SizeOfHeaders._size;\r\n\r\n const CheckSum = loadU4Field(d, ptr);\r\n ptr += CheckSum._size;\r\n\r\n const Subsystem = loadU2EnumField(d, ptr);\r\n ptr += Subsystem._size;\r\n\r\n const DllCharacteristics = loadU2EnumField(d, ptr);\r\n ptr += DllCharacteristics._size;\r\n\r\n const SizeOfStackReserve = loadU8Field(d, ptr);\r\n ptr += SizeOfStackReserve._size;\r\n\r\n const SizeOfStackCommit = loadU8Field(d, ptr);\r\n ptr += SizeOfStackCommit._size;\r\n\r\n const SizeOfHeapReserve = loadU8Field(d, ptr);\r\n ptr += SizeOfHeapReserve._size;\r\n\r\n const SizeOfHeapCommit = loadU8Field(d, ptr);\r\n ptr += SizeOfHeapCommit._size;\r\n\r\n const LoaderFlags = loadU4Field(d, ptr);\r\n ptr += LoaderFlags._size;\r\n\r\n const NumberOfRvaAndSizes = loadU4Field(d, ptr);\r\n ptr += NumberOfRvaAndSizes._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Magic,\r\n MajorLinkerVersion,\r\n MinorLinkerVersion,\r\n SizeOfCode,\r\n SizeOfInitializedData,\r\n SizeOfUninitializedData,\r\n AddressOfEntryPoint,\r\n BaseOfCode,\r\n ImageBase,\r\n SectionAlignment,\r\n FileAlignment,\r\n MajorOperatingSystemVersion,\r\n MinorOperatingSystemVersion,\r\n MajorImageVersion,\r\n MinorImageVersion,\r\n MajorSubsystemVersion,\r\n MinorSubsystemVersion,\r\n Win32VersionValue,\r\n SizeOfImage,\r\n SizeOfHeaders,\r\n CheckSum,\r\n Subsystem,\r\n DllCharacteristics,\r\n SizeOfStackReserve,\r\n SizeOfStackCommit,\r\n SizeOfHeapReserve,\r\n SizeOfHeapCommit,\r\n LoaderFlags,\r\n NumberOfRvaAndSizes,\r\n };\r\n}\r\n\r\nexport function loadImageDataDirectory(d: FileDataProvider, p: number): S.ImageDataDirectory {\r\n let ptr = p;\r\n\r\n const VirtualAddress = loadU4Field(d, ptr);\r\n ptr += VirtualAddress._size;\r\n\r\n const Size = loadU4Field(d, ptr);\r\n ptr += Size._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n VirtualAddress,\r\n Size,\r\n };\r\n}\r\n\r\nexport function loadImageSectionHeader(d: FileDataProvider, p: number): S.ImageSectionHeader {\r\n let ptr = p;\r\n\r\n const Name = loadFixedSizeAsciiStringField(d, ptr, 8);\r\n ptr += Name._size;\r\n\r\n const VirtualSize = loadU4Field(d, ptr);\r\n ptr += VirtualSize._size;\r\n\r\n const VirtualAddress = loadU4Field(d, ptr);\r\n ptr += VirtualAddress._size;\r\n\r\n const SizeOfRawData = loadU4Field(d, ptr);\r\n ptr += SizeOfRawData._size;\r\n\r\n const PointerToRawData = loadU4Field(d, ptr);\r\n ptr += PointerToRawData._size;\r\n\r\n const PointerToRelocations = loadU4Field(d, ptr);\r\n ptr += PointerToRelocations._size;\r\n\r\n const PointerToLinenumbers = loadU4Field(d, ptr);\r\n ptr += PointerToLinenumbers._size;\r\n\r\n const NumberOfRelocations = loadU2Field(d, ptr);\r\n ptr += NumberOfRelocations._size;\r\n\r\n const NumberOfLinenumbers = loadU2Field(d, ptr);\r\n ptr += NumberOfLinenumbers._size;\r\n\r\n const Characteristics = loadU4EnumField(d, ptr);\r\n ptr += Characteristics._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Name,\r\n VirtualSize,\r\n VirtualAddress,\r\n SizeOfRawData,\r\n PointerToRawData,\r\n PointerToRelocations,\r\n PointerToLinenumbers,\r\n NumberOfRelocations,\r\n NumberOfLinenumbers,\r\n Characteristics,\r\n };\r\n}\r\n\r\n//\r\n// Metadata structures.\r\n//\r\n\r\nexport function loadCliHeader(d: FileDataProvider, p: number): S.CliHeader {\r\n let ptr = p;\r\n\r\n const cb = loadU4Field(d, ptr);\r\n ptr += cb._size;\r\n\r\n const MajorRuntimeVersion = loadU2Field(d, ptr);\r\n ptr += MajorRuntimeVersion._size;\r\n\r\n const MinorRuntimeVersion = loadU2Field(d, ptr);\r\n ptr += MinorRuntimeVersion._size;\r\n\r\n const MetaData = loadImageDataDirectory(d, ptr);\r\n ptr += MetaData._size;\r\n\r\n const Flags = loadU4Field(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const EntryPointToken = loadU4Field(d, ptr);\r\n ptr += EntryPointToken._size;\r\n\r\n const Resources = loadImageDataDirectory(d, ptr);\r\n ptr += Resources._size;\r\n\r\n const StrongNameSignature = loadImageDataDirectory(d, ptr);\r\n ptr += StrongNameSignature._size;\r\n\r\n const CodeManagerTable = loadImageDataDirectory(d, ptr);\r\n ptr += CodeManagerTable._size;\r\n\r\n const VTableFixups = loadImageDataDirectory(d, ptr);\r\n ptr += VTableFixups._size;\r\n\r\n const ExportAddressTableJumps = loadImageDataDirectory(d, ptr);\r\n ptr += ExportAddressTableJumps._size;\r\n\r\n const ManagedNativeHeader = loadImageDataDirectory(d, ptr);\r\n ptr += ManagedNativeHeader._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n cb,\r\n MajorRuntimeVersion,\r\n MinorRuntimeVersion,\r\n MetaData,\r\n Flags,\r\n EntryPointToken,\r\n Resources,\r\n StrongNameSignature,\r\n CodeManagerTable,\r\n VTableFixups,\r\n ExportAddressTableJumps,\r\n ManagedNativeHeader,\r\n };\r\n}\r\n\r\nexport function loadMetadataRoot(d: FileDataProvider, p: number): S.MetadataRoot {\r\n let ptr = p;\r\n\r\n const Signature = loadU4Field(d, ptr);\r\n ptr += Signature._size;\r\n\r\n const MajorVersion = loadU2Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU2Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const Reserved = loadU4Field(d, ptr);\r\n ptr += Reserved._size;\r\n\r\n const VersionLength = loadU4Field(d, ptr);\r\n ptr += VersionLength._size;\r\n\r\n const VersionString = loadNullTerminatedStringField(d, ptr);\r\n ptr += VersionString._size;\r\n\r\n const paddingSize = U.calculatePadding(VersionString._size);\r\n const VersionPadding = loadFixedSizeByteArrayField(d, ptr, paddingSize);\r\n ptr += VersionPadding._size;\r\n\r\n const Flags = loadU2Field(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Streams = loadU2Field(d, ptr);\r\n ptr += Streams._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Signature,\r\n MajorVersion,\r\n MinorVersion,\r\n Reserved,\r\n VersionLength,\r\n VersionString,\r\n VersionPadding,\r\n Flags,\r\n Streams,\r\n };\r\n}\r\n\r\nexport function loadMetadataStreamHeader(d: FileDataProvider, p: number): S.MetadataStreamHeader {\r\n let ptr = p;\r\n\r\n const Offset = loadU4Field(d, ptr);\r\n ptr += Offset._size;\r\n\r\n const Size = loadU4Field(d, ptr);\r\n ptr += Size._size;\r\n\r\n const Name = loadNullTerminatedStringField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const paddingSize = U.calculatePadding(Name._size);\r\n const Padding = loadFixedSizeByteArrayField(d, ptr, paddingSize);\r\n ptr += Padding._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Offset,\r\n Size,\r\n Name,\r\n Padding,\r\n };\r\n}\r\n\r\nexport function loadMetadataTableHeader(d: FileDataProvider, p: number): S.MetadataTableHeader {\r\n let ptr = p;\r\n\r\n const Reserved = loadU4Field(d, ptr);\r\n ptr += Reserved._size;\r\n\r\n const MajorVersion = loadU1Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU1Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const HeapSizes = loadU1Field(d, ptr);\r\n ptr += HeapSizes._size;\r\n\r\n const Reserved2 = loadU1Field(d, ptr);\r\n ptr += Reserved2._size;\r\n\r\n const Valid = loadU8Field(d, ptr);\r\n ptr += Valid._size;\r\n\r\n const Sorted = loadU8Field(d, ptr);\r\n ptr += Sorted._size;\r\n\r\n const tables = U.count1(Valid.high) + U.count1(Valid.low);\r\n const Rows = loadStructArrayByCount(d, ptr, loadU4Field, tables);\r\n ptr += Rows._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Reserved,\r\n MajorVersion,\r\n MinorVersion,\r\n HeapSizes,\r\n Reserved2,\r\n Valid,\r\n Sorted,\r\n Rows,\r\n };\r\n}\r\n\r\nexport function loadMetadataUSItem(d: FileDataProvider, p: number): S.MetadataUSItem {\r\n let ptr = p;\r\n\r\n const Size = loadCompressedUIntField(d, ptr);\r\n ptr += Size._size;\r\n\r\n const sz = Size.value;\r\n const strSize = sz > 0 ? sz - 1 : 0;\r\n const suffixSize = sz > 0 ? 1 : 0;\r\n\r\n const Value = loadFixedSizeUnicodeStringField(d, ptr, strSize);\r\n ptr += Value._size;\r\n\r\n const Suffix = loadFixedSizeByteArrayField(d, ptr, suffixSize);\r\n ptr += Suffix._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Size,\r\n Value,\r\n Suffix,\r\n };\r\n}\r\n\r\nexport function loadMetadataBlobItem(d: FileDataProvider, p: number): S.MetadataBlobItem {\r\n let ptr = p;\r\n\r\n const Size = loadCompressedUIntField(d, ptr);\r\n ptr += Size._size;\r\n\r\n const Value = loadFixedSizeByteArrayField(d, ptr, Size.value);\r\n ptr += Value._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Size,\r\n Value,\r\n };\r\n}\r\n\r\nexport function loadMdsStringsField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n p: number): S.MdsStringsField {\r\n\r\n return d.getHeapSize(F.MetadataHeapSizeID.String) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdsGuidField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n p: number): S.MdsGuidField {\r\n\r\n return d.getHeapSize(F.MetadataHeapSizeID.GUID) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdsBlobField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n p: number): S.MdsBlobField {\r\n\r\n return d.getHeapSize(F.MetadataHeapSizeID.Blob) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdtRidField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n t: F.MetadataTableIndex, p: number): S.MdtRidField {\r\n\r\n return d.getTableIDSize(t) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdCodedTokenField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n t: F.MetadataCodedTokenIndex, p: number): S.MdCodedTokenField {\r\n\r\n const baseField = d.getCodedTokenSize(t) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n const codedTokenInfo = decodeCodedToken(baseField.value, t);\r\n\r\n return {\r\n ...baseField, ...codedTokenInfo\r\n };\r\n}\r\n\r\nexport function loadMdTokenField(d: FileDataProvider, p: number): S.MdTokenField {\r\n const baseField = loadU4Field(d, p);\r\n const tid: F.MetadataTableIndex = (baseField.value & 0xFF000000) >> 24;\r\n const rid = baseField.value & 0x00FFFFFF;\r\n return {\r\n ...baseField, tid, rid\r\n };\r\n}\r\n\r\nexport function decodeCodedToken(token: number, t: F.MetadataCodedTokenIndex): { tid: F.MetadataTableIndex, rid: number } {\r\n const cti = F.ctc[t];\r\n const tid = cti.tables[token & ((1 << cti.tagSize) - 1)];\r\n const rid = token >> cti.tagSize;\r\n return { tid, rid };\r\n}\r\n\r\n//\r\n// Metadata tables.\r\n//\r\n\r\nexport function loadMdtModule(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtModuleItem {\r\n let ptr = p;\r\n\r\n const Generation = loadU2Field(d, ptr);\r\n ptr += Generation._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Mvid = loadMdsGuidField(d, ptr);\r\n ptr += Mvid._size;\r\n\r\n const EncId = loadMdsGuidField(d, ptr);\r\n ptr += EncId._size;\r\n\r\n const EncBaseId = loadMdsGuidField(d, ptr);\r\n ptr += EncBaseId._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Generation,\r\n Name,\r\n Mvid,\r\n EncId,\r\n EncBaseId,\r\n };\r\n}\r\n\r\nexport function loadMdtTypeRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtTypeRefItem {\r\n let ptr = p;\r\n\r\n const ResolutionScope = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.ResolutionScope, ptr);\r\n ptr += ResolutionScope._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Namespace = loadMdsStringsField(d, ptr);\r\n ptr += Namespace._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n ResolutionScope,\r\n Name,\r\n Namespace,\r\n };\r\n}\r\n\r\nexport function loadMdtTypeDef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtTypeDefItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Namespace = loadMdsStringsField(d, ptr);\r\n ptr += Namespace._size;\r\n\r\n const Extends = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += Extends._size;\r\n\r\n const FieldList = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += FieldList._size;\r\n\r\n const MethodList = loadMdtRidField(d, F.MetadataTableIndex.MethodDef, ptr);\r\n ptr += MethodList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Name,\r\n Namespace,\r\n Extends,\r\n FieldList,\r\n MethodList,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldPtrItem {\r\n let ptr = p;\r\n\r\n const Field = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += Field._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Field,\r\n };\r\n}\r\n\r\nexport function loadMdtField(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Name,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodPtrItem {\r\n let ptr = p;\r\n\r\n const Method = loadMdtRidField(d, F.MetadataTableIndex.MethodDef, ptr);\r\n ptr += Method._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Method,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodDef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodDefItem {\r\n let ptr = p;\r\n\r\n const RVA = loadU4Field(d, ptr);\r\n ptr += RVA._size;\r\n\r\n const ImplFlags = loadU2EnumField(d, ptr);\r\n ptr += ImplFlags._size;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n const ParamList = loadMdtRidField(d, F.MetadataTableIndex.Param, ptr);\r\n ptr += ParamList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n RVA,\r\n ImplFlags,\r\n Flags,\r\n Name,\r\n Signature,\r\n ParamList,\r\n };\r\n}\r\n\r\nexport function loadMdtParamPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtParamPtrItem {\r\n let ptr = p;\r\n\r\n const Param = loadMdtRidField(d, F.MetadataTableIndex.Param, ptr);\r\n ptr += Param._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Param,\r\n };\r\n}\r\n\r\nexport function loadMdtParam(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtParamItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Sequence = loadU2Field(d, ptr);\r\n ptr += Sequence._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Sequence,\r\n Name,\r\n };\r\n}\r\n\r\nexport function loadMdtInterfaceImpl(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtInterfaceImplItem {\r\n let ptr = p;\r\n\r\n const Class = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Class._size;\r\n\r\n const Interface = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += Interface._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Class,\r\n Interface,\r\n };\r\n}\r\n\r\nexport function loadMdtMemberRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMemberRefItem {\r\n let ptr = p;\r\n\r\n const Class = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MemberRefParent, ptr);\r\n ptr += Class._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Class,\r\n Name,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtConstant(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtConstantItem {\r\n let ptr = p;\r\n\r\n const Type = loadU1EnumField(d, ptr);\r\n ptr += Type._size;\r\n\r\n const PaddingZero = loadU1Field(d, ptr);\r\n ptr += PaddingZero._size;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasConstant, ptr);\r\n ptr += Parent._size;\r\n\r\n const Value = loadMdsBlobField(d, ptr);\r\n ptr += Value._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Type,\r\n PaddingZero,\r\n Parent,\r\n Value,\r\n };\r\n}\r\n\r\nexport function loadMdtCustomAttribute(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtCustomAttributeItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasCustomAttribute, ptr);\r\n ptr += Parent._size;\r\n\r\n const Type = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.CustomAttributeType, ptr);\r\n ptr += Type._size;\r\n\r\n const Value = loadMdsBlobField(d, ptr);\r\n ptr += Value._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n Type,\r\n Value,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldMarshal(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldMarshalItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasFieldMarshall, ptr);\r\n ptr += Parent._size;\r\n\r\n const NativeType = loadMdsBlobField(d, ptr);\r\n ptr += NativeType._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n NativeType,\r\n };\r\n}\r\n\r\nexport function loadMdtDeclSecurity(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtDeclSecurityItem {\r\n let ptr = p;\r\n\r\n const Action = loadU2EnumField(d, ptr);\r\n ptr += Action._size;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasDeclSecurity, ptr);\r\n ptr += Parent._size;\r\n\r\n const PermissionSet = loadMdsBlobField(d, ptr);\r\n ptr += PermissionSet._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Action,\r\n Parent,\r\n PermissionSet,\r\n };\r\n}\r\n\r\nexport function loadMdtClassLayout(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtClassLayoutItem {\r\n let ptr = p;\r\n\r\n const PackingSize = loadU2Field(d, ptr);\r\n ptr += PackingSize._size;\r\n\r\n const ClassSize = loadU4Field(d, ptr);\r\n ptr += ClassSize._size;\r\n\r\n const Parent = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Parent._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n PackingSize,\r\n ClassSize,\r\n Parent,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldLayout(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldLayoutItem {\r\n let ptr = p;\r\n\r\n const OffSet = loadU4Field(d, ptr);\r\n ptr += OffSet._size;\r\n\r\n const Field = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += Field._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n OffSet,\r\n Field,\r\n };\r\n}\r\n\r\nexport function loadMdtStandAloneSig(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtStandAloneSigItem {\r\n let ptr = p;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtEventMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtEventMapItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Parent._size;\r\n\r\n const EventList = loadMdtRidField(d, F.MetadataTableIndex.Event, ptr);\r\n ptr += EventList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n EventList,\r\n };\r\n}\r\n\r\nexport function loadMdtEventPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtEventPtrItem {\r\n let ptr = p;\r\n\r\n const Event = loadMdtRidField(d, F.MetadataTableIndex.Event, ptr);\r\n ptr += Event._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Event,\r\n };\r\n}\r\n\r\nexport function loadMdtEvent(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtEventItem {\r\n let ptr = p;\r\n\r\n const EventFlags = loadU2EnumField(d, ptr);\r\n ptr += EventFlags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const EventType = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += EventType._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n EventFlags,\r\n Name,\r\n EventType,\r\n };\r\n}\r\n\r\nexport function loadMdtPropertyMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtPropertyMapItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Parent._size;\r\n\r\n const PropertyList = loadMdtRidField(d, F.MetadataTableIndex.Property, ptr);\r\n ptr += PropertyList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n PropertyList,\r\n };\r\n}\r\n\r\nexport function loadMdtPropertyPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtPropertyPtrItem {\r\n let ptr = p;\r\n\r\n const Property = loadMdtRidField(d, F.MetadataTableIndex.Property, ptr);\r\n ptr += Property._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Property,\r\n };\r\n}\r\n\r\nexport function loadMdtProperty(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtPropertyItem {\r\n let ptr = p;\r\n\r\n const PropFlags = loadU2EnumField(d, ptr);\r\n ptr += PropFlags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Type = loadMdsBlobField(d, ptr);\r\n ptr += Type._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n PropFlags,\r\n Name,\r\n Type,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodSemantics(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodSemanticsItem {\r\n let ptr = p;\r\n\r\n const Semantic = loadU2EnumField(d, ptr);\r\n ptr += Semantic._size;\r\n\r\n const Method = loadMdtRidField(d, F.MetadataTableIndex.MethodDef, ptr);\r\n ptr += Method._size;\r\n\r\n const Association = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasSemantics, ptr);\r\n ptr += Association._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Semantic,\r\n Method,\r\n Association,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodImpl(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodImplItem {\r\n let ptr = p;\r\n\r\n const Class = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Class._size;\r\n\r\n const MethodBody = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MethodDefOrRef, ptr);\r\n ptr += MethodBody._size;\r\n\r\n const MethodDeclaration = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MethodDefOrRef, ptr);\r\n ptr += MethodDeclaration._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Class,\r\n MethodBody,\r\n MethodDeclaration,\r\n };\r\n}\r\n\r\nexport function loadMdtModuleRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtModuleRefItem {\r\n let ptr = p;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Name,\r\n };\r\n}\r\n\r\nexport function loadMdtTypeSpec(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtTypeSpecItem {\r\n let ptr = p;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtImplMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtImplMapItem {\r\n let ptr = p;\r\n\r\n const MappingFlags = loadU2EnumField(d, ptr);\r\n ptr += MappingFlags._size;\r\n\r\n const MemberForwarded = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MemberForwarded, ptr);\r\n ptr += MemberForwarded._size;\r\n\r\n const ImportName = loadMdsStringsField(d, ptr);\r\n ptr += ImportName._size;\r\n\r\n const ImportScope = loadMdtRidField(d, F.MetadataTableIndex.ModuleRef, ptr);\r\n ptr += ImportScope._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n MappingFlags,\r\n MemberForwarded,\r\n ImportName,\r\n ImportScope,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldRVA(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldRVAItem {\r\n let ptr = p;\r\n\r\n const RVA = loadU4Field(d, ptr);\r\n ptr += RVA._size;\r\n\r\n const Field = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += Field._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n RVA,\r\n Field,\r\n };\r\n}\r\n\r\nexport function loadMdtENCLog(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtENCLogItem {\r\n let ptr = p;\r\n\r\n const Token = loadU4Field(d, ptr);\r\n ptr += Token._size;\r\n\r\n const FuncCode = loadU4Field(d, ptr);\r\n ptr += FuncCode._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Token,\r\n FuncCode,\r\n };\r\n}\r\n\r\nexport function loadMdtENCMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtENCMapItem {\r\n let ptr = p;\r\n\r\n const Token = loadU4Field(d, ptr);\r\n ptr += Token._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Token,\r\n };\r\n}\r\n\r\nexport function loadMdtAssembly(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyItem {\r\n let ptr = p;\r\n\r\n const HashAlgId = loadU4EnumField(d, ptr);\r\n ptr += HashAlgId._size;\r\n\r\n const MajorVersion = loadU2Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU2Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const BuildNumber = loadU2Field(d, ptr);\r\n ptr += BuildNumber._size;\r\n\r\n const RevisionNumber = loadU2Field(d, ptr);\r\n ptr += RevisionNumber._size;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const PublicKey = loadMdsBlobField(d, ptr);\r\n ptr += PublicKey._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Locale = loadMdsStringsField(d, ptr);\r\n ptr += Locale._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n HashAlgId,\r\n MajorVersion,\r\n MinorVersion,\r\n BuildNumber,\r\n RevisionNumber,\r\n Flags,\r\n PublicKey,\r\n Name,\r\n Locale,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyProcessor(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyProcessorItem {\r\n let ptr = p;\r\n\r\n const Processor = loadU4Field(d, ptr);\r\n ptr += Processor._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Processor,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyOS(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyOSItem {\r\n let ptr = p;\r\n\r\n const OSPlatformID = loadU4Field(d, ptr);\r\n ptr += OSPlatformID._size;\r\n\r\n const OSMajorVersion = loadU4Field(d, ptr);\r\n ptr += OSMajorVersion._size;\r\n\r\n const OSMinorVersion = loadU4Field(d, ptr);\r\n ptr += OSMinorVersion._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n OSPlatformID,\r\n OSMajorVersion,\r\n OSMinorVersion,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyRefItem {\r\n let ptr = p;\r\n\r\n const MajorVersion = loadU2Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU2Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const BuildNumber = loadU2Field(d, ptr);\r\n ptr += BuildNumber._size;\r\n\r\n const RevisionNumber = loadU2Field(d, ptr);\r\n ptr += RevisionNumber._size;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const PublicKeyOrToken = loadMdsBlobField(d, ptr);\r\n ptr += PublicKeyOrToken._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Locale = loadMdsStringsField(d, ptr);\r\n ptr += Locale._size;\r\n\r\n const HashValue = loadMdsBlobField(d, ptr);\r\n ptr += HashValue._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n MajorVersion,\r\n MinorVersion,\r\n BuildNumber,\r\n RevisionNumber,\r\n Flags,\r\n PublicKeyOrToken,\r\n Name,\r\n Locale,\r\n HashValue,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyRefProcessor(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyRefProcessorItem {\r\n let ptr = p;\r\n\r\n const Processor = loadU4Field(d, ptr);\r\n ptr += Processor._size;\r\n\r\n const AssemblyRef = loadMdtRidField(d, F.MetadataTableIndex.AssemblyRef, ptr);\r\n ptr += AssemblyRef._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Processor,\r\n AssemblyRef,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyRefOS(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyRefOSItem {\r\n let ptr = p;\r\n\r\n const OSPlatformID = loadU4Field(d, ptr);\r\n ptr += OSPlatformID._size;\r\n\r\n const OSMajorVersion = loadU4Field(d, ptr);\r\n ptr += OSMajorVersion._size;\r\n\r\n const OSMinorVersion = loadU4Field(d, ptr);\r\n ptr += OSMinorVersion._size;\r\n\r\n const AssemblyRef = loadMdtRidField(d, F.MetadataTableIndex.AssemblyRef, ptr);\r\n ptr += AssemblyRef._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n OSPlatformID,\r\n OSMajorVersion,\r\n OSMinorVersion,\r\n AssemblyRef,\r\n };\r\n}\r\n\r\nexport function loadMdtFile(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFileItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const HashValue = loadMdsBlobField(d, ptr);\r\n ptr += HashValue._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Name,\r\n HashValue,\r\n };\r\n}\r\n\r\nexport function loadMdtExportedType(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtExportedTypeItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const TypeDefId = loadU4Field(d, ptr);\r\n ptr += TypeDefId._size;\r\n\r\n const TypeName = loadMdsStringsField(d, ptr);\r\n ptr += TypeName._size;\r\n\r\n const TypeNamespace = loadMdsStringsField(d, ptr);\r\n ptr += TypeNamespace._size;\r\n\r\n const Implementation = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.Implementation, ptr);\r\n ptr += Implementation._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n TypeDefId,\r\n TypeName,\r\n TypeNamespace,\r\n Implementation,\r\n };\r\n}\r\n\r\nexport function loadMdtManifestResource(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtManifestResourceItem {\r\n let ptr = p;\r\n\r\n const Offset = loadU4Field(d, ptr);\r\n ptr += Offset._size;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Implementation = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.Implementation, ptr);\r\n ptr += Implementation._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Offset,\r\n Flags,\r\n Name,\r\n Implementation,\r\n };\r\n}\r\n\r\nexport function loadMdtNestedClass(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtNestedClassItem {\r\n let ptr = p;\r\n\r\n const NestedClass = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += NestedClass._size;\r\n\r\n const EnclosingClass = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += EnclosingClass._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n NestedClass,\r\n EnclosingClass,\r\n };\r\n}\r\n\r\nexport function loadMdtGenericParam(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtGenericParamItem {\r\n let ptr = p;\r\n\r\n const Number = loadU2Field(d, ptr);\r\n ptr += Number._size;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Owner = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeOrMethodDef, ptr);\r\n ptr += Owner._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Number,\r\n Flags,\r\n Owner,\r\n Name,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodSpec(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodSpecItem {\r\n let ptr = p;\r\n\r\n const Method = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MethodDefOrRef, ptr);\r\n ptr += Method._size;\r\n\r\n const Instantiation = loadMdsBlobField(d, ptr);\r\n ptr += Instantiation._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Method,\r\n Instantiation,\r\n };\r\n}\r\n\r\nexport function loadMdtGenericParamConstraint(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtGenericParamConstraintItem {\r\n let ptr = p;\r\n\r\n const Owner = loadMdtRidField(d, F.MetadataTableIndex.GenericParam, ptr);\r\n ptr += Owner._size;\r\n\r\n const Constraint = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += Constraint._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Owner,\r\n Constraint,\r\n };\r\n}\r\n","import * as S from \"./structures\";\r\nimport * as A from \"./aux-structures\";\r\nimport * as L from \"./loader\";\r\nimport * as F from \"./image-flags\";\r\nimport * as E from \"./error\";\r\nimport * as U from \"./utils\";\r\n\r\nexport class PEImage implements L.FileDataProvider, L.MetadataSizingProvider {\r\n public static load(buf: ArrayBuffer): PEImage {\r\n return new PEImage(buf);\r\n }\r\n\r\n //\r\n // FileDataProvider functions.\r\n //\r\n\r\n public getU1(p: number): number {\r\n this.check(p, 1);\r\n return this.data.getUint8(p);\r\n }\r\n\r\n public getU2(p: number): number {\r\n this.check(p, 2);\r\n return this.data.getUint16(p, true);\r\n }\r\n\r\n public getU4(p: number): number {\r\n this.check(p, 3);\r\n return this.data.getUint32(p, true);\r\n }\r\n\r\n public getData(p: number, sz: number): Uint8Array {\r\n this.check(p, sz);\r\n return new Uint8Array(this.data.buffer.slice(p, p + sz));\r\n }\r\n\r\n //\r\n // Image attributes.\r\n //\r\n\r\n public is32Bit(): boolean | undefined {\r\n const optHdr = this.getOptionalHeader();\r\n if (optHdr == null) {\r\n return undefined;\r\n }\r\n\r\n switch (optHdr.Magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC: return true;\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC: return false;\r\n default: return undefined;\r\n }\r\n }\r\n\r\n public isManaged(): boolean {\r\n const dd = this.getDataDirectories();\r\n return dd != null && this.isDataDirectoryValid(\r\n dd.items[F.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR]\r\n );\r\n }\r\n\r\n public hasMetadata(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.MetaData);\r\n }\r\n\r\n public hasManagedResources(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.Resources);\r\n }\r\n\r\n public hasStrongNameSignature(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.StrongNameSignature);\r\n }\r\n\r\n public isMetadataTableValid(id: F.MetadataTableIndex): boolean {\r\n const info = this.metadataTableInfo;\r\n if (info && info[id]) {\r\n return info[id].valid;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public isMetadataTableSorted(id: F.MetadataTableIndex): boolean {\r\n const info = this.metadataTableInfo;\r\n if (info && info[id]) {\r\n return info[id].sorted;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public getMetadataTableRows(id: F.MetadataTableIndex): number {\r\n const info = this.metadataTableInfo;\r\n if (info && info[id]) {\r\n return info[id].rows;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n //\r\n // Image headers.\r\n //\r\n\r\n public getDosHeader(): S.ImageDosHeader | undefined {\r\n return this.dosHeader;\r\n }\r\n\r\n public getPESignature(): S.U4Field | undefined {\r\n return this.peSignature;\r\n }\r\n\r\n public getFileHeader(): S.ImageFileHeader | undefined {\r\n return this.fileHeader;\r\n }\r\n\r\n public getOptionalHeader(): S.ImageOptionalHeader32 | S.ImageOptionalHeader64 | undefined {\r\n return this.optionalHeader;\r\n }\r\n\r\n public getDataDirectories(): S.StructArray | undefined {\r\n return this.dataDirectories;\r\n }\r\n\r\n public getSectionHeaders(): S.StructArray | undefined {\r\n return this.sectionHeaders;\r\n }\r\n\r\n //\r\n // Metadata structures.\r\n //\r\n\r\n public getCliHeader(): S.CliHeader | undefined {\r\n if (this.cliHeader) return this.cliHeader;\r\n if (!this.isManaged()) return undefined;\r\n\r\n const offset = this.rvaToOffset(this.dataDirectories!\r\n .items[F.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR]\r\n .VirtualAddress.value);\r\n\r\n this.cliHeader = L.loadCliHeader(this, offset);\r\n return this.cliHeader;\r\n }\r\n\r\n public getMetadataRoot(): S.MetadataRoot | undefined {\r\n if (this.metadataRoot) return this.metadataRoot;\r\n\r\n const cliHeader = this.getCliHeader();\r\n if (!cliHeader) return undefined;\r\n\r\n const offset = this.rvaToOffset(cliHeader.MetaData.VirtualAddress.value);\r\n if (!offset) return undefined;\r\n\r\n this.metadataRoot = L.loadMetadataRoot(this, offset);\r\n return this.metadataRoot;\r\n }\r\n\r\n public getMetadataStreamHeaders(): S.StructArray | undefined {\r\n if (this.metadataStreamHeaders) return this.metadataStreamHeaders;\r\n\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot || !mdRoot.Streams.value) return undefined;\r\n\r\n this.metadataStreamHeaders = L.loadStructArrayByCount(\r\n this,\r\n mdRoot._offset + mdRoot._size,\r\n L.loadMetadataStreamHeader,\r\n mdRoot.Streams.value\r\n );\r\n return this.metadataStreamHeaders;\r\n }\r\n\r\n public getMetadataStreamHeader(name: F.MetadataStreamName): S.MetadataStreamHeader | undefined {\r\n const headers = this.getMetadataStreamHeaders();\r\n if (!headers) return undefined;\r\n\r\n return headers.items.filter(v => v.Name.value == name).shift();\r\n }\r\n\r\n public getStrongNameSignature(): S.Field | undefined {\r\n if (this.strongNameSignature) return this.strongNameSignature;\r\n\r\n const cliHeader = this.getCliHeader();\r\n if (!cliHeader) return undefined;\r\n\r\n const offset = this.rvaToOffset(cliHeader.StrongNameSignature.VirtualAddress.value);\r\n if (!offset) return undefined;\r\n\r\n this.strongNameSignature = L.loadFixedSizeByteArrayField(\r\n this, offset,\r\n cliHeader.StrongNameSignature.Size.value);\r\n return this.strongNameSignature;\r\n }\r\n\r\n public getMetadataTableHeader(): S.MetadataTableHeader | undefined {\r\n if (this.metadataTableHeader) return this.metadataTableHeader;\r\n\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.Table);\r\n if (!sh) return undefined;\r\n\r\n const offset = mdRoot._offset + sh.Offset.value;\r\n this.metadataTableHeader = L.loadMetadataTableHeader(this, offset);\r\n this.fillMetadataTableInfo();\r\n this.fillMetadataTableInfoExtra();\r\n\r\n return this.metadataTableHeader;\r\n }\r\n\r\n public getMdsStringsItem(offset: number): S.StringField | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.Strings);\r\n if (!sh) return undefined;\r\n\r\n if (offset < 0 || offset >= sh.Size.value) {\r\n return undefined;\r\n } else {\r\n return L.loadNullTerminatedStringField(this,\r\n mdRoot._offset + sh.Offset.value + offset);\r\n }\r\n }\r\n\r\n public getMdsUSItem(offset: number): S.MetadataUSItem | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.US);\r\n if (!sh) return undefined;\r\n\r\n if (offset < 0 || offset >= sh.Size.value) {\r\n return undefined;\r\n } else {\r\n return L.loadMetadataUSItem(this,\r\n mdRoot._offset + sh.Offset.value + offset);\r\n }\r\n }\r\n\r\n public getMdsGuidItems(): S.StructArray | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.GUID);\r\n if (!sh) return undefined;\r\n\r\n const count = sh.Size.value / 16;\r\n return L.loadStructArrayByCount(\r\n this,\r\n mdRoot._offset + sh.Offset.value,\r\n (d, p) => L.loadFixedSizeByteArrayField(d, p, 16),\r\n count);\r\n }\r\n\r\n public getMdsBlobItem(offset: number): S.MetadataBlobItem | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.Blob);\r\n if (!sh) return undefined;\r\n\r\n if (offset < 0 || offset >= sh.Size.value) {\r\n return undefined;\r\n } else {\r\n return L.loadMetadataBlobItem(this,\r\n mdRoot._offset + sh.Offset.value + offset);\r\n }\r\n }\r\n\r\n public getMdtModuleItem(rid /* 1-based */: number): S.MdtModuleItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Module, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Module];\r\n return L.loadMdtModule(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtTypeRefItem(rid /* 1-based */: number): S.MdtTypeRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.TypeRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Module];\r\n return L.loadMdtTypeRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtTypeDefItem(rid /* 1-based */: number): S.MdtTypeDefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.TypeDef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.TypeDef];\r\n return L.loadMdtTypeDef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldPtrItem(rid /* 1-based */: number): S.MdtFieldPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldPtr];\r\n return L.loadMdtFieldPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldItem(rid /* 1-based */: number): S.MdtFieldItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Field, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Field];\r\n return L.loadMdtField(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodPtrItem(rid /* 1-based */: number): S.MdtMethodPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodPtr];\r\n return L.loadMdtMethodPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodDefItem(rid /* 1-based */: number): S.MdtMethodDefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodDef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodDef];\r\n return L.loadMdtMethodDef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtParamPtrItem(rid /* 1-based */: number): S.MdtParamPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ParamPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ParamPtr];\r\n return L.loadMdtParamPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtParamItem(rid /* 1-based */: number): S.MdtParamItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Param, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Param];\r\n return L.loadMdtParam(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtInterfaceImplItem(rid /* 1-based */: number): S.MdtInterfaceImplItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.InterfaceImpl, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.InterfaceImpl];\r\n return L.loadMdtInterfaceImpl(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMemberRefItem(rid /* 1-based */: number): S.MdtMemberRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MemberRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MemberRef];\r\n return L.loadMdtMemberRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtConstantItem(rid /* 1-based */: number): S.MdtConstantItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Constant, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Constant];\r\n return L.loadMdtConstant(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtCustomAttributeItem(rid /* 1-based */: number): S.MdtCustomAttributeItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.CustomAttribute, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.CustomAttribute];\r\n return L.loadMdtCustomAttribute(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldMarshalItem(rid /* 1-based */: number): S.MdtFieldMarshalItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldMarshal, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldMarshal];\r\n return L.loadMdtFieldMarshal(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtDeclSecurityItem(rid /* 1-based */: number): S.MdtDeclSecurityItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.DeclSecurity, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.DeclSecurity];\r\n return L.loadMdtDeclSecurity(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtClassLayoutItem(rid /* 1-based */: number): S.MdtClassLayoutItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ClassLayout, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ClassLayout];\r\n return L.loadMdtClassLayout(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldLayoutItem(rid /* 1-based */: number): S.MdtFieldLayoutItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldLayout, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldLayout];\r\n return L.loadMdtFieldLayout(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtStandAloneSigItem(rid /* 1-based */: number): S.MdtStandAloneSigItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.StandAloneSig, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.StandAloneSig];\r\n return L.loadMdtStandAloneSig(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtEventMapItem(rid /* 1-based */: number): S.MdtEventMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.EventMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.EventMap];\r\n return L.loadMdtEventMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtEventPtrItem(rid /* 1-based */: number): S.MdtEventPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.EventPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.EventPtr];\r\n return L.loadMdtEventPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtEventItem(rid /* 1-based */: number): S.MdtEventItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Event, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Event];\r\n return L.loadMdtEvent(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtPropertyMapItem(rid /* 1-based */: number): S.MdtPropertyMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.PropertyMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.PropertyMap];\r\n return L.loadMdtPropertyMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtPropertyPtrItem(rid /* 1-based */: number): S.MdtPropertyPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.PropertyPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.PropertyPtr];\r\n return L.loadMdtPropertyPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtPropertyItem(rid /* 1-based */: number): S.MdtPropertyItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Property, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Property];\r\n return L.loadMdtProperty(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodSemanticsItem(rid /* 1-based */: number): S.MdtMethodSemanticsItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodSemantics, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodSemantics];\r\n return L.loadMdtMethodSemantics(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodImplItem(rid /* 1-based */: number): S.MdtMethodImplItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodImpl, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodImpl];\r\n return L.loadMdtMethodImpl(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtModuleRefItem(rid /* 1-based */: number): S.MdtModuleRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ModuleRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ModuleRef];\r\n return L.loadMdtModuleRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtTypeSpecItem(rid /* 1-based */: number): S.MdtTypeSpecItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.TypeSpec, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.TypeSpec];\r\n return L.loadMdtTypeSpec(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtImplMapItem(rid /* 1-based */: number): S.MdtImplMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ImplMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ImplMap];\r\n return L.loadMdtImplMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldRVAItem(rid /* 1-based */: number): S.MdtFieldRVAItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldRVA, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldRVA];\r\n return L.loadMdtFieldRVA(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtENCLogItem(rid /* 1-based */: number): S.MdtENCLogItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ENCLog, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ENCLog];\r\n return L.loadMdtENCLog(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtENCMapItem(rid /* 1-based */: number): S.MdtENCMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ENCMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ENCMap];\r\n return L.loadMdtENCMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyItem(rid /* 1-based */: number): S.MdtAssemblyItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Assembly, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Assembly];\r\n return L.loadMdtAssembly(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyProcessorItem(rid /* 1-based */: number): S.MdtAssemblyProcessorItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyProcessor, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyProcessor];\r\n return L.loadMdtAssemblyProcessor(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyOSItem(rid /* 1-based */: number): S.MdtAssemblyOSItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyOS, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyOS];\r\n return L.loadMdtAssemblyOS(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyRefItem(rid /* 1-based */: number): S.MdtAssemblyRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyRef];\r\n return L.loadMdtAssemblyRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyRefProcessorItem(rid /* 1-based */: number): S.MdtAssemblyRefProcessorItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyRefProcessor, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyRefProcessor];\r\n return L.loadMdtAssemblyRefProcessor(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyRefOSItem(rid /* 1-based */: number): S.MdtAssemblyRefOSItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyRefOS, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyRefOS];\r\n return L.loadMdtAssemblyRefOS(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFileItem(rid /* 1-based */: number): S.MdtFileItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.File, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.File];\r\n return L.loadMdtFile(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtExportedTypeItem(rid /* 1-based */: number): S.MdtExportedTypeItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ExportedType, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ExportedType];\r\n return L.loadMdtExportedType(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtManifestResourceItem(rid /* 1-based */: number): S.MdtManifestResourceItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ManifestResource, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ManifestResource];\r\n return L.loadMdtManifestResource(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtNestedClassItem(rid /* 1-based */: number): S.MdtNestedClassItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.NestedClass, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.NestedClass];\r\n return L.loadMdtNestedClass(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtGenericParamItem(rid /* 1-based */: number): S.MdtGenericParamItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.GenericParam, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.GenericParam];\r\n return L.loadMdtGenericParam(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodSpecItem(rid /* 1-based */: number): S.MdtMethodSpecItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodSpec, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodSpec];\r\n return L.loadMdtMethodSpec(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtGenericParamConstraintItem(rid /* 1-based */: number): S.MdtGenericParamConstraintItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.GenericParamConstraint, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.GenericParamConstraint];\r\n return L.loadMdtGenericParamConstraint(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n //\r\n // Metadata sizing.\r\n //\r\n\r\n public getHeapSize(heap: F.MetadataHeapSizeID): number {\r\n if (this.metadataSizingCache.heap) {\r\n return this.metadataSizingCache.heap[heap];\r\n }\r\n\r\n const h = this.getMetadataTableHeader();\r\n if (!h) return 0;\r\n\r\n const getHeapSizeFunc = (heap: F.MetadataHeapSizeID) =>\r\n (h.HeapSizes.value & (1 << heap)) != 0 ? 4 : 2;\r\n\r\n this.metadataSizingCache.heap = [\r\n F.MetadataHeapSizeID.String,\r\n F.MetadataHeapSizeID.GUID,\r\n F.MetadataHeapSizeID.Blob]\r\n .map(v => (h.HeapSizes.value & (1 << v)) != 0 ? 4 : 2);\r\n\r\n return this.metadataSizingCache.heap[heap];\r\n }\r\n\r\n public getTableIDSize(t: F.MetadataTableIndex): number {\r\n const info = this.metadataTableInfo;\r\n if (info && info[t]) {\r\n return info[t].idSize;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n public getCodedTokenSize(t: F.MetadataCodedTokenIndex): number {\r\n if (this.metadataSizingCache.codedToken) {\r\n return this.metadataSizingCache.codedToken[t];\r\n }\r\n\r\n this.metadataSizingCache.codedToken = F.ctc.map(c => {\r\n const maxRows = 0xFFFF >> c.tagSize;\r\n for (let tid of c.tables) {\r\n if (this.getMetadataTableRows(tid) > maxRows) {\r\n return 4;\r\n }\r\n }\r\n return 2;\r\n });\r\n\r\n return this.metadataSizingCache.codedToken[t];\r\n }\r\n\r\n\r\n //\r\n // Utilities.\r\n //\r\n\r\n public rvaToOffset(rva: number): number {\r\n const sh = this.getSectionHeaderByRva(rva);\r\n if (!sh) return 0;\r\n\r\n return rva - sh.VirtualAddress.value + sh.PointerToRawData.value;\r\n }\r\n\r\n public offsetToRva(offset: number): number {\r\n const sh = this.getSectionHeaderByOffset(offset);\r\n if (!sh) return 0;\r\n\r\n return offset - sh.PointerToRawData.value + sh.VirtualAddress.value;\r\n }\r\n\r\n //\r\n // Private implementations.\r\n //\r\n\r\n private check(p: number, sz: number): void {\r\n if (p < 0 || p >= this.data.byteLength\r\n || sz < 0 || p + sz > this.data.byteLength) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DATA_POSITION, p, sz);\r\n }\r\n }\r\n\r\n private constructor(buf: ArrayBuffer) {\r\n this.data = new DataView(buf);\r\n this.loadHeaders();\r\n }\r\n\r\n private loadHeaders(): void {\r\n let ptr = 0;\r\n this.dosHeader = L.loadImageDosHeader(this, ptr);\r\n\r\n if (this.dosHeader.e_magic.value != F.IMAGE_DOS_SIGNATURE) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DOS_SIGNATURE, ptr, 2);\r\n }\r\n\r\n ptr = this.dosHeader.e_lfanew.value;\r\n this.peSignature = L.loadU4Field(this, ptr);\r\n\r\n if (this.peSignature.value != F.IMAGE_NT_SIGNATURE) {\r\n throw new E.PEError(E.PEErrorType.INVALID_PE_SIGNATURE, ptr, 4);\r\n }\r\n\r\n ptr += this.peSignature._size;\r\n this.fileHeader = L.loadImageFileHeader(this, ptr);\r\n\r\n ptr += this.fileHeader._size;\r\n const magic = L.loadU2Field(this, ptr);\r\n switch (magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC:\r\n this.optionalHeader = L.loadImageOptionalHeader32(this, ptr);\r\n break;\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC:\r\n this.optionalHeader = L.loadImageOptionalHeader64(this, ptr);\r\n break;\r\n default:\r\n throw new E.PEError(E.PEErrorType.INVALID_OPTIONAL_HEADER_MAGIC, ptr, 2);\r\n }\r\n\r\n if (this.optionalHeader.NumberOfRvaAndSizes.value != F.IMAGE_NUMBEROF_DIRECTORY_ENTRIES) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DATA_DIRECTORY_COUNT,\r\n this.optionalHeader.NumberOfRvaAndSizes._offset,\r\n this.optionalHeader.NumberOfRvaAndSizes._size);\r\n }\r\n\r\n ptr += this.optionalHeader._size;\r\n this.dataDirectories = L.loadStructArrayByCount(this, ptr,\r\n L.loadImageDataDirectory,\r\n this.optionalHeader.NumberOfRvaAndSizes.value);\r\n\r\n ptr += this.dataDirectories._size;\r\n this.sectionHeaders = L.loadStructArrayByCount(this, ptr,\r\n L.loadImageSectionHeader,\r\n this.fileHeader.NumberOfSections.value);\r\n }\r\n\r\n private getSectionHeaderByOffset(offset: number): S.ImageSectionHeader | undefined {\r\n return this.sectionHeaders && this.sectionHeaders.items.filter(h => {\r\n const p = h.PointerToRawData.value;\r\n const sz = h.SizeOfRawData.value;\r\n return offset >= p && offset < p + sz;\r\n }).shift();\r\n }\r\n\r\n private getSectionHeaderByRva(rva: number): S.ImageSectionHeader | undefined {\r\n return this.sectionHeaders && this.sectionHeaders.items.filter(h => {\r\n const p = h.VirtualAddress.value;\r\n const sz = h.VirtualSize.value;\r\n return rva >= p && rva < p + sz;\r\n }).shift();\r\n }\r\n\r\n private isDataDirectoryValid(dd?: S.ImageDataDirectory): boolean {\r\n return (dd && dd.VirtualAddress.value > 0 && dd.Size.value > 0) || false;\r\n }\r\n\r\n private fillMetadataTableInfo(): void {\r\n const h = this.metadataTableHeader;\r\n if (!h) return;\r\n\r\n let info: A.MetadataTableInfo = {};\r\n let nValid = 0;\r\n for (let id = 0; id < F.NumberOfMdTables; id++) {\r\n const valid = U.isSetLong(h.Valid.high, h.Valid.low, id);\r\n const sorted = U.isSetLong(h.Sorted.high, h.Sorted.low, id);\r\n const rows = valid ? h.Rows.items[nValid++].value : 0;\r\n info[id] = {\r\n valid,\r\n sorted,\r\n rows,\r\n idSize: valid ? (rows > 0xFFFF ? 4 : 2) : 0,\r\n baseOffset: 0,\r\n rowSize: 0\r\n };\r\n }\r\n this.metadataTableInfo = info;\r\n }\r\n\r\n private fillMetadataTableInfoExtra(): void {\r\n const h = this.metadataTableHeader;\r\n if (!h) return;\r\n\r\n const ti = this.metadataTableInfo;\r\n if (!ti) return;\r\n\r\n const ctid = F.MetadataCodedTokenIndex;\r\n const ctsz = this.getCodedTokenSize.bind(this);\r\n\r\n const tid = F.MetadataTableIndex;\r\n\r\n const stringsSize = this.getHeapSize(F.MetadataHeapSizeID.String);\r\n const guidSize = this.getHeapSize(F.MetadataHeapSizeID.GUID);\r\n const blobSize = this.getHeapSize(F.MetadataHeapSizeID.Blob);\r\n\r\n let baseOffset = h._offset + h._size;\r\n\r\n let tbli = ti[tid.Module];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + 3 * guidSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.TypeRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.ResolutionScope) + 2 * stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.TypeDef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 2 * stringsSize + ctsz(ctid.TypeDefOrRef) + ti[tid.Field].idSize + ti[tid.MethodDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Field].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Field];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.MethodDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodDef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 2 + 2 + stringsSize + blobSize + ti[tid.Param].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ParamPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Param].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Param];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 2 + stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.InterfaceImpl];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + ctsz(ctid.TypeDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MemberRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.MemberRefParent) + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Constant];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 1 + 1 + ctsz(ctid.HasConstant) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.CustomAttribute];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.HasCustomAttribute) + ctsz(ctid.CustomAttributeType) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldMarshal];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.HasFieldMarshall) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.DeclSecurity];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + ctsz(ctid.HasDeclSecurity) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ClassLayout];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 4 + ti[tid.TypeDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldLayout];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + ti[tid.Field].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.StandAloneSig];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.EventMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + ti[tid.Event].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.EventPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Event].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Event];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + ctsz(ctid.TypeDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.PropertyMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + ti[tid.Property].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.PropertyPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Property].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Property];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodSemantics];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + ti[tid.MethodDef].idSize + ctsz(ctid.HasSemantics);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodImpl];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + 2 * ctsz(ctid.MethodDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ModuleRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.TypeSpec];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ImplMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + ctsz(ctid.MemberForwarded) + stringsSize + ti[tid.ModuleRef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldRVA];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + ti[tid.Field].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ENCLog];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ENCMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Assembly];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 2 + 2 + 2 + 2 + 4 + blobSize + 2 * stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyProcessor];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyOS];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 2 + 2 + 2 + 4 + 2 * blobSize + 2 * stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyRefProcessor];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + ti[tid.AssemblyRef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyRefOS];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + 4 + ti[tid.AssemblyRef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.File];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ExportedType];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + 2 * stringsSize + ctsz(ctid.Implementation);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ManifestResource];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + stringsSize + ctsz(ctid.Implementation);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.NestedClass];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 * ti[tid.TypeDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.GenericParam];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 2 + ctsz(ctid.TypeOrMethodDef) + stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodSpec];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.MethodDefOrRef) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.GenericParamConstraint];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.GenericParam].idSize + ctsz(ctid.TypeDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n }\r\n\r\n private checkMdt(tid: F.MetadataTableIndex, rid: number): boolean {\r\n if (!this.metadataTableInfo) {\r\n return false;\r\n }\r\n\r\n const ti = this.metadataTableInfo[tid];\r\n return ti != null && ti.valid && rid > 0 && rid <= ti.rows;\r\n }\r\n\r\n private readonly data: DataView;\r\n\r\n private dosHeader?: S.ImageDosHeader;\r\n private peSignature?: S.U4Field;\r\n private fileHeader?: S.ImageFileHeader;\r\n private optionalHeader?: S.ImageOptionalHeader32 | S.ImageOptionalHeader64;\r\n private dataDirectories?: S.StructArray;\r\n private sectionHeaders?: S.StructArray;\r\n\r\n private cliHeader?: S.CliHeader;\r\n private metadataRoot?: S.MetadataRoot;\r\n private metadataStreamHeaders?: S.StructArray;\r\n private strongNameSignature?: S.Field;\r\n\r\n private metadataTableHeader?: S.MetadataTableHeader;\r\n private metadataTableInfo?: A.MetadataTableInfo;\r\n\r\n private metadataSizingCache: {\r\n heap?: {\r\n [key: number /* F.MetadataHeapSizeID */]: number;\r\n };\r\n codedToken?: {\r\n [key: number /* F.MetadataCodedTokenIndex */]: number;\r\n }\r\n } = {};\r\n}\r\n","export function createResNavDataMessage(navList: W.NavData[]): W.ResNavDataMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_NAV_DATA,\r\n navList\r\n };\r\n}\r\n\r\nexport function createResPageDataMessage(pageData: W.PageData): W.ResPageDataMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PAGE_DATA,\r\n pageData\r\n };\r\n}\r\n\r\nexport function createResPEPropsMessage(is32Bit?: boolean, isManaged?: boolean): W.ResPEPropsMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PE_PROPS,\r\n is32Bit,\r\n isManaged\r\n };\r\n}\r\n\r\nexport function createResPEErrorMessage(error: string): W.ResPEErrorMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PE_ERROR,\r\n error\r\n };\r\n}\r\n","import * as M from \"./message\";\r\nimport { PEImage } from \"./pe/image\";\r\nimport { generatePageData, clearGeneratorCache } from \"./page-data/generator\";\r\nimport { generateNavList } from \"./page-data/nav-data\";\r\n\r\nlet pe: PEImage | null = null;\r\n\r\nonmessage = (ev) => {\r\n const msg = ev.data as W.WorkerMessage;\r\n switch (msg.type) {\r\n case W.WorkerMessageType.REQ_OPEN_FILE:\r\n handleReqOpenFile(msg as W.ReqOpenFileMessage);\r\n break;\r\n\r\n case W.WorkerMessageType.REQ_OPEN_NAV:\r\n handleReqOpenNav(msg as W.ReqOpenNavMessage);\r\n break;\r\n }\r\n};\r\n\r\nfunction handleReqOpenFile(msg: W.ReqOpenFileMessage): void {\r\n let reader = new FileReader();\r\n\r\n reader.onload = ev => {\r\n try {\r\n const buf = (ev.target).result;\r\n pe = PEImage.load(buf);\r\n clearGeneratorCache();\r\n\r\n // Response with page data.\r\n const pageData = generatePageData(pe, W.PageID.HEADERS);\r\n const pageDataMsg = M.createResPageDataMessage(pageData);\r\n postMessage(pageDataMsg);\r\n\r\n // Response with PE properties.\r\n const is32Bit = pe.is32Bit();\r\n const isManaged = pe.isManaged();\r\n const pePropsMsg = M.createResPEPropsMessage(is32Bit, isManaged);\r\n postMessage(pePropsMsg);\r\n\r\n // Response with navigation data.\r\n const navList = generateNavList(pe);\r\n const navMsg = M.createResNavDataMessage(navList);\r\n postMessage(navMsg);\r\n } catch (ex) {\r\n const msg = M.createResPEErrorMessage(ex.message\r\n || `Unknown error: ${JSON.stringify(ex)}`);\r\n postMessage(msg);\r\n }\r\n };\r\n\r\n reader.onerror = ev => {\r\n pe = null;\r\n const msg = M.createResPEErrorMessage(\"Can't open file.\");\r\n postMessage(msg);\r\n };\r\n\r\n reader.readAsArrayBuffer(msg.file);\r\n}\r\n\r\nfunction handleReqOpenNav(msg: W.ReqOpenNavMessage): void {\r\n if (pe != null) {\r\n const { pageID, subID, pageNum, elemID } = msg.target;\r\n const pageData = generatePageData(pe, pageID, subID, pageNum);\r\n pageData.nav.elemID = elemID;\r\n const res = M.createResPageDataMessage(pageData);\r\n postMessage(res);\r\n }\r\n}"],"sourceRoot":""} \ No newline at end of file diff --git a/ui.css b/ui.css index 99b23d3..4892ab9 100644 --- a/ui.css +++ b/ui.css @@ -1,3 +1,3 @@ -body,input{font-family:"Roboto",sans-serif;font-weight:400;color:#222;font-size:14px;margin:0;padding:0}strong{font-family:"Roboto",sans-serif;font-weight:700}.info{color:#004085;border:1px solid #b8daff;border-radius:5px;background:#cce5ff;padding:10px;margin:10px}.nav{cursor:pointer}#app{display:grid;position:absolute;width:100%;height:100%;grid-template-rows:auto 1fr auto}#app-header{grid-row:1;color:#222;background:#83d0f2;padding:10px}#app-header .pg-title{display:inline-block;margin:0 0 4px 0;font-size:28px}#app-header .pg-finfo{display:inline-block;vertical-align:baseline;margin-left:20px}#app-header .pg-navlst{margin:10px -10px -10px -10px;padding:10px;background:#e4f0f5}#app-header .pg-navlst .nav{margin-left:10px;text-decoration:underline}#app-header .pg-navlst th{font-family:"Roboto",sans-serif;font-weight:700;text-align:left}#app-content{grid-row:2;overflow:auto;padding:10px}#app-content .struct-title{font-size:18px;margin:10px 0;padding:4px 6px;border-left:4px solid;color:#3f87a6}#app-content .struct-table{font-family:"Roboto Mono",monospace;border-collapse:collapse;border-bottom:2px solid #777}#app-content .struct-table th,#app-content .struct-table td{white-space:nowrap;padding:2px 10px}#app-content .struct-table th{font-family:"Roboto",sans-serif;font-weight:700;text-align:left}#app-content .struct-table .st-hdr{border-bottom:1px solid #777;background:#3f87a6;color:#fff}#app-content .struct-table .st-grphdr{border-top:1px solid #777;border-bottom:1px solid #777;background:#83d0f2}#app-content .struct-table .st-tr:nth-child(odd){background:#fff}#app-content .struct-table .st-tr:nth-child(even){background:#e4f0f5}#app-content .file-opener{margin-top:100px;text-align:center;font-size:18px}#app-content .file-opener input{font-size:18px}#app-content .file-opener .info{margin-left:auto;margin-right:auto;width:fit-content}#app-content .top-lnk{text-align:right;margin:4px 0}#app-footer{grid-row:3;color:#fff;background:#222;padding:10px;white-space:nowrap;font-size:12px}#app-footer a{color:#fff}#app-footer>div{display:inline-block;vertical-align:baseline}#app-footer>div:not(:first-child){margin-left:20px}#app-footer>div>strong{font-size:18px} +body,input,select{font-family:"Roboto",sans-serif;font-weight:400;color:#222;font-size:14px;margin:0;padding:0}strong,.strong{font-family:"Roboto",sans-serif;font-weight:700}.info{color:#004085;border:1px solid #b8daff;border-radius:5px;background:#cce5ff;padding:10px;margin:10px}.nav{cursor:pointer}.pgn{margin:4px 0}.pgn select{margin:0 10px}#app{display:grid;position:absolute;width:100%;height:100%;grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}#app-header{grid-column:1/3;grid-row:1;color:#222;background:#83d0f2;padding:10px}#app-header .pg-finame{display:inline-block;margin:0 0 4px 0;font-size:28px}#app-header .pg-finame:not(:last-child){padding-right:10px;border-right:2px solid #3f87a6}#app-header .pg-title{font-family:"Roboto",sans-serif;font-weight:400;display:inline-block;margin-left:10px;font-size:18px}#app-nav-list{grid-column:1;grid-row:2;padding:10px;background:#e4f0f5;overflow:auto}#app-nav-list .nav{margin-left:10px}#app-nav-list .nav:hover{text-decoration:underline}#app-nav-list>ul{margin:0;padding:0;list-style:none}#app-content{grid-column:2;grid-row:2;overflow:auto;padding:10px}#app-content .struct-title{font-size:18px;margin:10px 0;padding:4px 6px;border-left:4px solid;color:#3f87a6}#app-content .struct-table{font-family:"Roboto Mono",monospace;border-collapse:collapse;border-bottom:2px solid #777}#app-content .struct-table th,#app-content .struct-table td{white-space:nowrap;padding:2px 10px;vertical-align:text-top}#app-content .struct-table th.wrap,#app-content .struct-table td.wrap{white-space:normal;overflow-wrap:break-word;word-break:break-word}#app-content .struct-table th{font-family:"Roboto",sans-serif;font-weight:700;text-align:left}#app-content .struct-table .st-hdr{border-bottom:1px solid #777;background:#3f87a6;color:#fff}#app-content .struct-table .st-grphdr{border-top:1px solid #777;border-bottom:1px solid #777;background:#83d0f2}#app-content .struct-table .st-tr:nth-child(even){background:#fff}#app-content .struct-table .st-tr:nth-child(odd){background:#e4f0f5}#app-content .file-opener{margin-top:100px;text-align:center;font-size:18px}#app-content .file-opener input{font-size:18px}#app-content .file-opener .info{margin-left:auto;margin-right:auto;width:fit-content}#app-content .top-lnk{text-align:right;margin:4px 0}#app-footer{grid-column:1/3;grid-row:3;color:#fff;background:#222;padding:10px;white-space:nowrap;font-size:12px}#app-footer a{color:#fff}#app-footer>div{display:inline-block;vertical-align:baseline}#app-footer>div:not(:first-child){margin-left:20px}#app-footer>div>strong{font-size:18px} /*# sourceMappingURL=ui.css.map */ diff --git a/ui.css.map b/ui.css.map index 892283e..9e33f6d 100644 --- a/ui.css.map +++ b/ui.css.map @@ -1 +1 @@ -{"version":3,"file":"ui.css","sources":["ui.scss","_var.scss","_mixin.scss"],"sourcesContent":["@import \"var\";\n@import \"mixin\";\n\nbody, input {\n @include txt-normal;\n \n color: $color-txt;\n font-size: $size-txt-mid;\n margin: 0;\n padding: 0;\n}\n\nstrong {\n @include txt-bold;\n}\n\n.info {\n color: $color-info-txt;\n border: 1px solid $color-info-bdr;\n border-radius: 5px;\n background: $color-info-bg;\n padding: $size-pad-lg;\n margin: $size-pad-lg;\n}\n\n.nav {\n cursor: pointer;\n}\n\n#app {\n display: grid;\n position: absolute;\n width: 100%;\n height: 100%;\n grid-template-rows: auto 1fr auto;\n}\n\n#app-header {\n grid-row: 1;\n color: $color-txt;\n background: $color-bg-mid;\n padding: $size-pad-lg;\n\n .pg-title {\n display: inline-block;\n margin: 0 0 $size-pad-mid 0;\n font-size: $size-txt-lg;\n }\n\n .pg-finfo {\n display: inline-block;\n vertical-align: baseline;\n margin-left: 2 * $size-pad-lg;\n }\n\n .pg-navlst {\n margin: $size-pad-lg 0-$size-pad-lg 0-$size-pad-lg 0-$size-pad-lg;\n padding: $size-pad-lg;\n background: $color-bg-mid-lt;\n\n .nav {\n margin-left: $size-pad-lg;\n text-decoration: underline;\n }\n\n th {\n @include txt-bold;\n text-align: left;\n }\n }\n}\n\n#app-content {\n grid-row: 2;\n overflow: auto;\n padding: $size-pad-lg;\n\n .struct-title {\n font-size: $size-txt-mid-lg;\n margin: $size-pad-lg 0;\n padding: $size-pad-mid $size-pad-lg - $size-pad-mid;\n border-left: $size-pad-mid solid;\n color: $color-bg-mid-dk;\n }\n\n .struct-table {\n @include txt-code;\n border-collapse: collapse;\n border-bottom: 2px solid $color-txt-mid-lt;\n \n th, td {\n white-space: nowrap;\n padding: $size-pad-sm $size-pad-lg;\n }\n \n th {\n @include txt-bold;\n text-align: left;\n }\n\n .st-hdr {\n border-bottom: 1px solid $color-txt-mid-lt;\n background: $color-bg-mid-dk;\n color: $color-txt-lt;\n }\n\n .st-grphdr{\n border-top: 1px solid $color-txt-mid-lt;\n border-bottom: 1px solid $color-txt-mid-lt;\n background: $color-bg-mid;\n }\n\n .st-tr{\n &:nth-child(odd) {\n background: $color-bg-lt;\n }\n\n &:nth-child(even) {\n background: $color-bg-mid-lt;\n }\n }\n }\n\n .file-opener {\n margin-top: 100px;\n text-align: center;\n font-size: $size-txt-mid-lg;\n\n input {\n font-size: $size-txt-mid-lg;\n }\n\n .info {\n margin-left: auto;\n margin-right: auto;\n width: fit-content;\n }\n }\n\n .top-lnk {\n text-align: right;\n margin: $size-pad-mid 0;\n }\n}\n\n#app-footer {\n grid-row: 3;\n color: $color-txt-lt;\n background: $color-bg-dk;\n padding: $size-pad-lg;\n white-space: nowrap;\n font-size: $size-txt-sm;\n\n a {\n color: $color-txt-lt;\n }\n\n &>div {\n display: inline-block;\n vertical-align: baseline;\n\n &:not(:first-child) {\n margin-left: 2 * $size-pad-lg;\n }\n\n &>strong {\n font-size: $size-txt-mid-lg;\n }\n }\n}","$font-mono: 'Roboto Mono', monospace;\n$font-text: 'Roboto', sans-serif;\n\n$font-w-reg: 400;\n$font-w-bold: 700;\n\n$color-bg-lt: #ffffff;\n$color-bg-mid-lt: #e4f0f5;\n$color-bg-mid: #83d0f2;\n$color-bg-mid-dk: #3f87a6;\n$color-bg-dk: #222222;\n$color-txt-lt: #ffffff;\n$color-txt-mid-lt: #777777;\n$color-txt: #222222;\n\n$color-info-txt: #004085;\n$color-info-bg: #cce5ff;\n$color-info-bdr: #b8daff;\n\n$size-pad-sm: 2px;\n$size-pad-mid: 4px;\n$size-pad-lg: 10px;\n\n$size-txt-sm: 12px;\n$size-txt-mid: 14px;\n$size-txt-mid-lg: 18px;\n$size-txt-lg: 28px;\n","@import \"var\";\n@mixin txt-normal {\n font-family: $font-text;\n font-weight: $font-w-reg;\n}\n\n@mixin txt-bold {\n font-family: $font-text;\n font-weight: $font-w-bold;\n}\n\n@mixin txt-code {\n font-family: $font-mono;\n}"],"names":[],"mappings":"AAGA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YL,GAAG,AAIA,IAAK,CAAA,YAAY,CAAE,CAChB,WAAW,CAAE,IAAgB,CAChC,AAlBT,AAoBQ,WApBG,CAYL,GAAG,CAQC,MAAM,AAAC,CACL,SAAS,CC7IH,IAAI,CD8Ib"} \ No newline at end of file +{"version":3,"file":"ui.css","sources":["ui.scss","_var.scss","_mixin.scss"],"sourcesContent":["@import \"var\";\n@import \"mixin\";\n\nbody, input, select {\n @include txt-normal;\n \n color: $color-txt;\n font-size: $size-txt-mid;\n margin: 0;\n padding: 0;\n}\n\nstrong, .strong {\n @include txt-bold;\n}\n\n.info {\n color: $color-info-txt;\n border: 1px solid $color-info-bdr;\n border-radius: 5px;\n background: $color-info-bg;\n padding: $size-pad-lg;\n margin: $size-pad-lg;\n}\n\n.nav {\n cursor: pointer;\n}\n\n.pgn {\n margin: $size-pad-mid 0;\n\n select {\n margin:0 $size-pad-lg;\n }\n}\n\n#app {\n display: grid;\n position: absolute;\n width: 100%;\n height: 100%;\n grid-template-rows: auto 1fr auto;\n grid-template-columns: auto 1fr;\n}\n\n#app-header {\n grid-column: 1/3;\n grid-row: 1;\n color: $color-txt;\n background: $color-bg-mid;\n padding: $size-pad-lg;\n\n .pg-finame {\n display: inline-block;\n margin: 0 0 $size-pad-mid 0;\n font-size: $size-txt-lg;\n &:not(:last-child) {\n padding-right: $size-pad-lg;\n border-right: 2px solid $color-bg-mid-dk;\n }\n }\n\n .pg-title {\n @include txt-normal;\n display: inline-block;\n margin-left: $size-pad-lg;\n font-size: $size-txt-mid-lg;\n }\n}\n\n#app-nav-list {\n grid-column: 1;\n grid-row: 2;\n padding: $size-pad-lg;\n background: $color-bg-mid-lt;\n overflow: auto;\n\n .nav {\n margin-left: $size-pad-lg;\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n &>ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n}\n\n#app-content {\n grid-column: 2;\n grid-row: 2;\n overflow: auto;\n padding: $size-pad-lg;\n\n .struct-title {\n font-size: $size-txt-mid-lg;\n margin: $size-pad-lg 0;\n padding: $size-pad-mid $size-pad-lg - $size-pad-mid;\n border-left: $size-pad-mid solid;\n color: $color-bg-mid-dk;\n }\n\n .struct-table {\n @include txt-code;\n border-collapse: collapse;\n border-bottom: 2px solid $color-txt-mid-lt;\n \n th, td {\n white-space: nowrap;\n padding: $size-pad-sm $size-pad-lg;\n vertical-align: text-top;\n\n &.wrap {\n white-space: normal;\n //max-width: 395px;\n overflow-wrap: break-word;\n word-break: break-word;\n }\n }\n \n th {\n @include txt-bold;\n text-align: left;\n }\n\n .st-hdr {\n border-bottom: 1px solid $color-txt-mid-lt;\n background: $color-bg-mid-dk;\n color: $color-txt-lt;\n }\n\n .st-grphdr{\n border-top: 1px solid $color-txt-mid-lt;\n border-bottom: 1px solid $color-txt-mid-lt;\n background: $color-bg-mid;\n }\n\n .st-tr{\n &:nth-child(even) {\n background: $color-bg-lt;\n }\n\n &:nth-child(odd) {\n background: $color-bg-mid-lt;\n }\n }\n }\n\n .file-opener {\n margin-top: 100px;\n text-align: center;\n font-size: $size-txt-mid-lg;\n\n input {\n font-size: $size-txt-mid-lg;\n }\n\n .info {\n margin-left: auto;\n margin-right: auto;\n width: fit-content;\n }\n }\n\n .top-lnk {\n text-align: right;\n margin: $size-pad-mid 0;\n }\n}\n\n#app-footer {\n grid-column: 1/3;\n grid-row: 3;\n color: $color-txt-lt;\n background: $color-bg-dk;\n padding: $size-pad-lg;\n white-space: nowrap;\n font-size: $size-txt-sm;\n\n a {\n color: $color-txt-lt;\n }\n\n &>div {\n display: inline-block;\n vertical-align: baseline;\n\n &:not(:first-child) {\n margin-left: 2 * $size-pad-lg;\n }\n\n &>strong {\n font-size: $size-txt-mid-lg;\n }\n }\n}","$font-mono: 'Roboto Mono', monospace;\n$font-text: 'Roboto', sans-serif;\n\n$font-w-reg: 400;\n$font-w-bold: 700;\n\n$color-bg-lt: #ffffff;\n$color-bg-mid-lt: #e4f0f5;\n$color-bg-mid: #83d0f2;\n$color-bg-mid-dk: #3f87a6;\n$color-bg-dk: #222222;\n$color-txt-lt: #ffffff;\n$color-txt-mid-lt: #777777;\n$color-txt: #222222;\n\n$color-info-txt: #004085;\n$color-info-bg: #cce5ff;\n$color-info-bdr: #b8daff;\n\n$size-pad-sm: 2px;\n$size-pad-mid: 4px;\n$size-pad-lg: 10px;\n\n$size-txt-sm: 12px;\n$size-txt-mid: 14px;\n$size-txt-mid-lg: 18px;\n$size-txt-lg: 28px;\n\n$size-ln-height-normal: 24px;\n","@import \"var\";\n@mixin txt-normal {\n font-family: $font-text;\n font-weight: $font-w-reg;\n}\n\n@mixin txt-bold {\n font-family: $font-text;\n font-weight: $font-w-bold;\n}\n\n@mixin txt-code {\n font-family: $font-mono;\n}"],"names":[],"mappings":"AAGA,AAAA,IAAI,CAAE,KAAK,CAAE,MAAM,AAAC,CEDhB,WAAW,CDDH,QAAQ,CAAE,UAAU,CCE5B,WAAW,CDAF,GAAG,CDGZ,KAAK,CCOG,IAAO,CDNf,SAAS,CCiBE,IAAI,CDhBf,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CACb,AAED,AAAA,MAAM,CAAE,OAAO,AAAC,CELZ,WAAW,CDNH,QAAQ,CAAE,UAAU,CCO5B,WAAW,CDJD,GAAG,CDUhB,AAED,AAAA,KAAK,AAAC,CACF,KAAK,CCFQ,OAAO,CDGpB,MAAM,CAAE,GAAG,CAAC,KAAK,CCDJ,OAAO,CDEpB,aAAa,CAAE,GAAG,CAClB,UAAU,CCJE,OAAO,CDKnB,OAAO,CCAG,IAAI,CDCd,MAAM,CCDI,IAAI,CDEjB,AAED,AAAA,IAAI,AAAC,CACD,MAAM,CAAE,OAAO,CAClB,AAED,AAAA,IAAI,AAAC,CACD,MAAM,CCVK,GAAG,CDUQ,CAAC,CAK1B,AAND,AAGI,IAHA,CAGA,MAAM,AAAC,CACH,MAAM,CAAC,CAAC,CCZF,IAAI,CDab,AAGL,AAAA,IAAI,AAAC,CACD,OAAO,CAAE,IAAI,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,IAAgB,CAChC,AAnBT,AAqBQ,WArBG,CAaL,GAAG,CAQC,MAAM,AAAC,CACL,SAAS,CC5KH,IAAI,CD6Kb"} \ No newline at end of file diff --git a/ui.js b/ui.js index 5db8b31..eb500b9 100644 --- a/ui.js +++ b/ui.js @@ -1,2 +1,2 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}([function(e,t){e.exports=React},function(e,t){e.exports=ReactRedux},function(e,t,n){"use strict";t.__esModule=!0,t.createOpenFileAction=function(e){return{type:"OPEN_FILE",file:e}},t.createOpenNavAction=function(e){return{type:"OPEN_NAV",target:e}},t.createSetNavListAction=function(e){return{type:"SET_NAV_LIST",navList:e}},t.createSetPageDataAction=function(e){return{type:"SET_PAGE_DATA",data:e}},t.createSetPEPropsAction=function(e,t){return{type:"SET_PE_PROPS",is32Bit:e,isManaged:t}}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),c=n(5);var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.pageID;if(e){var t={pageID:e,title:"TOP"};return o.createElement("div",{className:"top-lnk"},o.createElement(c.NavLink,{target:t}))}return null},t}(o.Component);t.TopLink=i.connect(function(e){var t=e.pageData;return{pageID:t&&t.nav.pageID}})(l)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0);function i(e){return o.createElement("h2",{id:e.elemID,className:"struct-title"},e.title)}function c(e,t){var n=e.offset,r=e.size,a=e.rawData,i=e.name,c=e.value;e.descriptions;return o.createElement("tr",{key:t,className:"st-tr"},o.createElement("td",null,n),o.createElement("td",null,r),o.createElement("td",null,a.map(function(e,t){return o.createElement("div",{className:"td-line",key:t},e)})),o.createElement("td",null,i),o.createElement("td",null,c),o.createElement("td",null))}t.renderSimpleStruct=function(e){return o.createElement("div",{className:"struct-data"},i(e),o.createElement(l,null,e.items&&e.items.map(function(e,t){return c(e,t.toString())})))},t.renderGroupedStruct=function(e){return o.createElement("div",{className:"struct-data"},i(e),o.createElement(l,null,e.groups&&e.groups.map(function(e,t){return[(n=e.title,r=t.toString(),o.createElement("tr",{key:r,className:"st-grphdr"},o.createElement("th",{colSpan:6},n)))].concat(e.items&&e.items.map(function(e,n){return c(e,t+"."+n)})||[]);var n,r})))};var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement("table",{className:"struct-table"},o.createElement("thead",null,o.createElement("tr",{className:"st-hdr"},o.createElement("th",null,"Offset"),o.createElement("th",null,"Size"),o.createElement("th",null,"Raw Data"),o.createElement("th",null,"Name"),o.createElement("th",null,"Value"),o.createElement("th",null,"Description"))),o.createElement("tbody",null,this.props.children))},t}(o.Component)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),c=n(2);var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props,t=e.target,n=e.extraClass,r=e.onClick,a=t.title,i="nav";return n&&(i+=" "+n),o.createElement("a",{className:i,title:a,onClick:r},a)},t}(o.Component);t.NavLink=i.connect(null,function(e,t){return{onClick:function(){e(c.createOpenNavAction(t.target))}}})(l)},function(e,t){e.exports=Redux},function(e,t,n){"use strict";t.__esModule=!0,t.createReqOpenFileMessage=function(e){return{type:"REQ_OPEN_FILE",file:e}},t.createReqOpenNavMessage=function(e){return{type:"REQ_OPEN_NAV",target:e}}},function(e,t,n){"use strict";t.__esModule=!0;var r,a,o=n(2),i=n(7);t.workerClientMiddleware=function(e){return function(t){return function(n){switch(n.type){case"OPEN_FILE":var a=n.file;r.postMessage(i.createReqOpenFileMessage(a));break;case"OPEN_NAV":var o=n.target,c=e.getState().pageData,l=o.pageID;o.elemID;c&&c.nav.pageID==l||r.postMessage(i.createReqOpenNavMessage(o))}return t(n)}}},t.initWorkerClient=function(e){a=e,(r=new Worker("worker.js")).onmessage=function(e){return function(e){switch(e.type){case"RES_NAV_DATA":var t=e.navList;a.dispatch(o.createSetNavListAction(t));break;case"RES_PAGE_DATA":var n=e.pageData;a.dispatch(o.createSetPageDataAction(n));break;case"RES_PE_PROPS":var r=e,i=r.is32Bit,c=r.isManaged;a.dispatch(o.createSetPEPropsAction(i,c))}}(e.data)}}},function(e,t,n){"use strict";function r(e){setTimeout(function(){var t;e?(t=document.getElementById(e))&&t.scrollIntoView():(t=document.getElementById("app-content"))&&(t.scrollTop=0)},1)}t.__esModule=!0,t.actionListenerMiddleware=function(e){return function(t){return function(n){switch(n.type){case"OPEN_FILE":var a=e.getState().appInfo,o=n.file;document.title=o.name+" - "+a.title;break;case"OPEN_NAV":var i=e.getState().pageData,c=n.target,l=c.pageID,u=c.elemID;i&&i.nav.pageID===l&&r(u);break;case"SET_PAGE_DATA":r(n.data.nav.elemID)}return t(n)}}}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1);var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.appInfo,t=e.title,n=e.version,r=e.author,a=e.homepage,i=e.bugsUrl,c=e.releaseNotesUrl,l=e.buildTimeLocal,u=e.year;return o.createElement("footer",{id:"app-footer"},o.createElement("div",null,o.createElement("strong",null,t)),o.createElement("div",null,"Coypright © ",r," ",u),o.createElement("div",null,"Version ",n),o.createElement("div",null,"Last build: ",l),o.createElement("div",null,o.createElement("a",{href:c+"#"+n,target:"_blank"},"Release Notes")),o.createElement("div",null,o.createElement("a",{href:"/latest",target:"_blank"},"Try Latest Build")),o.createElement("div",null,o.createElement("a",{href:a,target:"_blank"},"View on GitHub")),o.createElement("div",null,o.createElement("a",{href:i,target:"_blank"},"Report Issue")))},t}(o.Component);t.PageFooter=i.connect(function(e){return{appInfo:e.appInfo}})(c)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(4),c=n(3),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},i.renderSimpleStruct(e.cliHeader),o.createElement(c.TopLink,null),this.renderMetadataRoot(),this.renderStreamHeaders())},t.prototype.renderMetadataRoot=function(){var e=this.props.data;return e.metadataRoot&&o.createElement(o.Fragment,null,i.renderSimpleStruct(e.metadataRoot),o.createElement(c.TopLink,null))},t.prototype.renderStreamHeaders=function(){var e=this.props.data;return e.streamHeaders&&o.createElement(o.Fragment,null,i.renderGroupedStruct(e.streamHeaders),o.createElement(c.TopLink,null))},t}(o.Component);t.MetadataHeadersPage=l},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(4),c=n(3),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},i.renderSimpleStruct(e.dosHeader),o.createElement(c.TopLink,null),i.renderSimpleStruct(e.peSignature),o.createElement(c.TopLink,null),i.renderSimpleStruct(e.fileHeader),o.createElement(c.TopLink,null),i.renderGroupedStruct(e.optionalHeader),o.createElement(c.TopLink,null),i.renderGroupedStruct(e.dataDirectories),o.createElement(c.TopLink,null),i.renderGroupedStruct(e.sectionHeaders),o.createElement(c.TopLink,null))},t}(o.Component);t.HeadersPage=l},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),c=n(2);var l=function(e){function t(t){var n=e.call(this,t)||this;return n.onFileChange=n.onFileChange.bind(n),n}return a(t,e),t.prototype.render=function(){return o.createElement("section",{className:"file-opener"},o.createElement("div",null,"Select a file:"),o.createElement("div",null,o.createElement("input",{type:"file",onChange:this.onFileChange})),o.createElement("div",{className:"info"},"No data would be uploaded, everything is parsed locally."))},t.prototype.onFileChange=function(e){var t=this.props.onFileSelected,n=e.target.files;n&&n.length>0&&t(n[0])},t}(o.Component);t.OpenFilePage=i.connect(null,function(e){return{onFileSelected:function(t){return e(c.createOpenFileAction(t))}}})(l)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),c=n(13),l=n(12),u=n(11);var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement("section",{id:"app-content"},this.renderContent())},t.prototype.renderContent=function(){var e=this.props.pageData;if(null==e)return o.createElement(c.OpenFilePage,null);switch(e.nav.pageID){case"HEADERS":return o.createElement(l.HeadersPage,{data:e});case"MD_HEADERS":return o.createElement(u.MetadataHeadersPage,{data:e});default:return o.createElement("div",null,"Page not found.")}},t}(o.Component);t.PageContent=i.connect(function(e){return{pageData:e.pageData}})(s)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),c=n(5);var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.fileInfo;return o.createElement("header",{id:"app-header"},e?this.renderFileInfo(e):this.renderWelcome())},t.prototype.renderWelcome=function(){return o.createElement("div",{className:"pg-title-line"},o.createElement("h1",{className:"pg-title"},"Welcome to PE Viewer."))},t.prototype.renderFileInfo=function(e){e.name,e.size,e.is32Bit,e.isManaged;return o.createElement(o.Fragment,null,this.renderTitleLine(e),this.renderNavList())},t.prototype.renderTitleLine=function(e){var t=e.name,n=e.size,r=e.is32Bit,a=e.isManaged;return o.createElement("div",{className:"pg-title-line"},o.createElement("h1",{className:"pg-title"},t),o.createElement("div",{className:"pg-finfo"},o.createElement("span",null,n.toLocaleString()," bytes."),null!=r&&o.createElement(o.Fragment,null,o.createElement("span",null," | "),o.createElement("span",null,r?"32-bit":"64-bit")),null!=a&&o.createElement(o.Fragment,null,o.createElement("span",null," | "),o.createElement("span",null,a?"managed":"unmanaged"))))},t.prototype.renderNavList=function(){var e=this.props.navList;return e?o.createElement("div",{className:"pg-navlst"},o.createElement("table",null,o.createElement("tbody",null,e.map(function(e,t){return o.createElement("tr",{key:t},o.createElement("th",null,o.createElement(c.NavLink,{target:e.target})),o.createElement("td",null,e.children&&e.children.map(function(e,t){return o.createElement(c.NavLink,{key:t,target:e.target})})))})))):null},t}(o.Component);t.PageHeader=i.connect(function(e){return{fileInfo:e.fileInfo,navList:e.navList}})(l)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(15),c=n(14),l=n(10),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement(o.Fragment,null,o.createElement(i.PageHeader,null),o.createElement(c.PageContent,null),o.createElement(l.PageFooter,null))},t}(o.Component);t.App=u},function(e,t,n){"use strict";t.__esModule=!0;var r=n(6);t.appReducer=r.combineReducers({appInfo:function(e,t){void 0===e&&(e=null);return e},fileInfo:function(e,t){void 0===e&&(e=null);switch(t.type){case"OPEN_FILE":var n=t.file,r=n.name,a=n.size;return Object.assign({},e,{name:r,size:a});case"SET_PE_PROPS":var o=t,i=o.is32Bit,c=o.isManaged;return Object.assign({},e,{is32Bit:i,isManaged:c});default:return e}},pageData:function(e,t){void 0===e&&(e=null);switch(t.type){case"SET_PAGE_DATA":var n=t.data;return n;default:return e}},navList:function(e,t){void 0===e&&(e=[]);switch(t.type){case"SET_NAV_LIST":var n=t.navList;return n;default:return e}}})},function(e){e.exports={title:"PE Viewer",version:"0.1.0",author:"Anders Liu",homepage:"https://github.com/anders-liu/peviewer-dev#readme",bugs_url:"https://github.com/anders-liu/peviewer-dev/issues",release_notes:"https://github.com/anders-liu/peviewer/blob/master/RELEASES.md",build_time:"Wed, 06 Jun 2018 04:51:37 GMT"}},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";t.__esModule=!0;var r=n(0),a=n(19),o=n(6),i=n(1),c=n(18),l=n(17),u=n(16),s=n(9),p=n(8),f={title:c.title,version:c.version,author:c.author,homepage:c.homepage,bugsUrl:c.bugs_url,releaseNotesUrl:c.release_notes,buildTimeLocal:new Date(Date.parse(c.build_time)).toLocaleString(),year:(new Date).getFullYear().toString()},d={appInfo:f,navList:[]};document.title=""+f.title;var m=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||o.compose,_=o.createStore(l.appReducer,d,m(o.applyMiddleware(s.actionListenerMiddleware,p.workerClientMiddleware)));p.initWorkerClient(_),a.render(r.createElement(i.Provider,{store:_},r.createElement(u.App,null)),document.getElementById("app"))}]); +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=24)}([function(e,t){e.exports=React},function(e,t){e.exports=ReactRedux},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(5);var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.pageID;if(e){var t={pageID:e,title:"TOP"};return o.createElement("div",{className:"top-lnk"},o.createElement(l.NavLink,{target:t,title:"Back to top"}))}return null},t}(o.Component);t.TopLink=i.connect(function(e){var t=e.pageData;return{pageID:t&&t.nav.pageID}})(c)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0);function i(e,t){return o.createElement("h2",{id:t,className:"struct-title"},e)}function l(e){return i(e.title,e.elemID)}function c(e,t){var n=e.offset,r=e.size,a=e.rawData,i=e.name,l=e.value;e.descriptions;return o.createElement("tr",{key:t,className:"st-tr"},o.createElement("td",null,n),o.createElement("td",null,r),o.createElement("td",null,a.map(function(e,t){return o.createElement("div",{className:"td-line",key:t},e)})),o.createElement("td",null,i),o.createElement("td",{className:"wrap"},l),o.createElement("td",null))}t.renderTableTitle=i,t.renderSimpleStruct=function(e){return o.createElement("div",{className:"struct-data"},l(e),o.createElement(u,null,e.items&&e.items.map(function(e,t){return c(e,t.toString())})))},t.renderGroupedStruct=function(e){return o.createElement("div",{className:"struct-data"},l(e),o.createElement(u,null,e.groups&&e.groups.map(function(e,t){return[(n=e.title,r=t.toString(),n?o.createElement("tr",{key:r,className:"st-grphdr"},o.createElement("th",{colSpan:6},n)):null)].concat(e.items&&e.items.map(function(e,n){return c(e,t+"."+n)})||[]);var n,r})))};var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement("table",{className:"struct-table"},o.createElement("thead",null,o.createElement("tr",{className:"st-hdr"},o.createElement("th",null,"Offset"),o.createElement("th",null,"Size"),o.createElement("th",null,"Raw Data"),o.createElement("th",null,"Name"),o.createElement("th",null,"Value"),o.createElement("th",null,"Description"))),o.createElement("tbody",null,this.props.children))},t}(o.Component)},function(e,t,n){"use strict";t.__esModule=!0,t.createOpenFileAction=function(e){return{type:"OPEN_FILE",file:e}},t.createOpenNavAction=function(e){return{type:"OPEN_NAV",target:e}},t.createSetNavListAction=function(e){return{type:"SET_NAV_LIST",navList:e}},t.createSetPageDataAction=function(e){return{type:"SET_PAGE_DATA",data:e}},t.createSetPEPropsAction=function(e,t){return{type:"SET_PE_PROPS",is32Bit:e,isManaged:t}}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(4);var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props,t=e.target,n=e.disable,r=e.text,a=e.title,i=e.extraClass,l=e.onClick,c="nav";return n&&(c+=" disabled"),i&&(c+=" "+i),n||!t?o.createElement("span",{className:c,title:a},r):o.createElement("a",{className:c,title:a||t.title,onClick:l},r||t.title)},t}(o.Component);t.NavLink=i.connect(null,function(e,t){return{onClick:function(){e(l.createOpenNavAction(t.target))}}})(c)},function(e,t){e.exports=Redux},function(e,t,n){"use strict";t.__esModule=!0,t.createReqOpenFileMessage=function(e){return{type:"REQ_OPEN_FILE",file:e}},t.createReqOpenNavMessage=function(e){return{type:"REQ_OPEN_NAV",target:e}}},function(e,t,n){"use strict";t.__esModule=!0;var r,a,o=n(4),i=n(7);t.workerClientMiddleware=function(e){return function(t){return function(n){switch(n.type){case"OPEN_FILE":var a=n.file;r.postMessage(i.createReqOpenFileMessage(a));break;case"OPEN_NAV":var o=n.target,l=e.getState().pageData,c=o.pageID,u=o.pageNum;l&&l.nav.pageID==c&&l.nav.pageNum==u||r.postMessage(i.createReqOpenNavMessage(o))}return t(n)}}},t.initWorkerClient=function(e){a=e,(r=new Worker("worker.js")).onmessage=function(e){return function(e){switch(e.type){case"RES_NAV_DATA":var t=e.navList;a.dispatch(o.createSetNavListAction(t));break;case"RES_PAGE_DATA":var n=e.pageData;a.dispatch(o.createSetPageDataAction(n));break;case"RES_PE_PROPS":var r=e,i=r.is32Bit,l=r.isManaged;a.dispatch(o.createSetPEPropsAction(i,l))}}(e.data)}}},function(e,t,n){"use strict";function r(e){setTimeout(function(){var t;e?(t=document.getElementById(e))&&t.scrollIntoView():(t=document.getElementById("app-content"))&&(t.scrollTop=0)},1)}t.__esModule=!0,t.actionListenerMiddleware=function(e){return function(t){return function(n){switch(n.type){case"OPEN_FILE":var a=e.getState().appInfo,o=n.file;document.title=o.name+" - "+a.title;break;case"OPEN_NAV":var i=e.getState().pageData,l=n.target,c=l.pageID,u=l.elemID;i&&i.nav.pageID===c&&r(u);break;case"SET_PAGE_DATA":r(n.data.nav.elemID)}return t(n)}}}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1);var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.appInfo,t=e.title,n=e.version,r=e.author,a=e.homepage,i=e.bugsUrl,l=e.releaseNotesUrl,c=e.buildTimeLocal,u=e.year;return o.createElement("footer",{id:"app-footer"},o.createElement("div",null,o.createElement("strong",null,t)),o.createElement("div",null,"© ",u," ",r),o.createElement("div",null,"Version ",n),o.createElement("div",null,"Last build: ",c),o.createElement("div",null,o.createElement("a",{href:l+"#"+n.replace(/\./g,""),target:"_blank"},"Release Notes")),o.createElement("div",null,o.createElement("a",{href:"/latest",target:"_blank"},"Try Latest Build")),o.createElement("div",null,o.createElement("a",{href:a,target:"_blank"},"View on GitHub")),o.createElement("div",null,o.createElement("a",{href:i,target:"_blank"},"Report Issue")))},t}(o.Component);t.PageFooter=i.connect(function(e){return{appInfo:e.appInfo}})(l)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(4),c=n(5);var u=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSelectChange=n.handleSelectChange.bind(n),n}return a(t,e),t.prototype.render=function(){var e=this.props,t=e.paging,n=e.pageData;if(!t||!n||t.pageNavList.length<=1)return null;var r=t.currentPageNumber,a=t.pageNavList;n.nav;return o.createElement("div",{className:"pgn"},o.createElement(c.NavLink,{target:a[r-1],disable:r<=0,text:"< prev"}),o.createElement("select",{onChange:this.handleSelectChange,value:a[r].title},t.pageNavList.map(function(e,t){return o.createElement("option",{key:t},e.title)})),o.createElement(c.NavLink,{target:a[r+1],disable:r>=a.length-1,text:"next >"}))},t.prototype.handleSelectChange=function(e){var t=this.props,n=t.paging;(0,t.onSelectionChange)(n.pageNavList[e.currentTarget.selectedIndex])},t}(o.Component);t.Paginate=i.connect(function(e){var t=e.pageData;return{paging:t&&t.paging,pageData:t}},function(e){return{onSelectionChange:function(t){e(l.createOpenNavAction(t))}}})(u)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=n(11),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},o.createElement(c.Paginate,null),i.renderGroupedStruct(e.items),o.createElement(c.Paginate,null),o.createElement(l.TopLink,null))},t}(o.Component);t.PagedItemListPage=u},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},i.renderGroupedStruct(e.tableHeader),o.createElement(l.TopLink,null),this.renderTableList(),o.createElement(l.TopLink,null))},t.prototype.renderTableList=function(){return o.createElement("div",{className:"struct-data"},i.renderTableTitle("Metadata Table List","mdt-lst"),o.createElement("table",{className:"struct-table"},o.createElement("thead",null,o.createElement("tr",{className:"st-hdr"},o.createElement("th",null,"Index"),o.createElement("th",null,"Name"),o.createElement("th",null,"Rows"),o.createElement("th",null,"Valid"),o.createElement("th",null,"Sorted"),o.createElement("th",null,"Link"))),o.createElement("tbody",null,this.props.data.tableInfo.map(function(e,t){return o.createElement("tr",{key:t,className:"st-tr"},o.createElement("td",null,e.index),o.createElement("td",null,e.name),o.createElement("td",null,e.rows),o.createElement("td",null,e.valid?"X":""),o.createElement("td",null,e.sorted?"X":""),o.createElement("td",null))}))))},t}(o.Component);t.MdsTablePage=c},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},i.renderSimpleStruct(e.cliHeader),o.createElement(l.TopLink,null),this.renderMetadataRoot(),this.renderStreamHeaders(),this.renderSNSignature())},t.prototype.renderMetadataRoot=function(){var e=this.props.data;return e.metadataRoot&&o.createElement(o.Fragment,null,i.renderSimpleStruct(e.metadataRoot),o.createElement(l.TopLink,null))},t.prototype.renderStreamHeaders=function(){var e=this.props.data;return e.streamHeaders&&o.createElement(o.Fragment,null,i.renderGroupedStruct(e.streamHeaders),o.createElement(l.TopLink,null))},t.prototype.renderSNSignature=function(){var e=this.props.data;return e.snSignature&&o.createElement(o.Fragment,null,i.renderSimpleStruct(e.snSignature),o.createElement(l.TopLink,null))},t}(o.Component);t.MetadataHeadersPage=c},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(3),l=n(2),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.data;return o.createElement("section",{className:"data-page"},i.renderSimpleStruct(e.dosHeader),o.createElement(l.TopLink,null),i.renderSimpleStruct(e.peSignature),o.createElement(l.TopLink,null),i.renderSimpleStruct(e.fileHeader),o.createElement(l.TopLink,null),i.renderGroupedStruct(e.optionalHeader),o.createElement(l.TopLink,null),i.renderGroupedStruct(e.dataDirectories),o.createElement(l.TopLink,null),i.renderGroupedStruct(e.sectionHeaders),o.createElement(l.TopLink,null))},t}(o.Component);t.HeadersPage=c},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(4);var c=function(e){function t(t){var n=e.call(this,t)||this;return n.onFileChange=n.onFileChange.bind(n),n}return a(t,e),t.prototype.render=function(){return o.createElement("section",{className:"file-opener"},o.createElement("div",null,"Select a file:"),o.createElement("div",null,o.createElement("input",{type:"file",onChange:this.onFileChange})),o.createElement("div",{className:"info"},"No data would be uploaded, everything is parsed locally."))},t.prototype.onFileChange=function(e){var t=this.props.onFileSelected,n=e.target.files;n&&n.length>0&&t(n[0])},t}(o.Component);t.OpenFilePage=i.connect(null,function(e){return{onFileSelected:function(t){return e(l.createOpenFileAction(t))}}})(c)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(16),c=n(15),u=n(14),s=n(13),p=n(12);var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement("section",{id:"app-content"},this.renderContent())},t.prototype.renderContent=function(){var e=this.props.pageData;if(null==e)return o.createElement(l.OpenFilePage,null);switch(e.nav.pageID){case"HEADERS":return o.createElement(c.HeadersPage,{data:e});case"MD_HEADERS":return o.createElement(u.MetadataHeadersPage,{data:e});case"MDS_TABLE":return o.createElement(s.MdsTablePage,{data:e});case"MDS_STRINGS":case"MDS_US":case"MDS_GUID":case"MDS_BLOB":case"MDT_TBL":return o.createElement(p.PagedItemListPage,{data:e});default:return o.createElement("div",null,"Page not found.")}},t}(o.Component);t.PageContent=i.connect(function(e){return{pageData:e.pageData}})(f)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1),l=n(5);var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.navList;return e&&0!=e.length?o.createElement("section",{id:"app-nav-list"},this.renderNavList(e)):null},t.prototype.renderNavList=function(e){var t=this;this.props.pageData;return o.createElement("ul",null,e.map(function(e,n){return o.createElement("li",{key:n},o.createElement(l.NavLink,{target:e.target,extraClass:t.isSelected(e.target)?"strong":""}),e.children&&t.renderNavList(e.children))}))},t.prototype.isSelected=function(e){var t=this.props.pageData;if(!t)return!1;var n=t.nav,r=n.pageID,a=n.subID;return r==e.pageID&&null==e.elemID&&(null==a||a==e.subID)},t}(o.Component);t.PageNavList=i.connect(function(e){return{pageData:e.pageData,navList:e.navList}})(c)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(1);var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props.fileInfo;return o.createElement("header",{id:"app-header"},e?this.renderFileInfo():this.renderWelcome(),!e&&o.createElement("div",null,"PE Viewer is a simple single-page web application for viewing content of a PE (Portable Executable) file, which is the executabule file on Windows operating system and Microsoft .NET."))},t.prototype.renderWelcome=function(){return o.createElement("div",{className:"pg-title-line"},o.createElement("h1",{className:"pg-finame"},"Welcome to PE Viewer."))},t.prototype.renderFileInfo=function(){var e=this.props.fileInfo,t=e.name,n=e.size,r=e.is32Bit,a=e.isManaged;return o.createElement("div",{className:"pg-title-line"},o.createElement("h1",{className:"pg-finame"},t),this.renderPageTitle(),o.createElement("div",{className:"pg-finfo"},o.createElement("span",null,n.toLocaleString()," bytes."),null!=r&&o.createElement(o.Fragment,null,o.createElement("span",null," | "),o.createElement("span",null,r?"32-bit":"64-bit")),null!=a&&o.createElement(o.Fragment,null,o.createElement("span",null," | "),o.createElement("span",null,a?"managed":"unmanaged"))))},t.prototype.renderPageTitle=function(){var e=this.props.pageData;return e&&e.nav&&e.nav.title?o.createElement("h1",{className:"pg-title"},e.nav.title):null},t}(o.Component);t.PageHeader=i.connect(function(e){return{fileInfo:e.fileInfo,pageData:e.pageData,navList:e.navList}})(l)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=n(0),i=n(19),l=n(18),c=n(17),u=n(10),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement(o.Fragment,null,o.createElement(i.PageHeader,null),o.createElement(l.PageNavList,null),o.createElement(c.PageContent,null),o.createElement(u.PageFooter,null))},t}(o.Component);t.App=s},function(e,t,n){"use strict";t.__esModule=!0;var r=n(6);t.appReducer=r.combineReducers({appInfo:function(e,t){void 0===e&&(e=null);return e},fileInfo:function(e,t){void 0===e&&(e=null);switch(t.type){case"OPEN_FILE":var n=t.file,r=n.name,a=n.size;return Object.assign({},e,{name:r,size:a});case"SET_PE_PROPS":var o=t,i=o.is32Bit,l=o.isManaged;return Object.assign({},e,{is32Bit:i,isManaged:l});default:return e}},pageData:function(e,t){void 0===e&&(e=null);switch(t.type){case"SET_PAGE_DATA":var n=t.data;return n;default:return e}},navList:function(e,t){void 0===e&&(e=[]);switch(t.type){case"SET_NAV_LIST":var n=t.navList;return n;default:return e}}})},function(e){e.exports={title:"PE Viewer",version:"0.2.0",author:"Anders Liu",homepage:"https://github.com/anders-liu/peviewer-dev#readme",bugs_url:"https://github.com/anders-liu/peviewer-dev/issues",release_notes:"https://github.com/anders-liu/peviewer/blob/master/RELEASES.md",build_time:"Fri, 15 Jun 2018 05:00:43 GMT"}},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";t.__esModule=!0;var r=n(0),a=n(23),o=n(6),i=n(1),l=n(22),c=n(21),u=n(20),s=n(9),p=n(8),f={title:l.title,version:l.version,author:l.author,homepage:l.homepage,bugsUrl:l.bugs_url,releaseNotesUrl:l.release_notes,buildTimeLocal:new Date(Date.parse(l.build_time)).toLocaleString(),year:(new Date).getFullYear().toString()},d={appInfo:f,navList:[]};document.title=""+f.title;var m=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||o.compose,_=o.createStore(c.appReducer,d,m(o.applyMiddleware(s.actionListenerMiddleware,p.workerClientMiddleware)));p.initWorkerClient(_),a.render(r.createElement(i.Provider,{store:_},r.createElement(u.App,null)),document.getElementById("app"))}]); //# sourceMappingURL=ui.js.map \ No newline at end of file diff --git a/ui.js.map b/ui.js.map index 6efe0ea..6ed229e 100644 --- a/ui.js.map +++ b/ui.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"React\"","webpack:///external \"ReactRedux\"","webpack:///./src/ui/scripts/store/actions.ts","webpack:///./src/ui/scripts/components/top-link.tsx","webpack:///./src/ui/scripts/components/struct-data.tsx","webpack:///./src/ui/scripts/components/nav-link.tsx","webpack:///external \"Redux\"","webpack:///./src/ui/scripts/worker-message.ts","webpack:///./src/ui/scripts/worker-client.ts","webpack:///./src/ui/scripts/action-listener.ts","webpack:///./src/ui/scripts/components/page-footer.tsx","webpack:///./src/ui/scripts/components/md-headers-page.tsx","webpack:///./src/ui/scripts/components/headers-page.tsx","webpack:///./src/ui/scripts/components/open-file-page.tsx","webpack:///./src/ui/scripts/components/page-content.tsx","webpack:///./src/ui/scripts/components/page-header.tsx","webpack:///./src/ui/scripts/components/app.tsx","webpack:///./src/ui/scripts/store/reducers.ts","webpack:///external \"ReactDOM\"","webpack:///./src/ui/scripts/index.tsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","React","ReactRedux","createOpenFileAction","file","type","createOpenNavAction","target","createSetNavListAction","navList","createSetPageDataAction","data","createSetPEPropsAction","is32Bit","isManaged","nav_link_1","TopLinkClass","_super","__extends","render","pageID","this","props","title","createElement","className","NavLink","Component","TopLink","connect","state","pageData","nav","renderStructTitle","id","elemID","renderStructItemRow","item","key","offset","size","rawData","descriptions","map","v","renderSimpleStruct","StructTable","items","toString","renderGroupedStruct","groups","gv","gi","colSpan","concat","children","A","NavLinkClass","_a","extraClass","onClick","dispatch","ownProps","Redux","createReqOpenFileMessage","createReqOpenNavMessage","_worker","_store","WM","workerClientMiddleware","store","next","action","postMessage","getState","initWorkerClient","Worker","onmessage","ev","msg","handleMessage","scrollElement","setTimeout","elem","document","getElementById","scrollIntoView","scrollTop","actionListenerMiddleware","appInfo","PageFooterClass","version","author","homepage","bugsUrl","releaseNotesUrl","buildTimeLocal","year","href","PageFooter","struct_data_1","top_link_1","MetadataHeadersPage","cliHeader","renderMetadataRoot","renderStreamHeaders","metadataRoot","Fragment","streamHeaders","HeadersPage","dosHeader","peSignature","fileHeader","optionalHeader","dataDirectories","sectionHeaders","OpenFilePageClass","_this","onFileChange","bind","onChange","onFileSelected","fileList","files","length","OpenFilePage","open_file_page_1","headers_page_1","md_headers_page_1","PageContentClass","renderContent","PageContent","PageHeaderClass","fileInfo","renderFileInfo","renderWelcome","renderTitleLine","renderNavList","toLocaleString","cv","ci","PageHeader","page_header_1","page_content_1","page_footer_1","App","appReducer","combineReducers","name_1","assign","navList_1","ReactDOM","packageJson","R","app_1","action_listener_1","worker_client_1","bugs_url","release_notes","Date","parse","build_time","getFullYear","defaultState","composeEnhancers","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","createStore","applyMiddleware","Provider"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD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G,OAER7D,SAASC,eAAe","file":"ui.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 20);\n","module.exports = React;","module.exports = ReactRedux;","import * as Redux from \"redux\";\r\n\r\nexport const enum ActionType {\r\n OPEN_FILE = \"OPEN_FILE\",\r\n OPEN_NAV = \"OPEN_NAV\",\r\n\r\n SET_NAV_LIST = \"SET_NAV_LIST\",\r\n SET_PAGE_DATA = \"SET_PAGE_DATA\",\r\n SET_PE_PROPS = \"SET_PE_PROPS\",\r\n SET_WORKER_ERROR = \"SET_WORKER_ERROR\",\r\n}\r\n\r\nexport interface OpenFileAction extends Redux.Action {\r\n file: File;\r\n}\r\n\r\nexport function createOpenFileAction(file: File): OpenFileAction {\r\n return { type: ActionType.OPEN_FILE, file };\r\n}\r\n\r\nexport interface OpenNavAction extends Redux.Action {\r\n target: W.NavTarget;\r\n}\r\n\r\nexport function createOpenNavAction(target: W.NavTarget): OpenNavAction {\r\n return { type: ActionType.OPEN_NAV, target };\r\n}\r\n\r\nexport interface SetNavListAction extends Redux.Action {\r\n navList: W.NavData[];\r\n}\r\n\r\nexport function createSetNavListAction(navList: W.NavData[]): SetNavListAction {\r\n return { type: ActionType.SET_NAV_LIST, navList };\r\n}\r\n\r\nexport interface SetPageDataAction extends Redux.Action {\r\n data: W.PageData;\r\n}\r\n\r\nexport function createSetPageDataAction(data: W.PageData): SetPageDataAction {\r\n return { type: ActionType.SET_PAGE_DATA, data };\r\n}\r\n\r\nexport interface SetPEPropsAction extends Redux.Action {\r\n is32Bit?: boolean;\r\n isManaged?: boolean;\r\n}\r\n\r\nexport function createSetPEPropsAction(is32Bit?: boolean, isManaged?: boolean): SetPEPropsAction {\r\n return { type: ActionType.SET_PE_PROPS, is32Bit, isManaged };\r\n}","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as S from \"../store/state\";\r\nimport { NavLink } from \"./nav-link\";\r\n\r\nexport interface ConnectedProps {\r\n pageID?: W.PageID;\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const { pageData } = state;\r\n\r\n return {\r\n pageID: pageData && pageData.nav.pageID\r\n };\r\n}\r\n\r\nclass TopLinkClass extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { pageID } = this.props;\r\n\r\n if (!pageID) {\r\n return null;\r\n } else {\r\n const target: W.NavTarget = {\r\n pageID,\r\n title: W.KnownTitle.TOP\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n }\r\n}\r\n\r\nexport const TopLink = ReactRedux.connect(mapStateToProps)(TopLinkClass);","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nexport function renderSimpleStruct(s: W.SimpleStruct): JSX.Element {\r\n return (\r\n
\r\n {renderStructTitle(s)}\r\n \r\n {s.items && s.items.map((v, i) => renderStructItemRow(v, i.toString()))}\r\n \r\n
\r\n );\r\n}\r\n\r\nexport function renderGroupedStruct(s: W.GroupedStruct): JSX.Element {\r\n return (\r\n
\r\n {renderStructTitle(s)}\r\n \r\n {s.groups && s.groups.map((gv, gi) => {\r\n return [\r\n renderStructGroupTitleRow(gv.title, gi.toString())\r\n ].concat(gv.items && gv.items.map((v, i) =>\r\n renderStructItemRow(v, `${gi}.${i}`)) || []);\r\n })}\r\n \r\n
\r\n );\r\n}\r\n\r\nfunction renderStructTitle(s: W.StructData): JSX.Element {\r\n return

{s.title}

;\r\n}\r\n\r\nfunction renderStructItemRow(item: W.StructItem, key: string): JSX.Element {\r\n const { offset, size, rawData, name, value, descriptions } = item;\r\n return (\r\n \r\n {offset}\r\n {size}\r\n {rawData.map((v, i) =>
{v}
)}\r\n {name}\r\n {value}\r\n \r\n \r\n );\r\n}\r\n\r\nfunction renderStructGroupTitleRow(title: string, key: string): JSX.Element {\r\n return ({title});\r\n}\r\n\r\nclass StructTable extends React.Component {\r\n public render(): JSX.Element {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.props.children}\r\n \r\n
OffsetSizeRaw DataNameValueDescription
\r\n );\r\n }\r\n}","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as A from \"../store/actions\";\r\nimport * as S from \"../store/state\";\r\n\r\nexport interface NavLinkProps {\r\n target: W.NavTarget;\r\n extraClass?: string;\r\n}\r\n\r\ninterface ConnectedEvents {\r\n onClick: () => void;\r\n}\r\n\r\nfunction mapDispatchToEvents(dispatch: ReactRedux.Dispatch, ownProps: NavLinkProps): ConnectedEvents {\r\n return {\r\n onClick: () => { dispatch(A.createOpenNavAction(ownProps.target)); }\r\n };\r\n}\r\n\r\nclass NavLinkClass extends React.Component {\r\n public render(): JSX.Element {\r\n const { target, extraClass, onClick } = this.props;\r\n const { title } = target;\r\n\r\n let className = \"nav\";\r\n if (extraClass) {\r\n className += \" \" + extraClass;\r\n }\r\n\r\n return (\r\n {title}\r\n );\r\n }\r\n}\r\n\r\nexport const NavLink = ReactRedux.connect(null, mapDispatchToEvents)(NavLinkClass);","module.exports = Redux;","/// \r\n\r\nexport function createReqOpenFileMessage(file: File): W.ReqOpenFileMessage {\r\n return {\r\n type: W.WorkerMessageType.REQ_OPEN_FILE,\r\n file\r\n };\r\n}\r\n\r\nexport function createReqOpenNavMessage(target: W.NavTarget): W.ReqOpenNavMessage {\r\n return {\r\n type: W.WorkerMessageType.REQ_OPEN_NAV,\r\n target\r\n };\r\n}","/// \r\n\r\nimport * as Redux from \"redux\";\r\n\r\nimport * as A from \"./store/actions\";\r\nimport * as S from \"./store/state\";\r\nimport * as WM from \"./worker-message\";\r\n\r\nexport const workerClientMiddleware = ((store: Redux.MiddlewareAPI) => (next: Redux.Dispatch) => (action: Redux.Action) => {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { file } = action as A.OpenFileAction;\r\n _worker.postMessage(WM.createReqOpenFileMessage(file));\r\n break;\r\n }\r\n\r\n case A.ActionType.OPEN_NAV: {\r\n const { target } = action as A.OpenNavAction;\r\n const { pageData } = store.getState();\r\n const { pageID, elemID } = target;\r\n if (!pageData || pageData.nav.pageID != pageID) {\r\n _worker.postMessage(WM.createReqOpenNavMessage(target));\r\n }\r\n break;\r\n }\r\n }\r\n return next(action);\r\n}) as Redux.Middleware;\r\n\r\nexport function initWorkerClient(store: Redux.Store): void {\r\n _store = store;\r\n _worker = new Worker(\"worker.js\");\r\n _worker.onmessage = ev => handleMessage(ev.data);\r\n}\r\n\r\nfunction handleMessage(msg: W.WorkerMessage): void {\r\n switch (msg.type) {\r\n case W.WorkerMessageType.RES_NAV_DATA:\r\n const { navList } = msg;\r\n _store.dispatch(A.createSetNavListAction(navList));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PAGE_DATA:\r\n const { pageData } = msg;\r\n _store.dispatch(A.createSetPageDataAction(pageData));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PE_PROPS:\r\n const { is32Bit, isManaged } = msg;\r\n _store.dispatch(A.createSetPEPropsAction(is32Bit, isManaged));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PE_ERROR:\r\n break;\r\n }\r\n}\r\n\r\nlet _worker: Worker;\r\nlet _store: Redux.Store;\r\n","import * as Redux from \"redux\";\r\n\r\nimport * as A from \"./store/actions\";\r\nimport * as S from \"./store/state\";\r\n\r\nexport const actionListenerMiddleware = ((store: Redux.MiddlewareAPI) => (next: Redux.Dispatch) => (action: Redux.Action) => {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { appInfo } = store.getState();\r\n const { file } = action as A.OpenFileAction;\r\n document.title = `${file.name} - ${appInfo.title}`\r\n break;\r\n }\r\n\r\n case A.ActionType.OPEN_NAV: {\r\n const { pageData } = store.getState();\r\n const { target } = action as A.OpenNavAction;\r\n const { pageID, elemID } = target;\r\n if (pageData && pageData.nav.pageID === pageID) {\r\n scrollElement(elemID);\r\n }\r\n break;\r\n }\r\n\r\n case A.ActionType.SET_PAGE_DATA: {\r\n const { data } = action as A.SetPageDataAction;\r\n scrollElement(data.nav.elemID);\r\n break;\r\n }\r\n }\r\n return next(action);\r\n}) as Redux.Middleware;\r\n\r\nfunction scrollElement(elemID?: string): void {\r\n setTimeout(() => {\r\n if (elemID) {\r\n const elem = document.getElementById(elemID);\r\n if (elem) {\r\n elem.scrollIntoView();\r\n }\r\n } else {\r\n const elem = document.getElementById(\"app-content\");\r\n if (elem) {\r\n elem.scrollTop = 0;\r\n }\r\n }\r\n }, 1);\r\n}","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport * as S from \"../store/state\";\n\ninterface ConnectedProps {\n appInfo: S.AppInfo;\n}\n\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\n const { appInfo } = state;\n return {\n appInfo\n };\n}\n\nclass PageFooterClass extends React.Component {\n public render(): JSX.Element {\n const { appInfo } = this.props;\n const { title, version, author, homepage, bugsUrl, releaseNotesUrl, buildTimeLocal, year } = appInfo;\n\n return (\n \n )\n }\n}\n\nexport const PageFooter = ReactRedux.connect(mapStateToProps)(PageFooterClass);\n","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport { renderSimpleStruct, renderGroupedStruct } from \"./struct-data\";\nimport { TopLink } from \"./top-link\";\n\ninterface MetadataHeadersPageProps {\n data: W.MetadataHeadersPageData;\n}\n\nexport class MetadataHeadersPage extends React.Component {\n public render(): JSX.Element | null {\n const { data } = this.props;\n\n return (\n
\n {renderSimpleStruct(data.cliHeader)}\n \n {this.renderMetadataRoot()}\n {this.renderStreamHeaders()}\n
\n );\n }\n\n public renderMetadataRoot(): JSX.Element | undefined {\n const { data } = this.props;\n return data.metadataRoot && (\n \n {renderSimpleStruct(data.metadataRoot)}\n \n \n );\n }\n\n public renderStreamHeaders(): JSX.Element | undefined {\n const { data } = this.props;\n return data.streamHeaders && (\n \n {renderGroupedStruct(data.streamHeaders)}\n \n \n );\n }\n}\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport { renderSimpleStruct, renderGroupedStruct } from \"./struct-data\";\r\nimport { TopLink } from \"./top-link\";\r\n\r\ninterface HeadersPageProps {\r\n data: W.HeadersPageData;\r\n}\r\n\r\nexport class HeadersPage extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { data } = this.props;\r\n\r\n return (\r\n
\r\n {renderSimpleStruct(data.dosHeader)}\r\n \r\n {renderSimpleStruct(data.peSignature)}\r\n \r\n {renderSimpleStruct(data.fileHeader)}\r\n \r\n {renderGroupedStruct(data.optionalHeader)}\r\n \r\n {renderGroupedStruct(data.dataDirectories)}\r\n \r\n {renderGroupedStruct(data.sectionHeaders)}\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as A from \"../store/actions\";\r\nimport * as S from \"../store/state\";\r\n\r\ninterface ConnectedEvents {\r\n onFileSelected: (file: File) => void;\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: ReactRedux.Dispatch): ConnectedEvents {\r\n return {\r\n onFileSelected: (file) => dispatch(A.createOpenFileAction(file))\r\n };\r\n}\r\n\r\nclass OpenFilePageClass extends React.Component {\r\n public constructor(props: any) {\r\n super(props);\r\n this.onFileChange = this.onFileChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n
Select a file:
\r\n
\r\n
No data would be uploaded, everything is parsed locally.
\r\n
\r\n )\r\n }\r\n\r\n private onFileChange(ev: React.ChangeEvent): void {\r\n const { onFileSelected } = this.props;\r\n const fileList = ev.target.files;\r\n if (fileList && fileList.length > 0) {\r\n onFileSelected(fileList[0]);\r\n }\r\n }\r\n}\r\n\r\nexport const OpenFilePage = ReactRedux.connect(null, mapDispatchToProps)(OpenFilePageClass);\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as S from \"../store/state\";\r\n\r\nimport { OpenFilePage } from \"./open-file-page\";\r\nimport { HeadersPage } from \"./headers-page\";\r\nimport { MetadataHeadersPage } from \"./md-headers-page\";\r\n\r\ninterface ConnectedProps {\r\n pageData?: W.PageData;\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const { pageData } = state;\r\n\r\n return {\r\n pageData\r\n };\r\n}\r\n\r\nclass PageContentClass extends React.Component {\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n {this.renderContent()}\r\n
\r\n )\r\n }\r\n\r\n private renderContent(): JSX.Element {\r\n const { pageData } = this.props;\r\n\r\n if (pageData == null) {\r\n return ;\r\n }\r\n\r\n switch (pageData.nav.pageID) {\r\n case W.PageID.HEADERS:\r\n return ;\r\n case W.PageID.MD_HEADERS:\r\n return ;\r\n default:\r\n return
Page not found.
;\r\n }\r\n }\r\n}\r\n\r\nexport const PageContent = ReactRedux.connect(mapStateToProps)(PageContentClass);\r\n","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport * as S from \"../store/state\";\nimport { NavLink } from \"./nav-link\";\n\ninterface ConnectedProps {\n fileInfo?: S.FileInfo;\n navList: W.NavData[];\n}\n\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\n const { fileInfo, navList } = state;\n\n return {\n fileInfo,\n navList\n };\n}\n\nclass PageHeaderClass extends React.Component {\n public render(): JSX.Element {\n const { fileInfo } = this.props;\n\n return (\n
\n {fileInfo ? this.renderFileInfo(fileInfo) : this.renderWelcome()}\n
\n )\n }\n\n private renderWelcome(): JSX.Element {\n return (\n
\n

Welcome to PE Viewer.

\n
\n );\n }\n\n private renderFileInfo(fileInfo: S.FileInfo): JSX.Element {\n const { name, size, is32Bit, isManaged } = fileInfo;\n\n return (\n \n {this.renderTitleLine(fileInfo)}\n {this.renderNavList()}\n \n );\n }\n\n private renderTitleLine(fileInfo: S.FileInfo): JSX.Element {\n const { name, size, is32Bit, isManaged } = fileInfo;\n\n return (\n
\n

{name}

\n
\n {size.toLocaleString()} bytes.\n\n {is32Bit != null && (\n \n | \n {is32Bit ? \"32-bit\" : \"64-bit\"}\n \n )}\n\n {isManaged != null && (\n \n | \n {isManaged ? \"managed\" : \"unmanaged\"}\n \n )}\n
\n
\n );\n }\n\n private renderNavList(): JSX.Element | null {\n const { navList } = this.props;\n if (!navList) {\n return null;\n }\n\n return (\n
\n \n \n {navList.map((v, i) => (\n \n \n \n \n ))}\n \n
\n {v.children && v.children.map((cv, ci) => (\n \n ))}\n
\n
\n );\n }\n}\n\nexport const PageHeader = ReactRedux.connect(mapStateToProps)(PageHeaderClass);","import * as React from \"react\";\n\nimport { PageHeader } from \"./page-header\";\nimport { PageContent } from \"./page-content\";\nimport { PageFooter } from \"./page-footer\";\n\nexport class App extends React.Component {\n public render(): JSX.Element {\n return (\n \n \n \n \n \n )\n }\n}","import * as Redux from \"redux\";\r\nimport * as A from \"./actions\";\r\nimport * as S from \"./state\";\r\n\r\nexport const appReducer = Redux.combineReducers({\r\n appInfo,\r\n fileInfo,\r\n pageData,\r\n navList,\r\n}) as Redux.Reducer;\r\n\r\nfunction appInfo(state: S.AppInfo | null = null, action: Redux.Action): S.AppInfo | null {\r\n return state;\r\n}\r\n\r\nfunction fileInfo(state: S.FileInfo | null = null, action: Redux.Action): S.FileInfo | null {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { file } = action as A.OpenFileAction;\r\n const { name, size } = file;\r\n return Object.assign({}, state, { name, size });\r\n }\r\n\r\n case A.ActionType.SET_PE_PROPS: {\r\n const { is32Bit, isManaged } = action as A.SetPEPropsAction;\r\n return Object.assign({}, state, { is32Bit, isManaged });\r\n }\r\n\r\n default: return state;\r\n }\r\n}\r\n\r\nfunction pageData(state: W.PageData | null = null, action: Redux.Action): W.PageData | null {\r\n switch (action.type) {\r\n case A.ActionType.SET_PAGE_DATA: {\r\n const { data } = action as A.SetPageDataAction;\r\n return data;\r\n }\r\n\r\n default: return state;\r\n }\r\n}\r\n\r\nfunction navList(state: W.NavData[] = [], action: Redux.Action): W.NavData[] {\r\n switch (action.type) {\r\n case A.ActionType.SET_NAV_LIST: {\r\n const { navList } = action as A.SetNavListAction;\r\n return navList;\r\n }\r\n\r\n default: return state;\r\n }\r\n}","module.exports = ReactDOM;","import * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport * as Redux from \"redux\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as packageJson from \"package.json\";\r\nimport * as S from \"./store/state\";\r\nimport * as R from \"./store/reducers\";\r\nimport { App } from \"./components/app\";\r\nimport { actionListenerMiddleware } from \"./action-listener\";\r\nimport { workerClientMiddleware, initWorkerClient } from \"./worker-client\";\r\n\r\nconst appInfo: S.AppInfo = {\r\n title: packageJson.title,\r\n version: packageJson.version,\r\n author: packageJson.author,\r\n homepage: packageJson.homepage,\r\n bugsUrl: packageJson.bugs_url,\r\n releaseNotesUrl: packageJson.release_notes,\r\n buildTimeLocal: new Date(Date.parse(packageJson.build_time)).toLocaleString(),\r\n year: new Date().getFullYear().toString(),\r\n};\r\n\r\nconst defaultState: S.AppState = {\r\n appInfo,\r\n navList: []\r\n};\r\n\r\ndocument.title = `${appInfo.title}`;\r\n\r\nconst _w = window as any;\r\nconst composeEnhancers = _w.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || Redux.compose;\r\nconst store = Redux.createStore(R.appReducer, defaultState, composeEnhancers(\r\n Redux.applyMiddleware(\r\n actionListenerMiddleware,\r\n workerClientMiddleware)\r\n));\r\n\r\ninitWorkerClient(store);\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById(\"app\")\r\n);\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"React\"","webpack:///external \"ReactRedux\"","webpack:///./src/ui/scripts/components/top-link.tsx","webpack:///./src/ui/scripts/components/struct-data.tsx","webpack:///./src/ui/scripts/store/actions.ts","webpack:///./src/ui/scripts/components/nav-link.tsx","webpack:///external \"Redux\"","webpack:///./src/ui/scripts/worker-message.ts","webpack:///./src/ui/scripts/worker-client.ts","webpack:///./src/ui/scripts/action-listener.ts","webpack:///./src/ui/scripts/components/page-footer.tsx","webpack:///./src/ui/scripts/components/paginate.tsx","webpack:///./src/ui/scripts/components/paged-item-list-page.tsx","webpack:///./src/ui/scripts/components/mds-table-page.tsx","webpack:///./src/ui/scripts/components/md-headers-page.tsx","webpack:///./src/ui/scripts/components/headers-page.tsx","webpack:///./src/ui/scripts/components/open-file-page.tsx","webpack:///./src/ui/scripts/components/page-content.tsx","webpack:///./src/ui/scripts/components/page-nav-list.tsx","webpack:///./src/ui/scripts/components/page-header.tsx","webpack:///./src/ui/scripts/components/app.tsx","webpack:///./src/ui/scripts/store/reducers.ts","webpack:///external \"ReactDOM\"","webpack:///./src/ui/scripts/index.tsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","React","ReactRedux","nav_link_1","TopLinkClass","_super","__extends","render","pageID","this","props","target","title","createElement","className","NavLink","Component","TopLink","connect","state","pageData","nav","renderTableTitle","elemID","id","renderStructTitle","renderStructItemRow","item","offset","size","rawData","descriptions","map","v","renderSimpleStruct","StructTable","items","toString","renderGroupedStruct","groups","gv","gi","colSpan","concat","children","createOpenFileAction","file","type","createOpenNavAction","createSetNavListAction","navList","createSetPageDataAction","data","createSetPEPropsAction","is32Bit","isManaged","A","NavLinkClass","_a","disable","text","extraClass","onClick","dispatch","ownProps","Redux","createReqOpenFileMessage","createReqOpenNavMessage","_worker","_store","WM","workerClientMiddleware","store","next","action","postMessage","getState","pageNum","initWorkerClient","Worker","onmessage","ev","msg","handleMessage","scrollElement","setTimeout","elem","document","getElementById","scrollIntoView","scrollTop","actionListenerMiddleware","appInfo","PageFooterClass","version","author","homepage","bugsUrl","releaseNotesUrl","buildTimeLocal","year","href","replace","PageFooter","PaginateClass","_this","handleSelectChange","paging","pageNavList","length","currentPageNumber","onChange","evt","onSelectionChange","currentTarget","selectedIndex","Paginate","struct_data_1","top_link_1","paginate_1","PagedItemListPage","MdsTablePage","tableHeader","renderTableList","tableInfo","index","rows","valid","sorted","MetadataHeadersPage","cliHeader","renderMetadataRoot","renderStreamHeaders","renderSNSignature","metadataRoot","Fragment","streamHeaders","snSignature","HeadersPage","dosHeader","peSignature","fileHeader","optionalHeader","dataDirectories","sectionHeaders","OpenFilePageClass","onFileChange","onFileSelected","fileList","files","OpenFilePage","open_file_page_1","headers_page_1","md_headers_page_1","mds_table_page_1","paged_item_list_page_1","PageContentClass","renderContent","PageContent","PageNavListClass","renderNavList","isSelected","subID","PageNavList","PageHeaderClass","fileInfo","renderFileInfo","renderWelcome","renderPageTitle","toLocaleString","PageHeader","page_header_1","page_nav_list_1","page_content_1","page_footer_1","App","appReducer","combineReducers","name_1","assign","navList_1","ReactDOM","packageJson","R","app_1","action_listener_1","worker_client_1","bugs_url","release_notes","Date","parse","build_time","getFullYear","defaultState","composeEnhancers","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","createStore","applyMiddleware","Provider"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,aAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBA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EAAA7N,EAAA,GAEM+H,GACFhF,MAAO0K,EAAY1K,MACnBkF,QAASwF,EAAYxF,QACrBC,OAAQuF,EAAYvF,OACpBC,SAAUsF,EAAYtF,SACtBC,QAASqF,EAAYK,SACrBzF,gBAAiBoF,EAAYM,cAC7BzF,eAAgB,IAAI0F,KAAKA,KAAKC,MAAMR,EAAYS,aAAatB,iBAC7DrE,MAAM,IAAIyF,MAAOG,cAAc3J,YAG7B4J,GACFrG,QAAOA,EACP1C,YAGJqC,SAAS3E,MAAQ,GAAGgF,EAAQhF,MAE5B,IACMsL,EADKC,OACiBC,sCAAwCnI,EAAMoI,QACpE7H,EAAQP,EAAMqI,YAAYf,EAAEP,WAAYiB,EAAcC,EACxDjI,EAAMsI,gBACFd,EAAA9F,yBACA+F,EAAAnH,0BAGRmH,EAAA5G,iBAAiBN,GAEjB6G,EAAS9K,OACLN,EAAAY,cAACX,EAAWsM,UAAShI,MAAOA,GACxBvE,EAAAY,cAAC2K,EAAAT,IAAG,OAERxF,SAASC,eAAe","file":"ui.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 24);\n","module.exports = React;","module.exports = ReactRedux;","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as S from \"../store/state\";\r\nimport { NavLink } from \"./nav-link\";\r\n\r\nexport interface ConnectedProps {\r\n pageID?: W.PageID;\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const { pageData } = state;\r\n\r\n return {\r\n pageID: pageData && pageData.nav.pageID\r\n };\r\n}\r\n\r\nclass TopLinkClass extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { pageID } = this.props;\r\n\r\n if (!pageID) {\r\n return null;\r\n } else {\r\n const target: W.NavTarget = {\r\n pageID,\r\n title: W.KnownTitle.TOP\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n }\r\n}\r\n\r\nexport const TopLink = ReactRedux.connect(mapStateToProps)(TopLinkClass);","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nexport function renderTableTitle(title: string, elemID?: string): JSX.Element {\r\n return

{title}

;\r\n}\r\n\r\nexport function renderSimpleStruct(s: W.SimpleStruct): JSX.Element {\r\n return (\r\n
\r\n {renderStructTitle(s)}\r\n \r\n {s.items && s.items.map((v, i) => renderStructItemRow(v, i.toString()))}\r\n \r\n
\r\n );\r\n}\r\n\r\nexport function renderGroupedStruct(s: W.GroupedStruct): JSX.Element {\r\n return (\r\n
\r\n {renderStructTitle(s)}\r\n \r\n {s.groups && s.groups.map((gv, gi) => {\r\n return [\r\n renderStructGroupTitleRow(gv.title, gi.toString())\r\n ].concat(gv.items && gv.items.map((v, i) =>\r\n renderStructItemRow(v, `${gi}.${i}`)) || []);\r\n })}\r\n \r\n
\r\n );\r\n}\r\n\r\nfunction renderStructTitle(s: W.StructData): JSX.Element {\r\n return renderTableTitle(s.title, s.elemID);\r\n}\r\n\r\nfunction renderStructItemRow(item: W.StructItem, key: string): JSX.Element {\r\n const { offset, size, rawData, name, value, descriptions } = item;\r\n return (\r\n \r\n {offset}\r\n {size}\r\n {rawData.map((v, i) =>
{v}
)}\r\n {name}\r\n {value}\r\n \r\n \r\n );\r\n}\r\n\r\nfunction renderStructGroupTitleRow(title: string, key: string): JSX.Element | null {\r\n return title ? ({title}) : null;\r\n}\r\n\r\nclass StructTable extends React.Component {\r\n public render(): JSX.Element {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.props.children}\r\n \r\n
OffsetSizeRaw DataNameValueDescription
\r\n );\r\n }\r\n}","import * as Redux from \"redux\";\r\n\r\nexport const enum ActionType {\r\n OPEN_FILE = \"OPEN_FILE\",\r\n OPEN_NAV = \"OPEN_NAV\",\r\n\r\n SET_NAV_LIST = \"SET_NAV_LIST\",\r\n SET_PAGE_DATA = \"SET_PAGE_DATA\",\r\n SET_PE_PROPS = \"SET_PE_PROPS\",\r\n SET_WORKER_ERROR = \"SET_WORKER_ERROR\",\r\n}\r\n\r\nexport interface OpenFileAction extends Redux.Action {\r\n file: File;\r\n}\r\n\r\nexport function createOpenFileAction(file: File): OpenFileAction {\r\n return { type: ActionType.OPEN_FILE, file };\r\n}\r\n\r\nexport interface OpenNavAction extends Redux.Action {\r\n target: W.NavTarget;\r\n}\r\n\r\nexport function createOpenNavAction(target: W.NavTarget): OpenNavAction {\r\n return { type: ActionType.OPEN_NAV, target };\r\n}\r\n\r\nexport interface SetNavListAction extends Redux.Action {\r\n navList: W.NavData[];\r\n}\r\n\r\nexport function createSetNavListAction(navList: W.NavData[]): SetNavListAction {\r\n return { type: ActionType.SET_NAV_LIST, navList };\r\n}\r\n\r\nexport interface SetPageDataAction extends Redux.Action {\r\n data: W.PageData;\r\n}\r\n\r\nexport function createSetPageDataAction(data: W.PageData): SetPageDataAction {\r\n return { type: ActionType.SET_PAGE_DATA, data };\r\n}\r\n\r\nexport interface SetPEPropsAction extends Redux.Action {\r\n is32Bit?: boolean;\r\n isManaged?: boolean;\r\n}\r\n\r\nexport function createSetPEPropsAction(is32Bit?: boolean, isManaged?: boolean): SetPEPropsAction {\r\n return { type: ActionType.SET_PE_PROPS, is32Bit, isManaged };\r\n}","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as A from \"../store/actions\";\r\nimport * as S from \"../store/state\";\r\n\r\nexport interface NavLinkProps {\r\n target: W.NavTarget;\r\n disable?: boolean;\r\n text?: string;\r\n title?: string;\r\n extraClass?: string;\r\n}\r\n\r\ninterface ConnectedEvents {\r\n onClick: () => void;\r\n}\r\n\r\nfunction mapDispatchToEvents(dispatch: ReactRedux.Dispatch, ownProps: NavLinkProps): ConnectedEvents {\r\n return {\r\n onClick: () => { dispatch(A.createOpenNavAction(ownProps.target)); }\r\n };\r\n}\r\n\r\nclass NavLinkClass extends React.Component {\r\n public render(): JSX.Element {\r\n const { target, disable, text, title, extraClass, onClick } = this.props;\r\n\r\n let className = \"nav\";\r\n if (disable) {\r\n className += \" disabled\"\r\n }\r\n if (extraClass) {\r\n className += \" \" + extraClass;\r\n }\r\n\r\n if (disable || !target) {\r\n return (\r\n \r\n {text}\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n {text || target.title}\r\n \r\n );\r\n }\r\n }\r\n}\r\n\r\nexport const NavLink = ReactRedux.connect(null, mapDispatchToEvents)(NavLinkClass);","module.exports = Redux;","/// \r\n\r\nexport function createReqOpenFileMessage(file: File): W.ReqOpenFileMessage {\r\n return {\r\n type: W.WorkerMessageType.REQ_OPEN_FILE,\r\n file\r\n };\r\n}\r\n\r\nexport function createReqOpenNavMessage(target: W.NavTarget): W.ReqOpenNavMessage {\r\n return {\r\n type: W.WorkerMessageType.REQ_OPEN_NAV,\r\n target\r\n };\r\n}","/// \r\n\r\nimport * as Redux from \"redux\";\r\n\r\nimport * as A from \"./store/actions\";\r\nimport * as S from \"./store/state\";\r\nimport * as WM from \"./worker-message\";\r\n\r\nexport const workerClientMiddleware = ((store: Redux.MiddlewareAPI) => (next: Redux.Dispatch) => (action: Redux.Action) => {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { file } = action as A.OpenFileAction;\r\n _worker.postMessage(WM.createReqOpenFileMessage(file));\r\n break;\r\n }\r\n\r\n case A.ActionType.OPEN_NAV: {\r\n const { target } = action as A.OpenNavAction;\r\n const { pageData } = store.getState();\r\n const { pageID, pageNum } = target;\r\n if (!pageData || pageData.nav.pageID != pageID || pageData.nav.pageNum != pageNum) {\r\n _worker.postMessage(WM.createReqOpenNavMessage(target));\r\n }\r\n break;\r\n }\r\n }\r\n return next(action);\r\n}) as Redux.Middleware;\r\n\r\nexport function initWorkerClient(store: Redux.Store): void {\r\n _store = store;\r\n _worker = new Worker(\"worker.js\");\r\n _worker.onmessage = ev => handleMessage(ev.data);\r\n}\r\n\r\nfunction handleMessage(msg: W.WorkerMessage): void {\r\n switch (msg.type) {\r\n case W.WorkerMessageType.RES_NAV_DATA:\r\n const { navList } = msg;\r\n _store.dispatch(A.createSetNavListAction(navList));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PAGE_DATA:\r\n const { pageData } = msg;\r\n _store.dispatch(A.createSetPageDataAction(pageData));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PE_PROPS:\r\n const { is32Bit, isManaged } = msg;\r\n _store.dispatch(A.createSetPEPropsAction(is32Bit, isManaged));\r\n break;\r\n\r\n case W.WorkerMessageType.RES_PE_ERROR:\r\n break;\r\n }\r\n}\r\n\r\nlet _worker: Worker;\r\nlet _store: Redux.Store;\r\n","import * as Redux from \"redux\";\r\n\r\nimport * as A from \"./store/actions\";\r\nimport * as S from \"./store/state\";\r\n\r\nexport const actionListenerMiddleware = ((store: Redux.MiddlewareAPI) => (next: Redux.Dispatch) => (action: Redux.Action) => {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { appInfo } = store.getState();\r\n const { file } = action as A.OpenFileAction;\r\n document.title = `${file.name} - ${appInfo.title}`\r\n break;\r\n }\r\n\r\n case A.ActionType.OPEN_NAV: {\r\n const { pageData } = store.getState();\r\n const { target } = action as A.OpenNavAction;\r\n const { pageID, elemID } = target;\r\n if (pageData && pageData.nav.pageID === pageID) {\r\n scrollElement(elemID);\r\n }\r\n break;\r\n }\r\n\r\n case A.ActionType.SET_PAGE_DATA: {\r\n const { data } = action as A.SetPageDataAction;\r\n scrollElement(data.nav.elemID);\r\n break;\r\n }\r\n }\r\n return next(action);\r\n}) as Redux.Middleware;\r\n\r\nfunction scrollElement(elemID?: string): void {\r\n setTimeout(() => {\r\n if (elemID) {\r\n const elem = document.getElementById(elemID);\r\n if (elem) {\r\n elem.scrollIntoView();\r\n }\r\n } else {\r\n const elem = document.getElementById(\"app-content\");\r\n if (elem) {\r\n elem.scrollTop = 0;\r\n }\r\n }\r\n }, 1);\r\n}","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport * as S from \"../store/state\";\n\ninterface ConnectedProps {\n appInfo: S.AppInfo;\n}\n\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\n const { appInfo } = state;\n return {\n appInfo\n };\n}\n\nclass PageFooterClass extends React.Component {\n public render(): JSX.Element {\n const { appInfo } = this.props;\n const { title, version, author, homepage, bugsUrl, releaseNotesUrl, buildTimeLocal, year } = appInfo;\n\n return (\n \n )\n }\n}\n\nexport const PageFooter = ReactRedux.connect(mapStateToProps)(PageFooterClass);\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as A from \"../store/actions\";\r\nimport * as S from \"../store/state\";\r\n\r\nimport { NavLink } from \"./nav-link\";\r\n\r\ninterface ConnectedProps {\r\n paging?: W.Paging;\r\n pageData?: W.PageData;\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const pageData = state.pageData as W.PagedItemListPageData;\r\n const paging = pageData && pageData.paging;\r\n\r\n return {\r\n paging,\r\n pageData,\r\n };\r\n}\r\n\r\ninterface ConnectedEvents {\r\n onSelectionChange: (target: W.NavTarget) => void;\r\n}\r\n\r\nfunction mapDispatchToEvents(dispatch: ReactRedux.Dispatch): ConnectedEvents {\r\n return {\r\n onSelectionChange: (target: W.NavTarget) => { dispatch(A.createOpenNavAction(target)); }\r\n };\r\n}\r\n\r\nclass PaginateClass extends React.Component {\r\n constructor(props: any) {\r\n super(props);\r\n this.handleSelectChange = this.handleSelectChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { paging, pageData } = this.props;\r\n if (!paging || !pageData || paging.pageNavList.length <= 1) {\r\n return null;\r\n }\r\n\r\n const { currentPageNumber, pageNavList } = paging;\r\n const { nav } = pageData;\r\n\r\n return (\r\n
\r\n \r\n \r\n {paging.pageNavList.map((v, i) => (\r\n \r\n ))}\r\n \r\n = pageNavList.length - 1}\r\n text=\"next >\" />\r\n
\r\n );\r\n }\r\n\r\n private handleSelectChange(evt: React.ChangeEvent): void {\r\n const { paging, onSelectionChange } = this.props;\r\n onSelectionChange(paging!.pageNavList[evt.currentTarget.selectedIndex]);\r\n }\r\n}\r\n\r\nexport const Paginate = ReactRedux.connect(mapStateToProps, mapDispatchToEvents)(PaginateClass);\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport { renderTableTitle, renderGroupedStruct } from \"./struct-data\";\r\nimport { TopLink } from \"./top-link\";\r\nimport { Paginate } from \"./paginate\";\r\n\r\ninterface PagedItemListPageProps {\r\n data: W.PagedItemListPageData;\r\n}\r\n\r\nexport class PagedItemListPage extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { data } = this.props;\r\n\r\n return (\r\n
\r\n \r\n {renderGroupedStruct(data.items)}\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport { renderTableTitle, renderSimpleStruct, renderGroupedStruct } from \"./struct-data\";\r\nimport { TopLink } from \"./top-link\";\r\n\r\ninterface MdsTablePageProps {\r\n data: W.MdsTablePageData;\r\n}\r\n\r\nexport class MdsTablePage extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { data } = this.props;\r\n\r\n return (\r\n
\r\n {renderGroupedStruct(data.tableHeader)}\r\n \r\n {this.renderTableList()}\r\n \r\n
\r\n );\r\n }\r\n\r\n private renderTableList(): JSX.Element {\r\n return (\r\n
\r\n {renderTableTitle(W.KnownTitle.MDT_LIST, W.KnownElemID.MDT_LIST)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.props.data.tableInfo.map((v, i) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
IndexNameRowsValidSortedLink
{v.index}{v.name}{v.rows}{v.valid ? \"X\" : \"\"}{v.sorted ? \"X\" : \"\"}
\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport { renderSimpleStruct, renderGroupedStruct } from \"./struct-data\";\nimport { TopLink } from \"./top-link\";\n\ninterface MetadataHeadersPageProps {\n data: W.MetadataHeadersPageData;\n}\n\nexport class MetadataHeadersPage extends React.Component {\n public render(): JSX.Element | null {\n const { data } = this.props;\n\n return (\n
\n {renderSimpleStruct(data.cliHeader)}\n \n {this.renderMetadataRoot()}\n {this.renderStreamHeaders()}\n {this.renderSNSignature()}\n
\n );\n }\n\n private renderMetadataRoot(): JSX.Element | undefined {\n const { data } = this.props;\n return data.metadataRoot && (\n \n {renderSimpleStruct(data.metadataRoot)}\n \n \n );\n }\n\n private renderStreamHeaders(): JSX.Element | undefined {\n const { data } = this.props;\n return data.streamHeaders && (\n \n {renderGroupedStruct(data.streamHeaders)}\n \n \n );\n }\n\n private renderSNSignature(): JSX.Element | undefined {\n const { data } = this.props;\n return data.snSignature && (\n \n {renderSimpleStruct(data.snSignature)}\n \n \n );\n }\n}\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport { renderSimpleStruct, renderGroupedStruct } from \"./struct-data\";\r\nimport { TopLink } from \"./top-link\";\r\n\r\ninterface HeadersPageProps {\r\n data: W.HeadersPageData;\r\n}\r\n\r\nexport class HeadersPage extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { data } = this.props;\r\n\r\n return (\r\n
\r\n {renderSimpleStruct(data.dosHeader)}\r\n \r\n {renderSimpleStruct(data.peSignature)}\r\n \r\n {renderSimpleStruct(data.fileHeader)}\r\n \r\n {renderGroupedStruct(data.optionalHeader)}\r\n \r\n {renderGroupedStruct(data.dataDirectories)}\r\n \r\n {renderGroupedStruct(data.sectionHeaders)}\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as A from \"../store/actions\";\r\nimport * as S from \"../store/state\";\r\n\r\ninterface ConnectedEvents {\r\n onFileSelected: (file: File) => void;\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: ReactRedux.Dispatch): ConnectedEvents {\r\n return {\r\n onFileSelected: (file) => dispatch(A.createOpenFileAction(file))\r\n };\r\n}\r\n\r\nclass OpenFilePageClass extends React.Component {\r\n public constructor(props: any) {\r\n super(props);\r\n this.onFileChange = this.onFileChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n
Select a file:
\r\n
\r\n
No data would be uploaded, everything is parsed locally.
\r\n
\r\n )\r\n }\r\n\r\n private onFileChange(ev: React.ChangeEvent): void {\r\n const { onFileSelected } = this.props;\r\n const fileList = ev.target.files;\r\n if (fileList && fileList.length > 0) {\r\n onFileSelected(fileList[0]);\r\n }\r\n }\r\n}\r\n\r\nexport const OpenFilePage = ReactRedux.connect(null, mapDispatchToProps)(OpenFilePageClass);\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as S from \"../store/state\";\r\n\r\nimport { OpenFilePage } from \"./open-file-page\";\r\nimport { HeadersPage } from \"./headers-page\";\r\nimport { MetadataHeadersPage } from \"./md-headers-page\";\r\nimport { MdsTablePage } from \"./mds-table-page\";\r\nimport { PagedItemListPage } from \"./paged-item-list-page\";\r\n\r\ninterface ConnectedProps {\r\n pageData?: W.PageData;\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const { pageData } = state;\r\n\r\n return {\r\n pageData\r\n };\r\n}\r\n\r\nclass PageContentClass extends React.Component {\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n {this.renderContent()}\r\n
\r\n )\r\n }\r\n\r\n private renderContent(): JSX.Element {\r\n const { pageData } = this.props;\r\n\r\n if (pageData == null) {\r\n return ;\r\n }\r\n\r\n switch (pageData.nav.pageID) {\r\n case W.PageID.HEADERS:\r\n return ;\r\n case W.PageID.MD_HEADERS:\r\n return ;\r\n case W.PageID.MDS_TABLE:\r\n return ;\r\n case W.PageID.MDS_STRINGS:\r\n case W.PageID.MDS_US:\r\n case W.PageID.MDS_GUID:\r\n case W.PageID.MDS_BLOB:\r\n case W.PageID.MDT_TBL:\r\n return ;\r\n default:\r\n return
Page not found.
;\r\n }\r\n }\r\n}\r\n\r\nexport const PageContent = ReactRedux.connect(mapStateToProps)(PageContentClass);\r\n","import * as React from \"react\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as S from \"../store/state\";\r\nimport { NavLink } from \"./nav-link\";\r\n\r\ninterface ConnectedProps {\r\n pageData?: W.PageData;\r\n navList: W.NavData[];\r\n}\r\n\r\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\r\n const { pageData, navList } = state;\r\n\r\n return {\r\n pageData,\r\n navList\r\n };\r\n}\r\n\r\nclass PageNavListClass extends React.Component {\r\n public render(): JSX.Element | null {\r\n const { navList } = this.props;\r\n\r\n if (!navList || navList.length == 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {this.renderNavList(navList)}\r\n
\r\n )\r\n }\r\n\r\n private renderNavList(data: W.NavData[]): JSX.Element {\r\n const { pageData } = this.props;\r\n return (\r\n
    \r\n {data.map((v, i) => (\r\n
  • \r\n \r\n {v.children && this.renderNavList(v.children)}\r\n
  • \r\n ))}\r\n
\r\n );\r\n }\r\n\r\n private isSelected(target: W.NavTarget): boolean {\r\n const { pageData } = this.props;\r\n if (!pageData) return false;\r\n\r\n const { pageID, subID } = pageData.nav;\r\n return pageID == target.pageID && target.elemID == null\r\n && (subID == null || subID == target.subID);\r\n }\r\n}\r\n\r\nexport const PageNavList = ReactRedux.connect(mapStateToProps)(PageNavListClass);","import * as React from \"react\";\nimport * as ReactRedux from \"react-redux\";\n\nimport * as S from \"../store/state\";\nimport { NavLink } from \"./nav-link\";\n\ninterface ConnectedProps {\n fileInfo?: S.FileInfo;\n pageData?: W.PageData;\n navList: W.NavData[];\n}\n\nfunction mapStateToProps(state: S.AppState): ConnectedProps {\n const { fileInfo, pageData, navList } = state;\n return { fileInfo, pageData, navList };\n}\n\nclass PageHeaderClass extends React.Component {\n public render(): JSX.Element {\n const { fileInfo } = this.props;\n\n return (\n
\n {fileInfo ? this.renderFileInfo() : this.renderWelcome()}\n {!fileInfo && (\n
PE Viewer is a simple single-page web application for viewing content of a PE (Portable Executable) file, which is the executabule file on Windows operating system and Microsoft .NET.
\n )}\n
\n )\n }\n\n private renderWelcome(): JSX.Element {\n return (\n
\n

Welcome to PE Viewer.

\n
\n );\n }\n\n private renderFileInfo(): JSX.Element {\n const { fileInfo } = this.props;\n const { name, size, is32Bit, isManaged } = fileInfo!;\n\n return (\n
\n

{name}

\n {this.renderPageTitle()}\n
\n {size.toLocaleString()} bytes.\n\n {is32Bit != null && (\n \n | \n {is32Bit ? \"32-bit\" : \"64-bit\"}\n \n )}\n\n {isManaged != null && (\n \n | \n {isManaged ? \"managed\" : \"unmanaged\"}\n \n )}\n
\n
\n );\n }\n\n private renderPageTitle(): JSX.Element | null {\n const { pageData } = this.props;\n\n if (pageData && pageData.nav && pageData.nav.title) {\n return

{pageData.nav.title}

;\n } else {\n return null;\n }\n }\n}\n\nexport const PageHeader = ReactRedux.connect(mapStateToProps)(PageHeaderClass);","import * as React from \"react\";\n\nimport { PageHeader } from \"./page-header\";\nimport { PageNavList } from \"./page-nav-list\";\nimport { PageContent } from \"./page-content\";\nimport { PageFooter } from \"./page-footer\";\n\nexport class App extends React.Component {\n public render(): JSX.Element {\n return (\n \n \n \n \n \n \n )\n }\n}","import * as Redux from \"redux\";\r\nimport * as A from \"./actions\";\r\nimport * as S from \"./state\";\r\n\r\nexport const appReducer = Redux.combineReducers({\r\n appInfo,\r\n fileInfo,\r\n pageData,\r\n navList,\r\n}) as Redux.Reducer;\r\n\r\nfunction appInfo(state: S.AppInfo | null = null, action: Redux.Action): S.AppInfo | null {\r\n return state;\r\n}\r\n\r\nfunction fileInfo(state: S.FileInfo | null = null, action: Redux.Action): S.FileInfo | null {\r\n switch (action.type) {\r\n case A.ActionType.OPEN_FILE: {\r\n const { file } = action as A.OpenFileAction;\r\n const { name, size } = file;\r\n return Object.assign({}, state, { name, size });\r\n }\r\n\r\n case A.ActionType.SET_PE_PROPS: {\r\n const { is32Bit, isManaged } = action as A.SetPEPropsAction;\r\n return Object.assign({}, state, { is32Bit, isManaged });\r\n }\r\n\r\n default: return state;\r\n }\r\n}\r\n\r\nfunction pageData(state: W.PageData | null = null, action: Redux.Action): W.PageData | null {\r\n switch (action.type) {\r\n case A.ActionType.SET_PAGE_DATA: {\r\n const { data } = action as A.SetPageDataAction;\r\n return data;\r\n }\r\n\r\n default: return state;\r\n }\r\n}\r\n\r\nfunction navList(state: W.NavData[] = [], action: Redux.Action): W.NavData[] {\r\n switch (action.type) {\r\n case A.ActionType.SET_NAV_LIST: {\r\n const { navList } = action as A.SetNavListAction;\r\n return navList;\r\n }\r\n\r\n default: return state;\r\n }\r\n}","module.exports = ReactDOM;","import * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport * as Redux from \"redux\";\r\nimport * as ReactRedux from \"react-redux\";\r\n\r\nimport * as packageJson from \"package.json\";\r\nimport * as S from \"./store/state\";\r\nimport * as R from \"./store/reducers\";\r\nimport { App } from \"./components/app\";\r\nimport { actionListenerMiddleware } from \"./action-listener\";\r\nimport { workerClientMiddleware, initWorkerClient } from \"./worker-client\";\r\n\r\nconst appInfo: S.AppInfo = {\r\n title: packageJson.title,\r\n version: packageJson.version,\r\n author: packageJson.author,\r\n homepage: packageJson.homepage,\r\n bugsUrl: packageJson.bugs_url,\r\n releaseNotesUrl: packageJson.release_notes,\r\n buildTimeLocal: new Date(Date.parse(packageJson.build_time)).toLocaleString(),\r\n year: new Date().getFullYear().toString(),\r\n};\r\n\r\nconst defaultState: S.AppState = {\r\n appInfo,\r\n navList: []\r\n};\r\n\r\ndocument.title = `${appInfo.title}`;\r\n\r\nconst _w = window as any;\r\nconst composeEnhancers = _w.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || Redux.compose;\r\nconst store = Redux.createStore(R.appReducer, defaultState, composeEnhancers(\r\n Redux.applyMiddleware(\r\n actionListenerMiddleware,\r\n workerClientMiddleware)\r\n));\r\n\r\ninitWorkerClient(store);\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById(\"app\")\r\n);\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/worker.js b/worker.js index a785a63..141d218 100644 --- a/worker.js +++ b/worker.js @@ -1,2 +1,2 @@ -!function(e){var t={};function a(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},a.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=11)}([function(e,t,a){"use strict";function i(e){return A(e.toString(16).toUpperCase(),2)}function r(e){return A(e.toString(16).toUpperCase(),4)}function _(e){return A(e.toString(16).toUpperCase(),8)}function E(e){return i(e)+"h"}function o(e){return r(e)+"h"}function s(e){return _(e)+"h"}function I(e){return e.toString(16).toUpperCase()+"h ("+e+")"}function n(e,t){void 0===t&&(t=16);for(var a=[],r=0;r=this.data.byteLength||t<0||e+t>this.data.byteLength)throw new _.PEError("INVALID_DATA_POSITION",e,t)},e.prototype.loadHeaders=function(){var e=0;if(this.dosHeader=i.loadImageDosHeader(this,e),this.dosHeader.e_magic.value!=r.IMAGE_DOS_SIGNATURE)throw new _.PEError("INVALID_DOS_SIGNATURE",e,2);if(e=this.dosHeader.e_lfanew.value,this.peSignature=i.loadU4Field(this,e),this.peSignature.value!=r.IMAGE_NT_SIGNATURE)throw new _.PEError("INVALID_PE_SIGNATURE",e,4);switch(e+=this.peSignature._size,this.fileHeader=i.loadImageFileHeader(this,e),e+=this.fileHeader._size,i.loadU2Field(this,e).value){case r.IMAGE_NT_OPTIONAL_HDR32_MAGIC:this.optionalHeader=i.loadImageOptionalHeader32(this,e);break;case r.IMAGE_NT_OPTIONAL_HDR64_MAGIC:this.optionalHeader=i.loadImageOptionalHeader64(this,e);break;default:throw new _.PEError("INVALID_OPTIONAL_HEADER_MAGIC",e,2)}if(this.optionalHeader.NumberOfRvaAndSizes.value!=r.IMAGE_NUMBEROF_DIRECTORY_ENTRIES)throw new _.PEError("INVALID_DATA_DIRECTORY_COUNT",this.optionalHeader.NumberOfRvaAndSizes._offset,this.optionalHeader.NumberOfRvaAndSizes._size);e+=this.optionalHeader._size,this.dataDirectories=i.loadStructArrayByCount(this,e,i.loadImageDataDirectory,this.optionalHeader.NumberOfRvaAndSizes.value),e+=this.dataDirectories._size,this.sectionHeaders=i.loadStructArrayByCount(this,e,i.loadImageSectionHeader,this.fileHeader.NumberOfSections.value)},e.prototype.getSectionHeaderByOffset=function(e){return this.sectionHeaders&&this.sectionHeaders.items.filter(function(t){var a=t.PointerToRawData.value,i=t.SizeOfRawData.value;return e>=a&&e=a&&e0&&e.Size.value>0||!1},e}();t.PEImage=E},function(e,t,a){"use strict";t.__esModule=!0,t.createResNavDataMessage=function(e){return{type:"RES_NAV_DATA",navList:e}},t.createResPageDataMessage=function(e){return{type:"RES_PAGE_DATA",pageData:e}},t.createResPEPropsMessage=function(e,t){return{type:"RES_PE_PROPS",is32Bit:e,isManaged:t}},t.createResPEErrorMessage=function(e){return{type:"RES_PE_ERROR",error:e}}},function(e,t,a){"use strict";t.__esModule=!0;var i=a(10),r=a(9),_=a(5),E=a(2),o=null;onmessage=function(e){var t=e.data;switch(t.type){case"REQ_OPEN_FILE":!function(e){var t=new FileReader;t.onload=function(e){try{var t=e.target.result;o=r.PEImage.load(t);var a=_.generatePageData(o,"HEADERS"),s=i.createResPageDataMessage(a);postMessage(s);var I=o.is32Bit(),n=o.isManaged(),A=i.createResPEPropsMessage(I,n);postMessage(A);var M=E.generateNavList(o),S=i.createResNavDataMessage(M);postMessage(S)}catch(e){var d=i.createResPEErrorMessage(e.message||"Unknown error: "+JSON.stringify(e));postMessage(d)}},t.onerror=function(e){o=null;var t=i.createResPEErrorMessage("Can't open file.");postMessage(t)},t.readAsArrayBuffer(e.file)}(t);break;case"REQ_OPEN_NAV":!function(e){if(null!=o){var t=_.generatePageData(o,e.target.pageID);t.nav.elemID=e.target.elemID;var a=i.createResPageDataMessage(t);postMessage(a)}}(t)}}}]); +!function(e){var t={};function a(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)a.d(r,i,function(t){return e[t]}.bind(null,i));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=13)}([function(e,t,a){"use strict";var r;t.__esModule=!0,t.IMAGE_DOS_SIGNATURE=23117,t.IMAGE_NT_SIGNATURE=17744,t.IMAGE_NT_OPTIONAL_HDR32_MAGIC=267,t.IMAGE_NT_OPTIONAL_HDR64_MAGIC=523,function(e){e[e.IMAGE_FILE_RELOCS_STRIPPED=1]="IMAGE_FILE_RELOCS_STRIPPED",e[e.IMAGE_FILE_EXECUTABLE_IMAGE=2]="IMAGE_FILE_EXECUTABLE_IMAGE",e[e.IMAGE_FILE_LINE_NUMS_STRIPPED=4]="IMAGE_FILE_LINE_NUMS_STRIPPED",e[e.IMAGE_FILE_LOCAL_SYMS_STRIPPED=8]="IMAGE_FILE_LOCAL_SYMS_STRIPPED",e[e.IMAGE_FILE_AGGRESIVE_WS_TRIM=16]="IMAGE_FILE_AGGRESIVE_WS_TRIM",e[e.IMAGE_FILE_LARGE_ADDRESS_AWARE=32]="IMAGE_FILE_LARGE_ADDRESS_AWARE",e[e.IMAGE_FILE_BYTES_REVERSED_LO=128]="IMAGE_FILE_BYTES_REVERSED_LO",e[e.IMAGE_FILE_32BIT_MACHINE=256]="IMAGE_FILE_32BIT_MACHINE",e[e.IMAGE_FILE_DEBUG_STRIPPED=512]="IMAGE_FILE_DEBUG_STRIPPED",e[e.IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP=1024]="IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP",e[e.IMAGE_FILE_NET_RUN_FROM_SWAP=2048]="IMAGE_FILE_NET_RUN_FROM_SWAP",e[e.IMAGE_FILE_SYSTEM=4096]="IMAGE_FILE_SYSTEM",e[e.IMAGE_FILE_DLL=8192]="IMAGE_FILE_DLL",e[e.IMAGE_FILE_UP_SYSTEM_ONLY=16384]="IMAGE_FILE_UP_SYSTEM_ONLY",e[e.IMAGE_FILE_BYTES_REVERSED_HI=32768]="IMAGE_FILE_BYTES_REVERSED_HI"}(t.ImageFile||(t.ImageFile={})),function(e){e[e.IMAGE_FILE_MACHINE_UNKNOWN=0]="IMAGE_FILE_MACHINE_UNKNOWN",e[e.IMAGE_FILE_MACHINE_TARGET_HOST=1]="IMAGE_FILE_MACHINE_TARGET_HOST",e[e.IMAGE_FILE_MACHINE_I386=332]="IMAGE_FILE_MACHINE_I386",e[e.IMAGE_FILE_MACHINE_R3000=354]="IMAGE_FILE_MACHINE_R3000",e[e.IMAGE_FILE_MACHINE_R4000=358]="IMAGE_FILE_MACHINE_R4000",e[e.IMAGE_FILE_MACHINE_R10000=360]="IMAGE_FILE_MACHINE_R10000",e[e.IMAGE_FILE_MACHINE_WCEMIPSV2=361]="IMAGE_FILE_MACHINE_WCEMIPSV2",e[e.IMAGE_FILE_MACHINE_ALPHA=388]="IMAGE_FILE_MACHINE_ALPHA",e[e.IMAGE_FILE_MACHINE_SH3=418]="IMAGE_FILE_MACHINE_SH3",e[e.IMAGE_FILE_MACHINE_SH3DSP=419]="IMAGE_FILE_MACHINE_SH3DSP",e[e.IMAGE_FILE_MACHINE_SH3E=420]="IMAGE_FILE_MACHINE_SH3E",e[e.IMAGE_FILE_MACHINE_SH4=422]="IMAGE_FILE_MACHINE_SH4",e[e.IMAGE_FILE_MACHINE_SH5=424]="IMAGE_FILE_MACHINE_SH5",e[e.IMAGE_FILE_MACHINE_ARM=448]="IMAGE_FILE_MACHINE_ARM",e[e.IMAGE_FILE_MACHINE_THUMB=450]="IMAGE_FILE_MACHINE_THUMB",e[e.IMAGE_FILE_MACHINE_ARMNT=452]="IMAGE_FILE_MACHINE_ARMNT",e[e.IMAGE_FILE_MACHINE_AM33=467]="IMAGE_FILE_MACHINE_AM33",e[e.IMAGE_FILE_MACHINE_POWERPC=496]="IMAGE_FILE_MACHINE_POWERPC",e[e.IMAGE_FILE_MACHINE_POWERPCFP=497]="IMAGE_FILE_MACHINE_POWERPCFP",e[e.IMAGE_FILE_MACHINE_IA64=512]="IMAGE_FILE_MACHINE_IA64",e[e.IMAGE_FILE_MACHINE_MIPS16=614]="IMAGE_FILE_MACHINE_MIPS16",e[e.IMAGE_FILE_MACHINE_ALPHA64=644]="IMAGE_FILE_MACHINE_ALPHA64",e[e.IMAGE_FILE_MACHINE_MIPSFPU=870]="IMAGE_FILE_MACHINE_MIPSFPU",e[e.IMAGE_FILE_MACHINE_MIPSFPU16=1126]="IMAGE_FILE_MACHINE_MIPSFPU16",e[e.IMAGE_FILE_MACHINE_AXP64=644]="IMAGE_FILE_MACHINE_AXP64",e[e.IMAGE_FILE_MACHINE_TRICORE=1312]="IMAGE_FILE_MACHINE_TRICORE",e[e.IMAGE_FILE_MACHINE_CEF=3311]="IMAGE_FILE_MACHINE_CEF",e[e.IMAGE_FILE_MACHINE_EBC=3772]="IMAGE_FILE_MACHINE_EBC",e[e.IMAGE_FILE_MACHINE_AMD64=34404]="IMAGE_FILE_MACHINE_AMD64",e[e.IMAGE_FILE_MACHINE_M32R=36929]="IMAGE_FILE_MACHINE_M32R",e[e.IMAGE_FILE_MACHINE_ARM64=43620]="IMAGE_FILE_MACHINE_ARM64",e[e.IMAGE_FILE_MACHINE_CEE=49390]="IMAGE_FILE_MACHINE_CEE"}(t.ImageFileMachine||(t.ImageFileMachine={})),function(e){e[e.IMAGE_SUBSYSTEM_UNKNOWN=0]="IMAGE_SUBSYSTEM_UNKNOWN",e[e.IMAGE_SUBSYSTEM_NATIVE=1]="IMAGE_SUBSYSTEM_NATIVE",e[e.IMAGE_SUBSYSTEM_WINDOWS_GUI=2]="IMAGE_SUBSYSTEM_WINDOWS_GUI",e[e.IMAGE_SUBSYSTEM_WINDOWS_CUI=3]="IMAGE_SUBSYSTEM_WINDOWS_CUI",e[e.IMAGE_SUBSYSTEM_OS2_CUI=5]="IMAGE_SUBSYSTEM_OS2_CUI",e[e.IMAGE_SUBSYSTEM_POSIX_CUI=7]="IMAGE_SUBSYSTEM_POSIX_CUI",e[e.IMAGE_SUBSYSTEM_NATIVE_WINDOWS=8]="IMAGE_SUBSYSTEM_NATIVE_WINDOWS",e[e.IMAGE_SUBSYSTEM_WINDOWS_CE_GUI=9]="IMAGE_SUBSYSTEM_WINDOWS_CE_GUI",e[e.IMAGE_SUBSYSTEM_EFI_APPLICATION=10]="IMAGE_SUBSYSTEM_EFI_APPLICATION",e[e.IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER=11]="IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER",e[e.IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER=12]="IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER",e[e.IMAGE_SUBSYSTEM_EFI_ROM=13]="IMAGE_SUBSYSTEM_EFI_ROM",e[e.IMAGE_SUBSYSTEM_XBOX=14]="IMAGE_SUBSYSTEM_XBOX",e[e.IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION=16]="IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION",e[e.IMAGE_SUBSYSTEM_XBOX_CODE_CATALOG=17]="IMAGE_SUBSYSTEM_XBOX_CODE_CATALOG"}(t.ImageSubsystem||(t.ImageSubsystem={})),function(e){e[e.IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA=32]="IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA",e[e.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE=64]="IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE",e[e.IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY=128]="IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY",e[e.IMAGE_DLLCHARACTERISTICS_NX_COMPAT=256]="IMAGE_DLLCHARACTERISTICS_NX_COMPAT",e[e.IMAGE_DLLCHARACTERISTICS_NO_ISOLATION=512]="IMAGE_DLLCHARACTERISTICS_NO_ISOLATION",e[e.IMAGE_DLLCHARACTERISTICS_NO_SEH=1024]="IMAGE_DLLCHARACTERISTICS_NO_SEH",e[e.IMAGE_DLLCHARACTERISTICS_NO_BIND=2048]="IMAGE_DLLCHARACTERISTICS_NO_BIND",e[e.IMAGE_DLLCHARACTERISTICS_APPCONTAINER=4096]="IMAGE_DLLCHARACTERISTICS_APPCONTAINER",e[e.IMAGE_DLLCHARACTERISTICS_WDM_DRIVER=8192]="IMAGE_DLLCHARACTERISTICS_WDM_DRIVER",e[e.IMAGE_DLLCHARACTERISTICS_GUARD_CF=16384]="IMAGE_DLLCHARACTERISTICS_GUARD_CF",e[e.IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE=32768]="IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE"}(t.ImageDllCharacteristics||(t.ImageDllCharacteristics={})),function(e){e[e.IMAGE_DIRECTORY_ENTRY_EXPORT=0]="IMAGE_DIRECTORY_ENTRY_EXPORT",e[e.IMAGE_DIRECTORY_ENTRY_IMPORT=1]="IMAGE_DIRECTORY_ENTRY_IMPORT",e[e.IMAGE_DIRECTORY_ENTRY_RESOURCE=2]="IMAGE_DIRECTORY_ENTRY_RESOURCE",e[e.IMAGE_DIRECTORY_ENTRY_EXCEPTION=3]="IMAGE_DIRECTORY_ENTRY_EXCEPTION",e[e.IMAGE_DIRECTORY_ENTRY_SECURITY=4]="IMAGE_DIRECTORY_ENTRY_SECURITY",e[e.IMAGE_DIRECTORY_ENTRY_BASERELOC=5]="IMAGE_DIRECTORY_ENTRY_BASERELOC",e[e.IMAGE_DIRECTORY_ENTRY_DEBUG=6]="IMAGE_DIRECTORY_ENTRY_DEBUG",e[e.IMAGE_DIRECTORY_ENTRY_ARCHITECTURE=7]="IMAGE_DIRECTORY_ENTRY_ARCHITECTURE",e[e.IMAGE_DIRECTORY_ENTRY_GLOBALPTR=8]="IMAGE_DIRECTORY_ENTRY_GLOBALPTR",e[e.IMAGE_DIRECTORY_ENTRY_TLS=9]="IMAGE_DIRECTORY_ENTRY_TLS",e[e.IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG=10]="IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG",e[e.IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT=11]="IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT",e[e.IMAGE_DIRECTORY_ENTRY_IAT=12]="IMAGE_DIRECTORY_ENTRY_IAT",e[e.IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT=13]="IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT",e[e.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR=14]="IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR"}(t.ImageDirectoryEntry||(t.ImageDirectoryEntry={})),t.IMAGE_NUMBEROF_DIRECTORY_ENTRIES=16,function(e){e[e.IMAGE_SCN_TYPE_NO_PAD=8]="IMAGE_SCN_TYPE_NO_PAD",e[e.IMAGE_SCN_CNT_CODE=32]="IMAGE_SCN_CNT_CODE",e[e.IMAGE_SCN_CNT_INITIALIZED_DATA=64]="IMAGE_SCN_CNT_INITIALIZED_DATA",e[e.IMAGE_SCN_CNT_UNINITIALIZED_DATA=128]="IMAGE_SCN_CNT_UNINITIALIZED_DATA",e[e.IMAGE_SCN_LNK_OTHER=256]="IMAGE_SCN_LNK_OTHER",e[e.IMAGE_SCN_LNK_INFO=512]="IMAGE_SCN_LNK_INFO",e[e.IMAGE_SCN_LNK_REMOVE=2048]="IMAGE_SCN_LNK_REMOVE",e[e.IMAGE_SCN_LNK_COMDAT=4096]="IMAGE_SCN_LNK_COMDAT",e[e.IMAGE_SCN_NO_DEFER_SPEC_EXC=16384]="IMAGE_SCN_NO_DEFER_SPEC_EXC",e[e.IMAGE_SCN_GPREL=32768]="IMAGE_SCN_GPREL",e[e.IMAGE_SCN_MEM_PURGEABLE=131072]="IMAGE_SCN_MEM_PURGEABLE",e[e.IMAGE_SCN_MEM_16BIT=131072]="IMAGE_SCN_MEM_16BIT",e[e.IMAGE_SCN_MEM_LOCKED=262144]="IMAGE_SCN_MEM_LOCKED",e[e.IMAGE_SCN_MEM_PRELOAD=524288]="IMAGE_SCN_MEM_PRELOAD",e[e.IMAGE_SCN_ALIGN_1BYTES=1048576]="IMAGE_SCN_ALIGN_1BYTES",e[e.IMAGE_SCN_ALIGN_2BYTES=2097152]="IMAGE_SCN_ALIGN_2BYTES",e[e.IMAGE_SCN_ALIGN_4BYTES=3145728]="IMAGE_SCN_ALIGN_4BYTES",e[e.IMAGE_SCN_ALIGN_8BYTES=4194304]="IMAGE_SCN_ALIGN_8BYTES",e[e.IMAGE_SCN_ALIGN_16BYTES=5242880]="IMAGE_SCN_ALIGN_16BYTES",e[e.IMAGE_SCN_ALIGN_32BYTES=6291456]="IMAGE_SCN_ALIGN_32BYTES",e[e.IMAGE_SCN_ALIGN_64BYTES=7340032]="IMAGE_SCN_ALIGN_64BYTES",e[e.IMAGE_SCN_ALIGN_128BYTES=8388608]="IMAGE_SCN_ALIGN_128BYTES",e[e.IMAGE_SCN_ALIGN_256BYTES=9437184]="IMAGE_SCN_ALIGN_256BYTES",e[e.IMAGE_SCN_ALIGN_512BYTES=10485760]="IMAGE_SCN_ALIGN_512BYTES",e[e.IMAGE_SCN_ALIGN_1024BYTES=11534336]="IMAGE_SCN_ALIGN_1024BYTES",e[e.IMAGE_SCN_ALIGN_2048BYTES=12582912]="IMAGE_SCN_ALIGN_2048BYTES",e[e.IMAGE_SCN_ALIGN_4096BYTES=13631488]="IMAGE_SCN_ALIGN_4096BYTES",e[e.IMAGE_SCN_ALIGN_8192BYTES=14680064]="IMAGE_SCN_ALIGN_8192BYTES",e[e.IMAGE_SCN_LNK_NRELOC_OVFL=16777216]="IMAGE_SCN_LNK_NRELOC_OVFL",e[e.IMAGE_SCN_MEM_DISCARDABLE=33554432]="IMAGE_SCN_MEM_DISCARDABLE",e[e.IMAGE_SCN_MEM_NOT_CACHED=67108864]="IMAGE_SCN_MEM_NOT_CACHED",e[e.IMAGE_SCN_MEM_NOT_PAGED=134217728]="IMAGE_SCN_MEM_NOT_PAGED",e[e.IMAGE_SCN_MEM_SHARED=268435456]="IMAGE_SCN_MEM_SHARED",e[e.IMAGE_SCN_MEM_EXECUTE=536870912]="IMAGE_SCN_MEM_EXECUTE",e[e.IMAGE_SCN_MEM_READ=1073741824]="IMAGE_SCN_MEM_READ",e[e.IMAGE_SCN_MEM_WRITE=2147483648]="IMAGE_SCN_MEM_WRITE",e[e.IMAGE_SCN_SCALE_INDEX=1]="IMAGE_SCN_SCALE_INDEX"}(t.ImageSection||(t.ImageSection={})),function(e){e[e.COMIMAGE_FLAGS_ILONLY=1]="COMIMAGE_FLAGS_ILONLY",e[e.COMIMAGE_FLAGS_32BITREQUIRED=2]="COMIMAGE_FLAGS_32BITREQUIRED",e[e.COMIMAGE_FLAGS_IL_LIBRARY=4]="COMIMAGE_FLAGS_IL_LIBRARY",e[e.COMIMAGE_FLAGS_STRONGNAMESIGNED=8]="COMIMAGE_FLAGS_STRONGNAMESIGNED",e[e.COMIMAGE_FLAGS_NATIVE_ENTRYPOINT=16]="COMIMAGE_FLAGS_NATIVE_ENTRYPOINT",e[e.COMIMAGE_FLAGS_TRACKDEBUGDATA=65536]="COMIMAGE_FLAGS_TRACKDEBUGDATA",e[e.COMIMAGE_FLAGS_32BITPREFERRED=131072]="COMIMAGE_FLAGS_32BITPREFERRED"}(t.ComImageFlags||(t.ComImageFlags={})),t.MetadataSignature=1112167234,function(e){e[e.Module=0]="Module",e[e.TypeRef=1]="TypeRef",e[e.TypeDef=2]="TypeDef",e[e.FieldPtr=3]="FieldPtr",e[e.Field=4]="Field",e[e.MethodPtr=5]="MethodPtr",e[e.MethodDef=6]="MethodDef",e[e.ParamPtr=7]="ParamPtr",e[e.Param=8]="Param",e[e.InterfaceImpl=9]="InterfaceImpl",e[e.MemberRef=10]="MemberRef",e[e.Constant=11]="Constant",e[e.CustomAttribute=12]="CustomAttribute",e[e.FieldMarshal=13]="FieldMarshal",e[e.DeclSecurity=14]="DeclSecurity",e[e.ClassLayout=15]="ClassLayout",e[e.FieldLayout=16]="FieldLayout",e[e.StandAloneSig=17]="StandAloneSig",e[e.EventMap=18]="EventMap",e[e.EventPtr=19]="EventPtr",e[e.Event=20]="Event",e[e.PropertyMap=21]="PropertyMap",e[e.PropertyPtr=22]="PropertyPtr",e[e.Property=23]="Property",e[e.MethodSemantics=24]="MethodSemantics",e[e.MethodImpl=25]="MethodImpl",e[e.ModuleRef=26]="ModuleRef",e[e.TypeSpec=27]="TypeSpec",e[e.ImplMap=28]="ImplMap",e[e.FieldRVA=29]="FieldRVA",e[e.ENCLog=30]="ENCLog",e[e.ENCMap=31]="ENCMap",e[e.Assembly=32]="Assembly",e[e.AssemblyProcessor=33]="AssemblyProcessor",e[e.AssemblyOS=34]="AssemblyOS",e[e.AssemblyRef=35]="AssemblyRef",e[e.AssemblyRefProcessor=36]="AssemblyRefProcessor",e[e.AssemblyRefOS=37]="AssemblyRefOS",e[e.File=38]="File",e[e.ExportedType=39]="ExportedType",e[e.ManifestResource=40]="ManifestResource",e[e.NestedClass=41]="NestedClass",e[e.GenericParam=42]="GenericParam",e[e.MethodSpec=43]="MethodSpec",e[e.GenericParamConstraint=44]="GenericParamConstraint",e[e.String=112]="String"}(r=t.MetadataTableIndex||(t.MetadataTableIndex={})),t.NumberOfMdTables=45,function(e){e[e.TypeDefOrRef=0]="TypeDefOrRef",e[e.HasConstant=1]="HasConstant",e[e.HasCustomAttribute=2]="HasCustomAttribute",e[e.HasFieldMarshall=3]="HasFieldMarshall",e[e.HasDeclSecurity=4]="HasDeclSecurity",e[e.MemberRefParent=5]="MemberRefParent",e[e.HasSemantics=6]="HasSemantics",e[e.MethodDefOrRef=7]="MethodDefOrRef",e[e.MemberForwarded=8]="MemberForwarded",e[e.Implementation=9]="Implementation",e[e.CustomAttributeType=10]="CustomAttributeType",e[e.ResolutionScope=11]="ResolutionScope",e[e.TypeOrMethodDef=12]="TypeOrMethodDef"}(t.MetadataCodedTokenIndex||(t.MetadataCodedTokenIndex={})),t.ctc=[{tagSize:2,tables:[r.TypeDef,r.TypeRef,r.TypeSpec]},{tagSize:2,tables:[r.Field,r.Param,r.Property]},{tagSize:5,tables:[r.MethodDef,r.Field,r.TypeRef,r.TypeDef,r.Param,r.InterfaceImpl,r.MemberRef,r.Module,r.DeclSecurity,r.Property,r.Event,r.StandAloneSig,r.ModuleRef,r.TypeSpec,r.Assembly,r.AssemblyRef,r.File,r.ExportedType,r.ManifestResource,r.GenericParam,r.GenericParamConstraint,r.MethodSpec]},{tagSize:1,tables:[r.Field,r.Param]},{tagSize:2,tables:[r.TypeDef,r.MethodDef,r.Assembly]},{tagSize:3,tables:[r.TypeDef,r.TypeRef,r.ModuleRef,r.MethodDef,r.TypeSpec]},{tagSize:1,tables:[r.Event,r.Property]},{tagSize:1,tables:[r.MethodDef,r.MemberRef]},{tagSize:1,tables:[r.Field,r.MethodDef]},{tagSize:2,tables:[r.File,r.AssemblyRef,r.ExportedType]},{tagSize:3,tables:[r.TypeRef,r.TypeDef,r.MethodDef,r.MemberRef,r.String]},{tagSize:2,tables:[r.Module,r.ModuleRef,r.AssemblyRef,r.TypeRef]},{tagSize:1,tables:[r.TypeDef,r.MethodDef]}],function(e){e[e.None=0]="None",e[e.MD5=32771]="MD5",e[e.SHA1=32772]="SHA1"}(t.AssemblyHashAlgorithm||(t.AssemblyHashAlgorithm={})),function(e){e[e.PublicKey=1]="PublicKey",e[e.pa__Mask=112]="pa__Mask",e[e.pa_ProcessorArchitectureNone=0]="pa_ProcessorArchitectureNone",e[e.pa_ProcessorArchitectureMsil=16]="pa_ProcessorArchitectureMsil",e[e.pa_ProcessorArchitectureX86=32]="pa_ProcessorArchitectureX86",e[e.pa_ProcessorArchitectureIa64=48]="pa_ProcessorArchitectureIa64",e[e.pa_ProcessorArchitectureAmd64=64]="pa_ProcessorArchitectureAmd64",e[e.ProcessorArchitectureSpecified=128]="ProcessorArchitectureSpecified",e[e.EnableJitcompileTracking=32768]="EnableJitcompileTracking",e[e.DisableJitcompileOptimizer=16384]="DisableJitcompileOptimizer",e[e.Retargetable=256]="Retargetable"}(t.CorAssemblyFlags||(t.CorAssemblyFlags={})),function(e){e[e.SpecialName=512]="SpecialName",e[e.RtSpecialName=1024]="RtSpecialName"}(t.CorEventAttr||(t.CorEventAttr={})),function(e){e[e.fa__Mask=7]="fa__Mask",e[e.fa_PrivateScope=0]="fa_PrivateScope",e[e.fa_Private=1]="fa_Private",e[e.fa_FamAndAssem=2]="fa_FamAndAssem",e[e.fa_Assembly=3]="fa_Assembly",e[e.fa_Family=4]="fa_Family",e[e.fa_FamOrAssem=5]="fa_FamOrAssem",e[e.fa_Public=6]="fa_Public",e[e.Static=16]="Static",e[e.InitOnly=32]="InitOnly",e[e.Literal=64]="Literal",e[e.NotSerialized=128]="NotSerialized",e[e.SpecialName=512]="SpecialName",e[e.PinvokeImpl=8192]="PinvokeImpl",e[e.RtSpecialName=1024]="RtSpecialName",e[e.HasFieldMarshal=4096]="HasFieldMarshal",e[e.HasDefault=32768]="HasDefault",e[e.HasFieldRva=256]="HasFieldRva"}(t.CorFieldAttr||(t.CorFieldAttr={})),function(e){e[e.ContainsMetaData=0]="ContainsMetaData",e[e.ContainsNoMetaData=1]="ContainsNoMetaData"}(t.CorFileFlags||(t.CorFileFlags={})),function(e){e[e.v__Mask=3]="v__Mask",e[e.v_NonVariant=0]="v_NonVariant",e[e.v_Covariant=1]="v_Covariant",e[e.v_Contravariant=2]="v_Contravariant",e[e.NoSpecialConstraint=0]="NoSpecialConstraint",e[e.ReferenceTypeConstraint=4]="ReferenceTypeConstraint",e[e.NotNullableValueTypeConstraint=8]="NotNullableValueTypeConstraint",e[e.DefaultConstructorConstraint=16]="DefaultConstructorConstraint"}(t.CorGenericParamAttr||(t.CorGenericParamAttr={})),function(e){e[e.NoMangle=1]="NoMangle",e[e.cs__Mask=6]="cs__Mask",e[e.cs_CharSetNotSpec=0]="cs_CharSetNotSpec",e[e.cs_CharSetAnsi=2]="cs_CharSetAnsi",e[e.cs_CharSetUnicode=4]="cs_CharSetUnicode",e[e.cs_CharSetAuto=6]="cs_CharSetAuto",e[e.bf__Mask=48]="bf__Mask",e[e.bf_BestFitUseAssem=0]="bf_BestFitUseAssem",e[e.bf_BestFitEnabled=16]="bf_BestFitEnabled",e[e.bf_BestFitDisabled=32]="bf_BestFitDisabled",e[e.touc__Mask=12288]="touc__Mask",e[e.touc_ThrowOnUnmappableCharUseAssem=0]="touc_ThrowOnUnmappableCharUseAssem",e[e.touc_ThrowOnUnmappableCharEnabled=4096]="touc_ThrowOnUnmappableCharEnabled",e[e.touc_ThrowOnUnmappableCharDisabled=8192]="touc_ThrowOnUnmappableCharDisabled",e[e.SupportsLastError=64]="SupportsLastError",e[e.cc__Mask=1792]="cc__Mask",e[e.cc_CallConvWinapi=256]="cc_CallConvWinapi",e[e.cc_CallConvCdecl=512]="cc_CallConvCdecl",e[e.cc_CallConvStdcall=768]="cc_CallConvStdcall",e[e.cc_CallConvThiscall=1024]="cc_CallConvThiscall",e[e.cc_CallConvFastcall=1280]="cc_CallConvFastcall"}(t.CorPinvokeMap||(t.CorPinvokeMap={})),function(e){e[e.v__Mask=7]="v__Mask",e[e.v_Public=1]="v_Public",e[e.v_Private=2]="v_Private"}(t.CorManifestResourceFlags||(t.CorManifestResourceFlags={})),function(e){e[e.ma__Mask=7]="ma__Mask",e[e.ma_PrivateScope=0]="ma_PrivateScope",e[e.ma_Private=1]="ma_Private",e[e.ma_FamAndAssem=2]="ma_FamAndAssem",e[e.ma_Assem=3]="ma_Assem",e[e.ma_Family=4]="ma_Family",e[e.ma_FamOrAssem=5]="ma_FamOrAssem",e[e.ma_Public=6]="ma_Public",e[e.Static=16]="Static",e[e.Final=32]="Final",e[e.Virtual=64]="Virtual",e[e.HideBySig=128]="HideBySig",e[e.vl__Mask=256]="vl__Mask",e[e.vl_ReuseSlot=0]="vl_ReuseSlot",e[e.vl_NewSlot=256]="vl_NewSlot",e[e.CheckAccessOnOverride=512]="CheckAccessOnOverride",e[e.Abstract=1024]="Abstract",e[e.SpecialName=2048]="SpecialName",e[e.PInvokeImpl=8192]="PInvokeImpl",e[e.UnmanagedExport=8]="UnmanagedExport",e[e.RtSpecialName=4096]="RtSpecialName",e[e.HasSecurity=16384]="HasSecurity",e[e.RequireSecObject=32768]="RequireSecObject"}(t.CorMethodAttr||(t.CorMethodAttr={})),function(e){e[e.ct__Mask=3]="ct__Mask",e[e.ct_IL=0]="ct_IL",e[e.ct_Native=1]="ct_Native",e[e.ct_OptIL=2]="ct_OptIL",e[e.ct_Runtime=3]="ct_Runtime",e[e.m__Mask=4]="m__Mask",e[e.m_Unmanaged=4]="m_Unmanaged",e[e.m_Managed=0]="m_Managed",e[e.ForwardRef=16]="ForwardRef",e[e.PreserveSig=128]="PreserveSig",e[e.InternalCall=4096]="InternalCall",e[e.Synchronized=32]="Synchronized",e[e.NoInlining=8]="NoInlining"}(t.CorMethodImpl||(t.CorMethodImpl={})),function(e){e[e.Setter=1]="Setter",e[e.Getter=2]="Getter",e[e.Other=4]="Other",e[e.AddOn=8]="AddOn",e[e.RemoveOn=16]="RemoveOn",e[e.Fire=32]="Fire"}(t.CorMethodSemanticsAttr||(t.CorMethodSemanticsAttr={})),function(e){e[e.In=1]="In",e[e.Out=2]="Out",e[e.Optional=16]="Optional",e[e.HasDefault=4096]="HasDefault",e[e.HasFieldMarshal=8192]="HasFieldMarshal",e[e.Unused=53216]="Unused"}(t.CorParamAttr||(t.CorParamAttr={})),function(e){e[e.SpecialName=512]="SpecialName",e[e.RtSpecialName=1024]="RtSpecialName",e[e.HasDefault=4096]="HasDefault",e[e.Unused=59903]="Unused"}(t.CorPropertyAttr||(t.CorPropertyAttr={})),function(e){e[e.v__Mask=7]="v__Mask",e[e.v_NotPublic=0]="v_NotPublic",e[e.v_Public=1]="v_Public",e[e.v_NestedPublic=2]="v_NestedPublic",e[e.v_NestedPrivate=3]="v_NestedPrivate",e[e.v_NestedFamily=4]="v_NestedFamily",e[e.v_NestedAssembly=5]="v_NestedAssembly",e[e.v_NestedFamAndAssem=6]="v_NestedFamAndAssem",e[e.v_NestedFamOrAssem=7]="v_NestedFamOrAssem",e[e.l__Mask=24]="l__Mask",e[e.l_AutoLayout=0]="l_AutoLayout",e[e.l_SequentialLayout=8]="l_SequentialLayout",e[e.l_ExplicitLayout=16]="l_ExplicitLayout",e[e.cs__Mask=96]="cs__Mask",e[e.cs_Class=0]="cs_Class",e[e.cs_Interface=32]="cs_Interface",e[e.Abstract=128]="Abstract",e[e.Sealed=256]="Sealed",e[e.SpecialName=1024]="SpecialName",e[e.Import=4096]="Import",e[e.Serializable=8192]="Serializable",e[e.WindowsRuntime=16384]="WindowsRuntime",e[e.sf__Mask=196608]="sf__Mask",e[e.sf_AnsiClass=0]="sf_AnsiClass",e[e.sf_UnicodeClass=65536]="sf_UnicodeClass",e[e.sf_AutoClass=131072]="sf_AutoClass",e[e.sf_CustomFormatClass=196608]="sf_CustomFormatClass",e[e.CustomFormatMask=12582912]="CustomFormatMask",e[e.BeforeFieldInit=1048576]="BeforeFieldInit",e[e.Forwarder=2097152]="Forwarder",e[e.RtSpecialName=2048]="RtSpecialName",e[e.HasSecurity=262144]="HasSecurity"}(t.CorTypeAttr||(t.CorTypeAttr={})),function(e){e[e.ActionNil=0]="ActionNil",e[e.Request=1]="Request",e[e.Demand=2]="Demand",e[e.Assert=3]="Assert",e[e.Deny=4]="Deny",e[e.PermitOnly=5]="PermitOnly",e[e.LinktimeCheck=6]="LinktimeCheck",e[e.InheritanceCheck=7]="InheritanceCheck",e[e.RequestMinimum=8]="RequestMinimum",e[e.RequestOptional=9]="RequestOptional",e[e.RequestRefuse=10]="RequestRefuse",e[e.PrejitGrant=11]="PrejitGrant",e[e.PrejitDenied=12]="PrejitDenied",e[e.NonCasDemand=13]="NonCasDemand",e[e.NonCasLinkDemand=14]="NonCasLinkDemand",e[e.NonCasInheritance=15]="NonCasInheritance"}(t.CorDeclSecurity||(t.CorDeclSecurity={})),function(e){e[e.End=0]="End",e[e.Void=1]="Void",e[e.Boolean=2]="Boolean",e[e.Char=3]="Char",e[e.I1=4]="I1",e[e.U1=5]="U1",e[e.I2=6]="I2",e[e.U2=7]="U2",e[e.I4=8]="I4",e[e.U4=9]="U4",e[e.I8=10]="I8",e[e.U8=11]="U8",e[e.R4=12]="R4",e[e.R8=13]="R8",e[e.String=14]="String",e[e.Ptr=15]="Ptr",e[e.ByRef=16]="ByRef",e[e.ValueType=17]="ValueType",e[e.Class=18]="Class",e[e.Var=19]="Var",e[e.Array=20]="Array",e[e.GenericInst=21]="GenericInst",e[e.TypedByRef=22]="TypedByRef",e[e.I=24]="I",e[e.U=25]="U",e[e.FnPtr=27]="FnPtr",e[e.Object=28]="Object",e[e.SzArray=29]="SzArray",e[e.MVar=30]="MVar",e[e.CModReqd=31]="CModReqd",e[e.CModOpt=32]="CModOpt",e[e.Internal=33]="Internal",e[e.Modifier=64]="Modifier",e[e.Sentinel=65]="Sentinel",e[e.Pinned=69]="Pinned",e[e.R4HFA=70]="R4HFA",e[e.R8HFA=71]="R8HFA"}(t.CorElementType||(t.CorElementType={}))},function(e,t,a){"use strict";function r(e){return M(e.toString(16).toUpperCase(),2)}function i(e){return M(e.toString(16).toUpperCase(),4)}function o(e){return M(e.toString(16).toUpperCase(),8)}function s(e){return r(e)+"h"}function n(e){return i(e)+"h"}function d(e){return o(e)+"h"}function l(e){return e.toString(16).toUpperCase()+"h ("+e.toLocaleString()+")"}function f(e){return e.toLocaleString()}function _(e,t){void 0===t&&(t=16);for(var a=[],i=0;i=0&&a<64&&a<32&&0!=(t&1<=32&&0!=(e&1<>1;var a=e[0];if(0==(128&a))return t>>1|4294967232;if(128==(192&a))return t>>1|4294959104;if(192==(224&a))return t>>1|4026531840;throw new RangeError},t.getCompressedIntSize=function(e){if(0!=(4294967040&e))throw new RangeError;if(0==(128&e))return 1;if(128==(192&e))return 2;if(192==(224&e))return 4;throw new RangeError}},function(e,t,a){"use strict";t.__esModule=!0;var r=a(0);t.generateNavList=function(e){var t,a=[(t="HEADERS",{target:{pageID:t,title:"Headers"},children:[{target:{pageID:t,title:"DOS Header",elemID:"dos-hdr"}},{target:{pageID:t,title:"PE Signature",elemID:"pe-sig"}},{target:{pageID:t,title:"PE File Header",elemID:"pe-hdr"}},{target:{pageID:t,title:"Optional Header",elemID:"opt-hdr"}},{target:{pageID:t,title:"Data Directories",elemID:"data-dir"}},{target:{pageID:t,title:"Section Headers",elemID:"sec-hdrs"}}]})],i=function(e){var t="MD_HEADERS";if(e.isManaged()){var a=[{target:{pageID:t,title:"CLI Header",elemID:"cli-hdr"}}];return e.hasMetadata()&&(a.push({target:{pageID:t,title:"Metadata Root",elemID:"md-root"}}),a.push({target:{pageID:t,title:"Stream Headers",elemID:"md-hdrs"}})),e.hasStrongNameSignature()&&a.push({target:{pageID:t,title:"Strong Name Signature",elemID:"sn-sig"}}),e.getMetadataStreamHeader("#Strings")&&a.push({target:{pageID:"MDS_STRINGS",title:"#String Stream",pageNum:0}}),e.getMetadataStreamHeader("#US")&&a.push({target:{pageID:"MDS_US",title:"#US Stream",pageNum:0}}),e.getMetadataStreamHeader("#GUID")&&a.push({target:{pageID:"MDS_GUID",title:"#GUID Stream",pageNum:0}}),e.getMetadataStreamHeader("#Blob")&&a.push({target:{pageID:"MDS_BLOB",title:"#Blob Stream",pageNum:0}}),e.getMetadataStreamHeader("#~")&&a.push(function(e){e.getMetadataTableHeader();for(var t=[],a=r.MetadataTableIndex,i=0;io&&(n=o),{start:s,end:n}}t.generateMdsTablePageData=function(e){return{nav:{pageID:"MDS_TABLE",title:"#~ Stream"},tableHeader:function(e){var t={title:"Metadata Table Header",elemID:"mdt-hdr"},a=e.getMetadataTableHeader();return a?(t.groups=[{title:"",items:[i.formatU4Field("Reserved",a.Reserved),i.formatU1Field("MajorVersion",a.MajorVersion,!0),i.formatU1Field("MinorVersion",a.MinorVersion,!0),i.formatU1Field("HeapSizes",a.HeapSizes),i.formatU1Field("Reserved2",a.Reserved2),i.formatU8Field("Valid",a.Valid),i.formatU8Field("Sorted",a.Sorted)]},{title:"Rows",items:a.Rows.items.map(function(e,t){return i.formatU4Field("Rows["+t+"]",e,!0)})}],t):t}(e),tableInfo:function(e){for(var t=[],a=0;a>a.tagSize}}t.loadU1Field=s,t.loadU2Field=n,t.loadU4Field=d,t.loadU8Field=l,t.loadCompressedUIntField=f,t.loadU1EnumField=_,t.loadU2EnumField=M,t.loadU4EnumField=m,t.loadFixedSizeByteArrayField=I,t.loadFixedSizeAsciiStringField=u,t.loadNullTerminatedStringField=S,t.loadFixedSizeUnicodeStringField=c,t.loadStructArrayByCount=E,t.loadImageDosHeader=function(e,t){var a=t,r=n(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=n(e,a+=o._size),l=n(e,a+=s._size),f=n(e,a+=l._size),_=n(e,a+=f._size),M=n(e,a+=_._size),m=n(e,a+=M._size),u=n(e,a+=m._size),S=n(e,a+=u._size),c=n(e,a+=S._size),E=n(e,a+=c._size),A=n(e,a+=E._size),p=I(e,a+=A._size,8),T=n(e,a+=p._size),b=n(e,a+=T._size),g=I(e,a+=b._size,20),z=d(e,a+=g._size);return{_offset:t,_size:(a+=z._size)-t,e_magic:r,e_cblp:i,e_cp:o,e_crlc:s,e_cparhdr:l,e_minalloc:f,e_maxalloc:_,e_ss:M,e_sp:m,e_csum:u,e_ip:S,e_cs:c,e_lfarlc:E,e_ovno:A,e_res:p,e_oemid:T,e_oeminfo:b,e_res2:g,e_lfanew:z}},t.loadImageFileHeader=function(e,t){var a=t,r=n(e,a),i=n(e,a+=r._size),o=d(e,a+=i._size),s=d(e,a+=o._size),l=d(e,a+=s._size),f=n(e,a+=l._size),_=M(e,a+=f._size);return{_offset:t,_size:(a+=_._size)-t,Machine:r,NumberOfSections:i,TimeDateStamp:o,PointerToSymbolTable:s,NumberOfSymbols:l,SizeOfOptionalHeader:f,Characteristics:_}},t.loadImageOptionalHeader32=function(e,t){var a=t,r=n(e,a),i=s(e,a+=r._size),o=s(e,a+=i._size),l=d(e,a+=o._size),f=d(e,a+=l._size),_=d(e,a+=f._size),m=d(e,a+=_._size),I=d(e,a+=m._size),u=d(e,a+=I._size),S=d(e,a+=u._size),c=d(e,a+=S._size),E=d(e,a+=c._size),A=n(e,a+=E._size),p=n(e,a+=A._size),T=n(e,a+=p._size),b=n(e,a+=T._size),g=n(e,a+=b._size),z=n(e,a+=g._size),C=d(e,a+=z._size),F=d(e,a+=C._size),R=d(e,a+=F._size),h=d(e,a+=R._size),N=M(e,a+=h._size),v=M(e,a+=N._size),O=d(e,a+=v._size),D=d(e,a+=O._size),y=d(e,a+=D._size),P=d(e,a+=y._size),U=d(e,a+=P._size),G=d(e,a+=U._size);return{_offset:t,_size:(a+=G._size)-t,Magic:r,MajorLinkerVersion:i,MinorLinkerVersion:o,SizeOfCode:l,SizeOfInitializedData:f,SizeOfUninitializedData:_,AddressOfEntryPoint:m,BaseOfCode:I,BaseOfData:u,ImageBase:S,SectionAlignment:c,FileAlignment:E,MajorOperatingSystemVersion:A,MinorOperatingSystemVersion:p,MajorImageVersion:T,MinorImageVersion:b,MajorSubsystemVersion:g,MinorSubsystemVersion:z,Win32VersionValue:C,SizeOfImage:F,SizeOfHeaders:R,CheckSum:h,Subsystem:N,DllCharacteristics:v,SizeOfStackReserve:O,SizeOfStackCommit:D,SizeOfHeapReserve:y,SizeOfHeapCommit:P,LoaderFlags:U,NumberOfRvaAndSizes:G}},t.loadImageOptionalHeader64=function(e,t){var a=t,r=n(e,a),i=s(e,a+=r._size),o=s(e,a+=i._size),f=d(e,a+=o._size),_=d(e,a+=f._size),m=d(e,a+=_._size),I=d(e,a+=m._size),u=d(e,a+=I._size),S=l(e,a+=u._size),c=d(e,a+=S._size),E=d(e,a+=c._size),A=n(e,a+=E._size),p=n(e,a+=A._size),T=n(e,a+=p._size),b=n(e,a+=T._size),g=n(e,a+=b._size),z=n(e,a+=g._size),C=d(e,a+=z._size),F=d(e,a+=C._size),R=d(e,a+=F._size),h=d(e,a+=R._size),N=M(e,a+=h._size),v=M(e,a+=N._size),O=l(e,a+=v._size),D=l(e,a+=O._size),y=l(e,a+=D._size),P=l(e,a+=y._size),U=d(e,a+=P._size),G=d(e,a+=U._size);return{_offset:t,_size:(a+=G._size)-t,Magic:r,MajorLinkerVersion:i,MinorLinkerVersion:o,SizeOfCode:f,SizeOfInitializedData:_,SizeOfUninitializedData:m,AddressOfEntryPoint:I,BaseOfCode:u,ImageBase:S,SectionAlignment:c,FileAlignment:E,MajorOperatingSystemVersion:A,MinorOperatingSystemVersion:p,MajorImageVersion:T,MinorImageVersion:b,MajorSubsystemVersion:g,MinorSubsystemVersion:z,Win32VersionValue:C,SizeOfImage:F,SizeOfHeaders:R,CheckSum:h,Subsystem:N,DllCharacteristics:v,SizeOfStackReserve:O,SizeOfStackCommit:D,SizeOfHeapReserve:y,SizeOfHeapCommit:P,LoaderFlags:U,NumberOfRvaAndSizes:G}},t.loadImageDataDirectory=A,t.loadImageSectionHeader=function(e,t){var a=t,r=u(e,a,8),i=d(e,a+=r._size),o=d(e,a+=i._size),s=d(e,a+=o._size),l=d(e,a+=s._size),f=d(e,a+=l._size),_=d(e,a+=f._size),M=n(e,a+=_._size),I=n(e,a+=M._size),S=m(e,a+=I._size);return{_offset:t,_size:(a+=S._size)-t,Name:r,VirtualSize:i,VirtualAddress:o,SizeOfRawData:s,PointerToRawData:l,PointerToRelocations:f,PointerToLinenumbers:_,NumberOfRelocations:M,NumberOfLinenumbers:I,Characteristics:S}},t.loadCliHeader=function(e,t){var a=t,r=d(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=A(e,a+=o._size),l=d(e,a+=s._size),f=d(e,a+=l._size),_=A(e,a+=f._size),M=A(e,a+=_._size),m=A(e,a+=M._size),I=A(e,a+=m._size),u=A(e,a+=I._size),S=A(e,a+=u._size);return{_offset:t,_size:(a+=S._size)-t,cb:r,MajorRuntimeVersion:i,MinorRuntimeVersion:o,MetaData:s,Flags:l,EntryPointToken:f,Resources:_,StrongNameSignature:M,CodeManagerTable:m,VTableFixups:I,ExportAddressTableJumps:u,ManagedNativeHeader:S}},t.loadMetadataRoot=function(e,t){var a=t,r=d(e,a),i=n(e,a+=r._size),s=n(e,a+=i._size),l=d(e,a+=s._size),f=d(e,a+=l._size),_=S(e,a+=f._size),M=I(e,a+=_._size,o.calculatePadding(_._size)),m=n(e,a+=M._size),u=n(e,a+=m._size);return{_offset:t,_size:(a+=u._size)-t,Signature:r,MajorVersion:i,MinorVersion:s,Reserved:l,VersionLength:f,VersionString:_,VersionPadding:M,Flags:m,Streams:u}},t.loadMetadataStreamHeader=function(e,t){var a=t,r=d(e,a),i=d(e,a+=r._size),s=S(e,a+=i._size),n=I(e,a+=s._size,o.calculatePadding(s._size));return{_offset:t,_size:(a+=n._size)-t,Offset:r,Size:i,Name:s,Padding:n}},t.loadMetadataTableHeader=function(e,t){var a=t,r=d(e,a),i=s(e,a+=r._size),n=s(e,a+=i._size),f=s(e,a+=n._size),_=s(e,a+=f._size),M=l(e,a+=_._size),m=l(e,a+=M._size),I=E(e,a+=m._size,d,o.count1(M.high)+o.count1(M.low));return{_offset:t,_size:(a+=I._size)-t,Reserved:r,MajorVersion:i,MinorVersion:n,HeapSizes:f,Reserved2:_,Valid:M,Sorted:m,Rows:I}},t.loadMetadataUSItem=function(e,t){var a=t,r=f(e,a);a+=r._size;var i=r.value,o=i>0?1:0,s=c(e,a,i>0?i-1:0),n=I(e,a+=s._size,o);return{_offset:t,_size:(a+=n._size)-t,Size:r,Value:s,Suffix:n}},t.loadMetadataBlobItem=function(e,t){var a=t,r=f(e,a),i=I(e,a+=r._size,r.value);return{_offset:t,_size:(a+=i._size)-t,Size:r,Value:i}},t.loadMdsStringsField=p,t.loadMdsGuidField=T,t.loadMdsBlobField=b,t.loadMdtRidField=g,t.loadMdCodedTokenField=z,t.loadMdTokenField=function(e,t){var a=d(e,t),i=(4278190080&a.value)>>24,o=16777215&a.value;return r({},a,{tid:i,rid:o})},t.decodeCodedToken=C,t.loadMdtModule=function(e,t){var a=t,r=n(e,a),i=p(e,a+=r._size),o=T(e,a+=i._size),s=T(e,a+=o._size),d=T(e,a+=s._size);return{_offset:t,_size:(a+=d._size)-t,Generation:r,Name:i,Mvid:o,EncId:s,EncBaseId:d}},t.loadMdtTypeRef=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.ResolutionScope,a),o=p(e,a+=r._size),s=p(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,ResolutionScope:r,Name:o,Namespace:s}},t.loadMdtTypeDef=function(e,t){var a=t,r=m(e,a),o=p(e,a+=r._size),s=p(e,a+=o._size);a+=s._size;var n=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);a+=n._size;var d=g(e,i.MetadataTableIndex.Field,a);a+=d._size;var l=g(e,i.MetadataTableIndex.MethodDef,a);return{_offset:t,_size:(a+=l._size)-t,Flags:r,Name:o,Namespace:s,Extends:n,FieldList:d,MethodList:l}},t.loadMdtFieldPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Field,a);return{_offset:t,_size:(a+=r._size)-t,Field:r}},t.loadMdtField=function(e,t){var a=t,r=M(e,a),i=p(e,a+=r._size),o=b(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,Flags:r,Name:i,Signature:o}},t.loadMdtMethodPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.MethodDef,a);return{_offset:t,_size:(a+=r._size)-t,Method:r}},t.loadMdtMethodDef=function(e,t){var a=t,r=d(e,a),o=M(e,a+=r._size),s=M(e,a+=o._size),n=p(e,a+=s._size),l=b(e,a+=n._size);a+=l._size;var f=g(e,i.MetadataTableIndex.Param,a);return{_offset:t,_size:(a+=f._size)-t,RVA:r,ImplFlags:o,Flags:s,Name:n,Signature:l,ParamList:f}},t.loadMdtParamPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Param,a);return{_offset:t,_size:(a+=r._size)-t,Param:r}},t.loadMdtParam=function(e,t){var a=t,r=M(e,a),i=n(e,a+=r._size),o=p(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,Flags:r,Sequence:i,Name:o}},t.loadMdtInterfaceImpl=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);return{_offset:t,_size:(a+=o._size)-t,Class:r,Interface:o}},t.loadMdtMemberRef=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.MemberRefParent,a),o=p(e,a+=r._size),s=b(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,Class:r,Name:o,Signature:s}},t.loadMdtConstant=function(e,t){var a=t,r=_(e,a),o=s(e,a+=r._size);a+=o._size;var n=z(e,i.MetadataCodedTokenIndex.HasConstant,a),d=b(e,a+=n._size);return{_offset:t,_size:(a+=d._size)-t,Type:r,PaddingZero:o,Parent:n,Value:d}},t.loadMdtCustomAttribute=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.HasCustomAttribute,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.CustomAttributeType,a),s=b(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,Parent:r,Type:o,Value:s}},t.loadMdtFieldMarshal=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.HasFieldMarshall,a),o=b(e,a+=r._size);return{_offset:t,_size:(a+=o._size)-t,Parent:r,NativeType:o}},t.loadMdtDeclSecurity=function(e,t){var a=t,r=M(e,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.HasDeclSecurity,a),s=b(e,a+=o._size);return{_offset:t,_size:(a+=s._size)-t,Action:r,Parent:o,PermissionSet:s}},t.loadMdtClassLayout=function(e,t){var a=t,r=n(e,a),o=d(e,a+=r._size);a+=o._size;var s=g(e,i.MetadataTableIndex.TypeDef,a);return{_offset:t,_size:(a+=s._size)-t,PackingSize:r,ClassSize:o,Parent:s}},t.loadMdtFieldLayout=function(e,t){var a=t,r=d(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Field,a);return{_offset:t,_size:(a+=o._size)-t,OffSet:r,Field:o}},t.loadMdtStandAloneSig=function(e,t){var a=t,r=b(e,a);return{_offset:t,_size:(a+=r._size)-t,Signature:r}},t.loadMdtEventMap=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Event,a);return{_offset:t,_size:(a+=o._size)-t,Parent:r,EventList:o}},t.loadMdtEventPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Event,a);return{_offset:t,_size:(a+=r._size)-t,Event:r}},t.loadMdtEvent=function(e,t){var a=t,r=M(e,a),o=p(e,a+=r._size);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);return{_offset:t,_size:(a+=s._size)-t,EventFlags:r,Name:o,EventType:s}},t.loadMdtPropertyMap=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Property,a);return{_offset:t,_size:(a+=o._size)-t,Parent:r,PropertyList:o}},t.loadMdtPropertyPtr=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.Property,a);return{_offset:t,_size:(a+=r._size)-t,Property:r}},t.loadMdtProperty=function(e,t){var a=t,r=M(e,a),i=p(e,a+=r._size),o=b(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,PropFlags:r,Name:i,Type:o}},t.loadMdtMethodSemantics=function(e,t){var a=t,r=M(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.MethodDef,a);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.HasSemantics,a);return{_offset:t,_size:(a+=s._size)-t,Semantic:r,Method:o,Association:s}},t.loadMdtMethodImpl=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.MethodDefOrRef,a);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.MethodDefOrRef,a);return{_offset:t,_size:(a+=s._size)-t,Class:r,MethodBody:o,MethodDeclaration:s}},t.loadMdtModuleRef=function(e,t){var a=t,r=p(e,a);return{_offset:t,_size:(a+=r._size)-t,Name:r}},t.loadMdtTypeSpec=function(e,t){var a=t,r=b(e,a);return{_offset:t,_size:(a+=r._size)-t,Signature:r}},t.loadMdtImplMap=function(e,t){var a=t,r=M(e,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.MemberForwarded,a),s=p(e,a+=o._size);a+=s._size;var n=g(e,i.MetadataTableIndex.ModuleRef,a);return{_offset:t,_size:(a+=n._size)-t,MappingFlags:r,MemberForwarded:o,ImportName:s,ImportScope:n}},t.loadMdtFieldRVA=function(e,t){var a=t,r=d(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.Field,a);return{_offset:t,_size:(a+=o._size)-t,RVA:r,Field:o}},t.loadMdtENCLog=function(e,t){var a=t,r=d(e,a),i=d(e,a+=r._size);return{_offset:t,_size:(a+=i._size)-t,Token:r,FuncCode:i}},t.loadMdtENCMap=function(e,t){var a=t,r=d(e,a);return{_offset:t,_size:(a+=r._size)-t,Token:r}},t.loadMdtAssembly=function(e,t){var a=t,r=m(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=n(e,a+=o._size),d=n(e,a+=s._size),l=m(e,a+=d._size),f=b(e,a+=l._size),_=p(e,a+=f._size),M=p(e,a+=_._size);return{_offset:t,_size:(a+=M._size)-t,HashAlgId:r,MajorVersion:i,MinorVersion:o,BuildNumber:s,RevisionNumber:d,Flags:l,PublicKey:f,Name:_,Locale:M}},t.loadMdtAssemblyProcessor=function(e,t){var a=t,r=d(e,a);return{_offset:t,_size:(a+=r._size)-t,Processor:r}},t.loadMdtAssemblyOS=function(e,t){var a=t,r=d(e,a),i=d(e,a+=r._size),o=d(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,OSPlatformID:r,OSMajorVersion:i,OSMinorVersion:o}},t.loadMdtAssemblyRef=function(e,t){var a=t,r=n(e,a),i=n(e,a+=r._size),o=n(e,a+=i._size),s=n(e,a+=o._size),d=m(e,a+=s._size),l=b(e,a+=d._size),f=p(e,a+=l._size),_=p(e,a+=f._size),M=b(e,a+=_._size);return{_offset:t,_size:(a+=M._size)-t,MajorVersion:r,MinorVersion:i,BuildNumber:o,RevisionNumber:s,Flags:d,PublicKeyOrToken:l,Name:f,Locale:_,HashValue:M}},t.loadMdtAssemblyRefProcessor=function(e,t){var a=t,r=d(e,a);a+=r._size;var o=g(e,i.MetadataTableIndex.AssemblyRef,a);return{_offset:t,_size:(a+=o._size)-t,Processor:r,AssemblyRef:o}},t.loadMdtAssemblyRefOS=function(e,t){var a=t,r=d(e,a),o=d(e,a+=r._size),s=d(e,a+=o._size);a+=s._size;var n=g(e,i.MetadataTableIndex.AssemblyRef,a);return{_offset:t,_size:(a+=n._size)-t,OSPlatformID:r,OSMajorVersion:o,OSMinorVersion:s,AssemblyRef:n}},t.loadMdtFile=function(e,t){var a=t,r=m(e,a),i=p(e,a+=r._size),o=b(e,a+=i._size);return{_offset:t,_size:(a+=o._size)-t,Flags:r,Name:i,HashValue:o}},t.loadMdtExportedType=function(e,t){var a=t,r=m(e,a),o=d(e,a+=r._size),s=p(e,a+=o._size),n=p(e,a+=s._size);a+=n._size;var l=z(e,i.MetadataCodedTokenIndex.Implementation,a);return{_offset:t,_size:(a+=l._size)-t,Flags:r,TypeDefId:o,TypeName:s,TypeNamespace:n,Implementation:l}},t.loadMdtManifestResource=function(e,t){var a=t,r=d(e,a),o=m(e,a+=r._size),s=p(e,a+=o._size);a+=s._size;var n=z(e,i.MetadataCodedTokenIndex.Implementation,a);return{_offset:t,_size:(a+=n._size)-t,Offset:r,Flags:o,Name:s,Implementation:n}},t.loadMdtNestedClass=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.TypeDef,a);a+=r._size;var o=g(e,i.MetadataTableIndex.TypeDef,a);return{_offset:t,_size:(a+=o._size)-t,NestedClass:r,EnclosingClass:o}},t.loadMdtGenericParam=function(e,t){var a=t,r=n(e,a),o=M(e,a+=r._size);a+=o._size;var s=z(e,i.MetadataCodedTokenIndex.TypeOrMethodDef,a),d=p(e,a+=s._size);return{_offset:t,_size:(a+=d._size)-t,Number:r,Flags:o,Owner:s,Name:d}},t.loadMdtMethodSpec=function(e,t){var a=t,r=z(e,i.MetadataCodedTokenIndex.MethodDefOrRef,a),o=b(e,a+=r._size);return{_offset:t,_size:(a+=o._size)-t,Method:r,Instantiation:o}},t.loadMdtGenericParamConstraint=function(e,t){var a=t,r=g(e,i.MetadataTableIndex.GenericParam,a);a+=r._size;var o=z(e,i.MetadataCodedTokenIndex.TypeDefOrRef,a);return{_offset:t,_size:(a+=o._size)-t,Owner:r,Constraint:o}}},function(e,t,a){"use strict";t.__esModule=!0;var r=a(10),i=a(0),o=a(9),s=a(2),n=function(){function e(e){this.metadataSizingCache={},this.data=new DataView(e),this.loadHeaders()}return e.load=function(t){return new e(t)},e.prototype.getU1=function(e){return this.check(e,1),this.data.getUint8(e)},e.prototype.getU2=function(e){return this.check(e,2),this.data.getUint16(e,!0)},e.prototype.getU4=function(e){return this.check(e,3),this.data.getUint32(e,!0)},e.prototype.getData=function(e,t){return this.check(e,t),new Uint8Array(this.data.buffer.slice(e,e+t))},e.prototype.is32Bit=function(){var e=this.getOptionalHeader();if(null!=e)switch(e.Magic.value){case i.IMAGE_NT_OPTIONAL_HDR32_MAGIC:return!0;case i.IMAGE_NT_OPTIONAL_HDR64_MAGIC:return!1;default:return}},e.prototype.isManaged=function(){var e=this.getDataDirectories();return null!=e&&this.isDataDirectoryValid(e.items[i.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR])},e.prototype.hasMetadata=function(){var e=this.getCliHeader();return null!=e&&this.isDataDirectoryValid(e.MetaData)},e.prototype.hasManagedResources=function(){var e=this.getCliHeader();return null!=e&&this.isDataDirectoryValid(e.Resources)},e.prototype.hasStrongNameSignature=function(){var e=this.getCliHeader();return null!=e&&this.isDataDirectoryValid(e.StrongNameSignature)},e.prototype.isMetadataTableValid=function(e){var t=this.metadataTableInfo;return!(!t||!t[e])&&t[e].valid},e.prototype.isMetadataTableSorted=function(e){var t=this.metadataTableInfo;return!(!t||!t[e])&&t[e].sorted},e.prototype.getMetadataTableRows=function(e){var t=this.metadataTableInfo;return t&&t[e]?t[e].rows:0},e.prototype.getDosHeader=function(){return this.dosHeader},e.prototype.getPESignature=function(){return this.peSignature},e.prototype.getFileHeader=function(){return this.fileHeader},e.prototype.getOptionalHeader=function(){return this.optionalHeader},e.prototype.getDataDirectories=function(){return this.dataDirectories},e.prototype.getSectionHeaders=function(){return this.sectionHeaders},e.prototype.getCliHeader=function(){if(this.cliHeader)return this.cliHeader;if(this.isManaged()){var e=this.rvaToOffset(this.dataDirectories.items[i.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress.value);return this.cliHeader=r.loadCliHeader(this,e),this.cliHeader}},e.prototype.getMetadataRoot=function(){if(this.metadataRoot)return this.metadataRoot;var e=this.getCliHeader();if(e){var t=this.rvaToOffset(e.MetaData.VirtualAddress.value);if(t)return this.metadataRoot=r.loadMetadataRoot(this,t),this.metadataRoot}},e.prototype.getMetadataStreamHeaders=function(){if(this.metadataStreamHeaders)return this.metadataStreamHeaders;var e=this.getMetadataRoot();return e&&e.Streams.value?(this.metadataStreamHeaders=r.loadStructArrayByCount(this,e._offset+e._size,r.loadMetadataStreamHeader,e.Streams.value),this.metadataStreamHeaders):void 0},e.prototype.getMetadataStreamHeader=function(e){var t=this.getMetadataStreamHeaders();if(t)return t.items.filter(function(t){return t.Name.value==e}).shift()},e.prototype.getStrongNameSignature=function(){if(this.strongNameSignature)return this.strongNameSignature;var e=this.getCliHeader();if(e){var t=this.rvaToOffset(e.StrongNameSignature.VirtualAddress.value);if(t)return this.strongNameSignature=r.loadFixedSizeByteArrayField(this,t,e.StrongNameSignature.Size.value),this.strongNameSignature}},e.prototype.getMetadataTableHeader=function(){if(this.metadataTableHeader)return this.metadataTableHeader;var e=this.getMetadataRoot();if(e){var t=this.getMetadataStreamHeader("#~");if(t){var a=e._offset+t.Offset.value;return this.metadataTableHeader=r.loadMetadataTableHeader(this,a),this.fillMetadataTableInfo(),this.fillMetadataTableInfoExtra(),this.metadataTableHeader}}},e.prototype.getMdsStringsItem=function(e){var t=this.getMetadataRoot();if(t){var a=this.getMetadataStreamHeader("#Strings");if(a)return e<0||e>=a.Size.value?void 0:r.loadNullTerminatedStringField(this,t._offset+a.Offset.value+e)}},e.prototype.getMdsUSItem=function(e){var t=this.getMetadataRoot();if(t){var a=this.getMetadataStreamHeader("#US");if(a)return e<0||e>=a.Size.value?void 0:r.loadMetadataUSItem(this,t._offset+a.Offset.value+e)}},e.prototype.getMdsGuidItems=function(){var e=this.getMetadataRoot();if(e){var t=this.getMetadataStreamHeader("#GUID");if(t){var a=t.Size.value/16;return r.loadStructArrayByCount(this,e._offset+t.Offset.value,function(e,t){return r.loadFixedSizeByteArrayField(e,t,16)},a)}}},e.prototype.getMdsBlobItem=function(e){var t=this.getMetadataRoot();if(t){var a=this.getMetadataStreamHeader("#Blob");if(a)return e<0||e>=a.Size.value?void 0:r.loadMetadataBlobItem(this,t._offset+a.Offset.value+e)}},e.prototype.getMdtModuleItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Module,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Module];return r.loadMdtModule(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtTypeRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.TypeRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Module];return r.loadMdtTypeRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtTypeDefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.TypeDef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.TypeDef];return r.loadMdtTypeDef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldPtr];return r.loadMdtFieldPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Field,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Field];return r.loadMdtField(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodPtr];return r.loadMdtMethodPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodDefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodDef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodDef];return r.loadMdtMethodDef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtParamPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ParamPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ParamPtr];return r.loadMdtParamPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtParamItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Param,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Param];return r.loadMdtParam(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtInterfaceImplItem=function(e){if(this.checkMdt(i.MetadataTableIndex.InterfaceImpl,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.InterfaceImpl];return r.loadMdtInterfaceImpl(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMemberRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MemberRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MemberRef];return r.loadMdtMemberRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtConstantItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Constant,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Constant];return r.loadMdtConstant(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtCustomAttributeItem=function(e){if(this.checkMdt(i.MetadataTableIndex.CustomAttribute,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.CustomAttribute];return r.loadMdtCustomAttribute(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldMarshalItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldMarshal,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldMarshal];return r.loadMdtFieldMarshal(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtDeclSecurityItem=function(e){if(this.checkMdt(i.MetadataTableIndex.DeclSecurity,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.DeclSecurity];return r.loadMdtDeclSecurity(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtClassLayoutItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ClassLayout,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ClassLayout];return r.loadMdtClassLayout(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldLayoutItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldLayout,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldLayout];return r.loadMdtFieldLayout(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtStandAloneSigItem=function(e){if(this.checkMdt(i.MetadataTableIndex.StandAloneSig,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.StandAloneSig];return r.loadMdtStandAloneSig(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtEventMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.EventMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.EventMap];return r.loadMdtEventMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtEventPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.EventPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.EventPtr];return r.loadMdtEventPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtEventItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Event,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Event];return r.loadMdtEvent(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtPropertyMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.PropertyMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.PropertyMap];return r.loadMdtPropertyMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtPropertyPtrItem=function(e){if(this.checkMdt(i.MetadataTableIndex.PropertyPtr,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.PropertyPtr];return r.loadMdtPropertyPtr(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtPropertyItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Property,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Property];return r.loadMdtProperty(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodSemanticsItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodSemantics,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodSemantics];return r.loadMdtMethodSemantics(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodImplItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodImpl,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodImpl];return r.loadMdtMethodImpl(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtModuleRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ModuleRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ModuleRef];return r.loadMdtModuleRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtTypeSpecItem=function(e){if(this.checkMdt(i.MetadataTableIndex.TypeSpec,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.TypeSpec];return r.loadMdtTypeSpec(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtImplMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ImplMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ImplMap];return r.loadMdtImplMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFieldRVAItem=function(e){if(this.checkMdt(i.MetadataTableIndex.FieldRVA,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.FieldRVA];return r.loadMdtFieldRVA(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtENCLogItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ENCLog,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ENCLog];return r.loadMdtENCLog(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtENCMapItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ENCMap,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ENCMap];return r.loadMdtENCMap(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyItem=function(e){if(this.checkMdt(i.MetadataTableIndex.Assembly,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.Assembly];return r.loadMdtAssembly(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyProcessorItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyProcessor,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyProcessor];return r.loadMdtAssemblyProcessor(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyOSItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyOS,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyOS];return r.loadMdtAssemblyOS(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyRefItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyRef,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyRef];return r.loadMdtAssemblyRef(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyRefProcessorItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyRefProcessor,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyRefProcessor];return r.loadMdtAssemblyRefProcessor(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtAssemblyRefOSItem=function(e){if(this.checkMdt(i.MetadataTableIndex.AssemblyRefOS,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.AssemblyRefOS];return r.loadMdtAssemblyRefOS(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtFileItem=function(e){if(this.checkMdt(i.MetadataTableIndex.File,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.File];return r.loadMdtFile(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtExportedTypeItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ExportedType,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ExportedType];return r.loadMdtExportedType(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtManifestResourceItem=function(e){if(this.checkMdt(i.MetadataTableIndex.ManifestResource,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.ManifestResource];return r.loadMdtManifestResource(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtNestedClassItem=function(e){if(this.checkMdt(i.MetadataTableIndex.NestedClass,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.NestedClass];return r.loadMdtNestedClass(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtGenericParamItem=function(e){if(this.checkMdt(i.MetadataTableIndex.GenericParam,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.GenericParam];return r.loadMdtGenericParam(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtMethodSpecItem=function(e){if(this.checkMdt(i.MetadataTableIndex.MethodSpec,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.MethodSpec];return r.loadMdtMethodSpec(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getMdtGenericParamConstraintItem=function(e){if(this.checkMdt(i.MetadataTableIndex.GenericParamConstraint,e)){var t=this.metadataTableInfo[i.MetadataTableIndex.GenericParamConstraint];return r.loadMdtGenericParamConstraint(this,t.baseOffset+t.rowSize*(e-1))}},e.prototype.getHeapSize=function(e){if(this.metadataSizingCache.heap)return this.metadataSizingCache.heap[e];var t=this.getMetadataTableHeader();if(!t)return 0;return this.metadataSizingCache.heap=[0,1,2].map(function(e){return 0!=(t.HeapSizes.value&1<>e.tagSize,r=0,i=e.tables;ra)return 4}return 2}),this.metadataSizingCache.codedToken[e])},e.prototype.rvaToOffset=function(e){var t=this.getSectionHeaderByRva(e);return t?e-t.VirtualAddress.value+t.PointerToRawData.value:0},e.prototype.offsetToRva=function(e){var t=this.getSectionHeaderByOffset(e);return t?e-t.PointerToRawData.value+t.VirtualAddress.value:0},e.prototype.check=function(e,t){if(e<0||e>=this.data.byteLength||t<0||e+t>this.data.byteLength)throw new o.PEError("INVALID_DATA_POSITION",e,t)},e.prototype.loadHeaders=function(){var e=0;if(this.dosHeader=r.loadImageDosHeader(this,e),this.dosHeader.e_magic.value!=i.IMAGE_DOS_SIGNATURE)throw new o.PEError("INVALID_DOS_SIGNATURE",e,2);if(e=this.dosHeader.e_lfanew.value,this.peSignature=r.loadU4Field(this,e),this.peSignature.value!=i.IMAGE_NT_SIGNATURE)throw new o.PEError("INVALID_PE_SIGNATURE",e,4);switch(e+=this.peSignature._size,this.fileHeader=r.loadImageFileHeader(this,e),e+=this.fileHeader._size,r.loadU2Field(this,e).value){case i.IMAGE_NT_OPTIONAL_HDR32_MAGIC:this.optionalHeader=r.loadImageOptionalHeader32(this,e);break;case i.IMAGE_NT_OPTIONAL_HDR64_MAGIC:this.optionalHeader=r.loadImageOptionalHeader64(this,e);break;default:throw new o.PEError("INVALID_OPTIONAL_HEADER_MAGIC",e,2)}if(this.optionalHeader.NumberOfRvaAndSizes.value!=i.IMAGE_NUMBEROF_DIRECTORY_ENTRIES)throw new o.PEError("INVALID_DATA_DIRECTORY_COUNT",this.optionalHeader.NumberOfRvaAndSizes._offset,this.optionalHeader.NumberOfRvaAndSizes._size);e+=this.optionalHeader._size,this.dataDirectories=r.loadStructArrayByCount(this,e,r.loadImageDataDirectory,this.optionalHeader.NumberOfRvaAndSizes.value),e+=this.dataDirectories._size,this.sectionHeaders=r.loadStructArrayByCount(this,e,r.loadImageSectionHeader,this.fileHeader.NumberOfSections.value)},e.prototype.getSectionHeaderByOffset=function(e){return this.sectionHeaders&&this.sectionHeaders.items.filter(function(t){var a=t.PointerToRawData.value,r=t.SizeOfRawData.value;return e>=a&&e=a&&e0&&e.Size.value>0||!1},e.prototype.fillMetadataTableInfo=function(){var e=this.metadataTableHeader;if(e){for(var t={},a=0,r=0;r65535?4:2:0,baseOffset:0,rowSize:0}}this.metadataTableInfo=t}},e.prototype.fillMetadataTableInfoExtra=function(){var e=this.metadataTableHeader;if(e){var t=this.metadataTableInfo;if(t){var a=i.MetadataCodedTokenIndex,r=this.getCodedTokenSize.bind(this),o=i.MetadataTableIndex,s=this.getHeapSize(0),n=this.getHeapSize(1),d=this.getHeapSize(2),l=e._offset+e._size,f=t[o.Module];f.valid&&(f.baseOffset=l,f.rowSize=2+s+3*n),l+=f.rows*f.rowSize,(f=t[o.TypeRef]).valid&&(f.baseOffset=l,f.rowSize=r(a.ResolutionScope)+2*s),l+=f.rows*f.rowSize,(f=t[o.TypeDef]).valid&&(f.baseOffset=l,f.rowSize=4+2*s+r(a.TypeDefOrRef)+t[o.Field].idSize+t[o.MethodDef].idSize),l+=f.rows*f.rowSize,(f=t[o.FieldPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Field].idSize),l+=f.rows*f.rowSize,(f=t[o.Field]).valid&&(f.baseOffset=l,f.rowSize=2+s+d),l+=f.rows*f.rowSize,(f=t[o.MethodPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.MethodDef].idSize),l+=f.rows*f.rowSize,(f=t[o.MethodDef]).valid&&(f.baseOffset=l,f.rowSize=8+s+d+t[o.Param].idSize),l+=f.rows*f.rowSize,(f=t[o.ParamPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Param].idSize),l+=f.rows*f.rowSize,(f=t[o.Param]).valid&&(f.baseOffset=l,f.rowSize=4+s),l+=f.rows*f.rowSize,(f=t[o.InterfaceImpl]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+r(a.TypeDefOrRef)),l+=f.rows*f.rowSize,(f=t[o.MemberRef]).valid&&(f.baseOffset=l,f.rowSize=r(a.MemberRefParent)+s+d),l+=f.rows*f.rowSize,(f=t[o.Constant]).valid&&(f.baseOffset=l,f.rowSize=2+r(a.HasConstant)+d),l+=f.rows*f.rowSize,(f=t[o.CustomAttribute]).valid&&(f.baseOffset=l,f.rowSize=r(a.HasCustomAttribute)+r(a.CustomAttributeType)+d),l+=f.rows*f.rowSize,(f=t[o.FieldMarshal]).valid&&(f.baseOffset=l,f.rowSize=r(a.HasFieldMarshall)+d),l+=f.rows*f.rowSize,(f=t[o.DeclSecurity]).valid&&(f.baseOffset=l,f.rowSize=2+r(a.HasDeclSecurity)+d),l+=f.rows*f.rowSize,(f=t[o.ClassLayout]).valid&&(f.baseOffset=l,f.rowSize=6+t[o.TypeDef].idSize),l+=f.rows*f.rowSize,(f=t[o.FieldLayout]).valid&&(f.baseOffset=l,f.rowSize=4+t[o.Field].idSize),l+=f.rows*f.rowSize,(f=t[o.StandAloneSig]).valid&&(f.baseOffset=l,f.rowSize=d),l+=f.rows*f.rowSize,(f=t[o.EventMap]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+t[o.Event].idSize),l+=f.rows*f.rowSize,(f=t[o.EventPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Event].idSize),l+=f.rows*f.rowSize,(f=t[o.Event]).valid&&(f.baseOffset=l,f.rowSize=2+s+r(a.TypeDefOrRef)),l+=f.rows*f.rowSize,(f=t[o.PropertyMap]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+t[o.Property].idSize),l+=f.rows*f.rowSize,(f=t[o.PropertyPtr]).valid&&(f.baseOffset=l,f.rowSize=t[o.Property].idSize),l+=f.rows*f.rowSize,(f=t[o.Property]).valid&&(f.baseOffset=l,f.rowSize=2+s+d),l+=f.rows*f.rowSize,(f=t[o.MethodSemantics]).valid&&(f.baseOffset=l,f.rowSize=2+t[o.MethodDef].idSize+r(a.HasSemantics)),l+=f.rows*f.rowSize,(f=t[o.MethodImpl]).valid&&(f.baseOffset=l,f.rowSize=t[o.TypeDef].idSize+2*r(a.MethodDefOrRef)),l+=f.rows*f.rowSize,(f=t[o.ModuleRef]).valid&&(f.baseOffset=l,f.rowSize=s),l+=f.rows*f.rowSize,(f=t[o.TypeSpec]).valid&&(f.baseOffset=l,f.rowSize=d),l+=f.rows*f.rowSize,(f=t[o.ImplMap]).valid&&(f.baseOffset=l,f.rowSize=2+r(a.MemberForwarded)+s+t[o.ModuleRef].idSize),l+=f.rows*f.rowSize,(f=t[o.FieldRVA]).valid&&(f.baseOffset=l,f.rowSize=4+t[o.Field].idSize),l+=f.rows*f.rowSize,(f=t[o.ENCLog]).valid&&(f.baseOffset=l,f.rowSize=8),l+=f.rows*f.rowSize,(f=t[o.ENCMap]).valid&&(f.baseOffset=l,f.rowSize=4),l+=f.rows*f.rowSize,(f=t[o.Assembly]).valid&&(f.baseOffset=l,f.rowSize=16+d+2*s),l+=f.rows*f.rowSize,(f=t[o.AssemblyProcessor]).valid&&(f.baseOffset=l,f.rowSize=4),l+=f.rows*f.rowSize,(f=t[o.AssemblyOS]).valid&&(f.baseOffset=l,f.rowSize=12),l+=f.rows*f.rowSize,(f=t[o.AssemblyRef]).valid&&(f.baseOffset=l,f.rowSize=12+2*d+2*s),l+=f.rows*f.rowSize,(f=t[o.AssemblyRefProcessor]).valid&&(f.baseOffset=l,f.rowSize=4+t[o.AssemblyRef].idSize),l+=f.rows*f.rowSize,(f=t[o.AssemblyRefOS]).valid&&(f.baseOffset=l,f.rowSize=12+t[o.AssemblyRef].idSize),l+=f.rows*f.rowSize,(f=t[o.File]).valid&&(f.baseOffset=l,f.rowSize=4+s+d),l+=f.rows*f.rowSize,(f=t[o.ExportedType]).valid&&(f.baseOffset=l,f.rowSize=8+2*s+r(a.Implementation)),l+=f.rows*f.rowSize,(f=t[o.ManifestResource]).valid&&(f.baseOffset=l,f.rowSize=8+s+r(a.Implementation)),l+=f.rows*f.rowSize,(f=t[o.NestedClass]).valid&&(f.baseOffset=l,f.rowSize=2*t[o.TypeDef].idSize),l+=f.rows*f.rowSize,(f=t[o.GenericParam]).valid&&(f.baseOffset=l,f.rowSize=4+r(a.TypeOrMethodDef)+s),l+=f.rows*f.rowSize,(f=t[o.MethodSpec]).valid&&(f.baseOffset=l,f.rowSize=r(a.MethodDefOrRef)+d),l+=f.rows*f.rowSize,(f=t[o.GenericParamConstraint]).valid&&(f.baseOffset=l,f.rowSize=t[o.GenericParam].idSize+r(a.TypeDefOrRef)),l+=f.rows*f.rowSize}}},e.prototype.checkMdt=function(e,t){if(!this.metadataTableInfo)return!1;var a=this.metadataTableInfo[e];return null!=a&&a.valid&&t>0&&t<=a.rows},e}();t.PEImage=n},function(e,t,a){"use strict";t.__esModule=!0,t.createResNavDataMessage=function(e){return{type:"RES_NAV_DATA",navList:e}},t.createResPageDataMessage=function(e){return{type:"RES_PAGE_DATA",pageData:e}},t.createResPEPropsMessage=function(e,t){return{type:"RES_PE_PROPS",is32Bit:e,isManaged:t}},t.createResPEErrorMessage=function(e){return{type:"RES_PE_ERROR",error:e}}},function(e,t,a){"use strict";t.__esModule=!0;var r=a(12),i=a(11),o=a(8),s=a(3),n=null;onmessage=function(e){var t=e.data;switch(t.type){case"REQ_OPEN_FILE":!function(e){var t=new FileReader;t.onload=function(e){try{var t=e.target.result;n=i.PEImage.load(t),o.clearGeneratorCache();var a=o.generatePageData(n,"HEADERS"),d=r.createResPageDataMessage(a);postMessage(d);var l=n.is32Bit(),f=n.isManaged(),_=r.createResPEPropsMessage(l,f);postMessage(_);var M=s.generateNavList(n),m=r.createResNavDataMessage(M);postMessage(m)}catch(e){var I=r.createResPEErrorMessage(e.message||"Unknown error: "+JSON.stringify(e));postMessage(I)}},t.onerror=function(e){n=null;var t=r.createResPEErrorMessage("Can't open file.");postMessage(t)},t.readAsArrayBuffer(e.file)}(t);break;case"REQ_OPEN_NAV":!function(e){if(null!=n){var t=e.target,a=t.pageID,i=t.subID,s=t.pageNum,d=t.elemID,l=o.generatePageData(n,a,i,s);l.nav.elemID=d;var f=r.createResPageDataMessage(l);postMessage(f)}}(t)}}}]); //# sourceMappingURL=worker.js.map \ No newline at end of file diff --git a/worker.js.map b/worker.js.map index 4c0548d..0302a6c 100644 --- a/worker.js.map +++ b/worker.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/worker/page-data/formatter.ts","webpack:///./src/worker/pe/image-flags.ts","webpack:///./src/worker/page-data/nav-data.ts","webpack:///./src/worker/page-data/metadata-headers.ts","webpack:///./src/worker/page-data/headers.ts","webpack:///./src/worker/page-data/generator.ts","webpack:///./src/worker/pe/error.ts","webpack:///./src/worker/pe/utils.ts","webpack:///./src/worker/pe/loader.ts","webpack:///./src/worker/pe/image.ts","webpack:///./src/worker/message.ts","webpack:///./src/worker/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","formatU1RawHex","padZeroLeft","toString","toUpperCase","formatU2RawHex","formatU4RawHex","formatU1Hex","formatU2Hex","formatU4Hex","formatHexDec","formatBytes","bytes","lineWidth","lines","start","length","line","Array","from","subarray","map","b","join","push","str","len","repeat","formatUIntField","f","sz","showDec","hex","offset","_offset","size","_size","rawData","data","formatDec","v","toLocaleString","formatStructTitle","title","formatU1Field","formatU2Field","formatU4Field","formatU8Field","high","low","formatBytesField","formatStringField","IMAGE_DOS_SIGNATURE","IMAGE_NT_SIGNATURE","IMAGE_NT_OPTIONAL_HDR32_MAGIC","IMAGE_NT_OPTIONAL_HDR64_MAGIC","ImageFile","ImageFileMachine","ImageSubsystem","ImageDllCharacteristics","ImageDirectoryEntry","IMAGE_NUMBEROF_DIRECTORY_ENTRIES","ImageSection","ComImageFlags","MetadataSignature","generateNavList","pe","pageID","navList","target","children","elemID","navMD","isManaged","hasMetadata","generateMDHeadersNavData","FM","generateMetadataHeadersPageData","nav","cliHeader","h","getCliHeader","items","cb","MajorRuntimeVersion","MinorRuntimeVersion","MetaData","VirtualAddress","Size","Flags","EntryPointToken","Resources","StrongNameSignature","CodeManagerTable","VTableFixups","ExportAddressTableJumps","ManagedNativeHeader","generateCliHeader","metadataRoot","getMetadataRoot","Signature","MajorVersion","MinorVersion","Reserved","VersionLength","VersionString","VersionPadding","Streams","generateMetadataRoot","streamHeaders","getMetadataStreamHeaders","groups","Name","Offset","Padding","generateMetadataStreamHeader","F","generateHeadersPageData","dosHeader","getDosHeader","e_magic","e_cblp","e_cp","e_crlc","e_cparhdr","e_minalloc","e_maxalloc","e_ss","e_sp","e_csum","e_ip","e_cs","e_lfarlc","e_ovno","e_res","e_oemid","e_oeminfo","e_res2","e_lfanew","generateDosHeader","peSignature","getPESignature","generatePESignature","fileHeader","getFileHeader","Machine","NumberOfSections","TimeDateStamp","PointerToSymbolTable","NumberOfSymbols","SizeOfOptionalHeader","Characteristics","generateFileHeader","optionalHeader","getOptionalHeader","Magic","MajorLinkerVersion","MinorLinkerVersion","SizeOfCode","SizeOfInitializedData","SizeOfUninitializedData","AddressOfEntryPoint","BaseOfCode","BaseOfData","ImageBase","SectionAlignment","FileAlignment","MajorOperatingSystemVersion","MinorOperatingSystemVersion","MajorImageVersion","MinorImageVersion","MajorSubsystemVersion","MinorSubsystemVersion","Win32VersionValue","SizeOfImage","SizeOfHeaders","CheckSum","Subsystem","DllCharacteristics","SizeOfStackReserve","SizeOfStackCommit","SizeOfHeapReserve","SizeOfHeapCommit","LoaderFlags","NumberOfRvaAndSizes","fillOptionalHeader32Fields","fillOptionalHeader64Fields","generateOptionalHeader","dataDirectories","getDataDirectories","generateDataDirectories","sectionHeaders","getSectionHeaders","VirtualSize","SizeOfRawData","PointerToRawData","PointerToRelocations","PointerToLinenumbers","NumberOfRelocations","NumberOfLinenumbers","generateSectionHeaders","headers_1","metadata_headers_1","generatePageData","PEError","_super","type","_this","this","__extends","Error","calculatePadding","dataSize","align","U","loadU1Field","getData","getU1","loadU2Field","getU2","loadU4Field","getU4","loadU8Field","loadU2EnumField","loadU4EnumField","loadFixedSizeByteArrayField","loadFixedSizeAsciiStringField","String","fromCharCode","apply","filter","loadNullTerminatedStringField","ptr","slice","Uint8Array","loadImageDataDirectory","loadU1EnumField","loadStructArrayByCount","loader","count","loadImageDosHeader","loadImageFileHeader","loadImageOptionalHeader32","loadImageOptionalHeader64","loadImageSectionHeader","loadCliHeader","loadMetadataRoot","loadMetadataStreamHeader","L","E","PEImage","buf","DataView","loadHeaders","load","check","getUint8","getUint16","getUint32","buffer","is32Bit","optHdr","dd","isDataDirectoryValid","IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR","hasManagedResources","hasStrongNameSignature","rvaToOffset","metadataStreamHeaders","mdRoot","rva","sh","getSectionHeaderByRva","offsetToRva","getSectionHeaderByOffset","byteLength","shift","createResNavDataMessage","createResPageDataMessage","pageData","createResPEPropsMessage","createResPEErrorMessage","error","M","image_1","generator_1","nav_data_1","onmessage","ev","msg","reader","FileReader","onload","result","pageDataMsg","postMessage","pePropsMsg","navMsg","ex","msg_1","message","JSON","stringify","onerror","readAsArrayBuffer","file","handleReqOpenFile","res","handleReqOpenNav"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAjB,GACAY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cesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\n","import * as S from \"../pe/structures\";\r\nimport { format } from \"url\";\r\n\r\nexport function formatU1RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 2);\r\n}\r\n\r\nexport function formatU2RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 4);\r\n}\r\n\r\nexport function formatU4RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 8);\r\n}\r\n\r\nexport function formatU1Hex(d: number): string {\r\n return `${formatU1RawHex(d)}h`;\r\n}\r\n\r\nexport function formatU2Hex(d: number): string {\r\n return `${formatU2RawHex(d)}h`;\r\n}\r\n\r\nexport function formatU4Hex(d: number): string {\r\n return `${formatU4RawHex(d)}h`;\r\n}\r\n\r\nexport function formatHexDec(d: number): string {\r\n return `${d.toString(16).toUpperCase()}h (${d})`;\r\n}\r\n\r\nexport function formatBytes(bytes: Uint8Array, lineWidth: number = 16): string[] {\r\n let lines: string[] = [];\r\n for (let start = 0; start < bytes.length; start += lineWidth) {\r\n const line = Array.from(bytes.subarray(start, start + lineWidth))\r\n .map(b => formatU1RawHex(b)).join(\"-\");\r\n lines.push(line);\r\n }\r\n return lines;\r\n}\r\n\r\nexport function formatStructTitle(s: S.FileData, title: string): string {\r\n return `${title} [${formatU4Hex(s._offset)} - ${formatU4Hex(s._offset + s._size)} : ${formatHexDec(s._size)}]`;\r\n}\r\n\r\nexport function formatU1Field(name: string, f: S.U1Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 1, showDec);\r\n}\r\n\r\nexport function formatU2Field(name: string, f: S.U2Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 2, showDec);\r\n}\r\n\r\nexport function formatU4Field(name: string, f: S.U4Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 4, showDec);\r\n}\r\n\r\nexport function formatU8Field(name: string, f: S.U8Field, showDec?: boolean): W.StructItem {\r\n let value = `${formatU4RawHex(f.high)} ${formatU4Hex(f.low)}`;\r\n\r\n if (showDec && f.high < 0x1FFFFF) {\r\n const long = f.high * 0x100000000 + f.low;\r\n value += ` (${formatDec(long)})`;\r\n }\r\n\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value,\r\n };\r\n}\r\n\r\nexport function formatBytesField(name: string, f: S.Field): W.StructItem {\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: \"\",\r\n }\r\n}\r\n\r\nexport function formatStringField(name: string, f: S.StringField): W.StructItem {\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: `\"${f.value}\"`,\r\n }\r\n}\r\n\r\nfunction padZeroLeft(str: string, len: number): string {\r\n if (str.length < len) {\r\n return \"0\".repeat(len - str.length) + str;\r\n } else {\r\n return str;\r\n }\r\n}\r\n\r\nfunction formatUIntField(name: string, f: S.UIntField, sz: number, showDec?: boolean): W.StructItem {\r\n let hex: string;\r\n switch (sz) {\r\n case 1: hex = formatU1Hex(f.value); break;\r\n case 2: hex = formatU2Hex(f.value); break;\r\n case 4: hex = formatU4Hex(f.value); break;\r\n default: hex = f.value.toString(16).toUpperCase(); break;\r\n }\r\n\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: showDec ? `${hex} (${formatDec(f.value)})` : hex,\r\n }\r\n}\r\n\r\nfunction formatDec(v: number): string {\r\n return v.toLocaleString();\r\n}\r\n","export const IMAGE_DOS_SIGNATURE = 0x5A4D; // MZ\r\n\r\nexport const IMAGE_NT_SIGNATURE = 0x00004550; // PE00\r\n\r\nexport const IMAGE_NT_OPTIONAL_HDR32_MAGIC = 0x10b;\r\nexport const IMAGE_NT_OPTIONAL_HDR64_MAGIC = 0x20b;\r\n\r\nexport enum ImageFile {\r\n IMAGE_FILE_RELOCS_STRIPPED = 0x0001,\r\n IMAGE_FILE_EXECUTABLE_IMAGE = 0x0002,\r\n IMAGE_FILE_LINE_NUMS_STRIPPED = 0x0004,\r\n IMAGE_FILE_LOCAL_SYMS_STRIPPED = 0x0008,\r\n IMAGE_FILE_AGGRESIVE_WS_TRIM = 0x0010,\r\n IMAGE_FILE_LARGE_ADDRESS_AWARE = 0x0020,\r\n IMAGE_FILE_BYTES_REVERSED_LO = 0x0080,\r\n IMAGE_FILE_32BIT_MACHINE = 0x0100,\r\n IMAGE_FILE_DEBUG_STRIPPED = 0x0200,\r\n IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = 0x0400,\r\n IMAGE_FILE_NET_RUN_FROM_SWAP = 0x0800,\r\n IMAGE_FILE_SYSTEM = 0x1000,\r\n IMAGE_FILE_DLL = 0x2000,\r\n IMAGE_FILE_UP_SYSTEM_ONLY = 0x4000,\r\n IMAGE_FILE_BYTES_REVERSED_HI = 0x8000,\r\n}\r\n\r\nexport enum ImageFileMachine {\r\n IMAGE_FILE_MACHINE_UNKNOWN = 0,\r\n IMAGE_FILE_MACHINE_TARGET_HOST = 0x0001,\r\n IMAGE_FILE_MACHINE_I386 = 0x014c,\r\n IMAGE_FILE_MACHINE_R3000 = 0x0162,\r\n IMAGE_FILE_MACHINE_R4000 = 0x0166,\r\n IMAGE_FILE_MACHINE_R10000 = 0x0168,\r\n IMAGE_FILE_MACHINE_WCEMIPSV2 = 0x0169,\r\n IMAGE_FILE_MACHINE_ALPHA = 0x0184,\r\n IMAGE_FILE_MACHINE_SH3 = 0x01a2,\r\n IMAGE_FILE_MACHINE_SH3DSP = 0x01a3,\r\n IMAGE_FILE_MACHINE_SH3E = 0x01a4,\r\n IMAGE_FILE_MACHINE_SH4 = 0x01a6,\r\n IMAGE_FILE_MACHINE_SH5 = 0x01a8,\r\n IMAGE_FILE_MACHINE_ARM = 0x01c0,\r\n IMAGE_FILE_MACHINE_THUMB = 0x01c2,\r\n IMAGE_FILE_MACHINE_ARMNT = 0x01c4,\r\n IMAGE_FILE_MACHINE_AM33 = 0x01d3,\r\n IMAGE_FILE_MACHINE_POWERPC = 0x01F0,\r\n IMAGE_FILE_MACHINE_POWERPCFP = 0x01f1,\r\n IMAGE_FILE_MACHINE_IA64 = 0x0200,\r\n IMAGE_FILE_MACHINE_MIPS16 = 0x0266,\r\n IMAGE_FILE_MACHINE_ALPHA64 = 0x0284,\r\n IMAGE_FILE_MACHINE_MIPSFPU = 0x0366,\r\n IMAGE_FILE_MACHINE_MIPSFPU16 = 0x0466,\r\n IMAGE_FILE_MACHINE_AXP64 = IMAGE_FILE_MACHINE_ALPHA64,\r\n IMAGE_FILE_MACHINE_TRICORE = 0x0520,\r\n IMAGE_FILE_MACHINE_CEF = 0x0CEF,\r\n IMAGE_FILE_MACHINE_EBC = 0x0EBC,\r\n IMAGE_FILE_MACHINE_AMD64 = 0x8664,\r\n IMAGE_FILE_MACHINE_M32R = 0x9041,\r\n IMAGE_FILE_MACHINE_ARM64 = 0xAA64,\r\n IMAGE_FILE_MACHINE_CEE = 0xC0EE,\r\n}\r\n\r\nexport enum ImageSubsystem {\r\n IMAGE_SUBSYSTEM_UNKNOWN = 0,\r\n IMAGE_SUBSYSTEM_NATIVE = 1,\r\n IMAGE_SUBSYSTEM_WINDOWS_GUI = 2,\r\n IMAGE_SUBSYSTEM_WINDOWS_CUI = 3,\r\n IMAGE_SUBSYSTEM_OS2_CUI = 5,\r\n IMAGE_SUBSYSTEM_POSIX_CUI = 7,\r\n IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8,\r\n IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9,\r\n IMAGE_SUBSYSTEM_EFI_APPLICATION = 10,\r\n IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11,\r\n IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12,\r\n IMAGE_SUBSYSTEM_EFI_ROM = 13,\r\n IMAGE_SUBSYSTEM_XBOX = 14,\r\n IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16,\r\n IMAGE_SUBSYSTEM_XBOX_CODE_CATALOG = 17,\r\n}\r\n\r\nexport enum ImageDllCharacteristics {\r\n IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020,\r\n IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE = 0x0040,\r\n IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY = 0x0080,\r\n IMAGE_DLLCHARACTERISTICS_NX_COMPAT = 0x0100,\r\n IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = 0x0200,\r\n IMAGE_DLLCHARACTERISTICS_NO_SEH = 0x0400,\r\n IMAGE_DLLCHARACTERISTICS_NO_BIND = 0x0800,\r\n IMAGE_DLLCHARACTERISTICS_APPCONTAINER = 0x1000,\r\n IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = 0x2000,\r\n IMAGE_DLLCHARACTERISTICS_GUARD_CF = 0x4000,\r\n IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = 0x8000,\r\n}\r\n\r\nexport enum ImageDirectoryEntry {\r\n IMAGE_DIRECTORY_ENTRY_EXPORT = 0,\r\n IMAGE_DIRECTORY_ENTRY_IMPORT = 1,\r\n IMAGE_DIRECTORY_ENTRY_RESOURCE = 2,\r\n IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3,\r\n IMAGE_DIRECTORY_ENTRY_SECURITY = 4,\r\n IMAGE_DIRECTORY_ENTRY_BASERELOC = 5,\r\n IMAGE_DIRECTORY_ENTRY_DEBUG = 6,\r\n IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7,\r\n IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8,\r\n IMAGE_DIRECTORY_ENTRY_TLS = 9,\r\n IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10,\r\n IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11,\r\n IMAGE_DIRECTORY_ENTRY_IAT = 12,\r\n IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13,\r\n IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14,\r\n}\r\n\r\nexport const IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16;\r\n\r\nexport enum ImageSection {\r\n IMAGE_SCN_TYPE_NO_PAD = 0x00000008,\r\n\r\n IMAGE_SCN_CNT_CODE = 0x00000020,\r\n IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040,\r\n IMAGE_SCN_CNT_UNINITIALIZED_DATA = 0x00000080,\r\n\r\n IMAGE_SCN_LNK_OTHER = 0x00000100,\r\n IMAGE_SCN_LNK_INFO = 0x00000200,\r\n IMAGE_SCN_LNK_REMOVE = 0x00000800,\r\n IMAGE_SCN_LNK_COMDAT = 0x00001000,\r\n\r\n IMAGE_SCN_NO_DEFER_SPEC_EXC = 0x00004000,\r\n IMAGE_SCN_GPREL = 0x00008000,\r\n\r\n IMAGE_SCN_MEM_PURGEABLE = 0x00020000,\r\n IMAGE_SCN_MEM_16BIT = 0x00020000,\r\n IMAGE_SCN_MEM_LOCKED = 0x00040000,\r\n IMAGE_SCN_MEM_PRELOAD = 0x00080000,\r\n\r\n IMAGE_SCN_ALIGN_1BYTES = 0x00100000,\r\n IMAGE_SCN_ALIGN_2BYTES = 0x00200000,\r\n IMAGE_SCN_ALIGN_4BYTES = 0x00300000,\r\n IMAGE_SCN_ALIGN_8BYTES = 0x00400000,\r\n IMAGE_SCN_ALIGN_16BYTES = 0x00500000,\r\n IMAGE_SCN_ALIGN_32BYTES = 0x00600000,\r\n IMAGE_SCN_ALIGN_64BYTES = 0x00700000,\r\n IMAGE_SCN_ALIGN_128BYTES = 0x00800000,\r\n IMAGE_SCN_ALIGN_256BYTES = 0x00900000,\r\n IMAGE_SCN_ALIGN_512BYTES = 0x00A00000,\r\n IMAGE_SCN_ALIGN_1024BYTES = 0x00B00000,\r\n IMAGE_SCN_ALIGN_2048BYTES = 0x00C00000,\r\n IMAGE_SCN_ALIGN_4096BYTES = 0x00D00000,\r\n IMAGE_SCN_ALIGN_8192BYTES = 0x00E00000,\r\n\r\n IMAGE_SCN_LNK_NRELOC_OVFL = 0x01000000,\r\n IMAGE_SCN_MEM_DISCARDABLE = 0x02000000,\r\n IMAGE_SCN_MEM_NOT_CACHED = 0x04000000,\r\n IMAGE_SCN_MEM_NOT_PAGED = 0x08000000,\r\n IMAGE_SCN_MEM_SHARED = 0x10000000,\r\n IMAGE_SCN_MEM_EXECUTE = 0x20000000,\r\n IMAGE_SCN_MEM_READ = 0x40000000,\r\n IMAGE_SCN_MEM_WRITE = 0x80000000,\r\n\r\n IMAGE_SCN_SCALE_INDEX = 0x00000001,\r\n}\r\n\r\nexport enum ComImageFlags {\r\n COMIMAGE_FLAGS_ILONLY = 0x00000001,\r\n COMIMAGE_FLAGS_32BITREQUIRED = 0x00000002,\r\n COMIMAGE_FLAGS_IL_LIBRARY = 0x00000004,\r\n COMIMAGE_FLAGS_STRONGNAMESIGNED = 0x00000008,\r\n COMIMAGE_FLAGS_NATIVE_ENTRYPOINT = 0x00000010,\r\n COMIMAGE_FLAGS_TRACKDEBUGDATA = 0x00010000,\r\n COMIMAGE_FLAGS_32BITPREFERRED = 0x00020000,\r\n}\r\n\r\nexport const MetadataSignature = 0x424A5342;","import { PEImage } from \"../pe/image\";\r\n\r\nexport function generateNavList(pe: PEImage): W.NavData[] {\r\n let navList: W.NavData[] = [generateHeadersNavData(pe)];\r\n\r\n const navMD = generateMDHeadersNavData(pe);\r\n if (navMD) navList.push(navMD);\r\n\r\n return navList;\r\n}\r\n\r\nfunction generateHeadersNavData(pe: PEImage): W.NavData {\r\n const pageID = W.PageID.HEADERS;\r\n\r\n return {\r\n target: { pageID, title: W.KnownTitle.HEADERS },\r\n children: [{\r\n target: { pageID, title: W.KnownTitle.DOS_HEADER, elemID: W.KnownElemID.DOS_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.PE_SIGNATURE, elemID: W.KnownElemID.PE_SIGNATURE }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.FILE_HEADER, elemID: W.KnownElemID.FILE_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.OPTIONAL_HEADER, elemID: W.KnownElemID.OPTIONAL_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.DATA_DIRECTORIES, elemID: W.KnownElemID.DATA_DIRECTORIES }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.SECTION_HEADERS, elemID: W.KnownElemID.SECTION_HEADERS }\r\n }]\r\n };\r\n}\r\n\r\nfunction generateMDHeadersNavData(pe: PEImage): W.NavData | undefined {\r\n const pageID = W.PageID.MD_HEADERS;\r\n\r\n if (!pe.isManaged()) return undefined;\r\n\r\n let children: W.NavData[] = [{\r\n target: { pageID, title: W.KnownTitle.CLI_HEADER, elemID: W.KnownElemID.CLI_HEADER }\r\n }];\r\n\r\n if (pe.hasMetadata()) {\r\n children.push({\r\n target: { pageID, title: W.KnownTitle.MD_ROOT, elemID: W.KnownElemID.MD_ROOT }\r\n });\r\n children.push({\r\n target: { pageID, title: W.KnownTitle.MDS_HEADERS, elemID: W.KnownElemID.MDS_HEADERS }\r\n });\r\n }\r\n\r\n return {\r\n target: { pageID, title: W.KnownTitle.MD_HEADERS },\r\n children\r\n };\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as S from \"../pe/structures\";\r\nimport * as F from \"../pe/image-flags\";\r\nimport * as FM from \"./formatter\";\r\n\r\nexport function generateMetadataHeadersPageData(pe: PEImage): W.MetadataHeadersPageData {\r\n return {\r\n nav: {\r\n pageID: W.PageID.MD_HEADERS,\r\n title: W.KnownTitle.MD_HEADERS,\r\n },\r\n cliHeader: generateCliHeader(pe),\r\n metadataRoot: generateMetadataRoot(pe),\r\n streamHeaders: generateMetadataStreamHeader(pe),\r\n };\r\n\r\n}\r\n\r\nfunction generateCliHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.CLI_HEADER,\r\n elemID: W.KnownElemID.CLI_HEADER,\r\n };\r\n\r\n const h = pe.getCliHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU4Field(\"cb\", h.cb, true),\r\n FM.formatU2Field(\"MajorRuntimeVersion\", h.MajorRuntimeVersion, true),\r\n FM.formatU2Field(\"MinorRuntimeVersion\", h.MinorRuntimeVersion, true),\r\n FM.formatU4Field(\"MetaData.VirtualAddress\", h.MetaData.VirtualAddress),\r\n FM.formatU4Field(\"MetaData.Size\", h.MetaData.Size, true),\r\n FM.formatU4Field(\"Flags\", h.Flags),\r\n FM.formatU4Field(\"EntryPointToken\", h.EntryPointToken),\r\n FM.formatU4Field(\"Resources.VirtualAddress\", h.Resources.VirtualAddress),\r\n FM.formatU4Field(\"Resources.Size\", h.Resources.Size, true),\r\n FM.formatU4Field(\"StrongNameSignature.VirtualAddress\", h.StrongNameSignature.VirtualAddress),\r\n FM.formatU4Field(\"StrongNameSignature.Size\", h.StrongNameSignature.Size, true),\r\n FM.formatU4Field(\"CodeManagerTable.VirtualAddress\", h.CodeManagerTable.VirtualAddress),\r\n FM.formatU4Field(\"CodeManagerTable.Size\", h.CodeManagerTable.Size, true),\r\n FM.formatU4Field(\"VTableFixups.VirtualAddress\", h.VTableFixups.VirtualAddress),\r\n FM.formatU4Field(\"VTableFixups.Size\", h.VTableFixups.Size, true),\r\n FM.formatU4Field(\"ExportAddressTableJumps.VirtualAddress\", h.ExportAddressTableJumps.VirtualAddress),\r\n FM.formatU4Field(\"ExportAddressTableJumps.Size\", h.ExportAddressTableJumps.Size, true),\r\n FM.formatU4Field(\"ManagedNativeHeader.VirtualAddress\", h.ManagedNativeHeader.VirtualAddress),\r\n FM.formatU4Field(\"ManagedNativeHeader.Size\", h.ManagedNativeHeader.Size, true),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateMetadataRoot(pe: PEImage): W.SimpleStruct | undefined {\r\n const h = pe.getMetadataRoot();\r\n if (!h) return undefined;\r\n\r\n const s: W.SimpleStruct = {\r\n title: W.KnownTitle.MD_ROOT,\r\n elemID: W.KnownElemID.MD_ROOT,\r\n items: [\r\n FM.formatU4Field(\"Signature\", h.Signature),\r\n FM.formatU2Field(\"MajorVersion\", h.MajorVersion, true),\r\n FM.formatU2Field(\"MinorVersion\", h.MinorVersion, true),\r\n FM.formatU4Field(\"Reserved\", h.Reserved),\r\n FM.formatU4Field(\"VersionLength\", h.VersionLength, true),\r\n FM.formatStringField(\"VersionString\", h.VersionString),\r\n FM.formatBytesField(\"VersionPadding\", h.VersionPadding),\r\n FM.formatU2Field(\"Flags\", h.Flags),\r\n FM.formatU2Field(\"Streams\", h.Streams, true),\r\n ]\r\n };\r\n return s;\r\n}\r\n\r\nfunction generateMetadataStreamHeader(pe: PEImage): W.GroupedStruct | undefined {\r\n const h = pe.getMetadataStreamHeaders();\r\n if (!h) return undefined;\r\n\r\n const s: W.GroupedStruct = {\r\n title: W.KnownTitle.MDS_HEADERS,\r\n elemID: W.KnownElemID.MDS_HEADERS,\r\n groups: h.items.map((v, i) => ({\r\n title: `[${i}] (${v.Name.value})`,\r\n items: [\r\n FM.formatU4Field(\"Offset\", v.Offset),\r\n FM.formatU4Field(\"Size\", v.Size, true),\r\n FM.formatStringField(\"Name\", v.Name),\r\n FM.formatBytesField(\"Padding\", v.Padding),\r\n ]\r\n }))\r\n };\r\n return s;\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as S from \"../pe/structures\";\r\nimport * as F from \"../pe/image-flags\";\r\nimport * as FM from \"./formatter\";\r\n\r\nexport function generateHeadersPageData(pe: PEImage): W.HeadersPageData {\r\n return {\r\n nav: {\r\n pageID: W.PageID.HEADERS,\r\n title: W.KnownTitle.HEADERS,\r\n },\r\n dosHeader: generateDosHeader(pe),\r\n peSignature: generatePESignature(pe),\r\n fileHeader: generateFileHeader(pe),\r\n optionalHeader: generateOptionalHeader(pe),\r\n dataDirectories: generateDataDirectories(pe),\r\n sectionHeaders: generateSectionHeaders(pe),\r\n };\r\n}\r\n\r\nfunction generateDosHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.DOS_HEADER,\r\n elemID: W.KnownElemID.DOS_HEADER,\r\n };\r\n\r\n const h = pe.getDosHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU2Field(\"e_magic\", h.e_magic),\r\n FM.formatU2Field(\"e_cblp\", h.e_cblp),\r\n FM.formatU2Field(\"e_cp\", h.e_cp),\r\n FM.formatU2Field(\"e_crlc\", h.e_crlc),\r\n FM.formatU2Field(\"e_cparhdr\", h.e_cparhdr),\r\n FM.formatU2Field(\"e_minalloc\", h.e_minalloc),\r\n FM.formatU2Field(\"e_maxalloc\", h.e_maxalloc),\r\n FM.formatU2Field(\"e_ss\", h.e_ss),\r\n FM.formatU2Field(\"e_sp\", h.e_sp),\r\n FM.formatU2Field(\"e_csum\", h.e_csum),\r\n FM.formatU2Field(\"e_ip\", h.e_ip),\r\n FM.formatU2Field(\"e_cs\", h.e_cs),\r\n FM.formatU2Field(\"e_lfarlc\", h.e_lfarlc),\r\n FM.formatU2Field(\"e_ovno\", h.e_ovno),\r\n FM.formatBytesField(\"e_res\", h.e_res),\r\n FM.formatU2Field(\"e_oemid\", h.e_oemid),\r\n FM.formatU2Field(\"e_oeminfo\", h.e_oeminfo),\r\n FM.formatBytesField(\"e_res2\", h.e_res2),\r\n FM.formatU4Field(\"e_lfanew\", h.e_lfanew),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generatePESignature(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.PE_SIGNATURE,\r\n elemID: W.KnownElemID.PE_SIGNATURE,\r\n };\r\n\r\n const h = pe.getPESignature();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU4Field(\"PE Signature\", h),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateFileHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.FILE_HEADER,\r\n elemID: W.KnownElemID.FILE_HEADER,\r\n };\r\n\r\n const h = pe.getFileHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU2Field(\"Machine\", h.Machine),\r\n FM.formatU2Field(\"NumberOfSections\", h.NumberOfSections, true),\r\n FM.formatU4Field(\"TimeDateStamp\", h.TimeDateStamp),\r\n FM.formatU4Field(\"PointerToSymbolTable\", h.PointerToSymbolTable),\r\n FM.formatU4Field(\"NumberOfSymbols\", h.NumberOfSymbols, true),\r\n FM.formatU2Field(\"SizeOfOptionalHeader\", h.SizeOfOptionalHeader, true),\r\n FM.formatU2Field(\"Characteristics\", h.Characteristics),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateOptionalHeader(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.OPTIONAL_HEADER,\r\n elemID: W.KnownElemID.OPTIONAL_HEADER,\r\n };\r\n\r\n const h = pe.getOptionalHeader();\r\n if (!h) return s;\r\n\r\n switch (h.Magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC:\r\n s.title += \" (32-bit)\";\r\n fillOptionalHeader32Fields(s, h);\r\n break;\r\n\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC:\r\n s.title += \" (64-bit)\";\r\n fillOptionalHeader64Fields(s, h);\r\n break;\r\n }\r\n\r\n return s;\r\n}\r\n\r\nfunction fillOptionalHeader32Fields(s: W.GroupedStruct, h: S.ImageOptionalHeader32): void {\r\n s.groups = [{\r\n title: \"Standard Fields\",\r\n items: [\r\n FM.formatU2Field(\"Magic\", h.Magic),\r\n FM.formatU1Field(\"MajorLinkerVersion\", h.MajorLinkerVersion, true),\r\n FM.formatU1Field(\"MinorLinkerVersion\", h.MinorLinkerVersion, true),\r\n FM.formatU4Field(\"SizeOfCode\", h.SizeOfCode, true),\r\n FM.formatU4Field(\"SizeOfInitializedData\", h.SizeOfInitializedData, true),\r\n FM.formatU4Field(\"SizeOfUninitializedData\", h.SizeOfUninitializedData, true),\r\n FM.formatU4Field(\"AddressOfEntryPoint\", h.AddressOfEntryPoint),\r\n FM.formatU4Field(\"BaseOfCode\", h.BaseOfCode),\r\n FM.formatU4Field(\"BaseOfData\", h.BaseOfData),\r\n ],\r\n }, {\r\n title: \"NT-specified Fields\",\r\n items: [\r\n FM.formatU4Field(\"ImageBase\", h.ImageBase),\r\n FM.formatU4Field(\"SectionAlignment\", h.SectionAlignment, true),\r\n FM.formatU4Field(\"FileAlignment\", h.FileAlignment, true),\r\n FM.formatU2Field(\"MajorOperatingSystemVersion\", h.MajorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MinorOperatingSystemVersion\", h.MinorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MajorImageVersion\", h.MajorImageVersion, true),\r\n FM.formatU2Field(\"MinorImageVersion\", h.MinorImageVersion, true),\r\n FM.formatU2Field(\"MajorSubsystemVersion\", h.MajorSubsystemVersion, true),\r\n FM.formatU2Field(\"MinorSubsystemVersion\", h.MinorSubsystemVersion, true),\r\n FM.formatU4Field(\"Win32VersionValue\", h.Win32VersionValue, true),\r\n FM.formatU4Field(\"SizeOfImage\", h.SizeOfImage, true),\r\n FM.formatU4Field(\"SizeOfHeaders\", h.SizeOfHeaders, true),\r\n FM.formatU4Field(\"CheckSum\", h.CheckSum),\r\n FM.formatU2Field(\"Subsystem\", h.Subsystem),\r\n FM.formatU2Field(\"DllCharacteristics\", h.DllCharacteristics),\r\n FM.formatU4Field(\"SizeOfStackReserve\", h.SizeOfStackReserve, true),\r\n FM.formatU4Field(\"SizeOfStackCommit\", h.SizeOfStackCommit, true),\r\n FM.formatU4Field(\"SizeOfHeapReserve\", h.SizeOfHeapReserve, true),\r\n FM.formatU4Field(\"SizeOfHeapCommit\", h.SizeOfHeapCommit, true),\r\n FM.formatU4Field(\"LoaderFlags\", h.LoaderFlags),\r\n FM.formatU4Field(\"NumberOfRvaAndSizes\", h.NumberOfRvaAndSizes, true),\r\n ],\r\n }];\r\n}\r\n\r\nfunction fillOptionalHeader64Fields(s: W.GroupedStruct, h: S.ImageOptionalHeader64): void {\r\n s.groups = [{\r\n title: \"Standard Fields\",\r\n items: [\r\n FM.formatU2Field(\"Magic\", h.Magic),\r\n FM.formatU1Field(\"MajorLinkerVersion\", h.MajorLinkerVersion, true),\r\n FM.formatU1Field(\"MinorLinkerVersion\", h.MinorLinkerVersion, true),\r\n FM.formatU4Field(\"SizeOfCode\", h.SizeOfCode, true),\r\n FM.formatU4Field(\"SizeOfInitializedData\", h.SizeOfInitializedData, true),\r\n FM.formatU4Field(\"SizeOfUninitializedData\", h.SizeOfUninitializedData, true),\r\n FM.formatU4Field(\"AddressOfEntryPoint\", h.AddressOfEntryPoint),\r\n FM.formatU4Field(\"BaseOfCode\", h.BaseOfCode),\r\n ],\r\n }, {\r\n title: \"NT-specified Fields\",\r\n items: [\r\n FM.formatU8Field(\"ImageBase\", h.ImageBase),\r\n FM.formatU4Field(\"SectionAlignment\", h.SectionAlignment, true),\r\n FM.formatU4Field(\"FileAlignment\", h.FileAlignment, true),\r\n FM.formatU2Field(\"MajorOperatingSystemVersion\", h.MajorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MinorOperatingSystemVersion\", h.MinorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MajorImageVersion\", h.MajorImageVersion, true),\r\n FM.formatU2Field(\"MinorImageVersion\", h.MinorImageVersion, true),\r\n FM.formatU2Field(\"MajorSubsystemVersion\", h.MajorSubsystemVersion, true),\r\n FM.formatU2Field(\"MinorSubsystemVersion\", h.MinorSubsystemVersion, true),\r\n FM.formatU4Field(\"Win32VersionValue\", h.Win32VersionValue, true),\r\n FM.formatU4Field(\"SizeOfImage\", h.SizeOfImage, true),\r\n FM.formatU4Field(\"SizeOfHeaders\", h.SizeOfHeaders, true),\r\n FM.formatU4Field(\"CheckSum\", h.CheckSum),\r\n FM.formatU2Field(\"Subsystem\", h.Subsystem),\r\n FM.formatU2Field(\"DllCharacteristics\", h.DllCharacteristics),\r\n FM.formatU8Field(\"SizeOfStackReserve\", h.SizeOfStackReserve, true),\r\n FM.formatU8Field(\"SizeOfStackCommit\", h.SizeOfStackCommit, true),\r\n FM.formatU8Field(\"SizeOfHeapReserve\", h.SizeOfHeapReserve, true),\r\n FM.formatU8Field(\"SizeOfHeapCommit\", h.SizeOfHeapCommit, true),\r\n FM.formatU4Field(\"LoaderFlags\", h.LoaderFlags),\r\n FM.formatU4Field(\"NumberOfRvaAndSizes\", h.NumberOfRvaAndSizes, true),\r\n ],\r\n }];\r\n}\r\n\r\nfunction generateDataDirectories(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.DATA_DIRECTORIES,\r\n elemID: W.KnownElemID.DATA_DIRECTORIES,\r\n };\r\n\r\n const h = pe.getDataDirectories();\r\n if (!h) return s;\r\n\r\n s.groups = h.items.map((v, i) => ({\r\n title: `[${i}] ${F.ImageDirectoryEntry[i] || \"\"}`,\r\n items: [\r\n FM.formatU4Field(\"VirtualAddress\", v.VirtualAddress),\r\n FM.formatU4Field(\"Size\", v.Size, true),\r\n ]\r\n } as W.SimpleStruct));\r\n\r\n return s;\r\n}\r\n\r\nfunction generateSectionHeaders(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.SECTION_HEADERS,\r\n elemID: W.KnownElemID.SECTION_HEADERS,\r\n };\r\n\r\n const h = pe.getSectionHeaders();\r\n if (!h) return s;\r\n\r\n s.groups = h.items.map((v, i) => ({\r\n title: `[${i}] (${v.Name.value})`,\r\n items: [\r\n FM.formatStringField(\"Name\", v.Name),\r\n FM.formatU4Field(\"VirtualSize\", v.VirtualSize, true),\r\n FM.formatU4Field(\"VirtualAddress\", v.VirtualAddress),\r\n FM.formatU4Field(\"SizeOfRawData\", v.SizeOfRawData, true),\r\n FM.formatU4Field(\"PointerToRawData\", v.PointerToRawData),\r\n FM.formatU4Field(\"PointerToRelocations\", v.PointerToRelocations),\r\n FM.formatU4Field(\"PointerToLinenumbers\", v.PointerToLinenumbers),\r\n FM.formatU2Field(\"NumberOfRelocations\", v.NumberOfRelocations, true),\r\n FM.formatU2Field(\"NumberOfLinenumbers\", v.NumberOfLinenumbers, true),\r\n FM.formatU4Field(\"Characteristics\", v.Characteristics),\r\n ]\r\n }));\r\n\r\n return s;\r\n}\r\n","import { PEImage } from \"../pe/image\";\r\nimport { generateHeadersPageData } from \"./headers\";\r\nimport { generateMetadataHeadersPageData } from \"./metadata-headers\";\r\n\r\nexport function generatePageData(pe: PEImage, pageID: W.PageID): W.PageData {\r\n switch (pageID) {\r\n case W.PageID.HEADERS: return generateHeadersPageData(pe);\r\n case W.PageID.MD_HEADERS: return generateMetadataHeadersPageData(pe);\r\n default: return { nav: { pageID: W.PageID.NOTFOUND, title: W.KnownTitle.NOTFOUND } };\r\n }\r\n}","export const enum PEErrorType {\r\n INVALID_DATA_POSITION = \"INVALID_DATA_POSITION\",\r\n INVALID_DOS_SIGNATURE = \"INVALID_DOS_SIGNATURE\",\r\n INVALID_PE_SIGNATURE = \"INVALID_PE_SIGNATURE\",\r\n INVALID_OPTIONAL_HEADER_MAGIC = \"INVALID_OPTIONAL_HEADER_MAGIC\",\r\n INVALID_DATA_DIRECTORY_COUNT = \"INVALID_DATA_DIRECTORY_COUNT\",\r\n}\r\n\r\nexport class PEError extends Error {\r\n constructor(\r\n public type: PEErrorType,\r\n public offset?: number,\r\n public size?: number\r\n ) {\r\n super(type);\r\n }\r\n}\r\n","export function calculatePadding(dataSize: number, align: number = 4): number {\n const r = dataSize % align;\n if (r == 0) {\n return 0;\n } else {\n return align - r;\n }\n}","import * as S from \"./structures\";\r\nimport * as F from \"./image-flags\";\r\nimport * as U from \"./utils\";\r\n\r\nexport interface FileDataProvider {\r\n getU1(p: number): number;\r\n getU2(p: number): number;\r\n getU4(p: number): number;\r\n getData(p: number, sz: number): Uint8Array;\r\n}\r\n\r\n//\r\n// Basic structures.\r\n//\r\n\r\nexport function loadU1Field(d: FileDataProvider, p: number): S.U1Field {\r\n return {\r\n _offset: p, _size: 1, data: d.getData(p, 1), value: d.getU1(p)\r\n };\r\n}\r\n\r\nexport function loadU2Field(d: FileDataProvider, p: number): S.U2Field {\r\n return {\r\n _offset: p, _size: 2, data: d.getData(p, 2), value: d.getU2(p)\r\n };\r\n}\r\n\r\nexport function loadU4Field(d: FileDataProvider, p: number): S.U4Field {\r\n return {\r\n _offset: p, _size: 4, data: d.getData(p, 4), value: d.getU4(p)\r\n };\r\n}\r\n\r\nexport function loadU8Field(d: FileDataProvider, p: number): S.U8Field {\r\n const low = d.getU4(p);\r\n const high = d.getU4(p + 4);\r\n\r\n return {\r\n _offset: p, _size: 8, data: d.getData(p, 8), low, high\r\n };\r\n}\r\n\r\nexport function loadU1EnumField(d: FileDataProvider, p: number): S.U1EnumField {\r\n return {\r\n _offset: p, _size: 1, data: d.getData(p, 1), value: d.getU1(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadU2EnumField(d: FileDataProvider, p: number): S.U2EnumField {\r\n return {\r\n _offset: p, _size: 2, data: d.getData(p, 2), value: d.getU2(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadU4EnumField(d: FileDataProvider, p: number): S.U4EnumField {\r\n return {\r\n _offset: p, _size: 4, data: d.getData(p, 4), value: d.getU4(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadFixedSizeByteArrayField(d: FileDataProvider, p: number, sz: number): S.Field {\r\n return {\r\n _offset: p, _size: sz, data: d.getData(p, sz)\r\n };\r\n}\r\n\r\nexport function loadFixedSizeAsciiStringField(d: FileDataProvider, p: number, sz: number): S.StringField {\r\n const data = d.getData(p, sz);\r\n const value = String.fromCharCode.apply(null, Array.from(data).filter(v => v != 0));\r\n\r\n return {\r\n _offset: p, _size: sz, data, value\r\n };\r\n}\r\n\r\nexport function loadNullTerminatedStringField(d: FileDataProvider, p: number): S.StringField {\r\n let bytes: number[] = [];\r\n let ptr = p;\r\n let b: number;\r\n\r\n do {\r\n b = d.getU1(ptr++);\r\n bytes.push(b);\r\n } while (b != 0);\r\n const value = String.fromCharCode.apply(null, bytes.slice(0, bytes.length - 1));\r\n\r\n return {\r\n _offset: p, _size: ptr - p, data: Uint8Array.from(bytes), value\r\n };\r\n}\r\n\r\nexport function loadStructArrayByCount(\r\n d: FileDataProvider,\r\n p: number,\r\n loader: (d: FileDataProvider, p: number) => T,\r\n count: number): S.StructArray {\r\n\r\n let items: T[] = [];\r\n let ptr = p;\r\n for (let i = 0; i < count; i++) {\r\n const s = loader(d, ptr);\r\n items.push(s);\r\n ptr += s._size;\r\n }\r\n\r\n return { _offset: p, _size: ptr - p, items };\r\n}\r\n\r\n//\r\n// Image headers.\r\n//\r\n\r\nexport function loadImageDosHeader(d: FileDataProvider, p: number): S.ImageDosHeader {\r\n let ptr = p;\r\n\r\n const e_magic = loadU2Field(d, ptr);\r\n ptr += e_magic._size;\r\n\r\n const e_cblp = loadU2Field(d, ptr);\r\n ptr += e_cblp._size;\r\n\r\n const e_cp = loadU2Field(d, ptr);\r\n ptr += e_cp._size;\r\n\r\n const e_crlc = loadU2Field(d, ptr);\r\n ptr += e_crlc._size;\r\n\r\n const e_cparhdr = loadU2Field(d, ptr);\r\n ptr += e_cparhdr._size;\r\n\r\n const e_minalloc = loadU2Field(d, ptr);\r\n ptr += e_minalloc._size;\r\n\r\n const e_maxalloc = loadU2Field(d, ptr);\r\n ptr += e_maxalloc._size;\r\n\r\n const e_ss = loadU2Field(d, ptr);\r\n ptr += e_ss._size;\r\n\r\n const e_sp = loadU2Field(d, ptr);\r\n ptr += e_sp._size;\r\n\r\n const e_csum = loadU2Field(d, ptr);\r\n ptr += e_csum._size;\r\n\r\n const e_ip = loadU2Field(d, ptr);\r\n ptr += e_ip._size;\r\n\r\n const e_cs = loadU2Field(d, ptr);\r\n ptr += e_cs._size;\r\n\r\n const e_lfarlc = loadU2Field(d, ptr);\r\n ptr += e_lfarlc._size;\r\n\r\n const e_ovno = loadU2Field(d, ptr);\r\n ptr += e_ovno._size;\r\n\r\n const e_res = loadFixedSizeByteArrayField(d, ptr, 4 * 2);\r\n ptr += e_res._size;\r\n\r\n const e_oemid = loadU2Field(d, ptr);\r\n ptr += e_oemid._size;\r\n\r\n const e_oeminfo = loadU2Field(d, ptr);\r\n ptr += e_oeminfo._size;\r\n\r\n const e_res2 = loadFixedSizeByteArrayField(d, ptr, 10 * 2);\r\n ptr += e_res2._size;\r\n\r\n const e_lfanew = loadU4Field(d, ptr);\r\n ptr += e_lfanew._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n e_magic,\r\n e_cblp,\r\n e_cp,\r\n e_crlc,\r\n e_cparhdr,\r\n e_minalloc,\r\n e_maxalloc,\r\n e_ss,\r\n e_sp,\r\n e_csum,\r\n e_ip,\r\n e_cs,\r\n e_lfarlc,\r\n e_ovno,\r\n e_res,\r\n e_oemid,\r\n e_oeminfo,\r\n e_res2,\r\n e_lfanew,\r\n };\r\n}\r\n\r\nexport function loadImageFileHeader(d: FileDataProvider, p: number): S.ImageFileHeader {\r\n let ptr = p;\r\n\r\n const Machine = loadU2Field(d, ptr);\r\n ptr += Machine._size;\r\n\r\n const NumberOfSections = loadU2Field(d, ptr);\r\n ptr += NumberOfSections._size;\r\n\r\n const TimeDateStamp = loadU4Field(d, ptr);\r\n ptr += TimeDateStamp._size;\r\n\r\n const PointerToSymbolTable = loadU4Field(d, ptr);\r\n ptr += PointerToSymbolTable._size;\r\n\r\n const NumberOfSymbols = loadU4Field(d, ptr);\r\n ptr += NumberOfSymbols._size;\r\n\r\n const SizeOfOptionalHeader = loadU2Field(d, ptr);\r\n ptr += SizeOfOptionalHeader._size;\r\n\r\n const Characteristics = loadU2EnumField(d, ptr);\r\n ptr += Characteristics._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Machine,\r\n NumberOfSections,\r\n TimeDateStamp,\r\n PointerToSymbolTable,\r\n NumberOfSymbols,\r\n SizeOfOptionalHeader,\r\n Characteristics,\r\n };\r\n}\r\n\r\nexport function loadImageOptionalHeader32(d: FileDataProvider, p: number): S.ImageOptionalHeader32 {\r\n let ptr = p;\r\n\r\n const Magic = loadU2Field(d, ptr);\r\n ptr += Magic._size;\r\n\r\n const MajorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MajorLinkerVersion._size;\r\n\r\n const MinorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MinorLinkerVersion._size;\r\n\r\n const SizeOfCode = loadU4Field(d, ptr);\r\n ptr += SizeOfCode._size;\r\n\r\n const SizeOfInitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfInitializedData._size;\r\n\r\n const SizeOfUninitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfUninitializedData._size;\r\n\r\n const AddressOfEntryPoint = loadU4Field(d, ptr);\r\n ptr += AddressOfEntryPoint._size;\r\n\r\n const BaseOfCode = loadU4Field(d, ptr);\r\n ptr += BaseOfCode._size;\r\n\r\n const BaseOfData = loadU4Field(d, ptr);\r\n ptr += BaseOfData._size;\r\n\r\n const ImageBase = loadU4Field(d, ptr);\r\n ptr += ImageBase._size;\r\n\r\n const SectionAlignment = loadU4Field(d, ptr);\r\n ptr += SectionAlignment._size;\r\n\r\n const FileAlignment = loadU4Field(d, ptr);\r\n ptr += FileAlignment._size;\r\n\r\n const MajorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorOperatingSystemVersion._size;\r\n\r\n const MinorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorOperatingSystemVersion._size;\r\n\r\n const MajorImageVersion = loadU2Field(d, ptr);\r\n ptr += MajorImageVersion._size;\r\n\r\n const MinorImageVersion = loadU2Field(d, ptr);\r\n ptr += MinorImageVersion._size;\r\n\r\n const MajorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorSubsystemVersion._size;\r\n\r\n const MinorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorSubsystemVersion._size;\r\n\r\n const Win32VersionValue = loadU4Field(d, ptr);\r\n ptr += Win32VersionValue._size;\r\n\r\n const SizeOfImage = loadU4Field(d, ptr);\r\n ptr += SizeOfImage._size;\r\n\r\n const SizeOfHeaders = loadU4Field(d, ptr);\r\n ptr += SizeOfHeaders._size;\r\n\r\n const CheckSum = loadU4Field(d, ptr);\r\n ptr += CheckSum._size;\r\n\r\n const Subsystem = loadU2EnumField(d, ptr);\r\n ptr += Subsystem._size;\r\n\r\n const DllCharacteristics = loadU2EnumField(d, ptr);\r\n ptr += DllCharacteristics._size;\r\n\r\n const SizeOfStackReserve = loadU4Field(d, ptr);\r\n ptr += SizeOfStackReserve._size;\r\n\r\n const SizeOfStackCommit = loadU4Field(d, ptr);\r\n ptr += SizeOfStackCommit._size;\r\n\r\n const SizeOfHeapReserve = loadU4Field(d, ptr);\r\n ptr += SizeOfHeapReserve._size;\r\n\r\n const SizeOfHeapCommit = loadU4Field(d, ptr);\r\n ptr += SizeOfHeapCommit._size;\r\n\r\n const LoaderFlags = loadU4Field(d, ptr);\r\n ptr += LoaderFlags._size;\r\n\r\n const NumberOfRvaAndSizes = loadU4Field(d, ptr);\r\n ptr += NumberOfRvaAndSizes._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Magic,\r\n MajorLinkerVersion,\r\n MinorLinkerVersion,\r\n SizeOfCode,\r\n SizeOfInitializedData,\r\n SizeOfUninitializedData,\r\n AddressOfEntryPoint,\r\n BaseOfCode,\r\n BaseOfData,\r\n ImageBase,\r\n SectionAlignment,\r\n FileAlignment,\r\n MajorOperatingSystemVersion,\r\n MinorOperatingSystemVersion,\r\n MajorImageVersion,\r\n MinorImageVersion,\r\n MajorSubsystemVersion,\r\n MinorSubsystemVersion,\r\n Win32VersionValue,\r\n SizeOfImage,\r\n SizeOfHeaders,\r\n CheckSum,\r\n Subsystem,\r\n DllCharacteristics,\r\n SizeOfStackReserve,\r\n SizeOfStackCommit,\r\n SizeOfHeapReserve,\r\n SizeOfHeapCommit,\r\n LoaderFlags,\r\n NumberOfRvaAndSizes,\r\n };\r\n}\r\n\r\nexport function loadImageOptionalHeader64(d: FileDataProvider, p: number): S.ImageOptionalHeader64 {\r\n let ptr = p;\r\n\r\n const Magic = loadU2Field(d, ptr);\r\n ptr += Magic._size;\r\n\r\n const MajorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MajorLinkerVersion._size;\r\n\r\n const MinorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MinorLinkerVersion._size;\r\n\r\n const SizeOfCode = loadU4Field(d, ptr);\r\n ptr += SizeOfCode._size;\r\n\r\n const SizeOfInitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfInitializedData._size;\r\n\r\n const SizeOfUninitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfUninitializedData._size;\r\n\r\n const AddressOfEntryPoint = loadU4Field(d, ptr);\r\n ptr += AddressOfEntryPoint._size;\r\n\r\n const BaseOfCode = loadU4Field(d, ptr);\r\n ptr += BaseOfCode._size;\r\n\r\n const ImageBase = loadU8Field(d, ptr);\r\n ptr += ImageBase._size;\r\n\r\n const SectionAlignment = loadU4Field(d, ptr);\r\n ptr += SectionAlignment._size;\r\n\r\n const FileAlignment = loadU4Field(d, ptr);\r\n ptr += FileAlignment._size;\r\n\r\n const MajorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorOperatingSystemVersion._size;\r\n\r\n const MinorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorOperatingSystemVersion._size;\r\n\r\n const MajorImageVersion = loadU2Field(d, ptr);\r\n ptr += MajorImageVersion._size;\r\n\r\n const MinorImageVersion = loadU2Field(d, ptr);\r\n ptr += MinorImageVersion._size;\r\n\r\n const MajorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorSubsystemVersion._size;\r\n\r\n const MinorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorSubsystemVersion._size;\r\n\r\n const Win32VersionValue = loadU4Field(d, ptr);\r\n ptr += Win32VersionValue._size;\r\n\r\n const SizeOfImage = loadU4Field(d, ptr);\r\n ptr += SizeOfImage._size;\r\n\r\n const SizeOfHeaders = loadU4Field(d, ptr);\r\n ptr += SizeOfHeaders._size;\r\n\r\n const CheckSum = loadU4Field(d, ptr);\r\n ptr += CheckSum._size;\r\n\r\n const Subsystem = loadU2EnumField(d, ptr);\r\n ptr += Subsystem._size;\r\n\r\n const DllCharacteristics = loadU2EnumField(d, ptr);\r\n ptr += DllCharacteristics._size;\r\n\r\n const SizeOfStackReserve = loadU8Field(d, ptr);\r\n ptr += SizeOfStackReserve._size;\r\n\r\n const SizeOfStackCommit = loadU8Field(d, ptr);\r\n ptr += SizeOfStackCommit._size;\r\n\r\n const SizeOfHeapReserve = loadU8Field(d, ptr);\r\n ptr += SizeOfHeapReserve._size;\r\n\r\n const SizeOfHeapCommit = loadU8Field(d, ptr);\r\n ptr += SizeOfHeapCommit._size;\r\n\r\n const LoaderFlags = loadU4Field(d, ptr);\r\n ptr += LoaderFlags._size;\r\n\r\n const NumberOfRvaAndSizes = loadU4Field(d, ptr);\r\n ptr += NumberOfRvaAndSizes._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Magic,\r\n MajorLinkerVersion,\r\n MinorLinkerVersion,\r\n SizeOfCode,\r\n SizeOfInitializedData,\r\n SizeOfUninitializedData,\r\n AddressOfEntryPoint,\r\n BaseOfCode,\r\n ImageBase,\r\n SectionAlignment,\r\n FileAlignment,\r\n MajorOperatingSystemVersion,\r\n MinorOperatingSystemVersion,\r\n MajorImageVersion,\r\n MinorImageVersion,\r\n MajorSubsystemVersion,\r\n MinorSubsystemVersion,\r\n Win32VersionValue,\r\n SizeOfImage,\r\n SizeOfHeaders,\r\n CheckSum,\r\n Subsystem,\r\n DllCharacteristics,\r\n SizeOfStackReserve,\r\n SizeOfStackCommit,\r\n SizeOfHeapReserve,\r\n SizeOfHeapCommit,\r\n LoaderFlags,\r\n NumberOfRvaAndSizes,\r\n };\r\n}\r\n\r\nexport function loadImageDataDirectory(d: FileDataProvider, p: number): S.ImageDataDirectory {\r\n let ptr = p;\r\n\r\n const VirtualAddress = loadU4Field(d, ptr);\r\n ptr += VirtualAddress._size;\r\n\r\n const Size = loadU4Field(d, ptr);\r\n ptr += Size._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n VirtualAddress,\r\n Size,\r\n };\r\n}\r\n\r\nexport function loadImageSectionHeader(d: FileDataProvider, p: number): S.ImageSectionHeader {\r\n let ptr = p;\r\n\r\n const Name = loadFixedSizeAsciiStringField(d, ptr, 8);\r\n ptr += Name._size;\r\n\r\n const VirtualSize = loadU4Field(d, ptr);\r\n ptr += VirtualSize._size;\r\n\r\n const VirtualAddress = loadU4Field(d, ptr);\r\n ptr += VirtualAddress._size;\r\n\r\n const SizeOfRawData = loadU4Field(d, ptr);\r\n ptr += SizeOfRawData._size;\r\n\r\n const PointerToRawData = loadU4Field(d, ptr);\r\n ptr += PointerToRawData._size;\r\n\r\n const PointerToRelocations = loadU4Field(d, ptr);\r\n ptr += PointerToRelocations._size;\r\n\r\n const PointerToLinenumbers = loadU4Field(d, ptr);\r\n ptr += PointerToLinenumbers._size;\r\n\r\n const NumberOfRelocations = loadU2Field(d, ptr);\r\n ptr += NumberOfRelocations._size;\r\n\r\n const NumberOfLinenumbers = loadU2Field(d, ptr);\r\n ptr += NumberOfLinenumbers._size;\r\n\r\n const Characteristics = loadU4EnumField(d, ptr);\r\n ptr += Characteristics._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Name,\r\n VirtualSize,\r\n VirtualAddress,\r\n SizeOfRawData,\r\n PointerToRawData,\r\n PointerToRelocations,\r\n PointerToLinenumbers,\r\n NumberOfRelocations,\r\n NumberOfLinenumbers,\r\n Characteristics,\r\n };\r\n}\r\n\r\n//\r\n// Metadata structures.\r\n//\r\n\r\nexport function loadCliHeader(d: FileDataProvider, p: number): S.CliHeader {\r\n let ptr = p;\r\n\r\n const cb = loadU4Field(d, ptr);\r\n ptr += cb._size;\r\n\r\n const MajorRuntimeVersion = loadU2Field(d, ptr);\r\n ptr += MajorRuntimeVersion._size;\r\n\r\n const MinorRuntimeVersion = loadU2Field(d, ptr);\r\n ptr += MinorRuntimeVersion._size;\r\n\r\n const MetaData = loadImageDataDirectory(d, ptr);\r\n ptr += MetaData._size;\r\n\r\n const Flags = loadU4Field(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const EntryPointToken = loadU4Field(d, ptr);\r\n ptr += EntryPointToken._size;\r\n\r\n const Resources = loadImageDataDirectory(d, ptr);\r\n ptr += Resources._size;\r\n\r\n const StrongNameSignature = loadImageDataDirectory(d, ptr);\r\n ptr += StrongNameSignature._size;\r\n\r\n const CodeManagerTable = loadImageDataDirectory(d, ptr);\r\n ptr += CodeManagerTable._size;\r\n\r\n const VTableFixups = loadImageDataDirectory(d, ptr);\r\n ptr += VTableFixups._size;\r\n\r\n const ExportAddressTableJumps = loadImageDataDirectory(d, ptr);\r\n ptr += ExportAddressTableJumps._size;\r\n\r\n const ManagedNativeHeader = loadImageDataDirectory(d, ptr);\r\n ptr += ManagedNativeHeader._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n cb,\r\n MajorRuntimeVersion,\r\n MinorRuntimeVersion,\r\n MetaData,\r\n Flags,\r\n EntryPointToken,\r\n Resources,\r\n StrongNameSignature,\r\n CodeManagerTable,\r\n VTableFixups,\r\n ExportAddressTableJumps,\r\n ManagedNativeHeader,\r\n };\r\n}\r\n\r\nexport function loadMetadataRoot(d: FileDataProvider, p: number): S.MetadataRoot {\r\n let ptr = p;\r\n\r\n const Signature = loadU4Field(d, ptr);\r\n ptr += Signature._size;\r\n\r\n const MajorVersion = loadU2Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU2Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const Reserved = loadU4Field(d, ptr);\r\n ptr += Reserved._size;\r\n\r\n const VersionLength = loadU4Field(d, ptr);\r\n ptr += VersionLength._size;\r\n\r\n const VersionString = loadNullTerminatedStringField(d, ptr);\r\n ptr += VersionString._size;\r\n\r\n const paddingSize = U.calculatePadding(VersionString._size);\r\n const VersionPadding = loadFixedSizeByteArrayField(d, ptr, paddingSize);\r\n ptr += VersionPadding._size;\r\n\r\n const Flags = loadU2Field(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Streams = loadU2Field(d, ptr);\r\n ptr += Streams._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Signature,\r\n MajorVersion,\r\n MinorVersion,\r\n Reserved,\r\n VersionLength,\r\n VersionString,\r\n VersionPadding,\r\n Flags,\r\n Streams,\r\n };\r\n}\r\n\r\nexport function loadMetadataStreamHeader(d: FileDataProvider, p: number): S.MetadataStreamHeader {\r\n let ptr = p;\r\n\r\n const Offset = loadU4Field(d, ptr);\r\n ptr += Offset._size;\r\n\r\n const Size = loadU4Field(d, ptr);\r\n ptr += Size._size;\r\n\r\n const Name = loadNullTerminatedStringField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const paddingSize = U.calculatePadding(Name._size);\r\n const Padding = loadFixedSizeByteArrayField(d, ptr, paddingSize);\r\n ptr += Padding._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Offset,\r\n Size,\r\n Name,\r\n Padding,\r\n };\r\n}","import * as S from \"./structures\";\r\nimport * as L from \"./loader\";\r\nimport * as F from \"./image-flags\";\r\nimport * as E from \"./error\";\r\n\r\nexport class PEImage implements L.FileDataProvider {\r\n public static load(buf: ArrayBuffer): PEImage {\r\n return new PEImage(buf);\r\n }\r\n\r\n //\r\n // FileDataProvider functions.\r\n //\r\n\r\n public getU1(p: number): number {\r\n this.check(p, 1);\r\n return this.data.getUint8(p);\r\n }\r\n\r\n public getU2(p: number): number {\r\n this.check(p, 2);\r\n return this.data.getUint16(p, true);\r\n }\r\n\r\n public getU4(p: number): number {\r\n this.check(p, 3);\r\n return this.data.getUint32(p, true);\r\n }\r\n\r\n public getData(p: number, sz: number): Uint8Array {\r\n this.check(p, sz);\r\n return new Uint8Array(this.data.buffer.slice(p, p + sz));\r\n }\r\n\r\n //\r\n // Image attributes.\r\n //\r\n\r\n public is32Bit(): boolean | undefined {\r\n const optHdr = this.getOptionalHeader();\r\n if (optHdr == null) {\r\n return undefined;\r\n }\r\n\r\n switch (optHdr.Magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC: return true;\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC: return false;\r\n default: return undefined;\r\n }\r\n }\r\n\r\n public isManaged(): boolean {\r\n const dd = this.getDataDirectories();\r\n return dd != null && this.isDataDirectoryValid(\r\n dd.items[F.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR]\r\n );\r\n }\r\n\r\n public hasMetadata(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.MetaData);\r\n }\r\n\r\n public hasManagedResources(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.Resources);\r\n }\r\n\r\n public hasStrongNameSignature(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.StrongNameSignature);\r\n }\r\n\r\n //\r\n // Image headers.\r\n //\r\n\r\n public getDosHeader(): S.ImageDosHeader | undefined {\r\n return this.dosHeader;\r\n }\r\n\r\n public getPESignature(): S.U4Field | undefined {\r\n return this.peSignature;\r\n }\r\n\r\n public getFileHeader(): S.ImageFileHeader | undefined {\r\n return this.fileHeader;\r\n }\r\n\r\n public getOptionalHeader(): S.ImageOptionalHeader32 | S.ImageOptionalHeader64 | undefined {\r\n return this.optionalHeader;\r\n }\r\n\r\n public getDataDirectories(): S.StructArray | undefined {\r\n return this.dataDirectories;\r\n }\r\n\r\n public getSectionHeaders(): S.StructArray | undefined {\r\n return this.sectionHeaders;\r\n }\r\n\r\n //\r\n // Metadata structures.\r\n //\r\n\r\n public getCliHeader(): S.CliHeader | undefined {\r\n if (this.cliHeader != null) return this.cliHeader;\r\n if (!this.isManaged()) return undefined;\r\n\r\n const offset = this.rvaToOffset(this.dataDirectories!\r\n .items[F.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR]\r\n .VirtualAddress.value);\r\n\r\n this.cliHeader = L.loadCliHeader(this, offset);\r\n return this.cliHeader;\r\n }\r\n\r\n public getMetadataRoot(): S.MetadataRoot | undefined {\r\n if (this.metadataRoot != null) return this.metadataRoot;\r\n\r\n const cliHeader = this.getCliHeader();\r\n if (!cliHeader) return undefined;\r\n\r\n const offset = this.rvaToOffset(cliHeader.MetaData.VirtualAddress.value);\r\n if (!offset) return undefined;\r\n\r\n this.metadataRoot = L.loadMetadataRoot(this, offset);\r\n return this.metadataRoot;\r\n }\r\n\r\n public getMetadataStreamHeaders(): S.StructArray | undefined {\r\n if (this.metadataStreamHeaders != null) return this.metadataStreamHeaders;\r\n\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot || !mdRoot.Streams.value) return undefined;\r\n\r\n this.metadataStreamHeaders = L.loadStructArrayByCount(\r\n this,\r\n mdRoot._offset + mdRoot._size,\r\n L.loadMetadataStreamHeader,\r\n mdRoot.Streams.value\r\n );\r\n return this.metadataStreamHeaders;\r\n }\r\n\r\n //\r\n // Utilities.\r\n //\r\n\r\n public rvaToOffset(rva: number): number {\r\n const sh = this.getSectionHeaderByRva(rva);\r\n if (!sh) return 0;\r\n\r\n return rva - sh.VirtualAddress.value + sh.PointerToRawData.value;\r\n }\r\n\r\n public offsetToRva(offset: number): number {\r\n const sh = this.getSectionHeaderByOffset(offset);\r\n if (!sh) return 0;\r\n\r\n return offset - sh.PointerToRawData.value + sh.VirtualAddress.value;\r\n }\r\n\r\n //\r\n // Private implementations.\r\n //\r\n\r\n private check(p: number, sz: number): void {\r\n if (p < 0 || p >= this.data.byteLength\r\n || sz < 0 || p + sz > this.data.byteLength) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DATA_POSITION, p, sz);\r\n }\r\n }\r\n\r\n private constructor(buf: ArrayBuffer) {\r\n this.data = new DataView(buf);\r\n this.loadHeaders();\r\n }\r\n\r\n private loadHeaders(): void {\r\n let ptr = 0;\r\n this.dosHeader = L.loadImageDosHeader(this, ptr);\r\n\r\n if (this.dosHeader.e_magic.value != F.IMAGE_DOS_SIGNATURE) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DOS_SIGNATURE, ptr, 2);\r\n }\r\n\r\n ptr = this.dosHeader.e_lfanew.value;\r\n this.peSignature = L.loadU4Field(this, ptr);\r\n\r\n if (this.peSignature.value != F.IMAGE_NT_SIGNATURE) {\r\n throw new E.PEError(E.PEErrorType.INVALID_PE_SIGNATURE, ptr, 4);\r\n }\r\n\r\n ptr += this.peSignature._size;\r\n this.fileHeader = L.loadImageFileHeader(this, ptr);\r\n\r\n ptr += this.fileHeader._size;\r\n const magic = L.loadU2Field(this, ptr);\r\n switch (magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC:\r\n this.optionalHeader = L.loadImageOptionalHeader32(this, ptr);\r\n break;\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC:\r\n this.optionalHeader = L.loadImageOptionalHeader64(this, ptr);\r\n break;\r\n default:\r\n throw new E.PEError(E.PEErrorType.INVALID_OPTIONAL_HEADER_MAGIC, ptr, 2);\r\n }\r\n\r\n if (this.optionalHeader.NumberOfRvaAndSizes.value != F.IMAGE_NUMBEROF_DIRECTORY_ENTRIES) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DATA_DIRECTORY_COUNT,\r\n this.optionalHeader.NumberOfRvaAndSizes._offset,\r\n this.optionalHeader.NumberOfRvaAndSizes._size);\r\n }\r\n\r\n ptr += this.optionalHeader._size;\r\n this.dataDirectories = L.loadStructArrayByCount(this, ptr,\r\n L.loadImageDataDirectory,\r\n this.optionalHeader.NumberOfRvaAndSizes.value);\r\n\r\n ptr += this.dataDirectories._size;\r\n this.sectionHeaders = L.loadStructArrayByCount(this, ptr,\r\n L.loadImageSectionHeader,\r\n this.fileHeader.NumberOfSections.value);\r\n }\r\n\r\n private getSectionHeaderByOffset(offset: number): S.ImageSectionHeader | undefined {\r\n return this.sectionHeaders && this.sectionHeaders.items.filter(h => {\r\n const p = h.PointerToRawData.value;\r\n const sz = h.SizeOfRawData.value;\r\n return offset >= p && offset < p + sz;\r\n }).shift();\r\n }\r\n\r\n private getSectionHeaderByRva(rva: number): S.ImageSectionHeader | undefined {\r\n return this.sectionHeaders && this.sectionHeaders.items.filter(h => {\r\n const p = h.VirtualAddress.value;\r\n const sz = h.VirtualSize.value;\r\n return rva >= p && rva < p + sz;\r\n }).shift();\r\n }\r\n\r\n private isDataDirectoryValid(dd?: S.ImageDataDirectory): boolean {\r\n return (dd && dd.VirtualAddress.value > 0 && dd.Size.value > 0) || false;\r\n }\r\n\r\n private readonly data: DataView;\r\n\r\n private dosHeader?: S.ImageDosHeader;\r\n private peSignature?: S.U4Field;\r\n private fileHeader?: S.ImageFileHeader;\r\n private optionalHeader?: S.ImageOptionalHeader32 | S.ImageOptionalHeader64;\r\n private dataDirectories?: S.StructArray;\r\n private sectionHeaders?: S.StructArray;\r\n\r\n private cliHeader?: S.CliHeader;\r\n private metadataRoot?: S.MetadataRoot;\r\n private metadataStreamHeaders?: S.StructArray;\r\n}\r\n","export function createResNavDataMessage(navList: W.NavData[]): W.ResNavDataMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_NAV_DATA,\r\n navList\r\n };\r\n}\r\n\r\nexport function createResPageDataMessage(pageData: W.PageData): W.ResPageDataMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PAGE_DATA,\r\n pageData\r\n };\r\n}\r\n\r\nexport function createResPEPropsMessage(is32Bit?: boolean, isManaged?: boolean): W.ResPEPropsMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PE_PROPS,\r\n is32Bit,\r\n isManaged\r\n };\r\n}\r\n\r\nexport function createResPEErrorMessage(error: string): W.ResPEErrorMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PE_ERROR,\r\n error\r\n };\r\n}\r\n","import * as M from \"./message\";\r\nimport { PEImage } from \"./pe/image\";\r\nimport { generatePageData } from \"./page-data/generator\";\r\nimport { generateNavList } from \"./page-data/nav-data\";\r\n\r\nlet pe: PEImage | null = null;\r\n\r\nonmessage = (ev) => {\r\n const msg = ev.data as W.WorkerMessage;\r\n switch (msg.type) {\r\n case W.WorkerMessageType.REQ_OPEN_FILE:\r\n handleReqOpenFile(msg as W.ReqOpenFileMessage);\r\n break;\r\n\r\n case W.WorkerMessageType.REQ_OPEN_NAV:\r\n handleReqOpenNav(msg as W.ReqOpenNavMessage);\r\n break;\r\n }\r\n};\r\n\r\nfunction handleReqOpenFile(msg: W.ReqOpenFileMessage): void {\r\n let reader = new FileReader();\r\n\r\n reader.onload = ev => {\r\n try {\r\n const buf = (ev.target).result;\r\n pe = PEImage.load(buf);\r\n\r\n // Response with page data.\r\n const pageData = generatePageData(pe, W.PageID.HEADERS);\r\n const pageDataMsg = M.createResPageDataMessage(pageData);\r\n postMessage(pageDataMsg);\r\n\r\n // Response with PE properties.\r\n const is32Bit = pe.is32Bit();\r\n const isManaged = pe.isManaged();\r\n const pePropsMsg = M.createResPEPropsMessage(is32Bit, isManaged);\r\n postMessage(pePropsMsg);\r\n\r\n // Response with navigation data.\r\n const navList = generateNavList(pe);\r\n const navMsg = M.createResNavDataMessage(navList);\r\n postMessage(navMsg);\r\n } catch (ex) {\r\n const msg = M.createResPEErrorMessage(ex.message\r\n || `Unknown error: ${JSON.stringify(ex)}`);\r\n postMessage(msg);\r\n }\r\n };\r\n\r\n reader.onerror = ev => {\r\n pe = null;\r\n const msg = M.createResPEErrorMessage(\"Can't open file.\");\r\n postMessage(msg);\r\n };\r\n\r\n reader.readAsArrayBuffer(msg.file);\r\n}\r\n\r\nfunction handleReqOpenNav(msg: W.ReqOpenNavMessage): void {\r\n if (pe != null) {\r\n const pageData = generatePageData(pe, msg.target.pageID);\r\n pageData.nav.elemID = msg.target.elemID;\r\n const res = M.createResPageDataMessage(pageData);\r\n postMessage(res);\r\n }\r\n}"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/worker/pe/image-flags.ts","webpack:///./src/worker/page-data/formatter.ts","webpack:///./src/worker/pe/utils.ts","webpack:///./src/worker/page-data/nav-data.ts","webpack:///./src/worker/page-data/mds-list.ts","webpack:///./src/worker/page-data/mds-table.ts","webpack:///./src/worker/page-data/metadata-headers.ts","webpack:///./src/worker/page-data/headers.ts","webpack:///./src/worker/page-data/generator.ts","webpack:///./src/worker/pe/error.ts","webpack:///./src/worker/pe/loader.ts","webpack:///./src/worker/pe/image.ts","webpack:///./src/worker/message.ts","webpack:///./src/worker/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","MetadataTableIndex","IMAGE_DOS_SIGNATURE","IMAGE_NT_SIGNATURE","IMAGE_NT_OPTIONAL_HDR32_MAGIC","IMAGE_NT_OPTIONAL_HDR64_MAGIC","ImageFile","ImageFileMachine","ImageSubsystem","ImageDllCharacteristics","ImageDirectoryEntry","IMAGE_NUMBEROF_DIRECTORY_ENTRIES","ImageSection","ComImageFlags","MetadataSignature","NumberOfMdTables","MetadataCodedTokenIndex","ctc","tagSize","tables","TypeDef","TypeRef","TypeSpec","Field","Param","Property","MethodDef","InterfaceImpl","MemberRef","Module","DeclSecurity","Event","StandAloneSig","ModuleRef","Assembly","AssemblyRef","File","ExportedType","ManifestResource","GenericParam","GenericParamConstraint","MethodSpec","String","AssemblyHashAlgorithm","CorAssemblyFlags","CorEventAttr","CorFieldAttr","CorFileFlags","CorGenericParamAttr","CorPinvokeMap","CorManifestResourceFlags","CorMethodAttr","CorMethodImpl","CorMethodSemanticsAttr","CorParamAttr","CorPropertyAttr","CorTypeAttr","CorDeclSecurity","CorElementType","formatU1RawHex","padZeroLeft","toString","toUpperCase","formatU2RawHex","formatU4RawHex","formatU1Hex","formatU2Hex","formatU4Hex","formatHexDec","toLocaleString","formatDec","v","formatBytes","bytes","lineWidth","lines","start","length","line","Array","from","subarray","map","b","join","push","str","len","repeat","formatUIntField","f","sz","showDec","hex","offset","_offset","size","_size","rawData","data","formatStructTitle","title","formatU1Field","formatU2Field","formatU4Field","formatU8Field","high","low","formatCompressedUIntField","formatBytesField","formatStringField","formatGuidField","decompressUint","buffer","byteLength","RangeError","calculatePadding","dataSize","align","count1","mask","isSetLong","bit","decompressInt","u","fb","getCompressedIntSize","firstByte","F","generateNavList","pe","pageID","navList","target","children","elemID","navMD","isManaged","hasMetadata","hasStrongNameSignature","getMetadataStreamHeader","pageNum","getMetadataTableHeader","ti","tid","isMetadataTableValid","getMetadataTableRows","subID","generateMDTablesNavData","generateMDHeadersNavData","U","FM","getBlobIndexes","base","indexes","dtsz","getU1","getData","putIndexToPages","pageSize","pages","pageItems","pStart","pEnd","slice","generateMdsStringsPageData","cache","cfg","pgNum","mdsStrings","mdRoot","getMetadataRoot","sh","Offset","Size","mdsOffsetListPageSize","checkAndBuildCacheForMdsStrings","items","titleOf","nav","groups","index","getMdsStringsItem","paging","currentPageNumber","pageNavList","generateMdsUSPageData","mdsUS","checkAndBuildCacheForMdsUS","item","getMdsUSItem","Value","Suffix","generateMdsBlobPageData","mdsBlob","checkAndBuildCacheForMdsBlob","getMdsBlobItem","generateMdsGuidPageData","getMdsGuidItems","generateMdtModuleItems","Generation","Name","Mvid","EncId","EncBaseId","generateMdtTypeRefItems","ResolutionScope","Namespace","generateMdtTypeDefItems","Flags","Extends","FieldList","MethodList","generateMdtFieldPtrItems","generateMdtFieldItems","Signature","generateMdtMethodPtrItems","Method","generateMdtMethodDefItems","RVA","ImplFlags","ParamList","generateMdtParamPtrItems","generateMdtParamItems","Sequence","generateMdtInterfaceImplItems","Class","Interface","generateMdtMemberRefItems","generateMdtConstantItems","Type","PaddingZero","Parent","generateMdtCustomAttributeItems","generateMdtFieldMarshalItems","NativeType","generateMdtDeclSecurityItems","Action","PermissionSet","generateMdtClassLayoutItems","PackingSize","ClassSize","generateMdtFieldLayoutItems","OffSet","generateMdtStandAloneSigItems","generateMdtEventMapItems","EventList","generateMdtEventPtrItems","generateMdtEventItems","EventFlags","EventType","generateMdtPropertyMapItems","PropertyList","generateMdtPropertyPtrItems","generateMdtPropertyItems","PropFlags","generateMdtMethodSemanticsItems","Semantic","Association","generateMdtMethodImplItems","MethodBody","MethodDeclaration","generateMdtModuleRefItems","generateMdtTypeSpecItems","generateMdtImplMapItems","MappingFlags","MemberForwarded","ImportName","ImportScope","generateMdtFieldRVAItems","generateMdtENCLogItems","Token","FuncCode","generateMdtENCMapItems","generateMdtAssemblyItems","HashAlgId","MajorVersion","MinorVersion","BuildNumber","RevisionNumber","PublicKey","Locale","generateMdtAssemblyProcessorItems","Processor","generateMdtAssemblyOSItems","OSPlatformID","OSMajorVersion","OSMinorVersion","generateMdtAssemblyRefItems","PublicKeyOrToken","HashValue","generateMdtAssemblyRefProcessorItems","generateMdtAssemblyRefOSItems","generateMdtFileItems","generateMdtExportedTypeItems","TypeDefId","TypeName","TypeNamespace","Implementation","generateMdtManifestResourceItems","generateMdtNestedClassItems","NestedClass","EnclosingClass","generateMdtGenericParamItems","Number","Owner","generateMdtMethodSpecItems","Instantiation","generateMdtGenericParamConstraintItems","Constraint","getRidOnPage","psz","mdtPageSize","rows","end","generateMdsTablePageData","tableHeader","h","Reserved","HeapSizes","Reserved2","Valid","Sorted","Rows","generateMDTableHeader","tableInfo","id","valid","sorted","isMetadataTableSorted","generateMDTableList","generateMdtPageData","loader","builder","_a","getMdtModuleItem","getMdtTypeRefItem","getMdtTypeDefItem","FieldPtr","getMdtFieldPtrItem","getMdtFieldItem","MethodPtr","getMdtMethodPtrItem","getMdtMethodDefItem","ParamPtr","getMdtParamPtrItem","getMdtParamItem","getMdtInterfaceImplItem","getMdtMemberRefItem","Constant","getMdtConstantItem","CustomAttribute","getMdtCustomAttributeItem","FieldMarshal","getMdtFieldMarshalItem","getMdtDeclSecurityItem","ClassLayout","getMdtClassLayoutItem","FieldLayout","getMdtFieldLayoutItem","getMdtStandAloneSigItem","EventMap","getMdtEventMapItem","EventPtr","getMdtEventPtrItem","getMdtEventItem","PropertyMap","getMdtPropertyMapItem","PropertyPtr","getMdtPropertyPtrItem","getMdtPropertyItem","MethodSemantics","getMdtMethodSemanticsItem","MethodImpl","getMdtMethodImplItem","getMdtModuleRefItem","getMdtTypeSpecItem","ImplMap","getMdtImplMapItem","FieldRVA","getMdtFieldRVAItem","ENCLog","getMdtENCLogItem","ENCMap","getMdtENCMapItem","getMdtAssemblyItem","AssemblyProcessor","getMdtAssemblyProcessorItem","AssemblyOS","getMdtAssemblyOSItem","getMdtAssemblyRefItem","AssemblyRefProcessor","getMdtAssemblyRefProcessorItem","AssemblyRefOS","getMdtAssemblyRefOSItem","getMdtFileItem","getMdtExportedTypeItem","getMdtManifestResourceItem","getMdtNestedClassItem","getMdtGenericParamItem","getMdtMethodSpecItem","getMdtGenericParamConstraintItem","rid","generateSignleMdtTableItems","generateTalbeItems","Math","floor","tblName","generateMdtPaging","generateMetadataHeadersPageData","cliHeader","getCliHeader","cb","MajorRuntimeVersion","MinorRuntimeVersion","MetaData","VirtualAddress","EntryPointToken","Resources","StrongNameSignature","CodeManagerTable","VTableFixups","ExportAddressTableJumps","ManagedNativeHeader","generateCliHeader","metadataRoot","VersionLength","VersionString","VersionPadding","Streams","generateMetadataRoot","streamHeaders","getMetadataStreamHeaders","Padding","generateMetadataStreamHeader","snSignature","getStrongNameSignature","generateSNSignature","generateHeadersPageData","dosHeader","getDosHeader","e_magic","e_cblp","e_cp","e_crlc","e_cparhdr","e_minalloc","e_maxalloc","e_ss","e_sp","e_csum","e_ip","e_cs","e_lfarlc","e_ovno","e_res","e_oemid","e_oeminfo","e_res2","e_lfanew","generateDosHeader","peSignature","getPESignature","generatePESignature","fileHeader","getFileHeader","Machine","NumberOfSections","TimeDateStamp","PointerToSymbolTable","NumberOfSymbols","SizeOfOptionalHeader","Characteristics","generateFileHeader","optionalHeader","getOptionalHeader","Magic","MajorLinkerVersion","MinorLinkerVersion","SizeOfCode","SizeOfInitializedData","SizeOfUninitializedData","AddressOfEntryPoint","BaseOfCode","BaseOfData","ImageBase","SectionAlignment","FileAlignment","MajorOperatingSystemVersion","MinorOperatingSystemVersion","MajorImageVersion","MinorImageVersion","MajorSubsystemVersion","MinorSubsystemVersion","Win32VersionValue","SizeOfImage","SizeOfHeaders","CheckSum","Subsystem","DllCharacteristics","SizeOfStackReserve","SizeOfStackCommit","SizeOfHeapReserve","SizeOfHeapCommit","LoaderFlags","NumberOfRvaAndSizes","fillOptionalHeader32Fields","fillOptionalHeader64Fields","generateOptionalHeader","dataDirectories","getDataDirectories","generateDataDirectories","sectionHeaders","getSectionHeaders","VirtualSize","SizeOfRawData","PointerToRawData","PointerToRelocations","PointerToLinenumbers","NumberOfRelocations","NumberOfLinenumbers","generateSectionHeaders","headers_1","metadata_headers_1","mds_table_1","mds_list_1","generatePageData","clearGeneratorCache","PEError","_super","type","_this","this","__extends","Error","loadU1Field","loadU2Field","getU2","loadU4Field","getU4","loadU8Field","loadCompressedUIntField","Uint8Array","loadU1EnumField","loadU2EnumField","loadU4EnumField","loadFixedSizeByteArrayField","loadFixedSizeAsciiStringField","fromCharCode","apply","filter","loadNullTerminatedStringField","ptr","decodeURIComponent","loadFixedSizeUnicodeStringField","arr","Uint16Array","fromCodePoint","loadStructArrayByCount","count","loadImageDataDirectory","loadMdsStringsField","getHeapSize","loadMdsGuidField","loadMdsBlobField","loadMdtRidField","getTableIDSize","loadMdCodedTokenField","baseField","getCodedTokenSize","codedTokenInfo","decodeCodedToken","__assign","token","cti","loadImageDosHeader","loadImageFileHeader","loadImageOptionalHeader32","loadImageOptionalHeader64","loadImageSectionHeader","loadCliHeader","loadMetadataRoot","loadMetadataStreamHeader","loadMetadataTableHeader","loadMetadataUSItem","suffixSize","loadMetadataBlobItem","loadMdTokenField","loadMdtModule","loadMdtTypeRef","loadMdtTypeDef","TypeDefOrRef","loadMdtFieldPtr","loadMdtField","loadMdtMethodPtr","loadMdtMethodDef","loadMdtParamPtr","loadMdtParam","loadMdtInterfaceImpl","loadMdtMemberRef","MemberRefParent","loadMdtConstant","HasConstant","loadMdtCustomAttribute","HasCustomAttribute","CustomAttributeType","loadMdtFieldMarshal","HasFieldMarshall","loadMdtDeclSecurity","HasDeclSecurity","loadMdtClassLayout","loadMdtFieldLayout","loadMdtStandAloneSig","loadMdtEventMap","loadMdtEventPtr","loadMdtEvent","loadMdtPropertyMap","loadMdtPropertyPtr","loadMdtProperty","loadMdtMethodSemantics","HasSemantics","loadMdtMethodImpl","MethodDefOrRef","loadMdtModuleRef","loadMdtTypeSpec","loadMdtImplMap","loadMdtFieldRVA","loadMdtENCLog","loadMdtENCMap","loadMdtAssembly","loadMdtAssemblyProcessor","loadMdtAssemblyOS","loadMdtAssemblyRef","loadMdtAssemblyRefProcessor","loadMdtAssemblyRefOS","loadMdtFile","loadMdtExportedType","loadMdtManifestResource","loadMdtNestedClass","loadMdtGenericParam","TypeOrMethodDef","loadMdtMethodSpec","loadMdtGenericParamConstraint","L","E","PEImage","buf","metadataSizingCache","DataView","loadHeaders","load","check","getUint8","getUint16","getUint32","is32Bit","optHdr","dd","isDataDirectoryValid","IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR","hasManagedResources","info","metadataTableInfo","rvaToOffset","metadataStreamHeaders","headers","shift","strongNameSignature","metadataTableHeader","fillMetadataTableInfo","fillMetadataTableInfoExtra","checkMdt","baseOffset","rowSize","heap","idSize","codedToken","maxRows","_i","rva","getSectionHeaderByRva","offsetToRva","getSectionHeaderByOffset","nValid","ctid","ctsz","stringsSize","guidSize","blobSize","tbli","createResNavDataMessage","createResPageDataMessage","pageData","createResPEPropsMessage","createResPEErrorMessage","error","M","image_1","generator_1","nav_data_1","onmessage","ev","msg","reader","FileReader","onload","result","pageDataMsg","postMessage","pePropsMsg","navMsg","ex","msg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AYN,IAGhBC,EAAOc,kBAAkBf,EAAIgB,MA9CrBC,CAAkBjB,GAClB,MAEJ,oBA8CR,SAA0BA,GACtB,GAAU,MAAN5jB,EAAY,CACN,IAAA4M,EAAAgX,EAAAzjB,OAAEF,EAAA2M,EAAA3M,OAAQgB,EAAA2L,EAAA3L,MAAON,EAAAiM,EAAAjM,QAASN,EAAAuM,EAAAvM,OAC1B6iB,EAAWM,EAAA5K,iBAAiB5Y,EAAIC,EAAQgB,EAAON,GACrDuiB,EAASjgB,IAAI5C,OAASA,EACtB,IAAMykB,EAAMxB,EAAEL,yBAAyBC,GACvCgB,YAAYY,IAnDRC,CAAiBnB","file":"worker.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 13);\n","export const IMAGE_DOS_SIGNATURE = 0x5A4D; // MZ\r\n\r\nexport const IMAGE_NT_SIGNATURE = 0x00004550; // PE00\r\n\r\nexport const IMAGE_NT_OPTIONAL_HDR32_MAGIC = 0x10b;\r\nexport const IMAGE_NT_OPTIONAL_HDR64_MAGIC = 0x20b;\r\n\r\nexport enum ImageFile {\r\n IMAGE_FILE_RELOCS_STRIPPED = 0x0001,\r\n IMAGE_FILE_EXECUTABLE_IMAGE = 0x0002,\r\n IMAGE_FILE_LINE_NUMS_STRIPPED = 0x0004,\r\n IMAGE_FILE_LOCAL_SYMS_STRIPPED = 0x0008,\r\n IMAGE_FILE_AGGRESIVE_WS_TRIM = 0x0010,\r\n IMAGE_FILE_LARGE_ADDRESS_AWARE = 0x0020,\r\n IMAGE_FILE_BYTES_REVERSED_LO = 0x0080,\r\n IMAGE_FILE_32BIT_MACHINE = 0x0100,\r\n IMAGE_FILE_DEBUG_STRIPPED = 0x0200,\r\n IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = 0x0400,\r\n IMAGE_FILE_NET_RUN_FROM_SWAP = 0x0800,\r\n IMAGE_FILE_SYSTEM = 0x1000,\r\n IMAGE_FILE_DLL = 0x2000,\r\n IMAGE_FILE_UP_SYSTEM_ONLY = 0x4000,\r\n IMAGE_FILE_BYTES_REVERSED_HI = 0x8000,\r\n}\r\n\r\nexport enum ImageFileMachine {\r\n IMAGE_FILE_MACHINE_UNKNOWN = 0,\r\n IMAGE_FILE_MACHINE_TARGET_HOST = 0x0001,\r\n IMAGE_FILE_MACHINE_I386 = 0x014c,\r\n IMAGE_FILE_MACHINE_R3000 = 0x0162,\r\n IMAGE_FILE_MACHINE_R4000 = 0x0166,\r\n IMAGE_FILE_MACHINE_R10000 = 0x0168,\r\n IMAGE_FILE_MACHINE_WCEMIPSV2 = 0x0169,\r\n IMAGE_FILE_MACHINE_ALPHA = 0x0184,\r\n IMAGE_FILE_MACHINE_SH3 = 0x01a2,\r\n IMAGE_FILE_MACHINE_SH3DSP = 0x01a3,\r\n IMAGE_FILE_MACHINE_SH3E = 0x01a4,\r\n IMAGE_FILE_MACHINE_SH4 = 0x01a6,\r\n IMAGE_FILE_MACHINE_SH5 = 0x01a8,\r\n IMAGE_FILE_MACHINE_ARM = 0x01c0,\r\n IMAGE_FILE_MACHINE_THUMB = 0x01c2,\r\n IMAGE_FILE_MACHINE_ARMNT = 0x01c4,\r\n IMAGE_FILE_MACHINE_AM33 = 0x01d3,\r\n IMAGE_FILE_MACHINE_POWERPC = 0x01F0,\r\n IMAGE_FILE_MACHINE_POWERPCFP = 0x01f1,\r\n IMAGE_FILE_MACHINE_IA64 = 0x0200,\r\n IMAGE_FILE_MACHINE_MIPS16 = 0x0266,\r\n IMAGE_FILE_MACHINE_ALPHA64 = 0x0284,\r\n IMAGE_FILE_MACHINE_MIPSFPU = 0x0366,\r\n IMAGE_FILE_MACHINE_MIPSFPU16 = 0x0466,\r\n IMAGE_FILE_MACHINE_AXP64 = IMAGE_FILE_MACHINE_ALPHA64,\r\n IMAGE_FILE_MACHINE_TRICORE = 0x0520,\r\n IMAGE_FILE_MACHINE_CEF = 0x0CEF,\r\n IMAGE_FILE_MACHINE_EBC = 0x0EBC,\r\n IMAGE_FILE_MACHINE_AMD64 = 0x8664,\r\n IMAGE_FILE_MACHINE_M32R = 0x9041,\r\n IMAGE_FILE_MACHINE_ARM64 = 0xAA64,\r\n IMAGE_FILE_MACHINE_CEE = 0xC0EE,\r\n}\r\n\r\nexport enum ImageSubsystem {\r\n IMAGE_SUBSYSTEM_UNKNOWN = 0,\r\n IMAGE_SUBSYSTEM_NATIVE = 1,\r\n IMAGE_SUBSYSTEM_WINDOWS_GUI = 2,\r\n IMAGE_SUBSYSTEM_WINDOWS_CUI = 3,\r\n IMAGE_SUBSYSTEM_OS2_CUI = 5,\r\n IMAGE_SUBSYSTEM_POSIX_CUI = 7,\r\n IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8,\r\n IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9,\r\n IMAGE_SUBSYSTEM_EFI_APPLICATION = 10,\r\n IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11,\r\n IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12,\r\n IMAGE_SUBSYSTEM_EFI_ROM = 13,\r\n IMAGE_SUBSYSTEM_XBOX = 14,\r\n IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16,\r\n IMAGE_SUBSYSTEM_XBOX_CODE_CATALOG = 17,\r\n}\r\n\r\nexport enum ImageDllCharacteristics {\r\n IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020,\r\n IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE = 0x0040,\r\n IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY = 0x0080,\r\n IMAGE_DLLCHARACTERISTICS_NX_COMPAT = 0x0100,\r\n IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = 0x0200,\r\n IMAGE_DLLCHARACTERISTICS_NO_SEH = 0x0400,\r\n IMAGE_DLLCHARACTERISTICS_NO_BIND = 0x0800,\r\n IMAGE_DLLCHARACTERISTICS_APPCONTAINER = 0x1000,\r\n IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = 0x2000,\r\n IMAGE_DLLCHARACTERISTICS_GUARD_CF = 0x4000,\r\n IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = 0x8000,\r\n}\r\n\r\nexport enum ImageDirectoryEntry {\r\n IMAGE_DIRECTORY_ENTRY_EXPORT = 0,\r\n IMAGE_DIRECTORY_ENTRY_IMPORT = 1,\r\n IMAGE_DIRECTORY_ENTRY_RESOURCE = 2,\r\n IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3,\r\n IMAGE_DIRECTORY_ENTRY_SECURITY = 4,\r\n IMAGE_DIRECTORY_ENTRY_BASERELOC = 5,\r\n IMAGE_DIRECTORY_ENTRY_DEBUG = 6,\r\n IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7,\r\n IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8,\r\n IMAGE_DIRECTORY_ENTRY_TLS = 9,\r\n IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10,\r\n IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11,\r\n IMAGE_DIRECTORY_ENTRY_IAT = 12,\r\n IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13,\r\n IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14,\r\n}\r\n\r\nexport const IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16;\r\n\r\nexport enum ImageSection {\r\n IMAGE_SCN_TYPE_NO_PAD = 0x00000008,\r\n\r\n IMAGE_SCN_CNT_CODE = 0x00000020,\r\n IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040,\r\n IMAGE_SCN_CNT_UNINITIALIZED_DATA = 0x00000080,\r\n\r\n IMAGE_SCN_LNK_OTHER = 0x00000100,\r\n IMAGE_SCN_LNK_INFO = 0x00000200,\r\n IMAGE_SCN_LNK_REMOVE = 0x00000800,\r\n IMAGE_SCN_LNK_COMDAT = 0x00001000,\r\n\r\n IMAGE_SCN_NO_DEFER_SPEC_EXC = 0x00004000,\r\n IMAGE_SCN_GPREL = 0x00008000,\r\n\r\n IMAGE_SCN_MEM_PURGEABLE = 0x00020000,\r\n IMAGE_SCN_MEM_16BIT = 0x00020000,\r\n IMAGE_SCN_MEM_LOCKED = 0x00040000,\r\n IMAGE_SCN_MEM_PRELOAD = 0x00080000,\r\n\r\n IMAGE_SCN_ALIGN_1BYTES = 0x00100000,\r\n IMAGE_SCN_ALIGN_2BYTES = 0x00200000,\r\n IMAGE_SCN_ALIGN_4BYTES = 0x00300000,\r\n IMAGE_SCN_ALIGN_8BYTES = 0x00400000,\r\n IMAGE_SCN_ALIGN_16BYTES = 0x00500000,\r\n IMAGE_SCN_ALIGN_32BYTES = 0x00600000,\r\n IMAGE_SCN_ALIGN_64BYTES = 0x00700000,\r\n IMAGE_SCN_ALIGN_128BYTES = 0x00800000,\r\n IMAGE_SCN_ALIGN_256BYTES = 0x00900000,\r\n IMAGE_SCN_ALIGN_512BYTES = 0x00A00000,\r\n IMAGE_SCN_ALIGN_1024BYTES = 0x00B00000,\r\n IMAGE_SCN_ALIGN_2048BYTES = 0x00C00000,\r\n IMAGE_SCN_ALIGN_4096BYTES = 0x00D00000,\r\n IMAGE_SCN_ALIGN_8192BYTES = 0x00E00000,\r\n\r\n IMAGE_SCN_LNK_NRELOC_OVFL = 0x01000000,\r\n IMAGE_SCN_MEM_DISCARDABLE = 0x02000000,\r\n IMAGE_SCN_MEM_NOT_CACHED = 0x04000000,\r\n IMAGE_SCN_MEM_NOT_PAGED = 0x08000000,\r\n IMAGE_SCN_MEM_SHARED = 0x10000000,\r\n IMAGE_SCN_MEM_EXECUTE = 0x20000000,\r\n IMAGE_SCN_MEM_READ = 0x40000000,\r\n IMAGE_SCN_MEM_WRITE = 0x80000000,\r\n\r\n IMAGE_SCN_SCALE_INDEX = 0x00000001,\r\n}\r\n\r\n//\r\n// Metadata structures.\r\n//\r\n\r\nexport enum ComImageFlags {\r\n COMIMAGE_FLAGS_ILONLY = 0x00000001,\r\n COMIMAGE_FLAGS_32BITREQUIRED = 0x00000002,\r\n COMIMAGE_FLAGS_IL_LIBRARY = 0x00000004,\r\n COMIMAGE_FLAGS_STRONGNAMESIGNED = 0x00000008,\r\n COMIMAGE_FLAGS_NATIVE_ENTRYPOINT = 0x00000010,\r\n COMIMAGE_FLAGS_TRACKDEBUGDATA = 0x00010000,\r\n COMIMAGE_FLAGS_32BITPREFERRED = 0x00020000,\r\n}\r\n\r\nexport const MetadataSignature = 0x424A5342;\r\n\r\nexport const enum MetadataStreamName {\r\n Table = \"#~\",\r\n Strings = \"#Strings\",\r\n US = \"#US\",\r\n GUID = \"#GUID\",\r\n Blob = \"#Blob\",\r\n}\r\n\r\nexport const enum MetadataHeapSizeID {\r\n String = 0,\r\n GUID = 1,\r\n Blob = 2,\r\n}\r\n\r\nexport enum MetadataTableIndex {\r\n Module = 0x00,\r\n TypeRef = 0x01,\r\n TypeDef = 0x02,\r\n FieldPtr = 0x03,\r\n Field = 0x04,\r\n MethodPtr = 0x05,\r\n MethodDef = 0x06,\r\n ParamPtr = 0x07,\r\n Param = 0x08,\r\n InterfaceImpl = 0x09,\r\n MemberRef = 0x0A,\r\n Constant = 0x0B,\r\n CustomAttribute = 0x0C,\r\n FieldMarshal = 0x0D,\r\n DeclSecurity = 0x0E,\r\n ClassLayout = 0x0F,\r\n FieldLayout = 0x10,\r\n StandAloneSig = 0x11,\r\n EventMap = 0x12,\r\n EventPtr = 0x13,\r\n Event = 0x14,\r\n PropertyMap = 0x15,\r\n PropertyPtr = 0x16,\r\n Property = 0x17,\r\n MethodSemantics = 0x18,\r\n MethodImpl = 0x19,\r\n ModuleRef = 0x1A,\r\n TypeSpec = 0x1B,\r\n ImplMap = 0x1C,\r\n FieldRVA = 0x1D,\r\n ENCLog = 0x1E,\r\n ENCMap = 0x1F,\r\n Assembly = 0x20,\r\n AssemblyProcessor = 0x21,\r\n AssemblyOS = 0x22,\r\n AssemblyRef = 0x23,\r\n AssemblyRefProcessor = 0x24,\r\n AssemblyRefOS = 0x25,\r\n File = 0x26,\r\n ExportedType = 0x27,\r\n ManifestResource = 0x28,\r\n NestedClass = 0x29,\r\n GenericParam = 0x2A,\r\n MethodSpec = 0x2B,\r\n GenericParamConstraint = 0x2C,\r\n\r\n String = 0x70,\r\n}\r\n\r\nexport const NumberOfMdTables = 45;\r\n\r\nexport enum MetadataCodedTokenIndex {\r\n TypeDefOrRef = 0,\r\n HasConstant = 1,\r\n HasCustomAttribute = 2,\r\n HasFieldMarshall = 3,\r\n HasDeclSecurity = 4,\r\n MemberRefParent = 5,\r\n HasSemantics = 6,\r\n MethodDefOrRef = 7,\r\n MemberForwarded = 8,\r\n Implementation = 9,\r\n CustomAttributeType = 10,\r\n ResolutionScope = 11,\r\n TypeOrMethodDef = 12,\r\n}\r\n\r\nexport interface MetadataCodedTokenInfo {\r\n tagSize: number;\r\n tables: MetadataTableIndex[];\r\n}\r\n\r\nexport const ctc: MetadataCodedTokenInfo[] = [{\r\n tagSize: 2, tables: [ // TypeDefOrRef\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.TypeSpec,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // HasConstant\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.Param,\r\n MetadataTableIndex.Property,\r\n ]\r\n}, {\r\n tagSize: 5, tables: [ // HasCustomAttribute\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.Param,\r\n MetadataTableIndex.InterfaceImpl,\r\n MetadataTableIndex.MemberRef,\r\n MetadataTableIndex.Module,\r\n MetadataTableIndex.DeclSecurity,\r\n MetadataTableIndex.Property,\r\n MetadataTableIndex.Event,\r\n MetadataTableIndex.StandAloneSig,\r\n MetadataTableIndex.ModuleRef,\r\n MetadataTableIndex.TypeSpec,\r\n MetadataTableIndex.Assembly,\r\n MetadataTableIndex.AssemblyRef,\r\n MetadataTableIndex.File,\r\n MetadataTableIndex.ExportedType,\r\n MetadataTableIndex.ManifestResource,\r\n MetadataTableIndex.GenericParam,\r\n MetadataTableIndex.GenericParamConstraint,\r\n MetadataTableIndex.MethodSpec,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // HasFieldMarshall\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.Param,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // HasDeclSecurity\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.Assembly,\r\n ]\r\n}, {\r\n tagSize: 3, tables: [ // MemberRefParent\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.ModuleRef,\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.TypeSpec,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // HasSemantics\r\n MetadataTableIndex.Event,\r\n MetadataTableIndex.Property,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // MethodDefOrRef\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.MemberRef,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // MemberForwarded\r\n MetadataTableIndex.Field,\r\n MetadataTableIndex.MethodDef,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // Implementation\r\n MetadataTableIndex.File,\r\n MetadataTableIndex.AssemblyRef,\r\n MetadataTableIndex.ExportedType,\r\n ]\r\n}, {\r\n tagSize: 3, tables: [ // CustomAttributeType\r\n MetadataTableIndex.TypeRef,\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.MethodDef,\r\n MetadataTableIndex.MemberRef,\r\n MetadataTableIndex.String,\r\n ]\r\n}, {\r\n tagSize: 2, tables: [ // ResolutionScope\r\n MetadataTableIndex.Module,\r\n MetadataTableIndex.ModuleRef,\r\n MetadataTableIndex.AssemblyRef,\r\n MetadataTableIndex.TypeRef,\r\n ]\r\n}, {\r\n tagSize: 1, tables: [ // TypeOrMethodDef\r\n MetadataTableIndex.TypeDef,\r\n MetadataTableIndex.MethodDef,\r\n ]\r\n}];\r\n\r\nexport enum AssemblyHashAlgorithm {\r\n None = 0x0000,\r\n MD5 = 0x8003, // Reserved\r\n SHA1 = 0x8004,\r\n}\r\n\r\nexport enum CorAssemblyFlags {\r\n PublicKey = 0x0001,\r\n\r\n pa__Mask = 0x0070,\r\n pa_ProcessorArchitectureNone = 0x0000,\r\n pa_ProcessorArchitectureMsil = 0x0010,\r\n pa_ProcessorArchitectureX86 = 0x0020,\r\n pa_ProcessorArchitectureIa64 = 0x0030,\r\n pa_ProcessorArchitectureAmd64 = 0x0040,\r\n\r\n ProcessorArchitectureSpecified = 0x0080,\r\n\r\n EnableJitcompileTracking = 0x8000,\r\n DisableJitcompileOptimizer = 0x4000,\r\n\r\n Retargetable = 0x0100,\r\n}\r\n\r\nexport enum CorEventAttr {\r\n SpecialName = 0x0200,\r\n RtSpecialName = 0x0400,\r\n}\r\n\r\nexport enum CorFieldAttr {\r\n fa__Mask = 0x0007,\r\n fa_PrivateScope = 0x0000,\r\n fa_Private = 0x0001,\r\n fa_FamAndAssem = 0x0002,\r\n fa_Assembly = 0x0003,\r\n fa_Family = 0x0004,\r\n fa_FamOrAssem = 0x0005,\r\n fa_Public = 0x0006,\r\n\r\n Static = 0x0010,\r\n InitOnly = 0x0020,\r\n Literal = 0x0040,\r\n NotSerialized = 0x0080,\r\n\r\n SpecialName = 0x0200,\r\n\r\n PinvokeImpl = 0x2000,\r\n\r\n RtSpecialName = 0x0400,\r\n HasFieldMarshal = 0x1000,\r\n HasDefault = 0x8000,\r\n HasFieldRva = 0x0100,\r\n}\r\n\r\nexport enum CorFileFlags {\r\n ContainsMetaData = 0x0000,\r\n ContainsNoMetaData = 0x0001,\r\n}\r\n\r\nexport enum CorGenericParamAttr {\r\n v__Mask = 0x0003,\r\n v_NonVariant = 0x0000,\r\n v_Covariant = 0x0001,\r\n v_Contravariant = 0x0002,\r\n\r\n NoSpecialConstraint = 0x0000,\r\n ReferenceTypeConstraint = 0x0004,\r\n NotNullableValueTypeConstraint = 0x0008,\r\n DefaultConstructorConstraint = 0x0010,\r\n}\r\n\r\nexport enum CorPinvokeMap {\r\n NoMangle = 0x0001,\r\n cs__Mask = 0x0006,\r\n cs_CharSetNotSpec = 0x0000,\r\n cs_CharSetAnsi = 0x0002,\r\n cs_CharSetUnicode = 0x0004,\r\n cs_CharSetAuto = 0x0006,\r\n\r\n bf__Mask = 0x0030,\r\n bf_BestFitUseAssem = 0x0000,\r\n bf_BestFitEnabled = 0x0010,\r\n bf_BestFitDisabled = 0x0020,\r\n\r\n touc__Mask = 0x3000,\r\n touc_ThrowOnUnmappableCharUseAssem = 0x0000,\r\n touc_ThrowOnUnmappableCharEnabled = 0x1000,\r\n touc_ThrowOnUnmappableCharDisabled = 0x2000,\r\n\r\n SupportsLastError = 0x0040,\r\n\r\n cc__Mask = 0x0700,\r\n cc_CallConvWinapi = 0x0100,\r\n cc_CallConvCdecl = 0x0200,\r\n cc_CallConvStdcall = 0x0300,\r\n cc_CallConvThiscall = 0x0400,\r\n cc_CallConvFastcall = 0x0500,\r\n}\r\n\r\nexport enum CorManifestResourceFlags {\r\n v__Mask = 0x0007,\r\n v_Public = 0x0001,\r\n v_Private = 0x0002,\r\n}\r\n\r\nexport enum CorMethodAttr {\r\n ma__Mask = 0x0007,\r\n ma_PrivateScope = 0x0000,\r\n ma_Private = 0x0001,\r\n ma_FamAndAssem = 0x0002,\r\n ma_Assem = 0x0003,\r\n ma_Family = 0x0004,\r\n ma_FamOrAssem = 0x0005,\r\n ma_Public = 0x0006,\r\n\r\n Static = 0x0010,\r\n Final = 0x0020,\r\n Virtual = 0x0040,\r\n HideBySig = 0x0080,\r\n\r\n vl__Mask = 0x0100,\r\n vl_ReuseSlot = 0x0000,\r\n vl_NewSlot = 0x0100,\r\n\r\n CheckAccessOnOverride = 0x0200,\r\n Abstract = 0x0400,\r\n SpecialName = 0x0800,\r\n\r\n PInvokeImpl = 0x2000,\r\n UnmanagedExport = 0x0008,\r\n\r\n RtSpecialName = 0x1000,\r\n HasSecurity = 0x4000,\r\n RequireSecObject = 0x8000,\r\n}\r\n\r\nexport enum CorMethodImpl {\r\n ct__Mask = 0x0003,\r\n ct_IL = 0x0000,\r\n ct_Native = 0x0001,\r\n ct_OptIL = 0x0002,\r\n ct_Runtime = 0x0003,\r\n\r\n m__Mask = 0x0004,\r\n m_Unmanaged = 0x0004,\r\n m_Managed = 0x0000,\r\n\r\n ForwardRef = 0x0010,\r\n PreserveSig = 0x0080,\r\n\r\n InternalCall = 0x1000,\r\n\r\n Synchronized = 0x0020,\r\n NoInlining = 0x0008,\r\n}\r\n\r\nexport enum CorMethodSemanticsAttr {\r\n Setter = 0x0001,\r\n Getter = 0x0002,\r\n Other = 0x0004,\r\n AddOn = 0x0008,\r\n RemoveOn = 0x0010,\r\n Fire = 0x0020,\r\n}\r\n\r\nexport enum CorParamAttr {\r\n In = 0x0001,\r\n Out = 0x0002,\r\n Optional = 0x0010,\r\n\r\n HasDefault = 0x1000,\r\n HasFieldMarshal = 0x2000,\r\n\r\n Unused = 0xcfe0,\r\n}\r\n\r\nexport enum CorPropertyAttr {\r\n SpecialName = 0x0200,\r\n\r\n RtSpecialName = 0x0400,\r\n HasDefault = 0x1000,\r\n\r\n Unused = 0xe9ff,\r\n}\r\n\r\nexport enum CorTypeAttr {\r\n v__Mask = 0x00000007,\r\n v_NotPublic = 0x00000000,\r\n v_Public = 0x00000001,\r\n v_NestedPublic = 0x00000002,\r\n v_NestedPrivate = 0x00000003,\r\n v_NestedFamily = 0x00000004,\r\n v_NestedAssembly = 0x00000005,\r\n v_NestedFamAndAssem = 0x00000006,\r\n v_NestedFamOrAssem = 0x00000007,\r\n\r\n l__Mask = 0x00000018,\r\n l_AutoLayout = 0x00000000,\r\n l_SequentialLayout = 0x00000008,\r\n l_ExplicitLayout = 0x00000010,\r\n\r\n cs__Mask = 0x00000060,\r\n cs_Class = 0x00000000,\r\n cs_Interface = 0x00000020,\r\n\r\n Abstract = 0x00000080,\r\n Sealed = 0x00000100,\r\n SpecialName = 0x00000400,\r\n\r\n Import = 0x00001000,\r\n Serializable = 0x00002000,\r\n WindowsRuntime = 0x00004000,\r\n\r\n sf__Mask = 0x00030000,\r\n sf_AnsiClass = 0x00000000,\r\n sf_UnicodeClass = 0x00010000,\r\n sf_AutoClass = 0x00020000,\r\n sf_CustomFormatClass = 0x00030000,\r\n CustomFormatMask = 0x00C00000,\r\n\r\n BeforeFieldInit = 0x00100000,\r\n Forwarder = 0x00200000,\r\n\r\n RtSpecialName = 0x00000800,\r\n HasSecurity = 0x00040000,\r\n}\r\n\r\nexport enum CorDeclSecurity {\r\n ActionNil = 0x0000,\r\n Request = 0x0001,\r\n Demand = 0x0002,\r\n Assert = 0x0003,\r\n Deny = 0x0004,\r\n PermitOnly = 0x0005,\r\n LinktimeCheck = 0x0006,\r\n InheritanceCheck = 0x0007,\r\n RequestMinimum = 0x0008,\r\n RequestOptional = 0x0009,\r\n RequestRefuse = 0x000a,\r\n PrejitGrant = 0x000b,\r\n PrejitDenied = 0x000c,\r\n NonCasDemand = 0x000d,\r\n NonCasLinkDemand = 0x000e,\r\n NonCasInheritance = 0x000f,\r\n}\r\n\r\nexport enum CorElementType {\r\n End = 0x00,\r\n Void = 0x01,\r\n Boolean = 0x02,\r\n Char = 0x03,\r\n I1 = 0x04,\r\n U1 = 0x05,\r\n I2 = 0x06,\r\n U2 = 0x07,\r\n I4 = 0x08,\r\n U4 = 0x09,\r\n I8 = 0x0A,\r\n U8 = 0x0B,\r\n R4 = 0x0C,\r\n R8 = 0x0D,\r\n String = 0x0E,\r\n\r\n Ptr = 0x0F,\r\n ByRef = 0x10,\r\n\r\n ValueType = 0x11,\r\n Class = 0x12,\r\n Var = 0x13,\r\n Array = 0x14,\r\n GenericInst = 0x15,\r\n TypedByRef = 0x16,\r\n\r\n I = 0x18,\r\n U = 0x19,\r\n FnPtr = 0x1B,\r\n Object = 0x1C,\r\n SzArray = 0x1D,\r\n\r\n MVar = 0x1E,\r\n\r\n CModReqd = 0x1F,\r\n CModOpt = 0x20,\r\n Internal = 0x21,\r\n\r\n Modifier = 0x40,\r\n Sentinel = 0x01 | Modifier,\r\n Pinned = 0x05 | Modifier,\r\n R4HFA = 0x06 | Modifier,\r\n R8HFA = 0x07 | Modifier,\r\n}\r\n","import * as S from \"../pe/structures\";\r\n\r\nexport function formatU1RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 2);\r\n}\r\n\r\nexport function formatU2RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 4);\r\n}\r\n\r\nexport function formatU4RawHex(d: number): string {\r\n return padZeroLeft(d.toString(16).toUpperCase(), 8);\r\n}\r\n\r\nexport function formatU1Hex(d: number): string {\r\n return `${formatU1RawHex(d)}h`;\r\n}\r\n\r\nexport function formatU2Hex(d: number): string {\r\n return `${formatU2RawHex(d)}h`;\r\n}\r\n\r\nexport function formatU4Hex(d: number): string {\r\n return `${formatU4RawHex(d)}h`;\r\n}\r\n\r\nexport function formatHexDec(d: number): string {\r\n return `${d.toString(16).toUpperCase()}h (${d.toLocaleString()})`;\r\n}\r\n\r\nexport function formatDec(v: number): string {\r\n return v.toLocaleString();\r\n}\r\n\r\nexport function formatBytes(bytes: Uint8Array, lineWidth: number = 16): string[] {\r\n let lines: string[] = [];\r\n for (let start = 0; start < bytes.length; start += lineWidth) {\r\n const line = Array.from(bytes.subarray(start, start + lineWidth))\r\n .map(b => formatU1RawHex(b)).join(\"-\");\r\n lines.push(line);\r\n }\r\n return lines;\r\n}\r\n\r\nexport function formatStructTitle(s: S.FileData, title: string): string {\r\n return `${title} [${formatU4Hex(s._offset)} - ${formatU4Hex(s._offset + s._size)} : ${formatHexDec(s._size)}]`;\r\n}\r\n\r\nexport function formatU1Field(name: string, f: S.U1Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 1, showDec);\r\n}\r\n\r\nexport function formatU2Field(name: string, f: S.U2Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 2, showDec);\r\n}\r\n\r\nexport function formatU4Field(name: string, f: S.U4Field, showDec?: boolean): W.StructItem {\r\n return formatUIntField(name, f, 4, showDec);\r\n}\r\n\r\nexport function formatU8Field(name: string, f: S.U8Field, showDec?: boolean): W.StructItem {\r\n let value = `${formatU4RawHex(f.high)} ${formatU4Hex(f.low)}`;\r\n\r\n if (showDec && f.high < 0x1FFFFF) {\r\n const long = f.high * 0x100000000 + f.low;\r\n value += ` (${formatDec(long)})`;\r\n }\r\n\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value,\r\n };\r\n}\r\n\r\nexport function formatCompressedUIntField(name: string, f: S.CompressedUIntField): W.StructItem {\r\n return formatUIntField(name, f, f._size, true);\r\n}\r\n\r\nexport function formatBytesField(name: string, f: S.Field): W.StructItem {\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: \"\",\r\n };\r\n}\r\n\r\nexport function formatStringField(name: string, f: S.StringField): W.StructItem {\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: `\"${f.value}\"`,\r\n };\r\n}\r\n\r\nexport function formatGuidField(name: string, f: S.Field): W.StructItem {\r\n const b = (n: number) => formatU1RawHex(f.data[n]);\r\n const value = \"{\" + b(3) + b(2) + b(1) + b(0) + \"-\"\r\n + b(5) + b(4) + \"-\" + b(7) + b(6) + \"-\" + b(8) + b(9) + \"-\"\r\n + b(10) + b(11) + b(12) + b(13) + b(14) + b(15) + \"}\";\r\n\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value,\r\n };\r\n}\r\n\r\nfunction padZeroLeft(str: string, len: number): string {\r\n if (str.length < len) {\r\n return \"0\".repeat(len - str.length) + str;\r\n } else {\r\n return str;\r\n }\r\n}\r\n\r\nfunction formatUIntField(name: string, f: S.UIntField, sz: number, showDec?: boolean): W.StructItem {\r\n let hex: string;\r\n switch (sz) {\r\n case 1: hex = formatU1Hex(f.value); break;\r\n case 2: hex = formatU2Hex(f.value); break;\r\n case 4: hex = formatU4Hex(f.value); break;\r\n default: hex = f.value.toString(16).toUpperCase(); break;\r\n }\r\n\r\n return {\r\n offset: formatU4Hex(f._offset),\r\n size: formatHexDec(f._size),\r\n rawData: formatBytes(f.data),\r\n name,\r\n value: showDec ? `${hex} (${formatDec(f.value)})` : hex,\r\n }\r\n}\r\n","export function calculatePadding(dataSize: number, align: number = 4): number {\n const r = dataSize % align;\n if (r == 0) {\n return 0;\n } else {\n return align - r;\n }\n}\n\nexport function count1(n: number) {\n let c = 0;\n for (let i = 0, mask = 1; i < 32; i++ , mask <<= 1) {\n if (n & mask)\n c++;\n }\n return c;\n}\n\nexport function isSetLong(high: number, low: number, bit: number): boolean {\n return bit >= 0 && bit < 64 &&\n (bit < 32 && ((low & (1 << bit)) != 0)) ||\n (bit >= 32 && (high & (1 << (bit - 32))) != 0);\n}\n\nexport function decompressUint(data: Uint8Array): number {\n if ((data[0] & 0x80) == 0 && data.buffer.byteLength == 1)\n return data[0];\n else if ((data[0] & 0xC0) == 0x80 && data.buffer.byteLength == 2)\n return (data[0] & 0x3F) << 8 | data[1];\n else if ((data[0] & 0xE0) == 0xC0 && data.buffer.byteLength == 4)\n return (data[0] & 0x1F) << 24 | data[1] << 16 | data[2] << 8 | data[3];\n else\n throw new RangeError();\n}\n\nexport function decompressInt(data: Uint8Array): number {\n const u = decompressUint(data);\n if ((u & 0x00000001) == 0)\n return (u >> 1);\n\n const fb = data[0];\n if ((fb & 0x80) == 0)\n return (u >> 1) | 0xFFFFFFC0;\n else if ((fb & 0xC0) == 0x80)\n return (u >> 1) | 0xFFFFE000;\n else if ((fb & 0xE0) == 0xC0)\n return (u >> 1) | 0xF0000000;\n else\n throw new RangeError();\n}\n\nexport function getCompressedIntSize(firstByte: number): number {\n if ((firstByte & 0xFFFFFF00) != 0)\n throw new RangeError();\n else if ((firstByte & 0x80) == 0)\n return 1;\n else if ((firstByte & 0xC0) == 0x80)\n return 2;\n else if ((firstByte & 0xE0) == 0xC0)\n return 4;\n else\n throw new RangeError();\n}","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\n\r\nexport function generateNavList(pe: PEImage): W.NavData[] {\r\n let navList: W.NavData[] = [generateHeadersNavData(pe)];\r\n\r\n const navMD = generateMDHeadersNavData(pe);\r\n if (navMD) navList.push(navMD);\r\n\r\n return navList;\r\n}\r\n\r\nfunction generateHeadersNavData(pe: PEImage): W.NavData {\r\n const pageID = W.PageID.HEADERS;\r\n\r\n return {\r\n target: { pageID, title: W.KnownTitle.HEADERS },\r\n children: [{\r\n target: { pageID, title: W.KnownTitle.DOS_HEADER, elemID: W.KnownElemID.DOS_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.PE_SIGNATURE, elemID: W.KnownElemID.PE_SIGNATURE }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.FILE_HEADER, elemID: W.KnownElemID.FILE_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.OPTIONAL_HEADER, elemID: W.KnownElemID.OPTIONAL_HEADER }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.DATA_DIRECTORIES, elemID: W.KnownElemID.DATA_DIRECTORIES }\r\n }, {\r\n target: { pageID, title: W.KnownTitle.SECTION_HEADERS, elemID: W.KnownElemID.SECTION_HEADERS }\r\n }]\r\n };\r\n}\r\n\r\nfunction generateMDHeadersNavData(pe: PEImage): W.NavData | undefined {\r\n const pageID = W.PageID.MD_HEADERS;\r\n\r\n if (!pe.isManaged()) return undefined;\r\n\r\n let children: W.NavData[] = [{\r\n target: { pageID, title: W.KnownTitle.CLI_HEADER, elemID: W.KnownElemID.CLI_HEADER }\r\n }];\r\n\r\n if (pe.hasMetadata()) {\r\n children.push({\r\n target: { pageID, title: W.KnownTitle.MD_ROOT, elemID: W.KnownElemID.MD_ROOT }\r\n });\r\n children.push({\r\n target: { pageID, title: W.KnownTitle.MDS_HEADERS, elemID: W.KnownElemID.MDS_HEADERS }\r\n });\r\n }\r\n\r\n if (pe.hasStrongNameSignature()) {\r\n children.push({\r\n target: { pageID, title: W.KnownTitle.SN_SIG, elemID: W.KnownElemID.SN_SIG }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.Strings)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_STRINGS, title: W.KnownTitle.MDS_STRINGS, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.US)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_US, title: W.KnownTitle.MDS_US, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.GUID)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_GUID, title: W.KnownTitle.MDS_GUID, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.Blob)) {\r\n children.push({\r\n target: { pageID: W.PageID.MDS_BLOB, title: W.KnownTitle.MDS_BLOB, pageNum: 0 }\r\n });\r\n }\r\n\r\n if (pe.getMetadataStreamHeader(F.MetadataStreamName.Table)) {\r\n children.push(generateMDTablesNavData(pe));\r\n }\r\n\r\n return {\r\n target: { pageID, title: W.KnownTitle.MD_HEADERS },\r\n children\r\n };\r\n}\r\n\r\nfunction generateMDTablesNavData(pe: PEImage): W.NavData {\r\n const pageID = W.PageID.MDS_TABLE;\r\n const h = pe.getMetadataTableHeader();\r\n\r\n let children: W.NavData[] = [];\r\n const ti = F.MetadataTableIndex;\r\n const buildMdtNav = (t: F.MetadataTableIndex) => ({\r\n target: {\r\n pageID: W.PageID.MDT_TBL,\r\n title: `${ti[t]} (${pe.getMetadataTableRows(t).toLocaleString()})`,\r\n subID: ti[t],\r\n pageNum: 0\r\n }\r\n } as W.NavData);\r\n\r\n for (let tid = 0; tid < F.NumberOfMdTables; tid++) {\r\n if (pe.isMetadataTableValid(tid)) {\r\n children.push(buildMdtNav(tid));\r\n }\r\n }\r\n\r\n return {\r\n target: { pageID, title: W.KnownTitle.MDS_TABLE },\r\n children\r\n };\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\nimport * as U from \"../pe/utils\";\r\nimport * as FM from \"./formatter\";\r\nimport * as G from \"./generator\";\r\n\r\nexport function generateMdsStringsPageData(pe: PEImage,\r\n cache: G.GeneratorCache, cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n\r\n checkAndBuildCacheForMdsStrings(pe, cache, cfg);\r\n const items = cache.mdsStrings && cache.mdsStrings.pages[pgNum];\r\n\r\n const titleOf = (i: number) => `#String [${FM.formatHexDec(i)}]`;\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_STRINGS,\r\n title: W.KnownTitle.MDS_STRINGS,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_STRINGS,\r\n groups: [{\r\n title: \"\",\r\n items: items && items.map(index =>\r\n FM.formatStringField(titleOf(index), pe.getMdsStringsItem(index)!)\r\n )\r\n }]\r\n },\r\n paging: {\r\n currentPageNumber: pgNum,\r\n pageNavList: cache.mdsStrings!.pages.map((v, i) => ({\r\n title: `Page [${i + 1}] (${titleOf(v[0])} - ${titleOf(v[v.length - 1])}})`,\r\n pageID: W.PageID.MDS_STRINGS,\r\n pageNum: i\r\n }))\r\n }\r\n };\r\n}\r\n\r\nexport function generateMdsUSPageData(pe: PEImage,\r\n cache: G.GeneratorCache, cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n\r\n checkAndBuildCacheForMdsUS(pe, cache, cfg);\r\n const items = cache.mdsUS && cache.mdsUS.pages[pgNum];\r\n\r\n const titleOf = (i: number) => `#US [${FM.formatHexDec(i)}]`;\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_US,\r\n title: W.KnownTitle.MDS_US,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_US,\r\n groups: items && items.map(index => {\r\n const item = pe.getMdsUSItem(index)!;\r\n return {\r\n title: titleOf(index),\r\n items: [\r\n FM.formatCompressedUIntField(\"Size\", item.Size),\r\n FM.formatStringField(\"Value\", item.Value),\r\n FM.formatBytesField(\"Suffix\", item.Suffix),\r\n ]\r\n }\r\n })\r\n },\r\n paging: {\r\n currentPageNumber: pgNum,\r\n pageNavList: cache.mdsUS!.pages.map((v, i) => ({\r\n title: `Page [${i + 1}] (${titleOf(v[0])} - ${titleOf(v[v.length - 1])}})`,\r\n pageID: W.PageID.MDS_US,\r\n pageNum: i\r\n }))\r\n }\r\n };\r\n}\r\n\r\nexport function generateMdsBlobPageData(pe: PEImage,\r\n cache: G.GeneratorCache, cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n\r\n checkAndBuildCacheForMdsBlob(pe, cache, cfg);\r\n const items = cache.mdsBlob && cache.mdsBlob.pages[pgNum];\r\n\r\n const titleOf = (i: number) => `#Blob [${FM.formatHexDec(i)}]`;\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_BLOB,\r\n title: W.KnownTitle.MDS_BLOB,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_BLOB,\r\n groups: items && items.map(index => {\r\n const item = pe.getMdsBlobItem(index)!;\r\n return {\r\n title: titleOf(index),\r\n items: [\r\n FM.formatCompressedUIntField(\"Size\", item.Size),\r\n FM.formatBytesField(\"Value\", item.Value),\r\n ]\r\n }\r\n })\r\n },\r\n paging: {\r\n currentPageNumber: pgNum,\r\n pageNavList: cache.mdsBlob!.pages.map((v, i) => ({\r\n title: `Page [${i + 1}] (${titleOf(v[0])} - ${titleOf(v[v.length - 1])}})`,\r\n pageID: W.PageID.MDS_BLOB,\r\n pageNum: i\r\n }))\r\n }\r\n };\r\n}\r\n\r\nexport function generateMdsGuidPageData(pe: PEImage): W.PagedItemListPageData {\r\n const titleOf = (i: number) => `#GUID[${FM.formatHexDec(i)}]`;\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_GUID,\r\n title: W.KnownTitle.MDS_GUID,\r\n },\r\n items: {\r\n title: W.KnownTitle.MDS_GUID,\r\n groups: [{\r\n title: \"\",\r\n items: pe.getMdsGuidItems()!.items.map((v, i) =>\r\n FM.formatGuidField(titleOf(i + 1), v))\r\n }]\r\n },\r\n };\r\n}\r\n\r\nfunction checkAndBuildCacheForMdsStrings(pe: PEImage, cache: G.GeneratorCache, cfg: G.GeneratorConfig): void {\r\n if (cache.mdsStrings) return;\r\n\r\n const mdRoot = pe.getMetadataRoot();\r\n if (!mdRoot) return;\r\n\r\n const sh = pe.getMetadataStreamHeader(F.MetadataStreamName.Strings);\r\n if (!sh) return;\r\n\r\n let indexes: number[] = [0];\r\n const base = mdRoot._offset + sh.Offset.value;\r\n for (let p = 1; p < sh.Size.value; p++) {\r\n if (pe.getU1(base + p - 1) == 0) {\r\n indexes.push(p);\r\n }\r\n }\r\n\r\n cache.mdsStrings = {\r\n pages: putIndexToPages(indexes, cfg.mdsOffsetListPageSize)\r\n };\r\n}\r\n\r\nfunction checkAndBuildCacheForMdsUS(pe: PEImage, cache: G.GeneratorCache, cfg: G.GeneratorConfig): void {\r\n if (cache.mdsUS) return;\r\n\r\n const mdRoot = pe.getMetadataRoot();\r\n if (!mdRoot) return;\r\n\r\n const sh = pe.getMetadataStreamHeader(F.MetadataStreamName.US);\r\n if (!sh) return;\r\n\r\n const indexes = getBlobIndexes(pe, mdRoot._offset + sh.Offset.value, sh.Size.value);\r\n\r\n cache.mdsUS = {\r\n pages: putIndexToPages(indexes, cfg.mdsOffsetListPageSize)\r\n };\r\n}\r\n\r\nfunction checkAndBuildCacheForMdsBlob(pe: PEImage, cache: G.GeneratorCache, cfg: G.GeneratorConfig): void {\r\n if (cache.mdsBlob) return;\r\n\r\n const mdRoot = pe.getMetadataRoot();\r\n if (!mdRoot) return;\r\n\r\n const sh = pe.getMetadataStreamHeader(F.MetadataStreamName.Blob);\r\n if (!sh) return;\r\n\r\n const indexes = getBlobIndexes(pe, mdRoot._offset + sh.Offset.value, sh.Size.value);\r\n\r\n cache.mdsBlob = {\r\n pages: putIndexToPages(indexes, cfg.mdsOffsetListPageSize)\r\n };\r\n}\r\n\r\nfunction getBlobIndexes(pe: PEImage, base: number, size: number): number[] {\r\n let indexes: number[] = [];\r\n let p = 0;\r\n\r\n while (p < size) {\r\n indexes.push(p);\r\n const dtsz = U.getCompressedIntSize(pe.getU1(base + p));\r\n const szval = U.decompressUint(pe.getData(base + p, dtsz));\r\n p += szval + dtsz;\r\n }\r\n\r\n return indexes;\r\n}\r\n\r\nfunction putIndexToPages(indexes: number[], pageSize: number): G.MdsOffsetListPageCache[] {\r\n let pages: G.MdsOffsetListPageCache[] = [];\r\n let pageItems: G.MdsOffsetListPageCache = [];\r\n\r\n for (let pStart = 0, pEnd = 0; pStart < indexes.length; pStart = pEnd) {\r\n while (indexes[pEnd] - indexes[pStart] < pageSize\r\n && pEnd < indexes.length) {\r\n pageItems.push(indexes[pEnd++]);\r\n }\r\n pages.push(pageItems.slice());\r\n pageItems = [];\r\n }\r\n\r\n return pages;\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\nimport * as S from \"../pe/structures\";\r\nimport * as FM from \"./formatter\";\r\nimport * as G from \"./generator\";\r\n\r\nexport function generateMdsTablePageData(pe: PEImage): W.MdsTablePageData {\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDS_TABLE,\r\n title: W.KnownTitle.MDS_TABLE,\r\n },\r\n tableHeader: generateMDTableHeader(pe),\r\n tableInfo: generateMDTableList(pe),\r\n };\r\n}\r\n\r\nfunction generateMDTableHeader(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.MDT_HEADER,\r\n elemID: W.KnownElemID.MDT_HEADER,\r\n };\r\n\r\n const h = pe.getMetadataTableHeader();\r\n if (!h) return s;\r\n\r\n s.groups = [{\r\n title: \"\",\r\n items: [\r\n FM.formatU4Field(\"Reserved\", h.Reserved),\r\n FM.formatU1Field(\"MajorVersion\", h.MajorVersion, true),\r\n FM.formatU1Field(\"MinorVersion\", h.MinorVersion, true),\r\n FM.formatU1Field(\"HeapSizes\", h.HeapSizes),\r\n FM.formatU1Field(\"Reserved2\", h.Reserved2),\r\n FM.formatU8Field(\"Valid\", h.Valid),\r\n FM.formatU8Field(\"Sorted\", h.Sorted),\r\n ]\r\n }, {\r\n title: \"Rows\",\r\n items: h.Rows.items.map((v, i) => FM.formatU4Field(`Rows[${i}]`, v, true))\r\n }];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateMDTableList(pe: PEImage): W.MdTableInfo[] {\r\n let s: W.MdTableInfo[] = [];\r\n for (let id = 0; id < F.NumberOfMdTables; id++) {\r\n s.push({\r\n index: `${FM.formatU1Hex(id)} (${FM.formatDec(id)})`,\r\n name: F.MetadataTableIndex[id],\r\n valid: pe.isMetadataTableValid(id),\r\n sorted: pe.isMetadataTableSorted(id),\r\n rows: FM.formatDec(pe.getMetadataTableRows(id)),\r\n });\r\n }\r\n return s;\r\n}\r\n\r\nexport function generateMdtPageData(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number): W.PagedItemListPageData {\r\n const ti = F.MetadataTableIndex;\r\n const title = ti[tid] + \" Table\";\r\n\r\n return {\r\n nav: {\r\n pageID: W.PageID.MDT_TBL,\r\n subID: ti[tid],\r\n title,\r\n },\r\n items: generateTalbeItems(pe, tid, cfg, pgNum, title),\r\n paging: generateMdtPaging(pe, tid, cfg, pgNum)\r\n };\r\n}\r\n\r\nfunction generateTalbeItems(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number,\r\n title: string): W.GroupedStruct {\r\n const { start, end } = getRidOnPage(pe, tid, cfg, pgNum);\r\n\r\n let loader: (rid: number) => S.FileData;\r\n let builder: (item: S.FileData) => W.StructItem[];\r\n\r\n switch (tid) {\r\n case F.MetadataTableIndex.Module:\r\n loader = pe.getMdtModuleItem.bind(pe);\r\n builder = generateMdtModuleItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.TypeRef:\r\n loader = pe.getMdtTypeRefItem.bind(pe);\r\n builder = generateMdtTypeRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.TypeDef:\r\n loader = pe.getMdtTypeDefItem.bind(pe);\r\n builder = generateMdtTypeDefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldPtr:\r\n loader = pe.getMdtFieldPtrItem.bind(pe);\r\n builder = generateMdtFieldPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Field:\r\n loader = pe.getMdtFieldItem.bind(pe);\r\n builder = generateMdtFieldItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodPtr:\r\n loader = pe.getMdtMethodPtrItem.bind(pe);\r\n builder = generateMdtMethodPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodDef:\r\n loader = pe.getMdtMethodDefItem.bind(pe);\r\n builder = generateMdtMethodDefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ParamPtr:\r\n loader = pe.getMdtParamPtrItem.bind(pe);\r\n builder = generateMdtParamPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Param:\r\n loader = pe.getMdtParamItem.bind(pe);\r\n builder = generateMdtParamItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.InterfaceImpl:\r\n loader = pe.getMdtInterfaceImplItem.bind(pe);\r\n builder = generateMdtInterfaceImplItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MemberRef:\r\n loader = pe.getMdtMemberRefItem.bind(pe);\r\n builder = generateMdtMemberRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Constant:\r\n loader = pe.getMdtConstantItem.bind(pe);\r\n builder = generateMdtConstantItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.CustomAttribute:\r\n loader = pe.getMdtCustomAttributeItem.bind(pe);\r\n builder = generateMdtCustomAttributeItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldMarshal:\r\n loader = pe.getMdtFieldMarshalItem.bind(pe);\r\n builder = generateMdtFieldMarshalItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.DeclSecurity:\r\n loader = pe.getMdtDeclSecurityItem.bind(pe);\r\n builder = generateMdtDeclSecurityItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ClassLayout:\r\n loader = pe.getMdtClassLayoutItem.bind(pe);\r\n builder = generateMdtClassLayoutItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldLayout:\r\n loader = pe.getMdtFieldLayoutItem.bind(pe);\r\n builder = generateMdtFieldLayoutItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.StandAloneSig:\r\n loader = pe.getMdtStandAloneSigItem.bind(pe);\r\n builder = generateMdtStandAloneSigItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.EventMap:\r\n loader = pe.getMdtEventMapItem.bind(pe);\r\n builder = generateMdtEventMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.EventPtr:\r\n loader = pe.getMdtEventPtrItem.bind(pe);\r\n builder = generateMdtEventPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Event:\r\n loader = pe.getMdtEventItem.bind(pe);\r\n builder = generateMdtEventItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.PropertyMap:\r\n loader = pe.getMdtPropertyMapItem.bind(pe);\r\n builder = generateMdtPropertyMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.PropertyPtr:\r\n loader = pe.getMdtPropertyPtrItem.bind(pe);\r\n builder = generateMdtPropertyPtrItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Property:\r\n loader = pe.getMdtPropertyItem.bind(pe);\r\n builder = generateMdtPropertyItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodSemantics:\r\n loader = pe.getMdtMethodSemanticsItem.bind(pe);\r\n builder = generateMdtMethodSemanticsItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodImpl:\r\n loader = pe.getMdtMethodImplItem.bind(pe);\r\n builder = generateMdtMethodImplItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ModuleRef:\r\n loader = pe.getMdtModuleRefItem.bind(pe);\r\n builder = generateMdtModuleRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.TypeSpec:\r\n loader = pe.getMdtTypeSpecItem.bind(pe);\r\n builder = generateMdtTypeSpecItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ImplMap:\r\n loader = pe.getMdtImplMapItem.bind(pe);\r\n builder = generateMdtImplMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.FieldRVA:\r\n loader = pe.getMdtFieldRVAItem.bind(pe);\r\n builder = generateMdtFieldRVAItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ENCLog:\r\n loader = pe.getMdtENCLogItem.bind(pe);\r\n builder = generateMdtENCLogItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ENCMap:\r\n loader = pe.getMdtENCMapItem.bind(pe);\r\n builder = generateMdtENCMapItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.Assembly:\r\n loader = pe.getMdtAssemblyItem.bind(pe);\r\n builder = generateMdtAssemblyItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyProcessor:\r\n loader = pe.getMdtAssemblyProcessorItem.bind(pe);\r\n builder = generateMdtAssemblyProcessorItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyOS:\r\n loader = pe.getMdtAssemblyOSItem.bind(pe);\r\n builder = generateMdtAssemblyOSItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyRef:\r\n loader = pe.getMdtAssemblyRefItem.bind(pe);\r\n builder = generateMdtAssemblyRefItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyRefProcessor:\r\n loader = pe.getMdtAssemblyRefProcessorItem.bind(pe);\r\n builder = generateMdtAssemblyRefProcessorItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.AssemblyRefOS:\r\n loader = pe.getMdtAssemblyRefOSItem.bind(pe);\r\n builder = generateMdtAssemblyRefOSItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.File:\r\n loader = pe.getMdtFileItem.bind(pe);\r\n builder = generateMdtFileItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ExportedType:\r\n loader = pe.getMdtExportedTypeItem.bind(pe);\r\n builder = generateMdtExportedTypeItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.ManifestResource:\r\n loader = pe.getMdtManifestResourceItem.bind(pe);\r\n builder = generateMdtManifestResourceItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.NestedClass:\r\n loader = pe.getMdtNestedClassItem.bind(pe);\r\n builder = generateMdtNestedClassItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.GenericParam:\r\n loader = pe.getMdtGenericParamItem.bind(pe);\r\n builder = generateMdtGenericParamItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.MethodSpec:\r\n loader = pe.getMdtMethodSpecItem.bind(pe);\r\n builder = generateMdtMethodSpecItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n case F.MetadataTableIndex.GenericParamConstraint:\r\n loader = pe.getMdtGenericParamConstraintItem.bind(pe);\r\n builder = generateMdtGenericParamConstraintItems as (item: S.FileData) => W.StructItem[];\r\n break;\r\n default:\r\n return { title };\r\n }\r\n\r\n return generateSignleMdtTableItems(pe, tid, title, start, end, loader, builder);\r\n}\r\n\r\nfunction generateSignleMdtTableItems(\r\n pe: PEImage, tid: F.MetadataTableIndex, title: string, start: number, end: number,\r\n loader: (rid: number) => T,\r\n builder: (item: T) => W.StructItem[]): W.GroupedStruct {\r\n let items: T[] = [];\r\n for (let rid = start; rid <= end; rid++) {\r\n items.push(loader(rid));\r\n }\r\n\r\n return {\r\n title,\r\n groups: items.map((v, i) => ({\r\n title: `${F.MetadataTableIndex[tid]} [${FM.formatHexDec(start + i)}]`,\r\n items: builder(v)\r\n }))\r\n };\r\n}\r\n\r\nfunction generateMdtModuleItems(item: S.MdtModuleItem): W.StructItem[] {\r\n return [\r\n FM.formatU2Field(\"Generation\", item.Generation),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Mvid\", item.Mvid),\r\n FM.formatU4Field(\"EncId\", item.EncId),\r\n FM.formatU4Field(\"EncBaseId\", item.EncBaseId),\r\n ];\r\n}\r\n\r\nfunction generateMdtTypeRefItems(item: S.MdtTypeRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"ResolutionScope\", item.ResolutionScope),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Namespace\", item.Namespace),\r\n ];\r\n}\r\n\r\nfunction generateMdtTypeDefItems(item: S.MdtTypeDefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Namespace\", item.Namespace),\r\n FM.formatU4Field(\"Extends\", item.Extends),\r\n FM.formatU4Field(\"FieldList\", item.FieldList),\r\n FM.formatU4Field(\"MethodList\", item.MethodList),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldPtrItems(item: S.MdtFieldPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Field\", item.Field),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldItems(item: S.MdtFieldItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodPtrItems(item: S.MdtMethodPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Method\", item.Method),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodDefItems(item: S.MdtMethodDefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"RVA\", item.RVA),\r\n FM.formatU4Field(\"ImplFlags\", item.ImplFlags),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n FM.formatU4Field(\"ParamList\", item.ParamList),\r\n ];\r\n}\r\n\r\nfunction generateMdtParamPtrItems(item: S.MdtParamPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Param\", item.Param),\r\n ];\r\n}\r\n\r\nfunction generateMdtParamItems(item: S.MdtParamItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Sequence\", item.Sequence),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n ];\r\n}\r\n\r\nfunction generateMdtInterfaceImplItems(item: S.MdtInterfaceImplItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Class\", item.Class),\r\n FM.formatU4Field(\"Interface\", item.Interface),\r\n ];\r\n}\r\n\r\nfunction generateMdtMemberRefItems(item: S.MdtMemberRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Class\", item.Class),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtConstantItems(item: S.MdtConstantItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Type\", item.Type),\r\n FM.formatU4Field(\"PaddingZero\", item.PaddingZero),\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"Value\", item.Value),\r\n ];\r\n}\r\n\r\nfunction generateMdtCustomAttributeItems(item: S.MdtCustomAttributeItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"Type\", item.Type),\r\n FM.formatU4Field(\"Value\", item.Value),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldMarshalItems(item: S.MdtFieldMarshalItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"NativeType\", item.NativeType),\r\n ];\r\n}\r\n\r\nfunction generateMdtDeclSecurityItems(item: S.MdtDeclSecurityItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Action\", item.Action),\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"PermissionSet\", item.PermissionSet),\r\n ];\r\n}\r\n\r\nfunction generateMdtClassLayoutItems(item: S.MdtClassLayoutItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"PackingSize\", item.PackingSize),\r\n FM.formatU4Field(\"ClassSize\", item.ClassSize),\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldLayoutItems(item: S.MdtFieldLayoutItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"OffSet\", item.OffSet),\r\n FM.formatU4Field(\"Field\", item.Field),\r\n ];\r\n}\r\n\r\nfunction generateMdtStandAloneSigItems(item: S.MdtStandAloneSigItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtEventMapItems(item: S.MdtEventMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"EventList\", item.EventList),\r\n ];\r\n}\r\n\r\nfunction generateMdtEventPtrItems(item: S.MdtEventPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Generation\", item.Event),\r\n ];\r\n}\r\n\r\nfunction generateMdtEventItems(item: S.MdtEventItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"EventFlags\", item.EventFlags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"EventType\", item.EventType),\r\n ];\r\n}\r\n\r\nfunction generateMdtPropertyMapItems(item: S.MdtPropertyMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Parent\", item.Parent),\r\n FM.formatU4Field(\"PropertyList\", item.PropertyList),\r\n ];\r\n}\r\n\r\nfunction generateMdtPropertyPtrItems(item: S.MdtPropertyPtrItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Property\", item.Property),\r\n ];\r\n}\r\n\r\nfunction generateMdtPropertyItems(item: S.MdtPropertyItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"PropFlags\", item.PropFlags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Type\", item.Type),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodSemanticsItems(item: S.MdtMethodSemanticsItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Semantic\", item.Semantic),\r\n FM.formatU4Field(\"Method\", item.Method),\r\n FM.formatU4Field(\"Association\", item.Association),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodImplItems(item: S.MdtMethodImplItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Class\", item.Class),\r\n FM.formatU4Field(\"MethodBody\", item.MethodBody),\r\n FM.formatU4Field(\"MethodDeclaration\", item.MethodDeclaration),\r\n ];\r\n}\r\n\r\nfunction generateMdtModuleRefItems(item: S.MdtModuleRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Name\", item.Name),\r\n ];\r\n}\r\n\r\nfunction generateMdtTypeSpecItems(item: S.MdtTypeSpecItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Signature\", item.Signature),\r\n ];\r\n}\r\n\r\nfunction generateMdtImplMapItems(item: S.MdtImplMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"MappingFlags\", item.MappingFlags),\r\n FM.formatU4Field(\"MemberForwarded\", item.MemberForwarded),\r\n FM.formatU4Field(\"ImportName\", item.ImportName),\r\n FM.formatU4Field(\"ImportScope\", item.ImportScope),\r\n ];\r\n}\r\n\r\nfunction generateMdtFieldRVAItems(item: S.MdtFieldRVAItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"RVA\", item.RVA),\r\n FM.formatU4Field(\"Field\", item.Field),\r\n ];\r\n}\r\n\r\nfunction generateMdtENCLogItems(item: S.MdtENCLogItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Token\", item.Token),\r\n FM.formatU4Field(\"FuncCode\", item.FuncCode),\r\n ];\r\n}\r\n\r\nfunction generateMdtENCMapItems(item: S.MdtENCMapItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Token\", item.Token),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyItems(item: S.MdtAssemblyItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"HashAlgId\", item.HashAlgId),\r\n FM.formatU4Field(\"MajorVersion\", item.MajorVersion),\r\n FM.formatU4Field(\"MinorVersion\", item.MinorVersion),\r\n FM.formatU4Field(\"BuildNumber\", item.BuildNumber),\r\n FM.formatU4Field(\"RevisionNumber\", item.RevisionNumber),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"PublicKey\", item.PublicKey),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Locale\", item.Locale),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyProcessorItems(item: S.MdtAssemblyProcessorItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Processor\", item.Processor),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyOSItems(item: S.MdtAssemblyOSItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"OSPlatformID\", item.OSPlatformID),\r\n FM.formatU4Field(\"OSMajorVersion\", item.OSMajorVersion),\r\n FM.formatU4Field(\"OSMinorVersion\", item.OSMinorVersion),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyRefItems(item: S.MdtAssemblyRefItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"MajorVersion\", item.MajorVersion),\r\n FM.formatU4Field(\"MinorVersion\", item.MinorVersion),\r\n FM.formatU4Field(\"BuildNumber\", item.BuildNumber),\r\n FM.formatU4Field(\"RevisionNumber\", item.RevisionNumber),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"PublicKeyOrToken\", item.PublicKeyOrToken),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Locale\", item.Locale),\r\n FM.formatU4Field(\"HashValue\", item.HashValue),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyRefProcessorItems(item: S.MdtAssemblyRefProcessorItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Processor\", item.Processor),\r\n FM.formatU4Field(\"AssemblyRef\", item.AssemblyRef),\r\n ];\r\n}\r\n\r\nfunction generateMdtAssemblyRefOSItems(item: S.MdtAssemblyRefOSItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"OSPlatformID\", item.OSPlatformID),\r\n FM.formatU4Field(\"OSMajorVersion\", item.OSMajorVersion),\r\n FM.formatU4Field(\"OSMinorVersion\", item.OSMinorVersion),\r\n FM.formatU4Field(\"AssemblyRef\", item.AssemblyRef),\r\n ];\r\n}\r\n\r\nfunction generateMdtFileItems(item: S.MdtFileItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"HashValue\", item.HashValue),\r\n ];\r\n}\r\n\r\nfunction generateMdtExportedTypeItems(item: S.MdtExportedTypeItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"TypeDefId\", item.TypeDefId),\r\n FM.formatU4Field(\"TypeName\", item.TypeName),\r\n FM.formatU4Field(\"TypeNamespace\", item.TypeNamespace),\r\n FM.formatU4Field(\"Implementation\", item.Implementation),\r\n ];\r\n}\r\n\r\nfunction generateMdtManifestResourceItems(item: S.MdtManifestResourceItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Offset\", item.Offset),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n FM.formatU4Field(\"Implementation\", item.Implementation),\r\n ];\r\n}\r\n\r\nfunction generateMdtNestedClassItems(item: S.MdtNestedClassItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"NestedClass\", item.NestedClass),\r\n FM.formatU4Field(\"EnclosingClass\", item.EnclosingClass),\r\n ];\r\n}\r\n\r\nfunction generateMdtGenericParamItems(item: S.MdtGenericParamItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Number\", item.Number),\r\n FM.formatU4Field(\"Flags\", item.Flags),\r\n FM.formatU4Field(\"Owner\", item.Owner),\r\n FM.formatU4Field(\"Name\", item.Name),\r\n ];\r\n}\r\n\r\nfunction generateMdtMethodSpecItems(item: S.MdtMethodSpecItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Method\", item.Method),\r\n FM.formatU4Field(\"Instantiation\", item.Instantiation),\r\n ];\r\n}\r\n\r\nfunction generateMdtGenericParamConstraintItems(item: S.MdtGenericParamConstraintItem): W.StructItem[] {\r\n return [\r\n FM.formatU4Field(\"Owner\", item.Owner),\r\n FM.formatU4Field(\"Constraint\", item.Constraint),\r\n ];\r\n}\r\n\r\nfunction generateMdtPaging(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number): W.Paging {\r\n const paging: W.Paging = {\r\n currentPageNumber: pgNum,\r\n pageNavList: []\r\n };\r\n\r\n const psz = cfg.mdtPageSize;\r\n const rows = pe.getMetadataTableRows(tid);\r\n const pages = Math.floor((rows + psz - 1) / psz);\r\n for (let p = 0; p < pages; p++) {\r\n const tblName = F.MetadataTableIndex[tid];\r\n const titleOf = (r: number) => `${tblName}[${FM.formatHexDec(r)}]`;\r\n const { start, end } = getRidOnPage(pe, tid, cfg, p);\r\n const target: W.NavTarget = {\r\n title: `Page[${p + 1}] (${titleOf(start)} - ${titleOf(end)})`,\r\n pageID: W.PageID.MDT_TBL,\r\n subID: tblName,\r\n pageNum: p,\r\n };\r\n paging.pageNavList.push(target);\r\n }\r\n\r\n return paging;\r\n}\r\n\r\nfunction getRidOnPage(\r\n pe: PEImage,\r\n tid: F.MetadataTableIndex,\r\n cfg: G.GeneratorConfig,\r\n pgNum: number): { start: number, end: number } {\r\n const psz = cfg.mdtPageSize;\r\n const rows = pe.getMetadataTableRows(tid);\r\n const start = pgNum * psz + 1;\r\n let end = start + psz - 1;\r\n if (end > rows) end = rows;\r\n return { start, end };\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as FM from \"./formatter\";\r\n\r\nexport function generateMetadataHeadersPageData(pe: PEImage): W.MetadataHeadersPageData {\r\n return {\r\n nav: {\r\n pageID: W.PageID.MD_HEADERS,\r\n title: W.KnownTitle.MD_HEADERS,\r\n },\r\n cliHeader: generateCliHeader(pe),\r\n metadataRoot: generateMetadataRoot(pe),\r\n streamHeaders: generateMetadataStreamHeader(pe),\r\n snSignature: generateSNSignature(pe),\r\n };\r\n}\r\n\r\nfunction generateCliHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.CLI_HEADER,\r\n elemID: W.KnownElemID.CLI_HEADER,\r\n };\r\n\r\n const h = pe.getCliHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU4Field(\"cb\", h.cb, true),\r\n FM.formatU2Field(\"MajorRuntimeVersion\", h.MajorRuntimeVersion, true),\r\n FM.formatU2Field(\"MinorRuntimeVersion\", h.MinorRuntimeVersion, true),\r\n FM.formatU4Field(\"MetaData.VirtualAddress\", h.MetaData.VirtualAddress),\r\n FM.formatU4Field(\"MetaData.Size\", h.MetaData.Size, true),\r\n FM.formatU4Field(\"Flags\", h.Flags),\r\n FM.formatU4Field(\"EntryPointToken\", h.EntryPointToken),\r\n FM.formatU4Field(\"Resources.VirtualAddress\", h.Resources.VirtualAddress),\r\n FM.formatU4Field(\"Resources.Size\", h.Resources.Size, true),\r\n FM.formatU4Field(\"StrongNameSignature.VirtualAddress\", h.StrongNameSignature.VirtualAddress),\r\n FM.formatU4Field(\"StrongNameSignature.Size\", h.StrongNameSignature.Size, true),\r\n FM.formatU4Field(\"CodeManagerTable.VirtualAddress\", h.CodeManagerTable.VirtualAddress),\r\n FM.formatU4Field(\"CodeManagerTable.Size\", h.CodeManagerTable.Size, true),\r\n FM.formatU4Field(\"VTableFixups.VirtualAddress\", h.VTableFixups.VirtualAddress),\r\n FM.formatU4Field(\"VTableFixups.Size\", h.VTableFixups.Size, true),\r\n FM.formatU4Field(\"ExportAddressTableJumps.VirtualAddress\", h.ExportAddressTableJumps.VirtualAddress),\r\n FM.formatU4Field(\"ExportAddressTableJumps.Size\", h.ExportAddressTableJumps.Size, true),\r\n FM.formatU4Field(\"ManagedNativeHeader.VirtualAddress\", h.ManagedNativeHeader.VirtualAddress),\r\n FM.formatU4Field(\"ManagedNativeHeader.Size\", h.ManagedNativeHeader.Size, true),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateSNSignature(pe: PEImage): W.SimpleStruct | undefined {\r\n const d = pe.getStrongNameSignature();\r\n if (!d) return undefined;\r\n\r\n const s: W.SimpleStruct = {\r\n title: W.KnownTitle.SN_SIG,\r\n elemID: W.KnownElemID.SN_SIG,\r\n items: [FM.formatBytesField(\"Signature\", d)]\r\n };\r\n return s;\r\n}\r\n\r\nfunction generateMetadataRoot(pe: PEImage): W.SimpleStruct | undefined {\r\n const h = pe.getMetadataRoot();\r\n if (!h) return undefined;\r\n\r\n const s: W.SimpleStruct = {\r\n title: W.KnownTitle.MD_ROOT,\r\n elemID: W.KnownElemID.MD_ROOT,\r\n items: [\r\n FM.formatU4Field(\"Signature\", h.Signature),\r\n FM.formatU2Field(\"MajorVersion\", h.MajorVersion, true),\r\n FM.formatU2Field(\"MinorVersion\", h.MinorVersion, true),\r\n FM.formatU4Field(\"Reserved\", h.Reserved),\r\n FM.formatU4Field(\"VersionLength\", h.VersionLength, true),\r\n FM.formatStringField(\"VersionString\", h.VersionString),\r\n FM.formatBytesField(\"VersionPadding\", h.VersionPadding),\r\n FM.formatU2Field(\"Flags\", h.Flags),\r\n FM.formatU2Field(\"Streams\", h.Streams, true),\r\n ]\r\n };\r\n return s;\r\n}\r\n\r\nfunction generateMetadataStreamHeader(pe: PEImage): W.GroupedStruct | undefined {\r\n const h = pe.getMetadataStreamHeaders();\r\n if (!h) return undefined;\r\n\r\n const s: W.GroupedStruct = {\r\n title: W.KnownTitle.MDS_HEADERS,\r\n elemID: W.KnownElemID.MDS_HEADERS,\r\n groups: h.items.map((v, i) => ({\r\n title: `[${i}] (${v.Name.value})`,\r\n items: [\r\n FM.formatU4Field(\"Offset\", v.Offset),\r\n FM.formatU4Field(\"Size\", v.Size, true),\r\n FM.formatStringField(\"Name\", v.Name),\r\n FM.formatBytesField(\"Padding\", v.Padding),\r\n ]\r\n }))\r\n };\r\n return s;\r\n}","import { PEImage } from \"../pe/image\";\r\nimport * as S from \"../pe/structures\";\r\nimport * as F from \"../pe/image-flags\";\r\nimport * as FM from \"./formatter\";\r\n\r\nexport function generateHeadersPageData(pe: PEImage): W.HeadersPageData {\r\n return {\r\n nav: {\r\n pageID: W.PageID.HEADERS,\r\n title: W.KnownTitle.HEADERS,\r\n },\r\n dosHeader: generateDosHeader(pe),\r\n peSignature: generatePESignature(pe),\r\n fileHeader: generateFileHeader(pe),\r\n optionalHeader: generateOptionalHeader(pe),\r\n dataDirectories: generateDataDirectories(pe),\r\n sectionHeaders: generateSectionHeaders(pe),\r\n };\r\n}\r\n\r\nfunction generateDosHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.DOS_HEADER,\r\n elemID: W.KnownElemID.DOS_HEADER,\r\n };\r\n\r\n const h = pe.getDosHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU2Field(\"e_magic\", h.e_magic),\r\n FM.formatU2Field(\"e_cblp\", h.e_cblp),\r\n FM.formatU2Field(\"e_cp\", h.e_cp),\r\n FM.formatU2Field(\"e_crlc\", h.e_crlc),\r\n FM.formatU2Field(\"e_cparhdr\", h.e_cparhdr),\r\n FM.formatU2Field(\"e_minalloc\", h.e_minalloc),\r\n FM.formatU2Field(\"e_maxalloc\", h.e_maxalloc),\r\n FM.formatU2Field(\"e_ss\", h.e_ss),\r\n FM.formatU2Field(\"e_sp\", h.e_sp),\r\n FM.formatU2Field(\"e_csum\", h.e_csum),\r\n FM.formatU2Field(\"e_ip\", h.e_ip),\r\n FM.formatU2Field(\"e_cs\", h.e_cs),\r\n FM.formatU2Field(\"e_lfarlc\", h.e_lfarlc),\r\n FM.formatU2Field(\"e_ovno\", h.e_ovno),\r\n FM.formatBytesField(\"e_res\", h.e_res),\r\n FM.formatU2Field(\"e_oemid\", h.e_oemid),\r\n FM.formatU2Field(\"e_oeminfo\", h.e_oeminfo),\r\n FM.formatBytesField(\"e_res2\", h.e_res2),\r\n FM.formatU4Field(\"e_lfanew\", h.e_lfanew),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generatePESignature(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.PE_SIGNATURE,\r\n elemID: W.KnownElemID.PE_SIGNATURE,\r\n };\r\n\r\n const h = pe.getPESignature();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU4Field(\"PE Signature\", h),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateFileHeader(pe: PEImage): W.SimpleStruct {\r\n let s: W.SimpleStruct = {\r\n title: W.KnownTitle.FILE_HEADER,\r\n elemID: W.KnownElemID.FILE_HEADER,\r\n };\r\n\r\n const h = pe.getFileHeader();\r\n if (!h) return s;\r\n\r\n s.items = [\r\n FM.formatU2Field(\"Machine\", h.Machine),\r\n FM.formatU2Field(\"NumberOfSections\", h.NumberOfSections, true),\r\n FM.formatU4Field(\"TimeDateStamp\", h.TimeDateStamp),\r\n FM.formatU4Field(\"PointerToSymbolTable\", h.PointerToSymbolTable),\r\n FM.formatU4Field(\"NumberOfSymbols\", h.NumberOfSymbols, true),\r\n FM.formatU2Field(\"SizeOfOptionalHeader\", h.SizeOfOptionalHeader, true),\r\n FM.formatU2Field(\"Characteristics\", h.Characteristics),\r\n ];\r\n\r\n return s;\r\n}\r\n\r\nfunction generateOptionalHeader(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.OPTIONAL_HEADER,\r\n elemID: W.KnownElemID.OPTIONAL_HEADER,\r\n };\r\n\r\n const h = pe.getOptionalHeader();\r\n if (!h) return s;\r\n\r\n switch (h.Magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC:\r\n s.title += \" (32-bit)\";\r\n fillOptionalHeader32Fields(s, h);\r\n break;\r\n\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC:\r\n s.title += \" (64-bit)\";\r\n fillOptionalHeader64Fields(s, h);\r\n break;\r\n }\r\n\r\n return s;\r\n}\r\n\r\nfunction fillOptionalHeader32Fields(s: W.GroupedStruct, h: S.ImageOptionalHeader32): void {\r\n s.groups = [{\r\n title: \"Standard Fields\",\r\n items: [\r\n FM.formatU2Field(\"Magic\", h.Magic),\r\n FM.formatU1Field(\"MajorLinkerVersion\", h.MajorLinkerVersion, true),\r\n FM.formatU1Field(\"MinorLinkerVersion\", h.MinorLinkerVersion, true),\r\n FM.formatU4Field(\"SizeOfCode\", h.SizeOfCode, true),\r\n FM.formatU4Field(\"SizeOfInitializedData\", h.SizeOfInitializedData, true),\r\n FM.formatU4Field(\"SizeOfUninitializedData\", h.SizeOfUninitializedData, true),\r\n FM.formatU4Field(\"AddressOfEntryPoint\", h.AddressOfEntryPoint),\r\n FM.formatU4Field(\"BaseOfCode\", h.BaseOfCode),\r\n FM.formatU4Field(\"BaseOfData\", h.BaseOfData),\r\n ],\r\n }, {\r\n title: \"NT-specified Fields\",\r\n items: [\r\n FM.formatU4Field(\"ImageBase\", h.ImageBase),\r\n FM.formatU4Field(\"SectionAlignment\", h.SectionAlignment, true),\r\n FM.formatU4Field(\"FileAlignment\", h.FileAlignment, true),\r\n FM.formatU2Field(\"MajorOperatingSystemVersion\", h.MajorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MinorOperatingSystemVersion\", h.MinorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MajorImageVersion\", h.MajorImageVersion, true),\r\n FM.formatU2Field(\"MinorImageVersion\", h.MinorImageVersion, true),\r\n FM.formatU2Field(\"MajorSubsystemVersion\", h.MajorSubsystemVersion, true),\r\n FM.formatU2Field(\"MinorSubsystemVersion\", h.MinorSubsystemVersion, true),\r\n FM.formatU4Field(\"Win32VersionValue\", h.Win32VersionValue, true),\r\n FM.formatU4Field(\"SizeOfImage\", h.SizeOfImage, true),\r\n FM.formatU4Field(\"SizeOfHeaders\", h.SizeOfHeaders, true),\r\n FM.formatU4Field(\"CheckSum\", h.CheckSum),\r\n FM.formatU2Field(\"Subsystem\", h.Subsystem),\r\n FM.formatU2Field(\"DllCharacteristics\", h.DllCharacteristics),\r\n FM.formatU4Field(\"SizeOfStackReserve\", h.SizeOfStackReserve, true),\r\n FM.formatU4Field(\"SizeOfStackCommit\", h.SizeOfStackCommit, true),\r\n FM.formatU4Field(\"SizeOfHeapReserve\", h.SizeOfHeapReserve, true),\r\n FM.formatU4Field(\"SizeOfHeapCommit\", h.SizeOfHeapCommit, true),\r\n FM.formatU4Field(\"LoaderFlags\", h.LoaderFlags),\r\n FM.formatU4Field(\"NumberOfRvaAndSizes\", h.NumberOfRvaAndSizes, true),\r\n ],\r\n }];\r\n}\r\n\r\nfunction fillOptionalHeader64Fields(s: W.GroupedStruct, h: S.ImageOptionalHeader64): void {\r\n s.groups = [{\r\n title: \"Standard Fields\",\r\n items: [\r\n FM.formatU2Field(\"Magic\", h.Magic),\r\n FM.formatU1Field(\"MajorLinkerVersion\", h.MajorLinkerVersion, true),\r\n FM.formatU1Field(\"MinorLinkerVersion\", h.MinorLinkerVersion, true),\r\n FM.formatU4Field(\"SizeOfCode\", h.SizeOfCode, true),\r\n FM.formatU4Field(\"SizeOfInitializedData\", h.SizeOfInitializedData, true),\r\n FM.formatU4Field(\"SizeOfUninitializedData\", h.SizeOfUninitializedData, true),\r\n FM.formatU4Field(\"AddressOfEntryPoint\", h.AddressOfEntryPoint),\r\n FM.formatU4Field(\"BaseOfCode\", h.BaseOfCode),\r\n ],\r\n }, {\r\n title: \"NT-specified Fields\",\r\n items: [\r\n FM.formatU8Field(\"ImageBase\", h.ImageBase),\r\n FM.formatU4Field(\"SectionAlignment\", h.SectionAlignment, true),\r\n FM.formatU4Field(\"FileAlignment\", h.FileAlignment, true),\r\n FM.formatU2Field(\"MajorOperatingSystemVersion\", h.MajorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MinorOperatingSystemVersion\", h.MinorOperatingSystemVersion, true),\r\n FM.formatU2Field(\"MajorImageVersion\", h.MajorImageVersion, true),\r\n FM.formatU2Field(\"MinorImageVersion\", h.MinorImageVersion, true),\r\n FM.formatU2Field(\"MajorSubsystemVersion\", h.MajorSubsystemVersion, true),\r\n FM.formatU2Field(\"MinorSubsystemVersion\", h.MinorSubsystemVersion, true),\r\n FM.formatU4Field(\"Win32VersionValue\", h.Win32VersionValue, true),\r\n FM.formatU4Field(\"SizeOfImage\", h.SizeOfImage, true),\r\n FM.formatU4Field(\"SizeOfHeaders\", h.SizeOfHeaders, true),\r\n FM.formatU4Field(\"CheckSum\", h.CheckSum),\r\n FM.formatU2Field(\"Subsystem\", h.Subsystem),\r\n FM.formatU2Field(\"DllCharacteristics\", h.DllCharacteristics),\r\n FM.formatU8Field(\"SizeOfStackReserve\", h.SizeOfStackReserve, true),\r\n FM.formatU8Field(\"SizeOfStackCommit\", h.SizeOfStackCommit, true),\r\n FM.formatU8Field(\"SizeOfHeapReserve\", h.SizeOfHeapReserve, true),\r\n FM.formatU8Field(\"SizeOfHeapCommit\", h.SizeOfHeapCommit, true),\r\n FM.formatU4Field(\"LoaderFlags\", h.LoaderFlags),\r\n FM.formatU4Field(\"NumberOfRvaAndSizes\", h.NumberOfRvaAndSizes, true),\r\n ],\r\n }];\r\n}\r\n\r\nfunction generateDataDirectories(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.DATA_DIRECTORIES,\r\n elemID: W.KnownElemID.DATA_DIRECTORIES,\r\n };\r\n\r\n const h = pe.getDataDirectories();\r\n if (!h) return s;\r\n\r\n s.groups = h.items.map((v, i) => ({\r\n title: `[${i}] ${F.ImageDirectoryEntry[i] || \"\"}`,\r\n items: [\r\n FM.formatU4Field(\"VirtualAddress\", v.VirtualAddress),\r\n FM.formatU4Field(\"Size\", v.Size, true),\r\n ]\r\n } as W.SimpleStruct));\r\n\r\n return s;\r\n}\r\n\r\nfunction generateSectionHeaders(pe: PEImage): W.GroupedStruct {\r\n let s: W.GroupedStruct = {\r\n title: W.KnownTitle.SECTION_HEADERS,\r\n elemID: W.KnownElemID.SECTION_HEADERS,\r\n };\r\n\r\n const h = pe.getSectionHeaders();\r\n if (!h) return s;\r\n\r\n s.groups = h.items.map((v, i) => ({\r\n title: `[${i}] (${v.Name.value})`,\r\n items: [\r\n FM.formatStringField(\"Name\", v.Name),\r\n FM.formatU4Field(\"VirtualSize\", v.VirtualSize, true),\r\n FM.formatU4Field(\"VirtualAddress\", v.VirtualAddress),\r\n FM.formatU4Field(\"SizeOfRawData\", v.SizeOfRawData, true),\r\n FM.formatU4Field(\"PointerToRawData\", v.PointerToRawData),\r\n FM.formatU4Field(\"PointerToRelocations\", v.PointerToRelocations),\r\n FM.formatU4Field(\"PointerToLinenumbers\", v.PointerToLinenumbers),\r\n FM.formatU2Field(\"NumberOfRelocations\", v.NumberOfRelocations, true),\r\n FM.formatU2Field(\"NumberOfLinenumbers\", v.NumberOfLinenumbers, true),\r\n FM.formatU4Field(\"Characteristics\", v.Characteristics),\r\n ]\r\n }));\r\n\r\n return s;\r\n}\r\n","import { PEImage } from \"../pe/image\";\r\nimport * as F from \"../pe/image-flags\";\r\n\r\nimport { generateHeadersPageData } from \"./headers\";\r\nimport { generateMetadataHeadersPageData } from \"./metadata-headers\";\r\nimport { generateMdsTablePageData, generateMdtPageData } from \"./mds-table\";\r\nimport {\r\n generateMdsStringsPageData,\r\n generateMdsUSPageData,\r\n generateMdsGuidPageData,\r\n generateMdsBlobPageData\r\n} from \"./mds-list\";\r\n\r\nexport function generatePageData(pe: PEImage, pageID: W.PageID, subID?: string, pageNum?: number): W.PageData {\r\n switch (pageID) {\r\n case W.PageID.HEADERS: return generateHeadersPageData(pe);\r\n case W.PageID.MD_HEADERS: return generateMetadataHeadersPageData(pe);\r\n case W.PageID.MDS_TABLE: return generateMdsTablePageData(pe);\r\n case W.PageID.MDS_STRINGS: return generateMdsStringsPageData(pe, cache, cfg, pageNum || 0);\r\n case W.PageID.MDS_US: return generateMdsUSPageData(pe, cache, cfg, pageNum || 0);\r\n case W.PageID.MDS_GUID: return generateMdsGuidPageData(pe);\r\n case W.PageID.MDS_BLOB: return generateMdsBlobPageData(pe, cache, cfg, pageNum || 0);\r\n case W.PageID.MDT_TBL: {\r\n const tid = F.MetadataTableIndex[subID! as any] as any as F.MetadataTableIndex;\r\n return generateMdtPageData(pe, tid, cfg, pageNum || 0);\r\n }\r\n default: return { nav: { pageID: W.PageID.NOTFOUND, title: W.KnownTitle.NOTFOUND } };\r\n }\r\n}\r\n\r\nexport interface GeneratorCache {\r\n mdsStrings?: MdsOffsetListCache;\r\n mdsUS?: MdsOffsetListCache;\r\n mdsBlob?: MdsOffsetListCache;\r\n}\r\n\r\nexport type MdsOffsetListCache = {\r\n pages: MdsOffsetListPageCache[];\r\n}\r\n\r\nexport type MdsOffsetListPageCache = number[];\r\n\r\nexport function clearGeneratorCache(): void {\r\n cache = {};\r\n}\r\n\r\nexport interface GeneratorConfig {\r\n mdsOffsetListPageSize: number; // Total bytes per page.\r\n mdtPageSize: number; // Total items per page.\r\n}\r\n\r\nlet cache: GeneratorCache = {};\r\n\r\nconst cfg: GeneratorConfig = {\r\n mdsOffsetListPageSize: 4000,\r\n mdtPageSize: 100,\r\n}\r\n","export const enum PEErrorType {\r\n INVALID_DATA_POSITION = \"INVALID_DATA_POSITION\",\r\n INVALID_DOS_SIGNATURE = \"INVALID_DOS_SIGNATURE\",\r\n INVALID_PE_SIGNATURE = \"INVALID_PE_SIGNATURE\",\r\n INVALID_OPTIONAL_HEADER_MAGIC = \"INVALID_OPTIONAL_HEADER_MAGIC\",\r\n INVALID_DATA_DIRECTORY_COUNT = \"INVALID_DATA_DIRECTORY_COUNT\",\r\n}\r\n\r\nexport class PEError extends Error {\r\n constructor(\r\n public type: PEErrorType,\r\n public offset?: number,\r\n public size?: number\r\n ) {\r\n super(type);\r\n }\r\n}\r\n","import * as S from \"./structures\";\r\nimport * as F from \"./image-flags\";\r\nimport * as U from \"./utils\";\r\n\r\nexport interface FileDataProvider {\r\n getU1(p: number): number;\r\n getU2(p: number): number;\r\n getU4(p: number): number;\r\n getData(p: number, sz: number): Uint8Array;\r\n}\r\n\r\nexport interface MetadataSizingProvider {\r\n getHeapSize(heap: F.MetadataHeapSizeID): number;\r\n getTableIDSize(t: F.MetadataTableIndex): number;\r\n getCodedTokenSize(t: F.MetadataCodedTokenIndex): number;\r\n}\r\n\r\n//\r\n// Basic structures.\r\n//\r\n\r\nexport function loadU1Field(d: FileDataProvider, p: number): S.U1Field {\r\n return {\r\n _offset: p, _size: 1, data: d.getData(p, 1), value: d.getU1(p)\r\n };\r\n}\r\n\r\nexport function loadU2Field(d: FileDataProvider, p: number): S.U2Field {\r\n return {\r\n _offset: p, _size: 2, data: d.getData(p, 2), value: d.getU2(p)\r\n };\r\n}\r\n\r\nexport function loadU4Field(d: FileDataProvider, p: number): S.U4Field {\r\n return {\r\n _offset: p, _size: 4, data: d.getData(p, 4), value: d.getU4(p)\r\n };\r\n}\r\n\r\nexport function loadU8Field(d: FileDataProvider, p: number): S.U8Field {\r\n const low = d.getU4(p);\r\n const high = d.getU4(p + 4);\r\n\r\n return {\r\n _offset: p, _size: 8, data: d.getData(p, 8), low, high\r\n };\r\n}\r\n\r\nexport function loadCompressedUIntField(d: FileDataProvider, p: number): S.CompressedUIntField {\r\n const sz = U.getCompressedIntSize(d.getU1(p));\r\n const data = new Uint8Array(d.getData(p, sz));\r\n const value = U.decompressUint(data);\r\n\r\n return { _offset: p, _size: sz, data, value };\r\n}\r\n\r\nexport function loadU1EnumField(d: FileDataProvider, p: number): S.U1EnumField {\r\n return {\r\n _offset: p, _size: 1, data: d.getData(p, 1), value: d.getU1(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadU2EnumField(d: FileDataProvider, p: number): S.U2EnumField {\r\n return {\r\n _offset: p, _size: 2, data: d.getData(p, 2), value: d.getU2(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadU4EnumField(d: FileDataProvider, p: number): S.U4EnumField {\r\n return {\r\n _offset: p, _size: 4, data: d.getData(p, 4), value: d.getU4(p) as any as T\r\n };\r\n}\r\n\r\nexport function loadFixedSizeByteArrayField(d: FileDataProvider, p: number, sz: number): S.Field {\r\n return {\r\n _offset: p, _size: sz, data: d.getData(p, sz)\r\n };\r\n}\r\n\r\nexport function loadFixedSizeAsciiStringField(d: FileDataProvider, p: number, sz: number): S.StringField {\r\n const data = d.getData(p, sz);\r\n const value = String.fromCharCode.apply(null, Array.from(data).filter(v => v != 0));\r\n\r\n return {\r\n _offset: p, _size: sz, data, value\r\n };\r\n}\r\n\r\nexport function loadNullTerminatedStringField(d: FileDataProvider, p: number): S.StringField {\r\n let bytes: number[] = [];\r\n let ptr = p;\r\n let b: number;\r\n\r\n do {\r\n b = d.getU1(ptr++);\r\n bytes.push(b);\r\n } while (b != 0);\r\n const str = bytes.slice(0, bytes.length - 1).map(v => `%${v.toString(16)}`).join(\"\");\r\n const value = decodeURIComponent(str);\r\n\r\n return {\r\n _offset: p, _size: ptr - p, data: Uint8Array.from(bytes), value\r\n };\r\n}\r\n\r\nexport function loadFixedSizeUnicodeStringField(d: FileDataProvider, p: number, sz: number): S.StringField {\r\n const data = d.getData(p, sz);\r\n const arr = new Uint16Array(data.buffer);\r\n const value = String.fromCodePoint.apply(null, arr);\r\n\r\n return {\r\n _offset: p, _size: sz, data, value\r\n };\r\n}\r\n\r\nexport function loadStructArrayByCount(\r\n d: FileDataProvider,\r\n p: number,\r\n loader: (d: FileDataProvider, p: number) => T,\r\n count: number): S.StructArray {\r\n\r\n let items: T[] = [];\r\n let ptr = p;\r\n for (let i = 0; i < count; i++) {\r\n const s = loader(d, ptr);\r\n items.push(s);\r\n ptr += s._size;\r\n }\r\n\r\n return { _offset: p, _size: ptr - p, items };\r\n}\r\n\r\n//\r\n// Image headers.\r\n//\r\n\r\nexport function loadImageDosHeader(d: FileDataProvider, p: number): S.ImageDosHeader {\r\n let ptr = p;\r\n\r\n const e_magic = loadU2Field(d, ptr);\r\n ptr += e_magic._size;\r\n\r\n const e_cblp = loadU2Field(d, ptr);\r\n ptr += e_cblp._size;\r\n\r\n const e_cp = loadU2Field(d, ptr);\r\n ptr += e_cp._size;\r\n\r\n const e_crlc = loadU2Field(d, ptr);\r\n ptr += e_crlc._size;\r\n\r\n const e_cparhdr = loadU2Field(d, ptr);\r\n ptr += e_cparhdr._size;\r\n\r\n const e_minalloc = loadU2Field(d, ptr);\r\n ptr += e_minalloc._size;\r\n\r\n const e_maxalloc = loadU2Field(d, ptr);\r\n ptr += e_maxalloc._size;\r\n\r\n const e_ss = loadU2Field(d, ptr);\r\n ptr += e_ss._size;\r\n\r\n const e_sp = loadU2Field(d, ptr);\r\n ptr += e_sp._size;\r\n\r\n const e_csum = loadU2Field(d, ptr);\r\n ptr += e_csum._size;\r\n\r\n const e_ip = loadU2Field(d, ptr);\r\n ptr += e_ip._size;\r\n\r\n const e_cs = loadU2Field(d, ptr);\r\n ptr += e_cs._size;\r\n\r\n const e_lfarlc = loadU2Field(d, ptr);\r\n ptr += e_lfarlc._size;\r\n\r\n const e_ovno = loadU2Field(d, ptr);\r\n ptr += e_ovno._size;\r\n\r\n const e_res = loadFixedSizeByteArrayField(d, ptr, 4 * 2);\r\n ptr += e_res._size;\r\n\r\n const e_oemid = loadU2Field(d, ptr);\r\n ptr += e_oemid._size;\r\n\r\n const e_oeminfo = loadU2Field(d, ptr);\r\n ptr += e_oeminfo._size;\r\n\r\n const e_res2 = loadFixedSizeByteArrayField(d, ptr, 10 * 2);\r\n ptr += e_res2._size;\r\n\r\n const e_lfanew = loadU4Field(d, ptr);\r\n ptr += e_lfanew._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n e_magic,\r\n e_cblp,\r\n e_cp,\r\n e_crlc,\r\n e_cparhdr,\r\n e_minalloc,\r\n e_maxalloc,\r\n e_ss,\r\n e_sp,\r\n e_csum,\r\n e_ip,\r\n e_cs,\r\n e_lfarlc,\r\n e_ovno,\r\n e_res,\r\n e_oemid,\r\n e_oeminfo,\r\n e_res2,\r\n e_lfanew,\r\n };\r\n}\r\n\r\nexport function loadImageFileHeader(d: FileDataProvider, p: number): S.ImageFileHeader {\r\n let ptr = p;\r\n\r\n const Machine = loadU2Field(d, ptr);\r\n ptr += Machine._size;\r\n\r\n const NumberOfSections = loadU2Field(d, ptr);\r\n ptr += NumberOfSections._size;\r\n\r\n const TimeDateStamp = loadU4Field(d, ptr);\r\n ptr += TimeDateStamp._size;\r\n\r\n const PointerToSymbolTable = loadU4Field(d, ptr);\r\n ptr += PointerToSymbolTable._size;\r\n\r\n const NumberOfSymbols = loadU4Field(d, ptr);\r\n ptr += NumberOfSymbols._size;\r\n\r\n const SizeOfOptionalHeader = loadU2Field(d, ptr);\r\n ptr += SizeOfOptionalHeader._size;\r\n\r\n const Characteristics = loadU2EnumField(d, ptr);\r\n ptr += Characteristics._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Machine,\r\n NumberOfSections,\r\n TimeDateStamp,\r\n PointerToSymbolTable,\r\n NumberOfSymbols,\r\n SizeOfOptionalHeader,\r\n Characteristics,\r\n };\r\n}\r\n\r\nexport function loadImageOptionalHeader32(d: FileDataProvider, p: number): S.ImageOptionalHeader32 {\r\n let ptr = p;\r\n\r\n const Magic = loadU2Field(d, ptr);\r\n ptr += Magic._size;\r\n\r\n const MajorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MajorLinkerVersion._size;\r\n\r\n const MinorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MinorLinkerVersion._size;\r\n\r\n const SizeOfCode = loadU4Field(d, ptr);\r\n ptr += SizeOfCode._size;\r\n\r\n const SizeOfInitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfInitializedData._size;\r\n\r\n const SizeOfUninitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfUninitializedData._size;\r\n\r\n const AddressOfEntryPoint = loadU4Field(d, ptr);\r\n ptr += AddressOfEntryPoint._size;\r\n\r\n const BaseOfCode = loadU4Field(d, ptr);\r\n ptr += BaseOfCode._size;\r\n\r\n const BaseOfData = loadU4Field(d, ptr);\r\n ptr += BaseOfData._size;\r\n\r\n const ImageBase = loadU4Field(d, ptr);\r\n ptr += ImageBase._size;\r\n\r\n const SectionAlignment = loadU4Field(d, ptr);\r\n ptr += SectionAlignment._size;\r\n\r\n const FileAlignment = loadU4Field(d, ptr);\r\n ptr += FileAlignment._size;\r\n\r\n const MajorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorOperatingSystemVersion._size;\r\n\r\n const MinorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorOperatingSystemVersion._size;\r\n\r\n const MajorImageVersion = loadU2Field(d, ptr);\r\n ptr += MajorImageVersion._size;\r\n\r\n const MinorImageVersion = loadU2Field(d, ptr);\r\n ptr += MinorImageVersion._size;\r\n\r\n const MajorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorSubsystemVersion._size;\r\n\r\n const MinorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorSubsystemVersion._size;\r\n\r\n const Win32VersionValue = loadU4Field(d, ptr);\r\n ptr += Win32VersionValue._size;\r\n\r\n const SizeOfImage = loadU4Field(d, ptr);\r\n ptr += SizeOfImage._size;\r\n\r\n const SizeOfHeaders = loadU4Field(d, ptr);\r\n ptr += SizeOfHeaders._size;\r\n\r\n const CheckSum = loadU4Field(d, ptr);\r\n ptr += CheckSum._size;\r\n\r\n const Subsystem = loadU2EnumField(d, ptr);\r\n ptr += Subsystem._size;\r\n\r\n const DllCharacteristics = loadU2EnumField(d, ptr);\r\n ptr += DllCharacteristics._size;\r\n\r\n const SizeOfStackReserve = loadU4Field(d, ptr);\r\n ptr += SizeOfStackReserve._size;\r\n\r\n const SizeOfStackCommit = loadU4Field(d, ptr);\r\n ptr += SizeOfStackCommit._size;\r\n\r\n const SizeOfHeapReserve = loadU4Field(d, ptr);\r\n ptr += SizeOfHeapReserve._size;\r\n\r\n const SizeOfHeapCommit = loadU4Field(d, ptr);\r\n ptr += SizeOfHeapCommit._size;\r\n\r\n const LoaderFlags = loadU4Field(d, ptr);\r\n ptr += LoaderFlags._size;\r\n\r\n const NumberOfRvaAndSizes = loadU4Field(d, ptr);\r\n ptr += NumberOfRvaAndSizes._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Magic,\r\n MajorLinkerVersion,\r\n MinorLinkerVersion,\r\n SizeOfCode,\r\n SizeOfInitializedData,\r\n SizeOfUninitializedData,\r\n AddressOfEntryPoint,\r\n BaseOfCode,\r\n BaseOfData,\r\n ImageBase,\r\n SectionAlignment,\r\n FileAlignment,\r\n MajorOperatingSystemVersion,\r\n MinorOperatingSystemVersion,\r\n MajorImageVersion,\r\n MinorImageVersion,\r\n MajorSubsystemVersion,\r\n MinorSubsystemVersion,\r\n Win32VersionValue,\r\n SizeOfImage,\r\n SizeOfHeaders,\r\n CheckSum,\r\n Subsystem,\r\n DllCharacteristics,\r\n SizeOfStackReserve,\r\n SizeOfStackCommit,\r\n SizeOfHeapReserve,\r\n SizeOfHeapCommit,\r\n LoaderFlags,\r\n NumberOfRvaAndSizes,\r\n };\r\n}\r\n\r\nexport function loadImageOptionalHeader64(d: FileDataProvider, p: number): S.ImageOptionalHeader64 {\r\n let ptr = p;\r\n\r\n const Magic = loadU2Field(d, ptr);\r\n ptr += Magic._size;\r\n\r\n const MajorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MajorLinkerVersion._size;\r\n\r\n const MinorLinkerVersion = loadU1Field(d, ptr);\r\n ptr += MinorLinkerVersion._size;\r\n\r\n const SizeOfCode = loadU4Field(d, ptr);\r\n ptr += SizeOfCode._size;\r\n\r\n const SizeOfInitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfInitializedData._size;\r\n\r\n const SizeOfUninitializedData = loadU4Field(d, ptr);\r\n ptr += SizeOfUninitializedData._size;\r\n\r\n const AddressOfEntryPoint = loadU4Field(d, ptr);\r\n ptr += AddressOfEntryPoint._size;\r\n\r\n const BaseOfCode = loadU4Field(d, ptr);\r\n ptr += BaseOfCode._size;\r\n\r\n const ImageBase = loadU8Field(d, ptr);\r\n ptr += ImageBase._size;\r\n\r\n const SectionAlignment = loadU4Field(d, ptr);\r\n ptr += SectionAlignment._size;\r\n\r\n const FileAlignment = loadU4Field(d, ptr);\r\n ptr += FileAlignment._size;\r\n\r\n const MajorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorOperatingSystemVersion._size;\r\n\r\n const MinorOperatingSystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorOperatingSystemVersion._size;\r\n\r\n const MajorImageVersion = loadU2Field(d, ptr);\r\n ptr += MajorImageVersion._size;\r\n\r\n const MinorImageVersion = loadU2Field(d, ptr);\r\n ptr += MinorImageVersion._size;\r\n\r\n const MajorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MajorSubsystemVersion._size;\r\n\r\n const MinorSubsystemVersion = loadU2Field(d, ptr);\r\n ptr += MinorSubsystemVersion._size;\r\n\r\n const Win32VersionValue = loadU4Field(d, ptr);\r\n ptr += Win32VersionValue._size;\r\n\r\n const SizeOfImage = loadU4Field(d, ptr);\r\n ptr += SizeOfImage._size;\r\n\r\n const SizeOfHeaders = loadU4Field(d, ptr);\r\n ptr += SizeOfHeaders._size;\r\n\r\n const CheckSum = loadU4Field(d, ptr);\r\n ptr += CheckSum._size;\r\n\r\n const Subsystem = loadU2EnumField(d, ptr);\r\n ptr += Subsystem._size;\r\n\r\n const DllCharacteristics = loadU2EnumField(d, ptr);\r\n ptr += DllCharacteristics._size;\r\n\r\n const SizeOfStackReserve = loadU8Field(d, ptr);\r\n ptr += SizeOfStackReserve._size;\r\n\r\n const SizeOfStackCommit = loadU8Field(d, ptr);\r\n ptr += SizeOfStackCommit._size;\r\n\r\n const SizeOfHeapReserve = loadU8Field(d, ptr);\r\n ptr += SizeOfHeapReserve._size;\r\n\r\n const SizeOfHeapCommit = loadU8Field(d, ptr);\r\n ptr += SizeOfHeapCommit._size;\r\n\r\n const LoaderFlags = loadU4Field(d, ptr);\r\n ptr += LoaderFlags._size;\r\n\r\n const NumberOfRvaAndSizes = loadU4Field(d, ptr);\r\n ptr += NumberOfRvaAndSizes._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Magic,\r\n MajorLinkerVersion,\r\n MinorLinkerVersion,\r\n SizeOfCode,\r\n SizeOfInitializedData,\r\n SizeOfUninitializedData,\r\n AddressOfEntryPoint,\r\n BaseOfCode,\r\n ImageBase,\r\n SectionAlignment,\r\n FileAlignment,\r\n MajorOperatingSystemVersion,\r\n MinorOperatingSystemVersion,\r\n MajorImageVersion,\r\n MinorImageVersion,\r\n MajorSubsystemVersion,\r\n MinorSubsystemVersion,\r\n Win32VersionValue,\r\n SizeOfImage,\r\n SizeOfHeaders,\r\n CheckSum,\r\n Subsystem,\r\n DllCharacteristics,\r\n SizeOfStackReserve,\r\n SizeOfStackCommit,\r\n SizeOfHeapReserve,\r\n SizeOfHeapCommit,\r\n LoaderFlags,\r\n NumberOfRvaAndSizes,\r\n };\r\n}\r\n\r\nexport function loadImageDataDirectory(d: FileDataProvider, p: number): S.ImageDataDirectory {\r\n let ptr = p;\r\n\r\n const VirtualAddress = loadU4Field(d, ptr);\r\n ptr += VirtualAddress._size;\r\n\r\n const Size = loadU4Field(d, ptr);\r\n ptr += Size._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n VirtualAddress,\r\n Size,\r\n };\r\n}\r\n\r\nexport function loadImageSectionHeader(d: FileDataProvider, p: number): S.ImageSectionHeader {\r\n let ptr = p;\r\n\r\n const Name = loadFixedSizeAsciiStringField(d, ptr, 8);\r\n ptr += Name._size;\r\n\r\n const VirtualSize = loadU4Field(d, ptr);\r\n ptr += VirtualSize._size;\r\n\r\n const VirtualAddress = loadU4Field(d, ptr);\r\n ptr += VirtualAddress._size;\r\n\r\n const SizeOfRawData = loadU4Field(d, ptr);\r\n ptr += SizeOfRawData._size;\r\n\r\n const PointerToRawData = loadU4Field(d, ptr);\r\n ptr += PointerToRawData._size;\r\n\r\n const PointerToRelocations = loadU4Field(d, ptr);\r\n ptr += PointerToRelocations._size;\r\n\r\n const PointerToLinenumbers = loadU4Field(d, ptr);\r\n ptr += PointerToLinenumbers._size;\r\n\r\n const NumberOfRelocations = loadU2Field(d, ptr);\r\n ptr += NumberOfRelocations._size;\r\n\r\n const NumberOfLinenumbers = loadU2Field(d, ptr);\r\n ptr += NumberOfLinenumbers._size;\r\n\r\n const Characteristics = loadU4EnumField(d, ptr);\r\n ptr += Characteristics._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Name,\r\n VirtualSize,\r\n VirtualAddress,\r\n SizeOfRawData,\r\n PointerToRawData,\r\n PointerToRelocations,\r\n PointerToLinenumbers,\r\n NumberOfRelocations,\r\n NumberOfLinenumbers,\r\n Characteristics,\r\n };\r\n}\r\n\r\n//\r\n// Metadata structures.\r\n//\r\n\r\nexport function loadCliHeader(d: FileDataProvider, p: number): S.CliHeader {\r\n let ptr = p;\r\n\r\n const cb = loadU4Field(d, ptr);\r\n ptr += cb._size;\r\n\r\n const MajorRuntimeVersion = loadU2Field(d, ptr);\r\n ptr += MajorRuntimeVersion._size;\r\n\r\n const MinorRuntimeVersion = loadU2Field(d, ptr);\r\n ptr += MinorRuntimeVersion._size;\r\n\r\n const MetaData = loadImageDataDirectory(d, ptr);\r\n ptr += MetaData._size;\r\n\r\n const Flags = loadU4Field(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const EntryPointToken = loadU4Field(d, ptr);\r\n ptr += EntryPointToken._size;\r\n\r\n const Resources = loadImageDataDirectory(d, ptr);\r\n ptr += Resources._size;\r\n\r\n const StrongNameSignature = loadImageDataDirectory(d, ptr);\r\n ptr += StrongNameSignature._size;\r\n\r\n const CodeManagerTable = loadImageDataDirectory(d, ptr);\r\n ptr += CodeManagerTable._size;\r\n\r\n const VTableFixups = loadImageDataDirectory(d, ptr);\r\n ptr += VTableFixups._size;\r\n\r\n const ExportAddressTableJumps = loadImageDataDirectory(d, ptr);\r\n ptr += ExportAddressTableJumps._size;\r\n\r\n const ManagedNativeHeader = loadImageDataDirectory(d, ptr);\r\n ptr += ManagedNativeHeader._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n cb,\r\n MajorRuntimeVersion,\r\n MinorRuntimeVersion,\r\n MetaData,\r\n Flags,\r\n EntryPointToken,\r\n Resources,\r\n StrongNameSignature,\r\n CodeManagerTable,\r\n VTableFixups,\r\n ExportAddressTableJumps,\r\n ManagedNativeHeader,\r\n };\r\n}\r\n\r\nexport function loadMetadataRoot(d: FileDataProvider, p: number): S.MetadataRoot {\r\n let ptr = p;\r\n\r\n const Signature = loadU4Field(d, ptr);\r\n ptr += Signature._size;\r\n\r\n const MajorVersion = loadU2Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU2Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const Reserved = loadU4Field(d, ptr);\r\n ptr += Reserved._size;\r\n\r\n const VersionLength = loadU4Field(d, ptr);\r\n ptr += VersionLength._size;\r\n\r\n const VersionString = loadNullTerminatedStringField(d, ptr);\r\n ptr += VersionString._size;\r\n\r\n const paddingSize = U.calculatePadding(VersionString._size);\r\n const VersionPadding = loadFixedSizeByteArrayField(d, ptr, paddingSize);\r\n ptr += VersionPadding._size;\r\n\r\n const Flags = loadU2Field(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Streams = loadU2Field(d, ptr);\r\n ptr += Streams._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Signature,\r\n MajorVersion,\r\n MinorVersion,\r\n Reserved,\r\n VersionLength,\r\n VersionString,\r\n VersionPadding,\r\n Flags,\r\n Streams,\r\n };\r\n}\r\n\r\nexport function loadMetadataStreamHeader(d: FileDataProvider, p: number): S.MetadataStreamHeader {\r\n let ptr = p;\r\n\r\n const Offset = loadU4Field(d, ptr);\r\n ptr += Offset._size;\r\n\r\n const Size = loadU4Field(d, ptr);\r\n ptr += Size._size;\r\n\r\n const Name = loadNullTerminatedStringField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const paddingSize = U.calculatePadding(Name._size);\r\n const Padding = loadFixedSizeByteArrayField(d, ptr, paddingSize);\r\n ptr += Padding._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Offset,\r\n Size,\r\n Name,\r\n Padding,\r\n };\r\n}\r\n\r\nexport function loadMetadataTableHeader(d: FileDataProvider, p: number): S.MetadataTableHeader {\r\n let ptr = p;\r\n\r\n const Reserved = loadU4Field(d, ptr);\r\n ptr += Reserved._size;\r\n\r\n const MajorVersion = loadU1Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU1Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const HeapSizes = loadU1Field(d, ptr);\r\n ptr += HeapSizes._size;\r\n\r\n const Reserved2 = loadU1Field(d, ptr);\r\n ptr += Reserved2._size;\r\n\r\n const Valid = loadU8Field(d, ptr);\r\n ptr += Valid._size;\r\n\r\n const Sorted = loadU8Field(d, ptr);\r\n ptr += Sorted._size;\r\n\r\n const tables = U.count1(Valid.high) + U.count1(Valid.low);\r\n const Rows = loadStructArrayByCount(d, ptr, loadU4Field, tables);\r\n ptr += Rows._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Reserved,\r\n MajorVersion,\r\n MinorVersion,\r\n HeapSizes,\r\n Reserved2,\r\n Valid,\r\n Sorted,\r\n Rows,\r\n };\r\n}\r\n\r\nexport function loadMetadataUSItem(d: FileDataProvider, p: number): S.MetadataUSItem {\r\n let ptr = p;\r\n\r\n const Size = loadCompressedUIntField(d, ptr);\r\n ptr += Size._size;\r\n\r\n const sz = Size.value;\r\n const strSize = sz > 0 ? sz - 1 : 0;\r\n const suffixSize = sz > 0 ? 1 : 0;\r\n\r\n const Value = loadFixedSizeUnicodeStringField(d, ptr, strSize);\r\n ptr += Value._size;\r\n\r\n const Suffix = loadFixedSizeByteArrayField(d, ptr, suffixSize);\r\n ptr += Suffix._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Size,\r\n Value,\r\n Suffix,\r\n };\r\n}\r\n\r\nexport function loadMetadataBlobItem(d: FileDataProvider, p: number): S.MetadataBlobItem {\r\n let ptr = p;\r\n\r\n const Size = loadCompressedUIntField(d, ptr);\r\n ptr += Size._size;\r\n\r\n const Value = loadFixedSizeByteArrayField(d, ptr, Size.value);\r\n ptr += Value._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Size,\r\n Value,\r\n };\r\n}\r\n\r\nexport function loadMdsStringsField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n p: number): S.MdsStringsField {\r\n\r\n return d.getHeapSize(F.MetadataHeapSizeID.String) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdsGuidField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n p: number): S.MdsGuidField {\r\n\r\n return d.getHeapSize(F.MetadataHeapSizeID.GUID) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdsBlobField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n p: number): S.MdsBlobField {\r\n\r\n return d.getHeapSize(F.MetadataHeapSizeID.Blob) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdtRidField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n t: F.MetadataTableIndex, p: number): S.MdtRidField {\r\n\r\n return d.getTableIDSize(t) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n}\r\n\r\nexport function loadMdCodedTokenField(\r\n d: FileDataProvider & MetadataSizingProvider,\r\n t: F.MetadataCodedTokenIndex, p: number): S.MdCodedTokenField {\r\n\r\n const baseField = d.getCodedTokenSize(t) == 4\r\n ? loadU4Field(d, p) : loadU2Field(d, p);\r\n const codedTokenInfo = decodeCodedToken(baseField.value, t);\r\n\r\n return {\r\n ...baseField, ...codedTokenInfo\r\n };\r\n}\r\n\r\nexport function loadMdTokenField(d: FileDataProvider, p: number): S.MdTokenField {\r\n const baseField = loadU4Field(d, p);\r\n const tid: F.MetadataTableIndex = (baseField.value & 0xFF000000) >> 24;\r\n const rid = baseField.value & 0x00FFFFFF;\r\n return {\r\n ...baseField, tid, rid\r\n };\r\n}\r\n\r\nexport function decodeCodedToken(token: number, t: F.MetadataCodedTokenIndex): { tid: F.MetadataTableIndex, rid: number } {\r\n const cti = F.ctc[t];\r\n const tid = cti.tables[token & ((1 << cti.tagSize) - 1)];\r\n const rid = token >> cti.tagSize;\r\n return { tid, rid };\r\n}\r\n\r\n//\r\n// Metadata tables.\r\n//\r\n\r\nexport function loadMdtModule(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtModuleItem {\r\n let ptr = p;\r\n\r\n const Generation = loadU2Field(d, ptr);\r\n ptr += Generation._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Mvid = loadMdsGuidField(d, ptr);\r\n ptr += Mvid._size;\r\n\r\n const EncId = loadMdsGuidField(d, ptr);\r\n ptr += EncId._size;\r\n\r\n const EncBaseId = loadMdsGuidField(d, ptr);\r\n ptr += EncBaseId._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Generation,\r\n Name,\r\n Mvid,\r\n EncId,\r\n EncBaseId,\r\n };\r\n}\r\n\r\nexport function loadMdtTypeRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtTypeRefItem {\r\n let ptr = p;\r\n\r\n const ResolutionScope = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.ResolutionScope, ptr);\r\n ptr += ResolutionScope._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Namespace = loadMdsStringsField(d, ptr);\r\n ptr += Namespace._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n ResolutionScope,\r\n Name,\r\n Namespace,\r\n };\r\n}\r\n\r\nexport function loadMdtTypeDef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtTypeDefItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Namespace = loadMdsStringsField(d, ptr);\r\n ptr += Namespace._size;\r\n\r\n const Extends = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += Extends._size;\r\n\r\n const FieldList = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += FieldList._size;\r\n\r\n const MethodList = loadMdtRidField(d, F.MetadataTableIndex.MethodDef, ptr);\r\n ptr += MethodList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Name,\r\n Namespace,\r\n Extends,\r\n FieldList,\r\n MethodList,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldPtrItem {\r\n let ptr = p;\r\n\r\n const Field = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += Field._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Field,\r\n };\r\n}\r\n\r\nexport function loadMdtField(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Name,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodPtrItem {\r\n let ptr = p;\r\n\r\n const Method = loadMdtRidField(d, F.MetadataTableIndex.MethodDef, ptr);\r\n ptr += Method._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Method,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodDef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodDefItem {\r\n let ptr = p;\r\n\r\n const RVA = loadU4Field(d, ptr);\r\n ptr += RVA._size;\r\n\r\n const ImplFlags = loadU2EnumField(d, ptr);\r\n ptr += ImplFlags._size;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n const ParamList = loadMdtRidField(d, F.MetadataTableIndex.Param, ptr);\r\n ptr += ParamList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n RVA,\r\n ImplFlags,\r\n Flags,\r\n Name,\r\n Signature,\r\n ParamList,\r\n };\r\n}\r\n\r\nexport function loadMdtParamPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtParamPtrItem {\r\n let ptr = p;\r\n\r\n const Param = loadMdtRidField(d, F.MetadataTableIndex.Param, ptr);\r\n ptr += Param._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Param,\r\n };\r\n}\r\n\r\nexport function loadMdtParam(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtParamItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Sequence = loadU2Field(d, ptr);\r\n ptr += Sequence._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Sequence,\r\n Name,\r\n };\r\n}\r\n\r\nexport function loadMdtInterfaceImpl(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtInterfaceImplItem {\r\n let ptr = p;\r\n\r\n const Class = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Class._size;\r\n\r\n const Interface = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += Interface._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Class,\r\n Interface,\r\n };\r\n}\r\n\r\nexport function loadMdtMemberRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMemberRefItem {\r\n let ptr = p;\r\n\r\n const Class = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MemberRefParent, ptr);\r\n ptr += Class._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Class,\r\n Name,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtConstant(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtConstantItem {\r\n let ptr = p;\r\n\r\n const Type = loadU1EnumField(d, ptr);\r\n ptr += Type._size;\r\n\r\n const PaddingZero = loadU1Field(d, ptr);\r\n ptr += PaddingZero._size;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasConstant, ptr);\r\n ptr += Parent._size;\r\n\r\n const Value = loadMdsBlobField(d, ptr);\r\n ptr += Value._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Type,\r\n PaddingZero,\r\n Parent,\r\n Value,\r\n };\r\n}\r\n\r\nexport function loadMdtCustomAttribute(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtCustomAttributeItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasCustomAttribute, ptr);\r\n ptr += Parent._size;\r\n\r\n const Type = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.CustomAttributeType, ptr);\r\n ptr += Type._size;\r\n\r\n const Value = loadMdsBlobField(d, ptr);\r\n ptr += Value._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n Type,\r\n Value,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldMarshal(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldMarshalItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasFieldMarshall, ptr);\r\n ptr += Parent._size;\r\n\r\n const NativeType = loadMdsBlobField(d, ptr);\r\n ptr += NativeType._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n NativeType,\r\n };\r\n}\r\n\r\nexport function loadMdtDeclSecurity(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtDeclSecurityItem {\r\n let ptr = p;\r\n\r\n const Action = loadU2EnumField(d, ptr);\r\n ptr += Action._size;\r\n\r\n const Parent = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasDeclSecurity, ptr);\r\n ptr += Parent._size;\r\n\r\n const PermissionSet = loadMdsBlobField(d, ptr);\r\n ptr += PermissionSet._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Action,\r\n Parent,\r\n PermissionSet,\r\n };\r\n}\r\n\r\nexport function loadMdtClassLayout(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtClassLayoutItem {\r\n let ptr = p;\r\n\r\n const PackingSize = loadU2Field(d, ptr);\r\n ptr += PackingSize._size;\r\n\r\n const ClassSize = loadU4Field(d, ptr);\r\n ptr += ClassSize._size;\r\n\r\n const Parent = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Parent._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n PackingSize,\r\n ClassSize,\r\n Parent,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldLayout(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldLayoutItem {\r\n let ptr = p;\r\n\r\n const OffSet = loadU4Field(d, ptr);\r\n ptr += OffSet._size;\r\n\r\n const Field = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += Field._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n OffSet,\r\n Field,\r\n };\r\n}\r\n\r\nexport function loadMdtStandAloneSig(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtStandAloneSigItem {\r\n let ptr = p;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtEventMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtEventMapItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Parent._size;\r\n\r\n const EventList = loadMdtRidField(d, F.MetadataTableIndex.Event, ptr);\r\n ptr += EventList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n EventList,\r\n };\r\n}\r\n\r\nexport function loadMdtEventPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtEventPtrItem {\r\n let ptr = p;\r\n\r\n const Event = loadMdtRidField(d, F.MetadataTableIndex.Event, ptr);\r\n ptr += Event._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Event,\r\n };\r\n}\r\n\r\nexport function loadMdtEvent(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtEventItem {\r\n let ptr = p;\r\n\r\n const EventFlags = loadU2EnumField(d, ptr);\r\n ptr += EventFlags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const EventType = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += EventType._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n EventFlags,\r\n Name,\r\n EventType,\r\n };\r\n}\r\n\r\nexport function loadMdtPropertyMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtPropertyMapItem {\r\n let ptr = p;\r\n\r\n const Parent = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Parent._size;\r\n\r\n const PropertyList = loadMdtRidField(d, F.MetadataTableIndex.Property, ptr);\r\n ptr += PropertyList._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Parent,\r\n PropertyList,\r\n };\r\n}\r\n\r\nexport function loadMdtPropertyPtr(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtPropertyPtrItem {\r\n let ptr = p;\r\n\r\n const Property = loadMdtRidField(d, F.MetadataTableIndex.Property, ptr);\r\n ptr += Property._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Property,\r\n };\r\n}\r\n\r\nexport function loadMdtProperty(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtPropertyItem {\r\n let ptr = p;\r\n\r\n const PropFlags = loadU2EnumField(d, ptr);\r\n ptr += PropFlags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Type = loadMdsBlobField(d, ptr);\r\n ptr += Type._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n PropFlags,\r\n Name,\r\n Type,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodSemantics(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodSemanticsItem {\r\n let ptr = p;\r\n\r\n const Semantic = loadU2EnumField(d, ptr);\r\n ptr += Semantic._size;\r\n\r\n const Method = loadMdtRidField(d, F.MetadataTableIndex.MethodDef, ptr);\r\n ptr += Method._size;\r\n\r\n const Association = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.HasSemantics, ptr);\r\n ptr += Association._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Semantic,\r\n Method,\r\n Association,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodImpl(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodImplItem {\r\n let ptr = p;\r\n\r\n const Class = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += Class._size;\r\n\r\n const MethodBody = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MethodDefOrRef, ptr);\r\n ptr += MethodBody._size;\r\n\r\n const MethodDeclaration = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MethodDefOrRef, ptr);\r\n ptr += MethodDeclaration._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Class,\r\n MethodBody,\r\n MethodDeclaration,\r\n };\r\n}\r\n\r\nexport function loadMdtModuleRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtModuleRefItem {\r\n let ptr = p;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Name,\r\n };\r\n}\r\n\r\nexport function loadMdtTypeSpec(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtTypeSpecItem {\r\n let ptr = p;\r\n\r\n const Signature = loadMdsBlobField(d, ptr);\r\n ptr += Signature._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Signature,\r\n };\r\n}\r\n\r\nexport function loadMdtImplMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtImplMapItem {\r\n let ptr = p;\r\n\r\n const MappingFlags = loadU2EnumField(d, ptr);\r\n ptr += MappingFlags._size;\r\n\r\n const MemberForwarded = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MemberForwarded, ptr);\r\n ptr += MemberForwarded._size;\r\n\r\n const ImportName = loadMdsStringsField(d, ptr);\r\n ptr += ImportName._size;\r\n\r\n const ImportScope = loadMdtRidField(d, F.MetadataTableIndex.ModuleRef, ptr);\r\n ptr += ImportScope._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n MappingFlags,\r\n MemberForwarded,\r\n ImportName,\r\n ImportScope,\r\n };\r\n}\r\n\r\nexport function loadMdtFieldRVA(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFieldRVAItem {\r\n let ptr = p;\r\n\r\n const RVA = loadU4Field(d, ptr);\r\n ptr += RVA._size;\r\n\r\n const Field = loadMdtRidField(d, F.MetadataTableIndex.Field, ptr);\r\n ptr += Field._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n RVA,\r\n Field,\r\n };\r\n}\r\n\r\nexport function loadMdtENCLog(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtENCLogItem {\r\n let ptr = p;\r\n\r\n const Token = loadU4Field(d, ptr);\r\n ptr += Token._size;\r\n\r\n const FuncCode = loadU4Field(d, ptr);\r\n ptr += FuncCode._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Token,\r\n FuncCode,\r\n };\r\n}\r\n\r\nexport function loadMdtENCMap(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtENCMapItem {\r\n let ptr = p;\r\n\r\n const Token = loadU4Field(d, ptr);\r\n ptr += Token._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Token,\r\n };\r\n}\r\n\r\nexport function loadMdtAssembly(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyItem {\r\n let ptr = p;\r\n\r\n const HashAlgId = loadU4EnumField(d, ptr);\r\n ptr += HashAlgId._size;\r\n\r\n const MajorVersion = loadU2Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU2Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const BuildNumber = loadU2Field(d, ptr);\r\n ptr += BuildNumber._size;\r\n\r\n const RevisionNumber = loadU2Field(d, ptr);\r\n ptr += RevisionNumber._size;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const PublicKey = loadMdsBlobField(d, ptr);\r\n ptr += PublicKey._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Locale = loadMdsStringsField(d, ptr);\r\n ptr += Locale._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n HashAlgId,\r\n MajorVersion,\r\n MinorVersion,\r\n BuildNumber,\r\n RevisionNumber,\r\n Flags,\r\n PublicKey,\r\n Name,\r\n Locale,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyProcessor(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyProcessorItem {\r\n let ptr = p;\r\n\r\n const Processor = loadU4Field(d, ptr);\r\n ptr += Processor._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Processor,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyOS(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyOSItem {\r\n let ptr = p;\r\n\r\n const OSPlatformID = loadU4Field(d, ptr);\r\n ptr += OSPlatformID._size;\r\n\r\n const OSMajorVersion = loadU4Field(d, ptr);\r\n ptr += OSMajorVersion._size;\r\n\r\n const OSMinorVersion = loadU4Field(d, ptr);\r\n ptr += OSMinorVersion._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n OSPlatformID,\r\n OSMajorVersion,\r\n OSMinorVersion,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyRef(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyRefItem {\r\n let ptr = p;\r\n\r\n const MajorVersion = loadU2Field(d, ptr);\r\n ptr += MajorVersion._size;\r\n\r\n const MinorVersion = loadU2Field(d, ptr);\r\n ptr += MinorVersion._size;\r\n\r\n const BuildNumber = loadU2Field(d, ptr);\r\n ptr += BuildNumber._size;\r\n\r\n const RevisionNumber = loadU2Field(d, ptr);\r\n ptr += RevisionNumber._size;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const PublicKeyOrToken = loadMdsBlobField(d, ptr);\r\n ptr += PublicKeyOrToken._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Locale = loadMdsStringsField(d, ptr);\r\n ptr += Locale._size;\r\n\r\n const HashValue = loadMdsBlobField(d, ptr);\r\n ptr += HashValue._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n MajorVersion,\r\n MinorVersion,\r\n BuildNumber,\r\n RevisionNumber,\r\n Flags,\r\n PublicKeyOrToken,\r\n Name,\r\n Locale,\r\n HashValue,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyRefProcessor(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyRefProcessorItem {\r\n let ptr = p;\r\n\r\n const Processor = loadU4Field(d, ptr);\r\n ptr += Processor._size;\r\n\r\n const AssemblyRef = loadMdtRidField(d, F.MetadataTableIndex.AssemblyRef, ptr);\r\n ptr += AssemblyRef._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Processor,\r\n AssemblyRef,\r\n };\r\n}\r\n\r\nexport function loadMdtAssemblyRefOS(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtAssemblyRefOSItem {\r\n let ptr = p;\r\n\r\n const OSPlatformID = loadU4Field(d, ptr);\r\n ptr += OSPlatformID._size;\r\n\r\n const OSMajorVersion = loadU4Field(d, ptr);\r\n ptr += OSMajorVersion._size;\r\n\r\n const OSMinorVersion = loadU4Field(d, ptr);\r\n ptr += OSMinorVersion._size;\r\n\r\n const AssemblyRef = loadMdtRidField(d, F.MetadataTableIndex.AssemblyRef, ptr);\r\n ptr += AssemblyRef._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n OSPlatformID,\r\n OSMajorVersion,\r\n OSMinorVersion,\r\n AssemblyRef,\r\n };\r\n}\r\n\r\nexport function loadMdtFile(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtFileItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const HashValue = loadMdsBlobField(d, ptr);\r\n ptr += HashValue._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n Name,\r\n HashValue,\r\n };\r\n}\r\n\r\nexport function loadMdtExportedType(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtExportedTypeItem {\r\n let ptr = p;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const TypeDefId = loadU4Field(d, ptr);\r\n ptr += TypeDefId._size;\r\n\r\n const TypeName = loadMdsStringsField(d, ptr);\r\n ptr += TypeName._size;\r\n\r\n const TypeNamespace = loadMdsStringsField(d, ptr);\r\n ptr += TypeNamespace._size;\r\n\r\n const Implementation = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.Implementation, ptr);\r\n ptr += Implementation._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Flags,\r\n TypeDefId,\r\n TypeName,\r\n TypeNamespace,\r\n Implementation,\r\n };\r\n}\r\n\r\nexport function loadMdtManifestResource(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtManifestResourceItem {\r\n let ptr = p;\r\n\r\n const Offset = loadU4Field(d, ptr);\r\n ptr += Offset._size;\r\n\r\n const Flags = loadU4EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n const Implementation = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.Implementation, ptr);\r\n ptr += Implementation._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Offset,\r\n Flags,\r\n Name,\r\n Implementation,\r\n };\r\n}\r\n\r\nexport function loadMdtNestedClass(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtNestedClassItem {\r\n let ptr = p;\r\n\r\n const NestedClass = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += NestedClass._size;\r\n\r\n const EnclosingClass = loadMdtRidField(d, F.MetadataTableIndex.TypeDef, ptr);\r\n ptr += EnclosingClass._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n NestedClass,\r\n EnclosingClass,\r\n };\r\n}\r\n\r\nexport function loadMdtGenericParam(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtGenericParamItem {\r\n let ptr = p;\r\n\r\n const Number = loadU2Field(d, ptr);\r\n ptr += Number._size;\r\n\r\n const Flags = loadU2EnumField(d, ptr);\r\n ptr += Flags._size;\r\n\r\n const Owner = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeOrMethodDef, ptr);\r\n ptr += Owner._size;\r\n\r\n const Name = loadMdsStringsField(d, ptr);\r\n ptr += Name._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Number,\r\n Flags,\r\n Owner,\r\n Name,\r\n };\r\n}\r\n\r\nexport function loadMdtMethodSpec(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtMethodSpecItem {\r\n let ptr = p;\r\n\r\n const Method = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.MethodDefOrRef, ptr);\r\n ptr += Method._size;\r\n\r\n const Instantiation = loadMdsBlobField(d, ptr);\r\n ptr += Instantiation._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Method,\r\n Instantiation,\r\n };\r\n}\r\n\r\nexport function loadMdtGenericParamConstraint(d: FileDataProvider & MetadataSizingProvider, p: number): S.MdtGenericParamConstraintItem {\r\n let ptr = p;\r\n\r\n const Owner = loadMdtRidField(d, F.MetadataTableIndex.GenericParam, ptr);\r\n ptr += Owner._size;\r\n\r\n const Constraint = loadMdCodedTokenField(d, F.MetadataCodedTokenIndex.TypeDefOrRef, ptr);\r\n ptr += Constraint._size;\r\n\r\n return {\r\n _offset: p, _size: ptr - p,\r\n Owner,\r\n Constraint,\r\n };\r\n}\r\n","import * as S from \"./structures\";\r\nimport * as A from \"./aux-structures\";\r\nimport * as L from \"./loader\";\r\nimport * as F from \"./image-flags\";\r\nimport * as E from \"./error\";\r\nimport * as U from \"./utils\";\r\n\r\nexport class PEImage implements L.FileDataProvider, L.MetadataSizingProvider {\r\n public static load(buf: ArrayBuffer): PEImage {\r\n return new PEImage(buf);\r\n }\r\n\r\n //\r\n // FileDataProvider functions.\r\n //\r\n\r\n public getU1(p: number): number {\r\n this.check(p, 1);\r\n return this.data.getUint8(p);\r\n }\r\n\r\n public getU2(p: number): number {\r\n this.check(p, 2);\r\n return this.data.getUint16(p, true);\r\n }\r\n\r\n public getU4(p: number): number {\r\n this.check(p, 3);\r\n return this.data.getUint32(p, true);\r\n }\r\n\r\n public getData(p: number, sz: number): Uint8Array {\r\n this.check(p, sz);\r\n return new Uint8Array(this.data.buffer.slice(p, p + sz));\r\n }\r\n\r\n //\r\n // Image attributes.\r\n //\r\n\r\n public is32Bit(): boolean | undefined {\r\n const optHdr = this.getOptionalHeader();\r\n if (optHdr == null) {\r\n return undefined;\r\n }\r\n\r\n switch (optHdr.Magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC: return true;\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC: return false;\r\n default: return undefined;\r\n }\r\n }\r\n\r\n public isManaged(): boolean {\r\n const dd = this.getDataDirectories();\r\n return dd != null && this.isDataDirectoryValid(\r\n dd.items[F.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR]\r\n );\r\n }\r\n\r\n public hasMetadata(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.MetaData);\r\n }\r\n\r\n public hasManagedResources(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.Resources);\r\n }\r\n\r\n public hasStrongNameSignature(): boolean {\r\n const h = this.getCliHeader();\r\n return h != null && this.isDataDirectoryValid(h.StrongNameSignature);\r\n }\r\n\r\n public isMetadataTableValid(id: F.MetadataTableIndex): boolean {\r\n const info = this.metadataTableInfo;\r\n if (info && info[id]) {\r\n return info[id].valid;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public isMetadataTableSorted(id: F.MetadataTableIndex): boolean {\r\n const info = this.metadataTableInfo;\r\n if (info && info[id]) {\r\n return info[id].sorted;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public getMetadataTableRows(id: F.MetadataTableIndex): number {\r\n const info = this.metadataTableInfo;\r\n if (info && info[id]) {\r\n return info[id].rows;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n //\r\n // Image headers.\r\n //\r\n\r\n public getDosHeader(): S.ImageDosHeader | undefined {\r\n return this.dosHeader;\r\n }\r\n\r\n public getPESignature(): S.U4Field | undefined {\r\n return this.peSignature;\r\n }\r\n\r\n public getFileHeader(): S.ImageFileHeader | undefined {\r\n return this.fileHeader;\r\n }\r\n\r\n public getOptionalHeader(): S.ImageOptionalHeader32 | S.ImageOptionalHeader64 | undefined {\r\n return this.optionalHeader;\r\n }\r\n\r\n public getDataDirectories(): S.StructArray | undefined {\r\n return this.dataDirectories;\r\n }\r\n\r\n public getSectionHeaders(): S.StructArray | undefined {\r\n return this.sectionHeaders;\r\n }\r\n\r\n //\r\n // Metadata structures.\r\n //\r\n\r\n public getCliHeader(): S.CliHeader | undefined {\r\n if (this.cliHeader) return this.cliHeader;\r\n if (!this.isManaged()) return undefined;\r\n\r\n const offset = this.rvaToOffset(this.dataDirectories!\r\n .items[F.ImageDirectoryEntry.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR]\r\n .VirtualAddress.value);\r\n\r\n this.cliHeader = L.loadCliHeader(this, offset);\r\n return this.cliHeader;\r\n }\r\n\r\n public getMetadataRoot(): S.MetadataRoot | undefined {\r\n if (this.metadataRoot) return this.metadataRoot;\r\n\r\n const cliHeader = this.getCliHeader();\r\n if (!cliHeader) return undefined;\r\n\r\n const offset = this.rvaToOffset(cliHeader.MetaData.VirtualAddress.value);\r\n if (!offset) return undefined;\r\n\r\n this.metadataRoot = L.loadMetadataRoot(this, offset);\r\n return this.metadataRoot;\r\n }\r\n\r\n public getMetadataStreamHeaders(): S.StructArray | undefined {\r\n if (this.metadataStreamHeaders) return this.metadataStreamHeaders;\r\n\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot || !mdRoot.Streams.value) return undefined;\r\n\r\n this.metadataStreamHeaders = L.loadStructArrayByCount(\r\n this,\r\n mdRoot._offset + mdRoot._size,\r\n L.loadMetadataStreamHeader,\r\n mdRoot.Streams.value\r\n );\r\n return this.metadataStreamHeaders;\r\n }\r\n\r\n public getMetadataStreamHeader(name: F.MetadataStreamName): S.MetadataStreamHeader | undefined {\r\n const headers = this.getMetadataStreamHeaders();\r\n if (!headers) return undefined;\r\n\r\n return headers.items.filter(v => v.Name.value == name).shift();\r\n }\r\n\r\n public getStrongNameSignature(): S.Field | undefined {\r\n if (this.strongNameSignature) return this.strongNameSignature;\r\n\r\n const cliHeader = this.getCliHeader();\r\n if (!cliHeader) return undefined;\r\n\r\n const offset = this.rvaToOffset(cliHeader.StrongNameSignature.VirtualAddress.value);\r\n if (!offset) return undefined;\r\n\r\n this.strongNameSignature = L.loadFixedSizeByteArrayField(\r\n this, offset,\r\n cliHeader.StrongNameSignature.Size.value);\r\n return this.strongNameSignature;\r\n }\r\n\r\n public getMetadataTableHeader(): S.MetadataTableHeader | undefined {\r\n if (this.metadataTableHeader) return this.metadataTableHeader;\r\n\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.Table);\r\n if (!sh) return undefined;\r\n\r\n const offset = mdRoot._offset + sh.Offset.value;\r\n this.metadataTableHeader = L.loadMetadataTableHeader(this, offset);\r\n this.fillMetadataTableInfo();\r\n this.fillMetadataTableInfoExtra();\r\n\r\n return this.metadataTableHeader;\r\n }\r\n\r\n public getMdsStringsItem(offset: number): S.StringField | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.Strings);\r\n if (!sh) return undefined;\r\n\r\n if (offset < 0 || offset >= sh.Size.value) {\r\n return undefined;\r\n } else {\r\n return L.loadNullTerminatedStringField(this,\r\n mdRoot._offset + sh.Offset.value + offset);\r\n }\r\n }\r\n\r\n public getMdsUSItem(offset: number): S.MetadataUSItem | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.US);\r\n if (!sh) return undefined;\r\n\r\n if (offset < 0 || offset >= sh.Size.value) {\r\n return undefined;\r\n } else {\r\n return L.loadMetadataUSItem(this,\r\n mdRoot._offset + sh.Offset.value + offset);\r\n }\r\n }\r\n\r\n public getMdsGuidItems(): S.StructArray | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.GUID);\r\n if (!sh) return undefined;\r\n\r\n const count = sh.Size.value / 16;\r\n return L.loadStructArrayByCount(\r\n this,\r\n mdRoot._offset + sh.Offset.value,\r\n (d, p) => L.loadFixedSizeByteArrayField(d, p, 16),\r\n count);\r\n }\r\n\r\n public getMdsBlobItem(offset: number): S.MetadataBlobItem | undefined {\r\n const mdRoot = this.getMetadataRoot();\r\n if (!mdRoot) return undefined;\r\n\r\n const sh = this.getMetadataStreamHeader(F.MetadataStreamName.Blob);\r\n if (!sh) return undefined;\r\n\r\n if (offset < 0 || offset >= sh.Size.value) {\r\n return undefined;\r\n } else {\r\n return L.loadMetadataBlobItem(this,\r\n mdRoot._offset + sh.Offset.value + offset);\r\n }\r\n }\r\n\r\n public getMdtModuleItem(rid /* 1-based */: number): S.MdtModuleItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Module, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Module];\r\n return L.loadMdtModule(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtTypeRefItem(rid /* 1-based */: number): S.MdtTypeRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.TypeRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Module];\r\n return L.loadMdtTypeRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtTypeDefItem(rid /* 1-based */: number): S.MdtTypeDefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.TypeDef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.TypeDef];\r\n return L.loadMdtTypeDef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldPtrItem(rid /* 1-based */: number): S.MdtFieldPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldPtr];\r\n return L.loadMdtFieldPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldItem(rid /* 1-based */: number): S.MdtFieldItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Field, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Field];\r\n return L.loadMdtField(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodPtrItem(rid /* 1-based */: number): S.MdtMethodPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodPtr];\r\n return L.loadMdtMethodPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodDefItem(rid /* 1-based */: number): S.MdtMethodDefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodDef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodDef];\r\n return L.loadMdtMethodDef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtParamPtrItem(rid /* 1-based */: number): S.MdtParamPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ParamPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ParamPtr];\r\n return L.loadMdtParamPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtParamItem(rid /* 1-based */: number): S.MdtParamItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Param, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Param];\r\n return L.loadMdtParam(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtInterfaceImplItem(rid /* 1-based */: number): S.MdtInterfaceImplItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.InterfaceImpl, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.InterfaceImpl];\r\n return L.loadMdtInterfaceImpl(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMemberRefItem(rid /* 1-based */: number): S.MdtMemberRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MemberRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MemberRef];\r\n return L.loadMdtMemberRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtConstantItem(rid /* 1-based */: number): S.MdtConstantItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Constant, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Constant];\r\n return L.loadMdtConstant(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtCustomAttributeItem(rid /* 1-based */: number): S.MdtCustomAttributeItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.CustomAttribute, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.CustomAttribute];\r\n return L.loadMdtCustomAttribute(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldMarshalItem(rid /* 1-based */: number): S.MdtFieldMarshalItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldMarshal, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldMarshal];\r\n return L.loadMdtFieldMarshal(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtDeclSecurityItem(rid /* 1-based */: number): S.MdtDeclSecurityItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.DeclSecurity, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.DeclSecurity];\r\n return L.loadMdtDeclSecurity(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtClassLayoutItem(rid /* 1-based */: number): S.MdtClassLayoutItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ClassLayout, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ClassLayout];\r\n return L.loadMdtClassLayout(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldLayoutItem(rid /* 1-based */: number): S.MdtFieldLayoutItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldLayout, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldLayout];\r\n return L.loadMdtFieldLayout(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtStandAloneSigItem(rid /* 1-based */: number): S.MdtStandAloneSigItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.StandAloneSig, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.StandAloneSig];\r\n return L.loadMdtStandAloneSig(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtEventMapItem(rid /* 1-based */: number): S.MdtEventMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.EventMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.EventMap];\r\n return L.loadMdtEventMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtEventPtrItem(rid /* 1-based */: number): S.MdtEventPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.EventPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.EventPtr];\r\n return L.loadMdtEventPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtEventItem(rid /* 1-based */: number): S.MdtEventItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Event, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Event];\r\n return L.loadMdtEvent(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtPropertyMapItem(rid /* 1-based */: number): S.MdtPropertyMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.PropertyMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.PropertyMap];\r\n return L.loadMdtPropertyMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtPropertyPtrItem(rid /* 1-based */: number): S.MdtPropertyPtrItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.PropertyPtr, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.PropertyPtr];\r\n return L.loadMdtPropertyPtr(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtPropertyItem(rid /* 1-based */: number): S.MdtPropertyItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Property, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Property];\r\n return L.loadMdtProperty(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodSemanticsItem(rid /* 1-based */: number): S.MdtMethodSemanticsItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodSemantics, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodSemantics];\r\n return L.loadMdtMethodSemantics(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodImplItem(rid /* 1-based */: number): S.MdtMethodImplItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodImpl, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodImpl];\r\n return L.loadMdtMethodImpl(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtModuleRefItem(rid /* 1-based */: number): S.MdtModuleRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ModuleRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ModuleRef];\r\n return L.loadMdtModuleRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtTypeSpecItem(rid /* 1-based */: number): S.MdtTypeSpecItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.TypeSpec, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.TypeSpec];\r\n return L.loadMdtTypeSpec(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtImplMapItem(rid /* 1-based */: number): S.MdtImplMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ImplMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ImplMap];\r\n return L.loadMdtImplMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFieldRVAItem(rid /* 1-based */: number): S.MdtFieldRVAItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.FieldRVA, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.FieldRVA];\r\n return L.loadMdtFieldRVA(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtENCLogItem(rid /* 1-based */: number): S.MdtENCLogItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ENCLog, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ENCLog];\r\n return L.loadMdtENCLog(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtENCMapItem(rid /* 1-based */: number): S.MdtENCMapItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ENCMap, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ENCMap];\r\n return L.loadMdtENCMap(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyItem(rid /* 1-based */: number): S.MdtAssemblyItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.Assembly, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.Assembly];\r\n return L.loadMdtAssembly(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyProcessorItem(rid /* 1-based */: number): S.MdtAssemblyProcessorItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyProcessor, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyProcessor];\r\n return L.loadMdtAssemblyProcessor(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyOSItem(rid /* 1-based */: number): S.MdtAssemblyOSItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyOS, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyOS];\r\n return L.loadMdtAssemblyOS(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyRefItem(rid /* 1-based */: number): S.MdtAssemblyRefItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyRef, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyRef];\r\n return L.loadMdtAssemblyRef(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyRefProcessorItem(rid /* 1-based */: number): S.MdtAssemblyRefProcessorItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyRefProcessor, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyRefProcessor];\r\n return L.loadMdtAssemblyRefProcessor(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtAssemblyRefOSItem(rid /* 1-based */: number): S.MdtAssemblyRefOSItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.AssemblyRefOS, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.AssemblyRefOS];\r\n return L.loadMdtAssemblyRefOS(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtFileItem(rid /* 1-based */: number): S.MdtFileItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.File, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.File];\r\n return L.loadMdtFile(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtExportedTypeItem(rid /* 1-based */: number): S.MdtExportedTypeItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ExportedType, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ExportedType];\r\n return L.loadMdtExportedType(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtManifestResourceItem(rid /* 1-based */: number): S.MdtManifestResourceItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.ManifestResource, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.ManifestResource];\r\n return L.loadMdtManifestResource(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtNestedClassItem(rid /* 1-based */: number): S.MdtNestedClassItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.NestedClass, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.NestedClass];\r\n return L.loadMdtNestedClass(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtGenericParamItem(rid /* 1-based */: number): S.MdtGenericParamItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.GenericParam, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.GenericParam];\r\n return L.loadMdtGenericParam(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtMethodSpecItem(rid /* 1-based */: number): S.MdtMethodSpecItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.MethodSpec, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.MethodSpec];\r\n return L.loadMdtMethodSpec(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n public getMdtGenericParamConstraintItem(rid /* 1-based */: number): S.MdtGenericParamConstraintItem | undefined {\r\n if (!this.checkMdt(F.MetadataTableIndex.GenericParamConstraint, rid)) {\r\n return undefined;\r\n }\r\n\r\n const ti = this.metadataTableInfo![F.MetadataTableIndex.GenericParamConstraint];\r\n return L.loadMdtGenericParamConstraint(this, ti.baseOffset + ti.rowSize * (rid - 1));\r\n }\r\n\r\n //\r\n // Metadata sizing.\r\n //\r\n\r\n public getHeapSize(heap: F.MetadataHeapSizeID): number {\r\n if (this.metadataSizingCache.heap) {\r\n return this.metadataSizingCache.heap[heap];\r\n }\r\n\r\n const h = this.getMetadataTableHeader();\r\n if (!h) return 0;\r\n\r\n const getHeapSizeFunc = (heap: F.MetadataHeapSizeID) =>\r\n (h.HeapSizes.value & (1 << heap)) != 0 ? 4 : 2;\r\n\r\n this.metadataSizingCache.heap = [\r\n F.MetadataHeapSizeID.String,\r\n F.MetadataHeapSizeID.GUID,\r\n F.MetadataHeapSizeID.Blob]\r\n .map(v => (h.HeapSizes.value & (1 << v)) != 0 ? 4 : 2);\r\n\r\n return this.metadataSizingCache.heap[heap];\r\n }\r\n\r\n public getTableIDSize(t: F.MetadataTableIndex): number {\r\n const info = this.metadataTableInfo;\r\n if (info && info[t]) {\r\n return info[t].idSize;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n public getCodedTokenSize(t: F.MetadataCodedTokenIndex): number {\r\n if (this.metadataSizingCache.codedToken) {\r\n return this.metadataSizingCache.codedToken[t];\r\n }\r\n\r\n this.metadataSizingCache.codedToken = F.ctc.map(c => {\r\n const maxRows = 0xFFFF >> c.tagSize;\r\n for (let tid of c.tables) {\r\n if (this.getMetadataTableRows(tid) > maxRows) {\r\n return 4;\r\n }\r\n }\r\n return 2;\r\n });\r\n\r\n return this.metadataSizingCache.codedToken[t];\r\n }\r\n\r\n\r\n //\r\n // Utilities.\r\n //\r\n\r\n public rvaToOffset(rva: number): number {\r\n const sh = this.getSectionHeaderByRva(rva);\r\n if (!sh) return 0;\r\n\r\n return rva - sh.VirtualAddress.value + sh.PointerToRawData.value;\r\n }\r\n\r\n public offsetToRva(offset: number): number {\r\n const sh = this.getSectionHeaderByOffset(offset);\r\n if (!sh) return 0;\r\n\r\n return offset - sh.PointerToRawData.value + sh.VirtualAddress.value;\r\n }\r\n\r\n //\r\n // Private implementations.\r\n //\r\n\r\n private check(p: number, sz: number): void {\r\n if (p < 0 || p >= this.data.byteLength\r\n || sz < 0 || p + sz > this.data.byteLength) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DATA_POSITION, p, sz);\r\n }\r\n }\r\n\r\n private constructor(buf: ArrayBuffer) {\r\n this.data = new DataView(buf);\r\n this.loadHeaders();\r\n }\r\n\r\n private loadHeaders(): void {\r\n let ptr = 0;\r\n this.dosHeader = L.loadImageDosHeader(this, ptr);\r\n\r\n if (this.dosHeader.e_magic.value != F.IMAGE_DOS_SIGNATURE) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DOS_SIGNATURE, ptr, 2);\r\n }\r\n\r\n ptr = this.dosHeader.e_lfanew.value;\r\n this.peSignature = L.loadU4Field(this, ptr);\r\n\r\n if (this.peSignature.value != F.IMAGE_NT_SIGNATURE) {\r\n throw new E.PEError(E.PEErrorType.INVALID_PE_SIGNATURE, ptr, 4);\r\n }\r\n\r\n ptr += this.peSignature._size;\r\n this.fileHeader = L.loadImageFileHeader(this, ptr);\r\n\r\n ptr += this.fileHeader._size;\r\n const magic = L.loadU2Field(this, ptr);\r\n switch (magic.value) {\r\n case F.IMAGE_NT_OPTIONAL_HDR32_MAGIC:\r\n this.optionalHeader = L.loadImageOptionalHeader32(this, ptr);\r\n break;\r\n case F.IMAGE_NT_OPTIONAL_HDR64_MAGIC:\r\n this.optionalHeader = L.loadImageOptionalHeader64(this, ptr);\r\n break;\r\n default:\r\n throw new E.PEError(E.PEErrorType.INVALID_OPTIONAL_HEADER_MAGIC, ptr, 2);\r\n }\r\n\r\n if (this.optionalHeader.NumberOfRvaAndSizes.value != F.IMAGE_NUMBEROF_DIRECTORY_ENTRIES) {\r\n throw new E.PEError(E.PEErrorType.INVALID_DATA_DIRECTORY_COUNT,\r\n this.optionalHeader.NumberOfRvaAndSizes._offset,\r\n this.optionalHeader.NumberOfRvaAndSizes._size);\r\n }\r\n\r\n ptr += this.optionalHeader._size;\r\n this.dataDirectories = L.loadStructArrayByCount(this, ptr,\r\n L.loadImageDataDirectory,\r\n this.optionalHeader.NumberOfRvaAndSizes.value);\r\n\r\n ptr += this.dataDirectories._size;\r\n this.sectionHeaders = L.loadStructArrayByCount(this, ptr,\r\n L.loadImageSectionHeader,\r\n this.fileHeader.NumberOfSections.value);\r\n }\r\n\r\n private getSectionHeaderByOffset(offset: number): S.ImageSectionHeader | undefined {\r\n return this.sectionHeaders && this.sectionHeaders.items.filter(h => {\r\n const p = h.PointerToRawData.value;\r\n const sz = h.SizeOfRawData.value;\r\n return offset >= p && offset < p + sz;\r\n }).shift();\r\n }\r\n\r\n private getSectionHeaderByRva(rva: number): S.ImageSectionHeader | undefined {\r\n return this.sectionHeaders && this.sectionHeaders.items.filter(h => {\r\n const p = h.VirtualAddress.value;\r\n const sz = h.VirtualSize.value;\r\n return rva >= p && rva < p + sz;\r\n }).shift();\r\n }\r\n\r\n private isDataDirectoryValid(dd?: S.ImageDataDirectory): boolean {\r\n return (dd && dd.VirtualAddress.value > 0 && dd.Size.value > 0) || false;\r\n }\r\n\r\n private fillMetadataTableInfo(): void {\r\n const h = this.metadataTableHeader;\r\n if (!h) return;\r\n\r\n let info: A.MetadataTableInfo = {};\r\n let nValid = 0;\r\n for (let id = 0; id < F.NumberOfMdTables; id++) {\r\n const valid = U.isSetLong(h.Valid.high, h.Valid.low, id);\r\n const sorted = U.isSetLong(h.Sorted.high, h.Sorted.low, id);\r\n const rows = valid ? h.Rows.items[nValid++].value : 0;\r\n info[id] = {\r\n valid,\r\n sorted,\r\n rows,\r\n idSize: valid ? (rows > 0xFFFF ? 4 : 2) : 0,\r\n baseOffset: 0,\r\n rowSize: 0\r\n };\r\n }\r\n this.metadataTableInfo = info;\r\n }\r\n\r\n private fillMetadataTableInfoExtra(): void {\r\n const h = this.metadataTableHeader;\r\n if (!h) return;\r\n\r\n const ti = this.metadataTableInfo;\r\n if (!ti) return;\r\n\r\n const ctid = F.MetadataCodedTokenIndex;\r\n const ctsz = this.getCodedTokenSize.bind(this);\r\n\r\n const tid = F.MetadataTableIndex;\r\n\r\n const stringsSize = this.getHeapSize(F.MetadataHeapSizeID.String);\r\n const guidSize = this.getHeapSize(F.MetadataHeapSizeID.GUID);\r\n const blobSize = this.getHeapSize(F.MetadataHeapSizeID.Blob);\r\n\r\n let baseOffset = h._offset + h._size;\r\n\r\n let tbli = ti[tid.Module];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + 3 * guidSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.TypeRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.ResolutionScope) + 2 * stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.TypeDef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 2 * stringsSize + ctsz(ctid.TypeDefOrRef) + ti[tid.Field].idSize + ti[tid.MethodDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Field].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Field];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.MethodDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodDef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 2 + 2 + stringsSize + blobSize + ti[tid.Param].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ParamPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Param].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Param];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 2 + stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.InterfaceImpl];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + ctsz(ctid.TypeDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MemberRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.MemberRefParent) + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Constant];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 1 + 1 + ctsz(ctid.HasConstant) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.CustomAttribute];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.HasCustomAttribute) + ctsz(ctid.CustomAttributeType) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldMarshal];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.HasFieldMarshall) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.DeclSecurity];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + ctsz(ctid.HasDeclSecurity) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ClassLayout];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 4 + ti[tid.TypeDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldLayout];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + ti[tid.Field].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.StandAloneSig];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.EventMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + ti[tid.Event].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.EventPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Event].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Event];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + ctsz(ctid.TypeDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.PropertyMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + ti[tid.Property].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.PropertyPtr];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.Property].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Property];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodSemantics];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + ti[tid.MethodDef].idSize + ctsz(ctid.HasSemantics);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodImpl];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.TypeDef].idSize + 2 * ctsz(ctid.MethodDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ModuleRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.TypeSpec];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ImplMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + ctsz(ctid.MemberForwarded) + stringsSize + ti[tid.ModuleRef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.FieldRVA];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + ti[tid.Field].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ENCLog];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ENCMap];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.Assembly];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 2 + 2 + 2 + 2 + 4 + blobSize + 2 * stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyProcessor];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyOS];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + 4;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyRef];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 2 + 2 + 2 + 4 + 2 * blobSize + 2 * stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyRefProcessor];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + ti[tid.AssemblyRef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.AssemblyRefOS];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + 4 + ti[tid.AssemblyRef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.File];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + stringsSize + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ExportedType];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + 2 * stringsSize + ctsz(ctid.Implementation);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.ManifestResource];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 4 + 4 + stringsSize + ctsz(ctid.Implementation);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.NestedClass];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 * ti[tid.TypeDef].idSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.GenericParam];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = 2 + 2 + ctsz(ctid.TypeOrMethodDef) + stringsSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.MethodSpec];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ctsz(ctid.MethodDefOrRef) + blobSize;\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n\r\n tbli = ti[tid.GenericParamConstraint];\r\n if (tbli.valid) {\r\n tbli.baseOffset = baseOffset;\r\n tbli.rowSize = ti[tid.GenericParam].idSize + ctsz(ctid.TypeDefOrRef);\r\n }\r\n baseOffset += tbli.rows * tbli.rowSize;\r\n }\r\n\r\n private checkMdt(tid: F.MetadataTableIndex, rid: number): boolean {\r\n if (!this.metadataTableInfo) {\r\n return false;\r\n }\r\n\r\n const ti = this.metadataTableInfo[tid];\r\n return ti != null && ti.valid && rid > 0 && rid <= ti.rows;\r\n }\r\n\r\n private readonly data: DataView;\r\n\r\n private dosHeader?: S.ImageDosHeader;\r\n private peSignature?: S.U4Field;\r\n private fileHeader?: S.ImageFileHeader;\r\n private optionalHeader?: S.ImageOptionalHeader32 | S.ImageOptionalHeader64;\r\n private dataDirectories?: S.StructArray;\r\n private sectionHeaders?: S.StructArray;\r\n\r\n private cliHeader?: S.CliHeader;\r\n private metadataRoot?: S.MetadataRoot;\r\n private metadataStreamHeaders?: S.StructArray;\r\n private strongNameSignature?: S.Field;\r\n\r\n private metadataTableHeader?: S.MetadataTableHeader;\r\n private metadataTableInfo?: A.MetadataTableInfo;\r\n\r\n private metadataSizingCache: {\r\n heap?: {\r\n [key: number /* F.MetadataHeapSizeID */]: number;\r\n };\r\n codedToken?: {\r\n [key: number /* F.MetadataCodedTokenIndex */]: number;\r\n }\r\n } = {};\r\n}\r\n","export function createResNavDataMessage(navList: W.NavData[]): W.ResNavDataMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_NAV_DATA,\r\n navList\r\n };\r\n}\r\n\r\nexport function createResPageDataMessage(pageData: W.PageData): W.ResPageDataMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PAGE_DATA,\r\n pageData\r\n };\r\n}\r\n\r\nexport function createResPEPropsMessage(is32Bit?: boolean, isManaged?: boolean): W.ResPEPropsMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PE_PROPS,\r\n is32Bit,\r\n isManaged\r\n };\r\n}\r\n\r\nexport function createResPEErrorMessage(error: string): W.ResPEErrorMessage {\r\n return {\r\n type: W.WorkerMessageType.RES_PE_ERROR,\r\n error\r\n };\r\n}\r\n","import * as M from \"./message\";\r\nimport { PEImage } from \"./pe/image\";\r\nimport { generatePageData, clearGeneratorCache } from \"./page-data/generator\";\r\nimport { generateNavList } from \"./page-data/nav-data\";\r\n\r\nlet pe: PEImage | null = null;\r\n\r\nonmessage = (ev) => {\r\n const msg = ev.data as W.WorkerMessage;\r\n switch (msg.type) {\r\n case W.WorkerMessageType.REQ_OPEN_FILE:\r\n handleReqOpenFile(msg as W.ReqOpenFileMessage);\r\n break;\r\n\r\n case W.WorkerMessageType.REQ_OPEN_NAV:\r\n handleReqOpenNav(msg as W.ReqOpenNavMessage);\r\n break;\r\n }\r\n};\r\n\r\nfunction handleReqOpenFile(msg: W.ReqOpenFileMessage): void {\r\n let reader = new FileReader();\r\n\r\n reader.onload = ev => {\r\n try {\r\n const buf = (ev.target).result;\r\n pe = PEImage.load(buf);\r\n clearGeneratorCache();\r\n\r\n // Response with page data.\r\n const pageData = generatePageData(pe, W.PageID.HEADERS);\r\n const pageDataMsg = M.createResPageDataMessage(pageData);\r\n postMessage(pageDataMsg);\r\n\r\n // Response with PE properties.\r\n const is32Bit = pe.is32Bit();\r\n const isManaged = pe.isManaged();\r\n const pePropsMsg = M.createResPEPropsMessage(is32Bit, isManaged);\r\n postMessage(pePropsMsg);\r\n\r\n // Response with navigation data.\r\n const navList = generateNavList(pe);\r\n const navMsg = M.createResNavDataMessage(navList);\r\n postMessage(navMsg);\r\n } catch (ex) {\r\n const msg = M.createResPEErrorMessage(ex.message\r\n || `Unknown error: ${JSON.stringify(ex)}`);\r\n postMessage(msg);\r\n }\r\n };\r\n\r\n reader.onerror = ev => {\r\n pe = null;\r\n const msg = M.createResPEErrorMessage(\"Can't open file.\");\r\n postMessage(msg);\r\n };\r\n\r\n reader.readAsArrayBuffer(msg.file);\r\n}\r\n\r\nfunction handleReqOpenNav(msg: W.ReqOpenNavMessage): void {\r\n if (pe != null) {\r\n const { pageID, subID, pageNum, elemID } = msg.target;\r\n const pageData = generatePageData(pe, pageID, subID, pageNum);\r\n pageData.nav.elemID = elemID;\r\n const res = M.createResPageDataMessage(pageData);\r\n postMessage(res);\r\n }\r\n}"],"sourceRoot":""} \ No newline at end of file