mirror of
https://github.com/horsicq/Detect-It-Easy.git
synced 2026-06-24 01:54:08 +00:00
Performance and memory optimizations for the PE heuristic scanner: - Tighten DOS-PDB scan loop to stop once pdbPathBeginOffset is found (avoids an extra break). - Replace offset tables (k0_off/k1_off/k3_off) with typed Uint8Array to reduce allocations and improve access speed. - Extract a single getDecryptedByte function (removed inner closure) to avoid per-call closure allocation and centralize decrypt logic. - Add a fast-fail check for the most-significant byte of e_lfanew and simplify lfaNewOffset calculation to speed header validation. - Replace multiple inline decryption calls with getDecryptedByte in verifyPeSignature for clarity and efficiency. - Restructure the detection inner loop to early-continue on mismatches and apply lazy evaluation for arithmetic checks (ADD-SUB / SUB-REV) to reduce unnecessary work. Behavior should be unchanged functionally while reducing CPU and memory overhead during scanning. |
||
|---|---|---|
| .. | ||
| .vscode | ||
| _icons | ||
| Amiga | ||
| APK | ||
| Archive | ||
| AtariST | ||
| Binary | ||
| CFBF | ||
| COM | ||
| DEX | ||
| DOS4G | ||
| DOS16M | ||
| ELF | ||
| Image | ||
| IPA | ||
| ISO9660 | ||
| JAR | ||
| JavaClass | ||
| JPEG | ||
| LE | ||
| LX | ||
| MACH | ||
| MACHOFAT | ||
| MSDOS | ||
| NE | ||
| NPM | ||
| PE | ||
| PNG | ||
| PYC | ||
| RAR | ||
| ZIP | ||
| _db_caching | ||
| _debug | ||
| _init | ||
| _runtime_helpers | ||
| ACE | ||
| archive-file | ||
| arj | ||
| Borland | ||
| bytecodeparsers | ||
| cab | ||
| chunkparsers | ||
| CurIcoBPP | ||
| duration | ||
| FASM | ||
| FPC | ||
| info.ini | ||
| language | ||
| MFC | ||
| python | ||
| QtFramework | ||
| rar-file | ||
| read | ||
| RosASM | ||
| shell-script | ||
| soundchips | ||
| SpASM | ||
| TASM32 | ||
| vgmcodingutils | ||
| wxWidgets | ||
| zip-file | ||
| zlib | ||