Repository: horsicq/Detect-It-Easy Branch: master Commit: fb1ac1bf288e Files: 4373 Total size: 10.2 MB Directory structure: gitextract_07avny1o/ ├── .gitattributes ├── .github/ │ ├── FUNDING.yml │ └── workflows/ │ ├── create_beta.yml │ ├── format-js.yml │ └── update_db.yml ├── .gitignore ├── .prettierrc ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── README.md ├── autotools/ │ ├── dbcompiler/ │ │ ├── package.json │ │ ├── task.js │ │ └── worker.js │ ├── dbupdater/ │ │ └── task.py │ └── partner/ │ └── CONFIG ├── changelog.txt ├── db/ │ ├── .vscode/ │ │ ├── about.txt │ │ └── settings.json │ ├── ACE │ ├── APK/ │ │ ├── _APK.0.sg │ │ ├── _init │ │ ├── library_IL2CPP.4.sg │ │ ├── library_SandHook.4.sg │ │ ├── library_UnicomSDK.4.sg │ │ ├── library_Unity.4.sg │ │ ├── package_PackageName.1.sg │ │ ├── packer_Kony.2.sg │ │ ├── protector_APKProtect.2.sg │ │ ├── protector_APKProtector.2.sg │ │ ├── protector_AlibabaProtection.2.sg │ │ ├── protector_AndroidRepublic.2.sg │ │ ├── protector_AppGuard.2.sg │ │ ├── protector_AppSolid.2.sg │ │ ├── protector_BaiduProtection.2.sg │ │ ├── protector_BangBangReinforcement.2.sg │ │ ├── protector_BangcleProtection.2.sg │ │ ├── protector_DXShield.2.sg │ │ ├── protector_DexProtector.2.sg │ │ ├── protector_DingXiangReinforcement.2.sg │ │ ├── protector_EasyShield.2.sg │ │ ├── protector_ExTrus_AppDefence.2.sg │ │ ├── protector_Gemalto.2.sg │ │ ├── protector_Hdus-Wjus.2.sg │ │ ├── protector_Ijiami.2.sg │ │ ├── protector_Jiagu.2.sg │ │ ├── protector_Kiro.2.sg │ │ ├── protector_Kiwi.2.sg │ │ ├── protector_LIAPP.2.sg │ │ ├── protector_MedusaH.2.sg │ │ ├── protector_MobileTencentProtect.2.sg │ │ ├── protector_NQShield.2.sg │ │ ├── protector_NagaPTProtection.2.sg │ │ ├── protector_OLLVM-TTL.2.sg │ │ ├── protector_Obfuscapk.2.sg │ │ ├── protector_PangXie.2.sg │ │ ├── protector_ProGuard.2.sg │ │ ├── protector_QDBH.2.sg │ │ ├── protector_Qihoo360Protection.2.sg │ │ ├── protector_SecNeo.2.sg │ │ ├── protector_SecShell.2.sg │ │ ├── protector_TencentLegu.2.sg │ │ ├── protector_TencentProtection.2.sg │ │ ├── protector_TencentSecurity.2.sg │ │ ├── protector_TongfuShield.2.sg │ │ ├── protector_VDog.2.sg │ │ ├── protector_Virbox.2.sg │ │ ├── protector_Yidun.2.sg │ │ ├── protector_build38.2.sg │ │ ├── protector_iCrypt.2.sg │ │ ├── tool_ApktoolPlus.6.sg │ │ └── tool_SingleJar.3.sg │ ├── Amiga/ │ │ ├── AMOS_Basic.4.sg │ │ ├── AMOS_Compiler_Cruncher.1.sg │ │ ├── Absoft_AC_Basic.4.sg │ │ ├── Absoft_Fortran.4.sg │ │ ├── Amiga_E.4.sg │ │ ├── Amiga_font.1.sg │ │ ├── Aztec_C.4.sg │ │ ├── BHC3_Relocatable.1.sg │ │ ├── BPack_SFX.1.sg │ │ ├── Blitz_BASIC.4.sg │ │ ├── ByteKiller_Clone.1.sg │ │ ├── Chryseis_Cruncher.1.sg │ │ ├── Crunch_Master.1.sg │ │ ├── DICE_C.4.sg │ │ ├── DMS_FMS-Masher.1.sg │ │ ├── Deluxe_Cruncher.1.sg │ │ ├── Free_Pascal.4.sg │ │ ├── GNU_C.4.sg │ │ ├── HQC_Cruncher.1.sg │ │ ├── HiSoft_Basic.4.sg │ │ ├── High_Pressure_Cruncher.1.sg │ │ ├── Jan_Heweliusz_Cruncher.1.sg │ │ ├── Lattice_C.4.sg │ │ ├── LhPak_SFX.1.sg │ │ ├── Master_Cruncher.1.sg │ │ ├── Maxon_C++.4.sg │ │ ├── RexxMasher_(jrms).1.sg │ │ ├── Sound-Tracker_Cruncher.1.sg │ │ ├── Storm_C.4.sg │ │ ├── TNM_Cruncher.1.sg │ │ ├── TSK_Cruncher.1.sg │ │ ├── Time_Cruncher.1.sg │ │ ├── Titanics_Cruncher.1.sg │ │ ├── Turtle_Smasher.1.sg │ │ ├── Ultimate_Packer.1.sg │ │ ├── _Amiga.0.sg │ │ ├── _init │ │ ├── compiler_ABasic.4.sg │ │ ├── compiler_AmigaBasic.4.sg │ │ ├── compiler_GFA-Basic.4.sg │ │ ├── compiler_JForth.4.sg │ │ ├── compiler_Multi-Forth.4.sg │ │ ├── compiler_Oberon-A.4.sg │ │ ├── compiler_PureBasic.4.sg │ │ ├── compiler_VBCC.4.sg │ │ ├── cruncher_AddressHead.1.sg │ │ ├── cruncher_ByteKiller.1.sg │ │ ├── cruncher_CopyCat.1.sg │ │ ├── cruncher_Cranker.1.sg │ │ ├── cruncher_Crunch-Mania.1.sg │ │ ├── cruncher_Crunch-O-Matic.1.sg │ │ ├── cruncher_Crunch.1.sg │ │ ├── cruncher_CrunchyDat.1.sg │ │ ├── cruncher_Defjam.1.sg │ │ ├── cruncher_DoubleAction.1.sg │ │ ├── cruncher_DragPack.1.sg │ │ ├── cruncher_FileShield.1.sg │ │ ├── cruncher_FlashSpeed.1.sg │ │ ├── cruncher_GnuPacker.1.sg │ │ ├── cruncher_House.1.sg │ │ ├── cruncher_ISC.1.sg │ │ ├── cruncher_Imploder.1.sg │ │ ├── cruncher_MOPacker.1.sg │ │ ├── cruncher_MaxPacker.1.sg │ │ ├── cruncher_MegaCruncher.1.sg │ │ ├── cruncher_PackIt.1.sg │ │ ├── cruncher_Pak.1.sg │ │ ├── cruncher_PowerPacker.1.sg │ │ ├── cruncher_ProPack.1.sg │ │ ├── cruncher_ReXXMaSHeR.1.sg │ │ ├── cruncher_Relokit.1.sg │ │ ├── cruncher_S-Exec.1.sg │ │ ├── cruncher_Shrinkler.1.sg │ │ ├── cruncher_Spike.1.sg │ │ ├── cruncher_StoneCracker.1.sg │ │ ├── cruncher_Super-Cruncher.1.sg │ │ ├── cruncher_SyncroPacker.1.sg │ │ ├── cruncher_TUC.1.sg │ │ ├── cruncher_TetraCrunch.1.sg │ │ ├── cruncher_TetraPack.1.sg │ │ ├── cruncher_TryIt.1.sg │ │ ├── cruncher_TurboSqueezer.1.sg │ │ ├── cruncher_xpkmaster.1.sg │ │ ├── joiner_ETA.1.sg │ │ ├── joiner_EXP.1.sg │ │ ├── joiner_Glue.1.sg │ │ ├── library_library.1.sg │ │ ├── module_DeliTracker.1.sg │ │ ├── other_other.1.sg │ │ ├── self-displayer_DPS.1.sg │ │ ├── self-displayer_Iff2ex.1.sg │ │ ├── self-displayer_S-Anim.1.sg │ │ ├── self-displayer_S-Pic.1.sg │ │ ├── sfx_DIMP.1.sg │ │ ├── sfx_DMSSFX.1.sg │ │ ├── sfx_LHASFX.1.sg │ │ ├── sfx_LHSFX.1.sg │ │ ├── tool_EFFECT-loader.1.sg │ │ └── tool_VideoTracker.1.sg │ ├── Archive/ │ │ ├── _Archive.0.sg │ │ └── _init │ ├── AtariST/ │ │ ├── _AtariST.0.sg │ │ └── _init │ ├── Binary/ │ │ ├── Amiga_loadable.1.sg │ │ ├── Certificate_cert.WinAuth.1.sg │ │ ├── RIFF.1.sg │ │ ├── ROM_1.sg │ │ ├── U-Boot.1.sg │ │ ├── __MiniExtensionsHeuristic_By_DosX.7.sg │ │ ├── __MiniJavaScriptHeuristic_By_DosX.7.sg │ │ ├── _init │ │ ├── archive.ACE.1.sg │ │ ├── archive.ARJ.1.sg │ │ ├── archive.DEFLATE.1.sg │ │ ├── archive.LZ4.1.sg │ │ ├── archive.MS_Compound.1.sg │ │ ├── archive.PC_Secure.sg │ │ ├── archive.RAR.1.sg │ │ ├── archive.ZIP.1.sg │ │ ├── archive.ZLIB.1.sg │ │ ├── archive_7z.1.sg │ │ ├── archive_ANC-Cruncher.1.sg │ │ ├── archive_AR.1.sg │ │ ├── archive_ARC.1.sg │ │ ├── archive_ASAR.1.sg │ │ ├── archive_BCSAR.1.sg │ │ ├── archive_BZip.1.sg │ │ ├── archive_CCA.1.sg │ │ ├── archive_CFL3.1.sg │ │ ├── archive_CKP.1.sg │ │ ├── archive_Cab.1.sg │ │ ├── archive_DAA.1.sg │ │ ├── archive_DCP.1.sg │ │ ├── archive_DXA.1.sg │ │ ├── archive_DatPack.1.sg │ │ ├── archive_DotBundle.sg │ │ ├── archive_EdgeDataPak.1.sg │ │ ├── archive_Flatpak.1.sg │ │ ├── archive_GhidraZipFile.1.sg │ │ ├── archive_GodotPCK.1.sg │ │ ├── archive_HIP.1.sg │ │ ├── archive_IFP.1.sg │ │ ├── archive_IPW.1.sg │ │ ├── archive_InnoSetup.1.sg │ │ ├── archive_JAM.1.sg │ │ ├── archive_LAB.1.sg │ │ ├── archive_LRZ.1.sg │ │ ├── archive_LZOP.1.sg │ │ ├── archive_MCS.1.sg │ │ ├── archive_MS-WIM.1.sg │ │ ├── archive_MWD.1.sg │ │ ├── archive_P2L.1.sg │ │ ├── archive_PAK.1.sg │ │ ├── archive_PBP.1.sg │ │ ├── archive_PEA.1.sg │ │ ├── archive_PKG.1.sg │ │ ├── archive_PSARC.1.sg │ │ ├── archive_PUP.1.sg │ │ ├── archive_RVZ.1.sg │ │ ├── archive_STK.1.sg │ │ ├── archive_Shaped.1.sg │ │ ├── archive_TRE.1.sg │ │ ├── archive_Unity.1.sg │ │ ├── archive_UnrealEngine.1.sg │ │ ├── archive_ViseInstaller.1.sg │ │ ├── archive_XZP.1.sg │ │ ├── archive_ZPAQ.1.sg │ │ ├── archive_archives.1.sg │ │ ├── archive_archives.ancient.sg │ │ ├── archive_btoa.1.sg │ │ ├── archive_cad.DWG.1.sg │ │ ├── archive_gp7bank.1.sg │ │ ├── audio.1.sg │ │ ├── audio_8svx.1.sg │ │ ├── audio_ACM.1.sg │ │ ├── audio_ADX.1.sg │ │ ├── audio_AHX.1.sg │ │ ├── audio_AIF.1.sg │ │ ├── audio_AU.1.sg │ │ ├── audio_BCSTM.1.sg │ │ ├── audio_BCWAV.1.sg │ │ ├── audio_CXT.1.sg │ │ ├── audio_DSS.1.sg │ │ ├── audio_EXA.1.sg │ │ ├── audio_FLAC.1.sg │ │ ├── audio_FSB.1.sg │ │ ├── audio_HMI.1.sg │ │ ├── audio_OGG.1.sg │ │ ├── audio_PAF.1.sg │ │ ├── audio_PVF.1.sg │ │ ├── audio_RIFF-IMA.1.sg │ │ ├── audio_SOU.1.sg │ │ ├── audio_STRM.1.sg │ │ ├── audio_STRM.2.sg │ │ ├── audio_ShockwaveAudio.1.sg │ │ ├── audio_TUN.1.sg │ │ ├── audio_VOC.1.sg │ │ ├── audio_WAV.1.sg │ │ ├── audio_WEM.1.sg │ │ ├── audio_mp3.2.sg │ │ ├── backup_images.1.sg │ │ ├── bin.Atari_ST.1.sg │ │ ├── bin.IDA.1.sg │ │ ├── bin.ISO_9660.1.sg │ │ ├── bin.RPGMaker2Kdata.1.sg │ │ ├── data_overlay_null_padding.1.sg │ │ ├── data_overlays.6.sg │ │ ├── debug_data_debugData.1.sg │ │ ├── font.ADOBE.1.sg │ │ ├── font_BMF.1.sg │ │ ├── font_FFN.1.sg │ │ ├── font_TFM.1.sg │ │ ├── font_VTF.1.sg │ │ ├── font_XTT.1.sg │ │ ├── format_AS.1.sg │ │ ├── format_AmigaIcon.1.sg │ │ ├── format_BCD1.1.sg │ │ ├── format_BOU.1.sg │ │ ├── format_BSP.1.sg │ │ ├── format_BTF.1.sg │ │ ├── format_BackupMii.1.sg │ │ ├── format_CCD.1.sg │ │ ├── format_CSO.1.sg │ │ ├── format_CTRK.1.sg │ │ ├── format_CURE.1.sg │ │ ├── format_CVM.1.sg │ │ ├── format_DESKTOP.1.sg │ │ ├── format_DSW.1.sg │ │ ├── format_DTA.1.sg │ │ ├── format_Director.1.sg │ │ ├── format_DunkleSchattenConfig.1.sg │ │ ├── format_DunkleSchattenSave.1.sg │ │ ├── format_Empty.1.sg │ │ ├── format_FAS.1.sg │ │ ├── format_FLDB.1.sg │ │ ├── format_FNX.1.sg │ │ ├── format_FST.1.sg │ │ ├── format_GAL.1.sg │ │ ├── format_GBI.1.sg │ │ ├── format_GME.1.sg │ │ ├── format_GameMaps.1.sg │ │ ├── format_GamingRoot.1.sg │ │ ├── format_HIV.1.sg │ │ ├── format_HNM.1.sg │ │ ├── format_HSM.1.sg │ │ ├── format_ILK.1.sg │ │ ├── format_IPCH.1.sg │ │ ├── format_ITL.1.sg │ │ ├── format_IVF.1.sg │ │ ├── format_Img.UDIF.1.sg │ │ ├── format_InnoSetupUninstall.1.sg │ │ ├── format_InterleafFile.1.sg │ │ ├── format_LCA.1.sg │ │ ├── format_LGX.1.sg │ │ ├── format_LIXS.1.sg │ │ ├── format_LVL.1.sg │ │ ├── format_MAT.1.sg │ │ ├── format_MDL.1.sg │ │ ├── format_MDS.1.sg │ │ ├── format_MS-DBG.1.sg │ │ ├── format_MS-PST.sg │ │ ├── format_MS-VHD.1.sg │ │ ├── format_MS-VHDX.sg │ │ ├── format_MS-XNA.1.sg │ │ ├── format_OBC.1.sg │ │ ├── format_OpenSSH.1.sg │ │ ├── format_P7X.1.sg │ │ ├── format_PAT.1.sg │ │ ├── format_PDB.1.sg │ │ ├── format_PEM.1.sg │ │ ├── format_PGP.1.sg │ │ ├── format_POL.1.sg │ │ ├── format_PRI.1.sg │ │ ├── format_PS-X.1.sg │ │ ├── format_PSM2CFG.1.sg │ │ ├── format_RARREG.1.sg │ │ ├── format_RCK.1.sg │ │ ├── format_RCO.1.sg │ │ ├── format_RGS.1.sg │ │ ├── format_RedShirt.1.sg │ │ ├── format_SDI.1.sg │ │ ├── format_SFK.1.sg │ │ ├── format_SHBIN.1.sg │ │ ├── format_SLN.1.sg │ │ ├── format_SLNX.1.sg │ │ ├── format_SSHPublicKey.1.sg │ │ ├── format_SystemErr.1.sg │ │ ├── format_TLB.1.sg │ │ ├── format_TOT.1.sg │ │ ├── format_TPU.1.sg │ │ ├── format_UCM.1.sg │ │ ├── format_UPC.1.sg │ │ ├── format_UPF.1.sg │ │ ├── format_UPI.1.sg │ │ ├── format_VDI.1.sg │ │ ├── format_VM2.1.sg │ │ ├── format_VTF.1.sg │ │ ├── format_VVD.1.sg │ │ ├── format_W3D.1.sg │ │ ├── format_WASM.1.sg │ │ ├── format_WBFS.1.sg │ │ ├── format_XBE.1.sg │ │ ├── format_XBF.1.sg │ │ ├── format_XCG.1.sg │ │ ├── format_XCI.1.sg │ │ ├── format_XCR.1.sg │ │ ├── format_XCS.1.sg │ │ ├── format_XDelta.1.sg │ │ ├── format_XEX.1.sg │ │ ├── format_ZZDATA.1.sg │ │ ├── format_ZinsSAV.1.sg │ │ ├── format_bin.AAALogo.1.sg │ │ ├── format_bin.COL.1.sg │ │ ├── format_bin.GuitarPro.1.sg │ │ ├── format_bin.Hermes.1.sg │ │ ├── format_bin.JMDL.1.sg │ │ ├── format_bin.JSC.1.sg │ │ ├── format_bin.Java.1.sg │ │ ├── format_bin.KeePass.1.sg │ │ ├── format_bin.LUA.1.sg │ │ ├── format_bin.NVA.1.sg │ │ ├── format_bin.Nintendo-certified-file.1.sg │ │ ├── format_bin.PEFF.1.sg │ │ ├── format_bin.PalmFile.1.sg │ │ ├── format_bin.Python.1.sg │ │ ├── format_bin.SWF.1.sg │ │ ├── format_bin.VCF.1.sg │ │ ├── format_bin.WindowsIconCacheDB.1.sg │ │ ├── format_database.SQLite.1.sg │ │ ├── format_databases.1.sg │ │ ├── format_doc.CHM.1.sg │ │ ├── format_doc.DJVU.1.sg │ │ ├── format_doc.HLP.1.sg │ │ ├── format_doc.PDF.1.sg │ │ ├── format_doc.RTF.1.sg │ │ ├── format_iCalender.1.sg │ │ ├── format_img.VM.1.sg │ │ ├── format_text.RegistryFile.sg │ │ ├── format_text.pdb.1.sg │ │ ├── format_text.plaintext.3.sg │ │ ├── format_video.BIK.1.sg │ │ ├── format_video.BK2.1.sg │ │ ├── format_video.FLV.1.sg │ │ ├── format_video.MOV.1.sg │ │ ├── format_video.MP4.1.sg │ │ ├── format_video.Matroska.1.sg │ │ ├── format_video.RobotAnimation.1.sg │ │ ├── format_video.Smacker.1.sg │ │ ├── format_video.VMD.1.sg │ │ ├── formats.1.sg │ │ ├── graphics.1.sg │ │ ├── image.PNG.1.sg │ │ ├── image_ANI.1.sg │ │ ├── image_BMP.1.sg │ │ ├── image_CUR.1.sg │ │ ├── image_DDS.1.sg │ │ ├── image_EPS.1.sg │ │ ├── image_FSH.1.sg │ │ ├── image_GIF.1.sg │ │ ├── image_ICNS.sg │ │ ├── image_ICO.1.sg │ │ ├── image_IMG.1.sg │ │ ├── image_JNG.1.sg │ │ ├── image_JPEG.1.sg │ │ ├── image_JPEGXL.1.sg │ │ ├── image_KTX.1.sg │ │ ├── image_LBM.1.sg │ │ ├── image_MNG.1.sg │ │ ├── image_PCX.1.sg │ │ ├── image_PSD.1.sg │ │ ├── image_PVR.1.sg │ │ ├── image_QOI.1.sg │ │ ├── image_SMDH.1.sg │ │ ├── image_TGA.1.sg │ │ ├── image_TIFF.1.sg │ │ ├── image_XAR.1.sg │ │ ├── image_XCF.1.sg │ │ ├── image_bin.ZBMP.1.sg │ │ ├── image_heuristic.image.HDR.1.sg │ │ ├── protector_javascript-obfuscator.2.sg │ │ ├── rom_32X.1.sg │ │ ├── script_text.Shell.1.sg │ │ ├── shellcode.pe_to_shellcode.1.sg │ │ ├── shellcode_donut.1.sg │ │ ├── shellcode_srdi-monoxgas.1.sg │ │ ├── source_text.HTML.1.sg │ │ ├── source_text.Pascal.1.sg │ │ ├── source_text.XML.1.sg │ │ ├── source_text.c.1.sg │ │ ├── source_text.python.1.sg │ │ ├── text.script.2.sg │ │ └── win_resources.1.sg │ ├── Borland │ ├── CFBF/ │ │ ├── Microsoft_Installer.1.sg │ │ ├── Microsoft_Office.1.sg │ │ ├── _CFBF.0.sg │ │ └── _init │ ├── COM/ │ │ ├── 32-bit_crypt.2.sg │ │ ├── COM_Sccrambler.2.sg │ │ ├── Character_Intro_Engine.1.sg │ │ ├── Crypt_(CyPoxl).2.sg │ │ ├── Crypt_(Dismember).2.sg │ │ ├── Deep_Crypter.2.sg │ │ ├── Dn.COM_Cruncher.2.sg │ │ ├── Inbuild_Encryption.2.sg │ │ ├── LHarc_SFX.1.sg │ │ ├── Maveriks_C0der.2.sg │ │ ├── Microsoft_C.4.sg │ │ ├── Microsoft_RTL.3.sg │ │ ├── MrHDKiller_Protection.2.sg │ │ ├── PC_FORTH.4.sg │ │ ├── RDT_ENC_3.2.sg │ │ ├── RTD_Compressor.2.sg │ │ ├── RTD_Compressor2.2.sg │ │ ├── SHOW_IT.1.sg │ │ ├── SPHINX_C--.4.sg │ │ ├── Shade's_COM_Encryptor.2.sg │ │ ├── Shadow_COM_encryptor.2.sg │ │ ├── TPC_Scramble.2.sg │ │ ├── Text_Header.1.sg │ │ ├── The_DRAW.1.sg │ │ ├── Tiny_Xor.2.sg │ │ ├── Unknown_cryptors.2.sg │ │ ├── VGA_font_loader.1.sg │ │ ├── VSF&K_protection.2.sg │ │ ├── WSP_self_update.2.sg │ │ ├── WiZ_Cryptor.2.sg │ │ ├── _COM.0.sg │ │ ├── _init │ │ ├── compiler_8086_Forth_83.4.sg │ │ ├── compiler_ASIC-Basic.4.sg │ │ ├── compiler_BAT2EXEC.2.sg │ │ ├── compiler_BatLite.4.sg │ │ ├── compiler_Borland_C++.4.sg │ │ ├── compiler_Datalight_C.4.sg │ │ ├── compiler_Easy!-C.4.sg │ │ ├── compiler_Fig-FORTH.4.sg │ │ ├── compiler_ForthCMP.2.sg │ │ ├── compiler_ForthCMP.4.sg │ │ ├── compiler_GP-FORTH.4.sg │ │ ├── compiler_Lattice_C.4.sg │ │ ├── compiler_MICRO-C.4.sg │ │ ├── compiler_MINIFORTH.4.sg │ │ ├── compiler_MoonRock.2.sg │ │ ├── compiler_OUTFORTH.4.sg │ │ ├── compiler_PBFC.2.sg │ │ ├── compiler_RMCOBOL.4.sg │ │ ├── compiler_SP-FORTH.4.sg │ │ ├── compiler_Surpas-86.4.sg │ │ ├── compiler_TCOM.4.sg │ │ ├── compiler_Turbo_C++.4.sg │ │ ├── compiler_Turbo_C.4.sg │ │ ├── compiler_Turbo_Pascal.4.sg │ │ ├── compiler_UNIFORTH.4.sg │ │ ├── compiler_Vienna-C.4.sg │ │ ├── compiler_Watcom_C.4.sg │ │ ├── compiler_Zbikowski_C.4.sg │ │ ├── compiler_Zortech_C.4.sg │ │ ├── compiler_muSIMP-83.4.sg │ │ ├── converter_A3E.1.sg │ │ ├── converter_AutoCracker.1.sg │ │ ├── converter_COM2TXT.1.sg │ │ ├── converter_COMT.1.sg │ │ ├── converter_CRX2COM.1.sg │ │ ├── converter_E2C.1.sg │ │ ├── converter_EXE2COM.1.sg │ │ ├── converter_EXETools_EXE2COM.1.sg │ │ ├── converter_FIXCRK.1.sg │ │ ├── converter_FromBAT.1.sg │ │ ├── converter_MAKEBOO.1.sg │ │ ├── converter_NetCode.1.sg │ │ ├── converter_NetRun.1.sg │ │ ├── converter_TurboBAT.1.sg │ │ ├── converter_Vacsina.4.sg │ │ ├── converter_XCK2COM.1.sg │ │ ├── cryptor_Anti-Lamer_Cryptor.2.sg │ │ ├── cryptor_CSCRYPT.2.sg │ │ ├── cryptor_EXINCT.2.sg │ │ ├── cryptor_J0B_cryptor.2.sg │ │ ├── cryptor_PU-Cryptor.2.sg │ │ ├── cryptor_Phrozen_Crew_cryptor.2.sg │ │ ├── cryptor_SDW.2.sg │ │ ├── cryptor_Sydex.2.sg │ │ ├── cryptor_UComCry.1.sg │ │ ├── cryptor_USCC.2.sg │ │ ├── cryptor_cryptors.2.sg │ │ ├── driver_DIGPAK.1.sg │ │ ├── driver_MIDPAK.1.sg │ │ ├── immunizer_ARF_AV_Inject.1.sg │ │ ├── immunizer_CPAV.1.sg │ │ ├── immunizer_F-XLOCK.1.sg │ │ ├── immunizer_IMMUN.1.sg │ │ ├── immunizer_TAV.1.sg │ │ ├── immunizer_VSS.1.sg │ │ ├── other_XLOADER.2.sg │ │ ├── other_integrity_checker.1.sg │ │ ├── packer_4kZIP.2.sg │ │ ├── packer_AVPACK.2.sg │ │ ├── packer_COMPACK.2.sg │ │ ├── packer_Cheat_packer.2.sg │ │ ├── packer_Compressor.2.sg │ │ ├── packer_CyberWare_Packer.2.sg │ │ ├── packer_Diet.2.sg │ │ ├── packer_EXC.2.sg │ │ ├── packer_ICE.1.sg │ │ ├── packer_LGLZ.2.sg │ │ ├── packer_PKLITE.2.sg │ │ ├── packer_PRO-PACK.2.sg │ │ ├── packer_SCRE2B.2.sg │ │ ├── packer_SCRNCH.2.sg │ │ ├── packer_SHRINK.2.sg │ │ ├── packer_Scramb.2.sg │ │ ├── packer_Six-2-Four.2.sg │ │ ├── packer_TPACK.2.sg │ │ ├── packer_Triplex.2.sg │ │ ├── packer_UPX.2.sg │ │ ├── packer_X-PACK.2.sg │ │ ├── packer_XE.2.sg │ │ ├── packer_XPACK.2.sg │ │ ├── packer_aPACK.2.sg │ │ ├── packer_com_RLE_packer.2.sg │ │ ├── packer_envelope.2.sg │ │ ├── protector_ABK-Scrambler.2.sg │ │ ├── protector_ACE_Scrambler.2.sg │ │ ├── protector_AVAST-Protect.2.sg │ │ ├── protector_AdFlt.2.sg │ │ ├── protector_Adys_COM-Scrambler.2.sg │ │ ├── protector_Anti-hack_encryption_system.2.sg │ │ ├── protector_BIN-Lock.2.sg │ │ ├── protector_Best_Protection_Kit-B.2.sg │ │ ├── protector_BinCOD.2.sg │ │ ├── protector_Budokan.1.sg │ │ ├── protector_C-crypt.2.sg │ │ ├── protector_CC#3.2.sg │ │ ├── protector_CC.2.sg │ │ ├── protector_CC286.2.sg │ │ ├── protector_CCC.2.sg │ │ ├── protector_CHECKPRG.2.sg │ │ ├── protector_CNT.2.sg │ │ ├── protector_COM-Protect.2.sg │ │ ├── protector_COM-Protection.2.sg │ │ ├── protector_COMCRYPT.2.sg │ │ ├── protector_COMPROTECT.2.sg │ │ ├── protector_COP.2.sg │ │ ├── protector_CodeLock.2.sg │ │ ├── protector_Codesafe.2.sg │ │ ├── protector_ComProt.2.sg │ │ ├── protector_ComProtector.2.sg │ │ ├── protector_Comlock.2.sg │ │ ├── protector_CrAcKeR.2.sg │ │ ├── protector_Crack2EXE.1.sg │ │ ├── protector_CryptCom.2.sg │ │ ├── protector_Crypto-King.2.sg │ │ ├── protector_DCFR.2.sg │ │ ├── protector_DS-CRP.2.sg │ │ ├── protector_Deeper.2.sg │ │ ├── protector_E2C-Scrambler.2.sg │ │ ├── protector_E2C1.2.sg │ │ ├── protector_EPW.2.sg │ │ ├── protector_EXETools.2.sg │ │ ├── protector_Encriptor.2.sg │ │ ├── protector_Entropy_Coder.2.sg │ │ ├── protector_ExOM.2.sg │ │ ├── protector_FCRYPT.2.sg │ │ ├── protector_GOAT.2.sg │ │ ├── protector_Guardian_Angel.2.sg │ │ ├── protector_HDKPROTC.2.sg │ │ ├── protector_HackStop.2.sg │ │ ├── protector_IntroC0der.1.sg │ │ ├── protector_Keygen_crypt.2.sg │ │ ├── protector_Khrome_Crypt.2.sg │ │ ├── protector_LAME_GG.2.sg │ │ ├── protector_LAMPROT.2.sg │ │ ├── protector_Lock-Master.2.sg │ │ ├── protector_MASK.2.sg │ │ ├── protector_MCLock.2.sg │ │ ├── protector_MESS.2.sg │ │ ├── protector_MSCC.2.sg │ │ ├── protector_MegaShield.2.sg │ │ ├── protector_Microxor.2.sg │ │ ├── protector_NH.2.sg │ │ ├── protector_NoAV.2.sg │ │ ├── protector_Nodebug.2.sg │ │ ├── protector_PCOM.2.sg │ │ ├── protector_PCRYPT.2.sg │ │ ├── protector_PCVault-Protect.2.sg │ │ ├── protector_PROTECT.2.sg │ │ ├── protector_PTP.2.sg │ │ ├── protector_PassCOM.2.sg │ │ ├── protector_Propellerhead_encryption.2.sg │ │ ├── protector_ProtEXE.2.sg │ │ ├── protector_R-Crypt.2.sg │ │ ├── protector_RCC.2.sg │ │ ├── protector_RSCC.2.sg │ │ ├── protector_SCC.2.sg │ │ ├── protector_SCRAM.2.sg │ │ ├── protector_Scrambler.2.sg │ │ ├── protector_Scrypt!.2.sg │ │ ├── protector_Scrypt.2.sg │ │ ├── protector_SelfCrypt.2.sg │ │ ├── protector_SelfProtect386.2.sg │ │ ├── protector_SnoopStop.2.sg │ │ ├── protector_SoftGuard.1.sg │ │ ├── protector_Steplock.2.sg │ │ ├── protector_TCEC.2.sg │ │ ├── protector_UnPackStop.2.sg │ │ ├── protector_UniCrypt.1.sg │ │ ├── protector_Venus.2.sg │ │ ├── protector_XORCOPY.2.sg │ │ ├── protector_XcomOR.2.sg │ │ ├── protector_XoReR.2.sg │ │ ├── protector_XorCom.2.sg │ │ ├── protector_aPatch.2.sg │ │ ├── protector_acBBS_protection.2.sg │ │ ├── protector_com-crypt.2.sg │ │ ├── protector_fds-cp.2.sg │ │ ├── protector_mCrypt.2.sg │ │ ├── protector_protection.2.sg │ │ ├── protector_spirit.2.sg │ │ ├── protector_sticker.2.sg │ │ ├── protector_x3.2.sg │ │ ├── self-displayer_ACiDDRAW.1.sg │ │ ├── self-displayer_ANS2ALL.1.sg │ │ ├── self-displayer_ASC2COM.1.sg │ │ ├── self-displayer_DOC2COM.1.sg │ │ ├── self-displayer_DOC2PAGE.1.sg │ │ ├── self-displayer_GTXT.1.sg │ │ ├── self-displayer_HYPDOC.1.sg │ │ ├── self-displayer_List.1.sg │ │ ├── self-displayer_MakeRead.1.sg │ │ ├── self-displayer_ONLINE-HELP.1.sg │ │ ├── self-displayer_PFL2COM.1.sg │ │ ├── self-displayer_RELETTER.1.sg │ │ ├── self-displayer_SHOWV20.1.sg │ │ ├── self-displayer_TXT2COM.1.sg │ │ ├── self-displayer_TXTmaker.1.sg │ │ ├── self-displayer_Txt2Exe.1.sg │ │ ├── self-displayer_readme.com.1.sg │ │ ├── sfx_LHA.1.sg │ │ ├── sfx_PKZip.1.sg │ │ ├── simple_ansi_viewer.1.sg │ │ ├── simple_self-displayer.1.sg │ │ └── virus.1.sg │ ├── CurIcoBPP │ ├── DEX/ │ │ ├── _DEX.0.sg │ │ ├── _DEX2.0.sg │ │ ├── _init │ │ ├── compiler_dexlib2.4.sg │ │ ├── library_UnicomSDK.4.sg │ │ ├── obfuscator_ProGuard.2.sg │ │ ├── protector_AESObfuscator.2.sg │ │ ├── protector_APKProtect.2.sg │ │ ├── protector_AlibabaProtection.2.sg │ │ ├── protector_AllatoriObfuscator.2.sg │ │ ├── protector_ApkEncryptor.2.sg │ │ ├── protector_AppSolid.2.sg │ │ ├── protector_BaiduProtection.2.sg │ │ ├── protector_BangcleProtection.2.sg │ │ ├── protector_EasyProtector.2.sg │ │ ├── protector_Jiagu.2.sg │ │ ├── protector_Kiwi.2.sg │ │ ├── protector_LIAPP.2.sg │ │ ├── protector_MedusaH.2.sg │ │ ├── protector_ModGuard.2.sg │ │ ├── protector_NQShield.2.sg │ │ ├── protector_NagaPTProtection.2.sg │ │ ├── protector_PangXie.2.sg │ │ ├── protector_QDBH.2.sg │ │ ├── protector_SecNeo.2.sg │ │ ├── protector_TencentProtection.2.sg │ │ ├── protector_VDog.2.sg │ │ ├── protector_Yidun.2.sg │ │ └── tool_ApkToolPlus.6.sg │ ├── DOS16M/ │ │ ├── _DOS16M.0.sg │ │ ├── _init │ │ └── compiler_Watcom.2.sg │ ├── DOS4G/ │ │ ├── _DOS4G.0.sg │ │ ├── _init │ │ └── compiler_Watcom.2.sg │ ├── ELF/ │ │ ├── Borland_Kylix.4.sg │ │ ├── Free_Pascal.4.sg │ │ ├── HP_C++.4.sg │ │ ├── IBM_AIX_kernel_loader.4.sg │ │ ├── Oracle_Solaris_Studio.4.sg │ │ ├── _ELF.0.sg │ │ ├── _init │ │ ├── compiler_DMD.4.sg │ │ ├── compiler_FASM.4.sg │ │ ├── compiler_Go.4.sg │ │ ├── compiler_MWCC.4.sg │ │ ├── compiler_Rust.4.sg │ │ ├── compiler_VBCC.4.sg │ │ ├── compiler_Watcom.4.sg │ │ ├── compiler_Zig.4.sg │ │ ├── compiler_gcc.4.sg │ │ ├── compiler_gdc.4.sg │ │ ├── compiler_ldc.4.sg │ │ ├── compiler_movfuscator.4.sg │ │ ├── library_Curl.4.sg │ │ ├── library_FFmpeg.4.sg │ │ ├── library_FLAC.4.sg │ │ ├── library_Flexlm.4.sg │ │ ├── library_FluidSynth.4.sg │ │ ├── library_FreeType.4.sg │ │ ├── library_GLEW.4.sg │ │ ├── library_GLIBC.3.sg │ │ ├── library_LZMA.4.sg │ │ ├── library_Lego1.4.sg │ │ ├── library_MPEG2.4.sg │ │ ├── library_Mikmod.4.sg │ │ ├── library_OGG.4.sg │ │ ├── library_OpenAL.4.sg │ │ ├── library_PulseAudio.4.sg │ │ ├── library_QT.3.sg │ │ ├── library_SDL.3.sg │ │ ├── packer_Ezuri.1.sg │ │ ├── packer_PyInstaller.2.sg │ │ ├── packer_UPX.2.sg │ │ ├── packer_Virbox.2.sg │ │ ├── packer_exepak.1.sg │ │ ├── protector_Burneye.2.sg │ │ └── protector_HASP.1.sg │ ├── FASM │ ├── FPC │ ├── IPA/ │ │ └── _init │ ├── ISO9660/ │ │ ├── _ISO9660.0.sg │ │ ├── _init │ │ ├── bootloader_Grub.1.sg │ │ ├── filesystem_AppleHFS.1.sg │ │ ├── iso_Rimage.1.sg │ │ ├── library_IMAPI.1.sg │ │ ├── library_IMAPI2.1.sg │ │ ├── library_libburn.1.sg │ │ ├── library_libisoburn.1.sg │ │ ├── library_libisofs.1.sg │ │ ├── partition_EFI_PART.1.sg │ │ ├── tool_CDBurnerXP.1.sg │ │ ├── tool_CDIMAGE.1.sg │ │ ├── tool_CeQuadrat.1.sg │ │ ├── tool_ImgBurn.1.sg │ │ ├── tool_MKARCHISO.1.sg │ │ ├── tool_NeroBurningROM.1.sg │ │ ├── tool_PersonalRomMaker.1.sg │ │ ├── tool_QuickToPix.1.sg │ │ ├── tool_RoxioToast.1.sg │ │ ├── tool_UltraISO.1.sg │ │ ├── tool_WinISO.1.sg │ │ ├── tool_genisoimage.1.sg │ │ └── tool_xorriso.1.sg │ ├── Image/ │ │ ├── _Image.0.sg │ │ └── _init │ ├── JAR/ │ │ ├── _JAR.0.sg │ │ ├── _init │ │ └── tool_SingleJar.3.sg │ ├── JPEG/ │ │ ├── _Jpeg.0.sg │ │ ├── _init │ │ ├── camera_camera.2.sg │ │ ├── image_DQT.4.sg │ │ ├── image_comment.4.sg │ │ └── tool_Tools.3.sg │ ├── JavaClass/ │ │ ├── _JavaClass.0.sg │ │ └── _init │ ├── LE/ │ │ ├── _LE.0.sg │ │ ├── _init │ │ ├── compiler_Watcom_C.4.sg │ │ └── packer_UPX.1.sg │ ├── LX/ │ │ ├── _LX.0.sg │ │ ├── _init │ │ ├── compiler_Borland_C.4.sg │ │ └── compiler_Watcom_C.4.sg │ ├── MACH/ │ │ ├── _MACH.0.sg │ │ ├── _init │ │ ├── compiler_Delphi.4.sg │ │ ├── compiler_Rust.4.sg │ │ ├── compiler_Zig.4.sg │ │ ├── compiler_gcc.4.sg │ │ ├── library_Carbon.3.sg │ │ ├── library_Cocoa.3.sg │ │ ├── library_QT.3.sg │ │ ├── library_WebKit.3.sg │ │ ├── library_java.3.sg │ │ ├── packer_UPX.2.sg │ │ └── packer_Virbox.2.sg │ ├── MACHOFAT/ │ │ ├── _MACHOFAT.0.sg │ │ ├── _init │ │ └── converter_lipo.2.sg │ ├── MFC │ ├── MSDOS/ │ │ ├── ACE.6.sg │ │ ├── Adys_COM2EXE.1.sg │ │ ├── Adys_Glue.2.sg │ │ ├── Anti-hack_encryption_system.2.sg │ │ ├── Aztec_C-86.4.sg │ │ ├── BlackWolf_Protection.2.sg │ │ ├── Black_fist.2.sg │ │ ├── Borland_C.4.sg │ │ ├── Borland_Pascal.4.sg │ │ ├── Borland_RTM.0a.sg │ │ ├── Borland_TDS.5.sg │ │ ├── Borland_TLINK.5.sg │ │ ├── CSCRYPT_Pro.2.sg │ │ ├── Concurrent_Small_C.4.sg │ │ ├── CopyQM_SFX.1.sg │ │ ├── Crypt_(Dismember).2.sg │ │ ├── Crypt_(LightShow).2.sg │ │ ├── DAEMON_Protect.2.sg │ │ ├── DOS32_loader.0a.sg │ │ ├── DOS_16M.0a.sg │ │ ├── DOS_32A.0a.sg │ │ ├── Digital_Research_C.4.sg │ │ ├── Disk_eXPress.1.sg │ │ ├── EMMXXXX0_check.0a.sg │ │ ├── EXETools_COM2EXE.1.sg │ │ ├── EXE_Manager.2.sg │ │ ├── EXE_Packer.2.sg │ │ ├── EXE_encryption.2.sg │ │ ├── Eliashim's_CodeTrack.1.sg │ │ ├── File_Shield.1.sg │ │ ├── Fitted_Modula-2.4.sg │ │ ├── GFX_to_EXE.1.sg │ │ ├── GamBit_Pro_Library.1.sg │ │ ├── GameWizard_DOS_Extender.0a.sg │ │ ├── Graphic_WorkShop.1.sg │ │ ├── Guardian_Angel.2.sg │ │ ├── H+BEDV_SelfCheck.1.sg │ │ ├── Header_Changer.2.sg │ │ ├── Hi-Tech_C.4.sg │ │ ├── HyperLOCK_386.2.sg │ │ ├── IBM_PC_Pascal.4.sg │ │ ├── John_Socha_Library.3.sg │ │ ├── Khrome_Crypt.2.sg │ │ ├── LSI_C.4.sg │ │ ├── L_O_V_E__FORTH.4.sg │ │ ├── Lahey_Fortran.4.sg │ │ ├── Lattice_C.4.sg │ │ ├── Logitech_Modula-2.4.sg │ │ ├── Meridian_Ada.4.sg │ │ ├── Meridian_Pascal.4.sg │ │ ├── MetaWare_High_C.4.sg │ │ ├── MetaWare_Professional_Pascal.4.sg │ │ ├── Micro_Focus_Cobol.4.sg │ │ ├── Micro_Focus_DOS_extender.0a.sg │ │ ├── Microsoft_Basic.4.sg │ │ ├── Microsoft_C.4.sg │ │ ├── Microsoft_C_Library.3.sg │ │ ├── Microsoft_Fortran.4.sg │ │ ├── Microsoft_Quick_Basic.4.sg │ │ ├── Microsoft_Quick_Pascal.4.sg │ │ ├── Microsoft_RTL.3.sg │ │ ├── Microsoft_RTL_(Clipper).3.sg │ │ ├── MultiLoop_Protection.2.sg │ │ ├── Netware_loader.1.sg │ │ ├── PDC_Prolog.4.sg │ │ ├── PK_sig.1.sg │ │ ├── PROPACK_SFX.1.sg │ │ ├── Pacific_C.4.sg │ │ ├── Panda_immunizer.1.sg │ │ ├── Pascal_MT+86.4.sg │ │ ├── Phar_Lap.0a.sg │ │ ├── RAR.6.sg │ │ ├── REC_small.1.sg │ │ ├── REC_small_AV.1.sg │ │ ├── RLE_com-packer.2.sg │ │ ├── RM_FORTRAN.4.sg │ │ ├── RTLink_VM_Manager.0a.sg │ │ ├── RTPatch_SFX.1.sg │ │ ├── Realia_Cobol.4.sg │ │ ├── Realia_SPITBOL.4.sg │ │ ├── SHOW_IT.1.sg │ │ ├── Self_UnStuffer.2.sg │ │ ├── Small_C.4.sg │ │ ├── StonyBrook_Pascal.4.sg │ │ ├── Sydex_SFX.1.sg │ │ ├── Topspeed_Modula.4.sg │ │ ├── UR_FORTH.4.sg │ │ ├── Unknown_cryptors.2.sg │ │ ├── Upper_Deck_Forth.4.sg │ │ ├── Visual_Cobol.4.sg │ │ ├── WWPACK_mutator.2.sg │ │ ├── Whitesmiths_C.4.sg │ │ ├── Window_book.1.sg │ │ ├── Wizardy_protection.1.sg │ │ ├── WordPerfect_EXEPack.2.sg │ │ ├── XOPEN+_Protection.2.sg │ │ ├── Zbikowski_C.4.sg │ │ ├── Zip.6.sg │ │ ├── Zortech(Symantec)_C.4.sg │ │ ├── Zurenava_DOS_Extender.0a.sg │ │ ├── _LE.0.sg │ │ ├── _LX.0.sg │ │ ├── _MSDOS.0.sg │ │ ├── _NE.0.sg │ │ ├── _init │ │ ├── anti-tracing_add-on.1.sg │ │ ├── compiler_ASIC-Basic.4.sg │ │ ├── compiler_Ada89.4.sg │ │ ├── compiler_ApBasic.4.sg │ │ ├── compiler_BAT2EXEC.4.sg │ │ ├── compiler_BSTAR_FORTH.4.sg │ │ ├── compiler_BatLite.4.sg │ │ ├── compiler_BetterBASIC.4.sg │ │ ├── compiler_CII-C.4.sg │ │ ├── compiler_Easy!-C.4.sg │ │ ├── compiler_GRASP.4.sg │ │ ├── compiler_MegaBasic.4.sg │ │ ├── compiler_MegaBasic1.4.sg │ │ ├── compiler_PCC.4.sg │ │ ├── compiler_Power_C.4.sg │ │ ├── compiler_SP-FORTH.4.sg │ │ ├── compiler_Symantec_BASIC.4.sg │ │ ├── compiler_Topspeed_C.4.sg │ │ ├── compiler_Turbo_Basic.4.sg │ │ ├── compiler_Turbo_Prolog.4.sg │ │ ├── compiler_WATCOM.4.sg │ │ ├── compiler_WPFORTH.4.sg │ │ ├── compiler_djgpp.4.sg │ │ ├── compiler_muLISP-87.4.sg │ │ ├── converter_EXE2COM.1.sg │ │ ├── converter_FromBAT.1.sg │ │ ├── converter_GRABBER.1.sg │ │ ├── converter_com2exe.2.sg │ │ ├── cryptor_EXE-Cryptor.2.sg │ │ ├── cryptor_TUCCRYP.2.sg │ │ ├── cryptor_deep-CRyPTer.2.sg │ │ ├── dos_extender.0a.sg │ │ ├── dos_extender1.0a.sg │ │ ├── dos_extender2.0a.sg │ │ ├── extender_Blinker.0a.sg │ │ ├── extender_CWSDPMI.0a.sg │ │ ├── extender_CauseWay_DOS_Extender.6.sg │ │ ├── extender_DOS32.0a.sg │ │ ├── extender_DOS4G.0a.sg │ │ ├── extender_DOSX16.0a.sg │ │ ├── extender_EMX.0a.sg │ │ ├── extender_Go32Stub.0a.sg │ │ ├── extender_PMODE.0a.sg │ │ ├── extender_PRO32.0a.sg │ │ ├── extender_RSX.0a.sg │ │ ├── extender_Stub-386.0a.sg │ │ ├── extender_TMTSTUB.0a.sg │ │ ├── extender_WDOSX.0a.sg │ │ ├── extender_WDOSX32.0a.sg │ │ ├── extender_XMLOD.0a.sg │ │ ├── extender_Xtender.0a.sg │ │ ├── immunizer_CPAV.1.sg │ │ ├── immunizer_F-XLOCK.1.sg │ │ ├── immunizer_Oyster.1.sg │ │ ├── immunizer_PGPROT.1.sg │ │ ├── immunizer_Palladix.1.sg │ │ ├── immunizer_TTW.1.sg │ │ ├── joiner_TurboChainer.1.sg │ │ ├── joiner_V-Load.1.sg │ │ ├── library_ParsecCollection.1.sg │ │ ├── loader_32stub.0a.sg │ │ ├── mbp_SHRINK.2.sg │ │ ├── other_AutoHack.1.sg │ │ ├── other_Coderunner.1.sg │ │ ├── other_DemoMaker.2.sg │ │ ├── overlay_overlays.6.sg │ │ ├── packer_32LiTe.2.sg │ │ ├── packer_AINEXE.2.sg │ │ ├── packer_AVPACK.2.sg │ │ ├── packer_Amisetup.1.sg │ │ ├── packer_COMPACK.2.sg │ │ ├── packer_CRYPACK.2.sg │ │ ├── packer_Compress-EXE.2.sg │ │ ├── packer_DIET.2.sg │ │ ├── packer_DSHIELD.2.sg │ │ ├── packer_DexEXE.2.sg │ │ ├── packer_EXECUTRIX.2.sg │ │ ├── packer_EXEPACK.2.sg │ │ ├── packer_ExeLITE.2.sg │ │ ├── packer_LGLZ.2.sg │ │ ├── packer_LZEXE.2.sg │ │ ├── packer_MSLite.1.sg │ │ ├── packer_Optlink.2.sg │ │ ├── packer_PGMPAK.2.sg │ │ ├── packer_PKEXE.2.sg │ │ ├── packer_PKLITE.2.sg │ │ ├── packer_PKTINY.2.sg │ │ ├── packer_PMWLite.2.sg │ │ ├── packer_PRO-PACK.2.sg │ │ ├── packer_Pack.2.sg │ │ ├── packer_Packers.2.sg │ │ ├── packer_RERP.2.sg │ │ ├── packer_RIXEPACK.2.sg │ │ ├── packer_RJcrush.2.sg │ │ ├── packer_Relpack.2.sg │ │ ├── packer_SCRNCH.2.sg │ │ ├── packer_SEA-AXE.2.sg │ │ ├── packer_Scramb.2.sg │ │ ├── packer_Shrinker.2.sg │ │ ├── packer_TSCRUNCH.2.sg │ │ ├── packer_Tenth_Planet.2.sg │ │ ├── packer_TinyProg.2.sg │ │ ├── packer_Tinyprot.2.sg │ │ ├── packer_UCEXE.2.sg │ │ ├── packer_UPX.2.sg │ │ ├── packer_WWPACK.2.sg │ │ ├── packer_XPACK.2.sg │ │ ├── packer_ZIPSCRUB.2.sg │ │ ├── packer_aPACK.2.sg │ │ ├── patcher_Patchers.1.sg │ │ ├── protector_$pirit.2.sg │ │ ├── protector_ABKprot.2.sg │ │ ├── protector_AEP.2.sg │ │ ├── protector_ALEC.2.sg │ │ ├── protector_ANTI-TRACE.2.sg │ │ ├── protector_AVAST_CRC-Check.2.sg │ │ ├── protector_Aluwain.2.sg │ │ ├── protector_Anti-LAME.2.sg │ │ ├── protector_Antilame.2.sg │ │ ├── protector_Bitlok.2.sg │ │ ├── protector_Bunny.2.sg │ │ ├── protector_CC.2.sg │ │ ├── protector_CEPexe.2.sg │ │ ├── protector_CERBERUS.2.sg │ │ ├── protector_COMCRYPT.2.sg │ │ ├── protector_COMPROTECT.2.sg │ │ ├── protector_CONVOY.2.sg │ │ ├── protector_CRYPTEXE.2.sg │ │ ├── protector_China Locker.2.sg │ │ ├── protector_Ciphator.2.sg │ │ ├── protector_Codesafe.2.sg │ │ ├── protector_ComProtector.2.sg │ │ ├── protector_ComprEXE.2.sg │ │ ├── protector_Copy_Protector.2.sg │ │ ├── protector_Copylock_PC.2.sg │ │ ├── protector_CrAcKeR.2.sg │ │ ├── protector_CrackStop.2.sg │ │ ├── protector_Cruncher.2.sg │ │ ├── protector_CryExe.2.sg │ │ ├── protector_CryptCom.2.sg │ │ ├── protector_CrypteXeC.2.sg │ │ ├── protector_Crypto-box.2.sg │ │ ├── protector_DCREXE.2.sg │ │ ├── protector_DMC.2.sg │ │ ├── protector_Deeper.2.sg │ │ ├── protector_E-PROT.2.sg │ │ ├── protector_EEXE.2.sg │ │ ├── protector_EPW.2.sg │ │ ├── protector_ETS.1.sg │ │ ├── protector_EXE-Crypt.2.sg │ │ ├── protector_EXE-Protect.2.sg │ │ ├── protector_EXEGUARD.2.sg │ │ ├── protector_EXEHigh.2.sg │ │ ├── protector_EXETools.2.sg │ │ ├── protector_Encriptor.2.sg │ │ ├── protector_Enkryptonator.2.sg │ │ ├── protector_ExeCode.2.sg │ │ ├── protector_ExeLock.2.sg │ │ ├── protector_FACRYPT.2.sg │ │ ├── protector_FSE.2.sg │ │ ├── protector_GA-Header.2.sg │ │ ├── protector_GOAT.1.sg │ │ ├── protector_HACKSTOP.2.sg │ │ ├── protector_HASP.2.sg │ │ ├── protector_HEALTH.2.sg │ │ ├── protector_HaSPeX-Protect.2.sg │ │ ├── protector_Hardlock.2.sg │ │ ├── protector_Inertia.2.sg │ │ ├── protector_Int01-Destroyer.2.sg │ │ ├── protector_Ironthorn.2.sg │ │ ├── protector_JAM.2.sg │ │ ├── protector_JmCryptExe.2.sg │ │ ├── protector_Joke.2.sg │ │ ├── protector_KeyMaker.2.sg │ │ ├── protector_Kvetch.2.sg │ │ ├── protector_LOCK.2.sg │ │ ├── protector_LOCK91.2.sg │ │ ├── protector_LamerStop.2.sg │ │ ├── protector_LockTite+.2.sg │ │ ├── protector_MEGALITE.2.sg │ │ ├── protector_MESS.2.sg │ │ ├── protector_Maker.2.sg │ │ ├── protector_Mandrake.2.sg │ │ ├── protector_MutaWWP.2.sg │ │ ├── protector_Mutate.2.sg │ │ ├── protector_NOCLIP.2.sg │ │ ├── protector_NOTA.2.sg │ │ ├── protector_NTShell.2.sg │ │ ├── protector_Nodebug.2.sg │ │ ├── protector_Novex.2.sg │ │ ├── protector_Overlay.2.sg │ │ ├── protector_PACKWIN.2.sg │ │ ├── protector_PC-Guard.2.sg │ │ ├── protector_PCOM.2.sg │ │ ├── protector_PROTECT.2.sg │ │ ├── protector_PVAC.2.sg │ │ ├── protector_PassEXE.2.sg │ │ ├── protector_Pksmart.2.sg │ │ ├── protector_ProtEXE.2.sg │ │ ├── protector_Protector.2.sg │ │ ├── protector_Quadru-Lock.2.sg │ │ ├── protector_R-Crypt.2.sg │ │ ├── protector_REC.2.sg │ │ ├── protector_RHC.2.sg │ │ ├── protector_ROSETINY.2.sg │ │ ├── protector_SSI-Lock.2.sg │ │ ├── protector_Secure.2.sg │ │ ├── protector_SelfChk.2.sg │ │ ├── protector_Shrink.2.sg │ │ ├── protector_SnoopStop.2.sg │ │ ├── protector_SuckStop.2.sg │ │ ├── protector_TCEC.2.sg │ │ ├── protector_TraceLock.2.sg │ │ ├── protector_Trap.2.sg │ │ ├── protector_Un2pack.2.sg │ │ ├── protector_UnPackStop.2.sg │ │ ├── protector_XDOC.2.sg │ │ ├── protector_aPatch.2.sg │ │ ├── protector_cramble.2.sg │ │ ├── protector_iLUCRYPT.2.sg │ │ ├── protector_nbuild.2.sg │ │ ├── runtime_VROOMM.4.sg │ │ ├── self-displayer_ANS2ALL.1.sg │ │ ├── self-displayer_GIFEXE.1.sg │ │ ├── self-displayer_RELETTER.1.sg │ │ ├── self-displayer_SimplyWare.1.sg │ │ ├── self-displayer_TXT2COM.1.sg │ │ ├── self-displayer_TXTmaker.1.sg │ │ ├── self-displayer_Txt2Exe.1.sg │ │ ├── self-displayer_self-displayer.1.sg │ │ ├── sfx_ARC.1.sg │ │ ├── sfx_ARJ.1.sg │ │ ├── sfx_ChSFX.1.sg │ │ ├── sfx_EXARJ.1.sg │ │ ├── sfx_ICE.1.sg │ │ ├── sfx_LH.1.sg │ │ ├── sfx_LHA.1.sg │ │ ├── sfx_LHarc.1.sg │ │ ├── sfx_PKSFX.1.sg │ │ ├── sfx_PKZIP-SFX.1.sg │ │ ├── sfx_PKZIP_mini-sfx.1.sg │ │ ├── sfx_SFX.1.sg │ │ ├── sfx_ZOO.1.sg │ │ ├── unknown_immunizer.1.sg │ │ └── virus.1.sg │ ├── NE/ │ │ ├── _NE.0.sg │ │ ├── _init │ │ ├── compiler_Borland_C++.1.sg │ │ ├── compiler_Borland_Pascal.1.sg │ │ ├── compiler_Watcom_C.1.sg │ │ ├── game_engine_DirectorPlayer.1.sg │ │ ├── installer_CoktelVisionInstaller.1.sg │ │ ├── installer_Setup-Specialist.1.sg │ │ ├── library_MS_RTL.4.sg │ │ ├── sfx_ARC_SFX.1.sg │ │ ├── sfx_PKZIP-SFX.1.sg │ │ └── sfx_Sydex_SFX.1.sg │ ├── NPM/ │ │ ├── _NPM.0.sg │ │ ├── _init │ │ ├── language_JavaScript.5.sg │ │ ├── language_TypeScript.5.sg │ │ └── package_PackageName.1.sg │ ├── PDF/ │ │ ├── _PDF.0.sg │ │ ├── _init │ │ ├── converter_markdown-pdf.3.sg │ │ ├── converter_mdpdf.3.sg │ │ ├── format_HeaderComment.2.sg │ │ ├── format_PersonalData.5.sg │ │ ├── format_RTSN_secure.1.sg │ │ └── format_Tools.2.sg │ ├── PE/ │ │ ├── ACE.6.sg │ │ ├── Cab.6.sg │ │ ├── Microsoft.6.sg │ │ ├── Microsoft_Class_Installer.1.sg │ │ ├── Microsoft_Compound-based_installer.1.sg │ │ ├── Microsoft_Help.1.sg │ │ ├── Microsoft_JScript.6.sg │ │ ├── _FixDetects.9.sg │ │ ├── _NetCompilersLibs.4.sg │ │ ├── _PE.0.sg │ │ ├── __GenericHeuristicAnalysis_By_DosX.7.sg │ │ ├── _debug_data.5.sg │ │ ├── _init │ │ ├── archive_7z.6.sg │ │ ├── arj.6.sg │ │ ├── compiler_BatchToApp.6.sg │ │ ├── compiler_BeRo_Tiny_Pascal.6.sg │ │ ├── compiler_Borland_C++.6.sg │ │ ├── compiler_Cygwin32.4.sg │ │ ├── compiler_DECFortran.4.sg │ │ ├── compiler_DMD.6.sg │ │ ├── compiler_DarkBASIC.4.sg │ │ ├── compiler_Delphi.4.sg │ │ ├── compiler_EuroASM.4.sg │ │ ├── compiler_Excelsior_JET.4.sg │ │ ├── compiler_FASM.4.sg │ │ ├── compiler_FreeBasic.6.sg │ │ ├── compiler_Free_Pascal.6.sg │ │ ├── compiler_Go.4.sg │ │ ├── compiler_IBM_VisualAge_C.6.sg │ │ ├── compiler_IBM_VisualAge_COBOL.6.sg │ │ ├── compiler_IBM_VisualAge_PL_I.6.sg │ │ ├── compiler_Intel_C.6.sg │ │ ├── compiler_Kotlin.4.sg │ │ ├── compiler_LCC-Win32.4.sg │ │ ├── compiler_LDC.6.sg │ │ ├── compiler_LLVM.6.sg │ │ ├── compiler_Lahey_Fortran_90.4.sg │ │ ├── compiler_MinGW.6.sg │ │ ├── compiler_Nim.4.sg │ │ ├── compiler_Pelles_C.6.sg │ │ ├── compiler_PerlApp.1.sg │ │ ├── compiler_PowerBASIC.4.sg │ │ ├── compiler_PureBasic.4.sg │ │ ├── compiler_RADBasic.6.sg │ │ ├── compiler_RealBasic.4.sg │ │ ├── compiler_RosASM.4.sg │ │ ├── compiler_Rust.4.sg │ │ ├── compiler_SpASM.4.sg │ │ ├── compiler_Swift.6.sg │ │ ├── compiler_Symantec_C.6.sg │ │ ├── compiler_TASM32.4.sg │ │ ├── compiler_Virtual_Pascal.4.sg │ │ ├── compiler_Visual_Objects.4.sg │ │ ├── compiler_Visual_Prolog.4.sg │ │ ├── compiler_Watcom.6.sg │ │ ├── compiler_WutaoEPL.6.sg │ │ ├── compiler_Xbase.4.sg │ │ ├── compiler_Zig.4.sg │ │ ├── compiler_tcc.6.sg │ │ ├── compiler_twinBASIC.6.sg │ │ ├── cryptor_Amber.2.sg │ │ ├── cryptor_AverCryptor.2.sg │ │ ├── cryptor_BattleshipCrypter.2.sg │ │ ├── cryptor_CronosCrypter.1.sg │ │ ├── cryptor_CryptEngine_MalwareCryptor.2.sg │ │ ├── cryptor_Duals_eXe_Encryptor.2.sg │ │ ├── cryptor_EXECryptor.2.sg │ │ ├── cryptor_Huan.1.sg │ │ ├── cryptor_KCryptor.2.sg │ │ ├── cryptor_Kryptonit.2.sg │ │ ├── cryptor_LimeCrypter.2.sg │ │ ├── cryptor_NativeCryptor_by_DosX.2.sg │ │ ├── cryptor_PEUnion.2.sg │ │ ├── cryptor_RCryptor.2.sg │ │ ├── cryptor_RDG_Tejon_Crypter.2.sg │ │ ├── cryptor_ReXCrypter.2.sg │ │ ├── cryptor_Stones_PE_Encryptor.2.sg │ │ ├── cryptor_Virogen_Crypt.2.sg │ │ ├── cryptor_XorCryptor.2.sg │ │ ├── cryptor_Yodas_Crypter.2.sg │ │ ├── custom_sfx_installers.1.sg │ │ ├── dotnet_only/ │ │ │ └── about.txt │ │ ├── emulator_Wine.3.sg │ │ ├── engine_AGS.1.sg │ │ ├── format_AutoHotKey.3.sg │ │ ├── format_AutoIt.3.sg │ │ ├── game_engine_Atlas.3.sg │ │ ├── game_engine_DEV7.3.sg │ │ ├── game_engine_Director.3.sg │ │ ├── game_engine_Godot.3.sg │ │ ├── game_engine_Wintermute.3.sg │ │ ├── game_engine_XPAT.3.sg │ │ ├── game_engine_Xash.3.sg │ │ ├── installer_ACCAStore.1.sg │ │ ├── installer_AOLSetup.1.sg │ │ ├── installer_Acronis_installer.1.sg │ │ ├── installer_Actual_Installer.1.sg │ │ ├── installer_Adobe_FlashPlayer_downloader.1.sg │ │ ├── installer_Adobe_installers.1.sg │ │ ├── installer_Advanced_installer.1.sg │ │ ├── installer_Adveractive.1.sg │ │ ├── installer_Aeco_installer.1.sg │ │ ├── installer_Alchemy_Mindworks_installer.1.sg │ │ ├── installer_Astrum.1.sg │ │ ├── installer_AutoPlay_Media_Studio.1.sg │ │ ├── installer_Autodesk_Self-Extract.1.sg │ │ ├── installer_AutorunProEnterprise.1.sg │ │ ├── installer_AutorunProEnterpriseII.1.sg │ │ ├── installer_BitRock_Installer.1.sg │ │ ├── installer_Bytessence_Install_Maker.1.sg │ │ ├── installer_CNetX.1.sg │ │ ├── installer_CSDD_installer.1.sg │ │ ├── installer_CZ_installer.1.sg │ │ ├── installer_Calibre_installer.1.sg │ │ ├── installer_Chaos_Software_installer.1.sg │ │ ├── installer_ClickTeam.1.sg │ │ ├── installer_Codegear_Installer.1.sg │ │ ├── installer_CreateInstall.1.sg │ │ ├── installer_CrypKey_Installer.1.sg │ │ ├── installer_DeployMaster.1.sg │ │ ├── installer_DesktopX_Installer.1.sg │ │ ├── installer_Eschalon_installer.1.sg │ │ ├── installer_Excelsior_Installer.1.sg │ │ ├── installer_FDM_Installer.1.sg │ │ ├── installer_GPInstall.1.sg │ │ ├── installer_Gentee_Installer.1.sg │ │ ├── installer_Ghost_Installer.1.sg │ │ ├── installer_Gremlin_Patcher.1.sg │ │ ├── installer_I-D_Media_installer.1.sg │ │ ├── installer_IDM_Installer.1.sg │ │ ├── installer_INTENIUM.1.sg │ │ ├── installer_Inno_Setup_Module.1.sg │ │ ├── installer_Instalit.1.sg │ │ ├── installer_Install4j_installer.1.sg │ │ ├── installer_InstallAnywhere.1.sg │ │ ├── installer_InstallShield.1.sg │ │ ├── installer_InstallUs.1.sg │ │ ├── installer_Install_Factory.1.sg │ │ ├── installer_LucasArts_Update_Installer.1.sg │ │ ├── installer_Miktex_Installer.1.sg │ │ ├── installer_Mioplanet_installer.1.sg │ │ ├── installer_Morton_installer.1.sg │ │ ├── installer_Multimedia_Fusion_Installer.1.sg │ │ ├── installer_Myriad_Install.1.sg │ │ ├── installer_NOS_Installer.1.sg │ │ ├── installer_Nullsoft_Scriptable_Install_System.1.sg │ │ ├── installer_O'Setup95.1.sg │ │ ├── installer_PCInstall.1.sg │ │ ├── installer_PIMP.1.sg │ │ ├── installer_PackageForTheWeb.1.sg │ │ ├── installer_Pantaray_QSetup.1.sg │ │ ├── installer_Paquet_Builder.1.sg │ │ ├── installer_Quick_Install.1.sg │ │ ├── installer_RNsetup.1.sg │ │ ├── installer_SCE_installer.1.sg │ │ ├── installer_STATICSUP.1.sg │ │ ├── installer_Setup-Specialist.1.sg │ │ ├── installer_Setup_Factory.1.sg │ │ ├── installer_SfxCA.1.sg │ │ ├── installer_Smart_Install_Maker.1.sg │ │ ├── installer_Sony_Windows_Installer.1.sg │ │ ├── installer_Spoon_Installer.1.sg │ │ ├── installer_Squirrel.1.sg │ │ ├── installer_SwiftView_installer.1.sg │ │ ├── installer_Synactis_In-The-Box_Installer.1.sg │ │ ├── installer_Tarma_Installer.1.sg │ │ ├── installer_Themepak.1.sg │ │ ├── installer_UFI_installer.1.sg │ │ ├── installer_VMWare.1.sg │ │ ├── installer_Vise.1.sg │ │ ├── installer_WiX_Toolset_installer.1.sg │ │ ├── installer_WinRAR_Installer.1.sg │ │ ├── installer_Winamp_Installer.1.sg │ │ ├── installer_Windows_Installer.1.sg │ │ ├── installer_Wise_Installer.1.sg │ │ ├── installer_Xoreax_installer.1.sg │ │ ├── installer_distutils.1.sg │ │ ├── installer_sqx.1.sg │ │ ├── joiner_Celesty_File_Binder.1.sg │ │ ├── joiner_ExeSplitter.1.sg │ │ ├── joiner_FreeJoiner.1.sg │ │ ├── joiner_MicroJoiner.1.sg │ │ ├── joiner_N-Joiner.1.sg │ │ ├── joiner_OxiJoiner.2.sg │ │ ├── joiner_RJoiner.1.sg │ │ ├── joiner_SFXRun.1.sg │ │ ├── joiner_inPEct.1.sg │ │ ├── library_16Edit.4.sg │ │ ├── library_7z.4.sg │ │ ├── library_AMD_FSR.4.sg │ │ ├── library_AMD_GraphicalServices.4.sg │ │ ├── library_ASIPort.4.sg │ │ ├── library_AjaxMin.4.sg │ │ ├── library_Alibaba_CloudSDK.4.sg │ │ ├── library_Amazon_CloudWatch.4.sg │ │ ├── library_Amazon_CloudWatchLogs.4.sg │ │ ├── library_Amazon_DynamoDB.4.sg │ │ ├── library_Amazon_ElasticComputeCloudService.4.sg │ │ ├── library_Amazon_Glue.4.sg │ │ ├── library_Amazon_Kinesis.4.sg │ │ ├── library_Amazon_Lambda.4.sg │ │ ├── library_Amazon_RelationalDatabaseService.4.sg │ │ ├── library_Amazon_SecretsManager.4.sg │ │ ├── library_Amazon_SecurityToken.4.sg │ │ ├── library_Amazon_ServicesSDK.4.sg │ │ ├── library_Amazon_SimpleEmail.4.sg │ │ ├── library_Amazon_SimpleQueueService.4.sg │ │ ├── library_Amazon_SimpleStorageService.4.sg │ │ ├── library_Amazon_SingleSignOn.4.sg │ │ ├── library_Amazon_X-Ray.4.sg │ │ ├── library_AngleSharp.4.sg │ │ ├── library_Antlr.4.sg │ │ ├── library_AppleSoftwareUpdate.4.sg │ │ ├── library_Argon2.4.sg │ │ ├── library_AtMsg32.4.sg │ │ ├── library_Atlantic.4.sg │ │ ├── library_Authorwave.4.sg │ │ ├── library_Autofac.4.sg │ │ ├── library_BenchmarkDotNet.4.sg │ │ ├── library_Boost.4.sg │ │ ├── library_BrotliSharpLib.4.sg │ │ ├── library_CUDA-Driver.4.sg │ │ ├── library_Castle.Net.4.sg │ │ ├── library_ChilkatNativeLib.4.sg │ │ ├── library_Chromium_Embedded_Framework.4.sg │ │ ├── library_Chromium_WebView.4.sg │ │ ├── library_CliWrap.4.sg │ │ ├── library_ClosedXML.4.sg │ │ ├── library_CodeBase.4.sg │ │ ├── library_CommandLineParser.4.sg │ │ ├── library_Costura.Fody.4.sg │ │ ├── library_Crc32_NET.4.sg │ │ ├── library_Crc_NET.4.sg │ │ ├── library_CsvHelper.4.sg │ │ ├── library_D3DRM.4.sg │ │ ├── library_D3DXOF.4.sg │ │ ├── library_Dapper.4.sg │ │ ├── library_DeepCloner.4.sg │ │ ├── library_Direct2D.4.sg │ │ ├── library_Direct3D.4.sg │ │ ├── library_DirectDraw.4.sg │ │ ├── library_DirectInput.4.sg │ │ ├── library_DirectSound.4.sg │ │ ├── library_DirectX.4.sg │ │ ├── library_DirectorAPI.4.sg │ │ ├── library_Discord.Net.4.sg │ │ ├── library_DnsClient.NET.4.sg │ │ ├── library_Dryloc.4.sg │ │ ├── library_EAX_Unified.4.sg │ │ ├── library_EcmaScript_NET.4.sg │ │ ├── library_Edit_Dev.4.sg │ │ ├── library_ElectronApp.4.sg │ │ ├── library_EpicGames.4.sg │ │ ├── library_ExcelDataReader.4.sg │ │ ├── library_ExcelNumberFormat.4.sg │ │ ├── library_ExifLibNet.4.sg │ │ ├── library_FAAD.4.sg │ │ ├── library_FFmpeg.4.sg │ │ ├── library_FastExpressionCompiler.4.sg │ │ ├── library_FastMember.4.sg │ │ ├── library_FastRsync_NET.4.sg │ │ ├── library_Fastenshtein.4.sg │ │ ├── library_Fasterflect.4.sg │ │ ├── library_FlashPlayer.1.sg │ │ ├── library_FluentValidation.4.sg │ │ ├── library_Fox_Pro.4.sg │ │ ├── library_FusionCache.4.sg │ │ ├── library_FuzzySharp.4.sg │ │ ├── library_GitLabApiClient.4.sg │ │ ├── library_GoldSrc.3.sg │ │ ├── library_Google_APIs.4.sg │ │ ├── library_Google_ProtoBuf.4.sg │ │ ├── library_Harmony.4.sg │ │ ├── library_HtmlAgilityPack.4.sg │ │ ├── library_Humanizer.4.sg │ │ ├── library_ImageSharp.4.sg │ │ ├── library_Intel_IPP.4.sg │ │ ├── library_Intel_TBB.4.sg │ │ ├── library_Intel_XeSS.4.sg │ │ ├── library_Irony.4.sg │ │ ├── library_LCL.5.sg │ │ ├── library_LINQKit.4.sg │ │ ├── library_LZMA.4.sg │ │ ├── library_LazyCache.4.sg │ │ ├── library_Lego1.4.sg │ │ ├── library_LibLog.4.sg │ │ ├── library_LibNoise.4.sg │ │ ├── library_LibPhoneNumber_NET.4.sg │ │ ├── library_LibSassBuilder.4.sg │ │ ├── library_LibVLCSharp.4.sg │ │ ├── library_LiteDB.4.sg │ │ ├── library_LoadServ.4.sg │ │ ├── library_Lua_Runtime.4.sg │ │ ├── library_MacroMix.4.sg │ │ ├── library_MailKit.4.sg │ │ ├── library_ManagedCuda.4.sg │ │ ├── library_Mapster.4.sg │ │ ├── library_Markdig.4.sg │ │ ├── library_MassTransit.4.sg │ │ ├── library_MediatR.4.sg │ │ ├── library_MemoryPack.4.sg │ │ ├── library_MessagePack.4.sg │ │ ├── library_Microsoft_AzureSDK.4.sg │ │ ├── library_Microsoft_Azure_SDK.4.sg │ │ ├── library_Microsoft_C_Runtime.4.sg │ │ ├── library_Microsoft_Edge_WebView.4.sg │ │ ├── library_Microsoft_NET_Runtime.4.sg │ │ ├── library_Microsoft_OpenAPI.4.sg │ │ ├── library_MilesSoundSystem.4.sg │ │ ├── library_MimeKit.4.sg │ │ ├── library_MongoDB.NET.4.sg │ │ ├── library_MonkeyCache.4.sg │ │ ├── library_Moq.4.sg │ │ ├── library_NJsonSchema.4.sg │ │ ├── library_NSubstitute.4.sg │ │ ├── library_NUnit.4.sg │ │ ├── library_Nerdbank.Streams.4.sg │ │ ├── library_Newtonsoft.Json.4.sg │ │ ├── library_Ninject.4.sg │ │ ├── library_NodaTime.4.sg │ │ ├── library_Nvidia_DLSS.4.sg │ │ ├── library_Nvidia_PhysX.4.sg │ │ ├── library_Nvidia_Streamline.4.sg │ │ ├── library_OodleCompression.4.sg │ │ ├── library_OpenAI.4.sg │ │ ├── library_OpenAL.4.sg │ │ ├── library_OpenCL.4.sg │ │ ├── library_OpenCV.4.sg │ │ ├── library_OpenColorIO.4.sg │ │ ├── library_OpenGL.4.sg │ │ ├── library_OpenIddict.4.sg │ │ ├── library_OpenSSL.4.sg │ │ ├── library_OpenTelemetry.4.sg │ │ ├── library_OpusAudio.4.sg │ │ ├── library_PdfPig.4.sg │ │ ├── library_Perfolizer.4.sg │ │ ├── library_Perl.3.sg │ │ ├── library_Plivo.4.sg │ │ ├── library_Polly.4.sg │ │ ├── library_PortAudio.4.sg │ │ ├── library_Python.4.sg │ │ ├── library_QMixer.4.sg │ │ ├── library_Qt.4.sg │ │ ├── library_RADVideoTools.4.sg │ │ ├── library_RNNoise.4.sg │ │ ├── library_RabbitMQ.4.sg │ │ ├── library_RamlToOpenApiConverter.4.sg │ │ ├── library_RestSharp.4.sg │ │ ├── library_SDL.4.sg │ │ ├── library_ScePad.4.sg │ │ ├── library_ScriptHookV.4.sg │ │ ├── library_Scrutor.4.sg │ │ ├── library_SecretRabbitCode.4.sg │ │ ├── library_Serilog.4.sg │ │ ├── library_SharpCompress.4.sg │ │ ├── library_SharpZipLib.4.sg │ │ ├── library_Sigil.4.sg │ │ ├── library_SkiaSharp.4.sg │ │ ├── library_Smacker.4.sg │ │ ├── library_SmartHeap.4.sg │ │ ├── library_Snappier.4.sg │ │ ├── library_Spectre.Console.4.sg │ │ ├── library_Stackify.4.sg │ │ ├── library_Starkbank_ECDSA.4.sg │ │ ├── library_Steam.4.sg │ │ ├── library_Swashbuckle.AspNetCore.4.sg │ │ ├── library_TNTSI.4.sg │ │ ├── library_Tabula.4.sg │ │ ├── library_Telegram.Bot.4.sg │ │ ├── library_Twilio.4.sg │ │ ├── library_Twilio_SendGrid.4.sg │ │ ├── library_UAParser.4.sg │ │ ├── library_Unity.4.sg │ │ ├── library_VFW.4.sg │ │ ├── library_Vorbis.4.sg │ │ ├── library_Vulkan.4.sg │ │ ├── library_WF.Guna.UI2.4.sg │ │ ├── library_WF.Krypton.4.sg │ │ ├── library_WF.MetroFramework.4.sg │ │ ├── library_WF.ReaLTaiizor.4.sg │ │ ├── library_WF_WPF.MaterialSkin.4.sg │ │ ├── library_WPF.AvalonEdit.4.sg │ │ ├── library_WPF.ControlzEx.4.sg │ │ ├── library_WPF.MahApps_Metro.4.sg │ │ ├── library_WebActivatorEx.4.sg │ │ ├── library_WinSparkle.4.sg │ │ ├── library_WwiseAudioEngine.4.sg │ │ ├── library_XLive.4.sg │ │ ├── library_XPatFC.4.sg │ │ ├── library_Xerces-CPP.4.sg │ │ ├── library_Xojo.4.sg │ │ ├── library_YUICompressor_NET.4.sg │ │ ├── library_YamlDotNet.4.sg │ │ ├── library_ZstdSharp.4.sg │ │ ├── library_Zydis.4.sg │ │ ├── library_combres.4.sg │ │ ├── library_curl.4.sg │ │ ├── library_discord-rpc.4.sg │ │ ├── library_dotless.4.sg │ │ ├── library_expat_xml_parser.4.sg │ │ ├── library_gRPC_NET.4.sg │ │ ├── library_iMuse.4.sg │ │ ├── library_java.3.sg │ │ ├── library_libfvad.4.sg │ │ ├── library_libpng.4.sg │ │ ├── library_log4net.4.sg │ │ ├── library_lz4net.4.sg │ │ ├── library_nClam.4.sg │ │ ├── library_rlottie.4.sg │ │ ├── library_sqlite.4.sg │ │ ├── library_wxWidgets.5.sg │ │ ├── library_xUnit.net.4.sg │ │ ├── library_zlib.4.sg │ │ ├── linkers.6.sg │ │ ├── marker_AMD_PowerXpress.5.sg │ │ ├── marker_Nvidia_Optimus.5.sg │ │ ├── native_only/ │ │ │ └── about.txt │ │ ├── other_Dolphin_VM.1.sg │ │ ├── other_FileSplit_Self-Merger.2.sg │ │ ├── other_GSplit.1.sg │ │ ├── packer_32LiTe.2.sg │ │ ├── packer_AHpacker.2.sg │ │ ├── packer_ANDpakk.2.sg │ │ ├── packer_ASDPack.2.sg │ │ ├── packer_ASPack.2.sg │ │ ├── packer_Advanced_BAT_to_EXE_Converter.2.sg │ │ ├── packer_AlushPacker.2.sg │ │ ├── packer_Anskya_NTPacker_Generator.2.sg │ │ ├── packer_AtomPePacker.2.sg │ │ ├── packer_BatToExe.2.sg │ │ ├── packer_BatToExeConverter.2.sg │ │ ├── packer_BeRoEXEPacker.2.sg │ │ ├── packer_BoxedApp.2.sg │ │ ├── packer_CExe.2.sg │ │ ├── packer_CICompress.2.sg │ │ ├── packer_Cxfreeze.2.sg │ │ ├── packer_DxPack.2.sg │ │ ├── packer_EXE32Pack.2.sg │ │ ├── packer_ExE_Pack.2.sg │ │ ├── packer_FSG.2.sg │ │ ├── packer_Fatpack.2.sg │ │ ├── packer_HTML_executable.1.sg │ │ ├── packer_JDPack.2.sg │ │ ├── packer_KByS.2.sg │ │ ├── packer_MEW.2.sg │ │ ├── packer_MPRESS.2.sg │ │ ├── packer_MoleBox.2.sg │ │ ├── packer_Mystic_Compressor.2.sg │ │ ├── packer_NETZ.2.sg │ │ ├── packer_NOS_Packer.2.sg │ │ ├── packer_NTPacker.2.sg │ │ ├── packer_NTShell.2.sg │ │ ├── packer_NakedPacker.2.sg │ │ ├── packer_NeoLite.2.sg │ │ ├── packer_NodeJS_Nexe.2.sg │ │ ├── packer_NodeJS_Pkg.2.sg │ │ ├── packer_NsPack.2.sg │ │ ├── packer_Nuitka.2.sg │ │ ├── packer_PACKWIN.2.sg │ │ ├── packer_PE-PACK.sg │ │ ├── packer_PECompact.2.sg │ │ ├── packer_PKLITE.2.sg │ │ ├── packer_Pack_Master.2.sg │ │ ├── packer_Packanoid.2.sg │ │ ├── packer_Packman.2.sg │ │ ├── packer_PeX.2.sg │ │ ├── packer_Petite.2.sg │ │ ├── packer_PyInstaller.2.sg │ │ ├── packer_QuestPowerGUI.2.sg │ │ ├── packer_RLPack.2.sg │ │ ├── packer_SC_Pack.2.sg │ │ ├── packer_SecuPack.2.sg │ │ ├── packer_SerGreen_Appacker.2.sg │ │ ├── packer_SimplePackerByEronana.2.sg │ │ ├── packer_Simple_Pack.2.sg │ │ ├── packer_Software_Compress.2.sg │ │ ├── packer_Squishy.2.sg │ │ ├── packer_TPP_Pack.2.sg │ │ ├── packer_TheArk.2.sg │ │ ├── packer_UPX.2.sg │ │ ├── packer_VPacker.2.sg │ │ ├── packer_VbsToExeConverter.2.sg │ │ ├── packer_WWPack32.2.sg │ │ ├── packer_WinUpack.2.sg │ │ ├── packer_Windows_PE_Packer_by_Chenzs108.2.sg │ │ ├── packer_XComp.2.sg │ │ ├── packer_XPack.2.sg │ │ ├── packer_aPack.2.sg │ │ ├── packer_dePACK.2.sg │ │ ├── packer_ezip.2.sg │ │ ├── packer_hXOR.2.sg │ │ ├── packer_hmimys_PE-Pack.2.sg │ │ ├── packer_kkrunchy.2.sg │ │ ├── packer_mPack.2.sg │ │ ├── packer_mkfPack.2.sg │ │ ├── packer_nPack.2.sg │ │ ├── packer_netshrink.2.sg │ │ ├── packer_ps2exe.2.sg │ │ ├── packer_py2exe.2.sg │ │ ├── packer_scr2exe.2.sg │ │ ├── packer_yzPack.2.sg │ │ ├── patcher_CodeFusion_Wizard.1.sg │ │ ├── patcher_PMaker.1.sg │ │ ├── patcher_RPP.1.sg │ │ ├── patcher_RTPatch.1.sg │ │ ├── patcher_dUP.1.sg │ │ ├── patcher_simple_patch.1.sg │ │ ├── player_Power_Screen_Recorder.1.sg │ │ ├── protection_BattlEye.5.sg │ │ ├── protection_DS.Eutron_SmartKey_dongle.5.sg │ │ ├── protection_DS.HASP_dongle.5.sg │ │ ├── protection_DS.Hardlock_dongle.5.sg │ │ ├── protection_DS.MARX_Crypto-Box_dongle.5.sg │ │ ├── protection_DS.Matrix_Hardware_Lock_dongle.5.sg │ │ ├── protection_DS.NetHASP_dongle.5.sg │ │ ├── protection_DS.SenseLock_dongle.5.sg │ │ ├── protection_DS.Sentinel_SuperPro_dongle.5.sg │ │ ├── protection_DS.Sentinel_dongle.5.sg │ │ ├── protection_DS.SoftLok_dongle.5.sg │ │ ├── protection_DS.Unikey_dongle.5.sg │ │ ├── protection_DS.WIBU_Key_dongle.5.sg │ │ ├── protection_HASP_HL_Protection.5.sg │ │ ├── protection_Microsoft_Warbird.2.sg │ │ ├── protection_Softlocx.1.sg │ │ ├── protection_SteamStub.5.sg │ │ ├── protection_Wibu_Codemeter.1.sg │ │ ├── protection_obfus_h.5.sg │ │ ├── protection_obfusheader_h.5.sg │ │ ├── protector_ACProtect.2.sg │ │ ├── protector_AHTeam_EP_Protector.2.sg │ │ ├── protector_ASM_Guard.2.sg │ │ ├── protector_ASProtect.2.sg │ │ ├── protector_AT4RE.2.sg │ │ ├── protector_AZProtect_0001.2.sg │ │ ├── protector_AbyssMedia_ScriptCryptor.2.sg │ │ ├── protector_ActiveMark.2.sg │ │ ├── protector_Agile.2.sg │ │ ├── protector_Alcatraz.2.sg │ │ ├── protector_Alienyze.2.sg │ │ ├── protector_AntiDote.2.sg │ │ ├── protector_Anticrack_Software.2.sg │ │ ├── protector_ArmDot.2.sg │ │ ├── protector_Armadillo.2.sg │ │ ├── protector_Arxan.2.sg │ │ ├── protector_BJFnt.2.sg │ │ ├── protector_Babel_.NET.2.sg │ │ ├── protector_Berio.2.sg │ │ ├── protector_ByfronTech.2.sg │ │ ├── protector_ByteGuard.2.sg │ │ ├── protector_Cameyo.2.sg │ │ ├── protector_CliSecure.2.sg │ │ ├── protector_Code-Lock.2.sg │ │ ├── protector_CodeCrypt.2.sg │ │ ├── protector_CodeVeil.2.sg │ │ ├── protector_Code_Virtualizer.2.sg │ │ ├── protector_Codewall.2.sg │ │ ├── protector_Confuser.2.sg │ │ ├── protector_CopyMinder.2.sg │ │ ├── protector_Crinkler.2.sg │ │ ├── protector_Crunch.2.sg │ │ ├── protector_CrypKey.2.sg │ │ ├── protector_CrypToCrack.2.sg │ │ ├── protector_Cryptect.2.sg │ │ ├── protector_CryptoObfuscator.2.sg │ │ ├── protector_DBPE.2.sg │ │ ├── protector_DNGuard.2.sg │ │ ├── protector_DS.Sentinel_SuperPro.2.sg │ │ ├── protector_DYAMAR.2.sg │ │ ├── protector_DZA_Patcher.2.sg │ │ ├── protector_Daemon_Protect.2.sg │ │ ├── protector_DalKrypt.2.sg │ │ ├── protector_DeepSea.2.sg │ │ ├── protector_Denuvo.2.sg │ │ ├── protector_DotFix_Nice_Protect.2.sg │ │ ├── protector_Dotfuscator.2.sg │ │ ├── protector_DragonArmor.2.sg │ │ ├── protector_ENIGMA.2.sg │ │ ├── protector_EXEFog.2.sg │ │ ├── protector_EXE_Password_Protector.2.sg │ │ ├── protector_Eazfuscator.2.sg │ │ ├── protector_Elan_License_Manager.1.sg │ │ ├── protector_ElecKey.2.sg │ │ ├── protector_Escargot.2.sg │ │ ├── protector_Excalibur.2.sg │ │ ├── protector_ExeShield.2.sg │ │ ├── protector_ExeStealth.2.sg │ │ ├── protector_Exe_Guarder.2.sg │ │ ├── protector_Exe_Shield.2.sg │ │ ├── protector_FISH_.NET.2.sg │ │ ├── protector_FishPE_Shield.2.sg │ │ ├── protector_Fish_PE.2.sg │ │ ├── protector_FlashBack_Protector.2.sg │ │ ├── protector_G!X_Protector.2.sg │ │ ├── protector_GameGuard.2.sg │ │ ├── protector_Goats_PE_Mutilator.2.sg │ │ ├── protector_Goliath.2.sg │ │ ├── protector_HASP.2.sg │ │ ├── protector_HackShield.2.sg │ │ ├── protector_Hide&Protect.2.sg │ │ ├── protector_HidePE.2.sg │ │ ├── protector_HyperTech_Crackproof.2.sg │ │ ├── protector_ILProtector.2.sg │ │ ├── protector_ILUCRYPT.2.sg │ │ ├── protector_IProtect.2.sg │ │ ├── protector_Inquartos_Obfuscator.2.sg │ │ ├── protector_IntelliProtector.2.sg │ │ ├── protector_InxObfuscator.2.sg │ │ ├── protector_Jar2exe.1.sg │ │ ├── protector_KoiVM.2.sg │ │ ├── protector_Konekt_Protector.2.sg │ │ ├── protector_Krypton.2.sg │ │ ├── protector_LARP.2.sg │ │ ├── protector_LDK.2.sg │ │ ├── protector_LDK_.NET.2.sg │ │ ├── protector_LameCrypt.2.sg │ │ ├── protector_Laserlok.2.sg │ │ ├── protector_MSLRH.2.sg │ │ ├── protector_MZ0oPE.2.sg │ │ ├── protector_MaskPE.2.sg │ │ ├── protector_Maxtocode.2.sg │ │ ├── protector_Metrowerks_CodeWarrior.2.sg │ │ ├── protector_Morphnah.2.sg │ │ ├── protector_N-Code.2.sg │ │ ├── protector_N-Joy.2.sg │ │ ├── protector_NET_Spider.2.sg │ │ ├── protector_NTkrnl_Protector.2.sg │ │ ├── protector_NetReactor.2.sg │ │ ├── protector_NetShield.2.sg │ │ ├── protector_Ningishzida.2.sg │ │ ├── protector_NoobyProtect.2.sg │ │ ├── protector_North_Star_PE_Shrinker.2.sg │ │ ├── protector_ORiEN.2.sg │ │ ├── protector_Obfuscar.2.sg │ │ ├── protector_Obfuscator_NET_2009.2.sg │ │ ├── protector_Obsidium.2.sg │ │ ├── protector_OneVM.2.sg │ │ ├── protector_Oreans_CodeVirtualizer.2.sg │ │ ├── protector_PACE.2.sg │ │ ├── protector_PCShrink.2.sg │ │ ├── protector_PC_Guard.2.sg │ │ ├── protector_PE-Armor.2.sg │ │ ├── protector_PE-Shield.2.sg │ │ ├── protector_PEBundle.2.sg │ │ ├── protector_PECRYPT32.2.sg │ │ ├── protector_PELock.2.sg │ │ ├── protector_PENinja.2.sg │ │ ├── protector_PESpin.2.sg │ │ ├── protector_PETetris.2.sg │ │ ├── protector_PE_Diminisher.2.sg │ │ ├── protector_PE_Encrypt.2.sg │ │ ├── protector_PE_Intro.2.sg │ │ ├── protector_PE_Lock_NT.2.sg │ │ ├── protector_PE_Lock_Phantasm_by_Ding_Boy.2.sg │ │ ├── protector_PE_Password.2.sg │ │ ├── protector_PE_Protect.2.sg │ │ ├── protector_PEncrypt.2.sg │ │ ├── protector_PEnguinCrypt.2.sg │ │ ├── protector_PUNiSHER.2.sg │ │ ├── protector_Phoenix.2.sg │ │ ├── protector_Photo_Compiler.2.sg │ │ ├── protector_PolyCrypt_PE.2.sg │ │ ├── protector_Private_EXE_Protector.2.sg │ │ ├── protector_Protect_Disc.2.sg │ │ ├── protector_Protection_Plus.2.sg │ │ ├── protector_QrYPt0r.2.sg │ │ ├── protector_QuickBFC.2.sg │ │ ├── protector_QuickPack_NT.2.sg │ │ ├── protector_REVProt.2.sg │ │ ├── protector_RLP.2.sg │ │ ├── protector_ReNET-pack.2.sg │ │ ├── protector_RobustObfuscator.2.sg │ │ ├── protector_SC_Obfuscator.2.sg │ │ ├── protector_SDProtector.2.sg │ │ ├── protector_SLVc0deProtector.2.sg │ │ ├── protector_SVK_Protector.2.sg │ │ ├── protector_Safedisc.2.sg │ │ ├── protector_Safenet_RMS.2.sg │ │ ├── protector_Safengine_Shielden.2.sg │ │ ├── protector_SecuROM.2.sg │ │ ├── protector_Secure_Shade.2.sg │ │ ├── protector_Shrink_Wrap.2.sg │ │ ├── protector_Shrinker.2.sg │ │ ├── protector_SimbiOZ.2.sg │ │ ├── protector_Sixxpack.2.sg │ │ ├── protector_Skater.2.sg │ │ ├── protector_Smart_Assembly.2.sg │ │ ├── protector_SmokesCrypt.2.sg │ │ ├── protector_SoftProtect.2.sg │ │ ├── protector_SoftSentry.2.sg │ │ ├── protector_Special_EXE_Password_Protector.2.sg │ │ ├── protector_SpicesNet.2.sg │ │ ├── protector_StarForce.2.sg │ │ ├── protector_Ste@lth_PE.2.sg │ │ ├── protector_Tages.2.sg │ │ ├── protector_Themida.2.sg │ │ ├── protector_Thinstall.2.sg │ │ ├── protector_UG2002_Cruncher.2.sg │ │ ├── protector_UPX_Protector.2.sg │ │ ├── protector_UPolyX.2.sg │ │ ├── protector_UltraPro.2.sg │ │ ├── protector_VBox.2.sg │ │ ├── protector_VCasm-Protector.2.sg │ │ ├── protector_VMProtect.2.sg │ │ ├── protector_VMProtect_NET.2.sg │ │ ├── protector_VaySoft_PDF2EXE.2.sg │ │ ├── protector_VbsToExe.1.sg │ │ ├── protector_Virbox.2.sg │ │ ├── protector_XCR.2.sg │ │ ├── protector_Xenocode_Postbuild.2.sg │ │ ├── protector_XerinFuscator.2.sg │ │ ├── protector_Xtreamlok.2.sg │ │ ├── protector_Yano.2.sg │ │ ├── protector_Yodas_Protector.2.sg │ │ ├── protector_Yummy_Game_SoftwareShield.2.sg │ │ ├── protector_Zprotect.2.sg │ │ ├── protector_bambam.2.sg │ │ ├── protector_beria.2.sg │ │ ├── protector_eXPressor.2.sg │ │ ├── protector_hmimys_Protect.2.sg │ │ ├── protector_iPB_Protect.2.sg │ │ ├── protector_kkryptor.2.sg │ │ ├── protector_tElock.2.sg │ │ ├── rar.6.sg │ │ ├── sfx_12Ghosts_Zip2.1.sg │ │ ├── sfx_7z.1.sg │ │ ├── sfx_ARJSFX.1.sg │ │ ├── sfx_ARQ.1.sg │ │ ├── sfx_Abbyy_Lingvo.1.sg │ │ ├── sfx_Active_Delivery.1.sg │ │ ├── sfx_Cab.1.sg │ │ ├── sfx_Chilkat_ZIP_Self-Extractor.1.sg │ │ ├── sfx_CoffeeCup_SFX.2.sg │ │ ├── sfx_DelZip_SFX.2.sg │ │ ├── sfx_Dimd_SFX.1.sg │ │ ├── sfx_Envoy_Packager.1.sg │ │ ├── sfx_GZip.1.sg │ │ ├── sfx_GkSetup.1.sg │ │ ├── sfx_INFTool.1.sg │ │ ├── sfx_KRZIP_SFX.2.sg │ │ ├── sfx_LZH_SFX.1.sg │ │ ├── sfx_Lyme_SFX.1.sg │ │ ├── sfx_MP-ZipTool.1.sg │ │ ├── sfx_MPQ.1.sg │ │ ├── sfx_NanoZip.1.sg │ │ ├── sfx_PKSFX.1.sg │ │ ├── sfx_Paquet.1.sg │ │ ├── sfx_Quantum.1.sg │ │ ├── sfx_SZDD.1.sg │ │ ├── sfx_Squeez_SFX.1.sg │ │ ├── sfx_WinACE.1.sg │ │ ├── sfx_WinIMP.1.sg │ │ ├── sfx_WinImage.1.sg │ │ ├── sfx_WinPatch.1.sg │ │ ├── sfx_WinRAR.1.sg │ │ ├── sfx_WinZip.1.sg │ │ ├── sfx_ZipCentral_SFX.1.sg │ │ ├── sfx_Zip_SFX.2.sg │ │ ├── sfx_rar.1.sg │ │ ├── sign_tool_Windows_Authenticode.7.sg │ │ ├── tool_AHTeam_UPX_Mutanter.2.sg │ │ ├── tool_Microsoft_VisualStudio_NET.6.sg │ │ ├── tool_UPX-Patcher.6.sg │ │ ├── tool_UPXFreak.2.sg │ │ ├── tool_UPX_Inliner.2.sg │ │ ├── tool_UPX_Modifier.2.sg │ │ ├── tool_UPX_lock.2.sg │ │ ├── tool_UPX_scrambler.2.sg │ │ ├── tool_UnoPiX.2.sg │ │ ├── tool_XVolkolak.6.sg │ │ ├── tool_de4dot.6.sg │ │ └── zip.6.sg │ ├── PNG/ │ │ ├── _PNG.0.sg │ │ └── _init │ ├── PYC/ │ │ ├── _PYC.0.sg │ │ ├── _init │ │ └── packer_UPP.1.sg │ ├── QtFramework │ ├── RAR/ │ │ ├── _RAR.0.sg │ │ └── _init │ ├── RosASM │ ├── SpASM │ ├── TASM32 │ ├── ZIP/ │ │ ├── _ZIP.0.sg │ │ └── _init │ ├── _db_caching │ ├── _debug │ ├── _init │ ├── _runtime_helpers │ ├── archive-file │ ├── arj │ ├── bytecodeparsers │ ├── cab │ ├── chunkparsers │ ├── duration │ ├── language │ ├── python │ ├── rar-file │ ├── read │ ├── shell-script │ ├── soundchips │ ├── vgmcodingutils │ ├── wxWidgets │ ├── zip-file │ └── zlib ├── db_compress.cmd ├── db_custom/ │ └── .vscode/ │ ├── about.txt │ └── settings.json ├── db_extra/ │ ├── .vscode/ │ │ ├── about.txt │ │ └── settings.json │ ├── COM/ │ │ ├── packer_packers.2.sg │ │ └── patcher_patchers.1.sg │ ├── ELF/ │ │ └── protector_ELFCrypt.2.sg │ ├── MSDOS/ │ │ ├── cryptor_Cryptors.2.sg │ │ └── packer_FCP_IV.2.sg │ ├── PE/ │ │ ├── archive_Resources.6.sg │ │ ├── compiler_EP.MSC.4.sg │ │ ├── compiler_EP.MSVC.4.sg │ │ ├── cryptor_3dcrypter.2.sg │ │ ├── cryptor_404crypter.1.sg │ │ ├── cryptor_ABC_Cryptor.2.sg │ │ ├── cryptor_AR_Crypt_Private.2.sg │ │ ├── cryptor_Aase_Crypter.2.sg │ │ ├── cryptor_AcidCrypt.2.sg │ │ ├── cryptor_AlmafuerteCrypter.1.sg │ │ ├── cryptor_Anslym_Crypter.2.sg │ │ ├── cryptor_App_Encryptor.2.sg │ │ ├── cryptor_BasicCrypt1.1.sg │ │ ├── cryptor_BopCrypt.2.sg │ │ ├── cryptor_ChainskiCrypter.1.sg │ │ ├── cryptor_CodeCrypter.2.sg │ │ ├── cryptor_Crypter.2.sg │ │ ├── cryptor_Cryptic.2.sg │ │ ├── cryptor_DCrypt_Private.2.sg │ │ ├── cryptor_DataAnubis.1.sg │ │ ├── cryptor_Fly-Crypter.2.sg │ │ ├── cryptor_FreeCryptor.2.sg │ │ ├── cryptor_INCrypter.2.sg │ │ ├── cryptor_Open_Source_Code_Crypter.2.sg │ │ ├── cryptor_STUD.2.sg │ │ ├── cryptor_SexCrypt.2.sg │ │ ├── cryptor_Sexe_Crypter.2.sg │ │ ├── cryptor_Simple_UPX_Cryptor.2.sg │ │ ├── cryptor_The_Best_Cryptor.2.sg │ │ ├── cryptor_ass-crypter.2.sg │ │ ├── cryptor_darkeye.1.sg │ │ ├── cryptor_njCrypter.2.sg │ │ ├── cryptor_unknown_malware_cryptor.2.sg │ │ ├── cryptors_1.2.sg │ │ ├── cryptors_2.2.sg │ │ ├── insatller_Avast_installer.sg │ │ ├── installer_Adobe_Flash_Player_installer.1.sg │ │ ├── installer_Blizzard_PrePatch.1.sg │ │ ├── installer_Box_Stub.1.sg │ │ ├── installer_BulletProofSoft_installer.1.sg │ │ ├── installer_DockerDesktopInstaller.1.sg │ │ ├── installer_Enigma_Installer.1.sg │ │ ├── installer_Hamrick_Software_installer.1.sg │ │ ├── installer_Kingsoft_Installer.1.sg │ │ ├── installer_QT_installer.1.sg │ │ ├── installer_SHIROUZU_Hiroaki_installer.1.sg │ │ ├── installer_Store_Installer.1.sg │ │ ├── installer_TrueCrypt-VeraCrypt_installer.1.sg │ │ ├── joiner_Anskya_Binder.2.sg │ │ ├── joiner_Blade_Joiner.1.sg │ │ ├── joiner_DJoin.1.sg │ │ ├── joiner_ExeJoiner.1.sg │ │ ├── keygen_keygens.1.sg │ │ ├── library_DS.Flexlm.4.sg │ │ ├── library_DS.RLM.4.sg │ │ ├── packer_BobPack.2.sg │ │ ├── packer_Feokt.2.sg │ │ ├── packer_IMPostor_Pack.2.sg │ │ ├── packer_Native_UD_Packer.2.sg │ │ ├── packer_TomatoX.2.sg │ │ ├── packer_bbfb.2.sg │ │ ├── patcher_Patch.1.sg │ │ ├── protection_DS.Key-Lok_II_dongle.5.sg │ │ ├── protection_DS.Novex_dongle.4.sg │ │ ├── protection_DS.Rockey4_dongle.5.sg │ │ ├── protection_DS.Wizzkey_dongle.5.sg │ │ ├── protector_ARM_Protector.2.sg │ │ ├── protector_ASPR_Stripper.2.sg │ │ ├── protector_Adept_Protector.2.sg │ │ ├── protector_Alex_Protector.2.sg │ │ ├── protector_Alloy.2.sg │ │ ├── protector_Apex-c.2.sg │ │ ├── protector_BitShape_PE_Crypt.2.sg │ │ ├── protector_BlindSpot.2.sg │ │ ├── protector_Break_Into_Pattern.2.sg │ │ ├── protector_CDS_SS.2.sg │ │ ├── protector_CodeSafe.2.sg │ │ ├── protector_DEF.2.sg │ │ ├── protector_DirTy_CrYpt0r.2.sg │ │ ├── protector_EP.2.sg │ │ ├── protector_EXECrypt.2.sg │ │ ├── protector_EXERefactor.2.sg │ │ ├── protector_Embed_PE.2.sg │ │ ├── protector_EncryptPE.2.sg │ │ ├── protector_ExeSafeguard.2.sg │ │ ├── protector_ExeSmasher.2.sg │ │ ├── protector_Exe_Locker.2.sg │ │ ├── protector_FakeNinja.2.sg │ │ ├── protector_FixupPak.2.sg │ │ ├── protector_Fuck_n_Joy.2.sg │ │ ├── protector_Fusion.2.sg │ │ ├── protector_GuardantStealth.2.sg │ │ ├── protector_ICrypt.2.sg │ │ ├── protector_ID_Application_Protector_NoNamePacker.2.sg │ │ ├── protector_KGCrypt.2.sg │ │ ├── protector_MZ-Crypt.2.sg │ │ ├── protector_Minke.2.sg │ │ ├── protector_Morphine.2.sg │ │ ├── protector_NecroVM.Virt.2.sg │ │ ├── protector_NoodleCrypt.2.sg │ │ ├── protector_PE-Admin.2.sg │ │ ├── protector_PENightMare.2.sg │ │ ├── protector_PE_Quake.2.sg │ │ ├── protector_Pe123.2.sg │ │ ├── protector_PolyEnE.2.sg │ │ ├── protector_PwdProtect.2.sg │ │ ├── protector_QQProtect.2.sg │ │ ├── protector_Sepanta.2.sg │ │ ├── protector_Soft_Defender.2.sg │ │ ├── protector_TheHypers.2.sg │ │ ├── protector_WinKript.2.sg │ │ ├── protector_Wind_of_Crypt.2.sg │ │ ├── protector_Xtreme-Protector.2.sg │ │ ├── protector_muckis_protector.2.sg │ │ ├── sfx_ADS_Self_Extractor.1.sg │ │ ├── sfx_CipherWall.1.sg │ │ ├── tool_UPX_shit.2.sg │ │ ├── tool_UPXcrypter.2.sg │ │ └── virus_Win9x_CIH.1.sg │ └── about.txt ├── dbs_min/ │ ├── db/ │ │ ├── .vscode/ │ │ │ ├── about.txt │ │ │ └── settings.json │ │ ├── ACE │ │ ├── APK/ │ │ │ ├── _APK.0.sg │ │ │ ├── _init │ │ │ ├── library_IL2CPP.4.sg │ │ │ ├── library_SandHook.4.sg │ │ │ ├── library_UnicomSDK.4.sg │ │ │ ├── library_Unity.4.sg │ │ │ ├── package_PackageName.1.sg │ │ │ ├── packer_Kony.2.sg │ │ │ ├── protector_APKProtect.2.sg │ │ │ ├── protector_APKProtector.2.sg │ │ │ ├── protector_AlibabaProtection.2.sg │ │ │ ├── protector_AndroidRepublic.2.sg │ │ │ ├── protector_AppGuard.2.sg │ │ │ ├── protector_AppSolid.2.sg │ │ │ ├── protector_BaiduProtection.2.sg │ │ │ ├── protector_BangBangReinforcement.2.sg │ │ │ ├── protector_BangcleProtection.2.sg │ │ │ ├── protector_DXShield.2.sg │ │ │ ├── protector_DexProtector.2.sg │ │ │ ├── protector_DingXiangReinforcement.2.sg │ │ │ ├── protector_EasyShield.2.sg │ │ │ ├── protector_ExTrus_AppDefence.2.sg │ │ │ ├── protector_Gemalto.2.sg │ │ │ ├── protector_Hdus-Wjus.2.sg │ │ │ ├── protector_Ijiami.2.sg │ │ │ ├── protector_Jiagu.2.sg │ │ │ ├── protector_Kiro.2.sg │ │ │ ├── protector_Kiwi.2.sg │ │ │ ├── protector_LIAPP.2.sg │ │ │ ├── protector_MedusaH.2.sg │ │ │ ├── protector_MobileTencentProtect.2.sg │ │ │ ├── protector_NQShield.2.sg │ │ │ ├── protector_NagaPTProtection.2.sg │ │ │ ├── protector_OLLVM-TTL.2.sg │ │ │ ├── protector_Obfuscapk.2.sg │ │ │ ├── protector_PangXie.2.sg │ │ │ ├── protector_ProGuard.2.sg │ │ │ ├── protector_QDBH.2.sg │ │ │ ├── protector_Qihoo360Protection.2.sg │ │ │ ├── protector_SecNeo.2.sg │ │ │ ├── protector_SecShell.2.sg │ │ │ ├── protector_TencentLegu.2.sg │ │ │ ├── protector_TencentProtection.2.sg │ │ │ ├── protector_TencentSecurity.2.sg │ │ │ ├── protector_TongfuShield.2.sg │ │ │ ├── protector_VDog.2.sg │ │ │ ├── protector_Virbox.2.sg │ │ │ ├── protector_Yidun.2.sg │ │ │ ├── protector_build38.2.sg │ │ │ ├── protector_iCrypt.2.sg │ │ │ ├── tool_ApktoolPlus.6.sg │ │ │ └── tool_SingleJar.3.sg │ │ ├── Amiga/ │ │ │ ├── AMOS_Basic.4.sg │ │ │ ├── AMOS_Compiler_Cruncher.1.sg │ │ │ ├── Absoft_AC_Basic.4.sg │ │ │ ├── Absoft_Fortran.4.sg │ │ │ ├── Amiga_E.4.sg │ │ │ ├── Amiga_font.1.sg │ │ │ ├── Aztec_C.4.sg │ │ │ ├── BHC3_Relocatable.1.sg │ │ │ ├── BPack_SFX.1.sg │ │ │ ├── Blitz_BASIC.4.sg │ │ │ ├── ByteKiller_Clone.1.sg │ │ │ ├── Chryseis_Cruncher.1.sg │ │ │ ├── Crunch_Master.1.sg │ │ │ ├── DICE_C.4.sg │ │ │ ├── DMS_FMS-Masher.1.sg │ │ │ ├── Deluxe_Cruncher.1.sg │ │ │ ├── Free_Pascal.4.sg │ │ │ ├── GNU_C.4.sg │ │ │ ├── HQC_Cruncher.1.sg │ │ │ ├── HiSoft_Basic.4.sg │ │ │ ├── High_Pressure_Cruncher.1.sg │ │ │ ├── Jan_Heweliusz_Cruncher.1.sg │ │ │ ├── Lattice_C.4.sg │ │ │ ├── LhPak_SFX.1.sg │ │ │ ├── Master_Cruncher.1.sg │ │ │ ├── Maxon_C++.4.sg │ │ │ ├── RexxMasher_(jrms).1.sg │ │ │ ├── Sound-Tracker_Cruncher.1.sg │ │ │ ├── Storm_C.4.sg │ │ │ ├── TNM_Cruncher.1.sg │ │ │ ├── TSK_Cruncher.1.sg │ │ │ ├── Time_Cruncher.1.sg │ │ │ ├── Titanics_Cruncher.1.sg │ │ │ ├── Turtle_Smasher.1.sg │ │ │ ├── Ultimate_Packer.1.sg │ │ │ ├── _Amiga.0.sg │ │ │ ├── _init │ │ │ ├── compiler_ABasic.4.sg │ │ │ ├── compiler_AmigaBasic.4.sg │ │ │ ├── compiler_GFA-Basic.4.sg │ │ │ ├── compiler_JForth.4.sg │ │ │ ├── compiler_Multi-Forth.4.sg │ │ │ ├── compiler_Oberon-A.4.sg │ │ │ ├── compiler_PureBasic.4.sg │ │ │ ├── compiler_VBCC.4.sg │ │ │ ├── cruncher_AddressHead.1.sg │ │ │ ├── cruncher_ByteKiller.1.sg │ │ │ ├── cruncher_CopyCat.1.sg │ │ │ ├── cruncher_Cranker.1.sg │ │ │ ├── cruncher_Crunch-Mania.1.sg │ │ │ ├── cruncher_Crunch-O-Matic.1.sg │ │ │ ├── cruncher_Crunch.1.sg │ │ │ ├── cruncher_CrunchyDat.1.sg │ │ │ ├── cruncher_Defjam.1.sg │ │ │ ├── cruncher_DoubleAction.1.sg │ │ │ ├── cruncher_DragPack.1.sg │ │ │ ├── cruncher_FileShield.1.sg │ │ │ ├── cruncher_FlashSpeed.1.sg │ │ │ ├── cruncher_GnuPacker.1.sg │ │ │ ├── cruncher_House.1.sg │ │ │ ├── cruncher_ISC.1.sg │ │ │ ├── cruncher_Imploder.1.sg │ │ │ ├── cruncher_MOPacker.1.sg │ │ │ ├── cruncher_MaxPacker.1.sg │ │ │ ├── cruncher_MegaCruncher.1.sg │ │ │ ├── cruncher_PackIt.1.sg │ │ │ ├── cruncher_Pak.1.sg │ │ │ ├── cruncher_PowerPacker.1.sg │ │ │ ├── cruncher_ProPack.1.sg │ │ │ ├── cruncher_ReXXMaSHeR.1.sg │ │ │ ├── cruncher_Relokit.1.sg │ │ │ ├── cruncher_S-Exec.1.sg │ │ │ ├── cruncher_Shrinkler.1.sg │ │ │ ├── cruncher_Spike.1.sg │ │ │ ├── cruncher_StoneCracker.1.sg │ │ │ ├── cruncher_Super-Cruncher.1.sg │ │ │ ├── cruncher_SyncroPacker.1.sg │ │ │ ├── cruncher_TUC.1.sg │ │ │ ├── cruncher_TetraCrunch.1.sg │ │ │ ├── cruncher_TetraPack.1.sg │ │ │ ├── cruncher_TryIt.1.sg │ │ │ ├── cruncher_TurboSqueezer.1.sg │ │ │ ├── cruncher_xpkmaster.1.sg │ │ │ ├── joiner_ETA.1.sg │ │ │ ├── joiner_EXP.1.sg │ │ │ ├── joiner_Glue.1.sg │ │ │ ├── library_library.1.sg │ │ │ ├── module_DeliTracker.1.sg │ │ │ ├── other_other.1.sg │ │ │ ├── self-displayer_DPS.1.sg │ │ │ ├── self-displayer_Iff2ex.1.sg │ │ │ ├── self-displayer_S-Anim.1.sg │ │ │ ├── self-displayer_S-Pic.1.sg │ │ │ ├── sfx_DIMP.1.sg │ │ │ ├── sfx_DMSSFX.1.sg │ │ │ ├── sfx_LHASFX.1.sg │ │ │ ├── sfx_LHSFX.1.sg │ │ │ ├── tool_EFFECT-loader.1.sg │ │ │ └── tool_VideoTracker.1.sg │ │ ├── Archive/ │ │ │ ├── _Archive.0.sg │ │ │ └── _init │ │ ├── AtariST/ │ │ │ ├── _AtariST.0.sg │ │ │ └── _init │ │ ├── Binary/ │ │ │ ├── Amiga_loadable.1.sg │ │ │ ├── Certificate_cert.WinAuth.1.sg │ │ │ ├── RIFF.1.sg │ │ │ ├── ROM_1.sg │ │ │ ├── U-Boot.1.sg │ │ │ ├── __MiniExtensionsHeuristic_By_DosX.7.sg │ │ │ ├── __MiniJavaScriptHeuristic_By_DosX.7.sg │ │ │ ├── _init │ │ │ ├── archive.ACE.1.sg │ │ │ ├── archive.ARJ.1.sg │ │ │ ├── archive.DEFLATE.1.sg │ │ │ ├── archive.LZ4.1.sg │ │ │ ├── archive.MS_Compound.1.sg │ │ │ ├── archive.PC_Secure.sg │ │ │ ├── archive.RAR.1.sg │ │ │ ├── archive.ZIP.1.sg │ │ │ ├── archive.ZLIB.1.sg │ │ │ ├── archive_7z.1.sg │ │ │ ├── archive_ANC-Cruncher.1.sg │ │ │ ├── archive_AR.1.sg │ │ │ ├── archive_ARC.1.sg │ │ │ ├── archive_ASAR.1.sg │ │ │ ├── archive_BCSAR.1.sg │ │ │ ├── archive_BZip.1.sg │ │ │ ├── archive_CCA.1.sg │ │ │ ├── archive_CFL3.1.sg │ │ │ ├── archive_CKP.1.sg │ │ │ ├── archive_Cab.1.sg │ │ │ ├── archive_DAA.1.sg │ │ │ ├── archive_DCP.1.sg │ │ │ ├── archive_DXA.1.sg │ │ │ ├── archive_DatPack.1.sg │ │ │ ├── archive_DotBundle.sg │ │ │ ├── archive_EdgeDataPak.1.sg │ │ │ ├── archive_Flatpak.1.sg │ │ │ ├── archive_GhidraZipFile.1.sg │ │ │ ├── archive_GodotPCK.1.sg │ │ │ ├── archive_HIP.1.sg │ │ │ ├── archive_IFP.1.sg │ │ │ ├── archive_IPW.1.sg │ │ │ ├── archive_InnoSetup.1.sg │ │ │ ├── archive_JAM.1.sg │ │ │ ├── archive_LAB.1.sg │ │ │ ├── archive_LRZ.1.sg │ │ │ ├── archive_LZOP.1.sg │ │ │ ├── archive_MCS.1.sg │ │ │ ├── archive_MS-WIM.1.sg │ │ │ ├── archive_MWD.1.sg │ │ │ ├── archive_P2L.1.sg │ │ │ ├── archive_PAK.1.sg │ │ │ ├── archive_PBP.1.sg │ │ │ ├── archive_PEA.1.sg │ │ │ ├── archive_PKG.1.sg │ │ │ ├── archive_PSARC.1.sg │ │ │ ├── archive_PUP.1.sg │ │ │ ├── archive_RVZ.1.sg │ │ │ ├── archive_STK.1.sg │ │ │ ├── archive_Shaped.1.sg │ │ │ ├── archive_TRE.1.sg │ │ │ ├── archive_Unity.1.sg │ │ │ ├── archive_UnrealEngine.1.sg │ │ │ ├── archive_ViseInstaller.1.sg │ │ │ ├── archive_XZP.1.sg │ │ │ ├── archive_ZPAQ.1.sg │ │ │ ├── archive_archives.1.sg │ │ │ ├── archive_archives.ancient.sg │ │ │ ├── archive_btoa.1.sg │ │ │ ├── archive_cad.DWG.1.sg │ │ │ ├── archive_gp7bank.1.sg │ │ │ ├── audio.1.sg │ │ │ ├── audio_8svx.1.sg │ │ │ ├── audio_ACM.1.sg │ │ │ ├── audio_ADX.1.sg │ │ │ ├── audio_AHX.1.sg │ │ │ ├── audio_AIF.1.sg │ │ │ ├── audio_AU.1.sg │ │ │ ├── audio_BCSTM.1.sg │ │ │ ├── audio_BCWAV.1.sg │ │ │ ├── audio_CXT.1.sg │ │ │ ├── audio_DSS.1.sg │ │ │ ├── audio_EXA.1.sg │ │ │ ├── audio_FLAC.1.sg │ │ │ ├── audio_FSB.1.sg │ │ │ ├── audio_HMI.1.sg │ │ │ ├── audio_OGG.1.sg │ │ │ ├── audio_PAF.1.sg │ │ │ ├── audio_PVF.1.sg │ │ │ ├── audio_RIFF-IMA.1.sg │ │ │ ├── audio_SOU.1.sg │ │ │ ├── audio_STRM.1.sg │ │ │ ├── audio_STRM.2.sg │ │ │ ├── audio_ShockwaveAudio.1.sg │ │ │ ├── audio_TUN.1.sg │ │ │ ├── audio_VOC.1.sg │ │ │ ├── audio_WAV.1.sg │ │ │ ├── audio_WEM.1.sg │ │ │ ├── audio_mp3.2.sg │ │ │ ├── backup_images.1.sg │ │ │ ├── bin.Atari_ST.1.sg │ │ │ ├── bin.IDA.1.sg │ │ │ ├── bin.ISO_9660.1.sg │ │ │ ├── bin.RPGMaker2Kdata.1.sg │ │ │ ├── data_overlay_null_padding.1.sg │ │ │ ├── data_overlays.6.sg │ │ │ ├── debug_data_debugData.1.sg │ │ │ ├── font.ADOBE.1.sg │ │ │ ├── font_BMF.1.sg │ │ │ ├── font_FFN.1.sg │ │ │ ├── font_TFM.1.sg │ │ │ ├── font_VTF.1.sg │ │ │ ├── font_XTT.1.sg │ │ │ ├── format_AS.1.sg │ │ │ ├── format_AmigaIcon.1.sg │ │ │ ├── format_BCD1.1.sg │ │ │ ├── format_BOU.1.sg │ │ │ ├── format_BSP.1.sg │ │ │ ├── format_BTF.1.sg │ │ │ ├── format_BackupMii.1.sg │ │ │ ├── format_CCD.1.sg │ │ │ ├── format_CSO.1.sg │ │ │ ├── format_CTRK.1.sg │ │ │ ├── format_CURE.1.sg │ │ │ ├── format_CVM.1.sg │ │ │ ├── format_DESKTOP.1.sg │ │ │ ├── format_DSW.1.sg │ │ │ ├── format_DTA.1.sg │ │ │ ├── format_Director.1.sg │ │ │ ├── format_DunkleSchattenConfig.1.sg │ │ │ ├── format_DunkleSchattenSave.1.sg │ │ │ ├── format_Empty.1.sg │ │ │ ├── format_FAS.1.sg │ │ │ ├── format_FLDB.1.sg │ │ │ ├── format_FNX.1.sg │ │ │ ├── format_FST.1.sg │ │ │ ├── format_GAL.1.sg │ │ │ ├── format_GBI.1.sg │ │ │ ├── format_GME.1.sg │ │ │ ├── format_GameMaps.1.sg │ │ │ ├── format_GamingRoot.1.sg │ │ │ ├── format_HIV.1.sg │ │ │ ├── format_HNM.1.sg │ │ │ ├── format_HSM.1.sg │ │ │ ├── format_ILK.1.sg │ │ │ ├── format_IPCH.1.sg │ │ │ ├── format_ITL.1.sg │ │ │ ├── format_IVF.1.sg │ │ │ ├── format_Img.UDIF.1.sg │ │ │ ├── format_InnoSetupUninstall.1.sg │ │ │ ├── format_InterleafFile.1.sg │ │ │ ├── format_LCA.1.sg │ │ │ ├── format_LGX.1.sg │ │ │ ├── format_LIXS.1.sg │ │ │ ├── format_LVL.1.sg │ │ │ ├── format_MAT.1.sg │ │ │ ├── format_MDL.1.sg │ │ │ ├── format_MDS.1.sg │ │ │ ├── format_MS-DBG.1.sg │ │ │ ├── format_MS-PST.sg │ │ │ ├── format_MS-VHD.1.sg │ │ │ ├── format_MS-VHDX.sg │ │ │ ├── format_MS-XNA.1.sg │ │ │ ├── format_OBC.1.sg │ │ │ ├── format_OpenSSH.1.sg │ │ │ ├── format_P7X.1.sg │ │ │ ├── format_PAT.1.sg │ │ │ ├── format_PDB.1.sg │ │ │ ├── format_PEM.1.sg │ │ │ ├── format_PGP.1.sg │ │ │ ├── format_POL.1.sg │ │ │ ├── format_PRI.1.sg │ │ │ ├── format_PS-X.1.sg │ │ │ ├── format_PSM2CFG.1.sg │ │ │ ├── format_RARREG.1.sg │ │ │ ├── format_RCK.1.sg │ │ │ ├── format_RCO.1.sg │ │ │ ├── format_RGS.1.sg │ │ │ ├── format_RedShirt.1.sg │ │ │ ├── format_SDI.1.sg │ │ │ ├── format_SFK.1.sg │ │ │ ├── format_SHBIN.1.sg │ │ │ ├── format_SLN.1.sg │ │ │ ├── format_SLNX.1.sg │ │ │ ├── format_SSHPublicKey.1.sg │ │ │ ├── format_SystemErr.1.sg │ │ │ ├── format_TLB.1.sg │ │ │ ├── format_TOT.1.sg │ │ │ ├── format_TPU.1.sg │ │ │ ├── format_UCM.1.sg │ │ │ ├── format_UPC.1.sg │ │ │ ├── format_UPF.1.sg │ │ │ ├── format_UPI.1.sg │ │ │ ├── format_VDI.1.sg │ │ │ ├── format_VM2.1.sg │ │ │ ├── format_VTF.1.sg │ │ │ ├── format_VVD.1.sg │ │ │ ├── format_W3D.1.sg │ │ │ ├── format_WASM.1.sg │ │ │ ├── format_WBFS.1.sg │ │ │ ├── format_XBE.1.sg │ │ │ ├── format_XBF.1.sg │ │ │ ├── format_XCG.1.sg │ │ │ ├── format_XCI.1.sg │ │ │ ├── format_XCR.1.sg │ │ │ ├── format_XCS.1.sg │ │ │ ├── format_XDelta.1.sg │ │ │ ├── format_XEX.1.sg │ │ │ ├── format_ZZDATA.1.sg │ │ │ ├── format_ZinsSAV.1.sg │ │ │ ├── format_bin.AAALogo.1.sg │ │ │ ├── format_bin.COL.1.sg │ │ │ ├── format_bin.GuitarPro.1.sg │ │ │ ├── format_bin.Hermes.1.sg │ │ │ ├── format_bin.JMDL.1.sg │ │ │ ├── format_bin.JSC.1.sg │ │ │ ├── format_bin.Java.1.sg │ │ │ ├── format_bin.KeePass.1.sg │ │ │ ├── format_bin.LUA.1.sg │ │ │ ├── format_bin.NVA.1.sg │ │ │ ├── format_bin.Nintendo-certified-file.1.sg │ │ │ ├── format_bin.PEFF.1.sg │ │ │ ├── format_bin.PalmFile.1.sg │ │ │ ├── format_bin.Python.1.sg │ │ │ ├── format_bin.SWF.1.sg │ │ │ ├── format_bin.VCF.1.sg │ │ │ ├── format_bin.WindowsIconCacheDB.1.sg │ │ │ ├── format_database.SQLite.1.sg │ │ │ ├── format_databases.1.sg │ │ │ ├── format_doc.CHM.1.sg │ │ │ ├── format_doc.DJVU.1.sg │ │ │ ├── format_doc.HLP.1.sg │ │ │ ├── format_doc.PDF.1.sg │ │ │ ├── format_doc.RTF.1.sg │ │ │ ├── format_iCalender.1.sg │ │ │ ├── format_img.VM.1.sg │ │ │ ├── format_text.RegistryFile.sg │ │ │ ├── format_text.pdb.1.sg │ │ │ ├── format_text.plaintext.3.sg │ │ │ ├── format_video.BIK.1.sg │ │ │ ├── format_video.BK2.1.sg │ │ │ ├── format_video.FLV.1.sg │ │ │ ├── format_video.MOV.1.sg │ │ │ ├── format_video.MP4.1.sg │ │ │ ├── format_video.Matroska.1.sg │ │ │ ├── format_video.RobotAnimation.1.sg │ │ │ ├── format_video.Smacker.1.sg │ │ │ ├── format_video.VMD.1.sg │ │ │ ├── formats.1.sg │ │ │ ├── graphics.1.sg │ │ │ ├── image.PNG.1.sg │ │ │ ├── image_ANI.1.sg │ │ │ ├── image_BMP.1.sg │ │ │ ├── image_CUR.1.sg │ │ │ ├── image_DDS.1.sg │ │ │ ├── image_EPS.1.sg │ │ │ ├── image_FSH.1.sg │ │ │ ├── image_GIF.1.sg │ │ │ ├── image_ICNS.sg │ │ │ ├── image_ICO.1.sg │ │ │ ├── image_IMG.1.sg │ │ │ ├── image_JNG.1.sg │ │ │ ├── image_JPEG.1.sg │ │ │ ├── image_JPEGXL.1.sg │ │ │ ├── image_KTX.1.sg │ │ │ ├── image_LBM.1.sg │ │ │ ├── image_MNG.1.sg │ │ │ ├── image_PCX.1.sg │ │ │ ├── image_PSD.1.sg │ │ │ ├── image_PVR.1.sg │ │ │ ├── image_QOI.1.sg │ │ │ ├── image_SMDH.1.sg │ │ │ ├── image_TGA.1.sg │ │ │ ├── image_TIFF.1.sg │ │ │ ├── image_XAR.1.sg │ │ │ ├── image_XCF.1.sg │ │ │ ├── image_bin.ZBMP.1.sg │ │ │ ├── image_heuristic.image.HDR.1.sg │ │ │ ├── protector_javascript-obfuscator.2.sg │ │ │ ├── rom_32X.1.sg │ │ │ ├── script_text.Shell.1.sg │ │ │ ├── shellcode.pe_to_shellcode.1.sg │ │ │ ├── shellcode_donut.1.sg │ │ │ ├── shellcode_srdi-monoxgas.1.sg │ │ │ ├── source_text.HTML.1.sg │ │ │ ├── source_text.Pascal.1.sg │ │ │ ├── source_text.XML.1.sg │ │ │ ├── source_text.c.1.sg │ │ │ ├── source_text.python.1.sg │ │ │ ├── text.script.2.sg │ │ │ └── win_resources.1.sg │ │ ├── Borland │ │ ├── CFBF/ │ │ │ ├── Microsoft_Installer.1.sg │ │ │ ├── Microsoft_Office.1.sg │ │ │ ├── _CFBF.0.sg │ │ │ └── _init │ │ ├── COM/ │ │ │ ├── 32-bit_crypt.2.sg │ │ │ ├── COM_Sccrambler.2.sg │ │ │ ├── Character_Intro_Engine.1.sg │ │ │ ├── Crypt_(CyPoxl).2.sg │ │ │ ├── Crypt_(Dismember).2.sg │ │ │ ├── Deep_Crypter.2.sg │ │ │ ├── Dn.COM_Cruncher.2.sg │ │ │ ├── Inbuild_Encryption.2.sg │ │ │ ├── LHarc_SFX.1.sg │ │ │ ├── Maveriks_C0der.2.sg │ │ │ ├── Microsoft_C.4.sg │ │ │ ├── Microsoft_RTL.3.sg │ │ │ ├── MrHDKiller_Protection.2.sg │ │ │ ├── PC_FORTH.4.sg │ │ │ ├── RDT_ENC_3.2.sg │ │ │ ├── RTD_Compressor.2.sg │ │ │ ├── RTD_Compressor2.2.sg │ │ │ ├── SHOW_IT.1.sg │ │ │ ├── SPHINX_C--.4.sg │ │ │ ├── Shade's_COM_Encryptor.2.sg │ │ │ ├── Shadow_COM_encryptor.2.sg │ │ │ ├── TPC_Scramble.2.sg │ │ │ ├── Text_Header.1.sg │ │ │ ├── The_DRAW.1.sg │ │ │ ├── Tiny_Xor.2.sg │ │ │ ├── Unknown_cryptors.2.sg │ │ │ ├── VGA_font_loader.1.sg │ │ │ ├── VSF&K_protection.2.sg │ │ │ ├── WSP_self_update.2.sg │ │ │ ├── WiZ_Cryptor.2.sg │ │ │ ├── _COM.0.sg │ │ │ ├── _init │ │ │ ├── compiler_8086_Forth_83.4.sg │ │ │ ├── compiler_ASIC-Basic.4.sg │ │ │ ├── compiler_BAT2EXEC.2.sg │ │ │ ├── compiler_BatLite.4.sg │ │ │ ├── compiler_Borland_C++.4.sg │ │ │ ├── compiler_Datalight_C.4.sg │ │ │ ├── compiler_Easy!-C.4.sg │ │ │ ├── compiler_Fig-FORTH.4.sg │ │ │ ├── compiler_ForthCMP.2.sg │ │ │ ├── compiler_ForthCMP.4.sg │ │ │ ├── compiler_GP-FORTH.4.sg │ │ │ ├── compiler_Lattice_C.4.sg │ │ │ ├── compiler_MICRO-C.4.sg │ │ │ ├── compiler_MINIFORTH.4.sg │ │ │ ├── compiler_MoonRock.2.sg │ │ │ ├── compiler_OUTFORTH.4.sg │ │ │ ├── compiler_PBFC.2.sg │ │ │ ├── compiler_RMCOBOL.4.sg │ │ │ ├── compiler_SP-FORTH.4.sg │ │ │ ├── compiler_Surpas-86.4.sg │ │ │ ├── compiler_TCOM.4.sg │ │ │ ├── compiler_Turbo_C++.4.sg │ │ │ ├── compiler_Turbo_C.4.sg │ │ │ ├── compiler_Turbo_Pascal.4.sg │ │ │ ├── compiler_UNIFORTH.4.sg │ │ │ ├── compiler_Vienna-C.4.sg │ │ │ ├── compiler_Watcom_C.4.sg │ │ │ ├── compiler_Zbikowski_C.4.sg │ │ │ ├── compiler_Zortech_C.4.sg │ │ │ ├── compiler_muSIMP-83.4.sg │ │ │ ├── converter_A3E.1.sg │ │ │ ├── converter_AutoCracker.1.sg │ │ │ ├── converter_COM2TXT.1.sg │ │ │ ├── converter_COMT.1.sg │ │ │ ├── converter_CRX2COM.1.sg │ │ │ ├── converter_E2C.1.sg │ │ │ ├── converter_EXE2COM.1.sg │ │ │ ├── converter_EXETools_EXE2COM.1.sg │ │ │ ├── converter_FIXCRK.1.sg │ │ │ ├── converter_FromBAT.1.sg │ │ │ ├── converter_MAKEBOO.1.sg │ │ │ ├── converter_NetCode.1.sg │ │ │ ├── converter_NetRun.1.sg │ │ │ ├── converter_TurboBAT.1.sg │ │ │ ├── converter_Vacsina.4.sg │ │ │ ├── converter_XCK2COM.1.sg │ │ │ ├── cryptor_Anti-Lamer_Cryptor.2.sg │ │ │ ├── cryptor_CSCRYPT.2.sg │ │ │ ├── cryptor_EXINCT.2.sg │ │ │ ├── cryptor_J0B_cryptor.2.sg │ │ │ ├── cryptor_PU-Cryptor.2.sg │ │ │ ├── cryptor_Phrozen_Crew_cryptor.2.sg │ │ │ ├── cryptor_SDW.2.sg │ │ │ ├── cryptor_Sydex.2.sg │ │ │ ├── cryptor_UComCry.1.sg │ │ │ ├── cryptor_USCC.2.sg │ │ │ ├── cryptor_cryptors.2.sg │ │ │ ├── driver_DIGPAK.1.sg │ │ │ ├── driver_MIDPAK.1.sg │ │ │ ├── immunizer_ARF_AV_Inject.1.sg │ │ │ ├── immunizer_CPAV.1.sg │ │ │ ├── immunizer_F-XLOCK.1.sg │ │ │ ├── immunizer_IMMUN.1.sg │ │ │ ├── immunizer_TAV.1.sg │ │ │ ├── immunizer_VSS.1.sg │ │ │ ├── other_XLOADER.2.sg │ │ │ ├── other_integrity_checker.1.sg │ │ │ ├── packer_4kZIP.2.sg │ │ │ ├── packer_AVPACK.2.sg │ │ │ ├── packer_COMPACK.2.sg │ │ │ ├── packer_Cheat_packer.2.sg │ │ │ ├── packer_Compressor.2.sg │ │ │ ├── packer_CyberWare_Packer.2.sg │ │ │ ├── packer_Diet.2.sg │ │ │ ├── packer_EXC.2.sg │ │ │ ├── packer_ICE.1.sg │ │ │ ├── packer_LGLZ.2.sg │ │ │ ├── packer_PKLITE.2.sg │ │ │ ├── packer_PRO-PACK.2.sg │ │ │ ├── packer_SCRE2B.2.sg │ │ │ ├── packer_SCRNCH.2.sg │ │ │ ├── packer_SHRINK.2.sg │ │ │ ├── packer_Scramb.2.sg │ │ │ ├── packer_Six-2-Four.2.sg │ │ │ ├── packer_TPACK.2.sg │ │ │ ├── packer_Triplex.2.sg │ │ │ ├── packer_UPX.2.sg │ │ │ ├── packer_X-PACK.2.sg │ │ │ ├── packer_XE.2.sg │ │ │ ├── packer_XPACK.2.sg │ │ │ ├── packer_aPACK.2.sg │ │ │ ├── packer_com_RLE_packer.2.sg │ │ │ ├── packer_envelope.2.sg │ │ │ ├── protector_ABK-Scrambler.2.sg │ │ │ ├── protector_ACE_Scrambler.2.sg │ │ │ ├── protector_AVAST-Protect.2.sg │ │ │ ├── protector_AdFlt.2.sg │ │ │ ├── protector_Adys_COM-Scrambler.2.sg │ │ │ ├── protector_Anti-hack_encryption_system.2.sg │ │ │ ├── protector_BIN-Lock.2.sg │ │ │ ├── protector_Best_Protection_Kit-B.2.sg │ │ │ ├── protector_BinCOD.2.sg │ │ │ ├── protector_Budokan.1.sg │ │ │ ├── protector_C-crypt.2.sg │ │ │ ├── protector_CC#3.2.sg │ │ │ ├── protector_CC.2.sg │ │ │ ├── protector_CC286.2.sg │ │ │ ├── protector_CCC.2.sg │ │ │ ├── protector_CHECKPRG.2.sg │ │ │ ├── protector_CNT.2.sg │ │ │ ├── protector_COM-Protect.2.sg │ │ │ ├── protector_COM-Protection.2.sg │ │ │ ├── protector_COMCRYPT.2.sg │ │ │ ├── protector_COMPROTECT.2.sg │ │ │ ├── protector_COP.2.sg │ │ │ ├── protector_CodeLock.2.sg │ │ │ ├── protector_Codesafe.2.sg │ │ │ ├── protector_ComProt.2.sg │ │ │ ├── protector_ComProtector.2.sg │ │ │ ├── protector_Comlock.2.sg │ │ │ ├── protector_CrAcKeR.2.sg │ │ │ ├── protector_Crack2EXE.1.sg │ │ │ ├── protector_CryptCom.2.sg │ │ │ ├── protector_Crypto-King.2.sg │ │ │ ├── protector_DCFR.2.sg │ │ │ ├── protector_DS-CRP.2.sg │ │ │ ├── protector_Deeper.2.sg │ │ │ ├── protector_E2C-Scrambler.2.sg │ │ │ ├── protector_E2C1.2.sg │ │ │ ├── protector_EPW.2.sg │ │ │ ├── protector_EXETools.2.sg │ │ │ ├── protector_Encriptor.2.sg │ │ │ ├── protector_Entropy_Coder.2.sg │ │ │ ├── protector_ExOM.2.sg │ │ │ ├── protector_FCRYPT.2.sg │ │ │ ├── protector_GOAT.2.sg │ │ │ ├── protector_Guardian_Angel.2.sg │ │ │ ├── protector_HDKPROTC.2.sg │ │ │ ├── protector_HackStop.2.sg │ │ │ ├── protector_IntroC0der.1.sg │ │ │ ├── protector_Keygen_crypt.2.sg │ │ │ ├── protector_Khrome_Crypt.2.sg │ │ │ ├── protector_LAME_GG.2.sg │ │ │ ├── protector_LAMPROT.2.sg │ │ │ ├── protector_Lock-Master.2.sg │ │ │ ├── protector_MASK.2.sg │ │ │ ├── protector_MCLock.2.sg │ │ │ ├── protector_MESS.2.sg │ │ │ ├── protector_MSCC.2.sg │ │ │ ├── protector_MegaShield.2.sg │ │ │ ├── protector_Microxor.2.sg │ │ │ ├── protector_NH.2.sg │ │ │ ├── protector_NoAV.2.sg │ │ │ ├── protector_Nodebug.2.sg │ │ │ ├── protector_PCOM.2.sg │ │ │ ├── protector_PCRYPT.2.sg │ │ │ ├── protector_PCVault-Protect.2.sg │ │ │ ├── protector_PROTECT.2.sg │ │ │ ├── protector_PTP.2.sg │ │ │ ├── protector_PassCOM.2.sg │ │ │ ├── protector_Propellerhead_encryption.2.sg │ │ │ ├── protector_ProtEXE.2.sg │ │ │ ├── protector_R-Crypt.2.sg │ │ │ ├── protector_RCC.2.sg │ │ │ ├── protector_RSCC.2.sg │ │ │ ├── protector_SCC.2.sg │ │ │ ├── protector_SCRAM.2.sg │ │ │ ├── protector_Scrambler.2.sg │ │ │ ├── protector_Scrypt!.2.sg │ │ │ ├── protector_Scrypt.2.sg │ │ │ ├── protector_SelfCrypt.2.sg │ │ │ ├── protector_SelfProtect386.2.sg │ │ │ ├── protector_SnoopStop.2.sg │ │ │ ├── protector_SoftGuard.1.sg │ │ │ ├── protector_Steplock.2.sg │ │ │ ├── protector_TCEC.2.sg │ │ │ ├── protector_UnPackStop.2.sg │ │ │ ├── protector_UniCrypt.1.sg │ │ │ ├── protector_Venus.2.sg │ │ │ ├── protector_XORCOPY.2.sg │ │ │ ├── protector_XcomOR.2.sg │ │ │ ├── protector_XoReR.2.sg │ │ │ ├── protector_XorCom.2.sg │ │ │ ├── protector_aPatch.2.sg │ │ │ ├── protector_acBBS_protection.2.sg │ │ │ ├── protector_com-crypt.2.sg │ │ │ ├── protector_fds-cp.2.sg │ │ │ ├── protector_mCrypt.2.sg │ │ │ ├── protector_protection.2.sg │ │ │ ├── protector_spirit.2.sg │ │ │ ├── protector_sticker.2.sg │ │ │ ├── protector_x3.2.sg │ │ │ ├── self-displayer_ACiDDRAW.1.sg │ │ │ ├── self-displayer_ANS2ALL.1.sg │ │ │ ├── self-displayer_ASC2COM.1.sg │ │ │ ├── self-displayer_DOC2COM.1.sg │ │ │ ├── self-displayer_DOC2PAGE.1.sg │ │ │ ├── self-displayer_GTXT.1.sg │ │ │ ├── self-displayer_HYPDOC.1.sg │ │ │ ├── self-displayer_List.1.sg │ │ │ ├── self-displayer_MakeRead.1.sg │ │ │ ├── self-displayer_ONLINE-HELP.1.sg │ │ │ ├── self-displayer_PFL2COM.1.sg │ │ │ ├── self-displayer_RELETTER.1.sg │ │ │ ├── self-displayer_SHOWV20.1.sg │ │ │ ├── self-displayer_TXT2COM.1.sg │ │ │ ├── self-displayer_TXTmaker.1.sg │ │ │ ├── self-displayer_Txt2Exe.1.sg │ │ │ ├── self-displayer_readme.com.1.sg │ │ │ ├── sfx_LHA.1.sg │ │ │ ├── sfx_PKZip.1.sg │ │ │ ├── simple_ansi_viewer.1.sg │ │ │ ├── simple_self-displayer.1.sg │ │ │ └── virus.1.sg │ │ ├── CurIcoBPP │ │ ├── DEX/ │ │ │ ├── _DEX.0.sg │ │ │ ├── _DEX2.0.sg │ │ │ ├── _init │ │ │ ├── compiler_dexlib2.4.sg │ │ │ ├── library_UnicomSDK.4.sg │ │ │ ├── obfuscator_ProGuard.2.sg │ │ │ ├── protector_AESObfuscator.2.sg │ │ │ ├── protector_APKProtect.2.sg │ │ │ ├── protector_AlibabaProtection.2.sg │ │ │ ├── protector_AllatoriObfuscator.2.sg │ │ │ ├── protector_ApkEncryptor.2.sg │ │ │ ├── protector_AppSolid.2.sg │ │ │ ├── protector_BaiduProtection.2.sg │ │ │ ├── protector_BangcleProtection.2.sg │ │ │ ├── protector_EasyProtector.2.sg │ │ │ ├── protector_Jiagu.2.sg │ │ │ ├── protector_Kiwi.2.sg │ │ │ ├── protector_LIAPP.2.sg │ │ │ ├── protector_MedusaH.2.sg │ │ │ ├── protector_ModGuard.2.sg │ │ │ ├── protector_NQShield.2.sg │ │ │ ├── protector_NagaPTProtection.2.sg │ │ │ ├── protector_PangXie.2.sg │ │ │ ├── protector_QDBH.2.sg │ │ │ ├── protector_SecNeo.2.sg │ │ │ ├── protector_TencentProtection.2.sg │ │ │ ├── protector_VDog.2.sg │ │ │ ├── protector_Yidun.2.sg │ │ │ └── tool_ApkToolPlus.6.sg │ │ ├── DOS16M/ │ │ │ ├── _DOS16M.0.sg │ │ │ ├── _init │ │ │ └── compiler_Watcom.2.sg │ │ ├── DOS4G/ │ │ │ ├── _DOS4G.0.sg │ │ │ ├── _init │ │ │ └── compiler_Watcom.2.sg │ │ ├── ELF/ │ │ │ ├── Borland_Kylix.4.sg │ │ │ ├── Free_Pascal.4.sg │ │ │ ├── HP_C++.4.sg │ │ │ ├── IBM_AIX_kernel_loader.4.sg │ │ │ ├── Oracle_Solaris_Studio.4.sg │ │ │ ├── _ELF.0.sg │ │ │ ├── _init │ │ │ ├── compiler_DMD.4.sg │ │ │ ├── compiler_FASM.4.sg │ │ │ ├── compiler_Go.4.sg │ │ │ ├── compiler_MWCC.4.sg │ │ │ ├── compiler_Rust.4.sg │ │ │ ├── compiler_VBCC.4.sg │ │ │ ├── compiler_Watcom.4.sg │ │ │ ├── compiler_Zig.4.sg │ │ │ ├── compiler_gcc.4.sg │ │ │ ├── compiler_gdc.4.sg │ │ │ ├── compiler_ldc.4.sg │ │ │ ├── compiler_movfuscator.4.sg │ │ │ ├── library_Curl.4.sg │ │ │ ├── library_FFmpeg.4.sg │ │ │ ├── library_FLAC.4.sg │ │ │ ├── library_Flexlm.4.sg │ │ │ ├── library_FluidSynth.4.sg │ │ │ ├── library_FreeType.4.sg │ │ │ ├── library_GLEW.4.sg │ │ │ ├── library_GLIBC.3.sg │ │ │ ├── library_LZMA.4.sg │ │ │ ├── library_Lego1.4.sg │ │ │ ├── library_MPEG2.4.sg │ │ │ ├── library_Mikmod.4.sg │ │ │ ├── library_OGG.4.sg │ │ │ ├── library_OpenAL.4.sg │ │ │ ├── library_PulseAudio.4.sg │ │ │ ├── library_QT.3.sg │ │ │ ├── library_SDL.3.sg │ │ │ ├── packer_Ezuri.1.sg │ │ │ ├── packer_PyInstaller.2.sg │ │ │ ├── packer_UPX.2.sg │ │ │ ├── packer_Virbox.2.sg │ │ │ ├── packer_exepak.1.sg │ │ │ ├── protector_Burneye.2.sg │ │ │ └── protector_HASP.1.sg │ │ ├── FASM │ │ ├── FPC │ │ ├── IPA/ │ │ │ └── _init │ │ ├── ISO9660/ │ │ │ ├── _ISO9660.0.sg │ │ │ ├── _init │ │ │ ├── bootloader_Grub.1.sg │ │ │ ├── filesystem_AppleHFS.1.sg │ │ │ ├── iso_Rimage.1.sg │ │ │ ├── library_IMAPI.1.sg │ │ │ ├── library_IMAPI2.1.sg │ │ │ ├── library_libburn.1.sg │ │ │ ├── library_libisoburn.1.sg │ │ │ ├── library_libisofs.1.sg │ │ │ ├── partition_EFI_PART.1.sg │ │ │ ├── tool_CDBurnerXP.1.sg │ │ │ ├── tool_CDIMAGE.1.sg │ │ │ ├── tool_CeQuadrat.1.sg │ │ │ ├── tool_ImgBurn.1.sg │ │ │ ├── tool_MKARCHISO.1.sg │ │ │ ├── tool_NeroBurningROM.1.sg │ │ │ ├── tool_PersonalRomMaker.1.sg │ │ │ ├── tool_QuickToPix.1.sg │ │ │ ├── tool_RoxioToast.1.sg │ │ │ ├── tool_UltraISO.1.sg │ │ │ ├── tool_WinISO.1.sg │ │ │ ├── tool_genisoimage.1.sg │ │ │ └── tool_xorriso.1.sg │ │ ├── Image/ │ │ │ ├── _Image.0.sg │ │ │ └── _init │ │ ├── JAR/ │ │ │ ├── _JAR.0.sg │ │ │ ├── _init │ │ │ └── tool_SingleJar.3.sg │ │ ├── JPEG/ │ │ │ ├── _Jpeg.0.sg │ │ │ ├── _init │ │ │ ├── camera_camera.2.sg │ │ │ ├── image_DQT.4.sg │ │ │ ├── image_comment.4.sg │ │ │ └── tool_Tools.3.sg │ │ ├── JavaClass/ │ │ │ ├── _JavaClass.0.sg │ │ │ └── _init │ │ ├── LE/ │ │ │ ├── _LE.0.sg │ │ │ ├── _init │ │ │ ├── compiler_Watcom_C.4.sg │ │ │ └── packer_UPX.1.sg │ │ ├── LX/ │ │ │ ├── _LX.0.sg │ │ │ ├── _init │ │ │ ├── compiler_Borland_C.4.sg │ │ │ └── compiler_Watcom_C.4.sg │ │ ├── MACH/ │ │ │ ├── _MACH.0.sg │ │ │ ├── _init │ │ │ ├── compiler_Delphi.4.sg │ │ │ ├── compiler_Rust.4.sg │ │ │ ├── compiler_Zig.4.sg │ │ │ ├── compiler_gcc.4.sg │ │ │ ├── library_Carbon.3.sg │ │ │ ├── library_Cocoa.3.sg │ │ │ ├── library_QT.3.sg │ │ │ ├── library_WebKit.3.sg │ │ │ ├── library_java.3.sg │ │ │ ├── packer_UPX.2.sg │ │ │ └── packer_Virbox.2.sg │ │ ├── MACHOFAT/ │ │ │ ├── _MACHOFAT.0.sg │ │ │ ├── _init │ │ │ └── converter_lipo.2.sg │ │ ├── MFC │ │ ├── MSDOS/ │ │ │ ├── ACE.6.sg │ │ │ ├── Adys_COM2EXE.1.sg │ │ │ ├── Adys_Glue.2.sg │ │ │ ├── Anti-hack_encryption_system.2.sg │ │ │ ├── Aztec_C-86.4.sg │ │ │ ├── BlackWolf_Protection.2.sg │ │ │ ├── Black_fist.2.sg │ │ │ ├── Borland_C.4.sg │ │ │ ├── Borland_Pascal.4.sg │ │ │ ├── Borland_RTM.0a.sg │ │ │ ├── Borland_TDS.5.sg │ │ │ ├── Borland_TLINK.5.sg │ │ │ ├── CSCRYPT_Pro.2.sg │ │ │ ├── Concurrent_Small_C.4.sg │ │ │ ├── CopyQM_SFX.1.sg │ │ │ ├── Crypt_(Dismember).2.sg │ │ │ ├── Crypt_(LightShow).2.sg │ │ │ ├── DAEMON_Protect.2.sg │ │ │ ├── DOS32_loader.0a.sg │ │ │ ├── DOS_16M.0a.sg │ │ │ ├── DOS_32A.0a.sg │ │ │ ├── Digital_Research_C.4.sg │ │ │ ├── Disk_eXPress.1.sg │ │ │ ├── EMMXXXX0_check.0a.sg │ │ │ ├── EXETools_COM2EXE.1.sg │ │ │ ├── EXE_Manager.2.sg │ │ │ ├── EXE_Packer.2.sg │ │ │ ├── EXE_encryption.2.sg │ │ │ ├── Eliashim's_CodeTrack.1.sg │ │ │ ├── File_Shield.1.sg │ │ │ ├── Fitted_Modula-2.4.sg │ │ │ ├── GFX_to_EXE.1.sg │ │ │ ├── GamBit_Pro_Library.1.sg │ │ │ ├── GameWizard_DOS_Extender.0a.sg │ │ │ ├── Graphic_WorkShop.1.sg │ │ │ ├── Guardian_Angel.2.sg │ │ │ ├── H+BEDV_SelfCheck.1.sg │ │ │ ├── Header_Changer.2.sg │ │ │ ├── Hi-Tech_C.4.sg │ │ │ ├── HyperLOCK_386.2.sg │ │ │ ├── IBM_PC_Pascal.4.sg │ │ │ ├── John_Socha_Library.3.sg │ │ │ ├── Khrome_Crypt.2.sg │ │ │ ├── LSI_C.4.sg │ │ │ ├── L_O_V_E__FORTH.4.sg │ │ │ ├── Lahey_Fortran.4.sg │ │ │ ├── Lattice_C.4.sg │ │ │ ├── Logitech_Modula-2.4.sg │ │ │ ├── Meridian_Ada.4.sg │ │ │ ├── Meridian_Pascal.4.sg │ │ │ ├── MetaWare_High_C.4.sg │ │ │ ├── MetaWare_Professional_Pascal.4.sg │ │ │ ├── Micro_Focus_Cobol.4.sg │ │ │ ├── Micro_Focus_DOS_extender.0a.sg │ │ │ ├── Microsoft_Basic.4.sg │ │ │ ├── Microsoft_C.4.sg │ │ │ ├── Microsoft_C_Library.3.sg │ │ │ ├── Microsoft_Fortran.4.sg │ │ │ ├── Microsoft_Quick_Basic.4.sg │ │ │ ├── Microsoft_Quick_Pascal.4.sg │ │ │ ├── Microsoft_RTL.3.sg │ │ │ ├── Microsoft_RTL_(Clipper).3.sg │ │ │ ├── MultiLoop_Protection.2.sg │ │ │ ├── Netware_loader.1.sg │ │ │ ├── PDC_Prolog.4.sg │ │ │ ├── PK_sig.1.sg │ │ │ ├── PROPACK_SFX.1.sg │ │ │ ├── Pacific_C.4.sg │ │ │ ├── Panda_immunizer.1.sg │ │ │ ├── Pascal_MT+86.4.sg │ │ │ ├── Phar_Lap.0a.sg │ │ │ ├── RAR.6.sg │ │ │ ├── REC_small.1.sg │ │ │ ├── REC_small_AV.1.sg │ │ │ ├── RLE_com-packer.2.sg │ │ │ ├── RM_FORTRAN.4.sg │ │ │ ├── RTLink_VM_Manager.0a.sg │ │ │ ├── RTPatch_SFX.1.sg │ │ │ ├── Realia_Cobol.4.sg │ │ │ ├── Realia_SPITBOL.4.sg │ │ │ ├── SHOW_IT.1.sg │ │ │ ├── Self_UnStuffer.2.sg │ │ │ ├── Small_C.4.sg │ │ │ ├── StonyBrook_Pascal.4.sg │ │ │ ├── Sydex_SFX.1.sg │ │ │ ├── Topspeed_Modula.4.sg │ │ │ ├── UR_FORTH.4.sg │ │ │ ├── Unknown_cryptors.2.sg │ │ │ ├── Upper_Deck_Forth.4.sg │ │ │ ├── Visual_Cobol.4.sg │ │ │ ├── WWPACK_mutator.2.sg │ │ │ ├── Whitesmiths_C.4.sg │ │ │ ├── Window_book.1.sg │ │ │ ├── Wizardy_protection.1.sg │ │ │ ├── WordPerfect_EXEPack.2.sg │ │ │ ├── XOPEN+_Protection.2.sg │ │ │ ├── Zbikowski_C.4.sg │ │ │ ├── Zip.6.sg │ │ │ ├── Zortech(Symantec)_C.4.sg │ │ │ ├── Zurenava_DOS_Extender.0a.sg │ │ │ ├── _LE.0.sg │ │ │ ├── _LX.0.sg │ │ │ ├── _MSDOS.0.sg │ │ │ ├── _NE.0.sg │ │ │ ├── _init │ │ │ ├── anti-tracing_add-on.1.sg │ │ │ ├── compiler_ASIC-Basic.4.sg │ │ │ ├── compiler_Ada89.4.sg │ │ │ ├── compiler_ApBasic.4.sg │ │ │ ├── compiler_BAT2EXEC.4.sg │ │ │ ├── compiler_BSTAR_FORTH.4.sg │ │ │ ├── compiler_BatLite.4.sg │ │ │ ├── compiler_BetterBASIC.4.sg │ │ │ ├── compiler_CII-C.4.sg │ │ │ ├── compiler_Easy!-C.4.sg │ │ │ ├── compiler_GRASP.4.sg │ │ │ ├── compiler_MegaBasic.4.sg │ │ │ ├── compiler_MegaBasic1.4.sg │ │ │ ├── compiler_PCC.4.sg │ │ │ ├── compiler_Power_C.4.sg │ │ │ ├── compiler_SP-FORTH.4.sg │ │ │ ├── compiler_Symantec_BASIC.4.sg │ │ │ ├── compiler_Topspeed_C.4.sg │ │ │ ├── compiler_Turbo_Basic.4.sg │ │ │ ├── compiler_Turbo_Prolog.4.sg │ │ │ ├── compiler_WATCOM.4.sg │ │ │ ├── compiler_WPFORTH.4.sg │ │ │ ├── compiler_djgpp.4.sg │ │ │ ├── compiler_muLISP-87.4.sg │ │ │ ├── converter_EXE2COM.1.sg │ │ │ ├── converter_FromBAT.1.sg │ │ │ ├── converter_GRABBER.1.sg │ │ │ ├── converter_com2exe.2.sg │ │ │ ├── cryptor_EXE-Cryptor.2.sg │ │ │ ├── cryptor_TUCCRYP.2.sg │ │ │ ├── cryptor_deep-CRyPTer.2.sg │ │ │ ├── dos_extender.0a.sg │ │ │ ├── dos_extender1.0a.sg │ │ │ ├── dos_extender2.0a.sg │ │ │ ├── extender_Blinker.0a.sg │ │ │ ├── extender_CWSDPMI.0a.sg │ │ │ ├── extender_CauseWay_DOS_Extender.6.sg │ │ │ ├── extender_DOS32.0a.sg │ │ │ ├── extender_DOS4G.0a.sg │ │ │ ├── extender_DOSX16.0a.sg │ │ │ ├── extender_EMX.0a.sg │ │ │ ├── extender_Go32Stub.0a.sg │ │ │ ├── extender_PMODE.0a.sg │ │ │ ├── extender_PRO32.0a.sg │ │ │ ├── extender_RSX.0a.sg │ │ │ ├── extender_Stub-386.0a.sg │ │ │ ├── extender_TMTSTUB.0a.sg │ │ │ ├── extender_WDOSX.0a.sg │ │ │ ├── extender_WDOSX32.0a.sg │ │ │ ├── extender_XMLOD.0a.sg │ │ │ ├── extender_Xtender.0a.sg │ │ │ ├── immunizer_CPAV.1.sg │ │ │ ├── immunizer_F-XLOCK.1.sg │ │ │ ├── immunizer_Oyster.1.sg │ │ │ ├── immunizer_PGPROT.1.sg │ │ │ ├── immunizer_Palladix.1.sg │ │ │ ├── immunizer_TTW.1.sg │ │ │ ├── joiner_TurboChainer.1.sg │ │ │ ├── joiner_V-Load.1.sg │ │ │ ├── library_ParsecCollection.1.sg │ │ │ ├── loader_32stub.0a.sg │ │ │ ├── mbp_SHRINK.2.sg │ │ │ ├── other_AutoHack.1.sg │ │ │ ├── other_Coderunner.1.sg │ │ │ ├── other_DemoMaker.2.sg │ │ │ ├── overlay_overlays.6.sg │ │ │ ├── packer_32LiTe.2.sg │ │ │ ├── packer_AINEXE.2.sg │ │ │ ├── packer_AVPACK.2.sg │ │ │ ├── packer_Amisetup.1.sg │ │ │ ├── packer_COMPACK.2.sg │ │ │ ├── packer_CRYPACK.2.sg │ │ │ ├── packer_Compress-EXE.2.sg │ │ │ ├── packer_DIET.2.sg │ │ │ ├── packer_DSHIELD.2.sg │ │ │ ├── packer_DexEXE.2.sg │ │ │ ├── packer_EXECUTRIX.2.sg │ │ │ ├── packer_EXEPACK.2.sg │ │ │ ├── packer_ExeLITE.2.sg │ │ │ ├── packer_LGLZ.2.sg │ │ │ ├── packer_LZEXE.2.sg │ │ │ ├── packer_MSLite.1.sg │ │ │ ├── packer_Optlink.2.sg │ │ │ ├── packer_PGMPAK.2.sg │ │ │ ├── packer_PKEXE.2.sg │ │ │ ├── packer_PKLITE.2.sg │ │ │ ├── packer_PKTINY.2.sg │ │ │ ├── packer_PMWLite.2.sg │ │ │ ├── packer_PRO-PACK.2.sg │ │ │ ├── packer_Pack.2.sg │ │ │ ├── packer_Packers.2.sg │ │ │ ├── packer_RERP.2.sg │ │ │ ├── packer_RIXEPACK.2.sg │ │ │ ├── packer_RJcrush.2.sg │ │ │ ├── packer_Relpack.2.sg │ │ │ ├── packer_SCRNCH.2.sg │ │ │ ├── packer_SEA-AXE.2.sg │ │ │ ├── packer_Scramb.2.sg │ │ │ ├── packer_Shrinker.2.sg │ │ │ ├── packer_TSCRUNCH.2.sg │ │ │ ├── packer_Tenth_Planet.2.sg │ │ │ ├── packer_TinyProg.2.sg │ │ │ ├── packer_Tinyprot.2.sg │ │ │ ├── packer_UCEXE.2.sg │ │ │ ├── packer_UPX.2.sg │ │ │ ├── packer_WWPACK.2.sg │ │ │ ├── packer_XPACK.2.sg │ │ │ ├── packer_ZIPSCRUB.2.sg │ │ │ ├── packer_aPACK.2.sg │ │ │ ├── patcher_Patchers.1.sg │ │ │ ├── protector_$pirit.2.sg │ │ │ ├── protector_ABKprot.2.sg │ │ │ ├── protector_AEP.2.sg │ │ │ ├── protector_ALEC.2.sg │ │ │ ├── protector_ANTI-TRACE.2.sg │ │ │ ├── protector_AVAST_CRC-Check.2.sg │ │ │ ├── protector_Aluwain.2.sg │ │ │ ├── protector_Anti-LAME.2.sg │ │ │ ├── protector_Antilame.2.sg │ │ │ ├── protector_Bitlok.2.sg │ │ │ ├── protector_Bunny.2.sg │ │ │ ├── protector_CC.2.sg │ │ │ ├── protector_CEPexe.2.sg │ │ │ ├── protector_CERBERUS.2.sg │ │ │ ├── protector_COMCRYPT.2.sg │ │ │ ├── protector_COMPROTECT.2.sg │ │ │ ├── protector_CONVOY.2.sg │ │ │ ├── protector_CRYPTEXE.2.sg │ │ │ ├── protector_China Locker.2.sg │ │ │ ├── protector_Ciphator.2.sg │ │ │ ├── protector_Codesafe.2.sg │ │ │ ├── protector_ComProtector.2.sg │ │ │ ├── protector_ComprEXE.2.sg │ │ │ ├── protector_Copy_Protector.2.sg │ │ │ ├── protector_Copylock_PC.2.sg │ │ │ ├── protector_CrAcKeR.2.sg │ │ │ ├── protector_CrackStop.2.sg │ │ │ ├── protector_Cruncher.2.sg │ │ │ ├── protector_CryExe.2.sg │ │ │ ├── protector_CryptCom.2.sg │ │ │ ├── protector_CrypteXeC.2.sg │ │ │ ├── protector_Crypto-box.2.sg │ │ │ ├── protector_DCREXE.2.sg │ │ │ ├── protector_DMC.2.sg │ │ │ ├── protector_Deeper.2.sg │ │ │ ├── protector_E-PROT.2.sg │ │ │ ├── protector_EEXE.2.sg │ │ │ ├── protector_EPW.2.sg │ │ │ ├── protector_ETS.1.sg │ │ │ ├── protector_EXE-Crypt.2.sg │ │ │ ├── protector_EXE-Protect.2.sg │ │ │ ├── protector_EXEGUARD.2.sg │ │ │ ├── protector_EXEHigh.2.sg │ │ │ ├── protector_EXETools.2.sg │ │ │ ├── protector_Encriptor.2.sg │ │ │ ├── protector_Enkryptonator.2.sg │ │ │ ├── protector_ExeCode.2.sg │ │ │ ├── protector_ExeLock.2.sg │ │ │ ├── protector_FACRYPT.2.sg │ │ │ ├── protector_FSE.2.sg │ │ │ ├── protector_GA-Header.2.sg │ │ │ ├── protector_GOAT.1.sg │ │ │ ├── protector_HACKSTOP.2.sg │ │ │ ├── protector_HASP.2.sg │ │ │ ├── protector_HEALTH.2.sg │ │ │ ├── protector_HaSPeX-Protect.2.sg │ │ │ ├── protector_Hardlock.2.sg │ │ │ ├── protector_Inertia.2.sg │ │ │ ├── protector_Int01-Destroyer.2.sg │ │ │ ├── protector_Ironthorn.2.sg │ │ │ ├── protector_JAM.2.sg │ │ │ ├── protector_JmCryptExe.2.sg │ │ │ ├── protector_Joke.2.sg │ │ │ ├── protector_KeyMaker.2.sg │ │ │ ├── protector_Kvetch.2.sg │ │ │ ├── protector_LOCK.2.sg │ │ │ ├── protector_LOCK91.2.sg │ │ │ ├── protector_LamerStop.2.sg │ │ │ ├── protector_LockTite+.2.sg │ │ │ ├── protector_MEGALITE.2.sg │ │ │ ├── protector_MESS.2.sg │ │ │ ├── protector_Maker.2.sg │ │ │ ├── protector_Mandrake.2.sg │ │ │ ├── protector_MutaWWP.2.sg │ │ │ ├── protector_Mutate.2.sg │ │ │ ├── protector_NOCLIP.2.sg │ │ │ ├── protector_NOTA.2.sg │ │ │ ├── protector_NTShell.2.sg │ │ │ ├── protector_Nodebug.2.sg │ │ │ ├── protector_Novex.2.sg │ │ │ ├── protector_Overlay.2.sg │ │ │ ├── protector_PACKWIN.2.sg │ │ │ ├── protector_PC-Guard.2.sg │ │ │ ├── protector_PCOM.2.sg │ │ │ ├── protector_PROTECT.2.sg │ │ │ ├── protector_PVAC.2.sg │ │ │ ├── protector_PassEXE.2.sg │ │ │ ├── protector_Pksmart.2.sg │ │ │ ├── protector_ProtEXE.2.sg │ │ │ ├── protector_Protector.2.sg │ │ │ ├── protector_Quadru-Lock.2.sg │ │ │ ├── protector_R-Crypt.2.sg │ │ │ ├── protector_REC.2.sg │ │ │ ├── protector_RHC.2.sg │ │ │ ├── protector_ROSETINY.2.sg │ │ │ ├── protector_SSI-Lock.2.sg │ │ │ ├── protector_Secure.2.sg │ │ │ ├── protector_SelfChk.2.sg │ │ │ ├── protector_Shrink.2.sg │ │ │ ├── protector_SnoopStop.2.sg │ │ │ ├── protector_SuckStop.2.sg │ │ │ ├── protector_TCEC.2.sg │ │ │ ├── protector_TraceLock.2.sg │ │ │ ├── protector_Trap.2.sg │ │ │ ├── protector_Un2pack.2.sg │ │ │ ├── protector_UnPackStop.2.sg │ │ │ ├── protector_XDOC.2.sg │ │ │ ├── protector_aPatch.2.sg │ │ │ ├── protector_cramble.2.sg │ │ │ ├── protector_iLUCRYPT.2.sg │ │ │ ├── protector_nbuild.2.sg │ │ │ ├── runtime_VROOMM.4.sg │ │ │ ├── self-displayer_ANS2ALL.1.sg │ │ │ ├── self-displayer_GIFEXE.1.sg │ │ │ ├── self-displayer_RELETTER.1.sg │ │ │ ├── self-displayer_SimplyWare.1.sg │ │ │ ├── self-displayer_TXT2COM.1.sg │ │ │ ├── self-displayer_TXTmaker.1.sg │ │ │ ├── self-displayer_Txt2Exe.1.sg │ │ │ ├── self-displayer_self-displayer.1.sg │ │ │ ├── sfx_ARC.1.sg │ │ │ ├── sfx_ARJ.1.sg │ │ │ ├── sfx_ChSFX.1.sg │ │ │ ├── sfx_EXARJ.1.sg │ │ │ ├── sfx_ICE.1.sg │ │ │ ├── sfx_LH.1.sg │ │ │ ├── sfx_LHA.1.sg │ │ │ ├── sfx_LHarc.1.sg │ │ │ ├── sfx_PKSFX.1.sg │ │ │ ├── sfx_PKZIP-SFX.1.sg │ │ │ ├── sfx_PKZIP_mini-sfx.1.sg │ │ │ ├── sfx_SFX.1.sg │ │ │ ├── sfx_ZOO.1.sg │ │ │ ├── unknown_immunizer.1.sg │ │ │ └── virus.1.sg │ │ ├── NE/ │ │ │ ├── _NE.0.sg │ │ │ ├── _init │ │ │ ├── compiler_Borland_C++.1.sg │ │ │ ├── compiler_Borland_Pascal.1.sg │ │ │ ├── compiler_Watcom_C.1.sg │ │ │ ├── game_engine_DirectorPlayer.1.sg │ │ │ ├── installer_CoktelVisionInstaller.1.sg │ │ │ ├── installer_Setup-Specialist.1.sg │ │ │ ├── library_MS_RTL.4.sg │ │ │ ├── sfx_ARC_SFX.1.sg │ │ │ ├── sfx_PKZIP-SFX.1.sg │ │ │ └── sfx_Sydex_SFX.1.sg │ │ ├── NPM/ │ │ │ ├── _NPM.0.sg │ │ │ ├── _init │ │ │ ├── language_JavaScript.5.sg │ │ │ ├── language_TypeScript.5.sg │ │ │ └── package_PackageName.1.sg │ │ ├── PDF/ │ │ │ ├── _PDF.0.sg │ │ │ ├── _init │ │ │ ├── converter_markdown-pdf.3.sg │ │ │ ├── converter_mdpdf.3.sg │ │ │ ├── format_HeaderComment.2.sg │ │ │ ├── format_PersonalData.5.sg │ │ │ ├── format_RTSN_secure.1.sg │ │ │ └── format_Tools.2.sg │ │ ├── PE/ │ │ │ ├── ACE.6.sg │ │ │ ├── Cab.6.sg │ │ │ ├── Microsoft.6.sg │ │ │ ├── Microsoft_Class_Installer.1.sg │ │ │ ├── Microsoft_Compound-based_installer.1.sg │ │ │ ├── Microsoft_Help.1.sg │ │ │ ├── Microsoft_JScript.6.sg │ │ │ ├── _FixDetects.9.sg │ │ │ ├── _NetCompilersLibs.4.sg │ │ │ ├── _PE.0.sg │ │ │ ├── __GenericHeuristicAnalysis_By_DosX.7.sg │ │ │ ├── _init │ │ │ ├── archive_7z.6.sg │ │ │ ├── arj.6.sg │ │ │ ├── compiler_BatchToApp.6.sg │ │ │ ├── compiler_BeRo_Tiny_Pascal.6.sg │ │ │ ├── compiler_Borland_C++.6.sg │ │ │ ├── compiler_Cygwin32.4.sg │ │ │ ├── compiler_DECFortran.4.sg │ │ │ ├── compiler_DMD.6.sg │ │ │ ├── compiler_DarkBASIC.4.sg │ │ │ ├── compiler_Delphi.4.sg │ │ │ ├── compiler_EuroASM.4.sg │ │ │ ├── compiler_Excelsior_JET.4.sg │ │ │ ├── compiler_FASM.4.sg │ │ │ ├── compiler_FreeBasic.6.sg │ │ │ ├── compiler_Free_Pascal.6.sg │ │ │ ├── compiler_Go.4.sg │ │ │ ├── compiler_IBM_VisualAge_C.6.sg │ │ │ ├── compiler_IBM_VisualAge_COBOL.6.sg │ │ │ ├── compiler_IBM_VisualAge_PL_I.6.sg │ │ │ ├── compiler_Intel_C.6.sg │ │ │ ├── compiler_Kotlin.4.sg │ │ │ ├── compiler_LCC-Win32.4.sg │ │ │ ├── compiler_LDC.6.sg │ │ │ ├── compiler_LLVM.6.sg │ │ │ ├── compiler_Lahey_Fortran_90.4.sg │ │ │ ├── compiler_MinGW.6.sg │ │ │ ├── compiler_Nim.4.sg │ │ │ ├── compiler_Pelles_C.6.sg │ │ │ ├── compiler_PerlApp.1.sg │ │ │ ├── compiler_PowerBASIC.4.sg │ │ │ ├── compiler_PureBasic.4.sg │ │ │ ├── compiler_RADBasic.6.sg │ │ │ ├── compiler_RealBasic.4.sg │ │ │ ├── compiler_RosASM.4.sg │ │ │ ├── compiler_Rust.4.sg │ │ │ ├── compiler_SpASM.4.sg │ │ │ ├── compiler_Swift.6.sg │ │ │ ├── compiler_Symantec_C.6.sg │ │ │ ├── compiler_TASM32.4.sg │ │ │ ├── compiler_Virtual_Pascal.4.sg │ │ │ ├── compiler_Visual_Objects.4.sg │ │ │ ├── compiler_Visual_Prolog.4.sg │ │ │ ├── compiler_Watcom.6.sg │ │ │ ├── compiler_WutaoEPL.6.sg │ │ │ ├── compiler_Xbase.4.sg │ │ │ ├── compiler_Zig.4.sg │ │ │ ├── compiler_tcc.6.sg │ │ │ ├── compiler_twinBASIC.6.sg │ │ │ ├── cryptor_Amber.2.sg │ │ │ ├── cryptor_AverCryptor.2.sg │ │ │ ├── cryptor_BattleshipCrypter.2.sg │ │ │ ├── cryptor_CronosCrypter.1.sg │ │ │ ├── cryptor_CryptEngine_MalwareCryptor.2.sg │ │ │ ├── cryptor_Duals_eXe_Encryptor.2.sg │ │ │ ├── cryptor_EXECryptor.2.sg │ │ │ ├── cryptor_Huan.1.sg │ │ │ ├── cryptor_KCryptor.2.sg │ │ │ ├── cryptor_Kryptonit.2.sg │ │ │ ├── cryptor_LimeCrypter.2.sg │ │ │ ├── cryptor_NativeCryptor_by_DosX.2.sg │ │ │ ├── cryptor_PEUnion.2.sg │ │ │ ├── cryptor_RCryptor.2.sg │ │ │ ├── cryptor_RDG_Tejon_Crypter.2.sg │ │ │ ├── cryptor_ReXCrypter.2.sg │ │ │ ├── cryptor_Stones_PE_Encryptor.2.sg │ │ │ ├── cryptor_Virogen_Crypt.2.sg │ │ │ ├── cryptor_XorCryptor.2.sg │ │ │ ├── cryptor_Yodas_Crypter.2.sg │ │ │ ├── custom_sfx_installers.1.sg │ │ │ ├── debug_data.5.sg │ │ │ ├── dotnet_only/ │ │ │ │ └── about.txt │ │ │ ├── emulator_Wine.3.sg │ │ │ ├── engine_AGS.1.sg │ │ │ ├── format_AutoHotKey.3.sg │ │ │ ├── format_AutoIt.3.sg │ │ │ ├── game_engine_Atlas.3.sg │ │ │ ├── game_engine_DEV7.3.sg │ │ │ ├── game_engine_Director.3.sg │ │ │ ├── game_engine_Godot.3.sg │ │ │ ├── game_engine_Wintermute.3.sg │ │ │ ├── game_engine_XPAT.3.sg │ │ │ ├── game_engine_Xash.3.sg │ │ │ ├── installer_ACCAStore.1.sg │ │ │ ├── installer_AOLSetup.1.sg │ │ │ ├── installer_Acronis_installer.1.sg │ │ │ ├── installer_Actual_Installer.1.sg │ │ │ ├── installer_Adobe_FlashPlayer_downloader.1.sg │ │ │ ├── installer_Adobe_installers.1.sg │ │ │ ├── installer_Advanced_installer.1.sg │ │ │ ├── installer_Adveractive.1.sg │ │ │ ├── installer_Aeco_installer.1.sg │ │ │ ├── installer_Alchemy_Mindworks_installer.1.sg │ │ │ ├── installer_Astrum.1.sg │ │ │ ├── installer_AutoPlay_Media_Studio.1.sg │ │ │ ├── installer_Autodesk_Self-Extract.1.sg │ │ │ ├── installer_AutorunProEnterprise.1.sg │ │ │ ├── installer_AutorunProEnterpriseII.1.sg │ │ │ ├── installer_BitRock_Installer.1.sg │ │ │ ├── installer_Bytessence_Install_Maker.1.sg │ │ │ ├── installer_CNetX.1.sg │ │ │ ├── installer_CSDD_installer.1.sg │ │ │ ├── installer_CZ_installer.1.sg │ │ │ ├── installer_Calibre_installer.1.sg │ │ │ ├── installer_Chaos_Software_installer.1.sg │ │ │ ├── installer_ClickTeam.1.sg │ │ │ ├── installer_Codegear_Installer.1.sg │ │ │ ├── installer_CreateInstall.1.sg │ │ │ ├── installer_CrypKey_Installer.1.sg │ │ │ ├── installer_DeployMaster.1.sg │ │ │ ├── installer_DesktopX_Installer.1.sg │ │ │ ├── installer_Eschalon_installer.1.sg │ │ │ ├── installer_Excelsior_Installer.1.sg │ │ │ ├── installer_FDM_Installer.1.sg │ │ │ ├── installer_GPInstall.1.sg │ │ │ ├── installer_Gentee_Installer.1.sg │ │ │ ├── installer_Ghost_Installer.1.sg │ │ │ ├── installer_Gremlin_Patcher.1.sg │ │ │ ├── installer_I-D_Media_installer.1.sg │ │ │ ├── installer_IDM_Installer.1.sg │ │ │ ├── installer_INTENIUM.1.sg │ │ │ ├── installer_Inno_Setup_Module.1.sg │ │ │ ├── installer_Instalit.1.sg │ │ │ ├── installer_Install4j_installer.1.sg │ │ │ ├── installer_InstallAnywhere.1.sg │ │ │ ├── installer_InstallShield.1.sg │ │ │ ├── installer_InstallUs.1.sg │ │ │ ├── installer_Install_Factory.1.sg │ │ │ ├── installer_LucasArts_Update_Installer.1.sg │ │ │ ├── installer_Miktex_Installer.1.sg │ │ │ ├── installer_Mioplanet_installer.1.sg │ │ │ ├── installer_Morton_installer.1.sg │ │ │ ├── installer_Multimedia_Fusion_Installer.1.sg │ │ │ ├── installer_Myriad_Install.1.sg │ │ │ ├── installer_NOS_Installer.1.sg │ │ │ ├── installer_Nullsoft_Scriptable_Install_System.1.sg │ │ │ ├── installer_O'Setup95.1.sg │ │ │ ├── installer_PCInstall.1.sg │ │ │ ├── installer_PIMP.1.sg │ │ │ ├── installer_PackageForTheWeb.1.sg │ │ │ ├── installer_Pantaray_QSetup.1.sg │ │ │ ├── installer_Paquet_Builder.1.sg │ │ │ ├── installer_Quick_Install.1.sg │ │ │ ├── installer_RNsetup.1.sg │ │ │ ├── installer_SCE_installer.1.sg │ │ │ ├── installer_STATICSUP.1.sg │ │ │ ├── installer_Setup-Specialist.1.sg │ │ │ ├── installer_Setup_Factory.1.sg │ │ │ ├── installer_SfxCA.1.sg │ │ │ ├── installer_Smart_Install_Maker.1.sg │ │ │ ├── installer_Sony_Windows_Installer.1.sg │ │ │ ├── installer_Spoon_Installer.1.sg │ │ │ ├── installer_Squirrel.1.sg │ │ │ ├── installer_SwiftView_installer.1.sg │ │ │ ├── installer_Synactis_In-The-Box_Installer.1.sg │ │ │ ├── installer_Tarma_Installer.1.sg │ │ │ ├── installer_Themepak.1.sg │ │ │ ├── installer_UFI_installer.1.sg │ │ │ ├── installer_VMWare.1.sg │ │ │ ├── installer_Vise.1.sg │ │ │ ├── installer_WiX_Toolset_installer.1.sg │ │ │ ├── installer_WinRAR_Installer.1.sg │ │ │ ├── installer_Winamp_Installer.1.sg │ │ │ ├── installer_Windows_Installer.1.sg │ │ │ ├── installer_Wise_Installer.1.sg │ │ │ ├── installer_Xoreax_installer.1.sg │ │ │ ├── installer_distutils.1.sg │ │ │ ├── installer_sqx.1.sg │ │ │ ├── joiner_Celesty_File_Binder.1.sg │ │ │ ├── joiner_ExeSplitter.1.sg │ │ │ ├── joiner_FreeJoiner.1.sg │ │ │ ├── joiner_MicroJoiner.1.sg │ │ │ ├── joiner_N-Joiner.1.sg │ │ │ ├── joiner_OxiJoiner.2.sg │ │ │ ├── joiner_RJoiner.1.sg │ │ │ ├── joiner_SFXRun.1.sg │ │ │ ├── joiner_inPEct.1.sg │ │ │ ├── library_16Edit.4.sg │ │ │ ├── library_7z.4.sg │ │ │ ├── library_AMD_FSR.4.sg │ │ │ ├── library_AMD_GraphicalServices.4.sg │ │ │ ├── library_ASIPort.4.sg │ │ │ ├── library_AjaxMin.4.sg │ │ │ ├── library_Alibaba_CloudSDK.4.sg │ │ │ ├── library_Amazon_CloudWatch.4.sg │ │ │ ├── library_Amazon_CloudWatchLogs.4.sg │ │ │ ├── library_Amazon_DynamoDB.4.sg │ │ │ ├── library_Amazon_ElasticComputeCloudService.4.sg │ │ │ ├── library_Amazon_Glue.4.sg │ │ │ ├── library_Amazon_Kinesis.4.sg │ │ │ ├── library_Amazon_Lambda.4.sg │ │ │ ├── library_Amazon_RelationalDatabaseService.4.sg │ │ │ ├── library_Amazon_SecretsManager.4.sg │ │ │ ├── library_Amazon_SecurityToken.4.sg │ │ │ ├── library_Amazon_ServicesSDK.4.sg │ │ │ ├── library_Amazon_SimpleEmail.4.sg │ │ │ ├── library_Amazon_SimpleQueueService.4.sg │ │ │ ├── library_Amazon_SimpleStorageService.4.sg │ │ │ ├── library_Amazon_SingleSignOn.4.sg │ │ │ ├── library_Amazon_X-Ray.4.sg │ │ │ ├── library_AngleSharp.4.sg │ │ │ ├── library_Antlr.4.sg │ │ │ ├── library_AppleSoftwareUpdate.4.sg │ │ │ ├── library_Argon2.4.sg │ │ │ ├── library_AtMsg32.4.sg │ │ │ ├── library_Atlantic.4.sg │ │ │ ├── library_Authorwave.4.sg │ │ │ ├── library_Autofac.4.sg │ │ │ ├── library_BenchmarkDotNet.4.sg │ │ │ ├── library_Boost.4.sg │ │ │ ├── library_BrotliSharpLib.4.sg │ │ │ ├── library_CUDA-Driver.4.sg │ │ │ ├── library_Castle.Net.4.sg │ │ │ ├── library_ChilkatNativeLib.4.sg │ │ │ ├── library_Chromium_Embedded_Framework.4.sg │ │ │ ├── library_Chromium_WebView.4.sg │ │ │ ├── library_CliWrap.4.sg │ │ │ ├── library_ClosedXML.4.sg │ │ │ ├── library_CodeBase.4.sg │ │ │ ├── library_CommandLineParser.4.sg │ │ │ ├── library_Costura.Fody.4.sg │ │ │ ├── library_Crc32_NET.4.sg │ │ │ ├── library_Crc_NET.4.sg │ │ │ ├── library_CsvHelper.4.sg │ │ │ ├── library_D3DRM.4.sg │ │ │ ├── library_D3DXOF.4.sg │ │ │ ├── library_Dapper.4.sg │ │ │ ├── library_DeepCloner.4.sg │ │ │ ├── library_Direct2D.4.sg │ │ │ ├── library_Direct3D.4.sg │ │ │ ├── library_DirectDraw.4.sg │ │ │ ├── library_DirectInput.4.sg │ │ │ ├── library_DirectSound.4.sg │ │ │ ├── library_DirectX.4.sg │ │ │ ├── library_DirectorAPI.4.sg │ │ │ ├── library_Discord.Net.4.sg │ │ │ ├── library_DnsClient.NET.4.sg │ │ │ ├── library_Dryloc.4.sg │ │ │ ├── library_EAX_Unified.4.sg │ │ │ ├── library_EcmaScript_NET.4.sg │ │ │ ├── library_Edit_Dev.4.sg │ │ │ ├── library_ElectronApp.4.sg │ │ │ ├── library_EpicGames.4.sg │ │ │ ├── library_ExcelDataReader.4.sg │ │ │ ├── library_ExcelNumberFormat.4.sg │ │ │ ├── library_ExifLibNet.4.sg │ │ │ ├── library_FAAD.4.sg │ │ │ ├── library_FFmpeg.4.sg │ │ │ ├── library_FastExpressionCompiler.4.sg │ │ │ ├── library_FastMember.4.sg │ │ │ ├── library_FastRsync_NET.4.sg │ │ │ ├── library_Fastenshtein.4.sg │ │ │ ├── library_Fasterflect.4.sg │ │ │ ├── library_FlashPlayer.1.sg │ │ │ ├── library_FluentValidation.4.sg │ │ │ ├── library_Fox_Pro.4.sg │ │ │ ├── library_FusionCache.4.sg │ │ │ ├── library_FuzzySharp.4.sg │ │ │ ├── library_GitLabApiClient.4.sg │ │ │ ├── library_GoldSrc.3.sg │ │ │ ├── library_Google_APIs.4.sg │ │ │ ├── library_Google_ProtoBuf.4.sg │ │ │ ├── library_Harmony.4.sg │ │ │ ├── library_HtmlAgilityPack.4.sg │ │ │ ├── library_Humanizer.4.sg │ │ │ ├── library_ImageSharp.4.sg │ │ │ ├── library_Intel_IPP.4.sg │ │ │ ├── library_Intel_TBB.4.sg │ │ │ ├── library_Intel_XeSS.4.sg │ │ │ ├── library_Irony.4.sg │ │ │ ├── library_LCL.5.sg │ │ │ ├── library_LINQKit.4.sg │ │ │ ├── library_LZMA.4.sg │ │ │ ├── library_LazyCache.4.sg │ │ │ ├── library_Lego1.4.sg │ │ │ ├── library_LibLog.4.sg │ │ │ ├── library_LibNoise.4.sg │ │ │ ├── library_LibPhoneNumber_NET.4.sg │ │ │ ├── library_LibSassBuilder.4.sg │ │ │ ├── library_LibVLCSharp.4.sg │ │ │ ├── library_LiteDB.4.sg │ │ │ ├── library_LoadServ.4.sg │ │ │ ├── library_Lua_Runtime.4.sg │ │ │ ├── library_MacroMix.4.sg │ │ │ ├── library_MailKit.4.sg │ │ │ ├── library_ManagedCuda.4.sg │ │ │ ├── library_Mapster.4.sg │ │ │ ├── library_Markdig.4.sg │ │ │ ├── library_MassTransit.4.sg │ │ │ ├── library_MediatR.4.sg │ │ │ ├── library_MemoryPack.4.sg │ │ │ ├── library_MessagePack.4.sg │ │ │ ├── library_Microsoft_AzureSDK.4.sg │ │ │ ├── library_Microsoft_Azure_SDK.4.sg │ │ │ ├── library_Microsoft_C_Runtime.4.sg │ │ │ ├── library_Microsoft_Edge_WebView.4.sg │ │ │ ├── library_Microsoft_NET_Runtime.4.sg │ │ │ ├── library_Microsoft_OpenAPI.4.sg │ │ │ ├── library_MilesSoundSystem.4.sg │ │ │ ├── library_MimeKit.4.sg │ │ │ ├── library_MongoDB.NET.4.sg │ │ │ ├── library_MonkeyCache.4.sg │ │ │ ├── library_Moq.4.sg │ │ │ ├── library_NJsonSchema.4.sg │ │ │ ├── library_NSubstitute.4.sg │ │ │ ├── library_NUnit.4.sg │ │ │ ├── library_Nerdbank.Streams.4.sg │ │ │ ├── library_Newtonsoft.Json.4.sg │ │ │ ├── library_Ninject.4.sg │ │ │ ├── library_NodaTime.4.sg │ │ │ ├── library_Nvidia_DLSS.4.sg │ │ │ ├── library_Nvidia_PhysX.4.sg │ │ │ ├── library_Nvidia_Streamline.4.sg │ │ │ ├── library_OodleCompression.4.sg │ │ │ ├── library_OpenAI.4.sg │ │ │ ├── library_OpenAL.4.sg │ │ │ ├── library_OpenCL.4.sg │ │ │ ├── library_OpenCV.4.sg │ │ │ ├── library_OpenColorIO.4.sg │ │ │ ├── library_OpenGL.4.sg │ │ │ ├── library_OpenIddict.4.sg │ │ │ ├── library_OpenSSL.4.sg │ │ │ ├── library_OpenTelemetry.4.sg │ │ │ ├── library_OpusAudio.4.sg │ │ │ ├── library_PdfPig.4.sg │ │ │ ├── library_Perfolizer.4.sg │ │ │ ├── library_Perl.3.sg │ │ │ ├── library_Plivo.4.sg │ │ │ ├── library_Polly.4.sg │ │ │ ├── library_PortAudio.4.sg │ │ │ ├── library_Python.4.sg │ │ │ ├── library_QMixer.4.sg │ │ │ ├── library_Qt.4.sg │ │ │ ├── library_RADVideoTools.4.sg │ │ │ ├── library_RNNoise.4.sg │ │ │ ├── library_RabbitMQ.4.sg │ │ │ ├── library_RamlToOpenApiConverter.4.sg │ │ │ ├── library_RestSharp.4.sg │ │ │ ├── library_SDL.4.sg │ │ │ ├── library_ScePad.4.sg │ │ │ ├── library_ScriptHookV.4.sg │ │ │ ├── library_Scrutor.4.sg │ │ │ ├── library_SecretRabbitCode.4.sg │ │ │ ├── library_Serilog.4.sg │ │ │ ├── library_SharpCompress.4.sg │ │ │ ├── library_SharpZipLib.4.sg │ │ │ ├── library_Sigil.4.sg │ │ │ ├── library_SkiaSharp.4.sg │ │ │ ├── library_Smacker.4.sg │ │ │ ├── library_SmartHeap.4.sg │ │ │ ├── library_Snappier.4.sg │ │ │ ├── library_Spectre.Console.4.sg │ │ │ ├── library_Stackify.4.sg │ │ │ ├── library_Starkbank_ECDSA.4.sg │ │ │ ├── library_Steam.4.sg │ │ │ ├── library_Swashbuckle.AspNetCore.4.sg │ │ │ ├── library_TNTSI.4.sg │ │ │ ├── library_Tabula.4.sg │ │ │ ├── library_Telegram.Bot.4.sg │ │ │ ├── library_Twilio.4.sg │ │ │ ├── library_Twilio_SendGrid.4.sg │ │ │ ├── library_UAParser.4.sg │ │ │ ├── library_Unity.4.sg │ │ │ ├── library_VFW.4.sg │ │ │ ├── library_Vorbis.4.sg │ │ │ ├── library_Vulkan.4.sg │ │ │ ├── library_WF.Guna.UI2.4.sg │ │ │ ├── library_WF.Krypton.4.sg │ │ │ ├── library_WF.MetroFramework.4.sg │ │ │ ├── library_WF.ReaLTaiizor.4.sg │ │ │ ├── library_WF_WPF.MaterialSkin.4.sg │ │ │ ├── library_WPF.AvalonEdit.4.sg │ │ │ ├── library_WPF.ControlzEx.4.sg │ │ │ ├── library_WPF.MahApps_Metro.4.sg │ │ │ ├── library_WebActivatorEx.4.sg │ │ │ ├── library_WinSparkle.4.sg │ │ │ ├── library_WwiseAudioEngine.4.sg │ │ │ ├── library_XLive.4.sg │ │ │ ├── library_XPatFC.4.sg │ │ │ ├── library_Xerces-CPP.4.sg │ │ │ ├── library_Xojo.4.sg │ │ │ ├── library_YUICompressor_NET.4.sg │ │ │ ├── library_YamlDotNet.4.sg │ │ │ ├── library_ZstdSharp.4.sg │ │ │ ├── library_Zydis.4.sg │ │ │ ├── library_combres.4.sg │ │ │ ├── library_curl.4.sg │ │ │ ├── library_discord-rpc.4.sg │ │ │ ├── library_dotless.4.sg │ │ │ ├── library_expat_xml_parser.4.sg │ │ │ ├── library_gRPC_NET.4.sg │ │ │ ├── library_iMuse.4.sg │ │ │ ├── library_java.3.sg │ │ │ ├── library_libfvad.4.sg │ │ │ ├── library_libpng.4.sg │ │ │ ├── library_log4net.4.sg │ │ │ ├── library_lz4net.4.sg │ │ │ ├── library_nClam.4.sg │ │ │ ├── library_rlottie.4.sg │ │ │ ├── library_sqlite.4.sg │ │ │ ├── library_wxWidgets.5.sg │ │ │ ├── library_xUnit.net.4.sg │ │ │ ├── library_zlib.4.sg │ │ │ ├── linkers.6.sg │ │ │ ├── marker_AMD_PowerXpress.5.sg │ │ │ ├── marker_Nvidia_Optimus.5.sg │ │ │ ├── native_only/ │ │ │ │ └── about.txt │ │ │ ├── other_Dolphin_VM.1.sg │ │ │ ├── other_FileSplit_Self-Merger.2.sg │ │ │ ├── other_GSplit.1.sg │ │ │ ├── packer_32LiTe.2.sg │ │ │ ├── packer_AHpacker.2.sg │ │ │ ├── packer_ANDpakk.2.sg │ │ │ ├── packer_ASDPack.2.sg │ │ │ ├── packer_ASPack.2.sg │ │ │ ├── packer_Advanced_BAT_to_EXE_Converter.2.sg │ │ │ ├── packer_AlushPacker.2.sg │ │ │ ├── packer_Anskya_NTPacker_Generator.2.sg │ │ │ ├── packer_AtomPePacker.2.sg │ │ │ ├── packer_BatToExe.2.sg │ │ │ ├── packer_BatToExeConverter.2.sg │ │ │ ├── packer_BeRoEXEPacker.2.sg │ │ │ ├── packer_BoxedApp.2.sg │ │ │ ├── packer_CExe.2.sg │ │ │ ├── packer_CICompress.2.sg │ │ │ ├── packer_Cxfreeze.2.sg │ │ │ ├── packer_DxPack.2.sg │ │ │ ├── packer_EXE32Pack.2.sg │ │ │ ├── packer_ExE_Pack.2.sg │ │ │ ├── packer_FSG.2.sg │ │ │ ├── packer_Fatpack.2.sg │ │ │ ├── packer_HTML_executable.1.sg │ │ │ ├── packer_JDPack.2.sg │ │ │ ├── packer_KByS.2.sg │ │ │ ├── packer_MEW.2.sg │ │ │ ├── packer_MPRESS.2.sg │ │ │ ├── packer_MoleBox.2.sg │ │ │ ├── packer_Mystic_Compressor.2.sg │ │ │ ├── packer_NETZ.2.sg │ │ │ ├── packer_NOS_Packer.2.sg │ │ │ ├── packer_NTPacker.2.sg │ │ │ ├── packer_NTShell.2.sg │ │ │ ├── packer_NakedPacker.2.sg │ │ │ ├── packer_NeoLite.2.sg │ │ │ ├── packer_NodeJS_Nexe.2.sg │ │ │ ├── packer_NodeJS_Pkg.2.sg │ │ │ ├── packer_NsPack.2.sg │ │ │ ├── packer_Nuitka.2.sg │ │ │ ├── packer_PACKWIN.2.sg │ │ │ ├── packer_PE-PACK.sg │ │ │ ├── packer_PECompact.2.sg │ │ │ ├── packer_PKLITE.2.sg │ │ │ ├── packer_Pack_Master.2.sg │ │ │ ├── packer_Packanoid.2.sg │ │ │ ├── packer_Packman.2.sg │ │ │ ├── packer_PeX.2.sg │ │ │ ├── packer_Petite.2.sg │ │ │ ├── packer_PyInstaller.2.sg │ │ │ ├── packer_QuestPowerGUI.2.sg │ │ │ ├── packer_RLPack.2.sg │ │ │ ├── packer_SC_Pack.2.sg │ │ │ ├── packer_SecuPack.2.sg │ │ │ ├── packer_SerGreen_Appacker.2.sg │ │ │ ├── packer_SimplePackerByEronana.2.sg │ │ │ ├── packer_Simple_Pack.2.sg │ │ │ ├── packer_Software_Compress.2.sg │ │ │ ├── packer_Squishy.2.sg │ │ │ ├── packer_TPP_Pack.2.sg │ │ │ ├── packer_TheArk.2.sg │ │ │ ├── packer_UPX.2.sg │ │ │ ├── packer_VPacker.2.sg │ │ │ ├── packer_VbsToExeConverter.2.sg │ │ │ ├── packer_WWPack32.2.sg │ │ │ ├── packer_WinUpack.2.sg │ │ │ ├── packer_Windows_PE_Packer_by_Chenzs108.2.sg │ │ │ ├── packer_XComp.2.sg │ │ │ ├── packer_XPack.2.sg │ │ │ ├── packer_aPack.2.sg │ │ │ ├── packer_dePACK.2.sg │ │ │ ├── packer_ezip.2.sg │ │ │ ├── packer_hXOR.2.sg │ │ │ ├── packer_hmimys_PE-Pack.2.sg │ │ │ ├── packer_kkrunchy.2.sg │ │ │ ├── packer_mPack.2.sg │ │ │ ├── packer_mkfPack.2.sg │ │ │ ├── packer_nPack.2.sg │ │ │ ├── packer_netshrink.2.sg │ │ │ ├── packer_ps2exe.2.sg │ │ │ ├── packer_py2exe.2.sg │ │ │ ├── packer_scr2exe.2.sg │ │ │ ├── packer_yzPack.2.sg │ │ │ ├── patcher_CodeFusion_Wizard.1.sg │ │ │ ├── patcher_PMaker.1.sg │ │ │ ├── patcher_RPP.1.sg │ │ │ ├── patcher_RTPatch.1.sg │ │ │ ├── patcher_dUP.1.sg │ │ │ ├── patcher_simple_patch.1.sg │ │ │ ├── player_Power_Screen_Recorder.1.sg │ │ │ ├── protection_BattlEye.5.sg │ │ │ ├── protection_DS.Eutron_SmartKey_dongle.5.sg │ │ │ ├── protection_DS.HASP_dongle.5.sg │ │ │ ├── protection_DS.Hardlock_dongle.5.sg │ │ │ ├── protection_DS.MARX_Crypto-Box_dongle.5.sg │ │ │ ├── protection_DS.Matrix_Hardware_Lock_dongle.5.sg │ │ │ ├── protection_DS.NetHASP_dongle.5.sg │ │ │ ├── protection_DS.SenseLock_dongle.5.sg │ │ │ ├── protection_DS.Sentinel_SuperPro_dongle.5.sg │ │ │ ├── protection_DS.Sentinel_dongle.5.sg │ │ │ ├── protection_DS.SoftLok_dongle.5.sg │ │ │ ├── protection_DS.Unikey_dongle.5.sg │ │ │ ├── protection_DS.WIBU_Key_dongle.5.sg │ │ │ ├── protection_HASP_HL_Protection.5.sg │ │ │ ├── protection_Microsoft_Warbird.2.sg │ │ │ ├── protection_Softlocx.1.sg │ │ │ ├── protection_SteamStub.5.sg │ │ │ ├── protection_Wibu_Codemeter.1.sg │ │ │ ├── protection_obfus_h.5.sg │ │ │ ├── protection_obfusheader_h.5.sg │ │ │ ├── protector_ACProtect.2.sg │ │ │ ├── protector_AHTeam_EP_Protector.2.sg │ │ │ ├── protector_ASM_Guard.2.sg │ │ │ ├── protector_ASProtect.2.sg │ │ │ ├── protector_AT4RE.2.sg │ │ │ ├── protector_AZProtect_0001.2.sg │ │ │ ├── protector_AbyssMedia_ScriptCryptor.2.sg │ │ │ ├── protector_ActiveMark.2.sg │ │ │ ├── protector_Agile.2.sg │ │ │ ├── protector_Alcatraz.2.sg │ │ │ ├── protector_Alienyze.2.sg │ │ │ ├── protector_AntiDote.2.sg │ │ │ ├── protector_Anticrack_Software.2.sg │ │ │ ├── protector_ArmDot.2.sg │ │ │ ├── protector_Armadillo.2.sg │ │ │ ├── protector_Arxan.2.sg │ │ │ ├── protector_BJFnt.2.sg │ │ │ ├── protector_Babel_.NET.2.sg │ │ │ ├── protector_Berio.2.sg │ │ │ ├── protector_ByfronTech.2.sg │ │ │ ├── protector_ByteGuard.2.sg │ │ │ ├── protector_Cameyo.2.sg │ │ │ ├── protector_CliSecure.2.sg │ │ │ ├── protector_Code-Lock.2.sg │ │ │ ├── protector_CodeCrypt.2.sg │ │ │ ├── protector_CodeVeil.2.sg │ │ │ ├── protector_Code_Virtualizer.2.sg │ │ │ ├── protector_Codewall.2.sg │ │ │ ├── protector_Confuser.2.sg │ │ │ ├── protector_CopyMinder.2.sg │ │ │ ├── protector_Crinkler.2.sg │ │ │ ├── protector_Crunch.2.sg │ │ │ ├── protector_CrypKey.2.sg │ │ │ ├── protector_CrypToCrack.2.sg │ │ │ ├── protector_Cryptect.2.sg │ │ │ ├── protector_CryptoObfuscator.2.sg │ │ │ ├── protector_DBPE.2.sg │ │ │ ├── protector_DNGuard.2.sg │ │ │ ├── protector_DS.Sentinel_SuperPro.2.sg │ │ │ ├── protector_DYAMAR.2.sg │ │ │ ├── protector_DZA_Patcher.2.sg │ │ │ ├── protector_Daemon_Protect.2.sg │ │ │ ├── protector_DalKrypt.2.sg │ │ │ ├── protector_DeepSea.2.sg │ │ │ ├── protector_Denuvo.2.sg │ │ │ ├── protector_DotFix_Nice_Protect.2.sg │ │ │ ├── protector_Dotfuscator.2.sg │ │ │ ├── protector_DragonArmor.2.sg │ │ │ ├── protector_ENIGMA.2.sg │ │ │ ├── protector_EXEFog.2.sg │ │ │ ├── protector_EXE_Password_Protector.2.sg │ │ │ ├── protector_Eazfuscator.2.sg │ │ │ ├── protector_Elan_License_Manager.1.sg │ │ │ ├── protector_ElecKey.2.sg │ │ │ ├── protector_Escargot.2.sg │ │ │ ├── protector_Excalibur.2.sg │ │ │ ├── protector_ExeShield.2.sg │ │ │ ├── protector_ExeStealth.2.sg │ │ │ ├── protector_Exe_Guarder.2.sg │ │ │ ├── protector_Exe_Shield.2.sg │ │ │ ├── protector_FISH_.NET.2.sg │ │ │ ├── protector_FishPE_Shield.2.sg │ │ │ ├── protector_Fish_PE.2.sg │ │ │ ├── protector_FlashBack_Protector.2.sg │ │ │ ├── protector_G!X_Protector.2.sg │ │ │ ├── protector_GameGuard.2.sg │ │ │ ├── protector_Goats_PE_Mutilator.2.sg │ │ │ ├── protector_Goliath.2.sg │ │ │ ├── protector_HASP.2.sg │ │ │ ├── protector_HackShield.2.sg │ │ │ ├── protector_Hide&Protect.2.sg │ │ │ ├── protector_HidePE.2.sg │ │ │ ├── protector_HyperTech_Crackproof.2.sg │ │ │ ├── protector_ILProtector.2.sg │ │ │ ├── protector_ILUCRYPT.2.sg │ │ │ ├── protector_IProtect.2.sg │ │ │ ├── protector_Inquartos_Obfuscator.2.sg │ │ │ ├── protector_IntelliProtector.2.sg │ │ │ ├── protector_InxObfuscator.2.sg │ │ │ ├── protector_Jar2exe.1.sg │ │ │ ├── protector_KoiVM.2.sg │ │ │ ├── protector_Konekt_Protector.2.sg │ │ │ ├── protector_Krypton.2.sg │ │ │ ├── protector_LARP.2.sg │ │ │ ├── protector_LDK.2.sg │ │ │ ├── protector_LDK_.NET.2.sg │ │ │ ├── protector_LameCrypt.2.sg │ │ │ ├── protector_Laserlok.2.sg │ │ │ ├── protector_MSLRH.2.sg │ │ │ ├── protector_MZ0oPE.2.sg │ │ │ ├── protector_MaskPE.2.sg │ │ │ ├── protector_Maxtocode.2.sg │ │ │ ├── protector_Metrowerks_CodeWarrior.2.sg │ │ │ ├── protector_Morphnah.2.sg │ │ │ ├── protector_N-Code.2.sg │ │ │ ├── protector_N-Joy.2.sg │ │ │ ├── protector_NET_Spider.2.sg │ │ │ ├── protector_NTkrnl_Protector.2.sg │ │ │ ├── protector_NetReactor.2.sg │ │ │ ├── protector_NetShield.2.sg │ │ │ ├── protector_Ningishzida.2.sg │ │ │ ├── protector_NoobyProtect.2.sg │ │ │ ├── protector_North_Star_PE_Shrinker.2.sg │ │ │ ├── protector_ORiEN.2.sg │ │ │ ├── protector_Obfuscar.2.sg │ │ │ ├── protector_Obfuscator_NET_2009.2.sg │ │ │ ├── protector_Obsidium.2.sg │ │ │ ├── protector_OneVM.2.sg │ │ │ ├── protector_Oreans_CodeVirtualizer.2.sg │ │ │ ├── protector_PACE.2.sg │ │ │ ├── protector_PCShrink.2.sg │ │ │ ├── protector_PC_Guard.2.sg │ │ │ ├── protector_PE-Armor.2.sg │ │ │ ├── protector_PE-Shield.2.sg │ │ │ ├── protector_PEBundle.2.sg │ │ │ ├── protector_PECRYPT32.2.sg │ │ │ ├── protector_PELock.2.sg │ │ │ ├── protector_PENinja.2.sg │ │ │ ├── protector_PESpin.2.sg │ │ │ ├── protector_PETetris.2.sg │ │ │ ├── protector_PE_Diminisher.2.sg │ │ │ ├── protector_PE_Encrypt.2.sg │ │ │ ├── protector_PE_Intro.2.sg │ │ │ ├── protector_PE_Lock_NT.2.sg │ │ │ ├── protector_PE_Lock_Phantasm_by_Ding_Boy.2.sg │ │ │ ├── protector_PE_Password.2.sg │ │ │ ├── protector_PE_Protect.2.sg │ │ │ ├── protector_PEncrypt.2.sg │ │ │ ├── protector_PEnguinCrypt.2.sg │ │ │ ├── protector_PUNiSHER.2.sg │ │ │ ├── protector_Phoenix.2.sg │ │ │ ├── protector_Photo_Compiler.2.sg │ │ │ ├── protector_PolyCrypt_PE.2.sg │ │ │ ├── protector_Private_EXE_Protector.2.sg │ │ │ ├── protector_Protect_Disc.2.sg │ │ │ ├── protector_Protection_Plus.2.sg │ │ │ ├── protector_QrYPt0r.2.sg │ │ │ ├── protector_QuickBFC.2.sg │ │ │ ├── protector_QuickPack_NT.2.sg │ │ │ ├── protector_REVProt.2.sg │ │ │ ├── protector_RLP.2.sg │ │ │ ├── protector_ReNET-pack.2.sg │ │ │ ├── protector_RobustObfuscator.2.sg │ │ │ ├── protector_SC_Obfuscator.2.sg │ │ │ ├── protector_SDProtector.2.sg │ │ │ ├── protector_SLVc0deProtector.2.sg │ │ │ ├── protector_SVK_Protector.2.sg │ │ │ ├── protector_Safedisc.2.sg │ │ │ ├── protector_Safenet_RMS.2.sg │ │ │ ├── protector_Safengine_Shielden.2.sg │ │ │ ├── protector_SecuROM.2.sg │ │ │ ├── protector_Secure_Shade.2.sg │ │ │ ├── protector_Shrink_Wrap.2.sg │ │ │ ├── protector_Shrinker.2.sg │ │ │ ├── protector_SimbiOZ.2.sg │ │ │ ├── protector_Sixxpack.2.sg │ │ │ ├── protector_Skater.2.sg │ │ │ ├── protector_Smart_Assembly.2.sg │ │ │ ├── protector_SmokesCrypt.2.sg │ │ │ ├── protector_SoftProtect.2.sg │ │ │ ├── protector_SoftSentry.2.sg │ │ │ ├── protector_Special_EXE_Password_Protector.2.sg │ │ │ ├── protector_SpicesNet.2.sg │ │ │ ├── protector_StarForce.2.sg │ │ │ ├── protector_Ste@lth_PE.2.sg │ │ │ ├── protector_Tages.2.sg │ │ │ ├── protector_Themida.2.sg │ │ │ ├── protector_Thinstall.2.sg │ │ │ ├── protector_UG2002_Cruncher.2.sg │ │ │ ├── protector_UPX_Protector.2.sg │ │ │ ├── protector_UPolyX.2.sg │ │ │ ├── protector_UltraPro.2.sg │ │ │ ├── protector_VBox.2.sg │ │ │ ├── protector_VCasm-Protector.2.sg │ │ │ ├── protector_VMProtect.2.sg │ │ │ ├── protector_VMProtect_NET.2.sg │ │ │ ├── protector_VaySoft_PDF2EXE.2.sg │ │ │ ├── protector_VbsToExe.1.sg │ │ │ ├── protector_Virbox.2.sg │ │ │ ├── protector_XCR.2.sg │ │ │ ├── protector_Xenocode_Postbuild.2.sg │ │ │ ├── protector_XerinFuscator.2.sg │ │ │ ├── protector_Xtreamlok.2.sg │ │ │ ├── protector_Yano.2.sg │ │ │ ├── protector_Yodas_Protector.2.sg │ │ │ ├── protector_Yummy_Game_SoftwareShield.2.sg │ │ │ ├── protector_Zprotect.2.sg │ │ │ ├── protector_bambam.2.sg │ │ │ ├── protector_beria.2.sg │ │ │ ├── protector_eXPressor.2.sg │ │ │ ├── protector_hmimys_Protect.2.sg │ │ │ ├── protector_iPB_Protect.2.sg │ │ │ ├── protector_kkryptor.2.sg │ │ │ ├── protector_tElock.2.sg │ │ │ ├── rar.6.sg │ │ │ ├── sfx_12Ghosts_Zip2.1.sg │ │ │ ├── sfx_7z.1.sg │ │ │ ├── sfx_ARJSFX.1.sg │ │ │ ├── sfx_ARQ.1.sg │ │ │ ├── sfx_Abbyy_Lingvo.1.sg │ │ │ ├── sfx_Active_Delivery.1.sg │ │ │ ├── sfx_Cab.1.sg │ │ │ ├── sfx_Chilkat_ZIP_Self-Extractor.1.sg │ │ │ ├── sfx_CoffeeCup_SFX.2.sg │ │ │ ├── sfx_DelZip_SFX.2.sg │ │ │ ├── sfx_Dimd_SFX.1.sg │ │ │ ├── sfx_Envoy_Packager.1.sg │ │ │ ├── sfx_GZip.1.sg │ │ │ ├── sfx_GkSetup.1.sg │ │ │ ├── sfx_INFTool.1.sg │ │ │ ├── sfx_KRZIP_SFX.2.sg │ │ │ ├── sfx_LZH_SFX.1.sg │ │ │ ├── sfx_Lyme_SFX.1.sg │ │ │ ├── sfx_MP-ZipTool.1.sg │ │ │ ├── sfx_MPQ.1.sg │ │ │ ├── sfx_NanoZip.1.sg │ │ │ ├── sfx_PKSFX.1.sg │ │ │ ├── sfx_Paquet.1.sg │ │ │ ├── sfx_Quantum.1.sg │ │ │ ├── sfx_SZDD.1.sg │ │ │ ├── sfx_Squeez_SFX.1.sg │ │ │ ├── sfx_WinACE.1.sg │ │ │ ├── sfx_WinIMP.1.sg │ │ │ ├── sfx_WinImage.1.sg │ │ │ ├── sfx_WinPatch.1.sg │ │ │ ├── sfx_WinRAR.1.sg │ │ │ ├── sfx_WinZip.1.sg │ │ │ ├── sfx_ZipCentral_SFX.1.sg │ │ │ ├── sfx_Zip_SFX.2.sg │ │ │ ├── sfx_rar.1.sg │ │ │ ├── sign_tool_Windows_Authenticode.7.sg │ │ │ ├── tool_AHTeam_UPX_Mutanter.2.sg │ │ │ ├── tool_Microsoft_VisualStudio_NET.6.sg │ │ │ ├── tool_UPX-Patcher.6.sg │ │ │ ├── tool_UPXFreak.2.sg │ │ │ ├── tool_UPX_Inliner.2.sg │ │ │ ├── tool_UPX_Modifier.2.sg │ │ │ ├── tool_UPX_lock.2.sg │ │ │ ├── tool_UPX_scrambler.2.sg │ │ │ ├── tool_UnoPiX.2.sg │ │ │ ├── tool_XVolkolak.6.sg │ │ │ ├── tool_de4dot.6.sg │ │ │ └── zip.6.sg │ │ ├── PNG/ │ │ │ ├── _PNG.0.sg │ │ │ └── _init │ │ ├── PYC/ │ │ │ ├── _PYC.0.sg │ │ │ ├── _init │ │ │ └── packer_UPP.1.sg │ │ ├── QtFramework │ │ ├── RAR/ │ │ │ ├── _RAR.0.sg │ │ │ └── _init │ │ ├── RosASM │ │ ├── SpASM │ │ ├── TASM32 │ │ ├── ZIP/ │ │ │ ├── _ZIP.0.sg │ │ │ └── _init │ │ ├── _db_caching │ │ ├── _debug │ │ ├── _init │ │ ├── _runtime_helpers │ │ ├── archive-file │ │ ├── arj │ │ ├── bytecodeparsers │ │ ├── cab │ │ ├── chunkparsers │ │ ├── duration │ │ ├── language │ │ ├── python │ │ ├── rar-file │ │ ├── read │ │ ├── shell-script │ │ ├── soundchips │ │ ├── vgmcodingutils │ │ ├── wxWidgets │ │ ├── zip-file │ │ └── zlib │ ├── db_custom/ │ │ └── .vscode/ │ │ ├── about.txt │ │ └── settings.json │ ├── db_extra/ │ │ ├── .vscode/ │ │ │ ├── about.txt │ │ │ └── settings.json │ │ ├── COM/ │ │ │ ├── packer_packers.2.sg │ │ │ └── patcher_patchers.1.sg │ │ ├── ELF/ │ │ │ └── protector_ELFCrypt.2.sg │ │ ├── MSDOS/ │ │ │ ├── cryptor_Cryptors.2.sg │ │ │ └── packer_FCP_IV.2.sg │ │ ├── PE/ │ │ │ ├── archive_Resources.6.sg │ │ │ ├── compiler_EP.MSC.4.sg │ │ │ ├── compiler_EP.MSVC.4.sg │ │ │ ├── cryptor_3dcrypter.2.sg │ │ │ ├── cryptor_404crypter.1.sg │ │ │ ├── cryptor_ABC_Cryptor.2.sg │ │ │ ├── cryptor_AR_Crypt_Private.2.sg │ │ │ ├── cryptor_Aase_Crypter.2.sg │ │ │ ├── cryptor_AcidCrypt.2.sg │ │ │ ├── cryptor_AlmafuerteCrypter.1.sg │ │ │ ├── cryptor_Anslym_Crypter.2.sg │ │ │ ├── cryptor_App_Encryptor.2.sg │ │ │ ├── cryptor_BasicCrypt1.1.sg │ │ │ ├── cryptor_BopCrypt.2.sg │ │ │ ├── cryptor_ChainskiCrypter.1.sg │ │ │ ├── cryptor_CodeCrypter.2.sg │ │ │ ├── cryptor_Crypter.2.sg │ │ │ ├── cryptor_Cryptic.2.sg │ │ │ ├── cryptor_DCrypt_Private.2.sg │ │ │ ├── cryptor_DataAnubis.1.sg │ │ │ ├── cryptor_Fly-Crypter.2.sg │ │ │ ├── cryptor_FreeCryptor.2.sg │ │ │ ├── cryptor_INCrypter.2.sg │ │ │ ├── cryptor_Open_Source_Code_Crypter.2.sg │ │ │ ├── cryptor_STUD.2.sg │ │ │ ├── cryptor_SexCrypt.2.sg │ │ │ ├── cryptor_Sexe_Crypter.2.sg │ │ │ ├── cryptor_Simple_UPX_Cryptor.2.sg │ │ │ ├── cryptor_The_Best_Cryptor.2.sg │ │ │ ├── cryptor_ass-crypter.2.sg │ │ │ ├── cryptor_darkeye.1.sg │ │ │ ├── cryptor_njCrypter.2.sg │ │ │ ├── cryptor_unknown_malware_cryptor.2.sg │ │ │ ├── cryptors_1.2.sg │ │ │ ├── cryptors_2.2.sg │ │ │ ├── insatller_Avast_installer.sg │ │ │ ├── installer_Adobe_Flash_Player_installer.1.sg │ │ │ ├── installer_Blizzard_PrePatch.1.sg │ │ │ ├── installer_Box_Stub.1.sg │ │ │ ├── installer_BulletProofSoft_installer.1.sg │ │ │ ├── installer_DockerDesktopInstaller.1.sg │ │ │ ├── installer_Enigma_Installer.1.sg │ │ │ ├── installer_Hamrick_Software_installer.1.sg │ │ │ ├── installer_Kingsoft_Installer.1.sg │ │ │ ├── installer_QT_installer.1.sg │ │ │ ├── installer_SHIROUZU_Hiroaki_installer.1.sg │ │ │ ├── installer_Store_Installer.1.sg │ │ │ ├── installer_TrueCrypt-VeraCrypt_installer.1.sg │ │ │ ├── joiner_Anskya_Binder.2.sg │ │ │ ├── joiner_Blade_Joiner.1.sg │ │ │ ├── joiner_DJoin.1.sg │ │ │ ├── joiner_ExeJoiner.1.sg │ │ │ ├── keygen_keygens.1.sg │ │ │ ├── library_DS.Flexlm.4.sg │ │ │ ├── library_DS.RLM.4.sg │ │ │ ├── packer_BobPack.2.sg │ │ │ ├── packer_Feokt.2.sg │ │ │ ├── packer_IMPostor_Pack.2.sg │ │ │ ├── packer_Native_UD_Packer.2.sg │ │ │ ├── packer_TomatoX.2.sg │ │ │ ├── packer_bbfb.2.sg │ │ │ ├── patcher_Patch.1.sg │ │ │ ├── protection_DS.Key-Lok_II_dongle.5.sg │ │ │ ├── protection_DS.Novex_dongle.4.sg │ │ │ ├── protection_DS.Rockey4_dongle.5.sg │ │ │ ├── protection_DS.Wizzkey_dongle.5.sg │ │ │ ├── protector_ARM_Protector.2.sg │ │ │ ├── protector_ASPR_Stripper.2.sg │ │ │ ├── protector_Adept_Protector.2.sg │ │ │ ├── protector_Alex_Protector.2.sg │ │ │ ├── protector_Alloy.2.sg │ │ │ ├── protector_Apex-c.2.sg │ │ │ ├── protector_BitShape_PE_Crypt.2.sg │ │ │ ├── protector_BlindSpot.2.sg │ │ │ ├── protector_Break_Into_Pattern.2.sg │ │ │ ├── protector_CDS_SS.2.sg │ │ │ ├── protector_CodeSafe.2.sg │ │ │ ├── protector_DEF.2.sg │ │ │ ├── protector_DirTy_CrYpt0r.2.sg │ │ │ ├── protector_EP.2.sg │ │ │ ├── protector_EXECrypt.2.sg │ │ │ ├── protector_EXERefactor.2.sg │ │ │ ├── protector_Embed_PE.2.sg │ │ │ ├── protector_EncryptPE.2.sg │ │ │ ├── protector_ExeSafeguard.2.sg │ │ │ ├── protector_ExeSmasher.2.sg │ │ │ ├── protector_Exe_Locker.2.sg │ │ │ ├── protector_FakeNinja.2.sg │ │ │ ├── protector_FixupPak.2.sg │ │ │ ├── protector_Fuck_n_Joy.2.sg │ │ │ ├── protector_Fusion.2.sg │ │ │ ├── protector_GuardantStealth.2.sg │ │ │ ├── protector_ICrypt.2.sg │ │ │ ├── protector_ID_Application_Protector_NoNamePacker.2.sg │ │ │ ├── protector_KGCrypt.2.sg │ │ │ ├── protector_MZ-Crypt.2.sg │ │ │ ├── protector_Minke.2.sg │ │ │ ├── protector_Morphine.2.sg │ │ │ ├── protector_NecroVM.Virt.2.sg │ │ │ ├── protector_NoodleCrypt.2.sg │ │ │ ├── protector_PE-Admin.2.sg │ │ │ ├── protector_PENightMare.2.sg │ │ │ ├── protector_PE_Quake.2.sg │ │ │ ├── protector_Pe123.2.sg │ │ │ ├── protector_PolyEnE.2.sg │ │ │ ├── protector_PwdProtect.2.sg │ │ │ ├── protector_QQProtect.2.sg │ │ │ ├── protector_Sepanta.2.sg │ │ │ ├── protector_Soft_Defender.2.sg │ │ │ ├── protector_TheHypers.2.sg │ │ │ ├── protector_WinKript.2.sg │ │ │ ├── protector_Wind_of_Crypt.2.sg │ │ │ ├── protector_Xtreme-Protector.2.sg │ │ │ ├── protector_muckis_protector.2.sg │ │ │ ├── sfx_ADS_Self_Extractor.1.sg │ │ │ ├── sfx_CipherWall.1.sg │ │ │ ├── tool_UPX_shit.2.sg │ │ │ ├── tool_UPXcrypter.2.sg │ │ │ └── virus_Win9x_CIH.1.sg │ │ └── about.txt │ └── timestamp.log ├── dbs_min_generate.cmd ├── dbs_min_generate_and_publish.cmd ├── detectiteasy.cmake ├── die_version.txt ├── docker/ │ └── diec.sh ├── docs/ │ ├── BUILD.md │ └── RUN.md ├── help/ │ ├── APK.md │ ├── Archive.md │ ├── Binary.js │ ├── Binary.md │ ├── COM.md │ ├── DEX.md │ ├── ELF.js │ ├── ELF.md │ ├── Global.js │ ├── Global.md │ ├── ISO9660.md │ ├── JAR.md │ ├── LE.md │ ├── LX.md │ ├── MACH.js │ ├── MACH.md │ ├── MSDOS.js │ ├── MSDOS.md │ ├── NE.md │ ├── PE.js │ ├── PE.md │ ├── PYC.md │ ├── Signatures.md │ ├── Util.md │ └── ZIP.md ├── peid_rules/ │ └── PE/ │ ├── compiler.userdb.txt │ ├── file_format.userdb.txt │ ├── installer.userdb.txt │ ├── joiner.userdb.txt │ ├── overlay.userdb.txt │ ├── packer.userdb.txt │ ├── protection.userdb.txt │ ├── protector.userdb.txt │ ├── sfx_archive.userdb.txt │ ├── split_userdb.ps1 │ └── userdb.txt ├── todo.txt ├── update.json └── yara_rules/ ├── DiE_BasicHeuristics_by_DosX.yar ├── DiE_InterestingThings_by_DosX.yar ├── crypto_signature.yar ├── malware_analisys.yar ├── packer.yar ├── packer_compiler_signatures.yar └── peid.yar ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ *.sg linguist-language=js ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms github: horsicq ================================================ FILE: .github/workflows/create_beta.yml ================================================ name: Build Beta on: # Triggers the workflow on push or pull request events but only for the "main" branch push: branches: [ "master" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # the jobs are based on these notes: # https://github.com/horsicq/Detect-It-Easy/blob/master/docs/BUILD.md jobs: build-ubuntu-24: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 # Clone Detect-It-Easy repository - name: Clone Detect-It-Easy run: | git clone --recursive https://github.com/horsicq/DIE-engine die_source - name: Install dependencies run: | sudo apt-get update sudo apt-get install qtbase5-dev qtscript5-dev qttools5-dev-tools libqt5svg5-dev qtchooser qt5-qmake build-essential -y - name: Build run: | cd die_source bash -x build_dpkg.sh - name: Upload Release as Download uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} with: tag_name: Beta release_name: Beta draft: false prerelease: true files: | ${{ github.workspace }}/die_source/release/*.deb ================================================ FILE: .github/workflows/format-js.yml ================================================ name: Format JavaScript Files on: push: paths: - 'db/**' - 'db_custom/**' - 'db_extra/**' branches: - master # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: format: runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v4 with: token: ${{ secrets. RELEASE_TOKEN }} - name: Configure git to preserve line endings run: | git config --local core.autocrlf false git config --local core.eol lf - name: Format JavaScript files in db directories run: | find db db_custom db_extra -type f \ ! -path '*/.vscode/*' \ ! -path '*/_icons/*' \ ! -name '*.txt' \ ! -name '*.md' \ ! -name '*.png' \ ! -name '*.ico' \ ! -name '*.svg' \ -print0 2>/dev/null | while IFS= read -r -d '' file; do # Skip files with beautify ignore comment (with or without spaces) if grep -qE 'beautify ignore:\s*start' "$file" 2>/dev/null; then echo "Skipping (beautify ignore): $file" continue fi # Check if file contains JavaScript-like syntax if head -c 1000 "$file" 2>/dev/null | grep -qE '(function|var |if\s*\(|for\s*\(|return |includeScript)'; then echo "Formatting: $file" # Save original file for comparison cp "$file" "$file.orig" # Remove trailing whitespace only (preserve everything else) perl -pi -e 's/[ \t]+$//' "$file" # Convert tabs to 4 spaces perl -pi -e 's/\t/ /g' "$file" # If file is unchanged, restore original to avoid any byte differences if cmp -s "$file" "$file.orig"; then mv "$file.orig" "$file" else rm "$file.orig" fi fi done - name: Check for changes id: check_changes run: | if git diff --quiet; then echo "has_changes=false" >> $GITHUB_OUTPUT else echo "has_changes=true" >> $GITHUB_OUTPUT fi - name: Commit and push changes if: steps.check_changes.outputs.has_changes == 'true' run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" git add -A git commit -m "style: auto-format JavaScript files in db directories" git push ================================================ FILE: .github/workflows/update_db.yml ================================================ # This is a basic workflow to help you get started with Actions name: CI # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the "main" branch push: branches: ["master"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.13" # Set git to use CRLF line endings - name: Configure git CRLF run: | git config --global core.autocrlf true # Clone Detect-It-Easy repository - name: Clone Detect-It-Easy run: | git clone https://github.com/horsicq/Detect-It-Easy DIE # Create zip archives - name: Create zip archives run: | cd DIE zip -r ../db.zip db zip -r ../db_extra.zip db_extra cd .. ls -la *.zip # Verify the zip files were created # Calculate MD5 checksums - name: Calculate MD5 checksums id: md5 run: | DB_MD5=$(md5sum db.zip | awk '{print $1}') DB_EXTRA_MD5=$(md5sum db_extra.zip | awk '{print $1}') echo "DB_MD5=$DB_MD5" >> $GITHUB_OUTPUT echo "DB_EXTRA_MD5=$DB_EXTRA_MD5" >> $GITHUB_OUTPUT echo "$DB_MD5" >> db.zip.md5 echo "$DB_EXTRA_MD5" >> db_extra.zip.md5 - name: Generate DB Stats run: | cd DIE cd autotools/dbupdater python --version python task.py '../../db' > '../../../db_stat.txt' python task.py '../../db_extra' > '../../../db_extra_stat.txt' # Get the current date for the update message - name: Get current date id: date run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT # Read database stats - name: Read database stats id: dbstats run: | DB_STATS=$(cat db_stat.txt) DB_EXTRA_STATS=$(cat db_extra_stat.txt) echo "DB_STATS<> $GITHUB_OUTPUT echo "$DB_STATS" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT echo "DB_EXTRA_STATS<> $GITHUB_OUTPUT echo "$DB_EXTRA_STATS" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT # Update the "Current database" pre-release - name: Update Database Release uses: softprops/action-gh-release@v1 with: files: | db.zip db.zip.md5 db_extra.zip db_extra.zip.md5 name: "Current database" tag_name: current-database body: | - db.zip: `${{ steps.md5.outputs.DB_MD5 }}` - db_extra.zip: `${{ steps.md5.outputs.DB_EXTRA_MD5 }}` Last updated: ${{ steps.date.outputs.DATE }} This pre-release contains the latest database files from Detect-It-Easy: - db.zip: Contains main database files ${{ steps.dbstats.outputs.DB_STATS }} - db_extra.zip: Contains extra database files ${{ steps.dbstats.outputs.DB_EXTRA_STATS }} draft: false prerelease: true env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} ================================================ FILE: .gitignore ================================================ DIE-engine .idea .compiler_cache ================================================ FILE: .prettierrc ================================================ { "tabWidth": 4, "useTabs": false, "semi": true, "singleQuote": false, "printWidth": 80, "trailingComma": "es5", "bracketSpacing": true, "arrowParens": "always", "endOfLine": "auto" } ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing to Detect-It-Easy Welcome in contributing to Detect-It-Easy! ## Ask Questions Curiosity is key to driving the project forward. If you have questions or ideas for improvement, don't hesitate to reach out. You can start a discussion by [opening a new issue](https://github.com/horsicq/Detect-It-Easy/issues/new). ## How to Report Issues To report bugs and errors, please [open a new issue](https://github.com/horsicq/Detect-It-Easy/issues/new) on GitHub. Include detailed steps to reproduce the bug, along with any relevant stack traces, error messages, or affected files. ## Feature Requests If you have ideas for new features or enhancements, feel free to [open a new issue](https://github.com/horsicq/Detect-It-Easy/issues/new) to discuss them. Your input is valuable in shaping the future of the project. ## Coding Standards and Formatting Rules To maintain code quality and consistency across the project, please adhere to the following guidelines when contributing code: - **Language and Style**: The project primarily uses DiE-JS. Follow the existing code style. - **Formatting**: Use consistent indentation (4 spaces, no tabs). - **Commits**: Write descriptive commit messages. Use the imperative mood (e.g., "Fix bug in file parser" instead of "Fixed bug"). - **Testing**: Include unit tests for new features or bug fixes where applicable. Ensure they are compilable! ## Guidelines for Translations or Code Contributions We welcome contributions to translations and code to make Detect-It-Easy accessible to a global audience: - **Translations**: If you'd like to add or update translations, fork the XTranslation repository and work on the relevant language files (typically in the `dicts/` directory). Ensure translations are accurate and culturally appropriate. Test them in the application to verify context. Use poedit for translating languages! - **Process**: Submit changes via a pull request (see below). - **Quality**: Proofread your contributions for grammar and clarity. Maintain consistency with the existing tone and style. ## How to Submit Pull Requests 1. Fork the repository on GitHub. 2. Create a new branch for your changes (e.g., `feature/new-detection-rule` or `fix/bug-123`). 3. Make your changes, ensuring they follow the coding standards and guidelines above. 4. Test your changes thoroughly. 5. Commit your changes with a clear, descriptive message. 6. Push your branch to your fork and [open a pull request](https://github.com/horsicq/Detect-It-Easy/compare) against the main branch. 7. In the pull request description, explain what changes you made and why. Reference any related issues. 8. Be responsive to feedback from maintainers and make requested revisions. Pull requests will be reviewed, and once approved, merged into the project. Thank you for helping improve Detect-It-Easy! ================================================ FILE: Dockerfile ================================================ FROM ubuntu:24.04 # Newest version of DIE, check https://github.com/horsicq/DIE-engine/releases . ARG DIE_VERSION=3.20 RUN apt update -qq && apt upgrade -y && apt install -y wget && \ wget https://github.com/horsicq/DIE-engine/releases/download/Beta/die_${DIE_VERSION}_Ubuntu_24.04_amd64.deb && \ apt install -y ./die_${DIE_VERSION}_Ubuntu_24.04_amd64.deb && \ rm die_${DIE_VERSION}_Ubuntu_24.04_amd64.deb && rm -rf /usr/lib/die/db # db update COPY ./db /usr/lib/die/db ENTRYPOINT ["/usr/bin/diec"] ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2012-2026 hors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ ![](docs/logo_text.png) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NF3FBD3KHMXDN) [![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/horsicq/DIE-engine.svg)](http://ntinfo.biz) [![GitHub All Releases](https://img.shields.io/github/downloads/horsicq/DIE-engine/total.svg)](http://ntinfo.biz) [![gitlocalized](https://gitlocalize.com/repo/4736/whole_project/badge.svg)](https://github.com/horsicq/XTranslation) **Detect It Easy (DiE)** is a powerful tool for file type identification, popular among **malware analysts**, **cybersecurity experts**, and **reverse engineers** worldwide. Supporting both **signature-based** and **heuristic analysis**, DiE enables efficient file inspections across a broad range of platforms, including **Windows, Linux, and MacOS**. Its adaptable, script-driven detection architecture makes it one of the most versatile tools in the field, with a comprehensive list of supported OS images. ## 🚀 Getting Started - **[💎 Download release/beta](https://github.com/horsicq/DIE-engine/releases)** - **[🚀 DIE API Library (for Developers)](https://github.com/horsicq/die_library)** - [📋 Changelog](https://github.com/horsicq/Detect-It-Easy/blob/master/changelog.txt) - [💬 Contribute to Translations](https://github.com/horsicq/XTranslation) ![Screenshot](docs/1.png) ## 💡 Why Use Detect It Easy? Detect It Easy’s **flexible signature system** and **scripting capabilities** make it an essential tool for **malware analysis** and **digital forensics**. With traditional static analyzers often limited in scope and prone to false positives, DiE’s customizable design enables precise integration of new detection logic, ensuring reliable results across diverse file types. ![Screenshot](docs/2.png) ### Key Advantages: - **Flexible Signature Management**: Easily create, modify, and optimize signatures. - **Cross-Platform Support**: Runs on Windows, Linux, and MacOS. - **Minimal False Positives**: Combined signature and heuristic analysis ensures high detection accuracy. ## 📄 Supported File Types Detect It Easy supports a wide range of executable and archive types, including: - **PE** (Portable Executable format for Windows) - **ELF** (Executable and Linkable Format for Linux) - **APK** (Android Application Package) - **IPA** (iOS Application Package) - **JAR** (Java Archive) - **ZIP** (Compressed archives) - **ISO9660** (Optical media format) - **DEX** (Dalvik Executable for Android) - **MS-DOS** (MS-DOS executable files) - **COM** (Simple executable format for DOS) - **LE/LX** (Linear Executable for OS/2) - **MACH** (Mach-O files for MacOS) - **NPM** (JavaScript packages) - **Amiga** (Executable format for Amiga computers) - **Binary** (Other unclassified files) And that's not all... The list is expanding as the tool is updated Unknown formats undergo heuristic analysis, providing identification for both known and unrecognized files. ## 🔑 Key Features - **Flexible Signature Management**: Define or modify detection signatures. - **Scripted Detection**: Use a JavaScript-like scripting language (DiE-JS runtime) for custom detection algorithms. - **Cross-Platform Compatibility**: Available for Windows, Linux, and MacOS. - **Reduced False Positives**: Combines signature and heuristic scanning for accuracy. ## 📥 Installation ### 📦 Install via Package Managers - **Windows**: - [Chocolatey](https://community.chocolatey.org/packages/die) - [Microsoft Store](https://apps.microsoft.com/detail/9nq58d7ghb2x) - **Linux**: - **Parrot OS**: Package name `detect-it-easy` - **Arch Linux**: AUR package [detect-it-easy-git](https://aur.archlinux.org/packages/detect-it-easy-git/) - **openSUSE**: [OBS](https://build.opensuse.org/package/show/home:mnhauke/detect-it-easy) - **REMnux**: Malware analysis distribution [![Packaging status](https://repology.org/badge/vertical-allrepos/detect-it-easy.svg)](https://repology.org/project/detect-it-easy/versions) > [!NOTE] > Use **Detect It Easy** bot via **Telegram** to quickly check files: [**@detectiteasy_bot**](https://t.me/detectiteasy_bot) ### ⚙️ Build from Source See the [BUILD.md](docs/BUILD.md) for detailed instructions. ### 🐳 Docker Installation Run DiE in a Docker container: ```bash git clone --recursive https://github.com/horsicq/Detect-It-Easy cd Detect-It-Easy/ docker build . -t horsicq:diec ``` ## 🖥️ Usage Detect It Easy offers three versions: - **die** - Graphical interface. - **diec** - Command-line version for batch processing. - **diel** - Lightweight GUI version. (scanner only) For detailed usage, refer to the [RUN.md](docs/RUN.md). ### 🔎 Example Use Cases - 🦠 **Malware Analysis**: Identify file types, packers, or protections. - 🛡 **Security Audits**: Determine executable file types and potential security risks. - 🔎 **Software Forensics**: Inspect software components and validate compliance. ## 💬 Community 👋 **Hello! / Привет!** Welcome to the Detect It Easy community! Have questions, ideas, or just want to chat? Here's where to find us: - **Telegram Bot**: Send a file or just say hello to [**@detectiteasy_bot**](https://t.me/detectiteasy_bot) - **GitHub Discussions**: Start a conversation in [Discussions](https://github.com/horsicq/Detect-It-Easy/discussions) - **GitHub Issues**: Report bugs or request features via [Issues](https://github.com/horsicq/Detect-It-Easy/issues) ## 🏆 Special thanks - ⭐️ **Thanks to [DosX](https://github.com/DosX-dev)** - ⭐️ Thanks to [PELock](https://www.pelock.com) ## 🤝 Thanks to all contributors --- ![Mascot](docs/logo2.png) ================================================ FILE: autotools/dbcompiler/package.json ================================================ { "name": "dbcompiler", "version": "1.0.0", "main": "task.js", "author": "DosX", "dependencies": { "uglify-js": "^3.19.3" } } ================================================ FILE: autotools/dbcompiler/task.js ================================================ const fs = require("fs"); const path = require("path"); const { Worker } = require("worker_threads"); const zlib = require('zlib'); const inputDirs = ["db", "db_custom", "db_extra"]; const outputDir = "dbs_min"; const CACHE_FILE = path.join(outputDir, '.compiler_cache'); const MAX_PARALLEL = 16; const stats = { total: 0, minified: 0, copied: 0, failed: 0, skipped: 0, deleted: 0, }; const failedFiles = []; const copiedFiles = []; // --- Cache helpers (ADLER32 + CRC32 key) function adler32(str) { let a = 1, b = 0; for (let i = 0; i < str.length; i++) { a = (a + str.charCodeAt(i)) % 65521; b = (b + a) % 65521; } return (b << 16) | a; } function makeCrc32Table() { const table = new Uint32Array(256); for (let i = 0; i < 256; i++) { let c = i; for (let k = 0; k < 8; k++) { c = (c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1); } table[i] = c >>> 0; } return table; } const CRC32_TABLE = makeCrc32Table(); function crc32(str) { let crc = 0xFFFFFFFF; for (let i = 0; i < str.length; i++) { const code = str.charCodeAt(i); crc = (crc >>> 8) ^ CRC32_TABLE[(crc ^ code) & 0xFF]; } return (crc ^ 0xFFFFFFFF) >>> 0; } function computeKeyForPath(p) { // Use normalized relative path to project root const rel = path.normalize(path.relative(process.cwd(), p)).replace(/\\/g, '/'); // Combine into 64-bit-like hex const big = (BigInt(adler32(rel) >>> 0) << 32n) | BigInt(crc32(rel) >>> 0); return big.toString(16); } function loadCache() { const map = new Map(); try { if (!fs.existsSync(CACHE_FILE)) return map; // Read as buffer and try to decompress (Brotli). Fallback to plain text. let txt = null; try { const buf = fs.readFileSync(CACHE_FILE); const decompressed = zlib.brotliDecompressSync(buf); txt = decompressed.toString('utf8'); } catch (e) { // fallback: try read as utf8 plain text try { txt = fs.readFileSync(CACHE_FILE, 'utf8'); } catch (e2) { txt = null; } } if (!txt) return map; const parts = txt.split(';'); for (const p of parts) { if (!p) continue; const kv = p.split('='); if (kv.length !== 2) continue; // Decode hex to number try { const val = parseInt(kv[1], 16); if (!isNaN(val)) { map.set(kv[0], val); } } catch (e) { // skip invalid entry } } } catch (e) { // ignore parsing errors } return map; } function saveCache(map) { try { fs.mkdirSync(outputDir, { recursive: true }); // Sort keys for better compression const sorted = Array.from(map.entries()).sort((a, b) => a[0].localeCompare(b[0])); const parts = []; for (const [k, v] of sorted) { parts.push(`${k}=${v.toString(16)}`); } const txt = parts.join(';'); // Brotli with maximum compression quality const buf = zlib.brotliCompressSync(Buffer.from(txt, 'utf8'), { params: { [zlib.constants.BROTLI_PARAM_QUALITY]: zlib.constants.BROTLI_MAX_QUALITY, [zlib.constants.BROTLI_PARAM_MODE]: zlib.constants.BROTLI_MODE_TEXT } }); fs.writeFileSync(CACHE_FILE, buf); } catch (e) { console.warn('[CACHE WRITE FAILED] ' + e.message); } } function processFile(srcFile, dstFile) { return new Promise((resolve) => { const worker = new Worker(path.join(__dirname, 'worker.js'), { workerData: { srcFile, dstFile }, resourceLimits: { maxOldGenerationSizeMb: 2048, maxYoungGenerationSizeMb: 512 } }); worker.on('message', (result) => { stats.total++; if (result.type === 'minified') { stats.minified++; console.log("[MINIFIED] " + result.srcFile); } else if (result.type === 'skipped') { stats.minified++; stats.skipped++; console.log("[SKIP] " + result.srcFile); } else if (result.type === 'copied') { stats.copied++; copiedFiles.push(result.srcFile); console.log("[COPIED] " + result.srcFile); } else if (result.type === 'copied-skip') { stats.copied++; stats.skipped++; console.log("[SKIP] " + result.srcFile); } else if (result.type === 'failed') { stats.failed++; failedFiles.push({ file: result.srcFile, reason: result.error }); console.warn("[FAILED] " + result.srcFile + " — " + result.error); } else if (result.type === 'failed-skip') { stats.failed++; stats.skipped++; console.log("[SKIP/FAIL] " + result.srcFile); } else { stats.failed++; failedFiles.push({ file: result.srcFile, reason: "Read error: " + result.error }); console.warn("[ERROR/READ] " + result.srcFile + " — " + result.error); } resolve(); }); worker.on('error', (err) => { stats.failed++; failedFiles.push({ file: srcFile, reason: err.message }); console.warn("[ERROR] " + srcFile + " — " + err.message); resolve(); }); worker.on('exit', (code) => { if (code !== 0) { stats.failed++; failedFiles.push({ file: srcFile, reason: `Worker stopped with exit code ${code}` }); console.warn("[ERROR] " + srcFile + " — Worker stopped with exit code " + code); resolve(); } }); }); } // Process files in parallel with concurrency limit async function processFilesInParallel(files) { let currentIndex = 0; const workers = []; for (let i = 0; i < MAX_PARALLEL; i++) { workers.push( (async () => { while (currentIndex < files.length) { const index = currentIndex++; if (index < files.length) { const fileTask = files[index]; await processFile(fileTask.src, fileTask.dst); } } })() ); } await Promise.all(workers); } function collectFiles(srcDir, relBase, dstBase, fileList = []) { const items = fs.readdirSync(srcDir); for (const item of items) { const srcPath = path.join(srcDir, item), stat = fs.statSync(srcPath); if (stat.isDirectory()) { collectFiles(srcPath, relBase, dstBase, fileList); } else { fileList.push({ src: srcPath, dst: path.join(dstBase, path.relative(relBase, srcPath)) }); } } return fileList; } function getAllFilesInDir(dir, fileList = []) { if (!fs.existsSync(dir)) return fileList; const items = fs.readdirSync(dir); for (const item of items) { const fullPath = path.join(dir, item), stat = fs.statSync(fullPath); if (stat.isDirectory()) { getAllFilesInDir(fullPath, fileList); } else { fileList.push(fullPath); } } return fileList; } function syncDeleteOldFiles(expectedFiles) { const expectedSet = new Set(expectedFiles.map(f => path.normalize(f.dst))), existingFiles = getAllFilesInDir(outputDir); let deletedCount = 0; for (const existingFile of existingFiles) { const normalized = path.normalize(existingFile); // Skip cache file itself if (normalized === path.normalize(CACHE_FILE)) { continue; } if (!expectedSet.has(normalized)) { try { fs.unlinkSync(existingFile); console.log("[DELETED] " + path.relative(process.cwd(), existingFile)); deletedCount++; } catch (e) { console.warn("[DELETE FAILED] " + existingFile + " — " + e.message); } } } deleteEmptyDirs(outputDir); return deletedCount; } function deleteEmptyDirs(dir) { if (!fs.existsSync(dir)) return; const items = fs.readdirSync(dir); for (const item of items) { const fullPath = path.join(dir, item); if (fs.statSync(fullPath).isDirectory()) { deleteEmptyDirs(fullPath); } } if (fs.readdirSync(dir).length === 0 && dir !== outputDir) { fs.rmdirSync(dir); } } (async () => { console.log(`[i] Processing with ${MAX_PARALLEL} parallel workers...\n`); const allFiles = []; for (const dir of inputDirs) { if (fs.existsSync(dir)) { const dstSubdir = path.join(outputDir, path.basename(dir)); collectFiles(dir, dir, dstSubdir, allFiles); } else { console.warn("[SKIP] Dir not found: " + dir); } } console.log(`[i] Found ${allFiles.length} files to process\n`); // Delete obsolete files FIRST (before any other output) stats.deleted = syncDeleteOldFiles(allFiles); if (stats.deleted > 0) { console.log(`[i] Deleted ${stats.deleted} obsolete files\n`); } // Load cache and filter files unchanged by mtime const cache = loadCache(), newCache = new Map(), toProcess = []; for (const f of allFiles) { try { const st = fs.statSync(f.src); const mtime = Math.floor(st.mtimeMs); const key = computeKeyForPath(f.src); // Always update cache with current mtime newCache.set(key, mtime); // Check if file unchanged if (cache.has(key) && cache.get(key) === mtime) { stats.skipped++; console.log("[SKIP] " + f.src); continue; } } catch (e) { // couldn't stat - process to be safe } toProcess.push(f); } if (stats.skipped > 0) { console.log(`\n[i] Skipped ${stats.skipped} unchanged files (cache)`); } await processFilesInParallel(toProcess); // Update cache with current mtime values saveCache(newCache); let report = "\n[V] Done!\n" + `— Total: ${stats.total}\n` + `— Minified: ${stats.minified}\n` + `— Copied: ${stats.copied}\n` + `— Failed: ${stats.failed}\n` + `— Skipped: ${stats.skipped}\n` + `— Deleted: ${stats.deleted}\n`; if (copiedFiles.length > 0) { report += "\n[I] Copied (unsupported extension):\n" + copiedFiles.map((f) => " • " + f).join("\n") + "\n"; } if (failedFiles.length > 0) { report += "\n[X] Failed to minify:\n" + failedFiles.map((f) => ` • ${f.file} — ${f.reason}`).join("\n") + "\n"; } console.log(report); })(); ================================================ FILE: autotools/dbcompiler/worker.js ================================================ const { parentPort, workerData } = require("worker_threads"); const fs = require("fs"); const path = require("path"); const UglifyJS = require("uglify-js"); function writeIfChanged(filePath, newContent) { if (fs.existsSync(filePath)) { try { const existingContent = fs.readFileSync(filePath, "utf8"); if (existingContent === newContent) { return false; } } catch (e) { } } fs.writeFileSync(filePath, newContent, "utf8"); return true; } function shouldMinify(filePath) { const ext = path.extname(filePath).toLowerCase(); return ext === ".sg" || ext === ""; } /** * Universal safe JavaScript parser * Skips strings, regular expressions and comments * @param {string} text - input JS code * @param {function} replacer - Callback: (codeFragment, position, fullText) => {replacement, offset} | null * @returns {string} - processed code */ function parseJSCodeSafe(text, replacer) { let result = ''; let i = 0; while (i < text.length) { const char = text[i]; // Comments if (char === '/') { // Single-line comment: // if (i + 1 < text.length && text[i + 1] === '/') { result += '//'; i += 2; while (i < text.length && text[i] !== '\n' && text[i] !== '\r') { result += text[i++]; } // Include newline characters while (i < text.length && (text[i] === '\r' || text[i] === '\n')) { result += text[i++]; } continue; } // Multi-line comment: /* */ if (i + 1 < text.length && text[i + 1] === '*') { result += '/*'; i += 2; while (i < text.length) { if (text[i] === '*' && i + 1 < text.length && text[i + 1] === '/') { result += '*/'; i += 2; break; } result += text[i++]; } continue; } } // Strings if (char === '"' || char === "'" || char === '`') { const quote = char; result += char; i++; while (i < text.length) { const c = text[i]; result += c; i++; if (c === '\\' && i < text.length) { // Escaped character result += text[i++]; } else if (c === quote) { // Closing quote break; } } continue; } // Regular expressions if (char === '/') { // Heuristic: check context before '/' const before = text.substring(Math.max(0, i - 30), i).trim(); const isLikelyRegex = /[\(=,;:!&|?{}\[\]]\s*$/.test(before) || /^(return|throw|=>)\s*$/.test(before) || before === ''; if (isLikelyRegex) { result += char; i++; while (i < text.length) { const c = text[i]; result += c; i++; if (c === '\\' && i < text.length) { // Escaped character in regex result += text[i++]; } else if (c === '/') { // Closing '/', read flags while (i < text.length && /[gimsuvy]/.test(text[i])) { result += text[i++]; } break; } } continue; } } // Regular code const remaining = text.substring(i); const replaceResult = replacer(remaining, i, text); if (replaceResult && replaceResult.replacement !== null && replaceResult.offset > 0) { result += replaceResult.replacement; i += replaceResult.offset; } else { result += char; i++; } } return result; } /** * Replace `let` with `var` */ function replaceLetWithVarSafe(text) { return parseJSCodeSafe(text, (fragment) => { // Check if fragment starts with a valid identifier character if (!/^[a-zA-Z_$]/.test(fragment)) { return null; } // Read complete identifier let word = ''; let offset = 0; while (offset < fragment.length && /[a-zA-Z0-9_$]/.test(fragment[offset])) { word += fragment[offset++]; } // Replace only 'let'; return other identifiers unchanged if (word === 'let') { return { replacement: 'var', offset }; } else { return { replacement: word, offset }; } }); } /** * Replace arrow functions with traditional functions * Direct regex replacement after minification */ function replaceArrowFunctions(text) { // Simple direct replacement without complex parsing // UglifyJS output doesn't have regex/string issues with arrow functions // 1. ()=>{...} -> function(){...} text = text.replace(/\(\)\s*=>\s*\{/g, 'function(){'); // 2. (args)=>{...} -> function(args){...} // Match balanced parentheses text = text.replace(/\(([^()]*)\)\s*=>\s*\{/g, 'function($1){'); // 3. Single arg with block: arg=>{...} -> function(arg){...} text = text.replace(/\b([a-zA-Z_$][\w$]*)\s*=>\s*\{/g, 'function($1){'); // 4. Concise forms (no braces) - need to find expression end // ()=>expr -> function(){return expr} // This is complex, skip for now as UglifyJS typically uses braces return text; } function fixDeleteStatements(text) { return parseJSCodeSafe(text, (fragment) => { const match = fragment.match(/^delete\s+([a-zA-Z_$][\w$]*)(\s*;?)/); if (!match) { return null; } const varName = match[1]; const trailing = match[2]; // Check that this is not delete obj.prop or delete arr[0] const afterMatch = fragment.substring(match[0].length); if (afterMatch.length > 0 && /^[.\[]/.test(afterMatch)) { // This is a property delete, leave unchanged return { replacement: match[0], offset: match[0].length }; } // Replace delete varName with varName=undefined return { replacement: varName + '=undefined' + trailing, offset: match[0].length }; }); } /** * Safely replaces the value of bDetected variable by toggling its boolean state. * * @param {string} text - The JavaScript code text to parse and process * @returns {string} The text with bDetected values toggled (0 becomes 1, 1 becomes 0) * * @description * Parses the provided text using parseJSCodeSafe and searches for patterns matching * "bDetected = !0" or "bDetected = !1". When found, toggles the numeric value and * returns the modified text with the replacement applied. * * @example * replaceBDetectedSafe('bDetected = !0'); // Returns: 'bDetected=1' * replaceBDetectedSafe('bDetected = !1'); // Returns: 'bDetected=0' */ function replaceBDetectedSafe(text) { return parseJSCodeSafe(text, (fragment) => { const match = fragment.match(/^bDetected\s*=\s*!\s*([01])/); if (match) { const newValue = match[1] === '0' ? '1' : '0'; return { replacement: 'bDetected=' + newValue, offset: match[0].length }; } return null; }); } /** * Replaces common constructor calls with their simplified equivalents in JavaScript code. * * Safely transforms: * - `String()` → `""` * - `Boolean()` → `!1` * - `Number()` → `0` * * Only replaces constructors that are not preceded by a dot (.) or identifier character, * ensuring that property accesses and method calls are not affected. * * @param {string} text - The JavaScript code text to process * @returns {string} The text with constructor calls replaced by their simplified forms */ function replaceConstructorsSafe(text) { return parseJSCodeSafe(text, (fragment, index, fullText) => { // Check context: there should be no dot or identifier character before const charBefore = index > 0 ? fullText[index - 1] : ''; if (charBefore === '.' || /[a-zA-Z0-9_$]/.test(charBefore)) { return null; } let match; // String() -> "" match = fragment.match(/^String\s*\(\s*\)/); if (match) { return { replacement: '""', offset: match[0].length }; } // Boolean() -> !1 match = fragment.match(/^Boolean\s*\(\s*\)/); if (match) { return { replacement: '!1', offset: match[0].length }; } // Number() -> 0 match = fragment.match(/^Number\s*\(\s*\)/); if (match) { return { replacement: '0', offset: match[0].length }; } return null; }); } // Main const { srcFile, dstFile } = workerData; let result = { success: false, srcFile: srcFile, type: 'unknown', error: null }; try { const text = fs.readFileSync(srcFile, "utf8"); if (shouldMinify(srcFile)) { try { // Step 1: fix delete statements BEFORE minification const fixedText = fixDeleteStatements(text); // Step 2: Minification const uglifyResult = UglifyJS.minify(fixedText, { compress: true, mangle: true, parse: { bare_returns: true, }, output: { beautify: false, comments: false, semicolons: false, }, }); if (uglifyResult.error) throw uglifyResult.error; // Step 3: Post-processing for legacy compatibility const legacyCompatibleCode = replaceConstructorsSafe( replaceBDetectedSafe( replaceArrowFunctions( replaceLetWithVarSafe(uglifyResult.code.trim()) ) ) ); fs.mkdirSync(path.dirname(dstFile), { recursive: true }); const wasWritten = writeIfChanged(dstFile, legacyCompatibleCode); result.success = true; result.type = wasWritten ? 'minified' : 'skipped'; } catch (e) { fs.mkdirSync(path.dirname(dstFile), { recursive: true }); const wasWritten = writeIfChanged(dstFile, text); result.success = false; result.type = wasWritten ? 'failed' : 'failed-skip'; result.error = e.message; } } else { fs.mkdirSync(path.dirname(dstFile), { recursive: true }); const wasWritten = writeIfChanged(dstFile, text); result.success = true; result.type = wasWritten ? 'copied' : 'copied-skip'; } } catch (e) { result.success = false; result.type = 'error'; result.error = e.message; } parentPort.postMessage(result); ================================================ FILE: autotools/dbupdater/task.py ================================================ import os import sys def count_signatures(base_path='../db'): # Verify base path exists if not os.path.exists(base_path): print(f"Error: Base path '{base_path}' does not exist.") return # Dictionary to hold subfolder and signature count signature_count = {} # Walk through each directory and count .sg files for root, dirs, files in os.walk(base_path): # Get relative subfolder path relative_path = os.path.relpath(root, base_path) # Skip the root path itself if relative_path == "." or ".vscode" in relative_path: continue # Count .sg files in the current directory count = sum(1 for file in files if file.endswith('.sg')) signature_count[relative_path] = count # Generate Markdown table for subfolder, count in signature_count.items(): print(f"{subfolder} : {count}") if __name__ == "__main__": # Get base path from command-line argument or use default base_path = sys.argv[1] if len(sys.argv) > 1 else '../db' count_signatures(base_path) ================================================ FILE: autotools/partner/CONFIG ================================================ COMPILED_MAIN=/dbs_min/db COMPILED_EXTRA=/dbs_min/db_extra ================================================ FILE: changelog.txt ================================================ 3.11 ----------------------------------------------------------------------- [+] Build instructions for openSuse, Fedora, Arch Linux, WSL [+] Microsoft Store port [+] Downloads/tray monitoring, system env. variable [+] Configurable BufferSize [+] Improved Heuristic module for PE by DosX_dev [+] New detects and optimization of all scripts (thanks to DosX_dev, hypn0, Kae, BJNFNE and all contributors) [+] New scanning method: PEiD [+] Some GUI changes [+] Many bugs have been fixed ####################################################################### 3.10 ----------------------------------------------------------------------- [+] Bundle for Ubuntu 24.04 and 24.10 [+] APK/DEX/NPM/Amiga support [+] Improved "Visualization" widget [+] Improved Heuristic module for PE (thanks to DosX_dev) [+] New "extra" database for not basic detections [+] New detects and optimization of all scripts (thanks to DosX_dev, hypn0, Kae and all contributors) [+] Some GUI changes [+] Many bugs have been fixed ####################################################################### 3.09 ----------------------------------------------------------------------- [+] Bundle for Ubuntu 23.10 [+] Bundle for Kali Linux [+] Bundle for Parrot Linux [+] Yara widget [+] New Heuristic module (thanks DosX_dev) [+] New detects [+] New translations [+] Many bugs have been fixed ####################################################################### 3.08 ----------------------------------------------------------------------- [+] Bundle for Ubuntu 23.04 [+] Visualization [+] New widgets [+] New detects [+] New translations [+] Many bugs have been fixed ####################################################################### 3.07 ----------------------------------------------------------------------- [+] Bundle for Ubuntu 22.10 [+] New style [+] New widgets [+] New detects [+] New translations [+] Many bugs have been fixed ####################################################################### 3.06 ----------------------------------------------------------------------- [+] Bundle for Arch Linux [+] VirusTotal analysis [+] New widgets [+] New detects [+] New translations [+] Many bugs have been fixed ####################################################################### 3.05 ----------------------------------------------------------------------- [+] Bundle for Ubuntu 22.04 [+] Bundle for Apple M1 processor [+] MACHOFAT support [+] Colored output for console [+] New detects [+] New translations [+] Many bugs have been fixed ####################################################################### 3.04 ----------------------------------------------------------------------- [+] Source code Qt6 compatibility [+] Signed zip bundle for macOS [+] Signed pkg installer for macOS [+] New file info module [+] New console features [+] New detects [+] New "All types" mode [+] Recursive scan [+] Tree view for DiE engine [+] Qwt 6.2.0 [+] New translations [+] Many bugs have been fixed ####################################################################### 3.03 ----------------------------------------------------------------------- [+] New detects [+] Lite version [+] Folders scan [+] Console version can export CSV and TSV [+] CMAKE build system [+] New translations [+] Many bugs have been fixed ####################################################################### 3.02 ----------------------------------------------------------------------- [+] Crypto signatures [+] New MachO widget [+] Qwt 6.1.6 [+] Linux AppImage [+] Autotools build system [+] Many bugs have been fixed ####################################################################### 3.01 ----------------------------------------------------------------------- [+] Qt 5.15.2 [+] x64 version for Windows [+] New HEX editor [+] New Disassembler(x86,ARM,MIPS,PPC,M68K) [+] MIME detection [+] APK/DEX detection [+] New translations (Italian, Turkish, Korean, Spanish, French, Portuguese) [+] Many bugs have been fixed ####################################################################### 3.00 ----------------------------------------------------------------------- [+] Qt 5.12.8 [+] New HEX editor [+] New Disassembler [+] New scan engine ####################################################################### 2.06 ----------------------------------------------------------------------- [+] Qt 5.12.4 [+] Many bugs have been fixed. ####################################################################### 2.05 ----------------------------------------------------------------------- [+] Many bugs have been fixed. [+] JSON output in console version [+] No UPX build for Windows version (DiE packed with UPX has AntiVirus alerts) ####################################################################### 2.04 ----------------------------------------------------------------------- [+] Many bugs have been fixed ####################################################################### 2.03 ----------------------------------------------------------------------- [+] Windows XP support for YARA [+] New detects [+] Many bugs have been fixed ####################################################################### 2.02 ----------------------------------------------------------------------- [+] Qt 5.6.3 [+] Qwt 6.1.4 [+] New scanning method: YARA [+] New detects [+] Many bugs have been fixed ####################################################################### 2.01 ----------------------------------------------------------------------- [+] New icons and images(Thanks Metabolic) [+] New scan options "Set column size to contents" [+] New signatures [+] New script's functions: - bool isExportPresent() - bool isTLSPresent() - bool isImportPresent() - bool isResourcePresent() - bool isExportFunctionPresent(QString sFunctionName) - bool isExportFunctionPresentExp(QString sFunctionName) [+] Donate page in About dialog [+] Many bugs have been fixed ####################################################################### 2.00 ----------------------------------------------------------------------- [+] More than 500 new detects (thanks hypn0 and other contributors) [+] New experimental scanning method [+] Many bugs have been fixed ####################################################################### ================================================ FILE: db/.vscode/about.txt ================================================ This directory is responsible for correct recognition of *.sg files by Visual Studio Code. You can delete it if you don't need it. ================================================ FILE: db/.vscode/settings.json ================================================ { "files.associations": { "*.sg": "javascript" } } ================================================ FILE: db/ACE ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Detect an ACE archive. // Author: Jason Hood /* Only tested with 2.04. */ includeScript("archive-file"); sName = "ACE"; function detect_ACE(bFile) { var nOffset, nSize; if (bFile) { nOffset = 0; nSize = File.getSize(); } else { nOffset = File.getOverlayOffset(); nSize = File.getOverlaySize(); } if (nSize > 48) { if (File.compare("'**ACE**'", nOffset + 7)) { bDetected = true; sVersion = "2"; if (File.readByte(nOffset + 6) & 0x80) { sOptions = "solid"; } if (File.compare("'UNREGISTERED'", nOffset + 32)) { sOptions = sOptions.append("unregistered"); } // Not sure about this... var nOffset = File.findSignature(nOffset + 0x20, 128, "000101"); if (nOffset != -1) { nOffset -= 3; while (nOffset < File.getSize()) { var nPacked = File.readDword(nOffset + 7); Archive.add(File.readDword(nOffset + 11), nPacked, File.readByte(nOffset + 19) & 16); nOffset += 0x23 + File.readWord(nOffset + 0x21) + nPacked; } sOptions = sOptions.append(Archive.contents()); } } } } ================================================ FILE: db/APK/_APK.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "Android"); function detect() { if (APK.isVerbose()) { sName = APK.getOperationSystemName(); sVersion = APK.getOperationSystemVersion(); sOptions = APK.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/APK/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = APK; var X = APK; ================================================ FILE: db/APK/library_IL2CPP.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "IL2CPP"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi-v7a/libil2cpp.so"); sLang = "C#"; return result(); } ================================================ FILE: db/APK/library_SandHook.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "SandHook"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/arm64-v8a/libsandhook-native.so") || APK.isArchiveRecordPresent("lib/arm64-v8a/libsandhook.so") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libsandhook-native.so") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libsandhook.so"); return result(); } ================================================ FILE: db/APK/library_UnicomSDK.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "UnicomSDK"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/arm64-v8a/libunicomSimplesdk.dat") || APK.isArchiveRecordPresent("assets/arm64-v8a/libunicomsdk.jar") || APK.isArchiveRecordPresent("assets/armeabi-v7a/libdecrypt.jar") || APK.isArchiveRecordPresent("assets/x86/libunicomSimplesdk.dat") || APK.isArchiveRecordPresent("assets/arm64-v8a/libdecrypt.jar") || APK.isArchiveRecordPresent("assets/x86/libunicomsdk.jar") || APK.isArchiveRecordPresent("assets/unicom_resource.dat") || APK.isArchiveRecordPresent("assets/x86/libdecrypt.jar") || APK.isArchiveRecordPresent("assets/classes.jar"); return result(); } ================================================ FILE: db/APK/library_Unity.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Unity"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi-v7a/libunity.so"); return result(); } ================================================ FILE: db/APK/package_PackageName.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("package", ""); function detect() { var _sName = APK.getAndroidManifestRecord("package"); if (_sName) { sName = _sName; sVersion = APK.getAndroidManifestRecord("android:versionName"); bDetected = true; } return result(); } ================================================ FILE: db/APK/packer_Kony.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("packer", "Kony"); function detect() { bDetected = APK.isArchiveRecordPresent("libkonyjsvm.so"); return result(); } ================================================ FILE: db/APK/protector_APKProtect.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "APKProtect"); function detect() { bDetected = APK.isArchiveRecordPresent("apkprotect.com/key.dat") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libAPKProtect.so") || APK.isArchiveRecordPresent("lib/armeabi/libAPKProtect.so"); return result(); } ================================================ FILE: db/APK/protector_APKProtector.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "APKProtector"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/ap.others/apkprotect.bin") || APK.isArchiveRecordPresent("assets/ap.src/apkprotect-v1.bin") || APK.isArchiveRecordPresent("assets/ap.src/apkprotect-v2.bin") || APK.isArchiveRecordPresent("assets/ap.src/apkprotect-v3.bin") || APK.isArchiveRecordPresent("lib/arm64-v8a/libapkprotect.so") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libapkprotect.so") || APK.isArchiveRecordPresent("lib/x86/libapkprotect.so") || APK.isArchiveRecordPresent("lib/x86_64/libapkprotect.so"); return result(); } ================================================ FILE: db/APK/protector_AlibabaProtection.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "AlibabaProtection"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi-v7a/libmobisec.so") || APK.isArchiveRecordPresent("lib/armeabi/libmobisec.so") || APK.isArchiveRecordPresent("lib/x86/libmobisec.so"); return result(); } ================================================ FILE: db/APK/protector_AndroidRepublic.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "AndroidRepublic"); function detect() { if (APK.isArchiveRecordPresentExp(APK.isArchiveRecordPresent(/assets\/androidrepublic\.org\/(.*)\.png/))) { sVersion = "VIP"; bDetected = true; } else if (APK.isArchiveRecordPresentExp("assets/emt.androidrepublic/config.png")) { bDetected = true; } return result(); } ================================================ FILE: db/APK/protector_AppGuard.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "AppGuard"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/AppGuard.dgc") || APK.isArchiveRecordPresent("assets/AppGuard0.jar") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libAppGuard.so") || APK.isArchiveRecordPresent("lib/armeabi/libAppGuard-x86.so") || APK.isArchiveRecordPresent("lib/armeabi/libAppGuard.so"); return result(); } ================================================ FILE: db/APK/protector_AppSolid.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "AppSolid"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/high_resolution.png"); return result(); } ================================================ FILE: db/APK/protector_BaiduProtection.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "BaiduProtection"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/baiduprotect.jar") || APK.isArchiveRecordPresent("assets/libbaiduprotect_x86.so") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libbaiduprotect.so") || APK.isArchiveRecordPresent("lib/armeabi/libbaiduprotect.so") || APK.isArchiveRecordPresent("lib/mips/libbaiduprotect.so") || APK.isArchiveRecordPresent("lib/x86/libbaiduprotect.so"); return result(); } ================================================ FILE: db/APK/protector_BangBangReinforcement.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "BangBang Reinforcement"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/autostreets.com_cert_chain.cer") || APK.isArchiveRecordPresent("assets/da.js") || APK.isArchiveRecordPresent("assets/img.autostreetscdn.com_cert.cer") || APK.isArchiveRecordPresent("assets/QMUIWebviewBridge.js") || APK.isArchiveRecordPresent("assets/info.y") || APK.isArchiveRecordPresent("assets/main.js") || APK.isArchiveRecordPresent("assets/weex-main-jsfm.js") || APK.isArchiveRecordPresent("assets/weex-rax-api.js") || APK.isArchiveRecordPresent("assets/weex-rax-extra-api.js") || APK.isArchiveRecordPresent("lib/arm/libDexHelper.so") || APK.isArchiveRecordPresent("lib/arm/libdexjni.so") || APK.isArchiveRecordPresent("lib/arm/libDexHelper-x86.so") || APK.isArchiveRecordPresent("com/secneo/apkwrapper"); if (bDetected) sVersion = "Enterprise"; return result(); } ================================================ FILE: db/APK/protector_BangcleProtection.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "BangcleProtection"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi/libsecexe.so") || APK.isArchiveRecordPresent("lib/x86/libsecexe.so"); return result(); } ================================================ FILE: db/APK/protector_DXShield.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "DXShield"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi/libdxbase.so"); return result(); } ================================================ FILE: db/APK/protector_DexProtector.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "DexProtector"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/classes.dex.dat") || APK.isArchiveRecordPresent("assets/dp.arm-v7.so.dat") || APK.isArchiveRecordPresent("assets/dp.arm-v8.so.dat") || APK.isArchiveRecordPresent("assets/dp.arm.so.dat") || APK.isArchiveRecordPresent("assets/dp.mp3") || APK.isArchiveRecordPresent("assets/dp.x86.so.dat") || APK.isArchiveRecordPresent("assets/dp.x86_64.so.dat") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libdexprotector.so") || APK.isArchiveRecordPresent("lib/armeabi/libdexprotector.so") || APK.isArchiveRecordPresent("assets/dp-lib/dp.kotlin-v1.lua.mph") || APK.isArchiveRecordPresent("assets/dexprotect/classes.dex.dat"); return result(); } ================================================ FILE: db/APK/protector_DingXiangReinforcement.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "DingXiang Reinforcement"); function detect() { bDetected = APK.isArchiveRecordPresent("com/security/shell/AppStub1") || APK.isArchiveRecordPresent("com/security/inner/stub000"); return result(); } ================================================ FILE: db/APK/protector_EasyShield.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "NetEase EasyShield"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/nedata.db") || APK.isArchiveRecordPresent("assets/nedig.properties") || APK.isArchiveRecordPresent("lib/arm/libnesec.so") || APK.isArchiveRecordPresent("lib/arm/libnesec-x86.so") || APK.isArchiveRecordPresent("lib/arm/libnshelper.so") || APK.isArchiveRecordPresent("com/netease/nis/wrapper") || APK.isArchiveRecordPresent("com/netease/nis/wrapper/MyApplication"); return result(); } ================================================ FILE: db/APK/protector_ExTrus_AppDefence.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.extrus.co.kr/en/products/appdefence meta("protector", "ExTrus AppDefence"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/appdefence_xml"); return result(); } ================================================ FILE: db/APK/protector_Gemalto.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Gemalto"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/arm64-v8a/libmedl.so") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libmedl.so") || APK.isArchiveRecordPresent("lib/armeabi/libmedl.so") || APK.isArchiveRecordPresent("lib/mips/libmedl.so") || APK.isArchiveRecordPresent("lib/mips64/libmedl.so") || APK.isArchiveRecordPresent("lib/x86/libmedl.so") || APK.isArchiveRecordPresent("lib/x86_64/libmedl.so"); return result(); } ================================================ FILE: db/APK/protector_Hdus-Wjus.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Hdus-Wjus"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi/libhdus.so") || APK.isArchiveRecordPresent("lib/armeabi/libwjus.so"); return result(); } ================================================ FILE: db/APK/protector_Ijiami.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Ijiami"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/ijiami.ajm") || APK.isArchiveRecordPresent("assets/ijm_lib/armeabi/libexec.so") || APK.isArchiveRecordPresent("assets/ijm_lib/armeabi/libexecmain.so") || APK.isArchiveRecordPresent("assets/ijm_lib/x86/libexec.so") || APK.isArchiveRecordPresent("assets/ijm_lib/x86/libexecmain.so") || APK.isArchiveRecordPresent("assets/ijiami.dat") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libexec.so") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libexecmain.so") || APK.isArchiveRecordPresent("lib/armeabi/libexec.so") || APK.isArchiveRecordPresent("lib/armeabi/libexecmain.so") || APK.isArchiveRecordPresent("lib/x86/libexec.so") || APK.isArchiveRecordPresent("lib/x86/libexecmain.so"); return result(); } ================================================ FILE: db/APK/protector_Jiagu.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Jiagu"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/libjiagu.so") || APK.isArchiveRecordPresent("assets/libjiagu_a64.so") || APK.isArchiveRecordPresent("assets/libjiagu_ls.so") || APK.isArchiveRecordPresent("assets/libjiagu_x64.so") || APK.isArchiveRecordPresent("assets/libjiagu_x86.so"); return result(); } ================================================ FILE: db/APK/protector_Kiro.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Kiro"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi/libkiroro.so"); return result(); } ================================================ FILE: db/APK/protector_Kiwi.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "KiwiSecurity"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/crash") || APK.isArchiveRecordPresent("assets/ec_dt.lic") || APK.isArchiveRecordPresent("assets/kwpt.lincense") || APK.isArchiveRecordPresent("lib/arm/libkiwi_dumper.so") || APK.isArchiveRecordPresent("lib/arm/libkiwicrash.so") || APK.isArchiveRecordPresent("lib/arm/libKwProtectSDK.so") || APK.isArchiveRecordPresent("lib/arm/libkwsdataenc.so") || APK.isArchiveRecordPresent("lib/arm/libkadp.so") || APK.isArchiveRecordPresent("com/kiwisec/crash") || APK.isArchiveRecordPresent("com/kiwivm/security") || APK.isArchiveRecordPresent("com/kiwivm/security/StubApplication"); return result(); } ================================================ FILE: db/APK/protector_LIAPP.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "LIAPP"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/LIAPPClient.sc") || APK.isArchiveRecordPresent("assets/LIAPPClient_x86.sc") || APK.isArchiveRecordPresent("assets/LIAPPEgg.sc") || APK.isArchiveRecordPresent("assets/LIAPPEgg_x86.sc"); return result(); } ================================================ FILE: db/APK/protector_MedusaH.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "MedusaH"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi-v7a/libmd.so"); return result(); } ================================================ FILE: db/APK/protector_MobileTencentProtect.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "MobileTencentProtect"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi-v7a/mix.dex") || APK.isArchiveRecordPresent("lib/armeabi/mix.dex"); return result(); } ================================================ FILE: db/APK/protector_NQShield.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "NQShield"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/libnqshieldx86.so") || APK.isArchiveRecordPresent("assets/nqdata") || APK.isArchiveRecordPresent("lib/armeabi/libnqshield.so"); return result(); } ================================================ FILE: db/APK/protector_NagaPTProtection.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "NagaPTProtection"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi/libddog.so") || APK.isArchiveRecordPresent("lib/armeabi/libfdog.so"); return result(); } ================================================ FILE: db/APK/protector_OLLVM-TTL.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "OLLVM-TLL"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi-v7a/libmtprotect.so") || APK.isArchiveRecordPresent("lib/x86/libmtprotect.so"); return result(); } ================================================ FILE: db/APK/protector_Obfuscapk.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Obfuscapk"); function detect() { bDetected = APK.isArchiveRecordPresentExp(/assets\/lib\.arm(eabi|64)-v[0-9a-zA-Z]{2}\.[!-~]+\.so/) || APK.isArchiveRecordPresentExp(/assets\/lib\.x86(_64)?\.[!-~]+\.so/); return result(); } ================================================ FILE: db/APK/protector_PangXie.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "PangXie"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi-v7a/libnsecure.so") || APK.isArchiveRecordPresent("lib/armeabi/libnsecure.so"); return result(); } ================================================ FILE: db/APK/protector_ProGuard.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "ProGuard"); function detect() { bDetected = APK.isArchiveRecordPresent("META-INF/proguard/androidx-annotations.pro"); return result(); } ================================================ FILE: db/APK/protector_QDBH.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "QDBH"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/qdbh"); return result(); } ================================================ FILE: db/APK/protector_Qihoo360Protection.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Qihoo360Protection"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi-v7a/libprotectClass.so") || APK.isArchiveRecordPresent("lib/armeabi/libprotectClass.so") || APK.isArchiveRecordPresent("lib/x86/libprotectClass.so"); return result(); } ================================================ FILE: db/APK/protector_SecNeo.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "SecNeo"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/arm64-v8a/libDexHelper-x86_64.so") || APK.isArchiveRecordPresent("lib/arm64-v8a/libDexHelper.so") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libDexHelper-x86.so") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libDexHelper.so") || APK.isArchiveRecordPresent("lib/armeabi/libDexHelper-x86.so") || APK.isArchiveRecordPresent("lib/armeabi/libDexHelper.so") || APK.isArchiveRecordPresent("lib/x86/libDexHelper.so"); return result(); } ================================================ FILE: db/APK/protector_SecShell.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "SecShell"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/secData0.jar") || APK.isArchiveRecordPresent("lib/armeabi/libSecShell-x86.so") || APK.isArchiveRecordPresent("lib/armeabi/libSecShell.so"); return result(); } ================================================ FILE: db/APK/protector_TencentLegu.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "TencentLegu"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/0OO00l111l1l") || APK.isArchiveRecordPresent("assets/0OO00oo01l1l") || APK.isArchiveRecordPresent("assets/libshellx-super.2019.so") || APK.isArchiveRecordPresent("assets/o0oooOO0ooOo.dat") || APK.isArchiveRecordPresent("lib/arm64-v8a/libshell-super.2019.so") || APK.isArchiveRecordPresent("lib/armeabi/libshell-super.2019.so"); return result(); } ================================================ FILE: db/APK/protector_TencentProtection.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "TencentProtection"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/tosversion") || APK.isArchiveRecordPresent("tencent_stub"); return result(); } ================================================ FILE: db/APK/protector_TencentSecurity.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Tencent Security"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/dexMethod_00oo1l1l.dat") || APK.isArchiveRecordPresent("lib/arm/libshell-supervbasic.2019.so") || APK.isArchiveRecordPresent("lib/arm/libshell-superv.2019.so"); if (bDetected) sVersion = "Enterprise"; return result(); } ================================================ FILE: db/APK/protector_TongfuShield.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Tongfu Shield"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/mode") || APK.isArchiveRecordPresent("assets/PK") || APK.isArchiveRecordPresent("assets/virtual") || APK.isArchiveRecordPresent("assets/libegis.a") || APK.isArchiveRecordPresent("lib/arm/libegis.so") || APK.isArchiveRecordPresent("com/payegis/FirstApplication") || APK.isArchiveRecordPresent("com.payegis.entry") || APK.isArchiveRecordPresent("egis") || APK.isArchiveRecordPresent("egis-x86"); return result(); } ================================================ FILE: db/APK/protector_VDog.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "VDog"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/main000/libhdog-x86.so") || APK.isArchiveRecordPresent("assets/main000/libhdog.so") || APK.isArchiveRecordPresent("assets/main000/libvdog-x86.so") || APK.isArchiveRecordPresent("assets/main000/libvdog.so"); return result(); } ================================================ FILE: db/APK/protector_Virbox.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://appsec.virbox.com/ meta("protector", "Virbox"); function detect() { bDetected = ( APK.isArchiveRecordPresent("libsandhook.so") || APK.isArchiveRecordPresent("libsandhook-native.so") ) && ( APK.isArchiveRecordPresent("libv++_64.so") || APK.isArchiveRecordPresent("libv++.so") ); return result(); } ================================================ FILE: db/APK/protector_Yidun.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Yidun"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/arm64-v8a/libnesec.so") || APK.isArchiveRecordPresent("lib/armeabi-v7a/libnesec.so") || APK.isArchiveRecordPresent("lib/armeabi/libnesec.so") || APK.isArchiveRecordPresent("lib/x86/libnesec.so"); return result(); } ================================================ FILE: db/APK/protector_build38.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://build38.com meta("protector", "build38"); function detect() { bDetected = APK.isArchiveRecordPresent("__license.tak") || APK.isArchiveRecordPresent("license.tak"); return result(); } ================================================ FILE: db/APK/protector_iCrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "iCrypt"); function detect() { bDetected = APK.isArchiveRecordPresent("assets/af.bin") || APK.isArchiveRecordPresent("assets/ijiami.ajm") || APK.isArchiveRecordPresent("assets/ijiami.dat") || APK.isArchiveRecordPresent("assets/IJMDal.Data") || APK.isArchiveRecordPresent("assets/signed.bin") || APK.isArchiveRecordPresent("assets/InteGration_4.5.1.ttf") || APK.isArchiveRecordPresent("assets/libijmDataEncryption.so") || APK.isArchiveRecordPresent("assets/libijmDataEncryption_arm64.so") || APK.isArchiveRecordPresent("assets/libijmDataEncryption_x86.so") || APK.isArchiveRecordPresent("lib/arm/libijm-emulator.so"); if (bDetected) sVersion = "Enterprise"; return result(); } ================================================ FILE: db/APK/tool_ApktoolPlus.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("tool", "ApktoolPlus"); function detect() { bDetected = APK.isArchiveRecordPresent("lib/armeabi-v7a/libapktoolplus_jiagu.so"); return result(); } ================================================ FILE: db/APK/tool_SingleJar.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("tool", "SingleJar"); function detect() { bDetected = APK.getManifestRecord("Created-By") == "singlejar"; return result(); } ================================================ FILE: db/Amiga/AMOS_Basic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://en.wikipedia.org/wiki/AMOS_(programming_language) meta("compiler", "AMOS Basic"); function detect() { if (Amiga.compareEP("60$$49fa....397a........b07c....65..303c....3940....43ec....53..6b")) { sVersion = "1.0"; bDetected = true; } else if (Amiga.compareEP("243c........263c........49fa....294c....294f....48e7808078..7a..7c..2c78....0802")) { bDetected = true; } sLang = "BASIC"; return result(); } ================================================ FILE: db/Amiga/AMOS_Compiler_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "AMOS Compiler Cruncher"); function detect() { if (Amiga.compareEP("60$$49fa....294c....2c78....294f....48e7808070..103a....b03c....64")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Absoft_AC_Basic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Absoft AC/BASIC"); function detect() { if (Amiga.compareEP("6000$$$$48e780802c78....78..43fa....61..6700....2f002a0043fa")) { bDetected = true; } sLang = "BASIC"; return result(); } ================================================ FILE: db/Amiga/Absoft_Fortran.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Absoft Fortran"); function detect() { if (Amiga.compareEP("43fa....2449d3fc........d5fc........223c........243c........2f0226482a002449203c")) { sVersion = "2.3"; bDetected = true; } sLang = "FORTRAN"; return result(); } ================================================ FILE: db/Amiga/Amiga_E.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Amiga E"); function detect() { if (Amiga.compareEP("23cf........6100$$$$23c0........23c8........2c78....43fa....70..4eae....23c0")) { sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("23cf........6100$$$$33fc............23c0........23c8........2c78....33ee............43f9")) { sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("2c78....2a482e00203c........223c........24004eae....4a8066")) { sOptions = "type 3"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Amiga_font.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("font", "Amiga font"); function detect() { if (Amiga.compareEP("70..4e75............................0f80")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Aztec_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Aztec C"); function detect() { if (Amiga.compareEP("4ef9########2a4f61..43ec....45ec....b5c966..323c....6b..74..22c251c9")) { sVersion = "5.0a"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("4ef9########61..43ec....45ec....b5c966..323c....6b..74..22c251c9")) { sVersion = "5.0d-5.2a"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("4efa$$$$61..43ec....45ec....b5c966..323c....6b..74..22c251c9")) { sVersion = "5.0d-5.2a"; sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("4efa$$$$2a4f61..43ec....45ec....b5c966..323c....6b..74..22c251c9")) { sVersion = "5.0a"; sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("4efa$$$$43f9........2851d9ccd9ccd9fc........43ec....45ec....b5c966..323c....6b")) { sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("4efa$$$$61..43f9........45f9........b5c966..323c....6b..74..22c251c9")) { sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("4efa$$$$2a4f61..43f9........45f9........b5c966..323c....6b..74..22c251c9")) { sOptions = "type 3"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/Amiga/BHC3_Relocatable.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "BHC3 Relocatable"); function detect() { if (Amiga.compareEP("41fa....2028....0680........223c........2c78....4eae....2240")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/BPack_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "BPack SFX"); function detect() { if (Amiga.compareEP("6000$$$$3a002a486100....6100....6100....6100....41fa....217c")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Blitz_BASIC.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Blitz BASIC"); function detect() { if (Amiga.compareEP("4eb9........60$$207c........227c........4eb9........2c7c........23ce")) { bDetected = true; } sLang = "BASIC"; return result(); } ================================================ FILE: db/Amiga/ByteKiller_Clone.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "ByteKiller Clone"); function detect() { if (Amiga.compareEP("61$$41f9........43f9........24609bcdd5c920204bed....72..61")) { sName += " 8"; bDetected = true; } else if (Amiga.compareEP("6100................41f9........43f9........2460d5c9202072..61")) { sName += " 9"; bDetected = true; } else if (Amiga.compareEP("61$$41f9........43f9........2460d5c9202072..61..4a0267..0c42")) { sName += " A"; bDetected = true; } else if (Amiga.compareEP("41fa....d1fa....227c........2460d5c94aa0202013f9................72")) { sName += " FLT"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Chryseis_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Chryseis Cruncher"); function detect() { if (Amiga.compareEP("6000$$$$2f0841fa....208f205f4eba....2e7a....58..4e75")) { sVersion = "0.9"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Crunch_Master.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Crunch Master"); function detect() { if (Amiga.compareEP("428445fa....41fa....49fa....d1d291fc........43f9........0484")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/DICE_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://aminet.net/package/dev/c/dice-3.16 meta("compiler", "DICE C"); function detect() { if (Amiga.compareEP("48e73f3e2c79........244f2f082f00303c")) { bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/Amiga/DMS_FMS-Masher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "DMS/FMS-Masher by ParCon Software"); function detect() { if (Amiga.compareEP("6000$$$$48e77efe2448240049fa....47fa....303c....421b51c8....47f9")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Deluxe_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Deluxe Cruncher"); function detect() { if (Amiga.compareEP("47fa....41fa....247c........227c........0c10....6700")) { sVersion = "1.0-2.0"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Free_Pascal.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Free Pascal"); function detect() { if (Amiga.compareEP("23cf........23c8........6700$$$$4eb9........2e79........4e75")) { sVersion = "0.99"; bDetected = true; } else if (Amiga.compareEP("4e55....48ed........23f8............95ca2c79........93c94eae....2040")) { sVersion = "1.0.12"; bDetected = true; } sLang = "Pascal"; return result(); } ================================================ FILE: db/Amiga/GNU_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "GNU C"); function detect() { if (Amiga.compareEP("6000$$$$48e73c2228082600428249f9........240c2c78....43fa....70..4eae....2c40")) { sVersion = "3.3.3-3.4.0"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("6000$$$$48e72022244824002c78....43f9........70..4eae....4a8067..23c0........23c0")) { sVersion = "3.3.3-3.4.0"; sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("6000$$$$48e7382228082600428249f9........240c2c78....43fa....70..4eae....2c40")) { sVersion = "2.95.3"; bDetected = true; } else if (Amiga.compareEP("6000$$$$48e72022240824402c78....43f9........70..4eae....4a8067..23c0........2f39")) { sVersion = "2.95.2"; bDetected = true; } else if (Amiga.compareEP("6000$$$$4e55fffc48e73c3a28082a000c85........57c04880340048c2448295ca")) { sVersion = "2.90.xx"; bDetected = true; } else if (Amiga.compareEP("6000$$$$4e55fffc48e73c3a24482a000c85........57c04880340048c24482")) { sVersion = "2.7.2.1"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("23c8........23c0........23cf........2c78....23ce........93c94eae....26404aab....6600")) { sVersion = "2.7.2.1"; sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("6000$$$$48e730222408244023cf........2c78....43f9........70..4eae....204023c8")) { sVersion = "2.7.0"; bDetected = true; } else if (Amiga.compareEP("6000$$$$4e55....48e73f322c082b40....0c80........57c01400")) { sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("6000$$$$4e55....48e73f322c082e000c87........57c01400")) { sOptions = "type 2"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/Amiga/HQC_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "HQC Cruncher"); function detect() { if (Amiga.compareEP("2c79........4eae....43fa....4eae....4a806700")) { sOptions = "by High Quality Crackings"; sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/HiSoft_Basic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://en.wikipedia.org/wiki/HiSoft_Systems meta("compiler", "HiSoft BASIC"); function detect() { if (Amiga.compareEP("267c........6000$$$$7a..383c....263c........3e3c....243c")) { sOptions = "1988-94"; bDetected = true; } else if (Amiga.compareEP("267c........6000$$$$7a..383c....363c....3e3c....343c")) { bDetected = true; sOptions = "1988"; } sLang = "BASIC"; return result(); } ================================================ FILE: db/Amiga/High_Pressure_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "High Pressure Cruncher"); function detect() { if (Amiga.compareEP("6100$$$$41fa....d1fc........227c........2460d5c92a202020b185")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Jan_Heweliusz_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Jan Heweliusz Cruncher"); function detect() { if (Amiga.compareEP("6000$$$$48e7fff643fa....70..2c79........4eae....2a406700")) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Lattice_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://en.wikipedia.org/wiki/Lattice_C meta("compiler", "Lattice C (SAS C)"); function detect() { if (Amiga.compareEP("48e77efe2448240049f9........2c78....2f0248e7....266e....222b....67")) { sVersion = "5.10"; bDetected = true; } else if (Amiga.compareEP("48e77efe2448240049f9........2c78....47f9........72..203c")) { sVersion = "5.04"; bDetected = true; } else if (Amiga.compareEP("2448240049f9........47f9........72..203c........60..26c151c8....2c78")) { sVersion = "5.02"; bDetected = true; } else if (Amiga.compareEP("48e77efe4bef....2448240049f9........2c78....294e....294f....42ac")) { sVersion = "4.0"; bDetected = true; } else if (Amiga.compareEP("48e77efe4bef....2448240049f9........47f9........72..203c")) { sVersion = "1.0"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/Amiga/LhPak_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "LhPak SFX"); function detect() { if (Amiga.compareEP("60$$2c79........246e....4aaa....6600....41ea....4eae....41ea....4eae")) { sVersion = "1.3"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Master_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Master Cruncher"); function detect() { if (Amiga.compareEP("48e7fffe4bfa....41fa....2250d3c9d3c9245158..2b49....d5cad5ca58")) { sVersion = "3.0-3.1"; bDetected = true; } else if (Amiga.compareEP("........4bfa....41fa....2250d3c9d3c958..2b49....2b7c")) { sVersion = "3.0-3.1"; sOptions = "Address"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Maxon_C++.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Maxon C++"); function detect() { if (Amiga.compareEP("48e780804eb9........4eb9........70..4eb9")) { bDetected = true; } sLang = "C++"; return result(); } ================================================ FILE: db/Amiga/RexxMasher_(jrms).1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "RexxMasher (jrms) by Joerg Riemer"); function detect() { if (Amiga.compareEP("48e7fffe60$$4230....284870..43fa....2c78")) { bDetected = true; } else if (Amiga.compareEP("6000$$$$4a80....53..67..11bc........43fa....228893c9")) { sVersion = "1.5-1.6"; bDetected = true; } else if (Amiga.compareEP("6000$$$$48e7808043fa....d3fc........228f4bfa....dbfc")) { sVersion = "1.3"; bDetected = true; } else if (Amiga.compareEP("6100$$$$48e7808033fc............41fa....6100....203a")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Sound-Tracker_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Sound-Tracker Cruncher"); function detect() { if (Amiga.compareEP("61$$4bfa....2c78....203a....90ba....0680........2b40....43fa....d3e9")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Storm_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://www.alinea-computer.de/produkte_details_en.php?product=stormc meta("compiler", "Storm C"); function detect() { if (Amiga.compareEP("2c78....23ce........23cf........226e....4aa9....6600....41e9....2f084eae")) { sVersion = "3.0"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/Amiga/TNM_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "TNM Cruncher"); function detect() { if (Amiga.compareEP("61$$48e7fffe2c78....4bfa....41fa....2050d1c8d1c82250")) { sVersion = "1.1"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("2c78....61$$48e7fffe4bfa....41fa....2050d1c8d1c82250")) { sVersion = "1.1"; sOptions = "type 2"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/TSK_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "TSK Cruncher"); function detect() { if (Amiga.compareEP("48e7fffe4bf9........204d23ed............d1ed....52..225552..dbfc")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Time_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Time Cruncher"); function detect() { if (Amiga.compareEP("41fa....d1fc........43f9........2460d5c9202072..6100")) { sVersion = "1.7-2.2"; bDetected = true; } else if (Amiga.compareEP("48e7fffe2c79........43fa....4eae....2c404eae....2200243c")) { sVersion = "4.2"; sOptions = "by RAZOR and NETWORK's"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Titanics_Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Titanics Cruncher"); function detect() { if (Amiga.compareEP("6000$$$$48e7fff643fa....70..2c78....4e")) { sVersion = "1.1"; bDetected = true; } else if (Amiga.compareEP("6000$$$$48e7fff693c92c78....4eae....28404aac....66..41ec....43fa....2288")) { sVersion = "1.2"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Turtle_Smasher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Turtle Smasher"); function detect() { if (Amiga.compareEP("41fa....225845fa....24982449d5d8d1d041e8....201072..6100")) { sVersion = "1.3-1.41"; bDetected = true; } else if (Amiga.compareEP("43fa....2459204a323c....429851c9....204a45ea....214a....217c")) { sVersion = "2.00"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/Ultimate_Packer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Ultimate Packer"); function detect() { if (Amiga.compareEP("6000$$$$598f48e7fffe41fa....20af....41fa....2f48....2c78....203c")) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/_Amiga.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "AmigaOS"); function detect() { if (Amiga.isVerbose()) { sName = Amiga.getOperationSystemName(); sVersion = Amiga.getOperationSystemVersion(); sOptions = Amiga.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/Amiga/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = Amiga; var X = Amiga; ================================================ FILE: db/Amiga/compiler_ABasic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "ABasiC by MetaComCo"); function detect() { if (Amiga.compareEP("23cf........23c0........23c8........42b9........2c79........23ce........93c94eae....28404aac")) { sOptions = "1985 type 1"; bDetected = true; } else if (Amiga.compareEP("23cf........23c0........23c8........42b9........42b9........2c79........23ce........93c94eae....28404aac")) { sOptions = "1985 type 2"; bDetected = true; } else if (Amiga.compareEP("48e77ffe43fa....22b9........43fa....228843fa....22802c7a....93c9")) { bDetected = true; } sLang = "BASIC"; return result(); } ================================================ FILE: db/Amiga/compiler_AmigaBasic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "AmigaBasic"); function detect() { if (Amiga.compareEP("23c0........23c8........200f48e77efe2a402c79........23ce........23cf")) { bDetected = true; } sLang = "BASIC"; return result(); } ================================================ FILE: db/Amiga/compiler_GFA-Basic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "GFA-Basic"); //temp. detects function detect() { if (Amiga.compareEP("4eb9........203c........4eac....45f9........4eac....4eb9........6100....4eb9")) { sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("4eb9........7a..383c....363c....70..74..72..7c..6100....383c....363c....70")) { sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("4eb9........203c........6100....4eb9........4e966100....4e964eb9........4e96203c")) { sOptions = "type 3"; bDetected = true; } else if (Amiga.compareEP("4eb9........4eac....4eb9........4e9651ed....4e9645f9........6100....4e96426d")) { sOptions = "type 4"; bDetected = true; } else if (Amiga.compareEP("4eb9........203c........4eac....45f9........70..41ed....6100....70..2b40....4eb9")) { sOptions = "type 5"; bDetected = true; } else if (Amiga.compareEP("4eb9........4eb9........0cad............6f..45f9........70..4eac....4eac....67")) { sOptions = "type 6"; bDetected = true; } else if (Amiga.compareEP("4eb9........50ed....70..4a2d....67..70..52..6600....70..4eac....2b40....202d")) { sOptions = "type 7"; bDetected = true; } else if (Amiga.compareEP("4eb9........2a3c........283c........263c........203c........74..72..7c..4eac")) { sOptions = "type 8"; bDetected = true; } else if (Amiga.compareEP("4eb9........41ed....4eac....41ed....20104eac....2b40....226d....70..4eac")) { sOptions = "type 9"; bDetected = true; } else if (Amiga.compareEP("4eb9........203c........6100....70..223c........6100....2b40....202d....66")) { sOptions = "type 10"; bDetected = true; } else if (Amiga.compareEP("4eb9........45f9........200a2b40....4eac....3f0041ed....2f08206d....4e90")) { sOptions = "type 11"; bDetected = true; } else if (Amiga.compareEP("4eb9........4eb9........4eb9........4eac....426d....203c........72..343c")) { sOptions = "type 12"; bDetected = true; } sLang = "BASIC"; return result(); } ================================================ FILE: db/Amiga/compiler_JForth.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // http://www.jforth.org meta("compiler", "JForth"); function detect() { if (Amiga.compareEP("2238....43fa....228143fa....228143fa....228f283a....2f082f0041fa")) { sVersion = "3.1"; bDetected = true; } else if (Amiga.compareEP("49fa....264cd7fc........2c4f9dfc........91cc2d082e006100....2d07")) { sVersion = "3.0"; bDetected = true; } else if (Amiga.compareEP("49fa....264cd7fc........2c4f9dfc........91cc2d082e004eac....2d07")) { sVersion = "2.0"; bDetected = true; } else if (Amiga.compareEP("49fa....264cd7fc........2c4f9dfc........91cc2d082e006100")) { sVersion = "2.x-3.x"; bDetected = true; } else if (Amiga.compareEP("2238....43fa....228143fa....228143fa....228f283a....d8ba....2f082f00")) { sVersion = "1.2"; bDetected = true; } sLang = "Forth"; return result(); } ================================================ FILE: db/Amiga/compiler_Multi-Forth.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Multi-Forth"); function detect() { if (Amiga.compareEP("6000$$$$43fa....22b9........49fa....294c....294c....294f....42672948....2940....41fa")) { sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("6000$$$$43fa....22b9........49fa....294f....42672948....2940....41fa....2948")) { sOptions = "type 2"; bDetected = true; } sLang = "Forth"; return result(); } ================================================ FILE: db/Amiga/compiler_Oberon-A.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Oberon-A"); function detect() { if (Amiga.compareEP("2c4f4eb9........6100....42b9........4ef9........70..4eb9........70..6000")) { sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("48e7f0c0203c........52..e5..260072..48412c78....4eae")) { sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("49f9........487a....72..6100$$$$4a2c....6600....50ec")) { sOptions = "type 3"; bDetected = true; } else if (Amiga.compareEP("487a....72..4eb9........4a0166..6100....70..91")) { sOptions = "type 4"; bDetected = true; } sLang = "Oberon"; return result(); } ================================================ FILE: db/Amiga/compiler_PureBasic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "PureBasic"); function detect() { if (Amiga.compareEP("48e7fffe203c........6100....2840294e....43fa....70..4eae")) { sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("48e7fffe70..6100$$$$223c........2c78....4eee....2c78....4eee")) { sOptions = "type 2"; bDetected = true; } sLang = "BASIC"; return result(); } ================================================ FILE: db/Amiga/compiler_VBCC.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://en.wikipedia.org/wiki/Vbcc meta("compiler", "VBCC"); function detect() { if (Amiga.compareEP("60..'VBCC '") && Amiga.compareEP("60$$2400244849f90000....294f....2c78....294e")) { sVersion = Amiga.getString(Amiga.getEntryPointOffset() + 7, 3); bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/Amiga/cruncher_AddressHead.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "AddressHead"); function detect() { if (Amiga.compareEP("41fa....20080680........43fa....2340....43f9........203c")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_ByteKiller.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // http://janeway.exotica.org.uk/release.php?id=66243 meta("cruncher", "ByteKiller"); function detect() { if (Amiga.compareEP("41fa....43f9........201822182a182449d1c0d5c12020b185")) { sVersion = "1.2-1.3"; bDetected = true; } else if (Amiga.compareEP("48e7fffe............41fa....43f9........201822182a182449d1c0d5c12020b185")) { sVersion = "2.0"; bDetected = true; } else if (Amiga.compareEP("48e7fffe41fa....43f9........4df9........20182218d1c020102449d5c17a")) { sVersion = "3.0"; sOptions = "type 1" bDetected = true; } else if (Amiga.compareEP("48e7fffe41fa....d1fc........4ed0")) { sVersion = "3.0"; sOptions = "type 2" bDetected = true; } else if (Amiga.compareEP("48e7fffe1c3c....4bf9........41fa....2c78")) { sName += " Pro"; sVersion = "1.0"; bDetected = true; } else if (Amiga.compareEP("48e7fffe1c3c....4bf9........13fc............4e714e7150f9........303c")) { sName += " Pro"; sVersion = "1.0"; sOptions = "Killer" bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_CopyCat.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "CopyCat"); function detect() { if (Amiga.compareEP("487a....48e7fffe61$$2c78....43fa....70..4eae....41fa....43fa....2280")) { sVersion = "1.01"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_Cranker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Cranker"); function detect() { if (Amiga.compareEP("6000$$$$48e780929efc....303c....426751c8....2a4f2c78....227a")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_Crunch-Mania.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Crunch-Mania by Thomas Schwarz"); function detect() { if (Amiga.compareEP("48e7ffff43fa....2c78....4eae....2c40")) { sVersion = "1.8t-1.91"; sOptions = "Library/Huffman"; bDetected = true; } else if (Amiga.compareEP("48e7ff..3c3c....49fa....4e..4e..4e")) { sVersion = "1.8t-1.91"; sOptions = "Huffman (type 1)"; bDetected = true; } else if (Amiga.compareEP("49fa....7c..4e944e914e942449")) { sVersion = "1.8t-1.91"; sOptions = "Huffman (type 2)"; bDetected = true; } else if (Amiga.compareEP("48e7ffff7c..49fa....4e94....4e")) { sVersion = "1.8t-1.91"; sOptions = "Huffman (type 3)"; bDetected = true; } else if (Amiga.compareEP("7c..49fa....4e944e914e942449")) { sVersion = "1.8t-1.91"; sOptions = "Huffman (type 4)"; bDetected = true; } else if (Amiga.compareEP("4e7148e7ffff3c3c....49fa....4e944e914e942449")) { sVersion = "1.8t-1.91"; sOptions = "Huffman (type 5)"; bDetected = true; } else if (Amiga.compareEP("48e7fffe45fa....43f9........221a241a47ea")) { sVersion = "1.9t-1.91"; sOptions = "Address/Huffman"; bDetected = true; } else if (Amiga.compareEP("48e77fff33fc............33fc............33fc............33fc............45fa....49f9........204c")) { sVersion = "1.9t-1.91"; sOptions = "Address/Pro"; bDetected = true; } else if (Amiga.compareEP("4ff9........48e7fffe4bf9........1abc....1abc....1abc")) { sVersion = "1.9t"; sOptions = "Address/Pro/Huffman"; bDetected = true; } else if (Amiga.compareEP("48e77fff45fa....43f9........221a241a47ea....b7c96f")) { sVersion = "1.4-1.91"; sOptions = "Address"; bDetected = true; } else if (Amiga.compareEP("48e7ffff45fa....221a241a224a287a....d9ccd9cc")) { sVersion = "1.4-1.91"; sOptions = "Simple"; bDetected = true; } else if (Amiga.compareEP("........3c3c....49fa....4e944e914e94244952")) { sVersion = "1.4-1.91"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("48e7fffe41fa....d1fc........4ed04e94244952")) { sVersion = "1.4-1.91"; sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("48e7ffff7c..4e7149fa....4e944e914e94244952")) { sVersion = "1.4-1.91"; sOptions = "type 3"; bDetected = true; } else if (Amiga.compareEP("4ff9........48e77fff45fa....49f9........204c47fa....7e..28db")) { sVersion = "1.4-1.8t"; sOptions = "Address/Pro"; bDetected = true; } else if (Amiga.compareEP("48e7ffff43fa....2c78....4eba....2c40200e67..4eae")) { sOptions = "type 1"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_Crunch-O-Matic.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Crunch-O-Matic"); function detect() { if (Amiga.compareEP("48e7fffe267a....d7cbd7cb588b2c78....224b")) { sVersion = "1.0"; sOptions = "Execute"; bDetected = true; } else if (Amiga.compareEP("287a....d9ccd9cc5c..20140680........41fa....2080")) { sVersion = "1.0"; sOptions = "Picture"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_Crunch.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Crunch"); function detect() { if (Amiga.compareEP("48e7ffff4bfa....4dfa....70..4e962f4c")) { sVersion = "1.3-1.4b"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_CrunchyDat.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "CrunchyDat"); function detect() { if (Amiga.compareEP("60$$487a....48e7fffe487a....203c........72")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_Defjam.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Defjam"); function detect() { if (Amiga.compareEP("..f9........7e..303c....3d40....3d40")) { sVersion = "3.2-3.6 Pro"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("..f9........7e..303c....4e714e713d40....4e714e71")) { sVersion = "3.2-3.6 Pro"; sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("48e7fffe41fa....d1fc........4ed03d40....3d40....3d40")) { sVersion = "3.2-3.6 Pro"; sOptions = "type 3"; bDetected = true; } else if (Amiga.compareEP("....43fa....4bf9........287a....204c")) { sVersion = "3.6"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("....3e3c....43fa....4bf9........287a....204c")) { sVersion = "3.6"; sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("............43fa....4bf9........287a....204c")) { sVersion = "3.6"; sOptions = "type 3"; bDetected = true; } else if (Amiga.compareEP("21fc............4df9........7e..303c....3d40....3d40....3d40")) { sOptions = "type 1"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_DoubleAction.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "DoubleAction"); function detect() { if (Amiga.compareEP("47f9........4e714e714e714e714e714e7143f9........4e714e714e714e714e714e71")) { sVersion = "1.0"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("47f9........377c........377c........43f9........12bc....12bc....12bc")) { sVersion = "1.0"; sOptions = "type 2"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_DragPack.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "DragPack"); function detect() { if (Amiga.compareEP("48e7fffe41f9........43f9........20182218")) { sVersion = "1.0"; bDetected = true; } else if (Amiga.compareEP("487a....48e7fffe49fa....28fc........41fa....24482248")) { sVersion = "2.52"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_FileShield.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "FileShield"); function detect() { if (Amiga.compareEP("4879000000004e754e7500000000")) { sVersion = "1.x"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_FlashSpeed.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "FlashSpeed"); function detect() { if (Amiga.compareEP("48e7c0e041fa....43f9........264970..72..12d00c18....66")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_GnuPacker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "GnuPacker"); function detect() { if (Amiga.compareEP("48e7fffe4bfa....4dfa....206d....2248d3ed....30deb1c9")) { sVersion = "1.1-1.2"; sOptions = "One Segment"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_House.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "House (RSI Packer)"); function detect() { if (Amiga.compareEP("................................13fc............41fa....43f9........47fa....49f9")) { sVersion = "1.4"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_ISC.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "ISC"); function detect() { if (Amiga.compareEP("47fa....d7d3247c........60$$33fc............33fc............41f9")) { sVersion = "1.5"; sOptions = "Pass 3. Bitstream Pass (Huffman-Algorythm) (type 1)"; bDetected = true; } else if (Amiga.compareEP("47fa....d7d3247c........4cdf000e200f4ff9........48e7")) { sVersion = "1.5"; sOptions = "Pass 3. Bitstream Pass (Huffman-Algorythm) (type 2)"; bDetected = true; } else if (Amiga.compareEP("247c........4cdf000e200f4ff9........48e7f0004879")) { sVersion = "1.5"; sOptions = "Pass 1. Normal Compressor type 1"; bDetected = true; } else if (Amiga.compareEP("247c........60$$41fa....227c........287c........47fa")) { sVersion = "1.5"; sOptions = "Pass 1. Normal Compressor type 2"; bDetected = true; } else if (Amiga.compareEP("247c........60$$41fa....287c........47fa....323c....28db")) { sVersion = "1.5"; sOptions = "Pass 2. Comparing Compressor"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_Imploder.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Imploder"); function detect() { if (Amiga.compareEP("48e7ffff49fa....3c3c....4e944e913c3c")) { sVersion = "1.0"; sOptions = "Protected"; bDetected = true; } else if (Amiga.compareEP("48e7ffff49fa....3c3c....61..4e913c3c")) { sVersion = "1.0-3.1"; bDetected = true; } else if (Amiga.compareEP("6000$$$$48e7fff693c92c78....4eae....28404aac....66..41ec....2c78....4eae....4eae....43fa")) { sVersion = "1.0-3.1"; sOptions = "Overlayed Protected type 1"; bDetected = true; } else if (Amiga.compareEP("6000$$$$48e7ffff49fa....3c3c....4e944e913c3c....61..51..20112c78....4eae....53")) { sVersion = "1.0-3.1"; sOptions = "Overlayed Protected type 2"; bDetected = true; } else if (Amiga.compareEP("48e7ffff70..43fa....2c78....4eae....4a8067..2c40")) { sVersion = "1.0-3.1"; sOptions = "Library"; bDetected = true; } else if (Amiga.compareEP("48e7ffff49fa....3c3c....61..4e917c..61..2f49")) { sVersion = "4.0"; bDetected = true; } else if (Amiga.compareEP("48e7ffff70..60..70..43fa....4eae....4a8067")) { sVersion = "4.0"; sOptions = "Library"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_MOPacker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "MOPacker"); function detect() { if (Amiga.compareEP("48e7fffe4eb9........4cdf7fff4ef9........000003ec")) { sOptions = "temp detect"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_MaxPacker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "MaxPacker"); function detect() { if (Amiga.compareEP("283c........267a....41fa....d1fa....d7fa....49fa....341c121c101c")) { sVersion = "1.2"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_MegaCruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "MegaCruncher"); function detect() { if (Amiga.compareEP("47fa....200b222b....41fa....d1c1226b")) { sVersion = "1.0-1.2"; sOptions = "Address"; bDetected = true; } else if (Amiga.compareEP("48e7fffe2c78....4bfa....4cdd00034eae....4a8067")) { sVersion = "1.2"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_PackIt.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "PackIt"); function detect() { if (Amiga.compareEP("48e7....2c78....2e0e286e....4bfa....42954aac....66..41ec")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_Pak.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Pak"); function detect() { if (Amiga.compareEP("60$$48e77ffe43fa....2c78....4eae....2c4045fa....202a")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_PowerPacker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "PowerPacker"); function detect() { if (Amiga.compareEP("487a....48e7fffe49fa....2054d1c8d1c8")) { sVersion = "3.0"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("48e7fffe41fa....2050d1c8d1c84a982248")) { sVersion = "2.1-3"; bDetected = true; } else if (Amiga.compareEP("6000$$$$2f0e4dfa....48d6ffff4dee....2d5f")) { sVersion = "3.0"; sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("4e714e71487a....48e7fffe49fa....2054d1c8d1c858")) { sVersion = "3.0"; sOptions = "type 3"; bDetected = true; } else if (Amiga.compareEP("487a....48e7fffe2c78....43fa....45fa....2489")) { sVersion = "4.0"; sOptions = "Encrypted (type 1)"; bDetected = true; } else if (Amiga.compareEP("487a....48e7fffe2c78....203c........4eae....6000")) { sVersion = "4.0"; sOptions = "Encrypted (type 2)"; bDetected = true; } else if (Amiga.compareEP("487a....48e7fffe2c78....60$$4e714e71283c........4844")) { sVersion = "4.0"; sOptions = "Encrypted (type 3)"; bDetected = true; } else if (Amiga.compareEP("487a....48e7fffe70..43fa....2c78....4e......4a80")) { sVersion = "4.0"; sOptions = "Library"; bDetected = true; } else if (Amiga.compareEP("487a....48e7fffe2c78....283c........4e714e71")) { sVersion = "3.0"; sOptions = "Encrypted"; bDetected = true; } else if (Amiga.compareEP("48e7fffe41fa....d1fc........4ed0d1c858")) { sVersion = "4.0"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("6100$$$$2a572b7a........59..2c78....4eae....2f17487a....2f57")) { sVersion = "4.0"; sOptions = "type 2"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_ProPack.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "ProPack (RNC)"); function detect() { if (Amiga.compareEP("487a....48e7fffe487a....203c........72..2c78....4eae")) { sOptions = "Mode 1"; bDetected = true; } else if (Amiga.compareEP("487a....48e7fffe487a....2a574a956700....2a55dbcddbcd")) { sOptions = "Key Mode 2"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_ReXXMaSHeR.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "ReXXMaSHeR"); function detect() { if (Amiga.compareEP("6100$$$$48e7808041fa....6100....203a....41f9")) { sOptions = "by DCS"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_Relokit.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Relokit"); function detect() { if (Amiga.compareEP("48e7fffe41fa....70..3028....23c0........23e8............2028")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_S-Exec.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "S-Exec"); function detect() { if (Amiga.compareEP("48e7fffe207a....d1c8d1c858..2f0854..4e55....20080680")) { sVersion = "1.1"; sOptions = "by Chas Wyndham"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_Shrinkler.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Shrinkler"); function detect() { if (Amiga.compareEP("284b241c48e78088e58a2a4c2842241c66")) { sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("49fafffe2f0c2424264c263c........e58a")) { sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("49fa....2f0c2424264ce58a2a4c28422414")) { sOptions = "type 3"; bDetected = true; } else if (Amiga.compareEP("2413e5..26422c78....48e7....263c........43fa....4eae")) { sOptions = "type 4"; bDetected = true; } else if (Amiga.compareEP("243a....e5..26422c78....48e7....43fa....4eae")) { sOptions = "type 5"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_Spike.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Spike"); function detect() { if (Amiga.compareEP("60$$48e7fffe267a....d7cbd7cb588b2c78")) { sVersion = "1.1-1.6"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_StoneCracker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "StoneCracker"); function detect() { if (Amiga.compareEP("4df9........47f9........41fa....3d58....3d58")) { sVersion = "3.10-11b"; bDetected = true; } else if (Amiga.compareEP("41f9........30bc....59..30bc....41f9........47f9")) { sVersion = "4.01"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("48e7ffff4bfa....49fa....70..4e944e91")) { sVersion = "4.01"; sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("487a....48e7fffe49fa....2254d3c9d3c9")) { sVersion = "4.02a"; bDetected = true; } else if (Amiga.compareEP("45f9........43fa....280ad5d9d3d93c113e217a")) { sVersion = "4.02a"; sOptions = "Address"; bDetected = true; } else if (Amiga.compareEP("4e7145f9........43fa....2a4ad5d9d3d1")) { sVersion = "4.10.2-3"; sOptions = "Address"; bDetected = true; } else if (Amiga.compareEP("2c78....4bfa....4eee....33fc............33fc")) { sVersion = "4.10.2-3"; sOptions = "Address/Pro"; bDetected = true; } else if (Amiga.compareEP("487a....48e7fffe49fa....2654d7cbd7cb")) { sVersion = "4.10.2-3"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("4e714e71487a....48e7fffe49fa....2654d7cbd7cb")) { sVersion = "4.10.2-3"; sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("48e7fffe4df9........7e..7c..7a..1e3a....1a3a....1c3a....41fa")) { sVersion = "2.70-2.71"; bDetected = true; } else if (Amiga.compareEP("4df9........303c....3d40....3d40....3d40....3d40....4bf9")) { sVersion = "2.70-2.71"; sOptions = "Kill"; bDetected = true; } else if (Amiga.compareEP("4df9........4bfa....49f9........47fa....3d5b....18bc")) { sVersion = "2.92"; bDetected = true; } else if (Amiga.compareEP("............4bfa....49f9........45fa....3d5a....18bc....3d5a")) { sVersion = "2.99c-d"; bDetected = true; } else if (Amiga.compareEP("4df9........4bfa....49f9........45fa....3d5a....18bc....3c9a18bc")) { sVersion = "3.00"; bDetected = true; } else if (Amiga.compareEP("48e7fffe41fa....d1fc........4ed03d58....3d58....16bc....45fa")) { sVersion = "3.10"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_Super-Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "Super-Cruncher"); function detect() { if (Amiga.compareEP("48e7fffe2c79........4eae....41fa....2268....42a8....d3c9d3c959")) { sVersion = "2.7"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_SyncroPacker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "SyncroPacker"); function detect() { if (Amiga.compareEP("41fa....225820182648d1c01e201c2045fa....14a0")) { sVersion = "4.6"; bDetected = true; } else if (Amiga.compareEP("4df9........3cbc....3d7c........13fc............41fa....21c8....46fc")) { sVersion = "4.6 Pro"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_TUC.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "TUC (The Ultimate Cruncher)"); function detect() { if (Amiga.compareEP("48e7fff62a7c........7e..1e1d48471e1d")) { sVersion = "1.16d"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("60......2a7c........7e..1e1d48471e1d263c")) { sVersion = "1.16d"; sOptions = "type 2"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_TetraCrunch.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "TetraCrunch"); function detect() { if (Amiga.compareEP("41fa....d1fc........227c........2460d5c92020e2..66..61..65..72..76..e2")) { sVersion = "1.02"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_TetraPack.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "TetraPack"); function detect() { if (Amiga.compareEP("7e..41fa................d1fc....................2460d5c92020e2..66")) { sVersion = "2.1"; bDetected = true; } else if (Amiga.compareEP("4df9........7e..6000....3d40....3d40....3d40....13fc............41fa")) { sVersion = "2.1"; sOptions = "Pro"; bDetected = true; } else if (Amiga.compareEP("................................204cd1fc........b3cc6e..2049d1fa")) { sVersion = "2.2"; bDetected = true; } else if (Amiga.compareEP("4df9........7e..303c....4e714e713d40....3d40....13fc............41fa")) { sVersion = "2.2"; sOptions = "Pro"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_TryIt.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "TryIt"); function detect() { if (Amiga.compareEP("43fa....4e714e714e714e71264a4e714e714e714e714e714e714e714e714e714bfa")) { sVersion = "1.01"; sOptions = "type 1"; bDetected = true; } else if (Amiga.compareEP("43fa....2e29....45fa....47f9........284b303c....16da51c8")) { sVersion = "1.01"; sOptions = "type 2"; bDetected = true; } else if (Amiga.compareEP("43fa....2e29....45fa....264a4e714e71284b")) { sVersion = "1.01"; sOptions = "type 3"; bDetected = true; } else if (Amiga.compareEP("43fa....4e714e714e714e714e710005....4e714e714e714e714e714e714e714bfa")) { sVersion = "1.01"; sOptions = "type 4"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_TurboSqueezer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "TurboSqueezer"); function detect() { if (Amiga.compareEP("48e7fffe2c79........207a....d1c8d1c822582848d3c9d3c958")) { sVersion = "6.0-8.0"; bDetected = true; } else if (Amiga.compareEP("6000$$$$48e7fffe2c79........207a....d1c8d1c822582848d3c9d3c958")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/cruncher_xpkmaster.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cruncher", "xpkmaster"); function detect() { if (Amiga.compareEP("6000$$$$2c78....43fa....4eae....2c4041fa....4eae....2c78")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/joiner_ETA.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("joiner", "ETA Text Linker"); function detect() { if (Amiga.compareEP("48e7fffe41fa....59..2010e5..58..43fa....2340....2c78....43fa")) { sVersion = "0.91-0.99"; bDetected = true; } else if (Amiga.compareEP("48e7fffe41fa....59..2010e5..58..43fa....2340....203a....53..43fa")) { sVersion = "1.00"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/joiner_EXP.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("joiner", "EXP ASCII Linker"); function detect() { if (Amiga.compareEP("48e7fffe4e7143fa....2c78....4eae....2c404eae....220067..41fa")) { sVersion = "1.1"; sOptions = "1992 by Dr. Gassu //Elysion"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/joiner_Glue.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("joiner", "Glue (ANSI Linker)"); function detect() { if (Amiga.compareEP("48e7fffc2c78....93c94eae....2a407a..4aad....66..41ed")) { sVersion = "2.3"; sOptions = "1994 by Bigmama Of Focus Design"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/library_library.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("library", "library"); function detect() { if (Amiga.compareEP("70..4e754afc")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/module_DeliTracker.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("module", "DeliTracker player"); function detect() { if (Amiga.compareEP("70FF4E75'DELIRIUM'")) { bDetected = true; } else if (Amiga.compareEP("........'DELIRIUM'")) { bDetected = true; sOptions = "Startup code"; } return result(); } ================================================ FILE: db/Amiga/other_other.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "other"); function detect() { if (Amiga.compareEP("70..4e75'WHDLOADS'")) { sName = "WHDLOAD object"; bDetected = true; } else if (Amiga.compareEP("70..4e75'AUTOSCPP'")) { sName = "SCPP object"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/self-displayer_DPS.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "DPS (IFF images self-displayer)"); function detect() { if (Amiga.compareEP("43fa....70..2c78....4eae....26406700....43fa....70")) { sVersion = "1.0"; sOptions = "by Foster Hall"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/self-displayer_Iff2ex.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "Iff2ex"); function detect() { if (Amiga.compareEP("43f9........203c........2c79........4eae....4a806700....23c0........43f9........203c")) { sVersion = "1.0"; sOptions = "by Pieter van Leuven"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/self-displayer_S-Anim.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "S-Anim"); function detect() { if (Amiga.compareEP("4e55....48e7808042ad....93c92c78....4eae....28404aac")) { sVersion = "1.1-1.3"; sOptions = "by Chas Wyndham"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/self-displayer_S-Pic.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "S-Pic"); function detect() { if (Amiga.compareEP("4e55....48e7808042ad....93c92c79........4eae....28404aac")) { sVersion = "1.2"; sOptions = "by Chas Wyndham"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/sfx_DIMP.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "DIMP"); function detect() { if (Amiga.compareEP("6000$$$$327c....48e780c02c78....42a7203c........72..48414eae")) { sOptions = "DMS disks packer"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/sfx_DMSSFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "DMS-SFX by SDS Software"); function detect() { if (Amiga.compareEP("49f9........2c78....43f9........70..4eae....23c0........2c404eae")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/sfx_LHASFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "LHASFX"); function detect() { if (Amiga.compareEP("6000$$$$2a484230....49fa....2854d9ccd9cc294f....2c78....43fa")) { bDetected = true; } return result(); } ================================================ FILE: db/Amiga/sfx_LHSFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "LHSFX by Mike Kennedy"); function detect() { if (Amiga.compareEP("43f9........23c9........43f9........2c79........4eae....23c0........6700....2c404eae")) { sOptions = "1991"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/tool_EFFECT-loader.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("tool", "EFFECT-loader"); function detect() { if (Amiga.compareEP("60$$487a....4879........48e7fffe48e780804bfa....43fa....2c78....4eae")) { sVersion = "1.5-1.6"; bDetected = true; } return result(); } ================================================ FILE: db/Amiga/tool_VideoTracker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://home.deds.nl/~pvc70/vtindex.htm meta("tool", "VideoTracker"); function detect() { if (Amiga.compareEP("6000$$$$93c92c78....4eae....284070..4aac....66..41ec....2c78")) { bDetected = true; } return result(); } ================================================ FILE: db/Archive/_Archive.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "Archive"); function detect() { if (Archive.isVerbose()) { sName = Archive.getFileFormatName(); sVersion = Archive.getFileFormatVersion(); sOptions = Archive.getFileFormatOptions(); if (sName) { bDetected = true; } } return result(); } ================================================ FILE: db/Archive/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = Archive; var X = Archive; ================================================ FILE: db/AtariST/_AtariST.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "Atari ST"); function detect() { if (AtariST.isVerbose()) { sName = AtariST.getOperationSystemName(); sVersion = AtariST.getOperationSystemVersion(); sOptions = AtariST.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/AtariST/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = AtariST; var X = AtariST; ================================================ FILE: db/Binary/Amiga_loadable.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG @kaens) meta("format", ""); function detect() { if (Binary.compare("000003F300")) { bDetected = true; sName = "Amiga loadable file"; // sOption(outSz(calcAmigaFileSize()), 'sz:'); } else if (Binary.compare("000003E700")) { bDetected = true; sName = "Amiga object/library file"; } return result(); } ================================================ FILE: db/Binary/Certificate_cert.WinAuth.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("Certificate", "WinAuth"); function detect() { if (Binary.compare("........00020200")) { sVersion = "2.0"; sOptions = "PKCS #7"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/RIFF.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("format"); function detect() { if (Binary.compare("'RIFF'........'CDR'")) { sName = "CorelDraw graphics (.CDR)"; bDetected = true; } else if (Binary.compare("'RIFF'........'AVI '")) { sName = "AVI"; bDetected = true; } else if (Binary.compare("'RIFF'........'WEBPVP8'")) { sName = "WebP"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/ROM_1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Covers cartridge, tape, or CD-delivered software, such as ROM images for various //videogame systems, and/or for their emulators. //Also includes snapshots like VSF or SNA, and resource packs like WAD. // Authors: // Kaens TG@kaens // (...yes I'm looking at you, you obviously want to add something so go ahead) meta("ROM", ""); /* beautify ignore:start */ function detect() { // this C-like pre-declaration is here because lol Qt6 var p = 0, i = 0, j = 0, k = 0, l = 0, r = 0, t = 0, x = 0, n = 0, trk = 0, files = 0, sz = -1, fl = -1, sides = -1, ro = -1, title = '', tl = '', a = '', c = '', msg = '', artist = '', hw = '', soption = '', bad = '', fnames = []; if ((X.c("'A2R1'FF0A0D0A ................'DATA'")) || X.c("'A2R'..FF0A0D0A 'INFO'") && isWithin(X.U8(3), 0x32, 0x33)) { //ref https://applesaucefdc.com/a2r/ & https://applesaucefdc.com/a2r2-reference/ sName = "Apple II Applesauce disk archival image (.A2R)"; sVersion = 'v' + X.SA(3, 1); if (v1 = X.c("'1'", 3)) { bDetected = true; p = 0x10 } else p = 8; meta = bad = ''; while (p < X.Sz()) { var hkhd = X.SA(p, 4), hksz = X.U32(p + 4, v1 ? _BE : _LE); p += 8; switch (hkhd) { case 'INFO': if (v1) meta = X.SC(p, hksz, 'UTF8').replace(/\x0A/g, ",").replace(/\x09/g, ":"); else { iV = X.U8(p); bDetected = true; switch (X.U8(p + 33)) { case 1: dim = '5¼" SS 40trk 0.25 step'; break; case 2: dim = '3½" DS 80trk Apple CLV'; break; case 3: dim = '5¼" DS 40trk'; break; case 4: dim = '5¼" DS 80trk'; break; case 5: dim = '3½" DS 80trk'; break; case 6: dim = '8" DS'; break; case 7: dim = '3" DS 80trk'; break; case 8: dim = '3" DS 40trk'; break; default: dim = '?' } sOption('disk:' + dim); if (X.U8(p + 34) == 1) sOption('write-protected'); if (iV >= 2) { if (t = X.U8(p + 42)) sOption(t, 'min.RAM:', 'k'); t = ''; fl = X.U16(p + 40); if (!fl) t = '?'; if (fl & (1 << 0)) t = t.append(']['); if (fl & (1 << 1)) t = t.append('][ Plus'); if (fl & (1 << 2)) t = t.append('//e'); if (fl & (1 << 3)) t = t.append('//c'); if (fl & (1 << 4)) t = t.append('//e Enhanced'); if (fl & (1 << 5)) t = t.append('IIgs'); if (fl & (1 << 6)) t = t.append('//c Plus'); if (fl & (1 << 7)) t = t.append('///'); if (fl & (1 << 8)) t = t.append('/// Plus'); sOption(t, 'for Apple '); } } break; case 'DATA': case 'STRM': case 'RWCP': case 'SLVD': break; case 'META': meta = X.SC(p, hksz, 'UTF8').replace(/\x0A/g, ",").replace(/\x09/g, ":"); break } p += hksz; } if (p > X.Sz()) bad = bad.addIfNone('!short'); //if(X.isDeepScan() && X.calculateCRC32(12,sz-12) != X.U32(8)) bad = bad.addIfNone('!badcrc'); if (bad != '') sVersion = sVersion.appendS('/malformed' + bad, '/') if (X.isVerbose()) { sOptionT(addEllipsis(meta), 'info:"', '"'); sOption(outSz(p), 'sz:'); } } else if (X.c("'AT8X'") && isWithin(t0p = X.U32(0x1C), 0x24, 0x40) && X.c("0000", t0p + 4) && isWithin(t0sz = X.U32(t0p), (t0hdsz = X.U32(t0p + 0x14)) + X.U32(t0p + t0hdsz), 0x1000) && isWithin(t0sec = X.U16(t0p + 0xA), 1, 40) && X.U32(t0p + t0hdsz) == 8 + 8 * t0sec) { //ref http://www.whizzosoftware.com/sio2arduino/vapi.html sName = "Atari VAPI/ATX disk image (.ATX)"; sVersion = 'v' + X.U16(4); bDetected = true; if (X.isVerbose()) { for (trk = 0, p = t0p, sec = 0; trk < 40 && p < X.Sz(); trk++, p += X.U32(p)) sec += X.U16(p + 0xA); sOption('trk:' + trk + ' sec.total:' + sec + ' sz:' + outSz(p)) } } else if (X.c("''") && X.c("''", (sz = X.U16(0x11, _LE)) - 8)) { sName = "Bally Arcade/Astrocade BASIC tape (.BIN)"; bDetected = true; if (X.isVerbose()) sOption(outSz(sz), 'sz:') } else if (X.c("0E0000800E..FFFE........FFFFFFFF020000000200..FFFFFFFFFE") && [0x1F, 0x2F].indexOf(X.U8(5)) >= 0 && [0x1F, 0x7F].indexOf(X.U8(0x161)) >= 0) { sName = "Casio Loopy (big-endian) cartridge (.BIN)"; bDetected = true } else if (X.c("4C....4C....01'CBM::::::::'") && X.c("FF", 0x333E) && X.c("FF", 0x3980)) { sName = "Commodore Plus/4 cartridge (.BIN)"; bDetected = true } else if (X.c("000003", 0x08) && X.c("'DMC '", 0x100) && X.c("' GM 00000000-00'", 0x160)) { sName = "AtGames/中娛/愛勝 Firecore digital media cartridge (.BIN)"; bDetected = true } // else if([0x1F,0x20].indexOf(X.U8(0) >= 0) && // (X.fSig(1,0x200,"929376..7702") > 0) || X.fSig(1,0x200,"9276..937702") > 0) { // quite a few ROMs mismatch it // // 2560 is a pretty unique CPU, may be possible to statistically analyse the instructions and go from there // sName = "Emerson Arcadia 2001 cartridge (.BIN)"; bDetected = true // } else if (X.c("F50400") && X.c("04", 0x800) && X.c("8383", 0x808) && F.Sz() == 0x1000) { sName = "Entex Adventure Vision cartridge (.BIN)"; bDetected = true } else if ((X.c("55..40..40....00") || X.c("5512521252B0")) && X.U8(1) == X.U8(3) && (X.Sz() == 0x2000 || X.Sz() == 0x4000)) { sName = "Epoch ゲームポケコン/Game Pocket Computer cartridge (.BIN)"; bDetected = true } else if (X.c("BBA56EB3E9C5A7A4CCB3D7B2CFA8CEA5CCAAA3A46FB1EFB9BBA56EB3E9C569B6E6A6F4A5F3A6CFA456A675A47BB5'r(vereese gnniee)rB'A1CFA4D5B2B6C442A1CFA473BDB6C4CEA9F3A7EFA7BBA56EB3E9C5ECAD6CA97BB5A1A65DB370AD57A4EFB96EB3E9C5BAAAEAC277A950BBD1B8A3B0EAC277A9'rTdamera kybU inet diMrceoeltcorinscC ro.pa dnF nuethcE tnreatniemtnC ro.pA llr gith seresvrde .iLecsn esip reimttde'002E", 0x2000) || X.c("1E00E32AE401E501 E601E7011B48E801 E901EAC401300EEB 01B426ECEED26401 EF26F00108604E30 F201F301F4010128")) { sName = "Funtech Super Acan cartridge (.BIN)"; bDetected = true } else if ((X.c("AA04FFFF68FF") || X.c("AA4E840D196900") || X.c("AA544E85706A90") || X.c("AA54E9A7640202") || X.c("AAC0BA69004DCC") || X.c("AA694169146914")) && isWithin(X.Sz(), 0x2000, 0x8000) && !(X.Sz() & 0xFFF)) { sName = "Hartung Game Master cartridge (.BIN)"; bDetected = true } else if (X.c("'ZPJ'") && X.c("0003....0003", 0x18) && charStat(X.SA(3, 3)) == 'allnum' && charStat(X.SA(6, 13), true).indexOf('allasc' >= 0)) { // name db: https://github.com/libretro/libretro-database/blob/master/metadat/no-intro/Konami%20-%20Picno.dat sName = "Konami Picno image (.BIN)"; bDetected = true; sOption(charStat(X.SA(3, 3))) if (X.isVerbose()) { var t = X.SA(3, 13); while (t.length && t[t.length - 1] == '+') t = t.slice(0, t.length - 1) sOption(t) } } else if (X.c("'Copyright LeapFrog '00..01010000000080", 0x100)) { sName = "Leapfrog Leapster Learning Game System image (.BIN)"; bDetected = true; if (X.fSig(1, 0x1000, "'Lil ducked. The jet zipped past her head. Dust flew, Lil sneezed, and Leap turned red. Then Lil got up, about to yell. Leap gasped, \"Look, Lil! Your tooth! It fell!\"'")) sVersion = 'Approved Content'; else sVersion = 'unapproved content' //what a way to show something so useless } else if (!(X.Sz() & 7) && (t = X.fSig(0, 0x1000, "1FA6DEBACC137D74")) >= 0 && !(t & 7)) { sName = "Microsoft MSX tape image (.CAS)"; bDetected = true } else if (X.c("00000000'Root-CPCA00000108-CP00000110'00000000000000000000000000000000000000000000000000000000000000000000000000", 0x2854)) { sName = "iQue (N64 for China) CMD (.CMD)"; bDetected = true } else if (X.c("803712400000000F80....00000014") && X.c("AD0000", 0x1010) && X.c("FF", 0x101E)) { sName = "iQue (N64 for China) Z64 image (.Z64)"; bDetected = true } else if (X.c("'C64 CARTRIDGE '") && (p = X.U32(0x10, _BE)) >= 0x40 && X.c("'CHIP'", p)) { //ref 64copy / formats.zip/CRT.TXT bDetected = true; sName = "Commodore 64 cartridge (.CRT)"; sVersion = "v" + X.U8(0x14) + "." + X.U8(0x15).padStart(2, '0'); bad = ''; while (p < X.Sz()) { if (!X.c("'CHIP'", p)) break; var hksz = X.U32(p + 4, _BE), romsz = X.U16(0x0E, _BE); if (romsz > hksz - 0x10) bad = bad.addIfNone('!badchipsz'); if (p + hksz > X.Sz()) if (p + 0x10 + romsz <= X.Sz()) { //ignore the weird chunk length, use the ROM length p += romsz + 0x10; bad = bad.addIfNone('!badchunk'); continue } else if (!X.isVerbose() && p + hksz > X.Sz()) { bad = bad.addIfNone('!short') } p += hksz } if (bad != '') sVersion = sVersion.appendS('malformed' + bad, '/'); if (X.isVerbose()) { sOption(X.SC(0x20, 0x20, "Shift_JIS")); switch (X.U16(0x16, _BE)) { case 0: hw = "normal cartridge"; break; case 1: hw = "Action Replay"; break; case 2: hw = "KCS Power Cartridge"; break; case 3: hw = "Final Cartridge III"; break; case 4: hw = "Simons Basic"; break; case 5: hw = "Ocean type 1"; break; case 6: hw = "Expert Cartridge"; break; case 7: hw = "Fun Play, Power Play"; break; case 8: hw = "Super Games"; break; case 9: hw = "Atomic Power"; break; case 10: hw = "Epyx Fastload"; break; case 11: hw = "Westermann Learning"; break; case 12: hw = "Rex Utility"; break; case 13: hw = "Final Cartridge I"; break; case 14: hw = "Magic Formel"; break; case 15: hw = "C64 Game System/System 3"; break; case 16: hw = "WarpSpeed"; break; case 17: hw = "Dinamic"; break; case 18: hw = "Zaxxon, Super Zaxxon (SEGA)"; break; case 19: hw = "Magic Desk/Domark/HES Australia"; break; case 20: hw = "Super Snapshot 5"; break; case 21: hw = "Comal-80"; break; case 22: hw = "Structured Basic"; break; case 23: hw = "Ross"; break; case 24: hw = "Dela EP64"; break; case 25: hw = "Dela EP7x8"; break; case 26: hw = "Dela EP256"; break; case 27: hw = "Rex EP256"; break; case 28: hw = "Mikro Assembler"; break; case 29: hw = "reserved"; break; case 30: hw = "Action Replay 4"; break; case 31: hw = "StarDOS"; break; case 32: hw = "EasyFlash"; break; default: hw = "?"; } sOption('hw.type: ' + hw + ' /EXROM:' + (X.U8(0x18) ? 'inactive' : 'active') + ' /GAME:' + (X.U8(0x19) ? 'inactive' : 'active') + ' sz:' + outSz(p)); } } function isDC42() { //ref https://www.discferret.com/wiki/Apple_DiskCopy_4.2 if (X.Sz() < 0x32000 || !X.c("0100", 0x52) || !isWithin(tl = X.U8(0), 1, 0x3F)) return false; title = X.SC(1, tl, 'CP1252'); var tcs = charStat(title, true); if (tcs.indexOf('allxsc') < 0) return false; if (tl != X.U8(0x478) || title != X.SC(0x479, X.U8(0x478), 'CP1252')) return false; //the volume label, I presume var discsz = X.U32(0x40, _BE), tagsz = X.U32(0x44, _BE); if (!isWithin(discsz, 0x32000, 0x200000) || (tagsz && discsz * 12 / 512 != tagsz)) return false; if (!tagsz && X.U32(0x4C, _BE)) return false; sz = 0x54 + discsz + X.U32(0x44, _BE); discszt = Util.divu64(discsz, 1024) + 'k'; switch (X.U8(0x50)) { case 0: discszt += ' GCR CLV ssdd'; break; case 1: discszt += ' GCR CLV dsdd'; break; case 2: discszt += ' MFM CAV dsdd'; break; case 3: discszt += ' MFM CAV dshd'; break; default: discszt += ' unk.type' } return true } if (!bDetected && isDC42()) { sName = "Apple DiskCopy 4.2 disk image (.DC42)"; sVersion = discszt; bDetected = true; if (X.isVerbose()) { sOption(title); sOption(outSz(sz), 'sz:') } } if (!bDetected) if (X.c("'ACT Apricot disk image'1A04") && isAllZeroes(0x18, 0x58)) { //ref https://github.com/latchdevel/HxCFloppyImageConverter/blob/master/libhxcfe/trunk/sources/loaders/apridisk_loader/apridisk_format.h sName = "Jonathan Marsters's ACT/Apricot PC ApriDisk image (.DSK)"; bDetected = true; var cyl = sec = 0, interrupt = false, cmt = by = ''; for (p = 0x80; p < X.Sz();) { var hkhd = X.U32(p), hdsz = X.U16(p + 6), hksz = X.U32(p + 8); switch (hkhd) { case 0xE31D0000: break; //del case 0xE31D0001: //sec if ((t = X.U8(p + 13)) > sec) sec = t; if ((t = X.U16(p + 14) + 1) > cyl) cyl = t; break; case 0xE31D0002: cmt = X.SA(p + hdsz, hksz); break; case 0xE31D0003: by = X.SA(p + hdsz, hksz); break; default: interrupt = true } if (interrupt) break; p += hdsz + hksz; if (hkhd == 0xE31D0002) break } if (X.isVerbose()) { sOption(cmt); sOption(by, 'by: '); sOption('cyl:' + cyl + ' sec:' + sec + ' sz:' + outSz(p)) } else if (p > X.Sz()) sVersion = 'malformed!short' } else if ((X.c("'EXTENDED CPC DSK File'0D0A'Disk-Info'0D0A") || X.c("'MV - CPCEMU Disk-File'0D0A'Disk-Info'0D0A") || X.c("'MV - CPC'")) && isWithin(trk = X.U8(0x30), 20, 84) && isWithin(sd = X.U8(0x31), 1, 2) && X.c("'Track-Info'0D0A000000", 0x100)) { //ref https://github.com/latchdevel/HxCFloppyImageConverter/blob/master/libhxcfe/trunk/sources/loaders/cpcdsk_loader/* sName = "Amstrad CPC disk image (.DSK)"; bDetected = true; if (X.c("'E'")) { trksz = 0; sVersion = 'extended' } else trksz = X.U16(0x32) + 1; if (X.isVerbose()) { sOption(X.SA(0x22, 0xE)); sOption('trk:' + trk + (trksz ? ' trksz:' + trksz : '') + ' sides:' + sd) } } function isEALIB() { //from https://aluigi.altervista.org/bms/ealib.bms if (!X.c("'EALIB'")) return false; n = X.U16(5); var oldp = p = 7; for (var i = 0; i < n && p < X.Sz(); i++) { p += 0xD; var z = X.U8(p++), ofs = X.U32(p); p += 4; if (z > 4 || !isWithin(ofs, p, X.Sz())) return false; } return true } if (!bDetected && isEALIB()) { sName = "Electronic Arts Library resource pack"; bDetected = true; if (X.isVerbose()) sOption(n, 'files:') } if (!bDetected) if (X.c("'FCSX'") && X.U32(4) > X.U32(8) && X.U32(8) <= X.Sz()) { //found this one in a collection of NES ROMs sName = "FCSX zlib format (.FCS)"; bDetected = true; if (X.isVerbose()) sOptions = 'Zlib @10h, unp.sz:' + X.U32(4) + ' sz:' + outSz(X.U32(8)) } function isPC98FDI() { if (!X.c("00000000")) return false; var id = X.U32(4), hdrsz = X.U32(8), datasz = X.U32(0xC), bpsec = X.U32(0x10), sec = X.U32(0x14), heads = X.U32(0x18), cyl = X.U32(0x1C); if ([0x10, 0x30, 0x90].indexOf(id) < 0 || bpsec * sec * heads * cyl != datasz || (sz = hdrsz + datasz) > X.Sz() || hdrsz < 0x20) return false; if (id == 0x10 && !isWithin(datasz, 0x80000, 0xB6000) //let's allow some space for stupid formatting || id == 0x30 && !isWithin(datasz, 0x160000, 0x300000) || id == 0x90 && !isWithin(datasz, 0x120000, 0x140000)) return false; info = 'disc:' + (id == 0x10 ? "640/720k" : id == 0x30 ? "1.44M" : id == 0x90 ? "1.2M" : '?') + ' (' + (datasz / 0x400).toFixed(1) + 'k)'; info = info.append('hd:' + heads + ' cyl:' + cyl + ' sec:' + sec + ' sz:' + outSz(sz)) return true } if (isPC98FDI()) { sName = "EPSON's PC-98 disk image (.FDI)"; bDetected = true; if (X.isVerbose()) sOption(info) } //.GG has no clear header... if (!bDetected) if (X.c("EB0A9090'IPL1'0000001EA08405B48ECD1BA8", 0x1000) && //empirical and may be incorrect! X.c("E9D102' NEC 'CADFB0BFC5D9BADDCBDFADB0C08CC592E8836683428358834E8B4E93AE8381836A8385815B8376838D834F8389838020CADEB0BCDEAEDD' 2.'....' Copyright (C) NEC Corporation 1985,'", 0x1400)) { sName = "NEC PS-98 hard disk image (.HDI)"; bDetected = true } else if ((X.c("EB1C904E") || X.c("EB2790B1") || X.c("EB279028") || X.c("EB3C9027") || X.c("EB3C904E")) && X.c("000401010002C000D004FE0200080002000000", 0xB) || (X.c("EB..90") && X.Sz() == 0x134000)) { // and no real way to detect user disks sName = "NEC PC-98 disk image (.HDM)"; bDetected = true } function isHOBETA() { if(X.Sz() < 0x111) return; var chk = 0; for (var i=0; i < 0xF; ++i) { if(i < 9 && X.U8(i) < 0x20) return; chk += X.U8(i) } chk = (105+0x101*chk) & 0xFFFF; if(chk != X.U16(0xF)) return; sz = X.U16(0xB); addr = X.U16(9); alsz = X.U16(0xD); if(!isWithin(alsz, 0x100,0xFF00) || !isWithin(sz, 0x100,0xFF00) || addr < 0x4000 /*ROM*/ || addr+sz > 0x10000) return; if(sz+(sz%0x100? (0x100-sz%0x100): 0) != alsz) return; var tp = X.U8(8); return true; } if(isHOBETA()) { sName = 'ZX Spectrum HOBETA wrapper (.HOB)'; bDetected = true; sOptions = decAnsi(0, 8, CPSpeccy).trim()+'.'+X.SA(8,1); if(X.isVerbose()) sOption('data @11h['+Hex(sz)+'] RAM$'+addr.toString(16)+' sz:'+outSz(0x11+alsz)); else if(0x11+alsz > X.Sz()) sVersion = 'malformed!short'; } if(!bDetected) if (X.c("'HXCPICFE'") && isWithin(sides = X.U8(0xA), 1, 2) && isWithin(baud = X.U16(0xC) * 1000, 150000, 3000000) && (ro = X.U8(0x11)) <= 1) { //ref https://github.com/latchdevel/HxCFloppyImageConverter/blob/master/libhxcfe/trunk/sources/loaders/hfe_loader/hfe_format.h // & hfe_writer.c & hfe_loader.c sName = "HxC PIC/HFE disk image (.HFE)"; sVersion = 'rev.' + X.U8(8); bDetected = true; if (X.isVerbose()) { const trkencs = ["ISO IBM MFM", "Amiga MFM", "ISO IBM FM", "emulated FM", "unk."], ifmodes = ["IBM PC DD", "IBM PC HD", "Atari ST DD", "Atari ST HD", "Amiga DD", "Amiga HD", "Amstrad CPC DD", "generic Shugart DD", "IBM PC ED", "MSX2 DD", "Commodore 64 DD", "emulated Shugart"]; var trk = X.U8(9), ifmode = X.U8(0x10), tofs = [], t = X.U8(0xB), sz = 0x200, datasz = 0; p = 0x200; trkenc = t > 3 ? trkencs[4] : trkencs[t] & 3; ifmode = ifmode <= 0xB ? ifmodes[ifmode] : 'unk.'; for (i = 0; i < trk && p < X.Sz(); i++, p += 4) { datasz += t = X.U16(p + 2) } t = t & 0x1FF ? 0x200 + (t & 0xFFFFFE00) : t; sz = X.U16(p - 4) * 0x200 + t; sOption('trk:' + trk + (sides == 2 ? ' DS' : ' SS')); sOption(trkenc, 'trkenc:'); sOption(ifmode, 'floppy mode:'); sOption(ro ? 'write-protected' : ''); sOption(baud + ' baud = ' + (baud / 8192).toFixed(1) + 'k/s'); sOption('datasz:' + datasz + ' sz:' + outSz(sz)) } } else if (X.c("'CHKH'........00000000") && X.c("'CHKH'........01000000", X.U32(4)) && X.Sz() > 12) { //ref https://github.com/latchdevel/HxCFloppyImageConverter/blob/11ee45a77f237846eebdf1c6f1c732e5c0505be5/libhxcfe/trunk/sources/loaders/hxcstream_loader/hxcstream.c#L143 sName = "HxC Stream Loader disk track (.hxcstream)"; bDetected = true; } else if (X.c("'CAPS'0000000C1CD573BA'INFO'00000060") && X.c("'IMGE'", 0x6C)) { //ref http://info-coach.fr/atari/documents/_mydoc/IPF-Documentation.pdf sName = "SPS's KryoFlux Interchangeable Preservation Format disk image (.IPF)"; bDetected = true; switch (X.U32(0x048, _BE)) { case 0: sVersion = 'no-platform'; break; case 1: sVersion = 'Amiga'; break; case 2: sVersion = 'Atari ST'; break; case 3: sVersion = 'PC'; break; case 4: sVersion = 'Amstrad CPC'; break; case 5: sVersion = 'ZX Spectrum'; break; case 6: sVersion = 'SAM Coupe'; break; case 7: sVersion = 'Acorn Archimedes'; break; case 8: sVersion = 'C64'; break; case 9: sVersion = 'Atari 8-bit'; break; default: sVersion = 'unk.' } sVersion += X.U32(0x18, _BE) == 1 ? ' floppy' : ' unk.media'; if (X.isVerbose()) { for (p = 0x6C, density = '', densities = []; p < X.Sz();) { hkhd = X.SA(p, 4); if (!/[A-Z]{4}/.test(hkhd) || !X.c("0000", p + 4)/*a floppy block can't be this long*/) break; hksz = X.U32(p + 4, _BE); if (hkhd === 'IMGE') { switch (X.U32(p + 20)) { case 3: density = 'Copylock Amiga'; break; case 4: density = 'Copylock Amiga new'; break; case 5: density = 'Copylock ST'; break; case 6: density = 'Speedlock Amiga'; break; case 7: density = 'Speedlock Amiga old'; break; case 8: density = 'Adam Brierley Amiga'; break; case 9: density = 'Adam Brierley & density key Amiga'; break; } if (densities.indexOf(density) < 0) densities.push(density); } else if (hkhd === 'DATA') p += X.U32(p + 12, _BE); p += hksz } sOption(X.U32(0x28, _BE), 'rev.'); sOption('tracks:' + X.U32(0x30, _BE) + '-' + X.U32(0x34, _BE) + ' sides:' + (1 + X.U32(0x3C, _BE))); sOption(X.U32(0x1C, _BE) == 1 ? 'CAPS' : X.U32(0x1C, _BE) == 2 ? 'SPS' : 'unk.', 'encoder:', ' rev.' + X.U32(0x20, _BE)); sOption(Hex(X.U32(0x24, _BE), 8), 'cat.ID:'); sOption(densities.join(' + '), 'copy protection:'); sOption('sz:' + outSz(p)) } } else if (X.c("'JFDI'") && isWithin(tt = X.U32(0x18), 0x130, X.Sz()) && isWithin(st = X.U32(0x1C), tt, X.Sz()) && isWithin(dt = X.U32(0x20), st, X.Sz()) && X.c("FFFFFFFF", st - 4) && X.c("FFFFFFFF", dt - 8) && (!(dtt = X.U32(0x24)) || isWithin(dtt, dt, X.Sz())) && (!(dst = X.U32(0x28)) || isWithin(dst, dt, X.Sz())) && (!(ddt = X.U32(0x2C)) || isWithin(ddt, dt, X.Sz()))) { //ref https://gist.github.com/Kaens/a139d96dc429b49788e47ea57e55017d sName = "Acorn Archimedes ADFFS JFD disk image (.JFD)"; bDetected = true; nV = Util.divu64(nv = X.U32(4, _LE), 100); nv %= 100; sVersion = 'v' + nV + '.' + nv; +'+/img v' + ((iv = X.U8(0x14)) >> 5) + '.' + (iv & 0x1F); if (X.isVerbose()) { sOption('tt:' + Hex(tt) + ' st:' + Hex(st) + ' dt:' + Hex(dt)) sOption(addEllipsis(decAnsi(0x30, 0x100, CPRISCOS).trim(), 0xC0, 0xA0)); if ((ds = X.U16(0xE)) > 1) sOptions += ' (' + X.U16(0xC) + '/' + ds + ')'; sOption('trk:' + Util.divu64(st - tt, 4) + ' sec:' + (Util.divu64(dt - st - tt * 4, 8))); if (X.U32(4) >= 204) { fl = X.U32(0x130); if (fl & (1 << 0)) sOption('write-protected'); if (fl & (1 << 2)) sOption('Protect CMOS req.'); if (fl & (1 << 3)) sOption('Protect Modules req.'); if (fl & (1 << 5)) sOption('Shift+Break to load'); sOption('for:'); if (fl & (1 << 8)) sOption('ARM3'); if (fl & (1 << 9)) sOption('ARM250'); if (fl & (1 << 10)) sOption('ARM610/710'); if (fl & (1 << 11)) sOption('ARM7500'); if (fl & (1 << 12)) sOption('StrongArm'); if (fl & (1 << 13)) sOption('ARMv5/v6/v7'); if (fl & (1 << 16)) sOption('RiscOS 2'); if (fl & (1 << 17)) sOption('RiscOS 3.1'); if (fl & (1 << 18)) sOption('RiscOS 3.5'); if (fl & (1 << 19)) sOption('RiscOS 3.7'); if (fl & (1 << 20)) sOption('RiscOS 3.8/4.x'); if (fl & (1 << 21)) sOption('RiscOS 5.x'); if (fl & (1 << 22)) sOption('RiscOS 6.x'); if (X.U8(0x134)) sOption('fps:' + (X.U8(0x134) / 2)); if (X.U32(0x138)) sOption('Obey file sz:' + X.U32(0x138)); sOption('datasz:' + X.U32(8)); if (ddt) sOption('delta data') } } } function isSega100h() { if (X.Sz() < 0x1000 || !X.c("'SEGA '",0x100)) return [false]; sus = 0; if(![' ','RA'].includes(X.SA(0x1B0,2))) sus++; sn = X.SA(0x180, 14); if(sn[11] != '-' ) sus++; if(!['GM ', 'AI ', 'OS ', 'BR '].includes(sn.slice(0, 3))) sus++; ar = [[X.U32(0x1A0,_BE),X.U32(0x1A4,_BE)+1], [X.U32(0x1A8,_BE),X.U32(0x1AC,_BE)+1]]; //ROM & RAM address ranges if (ar[0][1] & 0xFF != 0xFF) sus++; if (ar[1][1] & 0xFF != 0xFF) sus++; if (!isWithin(ar[0][1], 0x1000, 0x7FFFFFFF)) sus++; if (!isWithin(ar[1][0], 0xFF0000, 0x7FFFFFFF)) sus++; if (sus > 3) return [false]; if (X.c("'MEGA DRIVE'", 0x100) || X.c("'GENESIS'", 0x100)) return [true, "Sega Mega Drive/Genesis (.MD)"] else if (X.c("'32X '", 0x105)) return [true, "Sega Mega Drive + 32X (.32X)"] else if (X.c("'EVERDRIVE '", 0x105)) return [true, "Sega Mega Drive (Everdrive ext.)"] else if (X.c("'SSF '", 0x105)) return [true, "Sega Mega Drive (Mega Everdrive ext.)"] else if (X.c("'MEGAWIFI'", 0x105)) return [true, "Sega Mega Drive (Mega Wifi ext.)"] else if (X.c("'PICO '", 0x105)) return [true, "Sega PICO"] else if (X.c("'TERA68k", 0x105) || X.c("'TERA286'", 0x105)) return [true, "Sega Tera Drive (.TD)"]; return [false]; } if ((t=isSega100h())[0]) { //ref https://plutiedev.com/rom-header sName = t[1]; bDetected = true; if((t=sn.slice(12,14)) == [0] || t == '00') sVersion = 'initial'; else sVersion = 'v'+t[0]+'.'+t[1]; switch (sn.slice(0,2)) { case 'GM': sVersion += '/Game'; break; case 'AI': sVersion += '/Aid'; break; case 'OS': sVersion += '/Boot ROM (TMSS)'; break; case 'BR': sVersion += '/Boot ROM (Sega CD)' } if(X.isVerbose()) { title = X.SC(0x120, 0x30, "SJIS").trim(); t = X.SC(0x120, 0x30, "SJIS").trim(); if(title != t) sOption(title+' / '+t); else sOption(title); sOption('ROM@'+Hex(ar[0][0])); if(X.SA(0x1B0,2) === 'RA') sOption('extra RAM'); ft = ''; for(i=0x190; i < 0x1A0;) { c = X.SA(i++,1); if(c == ' ') break; if (c === 'J') { if(X.SA(i++,1) == '6') ft += '#6-button pad'; else ft += '#3-button pad' } else if (c === '0') ft += '#Master System pad'; else if (c === 'A') ft += '#Analog stick'; else if (c === '4') ft += '#Multitap'; else if (c === 'A') ft += '#Lightgun'; else if (c === 'A') ft += '#Activator'; else if (c === 'A') ft += '#Mouse'; else if (c === 'A') ft += '#Trackball'; else if (c === 'A') ft += '#Tablet'; else if (c === 'A') ft += '#Paddle'; else if (c === 'A') ft += '#Keyboard/keypad'; else if (c === 'A') ft += '#RS-232'; else if (c === 'A') ft += '#Printer'; else if (c === 'A') ft += '#Sega CD'; else if (c === 'A') ft += '#Floppy'; else if (c === 'A') ft += '#Download(?)'; } sOptionT('devices:'+ft); sOption('sz:'+outSz(ar[0][1])) } } function isMDR() { //ref https://github.com/TomDDG/Z80onMDR_lite/blob/main/Z80onMDR_Lite.c if(!X.c("01 ?? 00 00")) return; const mdrhdsz = 0xF, mdrdtsz = 0x200, mdrblksz = 0x21F, mdrmaxblk = 0xFE, mdrcartsz = mdrmaxblk*mdrblksz; blk = 0; var p; function chkblk(blkn) { var i, crc; p = blkn*mdrblksz; if((X.U8(p+15) & 2) && !X.U16(p+17)) return; for(crc=i=0; i < mdrhdsz-1; i++) crc = (crc+X.U8(p++)) % 0xFF; if(crc != X.U8(p++)) return; for(crc=i=0; i < mdrhdsz-1; i++) crc = (crc+X.U8(p++)) % 0xFF; if(crc != X.U8(p++)) return; if(!X.U16(p-13)) { p += mdrdtsz+2; return true } //deleted block, skip for(crc=i=0; i < mdrdtsz; i++) crc = (crc+X.U8(p++)) % 0xFF; if(crc != X.U8(p)) return; blk++; return true } var sec = m = X.U8(1); if(!sec) return; if(!X.isDeepScan()) m = Math.min(sec,5); for(var i=0; i < m && i*mdrblksz < X.Sz(); i++) if(!chkblk(i)) return; if(blk < 2) return; name = decAnsi(4,10,CPSpeccy); if(X.isDeepScan()) sz = p; else sz = sec*mdrblksz; return true } if(!bDetected && isMDR()) { sName = "ZX Microdrive cartridge image (.MDR)"; bDetected = true; if(X.isVerbose()) { sOption(name); sOption((X.isDeepScan()?'blks:'+blk+' ':'')+'sz:'+outSz(sz)); } } function isMGT() { //ref https://sinclair.wiki.zxnet.co.uk/wiki/MGT_filesystem //TODO test on SAM with subdirs, +D, HDD... if ([0x32000, 0x64000, 0xC8000].indexOf(X.Sz()) < 0) return false; // single-sided 40-cylinder, ds40/ss80, ds80 subdir = 0; erased = 0; files = 0; var p = 0, ds = X.Sz() > 0x64000, msz = Math.min(X.Sz(), 0xC8000); var xroot = X.U8(0xFF); if (xroot > 35) return false; //betaDOS/MasterDOS extra tracks for root var zx = [0, 'ZX Spectrum'], sam = [0, 'SAM Coupé'], dd = [0, 'DISCiPLE/+D'], hd = [0, 'HDD']; var samboot = X.c("'BOOT'", 0x100); if (samboot) sam[0] += 20; var allocmap = []; for (i = 0; i < 195; i++) allocmap.push(0); soption = ''; fnames = []; label = ''; sus = 0; if (!extIs('mgt')) sus++; //could be gzipped which removes the extension as far as DiE is concerned if (X.Sz() != 0xC8000) sus++; //in practice, only ds 80-cyl is seen around const fts = [/*0*/'erased', 'ZXBASIC', 'ZXnum.array', 'ZXstr.array', 'ZXcode', 'ZX48ksnap', 'ZXMD', 'ZXscr', 'special', /*9*/'ZX128ksnap', 'Opentype', 'ZXexec', 'UNI-DOSdir', 'UNI-DOScreate', '14?', '15?', 'SAMBASIC', 'SAMnum.array', /*18*/'SAMstr.array', 'SAMcode', 'SAMscr', 'MasterDOSdir', 'SAMDriverapp', 'SAMDriverbootstrap', 'EDOSNOMEN', 'EDOSsys', 'EDOSovl', '27?', 'HDOSHdos', 'HDOSHdir', 'HDOSHdisk', 'HDOSHfree/Htmp']; if ((X.U8(0) & 0x3F) != 19 && charStat(X.readBytes(0xD2, 10), 1).indexOf('allasc') >= 0) { sam[0] += 10; label = X.SA(0xD2, 10).trim() } //if(xroot) _l2r('mgt',0xFF,xroot+' xroot found!'); if(samboot) _l2r('mgt',0x100,'SAM BOOT found!') for (p = _sec = _side = _trk = 0, end = false; _trk < 4 + xroot && p < X.Sz();) { for (s = 0; s < 2; s++) { //go through the 2 records per sector if (samboot && files == 1) { files++; continue } //_l2r('mgt',p,'looking at rec #'+files+'"'+X.SA(p+1,10)+'": T'+_trk+'S'+_side+'s'+_sec+' type '+X.U8(p)) if (!X.U8(p + 1)) { end = true; continue } if (end) sus++; files++; var fname1 = X.readBytes(p + 2, 9); if (charStat(fname1, 1).indexOf('allasc') < 0) return false; //space-padded var ft = (X.U8(p) & 0x3F); if (ft > 0x1F) return false; //file type if (!ft) erased++; else if (isWithin(ft, 1, 11)) zx[0]++; else if (isWithin(ft, 12, 13)) dd[0]++; else if (isWithin(ft, 16, 23)) sam[0]++; else hd[0]++; var fsecsz = X.U16(p + 0xB, _BE); if (!fsecsz) return false; //sectors used by the file var ftrk0 = X.U8(p + 0xD), fside0 = ftrk0 >> 7; ftrk0 &= 0x7F; if (!isWithin(ftrk0, 0, 79)) return false; var fsec0 = X.U8(p + 0xE); if (!isWithin(fsec0, 1, 10)) return false; if (!ds) ds = fside0; //double-sided disc. there must be a better way to tell... if (!files) { if (ft == 0) sus++; if (X.U8(p) & 0x80) sus++ } //super unlikely the first file's erased or hidden for (i = 0; i < 195; i++) { t = X.U8(p + 0xF + i); if (allocmap[i] & t) return false; allocmap[i] |= t } if (firstNotOf(p + 0xDC, 11, [0x20, 0xFF]) < 0) sam[0] += 10; if (firstNotOf(p + 0xE8, 4, [0xFF]) < 0) sam[0] += 4; if (X.U8(p + 0xFA) == 0xFF) sam[0]++; if (X.U8(p + 0xFB) == 0xFF) sam[0]++; fnames.push(X.SA(p + 1, 10).trim() + ':' + fts[ft] //file type briefly explained //+'@'+Hex((fsec0+(fside0+ftrk0*2)*10)*0x200) //just the 1st sector address won't be too useful ); if (ft == 21) { subdir++; t = ((fsec0 + (fside0 + ftrk0 * 2) * 10) * 0x200) + 1; if (X.U8(t)) fnames.push('/' + X.SA(t, 10) + '...') } if (!s) p += 0x100 } _sec++; if (_sec > 9) { _sec = 0; _side++; if (_side == 1) { _side = 0; _trk++ } } p = (_sec + (_side + _trk * 2) * 10) * 0x200; } if (sus > 5 || !files) return false; function am0max() { if (!arguments.length) return ''; var i, r = arguments[0]; for (i = 1; i < arguments.length; i++) if (arguments[i][0] > r[0]) r = arguments[i]; return r } sv = am0max(zx, sam, dd, hd)[1] + '/' + (ds ? 'DS' : 'SS'); return true } if (!bDetected && isMGT()) { sName = "Miles Gordon Technology floppy image (.MGT,.SAD)"; sVersion = sv; bDetected = 1; if (X.isVerbose()) { sOption((subdir ? '≈' : '') + (files - erased - subdir) + (erased ? '+' + erased + ' erased' : '') + (subdir ? '+' + subdir + 'subdirs' : ''), 'files:'); if (files) sOption('(' + addEllipsis(fnames.join('; ')) + ')'); if (sus) sOption('possibly malformed (level ' + sus + ')'); } } if (!bDetected) if (X.c("'NES'1A") && (X.Sz() > 15)) { //ref https://www.nesdev.org/wiki/INES & https://www.nesdev.org/wiki/NES_2.0 sName = "NES ROM image (.nes)"; bDetected = true; malformed = false; szprg = X.U8(4) * 16384; szchr = X.U8(5) * 8192; flg9 = X.U8(9); //v1.0: ROMs don't use it; v2.0: sz*msb flg6 = X.U8(6); //fmirroring = (flg6&1)>0; //0 for hrz 1 for vrt, tons of fallout though so better to ignore this fstorage = (flg6 & 2) > 0; trainer = (flg6 & 4) * 0x80; f4scrvram = (flg6 & 8) > 0; flg7 = X.U8(7); mapper = ((flg6 & 0xF0) >> 4) + (flg7 & 0xF0); fvsunisystem = (flg7 & 1) > 0; fplaychoice10 = (flg7 & 2) > 0; fv20_ = ((flg7 & 0x0C) == 8); fv20 = false; szprgmsb = ((flg9 & 0x0F) << 8) * 16384; szchrmsb = ((flg9 & 0xF0) << 4) * 8192; ex = region = tv = ""; sz = 16 + trainer + szprg + szprgmsb + szchr + szchrmsb; if (fv20_) fv20 = sz < X.Sz(); if (fv20) { szprg += szprgmsb; szchr += szchrmsb; flg8 = X.U8(8); flg11 = X.U8(11); flg12 = X.U8(12); flg13 = X.U8(13); flg14 = X.U8(14); flg15 = X.U8(15); sVersion = "NES v2.0"; mapper += (flg8 & 0x0F) << 8; submapper = (flg8 & 0xF0) >> 4; switch (flg7 & 2) { case 0: sVersion += " #NES/Famicom/Dendy"; break; case 1: sVersion += " #Nintendo Vs. System ("; switch (flg13 & 0x0F) { case 0: sVersion += "RP2C03B)"; break; case 1: sVersion += "RP2C03G)"; break; case 2: sVersion += "RP2C04-0001)"; break; case 3: sVersion += "RP2C04-0002)"; break; case 4: sVersion += "RP2C04-0003)"; break; case 5: sVersion += "RP2C04-0004)"; break; case 6: sVersion += "RC2C03B)"; break; case 7: sVersion += "RC2C03C)"; break; case 8: sVersion += "RC2C05-01)"; break; case 9: sVersion += "RC2C05-02)"; break; case 0x0A: sVersion += "RC2C05-03)"; break; case 0x0B: sVersion += "RC2C05-04)"; break; case 0x0C: sVersion += "RC2C05-05)"; break; default: sVersion += "unk.PPU)" } break; case 2: sVersion += " #Nintendo Playchoice 10"; break; default: switch (flg13 & 0x0F) { case 0: sVersion += " #NES/Famicom/Dendy"; break; case 1: sVersion += " #Nintendo Vs. System"; break; case 2: sVersion += " #Nintendo Playchoice 10"; break; case 3: sVersion += " #Famiclone+DecimalMode"; break; case 4: sVersion += " #NES/Famicom+EPSM/plug-through"; break; case 5: sVersion += " #V.R. VT01 red/cyan"; break; case 6: sVersion += " #V.R. Technology VT02"; break; case 7: sVersion += " #V.R. Technology VT03"; break; case 8: sVersion += " #V.R. Technology VT09"; break; case 9: sVersion += " #V.R. Technology VT32"; break; case 0x0A: sVersion += " #V.R. Technology VT369"; break; case 0x0B: sVersion += " #UMC UM6578"; break; case 0x0C: sVersion += " #Famicom Network System"; break; default: sVersion += " #(reserved)" } } switch (flg12 & 3) { case 0: region = "NA/JP/SK/TW: NTSC NES"; break; case 1: region = "WE/AU: Licenced PAL NES"; break; case 2: region = "Multiple"; break; default: region = "EU/RU/ZH/IN/AF: Dendy" } switch (flg15 & 0x3F) { case 0x00: break; case 0x01: ex = "Std. Sontrollers"; break; case 0x02: ex = "NES Four Score/Satellite + 2 Std. Controllers"; break; case 0x03: ex = "Famicom 4P Adapter"; break; case 0x04: ex = "Vs. System (1P via $4016)"; break; case 0x05: ex = "Vs. System (1P via $4017)"; break; case 0x06: ex = "(obsolete MAME behaviour)"; break; case 0x07: ex = "Vs. Zapper"; break; case 0x08: ex = "Zapper ($4017)"; break; case 0x09: ex = "2 Zappers"; break; case 0x0A: ex = "Bandai Hyper Shot Lightgun"; break; case 0x0B: ex = "Power Pad Side A"; break; case 0x0C: ex = "Power Pad Side B"; break; case 0x0D: ex = "Family Trainer Side A"; break; case 0x0E: ex = "Family Trainer Side B"; break; case 0x0F: ex = "Arkanoid Vaus Controller (NES)"; break; case 0x10: ex = "Arkanoid Vaus Controller (Famicom)"; break; case 0x11: ex = "2 Vaus Controllers + Famicom Data Recorder"; break; case 0x12: ex = "Konami Hyper Shot Controller"; break; case 0x13: ex = "Coconuts Pachinko Controller"; break; case 0x14: ex = "Exciting Boxing Punching Bag (Blowup Doll)"; break; case 0x15: ex = "Jissen Mahjong Controller"; break; case 0x16: ex = "Party Tap"; break; case 0x17: ex = "Oeka Kids Tablet"; break; case 0x18: ex = "Sunsoft Barcode Battler"; break; case 0x19: ex = "Miracle Piano Keyboard"; break; case 0x1A: ex = "Pokkun Moguraa (Whack-a-Mole Mat & Mallet)"; break; case 0x1B: ex = "Top Rider (Inflatable Bicycle)"; break; case 0x1C: ex = "Double-Fisted"; break; case 0x1D: ex = "Famicom 3D System"; break; case 0x1E: ex = "Doremikko Keyboard"; break; case 0x1F: ex = "R.O.B. Gyro Set"; break; case 0x20: ex = 'Famicom Data Recorder ("silent" keyboard)'; break; case 0x21: ex = "ASCII Turbo File"; break; case 0x22: ex = "IGS Storage Battle Box"; break; case 0x23: ex = "Family BASIC Keyboard + Famicom Data Recorder"; break; case 0x24: ex = "Dongda PEC-586 Keyboard"; break; case 0x25: ex = "Bit Corp. Bit-79 Keyboard"; break; case 0x26: ex = "Subor Keyboard"; break; case 0x27: ex = "Subor Keyboard + Mouse (3x8-bit)"; break; case 0x28: ex = "Subor Keyboard + Mouse (24-bit)"; break; case 0x29: ex = "SNES Mouse ($4017.d0)"; break; case 0x2A: ex = "Multicart"; break; case 0x2B: ex = "2 SNES Controllers"; break; case 0x2C: ex = "RacerMate Bicycle"; break; case 0x2D: ex = "U-Force"; break; case 0x2E: ex = "R.O.B. Stack-Up"; break; case 0x2F: ex = "City Patrolman Lightgun"; break; case 0x30: ex = "Sharp C1 Cassette Interface"; break; case 0x31: ex = "Std. Controller w/swapped ←→/↑↓/BA"; break; case 0x32: ex = "Excalibor Sudoku Pad"; break; case 0x33: ex = "ABL Pinball"; break; case 0x34: ex = "Golden Nugget Casino extra buttons"; break; default: ex = "(unknown)" } sz = 16 + trainer + szprg + szprgmsb + szchr + szchrmsb } else { if (!(flg7 & 0x0C) && X.c("0000 0000", 12)) sVersion = "iNES"; else if ((flg7 & 0x0C) == 4) sVersion = "archaic iNES"; else sVersion = "iNES v0.7 or archaic"; szprgram = X.U8(8) * 8192; if (!szprgram) szprgram = 8192; //PRG RAM size flg10 = X.U8(10); switch (flg10 & 3) { case 0: tv = "NTSC"; break; case 2: tv = "PAL"; break; default: tv = "NTSC/PAL" } if (X.c("0000 0000", X.Sz() - 4)) { fprgram = (flg10 & 0x10) > 0; fbusconflicts = (flg10 & 0x20) > 0 } else { fprgram = false; fbusconflicts = false; } region = "n/a"; } if (X.isVerbose()) { sOption(tv, "tv: "); sOption(region, "region: "); sOption(mapper, "mapper: "); sOption(ex, "expansion: "); if (fplaychoice10) sOption("PlayChoice-10"); if (trainer) sOption("trainer"); if (fstorage) sOption("battery-backed RAM"); sOption(outSz(sz), 'sz:') } } else if (X.c("'MNIB-1541-RAW'..000002..04..06..08..0A")) { bDetected = true; sVersion = 'v' + X.U8(0xD); sName = "Markus Brenner's MNIB/Peter Rittwage's C64PP NIBTools disk image (.NIB)" } else if (X.c("01'CD001'01''", 0x53000)) { n = X.c("'NERO'", X.Sz() - 8) ? 1 : X.c("'NER5'", X.Sz() - 12) ? 2 : 0; sName = (n ? "Nero AG's " : '') + "optical disc image (.NRG)"; if (n) sVersion = "Nero AG/v" + n; if (X.isVerbose()) sOptions = X.SA(0x53028, 0x20).trim(); bDetected = true; } else if (X.c("0D04..00'host_date='") && X.fSig(0, 0x80, "'KryoFlux DiskSystem'")) { sName = "SPS's KryoFlux DiskSystem disk sector (.RAW)"; bDetected = true } else if (X.c("'CAPS'0000000C1CD573BA'DATA'") && X.c("'PACK'", X.U32(0x10, _BE) + 0x14)) { //ref https://www.kryoflux.com/download/spsdeclib_5.1_source.zip / Codec/CapsDefinitions.h sName = "SPS's KryoFlux CT Raw disk image (.RAW)"; bDetected = true; if (X.isVerbose()) { for (p = 0xC, trk = unpsz = 0; p < X.Sz();) { hkhd = X.SA(p, 4); if (!/[A-Z]{4}/.test(hkhd) || !X.c("0000", p + 4)/*a floppy block can't be this long*/) break; hksz = X.U32(p + 4, _BE); switch (hkhd) { case 'DATA': hksz += X.U32(p + 12, _BE); break; case 'PACK': unpsz += hksz; hksz = X.U32(p + 12, _BE) + 0x18; break; case 'TRCK': trk++; break } p += hksz } sOption('trk:' + trk + ' sz:' + outSz(p)) } } function isSCL() { if (!X.c("'SINCLAIR'") || !isWithin(n = X.U8(8), 1, 128) || X.Sz() < 9 + 14 * n) return false; fnames = [], p = 9, i = c = 0; sz = 9 + 14 * n; sec = 0; bad = ''; for (; i < n && sz < X.Sz(); i++, p += 14) { var fn = decAnsi(p, 8, CPSpeccy); if (fn.length < 8) return false; fn = fn.trim(); if (fn[0] === '\x01') fn[0] = '*'; //deleted file var ext = decAnsi(p + 8, 1, CPSpeccy); if (!ext.length) return false; //I'd test the filenames for sanity but some copyprots are quite insane... fnames.push(fn + '.$' + ext); t = X.U8(p + 0xD); sec += t; sz += t << 8; } if (sz > X.Sz() || sz > 655364) return false; //max available size is 835600-ish so not much of a constraint if (X.Sz() >= sz + 4) { // despite the barebones specs there seems to be a CRC at the very end for (i = 0; i < sz; c += X.U8(i++)) { } sz += 4; if (c != X.U32(i)) bad = '!badcrc' //not returning false; it's not guaranteed that all SCL will have this } else bad = '!nocrc'; //...but it is common enough to mark it as malformed if it's absent fnames = fnames.join(';'); return true } if (!bDetected && isSCL()) { sName = 'ZX Spectrum floppy disk image (.SCL)'; bDetected = true; if (bad.length) sVersion = 'malformed' + bad; if (X.isVerbose()) { sOption(addEllipsis(fnames, 0xA0)); sOption('sec:' + sec + ' sz:' + outSz(sz)) } } function isSCP() { if (!X.c("'SCP'") || X.U8(6) > 165 || X.U8(7) > 165 || X.U8(0xA) > 2) return false; var p, mtdp = mtdsz = 0, r = X.U8(5), bitw = X.U8(9); sz = 0x2B0; if (!bitw) bitw = 2; else bitw >>= 3; for (p = 0x10; p < 0x2B0; p += 4) { var tdhp = X.U32(p); if (!tdhp) continue; if (!X.c("'TRK'", tdhp)) return false; var i = 0; for (q = tdhp + 4; i < r; i++) { var tdsz = X.U32(q + 4) * bitw, tdp = X.U32(q + 8) + tdhp; if (tdp > mtdp) { mtdp = tdp; mtdsz = tdsz } q += 12 } } if (mtdp) if (mtdp > X.Sz()) return false; else sz = mtdp + mtdsz; return true } if (!bDetected && isSCP()) { sName = "SuperCard Pro disk image (.SCP)"; bDetected = true; var v = X.U8(3); if (v) v = 'v' + (v >> 4) + ' rev.' + (v & 0xF); else v = 'v.?'; var tp = X.U8(4), revolutions = X.U8(5), sttrk = X.U8(6), edtrk = X.U8(7), fl = X.U8(8), tpi5in = fl & 2 ? '96' : '48', rpm = fl & 1 ? (fl & 4 ? '360' : '300') : '300/360', quality = fl & 8 ? 'normalised' : 'preservation', ro = fl & 0x10 ? 'read/write' : 'read-only', ext = fl & 0x20, side = !X.U8(0xA) ? 'double' : (X.U8(0xA) == 1 ? 'bottom' : 'top'), made, dtp; if (ext) { v = 'app v' + (X.U8(sz + 0x28) >> 4) + '.' + (X.U8(sz + 0x28) & 0xF) + 'h/w v' + (X.U8(sz + 0x29) >> 4) + '.' + (X.U8(sz + 0x29) & 0xF); if (!X.c("'FPCS'", sz + 0x2C)) v += '/malformed!noendtag'; sz += 0x30 } sVersion = v; if (X.isVerbose()) { switch (tp & 0xF) { case 0: dtp = 'CBM'; break; case 1: dtp = 'Amiga'; break; case 2: dtp = 'Apple ]['; break; case 3: dtp = 'Atari ST'; break; case 4: dtp = 'Atari 800'; break; case 5: dtp = 'Mac 800'; break; case 6: dtp = '360k/720k'; break; case 7: dtp = '1.44M'; break; default: dtp = 'unk.' } switch (tp >> 4) { case 0: made = 'Commodore'; break; case 1: made = 'Atari'; break; case 2: made = 'Apple'; break; case 3: made = 'PC'; break; case 4: made = 'Tandy'; break; case 5: made = 'Texas Inst.'; break; case 6: made = 'Roland'; break; case 8: made = '(other)'; break; default: made = 'unk.' } sOption('type ' + dtp + ' by ' + made); sOption('trk:' + sttrk + '-' + edtrk + ' side:' + side); sOption(ro); sOption(quality, 'quality:'); sOption(rpm, '', ' rpm'); sOption(outSz(sz), 'sz:'); } } if (!bDetected) if (X.c("EC..A50000") && X.c("EC00", 0x100) && X.c("55AA55AA55AA55AAFFFFFFFFFFFFFFFF0000", 0x110) && X.c("FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF", 0x400) && X.c("4199015564F0FFFF 201B0C824118EA61 F00107F60301EE1B 0C834118EA617001 07760301EE15140500", 0X4630)) { sName = "GamePark GP32 SmartMedia card (.SMC)"; bDetected = true //may not catch all options, but the official games are there } else if (X.c("'RSY'000300")) { //ref http://info-coach.fr/atari/documents/_mydoc/Pasti-documentation.pdf sName = "Jorge 'Ijor' Cwik's Pasti disk image (.STX)"; bDetected = true; sVersion = 'v3' + (X.U8(11) == 2 ? ' new' : X.U8(11) == 0 ? ' old' : ''); if (X.isVerbose()) { sOption(X.U8(10), 'trk.total:'); for (i = 0, p = 0x10; i < X.U8(10) && p < X.Sz(); i++, p += X.U32(p)) { } sOption(outSz(p), 'sz:') } } else if (X.c("'ZXST'") && charStat(X.readBytes(0x10 + X.U32(0xC), 4), 1).indexOf('allxsc') >= 0 && X.fSig(8, 0x200, "'Z80R'") > 0 && X.fSig(0x20, 0x200, "'SPCR'") > 0 && isWithin(V = X.U8(4), 1, 1) && (v = X.U8(5)) <= 5 && (hw = X.U8(6)) <= 16 && (fl = X.U8(7)) <= 1) { //ref https://sinclair.wiki.zxnet.co.uk/wiki/ZX-State_format sName = 'Spectaculator zx-state file (.SZX)'; sVersion = 'v' + V + '.' + v; bDetected = true; switch (hw) { case 0: hw = 'ZX Spectrum 16k'; break; case 1: hw = 'ZX Spectrum 48k/+'; break; case 2: hw = 'ZX Spectrum 128k'; break; case 3: hw = 'ZX Spectrum +2'; break; case 4: hw = 'ZX Spectrum +2A/B'; break; case 5: hw = 'ZX Spectrum +3'; break; case 6: hw = 'ZX Spectrum +3e'; break; case 7: hw = 'Pentagon 128'; break; case 8: hw = 'Timex Sinclair TC-2048'; break; case 9: hw = 'Timex Sinclair TC-2068'; break; case 0xA: hw = 'Scorpion ZS-256'; break; case 0xB: hw = 'ZX Spectrum SE'; break; case 0xC: hw = 'Timex Sinclair TS-2068'; break; case 0xD: hw = 'Pentagon 512'; break; case 0xE: hw = 'Pentagon 1024'; break; case 0xF: hw = 'ZX Spectrum 48k (NTSC)'; break; case 0x10: hw = 'ZX Spectrum 128Ke'; break; default: hw = '(unk.)' } sOption(hw, 'h/w:'); if (X.isVerbose()) { var p = 8; while (p < X.Sz()) { var hkhd = X.SA(p, 4), hksz = X.U32(p + 4); if (!hksz || hksz + p > X.Sz() || charStat(X.readBytes(p, 4), 1).indexOf('allxsc') < 0 || hkhd.length < 2 || hkhd.toUpperCase() != hkhd) break; p += 8; switch (hkhd) { case 'CRTR': sOption(X.SA(p, 0x20), 'in:'); break; } p += hksz } sz = p; sOption(outSz(sz), 'sz:') } } else if (/^C64S?\s*tape.*file/.test(X.SA(0, 0x20))) { sName = "C64 cassette tape (.T64)"; bDetected = true; sVersion = 'v' + X.U8(0x20) + "." + X.U8(0x21).padStart(2, '0'); if (X.isVerbose()) { var files = [], totalent = X.U16(0x22, _LE), usedent = X.U16(0x24, _LE); for (i = 0; i < totalent; i++) if (i < usedent) files[i] = X.SA(0x50 + i * 0x20, 0x20).trim(); sOption(usedent, " entries:"); for (i = 0; i < files.length; i++) sOptions = sOptions.appendS(files[i], " "); } } else if (X.c("'XM7 TAPE IMAGE 0'")) { //ref https://github.com/yas-sim/xm7-related-tools/blob/main/t77dec/t77dec.cpp //& https://web.archive.org/web/20191207131958/http://xm7.la.coocan.jp:80/xm7/xm7.html sName = "Fujitsu FM-7 emulator XM7 tape (.T77)"; bDetected = true } else if (X.c("'C64-TAPE-RAW'") && X.U8(0xC) < 2) { bDetected = true; sName = "C64 cassette tape (.TAP)"; sVersion = "v" + X.U8(0xC); var sz = X.U32(0x10) + 0x14; if (!X.isVerbose()) { if (sz > X.Sz()) sVersion += '/malformed!short' } else sOptions = "sz:" + outSz(sz) } else if (X.c("'ZXTape!'1A")) { // a bit large // from https://www.alessandrogrussu.it/tapir/tzxform120.html // & https://www.msx.org/wiki/Emulation_related_file_formats#.TSX sVersion = 'v' + X.U8(8) + '.' + X.U8(9).padStart(2, '0'); bDetected = true; var ismsx = end = false, x = 0; var bad = '', title = '', publisher = '', auth = '', year = '', lang = '', apptype = '', price = '', protload = '', org = '', cmt = '', hw = '', sel = '', fnames = []; const types = ['B', 'N', 'S', 'C'] p = 10; while (!end && p < X.Sz()) { switch (X.U8(p++)) { case 0x10: if (!X.U8(p + 4)) { //loading flag(?) if (charStat(t = X.readBytes(p + 6, 10), 1).indexOf('allasc') < 0) bad = bad.addIfNone('!nonASCIIfn'); t = decEncoding(t, CPSpeccy).trim(); tp = X.U8(p + 5); if (!t && tp < 3) bad = bad.addIfNone('!emptyfn'); fnames.push(t + '.' + types[tp]) } p += 4 + X.U16(p + 2); break; case 0x11: p += 0x12 + X.U24(p + 0xF); break; case 0x12: p += 4; break; case 0x13: p += 1 + 2 * X.U8(p); break; case 0x14: if (!X.U8(p + 4) > 8) { end = true; bad = bad.addIfNone('!badnbitsin14') } else p += 0xA + X.U24(p + 7); break; case 0x15: if (!isWithin(X.U8(p + 4), 1, 8)) { end = true; bad = bad.addIfNone('!badnbitsin15') } else p += 8 + X.U24(p + 5); break; case 0x18: if (!isWithin(X.U8(p + 9), 1, 2)) { end = true; bad = bad.addIfNone('!badcomptypein18') } else p += 4 + X.U32(p); break; case 0x19: case 0x2A: p += 4 + X.U32(p); break; case 0x20: case 0x23: case 0x24: p += 2; break; case 0x21: p += 1 + X.U8(p); break; case 0x22: case 0x25: case 0x27: break; case 0x26: p += 2 + 2 * X.U16(p); break; case 0x28: var p1 = p + 2 + X.U16(p), n = X.U8(p + 2); p += 3; for (i = 0; i < n; i++) { var tl = X.U8(p + 2); p += 3; sel = sel.appendS(decAnsi(p, tl, CPSpeccy, 1, Chars0to1FSpeccy), '/'); p += tl } p = p1; break; case 0x2B: if (X.U8(p + 4) > 1) { end = true; bad = bad.addIfNone('!badsignalin2B'); } else p += 4 + X.U32(p); break; case 0x30: cmt = cmt.append('-' + decAnsi(p + 1, X.U8(p), CPSpeccy, 1, Chars0to1FSpeccy).trim() + '-'); p += 1 + X.U8(p); break; case 0x31: p += 2 + X.U8(p + 1); break; case 0x32: var p1 = p + 2 + X.U16(p), n = X.U8(p + 2); p += 3; for (i = 0; i < n; i++) { var tp = X.U8(p++); t = X.SC(p + 1, Math.min(X.U8(p), p1 - p), 'CP1252').trim(); switch (tp) { case 0: title = title.append(t); break; case 1: publisher = publisher.append(t); break; case 2: auth = auth.append(t); break; case 3: year = year.append(t); break; case 4: lang = lang.append(t); break; case 5: apptype = apptype.append(t); break; case 6: price = price.append(t); break; case 7: protload = protload.append(t); break; case 8: org = org.append(t); break; case 0xFF: cmt = cmt.appendS(t, ' / '); break; default: cmt = cmt.append(t, '\ninfo#' + tp.toString(16) + ':') } p += 1 + X.U8(p); } p = p1; break; case 0x33: var hwin = X.U8(p++); for (i = 0; i < hwin; i++) { var hwtp = X.U8(p++), hwid = X.U8(p++); switch (hwtp) { case 0: hwtp = '[PC]'; switch (hwid) { case 0: hwid = 'ZX Spectrum 16k'; break; case 1: hwid = 'ZX Spectrum 48k/+'; break; case 2: hwid = 'ZX Spectrum 48k ISSUE 1'; break; case 3: hwid = 'ZX Spectrum 128k +(Sinclair)'; break; case 4: hwid = 'ZX Spectrum 128k +2 (grey case)'; break; case 5: hwid = 'ZX Spectrum 128k +2A/+3'; break; case 6: hwid = 'Timex Sinclair TC-2048'; break; case 7: hwid = 'Timex Sinclair TS-2068'; break; case 8: hwid = 'Pentagon 128'; break; case 9: hwid = 'SAM Coupe'; break; case 0xA: hwid = 'Didaktik M'; break; case 0xB: hwid = 'Didaktik Gama'; break; case 0xC: hwid = 'ZX-80'; break; case 0xD: hwid = 'ZX-81'; break; case 0xE: hwid = 'ZX Spectrum 128k Spanish version'; break; case 0xF: hwid = 'ZX Spectrum Arabic version'; break; case 0x10: hwid = 'Microdigital TK 90-X'; break; case 0x11: hwid = 'MicrodigitalTK 95'; break; case 0x12: hwid = 'Byte'; break; case 0x13: hwid = 'Elwro 800-3'; break; case 0x14: hwid = 'ZS Scorpion 256'; break; case 0x15: hwid = 'Amstrad CPC 464'; break; case 0x16: hwid = 'Amstrad CPC 664'; break; case 0x17: hwid = 'Amstrad CPC 6128'; break; case 0x18: hwid = 'Amstrad CPC 464+'; break; case 0x19: hwid = 'Amstrad CPC 6128+'; break; case 0x1A: hwid = 'Jupiter ACE'; break; case 0x1B: hwid = 'Enterprise'; break; case 0x1E: hwid = 'Inves Spectrum+'; break; case 0x1F: hwid = 'Profi'; break; case 0x20: hwid = 'GrandRomMax'; break; case 0x21: hwid = 'Kay 1024'; break; case 0x22: hwid = 'Ice Felix HC 91'; break; case 0x23: hwid = 'Ice Felix HC 2000'; break; case 0x24: hwid = 'Amaterske RADIO Mistrum'; break; case 0x25: hwid = 'Quorum 128'; break; case 0x26: hwid = 'MicroART ATM'; break; case 0x27: hwid = 'MicroART ATM Turbo 2'; break; case 0x28: hwid = 'Chrome'; break; case 0x29: hwid = 'ZX Badaloc'; break; case 0x2A: hwid = 'TS-1500'; break; case 0x2B: hwid = 'Lambda'; break; case 0x2C: hwid = 'TK-65'; break; case 0x2D: hwid = 'ZX-97'; break; default: hwid = '(unk.)' } break; case 1: hwtp = '[ext.storage]'; switch (hwid) { case 0: hwid = 'ZX Microdrive'; break; case 1: hwid = 'Opus Discovery'; break; case 2: hwid = 'MGT DISCiPLE'; break; case 3: hwid = 'MGT +D'; break; case 4: hwid = 'Rotronics Wafadrive'; break; case 5: hwid = 'TR-DOS (BetaDisk)'; break; case 6: hwid = 'Byte Drive'; break; case 7: hwid = 'Watsford'; break; case 8: hwid = 'FIZ'; break; case 9: hwid = 'Radofin'; break; case 0xA: hwid = 'Didaktik disk drives'; break; case 0xB: hwid = 'BS-DOS (MB-02)'; break; case 0xC: hwid = 'ZX Spectrum +3 disk drive'; break; case 0xD: hwid = 'JLO (Oliger) disk interface'; break; case 0xE: hwid = 'Timex FDD3000'; break; case 0xF: hwid = 'Zebra disk drive'; break; case 0x10: hwid = 'Ramex Millenia'; break; case 0x11: hwid = 'Larken'; break; case 0x12: hwid = 'Kempston disk interface'; break; case 0x13: hwid = 'Sandy'; break; case 0x14: hwid = 'ZX Spectrum +3e hard disk'; break; case 0x15: hwid = 'ZXATASP'; break; case 0x16: hwid = 'DivIDE'; break; case 0x17: hwid = 'ZXCF'; break; default: hwid = '(unk.)' } break; case 2: hwtp = '[memory addon]'; switch (hwid) { case 0: hwid = 'Sam Ram'; break; case 1: hwid = 'Multiface ONE'; break; case 2: hwid = 'Multiface 128k'; break; case 3: hwid = 'Multiface +3'; break; case 4: hwid = 'MultiPrint'; break; case 5: hwid = 'MB-02 ROM/RAM exp.'; break; case 6: hwid = 'SoftROM'; break; case 7: hwid = '1k'; break; case 8: hwid = '16k'; break; case 9: hwid = '48k'; break; case 10: hwid = 'memory in 8-16k used'; break; default: hwid = '(unk.)' } break; case 3: hwtp = '[sound device]'; switch (hwid) { case 0: hwid = 'classic 128k ZX-compatible AY hw'; break; case 1: hwid = 'Fuller Box AY hw'; break; case 2: hwid = 'Currah microSpeech'; break; case 3: hwid = 'SpecDrum'; break; case 4: hwid = 'AY ACB (L:A+C R:B+C) stereo/Melodik'; break; case 5: hwid = 'AY ABC (L:A+B R:B+C) stereo/Melodik'; break; case 6: hwid = 'RAM Music Machine'; break; case 7: hwid = 'Covox'; break; case 8: hwid = 'General Sound'; break; case 9: hwid = 'Intec Electronic Digital Interface B8001'; break; case 0xA: hwid = 'Zon-X AY'; break; case 0xB: hwid = 'QuickSilva AY'; break; case 0xC: hwid = 'Jupiter ACE'; break; default: hwid = '(unk.)' } break; case 4: hwtp = '[joystick]'; switch (hwid) { case 0: hwid = 'Kempston'; break; case 1: hwid = 'Cursor/Protek/AGF'; break; case 2: hwid = 'Sinclair 2 Left (12345)'; break; case 3: hwid = 'Sinclair 1 Right (67890)'; break; case 4: hwid = 'Fuller'; break; default: hwid = '(unk.)' } break; case 5: hwtp = '[mouse]'; switch (hwid) { case 0: hwid = 'AMX mouse'; break; case 1: hwid = 'Kempston mouse'; break; default: hwid = '(unk.)' } break; case 6: hwtp = '[controller]'; switch (hwid) { case 0: hwid = 'Trickstick'; break; case 1: hwid = 'ZX Light Gun'; break; case 2: hwid = 'Zebra Graphics Tablet'; break; case 3: hwid = 'Defender Light Gun'; break; default: hwid = '(unk.)' } break; case 7: hwtp = '[serial port]'; switch (hwid) { case 0: hwid = 'ZX Interface I'; break; case 1: hwid = 'ZX Spectrum 128k'; break; default: hwid = '(unk.)' } break; case 8: hwtp = '[parallel port]'; switch (hwid) { case 0: hwid = 'Kempston S'; break; case 1: hwid = 'Kempston E'; break; case 2: hwid = 'ZX Spectrum +3'; break; case 3: hwid = 'Tasman'; break; case 4: hwid = "DK'Tronics"; break; case 5: hwid = 'Hilderbay'; break; case 6: hwid = 'INES Printerface'; break; case 7: hwid = 'Z LPrint Interface 3'; break; case 8: hwid = 'MultiPrint'; break; case 9: hwid = 'Opus Discovery'; break; case 10: hwid = 'Standard 8255 chip with ports 31+63+95'; break; default: hwid = '(unk.)' } break; case 9: hwtp = '[printer]'; switch (hwid) { case 0: hwid = 'ZX Printer/Alphacom 32 & compat.'; break; case 1: hwid = 'Generic printer'; break; case 2: hwid = 'EPSON compat.'; break; default: hwid = '(unk.)' } break; case 0xA: hwtp = '[modem]'; switch (hwid) { case 0: hwid = 'Prism VTX 5000'; break; case 1: hwid = 'T/S 2050/Westridge 2050'; break; default: hwid = '(unk.)' } break; case 0xB: hwtp = '[digitizer]'; switch (hwid) { case 0: hwid = 'RD Digital Tracer'; break; case 1: hwid = "DK'Tronics Light Pen"; break; case 2: hwid = 'British MicroGraph Pad'; break; case 3: hwid = 'Romantic Robot Videoface'; break; default: hwid = '(unk.)' } break; case 0xC: hwtp = '[network adapter]'; if (hwid == 0) hwid = 'ZX Interface I'; else hwid = '(unk.)'; break; case 0xD: hwtp = '[keyboard]'; if (hwid == 0) hwid = 'Keypad for ZX Spectrum 128k'; else hwid = '(unk.)'; break; case 0xE: hwtp = '[AD/DA converter]'; switch (hwid) { case 0: hwid = 'Harley Systems ADC 8.2'; break; case 1: hwid = 'Blackboard Electronics'; break; default: hwid = '(unk.)' } break; case 0xF: hwtp = '[EEPROM programmer]'; switch (hwid) { case 0: hwid = 'Orme Electronics'; break; case 1: hwid = 'Blackboard Electronics'; break; default: hwid = '(unk.)' } break; case 0x10: hwtp = '[GPU]'; switch (hwid) { case 0: hwid = 'WRX Hi-Res'; break; case 1: hwid = 'G007'; break; case 2: hwid = 'Memotech'; break; case 3: hwid = 'Lambda Colour'; break; default: hwid = '(unk.)' } break; } switch (X.U8(p++)) { case 0: hw = hw.append('runs on ' + hwtp + ' ' + hwid); break; case 1: hw = hw.append('uses ' + hwtp + ' ' + hwid); break; case 2: hw = hw.append('runs w/o specifics of ' + hwtp + ' ' + hwid); break; case 3: hw = hw.append("won't run on " + hwtp + ' ' + hwid); break; default: break } } break; case 0x35: p += 0x14 + X.U32(p + 0x10); break; case 0x5A: if (!X.c("'XTape!'1A", p)) { end = true; p-- } else { x++; p += 9 } break; case 0x16: case 0x17: p += X.U32(p); break; case 0x34: p += 8; break; case 0x40: sOption('snapshot'); p += 4 + X.U24(p + 1); break; case 0x4B: ismsx = true; p += 4 + X.U32(p); break; //Kansas City Standard default: end = true; p--;// ripper-ready! // bad = bad.addIfNone('!unkID') } } if (ismsx) sName = "ZX Spectrum/MSX tape (.TSX)"; else sName = "ZX Spectrum tape (.TZX)"; if (bad.length) sVersion = sVersion.appendS('malformed' + bad, '/'); if (X.isVerbose()) { sOptionT(title); if (x > 1) sOption(x, 'x'); sOptionT(auth, 'by:'); sOptionT(year, "'"); sOptionT(publisher, '(c) '); sOptionT(lang, 'in:'); sOptionT(apptype, 'apptype:'); sOptionT(price, 'price:'); sOptionT(org, 'origin:'); sOptionT(protload, 'prot/ldr:'); sOption(hw); sOptionT(addEllipsis(cmt, 0xA0)); sOptionT(addEllipsis(fnames.join(','), 0xA0), 'files:'); sOptionT(sel, 'choices:'); sOption(outSz(p), 'sz:') } } else if (X.c("'UEF File!'00") && X.U8(0xB) <= 2) { //ref http://electrem.emuunlim.com/UEFSpecs.html sName = "Acorn PC Unified Emulator Format data (.UEF)"; bDetected = true; sVersion = 'v' + X.U8(0xB) + '.' + X.U8(0xA); var title = info = man = gear = kb = tp = '', interrupt = false; for (p = 0xC; p < X.Sz();) { var hkhd = X.U16(p), hksz = X.U32(p + 2); if ([0, 1, 2, 3, 4, 0xFF].indexOf(hkhd >> 8) < 0) break; //unrelated info follows? p += 6; switch (hkhd) { case 0x0000: info = info.appendS(X.SA(p, hksz), '/'); break; case 0x0001: man = man.appendS(X.SA(p, hksz), ' '); break; case 0x0005: gear = 'Acorn '; switch (X.U8(p) >> 4) { case 0: gear += 'BBC Model A'; break; case 1: gear += 'Electron'; break; case 2: gear += 'BBC Model B'; break; case 3: gear += 'BBC Master'; break; case 4: gear += 'Atom'; break } switch (X.U8(p) & 0xF) { case 0: kb = 'any'; break; case 1: kb = 'target PC'; break; case 2: kb = 'host PC'; break } break; case 0x0009: title = X.SA(p, hksz); break; case 0x0101: case 0x0102: case 0x0103: case 0x0104: case 0x0110: case 0x0111: case 0x0112: case 0x0113: case 0x0114: case 0x0115: case 0x0116: case 0x0117: case 0x0120: case 0x0131: tp = tp.addIfNone('#tape'); break; case 0x0130: switch (X.U8(p)) { case 0: t = 'unit'; break; case 1: t = 'tape'; break; case 2: t = 'disc'; break; case 3: t = 'vtape'; break; case 4: t = 'cartridge'; break; default: 'unk.media' } if (X.U8(p + 1) > 1) t += ' ×' + X.U8(p + 1); if (X.U8(p + 2) > 1) t += (X.U8(p) == 1 || X.U8(p) == 3) ? ' ch:' : X.U8(p) == 2 ? ' ' + X.U8(p + 2) + ' audiotracks' : '..?'; info += ' #' + t; break; case 0x0200: case 0x0201: case 0x0202: tp = tp.addIfNone('#disc'); break; case 0x0300: tp = tp.addIfNone('#ROM'); t = 'content:'; switch (X.U8(p)) { case 0: t += 'generic'; break; case 1: t += 'OS'; break; case 2: t += 'BASIC'; break; case 3: t += 'language'; break; case 4: t += 'utility'; break; case 5: t += 'filing system'; break; case 6: t += 'h/w driver'; break; case 7: t += 'game'; break; default: t += 'unk' } info += ' #' + t; break; case 0x0301: tp = tp.addIfNone('#ROM'); break; case 0x0400: case 0x0401: case 0x0402: case 0x0403: case 0x0410: case 0x0411: case 0x0412: case 0x0420: tp = tp.addIfNone('#snapshot'); break; case 0xFF00: info += '#emu:' + X.SA(p, hksz); break; case 0x0100: break; //the "implicit data chunk"! eh? default: if (hkhd > 0xFF00) tp = tp.addIfNone('#customdata'); else interrupt = true // unknown chunk = unrelated tailing data? } if (interrupt) { p -= 6; break } //_log(Hex(p-6)+' > '+Hex(hkhd)); p += hksz } sVersion += tp; if (X.isVerbose()) { sOption(title); sOptionT(info, 'info:'); sOptionT(man, 'manual:'); sOptionT(gear, 'gear:'); sOptionT(kb, 'layout:'); sOption(outSz(p), 'sz:') } } else if (X.c("'UNIF'???????? 0000 0000 0000 0000 0000 0000 0000") && (X.Sz() > 32)) { sName = "UNIF NES cartridge (.UNF)"; sVersion = "v" + X.U32(4, _LE); bDetected = true; if (X.isVerbose()) { p = 8; t = ''; mapr = ''; tv = ''; ex = ''; fstorage = lastchunk = false; while (p < X.Sz() && !lastchunk) { var hkhd = X.SA(p, 4), hksz = X.U32(p + 4); p += 0x08; switch (hkhd) { case "MAPR": mapr = X.SA(p, hksz); break; case "NAME": t = X.SA(p, hksz); break; case "TCVI": switch (X.U8(p)) { case 0: tv = "NTSC"; break; case 1: tv = "PAL"; break; case 2: tv = "NTSC/PAL" } break; case "CTRL": var exa = [], bm = X.U8(p); if (bm & 1) exa.push("Std. Controller"); if (bm & 2) exa.push("Zapper"); if (bm & 4) exa.push("R.O.B."); if (bm & 8) exa.push("Arkanoid Controller"); if (bm & 0x10) exa.push("Power Pad"); if (bm & 0x20) exa.push("Four Score"); if (bm) ex = "#" + exa.join("+"); break; case "BATR": fstorage = true; break; case "MIRR": lastchunk = true; break } p += hksz; } sOptionT(t); sOption(tv); sOption(ex, 'expansion: '); if (fstorage) sOption('battery-backed RAM'); if (lastchunk) sOption(outSz(p), 'sz:'); else sVersion += '/malformed!short' } } else if (X.c("'g GCE 198'..80")) { sName = "GCE Vectrex cartridge (.VEC)"; bDetected = true; if (X.isVerbose()) { p = X.fSig(0x11, 0x20, "80"); if (p > 0) sOption(X.SA(0x11, p - 0x11)) } } else if (X.c("'VICE Snapshot File'1A")) { sName = "C64 VICE emulator snapshot (.VSF)"; bDetected = 1; sVersion = 'v' + X.U8(0x13) + '.' + X.U8(0x14).padStart(2, '0'); p = 0x25; bad = '' while (p < X.Sz()) { var hkhd = X.SA(p, 0x10), hksz = X.U32(p + 0x12, _BE); if (!/([A-Z0-9-]{3,}|Acia1)/.test(hkhd) || !isAllZeroes(p + hkhd.length, 0x10 - hkhd.length)) { bad = bad.addIfNone('badchunk'); break } else p += hksz; } if (X.isVerbose()) sOptions = X.SA(0x15, 0xF) + ' sz:' + outSz(sz); else if (p > X.Sz()) bad = bad.addIfNone('!short'); if (bad != '') sVersion = sVersion.appendS('/malformed' + bad, '/') } function isWAD() { //ref https://doomwiki.org/wiki/WAD if (!X.c("'IWAD'") && !X.c("'PWAD'")) return false; var susBE = 0, en = _LE; // Atari Jaguar port has special stuff: big-endian, the final lump tag lumpn = X.I32(4, en); if (lumpn < 0 || lumpn > X.I32(4, _BE)) { lumpn = X.I32(4, _BE); if (lumpn > 0) { susBE++; en = _BE } else return false; } var i = 0, msz = 0, dirp = X.I32(8, en), p = dirp; if (!isWithin(dirp, 12, X.Sz())) return false; else susBE++; var lumps = [], maxlump = Math.min(lumpn, 0x40); //a bit too many lumps in a doom2.wad file, too slow for (; i < maxlump; i++, p += 0x10) { if (p + 0x10 > X.Sz()) return false; var ofs = X.I32(p, en), sz = X.I32(p + 4, en); if (ofs < 0 || sz < 0 || !isWithin(ofs, 12, X.Sz())) return false; if (X.c("'ENDOFWAD'", p + 8)) susBE++; lumps.push([ofs, sz, X.readBytes(p + 8, 8)]); } lumps = lumps.sort(function (a, b) { return a[0] - b[0] }); for (i = 0; i < maxlump; i++) { var co = (lumps[i][2][0] & 0x80) > 0; lumps[i][2][0] = lumps[i][2][0] & 0x7F; if (charStat(lumps[i][2], true).indexOf('allxsc') < 0) return false; if (!co && i < maxlump - 2 && lumps[i][0] + lumps[i][1] > lumps[i + 1][0]) return false } v = susBE >= 2 ? 'Atari Jaguar' : 'PC'; return true } if (!bDetected && isWAD()) { sName = "iD Software's Where's All the Data resource pack (.WAD)"; bDetected = true; sVersion = X.c("'I'") ? 'initial' : 'patch'; sVersion += '#' + v; } if (!bDetected) if (X.c("'WOZ'..FF0A0D0A ........ 'INFO'") && isWithin(X.U8(3), 0x31, 0x32)) { //ref https://applesaucefdc.com/woz/reference2/ sName = "Apple II Applesauce disk image (.WOZ)"; sVersion = 'v' + X.SA(3, 1); p = 0xC; meta = bad = ''; while (p < X.Sz()) { var hkhd = X.SA(p, 4), hksz = X.U32(p + 4); p += 8; switch (hkhd) { case 'INFO': iV = X.U8(p); bDetected = true; dim = X.U8(p + 1) == 1 ? '5¼"' : X.U8(p + 1) == 2 ? '3½"' : '?'; if (iV >= 2) ds = X.U8(p + 37) == 1 ? ' SS' : X.U8(p + 37) == 2 ? ' DS' : ' ?'; else ds = ''; sOption('disk:' + dim + ds); if (X.U8(p + 2) == 1) sOption('write-protected'); if (iV >= 2) { if (t = X.U8(p + 42)) sOption(t, 'min.RAM:', 'k'); t = ''; fl = X.U16(p + 40); if (!fl) t = '?'; if (fl & (1 << 0)) t = t.append(']['); if (fl & (1 << 1)) t = t.append('][ Plus'); if (fl & (1 << 2)) t = t.append('//e'); if (fl & (1 << 3)) t = t.append('//c'); if (fl & (1 << 4)) t = t.append('//e Enhanced'); if (fl & (1 << 5)) t = t.append('IIgs'); if (fl & (1 << 6)) t = t.append('//c Plus'); if (fl & (1 << 7)) t = t.append('///'); if (fl & (1 << 8)) t = t.append('/// Plus'); sOption(t, 'for Apple '); } break; case 'TMAP': case 'TRKS': case 'FLUX': case 'WRIT': break; case 'META': meta = X.SC(p, hksz, 'UTF8').replace(/\x0A/g, ",").replace(/\x09/g, ":"); break } p += hksz; } if (p > X.Sz()) bad = bad.addIfNone('!short'); //if(X.isDeepScan() && X.calculateCRC32(12,sz-12) != X.U32(8)) bad = bad.addIfNone('!badcrc'); if (bad != '') sVersion = sVersion.appendS('/malformed' + bad, '/') if (X.isVerbose()) { sOptionT(addEllipsis(meta), 'info:"', '"'); sOption(outSz(p), 'sz:'); } } function isZ80() { //from https://github.com/FuseEmulator/fuse-emulator-svn/blob/master/libspectrum/z80.c // & https://worldofspectrum.org/faq/reference/z80format.htm // basic header len = 30, v2ext = 23, v3ext = 54, xzxext = 55 if (!extIs('z80') && !extIs('slt')) return false; if (X.Sz() < 1380) return false; nv = 0; co = true; joystick = hw = ''; const xhdr = 32, b12 = X.U8(12); if (b12 == 0xFF) b12 = 1; var pc = X.U16(6), srx = X.U8(37) & 0x80, hdrsz = 0x1E; if (!pc) { //PC register 0 means v2+ switch (xblk = X.U16(30)) { case 23: nv = 2; break; case 54: case 55: nv = 3; break; default: return false } hdrsz += xblk + 2; switch (nv) { case 2: switch ((X.U8(29) >> 6) && 3) { case 0: joystick = 'cursor'; break; case 1: joystick = 'Kempston'; break; case 2: joystick = 'SinclairI2-L'; break; case 3: joystick = 'SinclairI2-R' } break; case 3: switch ((X.U8(29) >> 6) && 3) { case 0: joystick = 'cursor'; break; case 1: joystick = 'Kempston'; break; case 3: joystick = 'SinclairI2-R'; break; case 2: if (X.c("030F0308 03040302 0301", xhdr + 32)) joystick = 'Sinclair2-L'; else joystick = 'custom'; } break; default: return false } var tp = X.U8(xhdr + 2), mgttp = X.U8(xhdr + 51); if (tp < 7) { switch (nv) { case 2: switch (tp) { case 0: hw = 'ZX Spectrum ' + (srx ? '16k' : '48k'); break; case 1: hw = 'ZX Spectrum ' + (srx ? '16' : '48') + 'k & Interface1'; break; case 2: hw = 'ZX Spectrum ' + (srx ? '16' : '48') + 'k & SamRam'; break; case 3: hw = 'ZX Spectrum ' + (srx ? '+2' : '128k'); break; case 4: hw = 'ZX Spectrum ' + (srx ? '+2' : '128k') + ' & Interface1'; break; default: return false } break; case 3: const mgttps = ['MGT EPSON DISCiPLE', 'MGT HP DISCiPLE', 'MGT +D']; mgttp = [0, 1, 16].indexOf(mgttp); switch (tp) { case 0: hw = 'ZX Spectrum ' + (srx ? '16k' : '48k'); break; case 1: hw = 'ZX Spectrum ' + (srx ? '16' : '48') + 'k & Interface1'; break; case 2: hw = 'ZX Spectrum ' + (srx ? '16' : '48') + 'k & SamRam'; break; case 3: if (mgttp < 0) return false; hw = 'ZX Spectrum ' + (srx ? '16' : '48') + 'k & ' + mgttps[mgttp] + ' MGT'; break; case 4: hw = 'ZX Spectrum ' + (srx ? '+2' : '128k'); break; case 5: hw = 'ZX Spectrum ' + (srx ? '+2' : '128k') + ' & Interface1'; break; case 6: if (mgttp < 0) return false; hw = 'ZX Spectrum ' + (srx ? '+2' : '128k') + ' & ' + mgttps[mgttp] + ' MGT'; break; default: return false //won't happen } break; default: return false //won't happen } } else { switch (tp) { case 7: case 8: hw = 'ZX Spectrum ' + (srx ? '+2A' : '+3'); break; case 9: hw = 'Pentagon 128+'; break; case 10: hw = 'Scorpion ZS-256'; break; case 11: hw = 'Didaktik-Kompakt'; break; case 12: hw = 'ZX Spectrum +2'; break; case 13: hw = 'ZX Spectrum +2A'; break; case 14: hw = 'Timex Sinclair TC-2048'; break; case 15: hw = 'Timex Sinclair TC-2068'; case 128: hw = 'Timex Sinclair TS-2068'; break; default: return false } } if (X.U8(37) & 0x44) hw += ' + Fuller Box'; else if (X.U8(37) & 4) hw += ' + Melodik'; } else { nv = 1; hw = 'ZX Spectrum 48k'; co = (b12 & 0x20) > 0; switch ((X.U8(29) >> 6) && 3) { case 0: joystick = 'cursor'; break; case 1: joystick = 'Kempston'; break; case 2: joystick = 'SinclairI2-L'; break; case 3: joystick = 'SinclairI2-R' } } pgs = []; if (!co) sz = p = hdrsz + 0xC000; else { const maxbsz = nv == 1 ? 0xC000 : 0x4000; for (p = hdrsz, i = unpsz = 0; p < X.Sz() && i < 0x40; i++) { //reading blocks, i = blocks count in case of a FP loop if (X.c("000000'SLT'", p)) break; var hksz = nv == 1 ? 0x10000 : X.U16(p), //compressed chunk size; moot if v.1 pg = nv == 1 ? 3 : X.U8(p + 2); // ROM/RAM 'page' number; page 3 is the normal start of a 48k snapshot if (pgs.indexOf(pg) >= 0) if (i < 3) return false; else break else pgs.push(pg); if (nv > 1) p += 3; //_l2r('z80',p,'blk '+i+' p.'+pg+' sz '+Hex(hksz)) if (i > 0) q = p + hksz; else for (bsz = b = c = 0, q = p; q < p + hksz && bsz < maxbsz && q < X.Sz();) { //parse a block — a couple times; can be slow if (X.c("EDED", q)) { q += 2; c = X.U8(q++); b = X.U8(q++); if (c < 5 && b != 0xED) return false; bsz += c; } else { q++; bsz++ } if (nv == 1 && X.c("00EDED00", q)) { q += 4; break } // block-end marker } //for: parse a block if (bsz != maxbsz || (n > 1 && q != p + hksz)) return false; p = q; unpsz += bsz; if (nv == 1 || pg > 10 || pgs.length > 10) break; } //for: reading blocks //_l2r('z80',p,'blks:'+i+' pages:'+pgs.join('+')+' unpsz '+Hex(unpsz)) if (p > X.Sz() || (nv > 1 && !i)) return false; sz = p } if (slt = X.c("000000'SLT'", p)) sltcycle: for (sltsz = 0, sltlv = [], p += 6; p < X.Sz(); p += 8) switch (X.U16(p)) { case 0: sz += 14 + sltsz; sltinfo = 'SLT levels:' + sltlv.join(','); break sltcycle; case 1: sltlv.push(X.U16(p + 2)); sltsz += 8 + X.U32(p + 4); break; default: sltsz += 8 + X.U32(p + 4); _l2r('z80', p, 'Unknown block! Please send this file to the author of rom.1.sg'); break //unknown block! } else sltinfo = ''; return true } if (!bDetected && isZ80()) { sName = slt ? 'ZX Spectrum state snapshot + levels (.SLT)' : 'ZX Spectrum state snapshot (.Z80)'; bDetected = true; sVersion = 'v' + nv; if (nv == 3 && X.U16(30) == 55) sVersion += 'x'; if (co) sVersion += '/compressed'; if (X.isVerbose()) { sOption(hw, 'on:'); sOption(joystick, 'joystick:'); if (co) sOption('pages:' + pgs.join('+') + ' unp.sz:' + Util.divu64(unpsz, 1024) + 'k'); if (slt) sOption(sltinfo); sOption(outSz(sz), 'sz:') } } // shaky heuristics follow if (!bDetected && X.isHeuristicScan()) { function isTAP() { //from https://github.com/0sAND1s/HCDisk/blob/master/Tape/tap.cpp if (X.Sz() < 17 || X.Sz() < X.U16(0) + 2) return false; p = blk = sus = 0; fnames = bad = ''; const types = ['B', 'N', 'S', 'C']; while (p < X.Sz()) { //parse the blocks hksz = X.U16(p); if (!hksz) return false; p += 2; if (X.Sz() < p + hksz) break; var c = 0, tp = X.U8(p); if ([0, 0xFF].indexOf(tp) < 0) break; if (p < 0xC000 && blk < 5) { /*CRC test. No need to test the WHOLE file*/ for (i = p; i < p + hksz - 1; i++) c ^= X.U8(i); if (c != X.U8(i)) return false; } if (tp == 0) { //_l2r('tap',p+2,X.readBytes(p+2,10)+':' // +outArray(X.readBytes(p+2,10),16) // +' -> '+decEncoding(X.readBytes(p+2,10),CPSpeccy)) if (charStat(t = X.readBytes(p + 2, 10), 1).indexOf('allasc') < 0) { sus++; bad = bad.addIfNone('!nonASCII:' + decEncoding(t, CPSpeccy)) } t = decEncoding(t, CPSpeccy).trim(); if (!t) if (X.U8(p + 1) < 3) return false; else { sus++; bad = bad.addIfNone('!emptyname') } fnames = fnames.appendS(t + '.' + types[X.U8(p + 1)], ',') } else fnames = fnames.appendS((hksz - 3), ':'); if (sus > 2) return false; blk++; p += hksz } if (!fnames.length && blk) { sus++; bad = bad.addIfNone('!nonameblk0') } if (blk < 2 && bad.indexOf('!nonASCII')) sus++; //if(X.Sz() != p) sus++; if (sus > 2 || !blk || !fnames.length || p < 17) { delete bad; return false } return true } if (isTAP()) { sName = 'ZX Spectrum tape (.TAP)'; bDetected = true; if (bad.length) sVersion = 'malformed#' + sus + bad; if (X.isVerbose()) { sOptionT(addEllipsis(fnames, 0xA0), 'blocks:' + blk + ' (', ')'); sOption(outSz(p), 'sz:') } } // if(extIs('bin')) // if(X.c("FA33C08E") || X.c("FA33C08E",0x455E0)) { //doens't catch all // _setResult("ROM","Palm OS disk image (.BIN)",'','') // } if (extIs('rom')) if ((X.c("4142") || X.c("4142", 0x4000) || X.c("41421040", 0x3C000) || X.c("0002204810A8D08055E0A8B088800280", 0x7FF0)) // the weirdly specific one for Eagle Fighter (JP).rom && [0x2000, 0x4000, 0x8000, 0xC000, 0x10000, 0x20000, 0x40000, 0x60000, 0x80000, 0x100000].indexOf(X.Sz()) >= 0) { _setResult("ROM", "Microsoft MSX/MSX 2 cartridge (.ROM)", '', '') } if (extIs('sna') && X.Sz() == 49179) _setResult("ROM", "ZX Spectrum 48k state snapshot file (.SNA)", '', '') } return result() } /* beautify ignore:end */ ================================================ FILE: db/Binary/U-Boot.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: https://source.denx.de/u-boot/u-boot/-/raw/e4dba4b/include/image.h meta("format"); function detect() { if (Binary.getSize() >= 0x40) { if (Binary.compare("27051956")) { // Image Header Magic Number bDetected = true; sName = "U-Boot "; switch (Binary.readByte(0x1E)) { // Image Type case 0: sName += "Invalid Image"; break; case 1: sName += "Standalone Program"; break; case 2: sName += "OS Kernel Image"; break; case 3: sName += "RAMDisk Image"; break; case 4: sName += "Multi-File Image"; break; case 5: sName += "Firmware Image"; break; case 6: sName += "Script file"; break; case 7: sName += "Filesystem Image"; break; case 8: sName += "Binary Flat Device Tree Blob"; break; case 9: sName += "Kirkwood Boot Image"; break; case 10: sName += "Freescale IMXBoot Image"; break; case 11: sName += "Davinci UBL Image"; break; case 12: sName += "TI OMAP Config Header Image"; break; case 22: sName += "A list of typeless images"; break; case 23: sName += "Rockchip Boot Image"; break; case 24: sName += "Rockchip SD card"; break; case 25: sName += "Rockchip SPI image"; break; case 26: sName += "Xilinx Zynq Boot Image"; break; case 27: sName += "Xilinx ZynqMP Boot Image"; break; case 28: sName += "FPGA Image"; break; case 29: sName += "VYBRID .vyb Image"; break; case 30: sName += "Trusted Execution Environment OS Image"; break; case 31: sName += "Firmware Image with HABv4 IVT"; break; default: return; } } if (bDetected) { sVersion = "\"" + Binary.getString(0x20, 0x20) + "\""; // Image Name switch (Binary.readByte(0x1C)) { // Operating System case 0: sOptions = "Invalid OS"; break; case 1: sOptions = "OpenBSD"; break; case 2: sOptions = "NetBSD"; break; case 3: sOptions = "FreeBSD"; break; case 4: sOptions = "4.4BSD"; break; case 5: sOptions = "Linux"; break; case 6: sOptions = "SVR4"; break; case 7: sOptions = "Esix"; break; case 8: sOptions = "Solaris"; break; case 9: sOptions = "Irix"; break; case 10: sOptions = "SCO"; break; case 11: sOptions = "Dell"; break; case 12: sOptions = "NCR"; break; case 13: sOptions = "LynxOS"; break; case 14: sOptions = "VxWorks"; break; case 15: sOptions = "pSOS"; break; case 16: sOptions = "QNX"; break; case 17: sOptions = "Firmware"; break; case 18: sOptions = "RTEMS"; break; case 19: sOptions = "ARTOS"; break; case 20: sOptions = "Unity OS"; break; case 21: sOptions = "INTEGRITY"; break; case 22: sOptions = "OSE"; break; case 23: sOptions = "Plan 9"; break; case 24: sOptions = "OpenRTOS"; break; case 25: sOptions = "ARM Trusted Firmware"; break; case 26: sOptions = "Trusted Execution Environment"; break; case 27: sOptions = "RISC-V OpenSBI"; break; case 28: sOptions = "EFI Firmware"; break; } switch (Binary.readByte(0x1D)) { // CPU architecture case 0: sOptions = sOptions.append("Invalid CPU"); break; case 1: sOptions = sOptions.append("Alpha"); break; case 2: sOptions = sOptions.append("ARM"); break; case 3: sOptions = sOptions.append("Intel x86"); break; case 4: sOptions = sOptions.append("IA64"); break; case 5: sOptions = sOptions.append("MIPS"); break; case 6: sOptions = sOptions.append("MIPS64"); break; case 7: sOptions = sOptions.append("PowerPC"); break; case 8: sOptions = sOptions.append("IBM S390"); break; case 9: sOptions = sOptions.append("SuperH"); break; case 10: sOptions = sOptions.append("Sparc"); break; case 11: sOptions = sOptions.append("Sparc64"); break; case 12: sOptions = sOptions.append("M68K"); break; case 13: sOptions = sOptions.append("Nios-32"); break; case 14: sOptions = sOptions.append("MicroBlaze"); break; case 15: sOptions = sOptions.append("Nios-II"); break; case 16: sOptions = sOptions.append("Blackfin"); break; case 17: sOptions = sOptions.append("AVR32"); break; case 18: sOptions = sOptions.append("STM ST200"); break; case 19: sOptions = sOptions.append("Sandbox"); break; case 20: sOptions = sOptions.append("NDS32"); break; case 21: sOptions = sOptions.append("OpenRISC"); break; case 22: sOptions = sOptions.append("ARM64"); break; case 23: sOptions = sOptions.append("ARC"); break; case 24: sOptions = sOptions.append("AMD x86_64"); break; case 25: sOptions = sOptions.append("Xtensa"); break; case 26: sOptions = sOptions.append("RISC-V"); break; } switch (Binary.readByte(0x1F)) { // Compression Type case 0: sOptions = sOptions.append("no compression"); break; case 1: sOptions = sOptions.append("gzip"); break; case 2: sOptions = sOptions.append("bzip2"); break; case 3: sOptions = sOptions.append("lzma"); break; case 4: sOptions = sOptions.append("lzo"); break; case 5: sOptions = sOptions.append("lz4"); break; case 6: sOptions = sOptions.append("zstd"); break; } } } return result(); } ================================================ FILE: db/Binary/__MiniExtensionsHeuristic_By_DosX.7.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // Updated by BJNFNE const detect = main; function main() { if (Binary.isHeuristicScan()) { const currentFileExtension = Binary.getFileSuffix().toLowerCase(), isBinaryFile = !Binary.isPlainText(), extensionsDb = [ { ext: ["cmd", "bat"], type: "language", name: "Batch", bin: false }, { ext: ["html", "htm"], type: "language", name: "HTM", bin: false }, { ext: ["css"], type: "language", name: "Cascading Style Sheets", bin: false }, { ext: ["c", "h"], type: "language", name: "C", bin: false }, { ext: ["cpp", "hpp"], type: "language", name: "C++", bin: false }, { ext: ["cs"], type: "language", name: "C#", bin: false }, { ext: ["java"], type: "language", name: "Java", bin: false }, { ext: ["py"], type: "language", name: "Python 🐓", bin: false }, { ext: ["json"], type: "language", name: "JavaScript Object Notation", bin: false }, { ext: ["xml"], type: "language", name: "Extensible Markup", bin: false }, { ext: ["ini"], type: "format", name: "Configuration File", bin: false }, { ext: ["yml", "yaml"], type: "language", name: "YAML", bin: false }, { ext: ["php"], type: "language", name: "PHP", bin: false }, { ext: ["rb"], type: "language", name: "Ruby", bin: false }, { ext: ["pl"], type: "language", name: "Perl", bin: false }, { ext: ["swift"], type: "language", name: "Swift", bin: false }, { ext: ["rs"], type: "language", name: "Rust", bin: false }, { ext: ["go"], type: "language", name: "Go", bin: false }, { ext: ["ts"], type: "language", name: "TypeScript", bin: false }, { ext: ["kt"], type: "language", name: "Kotlin", bin: false }, { ext: ["dart"], type: "language", name: "Dart", bin: false }, { ext: ["lua"], type: "language", name: "Lua", bin: false }, { ext: ["sh"], type: "language", name: "Bash", bin: false }, { ext: ["r"], type: "language", name: "R", bin: false }, { ext: ["scala"], type: "language", name: "Scala", bin: false }, { ext: ["lisp"], type: "language", name: "Lisp", bin: false }, { ext: ["clj"], type: "language", name: "Clojure", bin: false }, { ext: ["asm"], type: "language", name: "Assembly", bin: false }, { ext: ["vb"], type: "language", name: "VB.NET", bin: false }, { ext: ["fs"], type: "language", name: "F#", bin: false }, { ext: ["ps1"], type: "language", name: "PowerShell Script", bin: false }, { ext: ["ml"], type: "language", name: "OCaml", bin: false }, { ext: ["hs"], type: "language", name: "Haskell", bin: false }, { ext: ["vhd"], type: "language", name: "VHDL", bin: false }, { ext: ["verilog"], type: "language", name: "Verilog", bin: false }, { ext: ["ada"], type: "language", name: "Ada", bin: false }, { ext: ["for"], type: "language", name: "Fortran", bin: false }, { ext: ["pas"], type: "language", name: "Pascal", bin: false }, { ext: ["m"], type: "language", name: "Objective-C", bin: false }, { ext: ["v"], type: "language", name: "V", bin: false }, { ext: ["img", "iso"], type: "format", name: "Disk Image", bin: true }, { ext: ["dmg"], type: "format", name: "Apple Disk Image", bin: true }, { ext: ["cab"], type: "format", name: "Cabinet Archive", bin: true }, { ext: ["dat"], type: "format", name: "Data File", bin: true }, { ext: ["vmdk"], type: "format", name: "VMware Virtual Disk", bin: true }, { ext: ["vhd", "vhdx"], type: "format", name: "Virtual Hard Disk", bin: true }, { ext: ["apk"], type: "format", name: "Android Package", bin: true }, { ext: ["so"], type: "format", name: "Shared Object Library", bin: true }, { ext: ["obj"], type: "format", name: "Object File", bin: true }, { ext: ["a"], type: "format", name: "Static Library", bin: true }, { ext: ["lib"], type: "format", name: "Library File", bin: true }, { ext: ["o"], type: "format", name: "Compiled Object File", bin: true }, { ext: ["pdb"], type: "format", name: "Program Database", bin: true }, { ext: ["nso"], type: "format", name: "Nintendo Switch Object", bin: true }, { ext: ["iso"], type: "format", name: "ISO Disk Image", bin: true }, { ext: ["img"], type: "format", name: "Raw Disk Image", bin: true }, { ext: ["dylib"], type: "format", name: "Dynamic Library (macOS)", bin: true }, { ext: ["xex"], type: "format", name: "Xbox Executable File", bin: true }, { ext: ["rom"], type: "format", name: "ROM Image", bin: true }, { ext: ["pe"], type: "format", name: "Portable Executable", bin: true }, { ext: ["bpl"], type: "format", name: "Borland Package Library", bin: true }, { ext: ["vbx"], type: "format", name: "Visual Basic", bin: true }, { ext: ["ocx"], type: "format", name: "ActiveX Control", bin: true }, { ext: ["psd"], type: "format", name: "Photoshop Document", bin: true }, { ext: ["ai"], type: "format", name: "Adobe Illustrator", bin: true }, { ext: ["indd"], type: "format", name: "InDesign Document", bin: true }, { ext: ["xd"], type: "format", name: "Adobe XD", bin: true }, { ext: ["svg"], type: "format", name: "Scalable Vector Graphics", bin: false }, { ext: ["blend"], type: "format", name: "Blender Project", bin: true }, { ext: ["obj"], type: "format", name: "3D Object", bin: true }, { ext: ["fbx"], type: "format", name: "Autodesk FBX", bin: true }, { ext: ["stl"], type: "format", name: "STL Model", bin: true }, { ext: ["gltf", "glb"], type: "format", name: "GLTF/GLB Model", bin: true }, { ext: ["png"], type: "format", name: "Portable Network Graphics", bin: true }, { ext: ["jpg", "jpeg"], type: "format", name: "JPEG Image", bin: true }, { ext: ["bmp"], type: "format", name: "Bitmap Image", bin: true }, { ext: ["tiff"], type: "format", name: "Tagged Image File Format", bin: true }, { ext: ["tga"], type: "format", name: "Targa Image", bin: true }, { ext: ["heic"], type: "format", name: "High Efficiency Image Format", bin: true }, { ext: ["raw", "cr2", "nef", "orf"], type: "format", name: "RAW Image", bin: true }, { ext: ["eps"], type: "format", name: "Encapsulated PostScript", bin: true }, { ext: ["3ds"], type: "format", name: "3D Studio Max", bin: true }, { ext: ["max"], type: "format", name: "3ds Max Project", bin: true }, { ext: ["c4d"], type: "format", name: "Cinema 4D Project", bin: true }, { ext: ["dae"], type: "format", name: "Collada", bin: true }, { ext: ["skp"], type: "format", name: "SketchUp", bin: true }, { ext: ["dxf"], type: "format", name: "Drawing Exchange Format", bin: true }, { ext: ["dwg"], type: "format", name: "AutoCAD Drawing", bin: true }, { ext: ["iges", "igs"], type: "format", name: "IGES Model", bin: true }, { ext: ["step", "stp"], type: "format", name: "STEP Model", bin: true }, { ext: ["vrml", "wrl"], type: "format", name: "VRML Model", bin: true }, { ext: ["x3d"], type: "format", name: "X3D Model", bin: true }, { ext: ["mp4"], type: "format", name: "MPEG-4 Video", bin: true }, { ext: ["bik"], type: "format", name: "Bink Video", bin: true }, { ext: ["mkv"], type: "format", name: "Matroska Video", bin: true }, { ext: ["avi"], type: "format", name: "AVI Video", bin: true }, { ext: ["mov"], type: "format", name: "QuickTime Movie", bin: true }, { ext: ["flv"], type: "format", name: "Flash Video", bin: true }, { ext: ["webm"], type: "format", name: "WebM Video", bin: true }, { ext: ["mp3"], type: "format", name: "MP3 Audio", bin: true }, { ext: ["wav"], type: "format", name: "Waveform Audio", bin: true }, { ext: ["aac"], type: "format", name: "Advanced Audio Coding", bin: true }, { ext: ["ogg"], type: "format", name: "Ogg Vorbis", bin: true }, { ext: ["m4a"], type: "format", name: "MPEG-4 Audio", bin: true }, { ext: ["wma"], type: "format", name: "Windows Media Audio", bin: true }, { ext: ["prproj"], type: "format", name: "Premiere Pro Project", bin: true }, { ext: ["aep"], type: "format", name: "After Effects Project", bin: true }, { ext: ["psb"], type: "format", name: "Photoshop Big Document", bin: true }, { ext: ["cdr"], type: "format", name: "CorelDRAW Image", bin: true }, { ext: ["afdesign"], type: "format", name: "Affinity Designer", bin: true }, { ext: ["afphoto"], type: "format", name: "Affinity Photo", bin: true }, { ext: ["afpub"], type: "format", name: "Affinity Publisher", bin: true }, { ext: ["sketch"], type: "format", name: "Sketch Project", bin: true }, { ext: ["xcf"], type: "format", name: "GIMP Image", bin: true }, { ext: ["kra"], type: "format", name: "Krita Image", bin: true }, { ext: ["vproj"], type: "format", name: "Vegas Pro Project", bin: true }, { ext: ["wpd"], type: "format", name: "WordPerfect Document", bin: true }, { ext: ["vpj"], type: "format", name: "VideoPad Project", bin: true }, { ext: ["prtl"], type: "format", name: "Premiere Title", bin: true }, { ext: ["pdn"], type: "format", name: "Paint.NET Image", bin: true }, { ext: ["tmp", "temp"], type: "format", name: "Temporary file", bin: true }, { ext: ["tmp", "temp"], type: "format", name: "Temporary file", bin: false }, { ext: ["mb"], type: "format", name: "Maya Binary Project", bin: true }, { ext: ["ma"], type: "format", name: "Maya ASCII Project", bin: true }, { ext: ["lwo"], type: "format", name: "LightWave Object", bin: true }, { ext: ["lws"], type: "format", name: "LightWave Scene", bin: true }, { ext: ["obj"], type: "format", name: "Wavefront OBJ", bin: true }, { ext: ["abc"], type: "format", name: "Alembic", bin: true }, { ext: ["bgeo"], type: "format", name: "Houdini Geometry", bin: true }, { ext: ["vdb"], type: "format", name: "OpenVDB", bin: true }, { ext: ["usd"], type: "format", name: "Universal Scene Description", bin: true }, { ext: ["usdz"], type: "format", name: "Universal Scene Description (zipped)", bin: true }, { ext: ["vox"], type: "format", name: "MagicaVoxel", bin: true }, { ext: ["cob"], type: "format", name: "Caligari Object", bin: true }, { ext: ["scn"], type: "format", name: "3D Scene", bin: true }, { ext: ["3dm"], type: "format", name: "Rhinoceros 3D Model", bin: true }, { ext: ["ztl"], type: "format", name: "ZBrush Tool", bin: true }, { ext: ["zpr"], type: "format", name: "ZBrush Project", bin: true }, { ext: ["bip"], type: "format", name: "Character Studio Biped", bin: true }, { ext: ["3mf"], type: "format", name: "3D Manufacturing Format", bin: true }, { ext: ["ply"], type: "format", name: "Polygon File Format", bin: true }, { ext: ["x"], type: "format", name: "DirectX Model", bin: true }, { ext: ["ms3d"], type: "format", name: "MilkShape 3D Model", bin: true }, { ext: ["nif"], type: "format", name: "Gamebryo Model Format", bin: true }, { ext: ["mdl"], type: "format", name: "3D Model", bin: true }, { ext: ["wrl"], type: "format", name: "VRML World", bin: true }, { ext: ["fac"], type: "format", name: "Autodesk Face", bin: true }, { ext: ["xsi"], type: "format", name: "Softimage XSI", bin: true }, { ext: ["pov"], type: "format", name: "POV-Ray File", bin: true }, { ext: ["sldprt"], type: "format", name: "SolidWorks Part", bin: true }, { ext: ["sldasm"], type: "format", name: "SolidWorks Assembly", bin: true }, { ext: ["slddrw"], type: "format", name: "SolidWorks Drawing", bin: true }, { ext: ["prt"], type: "format", name: "Creo Parametric Part", bin: true }, { ext: ["asm"], type: "format", name: "Creo Parametric Assembly", bin: true }, { ext: ["nds"], type: "format", name: "Nintendo DS ROM", bin: true }, { ext: ["z64"], type: "format", name: "Nintendo 64 ROM", bin: true }, { ext: ["n64"], type: "format", name: "Nintendo 64 ROM image (V64)", bin: true }, { ext: ["pcx"], type: "format", name: "PiCture eXchange", bin: true }, { ext: ["wbfs"], type: "format", name: "Wii Backup File System", bin: true }, { ext: ["si"], type: "format", name: "Interleaf File", bin: true }, { ext: ["wdb"], type: "format", name: "World DataBase", bin: true }, { ext: ["asp"], type: "format", name: "Active Server Pages", bin: false }, // Coktel Vision formats: { ext: ["vmd"], type: "format", name: "Video and Media Data", bin: true }, { ext: ["mesh"], type: "format", name: "3D Collide Data", bin: true }, { ext: ["tot"], type: "format", name: "Script file", bin: true }, { ext: ["ext"], type: "format", name: "Script resource file", bin: true }, { ext: ["ide"], type: "format", name: "Script function name offset", bin: true }, { ext: ["stk", "itk", "jtk", "ltk"], type: "format", name: "STK1.0", bin: true }, { ext: ["var"], type: "format", name: "Variable file", bin: true }, { ext: ["cmp"], type: "format", name: "Sprite file", bin: true }, { ext: ["tts"], type: "format", name: "Text to Speech file", bin: false }, { ext: ["pag"], type: "format", name: "Update file", bin: false }, { ext: ["bcd"], type: "format", name: "BCD (Information for new Application)", bin: false }, { ext: ["bcd1"], type: "format", name: "BCD (Information for Environment)", bin: false }, { ext: ["cd1"], type: "format", name: "CD1 (Setup Information)", bin: false }, { ext: ["rxy"], type: "format", name: "Relative Sprite Coordinates", bin: true }, { ext: ["fra"], type: "format", name: "French text (Francais)", bin: true }, { ext: ["all"], type: "format", name: "German text (Allemand)", bin: true }, { ext: ["ang"], type: "format", name: "English text (Anglais)", bin: true }, { ext: ["esp"], type: "format", name: "Spanish text (Espagnol)", bin: true }, { ext: ["ita"], type: "format", name: "Italian text", bin: true }, { ext: ["fnt", "let"], type: "format", name: "Font", bin: true }, { ext: ["snd"], type: "format", name: "Sound file", bin: true }, { ext: ["ani"], type: "format", name: "Animation file", bin: true }, { ext: ["dec"], type: "format", name: "Decal (Background) file", bin: true }, { ext: ["tbr"], type: "format", name: "Instrument parameters", bin: true }, { ext: ["mdy"], type: "format", name: "Music score", bin: true }, { ext: ["err"], type: "format", name: "Error File", bin: false }, { ext: ["adi"], type: "format", name: "Debug (Adi) File", bin: true }, { ext: ["bou"], type: "format", name: "Debug (Adibou) File", bin: true }, { ext: ["pla"], type: "format", name: "Debug (Playtoons) File", bin: true }, { ext: ["ask"], type: "format", name: "Installation help", bin: false }, { ext: ["dag"], type: "format", name: "Dialog Text", bin: true }, { ext: ["seq"], type: "format", name: "Animation Sequence", bin: true }, { ext: ["scn"], type: "format", name: "Scene File", bin: false }, { ext: ["rec"], type: "format", name: "Record File", bin: true }, { ext: ["gam"], type: "format", name: "Savegame File", bin: true }, { ext: ["lvl"], type: "format", name: "Level File", bin: true }, { ext: ["stb"], type: "format", name: "STB (OGG)", bin: true }, { ext: ["adbx"], type: "format", name: "AdibouX", bin: true }, { ext: ["sav"], type: "format", name: "Save", bin: true }, // Generic formats: { ext: ["flx", "flc"], type: "format", name: "FLIC", bin: true }, { ext: ["md"], type: "format", name: "Markdown", bin: false }, { ext: ["map"], type: "format", name: "Mapfile", bin: false }, { ext: ["def"], type: "format", name: "Definition file", bin: false }, { ext: ["dbt"], type: "format", name: "Database Text File", bin: true }, { ext: ["cfg"], type: "format", name: "Config File", bin: true }, { ext: ["inf"], type: "format", name: "INF file (setup Information file)", bin: true }, { ext: ["icns"], type: "format", name: "Apple Icon Image format", bin: true }, { ext: ["mdx"], type: "format", name: "Multidimensional Expressions", bin: true }, { ext: ["qdat"], type: "format", name: "QuickTime data", bin: true }, { ext: ["pup"], type: "format", name: "Playstation Update Package", bin: true }, { ext: ["mps"], type: "format", name: "Mathematical Programming System", bin: true }, { ext: ["gzf"], type: "format", name: "Ghidra Zip File", bin: true }, { ext: ["cue"], type: "format", name: "CUE sheet", bin: false }, { ext: ["cat"], type: "format", name: "Windows Cabinet File", bin: true }, { ext: ["sdb"], type: "format", name: "Shim Database", bin: true }, { ext: ["mof"], type: "format", name: "Managed Object Format", bin: false }, { ext: ["nls"], type: "format", name: "National Language Support", bin: true }, { ext: ["sse"], type: "format", name: "Streaming SIMD Extensions", bin: true }, { ext: ["res"], type: "format", name: "Resource file", bin: true }, { ext: ["md5"], type: "format", name: "MD5 Checksum", bin: false }, { ext: ["db"], type: "format", name: "Database", bin: true }, { ext: ["xa"], type: "audio", name: "XA", bin: true }, { ext: ["torrent"], type: "format", name: "Torrent", bin: true }, { ext: ["bms"], type: "format", name: "QuickBMS", bin: false }, { ext: ["gbc"], type: "format", name: "GameBoy Color ROM", bin: true }, { ext: ["tsv"], type: "format", name: "Tab-Separated Values", bin: false }, { ext: ["st"], type: "format", name: "ST Disk Image", bin: true }, { ext: ["str"], type: "format", name: "Streaming Data Movie", bin: true }, { ext: ["rpt"], type: "format", name: "Report file", bin: false }, { ext: ["iss"], type: "format", name: "Inno Setup Script", bin: false }, { ext: ["plist"], type: "format", name: "Property List", bin: false }, { ext: ["vcd"], type: "format", name: "Value change dump", bin: false }, { ext: ["gitignore"], type: "format", name: "Git ignore file", bin: false }, // ScummVM formats: { ext: ["gob"], type: "format", name: "Config file (extract_gob_stk)", bin: false }, // Director formats: { ext: ["dxr"], type: "format", name: "Protected Director Movie", bin: true }, { ext: ["cxt"], type: "format", name: "Adobe Director Protected Cast file", bin: true }, { ext: ["dcr"], type: "format", name: "Published Shockwave Movie", bin: true }, { ext: ["cct"], type: "format", name: "Published Shockwave Cast", bin: true }, { ext: ["cst"], type: "format", name: "Cast file", bin: true }, { ext: ["xobj"], type: "format", name: "XObjects", bin: true }, // 3DS formats: { ext: ["cia"], type: "format", name: "CTR Importable Archive", bin: true }, // Amiga formats: { ext: ["adf"], type: "format", name: "Amiga Disk File", bin: true }, ]; for (var i = 0; i < extensionsDb.length; i++) { var extGroup = extensionsDb[i].ext; for (var j = 0; j < extGroup.length; j++) { if (extGroup[j] === currentFileExtension && extensionsDb[i].bin === isBinaryFile) { if (_getNumberOfResults(extensionsDb[i]) < 1) { _setResult("~" + extensionsDb[i].type, extensionsDb[i].name, String(), "by extension"); } return null; } } } } } ================================================ FILE: db/Binary/__MiniJavaScriptHeuristic_By_DosX.7.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev function detect() { main(); } function main() { if (Binary.isHeuristicScan()) { switch (Binary.getFileSuffix().toLowerCase()) { case "js": // JavaScript case "jse": // JScript Encoded case "jsc": // JavaScript Compiled case "sg": // Detect It Easy module var options = String(); if (!Binary.isPlainText()) { options = "bytecode"; } else { if (Binary.getSize() > 3000) { var scriptContent = Binary.getString(0x00, Binary.getSize()); // Split the code into segments that are outside of string literals. // Handle escaping (\", \\', \`) — escaped quotes are not treated as string delimiters. // Also include expressions inside template literals `${...}` as code (they will be scanned). var segments = [], currentSegment = String(), insideString = false, stringDelimiter = String(), isEscaped = false; for (var i = 0; i < scriptContent.length; i++) { var currChar = scriptContent[i]; if (insideString) { if (isEscaped) { isEscaped = false; continue; } if (currChar === '\\') { isEscaped = true; continue; } // For template literals: when encountering `${` include nested expression into current segment if (stringDelimiter === '`' && currChar === '$' && i + 1 < scriptContent.length && scriptContent[i + 1] === '{') { // skip '{' and start accumulating the expression content i++; // now scriptContent[i] === '{' var braceDepth = 1; // Inside the expression, handle escaping as well while (i + 1 < scriptContent.length && braceDepth > 0) { i++; var innerChar = scriptContent[i]; if (innerChar === '\\') { // capture escaped char and the next one currentSegment += innerChar; if (i + 1 < scriptContent.length) { i++; currentSegment += scriptContent[i]; } continue; } if (innerChar === '{') { braceDepth++; currentSegment += innerChar; continue; } if (innerChar === '}') { braceDepth--; if (braceDepth === 0) break; currentSegment += innerChar; continue; } currentSegment += innerChar; } continue; } if (currChar === stringDelimiter) { insideString = false; stringDelimiter = String(); } // do not copy characters that are inside strings } else { // not inside a string if (currChar === '"' || currChar === "'" || currChar === '`') { // start of string — finish current segment if (currentSegment.length > 0) { segments.push(currentSegment); currentSegment = String(); } insideString = true; stringDelimiter = currChar; } else { currentSegment += currChar; } } } if (currentSegment.length > 0) segments.push(currentSegment); for (var segIndex = 0; segIndex < segments.length; segIndex++) { var tokenToProcess = segments[segIndex]; if (!/( |\t)/.test(tokenToProcess) && ( /(((var|let|const)[\t ]|\())\b[a-zA-Z](?:,[a-zA-Z]){3,}\b/.test(tokenToProcess) || /[a-zA-Z][!=]?=?=![01][;,})]/.test(tokenToProcess) )) { options = "minified/compiled"; break; } } } } _setResult("~language", "JavaScript", String(), Binary.isVerbose() ? options : String()); break; } } } ================================================ FILE: db/Binary/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = Binary; var X = Binary; includeScript("read"); ================================================ FILE: db/Binary/archive.ACE.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood includeScript("ACE"); function detect() { detect_ACE(1); return result(); } ================================================ FILE: db/Binary/archive.ARJ.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq includeScript("arj"); function detect() { detect_ARJ(1); return result(); } ================================================ FILE: db/Binary/archive.DEFLATE.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Authors: // LinXP // Kaens (TG@kaens) meta("archive"); function checkDeflate(start) { var br = new BitReader(start), tight = 0, maxf = Math.min(X.Sz(), 0x100); do { var f = br.read(1), bt = br.read(2); //_log("@"+br.offset+"^"+br.n+" blockType:"+bt+(f?" (final)":"")); var code = 0, _t = []; if (!bt) { // copy stored block data br.init(start); var len = br.read(8); len |= br.read(8) << 8; var nlen = br.read(8); nlen |= br.read(8) << 8; if (len != (nlen ^ 0xFFFF)) return 0; br.consume(len); // br.meta(br.offset); //_log(" len="+len+"="+Hex(len)+" br.ofs="+Hex(br.offset)) if (br.offset > X.Sz()) return false; if (f) tight = 1 } else if (bt == 1 || bt == 2) { if (bt == 1) { // fixed block //for(i=0; i < 24; i++) {} tight = 1; } else { //dynamic block var hlit = br.read(5) + 257; if (hlit > 286) return false; var hdist = br.read(5) + 1, hclen = br.read(4) + 4; //_log("hlit:"+hlit+" hdist:"+hdist+" hclen:"+hclen) var lent = []; const lentord = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; for (i = 0; i < hclen && br.offset < maxf; i++) lent[lentord[i]] = br.read(3); _t = createOrderlyHuffmanTable(lent, 19, br); if (!_t) return false; //_log("after creating a table @"+br.offset+"/"+br.n) i = 0; while (i < hlit + hdist) { //bitLengthDecoder.decode: if (!_t.length) return false; j = 0; while (_t[j][0] || _t[j][1]) { j = br.read(1) ? _t[j][1] : _t[j][0]; if (!j) return false } //_log("@"+br.offset+"^"+br.n+" code = "+_t[j][2]) if (_t[j][2] < 16) { /*auto insert's relevant part*/ if (i >= hlit + hdist) return false; i++ } else switch (_t[j][2]) { /* beautify preserve:start */ case 16: if (i) br.read(2); else return false; break; case 17: for (t = br.read(3) + 3; t; t--); break; case 18: for (t = br.read(7) + 11; t; t--); break; default: return false; } /* beautify preserve:end */ if (br.offset > X.Sz()) return false; } tight = 2; f = true } } else return false; //block type 3 is out //if(!X.isDeepScan() && br.ofs() >= maxf) f = true; //to avoid slowing it down with, well, unpacking } while (!f); if (tight == 1) { if (br.offset >= X.Sz()) return false; //for(;;) { //TODO // if() //} } return tight } function checkZlib(p) { if (p + 6 > X.Sz()) return false; var c = X.U8(p++); if ((c & 0xF) != 8 || (c & 0xF0) > 0x70) return false; var start = 2, f = X.U8(p++); if (f & 0x20) { if (p + 8 < X.Sz()) return false; start += 4 } if (((c << 8) | f) % 31) return false; //_log("zlib, data begins @"+Hex(start)) if (!checkDeflate(start)) return false; cmprlvl = ["fastest", "fast", "default", "max"][f >> 6]; return true } function detect() { bad = ""; if (X.Sz() >= 10 && X.c("1FA1") && checkDeflate(2)) { sName = "Gzip hack: Quasijarus Strong Compression (Z.)"; bDetected = true; } if (!bDetected && X.c("1F8B")) { //gzip method = X.U8(2); switch (method) { /* beautify preserve:start */ case 0: sVersion = "store"; bad = bad.addIfNone("!badalgo"); break; case 1: sVersion = "compress"; bad = bad.addIfNone("!badalgo"); break; case 2: sVersion = "pack"; bad = bad.addIfNone("!badalgo"); break; case 3: sVersion = "lz"; bad = bad.addIfNone("!badalgo"); break; case 8: sVersion = "deflate"; break; //the only format gzip won't throw an error about default: return false; } f = X.U8(3); fs = []; if (f & 1) fs.push("ASCII_FLAG"); if (f & 2) fs.push("HEADER_CRC"); if (f & 4) fs.push("EXTRA_FIELD"); if (f & 8) fs.push("ORIG_NAME"); if (f & 0x10) fs.push("COMMENT"); if (f & 0x20) fs.push("ENCRYPTED"); if (f & 0xC0) fs.push("RESERVED"); ts = X.I32(5, _LE); if (ts <= 0) return false; if (X.isVerbose()) { switch (X.U8(8)) { //not really meaningful case 2: sOption("best"); break; case 4: sOption("fast"); } switch (X.U8(9)) { case 0: s = "FAT FS (MS-DOS, OS/2, NT/Win32"; break; case 1: s = "Amiga"; break; case 2: s = "(Open)VMS"; break; case 3: s = "Unix"; break; case 4: s = "VM/CMS"; break; case 5: s = "Atari TOS"; break; case 6: s = "HPFS (OS/2, NT)"; break; case 7: s = "Macintosh"; break; case 8: s = "Z-System"; break; case 9: s = "CP/M"; break; case 10: s = "TOPS-20"; break; case 11: s = "NTFS (NT)"; break; case 12: s = "QDOS"; break; case 13: s = "Acorn RISCOS"; break; case 255: s = "unknown OS"; break; default: s = "?" } /* beautify preserve:end */ sOption(s, "OS code:"); } p = 10; if (f & 4) p += 4 + X.U16(p + 2, _LE); if (f & 8) { s = X.SA(p, 1024); p += s.length + 1; if (X.isVerbose()) sOption(s, 'filename:"', '"'); } if (f & 0x10) { s = X.SA(p, 1024); p += s.length + 1; if (X.isVerbose()) sOptionT(s, "cmt:"); } if (f & 0x2) p += 2; if (checkDeflate(p)) { sName = "GZIP (.gz)"; bDetected = true; if (X.isVerbose()) sOption(X.U32(X.Sz() - 4, _LE), "unp.sz:") } else if (X.isHeuristicScan()) { sName = "GZIP (.gz)"; bDetected = true } } if (!bDetected && X.isDeepScan() && X.isHeuristicScan() && X.calculateEntropy(0x40, 0x100) > 7) { for (s = 1; s < 0x40 && !bDetected; s++) { if (!bDetected && checkZlib(s)) { sName = "Zlib stream (.zlib)"; sOption("@" + Hex(s)); sOption(cmprlvl, "lv:"); bDetected = true } if (!bDetected && checkDeflate(s) > 1) { sName = "Raw Deflate stream"; sOptions = "@" + Hex(s); bDetected = true } } } return result(); } ================================================ FILE: db/Binary/archive.LZ4.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // https://github.com/inikep/lizard/blob/lizard/doc/lizard_Frame_format.md meta("archive"); function detect() { if (Binary.getSize() >= 9) { bDetected = true; switch (Binary.read_uint32(0x00, _BE)) { case 0x02214C18: sName = "LZ4 compressed data, legacy (.LZ4)"; break; case 0x04224D18: sName = "LZ4 compressed data (.LZ4)"; break; case 0x05224D18: sName = "LZ5 compressed data (.LZ5)"; break; case 0x06224D18: sName = "Lizard compressed data (.LIZ)"; break; default: bDetected = false; } if (bDetected) { var bFlags = Binary.read_uint8(0x04); if (bFlags & 64) { sVersion = "1.0"; } if (bFlags & 128) { sVersion = "2.0"; } if (bFlags & 64 && bFlags & 128) { sVersion = "3.0"; } if (Binary.isVerbose()) { if (bFlags & 1) { sOption("PresetDictionary"); } if (bFlags & 4) { sOption("ContentChecksum"); } if (bFlags & 8) { sOption("ContentSize"); } if (bFlags & 16) { sOption("BlockChecksum"); } if (bFlags & 32) { sOption("BlockIndependence"); } } } } return result(); } ================================================ FILE: db/Binary/archive.MS_Compound.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("archive", "Microsoft Compound"); function detect() { if (Binary.compare("D0CF11E0A1B11AE1")) { const // magic values nSub1 = Binary.readWord(0x200), nSub2 = Binary.readWord(0x1000); if (nSub1 == 0 && nSub2 == 0xFFFD) { sType = "installer"; sName = "Microsoft Installer (MSI)"; } else if (nSub1 == 0xA5EC) { sType = "format"; sName = "Microsoft Office"; sVersion = "1997-2003"; } else { sVersion = "Office, 1997-2003"; } bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive.PC_Secure.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("archive", "PC Secure"); function detect() { if (Binary.compare("'PCT7'22") || Binary.compare("'PCT'..20284b")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive.RAR.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq includeScript("rar-file"); function detect() { detect_RAR(1); return result(); } ================================================ FILE: db/Binary/archive.ZIP.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood includeScript("zip-file"); function detect() { detect_Zip(1); return result(); } ================================================ FILE: db/Binary/archive.ZLIB.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP meta("data"); includeScript("zlib"); function detect() { if (detect_zlib(Binary, 0)) { sName = "ZLIB data"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_7z.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("archive", "7-Zip"); function detect() { if (Binary.getSize() >= 64) { if (Binary.compare("'7z'BCAF271C")) { sVersion = Binary.readByte(6) + "." + Binary.readByte(7); bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_ANC-Cruncher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("archive", "ANC-Cruncher"); function detect() { if (Binary.compare("'FVL0'")) { sOptions = "use ANC-Cruncher's CRLoad for unpack and run"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_AR.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Status: WIP // doc-ref: https://en.wikipedia.org/wiki/Ar_(Unix) includeScript("archive-file"); meta("archive", "The archiver (.AR)"); function detect() { function ParseLibInfo() { sType = "format"; sName = "COFF Library (.LIB)"; var nMachineOffset = Binary.read_uint32(0x48, _BE) + 0x3C, nMachine; if (Binary.compare("0000FFFF", nMachineOffset)) { nMachine = Binary.read_uint16(nMachineOffset + 6); } // long format else { nMachine = Binary.read_uint16(nMachineOffset) } // short format switch (nMachine) { case 0x014c: sVersion = "I386"; break; // Intel 386 or later processors and compatible processors case 0x0162: sVersion = "R3000"; break; // MIPS little-endian, 0x160 big-endian case 0x01c0: sVersion = "ARM"; break; // ARM little-endian case 0x8664: sVersion = "AMD64"; break; // x64 case 0xAA64: sVersion = "ARM64"; break; // ARM64 little-endian case 0x01c4: sVersion = "ARMNT"; break; // Arm Thumb-2 little-endian default: sVersion = "Unknown"; } } if (Binary.compare("'!'0A")) { bDetected = true; var nOffset = 8; var nItemCount = 0; while (nOffset < Binary.getSize()) { sFileName = Binary.getString(nOffset, 0x10).trim(); nOffset += 0x10; nOffset += 0x0C; // modification_timestamp nOffset += 0x06; // ownerID nOffset += 0x06; // groupID nOffset += 0x08; // fileMode nFileSize = parseInt(Binary.getString(nOffset, 0x0A)); nOffset += 0x0A; nOffset += 0x02; // endMarker switch (sFileName) { case "/": ParseLibInfo(); break; case "debian-binary": ParseDebInfo(); break; case "/\/": break; default: Archive.add(nFileSize, nFileSize); } nOffset += nFileSize; if (nFileSize & 1) nOffset += 1; // padding nItemCount += 1; } if (Binary.isVerbose()) sOption(Archive.contents()); // TODO: parse DIR\FILES } function ParseDebInfo() { sName = "Debian Software package (.DEB)"; sVersion = Binary.getString(nOffset, nFileSize - 1); } return result(); } ================================================ FILE: db/Binary/archive_ARC.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Status: WIP meta("archive", "FreeARC Archive (.ARC)"); function detect() { if (Binary.getSize() >= 9) { if (Binary.compare("417243010000")) { bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_ASAR.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://www.mend.io/blog/theres-a-new-stealer-variant-in-town-and-its-using-electron-to-stay-fully-undetected/ meta("archive", "Asar Archive (Electron)"); function detect() { if (Binary.getSize() >= 28) { if (Binary.compare("04..............................'{\"files\":{'")) { bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_BCSAR.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kae // https://www.3dbrew.org/wiki/BCSAR meta("archive", "Nintendo Binary CTR Sound ARchive (.BCSAR)"); function detect() { if ((!X.c("'CSAR'FE") && !X.c("'CSAR'FF")) || X.U8(5) == X.U8(6) || X.U8(5) < 0xFE) return; var e = X.U8(5) == 0xFE ? _LE : _BE; if (X.U32(0x14, e) != 0x2000 || X.U32(0x20, e) != 0x2001 || X.U32(0x2C, e) != 0x2002) return; if (!X.c("'STRG'", sp = X.U32(0x18, e)) || !X.c("'INFO'", ip = X.U32(0x24, e)) || !X.c("'FILE'", fp = X.U32(0x30, e))) return; bDetected = true; sVersion = 'v' + X.U32(8, e).toString(16) + '_' + (e == _LE ? 'le' : 'be'); if (X.isVerbose()) { sOption('filenames:' + X.U32(sp + 0x18, e) + ' sz:' + outSz(X.U32(0xC, e))); } return result(); } ================================================ FILE: db/Binary/archive_BZip.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // doc-ref: https://github.com/dsnet/compress/blob/master/doc/bzip2-format.pdf meta("archive", "BZip"); function detect() { if (Binary.getSize() >= 9) { if (Binary.compare("'BZ0'")) { sVersion = "1.0"; sOptions = "compressed data (.BZ)"; bDetected = true; } else if (Binary.compare("'BZh'") && Binary.compare("314159265359", 0x4)) { sName = "BZip2 compressed data (.BZ2)" bDetected = true; } if (bDetected && Binary.isVerbose()) { sOptions = "block-size:" + Binary.getString(3, 1) + "00 kb"; } } return result(); } ================================================ FILE: db/Binary/archive_CCA.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/Engines/CNCSA meta("archive", "Click & Create Archive (.CCA)"); function detect() { if (Binary.compare("'PAME'0702")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_CFL3.1.sg ================================================ // https://github.com/horsicq/Detect-It-Easy signature file // Author: Kaens (TG @kaens) /* beautify ignore:start */ meta("archive", "Jari Comppa's Compressed File Library 3 file (.CFL)"); function detect() { //ref https://solhsa.com/zip/cfl3r3.zip / src/CFL.cpp & CFLResource.cpp var startp = t = 0; if (!X.c("'CFL3")) if (X.c("'3CFL'", X.Sz() - 4)) if (X.c("'CFL3'", t = X.Sz() - X.U32(X.Sz() - 8))) startp = t; else return false; var p = X.U32(startp + 4); p += 12 + X.U32(p + 4); if (!X.c("'3CFL'", p)) return false; bDetected = true; if (X.isVerbose()) { if (startp) sOption('begins @' + Hex(startp)); sOption(outSz(p + 4 - startp), 'sz:') } return result(); } /* beautify ignore:end */ ================================================ FILE: db/Binary/archive_CKP.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.mobygames.com/game/60768/adiboo-pazirals-secret/ Used by Adiboo & Paziral's Secret (2002/2003) meta("archive", "CKP"); function detect() { if (Binary.compare("'.CKP'0001")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_Cab.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood includeScript("cab"); meta("archive", "CAB"); function detect() { if (!detect_Cab(0, Binary.getSize())) { if (Binary.compare("'ISc('")) { sName = "InstallShield Cabinet File"; var nVer = Binary.readWord(4); switch (Binary.readByte(7)) { case 1: sVersion = (nVer >> 12) & 15; break; case 2: case 4: sVersion = (nVer / 100).toFixed(2); break; } bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_DAA.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by PowerISO // https://github.com/horsicq/Detect-It-Easy/issues/45 // https://isc.sans.edu/diary/The+DAA+File+Format/25246 meta("archive", "Direct Access Archive (.DAA)"); function detect() { if (Binary.compare("'DAA'0000000000000000000000004C")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_DCP.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Wintermute Engine // https://wiki.scummvm.org/index.php/Wintermute meta("archive", "DCP"); function detect() { if (Binary.compare("DE AD C0 DE 4A 55 4E 4B")) { var copyrightYear = Binary.getString(58, 5).trim(); if (/^[12]\d{3}$/.test(copyrightYear)) { sVersion = copyrightYear; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_DXA.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // TODO: Add un-xored variant to this signature // https://github.com/yumetodo/DxLib/blob/master/source/DxArchive_.h // https://himeworks.com/tools/dxextract/ meta("archive", "DXA"); function detect() { if (Binary.compare("f70ee9a")) { sOptions = "Arcanum Knights"; sVersion = "xored"; bDetected = true; } else if (Binary.compare("e94c..69")) { sOptions = "Labyrinth of Touhou 2"; sVersion = "xored"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_DatPack.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=List_of_games_embedded_in_Adi_4 meta("archive", "DatPack"); function detect() { if (Binary.compare("07'DatPack'f75b3500e701")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_DotBundle.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("archive", "DotBundle Project"); function detect() { if (Binary.compare("3C70726F6A6563743E0D0A20203C6D61696E65786520706174683D")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_EdgeDataPak.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.mobygames.com/game/138556/the-energy-thieves/ Used by Adiboo & The Energy Thieves (2004) // Header of EdgeDataPak (2004) is based on CKP's (2002/2003) format meta("archive", "EdgeDataPak (.EDP)"); function detect() { if (Binary.compare("'.EDP'0001")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_Flatpak.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://flatpak.org/ meta("archive", "Flatpak"); function detect() { if (Binary.compare("66 6C 61 74 70 61 6B")) { var versionNumber = Binary.getString(24, 33).trim(); if (/^[a-zA-Z0-9\/._-]{33}/.test(versionNumber)) { if (X.isVerbose()) sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_GhidraZipFile.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/NationalSecurityAgency/ghidra meta("archive", "Ghidra Zip File"); function detect() { if (Binary.compare("aced000577..2e30212634e92c200000000100")) { sOptions = File.cleanString(Binary.getString(0x00000014)); bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_GodotPCK.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/GDRETools/gdsdecomp/blob/master/utility/pck_creator.cpp meta("archive", "Godot Pack"); function detect() { if (Binary.compare("'GDPC'0100000003000000..000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_HIP.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by EvilEngine games // https://heavyironmodding.org/wiki/EvilEngine/HIP_(File_Format) meta("archive", "HIP archive"); function detect() { if (Binary.compare("'HIPA'00000000'PACK'00000090")) { sVersion = Binary.getString(0x58); if (sVersion.match(/^[A-Za-z]{3}\s[A-Za-z]{3}\s\d{1,2}\s\d{2}:\d{2}:\d{2}\s\d{4}$/)) { sVersion = "Build date: " + sVersion; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_IFP.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Grand Theft Auto San Andreas // https://gtamods.com/wiki/IFP meta("archive", "Animation file"); function detect() { if (Binary.compare("'ANP3'")) { var versionNumber = Binary.getString(3, 1).trim(); if (/^[0-9]{1}/.test(versionNumber)) { if (X.isVerbose()) sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_IPW.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.mobygames.com/game/8818/island-peril/ meta("archive", "Peril WAD"); function detect() { if (Binary.compare("'DT1'00c3030000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_InnoSetup.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/YenForYang/innounp/blob/master/Struct5205u.pas meta("archive", "Inno Setup"); function detect() { if (Binary.compare("'idska32'1a")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_JAM.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Lego Racers // https://github.com/JrMasterModelBuilder/JAM-Extractor meta("archive", "JAM"); function detect() { bDetected = Binary.compare("'LJAM'0000000002000000"); return result(); } ================================================ FILE: db/Binary/archive_LAB.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://gist.github.com/Gemba/c793590c32a6c121445fa14ed361e51d meta("archive", "LucasArts Binary Archive"); function detect() { if (Binary.compare("'LABN'00000100")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_LRZ.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Status: WIP meta("archive", "Long Range ZIP (.LRZ)"); function detect() { if (Binary.getSize() >= 9) { if (Binary.compare("'LRZI'")) { bDetected = true; sVersion = Binary.read_uint8(0x04) + "." + Binary.read_uint8(0x05); switch (Binary.read_uint8(0x31)) { case 3: break; case 4: sOption("BZIP2"); break; case 5: sOption("LZO"); break; case 6: sOption("LZMA"); break; case 7: sOption("GZIP"); break; case 8: sOption("ZPAQ"); break; default: bDetected = false; } switch (Binary.read_uint8(0x16)) { case 0: break; case 1: sOption("encrypted"); break; default: bDetected = false; } switch (Binary.read_uint8(0x15)) { case 0: break; case 1: sOption("md5"); break; default: bDetected = false; } } } return result(); } ================================================ FILE: db/Binary/archive_LZOP.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: https://en.wikipedia.org/wiki/Lzop meta("archive", "LZOP compressed data"); function detect() { if (Binary.getSize() >= 9) { bDetected = Binary.compare("89'LZO'000D0A1A0A"); } return result(); } ================================================ FILE: db/Binary/archive_MCS.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://thedustedarchives.com/de/monsterized-news/ meta("archive", "MCS"); function detect() { if (Binary.compare("'AHFFMACS0200'")) { var game = Binary.getString(15, 12).trim(); if (/^[A-Z/!]{12}/.test(game)) { if (X.isVerbose()) sOptions = game; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_MS-WIM.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Rewritten by BJNFNE // https://github.com/libyal/assorted/blob/main/documentation/Windows%20Imaging%20%28WIM%29%20file%20format.asciidoc meta("archive", "Windows Imaging Format (.WIM)"); function detect() { if (Binary.getSize() >= 9) { if (Binary.compare("'MSWIM'000000")) { if (Binary.isVerbose()) sOptions = "{" + Binary.read_UUID(0x18) + "}"; bDetected = true; switch (Binary.read_uint16(0x12)) { case 0: sOption("No compression"); break; case 2: sOption("XPRESS compression"); break; case 4: sOption("LZX compression"); break; case 8: sOption("LZMS compression"); break; default: bDetected = false; } sOption("Part Number:" + Binary.read_uint16(0x28) + "/" + Binary.read_uint16(0x2A)); } else if (Binary.compare("'WLPWM'000000")) { // https://wimlib.net/ sName += ", wimlib"; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_MWD.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Frogger // https://highwayfrogs.net/thread/40/frogger-file-information-megathread meta("archive", "Medievil WAD"); function detect() { if (Binary.compare("44 41 57 4D")) { var creationDate = Binary.getString(24, 29).trim(); if (/^[A-Z][a-z]+, \d{1,2}(?:st|nd|rd|th) [A-Z][a-z]+ \d{4}$/.test(creationDate)) { sOptions = "Creation date: " + creationDate; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_P2L.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/Engines/PSM meta("archive", "PSM Soundsystem (.P2L)"); function detect() { if (Binary.compare("'PSMLST PSM'")) { var versionNumber = Binary.getString(11, 4).trim(); if (/^[0-9\.]{4}$/.test(versionNumber)) { sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_PAK.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // PAK archive format is more generic, so extend this signature if required. // http://justsolve.archiveteam.org/wiki/PAK meta("archive", "PAK"); function detect() { if (Binary.compare("'DPAK'0000010018000000")) { sVersion = "Lego Creator"; bDetected = true; } else if (Binary.compare("'PACK'7faf000080")) { bDetected = true; } else if (Binary.compare("'RWPACK'0000000080")) { sOptions = "PAK Compiler (Raymond Wilson 2008)"; // https://archive.gamedev.net/archive/reference/articles/article1991.html bDetected = true; } else if (Binary.compare("'MUDGE4'2e30")) { // https://www.ign.com/games/producer/witan sVersion = Binary.getString(8); var match = sVersion.match(/(\d{2})\/(\d{2})\/(\d{4}).*Copyright\s+(.+?)(?:\x00|$)/i); if (match) { sVersion = match[1] + "/" + match[2] + "/" + match[3] + ", " + match[4].trim(); bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_PBP.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.psdevwiki.com/ps3/PBP meta("archive", "PlayStation Update Package"); function detect() { if (Binary.compare("00 50 42 50")) { var psf = Binary.getString(41, 3).trim(); if (/^[A-Z]{3}/.test(psf)) { if (X.isVerbose()) sOptions = psf; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_PEA.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: https://peazip.github.io/pea_help.pdf meta("archive", "PeaZip (.PEA)"); function detect() { if (Binary.getSize() >= 10) { if (Binary.compare("EA") && Binary.compare("0000'POD'00", 0x0A)) { sVersion = "v" + Binary.read_uint8(0x01) + "." + Binary.read_uint8(0x02) bDetected = true; if (bDetected && Binary.isVerbose()) { switch (Binary.read_uint8(0x3)) { case 0: sOption("NOALGO"); break; case 1: sOption("ADLER32"); break; case 2: sOption("CRC32"); break; case 3: sOption("CRC64"); break; case 16: sOption("MD5"); break; case 17: sOption("RIPEMD160"); break; case 18: sOption("SHA1"); break; case 19: sOption("SHA256"); break; case 20: sOption("SHA512"); break; case 21: sOption("WHIRLPOOL"); break; case 22: sOption("SHA3_256"); break; case 23: sOption("SHA3_512"); break; case 24: sOption("BLAKE2S"); break; case 25: sOption("BLAKE2B"); break; default: bDetected = false; } } } } return result(); } ================================================ FILE: db/Binary/archive_PKG.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.psdevwiki.com/ps3/PKG_files meta("archive", "System Software Update Packages"); function detect() { if (Binary.compare("7F 50 4B 47")) { var contentId = Binary.getString(48, 48).trim(); if (/^[A-Z0-9]{6,7}-[A-Z0-9]{9}_00-[A-Z0-9]{16,18}$/.test(contentId)) { if (X.isVerbose()) sOptions = "ContentID: " + contentId; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_PSARC.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.psdevwiki.com/ps3/PlayStation_archive_(PSARC) meta("archive", "PSARC"); function detect() { if (Binary.compare("50534152000100037a6c6962")) { sVersion = "1.3"; sOptions = "zlib"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_PUP.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.psdevwiki.com/ps3/Playstation_Update_Package_(PUP) meta("archive", "PlayStation Update Package"); function detect() { if (Binary.compare("'SCEUF'0000....000000")) { sVersion = "PS3/PS Vita"; bDetected = true; } else if (Binary.compare("'SLB2'..0000000000....02")) { sVersion = "PS4/PS5"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_RVZ.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/dolphin-emu/dolphin/blob/500728360cd177466f699962b441363cd1dd9ed7/docs/WiaAndRvz.md meta("archive", "RVZ"); function detect() { if (Binary.compare("'RVZ'")) { var gameId = Binary.getString(88, 6).trim(); if (/^[A-Z0-9]{6}$/.test(gameId)) { if (X.isVerbose()) sOptions = "GameID: " + gameId; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_STK.1.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // --- // Samples by: BJNFNE // https://wiki.scummvm.org/index.php?title=Gob/DEV7_Information#STK21_File_Structure meta("archive", "STK"); function detect() { if (Binary.getSize() > 64 && Binary.compare("'STK2.' %%")) { var stkMagicSign = Binary.getString(6, 32).trim(); if (/^[0-9]{10,}[A-Za-z0-9]{5,}/.test(stkMagicSign)) { if (X.isVerbose()) sOptions = "Magic signature: " + stkMagicSign; sVersion = Binary.getString(3, 3).trim(); if (/^2\.[0-9]$/.test(sVersion)) { bDetected = true; } } } return result(); } ================================================ FILE: db/Binary/archive_Shaped.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.adventure-treff.de/spiele-datenbank/14049-iron-willy meta("archive", "Shaped (.SHP)"); function detect() { if (Binary.compare("'Shaped'")) { var copyrightYear = Binary.getString(28, 4).trim(); if (/^[12]\d{3}$/.test(copyrightYear)) { sOptions = copyrightYear; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_TRE.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://modthegalaxy.com/index.php?threads/tre-explorer.11/ meta("archive", "TRE"); function detect() { if (Binary.compare("'EERT5000'....0000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_Unity.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP meta("archive", "Unity"); function detect() { var nFileVer, sEngineVer, sMinPlayerVer if (Binary.getSize() >= 0x07) { if (Binary.compare("'UnityFS'00")) { sName += "/UnityFS"; nFileVer = Binary.read_uint32(0x8, _BE); sEngineVer = Binary.getString(0x12); sMinPlayerVer = Binary.getString(0x0C); if (sEngineVer && sMinPlayerVer) { sVersion = sVersion.append("FileVer:" + nFileVer); sVersion = sVersion.append("EngineVer:" + sEngineVer); sVersion = sVersion.append("MinPlayerVer:" + sMinPlayerVer); bDetected = true; } } else if (Binary.compare("'UnityRaw'00")) { sName += "/UnityRaw"; nFileVer = Binary.read_uint32(0x9, _BE); sEngineVer = Binary.getString(0x13); sMinPlayerVer = Binary.getString(0x0D); if (sEngineVer && sMinPlayerVer) { sVersion = sVersion.append("FileVer:" + nFileVer); sVersion = sVersion.append("EngineVer:" + sEngineVer); sVersion = sVersion.append("MinPlayerVer:" + sMinPlayerVer); bDetected = true; } } else if (Binary.compare("'UnityWeb'00")) { sName += "/UnityWeb"; nFileVer = Binary.read_uint32(0x9, _BE); sEngineVer = Binary.getString(0x13); sMinPlayerVer = Binary.getString(0x0D); if (sEngineVer && sMinPlayerVer) { sVersion = sVersion.append("FileVer:" + nFileVer); sVersion = sVersion.append("EngineVer:" + sEngineVer); sVersion = sVersion.append("MinPlayerVer:" + sMinPlayerVer); bDetected = true; } } else if (Binary.read_uint32(0x10, _BE) == 0) { sName += "/Unity Asset"; nFileVer = Binary.read_uint32(0x8, _BE); switch (nFileVer) { case 9: sEngineVer = Binary.getString(0x14); break; case 15: sEngineVer = Binary.getString(0x14); break; case 17: sEngineVer = Binary.getString(0x14); break; case 20: sEngineVer = Binary.getString(0x14); break; case 21: sEngineVer = Binary.getString(0x14); break; case 22: sEngineVer = Binary.getString(0x30); break; } if (sEngineVer && nFileVer <= 22 && nFileVer >= 8) { sVersion = sVersion.append("FileVer:" + nFileVer); sVersion = sVersion.append("EngineVer:" + sEngineVer); bDetected = true; } } } return result(); } ================================================ FILE: db/Binary/archive_UnrealEngine.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP meta("archive", "UnrealEngine"); function detect() { if (Binary.getSize() >= 0x400) { if (Binary.compare("C1832A9E")) { bDetected = true; sName += "\\Unreal Package" var nVer = Binary.read_uint16(0x04); var nLicVer = Binary.read_uint16(0x06); sVersion = sVersion.append(nVer, nLicVer); } else if (Binary.compare("E1126F5A", Binary.getSize() - 204)) { bDetected = true; sName += "\\UE4 package (.PAK)" sVersion = Binary.read_uint32(Binary.getSize() - 200); switch (Binary.read_uint8(Binary.getSize() - 206)) { case 0: break; case 1: sOptions = sOptions.append("Index Is Encrypted"); break; default: bDetected = false; } sOptions = sOptions.append(Binary.getString(Binary.getSize() - 160)); } } return result(); } ================================================ FILE: db/Binary/archive_ViseInstaller.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Installer_VISE meta("archive", "Vise Installer"); function detect() { if (Binary.compare("'ESIV'abbc19")) { sOptions = "Big endian"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_XZP.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://digiex.net/threads/xzp-tool-v2-0-browse-edit-xbox-360-zxp-files.15990/ meta("archive", "XBox Zip File (.XZP)"); function detect() { if (Binary.compare("'BDES'00000001")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_ZPAQ.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Status: WIP meta("archive", "ZPAQ Compressed Archive (.ZPAQ)"); function detect() { if (Binary.getSize() >= 9) { if (Binary.compare("'7kSt'") && Binary.compare("'zPQ'", 0x0D)) { bDetected = true; } } return result(); } ================================================ FILE: db/Binary/archive_archives.1.sg ================================================ // Detect It Easy: detection rule file // Authors: hypn0 , Kaens (TG@kaens), LinXP meta("archive", ""); function detect() { if (Binary.compare("a596fdff")) { bDetected = true; sName = "FTCOMP"; } else if (Binary.compare("a596..0a")) { bDetected = true; sName = "IBMPACK1"; } else if (Binary.compare("a596feff")) { bDetected = true; sName = "IBMPACK2"; } else if (Binary.compare("aced00057704")) { bDetected = true; sName = "IzPack"; } else if (Binary.compare("'bvxn'")) { bDetected = true; sName = "LZFSE"; } else if (Binary.compare("'SIT!'")) { bDetected = true; sName = "SIT"; } else if (Binary.compare("06'SKF3.0'")) { bDetected = true; sName = "SKF"; } else if (Binary.compare("'Archive'00................2800000064")) { bDetected = true; sName = "ArcFS"; } else if (Binary.compare("'ARCV'0002")) { bDetected = true; sName = "ARCV 2"; } else if (Binary.compare("09006bea")) { bDetected = true; sName = "BFF"; } else if (Binary.compare("00069a") || Binary.compare("0006d2")) { bDetected = true; sName = "DCL"; } else if (Binary.compare("....'-lh'..2d") || Binary.compare("....'-lz'..2d") || Binary.compare("....'-pm'..2d")) { sVersion = Binary.getString(2, 5) bDetected = true; switch (Binary.getString(3, 3)) { case "lh0": case "lh1": case "lh2": case "lh3": case "lh4": case "lh5": case "lh6": case "lh7": case "lhd": sName = "LHA (.LHA)"; break; case "lh8": case "lh9": case "lha": case "lhb": case "lhc": case "lhe": sName = "LHA"; sOptions = "Joe Jared ext (.LHA)"; break; case "lhx": sName = "LHA"; sOptions = "UNLHA32 ext (.LHA)" break; case "lzs": case "lz2": case "lz3": case "lz4": case "lz5": case "lz6": case "lz7": case "lz8": sName = "LHA "; sOptions = "LArc ext (.LZS)"; break; case "lz7": case "pm0": case "pm2": sName = "LHA archive, PMarc ext (.PMA)"; break; default: bDetected = false; } } else if (Binary.compare("'mflh'0100")) { bDetected = true; sName = "MVA"; } else if (Binary.compare("'ViG'....1a")) { bDetected = true; sName = "PaperPort"; } else if (Binary.compare("'sqsh'0000")) { bDetected = true; sName = "SquashFS"; sOptions = "big endian"; } else if (Binary.compare("'hsqs'0300")) { bDetected = true; sName = "SquashFS"; sOptions = "little endian"; } else if (Binary.compare("'im001V'......50....0000")) { sName = "SW"; bDetected = true; var arch_offset = Binary.readByte(0x0e) + 15; if (Binary.compare("1f9d", arch_offset)) { sName = "Z"; } else if (Binary.compare("1f1e", arch_offset)) { sName = "PACK 2"; } } else if (Binary.compare("0001000401000100010000000000000000000000000000000000000000000000010101")) { bDetected = true; sName = "VMS SaveSet"; } else if (Binary.compare("'ZOO'............'Archive'")) { bDetected = true; sName = "ZOO"; } else if (Binary.compare("602213636c00")) { bDetected = true; sName = "Asymetrix"; } else if (Binary.compare("453dcd28........................'Compressed ROMFS'")) { bDetected = true; sName = "CRAMFS"; } else if (Binary.compare("'IsZ!@'01")) { bDetected = true; sName = "Zipped ISO Disk Image (.ISZ)"; switch (Binary.read_uint32(0x10)) { case 0: sOptions = "no password"; break; case 1: sOptions = "password"; break; case 2: sOptions = "password, aes128"; break; case 3: sOptions = "password, aes182"; break; case 4: sOptions = "password, aes256"; break; } } else if (Binary.compare("aa59f0000002")) { bDetected = true; sName = "SaveDskF"; } else if (Binary.compare("'AlB'1a")) { bDetected = true; sName = "BeOS package"; } else if (Binary.compare("'BIGF'00")) { bDetected = true; sName = "BIGF"; } else if (Binary.compare("01ca'Copyright (c) Genus Microprogramming, Inc.'")) { bDetected = true; sName = "GXL"; } else if (Binary.compare("0100......00ecf9")) { bDetected = true; sName = "INSA"; } else if (Binary.compare("..0fd28ccc1f..3c0d8e830dd88f25ac")) { bDetected = true; sName = "InstallShield ISN"; } else if (Binary.compare("135d658c3a010200")) { bDetected = true; sName = "InstallShield"; sVersion = "3.x" } else if (Binary.compare("2aab79d800010000")) { bDetected = true; sName = "InstallShield INST"; sVersion = "3.x" } else if (Binary.compare("'SZDD'88")) { bDetected = true; sName = "SZDD"; sOptions = "by Microsoft"; } else if (Binary.compare("'KWAJ'88")) { bDetected = true; sName = "KWAJ"; sOptions = "by Microsoft"; } else if (Binary.compare("'MDmd'")) { bDetected = true; sName = "MDCD"; } else if (Binary.compare("'MPQ'1a")) { bDetected = true; sName = "MPQ"; sOptions = "by Blizzard"; } else if (Binary.compare("'_MCT'00'KSLZ'789c")) { bDetected = true; sName = "MSKN 2"; sOptions = "zlib"; } else if (Binary.compare("'PACK'............0000")) { bDetected = true; sName = "PACK"; } else if (Binary.compare("'PACK'") && File.read_uint32(4, _BE) > 0 && File.read_uint32(4, _BE) <= 3) { bDetected = true; sName = "Packed git objects (.pack)"; sVersion = "v" + File.read_uint32(4, _BE); sOptions = File.read_uint32(8, _BE) + " object(s)" } else if (Binary.compare("FF'tOc'00000002")) { sName = "Index of packed git objects (.idx)"; sVersion = "v" + File.read_uint32(4, _BE); bDetected = 1 } else if (Binary.compare("'RIDX'00000001") && File.read_uint32(8, _BE) > 0 && File.read_uint32(8, _BE) <= 2) { sName = "Reverse index of packed git objects (.rev)"; sVersion = "v1"; bDetected = true; switch (File.read_uint32(8, _BE)) { case 1: sOptions = "SHA-1 hashes"; break; case 2: sOptions = "SHA-256 hashes"; break; default: sOptions = "unknown hashes"; } } else if (Binary.compare("00000000000000000000000000007400010074000500")) { bDetected = true; sName = "PCInstall"; } else if (Binary.compare("'PP20'09")) { bDetected = true; sName = "PowerPack"; sOptions = "by Nico Francois"; } else if (Binary.compare("edabeedb0300")) { bDetected = true; sName = "RPM package"; } else if (Binary.compare("bd01..00..00..000000")) { bDetected = true; sName = "HUFF"; } else if (Binary.compare("'SZ '88")) { bDetected = true; sName = "SZ"; sOptions = "by Microsoft"; } else if (Binary.compare("'BAGF'02")) { bDetected = true; sName = "BAGF"; } else if (Binary.compare("'PAC - 'a9' BVRP Software 1990-2000'")) { bDetected = true; sName = "PAC"; sOptions = "1990-2000 by BVRP Software"; } else if (Binary.compare("'Cr24'02")) { bDetected = true; sName = "CRX"; } else if (Binary.compare("74c42c84e1e5d428")) { bDetected = true; sName = "InstallShield INX"; sVersion = "7.x" } else if (Binary.compare("5d0000....ffffffffffffffff00180ddd04")) { bDetected = true; sName = "LZMA"; } else if (Binary.compare("5d00008000........000000000000")) { bDetected = true; sName = "LZMA"; } else if (Binary.compare("1fa0")) { bDetected = true; sName = "SCO"; } else if (Binary.compare("'# PaCkAgE DaTaStReAm'")) { bDetected = true; sName = "Solaris Package"; } else if (Binary.compare("'SQZE'010000")) { bDetected = true; sName = "SQZE"; } else if (Binary.compare("'xar!'001c00010000")) { bDetected = true; sName = "XAR"; } else if (Binary.compare("fd'7zXZ'00")) { bDetected = true; sName = "XZ"; } function isCompress() { if (File.getSize() < 3 || !File.compare("1F9D")) return false; t = File.read_uint8(2); sversion = t & 0x80 ? "new" : "old"; t &= 0x7F; if (t < 9 || t > 16) return false; return true; } if (!bDetected) if (isCompress()) { sName = "Compress (.Z)"; sVersion = sversion; bDetected = true; } else if (Binary.compare("'LZK00'000000")) { bDetected = true; sName = "LZK00"; } else if (Binary.compare("032401010100")) { bDetected = true; sName = "WPK"; } else if (Binary.compare("'TPWM'")) { bDetected = true; sName = "TPWM (BlueByte)"; } else if ((Binary.getSize() >= 500) && (Binary.compare("00'ustar'", 0x100))) { bDetected = true; sName = "tar"; } else if (Binary.compare("'LB'0100")) { bDetected = true; sName = "XFL game resource file (.XFL)"; sVersion = "v1.0"; sOptions = sOptions.append(Binary.getString(12, 32)); sOptions = sOptions.append("& other " + (Binary.readDword(8) - 1) + " files"); } else if (Binary.compare("FF060000'sNaPpY'")) { bDetected = true; sName = "Snappy compressed data (.SZ)"; } else if (Binary.compare("'blkzip'00")) { bDetected = true; sName = "BulkZip (.BULK)"; } else if (Binary.compare("AE01'NanoZip 0.09 alpha'")) { bDetected = true; sName = "NanoZip (.NZ)"; sVersion = "0.09 alpha"; } else if (Binary.compare("'CM'2805060000")) { bDetected = true; sName = "RAZOR (.RZ)"; sOptions = "by Christian Martelock" } else if (Binary.compare("28B52FFD")) { bDetected = true; sName = "Facebook Zstandard/ZSTD compressed data (.ZST)"; } else if (Binary.compare("00'APPL'", 0x40) && Binary.compare("00008181", 0x78)) { bDetected = true; sName = "MacBinary"; } return result(); } ================================================ FILE: db/Binary/archive_archives.ancient.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG@kaens) // Mostly from the all-encompassing https://github.com/temisu/ancient //Lots of these formats have very shaky signatures, and some won't even have decompression errors... meta("archive", ""); /* beautify ignore:start */ debug = 0; function detect() { const maxsz = 0x40000000; var bad = "", xpk = 0, sname = sversion = soptions = ""; //the following is provisory until the system CRC functions get updated const CRC16Table = [ 0x0000,0xc0c1,0xc181,0x0140,0xc301,0x03c0,0x0280,0xc241,0xc601,0x06c0,0x0780,0xc741,0x0500,0xc5c1,0xc481,0x0440, 0xcc01,0x0cc0,0x0d80,0xcd41,0x0f00,0xcfc1,0xce81,0x0e40,0x0a00,0xcac1,0xcb81,0x0b40,0xc901,0x09c0,0x0880,0xc841, 0xd801,0x18c0,0x1980,0xd941,0x1b00,0xdbc1,0xda81,0x1a40,0x1e00,0xdec1,0xdf81,0x1f40,0xdd01,0x1dc0,0x1c80,0xdc41, 0x1400,0xd4c1,0xd581,0x1540,0xd701,0x17c0,0x1680,0xd641,0xd201,0x12c0,0x1380,0xd341,0x1100,0xd1c1,0xd081,0x1040, 0xf001,0x30c0,0x3180,0xf141,0x3300,0xf3c1,0xf281,0x3240,0x3600,0xf6c1,0xf781,0x3740,0xf501,0x35c0,0x3480,0xf441, 0x3c00,0xfcc1,0xfd81,0x3d40,0xff01,0x3fc0,0x3e80,0xfe41,0xfa01,0x3ac0,0x3b80,0xfb41,0x3900,0xf9c1,0xf881,0x3840, 0x2800,0xe8c1,0xe981,0x2940,0xeb01,0x2bc0,0x2a80,0xea41,0xee01,0x2ec0,0x2f80,0xef41,0x2d00,0xedc1,0xec81,0x2c40, 0xe401,0x24c0,0x2580,0xe541,0x2700,0xe7c1,0xe681,0x2640,0x2200,0xe2c1,0xe381,0x2340,0xe101,0x21c0,0x2080,0xe041, 0xa001,0x60c0,0x6180,0xa141,0x6300,0xa3c1,0xa281,0x6240,0x6600,0xa6c1,0xa781,0x6740,0xa501,0x65c0,0x6480,0xa441, 0x6c00,0xacc1,0xad81,0x6d40,0xaf01,0x6fc0,0x6e80,0xae41,0xaa01,0x6ac0,0x6b80,0xab41,0x6900,0xa9c1,0xa881,0x6840, 0x7800,0xb8c1,0xb981,0x7940,0xbb01,0x7bc0,0x7a80,0xba41,0xbe01,0x7ec0,0x7f80,0xbf41,0x7d00,0xbdc1,0xbc81,0x7c40, 0xb401,0x74c0,0x7580,0xb541,0x7700,0xb7c1,0xb681,0x7640,0x7200,0xb2c1,0xb381,0x7340,0xb101,0x71c0,0x7080,0xb041, 0x5000,0x90c1,0x9181,0x5140,0x9301,0x53c0,0x5280,0x9241,0x9601,0x56c0,0x5780,0x9741,0x5500,0x95c1,0x9481,0x5440, 0x9c01,0x5cc0,0x5d80,0x9d41,0x5f00,0x9fc1,0x9e81,0x5e40,0x5a00,0x9ac1,0x9b81,0x5b40,0x9901,0x59c0,0x5880,0x9841, 0x8801,0x48c0,0x4980,0x8941,0x4b00,0x8bc1,0x8a81,0x4a40,0x4e00,0x8ec1,0x8f81,0x4f40,0x8d01,0x4dc0,0x4c80,0x8c41, 0x4400,0x84c1,0x8581,0x4540,0x8701,0x47c0,0x4680,0x8641,0x8201,0x42c0,0x4380,0x8341,0x4100,0x81c1,0x8081,0x4040]; function _CRC16(ofs,len,acc) { if (!len || ofs+len > X.Sz()) return -1; for (var i=0; i < len; i++) acc = (acc >> 8) ^ CRC16Table[(acc&0xff) ^ X.U8(ofs+i)]; return acc } function CRC16(ofs,len,acc) { if(typeof(File.crc16) == "undefined") return _CRC16(ofs,len,acc) else { _log("Please remove the CRC16 implementation from archives.ancient.sg!"); return File.crc16(ofs,len,acc) } } function CRC16Byte(b, acc) { return (acc >> 8) ^ CRC16Table[(acc&0xff) ^ b] } var xpkfault = found = false; //for leaving the recursion real quick. For when/if said recursion does happen. function isXPK(reclvl) { if(found) return true; if(reclvl >= 4 || xpkfault) {xpkfault = true; return false } if(X.c("'XPKF'",xpk) && X.Sz() < 0x2C) { xpkfault = true; return false } sz = X.U32(xpk+4,_BE); type = X.SA(xpk+8,4);unpsz=X.U32(xpk+12,_BE); if(!sz || !unpsz || sz > maxsz || unpsz > maxsz ) { xpkfault = true; return false } flags = X.U8(xpk+0x20); xhdrs = flags&1; haspass = flags&2; if(flags&4) hdrsz = 0x26+X.U16(xpk+0x24,_BE); else hdrsz = 0x24; if(xpk+sz+8 > X.Sz()) { xpkfault = true; return false } cccc = [ // They often repeat the other detections below, but more standardised. And repeat we shall. [/ACCA/,"André Osterhues's Code Compression Algorithm (XPK-ACCA.)"], [/ARTM/,"Arithmetic encoding compressor (XPK-ARTM.)"], [/BLZW/,"LZW-compressor by Bryan Ford (XPK-BLZW.)"], [/BZIP/,"bzip by Julian Seward (XPK-BZIP."], [/BZP2/,"bzip2 by Julian Sadler (XPK-BZP2.)"], [/CBR[01]/,"RLE-compressor by Bilbo 1st of Hypenosis (XPK-CBR0.,XPK-CBR1.)"], [/CRM2/,"Crunch-Mania by Thomas Schwarz, LZH-mode (XPK-CRM2.)"], [/CRMS/,"Crunch-Mania by Thomas Schwarz, sampled LZH-mode (XPK-CRMS.)"], [/CYB[12]/,"XpkCybPrefs container by Alexis Nasr (XPK-CYB1.,XPK-CYB2.)"], [/GZIP/,"DEFLATE by Jean-loup Gailly (XPK-GZIP.)"], [/DLTA/,"Delta encoding by Stephan Fuhrmann (XPK-DLTA.)"], [/FAST/,"Fast LZ77 compressor by Christian von Roques (XPK-FAST.)"], [/FBR2/,"FBR2 CyberYAFA compressor (XPK-FBR2.)"], [/FRLE/,"RLE-compressor by Jorma Oksanen (XPK-FRLE.)"], [/HFMN/,"Huffman compressor (XPK-HFMN.)"], [/HUFF/,"Huffman compressor by Marc Zimmermann (XPK-HUFF.)"], [/ILZR/,"Incremental Lempel-Ziv-Renau compressor (XPK-ILZR.)"], [/IMPL/,"File Imploder by Peter Struijk (XPK-IMPL.)"], [/LHLB/,"LZRW-compressor by Gunther Nikl (XPK-LHLB.)"], [/LIN1/,"LIN1 LINO packer (XPK-LIN1.)"], [/LIN3/,"LIN3 LINO packer (XPK-LIN3.)"], [/LIN2/,"LIN2 LINO packer (XPK-LIN2.)"], [/LIN4/,"LIN4 LINO packer (XPK-LIN4.)"], [/LZBS/,"LZBS CyberYAFA compressor (XPK-LZBS.)"], [/LZCB/,": LZ-compressor (XPK-LZCB.)"], [/LZW2/,"LZW2 CyberYAFA compressor (XPK-LZW2.)"], [/LZW3/,"LZW3 CyberYAFA compressor (XPK-LZW3.)"], [/LZW4/,"LZW4 CyberYAFA compressor (XPK-LZW4.)"], [/LZW5/,"LZW5 CyberYAFA compressor (XPK-LZW5.)"], [/ELZX/,"LZX-compressor by Piotr Kasprzyk (XPK-ELZX.)"], [/SLZX/,"LZX-compressor with delta encoding by Piotr Kasprzyk (XPK-SLZX.)"], [/MASH/,"LZRW-compressor by Zdenek Kabelac (XPK-MASH.)"], [/NONE/,"Null compressor by Dirk Stöcker (XPK-NONE.)"], [/NUKE/,"LZ77-compressor by Christian von Roques (XPK-NUKE.)"], [/DUKE/,"LZ77-compressor by Christian von Roques, with delta encoding (XPK-DUKE.)"], [/PWPK/,"Power Peak's PowerPacker by Nico François (XPK-PWPK.)"], [/PPMQ/,"PPM compressor by Charles Bloom (XPK-PPMQ.)"], [/(FRHT|RAKE)/,"LZ77-compressor (XPK-FRHT.,XPK-RAKE.)"], [/RDCN/,"Ross data compression (XPK-RDCN.)"], [/RLEN/,"RLE-compressor (XPK-RLEN.)"], [/SDHC/,"Sample delta Huffman compressor (XPK-SDHC.)"], [/SHR[I3]/,"LZ-compressor with arithmetic encoding by Matthias Meixner (XPK-SHR3.,XPK-SHRI)"], [/SLZ3/,"SLZ3 CyberYAFA compressor by Niels Fröhling (XPK-SLZ3.)"], [/SMPL/,"Huffman compressor with delta encoding (XPK-SMPL.)"], [/SQSH/,"Squash compressor for sampled sounds by John Hendrikx (XPK-SQSH.)"], [/SASC/,"LZ-compressor with arithmetic and delta encoding (XPK-SASC.)"], [/SHSC/,"Context modeling compressor by Peter Kunath (XPK-SHSC.)"], [/TDCS/,"LZ77-compressor by Niels Fröhling (XPK-TDCS.)"], [/ZENO/,"LZW-compressor (XPK-ZENO.)"], //the following aren't implemented in Ancient [/BLFH/,"Blowfish encryption by Bruce Schneider (XPK-BLFH.)"], [/BZIP/,"Encapsulated Bzip v1 (XPK-BZIP.)"], [/CAST/,"CAST encryption by Dirk Pauli (XPK-CAST.)"], [/ENCO/,"Unsafe encryption (XPK-ENCO.)"], [/DHUF/,"Huffman compressor (lost) (XPK-DHUF.)"], [/DMCB/,"68881/2 fp-based arithmetic compressor (XPK-DMCB.)"], [/DMCD/,"68881/2 fp-based arithmetic compressor (XPK-DMCD.)"], [/DMCI/,"Arithmetic compressor (lost) (XPK-DMCI.)"], [/DMCU/,"68881/2 fp-based arithmetic compressor (XPK-DMCU.)"], [/FEAL/,"FEAL-N encryption by Christian von Roques (XPK-FEAL.)"], [/IDEA/,"IDEA encryption (XPK-IDEA.)"], [/L2XZ/,"LZMA2 compressor (XPK-L2XZ.)"], [/LZ40/,"LZ4 compressor (XPK-LZ40.)"], [/LZMA/,"LZMA2 compressor (XPK-LZMA.)"], [/NUID/,"IDEA encryption + NUKE (XPK-NUID.)"], [/SHID/,"IDEA encryption + SHRI (XPK-SHID.)"], [/TLTA/,"TLTA encoder (lost) (XPK-TLTA.)"] ] found = -1; for(i=0; i < cccc.length && found < 0; i++) if(cccc[i][0].test(type)) found = i; if(found < 0) { xpkfault = true; return false } sname = sname.appendS(cccc[found][1],"/n"); if(xpk+0x24 > X.Sz()) bad = bad.addIfNone("!short"); else { c = 0; for(i=0; i < 0x24; i++) c ^= X.U8(xpk+i); if(c) bad = bad.addIfNone("!badhdr"); } //if(X.isDeepScan()) { //TODO check all the chunks; for each: isXPK(reclvl+1); } sz += xpk+8; return true; } if(isXPK()) { if(X.isVerbose()) sName = "Amiga eXtended PacKer Format container by Dirk Stöcker et al. (XPKF.)"; else sName = "XPK container (XPKF.)"; sVersion = sversion+(bad!=""?"malformed"+bad:""); bDetected = 1; if(X.isVerbose()) sOptions = sname+"; payload at:"+Hex(hdrsz)+" unp.sz:"+unpsz+" sz:"+outSz() } else if(X.Sz() > 4 && X.c("'ACCA'")) _setResult("archive","André Osterhues's Code Compression Algorithm (ACCA.)","",""); else if(X.Sz() > 2 && X.c("FF1F")) _setResult("archive","Compact by Colin L. McMaster (.C)","",""); function isCompress() { if(X.Sz() < 3 || !X.c("1F9D")) return false; t = X.U8(2); sversion = t&0x80 ? "new" : "old"; t &= 0x7F; if(t < 9 || t > 16) return false; return true } if(isCompress()) _setResult("archive","Compress by Spencer Thomas (.Z)",sversion,""); function isCrunchMania() { if(X.Sz() < 20) return false; if(!X.c("'CrM!'") && !X.c("'CrM2'") && !X.c("'Crm!'") && !X.c("'Crm2'") && !X.c("18051973") && !X.c("'CD'B3B9") && !X.c("'DCS!'") && !X.c("'Iron'") && !X.c("'MSS!'") && !X.c("'mss!'")) return false; unpsz = X.U32(6,_BE); if(!unpsz || unpsz > maxsz) return false; sz = X.U32(10,_BE)+14; if(sz < 15 || sz > X.Sz() || sz > maxsz) return false; hdr = X.SA(0,4); switch(hdr) { case "\x18\x05\x19\x73": case "CD\xB3\xB9": case "Iron": case "MSS!": hdr = "CrM2"; break; case "mss!": hdr = "Crm2"; break; case "DCS!": hdr = "CrM!" } var isSampled = hdr[2] == 'm', isLZH = hdr[3] == '2'; sversion = ["std","std sampled","LZH","LZH sampled"][(isLZH?2:0)+(isSampled?1:0)]; return true } if(!bDetected && isCrunchMania()) { sName = "Crunch-Mania by Thomas Schwarz (CRM.)"; sVersion = sversion; if(X.isVerbose()) sOptions = "unp.sz:"+unpsz+" sz:"+outSz(); bDetected = 1 } function isDMS() { //TODO move to internal CRC16 once that's ready if(!X.c("'DMS!'") || X.Sz() < 0x38) return false; if(X.U16(0x32,_BE) > 6) return false; bad = ''; if(_CRC16(4,0x32,0) != X.U16(0x36,_BE)) bad = bad.addIfNone('!badhdr'); var info = X.U16(10,_BE); if(info&0x20) return false; sversion = ''; if(info&2) sversion = "obfuscated"; p = 0x38; var ctxsz = tsz = acsz = lasttrksz = trks = mintrk = prevtrk = 0; var ctxszs = [0,0,0x100,0x4000,0x4000,0x1000,0x2000]; while(p+20 < X.Sz()) { if(!X.c("'TR'",p)) return false; ctrk = X.U16(p+2,_BE); if(ctrk < prevtrk) break; if(X.isDeepScan()) if(_CRC16(p,18,0) != X.U16(p+18,_BE)) { bad = bad.addIfNone("!badtrkhdr"); break } var mode = X.U8(p+13); if(mode > 6) return false; var ctxsz = Math.max(ctxsz,ctxszs[mode]); var flags = X.U8(p,12); if((mode >= 2 && mode <= 4) || (mode >= 5 && (flags&4))) tsz = Math.max(tsz,X.U16(p+8,_BE)); var hksz = X.U16(p+6,_BE); if(p+20+hksz > X.Sz()) return false; // ↓ potential to slow the script down: if(X.isAggressiveScan()) if(_CRC16(p+20,hksz,0) != X.U16(p+16,_BE)) { bad = bad.addIfNone("!badtrkcrc"); break } if(ctrk < 80) { if(ctrk >= trks) lasttrksz = X.U16(p+10,_BE); if(mintrk > ctrk) mintrk = ctrk; if(ctrk > trks) trks = ctrk; prevtrk = ctrk } p += hksz+20; acsz += hksz; if(p > X.Sz()) { bad = bad.addIfNone("!short"); break } if(ctrk >= 79 && ctrk < 0x8000) break; if(bad) break; } var trksz = (info&16)?22528:11264; //var rawofs = mintrk*trksz; if(mintrk >= trks) bad = bad.addIfNone("!badtrknum"); unpsz = (trks-mintrk)*trksz+lasttrksz; //imgsz = trksz*80; sz = p; if(sz > maxsz) bad = bad.addIfNone("!badcalcsize"); if(bad) sversion += "/malformed"+bad; return true; } if(!bDetected && isDMS()) { sName = "Disk Masher System (DMS.)"; sVersion = sversion; if(X.isVerbose()) sOptions = "unp.sz:"+unpsz+" sz:"+outSz(sz); bDetected = 1 } function isFreeze() { if(!X.c("1F9E") && !X.c("1F9F")) return false; var old = X.c("1F9E"); sname = sversion = ""; if(old) { if(X.Sz() > 2) { var _t = [0,0,1,3,8,12,42,16]; var lent = [], i = btl = k = 0; var br = new BitReader(2); for(; i < 8; i++) for(; k < _t[i]; k++) lent[btl++] = i+1; _t = createOrderlyHuffmanTable(lent,btl,br); if(!_t) return false; } sversion = "v1.x = gzip v0.5" } else { if(X.Sz() < 5) return false; t = X.U16(2,_LE); if(t & 0x8000) return false; t2 = X.U8(4); if(t2 & 0xC0) return false; var _t = [t&1, (t>>1)&3, (t>>3)&7, (t>>6)&0xF, t>>10, t2]; var count = 62; for(i=0; i < 6; i++) count -= _t[i]; var weights = 0x100, j = 7; for(i=0; i < 6; i++) weights -= _t[i] << j--; if(weights < count || count*2 < weights) return false; if(!createOrderlyHuffmanTable()) sversion = "v2.x" } return true } if(!bDetected && isFreeze()) { sName = "Freeze/Melt by Leonid A. Broukhis (.F,.lzc)"; sVersion = sversion; bDetected = 1 } function isIMP() { hdr = X.SA(0,4); switch(hdr) { case "ATN!": case "EDAM": case "IMP!": case "M.H.": add = 7; break; case "BDPI": add = 0x6E8; break; case "CHFI": add = 0xFE4; break; case "RDC9": case "Dupa": case "FLT!": case "PARA": add = 0; break; default: return false; } unpsz = X.U32(4,_BE); sz = X.U32(8,_BE); sversion = ""; if(!unpsz || !sz || (sz&1) || (sz < 0xC) || sz+0x32 > X.Sz() || unpsz > maxsz || sz > maxsz) return false; if(X.isDeepScan()) { crc = X.U32(sz+0x2E,_BE); for(i=0; i < sz+0x2E; i += 2) add += X.U16(i,_BE); if((add&0xFFFFFFFF) != crc) sversion = "malformed!CRC" } sz += 0x32; return true } if(!bDetected && isIMP()) { sName = "File Imploder by Peter Struijk (FImp.)"; sVersion = sversion; if(X.isVerbose()) sOptions = "unp.sz:"+unpsz+" sz:"+outSz(); bDetected = 1 } function isLOB() { if(X.Sz() < 12 || !/[\x01\x02\x03]LOB/.test(X.SA(0,4))) return false; var nV = X.U8(0); method = X.U8(4); if(!method || method > 6) return false; unpsz = 0; if(nV === 1) { unpsz = File.read_uint24(5,_BE); if(!unpsz || unpsz > maxsz) return false; } sz = 12+X.U32(8,_BE); if(method === 2) { var c = 2; for(i = 0; i < c; i += 2) { if(sz+c > X.Sz()) return false; t1 = X.U8(sz+i); t2 = X.U8(sz+i+1); if(t1 != t2) { if(t1 < t2) t1 = t2; if(c < t1+i+4) c = t1+i+4; if(c > 1024) return false } } sz += c; // the count is also off in Ancient, but it does unpack! (could be an extra 00 at the end) } sversion = ["BMC: RLE", "HUF: Huffman", "LZW: 12-bit fixed code", "LZB: 9 to 12-bit fixed LZW","MSP: LZ variant","MSS: LZSS variant"][method-1] + ["","/double","/triple"][nV-1] +(sz > X.Sz() ? "/malformed!short" : ""); return true } if(!bDetected && isLOB()) { sName = "LOB's File Compressor aka. Multipak (LOB.)"; sVersion = sversion; if(X.isVerbose()) sOptions = (unpsz?"unp.sz:"+unpsz+" ":"")+"sz:"+outSz(); bDetected = 1 } function isMMCMP() { if(!X.c("'ziRCONia'0E00") || X.Sz() < 24) return false; var blkn = X.U16(0x0C,_LE), blkp = X.U32(0x12,_LE); unpsz = X.U32(0x0E,_LE); if(unpsz > maxsz) return false; if(blkp+blkn*4 > X.Sz()) return false; bad = ""; sz = 0; for(i = 0; i < blkn; i++) { var t = X.U32(blkp+i*4,_LE); if(t+20 > X.Sz()) return false; var bkp = t+X.U32(t+4,_LE)+8*X.U16(t+12,_LE)+20; if(sz < bkp) sz = bkp } return true } if(!bDetected) if(isMMCMP()) { sName = "Music Module Compressor by Emmanuel 'Zirconia' Giasson (MMCMP.)"; nV = X.U16(0x0A,_LE).toString(16).toUpperCase(); sVersion = "v"+nV[0]+"."+nV.slice(1,3); if(X.isVerbose()) sOptions = "unp.sz:"+unpsz+" sz:"+outSz(); bDetected = 1 } else if(X.c("'MMS '00")) { sName = "C(ompression)KIT by Mad Man Software (C4-,C4A,C`A)"; bDetected = 1; } function isPack() { if(!X.c("1F1E") && !X.c("1F1F") || X.Sz() < 6) return false; old = X.c("1F1F"); if(old) unpsz = (X.U16(2,_LE) << 16) | X.U16(4,_LE); //PDP-endian else { unpsz = X.U32(2,_BE); t = X.U8(6); if(!t || t > 0x18 || 6+t > X.Sz()) return false } if(unpsz > maxsz || (old && !unpsz)) return false; if(old) { var p = 6; var tree = []; var c = X.U16(p,_LE); p += 2; if(c >= 1024) return false; for(i=0; i < c; i++) { t = X.U8(p++); if(t < 255) tree[i] = t; else { tree[i] = X.U16(p,_LE); p += 2 } } var detect = true; function branch(node,len,bits) { if(!detect) return; if(node > c) { detect = false; return } if(tree[node]) { len++; if(len > 24) { detect = false; return } bits <<= 1; branch(node+tree[node],len,bits); if(node+1 >= c) { detect = false; return } branch(node+tree[node+1],len,bits|1); } else if(!len) { detect = false; return } } branch(0,0,0); return detect } return true } if(!bDetected && isPack()) { sName = "Pack (.z)"; if(old) sVersion = "old"; if(X.isVerbose()) sOptions = "unp.sz:"+unpsz; bDetected = 1 } function isPP() { if(X.Sz() < 0x10 || !X.c("'PP11'") && !X.c("'PP20'") && !X.c("'PX20'") && !X.c("'CHFC'") && !X.c("'DEN!'") && !X.c("'DXS9'") && !X.c("'H.D.'") && !X.c("'RVV!'")) return false; var isObf = false; sversion = ""; if(X.c("'PX20'")) { if(X.Sz() < 0x12) return false; isObf = true; sversion = "obfuscated" } var m = X.U32(isObf?6:4, _BE); if(m != 0x9090909 && m != 0x90A0A0A && m != 0x90A0B0B && m != 0x90A0C0C && m != 0x90A0C0D) return false; if(X.isDeepScan()) { t = X.U32(X.Sz()-4,_BE); unpsz = t>>8; if(!unpsz || unpsz > maxsz || (t&0xFF) >= 0x20) return false } return true } if(!bDetected && isPP()) { sName = "Power Peak's PowerPacker by Nico François (PP.)"; sVersion = sversion; if(X.isDeepScan() && X.isVerbose()) sOptions = "unp.sz:"+unpsz; bDetected = 1 } else if(!bDetected && X.c("'SFHD'")) _setResult("archive","PowerPlayer Music Cruncher by Stephan Fuhrmann (PMC.)","v1.0", "lh.library-based, unp.sz:"+X.U32(4,_BE)+" sz:"+outSz(X.U32(8,_BE)+0xC)); else if(!bDetected && X.c("'SFCD'")) _setResult("archive","PowerPlayer Music Cruncher by Stephan Fuhrmann (PMC.)","v2.x", "LZRW-compressor, unp.sz:"+X.U32(4,_BE)+" sz:"+outSz(X.U32(8,_BE)+0xC)); function isRNC() { if(!X.c("'RNC'01") && !X.c("'RNC'02") && !X.c("'...'01")) return false; unpsz = X.U32(4,_BE); sz = X.U32(8,_BE); if(!unpsz || !sz || unpsz > maxsz || sz > maxsz) return false; var verified = false; sversion = ""; if(X.c("'RNC'01")) if(X.Sz() <= 0x12) sversion = "old"; else { var news = X.U8(0x12), olds = X.U8(sz+0x0B); if(!(olds&0x80)) sversion = "new"; else if((news&3) || !(news&0x7C)) sversion = "old"; else if(X.Sz() >= sz+0x12 && (File.isHeuristicScan() || X.isDeepScan() && CRC16(0x12,sz,0) == X.U16(0x0E,_BE))) { sversion = "new"; verified = true } else sversion = "old" } else if(X.c("'RNC'02")) if(X.Sz() <= 0x12) sversion = "old"; else { var news = X.U8(0x12), olds = X.U8(sz+0x0A); if(!(olds&0x80)) sversion = "new"; else if((news&0x30) == 0x30) sversion = "old"; else if(X.Sz() >= sz+0x12 && (File.isHeuristicScan() || X.isDeepScan() && CRC16(0x12,sz,0) == X.U16(0x0E,_BE))) { sversion = "new"; verified = true } else sversion = "old" } else if(X.c("'...'01")) version = "new";// else return false var hdsz = sversion[0] == "o" ? 0x0C : 0x12; bad = ""; if(hdsz+sz > X.Sz()) bad = "!short"; if(X.isDeepScan() && sversion[0] == "n" && !verified && CRC16(0x12,sz,0) != X.U16(0x0E,_BE)) bad = bad.addIfNone("!badcrc"); sz += hdsz; if(bad) sversion += "/malformed"+bad; return true } if(!bDetected && isRNC()) { sName = "Rob Northen Compressor (RNC"+X.U8(3)+".)"; sVersion = sversion; if(X.isDeepScan() && X.isVerbose()) sOptions = "unp.sz:"+unpsz+" sz:"+sz; bDetected = 1 } else if(!bDetected && File.isHeuristicScan() && X.Sz() >= 4 && X.c("1FA0")) _setResult("archive","SCO Compress LZH (SCO.)","",""); function isSQSH() { if(!X.c("'SQSH'")) return false; return true } if(!bDetected && isSQSH()) { sName = "Squash compressor by John Hendrikx (SQSH.)"; sOption = "12-bit LZW"; bDetected = 1 } function isStoneCracker() { //won't recognise an archive with a zero-length file in it, by design, to minimise FPs var ihdr = X.U32(0,_BE), bhdr = X.readBytes(0,3), hdr = X.SA(0,4); function _subdetect() { if(ihdr >= 0x08090A08 && ihdr <= 0x08090A0E && ihdr != 0x08090A09) { gen = 2; return true } if((ihdr&0xFF) >= 8 && (ihdr&0xFF) <= 0x0E) if(bhdr[0] != bhdr[1] && bhdr[0] != bhdr[2] && bhdr[1] != bhdr[2]) { gen = 1; return true } switch(hdr.slice(0,3)) { case "1AM": gen = 3; return true; case "2AM": gen = 6; return true; } switch(hdr) { case "S300": gen = 3; return true; case "S310": gen = 4; return true; case "S400": gen = 5; return true; case "S401": gen = 6; return true; case "S403": case "Z&G!": case "ZULU": gen = 7; return true; case "S404": case "AYS!": gen = 8; return true; default: return false } } if(!_subdetect()) return false; var _m = []; sz = unpsz = -1; function readModes(value) { for (var i=0; i < 4; i++) { _m[i] = value >> 24; if (_m[i] < 8 || _m[i] > 14) return false; value <<= 8; } } function meta() { switch(gen) { case 1: p = 0x12; if(X.Sz() < p) return false; _m[0] = ihdr; for(i=1; i < 3; i++) { _m[i] = X.U8(i+15); if(_m[i] < 4 || _m[i] > 7) return false } var rlesz = X.U32(4,_BE); if(!rlesz) return false; unpsz = X.U32(8,_BE); if(!unpsz || rlesz > unpsz || unpsz > 0x100000) return false; sz = X.U32(12,_BE); if(!sz || sz > rlesz) return false; break; case 2: readModes(ihdr); case 4: case 5: case 6: p = 12; if(X.Sz() < p) return false; unpsz = X.U32(4,_BE); if(!unpsz) return false; sz = X.U32(8,_BE); if(!sz) return false; break; case 3: p = 0x10; if(X.Sz() < p) return false; readModes(X.U32(4,_BE)); unpsz = X.U32(8,_BE); if(!unpsz) return false; sz = X.U32(12,_BE); if(!sz) return false; break; case 7: case 8: p = 0x10; if(X.Sz() < p+2) return false; unpsz = X.U32(8,_BE); if(!unpsz) return false; sz = X.U32(12,_BE)+2; if(sz < 2) return false; break; default: return false; } sz += p; if(sz > X.Sz() || sz > maxsz || unpsz > maxsz) return false; return true } if(gen == 2 && !meta()) gen = 1; if(!meta()) return false; names = [["?","?"], ["SC","v2.69-81"],["SC","v2.92-99"],["S300","v3.00"],["S310","v3.10-11b"], ["S400","pre-v4.00"],["S401","v4.01"],["S403","v4.02a"],["S404","v4.10"]][gen]; return true } if(!bDetected && isStoneCracker()) { sName = "StoneCracker by Jouni 'Mr. Spiv' Korhonen ("+names[0]+".)"; sVersion = names[1]; bDetected = 1; if(X.isVerbose()) sOptions = (unpsz >= 0 ? "unp.sz:"+unpsz+" " : "")+(sz >= 0 ? "sz:"+outSz() : "") } function isTPWM() { if(X.Sz() < 12 || !X.c("'TPWM'")) return false; unpsz = X.U32(4,_BE); if(!unpsz || unpsz > maxsz) return false; return true } if(!bDetected && isTPWM()) { sName = "Turbo Packer by Wolfgang Meyerle (TPWM.)"; if(X.isVerbose()) sOptions = "unp.sz:"+unpsz; bDetected = 1 } function isVice() { if(X.c("'Vice'")) { return true } else if(!X.c("'Vic2'")) return false; else { unpsz = X.U32(4); sz = 0xC+X.U32(8,_BE); if(!unpsz || unpsz > maxsz || sz < 1036 || sz > maxsz) return false; } return true } if(!bDetected && isVice()) { sName = "Huffman compressor with RLE ("+X.SA(0,4)+".)"; bDetected = 1; if(X.isVerbose() && X.U8(3) == 0x32) sOptions = "unp.sz:"+unpsz+" sz:"+sz } return result() } /* beautify ignore:end */ ================================================ FILE: db/Binary/archive_btoa.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("archive", "btoa"); function detect() { var sStr = Binary.getString(0, 11); if (sStr == "'xbtoa Begin'") { bDetected = true; } return result(); } ================================================ FILE: db/Binary/archive_cad.DWG.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: https://www.opendesign.com/files/guestdownloads/OpenDesign_Specification_for_.dwg_files.pdf // https://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-235B22E0-A567-4CF6-92D3-38A2306D73F3 meta("archive", "AutoCAD Drawing (.DWG)"); function detect() { if (Binary.getSize() >= 9) { bDetected = true; switch (Binary.getString(0, 0x06)) { case 'AC1001': sVersion = "R2.22"; break; case 'AC1002': sVersion = "R2.50"; break; case 'AC1003': sVersion = "R2.60"; break; case 'AC1004': sVersion = "R9"; break; case 'AC1006': sVersion = "R10"; break; case 'AC1009': sVersion = "R11/12"; break; case 'AC1012': sVersion = "R13"; break; case 'AC1014': sVersion = "R14"; break; case 'AC1015': sVersion = "R2000"; break; case 'AC1018': sVersion = "R2004"; break; case 'AC1021': sVersion = "R2007"; break; case 'AC1024': sVersion = "R2010"; break; case 'AC1027': sVersion = "R2013"; break; case 'AC1032': sVersion = "R2018"; break; default: return; } } return result(); } ================================================ FILE: db/Binary/archive_gp7bank.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens TG@kaens meta("archive", "Arobas Music Guitar Pro 7+ soundbank (.gp7bank)"); function detect() { if (!X.c("'AMARCHIVE'..000000") || !X.c("'Samples.xml'00", 0x25) || !X.c("' // Authors: // Kaens TG@kaens (for all the https://en.wikipedia.org/wiki/Music_tracker stuff) // hypn0 // Due to the extreme script file size, many good code practices were sacrificed to ensure it loads /* beautify ignore:start */ meta("audio", ""); includeScript("chunkparsers"); includeScript("soundchips"); includeScript("bytecodeparsers"); const debug = 0; //verbosity up to 3, where every note/command is shown. Overrides the debug() function; use _l2r() function isWinCert() { // I'll skip WIN_CERTIFICATE+bCertificate things for overlay scans to save time :) if(X.Sz() >= (_wcsz=X.U32(0,_LE)) && X.c('00 02 02 00 30', 4)) { // assuming the tag's just present immediately _wcp = 9; _wca = X.U8(_wcp++); if(_wca < 0x80) {} else if(_wca > 0x80) { _wcc = _wca ^ 0x80; for(_wci=_wca=0; _wci < _wcc; _wci++) _wca = (_wca << 8) + X.U8(_wcp++); //big-endian here } else _wca = -1; if(_wca > 0 && _wca+_wcp <= _wcsz && X.c("06 09 2A 86 48 86 F7 0D 01 07 02",_wcp)) return true; //handoff to other decectors } return false } function detect() { if(isWinCert()) return; // this C-like pre-declaration is here because lol Qt6 var p = 0, i = 0, j = 0, k = 0, l = 0, r = 0, t = 0, x = 0, sz = -1, title = '', a = '', c = '', msg = '', info = '', artist = '', soption = ''; if(X.c("'[1tracker module]'0D0A")) { sName = "Shiru's 1tracker module (.1TM)"; bDetected = 1; l = X.fStr(1,0x40,"Engine="); if(l >= 0) { r = X.fStr(l+7,0x40,"."); sVersion = "for "+X.SA(l+7,r-l-7) } if(X.isVerbose()) { l = X.fStr(r,0x80,"Title="); if(l >= 0) { r = X.fSig(l+6,0x40,"0D0A"); sOption(X.SA(l+6,r-l-6)) } l = X.fStr(r,0x80,"Author="); if(l >= 0) { r = X.fSig(l+7,0x40,"0D0A"); sOption(X.SA(l+7,r-l-7),"by: ") } l = X.fStr(r,0x80,"Speed="); if(l >=0 ) { r = X.fSig(l+7,0x40,"0D0A"); sOption(X.SA(l+7,r-l-7),"spd:") } } } else if(X.c("'_A2module_'") && isWithin(nV = X.U8(0xE),1,14)) { bDetected = 1; bad = false; sName = "subz3ro's AdLib Tracker II module (.A2M)"; sVersion = "/┤DLiB TR/┤CK3R ][ v"+nV; ptn = X.U8(0xF); if(!ptn || ptn>64) bad = "!badptn"; if(bad) sVersion += "/malformed"+bad; else if(X.isVerbose()) sOption('ptn:'+ptn); //TODO extract more, ver.-dependent } else if(X.c("'_A2tiny_module_'") && isWithin(nV = X.U8(0x13),1,14)) { sName = "subz3ro's AdLib Tracker II module (.A2T)"; bDetected = 1; bad = false; sVersion = "/┤DLiB TR/┤CK3R ][ v"+nV+' tiny'; ptn = X.U8(0x14); if(!ptn || ptn>64) bad = "!badptn"; tmp = X.U8(0x15); spd = X.U8(0x16); rows = X.U16(0x18); trk = X.U8(0x1A); if(bad) sVersion += "/malformed"+bad; else if(X.isVerbose()) sOption('tempo:'+tmp+' spd:'+tmp+' trk:'+trk+' ptn:'+ptn); //TODO extract more } else if(X.c("'EXITgB'2018201820182F18201024C94AA80004660A558006A80000000200042200D28924C1D0A8000424C0D1DF2018D1D82018D1D82018201812D804800000000166F660B4610000'H|'017E01610000'Z|'027E02610000'R|'037E03610000'JL'DF7FFF'NuH'E7FFFE7E01610000AC7E02610000A67E03610000A04CDF7FFF'Nu`'0A602260000092600000'~A'FA....4BF900DFF000'p0;|'000000AA0440001064F4'NuK'F900DFF0003007C0FC",0x1A) //check D0h bytes ) { // https://www.exotica.org.uk/wiki/Art_%26_Magic_(team) bDetected = 1; sName = "Franck Sauer and Yves Grolet's Art & Magic module (.AAM)"; if(X.isVerbose()) { t = X.fSig(0x8000,Math.min(0xFFFF,X.Sz()),"'EXIT'"); if(t >= 0) sOption(outSz(t+4),"sz:"); else sVersion = "malformed!short" } } else if(X.c("'ADLIB'01")) { sName = "Martin Fernandez's Adlib module (.ADLIB)"; bDetected = 1; if(X.isVerbose()) { t = X.SA(6,0x100); g = X.SA(6+t.length+1,0x100); sOption(t); sOption(g,"for: ") } } else if(X.c("'AERO'00000001") && X.U8(0x0F) == 0xCA && X.U8(0x1F) == 0xCA && X.U8(0x2F) == 0xCA) { sName = "ioNeo's Aero Studio module (.AERO)"; bDetected = 1; if(X.isVerbose()) sOption('sz:'+outSz(X.U32(8)+12)) } else if(X.fSig(20,0x100,"' 0) { sName = "Julien Névo's Arkos Tracker 2 module (.AKS)"; sVersion = 'unpacked'; bDetected = 1; } else if(X.c("'AM01'000000") && X.c("'ASD1'", 0x38) && (amp=X.fSig(0x40,0x1000000,"'AMP'.. ........'ASSH'")) > 0) { sName = "New Beat's Ace Tracker module (.AM)"; bDetected = 1; maxsz = Math.min(X.Sz(),0x1000000); title = by = bad = ''; ptn = ord = smp = sz = 0; ptns = []; p = 0x3C; while(p < amp && smp < 0x40 && (t=X.U32(p,_BE))) { p += t; smp++ } p += 4; if(!X.c("'AMP'.. ........'ASSH'",p)) { p = amp; bad = bad.addIfNone('!badsmp'); smp = Math.max(1,smp) } ampv = X.U8(p+3)-0x30; if(ampv > 3) bad = bad.addIfNone('!unkver'); sVersion = 'v'+ampv; ins = X.U32(p+4,_BE); p += 12; inss = []; for(i=0; i < ins; i++,p+=(ampv == 1? 0xCD: ampv == 2? 0xD1: ampv == 3? 0xD4: 0)) if((t=X.SA(p+4,20).trim()) != '' && t != 'Empty') inss.push(t) if(!X.c("'ASG1'",p)) bad = bad.addIfNone('!badins'); asg1 = X.fSig(amp,maxsz,"'ASG1'"); ord = ptn = 0; if(asg1 < 0) bad = bad.addIfNone('!nosong'); else { title = X.SC(asg1+4,20,'CP437'); by = X.SC(asg1+24,20,'CP437') for(i=asg1+0x2C; i < asg1+0x12C; i++) if(t=X.U8(i)) { ord = i-asg1-0x2B; if(t > ptn) ptn = t } } p = asg1+0x12C; apn1 = X.fSig(asg1,0x400,"'APN1'"); ch = ptn_ = -1; if(apn1 > 0) { if(p != apn1) bad = bad.addIfNone('!badptn'); ptn_ = X.U32(apn1+4,_BE); if(ptn != ptn_) bad = bad.addIfNone('!badptn'+ptn+'/'+ptn_); for(i=0,p=apn1+8; i < ptn_; i++) { t = X.SC(p+4,12,'CP437').trim(); if(t.length && t != 'Empty') ptns.push(t); ch_ = X.U16(p,_BE); if(ch_ > ch) ch = ch_; p += 16+4*ch_*X.U16(p+2,_BE); } sz = p } else bad = bad.addIfNone('!noptns'); if(ch > 16) bad = bad.addIfNone('!badchn'); if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOptionT(title); sOptionT(by,'by: '); sOptionT(addEllipsis(inss.filter(funSampleName).join(' ')),'ins/msg:"','"'); sOptionT(addEllipsis(ptns.join(' ')),'ptns:"','"'); sOption((ch > 0? 'ch:'+ch+' ': '')+'ord:'+ord+' ptn:'+(ptn!=ptn_?ptn+'/':'')+ptn_+' ins:'+ins+' smp:'+smp +' xpos:'+X.I32(0x34)+(sz?' sz:'+outSz(sz):'')) } } else if(X.c("'ASG1'") && X.c("'APN1'",0x12C)) { sName = "New Beat's Ace Tracker module patterns (.ASG)"; bDetected = 1; bad = ''; title = X.SC(4,20,'CP437'); by = X.SC(24,20,'CP437'); ptn = ord = 0; for(p=0x2C; p < 0x12C; p++) if(t=X.U8(p)) { ord = p-0x2B; if(t > ptn) ptn = t } ch = -1; ptns = []; for(i=0,p=0x134; i < 0xFF; i++) { // unlike what .am has, .asg saves all 255 patterns ch_ = X.U16(p,_BE); if(ch_ > ch) ch = ch_; ptnsz = ch_*X.U16(p+2,_BE); p += 4; if(ptnsz) { t = X.SC(p,12,'CP437').trim(); if(t.length && t != 'Empty') ptns.push(t); p += 12+4*ptnsz } } sz = p; if(ch > 16) bad = bad.addIfNone('!badchn'); if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOptionT(title); sOptionT(by,'by: '); sOptionT(addEllipsis(ptns.join(' ')),'ptns:"','"'); sOption((ch > 0? 'ch:'+ch+' ': '')+'ord:'+ord+' ptn:'+ptn+' sz:'+outSz(sz)) } } else if(X.c("'AMC V1.2 REPLAY!'") && X.c("0000003C0002 ",0x4E)) { // ref https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/AMComposer/src/AMComposer 1.2_v4.asm sName = "Marc Hawlitzeck's A.M. Composer module (.AMC)"; bDetected = 1; sVersion = "v"+X.SA(5,3); if(X.isVerbose()) { d0 = X.U32(0x14,_BE); a3 = X.U32(0x18,_BE); d3 = c = 0; p = 0x48; special = ''; for(smp = 0; p < X.Sz() && p < a3; p += 16) { d2 = X.I32(p,_BE) + 2*X.U16(p+4,_BE); smp++; if(d2 > d3) d3 = d2 } p = d3; if(p < X.Sz()) { while(p+c < X.Sz() && isWithin(X.U8(p+c),32,126)) c++; if(!X.U8(p+c) && p+c+1 == X.Sz()) c++; special = X.SA(p,c) } sOption(special,'info:"','"'); sOption('smp:'+smp+' sz:'+outSz(p+c)) } } else if(X.c("' 0?' sz:'+outSz(sz):'')); } } else if(X.c("'ASYLUM Music Format V1.0'00000000 00000000") && X.U8(0x22) <= 0x40 && X.Sz() >= 0xA66+0x800*X.U8(0x23)) { sName = "Electronic Arts' ASYLUM Music Format module (.AMF)"; bDetected = 1; sVersion = "v"+X.SA(0x15,3); if(X.isVerbose()) { spd0 = X.U8(0x20); bpm0 = X.U8(0x21); smp = X.U8(0x22); ptn = X.U8(0x23); ord = X.U8(0x24); p = 0x126; var allsmpsz = 0; smps = []; for(i=0; i < smp; i++) { smps.push(decAnsi(0x126+0x25*i,0x16,CP437,true,Chars0to1F).trim()); allsmpsz += X.U32(0x126+0x25*i+0x19); } sz = 0xA66+0x800*ptn+allsmpsz; sOptionT(addEllipsis(smps.filter(funSampleName).join(" "),0x100,0xA0), 'smp/msg:"','"') sOption("spd0:"+spd0+" bpm0:"+bpm0+" ord:"+ord+" ptn:"+ptn+" smp:"+smp+" smpsz:"+Hex(allsmpsz)+" sz:"+outSz(sz)) } } else if(X.c("'Extreme0'01") && X.U8(0xF) <= 0x20) { //ref http://modland.com/pub/documents/format_documentation/Extreme's%20Tracker%20v1.3%20(.ams).txt sName = "Extreme's Tracker Advanced Module System track (.AMS)"; bDetected = 1; //song tech info if(X.isVerbose()) { cmd = X.U8(9)>>5; sch = (X.U8(9)&0x1F)+1; smp = X.U8(10); ptn = X.U16(11); ord = X.U16(13); vmch = X.U8(15); xtra = X.U16(16); p = xtra + 18; S = []; allsmpsz = 0; for(i=0; i < smp; i++,p+=17) { var ssz = X.U32(p); allsmpsz += ssz; co = X.U8(p+16)&3; b16 = (X.U8(p+16)&0x80)?2:1; S.push([co,ssz,b16]); } sOptionT(X.SC(p+1,X.U8(p),'CP437')); p += 1+X.U8(p); //skip title smps = []; for(i=0; i < smp; i++) { //store smp names smps.push(X.SC(p+1,X.U8(p),'CP437')); p += 1+X.U8(p) } schs = []; for(i=0; i < sch; i++) { //store "channel" names schs.push(X.SC(p+1,X.U8(p),'CP437')); p += 1+X.U8(p) } for(i=0; i < ptn; i++) p += 1+X.U8(p); //skip ptn names msg = X.readBytes(p+2,X.U16(p),true/*\0 is a space*/); var msg_ = []; p += 2+X.U16(p); for(i=0; i < msg.length; i++) { //RLE if(msg[i] < 0x80) msg_.push(msg[i]); else if(msg[i] <= 0xA0) /*for(j=0; j < msg[i]-0x80; j++)*/ msg_.push(0x20); //too long else msg_.push(0x0A); //this RLE uses too_many_spaces as a line break; let's maybe not } msg = decEncoding(msg_,'CP437'); delete msg_; mptn = -1; for(i=0; i < ord; i++) { t = X.U16(p+2*i); if(t > mptn) mptn = t } mptn++; p += 2*ord; for(i=0; i < ptn; i++) p += 4+X.U32(p); allsmpcsz = 0; for(i=0; i < smp; i++) if(!S[i][0]) p += 8+S[i][1]*S[i][2]; //non-compressed else if(S[i][1]) { //compressed & smp size > 0 p += 4; scosz = X.U32(p); cc = X.U8(p+4); p += 5+scosz; allsmpcsz += scosz } delete S; sOption(addEllipsis(schs.join(' '),0xA0,0x80),'chns:"','"'); sOption(addEllipsis(msg.trim(),0x100,0x80),'msg:"','"'); sOption('ord:'+ord+' ptn:'+ptn+(mptn!=ptn?'/'+mptn:'')+' smp:'+smp+' cmd:'+cmd +' strk:'+sch+(vmch?' mtrk:'+vmch:'')+' co.smpsz:'+(allsmpcsz*100/allsmpsz).toFixed(1)+'% sz:'+outSz(p)) } } else if(X.c("'AMShdr'1A") && X.U8(7) <= 30 && X.U8(9+X.U8(7)) == 2 && X.U8(8+X.U8(7)) <= 2) { //ref http://modland.com/pub/documents/format_documentation/Velvet%20Studio%20v2.2,%20Advanced%20Module%20System%20(.ams).txt bDetected = 1; p = 8+X.U8(7); nv = X.U8(p); sName = "Velvet Studio Advanced Module System track (.AMS)"; sVersion = "v"+X.U8(p+1)+'.'+nv; bad = ''; ptn = X.U16(p+3); if(ptn > 1024) bad = bad.addIfNone('!badptn'); ord = X.U16(p+5); if(X.isVerbose()) { title = X.SC(8,p-8,'CP437'); ins = X.U8(p+2); p += 7; if(X.Sz() < 36+11+ins*2+ord*2+ptn*4) bad = bad.addIfNone('!short'); if(nv == 2) { bpm0 = Math.max(32<<8, X.U16(p)); p += 2; bpm0 = (bpm0>>8)+'.'+(bpm0&0xFF) spd0 = Math.max(1,X.U8(p++)); p += 3; flg = X.U16(p); p += 2 } else { bpm0 = Math.max(32,X.U8(p++)); spd0 = Math.max(1,X.U8(p++)); flg = X.U8(p++) } ch = (flg >> 6)&1?'2':'1'; linfreqtbl = (flg & 0x40) ? " lnr.freq.tbl.":""; midiused = (flg & 0x80) ? " MIDI used":""; sOptionT(title); inss = []; smps = []; S = []; allsmpsz = allsmpcsz = smp = shd = 0; for(i = 0; i < ins; i++) { t_ = X.U8(p++); if(t_ > 30) bad = bad.addIfNone('!badins'); t = X.SC(p,t_,'CP437').trim(); p += t_; if(t != "") inss.push(t); inssmp = X.U8(p++); if(inssmp) { if(nv == 0) p += 100; else p += 124; t = X.U8(p++); if(t > 63) bad = bad.addIfNone('!badenv'); p += t*3+4; t = X.U8(p++); if(t > 63) bad = bad.addIfNone('!badpan'); p += t*3+4; t = X.U8(p++); if(t > 63) bad = bad.addIfNone('!badvibenv'); p += t*3; t = X.U8(p); shdins = t > 0; if(shdins) shd++; p += 5; for(s = 0; s < inssmp; s++) { t_ = X.U8(p++); if(t_ > 22) bad = bad.addIfNone('!badsmp'); t = X.SC(p,t_,'CP437').trim(); p += t_; //if(t != "") smps.push(t); ssz = X.U32(p); p += 4; if(!shdins) smp++; if(ssz) { if(!shdins) { allsmpsz += ssz; sfl = X.U8(p+15); co = sfl&3; b16 = (sfl&4)?2:1; S.push([co,ssz,b16]) } p += 16 } } } } t_ = X.U8(p++); sOptionT(X.SC(p,t_,'CP437'),'by:'); p += t_; schs = []; for(i=0; i < 32; i++) { //store "channel" names schs.push(X.SC(p+1,X.U8(p),'CP437')); p += 1+X.U8(p) } // read the description msg = X.readBytes(p+11,X.U32(p)-11); msg_ = []; co = X.U8(p+10); p += X.U32(p); if(co) { for(i=0; i < msg.length;) { //RLE c = msg[i++]; if(c == 0xFF && msg.length-i >= 2) { c = msg[i++]; n = msg[i++]; if(c != 0x20) for(j=0; j < n; j++) msg_.push(c); else if(n <= 0x20) msg_.push(0x20); //not too many spaces in one else msg_.push(0x0A); //too many spaces. } else msg_.push(c); } msg = decEncoding(msg_,'CP437'); } else msg = decEncoding(msg,'CP437'); delete msg_; p += ord<<1; //skip the orderlist for(i=0; i < ptn; i++) p += 4+X.U32(p); //skip the patterns if(p > X.Sz()) bad = bad.addIfNone('!short'); for(i=0; i < smp; i++) if(!S[i][0]) { p += S[i][1]*S[i][2]; //non-compressed } else if(S[i][1]) { //compressed & smp size > 0 scosz = X.U32(p+4); cc = X.U8(p+9); p += 9+scosz; allsmpcsz += scosz } sz = p; sOption(addEllipsis(schs.join(' '),0xA0,0x80),'chns:"','"'); sOption(addEllipsis(inss.filter(funSampleName).join(' '),0xA0,0x80),'insts/msg:"','"'); //sOption(addEllipsis(smps.join(' '),0xA0,0x80),'smps/msg:"','"'); sOption(addEllipsis(msg.trim(),0xA0),'msg:"','"'); sOption('ch:'+ch+' ins:'+ins+(shd?'+'+shd+'sh':'')+' ord:'+ord+' ptn:'+ptn+ ' bpm0:'+bpm0+' spd0:'+spd0+linfreqtbl+midiused+ ' co.smpsz:'+(allsmpcsz*100/allsmpsz).toFixed(1)+'% sz:'+outSz(sz)) } if(bad) sVersion = sVersion.appendS('malformed'+bad,'/'); } else if(X.c("'AMX ")) { //ref http://and.intercon.ru/releases/audio/xsynth/ sName = "Dmitry 'AND' Andreev's XSynth module (.AMX)"; bDetected = 1 } else if(X.c("'AON4'") || X.c("'AON8'")) { // https://www.exotica.org.uk/wiki/Art_of_Noise sName = "Bastian 'Twice' Spiegel's Art of Noise/Chorus module (.AON)"; bDetected = 1; ch = X.U8(3)-0x30; if(X.isVerbose()) { id = X.SA(4,0x2A); p = 0x2E; //header skipped t = a = d = c = ''; ord = ptn = ins = 0; while (p < X.Sz()) { if(X.U8(p) == 0x3F) { p += (4-p) & 3; break } hkhd = X.readBytes(p,4); if(charStat(hkhd,1).indexOf('allasc') < 0) break; hkhd = decEncoding(hkhd,CP437); hksz = X.U32(p+4,_BE); p += 0x08; switch (hkhd) { case 'NAME': t = X.SC(p,hksz,'CP1252'); break; case 'AUTH': a = X.SC(p,hksz,'CP1252'); break; case 'DATE': d = X.SC(p,hksz,'CP1252'); break; case 'RMRK': c = X.SC(p,hksz,'CP1252'); break; case "PLST": ord = hksz; for(i=0; i < ord; i++) if((o=X.U8(p+i)+1) > ptn) ptn = o; break; case 'WLEN': for(i=0; i < (hksz>>2); i += 4) if(X.U32(p+i,_BE)) ins++; break; } p += hksz; } sOptionT(t); sOptionT(a,"by: "); sOptionT(d,"on: "); sOption(id,"in: "); sOption(addEllipsis(c.trim(),0xA0)); sOption('ch:'+ch+' ord:'+ord+' ptn:'+ptn+' ins:'+ins+' sz:'+outSz(p)) } } else if(X.c("'ADRVPACK'")) { sName = "Petter A. Urkedal's AProSys module (.APS)"; bDetected = 1 } else if(X.c("'ARP.'")) { sName = "Major Tom's Player 2 module (.ARP)"; bDetected = 1 } else if(X.c("'ACTIONAMICS SOUND TOOL'",0x3E)) { sName = "Michael Kleps's Actionamics Sound Tool module (.AST)"; bDetected = 1; sVersion = "v"+X.SA(0x56,3); } else if(X.c("08'AST '") && isWithin(X.U8(9), 4,8) && X.U16(0xA) <= 1001) { // http://justsolve.archiveteam.org/wiki/All_Sound_Tracker_module sName = "Patrice 'Cagliostro' Bouchand's All Sound Tracker module (.AST)"; sVersion = 'v'+X.SA(5,4); bDetected = 1; if(X.isVerbose()) { L = X.U16(0x0A); info = X.SC(0xC,L+1,'CP850'); p = 0xD+L; s = ""; for(i = 0; i < L; i+=0x26) { if((t = info.slice(i,i+0x26).trim()).length) s = s.appendS(t,'\n') //skipping the empty lines } sOption(addEllipsis(s,0x200)); ord = X.U8(p++); sz = 0; for(i=ptn=0; i <= ord; i++) ptn = Math.max(ptn,X.U8(p++)+1); fmp = X.I32(p); awp = X.I32(p+4); ptnp = X.I32(p+8); awesonp = X.I32(p+0xC); wavep = X.I32(p+0x10); p += 0x14; sz = Math.max(sz,p); for(p=fmp,fmi=0,n=X.U8(p++); n < 0xFF && p < X.Sz(); fmi++) { p += 20; n = X.U8(p++) } sz = Math.max(sz,p); for(p=awp,awes=0,n=X.U8(p++); n < 0xFF && p < X.Sz(); awes++) { p += 51; n = X.U8(p++) } for(awei=0,n=X.U8(p++); n < 0xFF && p < X.Sz(); awei++) { p += 39; n = X.U8(p++) } for(awed=0,n=X.U8(p++); n < 0xFF && p < X.Sz(); awed++) { p += 3; n = X.U8(p++) } p += 2;//cht = X.U8(p++); revt = X.U8(p++); p += 9*(14+9) + 9*(56+9)+1; sz = Math.max(sz,p); for(p=ptnp,ptn_=0,n=X.U8(p++); n < 0xFF && p < X.Sz(); ptn_++) { p += 2+X.U16(p); n = X.U8(p++) } sz = Math.max(sz,p); for(p=wavep,wf=0,n=X.U8(p++); n < 0xFF && p < X.Sz(); wf++) { p += 36; n = X.U8(p++) } sz = Math.max(sz,p); if(sVersion === 'v0001') sz--; //v01 doesn't have the finalising FF, so EoF is how it ends sOption('def:'+X.U8(9)+' ord:'+ord+' ptn:'+ptn+(ptn_!=ptn?'/'+ptn_:'') +' wavep:'+Hex(wavep) +(fmi?' FMins:'+fmi:'')+(awes?' AWEsmp:'+awes:'') +(awei?' AWEins:'+awei:'')+(wf?' wf:'+wf:'')+' sz:'+outSz(sz)) } } else if(X.c("'AudioSculpture10'00180018")) { sName = "Synchron Assembly's Audio Sculpture synth file (.AS)"; bDetected = 1 } else if(X.c("'##synth'0D0A")) { sName = "Athaudia's Athtune module (.ATHTUNE)"; bDetected = 1 } else if(X.c("'FORM'.... ....'AXSFUSER'") && X.c("'SHDR'", t=X.U32(0x10,_BE)+0x14) && X.c("'SONG'",X.U32(t+4,_BE)+t+8)) { //ref https://web.archive.org/web/20141129231503/http://www.resolutionaudio.nl/ sName = "Resolution's AXS module (.AXS)"; bDetected = 1; if(X.isVerbose()) { for(ord=ptn=ins=smp=0,sz=X.U32(4,_BE)+8,p=0xC,maxsz=Math.min(sz,X.Sz()); p < maxsz;) { hkhd = X.readBytes(p,4); if(charStat(hkhd,1).indexOf('allasc') < 0) break; hkhd = decEncoding(hkhd,CP437); hksz = X.U32(p+4,_BE); p += 8; switch(hkhd) { case 'SONG': ord = hksz >> 3; break; case 'BLOK': ptn++; break; case 'INST': ins++; break; case 'SAMP': smp++; break } p += hksz } sOption('ord:'+ord+' ptn:'+ptn+(ins?' syn:'+ins:'')+(smp?' smp:'+smp:'')+' sz:'+outSz(sz)) } } else if(X.c("'BBSONG'00'0001'00")) { //ref https://github.com/atsidaev/beepola/blob/master/STSong.pas etc. sName = "Shiru's Beepola module (.BBSONG)"; bDetected = 1; p = 0xC; var layouttag = false; ord = orn = ptn = svgptn = svgwarp = phains = 0; bad = title = auth = engine = ''; while(p < X.Sz()) { if(p >= X.Sz()) break; if(X.U8(p++) != 0x3A) { p--; break } t = X.SA(p,254); p += t.length+1; //_log(t+' @'+Hex(p)); switch(t) { case 'INFO': for(; p < X.Sz();) { t = X.SC(p,TOEOF,'CP1251'); p += t.length + 1; if(t === ':END') break; xx = t.split('='); if(xx.length > 2) xx = [xx[0], xx.slice(1,xx.length).join('=')]; switch(xx[0]) { case 'Title': title = xx[1]; break; case 'Author': auth = xx[1]; break; case 'Engine': engine = xx[1]; break; } } break; case 'LAYOUT': layouttag = true; while(p < X.Sz()) { t = X.SC(p,TOEOF,'CP1251'); p += t.length + 1; if(t === ':END') break; xx = t.split('='); if(xx.length > 2) xx = [xx[0], xx.slice(1,xx.length).join('=')]; switch(xx[0]) { case 'LoopStart': lp = +xx[1]; break; case 'Length': ord = +xx[1]; ptn = 0; for(i=0; i < ord; i++) if(ptn <= (t=X.U8(p++))) ptn = t+1; break; } } break; case 'PATTERNDATA': while(p < X.Sz()) { t = X.SC(p,0x400,'CP1251'); p += t.length + 1; if(t === ':END') break; xx = t.split('='); if(xx.length > 2) xx = [xx[0], xx.slice(1,xx.length).join('=')]; switch(xx[0]) { case 'PatternCount': ptns = +xx[1]; for(i = 0; i < ptns && p < X.Sz(); i++) { t = X.SC(p,0x500,'CP1251'); p += t.length + 1; if(t === ':END') break; xx = t.split('='); if(xx.length > 2) xx = [xx[0], xx.slice(1,xx.length).join('=')]; if(xx[0] === 'PatternName') p += 8+5*X.U32(p); } break; } } break; case 'SVGPATTERNDATA': while(p < X.Sz()) { t = X.SC(p,0x400,'CP1251'); p += t.length + 1; if(t === ':END') break; xx = t.split('='); if(xx.length > 2) xx = [xx[0], xx.slice(1,xx.length).join('=')]; switch(xx[0]) { case 'PatternCount': svgptn = +xx[1]; for(i = 0; i < svgptn && p < X.Sz(); i++) p += 4+16*X.U32(p); break; } } break; case 'SVGWARPDATA': while(p < X.Sz()) { t = X.SC(p,0x400,'CP1251'); p += t.length + 1; if(t === ':END') break; xx = t.split('='); if(xx.length > 2) xx = [xx[0], xx.slice(1,xx.length).join('=')]; switch(xx[0]) { case 'PatternCount': svgwarp = +xx[1]; for(i = 0; i < svgwarp && p < X.Sz(); i++) p += 4+2*X.U32(p); break; } } break; case 'P1INSTR': while(p < X.Sz()) { t = X.SC(p,0x400,'CP1251'); p += t.length + 1; if(t === ':END') break; xx = t.split('='); if(xx.length > 2) xx = [xx[0], xx.slice(1,xx.length).join('=')]; switch(xx[0]) { case 'Length': phains = +xx[1]; p += phains; break; } } break; case 'SVGORNAMENTS': while(p < X.Sz()) { t = X.SC(p,0x400,'CP1251'); p += t.length + 1; if(t === ':END') break; xx = t.split('='); if(xx.length > 2) xx = [xx[0], xx.slice(1,xx.length).join('=')]; switch(xx[0]) { case 'OrnamentCount': orn = +xx[1]; for(i = 0; i < orn && p < X.Sz(); i++) p += 4+X.U32(p); break; } } break; default: bad = bad.addIfNone('!badchunk') } //_log(' ...ends @'+Hex(p)); } if(!layouttag) bad = bad.addIfNone('!corrupt'); sVersion = 'engine:'+engine; if(bad != '') sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOptionT(title); sOptionT(auth,"by: "); sOption('ord:'+ord+(lp?' lp:'+lp:'')+' ptn:'+ptn+(svgptn?'+svg':'') +(svgwarp?' warp':'')+(orn?' orn':'')+(phains?' phasers':'')+' sz:'+outSz(p)) } } else if(X.c("000003F3") && X.U8(0x14) && X.c("70FF4E75'DAGLISH!'",0x20) && X.U32(0x2C,_BE) && X.U32(0x30,_BE) && X.U32(0x34,_BE) && X.U32(0x38,_BE)) { bDetected = 1; sName = "Ben Daglish's SID (.BDS)"; sVersion = "v1.1"; if(X.isVerbose()) { title = X.SA(0x20+X.U32(0x3C,_BE),0x100); auth = X.SA(0x20+X.U32(0x40,_BE),0x100); misc = X.SA(0x20+X.U32(0x44,_BE),0x100); sOptionT(title); x = X.U32(0x38,_BE); if(x > 1) sOption(x,"×"); sOptionT(auth,"by: "); sOptionT(misc); } } else if(/BMF1\.[012]/.test(X.SA(0,6)) && X.Sz() > 8 && X.fSig(6,42,"00") > 6) { //ref https://github.com/adplug/adplug/blob/master/src/bmf.cpp sName = "The Brain's Easy Adlib module (.BMF)"; sV = X.SA(5,1); sVersion = "v1."+sV; bDetected = 1; if(X.isVerbose() && sV > '0') { p = 6; bad = title = author = ""; f = X.fSig(p,-1,"00"); title = X.SA(p,f-p); p += title.length+1; //read title f = X.fSig(p,-1,"00"); if(f > 0) { author = X.SA(p,f-p); p += author.length+1; //read author spd = X.U8(p++); if(X.isDeepScan()) { fl = X.U32(p); p += 4; ins = 0; for(i = 0; i < 32; i++) { if(fl&1) { p += 24; if(p > X.Sz()) bad = bad.addIfNone('!short') } fl >>= 1; ins++ } fl = X.U32(p); p += 4; const last = 1023; trk = 0; trkend = false; for(i = 0; i < 32; i++) { if(fl&1) { trk++; trkend = false; for(q = 0; p < X.Sz() && !trkend && q <= last; q < last && q++) { t = X.U8(p++); switch(t) { case 0xFE: trkend = true; break; //end of reader case 0xFC: case 0x7D: break; //set marker, loop to marker default: evnote = t & 0x7F; if(!(t & 0x80)) break; t = X.U8(p); if(t & 0x80) { evdly = t & 0x3F; p++; if(!(t & 0x40)) break; } t = X.U8(p++); if(0x40 <= t) { evvol = t+1-0x40; } else if(0x20 <= t && t <= 0x3F) { evins = t+1-0x20; } else { if(sV == '2') if(1 <= t && t <= 6) p++ } } } } fl >>= 1 } if(!trkend) { bad = bad.addIfNone('!short'); p = -1 } }//if deepscan }//if author is null-terminated else bad = bad.addIfNone('!badtags'); if(bad != "") sVersion = sVersion.appendS('malformed'+bad,'/'); sOptionT(title); sOptionT(author,'by: '); sOption('spd:'+spd+(X.isDeepScan()?' trk:'+trk+' ins:'+ins+' sz:'+outSz(p):'')); } } else if(X.Sz() > 0x180 && X.c("'Buzz'") && isWithin(X.U32(4),1,0xC) && X.c("7C010000",0xC) && X.fSig(8,0x40,"'MACH'") > 0) { sName = "Oskari Tammelin's Jeskola Buzz module (.BMX)"; bDetected = 1; // Do NOT waste time trying to extract anything else... // You'll find the format dox lie and formats differ // For example, the no. of machines overlaps with some beta's version string // For example, that beta has no float x/y coordinates // And there is no signature difference. } else if(X.Sz() >= 0x6E5C && X.c("0100'ADLIB'9D02A0021C000000") && X.adler32(0,0x6E5C) == 0x1DF2E9B9) { sName = 'Instrument bank for Adlib Visual Composer (STANDARD.BNK)'; bDetected = 1; if(X.isVerbose()) sOption(outSz(0x6E5C),'sz:') } else if(X.c("'BRTF'") && ['NAME','INFO'].includes(X.SA(8,4))) { sName = "Benjamin 'BeRo' Rousseaux's BeRoTracker module (.BRT)"; bDetected = 1; if(X.isVerbose()) { p = 8; t = c = q = ''; instmsg = []; sainmsg = []; ins = smp = ptn = ord = 0; //TODO figure out how to get ptn bpm0 = spd0 = st0 = mvol = rowsperbeat = hltu = hltd = 0; end = false; while (!end && p < X.Sz()) { hkhd = X.SA(p,4); hksz = X.U32(p+4,_LE); p += 8; switch (hkhd) { case "NAME": t = X.UCSD(p); break; case "MESS": c = X.SC(p+2,X.U32(p,_LE),'CP1252'); break; case "BPMI": rpb = X.U8(p); break; case "INFO": spd0 = X.U8(p+4); bpm0 = X.U8(p+5); st0 = X.U8(p+6); mvol = X.U8(p+10); break; case "PORD": ord = X.U8(p); break; case "PATT": ptn++; break; case "PAIN": hltu = X.U8(p+1); hltd = X.U8(p+2); break; case "SAIN": smp++; q = X.UCSD(p+2); if(q.trim().length) sainmsg.push(q); break; case "INST": if(X.U8(p)) ins++; q = X.UCSD(p+1); if(q.trim().length) instmsg.push(q); break; case "DONE": end = true; break; } p += hksz; } sOption(t); sOption(c); sOption(instmsg.filter(funSampleName).join("\n"),"ins/msg:\n"); sOption(sainmsg.filter(funSampleName).join("\n"),"smp/msg:\n"); sOption('bpm0:'+bpm0+' spd0:'+spd0+' ord:'+ord+' ins:'+ins+' smp:'+smp+' hlt:'+hltu+'/'+hltd+ ' RPB:'+rpb+' st.sep0:'+st0+' mixvol:'+mvol+' sz:'+outSz(X.U32(4)+8)); } } else if(X.c("01000000") && isWithin(X.U8(4),1,0xF) && X.c("FFFFFFFF",0x34) && X.c("1027",0x15C) && X.c("1027",0x164) && X.c("1027", 0x16C)) { sName = "Christer Andersson's BoyScout module (.BSF)"; bDetected = 1 } else if(X.c("'FUCO'") && X.c("'DIGI'",0x4404) && X.c("'DIGP'",0x47F8)) { sName = "Anthony J. 'Slates' Bybell's BSI Future Composer module (.BSI)"; bDetected = 1; bad = ''; for(smp=smpsz=i=0; i < 63; i++) { if(t=X.U32(0x440C+i*16,_BE)) smp++; smpsz += t; if(t > 0x20000) bad = bad.addIfNone('!badsmpsz') } if(bad != '') sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOption('smp:'+smp+' sz:'+outSz(0x47FC+smpsz)) } } else if(X.c("'NuBEATHOVEN'",0x22)) { bDetected = 1; sName = "Thomas 'Dr.Nobody' Lopatic's Beathoven Synthesizer (.BSS)"; sVersion = "v"+X.SA(0x2D,3); if(X.isVerbose()) { title = X.SA(0x6C,0x100); auth = X.SA(0x6C+title.length+1,0x100); misc = X.SA(0x6C+title.length+auth.length+2,0x100); sOptionT(title); sOptionT(auth,"by: "); sOptionT(misc); } } else if(X.c("'CBA'F9") && X.U8(0x24) == 0x1A && 0x14C+X.U16(0x25)+X.U8(0x29)*0x30 <= X.Sz() && isWithin(X.U8(0x27),1,32) && X.U8(0x2B) && X.U8(0x2C) >= 32) { sName = "Chuck Biscuits & Zenic/Heretics' module (.CBA)"; bDetected = 1; if(X.isVerbose()) { msglen = X.U16(0x25); ch = X.U8(0x27); ptn = X.U8(0x28)+1; ord = X.U8(0x29); smp = X.U8(0x2A); spd0 = X.U8(0x2B); tmp0 = X.U8(0x2C); for(i=smpsz=0; i < smp; i++) smpsz += X.U32(0x14C+i*0x30+0x24); sz = 0x14C + smp*0x30 + ptn*64*5*ch + smpsz; msg = X.SC(sz,msglen,"CP437").trim(); sz += msglen; sOptionT(X.SA(4,0x20)); //some sample names have user messages but few, no good way to tell sOption(addEllipsis(msg,0xC0,0xA0),'msg:"','"'); sOption('spd:'+spd0+' tempo:'+tmp0+' ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } } else if(X.c("''1ADEE0") && (!X.U8(0x13) && X.c("'CUD-FM-File - SEND A POSTCARD -'",0x601) || X.U8(0x13) && X.c("'YsComp'07'CUD1997'1A04",0x20))) { //ref https://github.com/adplug/adplug/blob/master/src/cff.cpp sName = "Daniel Eshcbach/CUD's Boom Tracker 4 module (.CFF)"; sVersion = 'v'+X.U8(0x10); bDetected = 1; if(X.U8(0x13)) sVersion += '/LZW-packed'; if(X.isVerbose()) sOption(outSz(0x20+X.U16(0x11)),'sz:') } else if(X.c("'CHIPv1.0'")) { //ref http://alonecoder.nedopc.com/zx/CHIP14SRC.rar / chip sName = "Dmitry 'Alone Coder' Bystrov's Chip Tracker module (.CHI)"; bDetected = 1; sVersion = "v"+X.SA(5,1); bad = ''; if(X.Sz() <= 0x100) bad = bad.addIfNone('!badsz'); ptn = smp = 0; tempo = X.U8(0x28); ord = X.U8(0x29)+1; lp = X.U8(0x30); for(i=0; i < ord; i++) { p = X.U8(0x100+i)+1; if(p > ptn) ptn = p; if(p > 31) bad = bad.addIfNone('!badord') } sz = 0x200+0x200*ptn; for(i=0; i < 16; i++) if(ssz = X.U16(45+i*4)) { smp++; sz += ssz; if(sz&0xFF) sz += 0x100-(sz & 0xFF) } if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOptionT(decAnsi(8,0x20,CPSpeccy,false,Chars0to1FSpeccy)); sOption('tempo:'+tempo+' ord:'+(lp?lp+'-':'')+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } } else if(X.c("000003F3") && X.c("70FF4E75'S.PHIPPS'",0x20) && 0 < X.I32(0x40,_BE) < X.Sz() && 0 < X.I32(0x44,_BE) < X.Sz() ) { sName = "Simon Phipps/Core Design module (.CORE)"; bDetected = 1; if(X.isVerbose()) { title = X.SA(0x68,0x100); auth = X.SA(0x68+title.length+1,0x100); misc = X.SA(0x68+title.length+auth.length+2,0x100); sOptionT(title); sOptionT(auth,"by: "); sOptionT(misc); } } else if(X.c("'CAT '................'FORM'")) { sName = "Andreas Öman's Cybertracker module (.CT)"; bDetected = 1; } else if(X.c("0004'NNTRKMZX'")) { sName = "CyberBrain's Cybertracker C64 module (.CT)"; bDetected = 1; //ref https://noname.c64.org/download.php/ctmisc/ctfileformat-1_01.html sVersion = "v"+X.U8(0x0B)+"."+X.U8(0x0A); if(X.isVerbose()) { for(sng=0; sng < X.U16(0x4B9,_LE); sng++) if(X.U8(0x4BB+sng-1) == 0) break; if(sng) { sng0ord = X.U8(0x4BB); loop0 = X.U8(0x6BD); if(sng > 1) sOption("×"+sng+" ord0:"+sng0ord+" loop0:"+loop0); else sOption(" ord:"+sng0ord+" loop:"+loop0) } else sOption("empty"); } } else if(X.c("0004'NNTRKINS'")) { sName = "CyberBrain's Cybertracker C64 instrument (.CI)"; bDetected = 1; sVersion = "v"+X.U8(0x0B)+"."+X.U8(0x0A); if(X.isVerbose()) sOptionT(X.SA(0x1A,0x10)) } else if(X.c("000003F3") && (X.fStr(0x20,0x100,"NuDELIRIUM") > 0)) { sName = "DeliTracker player addon or Amiga Custom Module (.CUST)"; bDetected = 1; sVersion = "CustomPlay"; if(X.isVerbose()) sOptionT(X.SA(X.fStr(0,0x100,"NuDELIRIUM")+20,0x100)) } else if(X.c("'JCH'26026601") && X.c("'Creative Voice File'1A1A000A01291101......C300",0x40)) { sName = "Jens Christian 'JCH/Vibrants' Huus's Edlib Tracker samples (.S01)"; bDetected = 1 } else if(X.Sz() < 0xFFFF && (X.c("'JCH'26 026600") || X.c("'JCH'26 026680")) && (X.c("FFFF",X.U16(0x71,_LE)-2) || X.c("FFFF",X.U16(0x73,_LE)-2))) { //ref http://ftp.modland.com/pub/documents/format_documentation/Edlib%20Tracker%20(.edl,%20.d00,%20.d01).txt msgp = 0; i = 0; //bruteforce-find the message at the end of the file (version-dependent) while (i < 4) { t = X.U16(0x71+i,_LE); if(t != 0xFFFF && t > msgp) msgp = t; i += 2 } sz = X.fSig(msgp,TOEOF,"FFFF")+2; bDetected = 1; bad = 0; sName = "Jens Christian 'JCH/Vibrants' Huus's Edlib Tracker module (.D00,.D01)"; sVersion = "v"+X.U8(7); //if(X.U8(6) == 4) bad = 1; if(X.U8(0xA) > 1) bad = 1; if(bad) sVersion += "/malformed"+bad; if(X.isVerbose()) { x = X.U8(9); sOptionT(X.SC(0x0B,0x20,'CP850')); if(x > 1) sOption(x,"×"); sOptionT(X.SC(0x2B,0x20,'CP850'),"by: "); sOptionT(X.SC(msgp,sz-msgp-2,'CP850')); sOption(outSz(sz),"sz:") } } else if(X.c("'DBM0'........'NAME'0000002C") && X.U8(4) < 4 && X.c("'INFO'0000000A",0x3C) && X.c("'SONG'",0x4E) && X.U16(0x44,_BE) <= 255 && X.U16(0x46,_BE) <= 255 && X.U16(0x4A,_BE) <= 1024 && X.U16(0x4C,_BE) >=4 && X.U16(0x4C,_BE) <= 254 && !(X.U16(0x4C,_BE)%1)) { // ref http://www.digibooster.de/en/format.php // & https://www.amigafuture.de/app.php/dlext/details?df_id=5071 sName = "APC&TCP/Andeas Magerl's DigiBooster Pro module (.DBM)"; bDetected = 1; sVersion = "v"+X.U8(4)+"."+X.U8(5).padStart(2,'0'); p = 8; done = gotinfo = false; bad = ""; if(X.isVerbose()) ord = []; insts = []; titles = []; while(!done && p < X.Sz()) { hkhd = X.SA(p,4); hksz = X.U32(p+4,_BE); p += 8; switch(hkhd) { case "INFO": x = X.U16(p+4,_BE); ins = X.U16(p,_BE); info = "ch:"+X.U16(p+8,_BE)+" ptn:"+X.U16(p+6,_BE) +" ins:"+ins+" smp:"+X.U16(p+2,_BE); gotinfo = true; break; case "SONG": if(!gotinfo) { bad = bad.addIfNone("!badchunkorder"); break } if(!X.isVerbose()) break; q = 0; while(q+44 < hksz) { t = X.SC(p+q,44,'CP1250').trim(); titles.push(t); q += 44; ord.push(X.U16(p+q,_BE)); q += 2+ord[ord.length-1]*2 } break; case "INST": if(!gotinfo) { bad = bad.addIfNone("!badchunkorder"); break } for(i = 0; i < ins; i++) { t = X.SA(p+i*50,34).trim(); if(t != "") insts.push(t); c3freq = X.U32(p+i*50+34,_BE); if(c3freq < 2000 || c3freq > 192000) bad = bad.addIfNone("!badc3freq"); } break; case "SMPL": if(!gotinfo) bad = bad.addIfNone("!badchunkorder"); done = true } p += hksz; } if(!done || p > X.Sz()) bad = bad.addIfNone("!short"); if(bad != "") sVersion = sVersion.appendS("malformed"+bad,"/"); if(X.isVerbose()) { title = X.SA(0x10,0x2C).trim(); sOption(title); sOption(titles.join("; "),(!title && title.length == 1 ? "songs:" : "")); if(title == "" && !titles.length) sOptionT(X.SA(0xD8,28)); if(x > 1) sOption(x,"×"); sOptionT(addEllipsis(insts.join(" "),0x100,0xA0),'smp/msg: "','"'); info = "ord:"+ord.join("+")+" "+info; sOption(info+" sz:"+outSz(p)) } } else if(X.c("'DSNGSEQU'00")) { sName = "David Hanney's module (.DH)"; bDetected = 1 } else if(X.c("'DIGI Booster module'00") && X.Sz() >= 0x624 && X.U8(0x19) && X.U8(0x19) <= 8 && X.U8(0x2F) <= 0x7F) { sName = "APC&TCP/Andeas Magerl's DigiBooster module (.DIGI)"; bDetected = 1; nV = X.U8(0x18); sVersion = "v"+(nV>>4)+"."+(nV&0xF); co = X.U8(0x1A); if(sVersion != X.SA(0x14,4).toLowerCase()) sVersion += '/"'+X.SA(0x14,4)+'"'; if(co) sVersion = sVersion.appendS("co.ptn","/"); if(X.isVerbose()) { sOptionT(decAnsi(0x262,0x20,CPAmiga,true)); msg = []; ch = X.U8(0x19); ord = X.U8(0x2F)+1; ptn = X.U8(0x2E)+1; smp = ssz = 0; for(i=0; i < 31; i++) { slen = X.U32(0xB0+4*i,_BE); if(slen) { smp++; ssz += slen } } for(i=0; i < 31; i++) msg.push(decAnsi(0x282+0x1E*i,0x1E,CPAmiga,true).trim()); sz = 0x624; if(co) for(i=0; i < ptn && sz <= X.Sz(); i++) sz += 2+X.U16(sz,_BE); else sz += 0x100*ptn*ch; sz += ssz; if(sz > X.Sz() && !X.isVerbose()) sVersion = sVersion.appendS("malformed!short","/"); sOptionT(addEllipsis(msg.filter(funSampleName).join(" "),0x100,0xA0),'by/msg: "','"'); sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(sz)) } } else if(X.c("000003F3") && X.c("70FF'NuUNCLEART'",0x20) && X.U8(0x14) && X.U32(0x2C,_BE) && X.U32(0x30,_BE) && X.U32(0x38,_BE)) { sName = "Dave 'Uncle Tom' Lowe module (.DL)"; bDetected = 1; if(X.isVerbose()) { smpip = 0x20+X.U32(0x3C,_BE); smpiep = 0x20+X.U32(0x40,_BE); if(!smpiep) smp = 0; else smp = Math.floor((smpiep-smpip)/14); title = X.SA(0x20+X.U32(0x50,_BE),0x100); auth = X.SA(0x20+X.U32(0x54,_BE),0x100); cmt = X.SA(0x20+X.U32(0x58,_BE),0x100); loadsz = 0x20+X.U32(0x5C,_BE); sz = 0x20+X.U32(0x60,_BE); sza = Hex(X.Sz()-sz); //TODO value different, why? Where does it start? smpsz = 0x20+X.U32(0x64,_BE); songsz = 0x20+X.U32(0x68,_BE); sfx = 0x20+X.U32(0x6C,_BE); x = 1; d1 = 0x20+X.U32(0x4C,_BE); if(d1) { a1 = d1; while(1) { a1 += 16; d1 = X.U32(a1,_BE); //_log("read(0x20+a1:"+Hex(a1)+") = "+Hex(d1)); if(!d1) break; d1 -= X.U8(a1+3); if(!d1) break; else x++ } } sOptionT(title); if(x > 1) sOption(x,"×"); sOptionT(auth,"by: "); sOptionT(cmt); sOption("smp:"+smp+" sfx:"+sfx)//+" sz:"+outSz(sz)+" a:"+sza+" smpsz:"+smpsz+" songsz:"+songsz+" loadsz:"+loadsz); } } else if(X.c("'ALL '0000 .... 0000") && X.U8(6) <= 1 && X.U8(10) <= 1) { sName = "Bent 'SHOGUN' Nielsen's Delta Music module (.DM)"; sVersion = 'v1.3'; bDetected = 1 } else if(X.c("4A00670003B40C000001670001EC0C000002670A0C000003671270004E7541FA0B680201003F11",4) && X.c("0000'.FNL'",0xBC4)) { //the module data begins at 878h sName = "Bent 'SHOGUN' Nielsen's Delta Music 2 module (.DM2)"; sVersion = 'v2.0'; bDetected = 1 } else if(X.c("'DMF'0E")) { sName = "Webfoot Digital Sound and Music Interface Advanced Music Format hack (.DMF)"; sOption("delta samples & no text"); bDetected = 1 } else if(X.c("'DDMF'") && X.U8(4) && X.U8(4) <= 10 && X.U16(0x3F) && X.c("'CMSG'", 0x42)) { //ref https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_dmf.cpp sName = "D-Lusion X-Tracker module (.DMF)"; bDetected = 1; nV = X.U8(4); sVersion = "v"+nV; p = 0x42; hkhd = hksz = end = lpst = ch = ord = ptn = smp = sz = ptntotallen = allsmpsz = 0; lped = 0xFFFF; while(hkhd != "ENDE" && p < X.Sz()) { hkhd = X.SA(p,4); hksz = X.U32(p+4); p += 8; //_log("@"+Hex(p-4)+" "+hkhd+" ["+Hex(p)+" -> "+Hex(p+hksz)+"]"); switch(hkhd) { case "SEQU": ord = 0; if(nV == 3) p += 2; else if(nV == 4) p += 4; u = p; if(nV >= 3) { lpst = X.U16(u); u += 2 } if(nV >= 4) { lpst = X.U16(u); u += 2 } if(nV === 4 & !lped) lped = 0xFFFF; ord = (p+hksz-u)>>1; break; case "PATT": var ptnhdsz = nV < 3 ? 9 : 8; u = p; ptn = X.U16(u); trk = X.U8(u+2); u += 3; ch = trk; if(ch < 1) ch = 1; if(ch > 32) ch = 32; for(i = 0; i < ptn; i++) { u += ptnhdsz-4; var ptnlen = X.U32(u); ptntotallen += ptnlen; u += ptnlen; } break; case "SMPI": u = p; smp = X.U8(u++); for(i = 0; i < smp; i++) { var snamelen = nV < 2 ? 30 : X.U8(u++); var sname = X.SC(u,snamelen,'CP437').trim(); u += snamelen; var ssz = X.U32(u); allsmpsz += ssz; //_log("slen @"+Hex(u)+" = "+Hex(slen)); u += 4+4+4+2; var svol = X.U8(u++), sf = X.U8(u++); //_log("smp["+i+"] "+sname+" length:"+Hex(slen)+" total:"+Hex(smptotallen)+(svol?"":" ignored")); if(nV >= 8) { var libname = X.SC(u,8,'CP437'); u += 8 } u += nV > 1 ? 6 : 2; } break; case "SMPD": if(!X.c("'ENDE'",p+hksz)) { // Simply search for it. It's unique enough. // The multiplier of 3 is chosen for stereo + white noise "compression" t = X.fSig(p,Math.min(X.Sz()-p, allsmpsz*3),"'ENDE'"); if(t < 0) { sVersion += "/malformed!noeof"; hkhd = "ENDE"; break } else { hksz = t-p; //_log("SMPD length should be "+Hex(hksz)); } } break; case "ENDE": p -= 4+hksz; break; } sz = p; p += hksz; } if(hkhd != "ENDE") sVersion += "/malformed!short"; else sz = p; if(X.isVerbose()) { sOptionT(X.SC(0xD,30,'CP437')); sOptionT(X.SC(0x2B,20,'CP437'),"by: "); yy = X.U8(0x41); if(yy < 80) yyyy = "20"; else yyyy = "19"; yyyy += yy.padStart(2,'0'); sOptionT(yyyy+"-"+X.U8(0x40).padStart(2,'0')+ "-"+X.U8(0x3F).padStart(2,'0'),"on: "); sOptionT(X.SA(5,8),"in: "); cmt = ""; cnt = X.U32(0x46)-1; var linelen = 40, readpos = 0x4B; while(cnt) { var readlen = Math.min(cnt,linelen,0x200); var curline = X.SC(readpos,readlen,'CP437'); if(curline != "") cmt = cmt.appendS(curline,'\n'); cnt -= readlen; readpos += readlen; } sOption(addEllipsis(cmt,0x100,0x80)); sOption("ch:"+ch+"+1 ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(sz)) } } else if(X.c("'.DelekDefleMask.'")) { //ref https://web.archive.org/web/20150226185703if_/http://www.delek.com.ar:80/soft/deflemask/DMF_SPECS.txt // It's a pretty damn old document though... sName = "Leonardo Demartino's DeFleMask module (.DMF)"; bDetected = 1; sVersion = "v"+X.U8(0x10); if(X.isVerbose()) { switch(X.U8(0x11)) { //TODO add more new chip versions case 0x01: sVersion += "#YMU759"; ch = 17; break; case 0x02: sVersion += "#Genesis (10ch)"; ch = 10; break; case 0x03: sVersion += "#SMS (4ch)"; ch = 4; break; case 0x04: sVersion += "#GameBoy (4ch)"; ch = 4; break; case 0x05: sVersion += "#PCEngine (6ch)"; ch = 6; break; case 0x06: sVersion += "#NES (5ch)"; ch = 5; break; case 0x07: case 0x47: sVersion += "#C64 (3ch)"; ch = 3; break; case 0x08: sVersion += "#YM2151 (13ch)"; ch = 13; break; default: ch = 4 //just 'cause } sOption(X.UCSD(0x12)); l = X.U8(0x12); p = 0x12+l+1; sOption(X.UCSD(p),"by: "); l = X.U8(p); p += l+1+2; tbase = X.U8(p++); tick1 = X.U8(p++); tick2 = X.U8(p++); Hz = X.U8(p++)?"60(NTSC)":"50(PAL)"; if(X.U8(p++)) Hz = X.U8(p++)+":"+X.U8(p++)+":"+X.U8(p++); else p+=3; //These have changed over the years it seems, TODO: RE it //p++; _ripm = X.U8(p++); //arptick = X.U8(p++); p += ch*_ripm; //ins = X.U8(p++); sOption("tbase:"+tbase+" tck:"+tick1+":"+tick2+" freq:"+Hz); //+" ins:"+ins+" arp.tick:"); } } else if(X.c("' M'........'IAN'") && X.c("0000....0000....0000....0000",0x1C) && (smp=X.U32(0x44,_BE)) <= 255 && ( !((smpsz=X.U32(0x48,_BE)) && !smp) || (smp && smpsz) ) && isWithin(ins=X.U32(0x3C,_BE),1,255)) { sName = "Reinier 'Rhino' van Vliet's Digital Mugician module (.DMU,.MUG)"; if((sv=X.SA(9,1)) == '/') sVersion = 'v1'; else if(sv == '2') sVersion = 'v2'; bDetected = 1; if(X.isVerbose()) { x = ord = 0; ptn = X.U16(0x1A,_BE); wf = X.U32(0x40,_BE); for (i=0x4C, p = 0x1C, a2 = 0xCC; i < 0xCC; i += 0x10, p += 4) { if(!X.U32(i,_BE)) break; if(X.U32(p,_BE) != 1 || X.U32(a2,_BE) || X.U32(a2+4,_BE)) x++; a2 += X.U32(p,_BE) << 3; t = X.SA(i+4,12); while(t[t.length-1] < ' ') t = t.slice(0,t.length-1); sOptionT(t) } for(i=0x1C; i < 0x3C; i += 4) ord += X.U32(i,_BE); sz = smp*0x20+ins*0x10+smpsz+0x1CC+ptn*0x100+wf*0x80+ord*8; if(x > 1) sOption(x,'×'); sOption('ord:'+ord+' ptn:'+ptn+' ins:'+ins+' smp/syn:'+smp+'+'+wf+' sz:'+outSz(sz)) } } else if(X.c("'DSM'10") && X.c("1A",0x24) && X.U16(0xB2)-X.U16(0xB0) == 4 && X.c("'DSI'10",X.U16(0xB0) << 4) && X.c("'DSI'10",X.U16(0xB0+X.U8(0x27)*2-2) << 4)) { //see also https://modland.com/pub/documents/format_documentation/Digital%20Audio%20Sound%20Interface%20Kit%20spec%20(.dsm)-v0.1.txt sName = "Carlos Hasan's Digital Audio Sound Interface Kit module (.DSM)"; bDetected = 1; if(X.isVerbose()) { for(i=0xAF; i >= 0x30 && X.U8(i) == 0xFF; i--) {} rord = i-0x2F; for(mptn = 0; i >= 0x30; i--) if((t=X.U8(i)+1) > mptn) mptn = t; ord = X.U8(0x26); ptn = X.U8(0x28); p = X.U16(0xB0)<<4; inss = []; mp = 0; for(i=ins=0; i < X.U8(0x27); i++,p+=0x40) { if(!X.c("'DSI'10",p)) bad = bad.addIfNone('!badins'); inss.push(X.SC(p+4,0x20,'CP437').trim()); var sp = X.U16(p+0x24)<<4; if(sp) ins++; if(sp > mp) mp = sp+X.U16(p+0x26) } p = 0xB0+X.U8(0x27)*2+ptn*2-2; p = X.U16(p) << 4; p += 2+X.U16(X.U16(p)); //past the last pattern sz = Math.max(mp,p); sOptionT(X.SC(4,0x20,'CP437')); sOption(addEllipsis(inss.filter(funSampleName).join(' '),0xA0),'ins/msg:"','"'); sOption('ord:'+(rord==ord?'':rord+'/')+ord+' ptn:'+(mptn==ptn?'':mptn+'/')+ptn +' ins:'+ins+' sz:'+outSz(sz)) } } else if(X.c("'RIFF'........'DSMFSONG'") && X.U16(0x36) <= 128 && X.U16(0x38) <= 128 && X.U16(0x3C) <= 256 && X.U16(0x3E) <= 16) { sName = "Carlos Hasan's Digital Sound Interface Kit module (.DSM)"; bDetected = 1; sVersion = "RIFF"; if(X.isVerbose()) { sOptionT(X.SC(0x14,28,'CP437')); sz = X.U32(4)+8; p = 0xC; smp = 0; while(p < sz) { hkhd = X.SA(p,4); hksz = X.U32(p+4); p += 8; if(hkhd == "INST") smp++ p += hksz; } if(p > X.Sz()) sVersion += "/malformed!badchunk";//+hkhd+" @"+Hex(p-hksz-8)+"="+Hex(hksz); sOption("ch:"+Math.max(1,X.U16(0x3E))+" spd0:"+X.U8(0x42)+" bpm0:"+X.U8(0x43) +" ord:"+X.U16(0x38)+"("+X.U16(0x34)+"-"+X.U16(0x36) +") ptn:"+X.U16(0x3C)+" smp:"+X.U16(0x3A)+"/"+smp +" sz:"+outSz(sz)) } } else if(X.c("'DSm'1A20")) { sName = "The Loom Syndicate's Dynamic Studio module (.DSM)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(5,20)); sOptionT(X.SA(25,20),"by: "); } } else if(X.c("'DSFmt1'0D0A")) { sName = "Audio Simulation's DreamStation module (.DSS)"; bDetected = 1; sVersion = "v1.0"; if(X.isVerbose()) { pt = X.fSig(0,TOEOF,"F0E40001")+4; //the 00/01 at the end is "show info at track load" if(pt < 4) pt = X.fSig(0,TOEOF,"F0E40000")+4; if(pt >= 4) { pa = X.fSig(pt,TOEOF,"0D0A"); t = X.SA(pt,pa-pt); pa += 2; pc = X.fSig(pa,TOEOF,"0D0A"); a = X.SA(pa,pc-pa); pc += 2; c = X.SA(pc,X.Sz()-pc); sOption(t); sOption(a,"by: "); sOption(c) } } } else if(X.c("'DS2F0'....'Default'")) { sName = "Audio Simulation's DreamStation II module (.DS2)"; bDetected = 1; sVersion = "v2"; if(X.isVerbose()) { ts=X.U8(0x62); t=X.SA(0x63,ts); pa=0x62+ts+1; as=X.U8(pa); a=X.SA(pa+1,as); pc=pa+as+1; cs=X.U8(pc); c=X.SA(pc+1,cs); sOption(t); sOption(a,"by: "); sOption(c); } } else if(X.c("'MMU2'00")) { sName = "Great Valley Products' Digital Sound Studio module (.DSS)"; bDetected = 1; sVersion = "v1-3.0"; if(X.isVerbose()) { sOptionT(X.SA(10,32)); sOption("ord:"+X.I16(0x59C,_BE)); } } else if(X.c("'DTL'00") && X.c("0000001000", 0x16)) { sName = "Larry Tipton's Drum Traker module (.DTL)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(4,20)); //sOption('sz:'+outSz(0xD0+(1+X.U16(0x1B))*0xE0)) } } else if(X.c("'D.T.'00")) { sv = ["S.Q.","VERS"].indexOf(X.SA(0x2A,4)); if(sv >= 0) { sName = "Softjee's Digital Tracker module (.DTM)"; bDetected = 1; if(X.isVerbose()) { if(sv==0) sOptionT(X.SA(0x16,20)) //let's play along with Bummtschak here else sOptionT(X.SA(0x16,24)) } } } else if(X.c("'DeFy DTM'")) { sName = "DeFy AdLib Tracker module (.DTM)"; bDetected = 1; sVersion = "v"+X.SA(9,3); if(X.isVerbose()) { sOptionT(X.SA(0xD,20)); sOptionT(X.SA(0x21,20),'by: '); } } else if(X.c("'SONG'........'NAME'")) { //ref http://hackipedia.org/browse.cgi/File%20formats/Music%20tracker/Digitrakker/DigiTrekker%20Module%20Format%20by%20Horst%20Beham%20Jr.%20v1.0.txt sName = "Horst Beham Jr.'s DigiTrekker module (.DTM)"; bDetected = 1; if(X.isVerbose()) sOptionT(X.SA(0x10,20)); } else if(X.c("48E7F1FE610000964CDF7F8F'NuH'E70010610000'$L'DF0800'NuH'E7F1FE610001844CDF7F8F'NuH'E70010610000'NL'DF0800'NuG'FAFFC651EB05',Q'EB05'PQ'EB05'tQ'EB059833FC000F00DFF09633FC00FF00DFF09E33FC000000DFF0A833FC000000DFF0B833FC000000DFF0C833FC000000DFF0D8'NuG'FAFF80177C00010524177C00010548177C0001056C177C00010590'NuG'FAFF'bJ+'00BA670E'S+'00B96608177C000600B9'Nu`'0003180006")) { sName = "David Whittaker's SFX module (.DW)"; bDetected = 1 } else if(X.c("' PWD'03") && X.c("'Master'",0x0E)) { sName = "Daniel Werner/ExperimentalScene's DarkWave Studio module (.DWP)"; bDetected = 1 } else if(X.c("'EASO'")) { sName = "Morten Grouleff's EarAche module (.EA,.EAS)"; bDetected = 1; } else if(X.c("'FORM'.... ....'EMODEMIC'") && X.c("'PATT'",pt=0x14+X.U32(0x10,_BE)) && X.c("'8SMP'",q=pt+8+X.U32(pt+4,_BE))) { //ref https://github.com/libxmp/libxmp/blob/master/src/loaders/emod_load.c sName = "Bo Lincoln's Quadra Composer module (.EMOD)"; bDetected = 1; sVersion = 'v'+X.U16(0x14,_BE); smp = X.U8(0x3F); if(smp) smps = []; sz = X.U32(4,_BE)+8; for(i=ssz=0,p=0x40; i < smp; i++,p+=0x22) { if((t=X.SC(p+4,0x14,'CP1252').trim()) != '') smps.push(t); ssz += X.U16(p+2,_BE) << 1; } bad = ''; if(ssz != X.U32(q+4,_BE)) bad = bad.addIfNone('!badsmplen:'+X.U32(q+4,_BE)+' vs '+ssz) ptn = X.U8(++p); p++; p += 0x1A*ptn; // for (i=0; i < ptn; i++,p+=0x1A) if((t=X.SC(p+2,0x14,'CP1252').trim()) != '') smps.push(t); if(X.c("'MDIN'",q1=q+8+X.U32(q+4,_BE))) q = q1; if(Math.abs(sz-(sz1=q+8+X.U32(q+4,_BE))) > 1) bad = bad.addIfNone('!badlen:'+sz+' vs '+sz1); if(sz < sz1) sz = sz1; ord = X.U8(p++); if(bad != '') sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOptionT((t=X.SA(0x16,0x14)) === ''? '': t); if(smp) sOptionT(addEllipsis(smps.join(' '),0xC0,0xA0),'smp/msg: "','"'); delete smps; sOption('bpm:'+X.U8(0x3E)+' ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } } else if(X.c("'E.M.S. V6.0'..00010000") && isWithin(X.U8(0xB),0x31,0x36)) { sName = "Sean 'Odie' Connolly's Electronic Music System module (.EMS)"; bDetected = 1; sVersion = "v6."+X.SA(10,2); if(X.isVerbose()) { //ref ems_player_dis.asm a1 = X.U32(0xE,_BE); a2 = X.U32(0x12,_BE); a3 = X.U32(0x16,_BE); p = lb0 = 0x22; p += a1; lb4 = p; p += a2; lb8 = p; p += a3; insp = p; sz = p+X.U32(0x1E,_BE); //_log(Hex(lb0)+'; [4]:'+Hex(lb4)+'; [8]:'+Hex(lb8)+'; insp:'+Hex(insp)) // p = a2 = lb4; lbdata = a5 = 0x13740; // ssp = ( 0 & 0x1F)*0x84; ss1 = X.U16(p+ssp,_BE); ss2 = X.U16(p+ssp+2,_BE); //_log('subsong @'+Hex(p+ssp)+' has '+Hex(ss1)+' and '+Hex(ss2)) // In the player, the following bit was copying the modified offsets (of something) to the data buffer: // p += ssp+4; p1 = p; // for(d1 = 0, ptrs=[]; d1 < 0x20; d1++) { t = X.U32(p,_BE)+p1; p += 4; ptrs.push(t) } sOption('sz:'+outSz(sz)) } } else if(X.c("'ENF '....'scor'")) { sName = "Musitek SmartScore Extended Notation Format sheet music (.ENF)"; bDetected = 1; p = 6; staf = brln = 0; hkhd = "dumm"; while(p < X.Sz()) { hkhd = X.SA(p,4); if(!/[a-z\[\]\-0-9]{4}/.test(hkhd)) break; hksz = X.U16(p+4,_BE); if(hkhd === "staf") staf++; else if(hkhd === "brln") brln++; p += hksz //this format includes signatures into the chunk size } sOption("staves:"+staf+" bars:"+brln+" sz:"+outSz(p)) } else if(X.Sz() > 0x24 && X.c("'ETracker (C) BY ESI.'",10) || (X.Sz() > 0x4D4 && (X.c("21B384") ||X.c("21B304")) && X.c("'ETracker (C) BY ESI.'",0x4BD))) { //kudos to horsicq for helping narrow down the bad samples in modland files sName = " Maciej J. Wołoszyk & Andrzej Siuda's E-Tracker file (.ETC,.SAA)"; bDetected = 1; if(X.c("21B384") || X.c("21B304")) { sVersion = "&player"; ofs = 0x4B3 } else ofs = 0; p = ofs; x = mp = sz = 0; ords = []; ptns = []; while(p < X.Sz()-0x24 && X.c("'ETracker (C) BY ESI.'",p+10)) { x++; //TODO not too good for a ripper but there're multitrack files like this, iono ordp = p+X.U16(p); if(ordp > mp) mp = ordp; ptnp = p+X.U16(p+2); if(ptnp > mp) mp = ptnp; smpp = p+X.U16(p+4); if(smpp > mp) mp = smpp; ornp = p+X.U16(p+6); if(ornp > mp) mp = ornp; svd = ofs+X.U16(p+6); if(svd > mp) mp = svd; if(sz < mp) sz = mp; if(x == 1 && sz > X.Sz()) return false; //_log('Track at '+Hex(p)+': ordp:'+Hex(ordp)+' ptnp:'+Hex(ptnp)+' smpp:'+Hex(smpp)+' ornp:'+Hex(ornp)+' svd:'+Hex(svd)) ord = lp = xpos = ptn = 0; var ordl = []; for(p = ordp; p < X.Sz(); p++) { o = X.U8(p); if(o == 0xFF) { p++; break } else if(o == 0xFE) lp = ord; else if(o >= 0x60) xpos = o-0x60; else { if(x == 1 && o%3) { _log('SAAFault @'+Hex(p)+': trk '+x+' pos not divisible by 3'); return false } o = Util.div64(o,3); if(x == 1 && o > 0x1F) { _log('SAAFault: trk '+x+' pos over 1Fh'); return false } if(o > ptn) ptn = o; ord++ } if(ord > 254) { _log('SAAFault: trk '+x+' pos not divisible by 3'); return false } } if(!ord) return false; ords.push(++ord); ptns.push(++ptn); if(sz < p) sz = p; p = ptnp+12*ptn; //a pattern record contains uint16_t pattern offsets for 6 channels for(i=ptnp; i < p; i += 2) { //find if the a pattern isn't after its record (doesn't seem to ever happen) if((t=X.U16(i)) > mp-ofs) mp = ofs+t; if(t < 0x1E) return false; } if(x == 1 && mp > X.Sz()) return false; notes = -1; if(t > p) { // the hard way p = t+64; //parse the last pattern p = ptnp; notes = 0; chncnt = [64,64,64,64,64,64]; for(l=0; l < 64; l++) { //lines for(c=0; c < 6; c++) { //channels if(chncnt[c]) { chncnt[c]--; continue } while(p < X.Sz()) { //ParseChannel cmd = X.U8(p++); if(cmd >= 0xD2) { chncnt[c] -= cmd-0xD2; break } else if(cmd >= 0x72) notes++; //set note cmd-0x72 else if(cmd >= 0x52) {} //set sample cmd-0x52 else if(cmd >= 0x51) break; //isn't this just if cmd == 0x51? //else if(cmd >= 0x50) {} //set ornament cmd-0x30 //else if(cmd >= 0x2E) {} //set swap sample channels with "cmd > 0x2E" //else if(cmd >= 0x21) {} //set envelope cmd-0x21 //else if(cmd >= 0x11) {} //set attenuation cmd-0x11 //else if(cmd >= 0x0F) {} //set noise to "cmd != 0xF? 3: cmd-0xF" (so either 3 or 0!) //else {} //set tempo cmd+1 } } } } if(sz < p) sz = p; if(ornp == mp) if(sz < mp) sz = mp //never happens so no further parsing if(smpp == mp) if(sz < mp) sz = mp; //ditto if(svd == mp) if(sz < mp) sz = mp //ditto } if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption('ord:'+ords.join('+')+(lp?' looped':'')+' ptn:'+ptns.join('+')+(xpos?' xpos:'+xpos:'') +(notes>-1?' notes:'+notes:'')+' sz:'+outSz(sz)) } } else if((X.Sz() > 2048+6+6) && X.c("00000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", 0x3E1) && X.c("......00 ......00 ......00 ......00 ......00 ......00 ......00",0x4D4) ) { sName = "EUPHONY module (.EUP)"; bDetected = 1; if(X.isVerbose()) { sOption(X.SC(0,0x20,'CP932')) } } else if(X.c("'EuGH'") && X.c("'EuSH'",t=8+X.U32(4,_BE)) && X.c("'MThd'",t=t+8+X.U32(t+4,_BE)) && X.c("'MTrk'",p=t+8+X.U32(t+4,_BE))) { sName = "Fujitsu EUPHONY II/MTR module (.EUX)"; bDetected = 1; //from here on it's just a MIDI file trk = X.U16(t+0xA,_BE); //seems it's always 100 in this format sz = p; txt = by = title = lyr = ""; for(i=0; i < trk; i++) { var readmore = 20; if(!X.c("'MTrk'",p) || (i && !X.c("FF2F00",p-3))) { bad += "!badtrk"+i; break } len = X.U32(p+4,_BE); p += 8; sz = p; while(readmore && p < sz+len && p < X.Sz()) { readmore--; dt = readVarUInt(p); p += dt[0]; switch(X.U8(p++)) { case 0xF0: case 0xF7: t = readVarUInt(p); p += t[0]+t[1]; break; case 0xFF: a = X.U8(p++); switch(a) { case 0: if(X.U8(p++) != 2) readmore = 0; else p += 4; break; case 3: t = readVarUInt(p); p += t[0]; title = title.append(X.SC(p,t[1],'SJIS')); p += t[1]; break; case 2: t = readVarUInt(p); p += t[0]; by = by.append(X.SC(p,t[1],'SJIS')); p += t[1]; break; case 1: t = readVarUInt(p); p += t[0]; txt = txt.append(X.SC(p,t[1],'SJIS')); p += t[1]; break; case 5: t = readVarUInt(p); p += t[0]; lyr = lyr.append(X.SC(p,t[1],'SJIS'),"-"); p += t[1]; break; case 4: case 6: case 7: t = readVarUInt(p); p += t[0]+t[1]; break; case 0x20: t = readVarUInt(p); p += t[0]+t[1]; if(t[1] != 1) { readmore = 0; bad += "!badprefix@"+(p-t[0]-t[1]) } break case 0x2F: t = readVarUInt(p); p += t[0]+t[1]; if(t[1]) bad += "!badEoTtag@"+(p-t[0]-t[1]); readmore = 0; break; case 0x51: t = readVarUInt(p); p += t[0]+t[1]; if(t[1] != 3) { readmore = 0; bad += "!badtempo@"+(p-t[0]-t[1]) } break; case 0x54: t = readVarUInt(p); p += t[0]+t[1]; if(t[1] != 5) { readmore = 0; bad += "!badSMPTE@"+(p-t[0]-t[1]) } break; case 0x58: t = readVarUInt(p); p += t[0]+t[1]; if(t[1] < 2 || t[1] > 4) { readmore = 0; bad += "!badtime@"+(p-t[0]-t[1]) } break; case 0x59: t = readVarUInt(p); p += t[0]+t[1]; if(t[1] != 2) { readmore = 0; bad += "!badkey@"+(p-t[0]-t[1]) } break; default: t = readVarUInt(p); p += t[0]+t[1] } break; default: } if((txt != "" && by != "" && title != "") || p-sz > 0x200) readmore = 0; } sz += len; p = sz; if(p > X.Sz() && !X.isVerbose()) { bad += "!short"; break } } //for..trk if(bad) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOptionT(title); sOptionT(by,"by: "); sOptionT(txt); sOption((trk>1?'trk:'+trk+' ':'')+'sz:'+outSz(sz)) } } else if(X.c("'FAR'FE") && X.c("0D0A1A",0x2C) && X.Sz() > X.U16(0x2F)) { //ref https://web.archive.org/web/20151027135146/http://hackipedia.org/File%20formats/Music/Sample%20based/text/Format%20Specifications%20(FAR,%20FSM,%20USM,%20F2R)%20by%20Daniel%20Potter.cp437.txt.utf-8.txt bDetected = 1; nV = X.U8(0x31); sName = "Daniel Potter/Digital Infinity's Farandole Composer module (.FAR)"; sVersion = "v"+ (nV>>4) +"."+ (nV&0x0F); ch = X.readBytes(0x32,16).filter(function(x){return x==1}).length; if(X.isVerbose()) { sOptionT(X.SC(4,0x28,'CP437')); msgsz = X.U16(0x60); msg = []; for(i=0,p=0x62; i < msgsz && p < X.Sz(); i+=132,p+=Math.max(0,Math.min(132,msgsz-i))) msg.push(X.SC(p,Math.max(0,Math.min(132,msgsz-i)),'CP437').trim()); sOptionT(addEllipsis(msg.join(' '),0x100),'msg:"','"'); p = 0x62+msgsz+0x100; ptn = X.U8(p++); ord = X.U8(p++); lp = X.U8(p++); for(i=psz=0; i < 0x100; i++,p += 2) psz += X.U16(p); p = X.U16(0x2F)+psz; smp = 0; smpm = X.readBytes(p,8); smps = []; p += 8; for(i=0; i < 64; i++) if(smpm[i >> 3] & (1 << (i & 7))) smp++; for(i=0; i < smp; i++) { smps.push(X.SC(p,0x20,'CP437')); p += 0x30+X.U32(p+0x20) } sOptionT(addEllipsis(smps.filter(funSampleName).join(' '),0x100),'smp/msg:"','"'); sOption('ch:'+ch+' ord:'+(lp?lp+'~':'')+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(p)) } } else if(X.c("'FPT'FE") && X.c("0D0A1A",0x24)) { //ref https://web.archive.org/web/20151027135146/http://hackipedia.org/File%20formats/Music/Sample%20based/text/Format%20Specifications%20(FAR,%20FSM,%20USM,%20F2R)%20by%20Daniel%20Potter.cp437.txt.utf-8.txt sName = "Daniel Potter/Digital Infinity's Farandole Composer pattern (.FPT)"; bDetected = 1; if(X.isVerbose()) sOptionT(X.SC(4,0x20,'CP850')); } else if(X.c("'FSM'FE") && X.c("0A0D1A",0x24)) { //ref https://web.archive.org/web/20151027135146/http://hackipedia.org/File%20formats/Music/Sample%20based/text/Format%20Specifications%20(FAR,%20FSM,%20USM,%20F2R)%20by%20Daniel%20Potter.cp437.txt.utf-8.txt sName = "Daniel Potter/Digital Infinity's Farandole Composer sample (.FSM)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SC(4,0x20,'CP850')); if(X.U8(0x35)) type = "16bit"; else type = "8bit"; if(X.U8(0x36)&4) looped = " looped"; else looped = ""; sVersion = type+looped; sOption(outSz(X.U32(0x27)),'sz:'); } } else if(X.c("'SMOD'") && X.Sz() > 0x70 && isWithin(X.U32(8,_BE),0x70,X.Sz()) && isWithin(X.U32(0x10,_BE),0x70,X.Sz()) && isWithin(X.U32(0x18,_BE),0x70,X.Sz()) && isWithin(X.U32(0x20,_BE),0x70,X.Sz())) { //ref https://github.com/tonioni/WinUAE/blob/master/prowizard/rippers/FutureComposer13.c // & https://github.com/neumatho/NostalgicPlayer/blob/main/Source/Agents/ModuleConverters/ModuleConverter/Formats/FutureComposer13Format.cs sName = "Superions' Future Composer module (.FC,.FC13,.SMOD)"; sVersion = "v1.0~3"; bDetected = 1; if(X.isVerbose()) { ordsz = X.U32(4,_BE); ordsz += ordsz%2; ord = Util.divu64(ordsz,13); if(!ord) ord = 1; ptnp = X.U32(8,_BE); ptnsz = X.U32(0xC,_BE); ptn = ptnsz >> 6; smpp = X.U32(0x20,_BE); smpsz = X.U32(0x24,_BE); smp = wf = 0; sszs = []; for(p=0x28,i=0; i < 10; i++,p+=6) { if(t=X.U16(p,_BE)<<1) smp++; sszs.push(t) } for(i=10; i < 90; i++) sszs.push(X.U8(p++)<<1); for(i=89; i >= 10; i--) if(sszs[i]) break; wf = i-9; delete sszs; sOption('ord:'+ord+' ptn:'+ptn+' smp:'+smp+' wf:'+wf+' sz:'+outSz(smpp+smpsz)) } } else if(X.c("'FC14'") && X.Sz() > 0xC0 && isWithin(X.U32(8,_BE),0xC0,X.Sz()) && isWithin(X.U32(0x10,_BE),0xC0,X.Sz()) && isWithin(X.U32(0x20,_BE),0xC0,X.Sz()) && isWithin(X.U32(0x24,_BE),0xC0,X.Sz())) { //ref https://github.com/tonioni/WinUAE/blob/master/prowizard/rippers/FutureComposer14.c // & https://github.com/neumatho/NostalgicPlayer/blob/main/Source/Agents/Players/FutureComposer/FutureComposerWorker.cs sName = "Superions' Future Composer module (.FC,.FC14)"; sVersion = "v1.4"; bDetected = 1; if(X.isVerbose()) { ordsz = X.U32(4,_BE); ord = Util.divu64(ordsz,13); if(!ord) ord = 1; ptnp = X.U32(8,_BE); ptnsz = X.U32(0xC,_BE); ptn = ptnsz >> 6; smpp = X.U32(0x20,_BE); wfp = X.U32(0x24,_BE); smp = 10; rsmp = msmp = wf = 0; sszs = []; for(p=0x28,i=0; i < 10; i++,p+=6) sszs.push(X.U16(p,_BE)<<1); for(sz=0,i=10; i < 90; i++) { sz += t=X.U8(p++)<<1; sszs.push(t) } for(i=89; i >= 10; i--) if(sszs[i]) break; wf = i-9; sz += X.U32(0x24,_BE); for(p=smpp,i=0; i < 10; i++) { rsmp++; if(sszs[i]) { if(X.c("'SSMP'")) { mszs = []; p += 4; msmp++; smp--; rsmp--; for(j=0; j < 20; j++, p+=20) mszs.push(X.U16(p+4,_BE)<<1); for(j=0; j < 20; j++) if(mszs[j]) rsmp++; smp++ } } } delete sszs; delete mszs; sOption('ord:'+ord+' ptn:'+ptn+' smp:'+rsmp+(smp!=rsmp?'('+smp+')':'') +(msmp?' ssmp:'+msmp:'')+' wf:'+wf+' sz:'+outSz(sz)) } } else if(X.c("'FMK!'") && X.U8(0x3C) == 0xF4 && isWithin(X.U8(0x3D),1,2)) { sName = "Sami Wilenius's FM-Kingtracker module (.FMK)"; sVersion = [,'v1.00~03','v1.06+'][X.U8(0x3D)]; bDetected = 1; if(X.isVerbose()) { text = true; for(i=0; i < 0x38; i++) if(0x20 > X.U8(i+4)) { text = false; break } if(text) { sOptionT(X.SA(0x04,0x1C)); sOptionT(X.SA(0x20,0x1C),"by: "); } sOption('ord:'+X.U8(0x4A)+' ptn:'+X.U8(0x4C)+' ins:'+X.U8(0x4B)) } } else if(X.c("'FMTracker'....'The FM Tracker!'")) { sName = "Davey W. Taylor's FM Tracker module (.FMT)"; bDetected = 1; sVersion = "v"+X.U8(9)+"."+X.U8(10); if(X.isVerbose()) sOptionT(X.SA(0x1F,0x20)); } else if(X.c("'JSR_FMT~")) { //ref https://github.com/XorJS/FM-Tracker & https://jsr-productions.com/_blogpost3319ddc.html // & https://github.com/XorJS/FM-Tracker/blob/main/FM.ASM sName = "Jean-Sebastien 'XorJS' Royer's FM-Tracker module (.FMT)"; bDetected = 1 } else if(X.c("'FMTRK'1A")) { sName = "Morten Stenshorne/Sagitta Software's FM Tracker module (.FMT)"; bDetected = 1; if(X.isVerbose()) sOptionT(X.SA(0x10,0x20)); } else if(X.c("000003F3") && X.U8(0x14) && X.c("70FF4E75'F.PLAYER'",0x20) && X.I32(0x40,_BE)) { sName = "Paul van der Valk's Future Player module (.FP)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(X.I32(0x2C,_BE)+0x20,0x100)); x = 1; p = 0x48; do { t = X.U32(p,_BE); if(t) x++; p += 8 } while(t); if(x > 1) sOption(x,"×"); sOptionT(X.SA(X.I32(0x30,_BE)+0x20,0x100),"by:"); sOptionT(outSz(X.I32(0x38,_BE)+0x20),"sz:") } } else if(X.c("'Fred Editor '0000") && X.U16(0xE,_BE) <= 10) { //ref https://github.com/neumatho/NostalgicPlayer/blob/main/Source/Agents/ModuleConverters/ModuleConverter/Formats/FredEditorFinalFormat.cs p = 0x10+0x401*(x=X.U16(0xE,_BE)); spds = []; for(i=0x10; i < 0x10+x; i++) if(spds.indexOf(t=X.U8(i)) < 0 ) spds.push(t); if(p < X.Sz()) for(i=0; i < 128 && p < X.Sz(); i++) { trksz = X.U32(p,_BE); p += trksz+4 } if(p < X.Sz()) { ins = X.U16(p,_BE); p += 2; for(i = syn = un = 0; i < ins && p < X.Sz(); i++) { switch(X.U8(p+0x53)) { case 0xFF: un++; break; default: syn++ } p += 0x60; //name & parameters } } smp = X.U16(p,_BE); syn -= smp; p += 2; for(i=0; i < smp && p < X.Sz(); i++) p += 4+X.U16(p+2,_BE); if(X.c("12345678",p)) { bDetected = 1; sz = p+4 } if(bDetected) { sName = "Fred & Julien Clermonte's Fred Editor module (.FRED,.MOD)"; sVersion = 'project'; if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption('tempos:'+spds.sort().join('-')+' ins:'+(ins-un)+(un?'('+ins+')':'') +(smp?' smp:'+smp:'')+(syn?' syn:'+syn:'')+' sz:'+outSz(sz)) } } } if(!bDetected) if(X.c("'FTMN'03") && X.U8(5) < 64 && X.U16(8,_BE) >= 0x1000 && X.U16(8,_BE) < 0x5000 && X.U8(0xA) < 12 && X.U8(0xC) < 64 && !(X.U8(0xD) & 0xFC) && X.U8(0xE) && X.U8(0xE) <= 24 && X.U8(0xF) >= 4 && X.U8(0xF) <= 96 && X.U8(0xF) == Util.div64(96,X.U8(0xE)) && X.U8(0x50) <= 64 && !X.U8(0x51) && X.Sz() >= 0x52+X.U8(5)*32+X.U8(0x50)*4) { //ref https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_ftm.cpp sName = "Jörg W.Schmidt/MAXON's Face the Music module (.FTM)"; sVersion = 'v'+X.U8(4); bDetected = 1; if(X.isVerbose()) { smp = X.U8(5); msr = X.U16(6,_BE); bpm0 = (1766278.163/X.U16(8,_BE)).toFixed(0); fl = X.U8(0xD); fx = X.U8(0x50); gvol0 = X.U8(0xC); p = 0x52+smp*32; realsmp = 0; for(i=0; i < smp; i++) if(X.U8(0x52+i*32)) realsmp++; fxln = 0; ticksper = X.U8(0xE); rowsper = X.U8(0xF); for(i=0; i < fx; i++) { t = X.U16(p,_BE); fxln += t; p+=4+4*t } if(msr) for(i=0; i < 8; i++) p += 6+X.U32(p+2,_BE); if(fl&1) for(i=0; i < realsmp; i++) p += 4+2*(X.U16(p,_BE)+X.U16(p+2,_BE)); sOptionT(decAnsi(0x10,0x20,CPAmiga)); sOptionT(decAnsi(0x30,0x20,CPAmiga),'by: '); sOption('bpm0:'+bpm0+' ptn:'+msr+' smp:'+realsmp+'/'+smp+' fx:'+fx+'/'+fxln +' msr:'+ticksper+'/'+rowsper+(!(fl&1)?' ext.smps':'')+' gvol0:'+gvol0+' sz:'+outSz(p)) } } else if(X.c("'FMS!'..000000")) { sName = "BleuBleu's FamiStudio module (.FMS)"; bDetected = 1; sVersion = "v"+X.U8(4) } else if(X.c("'FamiTracker Module'") && X.fSig(0x12,0x10,"00'PARAMS'") > 0 && X.fSig(0x18,0x100,"00'INFO'") > 0) { sName = "Jonathan Liss's FamiTracker module (.FTM)"; bDetected = 1; if(X.isVerbose()) { itag = X.fStr(0x18,0x100,"INFO"); sOptionT(X.SA(itag+0x18,0x20)); sOptionT(X.SA(itag+0x38,0x20),"by: "); sOptionT(X.SA(itag+0x58,0x20)) } } else if(X.c("'-Furnace '")) { // from https://github.com/tildearrow/furnace/blob/master/papers/format.md switch(X.SA(9,7)) { case 'module-': cV = 'm'; bDetected = 1; sName = "tildearrow et al.'s Furnace Tracker module (.FUR)"; break; case 'instr.-': cV = 'i'; bDetected = 1; sName = "tildearrow et al.'s Furnace Tracker instrument (.FUI)"; break; case 'waveta-': cV = 'w'; bDetected = 1; sName = "tildearrow et al.'s Furnace Tracker wavetable (.FUW)"; break default: cv = "?"; bDetected = 1; sName = "unknown tildearrow et al.'s Furnace Tracker file" } nV = X.U16(0x10,_LE); //ref https://github.com/tildearrow/furnace/blob/master/papers/format.md //they update it every 0.1 femtosecond, why not help out since you're reading this? if(nV < 12) sVersion = "["+nV+"]"; else if(nV <= 14) sVersion = "v0.2.x"; else if(nV <= 16) sVersion = "v0.3.x"; else if(nV <= 27) sVersion = "v0.4.x"; else if(nV < 35) sVersion = "["+nV+"]"; else if(nV <= 54) sVersion = "v0.5.x"; else if(nV < 57) sVersion = "["+nV+"]"; else if(nV == 75) sVersion = "v.dev75/April Fools' 0.6pre0"; else if(nV <= 99) sVersion = "v.dev"+nV; else if(nV == 100) sVersion = "v0.6pre1"; else if(nV == 101) sVersion = "v0.6pre1 (dev101)"; else if(nV == 102) sVersion = "v0.6pre1 (dev102)"; else if(nV <= 115) sVersion = "v.dev"+nV; else if(nV == 116) sVersion = "v.0.6pre1.5"; else if(nV <= 131) sVersion = "v.dev"+nV; else if(nV == 132) sVersion = "v.0.6pre2"; else if(nV == 133) sVersion = "v.0.6pre3"; else if(nV <= 140) sVersion = "v.dev"+nV; else if(nV == 141) sVersion = "Tournament Edition"; else if(nV == 142) sVersion = "v.dev"+nV; else if(nV == 143) sVersion = "v.0.6pre4"; else if(nV <= 145) sVersion = "v.dev"+nV; else if(nV == 146) sVersion = "v.Pro (joke edition)"; else if(nV <= 157) sVersion = "v.dev"+nV; else if(nV == 158) sVersion = "v.0.6pre5"; else if(nV <= 160) sVersion = "v.dev"+nV; else if(nV == 161) sVersion = "v.0.6pre6"; else if(nV == 162) sVersion = "v.0.6pre7"; else if(nV <= 165) sVersion = "v.dev"+nV; else if(nV == 166) sVersion = "v.0.6pre8"; else if(nV <= 168) sVersion = "v.dev"+nV; else if(nV == 169) sVersion = "v.0.6pre9"; else if(nV <= 170) sVersion = "v.dev"+nV; else if(nV == 171) sVersion = "v.0.6pre10"; else if(nV == 172) sVersion = "v.0.6pre11"; else if(nV == 173) sVersion = "v.0.6pre12"; else if(nV == 174) sVersion = "v.0.6pre13"; else if(nV == 175) sVersion = "v.0.6pre14"; else if(nV <= 176) sVersion = "v.dev"+nV; else if(nV == 177) sVersion = "v.0.6pre15"; else if(nV == 178) sVersion = "v.0.6pre16"; else if(nV == 179) sVersion = "v.0.6pre17"; else if(nV == 180) sVersion = "v.0.6pre18"; else if(nV == 181) sVersion = "v.0.6"; else if(nV <= 191) sVersion = "v.dev"+nV; else if(nV == 192) sVersion = "v.0.6.1"; else if(nV <= 196) sVersion = "v.dev"+nV; else if(nV == 197) sVersion = "v.0.6.2"; else if(nV <= 200) sVersion = "v.dev"+nV; else if(nV == 201) sVersion = "v.0.6.3"; else if(nV <= 211) sVersion = "v.dev"+nV; else if(nV == 212) sVersion = "v.0.6.4"; else if(nV <= 213) sVersion = "v.dev"+nV; else if(nV == 214) sVersion = "v.0.6.5"; else if(nV <= 217) sVersion = "v.dev"+nV; else if(nV == 218) sVersion = "v.0.6.6"; else if(nV == 219) sVersion = "v.0.6.7"; else if(nV <= 224) sVersion = "v.dev"+nV; else if(nV == 225) sVersion = "v.0.6.8pre1"; else if(nV == 226) sVersion = "v.0.6.8pre2"; else if(nV == 227) sVersion = "v.0.6.8"; else if(nV == 228) sVersion = "v.0.6.8.1"; else sVersion = "["+nV+"]"; if(cV === 'i') { p = X.U32(0x14,_LE); if(p>0 && X.c("'INST'",p)) { ity = X.U16(0x10,_LE); switch(ity) { case 0: sVersion += "/std"; break; case 1: sVersion += "/FM (OPM/OPN)"; break; case 2: sVersion += "/Game Boy"; break; case 3: sVersion += "/C64"; break; case 4: sVersion += "/Amiga|smp"; break; case 5: sVersion += "/PC Engine"; break; case 6: sVersion += "/AY-3-8910"; break; case 7: sVersion += "/AY8930"; break; case 8: sVersion += "/TIA"; break; case 9: sVersion += "/SAA1099"; break; case 10: sVersion += "/VIC"; break; case 11: sVersion += "/PET"; break; case 12: sVersion += "/VRC6"; break; case 13: sVersion += "/OPLL"; break; case 14: sVersion += "/OPL"; break; case 15: sVersion += "/FDS"; break; case 16: sVersion += "/Vritual Boy"; break; case 17: sVersion += "/Namco 163"; break; case 18: sVersion += "/SCC"; break; case 19: sVersion += "/OPZ"; break; case 20: sVersion += "/POKEY"; break; case 21: sVersion += "/PC Speaker"; break; case 22: sVersion += "/WonderSwan"; break; case 23: sVersion += "/Lynx"; break; case 24: sVersion += "/VERA"; break; case 25: sVersion += "/X1-010"; break; case 26: sVersion += "/VRC6(saw)"; break; case 27: sVersion += "/ESS5506"; break; case 28: sVersion += "/MultiPCM"; break; case 29: sVersion += "/SNES"; break; case 30: sVersion += "/Sound Unit"; break; case 31: sVersion += "/Namco WSG"; break; default: sVersion += "/unk" } if(X.isVerbose()) { wvt = X.U16(p+0x18,_LE); smp = X.U16(p+0x1A,_LE); sOptionT(X.SC(p+0x0C,0x200,"UTF8")); sOption(" wvt:"+wvt+" smp:"+smp); } } //verbose inst } //inst if(cV === 'm' && X.isVerbose()) { p = X.U32(0x14,_LE); if(p>0 && X.c("'INFO'",p)) { t = X.SC(p+0x100,0x200,"UTF8"); p1 = X.fSig(p+0x100,0x200,"00")+1; a = X.SC(p1,0x200,"UTF8"); p1 = X.fSig(p1,0x200,"00")+1; ins = X.U16(p+0x16,_LE); wvt = X.U16(p+0x18,_LE); smp = X.U16(p+0x1A,_LE); ptng = X.U32(p+0x1C,_LE); freq = X.F32(p+0x0C,_LE); A4freq = X.F32(p1,_LE); s1spd = X.U8(p+9)+"/"+X.U8(p+0x0A); s1ptn = X.U16(p+0x10); s1ord = X.U16(p+0x12); sOptionT(t); sOptionT(a,"by: "); chips = []; el = false; i = 0; while(!el && (i<32)) { switch(X.U8(p+0x20+i)) { case 0: el = true; break; case 0x01: chips[i] = "YMU759 (17ch)"; break; case 0x02: chips[i] = "Genesis (10ch comp.)"; break; case 0x03: chips[i] = "SN76489 (SMS) (4ch)"; break; case 0x04: chips[i] = "Game Boy (4ch)"; break; case 0x05: chips[i] = "PC Engine (6ch)"; break; case 0x06: chips[i] = "NES (5ch)"; break; case 0x07: chips[i] = "C64 (8580) (3ch)"; break; case 0x08: chips[i] = "Arcade (YM2151+SegaPCM) (13ch)"; break; case 0x09: chips[i] = "Neo Geo CD (YM2610) (13ch)"; break; case 0x42: chips[i] = "Genesis extended (13ch)"; break; case 0x43: chips[i] = "SN76489 (SMS) + YM2413 (OPLL) (13ch comp.)"; break; case 0x46: chips[i] = "NES+VRC7 (11ch)"; break; case 0x47: chips[i] = "C64 (6581) (3ch)"; break; case 0x49: chips[i] = "Neo Geo CD extended (16ch)"; break; case 0x80: chips[i] = "AY-3-8910 (3ch)"; break; case 0x81: chips[i] = "Amiga (4ch)"; break; case 0x82: chips[i] = "YM2151 (8ch)"; break; case 0x83: chips[i] = "YM2612 (6ch)"; break; case 0x84: chips[i] = "TIA (2ch)"; break; case 0x85: chips[i] = "VIC-20 (4ch)"; break; case 0x86: chips[i] = "PET (1ch)"; break; case 0x87: chips[i] = "SNES (8ch)"; break; case 0x88: chips[i] = "VRC6 (3ch)"; break; case 0x89: chips[i] = "YM2413 (OPLL) (9ch)"; break; case 0x8A: chips[i] = "FDS (1ch)"; break; case 0x8B: chips[i] = "MMC5 (3ch)"; break; case 0x8C: chips[i] = "Namco 163 (8ch)"; break; case 0x8D: chips[i] = "YM2203 (6ch)"; break; case 0x8E: chips[i] = "YM2608 (16ch)"; break; case 0x8F: chips[i] = "YM3526 (OPL) (9ch)"; break; case 0x90: chips[i] = "YM3812 (OPL2) (9ch)"; break; case 0x91: chips[i] = "YMF262 (OPL3) (18ch)"; break; case 0x92: chips[i] = "MultiPCM (28ch)"; break; case 0x93: chips[i] = "Intel 8253 (beeper) (1ch)"; break; case 0x94: chips[i] = "POKEY (4ch)"; break; case 0x95: chips[i] = "RF5C68 (8ch)"; break; case 0x96: chips[i] = "WonderSwan (4ch)"; break; case 0x97: chips[i] = "Philips SAA1099 (6ch)"; break; case 0x98: chips[i] = "OPZ (YM2414) (8ch)"; break; case 0x99: chips[i] = "Pokémon Mini (1ch)"; break; case 0x9A: chips[i] = "AY8930 (3ch)"; break; case 0x9B: chips[i] = "SegaPCM (16ch)"; break; case 0x9C: chips[i] = "Virtual Boy (6ch)"; break; case 0x9D: chips[i] = "VRC7 (6ch)"; break; case 0x9E: chips[i] = "YM2610B (16ch)"; break; case 0x9F: chips[i] = "ZX Spectrum (beeper) (6ch)"; break; case 0xA0: chips[i] = "YM2612 extended (9ch)"; break; case 0xA1: chips[i] = "Konami SCC (5ch)"; break; case 0xA2: chips[i] = "OPL drums (YM3526) (11ch)"; break; case 0xA3: chips[i] = "OPL2 drums (YM3812) (11ch)"; break; case 0xA4: chips[i] = "OPL3 drums (YMF262) (20ch)"; break; case 0xA5: chips[i] = "Neo Geo (YM2610) (14ch)"; break; case 0xA6: chips[i] = "Neo Geo extended (YM2610) (17ch)"; break; case 0xA7: chips[i] = "OPLL drums (YM2413) (11ch)"; break; case 0xA8: chips[i] = "Atari Lynx (4ch)"; break; case 0xA9: chips[i] = "SegaPCM (DefleMask compat.) (5ch)"; break; case 0xAA: chips[i] = "MSM6295 (4ch)"; break; case 0xAB: chips[i] = "MSM6258 (1ch)"; break; case 0xAC: chips[i] = "Commander X16 (VERA) (17ch)"; break; case 0xAD: chips[i] = "Bubble System WSG (2ch)"; break; case 0xAE: chips[i] = "OPL4 (YMF278B) (42ch)"; break; case 0xAF: chips[i] = "OPL4 drums (YMF278B) (44ch)"; break; case 0xB0: chips[i] = "Seta/Allumer X1-010 (16ch)"; break; case 0xB1: chips[i] = "Ensoniq ES5506 (32ch)"; break; case 0xB2: chips[i] = "Yamaha Y8950 (10ch)"; break; case 0xB3: chips[i] = "Yamaha Y8950 drums (12ch)"; break; case 0xB4: chips[i] = "Konami SCC+ (5ch)"; break; case 0xB5: chips[i] = "tildearrow Sound Unit (8ch)"; break; case 0xB6: chips[i] = "YM2203 extended (9ch)"; break; case 0xB7: chips[i] = "YM2608 extended (19ch)"; break; case 0xB8: chips[i] = "YMZ280B (8ch)"; break; case 0xB9: chips[i] = "Namco WSG (3ch)"; break; case 0xBA: chips[i] = "Namco 15xx (8ch)"; break; case 0xBB: chips[i] = "Namco CUS30 (8ch)"; break; case 0xBC: chips[i] = "MSM5232 (8ch)"; break; case 0xBD: chips[i] = "YM2612 extra features extended (11ch)"; break; case 0xBE: chips[i] = "YM2612 extra features (7ch)"; break; case 0xBF: chips[i] = "T6W28 (4ch)"; break; case 0xC0: chips[i] = "PCM DAC (1ch)"; break; case 0xC1: chips[i] = "YM2612 CSM (10ch)"; break; case 0xC2: chips[i] = "Neo Geo CSM (YM2610) (18ch)"; break; case 0xC3: chips[i] = "YM2203 CSM (10ch)"; break; case 0xC4: chips[i] = "YM2608 CSM (20ch)"; break; case 0xC5: chips[i] = "YM2610B CSM (20ch)"; break; case 0xC6: chips[i] = "K007232 (2ch)"; break; case 0xC7: chips[i] = "GA20 (4ch)"; break; case 0xC8: chips[i] = "SM8521 (4ch)"; break; case 0xC9: chips[i] = "M114S (16ch)"; break; case 0xCA: chips[i] = "ZX Spectrum (beeper/QuadTone) (5ch)"; break; case 0xCB: chips[i] = "Casio PV-1000 (3ch)"; break; case 0xCC: chips[i] = "K053260 (4ch)"; break; case 0xCD: chips[i] = "TED (2ch)"; break; case 0xCE: chips[i] = "Namco C140 (24ch)"; break; case 0xCF: chips[i] = "Namco C219 (16ch)"; break; case 0xD0: chips[i] = "Namco C352 (32ch)"; break; case 0xD1: chips[i] = "ESFM (18ch)"; break; case 0xD2: chips[i] = "Ensoniq ESS503 (32ch)"; break; case 0xD4: chips[i] = "PowerNoise (4ch)"; break; case 0xD5: chips[i] = "Dave (4ch)"; break; case 0xD6: chips[i] = "NDS (16ch)"; break; case 0xD7: chips[i] = "GBA (direct) (2ch)"; break; case 0xD8: chips[i] = "GBA (MinMod) (16ch)"; break; case 0xD9: chips[i] = "Bifurcator (4ch)"; break; case 0xDA: chips[i] = "SCSP (32ch)"; break; case 0xDB: chips[i] = "YMF271 (OPX) (48ch)"; break; case 0xDC: chips[i] = "RF5C400 (32ch)"; break; case 0xDD: chips[i] = "YM2612 XGM (9ch)"; break; case 0xDE: chips[i] = "YM2610B extended (19ch)"; break; case 0xDF: chips[i] = "YM2612 XGM extended (13ch)"; break; case 0xE0: chips[i] = "QSound (19ch)"; break; case 0xE1: chips[i] = "PS1 (24ch)"; break; case 0xE2: chips[i] = "C64 (6581)+PCM (4ch)"; break; case 0xE3: chips[i] = "Watara Supervision (4ch)"; break; case 0xE5: chips[i] = "µPD1771C-017 (4ch)"; break; case 0xF0: chips[i] = "SID2 (3ch)"; break; case 0xF1: chips[i] = "5E01 (5ch)"; break; case 0xF5: chips[i] = "SID3 (7ch)"; break; case 0xFC: chips[i] = "Pong (1ch)"; break; case 0xFD: chips[i] = "Dummy System (8ch)"; break; case 0xFE: case 0xFF: chips[i] = "reserved for development"; break; default: chips[i] = "unk."; } if(!el) i++; } sOption("chips: "+chips.join("+")); //sVersion += #chip1#chip2? sOption("ticks="+freq.toFixed(2)+"Hz, A4="+A4freq+"Hz"); sOption("ins:"+ins+" wvt:"+wvt+" smp:"+smp+" glob.ptn:"+ptng); sOption("1st song's spd:"+s1spd+" ptn:"+s1ptn+" ord:"+s1ord); } //verbose mod } //mod } else if(X.c("'FWMP'00")) { sName = "Capcom/ARC Developments' Forgotten Worlds BGM module (.FW)"; bDetected = 1; } else if(X.c("'FXSM'")) { //same as AY Amadeus! sName = "František Fuka's Fuxoft AY Language module (.FXM)"; bDetected = 1; } else if(X.c("'GBRF'..00") && isWithin(X.U8(4), 1, 0x30) && isWithin(X.U8(6), 0,3) && isWithin(X.U8(7), 1,3) //&& [...Array(0x10).keys()].every(i => [0, 0xFF].includes(X.U8(0x10+i))) //Qt5 compatibility ) { sName = "Gameboy Ripped Format chiptune (.GBR)"; bDetected = 1; t = X.SA(0x154,0x13); if(t != "") if(/^([a-zA-Z0-9_ -]{4,})/.test(t)) sOptions = sOptions.append(t); } else if(X.Sz() > 0x70 && X.c("'GBS'01") && X.U8(4) && X.U8(0xD) >= 0xA7) { bDetected = 1; sName = "Gameboy Sound chiptune (.GBS)"; if(X.isVerbose()) sOptionT(X.SA(0x10,0x20)); tc = X.U8(4); if(tc > 1) sOption(tc,"×"); if(X.isVerbose()) { sOptionT(X.SA(0x30,0x20),"by: "); sOptionT(X.SA(0x50,0x20)); } } else if(X.c("'GDM'FE") && X.c("0D0A1A'GMFS'",0x44) && X.U16(0x74) <= 9 && isWithin(ordp=X.U32(0x76), 0x9D,X.Sz()) && isWithin(ptnp=X.U32(0x7B), 0x9D,X.Sz()) && isWithin(smptp=X.U32(0x80), 0x9D,X.Sz()) && isWithin(smpp=X.U32(0x84), 0x9D,X.Sz())) { //ref https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_gdm.cpp sName = "BWSB General Digital Music module (.GDM)"; bDetected = 1; trkr = ""; if(X.U16(0x4D,_BE)==0) trkr = "2gdm"; sVersion = "v"+ X.U8(0x4B) +"."+ X.U8(0x4C); if(trkr != "") sVersion += "/"+trkr+" v"+X.U8(0x4F)+"."+X.U8(0x50); if(X.isVerbose()) { ord = X.U8(0x7A)+1; ptn = X.U8(0x7F)+1; smp = X.U8(0x88)+1; for(ch=0,i=0x51; i < 0x71; ch+=X.U8(i++) != 0xFF); smps = []; for(allsmpsz=0,i=0,p=smptp; i++ < smp; p+=0x3E) { smps.push(X.SC(p,0x20,'CP437').trim()); allsmpsz += X.U32(p+0x2D) } switch(Math.max(ordp,ptnp,smptp,smpp)) { case ordp: sz = ordp+ord; break; case ptnp: for(p=ptnp,i=0; i++ < ptn && p < X.Sz(); p+=X.U16(p)); sz = p; break; case smptp: sz = smptp+0x3E*smp; break; case smpp: sz = smpp + allsmpsz; break; //the only case I ever saw } sOptionT(X.SC(0x04,0x20,'CP437')); sOptionT(X.SC(0x24,0x20,'CP437'),"by: "); sOption(['','ProTracker MOD','Multitracker','Scream Tracker 3','Composer 669 / UNIS 669', 'Farandole Composer','UltraTracker','Scream Tracker 2','OctaMED', 'Epic Megagames MASI'][X.U16(0x74)],'orig:'); sOptionT(X.SC(X.U32(0x89),X.U32(0x8D),'CP437')); //Seems absolutely no-one used the message pointers, but samples do have info sOptionT(addEllipsis(smps.filter(funSampleName).join('\n'),0xB0),'smp/msg:"\n','"'); sOption('ch:'+ch+' tmp0:'+X.U8(0x72)+' bpm0:'+X.U8(0x73)+' ord:'+ord+' ptn:'+ptn +' smp:'+smp+' sz:'+outSz(sz)) } } else if(X.c("'GLUE'B8B3AABA")) { //TODO reverse & find calcsize sName = "Lars 'GlueMaster' Malmborg's GlueMon module (.GLUE)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(8,8)); ins = X.U8(0x7F); ord = X.U8(0x9E); ptn = 0; for(i=0; i < ord; i++) { t = X.U8(0x9F+i); if(t != 0xFF && ptn < t) ptn = t } ptn++; sOption("ord:"+ord+" ptn:"+ptn+" ins:"+ins) } } else if(X.c("'NuFREDGRAY'",0x22)) { sName = "Fred Gray's module (.GRAY)"; bDetected = 1; if(X.isVerbose()) { t = X.SA(0x50,0x100); pn = 0x50+t.length+1; a = X.SA(pn,0x100); pn += a.length+1; c = X.SA(pn,0x100); sOptionT(t); sOptionT(a,"by: "); sOptionT(c) } } else if(X.c("'GTK'") && isWithin(X.U8(3),1,4) && X.U16(0xC4,_BE) <= 255 && isWithin(X.U16(0xC6,_BE),1,256) && isWithin(X.U16(0xC8,_BE),1,32) && (ord = X.U16(0xCA,_BE)) <= 256 && X.U16(0xCC,_BE) <= ord || X.c("'GT2'") && (X.U8(3) > 5 && X.U32(4,_BE) == 0xE4 || X.U32(4,_BE) == 0xEC+2*X.U16(0xEA,_BE)) && isWithin(X.U16(0xCA,_BE),1994,9999)) { //GTK from http://ldesoras.free.fr/src/gt2/dev_gtk.zip / formats.txt //GT2 from mod_gt2.cpp //+ input from the author (http://ldesoras.free.fr) bDetected = 1; sigv = 0; bad = ''; switch(X.U8(2)) { case 0x4B: sName = "Laurent 'Dumbo' de Soras's Graoumf Tracker module (.GTK)"; sVersion = "Amiga "; sigv = 1; break; case 0x32: sName = "Laurent 'Dumbo' de Soras's Graoumf Tracker 2 module (.GT2)"; sVersion = "PC " ; sigv = 2; } v = X.U8(3); sVersion += "v"+v; if(sigv == 1 && v < 6) switch(v) { case 1: sVersion += "/GT v0.7"; break; case 2: sVersion += "/GT v0.726"; break; case 3: sVersion += "/GT v0.731"; break; //lost in time } else { if(v == 9) sVersion += "/GT r27"; //TODO maybe track down some other values } tracker = statln = ''; if(sigv == 1) { //m68k GTK t = X.SC(4,0x20,'ISO8859-1').trim(); d = xc = ""; c = X.SC(0x24,0xA0,'ISO8859-1').trim(); //the author says he never implemented this trk = X.U16(0xC8,_BE); ord = X.U16(0xCA,_BE); smp = 0; smprecs = X.U16(0xC4,_BE); rows = X.U16(0xC6,_BE); lp = X.U16(0xCC,_BE); smpinfosz = v <= 2 ? 0x30 : 0x40; sszofs = v == 1 ? 32 : 28; if(v >= 3) sszofs += 16; if(v >= 2) sszofs += 4; smp = smpsz = 0; p = 0xCE; for(i=0; i < smprecs; i++) { if(ssz = X.U32(p+sszofs,_BE)) { smpsz += ssz; smp++ }; p += smpinfosz; if(ssz%2) bad = bad.addIfNone('!oddsmpsz') } ptn = 0; for(i=0; i < ord; i++) { if((pt=X.U16(p,_BE)) > ptn) ptn = pt; p += 2 } ptn++; nn = v == 4 ? 5 : 4; songsz = 0x2CE + smprecs*smpinfosz + ptn*rows*trk*nn; //hdr, smpinfo, order, ptns sz = songsz+smpsz; statln = 'trk:'+trk+' ord:'+ord+' ptn:'+ptn+' smp:'+smp+(lp?' lp:'+lp:'')+' sz:'+outSz(sz) } else { //x86 GT2 t = X.SA(8,0x20).trim(); d = X.U16(0xCA,_BE)+"-"+X.U8(0xC9).padStart(2,'0')+"-"+X.U8(0xC8).padStart(2,'0'); c = X.SA(0x28,0xA0).trim(); tracker = X.SA(0xCC,0x18); pn = songhk = spd = bpm = ord = lp = mptn = ptn = ins = smp = trk = 0; sz = -1; xc = []; if(v < 6) { spd = X.U16(0xE4,_BE); bpm = X.U16(0xE6,_BE) } while(pn < X.Sz()) { hkhd = X.SA(pn,4); hksz = X.U32(pn+4,_BE); pn += 8; switch (hkhd) { case 'SONG': ord = X.U16(pn,_BE); lp = X.U16(pn+2,_BE); mptn = 0; p = pn+4; for(i=0; i 0)? hksz - 8 : 0; if(sz >= 0) break; //or one could see a mod with no ENDC. gimmekuh!.gt2 (v==1)? Any modern TCN2 thing? if(charStat(next = X.SA(pn,4)).indexOf('allasc') < 0 //check for all 4ccs being ok || next.toUpperCase() != next) break; } if(!songhk) bad = bad.addIfNone('!noSONG'); if(sz <= 0) { sz = pn; bad = bad.addIfNone('!noendtag') } if(ptn != mptn) ptn = mptn+'/'+ptn; statln = statln.appendS((bpm?'bpm0:'+bpm+' ':'')+(spd?'spd0:'+spd+' ':'')+'trk:'+trk +' ord:'+ord+(lp?' lp:'+lp:'')+' ptn:'+ptn+' ins:'+ins+' smp:'+smp+' sz:'+outSz(sz),' ') } if(X.isVerbose()) { sOption(t); sOption(d,'on:'); sOption(tracker,'in:'); sOption(c); if(xc.length) sOption(addEllipsis(xc.join('\n'),0x100,0xA0),'msg: "','"'); sOption(statln) } if(bad != '') sVersion = sVersion.appendS('malformed'+bad,'/') } else if(X.c("'NuH.DAVIES'",0x22)) { sName = "Howie Davies's module (.HD)"; bDetected = 1; if(X.isVerbose()) { t = X.SA(0x64,0x100); pn = 0x64+t.length+1; a = X.SA(pn,0x100); pn += a.length+1; c = X.SA(pn,0x100); sOptionT(t); sOptionT(a,"by: "); sOptionT(c); } } else if(X.c("'HESM'00") && isWithin(X.U8(7),0x7D,0xFE) && X.c("FFF8", 8) && isWithin(X.I8(0xA),-8,0x20) && isWithin(X.I8(0xB),-8,0x20) && isWithin(X.I8(0xC),-8,0x20) && isWithin(X.I8(0xD),-8,0x20) && isWithin(X.I8(0xE),-8,0x20) && X.c("'DATA'", 0x10) && [0,0xE0].indexOf(X.U8(0x14)) >= 0 && X.c("002000000000000000", 0x17) && X.Sz() >= 0x100) { //ref https://github.com/libgme/game-music-emu/blob/master/gme/Hes_Emu.cpp sName = "Hudson Entertainment System multitrack tune (.HES)"; bDetected = 1; sVersion = "v"+X.U8(4); startsong = X.U8(5); reqaddr = X.U16(6); dtsz = X.U32(0x14); dtaddr = X.U32(0x18); if(X.isVerbose()) { t = a = c = ""; p = 0x40; function getText() { if(X.U8(p)) { var len = 0x20; if(X.U8(p+0x1F) && !X.U8(p+0x2F)) len = 0x30; //some are longer than t'others var s = X.readBytes(p,len), z = s.indexOf(0); if(z < 0) return ''; if(charStat(s.slice(0,z),1).indexOf('asc') < 0) return ''; p += len; s = decEncoding(s,CP437,true,Chars0to1F); if(s == '') return ''; else return s } else return '' } if(X.U8(p) >= 0x20) { sOptionT(getText()); sOptionT(getText(),"by:"); sOptionT(getText()) } sOption('from:'+startsong+' sz:'+outSz(dtaddr+dtsz)) } } else if(X.c("'GTI5'")) { sName = "Lasse 'Faust' Öörni's GoatTracker 2 Instrument (.INS)"; bDetected = 1 } else if(X.c("'ISM!V1.2'")) { sName = "Hans Bergstedt's Sound Invasion Music System/In Stereo! module (.IS)"; bDetected = 1; sVersion = "v"+X.SA(5,3); if(X.isVerbose()) sOptionT(X.SA(0x24,25)) } else if(X.c("'IS20DF10STBL'")) { sName = "Hans Bergstedt's Sound Invasion Music System/In Stereo! module (.IS20)"; bDetected = 1; sVersion = "v2.0"; } else if(X.c("'IXS!'")) { sName = "Sahara Surfers' iXalance module (.IXS)"; bDetected = 1; sVersion = 'compressed'; if(X.isVerbose()) { sOptionT(X.SA(0x18,0x20)); sOption(outSz(0x38+X.U32(0x10)),'sz:') } //Unpacked module detection is in the sanity checks } else if((X.c("'MUSE'DEADBEAF") || X.c("'MUSE'DEADBABE")) && X.U32(16)+24 == X.U32(8)) { sName = "Jazz Jackrabbit 2 container (.J2B)/Galaxy Sound System module"; sVersion = "compressed"; bDetected = 1; if(X.isVerbose()) sOption('sz:'+X.U32(8)) //TODO: confirm if zlib extraction available; if so, derive the module info too //Unpacked module detection is in the sanity checks } else if(X.c("'NuJ.FLOGEL'",0x22)) { sName = "Janko Mrsic-Flogel's module (.JMF)"; bDetected = 1; if(X.isVerbose()) { t = X.SA(0x54,0x100); pn = 0x54+t.length+1; a = X.SA(pn,0x100); pn += a.length+1; c = X.SA(pn,0x100); sOptionT(t); sOptionT(a,"by: "); sOptionT(c) } } else if( X.c("2B7C.... ........ 2B7C.... ........ 2B7C.... ........ 2B7C.... ........ 303C00FF 32004EB9 ........ 4E75") && X.I32(2,_BE) >= 0x2E) { sName = "Steve Turner's module (.JPO)"; bDetected = 1; if(X.isVerbose()) { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/SteveTurner/src/Steve%20Turner_v4.asm ofs = X.U32(2,_BE); p1 = p = X.U32(0x12,_BE)-ofs+0x2E; d1 = 10; while(p <= Math.min(X.Sz(),0x100000)) { t = X.U16(p,_BE); if(t == 0xF0FF) break; p += 2; d0 = t; if(d0 > d1) d1 = d0; } sz = X.fSig(p1+d1,TOEOF,"FF"); if(sz > 0) sz++; p = X.U32(0xA,_BE)-ofs+0x2E; x = 0; // e4ec~e4fe while(p < X.Sz()) { d0 = X.U16(p,_BE)&0xFFF0; if(d0) break; p += 0x0C; x++ } if(X.c("2b7c0004449c0faa2b7c000479840fa22b7c00047ab40fa62b7c000458980fae")) x = 5; // paradroid90.jpo d0 = 0x14+X.U32(0x1A,_BE)-ofs; smp = (X.U32(d0,_BE) >> 2)-1; smpsz = X.U32(d0+4,_BE); if(x > 1) sOption(x,"×"); sOption("smp:"+smp+" smpsz:"+Hex(smpsz)+" sz:"+outSz(sz)) } } else if((X.c("'KSCC'") && !X.U8(0xE) && !(X.U8(0xF) & 0xE0)) || //&meant to be 0xF0 but majutsushi*.kss have 0x10 there (X.c("'KSSX'") && !X.U32(0x14))) { // ref https://sourceforge.net/p/nezplug/code/HEAD/tree/nezplug/trunk/src/nes/m_kss.c & trunk/in_nez.txt sName = "Konami's KSS chiptune (.KSS)"; bDetected = 1; if(X.c("'KSSX'")) { nv = 1; sVersion = "extended" } else nv = 0; bnk = X.U8(0xD) & 0x7F; bnk16 = X.U8(0xD) & 0x80 ? 1 : 2; if(bnk) sVersion = sVersion.appendS('banks'+(bnk16 == 1?'8k':'16k'), ','); chip = X.U8(0xF); if(X.isVerbose()) if(X.c("'MBM'",0x20)) sOptionT(X.SA(0x24,0x34)); sz = 0x10+X.U8(0xE)+X.U16(6)+0x2000*bnk*bnk16; hnmmode = rammode = false; scc = true; ch = 1; if(chip & 2) { sVersion = sVersion+'#SEGA-MkIII(SMS)'; if(chip & 4) { sVersion = sVersion+'/GameGear-Stereo'; ch = 2 } else sVersion = sVersion+'/SMS-SNG(SN76489)'; if(chip & 1) sVersion = sVersion+'/FM-UNIT(YM2413)'; if(chip & 0x88) rammode = true; scc = false } else { if(chip & 0x10) { if(chip & 8) { sVersion = sVersion+'#MSX-AUDIO-STEREO'; ch = 2 } else { sVersion = sVersion+'#MSX-AUDIO'; hnmmode = true } } else sVersion = sVersion+'#MSX-AUDIO'; if(chip & 1) sVersion = sVersion+'/MSX-MUSIC'; if(chip & 0x80) { rammode = true; scc = false } else { rammode = (chip & 4) != 0; scc = !rammode } } if(rammode) sVersion = sVersion+'/RAM'; if(scc) sVersion = sVersion+'/SCC'; if(hnmmode) sVersion = sVersion+'/牌の魔術師DAC'; if(nv) if(X.U8(0xE) >= 0xB) if(X.isVerbose()) { x1 = X.U16(0x18); x2 = X.U16(0x1A); if(x2-x1 > 1) sOption('subsongs '+x1+'-'+x2); } if(X.isVerbose()) sOption('ch:'+ch+(bnk?' ex.bnk:'+bnk:'')+' sz:'+outSz(sz)) } else if(X.c("'cyd!song'") && X.U8(8) < 30) { //v27 was the last I saw, give it time... //ref https://github.com/kometbomb/klystron/tree/master/src/snd/music.c , .h : mus_load_song_RW sName = "Tero 'kometbomb' Lindeman's Klystrack/Klystron module (.KT)"; bDetected = 1; v = X.U8(8); sVersion = "v"+v; if(X.isVerbose()) { p = 9; if(v >= 6) ch = X.U8(p++); else if(v > 3) ch = 4; else ch = 3; timesig = X.U8(p++)+"/"+X.U8(p++); if(v >= 17) p += 2; //seqstep ins = X.U8(p++); ptn = X.U16(p); p += 2; nseq = []; for(i=0; i < ch; i++,p+=2) nseq[i] = X.U16(p); //seq cnt per channel len = X.U16(p); p += 2; /*lp = X.U16(p);*/ p += 2; if(v >= 12) p++; //master_volume spd = X.U8(p++); spd2 = X.U8(p++); rate = X.U8(p++); //bpm?... if(v > 2) { fl = X.U32(p); p += 4 } else fl = 0; if(v >= 9) p++; if(v >= 16) p++; //flags, mulpd, ptcin tlen = 17; if(v >= 11) tlen = X.U8(p++); if(v >= 5) tlen = Math.min(tlen,65); sOptionT(X.SC(p,tlen,'CP1250')); p += tlen; if(v >= 10) fx = X.U8(p++); else if(fl&1) fx = 1; if(fx) if(v >= 10) for(i=0; i < fx; i++) { //inner_load_fx if(v >= 22) { nsz = X.U8(p++); /*_l2r('kt',p,'fx#'+i+': '+X.SA(p,nsz));*/ if(nsz) p += Math.min(nsz,32) } p += 9; if(v < 27) p++; if(v < 21) p++; if(v >= 27) p += 6*16; else p += 4*8;//taps p++; if(v >= 19) p++; } else p += 8*8*fx; if(v >= 13) p += ch*2;//dfltvol,dfltpan insn = []; for(i=0; i < ins; i++) { p += 0x11; p += 2*X.U8(p)+1; //progsteps p += 7; if(v >= 20) p++;//finetune nsz = (v < 11)? 16: Math.min(X.U8(p++),33); insn.push(X.SC(p,nsz,'CP1250').trim()); p += nsz; if(v >= 1) p += 4; if(v >= 7) p += 3; if(v >= 10) p++; //fx_bus if(v >= 11) p += 3; if(v >= 18) p++; if(v >= 12) wt_entry = X.U8(p++); else wt_entry = 0; if(v >= 23) p += 11; if(v >= 25) p++; if(v >= 23) fm_wave = X.U8(p++); else fm_wave = 0; } ord = 0; //???? for(i=0; i < ch; i++) { ord = Math.max(nseq[i],ord); if(v < 8) p += 6*nseq[i]; else p += 5*nseq[i] } notes = 0; for(i=0; i < ptn; i++) { steps = X.U16(p); p += 2; if(v >= 24) p++; //colour if(v < 8) { s = v < 2? 3: 6; p += steps*s; } else { slen = (steps >> 1)+(steps&1); packed = X.readBytes(p,slen); p += slen; for(s=c=0; s < steps; s++) { bits = ((s&1) || (s == steps-1))? packed[c] & 0xF : packed[c] >> 4; if(bits&1) { p++; notes++ } if(bits&2) p++; if(bits&4) { ctl = X.U8(p++); if(v >= 14) bits |= ctl & ~7 } if(bits&8) p += 2; if(bits&0x80) p++; if(s&1) c++ } } } maxwt = 0; if(v >= 12) { maxwt = X.U8(p++); for(i=0; i < maxwt; i++) { sn = X.U32(p+8); p += 0x16; if(sn) if(v < 15) p += sn*2; else { dtsz = X.U32(p)/*in bits*/; p += 4+Util.divu64(dtsz+7,8) } } } wts = []; if(v >= 26) for(i=0; i < maxwt; i++) { t = X.U8(p++); wts.push(X.SC(p,t,'CP1250').trim()); p += t } sOptionT(addEllipsis(insn.filter(funSampleName).join(',')),'ins/msg:"','"'); // sOptionT(addEllipsis(wts.filter(funSampleName).join(',')),'smp/msg:"','"'); sOption('ch:'+ch+' tsig:'+timesig+' rate:'+rate+' ord:'+ord+' ptn:'+ptn+' ins:'+ins+' wt:'+maxwt +' notes:'+notes+' spd:'+spd+'-'+spd2+' fx:'+fx+' sz:'+outSz(p)) } } else if(X.c("'cyd!inst'") ) { sName = "Tero 'kometbomb' Lindeman's Klystrack instrument (.KI)"; bDetected = 1 } else if(X.c("'cyd!efex'") ) { sName = "Tero 'kometbomb' Lindeman's Klystrack effects (.KF?)"; bDetected = 1 } else if( X.c("'ADL '0000....'MDhd'00000008000080..00000080'MThd'00000006000200..01E0'MTrk'0000....00FF03") || ( X.U32(0,_LE)==X.Sz() && X.c("'AD'",4) ) ) { sName = "Lucas Arts Adlib chiptune (.LAA)"; bDetected = 1; if(X.SA(0,4)==="ADL ") sVersion = "new"; else sVersion = "old" } else if( X.c("'Liquid Module:'") || ( (X.isHeuristicScan() || X.c("'NO'")) && extIs("liq")) || X.c("21",0x01D6) && X.c("21",0x0AD2) && X.c("21",0x0BE6) && X.c("FF",0x0ED4) && X.c("FF",0x0EE8) ) { sName = "Nir Oren's Liquid Tracker module (.LIQ)"; bDetected = 1; sVersion = X.SA(0x41,0x14).trim(); if(X.isVerbose()) { if(X.SA(0,2) == "NO") sOptionT(X.SA(5,0x14)) else if(X.SA(0,3) == "Liq") { sOptionT(X.SA(0x0E,0x32)); sOptionT(X.SA(0x0E,0x0F),"by: "); } } } else if(X.Sz() > 0x38 && X.c("'LME'00") && X.fSig(4,0x20,"00") < 0 && !X.U32(0x24,_BE)) { //ref https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/LME/src/LMEv3.asm sName = "Steve 'Leggless' Hasler module (.LME)"; bDetected = 1; if(X.isVerbose()) { info = decAnsi(4,0x20,CPAmiga).trim(); songsz = 0x2C+X.U32(0x34,_BE); d3 = ins = Util.divu64(X.U32(0x38,_BE) - (i=X.U32(0x28,_BE)), 58); x = (i-0x10) >> 4; i += 0x28; smp = synsmp = smpsz = 0; for(d7 = 3; d3; d3--, i += 0x3A) if(!(t=X.U32(i,_BE))) synsmp++ else if(t > d7) { d7 = t; smpsz += X.U16(i+4,_BE) << 1; smp++ } steps = (X.U32(0x30,_BE) - X.U32(0x2C,_BE)) >> 2; sz = songsz+smpsz; if(x > 1) sOption(x,'×'); sOption(info,'info:"','"'); sOption('steps:'+steps+' ins:'+ins+' sz:'+outSz(sz)) } } else if(X.c("'sa-team 89a'10610A6108610678006000",0x16C) && X.c("'dynamite89'",0x234) && isWithin(X.U16(0x50A,_BE), 0,15)) { sName = "Oscar Giesen & Marco Swagerman's Music Assembler module (.MA)"; bDetected = 1; if(X.isVerbose()) { //ref https://web.archive.org/web/20071010162252/http://www.exotica.org.uk/tunes/formats/ma/ma_v0.zip / ma_fmt.txt x = ptn = 0; vp = []; ptns = []; ord = []; ch = []; for(p=0x4B0,i=0; i < 40; i++,p+=2) vp[i] = 0x622+X.U16(p,_BE); for(i=0; i < 40; i+=4) { ch_ = ord_ = 0; for(j=i; j < i+4 && j < 40; j++) if(X.U8(vp[j]) != 0xFE) ch_++; if(ch_) { for(j=i,p=vp[j]; j < i+4 && p < X.Sz(); p+=2) if((t=X.U8(p)) == 0xFE) break; else if(t == 0xFF) j++; else { ord_++; if(ptns.indexOf(t) < 0) ptns.push(t) } if(ord_) { x++; ord.push(ord_) } ch.push(ch_) } } if(x > 1) sOption(x,'×'); insp = 0x622+X.U32(0x5B6,_BE); ins = Util.divu64(vp[0]-insp,0x18); sOption('ch:'+ch.join('/')+' ord:'+ord.join('+')+' ptn:'+ptns.length+' ins:'+ins+' sz:'+outSz(0x622+X.U32(0x5AE,_BE))) } } else if(X.c("'MADG'") ) { sName = "B. Birney's PlayerPro module (.MAD)"; bDetected = 1; if(X.isVerbose()) sOption(X.SA(4,0x12)) } else if(X.c("D040D0404EFB")) { sName = "Mark Cooksey's module (.MC)"; sVersion = "new"; bDetected = 1 } else if(X.c("'MDC'1A 00080040")) { //from https://github.com/ValleyBell/MidiConverters/blob/master/mdc2mid.c sName = "かるちゃん/CUL.'s music creative driver module (.MDC)"; bDetected = 1; info = ''; maxsz = Math.max(X.Sz(),65536); sz = X.U32(8,_BE); p = X.U32(0x14,_BE); midires = X.U16(0x2C,_BE); if(p && p < maxsz && (t=X.fSig(p,maxsz,'0D0A1A')) > 0) info = X.SC(p,t-p,'Shift_JIS'); p = trkp = X.U32(0x10,_BE); x = X.U16(p,_BE); if(x > 0x20) sVersion = '!badsongcnt'; for(i=ch=0,p+=2; i < Math.min(x,0x20); i++,p+=8) if(ch < X.U8(p+5)) ch = X.U8(p+5) if(X.isVerbose()) { sOptionT(info); if(x > 1) sOption(x,'×'); sOption('ch:'+ch+(sz?' sz:'+outSz(sz):'')); } } else if(X.c("'DMDL'..'IN'")) { sName = "Digitrakker module (.MDL)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(0x0B,32)); sOptionT(X.SA(0x2B,20),"by: "); } } else if(X.c("'MMDC'")) { //before the more generic compare("'MMD'") sName = "Tony Crowther's packed MED module (.MMDC)"; bDetected = 1; if(X.isVerbose()) sOption(outSz(X.U32(4,_BE)),"sz:") } else if(X.c("000001001100010014000000'GameBoy Music Module'")) { sName = "Paragon 5/Beyond Game Boy Tracker module (.MGB)"; bDetected = 1 //it's proprietary and seemingly packed in some manner, not easy to extract data. TODO? } else if(X.c("'MGT'11BD'MCS'")) { sName = "Megatracker module (.MGT)"; bDetected = 1; sOptionT(X.SA(0x3A,0x20)) } else if(X.c("'MThd'") && X.c("'MTrk'",8+X.U32(4,_BE)) && X.U16(8,_BE) <= 2) { //ref. spec. from midi.org: RP-001_v1-0_Standard_MIDI_Files_Specification_96-1-4.pdf sName = "Standard MIDI File (.MID)"; sVersion = "v1.0"; nV = X.U16(8,_BE); bad = ""; bDetected = 1; switch(nV) { case 0: sVersion += " t.0:one track"; break; case 1: sVersion += " t.1:tracks"; break; case 2: sVersion += " t.2:tracks+tempo" } bDetected = 1; charset = 'SJIS'; //'CP1252' trk = X.U16(0x0A,_BE); if(trk > 1) sOption(trk,"trk:"); if(nV == 0 && trk != 1) bad += "!badvertrk"; sz = p = 0x0E; txt = by = title = lyr = ""; for(i=0; i < trk; i++) { var readmore = 20; //mostly enough to catch the info messages; set to 0xFFFFFFFF for all of 'em if(!X.c("'MTrk'",p) || (i && !X.c("FF2F00",p-3))) { bad += "!badtrk"; break } len = X.U32(p+4,_BE); p += 8; sz = p; while(readmore && p < sz+len && p < X.Sz()) { readmore--; dt = readVarUInt(p); //logpart1="@"+Hex(p)+" on "+dt+": "; p += dt[0]; switch(X.U8(p++)) { case 0xF0: case 0xF7: t = readVarUInt(p); p += t[0]+t[1]; break; case 0xFF: a = X.U8(p++); //_log(logpart1+"["+readVarUInt(p)+"] meta event "+Hex(a)); switch(a) { case 0: if(X.U8(p++) != 2) readmore = 0; else p += 4; break; case 3: t = readVarUInt(p); p += t[0]; title = title.append(X.SC(p,t[1],charset).trim()); p += t[1]; break; case 2: t = readVarUInt(p); p += t[0]; by = by.append(X.SC(p,t[1],charset).trim()); p += t[1]; break; case 1: t = readVarUInt(p); p += t[0]; txt = txt.append(X.SC(p,t[1],charset).trim()); p += t[1]; break; case 5: t = readVarUInt(p); p += t[0]; lyr = lyr.append(X.SC(p,t[1],charset,"-").trim()); p += t[1]; break; case 4: case 6: case 7: t = readVarUInt(p); p += t[0]+t[1]; break; //ins., lyrics, markers, cues case 0x20: t = readVarUInt(p); p += t[0]+t[1]; if(t[1] != 1) { readmore = 0; bad += "!badprefix@"+(p-t[0]-t[1]) } break case 0x2F: t = readVarUInt(p); p += t[0]+t[1]; if(t[1]) bad += "!badEoTtag@"+(p-t[0]-t[1]); readmore = 0; break; case 0x51: t = readVarUInt(p); p += t[0]+t[1]; if(t[1] != 3) { readmore = 0; bad += "!badtempo@"+(p-t[0]-t[1]) } break; case 0x54: t = readVarUInt(p); p += t[0]+t[1]; if(t[1] != 5) { readmore = 0; bad += "!badSMPTE@"+(p-t[0]-t[1]) } break; case 0x58: t = readVarUInt(p); p += t[0]+t[1]; if(t[1] < 2 || t[1] > 4) { readmore = 0; bad += "!badtime@"+(p-t[0]-t[1]) } break; case 0x59: t = readVarUInt(p); p += t[0]+t[1]; if(t[1] != 2) { readmore = 0; bad += "!badkey@"+(p-t[0]-t[1]) } break; default: t = readVarUInt(p); p += t[0]+t[1] } break; default: //p += readVarUInt(p)[0]; //_log(logpart1+"default..."); } if((txt != "" && by != "" && title != "") || p-sz > 0x200) readmore = 0; } sz += len; p = sz; if(p>X.Sz()) { bad += "!short"; break } } //for..trk if(bad) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOptionT(title); sOptionT(by,"by: "); sOptionT(txt); sOption(outSz(sz),"sz:") } } else if(X.c("'SMF2CLIP'")) { //ref. spec. from midi.org: M2-104-UM, MA06 sName = "MIDI Clip File (.midi2)"; sVersion = "v2.0"; bDetected = 1; } else if(X.c("'MKJamz'")) { sName = "MK-Jamz module (.MKJ)"; bDetected = 1 } else if(X.c("'MLEDMODL'000000") && X.c("'VERS'",X.U32(8,_BE)+12)) { sName = "Musicline Editor module (.ML)"; bDetected = 1; p = 4; //header skipped t = ""; c = ""; x = 0; ch = smp = ins = ptn = 0; while (p < X.Sz()) { hkhd = X.SA(p,4); hksz = X.U32(p+4,_BE); //_log(hkhd+': ['+Hex(p)+'..'+Hex(p+hksz)+']') if(charStat(hkhd).indexOf('allasc') < 0) break; //break off if it doesn't look like a 4cc p += 8; switch (hkhd) { case "VERS": v = X.U16(p,_BE); //skips MODL and VERS 4cc+4sz sVersion = "v"+(v>>8)+"."+((v&0xF0)>>4)+(v&0x0F); break; case "TUNE": x ++; t = t.appendS(X.SC(p,hksz,'CP1252').trim(),'; '); tmp0 = X.U16(p+0x20,_BE); spd0 = X.U8(p+0x22,_BE); groove = X.U8(p+0x23,_BE); ch = X.U8(p+0x27); //v0.79 through v1.06 = hksz broken, v1.10+ good, no samples of 1.07~1.09 :( We'll calc //if(v <= 0x106) { chsz = 0; hksz = 0x28; //we'll recalc the chunk size instead for(i=0; i < ch; i++) { chsz += X.U32(p+hksz,_BE); hksz += 4 } hksz += chsz; //fetch chdata sizes, skip data //} break; case "INFO": q = 0; while(q < hksz) { z = X.fSig(p+q,hksz-q,"00"); if(z > -1) l = z-p-q; else l = hksz; c += X.SC(p+q,l,'CP1252')+"\n"; q += l+1; } break; case "PART": ptn++; break case "INST": ins++; break case "SMPL": smp++; p += 6; break; } p += hksz; } if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOptionT(t); sOptionT(addEllipsis(c,0xA0,0x80),'msg: "','"'); sOption('ch:'+ch+' ptn:'+ptn+' ins:'+ins+' smp:'+smp+' sz:'+outSz(p)); } } else if(X.c("'FORM'........'MMV8SDAT'................'SE'")) { sName = "Thomas Winischhofer's Music Maker EXT module (.MM8,.MM4)"; bDetected = 1; sVersion = "v8"; if(X.isVerbose()) { sOptionT(X.SA(0x1A,0x14)); sOptionT(X.SA(0x36,0x29)); sOption(outSz(X.I32(4,_BE)+8),"sz:") } } //TODO insert the SDATA format of Music Maker else if(X.c("'SEI1XX'00")) { //TODO find more than 2 files to test on :) sName = "Music Maker STD instrument (.IP)"; bDetected = 1; sVersion = "v8 old"; } else if(X.c("'MO3'")) { sName = "MO3 MOD module (.MO3)"; bDetected = 1 } else if(X.c("'RASP'",0x438)) { // TODO find out what format it was... sName = "Generic module (.MOD)"; bDetected = 1; sVersion = X.SA(0x438,4); if(X.isVerbose()) { sOptionT(X.SC(0,0x14,"IBM850")); sOptionT(X.SC(0x14,0x16,"IBM850"),"by/inst: ") } } else if(X.c("08'MONOTONE'") && X.Sz() >= 0x15F) { //ref https://github.com/MobyGamer/MONOTONE/blob/master/MTSRC/MT_SONG.PAS sName = "MONOTONE module (.MON)"; bDetected = 1; sVersion = "v"+X.U8(0x5B); if(X.isVerbose()) { sOptionT(X.UCSD(0x09)); sOptionT(X.UCSD(0x32)); ptn = X.U8(0x5C); trk = X.U8(0x5D); cellsz = X.U8(0x5E); ord = 0; i = 0x5F; do { t = X.U8(i++); if(t != 0xFF) ord++ } while(i < 0x15F && i != 0xFF) sOption('trk:'+trk+' ord:'+ord+' ptn:'+ptn+' sz:'+outSz(0x15F+0x40*ptn*trk*cellsz)); } } else if(/SONG[0-9.]{4}(COMP|NORM)/.test(X.SA(0,12))) { sName = "Megastation track (.MS)"; bDetected = 1; sVersion = "v"+X.SA(4,5).toLowerCase() } else if(/SNGM[0-9.]{4}(COMP|NORM)/.test(X.SA(0,12))) { sName = "Megastation MOD module (.MSM)"; bDetected = 1; sVersion = "v"+X.SA(4,5).toLowerCase() } else if(X.c("'MSOB'00000026") && X.c("FFFF0000",0x24) && (x=X.U16(0x28,_BE)) > 0) { sName = "Medley module (.MSO)"; bDetected = 1; if(X.isVerbose()) if(x > 1) sOption(x,'×') } else if(X.c("'MTC1'00") && X.U8(5) < 0x10 && X.Sz() >= (sz=X.U32(4,_BE)+8)) { sName = "Multi-track Container module (.MTC)"; bDetected = 1; if(X.isVerbose()) { name = auth = c = ''; p = 8; x = 0; //ignoring PROP--it's never useful while(p < sz) { hkhd = X.SA(p,4); hksz = X.U32(p+4,_BE); p += 8; switch(hkhd) { case "NAME": name = name.addIfNone(decAnsi(p,hksz,CPSpeccy),'/'); break; case "AUTH": auth = auth.addIfNone(decAnsi(p,hksz,CPSpeccy),'/'); break; case "ANNO": c = c.addIfNone(decAnsi(p,hksz,CPSpeccy),'/'); break; case "TRCK": x++; break } p += hksz; if(p%2) p++ } sOptionT(name); sOptionT(auth,'by:'); sOptionT(addEllipsis(c,0xA0)); sOption('trk:'+x+' sz:'+outSz(sz)) } } else if(X.c("'mpu401tr'92'kk'EE'r'")) { sName = "MPU-401 Trakker Adlib module (.MTK)"; bDetected = 1; if(X.isVerbose()) { t = X.UCSD(0x18); sOptionT(t); sOptionT(X.SA(0x18+t.length+2),"by: ") } } else if(X.c("'MTM'")) { //ref https://github.com/libxmp/libxmp/blob/master/docs/formats/Mtm-form.txt sName = "StarScream/Renaissance's Multitracker module (.MTM)"; bDetected = 1; v=X.U8(3); sVersion = "v"+(v>>4)+"."+(v & 0x0F); if(X.isVerbose()) { sOptionT(X.SA(4,20)); trk = X.U16(24); ptn = X.U8(26); ord = X.U8(27)+1; csz = X.U16(28); nos = X.U8(30); bpt = X.U8(32); smpsz = 0; for(i=66+22; i < 66+22+nos*37; i += 37) smpsz += X.U32(i); pxc = 194+nos*37+trk*192+(ptn+1)*32*2; c = X.SA(pxc,csz); sz = pxc+csz+smpsz; if(c.length < csz) c = c.trim()+' <...>'; sOptionT(c); sOption('trk:'+(trk+1)+' ord:'+(ord+1)+' ptn:'+(ptn+1)+' smp:'+nos+' sz:'+outSz(sz)) } } else if(X.c("'MT20'") && X.Sz() >= 0x184 && X.U8(9) == 2 && X.U16(0x70) < 64 && X.U16(0x6A) <= 0x100) { //ref https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_mt2.cpp sName = "MadTracker 2 module (.MT2)"; nV = X.U8(8); bDetected = 1; sVersion = "v"+X.U8(9)+"."+nV.toString(16).padStart(2,'0'); bad = ""; ord = X.U16(0x6A); loop = X.U16(0x6C); ptn = X.U16(0x6E); trk = X.U16(0x70); flags = X.U32(0x76); ins = X.U16(0x7A); smp = X.U16(0x7C); hasdrums = X.U16(0x17E) != 0; //:477 if(hasdrums) dptn = X.U16(0x180); else dptn = 0; // this one line's :789 p = 0x184+(hasdrums?0x112:0); //180 = filehdr+hasdrums+orders addp = p+X.U32(p-4); msg = ""; vst2 = 0; igskip = 0; //_log("addp @"+Hex(addp)); smpszs = []; insszs = []; inss = []; smps = []; extsmp = []; while(p < addp) { //:578 hkhd = X.SA(p,4); hksz = X.U32(p+4); p += 8; switch(hkhd) { case "MSG": showmsg = X.U8(p); msg = X.SC(p+1,hksz-1,'CP1252') .replace("\r","\n").replace("\n\n","\n"); break; case "SUM": artist = X.SC(p+6,hksz-6,'CP1252'); if(artist == "Unregistered") artist == ""; break; case "VST2": vst2 = X.U32(p); break; } p += hksz } //_log("ptns @"+Hex(p)); if(p > addp) bad = bad.addIfNone("!badaddsz"); else if(p > X.Sz()) bad = bad.addIfNone("!short"); else { for(i=0; i < ptn && p < X.Sz(); i++) p += 6+((X.U32(p+2)+1)&~1) //_log("drums? @"+Hex(p)); if(hasdrums) { //:786 for(i=0; i < dptn && p < X.Sz(); i++) { //:811 p += 2+X.U16(p)*32 } } //_log("atmt @"+Hex(p)); if(flags & 2) { //automation; 8 is drum autn., 0x10 is master autn. env = trk + (flags & 8) + ((nV >= 0x50) ? vst2 : 0) + ((flags & 0x10) ? 1 : 0); for(q = 0; q < ptn; q++) for(var e = 0; e < env && p+4 <= X.Sz(); e++) { if(nV >= 3) { fl = X.U32(p); p += 8 } else { fl = X.U16(p); p += 4 } while(fl) { if(fl&1) p += 0x104; fl >>= 1; if(fl<0)fl=-fl //fixes something suspiciously like a JS glitch } } } } //_log("ins @"+Hex(p)); if(p > X.Sz()) bad = bad.addIfNone("!short"); else { for(i=0; i < 255; i++) { if(!msg && inss.length < 3) { t = X.SC(p,0x20,'CP1252'); if(t.trim() != "") inss.push(t) } dtlen = X.U32(p+0x20); if(dtlen == 0x20) dtlen += 0x18C; if(nV > 1 && dtlen) dtlen += 4; if(dtlen) igskip += X.U16(p+0x24)<<3; p += 0x24+dtlen; } } //_log("smp @"+Hex(p)); if(p > X.Sz()) bad = bad.addIfNone("!short"); else { for(i=0; i < 256; i++) { if(!msg) { t = X.SA(p,0x20); if(i < smp && t.trim() != "") smps.push(t) } dtlen = X.U32(p+32); p += 0x24; if(dtlen && i < smp) { slen = X.U32(p); sfl = X.U8(p+10); if(sfl&5) smpszs.push({"ext":1,"slen":0}); else if(slen) smpszs.push({"ext":0,"slen":slen}); p += dtlen; } } p += igskip; if(p > X.Sz()) bad = bad.addIfNone("!short"); else for(i=0; i < smp && p < X.Sz(); i++) { if(smpszs[i]["ext"]) { slen = X.U32(p); p += 0x10; iextsmp.push(X.SA(p,slen)); p += slen; } else p += smpszs[i]["slen"]; } } if(bad != "") sVersion += "/malformed"+bad if(X.isVerbose()) { sOptionT(X.SA(0x2A,0x40)); if(msg != "") if(showmsg) sOption(addEllipsis(msg,0x80),"msg: "); else sOption("("+addEllipsis(msg,0x80)+")","msg: "); else if(inss.length) sOption("\""+addEllipsis(inss.join(" "),200)+"\"","ins/msg:"); else if(smps.length) sOption("\""+addEllipsis(smps.join(" "),200)+"\"","smp/msg:"); sOption("ord:"+ord+" loop:"+loop+" ptn:"+ptn+(hasdrums?"+"+dptn:"")+" ins:"+ins+ " smp:"+smp+(extsmp.length > 0 ? " ext.smp: ["+extsmp.join(",")+"]" : "")+ " trk:"+trk+(hasdrums?"+8":"")+(vst2?("vst2:"+vst2):"")+" sz:"+outSz(p)) } } else if(X.c("'MTRAC'") && X.U8(0x31) == 0x1A) { sName = "Pyro-Fyre/Arkham's Master Tracker module (.MTR)"; bDetected = 1; //TODO parse master tracker // x = X.readBytes(0,X.fSig(0,TOEOF,"1A")); // tt = X.SA(5,20).trim(); // if(v!=null) sVersion = "v"+v; // if(X.isVerbose()) // sOptionT(X.SA(0x2A,0x40)) } else if(X.c("3C4F3123 20391E00 1FdF1F9F 0C020C05 04040407 1AF60627")) { sName = "Packen/ぱっくん Software MUAP98/みゅあっぷ tone data (TONES.DTA)"; bDetected = 1; if(X.isVerbose()) sOption(outSz(6400),'sz:') } else if(X.c("'MVSM1'")) { sName = "Kaneda's MVSTracker Suite module (.MUS)"; bDetected = 1 } else if(X.c("'MUS'1A") && (X.U16(4) >= X.U16(6))) { sName = "idSoft's DOOM music module (.MUS)"; bDetected = 1; if(X.isVerbose()) sOption(outSz(X.U16(4)),'sz:') } else if(X.c("'MXM'00") && isWithin(X.U32(4),1,256) && X.U32(8) < X.U32(4) && isWithin(X.U32(0xC),1,255) && X.U32(0x10)) { // from https://www.cubic.org/source/mxmplay-1.6.zip / xm2mxm.cpp sName = "Niklas 'pascal' Beisert's MXMplay module (.MXM)"; bDetected = 1; if(X.isVerbose()) { ord = X.U32(4); lp = X.U32(8); ch = X.U32(0xC); ptn = X.U32(0x10); ins = X.U32(0x14); spd0 = X.U8(0x18); bpm0 = X.U8(0x19); sOption('spd0:'+spd0+' bpm0:'+bpm0+' ch:'+ch+' ord:'+(lp?lp+'-':'')+ord+' ptn:'+ptn+' ins:'+ins) } } else if(X.c("'MXTX'00")) { sName = "David 'Talin' Joiner & Joe Pearce's MaxTrax/Music-X module (MXTX.+SMPL.)"; bDetected = 1 } else if(X.c("'TWNNSNG1'00")) { // looks like the first ProTrekkr was called this sName = "J.A.A. 'Arguru' Ruis's NoiseTrekker module (.NTK)"; bDetected = 1; sVersion = "v1.6b"; if(X.isVerbose()) sOption(X.SA(9,20)) } else if(X.c("'TWNNSNG2'00")) { // looks like the first ProTrekkr was called this sName = "J.A.A. 'Arguru' Ruis's NoiseTrekker module (.NTK)"; bDetected = 1; sVersion = "v2.0"; if(X.isVerbose()) sOption(X.SA(9,20)) } else if((X.c("'TWNNSNG'..00") && ["6","G","I"].indexOf(X.SA(7,1) >= 0)) || X.c("'PROTREK'")) { //ref https://github.com/hitchhikr/protrekkr/blob/c321b1995d127fc232d8ea50e359d7e2603882b8/src/ptk.cpp#L2434 sName = "J.A.A. 'Arguru' Rius et al.'s ProTrekkr module (.PTK)"; bDetected = 1; sVersion = "v"+X.SA(0x7,1); if(X.isVerbose()) // this stuff has compression in most versions, TODO? if(sVersion == "v6") sOption(X.SA(9,20)) } else if(X.c("'NESM'1A") || X.c("'NSFE'")) { //ref http://www.nesdev.org/wiiki/NSF sName = "Nintendo Sound Format audio (."; bDetected = 1; sig = X.SA(0,4); if(sig === "NSFE") filever = "NSFe"; else if(X.U8(5) == 2) filever = "NSF2"; else filever = "NSF"; sName += filever+")"; INFOready = false; NEND = false; hkhd = ""; pn = 4; nsf2jump = palntsc = sz = -1; spd = ""; vrc7repl = 0; playtime = Number(0); g=""; t=""; a=""; c=""; taut=[]; tlbl=[]; xc=""; if(filever === "NSFe") { if(X.isVerbose()) //no base header, find INFO first while(pn < X.Sz()){ hksz = X.U32(pn,_BE); hkhd = X.SA(pn+4,4); if(hkhd === "INFO") break; else pn += hksz+8; } nsf2jump = 0; } else { //NSF v1/2 have a hardplaced header, let's read that bDetected = 1; sVersion = ""; if(X.isVerbose()) { palntsc = X.U8(0x7A); chip = X.U8(0x7B); tc = X.U8(6); t = X.SA(0x0E,0x20); a = X.SA(0x2E,0x20); c = X.SA(0x4E,0x20); } INFOready = true; nsf2jump = X.U24(0x7D,_LE); pn += nsf2jump; //NSF v1 files ALSO can have this jump... orz } // at this point we're standing at the first hunk unless it's a pure NSF, and at "INFO" for NSFe if(nsf2jump >= 0 && filever === "NSFe" && X.isVerbose()) while(pn < X.Sz() && !NEND) { hksz = X.U32(pn,_LE); hkhd = X.SA(pn+4,4); pn+=8; switch (hkhd) { case "NEND": //end of hunks NEND = true; break; case "INFO": //really shouldn't happen with nsf1/2 if(INFOready) break; palntsc = X.U8(pn+6); chip = X.U8(pn+7); tc = X.U8(pn+7); INFOready = true; break; case "RATE": spd = "rate :: NTSC: "+X.U16(pn,_LE)+" ticks"; palspd = X.U16(pn+2,_LE); if(palspd > 0) spd += ", PAL: "+palspd+" ticks"; dendyspd = X.U16(pn+4,_LE); if(dendyspd > 0) spd += ", Dendy: "+dendyspd+" ticks"; break; case "VRC7": vrc7repl = X.U8(pn); break; case "time": for(i=0; i*4 < hksz; i++) { if(i*4 >= hksz) curtime=-1 else curtime = X.I32(pn+i*4,_LE); if(curtime < 0) curtime = 2*60000; //default time: 2 minutes :V playtime += curtime/1000; } break; case "auth": apn = 0; g = X.SC(pn,0x100,"UTF8"); apn+=g.length+1; a = X.SC(pn+apn,0x100,"UTF8"); apn+=a.length+1; c = X.SC(pn+apn,0x100,"UTF8"); apn+=c.length+1; c += ", rip: "+X.SC(pn+apn,0x100,"UTF8"); break; case "taut": if(X.isDeepScan()) { apn = 0; while(apn < hksz) { trkauth = X.SC(pn+apn,hksz-apn,"UTF8"); apn += trkauth.length+1; taut.push(trkauth) } } break; case "tlbl": if(X.isDeepScan()) { apn = 0; while(apn < hksz) { trklbl = X.SC(pn+apn,hksz-apn,"UTF8"); apn += trklbl.length+1; tlbl.push(trklbl) } } break; case "text": if(X.isDeepScan()) xc = X.SC(pn,hksz,"UTF8"); } pn += hksz; sz = pn; } if(X.isVerbose() && INFOready) { switch(palntsc) { case 0: sVersion += " NTSC"; break; case 1: sVersion += " PAL"; break; case 2: sVersion += " NTSC/PAL" } if(chip&0x01) sVersion += "#VRC6"; if(chip&0x02) switch(vrc7repl) { case 1: sVersion += "#YM2413"; break; default: sVersion += "#VRC7" } if(chip&0x04) sVersion += "#FDS"; if(chip&0x08) sVersion += "#MMC5"; if(chip&0x10) sVersion += "#Namco163"; if(chip&0x20) sVersion += "#Sunsoft5B"; sOptionT(t); if(tc > 1) sOption(tc,"×"); sOptionT(a,"by: "); sOptionT(c); } if(X.isVerbose()) { if(playtime > 1) sOption(new Date(Math.round(playtime*1000)).toISOString().substr(11, 8),"Playtime: "); if(Math.max(tlbl.length,taut.length)>0) sOption("[Tracks]"); for (i=0; i < Math.max(tlbl.length,taut.length); i++) { if(i < tlbl.length) ttlbl = tlbl[i]; else ttlbl = "#"+(i+1); if(i < taut.length) ttaut = " by: "+taut[i]; else ttaut = ""; sOption(ttlbl+ttaut) } if(xc != "") sOption(xc,"[Commentary]: "); if(sz > -1) sOption(outSz(sz),"sz:") } } else if(X.c("'OKTASONGCMOD'00000008") && X.c("'SAMP'00000480", 0x18) && X.c("'SPEE'00000002....'SLEN'00000002....'PLEN'00000002....'PATT'00000080", 0x4A0) && X.c("'PBOD'", 0x546)) { sName = "Armin Sander's Oktalyzer module (.OK,.OKT,.OKTA)"; bDetected = 1; sVersion = 'v'+X.U16(0x14,_BE)+'.'+X.U16(0x16,_BE).padStart(2,'0'); if(X.isVerbose()) { for(p=0x20,smp=0,smps=[]; p < 0x4A0; p += 0x20) { if((t=decAnsi(p,0x14,CPAmiga).trim()) != '') smps.push(t); if(X.U32(p+0x14,_BE)) smp++; } sOption(addEllipsis(smps.join(' ')),'smp/msg:"','"'); tmp0 = X.U16(0x4A8,_BE); ptn = X.U16(0x4B2,_BE); ord = X.U16(0x4BC,_BE); rsmp = 0; p = 0x546; while(p < X.Sz() && rsmp < smp) { hkhd = X.SA(p,4); if(charStat(hkhd,1).indexOf('allasc') < 0) break; hksz = X.U32(p+4,_BE); if(hkhd === 'SBOD') rsmp++; p += 8+hksz } sOption('tmp0:'+tmp0+' ord:'+ord+' ptn:'+ptn+' smp:'+(rsmp!=smp?rsmp+'/':'')+smp+' sz:'+outSz(p)) } } else if(X.c("'Onyx Music File'1A0001") && X.c("80808080",0x18E)) { // ref ftp://http.modland.com/pub/documents/format_documentation/Onyx%20Music%20File%20(.omf).txt sName = "Altar/Onyx's Onyx Music File (.OMF)"; bDetected = 1; if(X.isVerbose()) { ch = X.U8(0x192)+1; ptn = X.U8(0x193)+1; ord = X.U8(0x194)/2+1; title = X.SA(0x195,0x1F).trim(); sn = []; smp = smpsz = 0; for(i=0; i < 31; i++) { t = X.SA(0x1B4+i*0x1C,21).trim(); if(t.length) sn.push(t); t = X.U16(0x1CC+i*0x1C); if(t) { smpsz += t; smp++ } } for(i=0,p=0x51A; i < ptn; i++) p += 3+X.U8(p+2)*0x100; sz = p+smpsz+smp*3; for(i=0; i < smp; i++) p += 3+X.U16(p+1); if(p != sz) sVersion = 'malformed!badsmpcnk'; sOptionT(title); sOptionT(addEllipsis(sn.filter(funSampleName).join(' ')),'smp/msg:"','"'); sOption('ch:'+ch+' ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } } else if((X.c("'Org-02'") || X.c("'Org-03'")) && X.Sz() >= 114) { sName = "Amaya 'Pixel' Daisuke's Organya/ORG Maker module (.ORG)"; bDetected = 1; if(X.U8(5) === 0x32) sVersion == "v1"; else sVersion = "v2"; if(X.isVerbose()) { c = ins = 0; for(i=0; i < 16; i++) { t = X.U16(0x16+6*i); if(t) { ins++; c += t } } sOption("ins:"+ins+" tempo:"+X.U16(6)+" rhythm:"+X.U8(8) +"/"+X.U8(9)+" notes:"+c+" sz:"+outSz(114+(c<<3))) } } else if(X.c("'OBISYNTHPACK'") && X.Sz() > 0x510 && ( X.c("0100",0x50C) || !X.U32(0x50C,_BE) )) { sName = "Karsten 'Obi' Obarski's Synth Pack module (.OSP+SMP.set)"; bDetected = 1; if(X.isVerbose()) { //from initplayer RE p = a2 = 0xC; // @650 for(x = ord = 0, d1 = 0x40; p < X.Sz() && d1--;) { d2 = X.U32(p,_BE); p += 4; if(!d2) break; ord++; d2 &= 0xFFFF; if(d2 == 0xF0) x++; // @656~664 } for(d3 = d6 = 0; a2 < X.Sz() && d6 < 0x40;) { // @668~698 d4 = X.U32(a2,_BE); a2 += 4; if(!d4) { if(X.U32(a2,_BE)) d6++; } else { d4 &= 0xFF00; if(d4 == 0xFE00 || d4 == 0xFC00) d3++; d6++; } if(d6 >= 0x40) break; } if(d3 > x) { x = d3; ord = d6 } // @69a~6a0 if(X.c("2000",0xC) || X.c("FE",0xE)) x = 7; // @6a2~6b8 d1 = 0x100; if(p < X.Sz()) p = 0x10C; ptn = 0; // @6bc~6c4 for(; p < X.Sz() && d1--;) { if((t = X.U8(p)) > ptn) ptn = t; p += 4 } // @6c6~6d2 if(p < X.Sz()) p = 0x50C; // @6d6... if(!X.U32(0x50C,_BE)) // to @6fe p += (ptn+1)*0x180; // else { for(; p < X.Sz(); p += 2) if(!X.U16(p,_BE)) break; for(p += X.U16(p-2,_BE); p < X.Sz(); p += 2) if(X.c("FFFFFFFF5FFF",p)) break; // @6e8~f2 p += 6; } if(x > 1) sOption(x,'×'); sOption('ord:'+ord+' ptn:'+ptn+' sz:'+outSz(p)) } } else if(X.c("'OBISYNTHPACK'")) { //this must be the sample set for(p=0xC,i=smp=0; p < X.Sz() && i < 0x40; i++) { t = X.U32(p+4,_BE)-X.U32(p,_BE); p += 4; if(t) smp++; } p -= 4; sz = X.U32(p,_BE); if(sz <= X.Sz()) { sName = "Karsten 'Obi' Obarski's Synth Pack's sample set (SMP.SET)"; bDetected = 1; if(X.isVerbose()) sOption('smp:'+smp+' sz:'+outSz(sz)) } } else if(X.c("00800404 1214191C 1FCE26D6 328E35EA 3CF23CF2") && X.c("0C000384000000000000",0x80)) { // I'm specifically detecting the one for Dyter-07 here for(p=0,i=smp=0; p < X.Sz() && i < 0x40; i++) { t = X.U16(p+2,_BE)-X.U16(p,_BE); p += 2; if(t) smp++; } p -= 2; sz = X.U16(p,_BE); if(sz <= X.Sz()) { sName = "Synth Pack's sample set (SMP.SET)"; sVersion = "headerless"; bDetected = 1; if(X.isVerbose()) sOption('smp:'+smp+' sz:'+outSz(sz)) } } else if(X.c("'PACG'........'PAIN'") && (t=X.fSig(0xC,0x100,"'SOIN'")+8) > 0x10 && X.U16(t+2) && X.U8(t+4) && X.c("4005",t+5) && X.U32(4)+8 <= X.Sz()) { //ref http://hackipedia.org/browse.cgi/File%20formats/Music%20tracker/PAC%2c%20SBStudio%20II/SBStudio%20II%20by%20Henning%20Hellstrom%20v1%2e04%20%281994%29%2etxt sName = "Henning Hellström's SBStudio II module (.PAC)"; bDetected = 1; p = 8; sz = p+X.U32(4); title = tracker = bad = ''; end = trk = ord = ptn = spd0 = bpm0 = smp = 0; while (p < X.Sz()) { hkhd = X.SA(p,4); if(charStat(hkhd).indexOf('allasc') < 0) break; hksz = X.U32(p+4); p+=0x08; //chunk header = 4xfourcc + 4xsize switch (hkhd) { case "SND ": smp++; break; case "SOIN": spd0 = X.U8(p); bpm0 = X.U8(p+1); ptn = X.U16(p+2); trk = X.U8(p+4); break; case "SONA": title = X.SC(p,hksz,'CP850'); break; case "SOOR": ord = hksz>>1; break; case "PAOR": tracker = X.SC(p,hksz,'CP850'); break; case "END ": end = 1; break } p += hksz; if(end) break } if(bad != '') sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOptionT(title); sOption(tracker,'in: '); sOption('trk:'+trk+' ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(X.U32(4)+8)) } } else if(X.c("'PLM'1A..10") && isWithin(ch=X.U8(0x36),1,32) && X.Sz() >= 4*((smp=X.U8(0x5C))+(ptn=X.U8(0x5D))+(ord=X.U16(0x5E,_LE))) && firstNotOf(0x3C,0x20,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]) < 0) { sName = "Alex 'Statix' Evans' Disorder Tracker 2 module (.PLM)"; bDetected = 1; p = X.U8(4); ofs = rsmp = 0; rptn = []; ptns = []; smps = []; mp = [0,'unk']; bad = ''; for(i=0; i < ord; i++,p+=4) if(rptn.indexOf(t = X.U8(p+3)) < 0) rptn.push(t); for(i=0; i < ptn; i++,p+=4) { if((t = X.U32(p)) > mp[0]) mp = [t,'ptn']; t = X.SC(t+7,25,"CP437").trim(); if(t.length) ptns.push(t) } for(i=0; i < smp; i++,p+=4) { if((t = X.U32(p)) > mp[0]) mp = [t,'smp']; if(!t) continue; //fixes juice music... 10-8 eve again if(!X.c("'PLS'1A",t)) bad = bad.addIfNone('!badsmpsig:'+X.SA(t,4)); if(!isWithin(X.I8(t+0x32),-1,15)) bad = bad.addIfNone('!badsmppan'); if(X.U8(t+0x33) > 64) bad = bad.addIfNone('!badsmpvol'); smps.push(X.SC(t+6,0x20,'CP437').trim()); if(X.U32(t+0x43)) rsmp++; } rptn = rptn.length; if(p > X.Sz()) bad = bad.addIfNone('!short'); sz = Math.max(mp[0],p); switch(mp[1]) { case 'ptn': sz = mp[0]+X.U32(mp[0],_LE); break; case 'smp': sz = mp[0]+X.U8(mp[0]+4)+X.U32(mp[0]+0x43,_LE); break } if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOptionT(X.SC(6,0x30,'CP437')); //sOption(addEllipsis(ptns.join(', '),0xE0),'ptn:"','"'); sOption(addEllipsis(smps.filter(funSampleName).join(' '),0xE0),'smp/msg:"','"'); sOption('ch:'+X.U8(0x36)+' bpm0:'+X.U8(0x3A)+' spd0:'+X.U8(0x3B)+' ord:'+ord +' ptn:'+(rptn != ptn? rptn+'/':'')+ptn+' smp:'+(rsmp != smp? rsmp+'/':'')+smp+' sz:'+outSz(sz)); } } else if(X.c("'PLX'") && X.U8(3) <= 2 && X.U8(4) && X.U16(7) < X.Sz() && X.U16(9) < X.Sz() && X.U16(11) < X.Sz()) { //ref https://adplug.github.io/library/entry/Palladix.html sName = "Rainbow Arts' Palladix Sound System module (.PLX)"; bDetected = 1; if(X.isVerbose()) { for(ch=0,p=7; p < 17; p+=2) if(X.U16(p)) ch++; sOption('ch:'+ch) } } else if(X.c("FFFFE002E102")) { sName = "Achim Haertel's POKEYNoise chiptune (.PN)"; bDetected = 1 } else if(X.c("01080B08 E1079E32 30363100 000078D8 A2FF9A20 1B082000")) { sName = "Aleksi Eeben's Polyanna module (.PRG)"; sVersion = "v1.0&player"; bDetected = 1; if(X.isVerbose()) sOption('sz:'+outSz(0x5801)) //TODO add info } else if(X.c("'PSA'00") && 0x34 < X.U32(0x28,_BE) < X.Sz() && 0x34 < X.U32(0x2C,_BE) < X.Sz() && 0x34 < X.U32(0x30,_BE) < X.Sz()) { sName = "Professional Sound Artists module (.PSA)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(0x4,0x14)); //ref https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/PSA/PSA_v2.asm d2 = X.U32(0x28,_BE); x = (d2-56) >> 3; if(x > 1) sOption(x,"×"); d3 = X.U32(0x2C,_BE); d0 = X.U32(0x30,_BE); ins = ((d3-d2) >> 6); d3 = ins; synsmp = 0; smp = 0; allsmpsz = 0; d7 = 3; while(d3) { //hop ts = X.U32(d2,_BE); //ins size? if(ts) { if(ts < d7) { d7 = ts; smpsz = (X.U16(d2,_BE)+4) << 1; allsmpsz += smpsz; smp++ } } else synsmp++; //synth d2 += 64; d3-- } sz = X.U32(36,_BE); songsz = sz-allsmpsz; ptn = (songsz-d0) >> 10; sOption("ptn:"+ptn+" ins:"+ins+" smp:"+smp+" syn.smp:"+synsmp+" songsz:"+songsz+" sz:"+outSz(sz)) } } else if(X.c("'PSF'")) { //ref https://gist.github.com/SaxxonPike/a0b47f8579aad703b842001b24d40c00 nV = X.U8(3); if(nV > 0) { bDetected = 1; sName = "Neil Corlett's Portable Sound Format module (."; switch(nV) { case 0x01: sName += "PSF,.PSF1,.MINIPSF,.MINIPSF1)"; sVersion = "Playstation"; break; case 0x02: case 0x03: sName += "PSF2,.MINIPSF2)"; sVersion = "Playstation 2"; break; case 0x11: sName += "SSF,.MINISSF)"; sVersion = "Saturn"; break; case 0x12: sName += "DSF,.MINIDSF)"; sVersion = "Dreamcast"; break; case 0x21: sName += "USF,.MINIUSF)"; sVersion = 'Ultra64'; break; case 0x22: sName += "GSF,.MINIGSF)"; sVersion = 'Gameboy'; break; case 0x23: sName += "SNSF,.MINISNSF)"; sVersion = 'Super Nintendo'; break; case 0x24: sName += "2SF,.MINI2SF)"; sVersion = 'Nintendo DS'; break; case 0x25: sName += "NCSF,.MININCSF)"; sVersion = 'Nintendo DS Nitro Sound'; break; case 0x41: sName += "QSF,.MINIQSF)"; sVersion = 'Capcom Q-Sound'; break; //case ??: sName += "DCSF,.MINIDCSF)"; sVersion = '?'; break; default: sName += "*SF,.MINI*SF)"; sVersion = "unk.console"; } sVersion = "v"+Hex(nV)+" "+sVersion; if(X.isVerbose()) { //fs1 = Math.max(X.Sz()-0x200,0); fs2 = Math.min(X.Sz(),0x200); //ptags = X.fSig(fs1,fs2,"'[TAG]'")+5; ptags = X.U32(8,_LE)+0x15; sig2 = false; if(0x15 < ptags && ptags < X.Sz()) sig2 = X.SA(ptags-5,5) === "[TAG]"; if(!sig2) { //coincides with pv==2 ptags = X.U32(4,_LE)+0x15; if(0x15 < ptags && ptags < X.Sz()) sig2 = X.SA(ptags-5,5) === "[TAG]"; } if(sig2) { tags = X.SC(ptags,X.Sz()-ptags,"UTF8").trim(); a=""; g=""; t=""; y=""; l=""; tagl = tags.split('\n'); for (i=0; i= 0 && X.fStr(16,50,'MAINSONG') >= 0) { sName = "Epic Megagames MASI module (.PSM)"; bDetected = 1; if(X.isVerbose()) { pt = X.fStr(16,50,"MAINSONGTITL"); if(pt>0) { ts = X.U32(pt+12); sOptionT(X.SA(pt+16,ts)); } sOption(outSz(X.U32(4)+12),'sz:') } } else if(X.c("'PSY'..'SONG")) { sName = "J.M.A. Segura/Psycledelics' Psycle Modular Music Creation Studio module (.PSY)"; bDetected = 1; sV = X.SA(3,1); sVersion = "v"+sV; if(X.isVerbose()) { switch(sV) { case "0": case "1": sOptionT(X.SC(0x08,0x20,'CP1252')); sOptionT(X.SC(0x28,0x20,'CP1252'),"by: "); sOptionT(X.SC(0x48,0x80,'CP1252')); break; case "2": //ref https://sourceforge.net/p/psycle/code/HEAD/tree/trunk/psycle-core/src/psycle/core/psy2filter.cpp sOptionT(X.SC(0x08,0x20,'CP1252')); sOptionT(X.SC(0x28,0x20,'CP1252'),"by: "); sOptionT(X.SC(0x48,0x80,'CP1252')); bpm = X.I32(0xC8); ord = X.I32(0x191); trk = X.I32(0x195); ptn = X.I32(0x199); p = 0x19D; if(X.isDeepScan()) { inss = []; vsts = []; macs = []; waves = mach = 0; bad = ""; for(i=0; i < ptn; i++) { rows = X.I32(p); p += 0x24+0xA0*rows } p += 4; inss = []; for(i=0; i < 0xFF; i++) { t = X.SC(p,0x20,'CP1252').trim(); if(t != "" && t != "empty") inss.push(t); p += 0x20 } p += 0x37CC; //_log("waves @"+Hex(p)) if(p > X.Sz()) bad = bad.addIfNone("!short"); else for(i=0; i < 0xFF && p < X.Sz(); i++) for(w=0; w < 0x10 && p < X.Sz(); w++) { t = X.U32(p); p += 4; //if(t || p+t*2 > X.Sz()) _log("wave["+i+","+w+"] @"+Hex(p)+" ["+Hex(t)+"]: "+X.SC(p,0x20,'CP1252').trim()); if(t) { if(!w) waves++; p += 0x2D; var st = X.U8(p++)+1; p += t< X.Sz()) bad = bad.addIfNone("!short"); else for(i=0; i < 0x100; i++) { t = X.U8(p++); if(t) { //_log("vst["+i+"] @"+Hex(p)); t = X.SC(p,0x80,'CP1252').trim(); if(t != "") vsts.push(t); p += 0x80; t = X.I32(p); p += 4+t*4; } } //_log("mach @"+Hex(p)); m = []; for(i = 0; i < 128; i++) { t = X.U8(p++); if(t) mach++; m[i] = t } t = oldt = 0; const mtMa=0,mtRM=1,mtDi=2,mtSa=3,mtDe=4,mtF2=5,mtGa=6,mtFl=7,mtPl=8, mtVI=9,mtVF=10,mtSc=11,mtAB=12,mtA1=13,mtA2=14,mtA21=15,mtDu=255; for(i=0; i < 128; i++) if(m[i]) { t = X.I32(p+8); p += 12; tn = X.SA(t===mtPl?p+0x100:p, 0x10); tpn = t === mtPl ? X.SA(p,0x100) : ""; ts = tn+tpn; //_log("ts: "+ts+", oldt = "+oldt); nonascii = false; for(q=0; q < ts.length; q++) if(ts[q] < " " || ts[q] > "~" || /["+?*]/.test(ts[q])) {nonascii = true; break } if(((15 < t && t < 255) || ts.length < 2 || nonascii) && oldt === mtPl) { bad = bad.addIfNone("!pluginDefinedDataSize"); break } else if(15 < t && t < 255) { bad = bad.addIfNone("!badMachineType"); break } oldt = t; switch(t) { case mtPl: macs.push(tn); t = X.I32(p+0x110); p += 0x114+4*t; //_log(" ["+macs[macs.length-1]+"] post-"+Hex(t)+" vals @"+Hex(p)); p += 0x181; break; case mtVI: case mtVF: vsts.push(tn); p += 0x197; break; default: macs.push(X.SA(p,0x10)); p += 0x191 } } if(p > X.Sz()) bad = bad.addIfNone("!short"); //_log("patch 0 @"+Hex(p)); p += 5*0xFF; //patch 0 if(p > X.Sz()) bad = bad.addIfNone("!noP0"); //_log("patch 1 @"+Hex(p)); p += 0x40; if(p > X.Sz()) bad = bad.addIfNone("!noP1"); //_log("patch 2 @"+Hex(p)); if(p < X.Sz() && X.U8(p++)) p += 4+X.U32(p); if(bad != "") sVersion += "/malformed"+bad; if(inss.length) sOption("inss: ["+inss.join(",")+"]"); if(vsts.length) sOption("vsts: ["+vsts.join(",")+"]"); if(macs.length) sOption("mcn: ["+macs.join(",")+"]"); sOption("ord:"+ord+" ptn:"+ptn+" trk:"+trk+" bpm:"+bpm+" mach:"+mach+" smp:"+waves+" sz:"+outSz(p)); } //isdeep else sOption("ord:"+ord+" ptn:"+ptn+" trk:"+trk+" bpm:"+bpm); break; case "3": //ref https://sourceforge.net/p/psycle/code/HEAD/tree/trunk/psycle-core/src/psycle/core/psy3filter.cpp nV = X.I32(8); sVersion+="/"+nV; p = 0x10+X.U32(0x0C); //chunk header = 4xfourcc + 4xver + 4xsize hkn = X.U32(0x10,_LE); t=''; a=''; c=''; trk=0; bpm=0; ptnlns=0; ptn=0; mac=0; ins=0; eins=0; while (hkn > 0) { hkhd = X.SA(p,4); hkn--; cV = X.U32(p+4,_LE); hksz = X.U32(p+8,_LE); p+=0x0C; switch (hkhd) { case "INFO": p1 = p; if((cV & 0xFF00)==0) { t = X.SC(p1,128,'CP1252'); p1+=t.length+1; a = X.SC(p1,64,'CP1252'); p1+=a.length+1; c = X.SC(p1,0xFFFF,'CP1252'); p1+=c.length+1; if(cV == 0) hksz=t.length+a.length+c.length+3 //bug workaround } break; case "SNGI": if((cV & 0xFF00) == 0) { trk=X.I32(p,_LE); if(cV==0) hksz = 11*4+trk*2; //bug workaround bpm=X.I16(p+4,_LE) + X.I16(p+6,_LE)/100.0; } break; case "SEQD": if((cV & 0xFF00) == 0) seqlen=X.I32(p+4,_LE); break; case "PATD": if((cV & 0xFF00) == 0) { _idx = X.I32(p,_LE); ptnlns = X.I32(p+4,_LE); ptnn = X.SA(p+0x0C,0x20); p1=p+0x0C+ptnn.length+1; ptnsz = X.I32(p1,_LE); ptn++; p1+=4; if((cV == 0) && (p1+ptnsz == p+hksz+4)) hksz += 4; //bug workaround } break; case "MACD": mac++; //bugfix impossible here, let's pretend it won't happen and move on break; case "INSD": ins++; break; case "EINS": if((cV & 0xFFFF0000) == 0x10000) { eins = X.U32(p,_LE) //and again, pretending there's no bug (and no samples) } break; } p += hksz; } sOptionT(t); sOptionT(a,"by: "); sOptionT(c); sOption("bpm:"+bpm+" trk:"+trk+" ptnlns:"+ptnlns+ " mac:"+mac+" ptn:"+ptn+"/idx:"+_idx+" ins:"+ins+" eins:"+eins+" sz:"+outSz(p)); break; case "4": //ref https://sourceforge.net/p/psycle/code/HEAD/tree/trunk/psycle-core/src/psycle/core/psy4filter.cpp sVersion+="/future"; //yet another zipped-xmls format } } } else if(X.c("'PSMP'") && [0,0x10].indexOf(X.U8(4)) >= 0) { sName = 'Sega MegaDrive Pre-SMP chiptune (.PSZ)'; bDetected = 1; sVersion = X.U8(4)? 'BE': 'LE'; if(X.isVerbose()) sOption('tempo:'+X.U8(5)) } else if(X.c("'PTCOLLAGE-'") || X.c("'PTTUNE--20'")) { //ref source code / pxtnService.cpp, pxtnDescriptor.cpp bDetected = 1; v1 = X.SA(2,1); if(v1 === "T") { rough = 10; //used for clocking sName = "Amaya 'Pixel' Daisuke's pxtone tune (.PTTUNE)" } else { rough = 1; sName = "Amaya 'Pixel' Daisuke's pxtone project (.PTCOP)" } dt = X.SA(10,6); if(dt <= "050227") { sV = "v.x1x"; nV = 1 } else if(dt <= "050608") { sV = "v.x2x"; nV = 2 } else if(dt <= "060115") { sV = "v.x3x"; nV = 3 } else if(dt <= "060930") { sV = "v.x4x"; nV = 4 } else if(dt <= "071119") { sV = "v5"; nV = 5 } d = dt.substr(0,2)+"-"+dt.substr(2,2)+"-"+dt.substr(4,2); sVersion = sV+"/20"+d; switch(nV) { case 1: case 2: p = 0x10; break; case 3: case 4: p = 0x14; break; default: p = 0x14 } t = c = bad = ""; bclock = lclock = bnum = btempo = bps = ch = 0; bEnd = false; while(!bEnd && p < X.Sz()) { hkhd = X.SA(p,8); hksz = X.U32(p+8,_LE); //_l2r('px',p,hkhd) switch (hkhd) { case "PROJECT=": t = X.SC(p+12,0x10,"Shift_JIS"); btempo = X.F32(p+0x1C,_LE).toFixed(0); bclock = X.I16(p+0x20,_LE); bnum = X.I16(p+0x22,_LE); break; case "evenMAST": //x4x if(X.U16(p+12,_LE) != 3) sVersion += "/unk"; else { var p_ = X.fSig(p+3,0x100,"'textNAME'")-12; if(p_ > -12) p = p_-hksz; else { p_ = X.fSig(p+3,0x100,"'textCOMM'")-12; if(p_ > -12) p = p_-hksz; } } break; //not gonna parse what vari-read gives me case "MasterV5": //x5x if(hksz != 0xF) bad = bad.addIfNone('!badv5fmt'); bclock = X.I16(p+12)*rough; bnum = X.I8(p+14); btempo = X.F32(p+15).toFixed(0); lmeas = (X.I32(p+0x17)/(bnum*bclock)).toFixed(0); //_l2r('px',p+15+12,'So, the last measure is '+lmeas+' at tempo '+btempo); break; case "Event V5": var e, evtn = X.U32(p+12,_LE); q = p+11; for(e=0; e < evtn; e++) { //hksz is broken in this chunk so it's like this, and yes it is slow for(i=0; i < 5; i++) { if(X.U8(++q) < 0x80) break } q += 2; for(i=0; i < 5; i++) { if(X.U8(++q) < 0x80) break } } hksz = 4+q-p-11; break; case "textNAME": t = X.SC(p+12,hksz,"Shift_JIS"); break; case "textCOMM": c = addEllipsis(X.SC(p+12,hksz,"Shift_JIS"),0xA0); break; case "assiWOIC": ch++; break; case "END=====": case "pxtoneND": bEnd = true; break } p += 12+hksz; } if(bad.length) sVersion = sVersion.appendS('malformed'+bad, '/'); if(X.isVerbose()) { if(t != "no name") sOption(t); sOptionT(c); if(bclock+btempo+bnum > 0) sOption('ch:'+ch+" bpm:"+btempo+" bclock:"+bclock+" bnum:"+bnum); sOption(outSz(p),"sz:") } } else if(X.c("'PTNOISE-'")) { sName = "Amaya 'Pixel' Daisuke's pxtone Noise instrument (.PTNOISE)"; bDetected = 1 } else if(X.c("'PTVOICE-'")) { sName = "Amaya 'Pixel' Daisuke's pxtone Voice instrument (.PTVOICE)"; bDetected = 1; if(X.isVerbose()) sOption(outSz(X.U32(0x0C)+0x10),"sz:") } else if(X.c("'PTMF'",0x2C) && X.U8(0x1C) == 0x1A && X.U8(0x1E) <= 2 && isWithin(ch=X.U16(0x26),1,32) && (ord=X.U16(0x20)) < 256 && isWithin(ins=X.U16(0x22),1,255) && isWithin(ptn=X.U16(0x24),1,128)) { // ref https://web.archive.org/web/20151027135201if_/http://hackipedia.org/File%20formats/Music/Sample%20based/text/Poly%20Tracker%20module%20format.cp437.txt.utf-8.txt sName = "Lone Ranger/AcmE's Poly Tracker module (.PTM)"; bDetected = 1; sV = Hex(X.U16(0x1D)); sVersion = "v"+sV.substr(0,1)+'.'+sV.substr(1,2); bad = ''; for(sn=[],i=mp=rsmp=0,p=0x260; i < ins; i++,p+=0x50) { if(X.U8(p) & 3) { rsmp++; t = X.U32(p+0x12); if(mp < t) { mp = t; sz = t+X.U32(p+0x16) } } t = X.SC(p+0x30,0x1C,'CP437').trim(); if(t.length) sn.push(t); } sz = Math.max(sz,p); if(!rsmp) bad = bad.addIfNone('!badsmpavl'); if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOptionT(X.SC(0,0x1C,'CP437')); sOption(addEllipsis(sn.join(' ')),'ins/msg:"','"'); sOption('ch:'+ch+' ord:'+ord+' ptn:'+ptn+' ins:'+ins+' smp:'+rsmp+' sz:'+outSz(sz)) } } else if(X.c("'RAD by REALiTY!!'")) { //ref https://www.3eality.com/Public/Releases/RAD/radv2_0a.zip source/validate20.cpp // & https://www.3eality.com/Public/Releases/RAD/radv1_1a.zip player.asm sName = "Shayde & Rogue & Void's Reality ADlib Tracker module (.RAD)"; bDetected = 1; sV = (nV = X.U8(0x10)).toString(16); sVersion = "v"+sV[0]+"."+sV[1]; bad = ""; if(X.isVerbose()) { al = X.U8(0x11); fbpm = nV > 0x20 && (al & 0x20); // in v2.1, if the bpm flag is set, bpm != 125 and is the next byte if((nV == 0x10 && (al & 0x80)) || nV >= 0x20) { //desc present l = 0x12; if(fbpm) l += 2; desc = ""; maxdesc = 250; cutoff = false; r = X.fSig(l,X.Sz()-32-l,"00"); p = r+1; if(r < 0) { maxdesc = 0; bad = bad.addIfNone("!baddesc") } else if(r > l+maxdesc) { r = l+maxdesc; cutoff = true } tmp = X.readBytes(l,r-l); for(i=0; desc.length < maxdesc && i < r-l; i++) switch(tmp[i]) { case 0: i = r-l; break; case 1: desc += "\n"; break; default: if(tmp[i] < 0x20) for(j=0; j < tmp[i] && desc.length <= maxdesc; j++) desc += " "; else desc += String.fromCharCode(tmp[i]) } if(cutoff) { desc += "..." } sOptionT(desc); } else p = 0x12; spd0 = al&0x1F; if(fbpm) bpm = X.U16(0x12); else bpm = 125; ins = 0; //_l2r('rad',p,'pre-ins') insns = []; while(p < X.Sz()) { insn = X.U8(p++); if(!insn || p > X.Sz()) break; ins++; if(nV == 0x10) p += 11; else if(nV == 0x21) { nmlen = X.U8(p++); insns.push(X.SA(p,nmlen)); p += nmlen; rm = X.U8(p); riff = rm & 0x80; midi = (rm&7)==7; if(midi) p += 7; else p += 24; if(riff) p += X.U16(p)+2; } else bad = bad.addIfNone("!badver"); } //_l2r('rad',p,'pre-orderlist') ord = X.U8(p++); p += ord; //TODO parse jumps if(!ord || ord > 128) bad = bad.addIfNone("!badord"); //_l2r('rad',p,'pre-ptns') ptn = ptns = 0; if(nV > 0x20) while(p < X.Sz()) { if((t = X.U8(p++)) == 0xFF) break; ptns++; if(ptn <= t) ptn = t+1; p += 2+X.U16(p); } else { //v1 for(i=mptn=0; i < 32; ++i,p+=2) { if(t=X.U16(p)) ptn++; mptn = Math.max(mptn,t); if(t > X.Sz()) bad = bad.addIfNone('!short') } if(mptn) for(p=mptn,end=false; !end && p < X.Sz();) { //parse the last ptn t = X.U8(p++); //_l2r('rad1',p-1,'newptnline #'+Hex(t&0x7F)+(t&0x80?'::last':'')) if(t & 0x80) end = true; //line while(p < X.Sz()) { t = X.U8(p); p += 2; if(X.U8(p++) & 0x07) p++; if(t & 0x80) break } //notes/fx in line } } if(!ptn) bad = bad.addIfNone("!badptn"); if(!ins) bad = bad.addIfNone("!badins"); riff = riffs = 0; if(nV > 0x20) { //_l2r('rad2',p,'pre-riffs') while(p < X.Sz()) { if((t = X.U8(p++)) == 0xFF) break; riffs++; if(riff < t) riff = t; p += 2+X.U16(p); } sOptionT(addEllipsis(insns.filter(funSampleName).join(' '),0x100),'ins:"','"'); sOption('spd0:'+spd0+' bpm:'+bpm+' ord:'+ord+' ptn:'+ptns+(ptn!=ptns?'/'+ptn:'') +' ins:'+ins+' riffs:'+riffs+(riff!=riffs?'/'+riff:'')) } else sOption('spd0:'+spd0+' bpm:'+bpm+' ord:'+ord+' ptn:'+ptn+' ins:'+ins) if(bad) sVersion += "/malformed"+bad sOption('sz:'+outSz(p)) }//isVerbose } else if(X.c("'RAWADATA'") && X.Sz() > 10) { sName = "Raw OPL Capture chiptune (.RAW)"; bDetected = 1; if(X.isVerbose() && (X.isDeepScan() || X.Sz() < 0xFFFF)) { //may take a sec //taken from https://github.com/adplug/adplug/blob/master/src/raw.cpp p = 10; len = (X.Sz()-10) >> 1; tagdata = false; t = a = d = ""; next = 0; for(i=0; i < len && p < X.Sz(); i++) { x = (tagdata ? 0xFFFF : X.U16(p)); p += 2; if(!tagdata && x==0xFFFF) { //trying to stop at the RAW EOF data marker tagcode = X.U8(p++); if(tagcode == 0x1A) tagdata = true; //tag marker found else if(!tagcode && charStat(X.readBytes(p,5),true).includes('allxsc')) { //old comment (music archive 2004) d = X.SA(p,1023); p += 1023; tagdata = true } else p--; } } //_logIt('@'+Hex(p)+' tagdata? '+tagdata); if(tagdata && p+40 <= X.Sz()) { //searching for tags title = X.SA(p,40); p += 40; if(X.U8(p++) != 0x1B) { //if not, skip "author" p--; if(X.U8(p) >= 0x20) { //older version tag, eg. stunts.raw a = X.SA(p,60); p += 60; d = X.SA(p,1023); p += 1023; next = 2; //end_section } else p--; next = 1; //desc_section } if(!next) { a = X.SA(p,40); p += 40 } if(next == 1) { next = 0; if(X.U8(p++) != 0x1C) next = 2; if(!next) { d = X.SA(p,1023); p += 1023 } } } sOption(title); sOption(a,'by: '); sOption(d) } //isDeepVerbose if(X.isVerbose()) sOption(X.U16(8),'clkspd:') } else if(X.c("'RNS0'") && X.c("'>>> Chunk Start <<<'00", 9)) { sName = "Eduard Müller's Renoise module (.RNS)"; bDetected = 1; sV = X.SA(3,4); sVersion = "v"+sV; if(sV < "05") sVersion += "/RN<1.1.1"; else if(sV === "05") sVersion += "/RN1.1.1"; else if(sV < "015") sVersion += "/RN<1.2.7"; else if(sV === "015") sVersion += "/RN1.2.7"; else if(sV < "018") sVersion += "/RN<1.5.2"; else if(sV === "018") sVersion += "/RN1.5.2"; else sVersion += "/RN>1.5.2" if(X.isVerbose()) { p = 9; while (p < X.Sz()) { if(!X.c("'>>> Chunk Start <<<'00",p)) break; p += 20; if(X.c("'Header V00 '00",p)) { sOptionT(X.SC(p+20,20,'CP1252')); sOptionT(X.SC(p+40,20,'CP1252'),"by: "); sOptionT(X.SC(p+60,20,'CP1252'),"style: "); break; } else if(X.c("'Header V01 '00",p)) { p += 20; sz = X.U32(p); sOptionT(X.SC(p+4,sz,'CP1252')); p+=sz+4; sz = X.U32(p); sOptionT(X.SC(p+4,sz,'CP1252'),"by: "); p+=sz+4; sz = X.U32(p); sOptionT(X.SC(p+4,sz,'CP1252'),"style: "); break; } else if(X.c("Header V02 '00",p)) { p += 20; sz = X.U32(p); sOptionT(X.SC(p+4,sz,'CP1252')); p+=sz+4; sz = X.U32(p); sOptionT(X.SC(p+4,sz,'CP1252'),"by: "); p+=sz+4; sz = X.U32(p); sOptionT(X.SC(p+4,sz,'CP1252'),"style: "); p+=sz+4+5; sz = X.U32(p); sOptionT(X.SC(p+4,sz,'CP1252')); break; } p = X.fSig(p+1,TOEOF,"''>>> Chunk End <<<'00"); if(p == -1) break; p += 20 } } } else if(extIs("xrns") && X.c("'PK'0304")) { //TODO when ZIP parsing is available sName = "Eduard Müller's Renoise module (.XRNS)"; sType = '~audio'; sVersion = "xml"; bDetected = 1 //versions vs doc_version: // 10: 1.9.1 14: 2.0.0 15: 2.1.0 21: 2.5.1 22: 2.6.1 30: 2.7.0, 2.7.1, 2.7.2 // 37: 2.8.2 54: 3.0.1 63: 3.1.0 65: 3.3.2 66: 3.4.2 } else if(extIs("xrdp") && X.fStr(0,0x100,"=0) { sName = "Eduard Müller's Renoise filter device preset (.XRDP)"; bDetected = 1; p = X.fStr(20,0x100,"doc_version="); if(p < 0) sVersion = "malformed"; else { sVp = X.SA(p,0x10); sVersion = "v"+/doc_version=\"(\d*)\"/.exec(sVp)[1] } } else if(extIs("xrni") && X.c("'PK'0304")) { //TODO when ZIP parsing is available sName = "Eduard Müller's Renoise instrument (.XRNI)"; sType = '~audio'; sVersion = "xml"; bDetected = 1 } else if(extIs("xrno") && (X.fStr(0,0x100,"=0)) { sName = "Eduard Müller's Renoise sample modulation set (.XRNO)"; bDetected = 1; p = X.fStr(15,0x100,"doc_version="); if(p < 0) sVersion = "malformed"; else { sVp = X.SA(p,0x10); sVersion = "v"+/doc_version=\"(\d*)\"/.exec(sVp)[1] } } else if(extIs("xrnt") && (X.fStr(0,0x100,"=0)) { sName = "Eduard Müller's Renoise effect chain (.XRNT)"; bDetected = 1; p = X.fStr(15,0x100,"doc_version="); if(p < 0) sVersion = "malformed"; else { sVp = X.SA(p,0x10); sVersion = "v"+/doc_version=\"(\d*)\"/.exec(sVp)[1] } } else if(extIs("xrnt") && X.c("'PK'0304")) { sName = "Eduard Müller's Renoise effect chain (.XRNT)"; sVersion = "v<3.0"; bDetected = 1 } else if(extIs("xrnz") && (X.fStr(0,0x100,"=0)) { sName = "Eduard Müller's Renoise instrument phrase (.XRNZ)"; bDetected = 1; p = X.fStr(15,0x100,"doc_version="); if(p < 0) sVersion = "malformed"; else { sVp = X.SA(p,0x10); sVersion = "v"+/doc_version=\"(\d*)\"/.exec(sVp)[1] } } else if(X.c("'NuRIFFRAFF'",0x22)) { sName = "Riff Raff module (.RIFF)"; bDetected = 1; if(X.isVerbose()) { t = X.SC(0x64,0x100,'CP1252'); a = X.SC(0x64+t.length+1,0x100,'CP1252'); c = X.SC(0x64+t.length+a.length+2,0x100,'CP1252'); sOptionT(t); sOptionT(a,"by: "); sOptionT(c) } } else if(X.c("'RON_KLAREN_SOUNDMODULE!'00", 0x28)) { sName = "Ron Klaren module (.RK)"; bDetected = 1 } else if(X.c("'RTMM '") && X.U8(0x25) == 0x1A && X.c("'RTND'",0x2A+X.U16(0x28)+X.U32(0x88))) { sName = "Arnaud Hasenfratz's Real Tracker module (.RTM)"; bDetected = 1; sVersion = "v"+X.SA(0x37,7)+'/'+Hex(X.U16(0x26)); if(X.isVerbose()) { rtmmxds = X.U32(0x88); sOptionT(X.SC(5,0x20,'CP1252')); sOptionT(X.SC(0x3E,0x20,'CP1252'),"by: "); sOptionT(X.SC(0x8C,0x20,'CP1252'),"orig.: "); sOption('ch:'+X.U8(0x60)+' spd0:'+X.U8(0x66)+' bpm0:'+X.U8(0x67) +' ord:'+X.U16(0x62)+' ptn:'+X.U16(0x64)+' ins:'+X.U8(0x61)) } } else if(X.c("01FF..3EFF32018079FEFF2846320280B7201301FF013E1CED79053E02ED79AF320180C9") && X.c("21A9843D280E232347237E2BB67820F6232318EF5E23567AB328D22B2224803EFE320E823E08325280C35C80", 0x26)) { sName = "František Fuka/Fuxoft's Samadeus module (.samadeus)"; bDetected = 1; //TODO reverse and extract info } else if(X.c("00000000 00000200",0x0C) && X.c("00") && X.U16(0x18,_LE) === X.U16(0x40,_LE) && X.c("00'ST-Module.'", 0x4B7)) { sName = "Oliver 'BSC' Mayer's Amstrad CPC Soundtrakker module (.STK)"; bDetected = 1; datasz = X.U16(0x18,_LE); sz = datasz + 0x80; if(sz < X.Sz()) sVersion = "malformed"; crc = 0; for(i=0; i < 67; i++) crc += X.U8(i); crc &= 0xFFFF; if(crc != X.U16(0x43)) sVersion += sVersion != "" ? "!badCRC" : "/malformed!badCRC"; if(X.isVerbose()) sOptionT(X.SA(1,8)); sOption(outSz(sz),"sz:") } else if(X.c("00000000 00000200",0x0C) && X.c("00") && X.U16(0x18,_LE) === X.U16(0x40,_LE) && X.SA(1,8) === X.SA(0xB10,8)) { sName = "Oliver 'BSC' Mayer's Amstrad CPC Soundtrakker 128K module (.128)"; bDetected = 1; datasz = X.U16(0x18,_LE); sz = datasz + 0x80; if(sz < X.Sz()) sVersion = "malformed"; crc = 0; for(i=0; i < 67; i++) crc += X.U8(i); crc &= 0xFFFF; if(crc != X.U16(0x43)) sVersion += sVersion != "" ? "!badCRC" : "/malformed!badCRC"; if(X.isVerbose()) sOptionT(X.SA(1,8)); inst = []; ins = 0; for(i=0; i < 16; i++) if(![0,0x20].indexOf(X.U8(0xB18+8*i))) { ins++; inst.push(X.SA(0xB18+8*i,8).trim()) } //TODO confirm that that's how to count the instruments sOption(inst); sOption("ins:"+ins+" sz:"+outSz(sz)) } else if(X.c("00'ST-Module.'",0x437)) { sName = "Oliver 'BSC' Mayer's Amstrad CPC Soundtrakker module (.STK)"; bDetected = 1; sVersion = "headerless" } else if(X.Sz() > 0x20 && /S98[0-3]/.test(X.SA(0,4)) && X.U32(4) <= 0x20 && !X.U32(0xC) && (!X.U32(0x10) || isWithin(X.U32(0x10),0x20,0x800000)) && X.U32(0x14) < 0x20000 && (!X.U32(0x18) || isWithin(X.U32(0x18),X.U32(0x14),0x800000)) //the highest loop point I saw is 2FB39Ah @ "Snatcher/47 staffroll2.s98" && X.U32(0x1C) <= 0x40) { //ref https://www.purose.net/befis/download/lib/t98/ins98131s.zip / s98spec1.txt // & http://www.purose.net/befis/download/kmp/old/s98spec2.txt // & https://github.com/rururutan/s98spec3/blob/master/s98spec3-ja.txt sName = "Ru³'s S98 chiptune (.S98)"; bDetected = 1; nv = X.U8(3)-0x30; sVersion = 'v'+nv; dev = X.U32(0x1C); if(!dev || (nv >= 2 && !X.U32(0x20))) sVersion += '#OPNA(YM2608)@7.6MHz'; else for(i=0,p=0x20; i < dev && X.U32(p); i++,p+=0x10) { clk = (X.U32(p+4)/0x100000).toFixed(1)+'MHz'; if((dt=X.U32(p)) > 16) sVersion += '#unk@'+clk; else sVersion += '#'+['', 'PSG(YM2149)','OPN(YM2203)','OPN2(YM2612)','OPNA(YM2608)','OPM(Y2151)', 'OPLL(YM2413)','OPL(YM3526)','OPL2(YM3812)','OPL3(YMF262)', 'unk0A','unk0B','unk0C','unk0D','unk0E','PSG(AY-3-8910)','DCSG(SN76489)'][dt] + '@'+clk } bad = ''; if(X.U32(0x14) > X.Sz() || X.U32(0x18) > X.Sz()) bad += '!short'; if(X.U32(0x10) > X.Sz()-7) bad += '!badmetadata'; if(bad.length) sVersion += '/malformed'+bad; if(X.isVerbose()) { a = c = s = g = ti = y = ''; switch(nv) { case 0: case 1: case 2: p = X.U32(0x10); if(p > 0) sOptionT(X.SC(p,0x40,'Shift_JIS').replace('\\','¥')); pk = X.U32(0x0C); if(pk) { sVersion += ' compressed'; sOption("Please send this file over Telegram to @kaens, the detection author! It's unique and needs research") } break; case 3: ptags = X.U32(0x10); if(ptags > 6 && X.c("'[S98]'",ptags)) { ptags += 5; bUTF8 = X.c("EFBBBF",ptags); //if BOM's there if(bUTF8) tags = X.SC(ptags,0x200,'UTF8'); else tags = X.SC(ptags,0x200,'Shift_JIS'); tagl = tags.split('\x0A'); for (i=0; i < tagl.length; i++) { tag = tagl[i].split("="); switch (tag[0]) { case 'title': case 'title': ti = tag[1]; break; case 'game': case 'game': g = tag[1]; break; case 'system': case 'system': s = tag[1]; break; case 'artist': case 'artist': a = tag[1]; break; case 'year': case 'year': y = tag[1]; break; case 'copyright': case 'copyright': if(a=="") a = tag[1]; break; case 's98by': case 's98by': if(a=="") a = tag[1]; break; case 'comment': case 'comment': c = tag[1]; break; } } sOption(ti); sOption(a,'by: '); sOption(y, y.length < 4? "y'": 'y'); sOption(g,'for: '); sOption(s,'on: '); sOption(c); if(ptags > 6 && X.c("'[S98]'",ptags-5) && (t=X.fSig(ptags,0x300,"00")) > -1) sOption(outSz(t+1),'sz:') break } //if correct tag else if(ptags > 6) t = X.SC(ptags,0x40,'Shift_JIS').replace('\\','¥') //if it's some text—shouldn't happen in v3 }//switch nv }//isVerbose } else if(X.c("'SAP'0D0A") && (p=X.fSig(3,TOEOF,"0D0AFFFF")) >= 3 && X.U16(p+4) < X.U16(p+6)) { //ref https://asap.sourceforge.net/sap-format.html sName = "Adam Bienias's Slight Atari Player chiptune (.SAP)"; bDetected = 1; if(X.isVerbose()) { bad = false; t=""; a=""; dt=""; tp=""; tm=""; taghunk = X.SA(5,p); if(taghunk.length > 5) { tags = taghunk.split("\x0D\x0A"); for(i=0; i < tags.length; i++) { tagdiv = tags[i].indexOf(" "); tagl = tags[i].substr(0,tagdiv); tagr = tags[i].substr(tagdiv+1,tags[i].length); switch(tagl) { case "NAME": if(tagr != '""') t = tagr.substr(1,tagr.length-2); break; case "AUTHOR": if(tagr != '""') a = tagr.substr(1,tagr.length-2); break; case "DATE": if(tagr != '""') dt = tagr.substr(1,tagr.length-2); break; case "TYPE": sVersion = "t."+tagr; break; case "TIME": tm = tagr; break } } } if(bad) sVersion += "/malformed"; sOption(t); sOption(a,"by: "); sOption(dt,"'"); sOption(tm,"len: "); t = parseAtariBinary(p+2); sOption(t[1].length,'binblks:'); sOption(outSz(t[0]),'sz:') } } else if(X.c("'SC68 Music-file / (c) (BeN)jamin Gerard / SasHipA-Dev '00'SC68'........'SCFN'")) { sName = "SC 68000 programmatic chiptune (.SC68)"; bDetected = 1; if(X.isVerbose()) { hdrl = X.SA(0,0x100).length+1; p = hdrl; //header skipped t=''; a=''; cp=''; st=''; df=-1; x=0; ef=false; mn = []; while (p < X.Sz()) { hkhd = X.SA(p,4); hksz = X.U32(p+4,_LE); p += 0x08; //chunk header = 4xfourcc + 4xsize switch (hkhd) { case "SC68": if(hksz+hdrl != X.Sz()) sVersion = "malformed"; hksz = 0; break; case "SCFN": t = X.SC(p,hksz,'CP1252'); break; case "SCDF": df = X.U32(p,_LE)+1; break; case "SCMN": mn.push(X.SC('CP1252',p,hksz)); if(st=="" || df==mn.length) st = mn[mn.length-1]; break; case "SCAN": a = X.SC(p,hksz,'CP1252'); break; case "SCCN": cp = X.SC(p,hksz,'CP1252'); break; case "SCEF": ef = true; p = X.Sz(); break } p += hksz; } sOptionT(t); if(mn.length > 1) sOption(mn.length,"×"); sOptionT(mn.join(";")); sOptionT(a,"by: "); sOptionT(cp,"(c)"); sOption(outSz(p),"sz:") if(!ef) sVersion = "malformed!short" } } else if(X.c("'shro'020000")) { sName = "Mario Paint's Shroom module (.SHO)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(7,0x20)); sOptionT(X.SA(0x27,0x20),"by: ") } } else if(X.c("'PSID'") || X.c("'RSID'")) { v1 = X.SA(0,1); bDetected = 1; if(v1 == "P") sName = "PlaySID programmatic chiptune (.SID, .PSID)"; else sName = "RealSID programmatic chiptune (.SID, .RSID)"; v2 = X.U16(4,_BE); sVersion = "v"+Hex(v2); bad = ''; x = X.U16(0x0E,_BE); if(!isWithin(x, 1,256)) bad = bad.addIfNone('!badsubsongs'); else if(x > 1) sOption(x,"×"); startSong = X.U16(0x10,_BE); if(startSong > x) bad = bad.addIfNone('!badstartsong'); dataOfs = X.U16(0x06,_BE); if((v2 == 1 && dataOfs != 0x0076) || (v2 == 2 && dataOfs != 0x007C)) bad = bad.addIfNone('!baddatap'); loadAddr = X.U16(0x08,_BE); if(v1=="R" && isWithin(loadAddr, 1,0x07E7)) bad = bad.addIfNone('!badloadp'); initAddr = X.U16(0x0A,_BE); if(v1=="R" && !isWithinRanges(initAddr, [[0x7E8,0x9FFF], [0xC000,0xCFFF]])) bad = bad.addIfNone('!badinitp'); flags = X.U16(0x76,_BE); if(v1=="R" && ((flags >> 1) & 1) && initAddr > 0) bad = bad.addIfNone('!badinitp2'); sidn = 1; if(v2 == 0x4E) sidn += (dataOfs-0x7C) >> 1; else { if(v2 >= 3 && !((a2=X.U8(0x7A))&1) && !isWithinRanges(a2, [[0,0x41],[0x80,0xDF]])) sidn++; if(v2 >= 4 && !((a3=X.U8(0x7B))&1) && a2 != a3 && !isWithinRanges(a3, [[0,0x41],[0x80,0xDF]])) sidn++; } var sidt = [0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0]; //upto 16SID switch((flags >> 4) & 3) { case 1: sidt[0] = 1; break; case 2: sidt[0] = 2; break; case 3: sidt[0] = 3; break } if(v2 >= 3) switch((flags >> 6) & 3) { case 1: sidt[1] = 1; break; case 2: sidt[1] = 2; break; case 3: sidt[1] = 3; break; default: sidt[1] = sidt[0] } if(v2 == 0x4E) for(i=2,q=0x7C; i < sidn; i++,q+=2) switch((X.U16(q,_BE) >> 4) & 3) { case 1: sidt[i] = 1; break; case 2: sidt[i] = 2; break; case 3: sidt[i] = 3; break; default: sidt[i] = sidt[0] } else if(v2 >= 4) switch((flags >> 8) & 3) { case 1: sidt[2] = 1; break; case 2: sidt[2] = 2; break; case 3: sidt[2] = 3; break; default: sidt[2] = sidt[0] } if(sidn > 1) sVersion += "/"+sidn+"SID"; sidtt = [0, 0, 0, 0]; //count different chips for(i=0; i < sidn; i++) sidtt[sidt[i]]++; for(i=0; i < 4; i++) if(sidtt[i]) sVersion += ' #'+['unk','6581','8580','6581&8580'][i] + (sidtt[i]>1? '×'+sidtt[i]:''); switch((flags & 0x0C) >> 2) { case 1: sVersion += "/PAL"; break; case 2: sVersion += "/NTSC"; break; case 3: sVersion += "/PAL&NTSC"; break; } if(bad > 0) sVersion += "/malformed"+bad; if(X.isVerbose()) { t = X.SC(0x16,0x20,'CP1252'); if(t == "") t = ""; sOptionT(t); a = X.SC(0x36,0x20,'CP1252'); if(a == "") a = ""; sOptionT(a,"by: "); c = X.SC(0x56,0x20,'CP1252'); if(c == "") c = ""; sOptionT(c); } } else if(X.c("00 FF00FF00 9100FF00 FF008000 92..00967F 01", 0x07) && X.c("9908", 0x1542)) { sName = "Tony 'Nissimo' Willams' Sound Images module (.SIG)"; sVersion = 'gen.2'; bDetected = 1 } else if(X.c("0100FEFF09000000'ALIM3'")) { sName = "Ruben Ramos 'baktery' Salvador's Skale Tracker module (.SKM)"; bDetected = 1; if(X.isVerbose()) sOptionT(X.SA(0x19)); } else if(X.c("' 0x10 && X.U8(0xA) <= X.U8(7) && X.U8(0xB) <= 0x1E && isWithin(X.U8(0xC),0,0x78) && isWithin(X.U8(0xD),1,30) && isWithin(X.U8(0xE),1,30)) { //TODO RE reading additional data // blocks: SMP SYN BNK SNG BLK TMP sName = "BlueMoon's Sound Club for DOS module (.SN)"; bDetected = 1; if(!(ord=X.U8(7))) sVersion = 'malformed!0ord'; if(X.isVerbose()) { sOptionT(X.SA(0x0F,0x1A)); lp = X.U8(0xA); gvol = X.U8(0xB)*5; tx = X.U8(0xC); tpb = X.U8(0xD); bpms = X.U8(0xE); sOption('rhythm:'+tpb+'/'+bpms+' ord:'+X.U8(7)+' ins:'+X.U8(4)+' gvol:'+gvol+'%') } } else if(X.c("'SN2'") && isWithin(X.U32(0x13),0,0x78) && isWithin(X.U32(0x17),1,30) && isWithin(X.U32(0x1B),1,30) && X.c("'NAM'",0x1F) && X.c("'SEQ'",0x26+X.U32(0x22))) { sName = "Bluemoon's Sound Club for Windows module (.SN2)"; bDetected = 1; if(X.isVerbose()) { sOptionT(addEllipsis(X.SA(0x26,X.U32(0x22)))); sz = X.U32(3)+7; lp = X.U32(0x0F); tx = X.U32(0x13); tpb = X.U32(0x17); bpms = X.U32(0x1B); //TODO instead of a quartic approximated curve, find out the actual calculation lol tempop = Math.round(200 - tx*(4.27246 - tx*(0.0603477 + tx*(-0.000453202 + 1.33871*tx/1000000)))); p = 0x26+X.U32(0x22); ord = ptn = ins = 0; end = false; while(!end && p < X.Sz()) { hkhd = X.SA(p,3); hksz = X.U32(p+3); p += 7; switch(hkhd) { case 'PAT': ptn++; break; case 'SEQ': ord = Util.divu64(hksz,4); break; case 'INS': ins++; break; } p += hksz } sOption('rhythm:'+tpb+'/'+bpms+' tempo: '+tempop+'% ord:'+ord+(lp?' lp:'+lp:'') +' ptn:'+ptn+' ins:'+ins+' sz:'+outSz(sz)) } } else if(X.c("'SNDH'",0x0C) && (X.isHeuristicScan() || X.c("6000............6000"))) { //ref https://sndh.atari.org/files/sndhv21.txt sName = "Atari ST Sound Header module (.SND,.SNDH)"; sVersion = "uncompressed"; bDetected = 1; if(X.isVerbose()) { p = 0x10; title=artist=yr=""; totaltime = i = 0; x = 1; while(i < 10 && p < X.Sz()) { t = X.SA(p,4); if(t === "TIME") { for(j=0; j < x; j++) totaltime += X.U16(p+4+j*2,_BE); tlen = 4+x*2-1; if((p+tlen+1)%2) tlen++; } else { t = X.SA(p,Math.min(X.Sz()-p),0x100); tlen = t.length } if(tlen >= 4) { hd = t.substr(0,4); tag = t.substr(4,tlen); switch(hd) { case "TITL": if(tag.substr(0,7) != "Unknown") title = tag; break; case "COMM": if(tag.substr(0,7) != "Unknown") artist = tag; break; case "YEAR": yr = tag; break; case "HDNS": i = 8; break; default: if(/##\d\d/.test(hd)) x = hd.slice(2,4); else if(/#!\d\d/.test(hd)) if((p+tlen+1)%1) tlen++; break; } } p += tlen+1; i++ } sOptionT(title); if(x > "01") sOption(x,"×"); sOptionT(artist,"by: "); sOptionT(yr,"'"); if(totaltime) sOption(secondsToTimeStr(totaltime,"time:")); } } else if(X.c("'FMC!'")) { sName = "Lasse 'Faust' Öörni's Faust Music Creator module (.SNG)"; bDetected = 1; if(X.isVerbose()) sOptionT(X.SA(4,20)); } else if(/GTS[25!]/.test(X.SA(0,4)) && X.U8(0x64) <= 32) { //ref https://github.com/leafo/goattracker2/blob/a78e7e5273bfbeb17c3777b1f5ceb63b8e6b4667/src/gsong.c#L177 sName = "Lasse 'Faust' Öörni's GoatTracker module (.SNG)"; bDetected = 1; nV = X.U8(3)-0x30; if(nV < 0) nV = 1; if(nV >= 2) sVersion = 'v2.'+nV; else sVersion = 'v1.x'; x = X.U8(0x64); p = 0x65; ords = []; ptn = mptn = 0; bad = ''; for(ordc = 0; p < X.Sz(); ) { q = X.U8(p); if(!X.c("FF",p+q)) break; for(i=0, p++; i < q; i++) if((t=X.U8(p++)) <= 0xCF && t+1 > mptn) mptn = t+1; ordc++; ords.push(q); p++ } ch = 3; if(ordc == x*6) { sVersion += ' stereo'; ch = 6 } else if(ordc != x*3) bad = bad.addIfNone('!badordcnt'); if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); ins = nV >= 2? X.U8(p++): 31; inss = []; for(i=0; i < ins; i++) { t = X.SC(p+(nV > 1? 9: 8),0x10,'CP1250').trim(); if(t.length) inss.push(t); if(nV > 1) p += 0x19; else p += 0x18+2*(X.U8(p+7)>>1); } for(i=0; i < (nV == 1? 0: nV == 2? 3: 4); i++) p += 1+2*X.U8(p); //skip the tables ptn = X.U8(p++); for(i=0; i < ptn; i++) p += 1 + (nV == 1? 1: 4) * X.U8(p); if(nV == 1 && X.Sz() != p) p += 0x100; //the (optional?) filtertable at the end if(X.isVerbose()) { sOptionT(X.SC(4,0x20,'CP1250')); if(x > 1) sOption(x,'×'); sOptionT(X.SC(0x24,0x20,'CP1250'),'by: '); sOptionT(X.SC(0x44,0x20,'CP1250')); sOptionT(addEllipsis(inss.join(', '),0xA0),'ins/msg:"','"'); for(i=0, ordc = []; i < ords.length/ch; i++) { for(c = j = 0; j < ch; j++) c += ords[i*ch+j]; ordc.push(c) } sOption('ch:'+ch+' ord:'+ordc.join('+')+' ptn:'+(ptn == mptn? mptn: '/'+ptn)+' ins:'+ins+' sz:'+outSz(p)) } } else if(X.c("'ObsM'")) { sName = "Jonne Valtonen's SNG Player module (.SNG)"; bDetected = 1; if(X.U8(0x0B)) sVersion += "compressed"; len = X.U16(4,_LE); if(len>X.Sz()) sVersion += "malformed"; if(X.isVerbose()) { //ref https://github.com/adplug/adplug/blob/master/src/sng.cpp start = X.U16(6,_LE); loop = X.U16(8,_LE); delay = X.U16(0x0A,_LE); sOption("len:"+Hex(len)+" start:"+Hex(start)+" loop:"+Hex(loop)+" delay:"+delay) } } else if(X.c("'RJP'3.'SMOD'")) { sName = "Richard Joseph's module (.SNG)"; bDetected = 1; sVersion = "v"+X.SA(3,1) } else if(X.c("'SYNC'") || X.c("'SYNB'")) { sName = "Synder SNG-player module (.SNG)"; bDetected = 1; sVersion = "ver."+X.SA(3,1); if(X.isVerbose()) sOption(X.SA(0x10,0x200)) } else if(X.c("'SYND'....'S0'")) { sName = "Synder Tracker module (.SNG)"; bDetected = 1; //TODO unpack & read tags sVersion = "ver."+X.SA(3,1) //if(X.isVerbose()) sOption(X.SA(0x10,0x200)) } else if(X.c("'SYND'") || X.c("'SYNF'") || X.c("'SYNH'")) { sName = "Synder SNG-player Stereo module (.SNG)"; bDetected = 1; sVersion = "ver."+X.SA(3,1); if(X.isVerbose()) sOption(X.SA(0x10,0x200)) } else if(isWithin(t = ((X.U8(0)+1) << 4) + ((X.U8(1)+1) << 7) + 0x365,0x366,X.Sz()) && (/df\d:/.test(X.SA(t,4)) || /[sS]amples/.test(X.SA(t,7)))) { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/ZoundMonitor/src/ZoundMonitor_v1.asm sName = "AJ [Activas]'s ZoundMonitor module (.SNG + Samples/)"; bDetected = 1; if(X.isVerbose()) { ptn = X.U8(1)+1; ord = X.U8(3)+1; spd = X.U8(4); for(p=5,smp=0; p < 0x32F; p+=0x36) if(X.U8(p+4)) smp++; sOption('spd:'+spd+' ord:'+ord+' ptn:'+ptn+' smp:'+smp +' len '+secondsToTimeStr(1+Util.divu64(spd*ord*32,50))+' sz:'+outSz(t+101)) } } else if(X.c("'RJP'3. 0000 0000")) { sName = "Richard Joseph's module instruments (.INS)"; bDetected = 1; sVersion = "v"+X.SA(3,1) } else if(X.c("'SNES-SPC700 Sound File Data'")) { // ref http://snesmusic.org/files/spc_file_format.txt and snippets from // http://www.alpha-ii.com/Source/SAmp310s.rar/snes/id666.cpp, .h sName = "Nintendo SNES SPC chiptune (.SPC)"; bDetected = 1; sVersion = "v0."+X.U8(0x24); if(X.isVerbose()) { id666inhdr = X.U8(0x23)==0x1A; t=""; a=""; c=""; g=""; dumper=""; emu=""; preferBin = false; if(id666inhdr){ t = X.SA(0x2E,0x20); g = X.SA(0x4E,0x20); dumper = X.SA(0x6E,0x10); dumpdate = X.SA(0x9E,11); emu = X.U8(0xD2); if(emu>=0x30 && emu<=0x39) emu -= 0x30; switch(emu) { case 1: emu = "ZSNES"; break; case 2: emu = "Snes9x"; break; case 3: emu = "ZST2SPC"; break; case 4: emu = "ETC"; break; case 5: emu = "SNEShout"; break; case 6: emu = "ZSNESW"; break; default: emu = "" } c = X.SA(0x7E,0x20); slen = X.SA(0xA9,3); lp=X.SA(0xAC,4); if((slen+lp+dumpdate).length < 5) { chnDis = X.U8(0xD1); if(chnDis == 1 && emu == "") bin = true; else bin = preferBin; } else if( /[0-9/]*/.test(slen+lp+dumpdate) ) { //id666 text format songlen = Number(slen); //in seconds a = X.SA(0xB1,0x20); } else { bin = true; //check songlen bitness songlen = X.U8(0xA9)<<16+X.U8(0xAA)<<8+X.U8(0xAB); //in seconds a = X.SA(0xB0,0x20); } } else t = X.SA(0x30,0x14); sOption(t); sOption(g,"for: "); sOption(a,"by: "); sOption(c); if(emu != "") sVersion += " "+emu; } } else if(X.c("'STK1.0SONG'") && [1,2,3].indexOf(X.U8(0x34)) >= 0 && X.U8(0x35) <= X.U8(0x3A) && X.U8(0x36) <= X.U8(0x35) && X.U8(0x38) <= 0x3F && X.U8(0x39) <= 5) { // format details here: https://modland.com/pub/documents/format_documentation/STarKos%20(.sks).md sName = "Julien 'Targhan' Nevo's STarKos module (.SKS)"; bDetected = 1; bad = ""; switch(X.U8(0x39)) { case 0: hz = 13; break; case 1: hz = 25; break; case 2: hz = 50; break; case 3: hz = 100; break; case 4: hz = 150; break; case 5: hz = 300; break; default: hz = 0; bad = bad.addIfNone("!badRepFreq") } xpos = X.I8(0x37).toString(); if(xpos[0] != "-") xpos = "+"+xpos; spd0 = X.U8(0x38); ord = 1+X.U16(0x3A); ptn = -1; rows = ptnxpos = 0; p = 0x3C; for(i=0; i < ord*4; i++) { if((i%4) == 3) rows += X.U8(p)+1; else { t = X.U8(p); if(ptn < t) ptn = t; if(X.I8(p+1)>>1) ptnxpos++ } p += 2 } ptn++; insns = []; const ifHard = 0x80, ifPitch = 0x40, ifArp = 0x20, ifNoiseEtc = 0x10; for(ins = 0; p < X.Sz() && ins < 0x100; ins++) { insn = X.U16(p); p += 2; if(insn == 0xFFFF) break; ip = p; isz = X.U16(ip); p += 4; iend = 1+X.U8(p+2); p += 5; iname = X.SA(p,8).trim(); p += 8; if(iname != "") insns.push(iname); if(X.isDeepScan()) for(l = 0; l < iend; l++) { x = X.U8(p++); if(!x) continue; if((x & ifHard)) { y = X.U8(p++); if(x & 8) p++; if(y & 0x40) p++; if(x & 2) p++; if(x & 4) p += 2; if(x & 0x10) p += 2; if(x & 0x20) p += 2 } else { if(x & ifNoiseEtc) { y = X.U8(p++); if(y & 0x40) { p += 2; if(x & (ifArp | ifPitch)) { bad = bad.addIfNone("!badinsflags"); ins=l=0xFFFE; break } } } if(x & ifArp) p++; if(x & ifPitch) p += 2 } } else p = ip+isz; } for(sptn = 0; p < X.Sz(); sptn++) { curptn = X.U16(p); p += 2; if(curptn == 0xFFFF) break; p += X.U8(p) } if(X.isDeepScan()) notecnt = 0; if(p < X.Sz() && ins < 0xFFFE) for(i = 0; i <= ptn; i++) { curptn = X.U16(p); p += 2; if(curptn != 0xFF && curptn != 0xFFFF && curptn > 0x200) { bad = bad.addIfNone("!badnptn"); break } if(curptn == 0xFFFF) break; pp = p; psz = X.U16(pp); if(X.isDeepScan()) { p += 2; var pvol = pins = -1, lc = 0; while(p < Math.min(X.Sz(), pp+psz)) { var ppitch = 0, lnp = p, pfnote = pfvol = pfpitch = false; x = X.U8(p++); if(x == 0xFF) break; else if(x & 0x80) lc += x & 0x7F; else if(x >= 0x60) switch(x & 0xF) { case 0: pfvol = true; pfpitch = false; pvol = 0xF - X.U8(p++); if(pvol < 0) { bad = bad.addIfNone("!badptnvol0"); i = ptn; p = pp+psz; break; } case 1: pfvol = false; pfpitch = true; ppitch = - X.U8(p++); break; case 2: pfvol = pfpitch = true; pvol = 0xF - X.U8(p++); if(pvol < 0) { bad = bad.addIfNone("!badptnvol2"); i = ptn; p = pp+psz } ppitch = - X.U8(p++); break; case 3: pfnote = true; pnote = "rst"; break; case 4: pfnote = true; pnote = "spl"; pins = X.U8(p++); break; } else { pfnote = true; y = X.U8(p++); pfvol = !(y & 0x40); if(pfvol) pvol = 0xF - (y & 0xF); if(pins < 0 || !(y & 0x20)) pins = X.U8(p++); pfpitch = y & 0x10; if(pfpitch) ppitch = - X.I8(p++); } if(pfnote) notecnt++; lc++ } //single pattern cycle } else p = pp+psz; } //patterns cycle if(p > X.Sz()) bad = bad.addIfNone("!short"); if(bad != "") sVersion = sVersion.appendS("malformed"+bad,"/"); if(X.isVerbose()) { sOptionT(X.SA(0x14,0x20)); sOptionT(X.SA(0x0A,0x0A),"by: "); sOption("spd0:"+spd0+(xpos!="+0"?" xpos:"+xpos:"")+" ord:"+ord+" ptn:"+ptn+"+"+sptn+" ins:"+ins +(ptnxpos?" ptn.xpos:"+ptnxpos:"")+" smp.ch:"+X.U8(0x34)+" rep.freq:"+hz+"Hz" +" loop:"+(X.U8(0x36) ? Hex(X.U8(0x36))+"-" : "") +Hex(X.U8(0x35))+(X.isDeepScan()?" notes:"+notecnt:" rows:"+rows)+" sz:"+p) } }//.SKS else if(!X.U8(0) && X.c("'SK10'",0x80) && [1,2,3].indexOf(X.U8(0x86)) >= 0 && [13,25,50,100,150,300].indexOf(X.U16(0x87)) >= 0 && X.U16(0x18) == X.U16(0x40)) { //from https://web.archive.org/web/20240331033458_nf/https://www.grimware.org/doku.php/documentations/software/starkos/start#tweaking.the.song sName = "STarKos module (.BIN)"; sVersion = "compiled/ofs:80h"; bDetected = 1; crc = 0; for(i=0;i<67;i++) crc += X.U8(i); crc &= 0xFFFF; if(crc != X.U16(0x43)) sVersion += "/malformed!badCRC"; if(X.isVerbose()) { sOption(X.SA(1,8).trim()+"."+X.SA(9,3).trim()); sOption(X.U16(0x87)+"Hz"); sOption(Hex(X.U16(0x84)),"base:"); sOption(outSz(X.U24(0x40)+0xBC),"sz:"); } } else if(X.c("'Nu!SOPROL!'", 0x22)) { sName = "Holger Gehrmann's Sound Programming Language/SOPROL module (.SPL)"; bDetected = 1; if(X.isVerbose()) { t = X.SA(0x58,0x100); a = X.SA(0x58+t.length+1,0x100); c = X.SA(0x58+t.length+a.length+2,0x100); sOptionT(t); sOptionT(a,"by: "); sOptionT(c) } } if(/SPM[\x01-\x02]/.test(X.SA(0,4))) { //ref http://aminet.net/mus/edit/stonefree1.lha sName = "Emmanuel Marty & Michael Lavaire's Stonetracker module (.SPM)"; sVersion = "v"+X.U8(3); bDetected = 1; if(X.isVerbose()) { sOptionT(decAnsi(4,0x20,CPAmiga)); //TODO find chunks and read the extra info } } if(/SPS[\x01-\x02]{2}/.test(X.SA(0,5)) && X.c("'psn'",6+0x20*(smp=X.U8(5)))) { sName = "Emmanuel Marty & Michael Lavaire's Stonetracker sample bank (.SPS)"; sVersion = "v"+X.U8(3); bDetected = 1; if(X.isVerbose()) { for(i=smpsz=0,smps=[]; i < smp; i++) if((t=decAnsi(0x20*i+6,8,CPAmiga).trim()).length) smps.push(t); sOption(addEllipsis(smps.join(' ')),'smp/msg:"','"'); sOption('smp:'+smp) } } else if(X.c("'SPU'00") || X.c("'SPU1'") || (X.fSig(X.Sz()-6,TOEOF,"1D80FF"))>-1) { bDetected = 1; sName = "Eternal SPU chiptune (.SPU)"; if(X.c("'SPU'")) { if(!X.U8(3)) sVersion = "v0"; else sVersion = "v1"; } else sVersion = "headerless"; if(X.isVerbose() && (sVersion != "headerless")) { game = X.SC(4,0x40,"Shift_JIS"); title = X.SC(0x44,0x40,"Shift_JIS"); sOptionT(title); sOptionT(game, "game: "); artist = X.SC(0x84,0x20,"Shift_JIS"); sOptionT(artist,"by: "); cmt = X.SC(0xA4,0xF00,"Shift_JIS"); sOptionT(cmt); } } else if(X.c("'SPEEDY-SYSTEM'")) { bDetected = 1; sName = "Speedy System module (.SS)"; sVersion = "v1" } else if(X.c("'ZXAYST11'")) { sName = "Sound Tracker module (.ST1, .ST11)"; bDetected = 1; sVersion = "v1.1/uncompiled"; if(X.isVerbose()) { t_= X.U8(0x17); t = X.SA(0x18,t_-1).trim(); if(t != "Some SoundTracker Song") sOption(t); } } else if(X.c("'STP3'")) { sName = "Soundtracker Pro II module (.STP)"; bDetected = 1; } else if(X.c("48E7FFFE 4DFA.... 4A2E") && isWithin(X.I8(6),-1,6) && [0x61,0x66].indexOf(X.U8(0xC)) >= 0) { sName = "SUNtronic module (.SUN)"; bDetected = 1 } else if(X.c("'SVOX'00000000")) { sName = "SunVox module (.SUNVOX)"; bDetected = 1; if(X.isVerbose()) { p=8; t=''; bpm=0; spd=0; tme=0; ptn=0; blk=0; while (p < X.Sz()) { hkhd = X.SA(p,4); if(charStat(hkhd).indexOf('allasc') < 0) break; hksz = X.U32(p+4,_LE); p += 8; switch(hkhd) { case "VERS": nV = X.U32(p,_LE); aV=[]; for(i=0; i < 4; i++) aV[3-i] = (nV>>(8*i))&0xFF; sVersion += "v"+aV.join("."); break; case "BVER": nB = X.U32(p,_LE); if(nB != nV) { aV = []; for(i=0; i < 4; i++) aV[3-i] = (nB>>(8*i))&0xFF; sVersion += "/v"+aV.join("."); } break; case "NAME": t = X.SA(p,hksz); break; case "BPM ": bpm = X.U32(p,_LE); break; case "SPED": spd = X.U32(p,_LE); break; case "TIME": tme = X.U32(p,_LE); break; case "SNAM": blk++; break; case "PDTA": ptn++; break; } p += hksz; } sOptionT(t); if(bpm > 0) sOption(bpm,"bpm:"); if(spd > 0) sOption(spd,"spd:"); if(tme > 0) sOption(tme,"len:"); if(ptn > 0) sOption(ptn,"ptn:"); if(blk > 0) sOption(blk,"blk:"); sOption(outSz(p),'sz:') } } else if(X.c("'SymM'")) { //ref https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_symmod.cpp // & https://github.com/patricklyte/SymphonieFx sName = "Patrick Meng's Symphonie module (.SYMMOD)"; bDetected = 1; sVersion = "v"+X.U32(4,_BE); if(X.isVerbose()) { p=8; title=''; bpm='?'; done=false; ch=0; len=0; extsmp=false; pro=false; while (p < X.Sz()) { hkhd = X.I32(p,_BE); hkhx = Hex(X.U32(p,_BE)); hksz = 4; //_l2r('symmod',p,hkhd+' / '+hkhx) if(done || charStat(hkhd).indexOf('allasc') < 0) break; p += 0x04; //chunk header = 4xtype (the following will change by chunk type) switch (hkhd) { case -16: pklen=X.U32(p,_BE); hksz+=pklen; o=4; //InfoText RLE-COMPRESSED YO if(pklen>=10 && X.c(p+o,"'PACK'FFFF")) if(!X.isDeepScan()) { p = 0; break } else { o+=6; unplen = X.U32(p+o,_BE); o+=4; maxlen = pklen-10; if(0xFFFFFFFF/170 >= maxlen) maxlen *= 170; else maxlen = 0xFFFFFFFF; if(unplen > maxlen) unplen = maxlen; done = false; ofs = 0; left = unplen; while(!done && o < hksz) { tp = X.I8(p+o); o++; switch(tp) { case 0: l = X.U8(p+o); o++; if(left >= l) { t += X.SA(p+o,l); o += l; left -= l; } else done=true; break; case 1: l = X.U8(p+o); o++; dw = X.SA(p+o,4); o += 4; if(left >= l*4 && o < pklen) { left -= l*4; while(l--) t += dw; } else done = true; break; case 2: dw = X.SA(p+o,4); o += 4; if(left >= l*4 && o= l) left-=l; else done = true; break; case -1: done = true; break; default: sVersion += "/malformed"; done = true; break; }//switch } } else //if no RLE sig: title = X.SC(p+o,hksz,'CP1252'); break; case -1: ch = X.I32(p,_BE); break; //NumChannels case -2: len = X.I32(p,_BE); if(len > 1024) len = "malformed"; break; //TrackLength case -3: case -4: case -5: break; case -7: extsmp = true; break; //ExternalSamples case 10: case 11: case 12: pro=true; break; //Sample Boost/Detune/Phase case -6: bpm = Math.round(1.24*Math.min(X.I32(p,_BE),800)); break; //Tempo case -12: hksz = 0; break; //EmptySample case -10: case -11: case -13: case -14: case -15: case -17: case -18: case -19: case -20: case -21: hksz+=X.I32(p,_BE); break; default: _l2r('symmod',p,hkhd+"/"+hkhx+" ("+Hex(hksz,8)+"): ?!?!?!?!?!"); } p += hksz; } sOption(title); sOption('ch:'+ch+' bpm:'+bpm+' len:'+len+(done?'sz:'+outSz(p):'')); if(extsmp) sOption("extsmp"); if(pro) sVersion+="/Pro" } } else if(X.c("'Synth'") && !X.c("'esi'",5)) { sName = "C. 'Mr Soundwave' Herbst & B. MIkic/BrainTrace Design's Synthesis module (.SYN)"; bDetected = 1; if(X.c("'Synth'",0x1F0E)) { sVersion = "v"+X.SA(0x1F13,3); if(X.isVerbose()) { sOptionT(X.SA(0x1F32,0x1B)); sOptionT(X.SA(0x1F4E,0x100)) } } else { sVersion = "v"+X.SA(5,3); if(X.isVerbose()) { sOptionT(X.SA(0x24,0x1B)); sOptionT(X.SA(0x40,0x100)) } } } else if(X.c("'SYNTRACKER-SONG:'00")) { sName = "Bastian 'flink'/'twiCe' Spiegel's SynTracker module (.SYNMOD)"; bDetected = 1; if(X.isVerbose()) { t1 = X.SC(0x14,0x20,'CP1252'); sOptionT(t1,"title/inst: "); t2 = X.SC(0x34,0x20,'CP1252'); sOptionT(t2); t3 = X.SC(0x54,0x20,'CP1252'); sOptionT(t3); } } else if(X.c("'T0AST'")) { // ref T0AST.src.zip/ SoundEnginePlayer.pas, synth.pas // Kudos to BeRo for the tracker sources sName = "Benjamin 'BeRo' Rousseaux's The 0ok Amazing Synth Tracker module (.T0AST)"; bDetected = 1; if(X.c("'0OK'",5)) { nV = 1; sVersion = "v1"; } else if(X.c("010001",5)) { nV = 2; sVersion = "v2"; } else { nV = -1; sVersion = "v.unk"; } function info() { if(nV == 1) p = 0x1DA; else if(nV == 2) p = 0x34A; else return; drummode = X.U8(p++); chipmode = X.U8(p++); chs = X.U8(p++); ch = 0; if(chs > 16) { sVersion += "/malformed"; return; } for(i=0; i<16; i++) if(X.U8(p++)) { ch++; p += 3; } ins = 0; for(i=0; i<16; i++) if(X.U8(p++)) { ins++; p += 25; } ord = X.U16(p,_LE); p += 2+ord; ptn = 0; notes = 0; for(k=0; k<=255; k++) if(X.U8(p++)) { //gotta do what you gotta do ptn++; for(i=0; i 0 && t == X.I32(0x26,_BE) && t == X.I32(0x2A,_BE) && t == X.I32(0x2E,_BE) ) { sName = "Tim Follin & Mike D.'s Follin Player II module (.TF)"; sVersion = 'f.'+(X.U8(0) == 0x4E?'0':'1'); bDetected = 1 } else if(X.c("'TFMD'")) { sName = "Shiru's TFM Music Maker tune (.TFD)"; bDetected = 1; if(X.isVerbose()) { p = 4; t = X.SA(p,0x200); //I've seen CP1251 and CP936 already, nobody seems to care p = X.fSig(p,0x200,"00")+1; a = X.SA(p,0x200); p = X.fSig(p,0x200,"00")+1; c = X.SA(p,0x200); sOptionT(t); sOptionT(a,"by: "); sOptionT(c); } } else if(X.c("'TFMfmtV2'")) { // this format is very similar to VGE sName = "Shiru's TFM Music Maker module (.TFE)"; bDetected = 1; if(X.isVerbose()) { p = 0; //WELP, time to read the entire file, or at least the fun part x = [], tobuf = true, p = 0, b = 0x3F; // '?' by default. If this pops up, the file's garbled for(n=0, c = X.U8(p++); n < 0x223DD9 && p < X.Sz(); ) { // The logic is: // a byte is read and if it's not 0x80, put to buffer (and memorised) // if the following byte is 80, it's RLE: // - the following byte gives 7 bits of the number of repeats of the memorised byte // - if the length byte's bit 7 is set, this is the last byte, otherwise adds the next higher 7 bits // - if the length is 0, store 0x80 // - else store the memorised byte repeats-1 times if(tobuf && n > 0x312) tobuf = false; if(c != 0x80) { b = c; n++; c = X.U8(p++); if(tobuf) x.push(b) } else { c = X.U8(p++); next = true; reps = shl = 0; while (next && shl < 57 && p < X.Sz()) { //read the vari-len int next = !(c & 0x80); c &= 0x7F; reps |= Util.shlu64(c,shl); shl += 7; c = X.U8(p++) } if(!reps) { if(tobuf) x.push(0x80); n++ } //special case for the RLE character else { reps -= 1; n += reps; shl = 0; if(tobuf) for(j=0; j < reps; j++) x.push(b) } } } p--; spd1 = x[8]; spd2 = x[9]; intlv = x[0xA]; ord = x[0xB]; if(!ord) ord = 256; lp = x[0xC]; d1 = x[0x0D]+(x[0x0E] << 8); d2 = x[0x0F]+(x[0x10] << 8); saves = x[0x11]+(x[0x12] << 8); d1 = '20'+(d1&0x7F).padStart(2,'0')+'-'+(((d1>>7)&0xF)+1).padStart(2,'0')+'-'+(((d1>>11)&0x1F)).padStart(2,'0'); d2 = '20'+(d2&0x7F).padStart(2,'0')+'-'+(((d2>>7)&0xF)+1).padStart(2,'0')+'-'+(((d2>>11)&0x1F)).padStart(2,'0'); auth = decEncoding(x.slice(0x13,0x52),CP1251); //I've seen CP1251 and CP936 already, but yeah title = decEncoding(x.slice(0x53,0x94),CP1251); cmt = decEncoding(x.slice(0x93,0x214),CP1251); for(i=ptn=0; i < ord; i++) if(x[i+0x213]+1 > ptn) ptn = x[i+0x213]+1; sz = n == 0x223DD9 ? p : -1; if(sz < 0) sVersion = sVersion.appendS('malformed:'+Hex(n),'/'); sOptionT(title); sOptionT(auth,'by: '); sOptionT(cmt); sOption('on: '+d1+(d1 != d2? ' to '+d2: '')); sOption('spd:'+spd1+'/'+spd2+' ord:'+(lp?lp+'-':'')+ord+' ptn:'+ptn+" intlv:"+intlv+' saves:'+saves+(X.isDeepScan()? ' sz:'+outSz(sz):'')); } } else if(X.Sz() >= 0x386 && isWithin(X.U8(0x25),1,4) && (bin=parseAtariBinary())[0] > 0 && X.c("0E158D",6) && X.c("8D150E",0x1A) && X.U16(0x1D) == bin[1][0][1] && (X.c("'TMC SONG FILE 2.0'",9) || X.c("D4CDC3A0 D3CFCEC7A0 C6C9CCC5A0 B2AEB0",9))) { //ref http://atariki.krap.pl/index.php/TM2 sName = "Marcin 'Jaskier' Lewandowski's Theta Music Composer (.TM2)"; sVersion = 'v2.0'; bDetected = 1; bad = ''; // sOption(decAnsi(6,0x17,CPATASCII,0,Chars0to1FATASCII)) for(ins=0,p0=0x10000,p=0x86; p < 0x106; p++) { t = ((X.U8(p+0x280) << 8) | X.U8(p))-X.U16(2)+6; if(t < 0) break; if(t > 0) if(!isWithin(t,0x380,bin[1][0][1]+6)) bad = bad.addIfNone('!badinsp'); else { if(p0 > t) p0 = t; if(X.U8(t) != 0xFF) ins++ } } for(ptn=0,p=0x106; p < 0x206; p++) { t = ((X.U8(p+0x100) << 8) | X.U8(p))-X.U16(2)+6; if(t < 0) break; if(t > 0) if(!isWithin(t,0x380,bin[1][0][1])) bad = bad.addIfNone('!badptnp'); else { if(p0 > t) p0 = t; if(X.U8(t) != 0xFF) ptn++ } //some patterns may be actually used despite being empty } for(ord=(p0-0x386)/0x11,p=0x386,pt=-1; p < p0; p += 0x11) { for(q=p+1; q < p+0x11; q += 2) if(X.U8(q) >= pt) pt = X.U8(q)+1; //actually used pattern number if(isWithin(X.U8(p+16),0x41,0x7F)) bad = bad.addIfNone('!badord'); if(X.I8(p+16) <= 0) break //loop or end } if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { for(p=0x26, t=''; p < 0x86; p += 0x20) t = t.appendS(decAnsi(p,0x20,CPATASCII,0,Chars0to1FATASCII).trim(),' | '); sOption(t); if(!(t=X.U8(0x1F))) t = 'mono'; else if(isWithin(t,1,0x3F)) t = 'stereo'; else if(isWithin(t,0x40,0x7F)) t = 'RMT stereo'; else t = 'quadro'; sOption('ch:'+t+' spd0:'+X.U8(0x24)+' ticks:'+X.U8(0x25)+' ord:'+ord +' ptn:'+ptn+(pt!=ptn? '/'+pt:'')+' ins:'+ins+' sz:'+outSz(bin[0])) } } else if(X.c("0000050F0000050F0000050F0000050F0000050F0000050F0000050F0000050F0000050F0000050F0000050F0000050F", 0x14) && X.c("FFFF001000000030000000", 0x181)) { sName = "N.J. Luuring Jr.'s The Musical Enlightenment module (.TME)"; bDetected = 1; } else if(X.Sz() >= 0x3000 && X.c("'TRK01/TV.ES.'")) { sName = "Adam Davidson & Ramjet & Toxic Volume's RamTracker module (.TRK)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SC(0x0F,0x20,'CP850')); sOptionT(X.SC(0x2F,0x20,'CP850'),"by: "); p = 0x453; ptn = -1; ord = 0; for(;;) { t = X.U8(p++); if(t >= 0xFE || p > X.Sz()) break; ord++; if(ptn < t) ptn = t } ptn++; sOption("ord:"+ord+" ptn:"+ptn) } } else if(X.c("'S'8F'NG.'") && /[BW][48]/.test(X.SA(5,2)) && (pp=X.fSig(8,0x80*(ch=X.U8(6)-0x30),"DD48")) > 0 && !(pp % 2)) { //ref the eagleplayer BladePacker(?!) sName = "Unique Development/BladePacker's module (UDS.+SMP.)"; bDetected = 1; if(X.isVerbose()) { ptn = mptn = 0; maxp = Math.min(X.Sz(), 0x10000); bw = X.SA(5,1) == 'B'? 1: 2; ord = (pp-8) >> (bw+1); for(p = 8; p < pp; p++) if((t=X.U8(p)+1) > mptn) mptn = t; p += 2; t = 0; if(bw == 1) for(; X.U16(p,_BE) != 0xD8F1 && p < maxp; ) { //for() twice for speed opt if((q=X.U8(p++)) > t) t = q; if((q=X.U8(p++)) > t) t = q } else for(; (q=X.U16(p,_BE)) != 0xD8F1 && p < maxp; p += 2) if(q > t) t = q; ptnp = p; ptn = (p-pp-2) >> (bw+5); p += 2 + ((t+1) << 2); //if p > Sz undetect sz = p; //subsongs @f732: p = o = x = 0; a2 = pp+2; _f742: for(; p < maxp; ) { p = 8 + o * ch; if(p != pp) { a0ch = a0 = p+ch; o++; _f756: for(; p < maxp; ) { a0 = pp+2+(X.U8(p++) << (bw+5)); _f76a: for(d6 = 0x40; d6 && p < maxp; ) { if(bw == 1) d1 = X.U8(a0++); else { d1 = X.U16(a0,_BE); a0 += 2 } d1 <<= 2; if([0x2C,0x20].indexOf(X.U8(ptnp+4+d1)) >= 0) { x++; continue _f742 } else { if(--d6) continue _f76a; if(p != a0ch) continue _f756; else continue _f742; } } } } else break _f742; } if(!x) x = 1; if(x > 1) sOption(x,'×'); sOption('ch:'+ch+' ord:'+ord+' ptn:'+(mptn==ptn?'':mptn+'/')+ptn+' sz:'+outSz(sz)) } } else if((X.Sz() > 0x133) && X.c("'MAS_UTrack_V00'") && isWithin(X.U8(0xE),0x31,0x34) && X.Sz() > X.U8(0x2F)*0x20+0x50) { //ref https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_ult.cpp sName = "Marc 'MAS' Schallehn's UltraTracker module (.ULT)"; bDetected = 1; nV = X.U8(0xE)-0x30; sVersion = 'v'+['<1.4','1.4','1.5','1.6'][nV-1]; bad = ''; msgn = X.U8(0x2F); p = 0x30+msgn*0x20; smp = X.U8(p++); smpsz = 0; smps = []; for(i=0; i < smp; i++) { t = X.SC(p,0x20,'CP437').trim(); if(t != '') smps.push(t); ssz = X.U32(p+0x38) - X.U32(p+0x34); if(ssz < 0) bad = bad.addIfNone('!badsmpsz'); else smpsz += ((X.U8(p+0x3D)&4)? 2: 1)*ssz; //16-bit flag if(nV >= 4) p += 0x42; else p += 0x40; } for(i=ord=mp=0; i < 0x100; i++) if((o=X.U8(p++)) < 0xFE) { ord++; if(mp < o) mp = o } ch = X.U8(p++)+1; ptn = X.U8(p++)+1; mp++; p += ch; for(c=notes=0; c < ch; c++) for(t=0; t < ptn && p < X.Sz(); t++) { row = 0; while(row < 64) { rp = 1; b = X.U8(p++); if(b == 0xFC) { rp = X.U8(p++); b = X.U8(p++) } note = isWithin(b,1,96); p += 4; if(rp+row > 64) rp = 64-row; if(!rp) break; row += rp; if(note) notes += rp; } } if(p > X.Sz()) bad = bad.addIfNone('!short'); sz = p + smpsz; if(bad != '') sVersion = sVersion.appendS('/malformed'+bad,'/'); if(X.isVerbose()) { sOptionT(X.SC(0x0F,0x20,'CP437')); specialmsg = (msgn==23&&sz==297221&&ch==7&&ord==20&&ptn==29&&smp==17&¬es==1572); //Handleless - :) falling and flying :(.ult for(p=0x30,i=0,msg=[]; i < msgn; i++) { t = decAnsi(p,0x20,CP437,Chars0to1F); if(!specialmsg) t = t.trim(); if(t != '') msg.push(t); p += 0x20 } msg = addEllipsis(msg.join(specialmsg?'\n':' '), specialmsg?0x2000:0xC0, specialmsg?0x2000:0xA0); sOption(msg, 'msg:'+(specialmsg?'\n':'"'), specialmsg?'\n':'"'); if(!msg.length) sOption(addEllipsis(smps.join(','),0x80,0x60),'smp/msg:"','"'); sOption('ch:'+ch+' ord:'+ord+' ptn:'+mp+(ptn!=mp?'/'+ptn:'') +' smp:'+smp+' notes:'+notes+' sz:'+outSz(sz)) } } else if(X.c("'VGEfmtV'") && isWithin(nV=X.U8(7)-0x30,1,3)) { // this format is similar to TFM Music Maker sName = "Shiru's VGM Music Maker module (.VGE)"; bDetected = 1; sVersion = 'v'+nV; ord = -1; //TODO determine whether to unpack from 0 or 0x10, and RE v1 if(X.isVerbose()) { p = 0; ptn = 1; n = next = 0; tobuf = true; x = []; if(nV > 1) for(c = X.U8(p++); n < 0x6E59D1 && p < X.Sz(); ) { //see description in .TFM if(tobuf && n > 0x327) tobuf = false; if(c != 0x80) { b = c; n++; c = X.U8(p++); if(tobuf) x.push(b) } else { c = X.U8(p++); if(nV == 1 && !c) { x.push(0x80); n++; c = X.U8(p++); continue } next = true; reps = shl = 0; while (next && shl < 57 && p <= X.Sz()) { //read the vari-len int next = !(c & 0x80); c &= 0x7F; reps |= Util.shlu64(c,shl); shl += 7; c = X.U8(p++) } if(!reps) { if(tobuf) x.push(0x80); n++ } //special case for the RLE character else { reps--; n += reps; shl = 0; if(tobuf) for(i=0; i < reps; i++) x.push(b) } } } else p = 1; p--; switch(nV) { // case 1: // n/a for now: the compression seems to be kinda quirky, the algo fails // spd1 = x[0x10]; spd2 = x[0x11]; intlv = x[0x12]; // d1 = x[0x14]+(x[0x15] << 8); d2 = x[0x16]+(x[0x17] << 8); saves = x[0x18]+(x[0x19] << 8); // ord = x[0x1B]; lp = x[0x1C]; // break; case 2: spd1 = x[0x10]; spd2 = x[0x11]; intlv = x[0x12]; d1 = x[0x14]+(x[0x15] << 8); d2 = x[0x16]+(x[0x17] << 8); saves = x[0x18]+(x[0x19] << 8); ord = x[0x1B]; lp = x[0x1C]; break; case 3: spd1 = x[0x1A]; spd2 = x[0x1B]; intlv = x[0x1C]; ord = x[0x25]; lp = x[0x26]; d1 = x[0x1F]+(x[0x20] << 8); d2 = x[0x21]+(x[0x22] << 8); saves = x[0x23]+(x[0x24] << 8); break } if(nV != 1) { //TODO VGE does something different here if(ord > 1) for(i=0; i < 255; i++) if((t=x[0x227+i])+1 > ptn) ptn = t+1; d1 = '20'+(d1&0x7F).padStart(2,'0')+'-'+(((d1>>7)&0xF)+1).padStart(2,'0')+'-'+(((d1>>11)&0x1F)).padStart(2,'0'); d2 = '20'+(d2&0x7F).padStart(2,'0')+'-'+(((d2>>7)&0xF)+1).padStart(2,'0')+'-'+(((d2>>11)&0x1F)).padStart(2,'0'); } else { d1 = d2 = spd1 = spd2 = intlv = saves = '?'; lp = 0 }; //TODO same auth = decEncoding(x.slice(0x27,0x67),CP1251); //I've seen CP1251 and CP936 already, but yeah title = decEncoding(x.slice(0x67,0xA7),CP1251); cmt = decEncoding(x.slice(0xA7,0x227),CP1251); sz = n == 0x6E59D1? p : -1; sOptionT(title); sOptionT(auth,'by: '); sOptionT(cmt); sOption('on: '+d1+(d1 != d2? ' to '+d2: '')); sOption('spd:'+spd1+'/'+spd2+' ord:'+(lp?lp+'-':'')+ord+' ptn:'+ptn +' intlv:'+intlv+' saves:'+saves+' sz:'+outSz(sz)); } } else if( X.c("'Vgm '") && X.Sz() >= (eof = X.U32(4)+4) && (nV = X.U32(8)) && nV < 0x300 //give'em time tho && ( !X.U32(0x14) || X.c("'Gd3 '",X.U32(0x14)+0x14) )) { //ref https://vgmrips.net/wiki/VGM_Specification // & https://vgmrips.net/wiki/GD3_Specification bDetected = 1; bad = ''; nV = 1000*(nV>>12)+100*((nV>>8)&0xF)+10*((nV>>4)&0xF)+(nV&0xF); //BCD be like... sName = "Video Game Music chiptune stream (.VGM)"; eoh = X.U32(0x34)+0x34; if(nV < 150 || eoh == 0x34) eoh = 0x40; if(nV >= 150 && eoh < 0x40) bad = '!dataofs'; sVersion = "v"+(nV/100).toFixed(2); if(X.isVerbose()) { tags = []; //11 of them gd3p = X.U32(0x14,_LE)+0x14; if(gd3p > 0x14) if(X.SA(gd3p,4) === "Gd3 ") { sVersion += "/Gd3 v"+(X.readBytes(gd3p+4,4).join("")/100); taglen = X.U32(gd3p+8,_LE); gd3p += 12; if(gd3p+taglen > X.Sz()) bad = bad.addIfNone('!tagsz'); i = 0; while(i < 11 && gd3p <= X.Sz()) { tpos = X.fSig(gd3p,TOEOF,"0000"); if(tpos >= 0) { tags[i] = X.SU16(gd3p,taglen); gd3p += tags[i].length*2+2; } else { tags[i] = ""; gd3p += 2 } i++; } if(i < 11) bad = bad.addIfNone('!tagnum'); else tagn = Math.max(0,i-1); sOption(slashTag(tags[0],tags[1])); sOption(slashTag(tags[6],tags[7]),"by: "); sOption(slashTag(tags[2],tags[3]),"for: "); sOption(slashTag(tags[4],tags[5]),"on: "); sOption(tags[8],"date: "); sOption(tags[9],"ripper: "); sOption(tags[10],"notes: ") } smp = X.U32(0x18); if(!smp) bad = bad.addIfNone('!badlen'); lp = X.U32(0x1C)+0x1C; lpsmp = X.U32(0x20); if(lp >= eof || lpsmp > smp) {lp = 0; bad = bad.addIfNone('!badloop') } rate = X.U32(0x24); if(nV > 100) if(!rate) rate = 'n/a'; else if(rate == 50) rate += 'Hz(PAL)'; else if(rate == 60) rate += 'Hz(NTSC)'; else rate += 'Hz'; chips = [[0xC,'SN76489',0], [0x10,'YM2413',0], [0x2C,'YM2612',110], [0x30,'YM2151',110], [0x38,'SegaPCM',151], [0x40,'RF5C68',151], [0x44,'YM2203',151], [0x48,'YM2608',151], [0x4C,'YM2610/B',151], [0x50,'YM3812',151], [0x54,'YM3526',151], [0x58,'Y8950',151], [0x5C,'YMF262',151], [0x60,'YM278B',151], [0x64,'YMF271',151], [0x68,'YMZ280B',151], [0x6C,'RF5C164',151], [0x70,'PWM',151], [0x74,'AY8910',151], [0x80,'GameBoyDMG',161], [0x84,'NES_APU',161], [0x88,'MultiPCM',161], [0x8C,'uPD7759',161], [0x90,'OKIM6258',161], [0x98,'OKIM6295',161], [0x9C,'K051649/K052539',161], [0xA0,'K054539',161], [0xA4,'HuC6280',161], [0xA8,'C140',161], [0xAC,'K053260',161], [0xB0,'Pokey',161], [0xB4,'QSound',161], [0xB8,'SCSP',171], [0xC0,'WonderSwan',171], [0xC4,'VSU',171], [0xC8,'SAA_1099',171], [0xCC,'ES5503',171], [0xD0,'ES5505/ES5506',171], [0xD8,'X1-010',171], [0xDC,'C352',171], [0xE0,'GA20',171], [0xE4,'Mikey/Atari_Lynx',172] ]; chipn = 0; xhdr = 0; if(nV >= 170) { t = X.U32(0xBC); if(t) xhdr = t+0xBC; if(xhdr) { xhdsz = X.U32(xhdr); if(!xhdsz) { xhdr = 0; bad = bad.addIfNone('!badxhdr') } } } for(i=0; i < chips.length; i++) { if(chips[i][0] >= eoh || (xhdr && chips[i][0] > xhdr)) break; clk = X.U32(chips[i][0]); b30 = Util.shru64(clk,30); b31 = b30 >> 1; b30 &= 1; clk &= 0x3FFFFFFF; if(nV < chips[i][2] || !clk) continue; chipn++; //_log('@'+Hex(chips[i][0])+' b30:'+b30+' b31:'+b31+' clk:'+clk); chip = chips[i][1]; //tentatively switch(chips[i][0]) { //all the devils in the details case 0xC: if(b30 && b31) chip = 'T6W28'; if(nV <= 151 && !(X.U8(0x2B)&4)) chip += "/GGStereo"; break; case 0x10: if(nV <= 101 && clk > 5000000) chip = 'YM2612'; break; case 0x2C: if(nV >= 151) if(b31) chip = 'YM3438'; if(nV <= 101) { clk1 = X.U32(0x10)&0x3FFFFFFF; if(clk1 > 5000000) clk = clk1 } break; case 0x30: if(nV >= 151) if(b31) chip = 'YM2164'; if(nV <= 101) { clk1 = X.U32(0x10)&0x3FFFFFFF; if(clk1 < 5000000) clk = clk1 } break; case 0x4C: if(b31) chip = 'YM2610B'; else chip = 'YM2610'; break; case 0x74: switch(X.U8(0x78)) { case 0: break; case 1: chip = 'AY8912'; break; case 2: chip = 'AY8913'; break; case 3: chip = 'AY8930'; break; case 4: chip = 'AY8914'; break; case 0x10: chip = 'YM2149'; break; case 0x11: chip = 'YM3439'; break; case 0x12: chip = 'YMZ284'; break; case 0x13: chip = 'YMZ294'; break; default: chip += "-ish" } break; case 0x84: if(b31) chip += '/FDS'; break; case 0x90: if(X.U8(0x94)&8) chip += '12bit'; else chip += '10bit'; break; case 0x9C: if(b31) chip = 'K052539'; else chip = 'K051649'; break; case 0xA8: switch(X.U8(0x96)) { case 0: chip = 'C140+NamcoSystem2'; break; case 1: chip = 'C140+NamcoSystem21'; break; case 2: chip = '219_ASIC+NamcoNA-1/2'; break; default: chip += "-ish" } break; case 0xCC: chip += ':'+X.U8(0xD4)+'ch'; break; case 0xD0: if(b31) chip = 'ES5506'; else chip = 'ES5505'; chip += ':'+X.U8(0xD5)+'ch'; break; } sVersion = sVersion.appendS(chip/*+'@'+clk*/,'#'); } volmod = -1; if(eoh > 0x7C) { volmod = X.U8(0x7C); if(volmod > 0xC0) volmod -= 0x100; if(volmod == -63) volmod = -64; volmod = (2^(volmod/0x20))*100; volmod = Math.round(volmod)+'%' } if(chipn > 2) bad = bad.addIfNone('!toomanychips'); if(eof < X.Sz()) if(X.SA(eof,4) == "Vgm ") sOption("multisong"); else sOption("+extra data"); sOption('rate: '+rate+' len: '+secondsToTimeStr(Util.divu64(smp+22000,44100))+(lp?' looped':'') +(volmod !== -1 && volmod !== ' 100%'?' vol: '+volmod:'')+(xhdr?' xhdr':'') +' sz:'+outSz(eof)) } if(bad != '') sVersion = sVersion.appendS("malformed"+bad,'/') } else if(X.Sz() > 0x8C2 && X.c("0033'T1'") && [1,2].includes(X.U8(4)) && X.U8(5) <= 1 && X.U8(6) <= 10 && !X.U16(7) && X.U8(9) && X.U8(0xC) <= X.U8(0xB)) { //ref http://www.kahlin.net/daniel/victracker/vt-2.0/fileformat.txt sName = "Daniel Kahlin's VIC-TRACKER module (.VT)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(0x19E,0x10)); //TODO? https://c64os.com/post/Vic20C64SuperChart x = 0; minst = 0xFFF; maxed = 0; for(p=0xA; p < 0x42; p+=4) { if(!X.U8(p+1)) continue; minst = Math.min(minst,X.U8(p)); maxed = Math.max(maxed,X.U8(p+1)); x++ } for(ptn=0,p=0x3C2; p < 0x7C2; p++) ptn = Math.max(X.U8(p),ptn); ptn++; if(x > 1) sOption(x,'×'); sOptionT(X.SA(0x1AE,0x10),"by: "); sOptionT(X.SA(0x1BE,0x10),"'"); sOption('ptn:'+ptn+' sz:'+outSz(0x8C2+0x40*ptn)) } } else if(X.fSig(X.Sz()-0x20,TOEOF,"'VSS0'00") > -1) { //TODO thaaat's not a good way to detect a thing... sName = "Tomas Partl's Voodoo Supreme Synthesizer audio (.VSS)"; bDetected = 1 } else if(X.c("6000") && X.c("48E7FFFE610000",0x04) && X.c("4CDF7FFF'Nu'",0x0C)) { sName = "Wally Beben's module (.WB)"; bDetected = 1 } else if(X.c("'WSRF'",X.Sz()-0x20) && X.c("EA",X.Sz()-0x10)) { //ref http://daifukkat.su/docs/wsman/#wsr sName = "WonderSwan R programmatic chiptune (.WSR)"; bDetected = 1; p = X.Sz()-0x20; sVersion = "v"+X.U8(p+4); if(X.isVerbose()) { sOption(Hex(X.U8(p+0x18)),"CartID:") pub = X.U8(p+0x16); switch(pub) { case 0: sOption("(invalid publisher)"); break; case 1: sOption("Bandai"); break; case 2: sOption("Taito"); break; case 3: sOption("Tomy"); break; case 4: sOption("Koei"); break; case 5: sOption("Data East"); break; case 6: sOption("Asmik Ace"); break; case 7: sOption("Media Entertainment"); break; case 8: sOption("Nichibutsu"); break; case 0x0A: sOption("Coconuts Japan"); break; case 0x0B: sOption("Sammy"); break; case 0x0C: sOption("Sunsoft"); break; case 0x0D: sOption("Mebius"); break; case 0x0E: sOption("Banpresto"); break; case 0x10: sOption("Jaleco"); break; case 0x11: sOption("Imagineer"); break; case 0x12: sOption("Konami"); break; case 0x16: sOption("Kobunsha"); break; case 0x17: sOption("Bottom Up"); break; case 0x18: sOption("Kaga Tech"); break; case 0x19: sOption("Sunrise"); break; case 0x1A: sOption("Cyber Front"); break; case 0x1B: sOption("Mega House"); break; case 0x1D: sOption("Interbec"); break; case 0x1E: sOption("Nihon Application"); break; case 0x1F: sOption("Bandai Visual"); break; case 0x20: sOption("Athena"); break; case 0x21: sOption("KID"); break; case 0x22: sOption("HAL Corporation"); break; case 0x23: sOption("Yuki Enterprise"); break; case 0x24: sOption("Omega Micott"); break; case 0x25: sOption("Layup"); break; case 0x26: sOption("Kadokawa Shoten"); break; case 0x27: sOption("Shall Luck"); break; case 0x28: sOption("Squaresoft"); break; case 0x2B: sOption("Tom Create"); break; case 0x2D: sOption("Namco"); break; case 0x2E: sOption("Movic(?)"); break; case 0x2F: sOption("E3 Staff(?)"); break; case 0x31: sOption("Vanguard"); break; case 0x32: sOption("Megatron"); break; case 0x33: sOption("Wiz"); break; case 0x34: sOption("Capcom"); break; default: sOption("(unknown publisher)") } sOption(X.U8(p+5),"1sttrk: "); } } else if(X.c("3026b2758e66cf11a6d900aa0062ce6c")) { //TODO organise to a non-module file sName = "Windows Media (.WMV/WMA)"; bDetected = 1 } else if(X.c("'XAD!'")) { sName = "Riven the Mage's Exotic AdLib module (.XAD)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(0x04,0x24)); sOptionT(X.SA(0x28,0x24),"by: "); } } else if(X.c("'Extended Module: '") && X.c("1A",0x25) && isWithin(X.U16(0x48),1,256)) { //ref https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_xm.cpp et al. V = X.U16(0x3A); charset = 'CP437'; sName = "Fast Tracker 2 Extended module (.XM)"; bDetected = 1; text = tracker = mVlsw = bad = ""; insns = []; smpns = []; hdrp = 0x3C; hdrsz = X.U32(hdrp); restartp = X.U16(hdrp+6); flags = X.U16(hdrp+0x0E); linearSlides = flags & 1; xFilter = flags & 0x1000; ord = X.U16(hdrp+4); chn = X.U16(hdrp+8); ptn = X.U16(hdrp+0x0A); ins = X.U16(hdrp+0x0C); tmp0 = X.U16(hdrp+0x10); bpm0 = X.U16(hdrp+0x12); var ptnhdp = p = hdrp+hdrsz; if(V >= 0x104) for(i=0; i < ptn; i++) p += X.U32(p)+X.U16(p+7); const verUnknown = 0, verOldModPlug = 1, verNewModPlug = 2, verMPfBiDi = 4, verOpenMPT = 8, verConfirmed = 0x10, verFT2Generic = 0x20, verOther = 0x40, verFT2Clone = 0x80, verPlayerPRO = 0x100, verDigiTrakker = 0x200, verUNMO3 = 0x400, verEmptyOrders = 0x800; var isMadTracker = isOMPTMade = isOXM = mixlevCompatFT2 = false; madewith = verUnknown; if(X.c("'FastTracker v2.00 '",0x26) && hdrsz === 276) { //version detection pt.1/9001 if(V < 0x104) madewith = verFT2Generic | verConfirmed; else if((t=X.fSig(0x11,0x14,"00")) >= 0) { //song title space or zero padded? if(restartp) madewith = verFT2Clone | verNewModPlug | verEmptyOrders; else if(t == 0x24) // just the last character's zero madewith = verFT2Clone | verNewModPlug | verPlayerPRO | verEmptyOrders; else if(firstNotOf(t+1,0x24-t,0x20) < 0) // space-padded ascii-z?! madewith = verPlayerPRO | verConfirmed; else madewith = verFT2Clone | verNewModPlug | verEmptyOrders; } else if(restartp) madewith = verFT2Generic | verNewModPlug; else madewith = verFT2Generic | verNewModPlug | verPlayerPRO; } else if(X.c("'FastTracker v 2.00 '",0x26)) madewith = verOldModPlug; else { madewith = verUnknown | verConfirmed; tracker = X.SC(0x26,0x14,charset).trim(); if(X.c("'OpenMPT '",0x26)) madewith = verOpenMPT | verConfirmed | verEmptyOrders; else if(X.c("'MilkyTracker '",0x26)) { if(!X.c("' '",0x32)) mixlevCompatFT2 = true } else if(X.c("'Fasttracker II clone'",0x26)) madewith = verFT2Generic | verConfirmed; else if(X.c("'MadTracker 2.0'00",0x26)) { isMadTracker = true; if(X.c("00000000",0x35)) tracker = 'MadTracker 2'; else tracker = 'MadTracker 2 (registered)' } else if(X.c("'*Converted '",0x26) && X.c("'-File*'",0x34)) { madewith = verDigiTrakker | verConfirmed; tracker = 'Digitrakker' } } if(xFilter && (madewith & verNewModPlug)) madewith = verFT2Clone | verNewModPlug | verConfirmed | verEmptyOrders; //back on track smp = smpReserved = 0; insp = p; anyADPCM = anyInsSmp = false; sflags = []; smpsz = lastsmphdsz = lastinstp = lastsmpreserved = -1; if(!ord && !verEmptyOrders) ord = 1; //a fix for dark lighthouse.xm for(i=0; i < ins; i++) { if(p+4 > X.Sz()) { bad = bad.addIfNone('!short'); break } ihdsz = X.U32(p); if(!ihdsz) ihdsz = 263; instp = X.U8(p+0x1A); inst = X.SC(p+4,0x16,'CP437').trim(); if(inst.length) insns.push(inst); smpn = X.U16(p+0x1B); smphdsz = X.U32(p+0x1D); if(madewith == verOldModPlug) { madewith |= verConfirmed; if(ihdsz == 245) { mVlsw = "1.00.00.A5"; tracker = "ModPlug Tracker 1.0 alpha" } else if(ihdsz == 263) { mVlsw = "1.00.00.B3"; tracker = "ModPlug Tracker 1.0 beta" } else madewith = verUnknown | verConfirmed; } else if(!smpn) { if(ihdsz == 263 && !smphdsz && (madewith & verNewModPlug)) madewith |= verConfirmed; else if(ihdsz != 29 && (madewith & verDigiTrakker)) madewith &= ~verDigiTrakker; else if((madewith & (verFT2Clone|verFT2Generic)) && ihdsz != 33) madewith = verUnknown; if(ihdsz != 33) madewith &= ~verPlayerPRO; else if(smphdsz > 40 && (madewith & verPlayerPRO)) { if(anyInsSmp || (lastsmphdsz != -1 && smphdsz != lastsmphdsz)) madewith = verPlayerPRO | verConfirmed; lastsmphdsz = smphdsz } } if(lastinstp == -1) lastinstp = instp; else if(lastinstp != instp && (madewith & verFT2Generic)) { madewith &= ~verFT2Generic; madewith |= verFT2Clone; } vls = X.U8(p+40+0xC3); vle = X.U8(p+40+0xC4); vef = X.U8(p+40+0xC8); pls = X.U8(p+40+0xC6); ple = X.U8(p+40+0xC7); pef = X.U8(p+40+0xC9); midichecks = X.U8(p+40+0xD0) | X.U8(p+40+0xD1) | X.U16(p+40+0xD2) | X.U8(p+40+0xD6); p += ihdsz; smp += smpn; if(p > X.Sz()) { bad = bad.addIfNone("!short"); break } if(V >= 0x104) sflags = []; var ssizes = [], slens = 0; if(smpn) { anyInsSmp = true; if(midichecks) madewith &= ~(verOldModPlug | verNewModPlug | verPlayerPRO); if(ihdsz != 0x107 || instp) madewith &= ~verPlayerPRO; if(!(madewith & verConfirmed) && (madewith & verPlayerPRO)) if(!(vef & 4) && vls == 0xFF && vle == 0xFF || !(pef & 4) && pls == 0xFF && ple == 0xFF) { madewith &= ~verNewModPlug; madewith |= verConfirmed } for(j=0; j < smpn; j++) { slen = ssizes[j] = X.U32(p); //lpst @ p+4, lpsz @ p+8, vol0 @ p+0xC, relnote @ p+0x10 var sft = X.I8(p+0xD), sf = X.U8(p+0xE), sp = X.U8(p+0x0F), sr = X.U8(p+0x11), sname = X.SC(p+0x12,22,'CP437'), snt = sname.trim(); smpReserved |= sr; smpns.push(snt); isADPCM = (sr === 0xAD) && !(sf&0x30); //flags sample16bit=10h and sampleStereo=20h if(sr && sr != 0xAD) madewith &= ~(verOldModPlug | verNewModPlug | verOpenMPT); if(lastsmpreserved == -1) lastsmpreserved = sr; else if(lastsmpreserved != sr) madewith &= ~verPlayerPRO; if(sp != 128) madewith &= ~verPlayerPRO; if((sft&0xF) && sft != 127) madewith &= ~verPlayerPRO; sflags.push([sf, isADPCM]); if(isADPCM) anyADPCM = true; slens += isADPCM ? 16+(slen+1 >> 1) : slen; p += 40; //not smphdsz; considering there are files with smphdsz = 0... if((madewith & (verFT2Generic | verFT2Clone)) && (madewith & (verNewModPlug | verPlayerPRO)) && !(madewith & verConfirmed) && (sr > 22 || sname.slice(sr).indexOf(' ') < 0)) { madewith &= ~verFT2Generic; madewith |= verFT2Clone | verConfirmed } if((sf&3) === 3 && (madewith & verNewModPlug)) madewith |= verMPfBiDi; } //read the instrument's samples info smpsz += slens; if(V >= 0x104) { if(X.c("'OggS'",p)) isOXM = true; p += slens } } //if smpn } //for i in ins if(!smpReserved && (madewith & verNewModPlug) && X.fSig(0x11,0x14,"00") > -1) madewith |= verConfirmed; if(V < 0x104) { for(i=0; i < ptn; i++) p += X.U32(p)+X.U16(p+(V == 0x102 ? 6 : 7)); if(X.c("'OggS'",p)) isOXM = true; p += smpsz } basesz = p; if(tracker == "") { if((madewith&verDigiTrakker) && !smpReserved && (lastinstp ? lastinstp : -1) == -1) tracker = "Digitrakker"; else if(madewith&verFT2Generic) tracker = "FastTracker 2 or compatible"; else tracker = "Unknown" } //catch plugins, settings, messages from various XM flavours fx = 0; xt = ""; while(p+6 < X.Sz()) { t = X.SA(p,4); it = X.U32(p); if(it && X.U16(p+4) && (t === "228\x04" || (it & 0x80808080) || !(it & 0x60606060))) { //I haven't seen files with that to see how that goes so we'll just cut here! break } if(t === "text") { t = X.U32(p+4); p += 8; xt = xt.append("t"); text = X.SC(p,t,'CP437').trim(); p += t; madewith &= ~verPlayerPRO; madewith |= verConfirmed } else if(/F[0-9X]\d\d/.test(t)) { t = X.U32(p+4); if(p+8+t <= X.Sz()) { p += 8+t; fx++ } madewith |= verConfirmed } else if(t === "MIDI") { t = X.U32(p+4); madewith &= ~verPlayerPRO; madewith |= verConfirmed; if(p+8+t <= X.Sz()) { p += 8+t; xt = xt.append("m") } } else if(t === "CHFX" || t === "CNAM" || t === "PNAM") { t = X.U32(p+4); if(p+8+t <= X.Sz()) p += 8+t; madewith &= ~verPlayerPRO; madewith |= verConfirmed } else if(t === "XTPM") { p += 4; xt = xt.append("x"); madewith &= ~verPlayerPRO; madewith |= verConfirmed; isOMPTMade = true; t = X.SA(p,4); while(p+7 < X.Sz()) { if(!X.U8(p)) { p++; break } code = X.SA(p,4); icode = X.U32(p); if(code === "STPM" || code === "228\x04" || (icode & 0x80808080) || !(icode & 0x60606060)) break; prsz = X.U16(p+4); p += 6; for(i=0; i < ins; i++) p += prsz } } else if(t === "STPM") { p += 4; xt = xt.append("s"); madewith &= ~verPlayerPRO; madewith |= verConfirmed; while(p+6 < X.Sz()) { if(!X.U8(p)) { p++; break } if(X.c("'VWSL'",p)) { v = 0; function itV(v) { return v.slice(0,1)+'.'+v.slice(1,3)+'.'+v.slice(3,5)+'.'+v.slice(5,7) } switch(X.U16(p+4)) { case 1: v = X.U8(p+6); break; case 2: v = X.U16(p+6); break; case 3: v = X.U24(p+6); break; case 8: v = X.U64(p+6); break; default: v = X.U32(p+6) } if(v) mVlsw = itV(v.toString(16).toUpperCase().padStart(7,'0')); break; } p += 6+X.U16(p+4) } } else break; } if(madewith & verConfirmed) if(madewith & verMPfBiDi) { mVlsw = "1.11"; tracker = "ModPlug Tracker 1.0-11"; } else if((madewith & verNewModPlug) && !(madewith & verPlayerPRO)) { mVlsw = "1.16"; tracker = "ModPlug Tracker 1.0-16"; } else if((madewith & verNewModPlug) && (madewith & verPlayerPRO)) { mVlsw = "1.16"; tracker = "ModPlug Tracker 1.0-16 / PlayerPRO"; } else if(!(madewith & verNewModPlug) && (madewith & verPlayerPRO)) tracker = "PlayerPRO"; if(X.c("'OpenMPT '",0x26)) { mVlsw = X.SA(0x2E,12).trim(); madewith = verOpenMPT|verConfirmed; } if(isOMPTMade && mVlsw < "1.17") mVlsw = "1.17"; if(mVlsw >= "1.17") tracker = "OpenMPT v"+mVlsw; sz = p; charset = (mVlsw != "" || isMadTracker) ? 'CP1252' : 'CP437'; if(X.isVerbose()) { sOptionT(X.SC(0x11,0x14,charset)); sOptionT(tracker,"in:"); if(isOXM) sOption("OggMod FastTracker 2 (.OXM)","via:"); if(text.length) sOption(addEllipsis(text,0x100)); if(insns.length) sOption(addEllipsis(insns.filter(funSampleName).join(' '),0x100),'ins/msg:"','"'); if(smpns.length) sOption(addEllipsis(smpns.filter(funSampleName).join(' '),0x100),'smp/msg:"','"') var info = 'chn:'+chn+' ord:'+ord+' ptn:'+ptn+' ins:'+ins+' smp:'+smp; if(fx) info += ' fx:'+fx; if(xt.length) info += ' xt:'+xt; if(sz != basesz) info += " base_sz:"+basesz; info += " sz:"+outSz(sz); sOption(info) } sVersion = "v"+(V>>8)+"."+(V&0xFF)+bad+(anyADPCM?"/ADPCMpacked":""); } else if(X.c("'FORM' 0000000E 'XDIRINFO' 00000002 .... 'CAT ' ........ 'XMIDFORM' ........ 'XMID'")) { bDetected = 1; sName = "Extended MIDI chiptune (.XMI,.C55,.PCS)"; if(X.isVerbose()) { if((x=X.U8(0x14)) > 1) sOption(x,'×') sOption(outSz(0x1E+X.U32(0x1A,_BE)),'sz:') } } else if(X.c("'ofTAZ!'")) { sName = "Davey W. Taylor's Extra Simple Music module (.XSM)"; bDetected = 1 } else if(/YM\d!/.test(X.SA(0,4)) || X.c("'YM3b!'") || /YMT\dLeOnArD!/.test(X.SA(0,0xC)) || X.c("'MIX1LeOnArD!'")) { //ref https://github.com/cpcsdk/libstsound/blob/master/Ymload.cpp bDetected = 1; bad = ''; frm = smp = voc = loop = ddn = 0; sName = "ST-Sound chiptune stream (.YM)"; sV = X.SA(0,4).replace(/!/g,""); switch(sV) { case "YM1": sVersion = "YM1"; break; case "YM2": sVersion = "MADMAX specific"; break; case "YM3": sVersion = "YM-Atari"; break; case "YM3b": sVersion = "YM-Atari+loopinfo"; loop = X.U32(X.Sz()-4,_LE); break; case "YM4": sVersion = "YM-Atari extended"; break; case "YM5": case "YM6": sVersion = "Generic YM2149 extended"; break; case "MIX1": sVersion = "Atari Remix digital"; break; case "YMT1": case "YMT2": sVersion = "YM-Tracker"; break; } if(["YM2","YM3","YM3b"/*,"YM4"*/].indexOf(sV) >= 0) //No YM4 in the wilderness, ignoring frm = Util.divu64(X.Sz()-4,14); if(["YM5","YM6","YMT1","YMT2","MIX1"].indexOf(sV) >= 0) { if(X.SA(4,8)!="LeOnArD!") bad = bad.addIfNone('!badsig'); if((["YM6!","YMT1","YMT2"].indexOf(sV) >=0) && (X.SA(X.Sz()-4)!="End!")) bad = bad.addIfNone('!badfilesz'); //if(sV==="YM4") p=0x1C; else if(["YM5","YM6"].indexOf(sV) >= 0) { ddn = X.U16(0x14,_BE); loop = X.U32(0x1C,_BE); p = X.U16(0x20,_BE)+0x22; for(i=0; i < ddn; i++) { ds = X.U16(p,_BE); p += 2+ds; if(p >= X.Sz()) {bad = bad.addIfNone('!tooshort'); break} } } else if(sV === "MIX1") { p = 0x18; smp = X.U32(0x10,_BE); mixblk = X.U32(0x14,_BE); for(i=0;i= 0) { ddn = X.U16(0x18,_BE); voc = X.U16(0x0D,_BE); frm = X.U32(0x10,_BE); p = 0x1E; } //read the three tags from here if(p>=X.Sz()) bad = bad.addIfNone('!nodata'); else { t = p; t_ = X.fSig(p,TOEOF,"00")-p; if(t_ >= 0) { p += t_+1; a = p; a_ = X.fSig(p,TOEOF,"00")-p; p += a_+1; c = p; c_ = X.fSig(p,TOEOF,"00")-p; p += c_+1; if(["YM5","YM6"].indexOf(sV) >= 0) if(!X.c("'End!'",p+((frm = X.U32(0xC,_BE)) << 4))) { bad = bad.addIfNone('!badframes'); sOption("frm/frames: "+(frm<<4)+"/"+(X.Sz()-p-4)) } } } if(X.isVerbose()) { sOptionT(X.SA(t,t_)); sOptionT(X.SA(a,a_),"by: "); sOptionT(X.SA(c,c_)); } } if(X.isVerbose()) { if(voc) sOption(voc,"voc:"); if(smp) sOption(outSz(p+smp),'sz:'); if(ddn) sOption(ddn, "digidrums:") if(frm) sOption('len:'+frm+' sz:'+outSz(p+(frm<<4)+4)); } if(bad != '') sVersion= sVersion.appendS('malformed'+bad,'/') } else if(X.c("'YMST'")) { sName = "Nicolas 'Mr.Styckx' Pomarede's MYST ST-YM module (.YMST,.YM)"; bDetected = 1; if(X.isVerbose()) { for(i=0,p=4; i < 48; i++) { p += 8; if(!X.U16(p-8,_BE)) break } t = p; t_ = X.fSig(p,TOEOF,"00")-p; if(t_ >= 0) { p += t_+1; a = p; a_ = X.fSig(p,TOEOF,"00")-p; p += a_+1; c = p; c_ = X.fSig(p,TOEOF,"00")-p; if(X.isVerbose()) { sOptionT(X.SA(t,t_)); sOptionT(X.SA(a,a_),"by: "); sOptionT(X.SA(c,c_)); } } } } // pure signature detection end // AND NOW, // THE HEAVIEST STUFF GOES DOWN HERE // THE SANITY CHECK-STYLE DETECTION // (* It's still hella fast tho, no worries) function isAYAmadeus() { //the underlying format is the same as FXM //ref https://vgmrips.net/wiki/AY_File_Format if(!X.c("'ZXAYAMAD'") || X.U8(9) > 3) return false; authp = 0x0C+X.I16(0x0C,_BE); if(authp < X.Sz()) auth = authp?X.SA(authp,0x100):''; else return false; miscp = 0x0E+X.I16(0x0E,_BE); if(miscp < X.Sz()) misc = miscp?X.SA(miscp,0x100):''; else return false; x = X.U8(0x10)+1; p = 0x12+X.I16(0x12,_BE); if(p > X.Sz()) return false; titles = []; for(i=0; i < x; i++,p+=4) if(t = p+X.I16(p,_BE)) if(t < X.Sz()) titles.push(X.SA(t,0x100).trim()); else return false; return true } if(!bDetected && isAYAmadeus()) { sName = "František Fuka/Fuxoft's AY Amadeus module (.AMAD)"; sVersion = [X.U8(8)?'Rel '+X.U8(8):'', X.U8(9)?'Plr '+X.U8(9):''].join(' ').trim(); if(X.isVerbose()) { sOptionT(titles.join(',')); if(x > 1) sOption(x,'×'); if(authp) sOptionT(auth,'by: '); if(miscp) sOptionT(misc); } } function isAYEmul() { // ref https://vgmrips.net/wiki/AY_File_Format if(!X.c("'ZXAYEMUL'") || X.U8(9) > 3) return false; authp = 0x0C+X.I16(0x0C,_BE); if(authp < X.Sz()) auth = authp?X.SC(authp,0x100,'CP1250'):''; else return false; miscp = 0x0E+X.I16(0x0E,_BE); if(miscp < X.Sz()) misc = miscp?X.SC(miscp,0x100,'CP1250'):''; else return false; x = X.U8(0x10)+1; p = 0x12+X.I16(0x12,_BE); if(p > X.Sz()) return false; titles = []; for(i=0; i < x; i++,p+=4) if(t = p+X.I16(p,_BE)) if(t < X.Sz()) titles.push(X.SC(t,0x100,'CP1250').trim()); else return false; return true } if(!bDetected && isAYEmul()) { sName = "Sergej Bulba's AY Emul chiptune (.EMUL)"; bDetected = 1; sVersion = [X.U8(8)?'Rel '+X.U8(8):'', X.U8(9)?'Plr '+X.U8(9):''].join(' ').trim(); if(X.isVerbose()) { sOptionT(titles.join(',')); if(x > 1) sOption(x,'×'); if(authp) sOptionT(auth,'by: '); if(miscp) sOptionT(misc); } } function isBobsAdlib() { if(!X.c("'CBMF'")) return false; //ref https://github.com/adplug/adplug/blob/master/src/bam.cpp // & https://rpg.hamsterrepublic.com/ohrrpgce/BAM_Format p = 4; notes = ins = 0; var songend = false, m = Math.min(X.Sz(), 0x10000), v = []; for(i=0; i < 16; i++) v[i] = false; while(!songend && p < m) { while(!songend && (b=X.U8(p++)) < 0x80 && p < m) if(isWithin(b, 1,0xF) || isWithin(b, 0x40,0x4F) || isWithin(b, 0x71,0x7E)) return false; //per draft 3 else switch(b>>4) { case 0: if(!X.isHeuristicScan()) songend = true; break; //this isn't guaranteed! case 1: if(!v[b-0x10]) return false; p++; notes++; break; //start note case 2: break; //stop note case 3: v[b-0x30] = true; p += 11; break; //define ins case 5: break; //set label case 6: p++; break; //jump case 7: //end of chorus default: break; } //if b >= 0x80 it's a pause } if(!X.isHeuristicScan()) { if((!songend && m < X.Sz()) || notes < 0x10) return false; //we'll ignore the "zero at the start" stupid files unless you really want them, but then the detection becomes much worse for(i=0; i < 16; i++) if(v[i]) ins++; if(!ins) return false; // } return true } if(!bDetected && isBobsAdlib()) { sName = "Bob's Adlib Music module (.BAM)"; bDetected = 1 sOption('ch:'+ins+' notes:'+notes+' sz:'+outSz(p)) } function isCMF() { if(!X.c("'CTMF'")) return false; if(!isWithin(X.U16(4),0x100,0x101) || !isWithin(X.U16(8),0x25,X.Sz()-1)) return false; //ref https://github.com/adplug/adplug/blob/master/src/cmf.cpp // & https://moddingwiki.shikadi.net/wiki/CMF_Format nV = X.U16(4,_LE); ic = 0 /*invalid values for heuristics*/; bad = ''; pins = X.U16(6,_LE); pmus = X.U16(8,_LE); //instruments, music ptr if(pmus <= pins) {ic++; bad = bad.addIfNone('!badptr') } if(nV >= 0x101) { p = 0x28; ins = X.U16(0x24) } else { p = 0x25; ins = X.U8(0x24) } if((t=Util.divu64(pmus-pins,0x10)) != ins) { ic++; bad = bad.addIfNone('!inconsistentinscnt'+t) } tp = X.U16(0x0E,_LE); if(tp && !isWithin(tp,p,pins-1)) { tp = 0; ic++; bad = bad.addIfNone('!badptr') } ap = X.U16(0x10,_LE); if(ap && !isWithin(ap,p,pins-1)) { ap = 0; ic++; bad = bad.addIfNone('!badptr') } cp = X.U16(0x12,_LE); if(cp && !isWithin(cp,p,pins-1)) { cp = 0; ic++; bad = bad.addIfNone('!badptr') } ch = 0; for(i=0x14; i < 0x24; i++) { if((t=X.U8(i)) == 1) ch++; else if(t > 1) ic++} if(!ch) ic++; sz = X.fSig(pmus,Math.min(0x10000,X.Sz()),"FF2F00"); if(sz < 0) { sz = X.fSig(pmus,Math.min(0x10000,X.Sz()),"FF2FFE"); bad = bad.addIfNone('!badeof')} if(sz > 0) sz += 3; return ic < 5 } if(!bDetected && isCMF()) { sName = "Creative Labs' Creative Music Format chiptune (.CMF)"; bDetected = 1; sVersion = "v"+(nV>>8)+"."+(nV&0xFF); if(bad != '') sVersion += "/malformed"+bad; if(X.isVerbose()) { if(tp) sOptionT(addEllipsis(X.SC(tp,0x100,'CP437'))); if(ap) sOptionT(addEllipsis(X.SC(ap,0x100,'CP437')),"by: "); if(cp) sOptionT(addEllipsis(X.SC(cp,0x100,'CP437'))); if(nV >= 0x101 && X.U8(sz) == 0xFF) sz++; //a lot of v1.1 CMFs end in FF, enough to be significant? sOption('ch:'+ch+' ins:'+ins+' sz:'+outSz(sz)) } } function isDSym() { //ref https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_dsym.cpp // & https://sourceforge.net/p/xmp/libxmp/ci/master/tree/src/loaders/sym_load.c if(X.Sz() < 90 || !X.c("02011313 1412010B") || X.U8(8) > 1 || !isWithin(ch=X.U8(9), 1,8) || (ord=X.U16(0xA)) > 4096 || (ptn=X.U16(0xC)) > 4096) return; var infolen = X.U24(0x0E), smpsz = [], smpnsz = []; smp = 0; p = 0x11; for(i=0; i < 63; i++,p++) { smpnsz[i] = X.U8(p); if(!(X.U8(p) & 0x80)) { smp++; smpsz[i] = X.U24(p+1); p += 3 } } title = X.UCSD(p); p += 1+X.U8(p); var ac = X.readBytes(p,8); p += 8; if(p > X.Sz()) return; //TODO? lzw unpacking and whatnot return true } if(!bDetected && isDSym()) { sName = "Oregan Developments' Digital Symphony module (.DSYM)"; sVersion = 'v'+X.U8(8); bDetected = 1; if(X.isVerbose()) { sOptionT(title); sOption('ch:'+ch+' ord:'+ord+' ptn:'+ptn+' smp:'+smp); } } function isDigitalFM() { //ref https://verhaagr.home.xs4all.nl/dfm.zip / dfm.pas if(!X.c("'DFM'1A") || X.U8(4) > 1 || [0,1,0x63].indexOf(X.U8(5)) < 0 || X.U8(6) > 0x20 || !isWithin(tmp0=X.U8(0x27), 5,0x1F)) return; inss = []; for(i=0,p=0x28; i < 32; i++,p+=12) if(X.U8(p) > 11) return; else inss.push(X.UCSD(p)); p += 0x160; for(ord=ptn=i=0; i < 128 && X.U8(p+i) != 0x80; i++,ord++) ptn = Math.max(ptn,X.U8(p+i)+1); for(i++; i < 128; i++) if(X.U8(p+i)) return; p += 0x80; optn = X.U8(p++); //from here the original code ignores the pattern count and just keeps reading patterns until EoF! for(rptn=next=0; rptn < optn && p < X.Sz(); rptn = next+1) { next=X.U8(p++); for(i=0; i < 64*9; i++) if(X.U8(p++) & 0x80) p++ } return true } if(!bDetected && isDigitalFM()) { sName = "Rene Verhaag's Digital-FM module (.DFM)"; sVersion = 'v'+X.U8(4)+'.'+X.U8(5).padStart(2,'0'); bDetected = 1; if(X.isVerbose()) { sOptionT(X.SC(7,32,'CP1252')); sOptionT(addEllipsis(inss.filter(funSampleName).join(' ')),'ins/msg:"','"'); sOption('ch:'+X.U8(6)+' tmp0:'+tmp0+' ord:'+ord +' ptn:'+(ptn!=optn?ptn+'/':'')+(rptn!=optn?rptn+'/':'')+optn+' sz:'+outSz(p)); } } function isDRO() { //ref https://github.com/ValleyBell/libvgm/blob/master/player/droplayer.cpp if(!X.c("'DBRAWOPL'")) return; if((t = X.U32(8)) & 0xFF00FF00) { sVersion = 'v0'; mV = MV = 0 } else if(!(t & 0x0000FFFF)) { mV = X.U16(8); MV = X.U16(0xA) } else { MV = X.U16(8); mV = X.U16(0xA) } if(MV > 3) return; //we only know about v2 but it may happen one day if(MV) sVersion = 'v'+MV+'.'+mV.padStart(2,'0'); db = ''; switch(MV) { case 0: db = 'DOSBox 0.62'; lenMS = X.U32(8); dtsz = X.U32(0xC); hw = X.U8(0x10); dtofs = 0x11; //fallthrough case 1: if(MV == 1) { db = 'DOSBox 0.63'; lenMS = X.U32(0xC); dtsz = X.U32(0x10); hw = (t=X.U32(0x14)) <= 0xFF ? t : 0xFF; dtofs = 0x18; } if(hw == 1) hw = 2; else if(hw == 2) hw = 1; fmt = 0; co = 0; break; case 2: db = 'DOSBox 0.73'; dtsz = X.U32(0xC) << 1; lenMS = X.U32(0x10); hw = X.U8(0x14); fmt = X.U8(0x15); co = X.U8(0x16); ds = X.U8(0x17); dl = X.U8(0x18); regcmdcnt = X.U8(0x19); dtofs = 0x1A+regcmdcnt; if(regcmdcnt > 0x80) regcmdcnt = 0x80; regmap = X.readBytes(0x1A,regcmdcnt); //scan init block if(hw == 1) { p = dtofs; opl3on = 0; reginit = []; for(i=0; i < 0x200; i++) reginit[i] = false; while(p < X.Sz()) { t = X.U8(p); if(t == ds || t == dl) break; if((t & 0x7F) >= regcmdcnt) break; creg = ((t & 0x80) << 1) | regmap[t & 0x7F]; reginit[creg] = true; if(creg == 0x105) opl3en = X.U8(p+1); p += 2 } if(reginit[0x105] && (opl3en & 1)) hw = 2; } hw = ['YM3812 (OPL2)', 'YM3812 (Dual OPL2)', 'YMF262 (OPL3)'].indexOf(hw); if(hw === -1) hw = 'YMF262(portshift)'; } return true } if(!bDetected && isDRO()) { sName = "DOSBox Raw OPL chiptune (.DRO)"; sVersion = sVersion.appendS(hw,'#'); bDetected = 1; if(X.isVerbose()) { sOption('len: '+secondsToTimeStr(Util.divu64(lenMS+500,1000))+' via: '+db+' packed:'+co +' sz:'+outSz(dtofs+dtsz)) } } function isFunktracker() { if(X.Sz() < 0x8FF || !X.c("'Funk'")) return false; //ref https://sourceforge.net/p/xmp/libxmp/ci/master/tree/docs/formats/FORMAT.FunktrackerGOLD sz = X.U32(8); if(!isWithin(sz,0x8FF,0x100000)) return false; t = X.U32(4); sV = X.SA(0x0C,4); bad = ''; sus = 0; if(/F2\d\d/.test(sV)) sversion = "R2 GOLD "+(1980+((t>>9)&0x7F))+"-" +((t>>5)&0xF).padStart(2,'0')+"-"+(t&0x1F).padStart(2,'0')+" "; else sversion = "R1"; if(/F[2vk]\d\d/.test(sV)) ch = X.SA(0x0E,2); else { sversion += "b"; ch = 8; sus++ } switch((t>>20)&0xF) { case 1: case 2: t = "IBM"; break; case 3: t = "Intel 386"; break; case 4: t = "Intel 486"; break; case 5: t = "Pentium"; break; case 6: t = "Linux"; break; case 7: t = "FreeBSD"; break; case 8: t = "N/A"; break; default: t = "unk.system" } sversion += "#"+t; switch((t>>16)&0xF) { case 0: t = "SB 2.0"; break; case 1: t = "SB Pro"; break; case 2: t = "GUS+ch.pan"; break; case 3: t = "SB compatible"; break; case 4: t = "SB 16"; break; case 5: t = "GUS"; break; case 6: t = "conversion"; break; case 7: t = "Pro Audio Spectrum"; break; case 8: t = "Voxware /dev/dsp 8 bit"; break; case 9: t = "Voxware /dev/dsp 16 bit"; break; case 15: t = "unk.soundcard"; break; default: t = "soundcard N/A" } sversion += ":"+t; if(!X.isVerbose() && X.Sz() < sz) bad = bad.addIfNone('!short'); ord = 0; ptn = -1; for(i = 0; i < 256; i++) { t = X.U8(0x11+i); if(t == 0xFF) break; ord++; if(t > 0x79) if(X.isHeuristicScan()) { bad = bad.addIfNone("!badord") } else return false; else if(t > ptn) ptn = t; } ptn++; lp = X.U8(0x10); if(lp != 0xFF && lp > ord) bad += "!badloop"; smp = sus = 0; smps = []; for(i = 0x190; i < 0x8BF; i += 0x20) { if(!isWithin(X.U8(i),1,0x4F)) return false; //vol if(X.U32(i+0x18)) smp++; //length if(charStat(X.readBytes(i+1,0x13),1).indexOf('allasc') < 0) sus++; if(sus > 3) return false smps.push(X.SC(i+1,0x13,'CP437').trim()) //smp name; charset TBD } return true } if(!bDetected && isFunktracker()) { sName = "Jason Nunn's Funktracker module (.FNK,.Funk)"; sVersion = sversion; bDetected = 1; if(bad != "") sVersion += "/malformed"+bad; if(X.isVerbose()) { bpm = X.U8(4); bits = bpm&1 ? 16 : 8; bpm >>= 1; var sine = bpm >> 6; bpm &= (1<<6)-1; if(sine) bpm = 125-bpm; else bpm = 125+bpm; sOptionT(addEllipsis(smps.filter(funSampleName).join(' ')),'smp/msg:"','"'); sOption('ch:'+ch+' bpm0:'+bpm+' ord:'+(lp!=0xFF?lp+'~':'')+ord+' ptn:'+ptn +' smp:'+smp+' ' +bits+'bit sz:'+outSz(sz)) } } function isPreTracker() { //ref https://git.platon42.de/chrisly42/PretrackerRaspberryCasket/src/branch/main/src/raspberry_casket.asm lines 257+ if(!X.c("'PRT'") || !isWithin(ins=X.U8(0x40), 1,0x40)) return; if(!isWithin(nV=X.U8(3), 10,50)) return; if(nV < 30) if(!(ptn=[X.U8(0x3D)])[0] || !(ord=[X.U8(0x3E)])[0] || (lp=[X.U8(0x3C)])[0] > ord[0]) return; x = 1; p = 0x5A; ptnp = []; if(nV >= 30) x = X.U8(p++); if(!x) return; if(nV >= 30) { ord = []; lp = []; ptn = []; } var steps = []; for(i=0; i < x; i++) { lp.push(X.U8(p++)); ptn.push(X.U8(p++)); steps.push(X.U8(p++)); ord.push(X.U8(p++)); ptnp.push(X.U32(p,_BE)); p += 4; //_l2r('prt',i,'ord:'+lp[i]+'-'+ord[i]+' ptn:'+ptn[i]+' steps:'+steps[i]+' +pp:'+Hex(ptnp[i])) p += ord[i]*4*2; //if(!ord[i] || ptnp[i] < 0x5B+8) return for(i=0; i < x; i++) ptnp[i] += p; mpp = (function(){var i=ptnp.indexOf(Math.max.apply(null,ptnp));return [ptnp[i],steps[i]];}()); //_l2r('prt',p,outArray(ptnp,16)+' s'+outArray(steps,16)+' ->'+outArray(mpp,16)) } //ptn data //_l2r('prt',p,'ptn') //p = mpp[0]+3*mpp[1]; //_l2r('prt',p,outArray(X.readBytes(p,6),16)) // TODO: Pink's PreTracker WIP return X.Sz() > p } if(!bDetected && isPreTracker()) { sName = "Manfred 'Pink' Linzner's PreTracker module (.PRT)"; bDetected = 1; if(nV < 25) sVersion = "v<0.3"; else if(nV == 25) sVersion = "v0.3~0.866"; else if(nV == 26) sVersion = "v0.87~0.92"; else if(isWithin(nV, 27,29)) sVersion = "v.[0.93~1.5)"; else if(nV == 30) sVersion = "v1.5+"; else sVersion = "v.TODO"; if(X.isVerbose()) { sOptionT(X.SA(0x14,0x14)); if(x > 1) sOption(x,'×'); sOptionT(X.SA(0x28,0x14),"by: "); sOption('ord:'+(lp?lp+'-':'')+ord+' ptn:'+ptn+' ins:'+ins+' wf:'+(wf=X.U8(0x41))) } } function isComebackTracker() { //ref REing PreTracker 1.5 which has CBT beta import routines if(X.Sz() < 0x64 || !X.c("'CBT'") || !isWithin(nV=X.U8(3), 1,12)) return; // ecx = 0x10; eax = ecx+1; max = Math.min(0x10000,X.Sz()); // while(X.U8(ecx++)); return true } if(!bDetected && isComebackTracker()) { sName = "Manfred 'Pink' Linzner's Comeback Tracker module (.CBT)"; bDetected = 1; sVersion = 'v'+nV+'β' } function isProSoundMaker_c() { //ref https://ay.strangled.net/Ay_Emul30.src.7z /Help/html/ay_ru_fmt_psm.htm bad = ''; sus = lp = 0; m = Math.min(X.Sz(), 0x4000); var ordp = X.U16(0); if(!isWithin(ordp,8,0xFF)) { sus++; bad += '!badpos' } var smpp = X.U16(2); if(!isWithin(smpp, ordp,0x1FF)) { sus++; bad += '!badsmp' } var ornp = X.U16(4); if(ornp && !isWithin(ornp, smpp,0x4FF)) { sus++; bad += '!badorn' } var ptnp = X.U16(6); if(!isWithin(ptnp, ornp,0x5FF)) { sus++; bad += '!badptn' } title = ''; if(ordp >= 0xD) { var idfound = X.c("'psm1'00", 8), titlep = idfound? 0xD: 8; if(titlep < ordp) title = decAnsi(titlep,ordp-titlep,CPSpeccy); if(idfound) sus -= 2 } if(sus > 2) return; var ords = [], smps = [0], orns = [0], ptns = []; for(p=ordp,ord=ptn=0; p < m; ord++) { var o = X.U8(p++); t = X.U8(p); var ti = X.I8(p++); if(o == 0xFF) { if(t == 0xFF) break; if(t & 0x80) { if((t & 0x1F) >= ord) return; else lp = t & 0x1F } break } if(!isWithin(ti, -36,36) || ord > 100 || o > 32) return; if(!ords.includes(o)) ords.push(o); if(o >= ptn) ptn = o+1; } if(!ord) return; q = X.U16(smpp); smp = (q-smpp) >> 1; for(p=smpp; p < q; p+=2) if(!isWithin(t=X.U16(p), smpp,ornp)) return; else if(!smps.includes(t)) smps.push(t); if(ornp == ptnp) orn = 0; else { q = X.U16(ornp); orn = (q-ornp) >> 1; for(p=ornp; p < q; p+=2) if(!isWithin(t=X.U16(p), ornp,ptnp)) return; else if(!orns.includes(t)) orns.push(t) } tmp = [100, 0]; for(i=0,p=ptnp; i < ptn; i++) { if(!isWithin(t=X.U8(p++), 2,50)) return; if(tmp[0] > t) tmp[0] = t; if(tmp[1] < 1) tmp[1] = t; for(j=0; j < 3; j++,p+=2) if(!isWithin(t=X.U16(p), ptnp,m)) return; else { if(!ptns.includes(t)) ptns.push(t) } } ptns.sort(function(a,b){return a-b}); if(Util.divu64(ptns[0]-ptnp,7) != ptn) return; for(i=1; i < ptns.length; i++) if(!isWithinRanges(t=X.U8(ptns[i]-1), [0xFF,[0xB8,0xF8]])) { sus++; if(sus > 5) return } // parse the highest pattern, find size for(p=ptns.pop(); p < m;) { c = X.U8(p++); if(c == 0xFF) break; if(isWithin(c, 0xB1,0xB7) || c == 0xFC) p++; else if(c == 0xF9) p += 4; else if([0xFD, 0xFE].includes(c)) return } sz = p; return true } if(!bDetected && isProSoundMaker_c()) { sName = "Denis 'Dexus' Dratov's Pro Sound Maker module (.PSM)"; sVersion = 'compiled'; bDetected = 1; if(sus>0 || bad.length) sVersion += '/malformed'+bad+'/sus'+sus; if(X.isVerbose()) { sOptionT(title); sOption('tmp:'+tmp[0]+(tmp[0] == tmp[1]?'':'-'+tmp[1])+' ord:'+(lp?lp+'~':'')+ord +' ptn:'+ptn+' smp:'+smp+(orn?' orn:'+orn:'')+' sz:'+outSz(sz)) } } function isProtrackerIFF() { if(!X.c("'FORM'........ 'MODLVERS'00000016") || !X.c("'INFO'00000048",0x1E) || !X.c("'CMNT'000001A4",0x66) || !X.c("'PTDT'",0x20A)) return false; info = cmt = dt = pt = sv = ''; smp = ord = ptn = tmp0 = 0; sz = X.U32(4,_BE)+8; maxsz = Math.min(sz,X.Sz()); p = 0x1E; while (!bDetected && p < maxsz) { hkhd = X.SA(p,4); hksz = X.U32(p+4,_BE); if(charStat(hkhd,1).indexOf('allasc') < 0) break; switch (hkhd) { case 'INFO': info = decAnsi(p+8,0x20,CPAmiga).trim(); smp = X.U16(p+0x28,_BE); ord = X.U16(p+0x2A,_BE); ptn = X.U16(p+0x2C,_BE); bpm0 = X.U16(p+0x30,_BE); var dd = X.U16(p+0x34,_BE); if(!isWithin(dd,1,31)) return false; var mm = X.U16(p+0x36,_BE); if(!isWithin(mm,0,12)) return false; var yy = X.U16(p+0x38,_BE); if(isWithin(yy,30,88)) return false; dt = (1900+yy)+'-'+mm.padStart(2,'0')+'-'+dd.padStart(2,'0')+' ' +X.U16(p+0x3A,_BE).padStart(2,'0')+':'+X.U16(p+0x3C,_BE).padStart(2,'0') +':'+X.U16(p+0x3E,_BE).padStart(2,'0'); pt = secondsToTimeStr(X.U16(p+0x40,_BE)*3600+X.U16(p+0x42,_BE)*60+X.U16(p+0x44,_BE)); break; case 'CMNT': auth = decAnsi(p+8,0x20,CPAmiga).trim(); if(auth === 'UNNAMED AUTHOR') auth = ''; cmt = decAnsi(p+0x28,hksz-0x20,CPAmiga).trim(); break; case 'PTDT': return true } p += hksz } } if(!bDetected && isProtrackerIFF()) { sName = "ProTracker IFF-wrapped module (.PTM)"; bDetected = 1; sv = X.SA(0x18,6).trim(); if(!sv.length) sv = 'v3.6'; sVersion = sv; if(X.isVerbose()) { sOption(info); sOption(auth,'by: '); sOption(cmt); sOption(dt,'on '); sOption(pt,'len '); sOption('bpm0:'+bpm0+' ord:'+ord+' ptn:'+ptn+' smp:'+smp); sOption(outSz(sz),'sz:') } } function isS3M() { //ref https://moddingwiki.shikadi.net/wiki/S3M_Format //from https://github.com/OpenMPT/openmpt/blob/master/soundlib/S3MTools.h & Load_s3m.cpp // & http://asle.free.fr/prowiz/prowiz.src.zip / r/S3M.c if(!X.c("'SCRM'", 0x2C) || !X.c("10",0x1D) || [1,2].indexOf(X.U8(0x2A)) < 0 || X.Sz() < 0x60) return false; keepmidims = fmttrkstr = trknc = isST3 = isSchism = false; tracker = lswv = bad = ''; sus = 0; if(!X.c("1A",0x1C)) {sus++; bad = bad.addIfNone('!badsig1a') } z1 = X.U16(0x1E); if(z1) { sus++; bad = bad.addIfNone('!badsig0') } ord = X.U16(0x20); if(ord & 1) { sus++; bad = bad.addIfNone('!oddord') } smp = X.U16(0x22); ptn = X.U16(0x24); fl = X.U16(0x26); cwtv = X.U16(0x28); tv = cwtv >> 12; wtv = cwtv & 0xFFF; fmtv = X.U16(0x2A); gvol = X.U8(0x30); spd = X.U8(0x31); tmp = X.U8(0x32); mvol = X.U8(0x33); uc = X.U8(0x34); usept = (X.U8(0x35) && 0xFC) > 0; r2 = X.U16(0x36); special = X.U16(0x3E); ch = 4; for(i=0; i < 0x20; i++) if(X.U8(0x40+i) != 0xFF) ch = i+1; t = Hex(cwtv); sv = t.substr(1,1)+'.'+t.substr(2,2).padStart(2,'0'); switch(tv) { case 0x208 & tv: tracker = 'Akord'; break; case 1: if(X.c("'SCLUB2.0'",0x36)) tracker = 'Sound Club 2'; else if(cwtv == 0x1320 && !special && !(ord & 0xF) && !uc && !(fl & ~0x50) && usept) { if(mvol) { lswv = '1.16'; tracker = 'ModPlug Tracker/OpenMPT 1.17' } else { lswv = '1.00.00.A0'; tracker = 'ModPlug Tracker 1.0 alpha' } keepmidims = trknc = true } else if(cwtv == 0x1320 && !special && !uc && !fl && !usept) { if(gvol == 64 && mvol == 48) tracker = 'PlayerPRO'; else tracker = 'Velvet Studio' //TODO attribute in a brief way } else if(cwtv == 0x1320 && !special && !uc && fl == 8 && !usept) tracker = "J.Lim's Impulse Tracker < 1.03"; else { isST3 = true; if(cwtv == 0x1320) tracker = "Psi's Scream Tracker 3.20-21"; else { tracker = "Psi's Scream Tracker"; fmttrkstr = true } } break; case 2: fmttrkstr = cwtv != 0x2013; if(fmttrkstr) tracker = 'Imago Orpheus'; else tracker = 'PlayerPRO'; trknc = true; break; case 3: if(cwtv == 0x3320) tracker = 'Impulse Tracker 1.03'; else { if(r2 > 0x214) tracker = "Impulse Tracker 2.15"; else if(isWithin(wtv,0x215,0x217)) tracker = 'Impulse Tracker 2.14p'+(wtv == 0x215? '1-2': wtv == 0x216? '3': '4-5'); else tracker = 'Impulse Tracker '+((wtv&0xF00)>>8)+'.'+(wtv&0xFF).toString(16).padStart(2,'0'); } // if(cwtv >= 0x3207 && X.U32(0x38)) {} // could decode the total edit time here if you wanted trknc = true; break; case 4: if(cwtv == 0x4100) tracker = 'BeRoTracker'; else { isSchism = true; var dt = 734016 + (wtv < 0xFFF? wtv-0x050: r2); var y = Util.div64(dt*10000+14780, 3652425); var ddd = dt - (365*y + Util.div64(y,4) - Util.div64(y,100) + Util.div64(y,400)); if(ddd < 0) { y--; ddd = dt - (365*y + Util.div64(y,4) - Util.div64(y,100) + Util.div64(y,400)) } var mi = Util.div64(100*ddd+52, 3060); tracker = 'Schism Tracker '+(y+Util.div64(mi+2,12)).padStart(4,'0')+'-' +((mi+2)%12+1).padStart(2,'0') +'-'+(ddd - Util.div64(mi*306+5,10) + 1).padStart(2,'0') } trknc = true; break; case 5: if((cwtv >> 8) == 0x57) { tracker = 'NESMusa'; fmttrkstr = true } else if(!r2 && uc == 16 && X.U8(0x41) != 1) { tracker = 'Liquid Tracker'; fmttrkstr = true } else if(cwtv != 0x5447) { v = wtv << 16; if(v >= 0x01290000) v |= r2; function itV(v) { return v.slice(0,1)+'.'+v.slice(1,3)+'.'+v.slice(3,5)+'.'+v.slice(5,7) } lswv = itV(v.toString(16).toUpperCase().padStart(7,'0')); tracker = 'OpenMPT '+lswv } else tracker = "Dumbo's Graoumf Tracker"; break; case 6: tracker = 'BeRoTracker'; break; case 7: tracker = "BeRo's CreamTracker"; break; default: if(cwtv == 0xCA00) tracker = 'Camoto'; } if(sus >= 2) return false; if(fmttrkstr) tracker += ' '+sv; charset = lswv != ''? 'CP1252': 'CP437'; p = 0x60+ord+smp*2; max = sz = 0; for (i=0; i < ptn; i++) { var p1 = X.U16(p+i*2) << 4; if(!p1) continue; if (p1 > max) { max = p1; sz = max + X.U16(p1) } } if(sz%16) sz += 16-(sz%16); if(usept) { var anyunpannedch = false; p += ptn*2; for(i=0; i < ch; i++) if(isST3 && isWithin(X.U8(0x40+(i&0xFF)), 16, 29) && X.U8(p+i) < 0x10) anyunpannedch = true; if(ch < 32 && lswv.indexOf('1.16') >= 0) if(anyunpannedch) tracker = 'ModPlug Tracker 1.16/OpenMPT 1.17'; else tracker = 'ModPlug Tracker' } p = 0x60+ord; anysmp = anyADPCM = false; gus = 0; smps = []; for(i=0; i < smp; i++) { si = X.U16(p+i*2) << 4; if(!si) continue; else if(si > X.Sz()) { bad = bad.addIfNone('!short'); continue } st = X.U8(si); ssz = X.U32(si+0x10); t = X.SC(si+0x30,0x1C,charset).trim(); if(t != '') smps.push(t); if(st < 2) { if(ssz) { anysmp = true; sf = X.U8(0x1F); if(!anyADPCM && X.U8(si+0x14) == 4 && !(sf & 6)) anyADPCM = true } gus |= X.U16(si+0x28) } if(X.U8(si) === 1) { sofs = X.U16(si+14) << 4; if (sofs > max) { if (sf & 4) ssz *= 2; //16-bit max = sofs; if(sz < max+ssz) sz = max+ssz; } } } usegus = gus > 1; if(isST3 && anysmp && !gus && cwtv != 0x1300) { isST3 = false; tracker = 'Unknown'; if(cwtv == 0x1301 && !uc) { if(!(fl & ~0x50) && (mvol & 0x80) && usept) tracker = "Laurent Clévy's UNMO3"; else if(!fl && gvol == 48 && mvol == 176 && tmp == 150 && !usept) tracker = "Slixter's deMODifier"; else if(!fl && gvol == 64 && (mvol & 0x7F) == 48 && spd == 6 && tmp == 125 && !usept) tracker = "Zab/Kosmic's To-S3M" } } else if(isST3) tracker += usegus? ' (GUS)': ' (SB)'; if(anyADPCM) tracker += ' (ADPCM packed)'; return true } if(!bDetected && isS3M()) { sName = "Sami 'Psi' Tammilehto's ScreamTracker 3 module (.S3M)"; bDetected = 1; if(sus) sVersion = sVersion.appendS('malformed'+bad+' sus'+sus,'/'); if(X.isVerbose()) { //if(!spd || spd == 0xFF && isST3) spd = 6; if(tmp < 33) tmp = isST3? 125: 32; //fixes for playback, include? sOptionT(X.SC(0,0x1C,charset)); sOption(tracker,'in:'); sOption(addEllipsis(smps.join(' '),0xA0),'smp/msg:"','"'); sOption('ch:'+ch+' tempo0:'+tmp+' spd0:'+spd+' ord:'+ord+' ptn:'+ptn+' smp:'+smp +' gvol:'+gvol+' smpvol:'+(mvol&0x7F)+(mvol&0x80?'/mono':'/stereo')+' sz:'+outSz(sz)); } } function isMlatAT() { if(!X.c("'MAD+'")) return; ord = X.U8(0xB9); ptn = X.U8(0xBA); tmr = X.U8(0xBB); for(i=0,p=0xBC; i < ptn*32*9; i++) if(isWithin(X.U8(p++),0x60,0xFD)) return; for(i=0; i < ord; i++) if(!isWithin(X.U8(p++), 1,ptn)) return; return true } if(!bDetected && isMlatAT()) { sName = "Mlat Adlib Tracker module (.MAD)"; bDetected = 1; //if(bad.length) sVersion = 'malformed'+bad; if(X.isVerbose()) sOption('ord:'+ord+' ptn:'+ptn+' sz:'+outSz(p)) } function isProtoTracker() { if(!X.c("'SONG'") ) return; //ref https://github.com/kometbomb/prototracker/blob/master/doc/FORMAT.TXT //TODO tighten somewhat sz = X.U32(4,_LE); p = 8; v = X.U8(p++); trk = v >= 1? X.U8(p++):4; fxprm = v >= 17? X.U8(p++): 1; fxc = v >= 17? X.U8(p++): 0; title = X.SC(p,0x1000,'CP1250'); p += title.length+1; ptnr = X.U8(p++)+1; seqr = X.U8(p++)+1; if(!ptnr || !seqr) return; mcr = 0; for(i=eof=0; p < X.Sz() && !eof; p += X.U32(p+4)) { switch(X.SA(p,4)) { case 'SEQU': if(X.U8(p+8) > seqr) return; i |= 1; break; case 'PATT': i |= 0x10; break; case 'MACR': i |= 0x100; mcr = X.U8(p+8); break; default: if(i < 0x11) return; eof = 1 } } sz = p; return true } if(!bDetected && isProtoTracker()) { sName = "Tero 'kometbomb' Lindeman's ProtoTracker module (.SONG)"; bDetected = 1; sVersion = sVersion = "v"+v; if(X.isVerbose()) { sOption(title); sOption('trk:'+trk+(fxc?' fx:'+fxc:'')+(mcr?' mcr:'+mcr:'')+' sz:'+outSz(sz)) } } function isBeaverSweeper() { // ref https://www.pouet.net/prod.php?which=19993 /src/gtk_format.*, isSynth/* if(!X.c("'+SNT'")) return; // read synth: // read samples for(i=smp=0,p=4; i < 32; i++) if(X.U8(p) > 7) return; else if(X.U8(p++) & 1) { var ssz = X.U24(p); p += 3+ssz*2; var lpst = X.U24(p), lped = X.U24(p+3); p += 6; if(lpst > ssz || lped > ssz || lped < lpst) return; if(ssz) smp++ } // read ins vs = []; function parseType() { switch(X.U8(p++)) { case 1/*env*/: if(X.U8(p+0xB) > 1 || !isWithin(X.F32(p+3),-0.1,1.1)) return; p += 0xC; break; case 2 /*LFO*/: if(X.U8(p+1) > 1 || X.U8(p+7) > 1) return; p += 0xE; break; case 3 /*ctlr*/: p += 5; break; case 4 /*oscr*/: if(X.U8(p+9) > 1) return; p += 0x37; break; case 5 /*flt*/: if(X.U8(p+1) > 1) return; p += 0x1D; break; case 6 /*distortion*/: p += 9; break; case 7 /*delay*/: p += 0x18; break; case 8 /*chorus*/: if(X.U8(p+0x18) > 1) return; p += 0x19; break; default: return; } return true } function parseTypes() { var nr = X.U8(p++); for(var i=0; i < nr && p < X.Sz(); i++) if(!parseType()) return; return true; } for(i=ins=0; i < 16 && p < X.Sz(); i++) { //for each instrument: var v = X.U8(p++); p += v; //polyvoice array if(v) ins++; for(j=0; j < v && p < X.Sz(); j++) { //...for each voice: p+=2; //note range if(!parseTypes()) return; //modulators p += 1+55*X.U8(p); //oscillators if(X.U8(p) > 8) return; //max inserts if(!parseTypes()) return; p += 0xA; //modulation } t = X.U8(p++); if(t > 1) return; if(t) if(!parseType()) return; //distortion t = X.U8(p++); if(t > 1) return; if(t) p += 0xC1; // arpeggiator } p += 0x140; //instr. mixer settings for(i=0; i < 3; i++) { //load effect chains fl = X.U8(p++); if(fl&1) if(!parseType()) return; if(fl&2) if(!parseType()) return; if(fl&4) if(!parseType()) return; } if(!X.c("'-SNT'",p)) return; p += 4; //read the main module if(!X.c("'GOAT'",p)) return; bad = ''; nv = X.U16(p+4); ch = X.U8(p+6); ptn = X.U8(p+7); ins = X.U8(p+8); bpm0 = X.U8(p+9); if(!bpm0) bpm0 = 125; p += 12; var chlens = []; ord = 0; for(i=0; i < ch; i++) { var id = X.U8(p++); if(nv == 0x102) t = X.U8(p++); else { t = X.U16(p); p += 2 } ord = Math.max(t,ord); for(j=0; j < t; j++) { f = X.U16(p); p += 2; if(f > 0x100) bad = bad.addIfNone('!badchnum'); if(f) for(k=0x100; k; k>>=1) if(f&k) p++ } } var ptsz = 64, rows; for(i=0; i < ptn; i++) { var id = X.U8(p++); if(nv == 0x102) rows = X.U8(p++); else { rows = X.U16(p); p += 2 } if(!rows) bad = bad.addIfNone('!badptnrows'); for(j=0; j < rows; j++) { f = X.U32(p); p += 4; if(f) for(k=0x10000; k; k>>=1) if(f&k) p += 4 } } return true } if(!bDetected && isBeaverSweeper()) { sName = "Fredrik 'Gnilk' Kling & Stefan 'Steffo' Hållén & Zyrax's Beaver Sweeper module (.GTK)"; sVersion = 'v'+nv.toString(16).padStart(4,'0'); if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); bDetected = 1; if(X.isVerbose()) { sOption('ch:'+ch+' bpm0:'+bpm0+' ord:'+ord+' ptn:'+ptn+(ins?' ins:'+ins:'')+' smp:'+smp+' sz:'+outSz(p)) } } function isAnders0land() { //ref https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/Anders0land/SRC_Anders0land/Anders 0land_v1.asm if(!X.c("'mpl'")) return false; p = X.U32(4,_BE); if(p > X.Sz() || (p&1)) return false; songp = p+8; if(!X.c("'mdt'",p)) return false; p += X.I32(p+4,_BE); if(p > X.Sz() || (p&1)) return false; if(!X.c("'msm'",p)) return false; p += X.I32(p+4,_BE); if(p < X.Sz()) return false; sz = p; smpp = songp+X.I32(songp-4,_BE); smpsz = X.I32(smpp-4,_BE); smp = (X.I16(songp+20,_BE) - X.I16(songp+18,_BE)) >> 2; songsz = songp-8; x = (X.I16(songp+4,_BE) - X.I16(songp+2,_BE)) >> 2; p = X.I16(songp,_BE); ord = X.I16(songp+6,_BE)-p-X.I32(songp+p+12,_BE); return true } if(!bDetected && isAnders0land()) { sName = "Anders 'Zonix' 0land's Music & Player module (.HOT)"; bDetected = 1; sVersion = "v"+X.SA(3,1); if(X.isVerbose()) { if(x > 1) sOption(x,"×"); sOption("ord:"+ord+" smp:"+smp+" songsz:"+Hex(songsz)+" smpsz:"+Hex(smpsz)); sOption(outSz(sz),"sz:") } } function isUNIMOD() { // ref https://github.com/sezero/mikmod/blob/master/libmikmod/loaders/load_uni.c if(!/(UN0[4-6].*|APUN\x01[1-6])/.test(X.SA(0,6))) return; p = 4; voc = 0; var v, e; if(X.SA(3,1) != 'N') { v = X.U8(3)-0x30; if(v > 6) v = X.U16(4,_BE) } else v = 0x100; if(v >= 6) { e = _BE; if(v == 6) p++; else { v = X.U16(p,e); p+=2 } flg = X.U16(p,e); p+=2; ch = X.U8(p++); voc = X.U8(p++); ord = X.U16(p,e); ptn = X.U16(p+2,e); trk = X.U16(p+4,e); ins = X.U16(p+6,e); smp = X.U16(p+8,e); reppos = X.U16(p+0xA,e); p+=0xC; spd0 = X.U8(p++); tmp0 = X.U8(p++); vol0 = X.U8(p++); if(v >= 0x106) { bpmlimit = X.U16(p,e); p+=2 } else bpmlimit = 32; } else { e = _LE; ch = X.U8(p++); ord = X.U16(p,e); p+=2; if(v == 5) { lp = X.U16(p,e); p+=2 } else lp = 0; ptn = X.U16(p,e); trk = X.U16(p+2,e); ins = X.U16(p+4,e); p += 6; smp = 0; spd0 = X.U8(p++); tmp0 = X.U8(p++); p += 256+32; // positions+panning flg = X.U8(p++); bpmlimit = 32; } sv = X.SA(3,1) == 'N'? 'v.APlayer': 'v'+Hex(v); if((v < 6 && !(isWithin(ch,1,32) || isWithin(ord,1,256))) || lp > ord || !trk || !ptn || !isWithin(ins,1,256) || !spd0 || !tmp0) return; titlesz = X.U16(p,_LE); titlep = p+2; p += 2+titlesz; if(v < 0x102) { origssz = X.U16(p,_LE); origsp = p+2; p = p1 = p+2+origssz; p = origsp+origssz; } else origssz = 0; cmtsz = X.U16(p,_LE); cmtp = p+2; p += 2+cmtsz; if(v >= 6) { if(v >= 0x100) p += ord*2; else p += ord; p += ch*3; } smps = []; inss = []; smpsz = 0; if(v >= 6) { for(i=0; i < smp; i++) { //loadsmp6 smpsz += X.U32(p+7,e); t = X.U16(p+0x23,_LE); p += 0x25; smps.push(X.SC(p,t,'CP437').trim()); p += t } for(i=0; i < ins; i++) { //loadinstr6 p += 13; pt = X.U8(p+1); p += 6 + (v>=0x100? 0x20: pt)*4; pt = X.U8(p+1); p += 6 + (v>=0x100? 0x20: pt)*4; pt = X.U8(p+1); p += 6 + (v>=0x100? 0x20: pt)*4; if(v >= 0x103) p += 240*smp; else p += 120*smp; t = X.U16(p,_LE); p += 2; inss.push(X.SC(p,t,'CP437').trim()); p += t } } else { for(i=0; i < ins; i++) { //loadinstr5 smpn = X.U8(p); smp += smpn; p += 0xD1; t = X.U16(p,_LE); p += 2; if(t) { inss.push(X.SC(p,t,'CP437').trim()); p += t } for(j=0; j < smpn; j++) { smpsz += X.U32(p+5,e); t = X.U16(p+0x13,_LE); p += 0x15; if(t) { smps.push(X.SC(p,t,'CP437').trim()); p += t } } } } p += 2*ptn + 2*ch*ptn; for(i=0; i < trk; i++) p += X.U16(p,e)+2; sz = p+smpsz; return true } if(!bDetected && isUNIMOD()) { sName = "Otto Chrons/libmikmod UNIMOD/UNITRK module (.UNI)"; sVersion = sv; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SC(titlep,titlesz,'CP437')); if(origssz) sOptionT(X.SA(origsp,origssz),"orig: "); sOptionT(X.SC(p1+2,X.U16(p1),'CP437')); sOption(addEllipsis(inss.filter(funSampleName).join(' ')),'ins/msg:"','"'); // sOption(addEllipsis(smps.filter(funSampleName).join(' ')),'smp/msg:"','"'); sOption('ch:'+ch+(voc?'/'+voc:'')+' spd0:'+spd0+' tmp0:'+tmp0+' trk:'+trk +' ord:'+(lp?lp+'~':'')+ord+' ptn:'+ptn+' ins:'+ins+(smp?' smp:'+smp:'')+' sz:'+outSz(sz)) } } function isD00nohdr() { // ref https://github.com/adplug/adplug/blob/master/src/d00.h & .cpp if(X.Sz() < 40 || X.Sz() >= 0xFFFF) return false; if(X.c("0001.... 000D00") && X.c("FFFF",0xB)) nV = 0; else if(X.c("01..01.. 000F00") && X.c("FFFF",0xD)) nV = 1; else return false; seqp = X.U16(3,_LE); if(seqp < 13 || seqp > X.Sz()) return false; // ptr to sequence pointer table x = 1; seqtest = X.fSig(seqp+18+9,TOEOF,"0000000000 FFFF")-seqp; // reserved bytes are 0; endmark follows while (seqtest > 0x20) { x++; seqtest -= 0x20; if(!X.c("0000000000",seqp+seqtest)) return false } //there may be several sequence tables but they end the same trkp = t = X.U16(5,_LE); if(!X.c("FFFF",trkp-2) || trkp < 13) return false; // ptr to track pointer table insp = X.U16(7,_LE); if(!X.c("FFFF",insp-2) || insp < 13) return false; // to instrument pointer table sz = X.U16(9,_LE); if(!X.c("FFFF",sz-2) || sz < 13) return false; // to message if(nV == 1) { sfxp = X.U16(11,_LE); if(!X.c("FFFF",sfxp+8)) return false; } // to sfx if(Math.abs(trkp-seqp) < 20 || Math.abs(trkp-insp) < 20 || Math.abs(seqp-insp) < 20) return false; oldp = trkp; p = X.U16(trkp,_LE); ip = 0, once = 0; // count pointers out of order, heuristic while(t < trkp+18 && trkp < X.Sz()) { // check 9 pointers from TPoin for validity if(t === trkp) p = oldp = t; // for the first pointer if(p) oldp = p; p = X.U16(t,_LE); if(!p || p < trkp || p > X.Sz()) return false; if(!X.c("FFFF",p-2)) { once++; if(once > 1) return false } if(p < oldp) { ip++; if(ip > 2) return false } // some D00s do have pointers out of order q = p; while(!X.c("FFFF",q) && q < X.Sz()) q += 2; //check the table data for having a FFFF somewhere near if(!X.c("FFFF",q)) { _log("D00nohdr: boh. t="+Hex(t)+" p="+Hex(p)+" q="+Hex(q)); return false; } t += 2 } msg = ""; t = X.fSig(sz,0x200,"FFFF"); if(t > 0) { // the message exists and ends in FFFF msg = X.SC(sz,t-sz,'CP437').trim(); sz = t+2 } else { // the message may exist but it may also be garbage, checking... msg = X.readBytes(sz,Math.min(sz+0x100,X.Sz())-sz); c = charStat(msg,1); if(c.indexOf("allxsc") >= 0) { msg = decEncoding(msg,CP437); sz += msg.length; msg = msg.trim() } else msg = '' } return true; } if(!bDetected && X.isDeepScan() && isD00nohdr()) { sName = "Jens Christian 'JCH/Vibrants' Huus's Edlib Tracker module (.D00)?"; sVersion = "old v"+X.U8(0); bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOptionT(addEllipsis(msg,0x100,0x80),'msg:"','"'); sOption("sz:"+outSz(sz)) } } function isProtrackerMOD() { //from https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_mod.cpp if(X.Sz() < 0x43C) return false; var b = X.readBytes(0x438,4), s = X.SA(0x438,4), hdr = 0x43C/*1084*/, plist = 0x3B8/*952*/, msmp = 0x1F; var isStarTrekker = isGenericMCh = isMdKd = maybeWOW = isHMNT = isInconexia = isNoiseTracker = setMODVBlankTiming = hasLongSmp = hasEmptySmpwVol = hasRepLen0 = false; var maybeAS = 0, ibtrsh = 40; //typical threshold for invalid bytes (in samples); _FRAGILE is 1 //test signatures if(/(M\.K\.|M!K!|PATT|NSMS|LARD)/.test(s)) { chn = 4; tracker = "generic Protracker-compatible"; if(s === "M.K.") { isMdKd = true; maybeWOW = true } } else if(/(M&K!|FEST|N\.T\.)/.test(s)) { chn = 4; if(s === "N.T.") tracker = "Pex 'Mahoney' Tufvesson & Anders 'Kaktus' Berkeman's NoiseTracker"; else { tracker = "Pex 'Mahoney' Tufvesson & Anders 'Kaktus' Berkeman's His Master's NoiseTracker"; isHMNT = true } isNoiseTracker = true } else if(/O[KC]TA/.test(s)) { chn = 8; tracker = "Armin Sander's Oktalyzer" } else if(/CD[68]1/.test(s)) { chn = b[2]-0x30; tracker = "Christian Dahl et al.'s Octalyser STE (Atari)" } else if(compareArrays(b, [0x4D,0,0,0]) || compareArrays(b, [0x38,0,0,0])) { if(b[0] === 0x38) chn = 8; else chn = 4; ibtrsh = 1; // fragile, needs more detects! tracker = "Inconexia demo"; isInconexia = true } else if(/FA0[4-8]/.test(s)) { chn = b[3]-0x30; tracker = "Digital Tracker"; hdr = 0x440 } else if(/(FLT|EXO)[48]/.test(s)) { chn = b[3]-0x30; if(chn == 4) maybeAS++; isStarTrekker = setMODVBlankTiming = true; tracker = "Startrekker"; } else if(/[1-9]CHN/.test(s)) { chn = b[0]-0x30; isGenericMCh = true; tracker = "generic MOD-compatible" } else if(/[1-9][0-9]C[HN]/.test(s)) { chn = b[0]*10+b[1]-0x210; isGenericMCh = true; tracker = "generic MOD-compatible" } else if(/TDZ[1-3]/.test(s)) { chn = b[3]-0x30; tracker = "Twaddler and Dr. Zon's TakeTracker" } //else if(/\.M\.K/.test(s)) { chn = 4; swapBytes = true } just one hacked module, TODO after fast patches are in else if(/WARD/.test(s)) { chn = 8; isGenericMCh = true; tracker = "generic MOD-compatible" } else return false; if(!chn) return false; restartpos = X.U8(plist-1); //test samples p = 0x14; wowsmpsz = ib = 0; for(; p < 0x3B6; p += 0x1E) { var ssz = X.U16(p+0x16,_BE)<<1; //length wowsmpsz += ssz; if(!isHMNT && !hasLongSmp && ssz >= 0x20000) hasLongSmp = true; var sft = X.U8(p+0x18), svol = X.U8(p+0x19), sls = X.U16(p+0x1A,_BE)<<1, sll = X.U16(p+0x1C,_BE)<<1; if(sft || (ssz && svol != 0x40)) maybeWOW = false; if(sft > 15) ib++; //finetune <= 15 if(svol > 0x40) ib++; //volume <= 64 if(!ssz && svol == 0x40) { hasEmptySmpwVol = true; if(maybeAS && !sls && sll <= 2) maybeAS++ } if(sls > ssz) ib++; //loopstart. looplen gets weird, it's ok if(!hasRepLen0 && ssz && !sll) hasRepLen0 = true; if(ib > ibtrsh) return false; } isFLT8 = isStarTrekker && (chn == 8); var smpsz31 = wowsmpsz; if(restartpos) maybeWOW = false; if(!maybeWOW) wowsmpsz = 0; if(maybeAS >= 2) tracker += '/Audio Sculpture' //test patterns function cntBadPtnData(ofs) { var c = 0; for(i = 0; i < chn*64; i++) if(X.U8(ofs+(i<<2)) & 0xE0) c++; return c } //get real ptn: ord = X.U8(plist-2); if(!ord) return false; ol = X.readBytes(plist,0x80); //orderlist if(ord > 0x80) ord = 0x80; else if(!ord) { ord = 0x80; while(ord > 1 && !ol[ord-1]) ord-- } ptn = iptn = optn = 0; i = plist; for(i=0; i < 0x80; i++) { if(isFLT8) ol[i] /= 2; var pt = ol[i]; if(pt < 0x80 && pt >= ptn) { ptn = pt+1; if(i < ord) optn = ptn } //official patterns if(ptn >= iptn) iptn = ptn+1 // illegal patterns } //weirdness checks var alignedfsz = X.Sz() & ~1; if(wowsmpsz && wowsmpsz+hdr+ptn*8*256 == alignedfsz) { if(cntBadPtnData(hdr+ptn*4*256) < 16) chn = 8; //⚠no good for ripping -- best to err toward no WOW } else if(ptn != optn && cntBadPtnData(hdr+optn*chn*256) > 64) ptn = optn; if(iptn > ptn && hdr+ssz+iptn*chn*256 == alignedfsz) ptn = iptn; if(maybeWOW && chn === 8) { tracker = "Mod's Grave"; isGenericMCh = true } if(restartpos >= ord || (restartpos == 0x78 && chn === 4)) restartpos = 0; //because that's actually bpm var onlyAmigaNotes = true, fix7BitPanning = leftPan = extPan = maxPan = 0; if(!isNoiseTracker) { isNoiseTracker = isMdKd && !hasEmptySmpwVol && !hasLongSmp; p = hdr; for(pt = 0; pt < ptn; pt++) { var ptnbrk = 0; for(; p < pt*chn*256; p += 4) { var d = X.readBytes(p,4); var np = ((d[0]&0xF)<<8) | d[1]; // note period if(np && np != 0xFFF) { if(onlyAmigaNotes && (np < 113 || np > 856)) onlyAmigaNotes = isNoiseTracker = false; } var cmd = d[2]&0xF, prm = d[3] /*, dsmp = (d[2]>>4) | (d[0]&0x10)*/; if((cmd > 6 && cmd < 0xA) || (cmd == 0xE && prm > 1) || (cmd == 0xF && prm > 0x1F) || (cmd == 0xD && ++ptnbrk > 1)) isNoiseTracker = false; if(cmd == 8) { if(prm > maxPan) maxPan = prm; if(prm < 0x80) leftPan = true; else if(prm > 0x8F && prm != 0xA4) extPan = true; } } } fix7BitPanning = leftPan && !extPan && maxPan >= 0x30; } if(onlyAmigaNotes && !hasRepLen0 && ['M.K.','M!K!','PATT'].indexOf(s) >= 0) {} else if(!onlyAmigaNotes && restartpos == 0x7F && isMdKd && restartpos+2 >= ord) tracker = "Sami 'Psi/Future Crew' Tammilehto's Scream Tracker"; //modsize sz = hdr+ptn*chn*256; if(sz > X.Sz()) return false; p = 0x14; smp = 0; songsz = sz; ib = 0; smps = []; var anyADPCM = 0; for(; p < 0x3B6; p += 0x1E) { if(!isHMNT) { //His Master's Noise have data in sample titles t = X.readBytes(p,22,true); t = decEncoding(t,CPAmiga).trim(); if(t.length) smps.push(t) } var ssz = X.U16(p+0x16,_BE)*2; if(ssz) smp++; //if(isMdKd && onlyAmigaNotes && !hasEmptySmpwVol) ssz = Math.max(ssz,X.U16(p+0x1C,_BE)*2); if(X.c("'ADPCM'",sz)) { anyADPCM++; ssz = (ssz+1>>1)+5+16; } sz += ssz; } if(X.c("8BBEB4BA 8BADBEBC B4BAAD",sz)) { var exts = '', ext = []; while(sz < X.Sz() && isWithin(X.U8(sz) ^ 0xDF, 0xA,0x7F)) ext.push(X.U8(sz++)^0xDF); exts = decEncoding(ext,CP437); tracker = "Twaddler and Dr. Zon's TakeTracker"; if(/\ version\ \d+\./.test(exts)) tracker +=' v' + /\ version\ (\d[^!]+)/.exec(exts)[1]; // if(smps.length) smps.unshift('/'); smps.unshift(exts); } else if(isMdKd && X.c("001155332211",sz)) { tracker = 'Tetra Music Editor:'+X.U24(sz+6,_BE).padStart(6,'0'); sz += 9 } if(anyADPCM && !isInconexia) tracker += ' (ADPCM packed: '+anyADPCM+')'; return true } if(!bDetected && isProtrackerMOD()) { sName = "Amiga Freelancers' Protracker module (.MOD)"; bDetected = 1; sVersion = X.SA(0x438,4); if(X.isVerbose()) { sOptionT(decAnsi(0,20,CPAmiga)); sOption(tracker,'in: '); sOptionT(addEllipsis(smps.filter(funSampleName).join(" "),200),'smp/msg:\"','"'); sOption('ch:'+chn+' ord:'+ord+' ptn:'+(optn!=ptn?optn+'/':'')+ptn+(iptn!=ptn?'('+iptn+')':'') +' smp:'+smp+' sz:'+outSz(sz)) } } function isKRIS() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/ChipTracker/ChipTracker_v3.asm // & https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_kris.cpp if(X.Sz() < 0x7C0+0x100 || !X.c("'KRIS'",0x3B8)) return false; ord = X.U8(0x3BC); if(ord > 0x80) return false; loop = X.U8(0x3BD); if(loop > 0x7F || (loop < 0x7F && loop >= ord)) return false; const ibtrsh = 40; //typical threshold for invalid bytes (in samples); _FRAGILE is 1 p = 0x16; var totalsmpsz = ib = 0; smp = synwf = 0; smps = []; for(var i=0; i < 31; p += 0x1E, ++i) if(!X.U8(p)) { var maxwf = Math.max(X.U8(p+1),X.U8(p+5),X.U8(p+10),X.U8(p+19)); if(maxwf && maxwf >= synwf) synwf = maxwf+1; } else { t = X.SC(p,20,"IBM850").trim(); if(t != "" && t != "\x01") smps.push(t); var ssz = X.U16(p+0x16,_BE)*2; //length totalsmpsz += ssz; var sft = X.U8(p+0x18); if(sft & 0xF0) ib++; //finetune <= 15 var svol = X.U8(p+0x19); if(svol > 0x40) ib++; //volume <= 64 if(X.U16(p+0x1A,_BE)*2 > ssz) ib++; if(ib > ibtrsh) return false; smp++ } ptn = 0; p = 0x3BE; ord = X.U8(0x3BC); for(i=0; i < (ord << 2); i++,p+=2) if(ptn < X.U8(p)) ptn = X.U8(p); ptn++; sz = 0x7C0+(synwf<<6)+(ptn<<8)+totalsmpsz; return true; } if(!bDetected && isKRIS()) { sName = "Krister Wombell's ChipTracker module (.KRIS,.MOD)"; bDetected = 1; if(X.isVerbose()) { sOption(X.SA(0,16)); sOptionT(addEllipsis(smps.join(" "),200),'smp/msg:\"','"'); sOption('ord:'+(loop && loop < 0x7F? loop+'-':'')+ord+' ptn:'+ptn+' smp:'+smp+(synwf? ' synwf:'+synwf: '')+' sz:'+outSz(sz)); } } function isMTNICE() { //ref https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_ice.cpp if(X.c("'MTN'000000",0x5B8)) tracker = "MnemoTroN's SoundTracker"; else if(X.c("'IT10'00",0x5B8)) tracker = "Icepic's IceTracker 1.0~2'"; else return false; smp = smpsz = 0; smps = []; for(p=20; p < 20+30*31; p+=30) { t = decAnsi(p,22,CPAmiga).trim(); if(t != '') smps.push(t); ssz = X.U16(p+22,_BE); if(ssz) smp++; smpsz += ssz } ord = X.U8(p++); ptn = X.U8(p++); if(ord > 128) return false; for(i=0; i < 128*4; i++) if(X.U8(p++) > ptn) return false; sz = 0x5BC+ptn*64*4+smpsz; return true } if(!bDetected && isMTNICE()) { sName = tracker+" module (.ST26,.ICE)"; sVersion = "v2.6"; bDetected = 1; if(X.isVerbose()) { sOptionT(decAnsi(0,0x14,CPAmiga)); sOptionT(addEllipsis(smps.join(' '),0x80),'smps/msg:"','"') sOption('ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+sz) } } function isMVXModule() { /*header: 1 dword: 'MVM\0' 1 byte: BPM 1 byte: ticks per beat 1 dword: song length in rows 1 byte: machine count N byte: machine IDs (N = machine count) N byte: machine order (N = machine count) 1 byte: machine connection count N * 3 bytes: machine connections (source, target, volume)*/ if(!X.c("'MVM'00") || !X.U8(4) || !X.U8(5) || X.U32(6) > 10000 || !X.U8(0xA)) return; var idsm = [], ordm = [], lstm = []; p = 10; mach = X.U8(p++); for(i=0; i < mach; i++) idsm.push(X.U8(p++)); for(i=0; i < mach; i++) { t = X.U8(p++); if(ordm.indexOf(t) >= 0) return; ordm.push(t); lstm.push(i) } //_l2r('idsm',0,outArray(idsm)); _l2r('ordm',0,outArray(ordm.sort())); var cnx = X.U8(p++); for(i=0; i < cnx; i++) { var src = X.U8(p++), tgt = X.U8(p++); p++; if(src > mach || tgt > mach || src == tgt) return; lstm = lstm.filter(function() { return lstm.indexOf(src) < 0 && lstm.indexOf(tgt) < 0 }) } if(lstm.length) return; //all machines must have connections, otherwise it's an export failure return true } if(!bDetected && isMVXModule()) { sName = "Gargaj/Conspiracy's MVX Module (.MVM)"; bDetected = 1; if(X.isVerbose()) { sOption('bpm0:'+X.U8(4)+' ticks:'+X.U8(5)+' rows:'+X.U32(6)+' machines:'+mach) } } function isOctaMed() { //from http://fileformats.archiveteam.org/wiki/OctaMED_module_(MED) // & https://github.com/neumatho/NostalgicPlayer/blob/main/Source/Agents/ModuleConverters/ModuleConverter/Formats/Med4Format.cs // & https://github.com/neumatho/NostalgicPlayer/blob/main/Source/Agents/Players/Med/MedWorker.cs if(!/MED[\x02-\x04]/.test(X.SA(0,4))) return false; nV = X.U8(3); switch(nV) { //TODO find the non-\x04 files to test on case 2: sVersion = "v1.12"; break; case 3: sVersion = "v2.00"; break; case 4: sVersion = "v2.10+"; break; } x = 1; p = sz = ptn = ord = trk = midi = syhy = smp = realsmp = 0; smps = []; cs = bad = ""; if(nV < 3) { //TODO } else { //going through the sample info var smpbmp0 = X.U8(4); p = 5; while(smpbmp0) { if(smpbmp0&1) { var smpbmp = X.U8(p++); while(smpbmp) { smp += smpbmp&1; smpbmp >>= 1 } } smpbmp0 >>= 1; } for(i=0; i < smp; i++) { fl = X.U8(p++); smpnl = X.U8(p++); smps.push(X.SA(p,smpnl)); p += smpnl; if(!(fl&1)) p+=2; if(!(fl&2)) p+=2; if(!(fl&4)) p++; if(!(fl&8)) p++; if(!(fl&0x30)) svol = X.U8(p++); if(svol > 0x40) return false; if(!(fl&0x40)) p++; } for(i = 62; i >= 0; i--) if(smps[i] && smps[i].length) {realsmp = i+1; break } ptn = X.U16(p,_BE); ord = X.U16(p+2,_BE); if(!ord || ord > 0x100) return false; p += 4; for(i=0; i < ord; i++) if(X.U8(p++) > ptn) return false; extsmp = !(X.U8(p+3)&8); tmp0 = X.U16(p,_BE)+"//"+X.U16(p+4,_BE); p += 26; for(i=0; i < 16; i++) if(X.U8(p++) > 0x40) return false; mvol = X.U8(p++); if(mvol > 0x40) return false; if(p > X.Sz()) return false; function SkipMidi() { var f = X.U32(p,_BE); p += 4; for (var i=0; i < 32; i++) { if(f < 0) f = -f; if((f & 0x80000000)) {midi++; p++ } f <<= 1 } } if(nV === 3) { SkipMidi(); SkipMidi() } for(i=0; i < ptn; i++) { var hdsz = X.U8(p++); var ptntrk = X.U8(p); if(trk < ptntrk) trk = ptntrk; var rows = X.U8(p+1), hksz = X.U16(p+2,_BE); //_log("ptn["+i+"] @"+Hex(p)+": ("+Hex(hdsz)+") -> "+Hex(p+hdsz+hksz)+"], rows:"+rows+" trk:"+ptntrk); p += hdsz+hksz; } if(!extsmp) { var br = new BitReader(p,_BE), smp2process = 0; br.read(1); for(i=0; i < realsmp; i++) smp2process += br.read(1); delete br; //_log("found "+smp2process+" samples to process"); p += 8; for(i=0; i < smp2process; i++) { hksz = X.U32(p,_BE); hktp = X.U16(p+4,_BE); p += 6; //_log("smp["+i+"] ("+Hex(p)+" -> "+Hex(p+hksz)+")") if(hktp == 0xFFFF || hktp == 0xFFFE) syhy++; p += hksz; } } if(X.c("'MEDV'",p)) while(p+8 <= X.Sz() && /[A-Z]{4}/.test(X.SA(p,4))) { hkhd = X.SA(p,4); hksz = X.U32(p+4,_BE); p += 8; switch(hkhd) { case "MEDV": sVersion = "v"+X.U8(p+2)+'.'+X.U8(p+3).padStart(2,'0'); break; case "ANNO": cs = X.SC(p,hksz,'CP1252'); break; case "HLDC": break; default: _log("Unknown MED header: "+hkhd) //shouldn't exist but you know how they get } p += hksz } } sz = p; if(sz > X.Sz()) bad = "!short"; return true } if(!bDetected && isOctaMed()) { sName = "OctaMED module (.MED)"; bDetected = 1; if(bad != "") sVersion += "/malformed"+bad; if(X.isVerbose()) { sOptionT(cs); while(smps[smps.length] == '') delete(smps[smps.length]); if(smps.length) sOption("["+smps.join(",")+"]","smps:"); sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+(realsmp != smp ? "("+realsmp+")" : "") +(extsmp?"(ext.)":"")+(syhy?" synth+hybrid:"+syhy:"")+(midi?" midi:"+midi:"")+" trk:"+trk+" tmp0:"+tmp0 +" mvol:"+mvol+" sz:"+outSz(sz)) } } function isOctaMedMMD() { //from https://web.archive.org/web/20220109073109if_/http://www.textfiles.com/programming/FORMATS/med-form.txt if(!X.c("'MMD'")) return false; nV = X.U8(3)-48; if(nV < 0 || nV > 3) return false; switch(nV) { case 0: sname = "MED module (.MED,.MMD0)"; sversion = "v2.1 Med MoDule 0"; break; case 1: sname = "OctaMED Professional module (.MED,.MMD1)"; sversion = "v.3.00-4.x"; break; case 2: sname = "OctaMED Professional module (.MED,.MMD2)"; sversion = "v5.x"; break; case 3: sname = "OctaMED Professional module (.MED,.MMD3)"; sversion = "v6.x?"; break; } ptnsp = X.U32(0x10,_BE); if(ptnsp < 0x34) return false; smpsp = X.U32(0x18,_BE); if(smpsp && smpsp < 0x34) return false; expp = X.U32(0x20,_BE); if(expp > X.Sz()) return false; sec = p = 0; sngp = X.U32(p+8,_BE); if(sngp < 0x34 || sngp > 0xFFFFFEFF-63*8) return false; if(X.Sz() < Math.max(sngp+63*8+0x100, ptnsp, smpsp?smpsp:0x34, expp+0x34)) return false; songname = anno = iinfo = ""; ch = 4; xsngs = X.U8(0x33); x = expp?xsngs+1:1; if(expp) { psongname = X.U32(expp+0x2C,_BE); if(psongname) { songnamelen = X.U32(expp+0x30,_BE); if(songnamelen) songname = X.SC(psongname,songnamelen,'CP1252'); } pannotxt = X.U32(expp+0x0C,_BE); if(pannotxt > 0) { annolen = X.U32(expp+0x10,_BE); anno = X.SC(pannotxt,annolen,'CP1252'); } pMMDInstrInfo = X.U32(expp+0x14,_BE); if(pMMDInstrInfo > 0) iinfo = X.SC(expp,40,'CP1252'); } //if expp ptn = 0; ord = []; var ptntp = X.U32(0x10,_BE); for(i=0; i < x; i++) { p = sngp+63*8; ptn1 = X.U16(p,_BE); if(ptn1 > 0x7FFF) ch = 4; ptn += ptn1; for(j = 0; j < ptn1; j++) { pj = j*4+ptntp; if(pj > X.Sz()) continue; pj = X.U32(pj,_BE); if(pj > X.Sz()) continue; pj = nV < 1 ? X.U8(pj+4) : X.U16(pj+4,_BE); if(pj > ch) ch = pj } if(nV < 2) { ord[0] = X.U16(p+2,_BE); if(ord[0] > 256) return false } else { sec = X.U16(p+2,_BE); trk = X.U16(p+0x10,_BE); if(!trk || trk > 0x40) return false; sectp = X.U32(p+8,_BE); if(sectp+sec*2 > X.Sz()) continue; playseqtp = X.U32(p+4,_BE); nplayseq = X.U16(p+0x12,_BE); secs = []; for(j = 0; j < sec; j++) secs.push(X.U16(sectp+j*2,_BE)); for(j = 0; j < secs.length; j++) if(j <= nplayseq) ord.push(X.U16(X.U32(playseqtp,_BE)+0x28,_BE)); } expp = X.U32(sngp+0x20,_BE); if(expp && (X.U32(expp,_BE) < sngp || expp > X.Sz())) { x = i+1; break } sngp = X.U32(expp,_BE); } smp = X.U8(p+0x11B); if(smp > 63) return false; return true } if(!bDetected && isOctaMedMMD()) { sName = sname; sVersion = sversion; bDetected = 1; if(X.isVerbose()) { if(songname != "" && songname != "") sOption(songname); sOptionT(anno); sOptionT(iinfo,"ins0:"); if(x > 1) sOption(x,"×"); sOption((X.isDeepScan()?"ch:"+ch+" ":"")+"ord:"+ord.join("+")+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(X.U32(4,_BE))) } } function isAHX() { //ref http://lclevy.free.fr/exotica/ahx/ahxformat.txt // & https://github.com/pete-gordon/hivelytracker/blob/master/Replayer_Windows/hvl_replay.c if(X.Sz() < 30) return false; if(X.c("'THX'0.")) fmt = "ahx"; else if(X.c("'HVL'0.")) fmt = "hvl"; else return false; bad = 0; var b6 = X.U8(6); trk0saved = b6 >> 7; switch((b6 >> 4) & 7) { case 0: spd = "50Hz"; break; case 1: spd = "100Hz"; break; case 2: spd = "150Hz"; break; case 3: spd = "200Hz"; break; default: bad++; spd = "?Hz" } ord = X.U16(6,_BE) & 0xFFF; if(ord > 999) bad++; if(!ord || ord > 1024) bad++; if(fmt === "ahx") { lp = X.U16(8,_BE); if(lp >= ord) bad++; } else chn = (X.U8(8) >> 2)+4; if(bad > 1) return false; trl = X.U8(10); if(!trl || trl > 64) return false; trk = X.U8(11); ins = X.U8(12); if(ins > 63) return false; sub = X.U8(13); if(fmt === "ahx") { sz = 14+sub*2+ord*8+trk*trl*3; if(!trk0saved) sz += trl*3 for(i=0; i < ins; i++) { var spls = X.U8(sz+21); sz += 22+spls*4; } } else { sz = 16+sub*2+ord*chn*2; if(trk0saved) i = 1; else i = 0; for(; i <= trk; i++) for(j=0; j < trl; j++) { if(X.U8(sz) == 0x3F) { sz++; continue } sz += 5; } for(i=0; i < ins; i++) { var spls = X.U8(sz+21); sz += 22+spls*5; } } title = ""; for(i=0;i <= ins;i++) { var r = sz; while(X.U8(sz) && sz X.Sz()) bad++; return true } if(!bDetected && isAHX()) { if(fmt === "ahx") { sName = "Abyss' Highest eXperience module (.AHX)"; if(!X.U8(3)) sVersion = "v1.00~1.27"; else sVersion = "v2.0+"; } else sName = "Hively Tracker module (.HVL)"; bDetected = 1; if(bad) sVersion += "/malformed"+bad; if(X.isVerbose()) { if(title != "") sOption(title); if(sub) sOption(sub,"×"); n=0; p = 14+sub*2+ord*8; c = trk*trl; if(!trk0saved) c += trl; hp = false; for(i=0;i < c;i++) { note = X.U8(p+i*3)>>2; if(note) n++; if(note > 60) if(fmt == "ahx") hp = true; } if(hp) sVersion += "/hi-pitch!" if(fmt === "ahx") sOption("spd:"+spd+" ord:"+ord+" lp:"+lp+" trk:"+trk+" ins:"+ins+" notes:"+n+" sz:"+outSz(sz)) else sOption("ch:"+chn+" spd:"+spd+" ord:"+ord+" trk:"+trk+" ins:"+ins+" notes:"+n+" sz:"+outSz(sz)) } } function isPha() { // ref http://asle.free.fr/prowiz/prowiz.src.zip / r/pha.c if(X.Sz() < 0x3C0 || !X.c("000003C0",8)) return; //!(X.U8(0) < 0x30 && isWithin(X.U8(2), 0x60,0x80) && X.U8(3) <= 0x40 && X.U8(4) < 0x10 && X.c("00400600", 0x1B6) ins = 0; smp = []; var allsmpsz = olds = 0; for(p=0; p < 0x1B2; p+=14) { if(X.U8(p+3) > 0x40 || (ssz=X.U16(p,_BE)) < X.U16(p+4,_BE)) return; //vol > 64, smpsz < lpstart if(!isWithin(sofs=X.U32(p+8,_BE), 0x3C0,X.Sz()) || sofs%2) return; // smpp allsmpsz += ssz << 1; if(X.U16(p,_BE)) ins++; if(!smp.includes(sofs)) smp.push(sofs); if(p && Math.abs(sofs-olds) > 2) return; olds = sofs + (ssz << 1) } smp = smp.length; if(!isWithin(allsmpsz, 3,31*65535)) return; var ptnM = 0, ptnm = 0xFFFFFFFF; ptn = []; for(p=0x1C0; p < 0x3C0; p+=4) { t = X.U32(p,_BE); if(t+2 < allsmpsz+0x3C0 || t > X.Sz()) return; ptnM = Math.max(ptnM,t); ptnm = Math.min(ptnm,t); if(!ptn.includes(t)) ptn.push(t); } if(ptnm%2 || Math.abs(0x3C0+allsmpsz-ptnm) > 2) return; for(ord=127,p = 0x3B8; p > 0x1C0; p-=4,ord--) if(X.U32(p,_BE) != t) break; else t = X.U32(p,_BE); ptn = ptn.length; p = ptnM; for(i = 0; i < 0x100; i++) if(X.U8(p) >= 0xC0) { i += 254-X.U8(p+1); p += 2 } else p += 4; sz = p; return true } if(!bDetected && isPha()) { sName = "Azatoth/Phenomena's Pha Packer module (.PHA)"; bDetected = 1; if(X.isVerbose()) { sOption('ord:'+ord+' ptn:'+ptn+' ins:'+ins+' smp:'+smp+' sz:'+outSz(sz)) } } function isSTM() { //ref https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_stm.cpp t = X.readBytes(0x14,8); for(i = 0; i < 8; i++) { if(t[i] < 0x20 || t[i] >= 0x7F) return false } function _isstm() { if([0x1A,2].indexOf(X.U8(0x1C)) < 0) return false; if([1,2].indexOf(X.U8(0x1D)) < 0) return false; if(!X.c("02",0x1E)) return false; if([0,10,20,21].indexOf(X.U8(0x1F)) < 0) return false; if(X.U8(0x21) > 0x40) return false; gvol = X.U8(0x22); if(gvol > 0x40 && gvol != 0x58) return false; nVm = X.U8(0x1F); ptn = X.U8(0x21); if(nVm) maxord = 128; else maxord = 64; minsz = 0x30+31*0x20+maxord+ptn*256; if(X.Sz() < minsz) return false; smp = 0; ord = -1; tracker = "Sami 'Psi' Tammilehto's Scream Tracker 2 module"; ext = "STM"; return true } function _isstx() { if(!X.c("'SCRM'",0x3C)) return false; ptnsz = X.U16(0x1C); if((ptnsz < 64 && ptnsz != 0x1A) || ptnsz > 0x840) return false; if(X.U16(0x1E) || X.U32(0x26) || X.U32(0x2C) != 1) return false; t = X.U8(0x2A); if(t > 0x40 && t != 0x58) return false; ptn = X.U16(0x30); if(ptn > 64) return false; smp = X.U16(0x32); if(smp > 96) return false; ord = X.U16(0x34); if(ord > 0x81 && ord != 0x101) return false; ptntp = X.U16(0x20)<<4; smptp = X.U16(0x22)<<4; chtp = X.U16(0x24)<<4; minsz = 0x40 + Math.max(ptntp+ptn*2, smptp+smp*2, chtp+32+ord*5); if(X.Sz() < minsz) return false; if(findIntersections([[ptntp,ptn*2], [smptp,smp*2],[chtp,32+ord*5]]).length) return false; for(p=chtp+32,i=0; i < ord; i++,p+=5) { t = X.U8(p); if(t > 63 && t != 99 && t != 255) return false; } tracker = "Sami 'Psi' Tammilehto's Scream Tracker Music Interface Kit module"; ext = "STX"; return true; } isstm = _isstm(); if(!isstm) { isstx = _isstx(); if(!isstx) return false } sz = sz1 = minsz; smpn = []; max = 0; if(isstm) { //STM things for(i = 0; i < 31; i++) { zero = X.U8(0x30+i*0x20+12); if(zero && zero != 46) return false; smpn.push(X.SC(0x30+i*0x20,12,'CP437').trim()); var sofs = X.U16(0x30+i*0x20+0x0E,_LE) << 4; var ssz = X.U16(0x30+i*0x20+0x10,_LE); if(ssz && sofs > 0x30 && sofs < X.Sz()) { if(ssz) sz1 = sofs+ssz; //Actually it seems that if ssz is 1 it still must be 0, but then it'll just ignore // the potentially interesting byte, so let's rip it too, just in case. if(sz1 > sz) sz = sz1; //We won't count it towards the smp counter though, that one's for the meaningful stuff. if(ssz > 1) smp++ } } for(i=0; i < maxord; i++) { t = X.U8(0x410+i); if(t === 99 || t === 255) t = 255; else if(t > 63) return false; else ord++; } ord++; } else if(isstx) { //STX things p = smptp; for(i = 0; i < smp; i++) { si = X.U16(p+i*2) << 4; smpn.push(X.SC(si+0x30,28,'CP437').trim()); if(!si) continue; if(X.U8(si) === 1) { sofs = X.U16(si+14)<<4; if(sofs > max) { ssz = X.U32(si+16); if(X.U8(si+31)&4) ssz *= 2; //16bit //if(ssz%16) ssz += 16-ssz%16; //the padding. Although STM2STX.EXE v1.0 doesn't pad max = sofs; if(sz < max+ssz) sz = max+ssz } } } fmt = 1; if(ptntp && ptnsz != 0x1A) { p = X.U16(ptntp) << 4; if(p > X.Sz()) if(X.isHeuristicScan()) { bad = bad.addIfNone("!badptnp"); return true } else return false; if(X.U16(p) === ptnsz) fmt = 0; } for(i=0,p=ptntp; i < ptn; i++,p+=2) { if((t=(X.U16(p)<<4)) > X.Sz()) if(X.isHeuristicScan()) { bad = bad.addIfNone("!badptnp"); return true } if(fmt == 0 && X.U16(t) > 0x840) return false } } else return false; return true } if(!bDetected && isSTM()) { sName = tracker+" (."+ext+")"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SC(0,0x14,'CP437')); sOptionT(addEllipsis(smpn.filter(funSampleName).join(' ')),'smp/msg: "','"'); if(ext === "STM") sVersion = "v"+X.U8(0x1E)+"."+nVm; else /*STX*/ sVersion = "v1."+fmt; tmp0 = X.U8(0x20); gvol = X.U8(0x22); sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" gvol:"+gvol+" sz:"+outSz(sz)) } } function isIT() { //from https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_it.cpp et al. // Now, this detection is TOO MUCH // I'm still going to do as much as I can, but people should have a choice to live without most of it :D // Which is to say, do NOT use deepscan unless you need calcsize var t = 0; if(X.c("'IMPM'")) type = "it"; else if(X.c("'tpm.'")) type = "mpt"; else return false; ord = X.U16(0x20,_LE); if(!ord) t++; ins = X.U16(0x22,_LE); if(ins > 0x63) t++; smp = X.U16(0x24,_LE); if(smp > 255) t++; ptn = X.U16(0x26,_LE); if(!ptn && !X.isHeuristicScan()) t++; if(X.Sz() < 0xC0+4*(ins+smp+ptn)) return false; //itfileheader size cwtv /*make*/ = X.U16(0x28,_LE); cmwt /*compat*/ = X.U16(0x2A,_LE); flags = X.U16(0x2C,_LE); special = X.U16(0x2E,_LE); gvol = X.U8(0x30); if(gvol > 0x80) t++; mvol = X.U8(0x31); if(mvol > 0x80) t++; spd0 = X.U8(0x32); if(!spd0) t++; tmp0 = X.U8(0x33); if(tmp0 < 31) t++; sep = X.U8(0x34); if(sep > 0x80) t++; msglen = X.U16(0x36,_LE); msgofs = X.U32(0x38,_LE); if(msgofs+msglen > X.Sz()) t++; if(t > 2) return false; bad = ""; if(t) bad = bad.addIfNone("!badinitinfo"); pwd = X.U8(0x35); nreserved = X.U32(0x3C,_LE); sreserved = X.SA(0x3C,4); tracker = auth = ""; mVlsw = mVcw = sV ="?"; ch = 1; cord = 0; sz = -1; var mptp = 0, lastsmpofs = 0; type = "it"; chnm = []; insnlst = []; smpnlst = []; if(X.isDeepScan()) { //The DeepScan part of the crazily complex Impulse Tracker/MPTM detection //Would be much easier if we didn't have to calculate the size! But we do, so there we go. const ITSampleSz = 0x50, ITHistorySz = 8, verLoadLimit = 0x1000; const sEmbedMsg = 1, sEditHistory = 2, sEmbedPtnHL = 4, sEmbedMIDIC = 8; const fEmbedMIDIC = 0x80, fEFR = 0x1000; var interpretModPlugMade = false; var FFchnpan = X.fSig(0x40,0x40,"FF") >= 0; var mptV = 0; function itV(v) { return v.slice(0,1)+'.'+v.slice(1,3)+'.'+v.slice(3,5)+'.'+v.slice(5,7) } //TODO this↓ part is not ripper-friendly but thankfully also likely unnecessary: if(X.c("'tpm.'")) { type = "mpt"; p = X.Sz()-4; mptp = X.U32(p,_LE); if(X.c("'228'04'mptm'",mptp)) sz = X.Sz(); else mptp = 0; } else { if(0x888 < cwtv <= 0xFFF) { p = X.Sz()-4; mptp = X.U32(p,_LE); if(0x100 <= mptp < X.Sz()-4) if(X.c("'228'04'mptm'",mptp)) { type = "mpt"; sz = X.Sz(); if(cwtv >= verLoadLimit) { sV = "future"; charset = "UTF8"; extsmp = 0; return true } } else mptp = 0; //if the above fails, there's a near-zero chance the ords will be misread and everything goes oof //that's expected behaviour, as the v1.17.02.46 format was experimental :) } //detecting made-with, part 1 of 3496987 if(type === "it") { if((cwtv & 0xF000) === 0x5000) { mptV = (cwtv&0xFFF) << 16; if(X.c("'OMPT'",0x3C)) interpretModPlugMade = true; else if(mptV >= 0x01290000) mptV |= nreserved & 0xFFFF; mVlsw = itV(mptV.toString(16).toUpperCase().padStart(7,'0')); } else if(cwtv === 0x888 || cmwt === 0x888) { interpretModPlugMade = true; mVlsw = "1.17.00.00"; } else if(cwtv === 0x214 && cmwt === 0x202 && !nreserved) { mVlsw = "1.09.00.00"; tracker = "ModPlug Tracker b3.2 - 1.09"; interpretModPlugMade = true } else if(cwtv === 0x300 && cmwt === 0x300 && !nreserved && ord === 256 && sep === 128 && !pwd) { mVlsw = "1.17.02.20"; interpretModPlugMade = true } } } var b32ord = -1, lastord = 0; // 32bit orders: a deprecated format. OpenMPT 1.17.02.46 - 1.17.02.48. if(type === "mpt" && 0x88A < cwtv && cwtv <= 0x88D) { p = 0xC0; if(X.U16(p,_LE)) return false; p += 2; b32ord = X.U32(p,_LE); p += 4; if(b32ord > 256 || X.Sz() < p+b32ord*4) return false } else p = 0xC0; if(b32ord >= 0) ord = b32ord; for(i=0; i < ord; i++) if(b32ord < 0) { o = X.U8(p++); if(o === 0xFE) lastord = 0xFFFE; else { cord++; if(o === 0xFF) lastord = 0xFFFF } } else { o = X.U32(p,_LE); p += 4; lastord = o; cord++ } //_log("read pointers & find the smallest @"+Hex(p)); //TODO maybe, at some point in the future, autodetect b32ord //by making sure these pointers actually lead to intended things, and trying the b32 way if not minp = 0xFFFFFFFF; var insp = []; for(i=0; i < ins; i++) { t = X.U32(p,_LE); p += 4; if(t <= p || t > X.Sz()) return false; q = X.readBytes(t+0x20,0x1A,true); q = decEncoding(q,CP437,false).trim(); if(q != "") insnlst.push(q); if(sz < t) sz = t; if(t && t < minp) minp = t; insp.push(t) } var smpp = []; for(i=0; i < smp; i++) { t = X.U32(p,_LE); p += 4; if(t > X.Sz()) bad = bad.addIfNone("!short"); q = X.readBytes(t+0x14,0x1A,true); q = decEncoding(q,CP437,false).trim(); if(q != "") smpnlst.push(q); if(sz < t) sz = t; if(t && t < minp) minp = t; smpp.push(t) } var ptnp = []; for(i=0; i < ptn; i++) { t = X.U32(p,_LE); p += 4; if((t > 0x1E && t <= p) || t > X.Sz()) return false; if(sz < t) sz = t; if(t && t < minp) minp = t; ptnp.push(t) } if(special & sEmbedMsg) { minp = Math.min(minp,msgofs); if(sz < msgofs+msglen) sz = msgofs+msglen } var possiblyUNMO3 = cmwt === 0x214 && (!cwtv || cwtv === 0x214) && !X.U16(0x1E) && !pwd && !nreserved && !(flags & 0xC0); if(possiblyUNMO3 && !ins && smp && p+4*smpp.length+2 <= minp) { var oldUNMO3 = true; for(i=0; i < smp; i++) if(X.U32(p)) { oldUNMO3 = false; p -= i*4; break } else p += 4; if(oldUNMO3) tracker = "UNMO3 <= v2.4"; } if(possiblyUNMO3 && !cwtv) tracker = "UNMO3 v0/1"; if(special & sEditHistory) { //is edit history stored? var nflt = X.U16(p); if(X.Sz() > p+nflt*8 && p+nflt*8 <= minp) { p += 2+nflt*8; if(possiblyUNMO3 && !nflt) if(special & sEmbedPtnHL) tracker = "UNMO3 <= 2.4.0.1"; else tracker = "UNMO3" } } else if(possiblyUNMO3 && special <= 1 && !X.U16(p)) { tracker = "UNMO3 <= 2.4"; p += 2 } var hasMIDIC = (flags & fEmbedMIDIC) || (special & sEmbedMIDIC), u = 0; if(hasMIDIC) p += 0x1320; if(p > X.Sz()) return false; //_log("chunks expected @"+Hex(p)); var isBeroTracker = hasPluginChunks = hasMPTM = false; while(p+9 < X.Sz()) { hkhd = X.SA(p,4); hksz = X.U32(p+4,_LE); //_log(hkhd+":"+Hex(p)); if(hkhd === "MODU") isBeroTracker = true; else if(hkhd === "CNAM") { ch = hksz/20; u = p+8; hasMPTM = true; for(i = 0; i < ch; i++) { t = X.SA(u,20).trim(); u += 20; if(t != "") chnm.push(t); } } else if(hkhd === "PNAM") hasMPTM = true; else if(hkhd === "CHFX" || /F[X0-9]\d\d/.test(hkhd)) hasPluginChunks = true; if(["IMPI","IMPS","XTPM","STPM"].indexOf(hkhd) >= 0 || p+8+hksz > X.Sz() || p >= msgofs) break; //PNAM may have fun info but that's for when someone feels less tedium otherwise else p += 8+hksz } if(cwtv === 0x217 && cmwt === 0x200 && !nreserved && !isBeroTracker) { if(hasMPTM || (ord > 0 && lastord == 0xFFFF) || FFchnpan) { mVlsw = "1.16.00.00"; tracker = "ModPlug Tracker 1.09-16"; } else { mVlsw = "1.17.00.00"; tracker = "OpenMPT 1.17 (compat.export)"; } interpretModPlugMade = true } var lastsmpofs = (smp > 0 ? smpp[smp-1]+ITSampleSz : p); var lastsmpco = false; // Deriving the size of just the last sample (it might already be tasking indeed) const/*for IT sample flags*/ s16b=2,sSt=4,sCo=8; const/*for cvt flags*/ cSS=1,cBE=2,cD=4,cTo16=8,cOPL=0x40,cExt=0x80,cPCM=0xFF; //Possible codec values: //"sPCM" "uPCM" "dPCM" "fPCM" "IT214" "IT215" "AMS" "DMF" "MDL" "8d16" //"ADPCM" "MT2" "fPCM15" "fPCM23" "fPCMn" "sPCMn" "uLaw" "aLaw" extsmp = []; var possibleXMconv = false; Ss = []; //for gathering all info maxsmpofs = -1; for(i=0; i < smp; i++) { if(!smpp[i]) continue; if(smpp[i] > X.Sz()) { bad = bad.addIfNone("!short"); continue } if(!X.c("'IMPS'",smpp[i])) bad = bad.addIfNone("!badsmp"); //_log(X.SA(smpp[i]+4,13)+": "+decAnsi(smpp[i]+0x14,0x1A,CP437,false).trim()+" @"+Hex(smpp[i])) var sf = X.U8(smpp[i]+0x12); var cvt = X.U8(smpp[i]+0x2E); var slen = X.U32(smpp[i]+0x30); var smpofs = X.U32(smpp[i]+0x48); S = { "ofs":0, "slen":0, "bits":(sf & s16b)? 16 : 8, "chn":1,// 1 channel if mono, 2 if joint or split stereo "en":"LE","codec":"sPCM","bps":0,"length":0 //length is calculated from length in samples }; p = smpofs; S["ofs"] = smpofs; S["slen"] = slen; if(cvt === cOPL) p += 12; else if(cvt === cExt) { t = readVarUInt(p); extsmp.push(X.SA(p+1,t[1])); p += t[0]+t[1]; } else if(X.c("'fLaC'",smpofs)) { S["codec"] = "FLAC" } else if(X.c("'OggS'",smpofs)) { S["codec"] = "Ogg" } else { //GetSampleFormat S["codec"] = (cvt & cSS) ? "sPCM" : "uPCM"; if((sf & sSt) && cwtv >= 0x214) S["chn"] = 2; if(sf & sCo) S["codec"] = (cvt & cD) ? "IT215" : "IT214"; else { if(!(sf & s16b) && cvt == cPCM) S["codec"] = "ADPCM"; else { if(cvt & cBE) S["en"] = "BE"; if(cvt & cD) S["codec"] = "dPCM"; if(cvt & cTo16) S["codec"] = "8d16" } } switch(S["codec"]) { case "sPCM": case "uPCM": case "dPCM": case "fPCM": case "MT2": case "fPCM15": case "fPCM23": case "fPCMn": case "sPCMn": S["bps"] = S["bits"]; break; case "8d16": S["bps"] = 16; break; case "ADPCM": S["bps"] = 4; break; //encoded header size for this one is 16, 0 otherwise case "uLaw": case "aLaw": S["bps"] = 8; break; //case "IT214": case "IT215": case "AMS": case "DMF": case "MDL": S["bps"] = 0; //and default: S["bps"] = 0 //variable length-encoded } if(!S["bps"]) lastsmpco = true; //...and we'll decompress it further down else { S["length"] = slen*S["chn"]*(S["bps"]>>3); p += S["length"]; } Ss[i] = S; } //GetSampleFormat if(lastsmpofs < p) lastsmpofs = p; if(sz < lastsmpofs) sz = lastsmpofs; if(S["codec"] === "uPCM" && slen) possibleXMconv = true; //_log(X.SA(smpp[i]+0x14,0x1A)+" @"+Hex(smpofs)+": sf:"+Hex(sf)+" ["+S["codec"]+"] slen:"+slen+" ch:"+S["chn"]+" bps:"+S["bps"]+" bits:"+S["bits"]+", ends @"+Hex(smpofs+S["length"])); } // Load_it.cpp:845 if(possibleXMconv && cwtv === 0x204 && cmwt === 0x200 && !special && !nreserved && (flags & (~8)) === 0x15 && gvol === 128 && mvol === 48 && sep === 128 && !pwd && !msglen) { for(i=0; i < 64; i++) if([0x20,0x40].indexOf(X.U8(0x40+i)) < 0) { possibleXMconv = false; break } //testing pans if(possibleXMconv) for(i=0; i < 64; i++) if(X.U8(0x80+i) != 0x40) { possibleXMconv = false; break } //testing vols if(possibleXMconv) for(i=20; i < 26; i++) if(X.U8(4+i)) { possibleXMconv = false; break } //testing songname if(possibleXMconv) tracker = "XM Conversion" } // Load_it.cpp:885 :: Scan all of the patterns to see how many channels we need for(i=0; i < ptn; i++) { t = ptnp[i]; if(!t || t > X.Sz()) continue; var len = X.U16(t,_LE), rows = X.U16(t+2,_LE); t += 4; if(!rows || rows > 0x400 || t+4 > X.Sz()) continue; p = t+4; var chnMask = [], row = 0; while(row < rows && p < X.Sz()) { var y = X.U8(p++); if(!y) { row++; continue } var c = y&0x7F; if(c) c--; if(y&0x80) chnMask[c] = X.U8(p++); if(chnMask[c] & 0x0F) if(ch <= c && c < 0x7F) ch = c+1; if(chnMask[c] & 1) p++; if(chnMask[c] & 2) p++; if(chnMask[c] & 4) p++; if(chnMask[c] & 8) p += 2; } if(lastsmpofs < p) lastsmpofs = p; if(sz < lastsmpofs) sz = lastsmpofs } if(!ch) ch = 1; //find the expected length of the final compressed sample if(lastsmpofs) { p = lastsmpofs; if(lastsmpco) { S = Ss[Ss.length-1]; //smp length calc if(S["bps"]) if(S["bps"]%8) S["length"] = (S["codec"] == "ADPCM"?16:0) +Math.ceil((slen+1)/2*S["ch"]); else S["length"] = (S["codec"] == "ADPCM"?16:0) +S["slen"]*S["bps"]/8*S["chn"]; else { //let the crazy shit begin. // ref https://github.com/nicolasgramlich/AndEngineMODPlayerExtension/blob/master/jni/loaders/itsex.c // but mainly OpenMPT's SampleIO::ReadSample :142 if(S["bps"] == 4 && S["chn"] == 1 && S["en"] == "LE" && S["codec"] == "ADPCM") { S["length"] = 16+(S["slen"]+1)/2; p += S["length"] } else if(S["slen"] > 1 && (S["codec"] === "IT214" || S["codec"] === "IT215")) { //:165 // Let's try a quick-n-dirty first. var u = p, ulen = 0, quickndirty = 0; while(u < X.Sz() && ulen < S["slen"] /*packers have their limits*/) { if(X.c("'XTPM'",u) || X.c("'STPM'",u) || X.c("'228'04'mptm'",u)) { quickndirty = 1; p = u; break } ucsz = X.U16(u,_LE); ulen += ucsz; u += 2+ucsz; } if(quickndirty) { p = u } else { //orrrr if no MPTX block is present, we gotta do it the hard way I guess :< //ITDecompression(file,sample,getencoding=it215) var bit_n = bit_buf = cend = readdef = 0; function readBits(b) { while(bit_n < b) { bit_buf |= Util.shlu64(X.U8(p++),bit_n); bit_n += 8 } var v = bit_buf & (Util.shlu64(1,b) - 1); bit_buf = Util.shru64(bit_buf,b); bit_n -= b; //if(p <= X.Sz()) return v; else return 0 } return v } if(S["bits"] == 16) { fetchA=4, lowerB=-8, upperB=7, defW=17 } else { fetchA=3, lowerB=-4, upperB=3, defW=9 } for(c = 0; c < S["chn"]; c++) { //ITCompression.cpp:322 var rs = S["slen"], v = csz = clen = topbit = 0; cend = p; while(rs && p < X.Sz()) { //:325 csz = X.U16(p,_LE); p += 2; cend = p+csz; if(!csz) { readdef = 10; _log("IT @"+Hex(p)+" malformed sample?"); continue } if(cend > X.Sz()) { c = 0xE0F; bad = bad.addIfNone("!short"); break } clen = Math.min(rs, 0x8000>>(S["bits"]>>4)); var w = defW; bit_buf = bit_n = 0; while(clen && p < X.Sz()) { //:357 if(w > defW) { //_log("! IT @"+Hex(p)+" w="+Hex(w)+" > "+defW+" rs:"+rs+" clen:"+Hex(clen)+" cend:"+Hex(cend)); bad = bad.addIfNone("!badITsmp"); rs = 0; break } v = readBits(w); topbit = 1<<(w-1); if(w < 7) { if(v == topbit) { v = readBits(fetchA)+1; if(v >= w) v++; w = v; continue } } else if(w < defW) { if(v >= topbit+lowerB && v <= topbit+upperB) { v -= topbit-1+lowerB; if(v >= w) v++; w = v; continue } } else if(v & topbit) { w = (v&0xFF)+1; continue } clen--; rs-- } } if(p > X.Sz()) bad = bad.addIfNone("!short"); } } //if quickndirty else } //if IT215||IT214 else if(S["codec"] === "FLAC") { //TODO, or maybe not } else if(S["codec"] === "Ogg") { //TODO, or maybe not } else if(S["codec"] === "AMS" && S["chn"] == 1) { //SampleIO:170 //TODO test it at least sOption("\n!!! Please send this file to the detector dev!!! Poor fella hasn't any to test on") var srcsz = X.U32(p+4,_LE), pc = X.U8(p+8); S["length"] = srcsz+9 } else if(S["codec"] === "8d16" && S["chn"] == 1 && S["bps"] == 16) { sOption("\n!!! Please send this file to the detector dev!!! Poor fella hasn't any to test on") //TODO CopyMonoSample(sample, source, fsize) } else if(S["codec"] === "MDL" && S["chn"] == 1 && S["bps"] <= 16) { var srcsz = X.U32(p); S["length"] = 4+srcsz } else if(S["codec"] === "DMF" && S["chn"] == 1 && S["bps"] <= 16) { sOption("\n!!! Please send this file to the detector dev!!! Poor fella hasn't any to test on") //TODO DMFUnpack, or not to do } else if((S["codec"] === "uLaw" || S["codec"] === "aLaw") /*TODO && mono or stereoInterleaved */ && S["bps"] == 16) { S["length"] = S["slen"]*S["chn"] } } //actual length teller if(sz < p) sz = p } } var bLoadXIProps = false; if(X.c("'XTPM'",p)) { // 'MPTX' p += 4; while(p+6 < X.Sz()) { t = X.SA(p,4); it = X.U32(p); if(t === "STPM" || t === "228\x04" || (it&0x80808080) || !(it&0x60606060)) break; var prsz = X.U16(p+4,_LE); p += 6; for(i=0; i < ins; i++) p += prsz } bLoadXIProps = true; if(sz < p) sz = p; } // Load_it.cpp:978 interpretModPlugMade |= bLoadXIProps; // Load_it.cpp:985 if(X.c("'STPM'",p)) { p += 4; while(p+7 < X.Sz()) { t = X.SA(p,4); it = X.U32(p); prsz = X.U16(p+4,_LE); if(t === "228\x04" || t == "228\x02") { mptp = p; break; } //TODO check for 228\x02TC! if((it&0x80808080) || !(it&0x60606060) || p+6+prsz > X.Sz()) break; p += 6; switch(t) { case "...C": var chn = 0; switch(prsz) { case 2: chn = X.U16(p,_LE); break; case 3: chn = X.U24(p,_LE); break; case 4: chn = X.U32(p,_LE); break; default: chn = X.U8(p) } if(chn > ch) ch = chn; break; case ".VWC": var v = 0; switch(prsz) { case 1: v = X.U8(p); break; case 2: v = X.U16(p,_LE); break; case 3: v = X.U24(p,_LE); break; case 8: v = X.U64(p,_LE); break; default: v = X.U32(p,_LE) } if(v) mVcw = itV(v.toString(16).toUpperCase().padStart(7,'0')); break; case "VWSL": var v = 0; switch(prsz) { case 1: v = X.U8(p); break; case 2: v = X.U16(p,_LE); break; case 3: v = X.U24(p,_LE); break; case 8: v = X.U64(p,_LE); break; default: v = X.U32(p,_LE) } if(v) mVlsw = itV(v.toString(16).toUpperCase().padStart(7,'0')); break; case "AUTH": auth = X.SC(p,prsz,"UTF8"); break; } p += prsz; } if(sz < p) sz = p; } tunings = 0; if(X.c("'HSCT'",p)) { //the first-ever way of storing the tunings in an mptm //tuningCollection.cpp var skip = false; var v = X.I32(p+4,_LE); p += 8; if(v == 1) { //can't find any files to test this sOption("Please send this file to the detection author!!! This is ultra-rare, how did you make it?!"); p += X.U32(p); p += 4+Math.min(256,l) } else if( v == 2 ) { //_log("tunings text: "+X.UCSD(p)); p += 1+X.U8(p); } else { skip = true; bad = bad.addIfNone("!badtuningver") } if(!skip) { tunings = X.U32(p+2); p += 6; t = X.fSig(p,0x1000,"'FSCT'"); if(t >= p) p = t+4; } if(sz < p) sz = p; } else if(X.c("'228'04'mptm'",p)) { //TODO there can be old-ass tunings instead here if(!mptp) mptp = p; // Load_it.cpp:1299 function readaintle(bits) { //ReadAdaptiveInt32LE et al. var b = 0, add = 0, r = 0, oldp = p; if(p+1 < X.Sz()) { b = X.U8(p++); if(bits == 16) add = b & 1; else if(bits == 32) add = b & 3; else if(bits == 64) add = (1<<(b&3))-1; else return 0; if(bits == 16) r = b >> 1; else r = b >> 2; for(var i=0; i < add; i++) { b = 0; if(p+1 < X.Sz()) { b = X.U8(p++); r |= b << ((i+1)*8-2); } else return 0 } } else return 0; return r } // serialization_utils.cpp:399 function mptBeginRead() { if(!X.c("'228'",p)) return false; posstart = p; p += 3; var l = X.U8(p++); h = X.SA(p,l); p += l; flagbyte = 0; hd = X.U8(p++); idbytes = ((hd & 3) === 3) ? 4 : (hd & 3); twochar = hd&(1<<6); hsz = readaintle(32); if(hsz > 1) { t = X.U8(p++); if(!t) flagbyte = X.U8(p); p += hsz-1 } if(hd & (1<<4)) t = readaintle(64); var srlV = itV(t.toString(16).toUpperCase().padStart(7,'0')); if(mVlsw === "?") mVlsw = srlV+"[mptinfo]"; if(hd & (1<<5)) p += X.U8(p++); //:477 if(flagbyte & 1) { t = X.U8(p++); if(t&1) idbytes = 65535; else idbytes = t >> 1 } fes = 0; if(flagbyte & (1<<1)) fes = readaintle(32); //:496 hasstartpos=hd&(1<<2); hassz=hd&(1<<3); hasid=idbytes; hasdesc=hd&(1<<7); hasmap = hasid || hasstartpos || hassz || hasdesc; if(flagbyte&(1<<2)) { t = readaintle(16); //:512 //_log(" @"+Hex(p)+" desc["+t+"]:"+(twochar ? X.SC(p,t,"UTF8") : X.SA(p,t))); p += t*(twochar ? 2 : 1) } if(flagbyte&(1<<3)) p += 5; //:517 entries = readaintle(64); //if(entries > 16000) break; if(hasmap) t = readaintle(64); if(p > X.Sz()) return false; //:533 //endOfHdrData = rposEndOfHdrData = p-posstart; rposMapBegin = hasmap ? t : p-posstart; return true } if(mptBeginRead()) { // serialization_utils.cpp:558 //I've left the pieces of map code intact in case there's fun in finding out what MPT-only tweaks there are if(hasmap || fes) { p = posstart+rposMapBegin; //var idArray = [], mapdata = []; for(i=0; i < entries && p < X.Sz(); i++) { var idsz = idbytes; if(idsz == 65535) idsz = readaintle(16); // md = {"idlen":idsz, "idpos":oldEnd, "id:":"", "rposst":0, "rposend":0, "sz":-1 } // var oldEnd = mapdata.length; if(idsz) md["id"] = X.SA(p,idsz); p += idsz; if(hasstartpos) /*md["rposst"] =*/ readaintle(64); if(!fes) { if(hassz) /*md["sz"] =*/ readaintle(64) } //else md["sz"] = fes // if(md["sz"] >= 0 && !hasstartpos) // md["rposst"] = !i ? 0 : mapdata[i-1]["rposst"] + mapdata[i-1]["sz"]; if(hasdesc) { t = readaintle(16); p += t*(twochar ? 2 : 1) } //mapdata.push(md) } } //posmapend = p } if(sz < p+4) sz = p+4; if(X.U32(p,_LE) != mptp) bad = bad.addIfNone("!badmptptr"); } //if 228.mptm // Load_it.cpp:1158 if(mVlsw === "?" && cwtv === 0x888) mVlsw = "1.17.00.00"; if(mVlsw != "?" && tracker === "") { tracker = "OpenMPT"; //not sure how many people care about these but... isCompatX = (cwtv&0xF000) === 0x5000; if(mVlsw === "1.17.00.00" && sreserved != "OMPT") isCompatX = false; if(isCompatX) tracker += " (compat. export)"; else if((mVlsw > "1.17.02.54" && mVlsw < "1.18.02.00" && mVlsw != "1.18.00.00") || (mVlsw > "1.18.02.00" && mVlsw.slice(mVlsw.length-2,mVlsw.length) != "00")) tracker += " (test build)" } else { var STdv = 734016 + (cwtv === 0x1FFF ? nreserved : cwtv-0x1050); switch(cwtv >> 12) { case 0: if(isBeroTracker) tracker = "BeRoTracker"; else if(cwtv === 0x214 && cmwt === 0x200 && flags === 9 && !special && !X.U16(0x3E) && !ins && ptn+1 === ord && gvol === 128 && mvol === 100 && spd === 1 && sep === 128 && !pwd && !msglen && !msgofs && !nreserved) tracker = "OpenSPC conversion"; else if(cwtv === 0x214 && cmwt === 0x200 && !X.U16(0x3E) && !nreserved) { mVlsw = "1.00.00.A5"; tracker = "ModPlug Tracker 1.00a5"; interpretModPlugMade = true } else if(cwtv === 0x214 && cmwt === 0x214 && sreserved === "CHBI") tracker = "ChibiTracker"; else if(cwtv === 0x214 && cmwt === 0x214 && special <= 1 && !pwd && !nreserved && (flags&0x10A6) === 4 && smp > 1 && X.c("'XXXXXXXX.YYY'",smpp[1]+4)) tracker = "CheeseTracker"; else if(!cwtv && tracker === "") tracker = "Unknown"; else if(cmwt < 0x300 && tracker === "") { if(cmwt > 0x214) tracker = "Impulse Tracker 2.15"; else if(isWithin(cwtv,0x215,0x217)) tracker = 'Impulse Tracker 2.14p'+(cwtv == 0x215? '1-2': cwtv == 0x216? '3': '4-5'); else tracker = 'Impulse Tracker '+((cwtv&0xF00)>>8)+'.'+(cwtv&0xFF).toString(16).padStart(2); //a good place to find the total edit time if you care } break; case 1: // function SchismEpoch(y,m,d) { var mm = (m+9)%12; var yy = y-mm/10; // return yy*365 + yy/4 - yy/100 + yy/400 + (mm*306+5)/10 + d-1 } var mk = cwtv & 0xFFF; if(mk <= 0x50) tracker = "Schism Tracker 0."+mk.toString(16); else { var dt = 734016 + (mk < 0xFFF ? mk-0x050 : nreserved); var y = Util.div64(dt*10000+14780, 3652425); var ddd = dt - (365*y + Util.div64(y,4) - Util.div64(y,100) + Util.div64(y,400)); if(ddd < 0) { y--; ddd = dt - (365*y + Util.div64(y,4) - Util.div64(y,100) + Util.div64(y,400)) } var mi = Util.div64(100*ddd+52, 3060); tracker = "Schism Tracker "+(y+Util.div64(mi+2,12)).padStart(4,'0')+"-" +((mi+2)%12+1).padStart(2,'0') +"-"+(ddd - Util.div64(mi*306+5,10) + 1).padStart(2,'0') } break; case 4: tracker = "pyIT "+((cwtv&0xF00)>>8)+"."+((cwtv&0xFF).toString(16)); break; case 6: tracker = "BeRoTracker"; break; case 7: if(cwtv === 0x7FFF && cmwt === 0x215) tracker = "munch.py"; else tracker = "ITMCK "+((cwtv>>8)&0xF)+"."+((cwtv>>4)&0xF)+"."+(cwtv&0xF); break; case 0xD: if(cwtv == 0xDAEB) tracker = "spc2it"; else if(cwtv == 0xD1CE) tracker = "itwriter"; else tracker = "unknown"; } } } //if isDeepScan if(mVlsw != "?") { charset = 'CP1252'; if(mVcw == "?") sV = mVlsw; else if(mVcw != mVlsw) sV = "cw:"+mVcw+"/lsw:"+mVlsw; else sV = mVcw } else { charset = 'CP437'; if(mVcw != "?") sV = mVcw } var badc = 0; for(i=0;i0)if(q < p+hksz && ["SAMP","INST"].indexOf(decAnsi(q,4,'CP437')) < 0) _log(" | ^WTF J2B @"+Hex(q-hsz)+"->"+Hex(q)) } break } p += hksz+align*(hksz&1) } if(p > sz || !ok || !ord || !ptn || (!smp && !ins)) return false; return true } if(!bDetected && isJ2B()) { sName = "Jazz Jackrabbit 2/Galaxy Sound System module (.J2B)"; sVersion = "v."+(align?"__":"FF"); bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(0x14,64)); sOptionT(addEllipsis(insts.join('\n'),0x100,0xA0),'msg:"','"'); sOption("ord:"+ord+" loop:"+loop+" ptn:"+mptn+(mptn!=ptn ? "/"+ptn : "") +(ins?" ins:"+ins:"")+(smp?" smp:"+smp:"")+" sz:"+outSz(sz)) } } function isRHST() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/RobHubbard_ST/src/Rob%20Hubbard%20ST_v2.asm if(!X.c("00407F40 00C081C0") || !X.c("41FAFFEE",0x38)) return false; p = 180; const max = Math.min(0x10000,X.Sz()); do { t = X.U16(p,_BE); p += 2 } while(p < max && t != 0x4E75); //findplay if(p > max) return false; playp = p; do { t = X.U16(p,_BE); p += 2 } while(p < max && t != 0xDFFC); //findend if(p > max) return false; p += 4; endp = p; do { t = X.U16(p,_BE); p += 2 } while(p < max && t != 0x4E75); //findinit if(p > max) return false; do { t = X.U16(p,_BE); p += 2 } while(p < max && t != 0x7E02); //findIt1 if(p > max) return false; songp = p+X.U16(p+2,_BE)+2; d0 = X.U32(songp,_BE)>>2; x = d0/3; a1 = p = songp; for(d5=0; d0--;) { //find the max ptr p = songp+X.U32(a1,_BE); a1 += 4; while(p < max) { t = X.U32(p,_BE); p += 4; if(!t) break; if(t > d5) d5 = t } } sz = songp+d5; do t = X.U8(sz++); while(t != 0x87); return true } if(!bDetected && isRHST()) { sName = "Rob Hubbard ST module (.RHO)"; sVersion = "v1.1"; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,"×"); sOption(outSz(sz),"sz:") } } function isASC1() { //basically ASC0 + loop pos //ref https://ay.strangled.net/Ay_Emul30.src.7z/Players.pas -> FoundASC1 if(X.Sz() < 9) return false; ptntp = X.U16(2,_LE); ord = X.U8(8); //patterns table ptr & num of positions if(ptntp-ord != 9 && ptntp-ord != 72) return false; smptp = X.U16(4,_LE); if(smptp > X.Sz()) return false; //samples table ptr orntp = X.U16(6,_LE); if(orntp > X.Sz()) return false; //ornaments table ptr if(X.U16(smptp,_LE) != 0x40 || X.U16(orntp,_LE) != 0x40) return false; ptn = 0; for(i=0; i < ord; i++) { p = X.U8(9+i); if(ptn < p) ptn = p } ptn++; if(X.U16(ptntp,_LE) != ptn*6) return false; j = X.U16(orntp+0x40-2,_LE)+orntp; while((j < X.Sz()) && (j < 65535) && !(X.U8(j)&0x40)) j += 2; bad = ''; if(j > 65534 || j >= X.Sz()) if(X.isHeuristicScan()) bad = '/malformed!short'; else return false; sz = j+2; delay = X.U8(0); loop = X.U8(1); return true } if(!bDetected && isASC1()) { sName = "A.'Andrew Strikes Code' Sendetskii/Power of Sound's ASC/Advanced Sound Master module (.ASC)"; sVersion = 'v1.x-2.x'+bad; bDetected = 1; //TODO find out how exactly to credit this one if(X.isVerbose()) { pt = X.fSig(8,0x80,"'ASM COMPILATION OF '")+0x13; if(pt > 8) { pa = X.fSig(pt+0x13,0x20,"' BY '"); sOptionT(X.SA(pt,pa-pt)); sOptionT(X.SA(pa+4,0x14),'by: ') } sOption('ord:'+ord+' ptn:'+ptn+' delay:'+delay+' loop:'+loop+' sz:'+outSz(sz)) } } function isASC0() { //ref https://ay.strangled.net/Ay_Emul30.src.7z/Players.pas -> FoundASC0 if(X.Sz() < 8) return false; ptntp = X.U16(1,_LE); ord = X.U8(7); //patterns table ptr & num of positions if(ptntp-ord != 8 && ptntp-ord != 71) return false; smptp = X.U16(3,_LE); if(smptp > X.Sz()) return false; //samples table ptr orntp = X.U16(5,_LE); if(orntp > X.Sz()) return false; //ornaments table ptr if(X.U16(smptp,_LE) != 0x40 || X.U16(orntp,_LE) != 0x40) return false; ptn = 0; for(i=0; i < ord; i++) { p = X.U8(8+i); if(ptn < p) ptn = p; } ptn++; if(X.U16(ptntp,_LE) != ptn*6) return false; j = X.U16(orntp+0x40-2,_LE)+orntp; while((j < X.Sz()) && (j < 65535) && !(X.U8(j)&0x40)) j += 2; bad = ''; if(j > 65534 || j >= X.Sz()) if(X.isHeuristicScan()) bad = '/malformed!short'; else return false; sz = j+2; delay = X.U8(0); return true } if(!bDetected && isASC0()) { bDetected = 1; sVersion = 'v0.x'+bad; sName = "Andrei 'Andrew Strikes Code' Sendetskii/Titus's Advanced Sound Master module (.AS0)"; if(X.isVerbose()) { pt = X.fSig(7,0x80,"'ASM COMPILATION OF '")+0x13; if(pt > 7) { pa = X.fSig(pt+0x13,0x20,"' BY '"); sOptionT(X.SA(pt,pa-pt)); sOptionT(X.SA(pa+4,0x12),'by: ') } sOption('ord:'+ord+' ptn:'+ptn+' delay:'+delay+' sz:'+outSz(sz)) } } function isGlobalTracker() { //ref https://ay.strangled.net/Ay_Emul30.src.7z/Players.pas -> FoundGTR if(X.Sz() < 296) return; p = 0x29; var adr = X.U16(5), mp = 0, old = X.U16(p-2)-adr, t; for(i=0; i < 14; i++) { t = X.U16(p)-adr; //sample ptrs check if(t-old < 6 || (t-old-2) % 4 || t > X.Sz()) return; p += 2; old = t } old = X.U16(p)-adr; p += 2; for(i=0; i < 15; i++) { t = X.U16(p)-adr; //ornament ptrs check if(t-old < 3 || t > X.Sz() || t-old != 2+X.U8(old+1) /* orn. loop end */) return; p += 2; old = t } sz = t+2+X.U8(t+1); //it's always the ornaments that come last, so we'll take the last one old = X.U16(p)-adr; p += 2; for(i=1; i < 32*3; i++) { t = X.U16(p)-adr; //pattern ptrs check if(t-old < 3 || t > X.Sz()) return; p += 2; old = t } ord = X.U8(p++); lp = X.U8(p++); if(lp > ord) return; for(i=0; i < ord; i++) if(X.U8(p++) % 6) return; // all positions must be divisible by 6 if(X.U16(0x65) != p) return; // start of PatChns; must match the pointer to PatChns[0] return true } if(!bDetected && isGlobalTracker()) { sName = "Doctor Max/Global Corp.'s' Global Tracker module (.GTR)"; bDetected = 1; sVersion = 'v'+(X.U8(4)>>4)+'.'+(X.U8(4)&0xF); if(X.isVerbose()) { dly = X.U8(0); ptn = X.U8(0x125); lp = X.U8(0x126); sOptionT(X.SA(7,0x20)); sOption('ord:'+(lp>0?lp+'-':'')+ord+' ptn:'+ptn+' delay:'+dly+' sz:'+outSz(sz)); } } function isBPSoundMon() { //ref https://github.com/tonioni/WinUAE/blob/master/prowizard/rippers/BP-Soundmonitor.c // & src/BS02-92.S for BPSM version if(X.Sz() < 0x200) return false; old = false; bad = ""; if(!/V\.\d/.test(X.SA(0x1A,3))) if(X.c("'BPSM'",0x1A)) old = true; else return false; ord = X.U16(0x1E,_BE); if(525+ord*16 > X.Sz()) return false; allsmpsz = smp = 0; for(i=0; i < 15; i++) { if(X.U8(0x20+i*0x20) == 0xFF) continue; sn = X.readBytes(0x20+i*0x20,0x18); if(charStat(sn,CS_ALL).indexOf('xsc') < 0) return false; slen = X.U16(0x20+0x18+i*0x20,_BE)<<1; lp = X.U16(0x3A+i*0x20,_BE); lpl = X.U16(0x3A+i*0x20,_BE); svol = X.U16(0x3E+i*0x20,_BE); if(lpl > slen || lp-1 > slen || lpl-1 > slen) return false; if(svol > 0x60) return false; else if(svol > 0x40) bad = bad.addIfNone("!badvol") allsmpsz += slen; if(slen) smp++ } sz = 0x200+allsmpsz+ord*0x10; if(!old) sz += X.U8(0x1D)*0x40; //what IS this value? ptn = 0; for(i=0; i < ord*16; i+=4) { p = X.U16(0x200+i,_BE); if(p>ptn) ptn = p } sz += ptn*0x30; return true } if(!bDetected && X.isDeepScan() && isBPSoundMon()) { bDetected = 1; sName = "Brian Postma's SoundMon module (.BP)"; if(old) sVersion = "old"; else sVersion = "v"+X.SA(0x1C,1); if(X.Sz() < sz) bad = bad.addIfNone("!short"); if(bad != "") sVersion = sVersion.appendS("malformed"+bad,'/'); if(X.isVerbose()) { sOptionT(X.SA(0,0x1A)); sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(sz)); } } function isFuchs() { //ref https://github.com/tonioni/WinUAE/blob/master/prowizard/rippers/FuchsTracker.c if(X.Sz() < 0xC0 || !X.c("'SONG'",0xC0) || !X.c("'INST'",0xC8+X.U32(0xC4,_BE))) return false; allsmpsz = X.U32(0x0A,_BE); if(allsmpsz <= 2 || allsmpsz >= 65535*16) return false; smpdescs = 0; smp = 0; for(i=0; i < 16; i++) { ssz = X.U16(0x0E+i*2,_BE); if(ssz) smp++; lpst = X.U16(0x4E+i*2,_BE); if(ssz < lpst) return false; if(X.U8(0x2E+i*2) > 0x40) return false; //vol smpdescs += ssz } if(smpdescs <= 2 || smpdescs > allsmpsz) return false; ord = X.U8(0x6F); if(!ord || ord > 0x28) return false; ptn = 0; //last pattern for(i=0; i < 0x28; i++) { pt = X.U8(0x71+i*2); if(pt > 40) return false; if(pt > ptn) ptn = pt } ptn++; k = ptn*1024; if(k+204 > X.Sz()) return false; sz = smpdescs+k+204; return true } if(!bDetected && isFuchs()) { sName = "Andreas Fuchs's FuchsTracker module (.FUCHS)"; bDetected = 1; if(X.isVerbose()) sOption('ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } function isGMC() { //ref https://github.com/tonioni/WinUAE/blob/master/prowizard/rippers/GMC.c // & https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_gmc.cpp if(X.Sz() < 444 || !X.c("000000",0xF0)) return; //smp descriptions allsmpsz = 0; j = 0; smps = []; for(k=p=0; k < 15; k++,p+=0x10) { o = X.U32(p,_BE); if(o > 0x7FFFFF || (o&1)) return; //ofs l = X.U16(p+4,_BE)<<1; //length if(l > 0xFFFF) return; if(X.U8(p+6)) return; //zero byte if(X.U8(p+7) > 0x40) return; //vol a = X.U32(p+8,_BE); if(a > 0x7FFFFF || (a&1)) return; //address n = X.U16(p+0xC,_BE); //looplen if(n > 2 && n > l) return; if(X.U16(p+0xE,_BE) & 1) return; //datastart allsmpsz += l; if(l) smps.push([o,l]); } if(allsmpsz <= 4) return; smps.sort(function(a,b){return a[0]-b[0]}); for(k=0; k < smps.length-1; k++) if(smps[k][0]+smps[k][1] > smps[k+1][0]) return; ord = X.U8(0xF3); //ptn table size if(!isWithin(ord, 1, 0x64)) return; ptn = 0; ords = []; for (i=0; i < 100; i++) { //ptn order table p = X.U16(0xF4+i*2,_BE); if (p & 0x3FF) return; if(i < ord) { p >>= 10; if(p > ptn && p != 63) ptn = p } } ptn++; if(ptn > 64) return; m = notes = badnotes = badled = 0; end = false; p = 0x1BC; nps = []; if(p+ptn*0x400 > Math.min(X.Sz(),0xFFFC)) return; for (i=0; i < ptn && !end; i++) { //test pattern data badnotes = badled = 0; for (j = 0; j < 256 && !end; j++,p+=4) { d = X.readBytes(p,4); np = (d[0]<<8)+d[1]; if(np && np != 0xFFFE) if(isWithin(np, 113,856)) { notes++; if(!nps.includes(np)) nps.push(np); if(notes > 100 && !X.isDeepScan()) end = true; } else badnotes++; d[2] &= 0xF; if(d[2] == 3 && d[3] > 0x40) badnotes++; //vol effect if(d[2] == 4 && d[3] > 0x63) return; if(d[2] == 5 && d[3] > ord+1) return; } if(badnotes > 16) { if(debug>0)_log("GMCFault: over 16 bad notes"); return} } nps = nps.length; if(!notes) return; if(nps <= 2 && !X.isHeuristicScan()) return; // that's not music... sz = 0x1BC + ptn*0x400 + allsmpsz; return true } if(!bDetected && isGMC()) { bDetected = 1; sName = "Andreas Tadic's Game Music Creator module (.GMC)"; if(X.isVerbose()) { sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smps.length +((X.isDeepScan() || notes < 100) ? " notes:"+notes+"("+nps+" diff.)" : '') +" sz:"+outSz(sz)); if(X.Sz() < sz) sVersion = "malformed!short" } } function isMoonBlaster() { //ref https://www.msx.org/wiki/Moonblaster_file_format //TODO check for the sanity of more values passed to MSX-AUDIO, like instr/vol if(X.Sz() < 0x179) return false; ord = X.U8(0); ofs = unpsz = 0; if(ord > 220 && ord < 255) return false; //not sure if the manual is right about 220 being the maximum if(ord == 255) { ofs = 1; ord = 200 } //a subformat. Always 200 positions, 01-filled; all offsets are +1 else ord++; for(i=0; i < 0x20; i++) if(X.U8(0xA3+ofs+i) > 0x16) { /*_log('MBM: instr/vol error');*/ return false } tmp0 = X.U8(ofs+0xCD); if(!tmp0) { /*_log('MBM: tempo = 0 error');*/ return false } p = ofs+0x178+ord; ptn = -1; for(i=ofs+0x178; i < p; i++) { t = X.U8(i); if(t > ptn) ptn = t } // Start pattern number is 1, no need to ptn++. Funnily, the manual says patterns start from 0 if(ptn < 1) return false; ptnp = p+ofs; ptn1 = oldp = X.U16(ptnp); if(ptn1 > X.Sz()) { /*_log('MBM: ptn1 @'+Hex(ptn1)+">"+Hex(X.Sz()));*/ return false } for(i=0; p < X.Sz() && i < ptn; i++) { p = X.U16(ptnp+i*2); if(!i) unpsz = p; // patterns should start from the current unpsz if(p < ptnp+i*2 || p > X.Sz()) { /*_log('MBM: ptn ptr['+Hex(i)+'] error @'+Hex(ptnp+i*2)+': '+Hex(p));*/ return false } if(i && p-oldp > 0x100) { /*_log('MBM: ptn too large @'+Hex(ptnp+i*2));*/ return false } oldp = p; } if(!ofs) { p = ptnp+i*2; if((unpsz != p || p > X.Sz())) { /*_log('MBM: pattern offset error: p='+Hex(p));*/ return false } } else p = ptn1 //decruncher: going over all the patterns at once while(p < X.Sz()) { c = X.U8(p++); if(!c) break; else if(c <= 0xF2) unpsz++; else /*decrunching 0's*/ unpsz += c-0xF2; } if(!isWithin(p, 0x178,0x3DC0)) return false; sz = p; return true } if(!bDetected && isMoonBlaster()) { //MUS is "FST-song", MBM is song, MBK is drumkit, MBV is voice-e, MBB is voice-b, MBS is samples sName = "Remco Schrijvers et al.'s MSX MoonBlaster for MoonSound module (.MBM)"; bDetected = 1; if(ofs) sVersion = '200-pos.ver.'; drumkit = X.SA(ofs+0x140,8).trim(); if(drumkit != 'NONE') sVersion = sVersion.appendS('+'+drumkit+'.MBK','/'); if(X.isVerbose()) { sOption(X.SA(ofs+0xCF,40).trim()); sOption('tempo0:'+tmp0+' ord:'+ord+' ptn:'+ptn+' unpsz:'+unpsz+' sz:'+outSz(sz)) } } function isProTracker1_sp() { //PT1's project file //TODO() } function isProTracker1_c() { //ref https://bitbucket.org/zxtune/zxtune/src/develop/src/formats/chiptune/aym/protracker1.cpp // & https://ay.strangled.net/Ay_Emul30.src.7z/Formats.pas -> FoundPT1 if(X.Sz() < 0x66) return; tempo = X.U8(0); if(!isWithin(tempo, 2,15)) return; //delay ptntp = X.U16(0x43); if(ptntp >= X.Sz()) return; //patterns table pointer numofpos = X.U8(1);// if(len == 0) return; //numofpositions, can be corrupted? loop = X.U8(2); j = 0; j1 = 65535; for(i=0; i < 0x10; i++) { //samples pointers sp = X.U16(3+i*2); if(sp > X.Sz()) return; if(j < sp) j = sp; op = X.U16(0x23+i*2); if(op > X.Sz()) return; if(op && j1 > op) j1 = op } if((j1 < 0x67) || (j < 0x67) || (j > 65534) || (j > X.Sz()) || (j + X.U8(j) * 3 + 2 != j1)) return; for(i=j=0; i < 0x10; i++) { //ornaments pointers op = X.U16(0x23+i*2,_LE); if(op > X.Sz()) return; if(j < op) j = op } if(j < 0x67) return; len = j+0x40; if(len > 0x10000 || len > X.Sz()+1) return; j = 0x63; while(j <= ptntp && X.U8(j) < 0xFF) j++; if(j+1 != ptntp) return; ord = j-0x63; if(loop > ord) return; return true } if(!bDetected && isProTracker1_c()) { sName = "Golden Disk ProTracker module (.PT1)"; sVersion = "v1.x/compiled"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(0x45,0x1E)); //musicname sOption("tempo:"+tempo+" ord:"+ord+" len:"+len) } } function isProTracker2() { //ref https://bitbucket.org/zxtune/zxtune/src/develop/src/formats/chiptune/aym/protracker2.cpp // & https://ay.strangled.net/Ay_Emul30.src.7z /Players.pas & /Help/html/ay_ru_fmt_pt2.htm if(X.Sz() < 132) return; //the smallest pt2 in all actual collections is 521 bytes long tmp = X.U8(0); if(!isWithin(tmp,2,15)) return; const maxsz = X.Sz()+X.isHeuristicScan()*0x200; ord = X.U8(1); lp = X.U8(2); if(!ord || lp > ord || 0x83+ord > maxsz-2) return; smp0 = X.U16(3); orn0 = X.U16(0x43); if(orn0-smp0 > maxsz+2 || orn0 < smp0) return; ptnp = X.U16(0x63); if(!isWithin(ptnp,0x65,orn0)) return; smp = orn = 0; for(i=mps=0,p=3; i < 0x20; i++,p+=2) { t = X.U16(p); if(t > mps) mps = t; if(t) { smp++; if(!isWithin(t,0x65,maxsz-2)) return } } for(mp=0; i < 0x30; i++,p+=2) { t = X.U16(p); if(t > mp) mp = t; if(t) { orn++; if(orn <= 2 && !isWithin(t,Math.max(mps,orn0),maxsz)) return } //just check the first two orns. Ornament records seem to be optional, and, //despite the pointers being present, some modules are just cut off early } for(p=0x83,ptn=i=0; i <= 0xFF; i++,p++) { if(p > X.Sz()-2) return; if((o=X.U8(p)) == 0xFF) break; if(o > ptn) ptn = o } ptn++; p++; if(ord != i || ptnp != p) return; for(rptn=0; p < X.Sz(); rptn++,p+=2) { if(!(t=X.U16(p))) break; else if(!isWithin(t,ptnp+ptn*6,X.Sz())) return } if(rptn != ptn*3) return; sz = mp+2+X.U8(mp); return true } if(!bDetected && isProTracker2()) { sName = "Golden Disk ProTracker module (.PT2)"; sVersion = 'v2.x'; bDetected = 1; if(X.isVerbose()) { nc = charStat(t=X.readBytes(0x65,0x1E), 1); if(nc.indexOf('allxsc') >= 0) sOptionT(decEncoding(t,CPSpeccy)); else sOption(''); sOption('tmp:'+tmp+' ord:'+(lp?lp+'-':'')+ord+' ptn:'+ptn+' smp:'+smp+' orn:'+orn+' sz:'+outSz(sz)) } } function isProTracker3(ofs) { //PT3's detection but sanity checks because SOME people -_- //ref https://bitbucket.org/zxtune/zxtune/src/develop/src/formats/chiptune/aym/protracker3_compiled.cpp // & https://ay.strangled.net/Ay_Emul30.src.7z /Help/html/ay_ru_fmt_pt3.htm // & https://bitbucket.org/zxtune/zxtune/src/develop/src/formats/chiptune/aym/turbosound.cpp if(X.Sz()-ofs < 0xCA) return; p = 0; var maxsz = Math.min(65535,X.Sz()+X.isHeuristicScan()*0x200); var smps=[], orns=[], trks=[], ptns=[]; bad = ''; function re(msg) { if(debug>1)_l2r('pt3',p,msg); return } ttn = X.U8(ofs+0x63); if(ttn > 4) if(X.isHeuristicScan()) bad = bad.addIfNone('!badtuning'); else return; tmp0 = X.U8(ofs+0x64); if(!tmp0) return; ord = X.U8(ofs+0x65); ptnp = ofs+0xCA+ord; if(ptnp != X.U16(ofs+0x67)+ofs || ptnp > X.Sz()-2) return re('!badptnp+'+Hex(ptnp)); lp = X.U8(ofs+0x66); if(lp > ord-1) return re('!badlp'); orn = smp = mp = 0; if(!ofs) ptnp0 = ptnp; for(p=ofs+0x69; p < ofs+0xA9; p+=2) if(X.U16(p)) smp++; for(; p < ofs+0xC9; p+=2) if(X.U16(p)) orn++; for(ptn=i=0,p=ofs+0xC9; i <= 0xFF; i++) { if((o=X.U8(p++)) == 0xFF) break; if(o%3) return; if(ptns.indexOf(o/3) < 0) ptns.push(o/3); if(o/3 > ptn) ptn = o/3 } ptn++; if(!i || i != ord) return re('!realord:'+i+' != ord:'+ord); t = X.readBytes(ofs,10); tracker = ''; if(charStat(t,1).indexOf('allasc') >= 0) { t = decEncoding(t,CPSpeccy); if(t == 'ProTracker') { tracker = 'Pro Tracker'; sv = 'v'+X.SA(ofs+0xB,4).trim(); nv = X.U8(ofs+0xD)-0x30 } else if(t == 'Vortex Tra') { tracker = 'Vortex Tracker ]['; sv = 'v'+X.SA(ofs+0x12,4).trim(); nv = 7 } else { tracker = '"'+X.SA(ofs,14)+'"'; sv = 'v3.x'; nv = 7 } } else { tracker = 'hacked Pro Tracker'; sv = 'v3.x'; nv = 7 } //track parser function isTrkIn(tracks,track) { for(var i=0; i < tracks.length; i++) if(tracks[i][0] == track[0]) return true; return } for(i=notes=0; i < ptn*3 && p < maxsz; i++,p+=2) { // echo track addresses, pertinent to debugging: // 6F3, 719, 745... if(!isWithin(t=X.U16(p)+ofs, p,maxsz)) return re('!badptnp2:'+Hex(t)); if(ptns.indexOf(Util.divu64(i,3)) < 0) continue; trk = [t,0]; if(isTrkIn(trks,trk)) continue; var lines = 0, eot = false; trkparse: while(!eot && lines < 256 && t < maxsz) { eol = false; z = 0; // counter of all effect parameters while(!eol && t < X.Sz()) { if((x=X.U8(t++)) == 0) eol = eot = true; else if(x == 1 || x == 8) z += 3; else if(x == 2) z += 5; else if([3,4,6,9].indexOf(x) >= 0) z++; else if(x == 5) z += 2; else if(x == 7) bad = bad.addIfNone('!badcmd07h'); else if(x == 0x10) { x = X.U8(t++); y = X.U16(0x69+x)+ofs; if(smps.indexOf(x) < 0) { if(y > ofs && !isWithin(y, ptnp,maxsz)) bad = bad.addIfNone('!badsmp'); smps.push(x) } } else if(x < 0x20) { t += 2; x = X.U8(t++); y = X.U16(0x69+x)+ofs; if(smps.indexOf(x) < 0) { if(y > ofs && !isWithin(y, ptnp,maxsz)) bad = bad.addIfNone('!badsmp'); smps.push(x) } } else if(x < 0x40) { /* could check if this isn't channel B but may be too much */ } else if(x < 0x50) { x &= 0xF; if(orns.indexOf(x) < 0) { orns.push(x); if(mp < (y=X.U16(ofs+0xA9+x*2)+ofs)) mp = y } } else if(x < 0xB0) { notes++; eol = true } else if(x == 0xB0) { /*envoff*/ } else if(x == 0xB1) { lines += X.U8(t++) } else if(x < 0xC0) t += 2; else if(x == 0xC0) eol = true; else if(x < 0xD0) { /*setvol*/ } else if(x == 0xD0) eol = true; else if(x < 0xF0) { x = (x&0x1F)<<1; y = X.U16(ofs+0x69+x)+ofs; if(smps.indexOf(x) < 0) { if(y > ofs && !isWithin(y, ptnp,maxsz)) bad = bad.addIfNone('!badsmp1'); smps.push(x) } } else { x &= 0xF; if(orns.indexOf(x) < 0) { orns.push(x); if(mp < (y=X.U16(ofs+0xA9+x*2))) mp = y } x = X.U8(t++); y = X.U16(ofs+0x69+x)+ofs; if(smps.indexOf(x) < 0) { if(y > ofs && !isWithin(y, ptnp,maxsz)) bad = bad.addIfNone('!badsmp2'); smps.push(x) } } } lines++; t += z; z = 0; if(lines > 256) if (!X.isHeuristicScan()) return re('!badlines'); else bad = bad.addIfNone('!badlns') }//trkparse trk[1] = t-trk[0]; if(!isTrkIn(trks,trk)) trks.push(trk); if(mp < t) mp = t }//all tracks parsed // function tupleSort(lst) { function sf(a, b) { if(a[0] != b[0]) return a[0]-b[0]; else return a[1]-b[1] } return lst.sort(sf) } //_l2r('pt3',0,outArray(tupleSort(trks),16)+'::: '+outArray(findGaps(trks,0),16)+' :: '+outArray(findIntersections(trks,true),16)) if(t=findIntersections(trks,true).length) if(!X.isHeuristicScan() || t > 5) return re('trackxsections'); else bad = bad.addIfNone('!trkxsec'); //so there are some broken files, like echo.pt3 (5753 bytes) if(t=findGaps(trks,0).length) if(!X.isHeuristicScan() || t > 5) return re('trackgaps'); else bad = bad.addIfNone('!trkgap'); //tracks are monolithic BUT SOME PEOPLE rsmp = smps.length; rorn = orns.length; rptn = ptns.length; if(!rptn || rsmp > 32) return re('!rptn='+rptn+',rsmp='+rsmp); if(X.fStr("compilation of",10,20) < 0 && !rsmp) return re('!nosmp'); sz = mp+2+X.U8(mp+1); //ornaments! either at the last orn ptr, or just straight after the patterns return true } if(!bDetected && isProTracker3(0)) { sName = "Golden Disk ProTracker module (.PT3)"; sVersion = sv; bDetected = 1; tsmode = nv >= 5 && (X.U8(0x62) != 0x20 || X.c("'Vortex Tra'",sz) || X.c("'ProTracker 3'",sz)); if(X.isVerbose()) info1 = 'tmp0:'+tmp0+' ord:'+(lp?lp+'-':'')+ord +' ptn:'+(rptn!=ptn?rptn+'/':'')+ptn+' smp:'+(rsmp!=smp?smp+'/':'')+rsmp +' orn:'+(rorn!=orn?rorn+'/':'')+orn+' notes:'+notes; sz1 = sz; ord1 = ord; tmp1 = tmp0; if(tsmode) if(!isProTracker3(sz) || ord1 != ord || tmp1 != tmp0) tsmode = false; if(tsmode) { //TurboSound container? check the footer, should be nearby (or isn't a footer) if((t=X.fSig(sz,0x200,"'02TS'")) > sz) if(X.SA(t-6,4) === X.SA(t-12,4)) if(sz1 == X.U16(t-8,_LE)) { sVersion += '[TurboSound:'+X.SA(t-6,4)+']'; sz = t+4; } else if(nv >= 7) sVersion += '/TurboSound'; else bad = bad.addIfNone('badTSver') } if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { if(X.c("'by ",0x3F)) { sOptionT(decAnsi(0x1E,0x20,CPSpeccy)); sOptionT(decAnsi(0x42,0x20,CPSpeccy),'by: ') } sOptionT(tracker,'in: '); switch(ttn) { case 0: sOption('tuning 0: 1625000Hz PT3.3'); break; case 1: sOption('tuning 1: Sound Tracker'); break; case 2: sOption('tuning 2: ASM/PSC 1.75MHz'); break; case 3: sOption('tuning 3: RS 1625000Hz'); break; case 4: sOption("tuning 4: Ivan Roshchin's Natural Cmaj/Am"); break; default: sOption('tuning '+ttn+'/custom') } sOption((tsmode?'chip#1: ':'')+info1); if(tsmode) { sOption('chip#2: ptn:'+(rptn!=ptn?rptn+'/':'')+ptn+' smp:'+(rsmp!=smp?smp+'/':'')+rsmp +' orn:'+(rorn!=orn?rorn+'/':'')+orn+' notes:'+notes); } sOption(outSz(sz),'sz:') } } function isProSoundCreator_c(v14/*must take 0 or 1*/) { //from https://ay.strangled.net/Ay_Emul30.src.7z /Players.pas → FoundPSC switch(v14) { case 1: sv = 'v1.04+'; break; case 0: sv = 'v1.00~3'; break; default: return } const max = Math.min(X.Sz(),0x10000); if(max < 0x4E) return; var sap = X.U16(0x45), ordp = X.U16(0x47), ornp = X.U16(0x4A); //sample pointer table begins from 4Ch if(!isWithin(sap, 0x4E,max) || !isWithin(ordp, 0x4E,max-11) || !isWithin(ornp, 0x4E,Math.min(max,0x8C)) || ornp % 2) return; var o0 = X.U16(ornp)+v14*ornp, s0 = X.U16(0x4C)+v14*0x4C, t = X.U16(ornp-2)+v14*0x4C; if(s0 > Math.min(ornp+0x40,X.Sz()-5) || o0 >= max || t >= max || o0-t < 8 || (o0-t) % 6 != 2) return; for(p=s0+4,smp=0; p < max && (X.U8(p) & 0x20); p += 6) smp++; if(p > 0xFFFE || p > X.Sz()) return; if(ornp-0x4C-2 > 0) { if(p+3 != X.U16(0x4E)+v14*0x4C) return } else if(p+4 != o0) return; p = ordp+1; if(X.U8(p) == 0xFF) return; for(ord=ptn=0; p+3 < max;) { if(!isInside(X.U16(p+1), o0,ordp) || !isInside(X.U16(p+3), o0,ordp) || !isInside(X.U16(p+5), o0,ordp)) return; p += 8; ord++; if(X.U8(p) == 0xFF) { if(X.U8(p-1) >= ord) return; lp = X.U8(p-1); break } else ptn = Math.max(ptn,X.U8(p-1)+1) } sz = p+3; dly = X.U8(0x49); ftitle = charStat(X.readBytes(0,0x18),true).indexOf('allasc') >= 0; fby = charStat(X.readBytes(0x2E,0x17),true).indexOf('allasc') >= 0; return true } if(!bDetected && (isProSoundCreator_c(1) || isProSoundCreator_c(0))) { sName = "Viktor 'KVA' Kuźmin's Pro Sound Creator module (.PSC)"; //Виктор Кузьмин sVersion = sv+'/compiled'; bDetected = 1; if(X.isVerbose()) { if(ftitle) sOptionT(decAnsi(0x19,0x14,CPSpeccy,false,Chars0to1FSpeccy)); if(fby) sOptionT(decAnsi(0x31,0x14,CPSpeccy,false,Chars0to1FSpeccy),"by: "); sOption('ord:'+(lp>0?'('+lp+'-)':'')+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } } function isFTC() { //from https://ay.strangled.net/Ay_Emul30.src.7z /Players.pas → FoundFTC //if(X.c("'Module: '") && X.c("';Fast Tracker v1.00'", 0x32)) // we KNOW someone broke this in their music if(X.Sz() < 0xD7) return; const max = Math.min(0x10000,X.Sz()); switch(X.U8(0x32)) { case 0x3B: notet = 0; break; case 1: notet = 1; case 2: notet = 2; default: return } if((ptnp=X.U16(0x4B)) >= X.Sz()) return false; if(X.U16(0x92) <= X.U16(0x52)) return false; for(p=0xD4,ptn=0; p < 0x1D4 && p < X.Sz() && X.U8(p) < 0x80; p += 2, ord++) ptn = Math.max(ptn,X.U8(p)+1); lp = X.U8(0x46); if(p >= 0x1D4 || lp > ord) return; var ofs = X.U16(ptnp) - (ptn*6 + ptnp+2); if(ofs < 0) return; if(X.U16(0x52)-ofs >= X.Sz() || ptnp >= X.U16(0x52)-ofs || X.U16(0x92)-ofs >= X.Sz()) return; var ornpm = 0xFFFF, ornpM = 0, msmpp = 0; for(p=0x52; p < 0x92; p+=2) msmpp = Math.max(msmpp,X.U16(p)); for(; p < 0xD4; p+=2) { ornpm = Math.min(ornpm,X.U16(p)); ornpM = Math.max(ornpM,X.U16(p)) } if(msmpp-ofs >= Math.min(65534,X.Sz()) || ornpm-ofs >= max || ornpM-ofs >= max || msmpp <= ptnp || msmpp+3+(X.U8(msmpp-ofs+2)+1)*5 != ornpm) return; sz = msmpp+3+(X.U8(msmpp-ofs+2)+1)*2-ofs; if(sz < ptnp) return false; return true } if(!bDetected && isFTC()){ sName = "S.'Orion' Matveev & A.'Sand' Plużnikov's Fast Tracker module (.FTС)"; //Сергей Матвеев & Александр Плужников bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(8,0x2A)); sOption('ord:'+(lp>0?'('+lp+'-)':'')+ord+' ptn:'+ptn+(ofs?' ofs:'+Hex(ofs):'')+' sz:'+outSz(sz)) } } function isSoundTrackerProF() { //ref https://bitbucket.org/zxtune/zxtune/src/develop/src/formats/chiptune/aym/soundtracker.cpp // & https://ay.strangled.net/STPDocs.7z -> Xplay79f.txt if(X.Sz() < 3009+576) return false; //header + patterns for(p=smp=0; smp < 15; smp++) { for(i=0; i < 32; i++) if(X.U8(p++) > 0x0F) return false; //levels for(i=0; i < 32; i++) if(X.U8(p++) & 0x20) return false; //noises for(i=0; i < 32; i++) { p++; if(X.U8(p++) > 0x1F) return false } //additions for(i=0; i < 2; i++) if(X.U8(p++) > 0x1F) return false; //loops } for(i=0; i < 0x100; i++) { if(!isWithin(X.U8(p),1,0x20)) return false; p += 2 } //positions // at this point, p should be 15*0x82 if(X.U8(p++) & 0x80) return false; p += 32*17; //ornaments dly=X.U8(p++); if(!isWithin(dly,1,0xF)) return false; pts=X.U8(p); if(!isWithin(pts,1,0x40)) return false; return true; } if(!bDetected && isSoundTrackerProF()) { sName = "Stanislav 'KSA' Kuzin's Sound Tracker Pro module (.STF,.F)"; sVersion = "uncompiled/packed"; bDetected = 1; if(X.isVerbose()) { sOption('dly:'+dly+' pts:'+pts) } } function isSoundTrackerPro() { //from https://ay.strangled.net/STPDocs.7z -> stp.txt tmp = X.U8(0); if(!isWithin(tmp,1,50)) return; const max = X.Sz()-2; var ordtp = X.U16(1,_LE); ord = X.U8(ordtp); lp = X.U8(ordtp+1); //ord, loop, orderlist and ptn transpose if(!isWithin(ordtp,10,max) || lp > ord || !ord) return; var ptntp = X.U16(3,_LE); if(!isWithin(ptntp,ordtp+2+ord*2,max)) return; //pattern offsets var orntp = X.U16(5,_LE); if(!isWithin(orntp,10,max)) return; //ornament offsets var smptp = X.U16(7,_LE); if(!isWithin(smptp,10,max)) return; //sample offsets sz = smptp+30; if(sz > X.Sz()) return; var ptnp = [], smpp = []; for(i=0; i < ord; i++) if(X.U8(ordtp+2+i*2)%6 || !isWithin(t=X.U16(ptntp+i*2,_LE),10,max)) return false; else if(ptnp.indexOf(t) < 0) ptnp.push(t) for(i=0; i < 15; i++) if(!isWithin(t=X.U16(smptp+i*2),10,max)) return; else if(smpp.indexOf(t) < 0) smpp.push(t); ptn = ptnp.length; smp = smpp.length; if(!ptn) return; return true; } if(!bDetected && isSoundTrackerPro()) { sName = "Stanislav 'KSA' Kuzin's Sound Tracker Pro module (.STP)"; sVersion = "compiled"; bDetected = 1; if(X.isVerbose()) { if(X.c("'KSA SOFTWARE COMPILATION OF '",10)) sOptionT(X.SC(0x26,0x19,'CP1251')); sOption('tmp:'+tmp+' ord:'+(lp?lp+'-':'')+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } } function isSQTracker() { //ref https://ay.strangled.net/Ay_Emul30.src.7z/Players.pas -> FoundSQT if(X.Sz() < 17) return false; sz = X.U16(0); if(X.Sz() < sz) return false; smptp = X.U16(2); if(smptp < 10) return false; //samples table ptr orntp = X.U16(4); ptntp = X.U16(6); //ornaments & patterns table ptrs postp = X.U16(8); lpp = X.U16(0xA); //positions table ptr & loop ptr if(orntp <= smptp+1) return false; if(ptntp < orntp) return false; if(postp <= ptntp) return false; if(lpp < postp) return false; membase = smptp-10; //to eventually realign to file, not memory if(lpp-membase >= sz) return false; i = postp-membase; b = X.U8(i); if(!b) return false; //can't have 0 patterns ord = 0; ptn = 0; while(b) { //find the highest pattern # if(i+7 >= sz) return false; ord++; if(ptn < (t = b&0x7F)) ptn = t; i += 2; b = X.U8(i); if(ptn < (t = b&0x7F)) ptn = t; i += 2; b = X.U8(i); if(ptn < (t = b&0x7F)) ptn = t; i += 3; b = X.U8(i) } ptn++; p = X.U16(smptp-membase+2); if(p-ptntp != ptn*2) return false; p = 12; len = i+7; if(len != sz) return false; t = X.U16(12); for(i = 1; i <= (orntp-smptp)>>1; i++) { p += 2; j3 = X.U16(p); if(j3-t != 0x62 && (sz != 1337 || ord != 10 || ptn != 11)) return false; t = j3; } for(i = 1; i <= (ptntp-orntp)>>1; i++) { p += 2; j3 = X.U16(p); if(j3-t != 0x22) return false; t = j3; } return true; } if(!bDetected && isSQTracker()) { sName = "Jiří 'George' Koudelka's Scalex Qjeta Tracker module (.SQT)"; sVersion = "compiled"; bDetected = 1; sOption('ord:'+ord+' ptn:'+ptn+' sz:'+outSz(sz)) } function isSTC() { //ref https://ay.strangled.net/Ay_Emul30.src.7z/Players.pas -> FoundST if(X.Sz() < 6) return false; tempo = X.U8(0); if(tempo == 0 || tempo > 0x20) return false; //delay postp = X.U16(1,_LE); if(postp<0x7E || postp>X.Sz()) return false; //positions ptr orntp = X.U16(3,_LE); if(orntp<0x7E || orntp>X.Sz()) return false; //ornaments ptr ptntp = X.U16(5,_LE); if(ptntp<0x7E || ptntp>X.Sz()) return false; //patterns ptr ord = X.U8(postp)+1; j2 = ptntp - orntp; if(j2 == 0) return false; //j2<0: ST, >0: S_SONIC fID = false; if(j2 > 0) { if((j2%0x21) > 0) return false; } else if((j2%0x21) > 0) { if((j1<55) || (((j1-55)%0x21) > 0)) return false; fID = true; //we'll check for a preset ID at the end } j = X.U8(postp)*2+3; if(j2 < 0) { if(j+j2 != 0) return false; } else if(j+postp-orntp != 0) { if((ptntp < 82) || (j+postp-ptntp+55 != 0)) return false; fID = true; } j = orntp+0x21; if(j > 65535 || j > X.Sz()) return false; while(j) { j--; if(X.U8(j) > 0) return false; if(j == orntp) break } j = ptntp; j1 = 0; j2 = 0; ptn = 0; while((j+6 <= X.Sz()) && (j+6 < 65536) && (X.U8(j) < 0xFF)) { //find the highest channel data pointer j++; //ptn # j2 = X.U16(j,_LE); if(j1 < j2) j1 = j2; j += 2; //channel A data ofs j2 = X.U16(j,_LE); if(j1 < j2) j1 = j2; j += 2; //ditto B j2 = X.U16(j,_LE); if(j1 < j2) j1 = j2; j += 2; //ditto C ptn++ } if((X.U8(j) < 0xFF) ) return false; if(j1 > X.Sz()) return false; if(X.U8(j1-1) < 0xFF) return false; bad = 0; //some modules are a bit more broken! Like "- unknown/ay5.stc" which lost some of its final bytes while(1) { //scan through the channel data at the end of file if(0x83 <= X.U8(j1) <= 0x8E) j1++; //I don't get what this does, no docs either j1++; if(j1 > 65535) return false; if(j1 > X.Sz()) if(X.isHeuristicScan()) { bad = 1; break } else return false; if((X.U8(j1) == 0xFF) || (j1 == X.Sz())) break } if(X.U8(j1) == 0xFF) len = j1+1; else len = X.Sz(); // len = X.U16(0x19,_LE); // because ~somebody~ used it for names if(fID) if( (X.SA(ptntp-55,29) != 'SOUND TRACKER COMPILATION OF ') && (X.SA(ptntp-55,28) != 'KSA SOFTWARE COMPILATION OF ') ) return false; return true; } if(!bDetected && X.isDeepScan() && isSTC()) { sName = "Jarosław 'BZYK' Burczyński's Sound Tracker module (.STC,.ZXS)"; sVersion = "v1.x"; bDetected = 1; if(bad) sVersion += "/malformed"+bad; sz = X.U16(0x19,_LE); i_d = X.SA(7,18); if(['SONG BY ST COMPILE','SONG BY MB COMPILE','SONG BY ST-COMPILE', 'SOUND TRACKER v1.1','S.T.FULL EDITION ','SOUND TRACKER v1.3'].indexOf(i_d) >= 0) msg = ''; else msg = i_d; if(sz != X.Sz()) { //the message must've hit the size field, HAPPENS sz = len; if(X.isVerbose()) sOption("ord:"+ord+" ptn:"+ptn); if(32 <= (sz&0xFF) <= 0x7F) { msg += String.fromCharCode(sz&0xFF); if(32 <= (sz>>8) <= 0x7F) msg += String.fromCharCode(sz>>8) } } if(X.isVerbose()) { sOptionT(msg,"msg: "); sOption('ord:'+ord+' ptn:'+ptn+' sz:'+outSz(sz)) } } function isST3() { //ref https://ay.strangled.net/Ay_Emul30.src.7z/Players.pas -> FoundST3 if(X.Sz() < 8) return; orntp = X.U16(5); if(orntp > X.Sz()-6) return; //ST3 ornaments/STC patterns table ptr ptntp = X.U16(7); //ST3 patterns table ptr j1 = ptntp-orntp; if(j1 <= 0) return; smptp = X.U16(3); //samples table ptr j2 = orntp-smptp; if(j2 <= 0) return; ordp = X.U16(1); //orderlist ptr j3 = smptp-ordp; if(j3 > X.Sz()) return; j4 = ordp-9; if(j4 <= 0) return; if(j4 % 130) { if(j4 < 55 || (j4-55) % 130) return; fID = true } else fID = false; smp = X.U8(smptp); if(!isWithin(smp, 1,16)) return; // smp # , j5 p = smp*130 + 9 + (fID? 55: 0); if(ordp != p) return; ord = X.U8(p); if(!ord) return; //pos # , j6 for(i=0,ptn=0; i < ord; i++) ptn = Math.max(ptn+1,X.U8(p+1+i*2)) p += ord*2+1; if(smptp != p && smptp != p+2) return; orn = X.U8(orntp); if(!orn || orn > 16) return; // orn # , j7 p = smptp+smp*2+1+orn*32; if(orntp != p) return; p += orn*2+1; if(X.U16(ptntp) != p) return; base = X.U16(smptp+1)-9; if(fID) base -= 55; if(base < 0) return; p = X.U16(orntp+1)-base; if(p != smptp+smp*2+1) return; for(i=p; i < p+32; i++) if(X.U8(i)) return; j8 = -1; p = ordp+2; for(i=0; i < ord; i++) { b = X.U8(p); if(b % 6) return; if(j8 < b) j8 = b; p += 2 } bad = ''; sz = ptntp+j8+6; if(sz-1 > X.Sz()) bad = bad.addIfNone('!short'); if(base+p > 65536) return; return true; } if(!bDetected && X.isDeepScan() && isST3()) { sName = "S.T. Music's Recompiler v2 rebuilt STC module (.ST3)"; sVersion = "v3.0"; bDetected = 1; if(bad && !X.isVerbose()) sVersion += "/malformed"+bad; if(X.isVerbose()) { if(fID) { sOptionT(decAnsi(9,55,CPSpeccy,false,Chars0to1FSpeccy)); if(!X.c("'KSA SOFTWARE COMPILATION OF '",9)) sOption(X.SA(9,28),'in: '); } sOption('ord:'+ord+' ptn:'+ptn+' smp:'+smp+' delay:'+X.U8(0)+" @"+Hex(base)+" sz:"+outSz(sz)); } } function isSidMon1() { //ref http://asle.free.fr/prowiz/prowiz.src.zip / r/sidmon1.c // & https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/sidmon1/SIDMon1.0.s //I'm just used to calling the base ofs "a0" at this point a0 = X.fSig(0,0xFFFF,"41FA.... ....FFD4 43FA.... 228841FA ....D1E8 FFD843FA"); if(a0 < 0 || (a0&1) || a0 > X.Sz()) return false; bad = ""; p = X.U16(a0+2,_BE); msgp = a0+p+2; if(msgp < a0+16 || msgp > X.Sz()) return false; //if(debug&&a0)_log("init @"+Hex(a0)+", p="+Hex(p)); playp = X.fSig(a0+0x10,a0+msgp-6,"4E7548E7FFFE"); if(playp < 0 || (playp&1)) return false; smpd = X.U16(a0+2+p-2,_BE); ordp = X.U16(a0+2+p-6,_BE); ptnp = X.U16(a0+2+p-10,_BE); if(!smpd || !ordp || !ptnp) return false; //_log("smpd:"+Hex(a0+2+p+smpd)+" ordp:"+Hex(a0+2+p+ordp)+" ptnp:"+Hex(a0+2+p+ptnp)); if(a0+2+p+smpd > X.Sz() || a0+2+p+ordp > X.Sz()) return false; if(smpd <= ordp && smpd != 1) return false; ptn = (ordp-ptnp) >> 6; ord = 0; smps = []; if(smpd == 1) { //no samples, traversing orderlist ord++; pt = a0+2+p+ordp; if(pt+4 > X.Sz()) { sz = pt; return true; } // 1 position pt += 4; t = 1; sz = ordp-ptnp; while(t < sz) { t = X.U32(sz,_BE); if(sz+4 > X.Sz() || !t) return true; sz += 4 } sz -= 4; ord-- } else { //samples present ord = (smpd-ordp) >> 2; smpd += a0+2+p; //now an absolute offset sdsz = X.U16(smpd+2,_BE); smp = sdsz >> 5; if(smpd+sdsz > X.Sz() || sdsz%32) return false; //_log("smpinfo: ["+Hex(sdsz)+"/"+Hex(smp)+"]") if(!sdsz) for(;; sdsz += 0x20) { //guess manually if(sdsz+0x24 > X.Sz()) return false; stp = X.U32(smpd+sdsz+4,_BE); //smp start ofs k = X.U32(smpd+sdsz+8,_BE); //loop start ofs? endp = X.U32(smpd+sdsz+0xC,_BE); //loop end ofs or smp end ofs if(stp > k || k >= endp) break; smp++; //_log(" smp found @"+Hex(sdsz)) t = decAnsi(smpd+sdsz+0x10,0x10,CPAmiga).trim(); if(t != "") smps.push(t) } mendp = 0; for(i=0; i < smp; i++) { endp = X.U32(smpd+i*0x20+0xC,_BE); if(endp > mendp) mendp = endp; t = decAnsi(smpd+i*0x20+0x10,0x10,CPAmiga); if(t != "") smps.push(); } //_log("mendp:"+Hex(mendp)+" @"+Hex(smpd+sdsz+4+mendp)); sz = smpd+sdsz+4+mendp; if(sz > X.Sz()) bad = bad.addIfNone("!short"); } return true; } if(!bDetected && X.isDeepScan() && isSidMon1()) { sName = "SIDMon module (.SID1,.SMN,.SID)"; sVersion = "v1"; bDetected = 1; if(bad != '') sVersion = sVersion.appendS("malformed"+bad,'/'); if(X.isVerbose()) { t = decAnsi(msgp,0x100,CPAmiga).trim(); if(t != "SID-MON BY R.v.VLIET (c) 1988") sOptionT(t); sOptionT(addEllipsis(smps.join(','),200),'smps:'); sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(sz)); } } function isSidMon2() { //from https://github.com/neumatho/NostalgicPlayer/blob/main/Source/Agents/Players/SidMon20/SidMon20Worker.cs if(X.Sz() < 0x5A) return false; if(!X.c("'SIDMON II - THE MIDI VERSION'", 0x3A)) return false; ord = X.U8(2)+1; spd0 = X.U8(3); smp = X.U16(4,_BE); ofs = 0x3A+X.U32(6,_BE); songlenlen = X.U32(0xA,_BE); ofs += songlenlen; //yes if(ofs != 0x5A) return false; p = 0x0E; for(i = 0; i < 10; i++) { t = X.U32(p,_BE); if(t > 0x0FFFFF || !t) return false; switch(i) { case 0: var ordt = [ofs,t]; break; case 1: if(t != ordt[1]) return false; var notexpost = [ofs,t]; break; case 2: if(t != notexpost[1]) return false; break; case 3: if(t % 32) return false; break; case 7: if(t != smp) return false; var smpt = [ofs,t]; break; case 8: trk = t >> 1; break; case 9: var trkt = [ofs,t]; break; } p += 4; ofs += t; if(ofs > X.Sz()) return false } ofs = trkt[0]+trkt[1]; if(ofs&1) ofs++; smpsz = 0; smps = []; for(p = smpt[0]; p < smpt[0]+smpt[1]; p += 0x40) { smpsz += X.U16(p+4,_BE) << 1; t = decAnsi(p+0x20,0x20,CPAmiga).trim(); if(t != "") smps.push(t) } sz = ofs+smpsz; smp >>= 6; return true } if(!bDetected && isSidMon2()) { sName = "SIDMon II module (.SID2)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(7,0x20)); sOptionT(X.SA(0x27,0x20),"in: "); sOptionT(addEllipsis(smps.join(','),0x100),'smp/msg:"','"'); sOption("trk:"+trk+" ord:"+ord+" smp:"+smp+" sz:"+outSz(sz)) } } function isDigiIllu() { //ref https://github.com/tonioni/WinUAE/blob/master/prowizard/rippers/DigitalIllusion.c if(X.Sz() < 17) return false; smp = X.U16(0,_BE); if(smp > 31) return false; ordp = X.U32(2,_BE); if(ordp < smp*8+2) return false; //orderlist ptr ptndp = X.U32(6,_BE); if(ptndp-ordp > 0x80 || X.U8(ptndp-1) != 0xFF) return false; //pattern data ptr smpdp = X.U32(10,_BE); if(smpdp > 0xFFFF) return false; //sample data ptr if(ptndp <= ordp+1 || smpdp <= ordp) return false; if(ordp > X.Sz() || ptndp > X.Sz()) return false; allsmpsz = 0; for(j=0; j < smp; j++) { ssz = X.U16(j*8+14,_BE)<<1; if(ssz > 0xFFFF) return false; lst = X.U16(j*8+18,_BE)<<1; if(lst > ssz) return false; lsz = X.U16(j*8+20,_BE)<<1; if(lsz > ssz+2 || lst+lsz > ssz+2 || (lst && lsz <= 2)) return false; if((lst || lsz > 2) && !ssz) return false; if(X.U8(16+j*8) > 0xF || X.U8(17+j*8) > 0x40) return false; //ft & vol checks allsmpsz += ssz } if(allsmpsz <= 2) return false; for(i=ordp,ptn=0; i < ptndp-1; i++) if((t=X.U8(i)) > 0x80) return false; else if(t >= ptn) ptn = t+1; sz = allsmpsz+smpdp; return true } if(!bDetected && isDigiIllu()) { sName = "Digital Illusions Creative Entertainment packed module (.DI)"; bDetected = 1; if(sz > X.Sz() && !X.isVerbose()) sVersion = "malformed!short"; if(X.isVerbose()) { sOption('ord:'+(ptndp-ordp-1)+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)); } } function isImagoOrpheus() { //ref https://sourceforge.net/p/xmp/libxmp/ci/master/tree/src/loaders/imf_load.c if(!X.c("'IM10'",0x3C)) return false; if(X.U16(0x20) > 0x100 || X.U16(0x22) > 0x100 || X.U16(0x24) > 0xFF || !X.U8(0x30) || X.U8(0x31) < 0x20 || X.U8(0x32) > 0x40 || X.I8(0x33) < 4) return false; ord = X.U16(0x20); ptn = X.U16(0x22); ins = X.U16(0x24); spd = X.U8(0x30); bpm = X.U8(0x31); ch = chon = 0; chns = []; var t,rs,r,psz,b,nsmp; for(p=0x40; p < 0x240; i++,p+=0x10) { // name[12]+chorus+rev+pan+status if(X.isVerbose()) { t = X.SC(p,12,'CP437').trim(); if(t.length) chns.push(t) } if(X.U8(p+15) <= 1) ch++; if(!X.U8(p+15)) chon++; } if(!ch) return false; for(notes=i=0,p=0x340; i < ptn && p < X.Sz(); i++) { psz = X.U16(p)-4; rs = X.U16(p+2); if(rs > 0x100) return false; p += 4; if(X.isDeepScan()) while(--psz >= 0 && p < X.Sz()) { b = X.U8(p++); if(b == 0) { r++; if(r >= rs) return false; continue } if(b&0x20) { if([0xA0,0xFF].indexOf(X.U8(p++)) < 0) notes++; p++; psz -= 2 } if(b&0x80) { p += 2; psz -= 2 } if(b&0x40) { p += 2; psz -= 2 } } else p += psz; } if(p > X.Sz()) return false; inss = []; smps = []; for(smp=i=0; i < ins; i++) { if(X.isVerbose()) { t = X.SC(p,32,'CP437').trim(); if(t.length) inss.push(t) } p += 0x180; //skip name,map, reserved, all the envelopes, sample flags, fadeout if((nsmp=X.U16(p-6)) > 0xFF) return false; if(!X.c("'II10'",p-4) && X.U32(p-4)) return false; for(j=0; j < nsmp; j++,smp++) { if(X.isVerbose()) smps.push(X.SC(p,13,'CP437').trim()); var ssz = X.U32(p+0x10), lps = X.U32(p+0x14), lpe = X.U32(p+0x18), f = X.U8(0x30); if(ssz > 0x100000 || lps > 0x100000 || lpe > 0x100000) return false; if(X.U8(p+0x24) > 0x40/*vol*/) return false; p += 0x40; if(!X.c("'IS10'",p-4) && !X.c("'IW10'",p-4)) return false; p += ssz } } return true } if(!bDetected && isImagoOrpheus()) { sName = "Imago Orpheus module (.IMF)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SC(0,0x20,'CP437')); sOptionT(addEllipsis(inss.join(' ')),'insts/msg:"','"'); sOptionT(addEllipsis(smps.filter(funSampleName).join(' ')),'smps/msg:"','"'); sOption('spd0:'+spd+' bpm0:'+bpm+' ch:'+chon+(ch==chon?'':ch) +' ord:'+ord+' ptn:'+ptn+' ins:'+ins+' smp:'+smp+(notes?' notes:'+notes:'')+' sz:'+outSz(p)); } } function isPMD() { // ref https://raw.githubusercontent.com/ValleyBell/MidiConverters/master/pmd_SeqFormat.txt // & https://web.archive.org/web/20220928062748/https://lithcore.cn/2318/ // & https://github.com/mistydemeo/pmdmini/blob/master/src/pmdmini.c // & https://gitlab.com/bunnylin/supersakura/blob/dev/doc/mus/pmd.md // & https://github.com/stuerp/foo_input_pmd/blob/master/PMD/PMD.cpp if(X.Sz() < 37 || !isWithin(nV=X.I8(0), -1,2/*0xF*/)) return false; if(X.U16(1) == 0x1A) var nptr = 13; else if(X.U16(1) == 0x18) var nptr = 12; else return false; function re(p,t) { if(debug>1)_l2r('pmd',p,t); return false } function trktxt(n) { if(n < 0) return '??'; else if(n < 6) return 'FM '+(n+1); else if(n < 9) return 'SSG '+(n-5); else if(n === 9) return 'OPNA ADPCM B'; else if(n === 10) return 'OPNA Rhythm'; else if(n === 11) return 'Rhythm Subs'; else if(n === 12) return 'FM insts'; else return '??' } var trkpt = []; //debug for(i=0,oldchn=X.U16(1); i < nptr; i++) { //ptrs to the 11 tracks, rhythm funcs, (maybe optionally?) FM insts p = X.U16(1+i*2); if(/*p &&*/ !isWithin(p, 0x1A,X.Sz()-1)) return re(p,'!badtrkp'); trkpt.push(Hex(p+1)+': '+trktxt(i)); //debug if(isWithin(i, 1,11) && X.U8(p) != 0x80) return re(p,'!badtrkend'+X.U8(p)); //data blocks end in 80h if(isWithin(i, 1,10) && p <= oldchn) return re(p,'!badtrkp'); // not sorted right if(!i && X.U8(p) == 0xC6) for(j=p+1; j < p+9; j+=2) if((t=X.U16(j)) && !isWithin(t, p,X.Sz()-1)) return re(p,'!badC6trkp'); oldchn = p; } //_l2r('pmd','',trkpt.join(' || ')); //debug rhosz = (X.U16(0x17)-X.U16(0x15)-1); rhysz = (X.U16(0x19)-X.U16(0x17)-2) >> 1; rho = rhy = 0; var rhy1 = oldrhy = 0, rhy0 = 0xFFFFFF; if(rhosz > 0) for(q=X.U16(0x15)+1; q < X.U16(0x17)+1; q++) { //rhythm subroutine orderlist, most likely? the first byte seems to be the number of loops t = X.U8(q); //_l2r('rho',q,'#'+Hex(t)) if(t == 0x80) break; if(t >= rhy && t < 0x80) rhy = t+1; //just sometimes, rhy-orderlist items like F6 happen rho++ } if(rhysz > 0 && rhosz > 0) for(q=X.U16(0x17)+1; q < rhy0 && q < X.U16(0x19)-1 && rhy1 < rhy; q+=2) { //rhythm subroutine pointers; the last 2 bytes are probably about the version t = X.U16(q)+1; //_l2r('rhy',q,'*'+Hex(t)) if(!isWithin(t, q,X.Sz())) break;//_l2r('rhy',q,'OOBrhyptr '+Hex(t)); if(!rhy1) rhy0 = t; if(t >= 0xFE00 || X.U16(0x19)-q < 2) break; rhy1++; oldrhy = t; } bad = ''; ttype = ''; extra = -1; sV = ''; if(rhysz >= 4) { extrap = p-3; extra_type = X.U8(extrap+2); if(!isWithin(extra_type, 0x40,0x4F)) bad = bad.addIfNone('!badxtype'+Hex(extra_type)); if(extra_type < 0x42) ttype = "PCP/P86"; else if(extra_type < 0x48) ttype = "PPS"; else if(nV == -1) ttype = "FM Towns"; else ttype = "PPZ"; extra = X.U16(extrap,_LE)+1; if(!isWithin(extra, 1,X.Sz())) bad = bad.addIfNone('!'+Hex(extra)+' out of '+Hex(extrap-1)); else for(i=0; i < 4; i++) { p = X.U16(extra+i*2,_LE); if(p < 27 || p+1 > X.Sz()) bad = bad.addIfNone('!extrapOOB'+Hex(extra)) } } //else _l2r('fe',p-1,'version?'+Hex(X.U8(p-1))); return true } if(!bDetected && isPMD() ) { bDetected = 1; sName = "Masahiro 'Kajapon' Kajihara's Professional Music Driver module (.M,.M2)"; sVersion = nV >= 0? 'v'+nV+'/'+['OPN/OPNA','OPM','OPL2',,,,,,,,,,,,,,][nV]: ''; sVersion = sVersion.appendS(/*'t'+Hex(extra_type).substr(0,2)+":"+*/ttype/*+" tagptrs:"+Hex(extra)*/,' '); if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { fnames = []; if(extra > 0) { if(extra_type >= 0x48) { n = X.SC(X.U16(extra,_LE)+1,0x100,"Shift_JIS"); extra+=2; if(n != "") fnames.push("PPZ:"+n) } if(extra_type >= 0x42) { n = X.SC(X.U16(extra,_LE)+1,0x100,"Shift_JIS"); extra+=2; if(n != "") fnames.push("PPS:"+n) } n = X.SC(X.U16(extra,_LE)+1,0x100,"Shift_JIS"); extra+=2; if(n != "") fnames.push("PPC/P86:"+n); title = X.SC(X.U16(extra,_LE)+1,0x100,"Shift_JIS"); if(title == "\x1A") title = ""; artist = X.SC(X.U16(extra+2,_LE)+1,0x100,"Shift_JIS"); if(artist == "\x1A") artist = ""; arenji = X.SC(X.U16(extra+4,_LE)+1,0x100,"Shift_JIS"); if(arenji == "\x1A") arenji = ""; rem = X.SC(X.U16(extra+6,_LE)+1,0x100,"Shift_JIS"); if(rem == "\x1A") rem = ""; sOption(title); sOption(artist,"by: "); sOption(arenji,"mixed by: "); sOption(rem); sOption(fnames.join(", "),"fn: "); } t = X.U8(X.U16(0x15)+1); sOption('rhyord:'+rho+(rho?(t?'×'+t:'')+' rhy:'+rhy:'')) } } function isMUAP98() { //ref http://ohta.music.coocan.jp/packen/data/muap641s.lzh / NAX.ASM & PLAY4.ASM function re(p,t) { if(debug>1)_l2r('muap',p,t); return false } if(X.Sz() < Math.max(X.U16(0x20),0x26) ) return false; ch = notes = sz = sus = 0; msg = ''; var t; for(i=oldp=0; i < 0x11; i++) { t = X.U16(i*2); if(!isWithin(t, Math.max(0x18,oldp),X.Sz())) return re(i*2,'!ptr#'+i+'OOB '+outArray([t,oldp,X.Sz()],16)); if(i && X.U8(t-1) != 0xFC) return re(t-1,'!FC@'); if(X.U8(t) != 0xFC) { var r = parseMUAP98(t, X.isDeepScan()?BCParseToEoF:BCParseToReasonable, i); if(r[0] == BCInvalidFormat) return false; notes += r[0]; msg = msg.appendS(r[3],'\n'); ch++; if(sz < r[4]) sz = r[4]; sus += r[5] } else if(sz < t+1) sz = t+1; oldp = t } if(sus > ch*3) return false; bad = sus?'suspicious'+sus:''; return true } if(!bDetected && isMUAP98()) { sName = "Packen/ぱっくん Software MUAP98/みゅあっぷ Object chiptune (.O,.OX+TONES.DTA)"; bDetected = 1; if(bad.length) sVersion = bad; if(X.isVerbose()) { sOptionT(msg); //actually meant to display lyrics sOption('ch:'+ch+(X.isDeepScan()?' notes:'+notes+' sz:'+outSz(sz):'')); } } function isRobHubbardRH() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/RobHubbard/src/RobHubbard_v7.asm //the FX files not included -- TODO if(!X.c("6000.... 6000.... 6000.... 6000.... 6000.... 41FA.... ........ 4E7541FA")) return false; //Check2 a2 = 0x40; d4 = 8; do { //loop2 if(X.U16(a2,_BE) == 0x2418) break; a2 += 2; d4-- } while(d4); if(!d4) return false; //found2 smp = d3 = X.U8(a2-1)+1; a2 = 0x36; d4 = 5; do { //loop3 if(X.U16(a2,_BE) == 0x41FA) break; a2 += 2; d4-- } while(d4); if(!d4) return false; //found3 a2 += 2; a4 = a2; d4 = a2+X.U16(a2,_BE)+2; //minus a3 = moduleptr, 0 in our case if(X.U16(a4+2,_BE) == 0xD1FC) d4 += 0x40; a3 = d4-2; //again +moduleptr; then moduleptr[a6] = a3 (puts in sampleptr); a6 += 4; d5 = 0; a2 = a3; do { //loop4 d1 = X.U32(a3,_BE); if(d1 > 0x10000) return false; d1 += 6; d5 += d1; a3 += d1; d3-- } while(d3); if(X.U16(a3,_BE) != 0x4E71) return false; //at the EOF now a3 = 0; a0 = 130+a3; d0 = 10; do { //loop if(X.U16(a0,_BE) == 0x41EB) { a0 += 2; break } a0 += 2; d0--; } while(d0); if(!d0) return false; //else found d1 = 0; d2 = X.U16(a0,_BE); a3 += d2; do { //hop a3 += 18; d1++; } while(X.U16(a3,_BE)); d2 = a2-a3; do { //petla b = X.U8(a3); if(b != 0x84) if(b != 0x85) { a3++; d2--; if(d2 < 0) break; else continue } d0++; a3++; d2-- } while(d2 >= 0); songsz = d4; sz = d4+d5; steps = d0; x = d1; return true; } if(!bDetected && X.isDeepScan() && isRobHubbardRH()) { sName = "Rob Hubbard's module (.RH)"; sVersion = "v1.4"; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,"×"); sOption("smp:"+smp+" steps:"+steps+" songsz:"+songsz+" sz:"+outSz(sz)) } } function isPuma() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/PumaTracker/src/PumaTracker_v2.asm //ref http://lclevy.free.fr/amiga/exotic/puma_str.txt // && https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_puma.cpp ord = X.U16(12,_BE)+1; if(ord > 256) return false; ptn = X.U16(0xE,_BE); if(!ptn || ptn > 128) return false; synsmp = X.U16(0x10,_BE); if(!isWithin(synsmp,1,32)) return false; //"number of sound data" loop = X.U16(0x12,_BE); bad = ''; if(loop >= ord) bad = bad.addIfNone('!badloop'); if(charStat(X.readBytes(0,12),1).indexOf('allxsc') < 0) return false; for(p=0x50,i=mp=0; i < ord && p < X.Sz(); p+=14,i++) //verify orderlist integrity for(c=0; c < 4; c++) { if((pt=X.U8(p+c*3)) >= 0x80 || !isWithin(X.I8(p+c*3+2),-0x30,0x30)) return false; if(pt > mp) mp = pt } if(i < ord) return false; mp++; minsz = p+ptn*8+4+synsmp*16+4; if(minsz >= X.Sz()) return false; for(i=0; i < ptn; i++) { //test all patterns if(!X.c("'patt'",p)) return false; p += 4; row = 0; for(;row < 32; p += 4) { var d = X.readBytes(p,4); if(d[0]%2 || !isWithin(d[3],1,32-row)) return false; row += d[3] } } if(!X.c("'patt'",p)) return false; p += 4; smp = msmpp = mssz = evc = 0; plim = Math.min(X.Sz(),0x100000); for(i = 0; i < 10; i++) { //test waveform tables smpp = X.U32(0x14+i*4,_BE); if(!smpp) continue; ssz = X.U16(0x3C+i*2,_BE); if(ssz&1) ssz--; ssz <<= 1; if(smpp < minsz || smpp > 0x100000) return false; if(smpp > msmpp) { msmpp = smpp; mssz = ssz} smp++; } function checkScript(isVol) { var isFirst = true; while(p+4 < X.Sz()) { var d = X.readBytes(p,4); p += 4; if(isFirst && isVol && d[0] != 0xC0) return false; switch(d[0]) { case 0xA0: evc++; break; case 0xB0: evc++; return !(d[1] & 3); case 0xC0: if(!isVol) return false; evc++; break; case 0xD0: if(isVol) return false; evc++; if(d[1]&1)/*freezes playback*/ bad = bad.addIfNone('!oddpitch'); break; case 0xE0: evc++; return true; default: if(!isVol && decEncoding(d,CPAmiga) === 'inst') { p -= 4; return evc > 0 } return false; } isFirst = false; } return evc > 0 } for(i=0; i < synsmp && p < X.Sz(); i++) { if(!X.c("'inst'",p)) return false; p += 4; if(!checkScript(true)) return false; if(!X.c("'insf'",p)) return false; p += 4; if(!checkScript(false)) return false; } if(!X.c("'inst'",p)) return false; p += 4 if(p > X.Sz()) { sz = -1; bad = bad.addIfNone('!short'); return true } sz = Math.max(msmpp+mssz, p); return true; } if(!bDetected && isPuma()) { sName = "PumaTracker module (.PUMA)"; sVersion = "v1.1"; bDetected = 1; if(bad != '') sVersion = sVersion.appendS('/malformed'+bad,'/'); if(X.isVerbose()) { sOption(decAnsi(0,0x0C,CPAmiga).trim()); sOption('ord:'+ord+' ptn:'+mp+(mp!=ptn?'/'+ptn:'')+(smp?' wf.smp:'+smp:'') +' syn.smp:'+synsmp+(loop?' lp:'+loop:'')+' events:'+evc+' sz:'+outSz(sz)) } } function isSeanConran() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/SeanConran/src/Sean Conran_v3.asm //Check2 if(X.c("0FFF0FE2") || X.c("10000FE2")) { if(!X.c("0FC40FA7 0F8B0F6E",4)) return false; //test1 p = 0x124; //start searching for initp from here a0 = 8; } else if(X.c("0F1C0F0E 0F000EF2 0EE40ED6")) { p = 0x1C4; a0 = 0xA8; //skip to LastCheck } else return false; do { //InitPlayer.FindInit t = X.U32(p,_BE); if(!t) return false; p += 2; if(p > X.Sz()) return false } while([0x45FA,0x43F9,0x41F9].indexOf(t>>16) < 0); initp = p-2; //LastCheck a0 += 0x11C; for(d1 = 0; d1 < 0x80; d1++) { //CheckSFX if(X.c("7F7F7F7F",a0) || X.c("FFFF",a0)) return false; a0 += 2 } // a0 = GetListData(0); x = IntAddress = 0; Twin = false; do { //Next t = X.U16(p,_BE); p += 2; if(p > X.Sz()) return false } while([0x7000,0x7200].indexOf(t) < 0); if(t === 0x7000) { //OneSub x = 1; // do { //FindSongs // t = X.U16(p,_BE); p += 2; if(p > X.Sz()) return false // } while(t != 0x41FA); // FirstPos = p+X.I16(p,_BE); } else { //t=0x7200 while(!x && p < X.Sz()) { if(X.c("00000000",p)) return false; if(X.c("21C80070",p)) { //OK4 // t = p-4; IntAddress = t+X.I16(t,_BE); p += 2; if(X.c("00003B76",0x24C)) Twin = true; } else { if(X.c("43FA",p)) { t = p+2+X.I16(p+2,_BE); //OK0 // songsp = t; x = (X.I16(t,_BE)-t) >> 3; } else if(X.c("43EA",p)) { t = X.I16(p+2,_BE); //OK2 // songsp = t; x = (X.I16(t,_BE)-t) >> 3; } else p += 2 } } if(!x || p >= X.Sz()) return false } // there are more checks... although they aren't really necessary here return true } if(!bDetected && isSeanConran()) { sName = "Sean Conran module (.SCR)"; sVersion = "v1.2"; bDetected = 1; if(Twin) sVersion += "/Megatwins" if(X.isVerbose()) { if(x > 1) sOption(x,"×"); } } function isBenDaglish() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/BennDaglish/Benn Daglishv3.asm if(!X.c("6000....6000.... ....6000")) return false; //Check2 d1 = X.I16(0x02,_BE); if(d1 <= 0 || (d1&1) || d1 > X.Sz()) return false; a0 = a1 = a3 = d1+2; d1 = X.I16(0x06,_BE); if(d1 <= 0 || (d1&1) || d1 > X.Sz()) return false; d1 = X.I16(0x0C,_BE); if(d1 <= 0 || (d1&1) || d1 > X.Sz()) return false; if(!X.c("3F006100",a1) || !X.c("3D7C",a1+6) || !X.c("41FA",a1+12)) return false; d0 = 0x7F; while(d0) //.l6 if(X.c("D040D040 D04041FA",a0)) { a0 += 8; a1 = a0+X.I16(a0,_BE); //note the value's signed break; } else { a0 += 2; d0--; if(!d0 || a0 > X.Sz()) return false } x = 0; BD_L7: while(1) { d2 = 4; while(d2) { d0 = X.U16(a1,_BE) & 0xFC00; a1 += 2; if(a1 > X.Sz()) return false; if(d0) { // .not_subsong x--; //last subsong if(x < 0) x == 0; break BD_L7 } else d2-- } x++ } x++; //size calc // incorrect on some files like 3d galax.bd or super cars.bd // but that's what EaglePlayer has, UADE debugger-tested d5 = d6 = 0; d0 = 0x80; while(d0) { //.l9 t = X.U16(a0,_BE); a0 += 2; if(a0 > X.Sz()) return false; if(t === 0x41FA) break; else d0-- } if(!d0) return false; smpi1 = a0+X.U16(a0,_BE); //.ok6 .. SampleInfo1 a0 = 12+X.I16(12,_BE); d0 = 0x80; //.l10 while(d0) { d0--; if(X.c("D040D040 41FA",a0)) break; else a0 += 2; if(a0 > X.Sz()) return false } if(d0) { //.ok7 a0 += 6; d0 = X.I16(a0,_BE); if(d0&1) a0 = 0; else { a0 += d0; if(X.I16(a0,_BE)) a0 = 0 } } else a0 = 0; smpi2 = a0; //.ok8 a0 = smpi1; while(1) { //.com1 d0 = X.U32(a0,_BE); a0 += 4; if(a0 > X.Sz()) return false; // Interestingly, the UAE emu sets flags on "move"! // So ↓ is a d0 check, would've probably been a0 on a real machine if(!d0) break; if(d0 >> 16) { a0 -= 4; break } } a0 -= 8; //.ok9 smp1 = (a0 - smpi1) >> 2; d0 = smpi2; if(d0) { a0 = d0; while(1) { //.com2 d0 = X.U32(a0,_BE); a0 += 4; if(a0 > X.Sz()) return false; if(!d0) break; if(d0 >> 16){ a0 += 4; break } } a0 -= 8; //.ok10 smp2 = (a0 - smpi2) >> 2; } else smp2 = 0; //.one_smp_info // calc size #1 d3 = smp1; a2 = smpi1+X.I32(smpi1,_BE); //rel.ptr to smpinfo1 table #0? d1 = X.I32(a2,_BE); d2 = X.U16(a2+8,_BE); i = d4 = 0; do { //.l11 i++; if(i === smp1) break; a2 = smpi1+X.I32(smpi1+(i<<2),_BE); if(a2 < 20 || a2 > X.Sz()) return false; d4 = X.I32(a2,_BE); if(d1 > d4) continue; if(d1 != d4) { if(d4 != X.I32(a2+4,_BE)) d6 = X.U16(a2+10,_BE); else d6 = 0; d5 = X.U16(a2+8,_BE); } else { d5 = X.U16(a2+8,_BE); if(d2 > d5) continue; } d1 = d4; d2 = d5 } while(i < smp1); //.ok11 d2 += d6; sz = smpi1+d1+(d2<<1); // calc size #2 if(smpi2) { d3 = smp2 << 2; a2 = smpi2+X.I32(smpi2,_BE); d1 = X.I32(a2,_BE); d2 = X.U16(a2+8,_BE); i = d6 = 0; do { i += 4; if(i === d3) break; a2 = smpi2+X.I32(smpi2+i,_BE); if(a2 < 20 || a2 > X.Sz()) return false; d4 = X.I32(a2,_BE); if(d1 > d4) continue; if(d1 != d4) { if(d4 != X.I32(a2+4,_BE)) d6 = X.U16(a2+10,_BE); else d6 = 0; d5 = X.U16(a2+8,_BE); } else { d5 = X.U16(a2+8,_BE); if(d2 > d5) continue; } d1 = d4; d2 = d5 } while(i < d3); d2 += d6; a1 = smpi1 + d1 + (d2<<1); if(sz < a1) sz = a1; } return true } if(!bDetected && X.isDeepScan() && isBenDaglish()) { sName = "Ben Daglish's module (.BD)"; sVersion = "v1.2"; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,"×"); sOption("smp:"+smp1+"+"+smp2+" sz:"+outSz(sz)); } } function isAndrewParton() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/Andrew Parton/SRC_AndrewParton/Andrew Parton_v2.asm if(!X.c("'BANK'")) return false; for(i=0; i < 20; i++) if(X.U32(4+(i<<2),_BE) >= 0x200000) return false; for(i=0; i < 40; i++) if(X.U32(0x54+(i<<2),_BE) >= 0x10000) return false; p = 0x54; q = 4; smp = 0; smpt = []; s = 0x1E4; for(i=0; i < 20; i++) { t = X.U32(q,_BE); q += 4; if(t) { smpt.push(X.SA(s,16).trim()); smp++; s += 16 + X.U32(p,_BE); } p += 4 } smpsz = s; bad = false; while(s < X.Sz()) { t = X.U8(s); s += 1; if(t === 0xFF) break; } if(s > X.Sz()) if(X.isHeuristicScan()) bad = true; else return false; if(X.U8(s) === 0x2F) { sz = s+1; songsz = sz-smpsz } else {sz = s; bad = true } return true } if(!bDetected && X.isDeepScan() && isAndrewParton()) { sName = "Andrew Parton's module (.BYE)"; sVersion = "v1.2"; bDetected = 1; if(bad) sVersion += "/malformed"; if(X.isVerbose()) sOption("smp:"+smp+" songsz:"+songsz+" smpsz:"+smpsz+" sz:"+outSz(sz)) } function isAshleyHogg() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/Ashley Hogg/SRC_AshleyHogg/Ashley Hogg_v1.asm p = 0; for(i=0; i < 4; i++) { if(!X.c("6000",p)) return false; p += 2; d2 = X.I16(p,_BE); if(d2 <= 0 || (d2&1)) return false; p += 2 } if(X.c("6000",p)) { //new check p += 2; d2 = X.I16(p,_BE); if(d2 <= 0 || (d2&1)) return false; p += 2; if(!X.c("6000",p)) return false; p += 2; d2 = X.I16(p,_BE); if(d2 <= 0 || (d2&1)) return false; p += d2; if(!X.c("48E7FFFE 6100",p)) return false; p += 6; p += X.I16(p,_BE); if(!X.c("4DF9 00DFF000",p)) return false; sV = "new"; } else //old check if(X.c("303C0000 662233C0",p)) sV = "old"; else return false; if(sV === "new") { //new format a2 = special = 0x1C; a0 = X.I16(2,_BE); title = X.SA(special,X.fStr(special,a0-a2," ")-a2).trim(); //skipped a cycle that replaces twin spaces with enters in the info do { t = X.U16(a0,_BE); a0 += 2; } while(t != 0x45FA || a0 > X.Sz()); a2 = a0; a0 += X.I16(a0,_BE); if(a0 > X.Sz()-2) if(X.isHeuristicScan()) bad = true; else return false; d0 = X.I16(a0,_BE); x = d0 >> 2; a0 += d0 + X.I16(a0-2,_BE); do { if(a0 > X.Sz()-2) if(X.isHeuristicScan()) bad = true; else return false; t = X.I16(a0,_BE); a0 += 2; } while(t != 0x03F2); sz = a0; info = 'title: "'+title+'" sz:'+outSz(sz) } else { //old format special = 0; a2 = 16; a0 = 2; a0 += X.U16(a0,_BE); do { t = X.I16(a0,_BE); a0 += 2; } while(t != 0x1970 || a0 > X.Sz()); a1 = a0-4; a1 += X.I16(a1,_BE); do { t = X.I16(a0,_BE); a0 += 2; } while(t != 0x41FA || a0 > X.Sz()); a0 += X.I16(a0,_BE); x = (a1-a0) >> 4; do { t = X.U16(a2,_BE); a2 += 2; } while(t != 0xC2FC || a0 > X.Sz()); a2 += 4; smpip = a2+X.U16(a2,_BE); do { t = X.U16(a2,_BE); a2 += 2; } while(t != 0x47FA || a0 > X.Sz()); a0 = a2; a2 += X.U16(a2,_BE); songsz = a2; do { t = X.U16(a0,_BE); a0 += 2; } while(t != 0x49FA || a0 > X.Sz()); do { t = X.U16(a0,_BE); a0 += 2; } while(t != 0x49FA || a0 > X.Sz()); a0 += X.U16(a0,_BE); smp = (a0-smpip)/0x2C; d1 = 0; a1 = smpip; a3 = 0x54F3; //value copied from a debugging session ¯\(。⊿°)/¯ do { //NextInfo d2 = X.I32(a1+0x20,_BE); if(d2 >= 0 && d1 <= d2) { d1 = d2; a3 = a1 } a1 += 0x2C } while(a0 > a1); d0 = X.U16(a3+0x28,_BE); d1 += d0+d0; smpsz = d1; sz = songsz+smpsz; info = "smp:"+smp+" songsz:"+Hex(songsz)+" smpsz:"+Hex(smpsz)+" sz:"+outSz(sz) } return true } if(!bDetected && X.isDeepScan() && isAshleyHogg()) { sName = "Ashley Hogg's module (.ASH)"; sVersion = sV; bDetected = 1; if(bad) sVersion += "/malformed"; if(X.isVerbose()) { if(x > 1) sOption(x,"×"); sOption(info) } } function isCinemaware() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/Cinemaware/Cinemaware.asm if(!X.c("'IBLK'")) return false; d2 = X.U8(4); if(!d2 || d2 > 0x80) return false; a1 = 0x16+0x8A*d2; aseq = X.fSig(a1,0x104,"'ASEQ'"); if(aseq < 0 || (aseq&1)) return false; p = aseq+4; sz = 0; bad = false; do { sz += 5; if(sz+p > X.Sz()) if(X.isHeuristicScan()) { bad = true; break } else return false; } while(!X.c("102F00",sz+p-3)); sz += p; ord = Math.floor((sz-p)/100); return true } if(!bDetected && X.isDeepScan() && isCinemaware()) { sName = "Cinemaware module (.CIN)"; bDetected = 1; if(bad) sVersion = "malformed"; if(X.isVerbose()) { sOption("ord:"+ord+" sz:"+outSz(sz)+ " (sans ext.samples)") } } function isCustomMade() { //ref https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/CustomMade/CustomMade_v1.asm if(X.Sz() < 3000) return false; if(X.c("6000.... 6000") || X.c("4EF9.... ....4EF9") || X.c("4EB9.... ....4EF9")) { p = 8; var found = false; do { if(X.c("42280030 42280031 42280032",p)) found = true; p += 2 } while(!found && p < 0x198); } if(!found) return false; else if(!X.isVerbose()) return true; //otherwise let's dig in for smp, synthsmp, and subsongs! p = q = d0 = d5 = 0; d7 = 0x800; org = 0; smpi = 0; songst = 0; bad = false; while(d7 && p < X.Sz()) { if((c=X.U32(p,_BE)) === 0xD04149FA) { /*lp @d366*/ d0 = X.I16(p+4,_BE); q = p+d0+4; Table = q; } else if([0x48E7F8FC, 0x48E7FFFE].includes(c)) { /*play/ptntab @d37e; 2.0 @d38e*/ d6 = a3; if(!d6 || org) d6 = 20; else { q = p-a3; /*play-oldplay*/ d5 -= q; /*nowadr-dx*/ org = d5 } while(d6-- >= 0) { /* 2.lp */ t = X.U16(p,_BE); p += 2; if(t === 0x41FA) { d0 = X.I16(p,_BE)/*2.2: @d3ae*/; songst = q = p+d0; break } } } else /*3 @d3bc*/ if(c === 0xE94847F0) /*ptoff*/ { d1 = X.I16(p+4,_BE) } else /*4 @d3cc*/ if(c === 0x00BFD500) { /*oldplay*/ tmrval = (X.U8(p-1) << 8) + X.U8(p+7); //_log("tmrval:"+Hex(tmrval)); //tmrval = d0; if(!X.c("4E71",p+20)) { if(X.c("21FC",p+28)) a3 = X.U32(p+30,_BE); else if(X.c("C000",p+32)) a3 = X.U32(p+32,_BE); else a3 = X.U32(p+22,_BE); } } else /*6 @d410*/ if(c === 0x42A8001C) /*smpinfo*/ { d0 = X.I16(p+6,_BE); smpi = q = p+d0+6; } else if([0xE44843FA, 0xE448207B].includes(c)) { /*oldvoc1 7.1 @d438*/ if(a4) { d0 = X.I16(p+4,_BE); // @d43c a4 -= X.I32(p+d0+4,_BE); //voc0-oldvoc0 if(!org) { d5 -= a4; org = d5 } } } else /*8 @d44e*/ if(c === 0x48E700F0) /*voc0*/ { d0 = X.I16(p+6,_BE); /* @d456*/; a4 = p+d0+6; } /*lp_c @d45e*/ p += 2; if(c === 0x1AC01940) break; /* -> @ex, because p is unused there */ d7--; } songst += d1; // @ex @d46c for(x=0,p=songst+1; p < X.Sz(); x++,p+=16) /*Find*/ if(X.c("DFF0A0",p)) break; if(p > X.Sz()) { bad = true; return true } smp = synsmp = 0; for(p=smpi; !X.U32(p+28,_BE); p+=0x20) { a2 = X.U32(p,_BE)-org; a24 = X.U16(a2+4,_BE); if(a24 === 2 || a24 === 16) smp++; else synsmp++; } return true } if(!bDetected && isCustomMade()) { sName = "Ivo Zoer & Ron Klaren's CustomMade module (.CM)"; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,"×"); //sOption("Origin:"+Hex(org)+" SongsTab:"+Hex(songst)+" SamplesInfo:"+Hex(smpi)+" Table:"+Hex(Table)) sOption("smp:"+smp+" syn:"+synsmp+" timer:"+tmrval) } } function isDaveLoweNew() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/DaveLoweNew/src/Dave Lowe New.s // ref Dave Lowe New_v2.asm a1 = 0; d1 = X.I16(0,_BE); if(d1 === 4) { if(!X.U32(0x18,_BE)) a1 += 4 } else if(d1 === 8) a1 += 4; else return false; a1 += 4; a2 = a1; for(d2=0; d2 < 4; d2++) { //FirstCheck if(X.I16(a1,_BE)) return false; a1 += 2; d1 = X.I16(a1,_BE); a1 += 2; if(d1 <= 0 || (d1&1)) return false; } for(d0=0; d0 < 4; d0++) { //SecondCheck a1 = d1 = X.I32(a2,_BE); a2 += 4; d2 = X.I32(a1,_BE); if(X.I16(a1,_BE)) return false; a1 += 2; d1 = X.I16(a1,_BE); a1 += 2; if(d1 <= 0 || (d1&1)) return false; a1 = d2; t = X.I16(a1,_BE); if(t === 0x30) { a1 += 2; t = X.I16(a1,_BE); } if(t === 12) { a1 += 6; t = X.I16(a1,_BE); a1 += 2; if(t === 4) break; } } d2 = X.I32(a1,_BE); if(X.I16(d2,_BE) != 1) return false; a1 = a2 = d2 >> 16; if(a1) return false; fmt = 1; if(!X.U32(0x18,_BE)) { fmt = 0; x = (X.I16(2,_BE)-8) >> 5 } else { x = 0; p = X.U16(0,_BE); while(p < X.Sz()) { t = X.I16(p,_BE); p += 2; if(t) break; t = X.I16(p,_BE); p += 2; if(!t || (t&1)) break; x++ } x >>= 2 } bad = ''; sz = 0; a1 = d2; while(a1 < X.Sz()) { a2 = a1; a1 -= 14; if(X.I16(a1,_BE) != 1) break } //smpi = a2; t = X.I16(a2-2,_BE); if(t != 8 && t != 0) a2 += 14; sz = 0; smp = 0; while(a2 < X.Sz()) { //CheckInfo t = X.I16(a2,_BE); if(t != 1) break; else smp++; a2 += 2; d2 = X.I32(a2,_BE); a2 += 6; t = X.I32(a2,_BE); if(t > d2) d2 = t; if(d2 > sz) sz = d2; a2 += 6 } if(sz > X.Sz()) bad = bad.addIfNone("!short"); if(a2 >= X.Sz()) { bad = bad.addIfNone("!badsmpinfo"); return true } sz += 0xFE; return true } if(!bDetected && X.isDeepScan() && isDaveLoweNew()) { sName = 'Dave "Uncle Art" Lowe New module (.DLN)'; bDetected = 1; sVersion = "f."+fmt; if(bad != "") sVersion += "/malformed"+bad; if(X.isVerbose()) { if(x > 1) sOption(x,"×"); sOption("smp:"+smp+" sz:"+outSz(sz)); } } function isDesire() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/Desire/src/Desire_v1.asm if(X.Sz() <= 2500) return false; a2 = 0; a0 = 8; for(d1=0; d1 < 4; d1++) { if(!X.c("00010101",a0)) return false; a0 += 16 } a1 = 400+a0; do { if(a0 === a1) return false; t = X.I16(a0,_BE); a0 += 2; } while(t != 0x49FA); a0 += 2; if(!X.c("45F900DF F000357C 00FF009E 41FA",a0)) return false; a0 += 14; a0 += X.I16(a0,_BE); if(a0 != a2) return false; a1 = 0xF0; do { t = X.U16(a1,_BE); a1 += 2 } while(t != 0x49FA && a1 < X.Sz()); a1 -=2; //FindPlay do { t = X.U16(a1,_BE); a1 += 2 //FindSongs } while(t != 0x47FA && a1 < X.Sz()); a2 = a1+20; a1 += X.I16(a1,_BE); x = 0; a1++; do { //CheckSongs d1 = X.U8(a1); a1++; if(d1) x++; else break; } while(d1 != X.U8(a1) && a1 < X.Sz()); do { t = X.U16(a2,_BE); a2 += 2 //Find1 } while(t != 0xE341 && a2 < X.Sz()); do { t = X.U16(a2,_BE); a2 += 2 //Find2 } while(t != 0x47FA && a2 < X.Sz()); smptsz = a1 = a2+X.I16(a2,_BE); do { t = X.U16(a2,_BE); a2 += 2 //Find3 } while(t != 0x47FA && a2 < X.Sz()); a3 = a2; a2 += X.I16(a2,_BE); smpp = a2; a0 = a2; d4 = a1-a2; a2 = a1+d4; smp = 0; do { t = X.I16(a1,_BE); a1 += 2; if(t) smp++; } while(a1 < a2); //NextS,NoSamp do { t = X.U16(a3,_BE); a3 += 2 //Find4 } while(t != 0x47FA && a3 < X.Sz()); a3 += 2; d6 = X.U16(a3,_BE) & 0x0E00; if(d6) d6 >>= 9; else d6 = 8; ruch = d6; //Skip8 d1 = X.I16(a0,_BE); songsz = d2 = d1 << d6; t= d1;d1=d2;d2 =t; d5 = 0; do { //NextOff d0 = X.I16(a0,_BE); a0 += 2; if(d0 > d2) { d2 = d0; d5 = X.U16(a0+d4-2,_BE) } } while(a0 < smptsz); d2 <<= d6; d5 <<= 1; d2 += d5; sz = d2; smpsz = sz-songsz return true } if(!bDetected && X.isDeepScan() && isDesire()) { sName = "Desire player module (.DSR)"; bDetected = 1; sVersion = "v1.0"; if(X.isVerbose()) { if(x > 1) sOption(x,"×"); sOption("smp:"+smp+" songsz:"+Hex(songsz)+" smpsz:"+Hex(smpsz)+" sz:"+outSz(sz)) if(sz < X.Sz()) sVersion += "/malformed!short" } } function isDavidWhittaker() { // from https://github.com/neumatho/NostalgicPlayer/blob/main/Source/Agents/Players/DavidWhittaker/DavidWhittakerWorker.cs // sfx.dw not detected, -sfx.dw may be detected sometimes if(X.Sz() < 2048) return; const sl = Math.min(X.Sz(), 0x4000); //search buffer length //and now for the NP routine ExtractInfoFromInitFunction sz = x = ch = smp = sqwfsmp = i = 0; for(; i < sl; i += 2) if(X.U16(i,_BE) == 0x47FA && (X.U8(i+2) & 0xF0) == 0xF0) break; if(i >= sl-6) return; sofs = i+2+X.I16(i+2,_BE); for(; i < sl && i < X.Sz(); i += 2) if(X.U16(i,_BE) ==0x6100) break; if(i >= sl-6) return; sinit = i; ssmpsinit = i; //_log("ssmpsinit:"+Hex(ssmpsinit)) if(X.U16(i+4,_BE) == 0x6100) ssmpsinit = i+6+X.I16(i+6,_BE); for(i = ssmpsinit; i < sl; i += 2) if(X.U16(i,_BE) == 0x4A2B) break; if(i >= sl-36) return; if(X.U8(i+4) != 0x66) { for(i = sinit; i < sl; i += 2) if(X.U16(i,_BE) == 0x41EB) break; if(i >= sl-36) return; smpdp = sofs+X.I16(i+2,_BE); i += 4; if(X.U8(i+4) != 0x72) return; smp = X.U8(i+5)+1; for(; i < sl-4; i += 2) if(X.c("41EB....E34F",i)) break; if(i >= sl-4) return false; chvolp = sofs+X.I16(i+2,_BE); //_log("@"+Hex(i)+" smpdatap:"+Hex(smpdp)) //extract subsong info: for(i = sinit; i < sl; i += 2) if(X.c("41EB....17",i)) break; if(i >= sl-4) return; sstp = sofs+X.I16(i+2,_BE); is32bp = true; old = true; } else { old = false; if(!X.U8(i+5)) i += 2; if(X.U16(i+6,_BE) != 0x41FA) return; smpdp = X.I16(i+8,_BE)+i+8; i += 10; if(X.c("2748....D0FC",i)) { smpdp += X.U16(i+6,_BE); i += 12; if(X.U16(i,_BE) != 0xD0FC) return; smpdp += X.U16(i+2,_BE); i += 4 } //_log("@"+Hex(i)+" smpdatap:"+Hex(smpdp)) if(!X.c("4BFA....72",i)) return false; smpip = X.I16(i+2,_BE)+i+2; smp = X.U8(i+5)+1; for(i = sinit; i < sl-4; i += 2) if(X.U16(i,_BE) == 0x41FA && X.U8(i+4) != 0x4B) break; if(i >= sl-4) return; if(X.U16(i+4,_BE) != 0x1230 && X.U16(i+4,_BE) != 0x3770) return; sstp = i+2+X.I16(i+2,_BE); i += 4; for(; i < sl-8; i += 2) if(X.U16(i,_BE) == 0x41FA && X.U8(i+4) != 0x23) break; if(i >= sl-8) return; if(X.U16(i+4,_BE) == 0x2070) is32bp = true; else if(X.U16(i+4,_BE) == 0x3070) is32bp = false; else return; } //_log("sstp:"+Hex(sstp)) //load sample info, get size: p = smpdp; for(i = 0; i < smp; i++) { ssz = X.U32(p,_BE); p += 6; //_log("smpd["+i+"] @"+Hex(p-6)+" sz:"+outSz(ssz)); if(p+ssz > X.Sz()) { bad = bad.addIfNone("!short"); return true } p += ssz; sz = p; } for(i = 0; i < sl; i += 2) if(X.U16(i,_BE) == 0x47FA) { if(i >= sl-10) return; if (X.c("4A2B....67",i+4)) { if([0x33FC, 0x177C, 0x08B9].includes(X.U16(i+10,_BE))) continue; break } } splay = i; //_log("splay:"+Hex(i)) ch = 0; for(i = splay; i < splay + 200; i += 2) if(X.U8(i) == 0x7E) { ch = X.U8(i+1); if(!ch) { for(; i < splay + 500; i += 2) if([0xBE7C, 0xBE3C].includes(X.U16(i,_BE))) { ch = X.U8(i+3); break } } else ch++; break } if(!ch) return; //_log("ch:"+ch) //square waveforms? for(i = splay; i < splay+100; i += 2) if(X.c("207A.... 303A",i)) { sqwfsmp = (X.I16(i+2,_BE)+i+2 - smpip)/12; if(![0x31BC, 0x11BC].includes(X.U16(i+14,_BE))) return; if((X.U8(i+20) & 0xF0) != 0x50 || X.U8(i+21) != 0x6B) return; if(X.U16(i+24,_BE) != 0x0C6B) return false; if(![0x31BC, 0x11BC].includes(X.U16(i+38,_BE))) return; if(X.U16(i+48,_BE) != 0x0C6B) return; } //find diff.player parts, just the sanity checks if(old) { for(i = splay; i < sl; i += 2) if(X.U16(i,_BE) == 0x7000) break; if(X.U8(i+2) != 0x10) return; var rdtrkcmdp = i } else { for(i = splay; i < sl; i += 2) if(X.U16(i,_BE) == 0x5368) break; if(i >= sl-16 || X.U8(i+4) != 0x67) return; var rdtrkcmdp = X.U8(i+5)+i+6; if(X.U8(i+12) != 0x66) return; for(i = rdtrkcmdp; i < sl; i += 2) if(X.c("45FA.... 322D",i)) break; if( i >= sl-6) return; i = X.U16(i+2,_BE)+i+2; if(i >= sl-72*2) return; if(![0x1000, 0x2000].includes(X.U16(i,_BE))) return; } //checks for transposes: for(i = rdtrkcmdp; i < sl; i += 2) if(X.U16(i,_BE) == 0x6B00) break; if(i >= sl-6) return; var endlyc = endlym = false; //:667 for(i = splay; i < splay + 100; i += 2) if(X.U16(i,_BE) == 0x103A) { endlyc = true; if(X.U16(i+6,_BE) == 0xC0FC) endlym = true; break } //_log("@"+Hex(i)+" dlyc?"+endlyc+" dlym?"+endlym) x = 0; p = sstp; minpp = 0xFFFFFFFF; //:966 sngspd = dlyspd = 0; bad = ""; while(p+8 < minpp) { if(endlyc) { sngspd = X.U8(p++); dlyspd = X.U8(p++) } else { sngspd = X.U16(p,_BE); p += 2; dlyspd = 0 } if(sngspd > 0xFF) break; for(i = 0; i < ch; i++) { if(is32bp) { t = X.U32(p,_BE); p += 4 } else { t = X.U16(p,_BE); p += 2 } if(minpp > sofs+t) minpp = sofs+t; //_log(x+" ordp:"+Hex(t)) } if(p > X.Sz()) { bad = bad.addIfNone("!short"); break } x++ } return true } if(!bDetected && X.isDeepScan() && isDavidWhittaker()) { sName = "David Whittaker's module (.DW)"; if(old) sVersion = "old"; else sVersion = "new"; bDetected = 1; if(bad != "") sVersion += "/malformed"+bad; if(X.isVerbose()) { if(x > 1) sOption(x,"×"); sOption("ch:"+ch+" smp:"+smp+(sqwfsmp ? " sqwf.smp:"+sqwfsmp : "") +" spd:"+sngspd+" sz:"+outSz(sz)) } } function isFashionTracker() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/FashionTracker-v1.0/FashionTracker.asm if(!X.c("13FC0040 ........ 4E710439 0001") || !X.c("66F44E75 48E7FFFE",18)) return; a2 = 0; bad = ""; while(X.U16(a2,_BE) != 0x2379 && a2 <= 1000) a2 += 2; //FindOri if(a2 > 1000) //corrupt module if(X.isHeuristicScan()) bad = "!badorigin"; else return; org = X.U32(a2-4,_BE); a2 = 0; d1 = 1; do { //GetValues: // a3 = smplen a3+4 = smpp a3+8 = smplp // a3+12 = smpn+vol a3+16 = ptn a3+20 = songpositions if(X.U16(a2,_BE) == 0x23D1) { // L??? smplen = X.I32(a2+8,_BE)-org; smpp = X.I32(a2-6,_BE)-org; smplp = X.I32(a2+24,_BE)-org; smpnvol = X.I32(a2-30,_BE)-org; d1 -= 6; } else if(X.U32(a2,_BE) == 0xC0FC0400) { //NoL ptn = X.I32(a2+6,_BE)-org; d1 += 3; } else if(X.U32(a2,_BE) == 0x0C790400) { //NoPa songpos = X.I32(a2+12,_BE)-org; len = X.I32(a2+34,_BE); d1 += 2; } a2 += 2 //NextW } while(a2 < 1000); if(d1) if(X.isHeuristicScan()) bad = bad.addIfNone("!badval"); else return; a1 = smpp; songsz = X.I32(smpp,_BE)-org; d0 = X.I32(a1-4,_BE) << 1; a2 = smplen; d1 = a1-a2; a1 += d1; d1 >>= 2; smp = d1; d1 = X.I32(a1-4,_BE)-org; sz = d0+d1; smpsz = sz-songsz; a1 = songpos; a2 = a1+len; ptn = 0; do { t = X.U8(a1); if(ptn < t) ptn = t; a1++ } while(a1 < a2); //GetPat ptn++; d1 = (d0-1)*6; d0 = d1; d1 *= 0x376B; dur = Math.floor(d1*64/(709379-3)); return true } if(!bDetected && X.isDeepScan() && isFashionTracker()) { sName = "Fashion Tracker module (.EX)"; bDetected = 1; sVersion = "v1.0"; if(bad) sVersion += "/malformed."+bad; if(X.isVerbose()) { sOption("ord:"+len+" ptn:"+ptn+" smp:"+smp+" songsz:"+songsz+" sz:"+outSz(sz)) } } function isSMUS() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/SonixMusicDriver/Sonix Music Driver_v1.asm a0 = a1 = 0; title = inst = ''; format = "Aegis Sonix Music Driver"; if(X.c("'FORM'")) { if(!X.c("'SMUSSHDR'",8) || !X.U8(0x17) || !X.c("'NAME'",0x18)) return; d1 = X.U32(0x1C,_BE); if(d1 >> 31) return; t_ = d1; d1 = (d1+1) & 0xFFFFFFFE; a1 = 0x20+d1; if(X.c("'SNX1'",a1)) { a1 += 4; d1 = X.U32(a1,_BE); if(d1 >> 31) return; a1 += 4; d1 = (d1+1) & 0xFFFFFFFE; a1 += d1; } else format = "Electronic Arts' Simple Musical Score"; insinfp = a1; realsmp = []; ins = 0; do { //MoreIns if(!X.c("'INS1'",a1)) return; a1 += 4; d1 = X.U32(a1,_BE); if(d1 >> 31) return; a1 += 4; d1 = (d1+1) & 0xFFFFFFFE; if((d1 >> 24) > 0x3F) return; if(X.U8(a1+1)) return; realsmp.push(X.U8(a1)); a1 += d1; ins++ } while(!X.c("'TRAK'",a1)); sz = a1; trk = 0; while(sz < X.Sz()) { hkhd = X.SA(sz,4); hksz = X.U32(sz+4,_BE); if(hkhd != "TRAK") break; trk++; sz += 8+hksz } //_log("trk:"+trk+" sz:"+outSz(sz)) title = X.SA(0x20,t_); fmt = 2; ext = "smus" } else { if(!(X.U16(0,_BE) & 0xF0)) { d3 = 20; d1 = 4; while(d1) { d2 = X.I32(a0,_BE); if(d2 <= 0 || (d2&1)) return; a0 += 4; d3 += d2; d1-- } if(d3 >= X.Sz()) return; a0 += 4; d1 = 4; while(d1) { t = X.U16(a0,_BE); if(!(t & 0x8000)) return; if(t != 0xFFFF) if((t >> 16) > 0x84) return; a0 += X.I32(a1,_BE); a1 += 4; d1-- } if(!X.U8(a0)) return; sz = X.fSig(a0,0x200,"0000"); if(sz > 0) { while(a0 < sz) { inst = inst.appendS(X.SA(a0,t=X.fSig(a0,0x200,"00")-a0),'; '); a0 += t+1; }; sz += 2; } fmt = 0; ext = "snx" } else { //TinyCheck if(X.Sz() < 333) return; a1 = 0x30; if(X.I32(a1,_BE) != 0x140) return; a1 += 4; d1 = 3; while(d1) { //NextPos2 d2 = X.I32(a1,_BE); a1 += 4; if(d2 <= 0 || (d2&1) || d2 > X.Sz()) return; if(X.I16(d2,_BE) != -1) { if(X.I32(d2,_BE) || X.I16(d2+4,_BE)) return; t = X.U8(d2+6); if(!isWithin(t,0x80,0x82)) return; } d1-- } sz = X.fSig(d2,0x200,"FFFF"); if(sz > 0) sz += 2; fmt = 1; ext = "tiny" } } return true } if(!bDetected && isSMUS()) { sName = format+" module (."+ext+")"; sVersion = "f."+fmt; bDetected = 1; if(X.isVerbose()) { if(title.length) sOption(title); if(inst.length) sOption(inst,'+instr.:"','"'); sOption('sz:'+outSz(sz)) } } function isAMBK() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/ambk/AMOS.s if(X.c("'AmBk'")) a0 = p = 4; else if(X.c("C0")) a0 = p = 0; else return false; //if(!X.c("80",p+4)) return false; //_log('AmBk: '+Hex(X.U32(p+4,_BE)&((1<<28)-1))); if(!X.c("'Music '",p+8)) return false; p += 0x14; p += X.I32(p,_BE); if(X.I16(p,_BE) != 6) return false; p += 2; r = p; p += X.I16(p+2,_BE)-2; p = X.I16(p,_BE); if(p != -2) if(p) return false; title = X.SA(r+0x0C,0x20); p = r+0x1E+X.I16(r+0x1E,_BE); ord = -1; do { ord++; d1 = X.I16(p,_BE); p += 2; } while(p < X.Sz() && d1 >= 0); if(a0) d3 = 4+(X.I32(a0+4,_BE) & 0xFFFFFF); else d3 = X.I32(a0,_BE) & 0xFFFFFF; sz = d3+8; bad = ""; if(sz > X.Sz()) bad = bad.addIfNone("!short"); p = r+X.I16(r+6,_BE); ptn = 0; while(p < X.Sz()) { //.such d1 = X.I16(p,_BE); p += 2; if(d1 < 0) break; if(d1 > ptn) ptn = d1 } ptn++; if(!X.I16(p,_BE)) p += 2; if(X.I16(p,_BE) != ptn) bad = bad.addIfNone("!badptn"); q = a0+0x20; smp = d1 = X.I16(q,_BE); q += 0x10; d7 = 0; while(d1 && q < X.Sz()) { d2 = X.I16(q,_BE); if(!d2) d2 = X.I16(q-6,_BE); d7 += d2 << 1; q += 0x20; d1-- } smpsz = d7; songsz = sz-d7; return true } if(!bDetected && X.isDeepScan() && isAMBK()) { sName = "François Lionet's AMOS Music Bank module (.ABK)"; bDetected = 1; if(bad != "") sVersion = "malformed"+bad; if(X.isVerbose()) { sOption(title); sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+/*" smpsz:"+Hex(smpsz)+" songsz:"+Hex(songsz)+*/" sz:"+outSz(sz)) } } function isTuneFish4() { // taken from tunefish src\tunefish4player\tf4player.cpp ins = X.I16(0,_LE); if(ins > 32) return false; if(!X.c("'INST'",4+ins*2)) return false; t = 8+ins*114; if(!X.c("'SONG'",t)) return false; t += 4; songsz = 0; for(i=0; i1) sOption(x,"×"); sOption("ptn:"+ptn+" smp:"+smp+/*" songsz:"+Hex(songsz)+" smpsz:"+Hex(smpsz)+*/" sz:"+outSz(sz)) } } function isJH7V() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/Jochen_Hippel_7V/Jochen Hippel 7V_v2.asm p = 0; if(X.c("6000")) { p = 2; d1 = X.I16(p,_BE); if(d1 <= 0 || (d1&1)) return false; p = d1+2; p = 4+X.fSig(p,20,"308141FA"); if(p < 4) return false; d1 = X.I16(p,_BE); if(d1 <= 0 || (d1&1)) return false; p += d1; } if(!X.c("'TFMX'00",p)) return false; d0 = d1 = ( 2+X.I16(p+4,_BE) + X.I16(p+6,_BE) ) << 6; d0 += 0x20; ptn = d2 = X.I16(p+8,_BE)+1; d3 = (X.I16(p+0x0A,_BE)+1)*0x1C; d2 *= X.I16(p+0x0C,_BE); d0 += d2; d1 += d2 + d3; if(X.U8(p+4+d0)) txt = X.SA(p+4+d0,24); else txt = ""; x = X.I16(p+0x10,_BE); d2 = (x+1) << 3; ins = X.I16(p+0x12,_BE); insip = p+d1+d2+0x20; if(X.I32(insip+0x12,_BE)) return false; //1st smp ofs d2 = 2*X.I16(insip+0x16,_BE); if(!d2) return false; if(d2 != X.I32(insip+0x16+0x1E-4,_BE)) return false; var mofs = 0; var msz = 0; //find max ofs instead of one just from last smp, just in case for(i=0;i < ins;i++) { var sofs = X.I32(insip+i*0x1E+0x12,_BE); var ssz = X.U16(insip+i*0x1E+0x16,_BE); if(sofs >= mofs) { mofs = sofs; msz = ssz } } smpp = insip+ins*0x1E; sz = smpp+mofs+msz*2; //_log("insip:"+Hex(insip)+" smpp:"+Hex(smpp)+" sz:"+outSz(sz)); return true; } if(!bDetected && X.isDeepScan() && isJH7V()) { sName = "Jochen 'Mad Max' Hippel's module (.HIP7,.S7G)"; sVersion = "7V"; bDetected = 1; if(!X.c("'TFMX'")) sVersion += "+replayer"; if(X.Sz() < sz) sVersion += "!short"; if(X.isVerbose()) { if(txt != "") sOptionT(txt); if(x>1) sOption(x,"×"); sOption("ptn:"+ptn+" ins:"+ins+" sz:"+outSz(sz)) } } function isJHCoSo() { //from uade Jochen_Hippel_COSO player, check routine @ e476t //initplayer disassembly: d e5c0 500 if(!X.c("'COSO'")) return false; if(!X.c("'TFMX'",0x20)) return false; if(!X.I16(0x30,_BE) || !X.I16(0x40,_BE)) return false; var songsz = X.I32(0x1C,_BE); if(songsz > X.Sz()) return false; //@e4ac: a2 = X.I32(4,_BE); d6 = d7 = 0; d0 = X.I16(0x24,_BE); //ord? do { if(a1 > X.Sz()) return false; a1 = X.I16(a2,_BE); a2 += 2; if(X.U8(a1) === 0xE2) if(X.U8(a1+1)&0x80) d7++; else d6++; d0--} while(d0 >= 0); if(d7 >= d6) return false; ptn = X.I16(0x28,_BE)+1; smp = X.I16(0x32,_BE); a0 = X.I32(0x18,_BE)+smp*10; //_log("a0:"+Hex(a0)); smpsz = X.I32(a0-10,_BE) + X.I16(a0-6,_BE)*2; sz = songsz+smpsz; x = X.I16(0x30,_BE); return true } if(!bDetected && X.isDeepScan() && isJHCoSo()) { sName = "Jochen 'Mad Max' Hippel's module (.HIPC)"; sVersion = "packed"; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,"×"); sOption("ptn:"+ptn+" smp:"+smp+" sz:"+outSz(sz)); } } function isJHST() { //from http://wt.exotica.org.uk/files/sources/SRC_JochenHippelST.lzx //Test routine @e3fc, init @e57e a0 = a1 = a4 = d4 = 0; d1 = 0x80; d0 = X.Sz(); bad = msg = ""; //func @e84e, returns d0 = 2 if this: while(d1) { if(a0 > X.Sz() || a1 > X.Sz()) return false; if(d1 != 0x80) { //detect the files that start with MMME,TFMX,COSO t = X.I16(a1,_BE); a1 += 2; if(t === 0x41FA) { d2 = X.I16(a1,_BE); if(d2 >= 0 && !(d2&1)) a0 = a1+d2 } } if(X.c("'MMME'",a0)) { d0 = 2; break; } else if(X.c("'TFMX'",a0)) { if(X.I16(a0+4,_BE) >= 0x200) d0 = 0; else if(!X.I16(a0+0x10,_BE)) d0 = 0; else { // function @e8b0 //func.@e8b0~e8c8 d0 = X.I16(a0+4,_BE); a1 = a0+0x20; d6 = d7 = 0; do { if(X.U8(a1) === 0xE2) // in func.e928 if(X.U8(a1+1)&0x80) d6++; else d7++; a1 += 0x40; d0--} while(d0 >= 0); if(d6 > d7) d0 = 2; else d0 = 5; //@e8a8 } break; } else if(X.c("'COSO'",a0)) { if(!X.I16(a0+0x30)) return false; //FX check if(!X.I32(a0+0x18)) return false; if(X.c("'TFMX'",a0+0x20)) { //@e984 a2 = a0+X.I32(a0+4,_BE); d6 = d7 = 0; d0 = X.I16(a0+0x24,_BE); do { if(X.I16(a0+0x40,_BE)) { a1 = a0+X.I16(a2,_BE); a2 += 2 } else { a1 = a0+X.I32(a2,_BE); a2 += 4 } if(a1 > X.Sz()) return false; if(X.U8(a1) === 0xE2) { if(X.U8(a1+1)&0x80) d7++; else d6++; } d0--} while(d0 >= 0); if(d7 < d6) d0 = 4; else d0 = 2 } else if(X.c("'MMME'",a0+0x20)) d0 = 2; else d0 = 0; break; } d0 -= 2; d1-- } if(d0 != 2) return false; if(X.c("'LSMP'",a0+0x1C)) lsmp = 1; else lsmp = 0; //a0 -= a4; if(a0 && debug)_log("pc+@e170 (mod ofs?): "+a0); //size calc d0 = X.Sz()-a0; d4 = a0; songsz = smpsz = 0; sz = sz1 = -1; if(!X.c("'COSO'",a0) && !X.c("'MMME'",a0+0x20)) { sV = "unpacked"; d6 = a0; d1 = 2; a2 = a0; d1 = (2+X.I16(a0+4,_BE)+X.I16(a0+6,_BE)) << 6; d2 = (1+X.I16(a0+8,_BE)) * X.I16(a0+0xC,_BE); d3 = (1+X.I16(a0+0xA,_BE))*12; //e5f8 d1 += d2+d3; d2 = 2+X.I16(a0+0x10,_BE); d1 += (d2+X.I16(a0+0x12,_BE))*6+0x20; d2 = 0x20; d3 = d7 = 0; //e612 d0 -= d1; if(d0 < 0) /*@e814*/ { d0 = 0x1C; bad = bad.addIfNone("!short") } else if(d0 > 0) { //e618 a1 = d1+a2; t = X.I16(a1,_BE); if(t === 0x80 || t === 0x100) { d7 = a1; do { d3 = X.I16(a1,_BE); a1 += 8; } while(X.I16(a1,_BE) && a1 < X.Sz()); //e63e d0 -= d3; if(d0 < 0) d0 = 0x1C; } else { t >>= 8; p = a1+1; msg = []; while(t && p < X.Sz()) { msg.push(t); t = X.U8(p++); } msg = decEncoding(msg,CPAmiga,1,Chars0to1FLF) } } d0 = d1; smpsz = d3; songsz = d1; sz = a0+songsz+smpsz; sz1 = (msg != "" ? sz+msg.length+1 : sz); x = X.U16(a0+0x10,_BE); if(x > 100) return false } else { sV = "packed"; a1 = a0; d3 = 0; d3 = (1+X.I16(a0+0x32,_BE))*6; d2 = d3+X.I32(a0+0x18,_BE); d3 = 0; d0 -= d2; if(d0 < 0) /*@e814*/ d0 = 0x1C; if(d0 > 0) { a1 += d2; t = X.I16(a1,_BE); if(t == 0x80 && t == 0x100) { do { d3 = X.I16(a1,_BE); a1 += 8; } while(X.I16(a1,_BE) && a1 < X.Sz()); d0 -= d2; if(d0 < 0) d0 = 0x1C } else { t >>= 8; p = a1+1; msg = []; while(t && p < X.Sz()) { msg.push(t); t = X.U8(p++); } msg = decEncoding(msg,CPAmiga,1,Chars0to1FLF) } } /*d2 += d4;*/ songsz = d2; smpsz = d3; sz = a0+d3+d2; if(msg.length < 3) msg = ""; sz1 = (msg.length ? sz+msg.length+1 : sz); x = X.U16(a0+0x30,_BE); if(x > 100) return false; } return true; } if(!bDetected && isJHST()) { sName = "Jochen 'Mad Max' Hippel's Atari ST module (.HST,.SOC,.SOG)"; bDetected = 1 sVersion = sV; if(bad != "") sVersion = sVersion.appendS("malformed"+bad,"/"); if(X.isVerbose()) { sOptionT(msg,'msg:"','"'); info = ""; if(lsmp) info = info.appendS("ext.samples"," ") if(sz > 0) info = info.appendS("sz:"+outSz(sz, sz1)," "); if(smpsz) info = (/*"songsz:"+Hex(songsz)+" "+*/"smpsz:"+Hex(smpsz)).appendS(info," "); if(x > 1) info = ("×"+x).appendS(info," "); sOption(info) } } function isEMS() { //ref UADE's EMS player disassembly: run with -d then "f d3c2" if(X.Sz() <= 0x53A) return false; // fault is @d432 if(X.U8(0) != 1) return false; if(X.U8(1) > 0x25) return false; t = X.I16(2,_BE); if(!t || t > 0x80) return false; d1 = X.U16(4,_BE); if(d1 > 0x3F) return false; d = d1 & 0xFF; p = 6; while(p < 0x86) { t = X.U8(p); p++; if(d < t) return false; } c = 0; for(p = 0x13A; p < 0x53A; p += 4) { //@d40c t = X.I16(p,_BE); if(t < 0) return false; if(t) if([ 0x6B0, 0x650, 0x5F4, 0x5A0, 0x54C, 0x500, 0x4B8, 0x474, 0x434, 0x3F8, 0x3C0, 0x38A, 0x358, 0x328, 0x2FA, 0x2D0, 0x2A6, 0x280, 0x25C, 0x23A, 0x21A, 0x1FC, 0x1E0, 0x1C5, 0x1AC, 0x194, 0x17D, 0x168, 0x153, 0x140, 0x12E, 0x11D, 0x10D, 0xFE, 0xF0, 0xE2, 0xD6, 0xCA, 0xBE, 0xB4, 0xAA, 0xA0, 0x97, 0x8F, 0x97, 0x7F, 0x78, 0x71 ].indexOf(t) < 0) return false; else c++; } if(!c) return false; return true } if(!bDetected && X.isDeepScan() && isEMS()) { sName = "Editeur Musical Sequentiel module (.EMS)"; bDetected = 1; } function isDZ() { //from https://zakalwe.fi/uade/uade3/uade-3.03.tar.bz2 / uade/amigasrc/playes/dz/DariusZendeh_mod.s if(X.Sz() < 0x500 || !X.c("48E7..F0 41FA.... 4CD80600")) return false; if(X.c("78",2) && X.c("0C0000FF",0xC)) sversion = "strange"; else if(!X.c("00",2) || !X.fSig(0xC,0x240,"700033FC 000F00DF F09641FA")) return false; soptions = ""; if(X.c("4A44",0xC)) { sversion = "type 1"; if(X.isVerbose()) { p = X.fSig(0,0x80,"0C04.... 66..41FA"); if(p >= 0) soption = "×"+(X.U16(p+2,_BE)+3) } } else if(X.c("4A00",0xC)) sversion = "type 2"; else if(X.c("0C00",0xC)) sversion = "type 3"; return true } if(!bDetected && isDZ()) { sName = 'Darius "Mark II" Zendeh module (.DZ)'; sVersion = sversion; sOptions = soptions; bDetected = 1 } function isMkII() { //ref reversing of the eagleplayer // & http://old.exotica.org.uk/tunes/formats/mk2/mk2_v1.zip if(!X.c("41FA",4) || X.Sz() < 0x500) return false; //if(X.fSig(0x200,0x200,"'.ZADS89.'")>=0) ← Some zero-fill it--not used by the replayer p = 8; i = 0x120; do { t = X.c("E742",p); p += 2; if(t) break; i-- } while(i); if(!i) return false; do { t = X.c("41FA",p); p += 2; if(t) break; i-- } while(i); if(!i) return false; //_log("mkII 41FA search: i="+i+" @"+p) a3 = p; p += X.I16(p,_BE); //p goes to sampleinfo d5 = X.I16(a3+2,_BE); //d5 is maybe (or not) "move.w (a0+d2+?), (a3+?)" i = 0x18; do { t = X.c("D1FA",a3); a3 += 2; if(t) break; i-- } while(i); //_log("mkII D1FA search: i="+i+" @"+a3) if(!i) { if(d5 == 0x3770) return false; d5 = 0; a5 = a3-0x1C; i = 0x10; } else { a5 = a3; a3 += X.I16(a3,_BE) } //_log("mkII: 3770 and a5 + a3skip") do { t = X.c("41FA",a5); a5 -= 2; if(t) break; i-- } while(i); //_log("mkII: 5, i="+i+" @"+Hex(a5)) return i } if(isMkII()) { //DZ and MkII may detect some modules together, meaning a player of either format will play them _setResult("audio","Darius Zendeh's Mark II Sound System module (.MK2)","",""); bDetected = 1 //bDetected is for counting } function isJamCracker() { //ref https://github.com/tonioni/WinUAE/blob/master/prowizard/rippers/JamCracker.c if(!X.isHeuristicScan() && !X.c("'BeEp'")) return false; smp = X.U8(5); if(!smp || (smp > 0x1F)) return false; if(X.U8(6+smp*40) > 0) return false; allsmpsz = 0; for(k=0; k < smp; k++) { l = X.U32(38+k*40,_BE); if(!l || (l > X.Sz())) return false; allsmpsz += l; } ord = X.U16(6+smp*40,_BE); if(ord > 0xFF) return false; ptns = 6+smp*40+2; ptn = X.U16(ptns+ord*6,_BE); if(ptn > 0xFF) return false; ptn0 = X.U32(ptns+2,_BE); ptns += ord*6; trkdtsz = X.U32(ptns-4,_BE)-ptn0; addlns = X.U8(ptns-5)*4*8; sz = ptns + 2 + ptn*2 + allsmpsz + trkdtsz + addlns; //doesn't include the Xag tags return true } if(!bDetected && isJamCracker()) { sName = "JamCracker/Pro module (.JAM,.JC)"; bDetected = 1; bad = ""; if(X.isHeuristicScan()) { if(sz+19 == X.Sz()) { //obviously not for rippers sVersion = "v1.0a (Xag)"; if(X.isVerbose()) sOptionT(X.SA(sz,19)); //this version adds these sz += 19; } if(!X.c("'BeEp'")) bad = bad.addIfNone("!badsig"); } if(sz > X.Sz()) bad = bad.addIfNone("!short"); if(bad != "") sVersion = sVersion.appendS("malformed"+bad,"/"); if(X.isVerbose()) sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(sz)); } function isJBM() { //ref https://github.com/adplug/adplug/blob/master/src/jbm.cpp //TODO for ex. demo3.jbm has a pointer to outside of the file, // and it seems to work in a player but these are sanity checks ffs... Dunno this format if(X.U16(0,_LE) != 2) return false; if(!X.c("00FF01FF02FF03FF04FF05FF06FF07FF08FF09FF0AFFFD00", 0x36 )) return false; //just from the files modland has, 'cause the detection's' wonky seqt = X.U16(4,_LE); if(!seqt || seqt < 30 || seqt >= X.Sz()) return false; inst = X.U16(6,_LE); if(!inst || inst <= seqt || inst >= X.Sz()) return false; ins = (X.Sz()-inst) >> 4; //_log("fs="+Hex(X.Sz())+", inst="+Hex(inst)+", ins="+ins); mptn = 0xFFFF; ch = 0; trk=[]; for(i=0; i < 11; i++) { p = X.U16(10+i*2,_LE); trk[i] = p; if(p) { ch++; if(p <= seqt || p >= inst) return false; if(p < mptn) mptn = p } } //_log("trk:"+trk); ptn = (mptn-seqt) >> 1; //_log("("+mptn+"-"+seqt+")/2="+ptn); for(i=0; i < 5/*ptn*/; i++) { //TODO make a full check when the format is more clear! if(trk[i]) { p = X.U16(seqt+i*2,_LE); //_log(seqt+"["+i+"*2]="+Hex(p)); if(X.U16(p-1,_LE) != 0xFDFF) return false; if(p <= seqt || p >= inst) return false; } } i = X.U16(2,_LE); tmr = (1193810.0 / (i ? i : 0xFFFF)).toFixed(2); return true } if(!bDetected && X.isHeuristicScan() && isJBM()) { sName = "Johannes Bjerregaard Adlib module (.JBM)"; bDetected = 1; if(X.isVerbose()) sOption("tmr:"+tmr+" ch:"+ch+" ptn:"+ptn+" ins:"+ins) } function isSoundFX() { //from https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_sfx.cpp // & https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/SoundFX/src/SoundFX_V2.asm if(X.c("'SONG'",0x3C) && X.Sz() > 0x294) msmp = 15; else if(X.c("'SO31'",0x7C) && X.Sz() > 0x4B4) msmp = 31; else return false; hdrp = 4*msmp; smptp = hdrp+0x14; ordp = smptp+msmp*30; ord = X.U8(ordp); if(ord > 128) return false; t = X.U16(hdrp+4,_BE); if(t < 178 /*== 0*/) return false; tmp0 = (14565*122/t).toFixed(0); spd0 = 6; smp = smpsz = ic = 0; smps = []; for(i=0; i < msmp; i++) { ssz = X.U32(i*4,_BE); if(ssz > 0x20000) return false; smpsz += ssz; if(ssz) smp++; t = X.readBytes(smptp+i*30,20); for(c=0; c < 20; c++) if(t[c] && t[c] < 0x20) ic++; if(ic >= 128) return false; t = decEncoding(t,CPAmiga); if(t.trim() != "") smps.push(t.trim()) smth = X.U16(smptp+i*30+2,_BE); } return true } if(!bDetected && isSoundFX()) { sName = msmp == 15 ? "SoundFX module (.SFX)" : "SoundFX 2 / MultiMedia Sound module (.MMS)"; if(msmp == 15) sVersion = 'v1.0-8'; bDetected = 1; if(X.isVerbose()) { p += 2; ptn = 0; for(i=ordp+2; i < ordp+2+ord; i++) { t = X.U8(i); if(t > ptn) ptn = t } ptn++; sz = ordp + 0x82 + ptn*0x400 + smpsz; if(msmp == 31) sz += 6; lp = X.U8(ordp+1); if(lp > ord) sVersion = sVersion.appendS('malformed!badloop','/'); //unk = X.readBytes(hdrp+6,14); unksum = 0; for(i=0;i 0) sOption('unk.bytes:'+unk); sOption('tmp0:'+tmp0+' ord:'+ord+' ptn:'+ptn+' smp:'+smp+(lp?' loop:'+lp:'')+' sz:'+outSz(sz)) } } function isJesperOlsen() { //ref https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/Jesper_Olsen/Jesper Olsen_v1.asm fmt = ''; smp = smpp = 0; sz = -1; x = 1; if(X.c("6000")) {//old p = 0; d1 = 3; do { if(!X.c("6000",p)) return false; if((t = X.I16(p+2,_BE)) <= 0 || t % 2) return false; p += 4 } while(d1--); p = p0 = 6+X.I16(6,_BE); if(!X.c("4A406B00",p)) { //even older p -= 4; if(X.c("C0FC",p)) p += 2; else for(i=0; i < 16 && p < X.Sz(); i++,p+=2) if(X.c("02800000",p)) { if(!X.c("00FFC0FC",p+4)) return false; p += 8; break } if(p > X.Sz()) return false; mulu = X.I16(p,_BE); p += 800; q = p+900; while(p < X.Sz()) { if(X.c("6AE064E0",p)) break; p += 2; if(p === q) return false } if(p > X.Sz()) return false; fmt = 'old'; p = p0; while(p < X.Sz()) { t = X.I16(p,_BE); p += 2; if(t >= 0 && (t & 0x40FA) == 0x40FA) { t = X.I16(p,_BE); p += 2; if(t >= 0) break } } p += t-2; var songp_in_explayp = p; x = X.I16(p,_BE)-p; if(x < mulu) x = 1; else x = Util.divu64(x,mulu); //p is now in a2 and a1 is the filesize while(p < X.Sz()) { if(X.c("'FORM' 0000???? '8SVXVHDR'",p)) { if(!smpp) smpp = p; smp++; p += 4+X.I32(p+4,_BE)+2 } p += 2; if(p >= X.Sz()) break } if(p > X.Sz()) return false; sz = p; p = 0xA+X.I16(0xA,_BE); while(p < X.Sz()) { t = X.c("43FA",p); p += 2; if(t) break } var Lea = p, VoiceTmp = p+X.I16(p,_BE); p += 2; //skipping the part about a flag d1 = X.c("6000",12) ? "7FFE" : "7FFF"; while(p < X.Sz()) { t = X.c(d1,p); p += 2; if(t) break } while(p < X.Sz()) { t = X.c("336C",p); p += 2; if(t) break } var Value = X.I16(p+2,_BE) //now, I'm not very sure if we _need_ Lea, VoiceTmp, Value for our purposes, but we have'em! } else { if(!X.c("000641FA",p+4)) return false; p += 8; p += X.I16(p,_BE)+4; if(!X.c("00017FFF",p)) return false; fmt = 'second'; p = p0+8+X.I16(p0+8,_BE); var SongPtr = p; p += 8; x = 0; d2 = X.I32(p+0xA,_BE); while(p < X.Sz()) { if(d2 != X.I32(p+0xA,_BE)) break; x++; p += 0x1A } p = smpp = SongPtr+X.I32(SongPtr,_BE); //smpinfo while(p < X.Sz()) { if(X.c("'FORM' 00?????? '8SVXVHDR'",p)) { smp++; p += 4+X.I32(p+4,_BE)+2 } p += 2; if(p >= X.Sz()) break } if(p > X.Sz()) return false; sz = p; p = SongPtr; d1 = X.U32(p,_BE); d2 = X.U32(p+0x12,_BE); if(d2 <= d1) p += d1; //that'll be our song size else { d3 = d2-X.I32(p+0x16,_BE); sz = d2+d3+p; if(sz == 35944) x -= 1; //I don't have this file to test if(sz > X.Sz()) return false; //d3 <<= 2; p += X.I32(p,_BE); d3 += p; songsz = d3; smpsz = sz-songsz } } } else if(X.c("0000 ???? 00017FFF")) { //the Harald Hårdtand game is once again different var z = 0; for(p = 8; p < 0x10; p += 2) { t = X.I16(p,_BE); if(!t) { z++; continue } if(t < 0 || t%2 || !(X.c("7FFF",t-2) || X.c("7FFE",t-4))) return false; } if(z > 1) return false; p = 2+X.I16(2,_BE); if(p > X.Sz() || !X.c("'FORM' 00?????? '8SVXVHDR'",p)) return false; while(p < X.Sz()) { if(X.c("'FORM' 00?????? '8SVXVHDR'",p)) { smp++; p += 4+X.I32(p+4,_BE)+2 } p += 2; if(p >= X.Sz()) break } if(p > X.Sz()) return false; sz = p; fmt = 'harald' } else { //this detection is a tad broken in the eagleplayer if((p = X.U16(0,_BE)) > 0x200 || p < 4 || p % 2) return false; p += 2; for(i=2; i < p; i += 2) if((t = X.I16(i,_BE)) <= 0 || t % 2 || !X.c("7FFF",t-2)) return false; fmt = 'latest'; x = X.U16(0,_BE); p = smptp = X.U16(x+2,_BE); d3 = X.U16(x,_BE); x >>= 1; x--; if(x != 1) if(X.c("0000",d3-6) || !X.c("7F00",d3-4)) x--; smp0p = X.U16(p,_BE); var lo = hi = X.U24(smp0p+0xF,_BE); smp = ssz = 0; while(p < smp0p && smp < 128) { if(p > X.Sz()) return false; smp++; pp = X.U16(p,_BE); sofs = X.U24(pp+0xF,_BE); if(lo > sofs) lo = sofs; if(hi <= sofs) { hi = sofs; ssz = X.I16(pp+0x12,_BE); if(!X.c("'BODY'",sofs-8)) { //a raw sample //the original test was if(!X.U8(pp+0xE)) - this fails with, say, georgglaxo ingame.jo sofs = X.U32(pp+0x14,_BE); if(sofs > hi) { hi = sofs; ssz = 2*X.U16(pp+0x18,_BE) } } } if(hi > X.Sz()) return false; if(pp < smp0p) smp0p = pp; //_log('smp '+smp+'. @'+Hex(pp)+' maxofs:'+Hex(hi)+' ssz0E:'+Hex(X.U24(pp+0xF,_BE))+' ssz18:'+Hex(X.U16(pp+0x18,_BE)) //+(X.c("'BODY'",sofs-8)?' IFF ['+Hex(X.U32(sofs-4,_BE))+'-'+Hex(sofs+X.U32(sofs-4,_BE))+']':' raw')) p += 2; } if(X.c("'BODY'00'",lo-8)) lo = X.fSig("'FORM'00??????",lo-150,lo-20); songsz = lo; if(X.c("'BODY'00'",hi-8)) hi += X.U32(hi-4,_BE); //BODY tag skip else hi += ssz<<1; sz = hi; } return true; } if(!bDetected && isJesperOlsen()) { sName = "Jesper Olsen's module (.JO)"; sVersion = fmt; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption('smp:'+smp+' sz:'+outSz(sz)) } } function isJasonBrooke() { //from reversing the eagleplayer // SubSongs at +04; SongSize at +14; Samples at +1C; CalcSize at +24; // SamplesSize at +2C; ord at +34; SynthSamples at +3C // LoadSize at +0C; SynthSamples at +3C; Steps at +44; AuthorName at +4C => F2; // Prefix at +54 => 139 fmt = ''; p = 0; function findPlus(s) { while(p < X.Sz()) { t = X.c(s,p); p += 2; if(t) break } } function findOrPlus(s) { while(p < X.Sz()) { if(X.c(s,p)) break; p += 2 } } function minusFind(s) { while(p > 0) { p -= 2; if(X.c(s,p)) break } } if(X.c("48E7F0F0")) { if(!X.c("424047FA FFF84A2B",4)) return false; fmt = 'old'; // -1 if(!X.isVerbose()) return true; a0 = p = 12; findPlus("43FA"); d7 = p+X.U16(p,_BE)+1; findPlus("228A"); p += 2; d2 = p-8+X.U16(p-8,_BE); //the first synsmp ptr? findPlus("137B"); d6 = a4 = p+X.U16(p,_BE)-1; x = 1; while(d6 < X.Sz()) { d6 += 10; if(!X.U16(d6,_BE)) break; if(X.U8(d6)) break; x++ } minusFind("48E7"); var hi, lo = X.U16(a4+2,_BE); //p & a4 -> stack for(d0 = x; d0--;) { //d852~62 a4 += 2; for(d3=4; d3--;) { t = X.U16(a4,_BE); a4 += 2; if(lo > t) lo = t } } p = lo; lo = hi = X.U16(p,_BE); p += 2; do { //d870~84 t = X.U16(p,_BE); p += 2; if(t) { if(t < lo) lo = t; if(t > hi) hi = t; } } while(p < d7); a3 = lo; synsmp = (lo-d2)>>7; p = hi; while(p < X.Sz()) if([0x85,0x87].indexOf(X.U8(p)) >= 0) break; else p++; //d89a~ac d0 = 0; do { //d8ae~c6 while(a3 < X.Sz()) if([0x85,0x87].indexOf(X.U8(a3)) >= 0) break; else a3++; a3++; d0++ } while(a3 < p); p++; a3 = d6; if(a3) { //d8c8~f6 for(d1=0x80,found=false; d1-- && !found;) { t = X.c("41FA",a3); a3 += 2; if(t) found = true } if(found) { //d8de a3 += X.U16(a3,_BE); while(a3 < X.Sz()) { if(X.c("FF",a3+4) || X.c("FF",a3+6)) a3 += 0x12; else break } p = a3; } sz = p; steps = d0 //d8fa } } else { p = 0xAC; while(p < 0xE0) { t = X.c("48E7",p); p += 2; if(t) break } if(p > 0xE0) return false; if(!X.c("F8FC",p) && !X.c("F8F8",p)) return false; if(!X.c("08F90001 00BFE001 33FC0780 00DFF09A 47FA",p+2)) return false; p += 0x14; if(0x10000-p-X.U16(p,_BE)) return false; fmt = 'new'; if(!X.isVerbose()) return true; p = 0; findPlus("48E7"); findPlus("49F9"); p += 6; findPlus("7600"); d0 = X.U16(p-10,_BE); findOrPlus("10320000"); a4 = p-2+X.U16(p-2,_BE); findPlus("48E7"); p = a3 = p-6; findPlus("43FA"); p += X.U16(p,_BE)-1; a4 -= p; d3 = Util.divu64(a4,0x12); x = 1; d2 = 0; for(; p < X.Sz(); x++) { //d74e~5c p += 0x12; d2 = X.U16(p,_BE); if(X.U8(p,_BE)) break; d2--; if(d2 <= 0) break; } if(d3 < x) x = d3; //d75e~64 p = a3; minusFind("45FA"); d0 = p = p-2+X.U16(p-2,_BE); p += 4; synsmp = smp = d5 = 0; smpp = p; while(p < X.Sz()) { if((t = X.U32(p,_BE)) > d0) { //d784~a8 if(!smp) d5 = t; if(t <= d5) d5 = a4 = t; smp++; p += 10; if(p > a4) break; } else { synsmp++; p += 10 } } i = smp+synsmp; sz = 0; p = smpp; while(i-- && p < X.Sz()) { t = X.U32(p,_BE)+X.U16(p+4,_BE); if(sz < t) sz = t; p += 10 } //~d7cc } return true } if(!bDetected && isJasonBrooke()) { sName = "Jason C. Brooke's module (.JB,.JCB)"; sVersion = fmt; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption((fmt=='new'?'wf.smp:'+smp:'steps:'+steps)+' syn.smp:'+synsmp+' sz:'+outSz(sz)) } } function isKrisHatlelid() { // SubSongs at +04; SamplesSize at +0C; Length at +14; Samples at +1C if(!X.c("000003F3 00000000 00000003 00000000 00000002 ???????? 40?????? 00000001 000003E9")) return false; twofiles = false; p = 0x30; d1 = X.U32(0x14,_BE) & ~(1<<30); if(X.U32(0x24,_BE) != d1) return false; if(X.c("60000016",0x28)) { if(!X.c("0000ABCD",0x2C)) return false } else p = 0x18; if((p == 0x30 && !X.c("B07C0000",0x40)) || p == 0x18) { if(!X.c("41F90000 00004E75",p+0x10)) return false; twofiles = true } p = 0x40; smpp = 0; while(!smpp && p < X.Sz()) { t = X.fSig(p,TOEOF,"'FORM'"); if(!t%2) smpp = t; else p = Math.max(t+1,p+1) } if(smpp < 0) return false; smp = 0; while(p < X.Sz()) { if(!X.c("'FORM' ???????? '8SVXVHDR'",p)) break; smp++; p += 4+X.U32(p+4,_BE) } // var psz = X.fSig(0x24,0x40,"000003EA")+4; if(psz < 4) return false; sz = psz+4+(X.U32(psz,_BE)<<2); // if((t = (X.U32(sz,_BE)>>3)<<3) != 0x3EC) _log(" the chunk at sz is not 3EC but "+Hex(t)); // else t = X.U32(sz+4,_BE); // if(p != sz) _log("sz differs! "+Hex(sz)+" vs "+Hex(p)) // TODO parse hunks↑ tooб AND detect/debug SubSongs! sz = p; return true; } if(!bDetected && isKrisHatlelid()) { sName = "Kris Hatlelid's module (.KH"+(twofiles?'+SONGPLAY':'')+")"; bDetected = 1; if(X.isVerbose()) { sOption('sz:'+outSz(sz)) } } function isKefrensSoundMachine() { //ref https://github.com/tonioni/WinUAE/blob/master/prowizard/rippers/KefrensSoundMachine.c if(X.Sz() < 1537) return false; if(X.U8(15) != 0x61) return false; for(k=0; k < 15; k++) if(X.U8(54+k*32) > 0x40) return false; trks = 0; for(k=0; k < 1024; k++) { k_ = X.U8(k+512); if(k_ == 0xFF) break; if(k_ > trks) trks = k_; } if(k == 1024) return false; if(trks == 0) return false; if(1536 + trks*192 + 64*3 > X.Sz()) return false; for(k=0; k <= trks; k++) for(l=0; l < 64; l++) if(X.U8(1536 + k*192 + l*3) > 0x24) return false; allsmpsz = smp = 0; for(k=0; k<15; k++) { t = X.U16(52+k*32,_BE); if(t) smp++; allsmpsz += t } sz = (trks+1)*192 + allsmpsz + 1536; return true } if(!bDetected && isKefrensSoundMachine()) { sName = "Jess D. 'Razmo' Skov-Nielsen's Kefrens Sound Machine module (.KSM)"; bDetected = 1; if(X.isVerbose()) { sOptionT(X.SA(2,13)); sOption("trk:"+trks+(smp?" smp:"+smp:'')+" sz:"+outSz(sz)); if(sz > X.Sz()) sVersion = "malformed!short" } } function isPaulRobotham() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_teamPaulRobotham/src/Paul%20Robotham_v1.asm trk = X.U16(0,_BE); d2 = X.U16(2,_BE); d3 = X.U16(4,_BE); smp = X.U16(6,_BE); p = 8; if(!trk || trk > 4 || !d2 || !d3 || !smp) return false; mp = 0; trks = []; for(d1=trk;d1;d1--) { t = X.U32(p,_BE); p += 4; if((t>>16) || !t) return false; trks.push(t); if(mp < t) mp = t } //stpos //_log('PaulRobotham: StartPos -> '+Hex(p)); for(;d2;d2--) { t = X.I32(p,_BE); p += 4; if(t <= 0 || t%2) return false; if(mp < t) mp = t } //Next1 d2 = X.I32(p,_BE); //_log('PaulRobotham: Next1 -> '+Hex(p)) for(;d3;d3--) { t = X.I32(p,_BE); p += 4; if(t <= 0 || t%2) return false; if(mp < t) mp = t } //Next2 //_log('PaulRobotham: Next2 -> '+Hex(p)) p += smp*12; if(p != d2) return false; for(d2=15;d2;d2--,p+=16) if(!X.c("3F3F3F3F 3F3F3F3F 3F3F3F3F 3F3F3F3F",p)) return false; return true } if(!bDetected && isPaulRobotham()) { sName = "Paul Robotham's module (.DAT+.SSD)"; bDetected = 1; if(X.isVerbose()) sOption('trk:'+trk+' smp:'+smp) } function isDMM() { // ref https://bitbucket.org/zxtune/zxtune/src/develop/src/formats/chiptune/digital/digitalmusicmaker.cpp for(i=0; i < 6; i++) if(!(0xC0 <= X.U8(i*2+1) <= 0xFF)) return false; ptnsz = X.U8(0x0C); if(ptnsz & 0x87) return false; ptn = -1; for(i=0; i < 0x32; i++) { j = X.U8(0x0E+i); if(j > 0x17) return false; if(j > ptn) ptn = j; } ptn++; tempo = X.U8(0x40); if(tempo < 3 || tempo > 30) return false; loop = X.U8(0x41); if(loop > 0x32) return false; ord = X.U8(0x43); if(!ord || ord > 0x32) return false; hss = X.U8(0x44); if(hss < 2 || hss > 0x38) return false; bad = false; smp = 0; for(i=0; i < 16; i++) { smpst = X.U16(0x5A+i*16+9,_LE); smplm = X.U16(0x5A+i*16+12,_LE); smplp = X.U16(0x5A+i*16+14,_LE); if(smpst > smplm || smpst < 49152 || smplm < 49152) return false; if(smplp < 49152 || smplp > smplm || smpst > smplp || (smplm > 49152 && smplm-smplp < 6)) { bad = true; if(!X.isHeuristicScan()) return false } if(smpst < smplm) smp++; } return true } if(!bDetected && X.isDeepScan() && isDMM()) { bDetected = 1; sVersion = "v1.x"; if(bad) sVersion += "/malformed"; sName = "Vasilii 'BACA' Pakhomov/LAVE's Digital Music Maker module (.DMM)"; if(X.isVerbose()) sOption("tempo:"+tempo+" ord:"+ord+" ptn:"+ptn+" smp:"+smp+" loop:"+loop) } function isComposerC67() { // from https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_c67.cpp if(X.Sz() < 0xBA2) return false; //7A2+400 spd = X.U8(0); if(!isWithin(spd,1,15)) return false; ord = 0; ptn = []; for (i=0; i < 256; i++) if((o=X.U8(0x6A2+i)) != 0xFF) { // check orders if(o >= 128) return false; if(i > ord) ord = i; if(ptn.indexOf(o) < 0) ptn.push(o) } ord++; ptn = ptn.length; nonz = false; lp = X.U8(1); if(lp > ord) return false; smp = opl = smpsz = 0; for (i=0; i < 32; i++) { // checking sample records if(X.U8(2+i*13+12) || X.U32(0x1A2+i*16) || X.U8(0x3A2+i*13+12)) return false; var _l = X.U32(0x1A2+i*16+4), _ls = X.U32(0x1A2+i*16+8), _le = X.U32(0x1A2+i*16+12); if(_l > 0xFFFFF) return false; if(_l && _le < 0xFFFFF && (_le > _l || _ls > _le)) return false; _opl = !X.c("00000000 00000000 000000",0x542+i*11); if(X.U8(0x542+i*11) & 0xF0) return false; if(X.U8(0x542+i*11+5) & 0xFC) return false; if(X.U8(0x542+i*11+10) & 0xFC) return false; if(_l) { smp++; smpsz += _l } if(_opl) opl++; } bad = false; ptnend = notes = 0; for (i=0; i < 128; i++) { // checking patterns p = 0xBA2+X.U32(0x7A2+i*4,_LE); ptnlen = X.U32(0x9A2+i*4,_LE); if(!bad) bad = (ptnlen < 3 || ptnlen > 0x1000); if(p > 0xFFFFFF || (X.Sz() < p+ptnlen)) return false; if(p+ptnlen > ptnend) ptnend = p+ptnlen; for(r = 0; p < ptnend;) { var cmd = X.U8(p++); if(cmd <= 0xC) { p += 2; notes++ } else if(cmd >= 0x20 && cmd <= 0x2C) p++; else if(cmd == 0x40) r += X.U8(p++); else if(cmd == 0x60) break; else return false } if(r > 64) return false; } sz = ptnend+smpsz; return smp+opl > 0 } if(!bDetected && isComposerC67()) { sName = "Thomas 'Tran' Pytel's CDFM/Composer 670 module (.C67)"; bDetected = 1; if(bad) sVersion = "malformed!badptn"; if(X.isVerbose()) sOption('spd:'+spd+' ord:'+ord+(lp?' lp:'+lp:'')+' ptn:'+ptn+' smp:'+smp+' fm:'+opl+' notes:'+notes+' sz:'+outSz(sz)) } function isSeanConnolly() { //from UADE player check RE if(!X.c("6000.... 6000.... 6000")) return false; a0 = 2+X.I16(2,_BE); if(X.c("48E77FFE E98841FA",a0)) v = 2; else if(X.c("48E740F0 4A006B0A",a0)) v = 3; else return false; return true } if(!bDetected && isSeanConnolly()) { sName = "Sean 'Odie' Connolly\'s module (.SCN)"; sVersion = "v"+v; bDetected = 1 } function isAVP() { //from reversing the eagleplayer d1 = "48E7FCFE"; a0 = 0; if(X.c(d1)) { // @d440 -> d47c if(X.c("45FA",0xDC)) return false; if(!X.c("E9417000 41FA",4)) return false; if(X.c(d1,0x94) || X.c(d1,0xA4) || X.c(d1,0xA8)) { fmt = 0; base = 8; return true } else return false } else if(X.c("2F0841FA")) { //@d444 -> d4ac a0 += 4; a0 += X.I16(a0,_BE) + 0x1C; if(!X.c("45FA",a0+0xDC)) return false; a0 += 4; if(!X.c("E9417000 41FA",a0)) return false; a0 += 4; if(X.c(d1,a0+0x8C) || X.c(d1,a0+0x9C) || X.c(d1,a0+0xA0)) { fmt = 0; base = a0; return true } } else if(X.c(d1,0x1C)) { //@d44c -> d4b0 a0 += 0x1C; if(!X.c("45FA",a0+0xDC)) return false; a0 += 4; if(!X.c("E9417000 41FA",a0)) return false; a0 += 4; if(X.c(d1,a0+0x8C) || X.c(d1,a0+0x9C) || X.c(d1,a0+0xA0)) { fmt = 0; base = a0; return true } } else if(X.c("6000")) { //@d452 -> d4d0 if(!X.c("6000.... 6000.... 6000.... 6000.... 6000.... 6000.... 6000",4)) return false; if(X.c("6000",0x20) && !X.c("6000",0x24)) return false; a0 = 0xE; a0 += X.I16(a0,_BE); if(X.c(d1,a0)) { //@d50e -> d4be if(!X.c("45FA",a0+0x10C) && !X.c("E942",a0+0x112)) return false; a0 += 4; if(!X.c("E9417000 41FA",a0)) return false; a0 += 4; if(X.c(d1,a0+0x8C) || X.c(d1,a0+0x9C) || X.c(d1,a0+0xA0)) { fmt = 0; base = a0; return true } } a0 = 0x1A+X.I16(0x1A,_BE); if(!X.c(d1+"43FA",a0)) return false; fmt = 1; base = a0; return true } else { //@d45a do { if(X.c("2F0841FA",a0+0x1C)) break; a0 += 2 } while(a0 < 0xA); if(a0 == 0xA) return false; //else -> d46e i = 0x4C; do { if(X.c(d1,a0)) break; a0 += 2; i-- } while(i); if(!i) return false; //else -> d4be if(!X.c("45FA",a0+0x10C) && !X.c("E942",a0+0x112)) return false; a0 += 4; if(!X.c("E9417000 41FA",a0)) return false; a0 += 4; if(X.c(d1,a0+0x8C) || X.c(d1,a0+0x9C) || X.c(d1,a0+0xA0)) { fmt = 0; base = a0; return true } } return false } if(!bDetected && isAVP()) { sName = "Martin Walker's Activision Pro module (.AVP)"; sVersion = "f."+fmt; bDetected = 1; if(X.isVerbose()) { sOption(Hex(base),"base:"); //TODO: derive some info using NP } } function isJP() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/JasonPage/src/Jason%20Page_v5.s fmt = 0; if(X.c("0002") && !(X.U8(3)&1)) for(;;) { t = X.I16(4,_BE); if(t&1) break; if(X.I16(t)&1) break; d0 = X.I16(0x30,_BE); if(d0 > X.Sz()) break; for(a1 = 2; a1 <= 0x2E; a1 += 2) { t = X.U16(a1,_BE); if(!t || (t&1) || t > X.Sz() || d0 <= t) break; } if(a1 < 0x30) break; if((X.U16(t,_BE)&0xF00) == 0xF00) fmt = 2; else fmt = 1; break } if(!fmt) if(X.I16(0,_BE) || X.I16(0x80,_BE) || !X.c("00000CBE",0x84) || !X.c("000308BE",0xCB6) || !X.c("000309BE",0xCBA)) return false; else fmt = 3; smpsz = smp = 0; x = 1; if(fmt == 3) { sz = X.U32(0x8BA,_BE)+2; if(sz < 0x8BC || sz > X.Sz()) return false; t0 = X.U32(0,_BE); for(i = 4; i < 0x80; i += 4) { t1 = X.U32(i,_BE); t = t1-t0; if(t < 0) return false; smpsz += t; if(t) smp++; t0 = t1 } smpsz += 0x80; if(sz == 7382 && smpsz == 19290) x = 16 /*realms ingame*/; else { x = 0; a1 = 0x6BE; do { d0 = X.U32(a1,_BE); a1 += 4; if(X.U16(d0,_BE) == 0xFF00) break; x++ } while(a1 < sz) } } else { sz = X.U16(0x30,_BE); a0 = X.U16(0xC,_BE)+2; a1 = X.U16(0x1C,_BE); x = (a1-a0)>>1; for(i = X.U16(2,_BE); i < sz-4; i += 4) { slen = X.U32(i,_BE); smpsz += slen; if(slen) smp++ } } return true; } if(!bDetected && isJP()) { switch(fmt) { case 1: sName = "Jason Page's module (.JP)"; break; case 2: sName = "Jason Page's module (.JPN)"; break; case 3: sName = "Jason Page's old module (.JP)"; } sVersion = "f."+fmt; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption("smp:"+smp+" smp.sz:"+smpsz+" song sz:"+outSz(sz)) } } function isMikeDavies() { //ref reversing the eagleplayer a2 = 0xF2; if(!X.c("0C40",a2)) { a2 -= 6; if(!X.c("33C0",a2)) return false } if(!X.c("48E7FFFE 61064CDF 7FFF4E75",a2-12)) return false; a2 = X.fSig(a2,0xFFFF,"6000")+2; if(a2 < 2) return false; t = X.I16(a2,_BE); if(!t || t < 0 || (t&1)) return false; a2 += t; if(!X.c("2D58",a2)) return false; a2 = 0; function findOrPlus(s) { while(a2 < X.Sz()) { if(X.c(s,a2)) break; a2 += 2 } } // couple helper functions function plusAndFind(s) { while(a2 < X.Sz()) { a2 += 2; if(X.c(s,a2-2)) break } } function errorP(s) { if(debug>1)_log('MikeDavies: '+s); patchClear(); return false } var a4 = []; // the "wach get out!!!" memory part. Local vars //we skip a4.push(0) *2 unlike the original code, so analogously, a4[] points @d138 instead of d134 findOrPlus("48E7FFFE"); a4.push(a2>>16); a4.push(a2&0xFFFF); //d3a2~d3ae findOrPlus("33FC0001"); //d3b0~d3ba a2 += 4; rel = X.U32(a2,_BE); plusAndFind("41F9"); a4.push(a2>>16); a4.push(a2&0xFFFF); d1 = X.I32(a2,_BE); //d3c0~d3c8 plusAndFind("B1FC"); d0 = X.U32(a2,_BE); //d3ca-d3d0 x = d0 = (d0-d1) >> 4; plusAndFind("41F9"); a4.push(a2>>16); a4.push(a2&0xFFFF); //d3da~d3e0 plusAndFind("B1FC"); a4.push(a2>>16); a4.push(a2&0xFFFF); //d3e2~d3e8 plusAndFind("303C"); //d3ea~d3ee findOrPlus("48E7FFFE ........ 6100"); a4.push(a2>>16); a4.push(a2&0xFFFF); //d3f6~d40a plusAndFind("41F9"); a4.push(a2>>16); a4.push(a2&0xFFFF); d2 = X.U32(a2,_BE); //d40c~d414 plusAndFind("B1FC"); d3 = X.U32(a2,_BE); //d416~d41c d3 = d4 = d3-d2; var mo = d3%0x18; d3 = Util.divu64(d3,0x18); //d41e~d42e if(mo) { d4 += 4; mo = d4%0x18; d4 = Util.divu64(d4,0x18); if(mo) return errorP('@d436 error 5'); //originally, error code 5 d3 = d4; if(X.c("4654443C",0x7D8)) { //d44c~44; patch #1 adjusting 3 positions a3 = 0x770; for(d4=2; d4 >= 0; d4--) { a3 -= 4; wpU32be(a3+4,rpU32be(a3)); } } } a4.push(d3>>16); a4.push(d3&0xFFFF); //d45a plusAndFind("4BF9"); d5 = rpU32be(a2)-rel; //d45c~64 if(a2 > X.Sz()) return errorP('@d464 a2 too high'); if(!X.isDeepScan()) { patchClear(); return true } a4.push(d5>>16); a4.push(d5&0xFFFF); //d466 a4.push(0); //d468 a5 = 0x4ED2; a4.push(a5>>16); a4.push(a5&0xFFFF); //d46a; delitrackerglobals //d472~d4fa: patch #2 (changes certain offsets in the player code to relative) a3 = (a4[0]<<16)+a4[1]; p2cycle: while(a3 < X.Sz()) { //from d472... switch(rpU16be(a3)) { case 0x33EE: case 0x33FC: a3 += 2; //d4ce & ↓ case 0x3039: case 0x33C0: case 0x33C1: case 0x3C39: case 0x41F9: case 0x4279: case 0x4A79: case 0x4BF9: case 0x4DF9: case 0x5379: case 0xB1FC: //d4d0 a3 += 2; a3_ = rpU32be(a3); if((a3_>>16) == 0x00DF) break; wpU32be(a3,a3_-rel); a3 += 4; break; case 0x33F9: //d4de a3 += 2; a3_ = rpU32be(a3); if((a3_>>16) == 0x00DF) a3 += 4; else { wpU32be(a3,a3_-rel); a3 += 4 } a3_ = rpU32be(a3); if((a3_>>16) != 0x00DF) { wpU32be(a3,a3_-rel); a3 += 4 } break; default: a3 += 2; if(a3 >= d5) break p2cycle; } } d4 = d3; //d4fe a2 = (a4[10]<<16)+a4[11]; //d500 a2 = rpU32be(a2); //d504 a2_ = rpU32be(a2)-rel; wpU32be(a2,a2_); //d506~8 d2 = a2_; //d50a~c d5 = a2_+2*rpU32be(a2+4); a2 += 0x18; a2_ = rpU32be(a2); d3 -= 2; //patch1; d50e~1a if(d3 > 0x80) return errorP('@d51a badsmp:'+Hex(d3)); while(d3 >= 0) { //d51c & d53a a2_ -= rel; wpU32be(a2,a2_); //d51e~d520 if(d5 <= a2_) d5 = a2_+2*rpU32be(a2+4); if(d2 > a2_) d2 = a2_; //d530~d534 a2 += 0x18; a2_ = rpU32be(a2); //patch1 d3--} a4.push(a2>>16); a4.push(a2&0xFFFF); //d53e. a2+4 = start of samples a2 = rpU32be((a4[4]<<16)+a4[5]); //d540~4 a3 = (a4[6]<<16)+a4[7]; a3_ = rpU32be(a3); //d546 d3 = Util.divu64(a3_-a2, 0x18); //d54c~50 a4.push(d3); //d554 smp = d3+d4; //d556~8 d4 = d3; a2_ = rpU32be(a2); //d55c if(d4 > 0x80) return errorP('@d55e d4='+Hex(d4)+' > 80h'); while(d4 > 0) { //d55e~60 & d57e a2_ -= rel; wpU32be(a2,a2_); //d562~4 if(d5 <= a2_) d5 = a2_+2*rpU32be(a2+4); if(d2 > a2_) d2 = a2_; //d574~8 a2 += 0x18; a2_ = rpU32be(a2); d4--} if(a2 > (a4[19]<<16)+a4[20]) { a4[19] = a2>>16; a4[20] = a2&0xFFFF } //d582~8 d0 <<= 2; //d58e a2 = rpU32be((a4[2]<<16)+a4[3]); a2_ = rpU32be(a2); //d592~6 d3 = 0; do { if(a2_ != 0xFFFFFFFF && d3 < a2_-rel) d3 = a2_-rel; //d59c~a8 a2 += 4; a2_ = rpU32be(a2); //d5aa d0--} while(a2 < X.Sz() && d0 > 0); a3 = (a4[8]<<16)+a4[9]; //d5b0 while(a3 < X.Sz()) { a3 += 2; if(X.c("0C40",a3-2)) break } //d5b4~8 d0 = rpU16be(a3+0x16); a4.push(d0); //d5ba~e if(d5 > d3) { //d5c8~a if(d5 > X.Sz()) return errorP('@d5ce error 1C'); //d5cc~e; return errorcode 1C a2 = d2; a1 = (a4[19]<<16)+a4[20]; do { //from d5d8... if(rpU16be(a1) == d0) { a1 += 6; wpU32be(a1,rpU32be(a1)-rel) } //d5d8~e0; patching #3?... a1 += 2; // d5e2 } while(a1 != a2 && a1 < X.Sz()) a2 = d5; } else { //from d5ee if(d3 > X.Sz()) return errorP('@d5ee error 1C'); //d5ee~f0; return errorcode 1C a2 = d3; //d5f4; d4 and a3 = filesize while(a2 < X.Sz()) { //d5fc -> sub_d65c a2 += 2; if([0x94,0xFE,0xFF,0x1FE,0x1FF].indexOf(rpU16be(a2-2)) >= 0) break } a1 = d5; a1_ = rpU32be(a1); //d5f8 do { // from d5fa... if(d0 == (a1_>>16)) { a1 += 6; a1_ = rpU32be(a1)-rel; wpU32be(a1,a1_); if(d3 < a1_) d3 = a1_; } a1 += 2; a1_ = rpU32be(a1); //d60a } while(a2 != a1); //d60c~e to d5fa if(a2 <= d3) { //d610~2 a2 = d3; while(a2 < X.Sz()) { a2 += 2; if([0x94,0xFE,0xFF,0x1FE,0x1FF].indexOf(rpU16be(a2-2)) >= 0) break; } } } patchClear(); sz = a2; //d618~a smpsz = d5-d2; songsz = a2-smpsz; return true } if(!bDetected && isMikeDavies()) { sName = "Mike Davies module (.MD)"; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,'×'); if(X.isDeepScan()) sOption('smp:'+smp+' songsz:'+Hex(songsz)+' smpsz:'+Hex(smpsz)+' sz:'+outSz(sz)) } } function isSilmarils() { //from UADE player RE a0 = 0; if(!X.c("0016",a0+4)) { a0 += 6; if(!X.c("0016",a0+4)) return } if(!X.c("0000 00000000 00000000 ....0020 ....0020",a0+6)) return; d1 = X.U32(a0+0xE,_BE); if(d1&1) return; if(!X.c("00000058",a0+d1)) return; a2 = a0+0x58; a3 = 0; if(X.c("0016",0xA)) a3 += 6; a3 += X.U32(a3+0xE,_BE); a3 += X.U32(a3,_BE); a2 = a3; x = smp = sz = d0 = d3 = 0; while(a3 < X.Sz()) { a3 = a2; a2 += 4; if(!X.U32(a3,_BE) || X.U8(a3)) { //→e684 a3 = sz; sz += X.U32(a3+2,_BE); break; } else { a3 += X.I32(a3,_BE); if(a3 > sz) sz = a3; if(a3 > X.Sz()) return; if(X.c("FF02",a3+6)) x++; else { t = X.U32(a3+2,_BE); if(t > X.Sz()) return; smp++; d3 += t; if(d0 < t) d0 = t } } } if(a3 > X.Sz() || sz > X.Sz()) return; smpsz = d3; return true } if(!bDetected && isSilmarils()) { sName = "Michel Pernot's Silmarils module (.MOK)"; bDetected = 1; bad = ""; if(x > 3) bad = bad.addIfNone("!subsongs>3"); if(smp > 0x20) bad = bad.addIfNone("!smp>32"); if(bad != "") sVersion = sVersion.appendS("malformed"+bad,'/'); if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption("smp:"+smp+" smpsz:"+Hex(smpsz)+" sz:"+outSz(sz)) } } function isDUX() { //from the UADE player's RE t = X.U32(0,_BE); if(t < 0x70 || (t&1) || !X.c("FFFF FFFFFFFF",t-6)) return; sz = t; for(smp=0,p=4; p < 0x64; p+=12) { //8 samples t = X.U32(p,_BE); if((t&1) || t && t < 0x70 || t > sz) return; if(t) smp++ } if(!smp) return; for(; p < 0x70; p += 4) { t = X.U32(p,_BE); if(t < 0x70 || (t&1) || t > sz) return } if(!X.c("FFFF FFFFFFFF",p+t-6)) return; smpsz = X.U32(0x64,_BE); p = 0x74+smpsz; //p points to patterns? orderlist? // what does this do?.. //for(q = 0; p < sz; p += 4) if((t = X.I16(p,_BE)) >= 0) q += t; else break; //q >>= 4; unpsz = Util.div64(q*14187, 44336); return true } if(!bDetected && isDUX()) { sName = "GT Game Systems module (.DUX)"; bDetected = 1; if(X.isVerbose()) { ord = 1+Util.div64(X.U32(0x68,_BE)-smpsz, 0x3C); smpsz -= 0x70; sOption('ord:'+ord+' smp:'+smp+' smpsz:'+Hex(smpsz)+' sz:'+outSz(sz)) } } function isBuzzic2() { //from the app sources if(!X.c("'buz2'0200")) return; gvol = X.F32(8); if(!isWithin(gvol,0,2)) return; bpm = X.U32(0xC); if(!isWithin(bpm,10,200)) return; startpos = X.U32(0x10); ord = X.U32(0x14)+1; if(startpos >= ord) return; looping = X.U8(0x18); if(looping > 1) return; nV = X.U16(6); p = 0x9C; sz = -1; bad = ""; maxptn = maxtrk = 64; maxtml /*max template melody length*/ = 128; ptn = X.U32(p); trk = X.U32(p+4); p += 8; if(nV >= 1) { maxptn = X.I32(p); maxtrk = X.I32(p+4); maxtml = X.I32(p+8); p += 12 } p += maxptn*16+maxtrk*maxtml; trks = []; for(i=0; i < 64; i++) { t = X.SA(p,0x40).trim(); if(t != "") trks.push(t); p += 0x40 } ptns = []; for(i=0; i < 64; i++) { t = X.SA(p,0x40).trim(); if(t != "") ptns.push(t); p += 0x40 } ins = X.U32(p); p += 4; if(p > X.Sz()) return; inss = []; totalops = 0; for(i=0; i < ins; i++) { t = X.SA(p,0x80).trim(); if(t != "") inss.push(t); var opcnt = X.U32(p+0x184); totalops += opcnt; p += 0x2410+opcnt*0x228; } sz = p; if(sz > X.Sz()) bad = bad.addIfNone('!short'); return true; } if(!bDetected && isBuzzic2()) { sName = "Buzzic module (.buz2)"; bDetected = 1; sVersion = 'v2.'+nV.padStart(2,'0'); if(X.isVerbose()) { //sOptionT(addEllipsis(trks.join(','),0xA0,0x80),'trks:"','"'); //sOptionT(addEllipsis(ptns.join(','),0xA0,0x80),'ptns:"','"'); //sOptionT(addEllipsis(inss.join(','),0xA0,0x80),'insts:"','"'); sOption('bpm:'+bpm+' trk:'+trk+' ptn:'+ptn+' ins:'+ins+' g.vol:'+Math.round(gvol*100)+'% ops:'+totalops+' sz:'+outSz(sz)) } } function isInfogramesRH2() { if(!X.c("000200")) return; //+04: speed? version? I saw 1 through 7 if(!X.c("FF000F",X.U16(4,_BE)+1)) return; sz = X.U16(0x10,_BE)+2; for(i=10,oldp = X.U16(8,_BE); i < 0x20; i += 2) { if(i == 0x10) continue; p = X.U16(i,_BE); if(p <= oldp || p+1 > X.Sz()) return; if(!X.c("FF",p+1)) return; oldp = p } return true; } if(!bDetected && isInfogramesRH2()) { sName = "Infogrames (RobHubbard2) module (.DUM&.INS)"; bDetected = 1; if(X.isVerbose()) sOption(outSz(sz),'sz:') //TODO get info } function isSpecialFX() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/SpecialFX/Special%20FX_v2.asm if(!X.c("6000")) return; d2 = X.U16(2,_BE); if(d2 <= 0 || d2%2) return; a1 = 2; a0 = 4; for(i = 0; i < 3; i++) { if(!X.c("6000",a0)) return; t = X.U16(a0+2,_BE); a0 += 4; if(t <= 0 || t%2) return } a1 += d2; if(X.c("6000",a0)) { for(i = 0; i < 3; i++) { if(!X.c("6000",a0)) return; t = X.U16(a0+2,_BE); a0 += 4; if(t <= 0 || t%2) return } if(X.c("6000",a0)) return; } else { //OldFor if(!X.c("6100",a1)) return; a1 += 4 } if(!X.c("41F9",a1)) return; a1 += 6; if(!X.c("43F9",a1)) return; //TODO subsongs return true; } if(!bDetected && isSpecialFX()) { sName = "M.Cannon & J.Dunn's Special FX module (.JD)"; bDetected = 1 } function isSpecialFXST() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/SpecialFX_ST/src/Special%20FX%20ST_v3.asm if(X.Sz() < 2300) return; if(!X.c("00000000") && !X.c("0101") && !X.c("00000101") && !X.c("6000")) return; var a0 = 0, a1 = 140, a2 = X.Sz()-4; while(a0 < X.Sz()) { if(X.c("00090800",a0)) break; a0 += 2; if(a1 == a0) return } if(!X.c("01120900", a0+74) && !X.c("02240A00", a0+74*2) && !X.c("00090800", a0+74*3) && !X.c("01120900", a0+74*4) && !X.c("02240A00", a0+74*5)) return; a0 = a1+1860; while(a0 < X.Sz()) { if(X.c("0EF80E10",a0)) break; a0 += 2; if(a0 >= a2) return } //init sz = -1; a1 = 0; var d1 = 10, d7 = 0, p1 = 0, p2 = 0; while(a1 < X.Sz()) { d0 -= 2; a1 += 2; if(X.c("E740",a1-2)) break } //Find1 x = X.U16(a1-12,_BE); p1 = a1-4+X.U16(a1-4,_BE); while(a1 < X.Sz()) { //Find2 if(X.c("101A234A",a1)) { a1 += d1 } else if(X.c("4880D040",a1)) break; //noSpec, break to OK2 a1 += 2 } p2 = a1-2+X.U16(a1-2,_BE); //useful while(a1 < X.Sz()) { if(X.c("08C70007",a1)) break; a1 += 2 } //Find3 a2 = a1; if(a1 >= X.Sz()) return false; while(a2 > 0) { a2 -=2; if(X.c("41FA",a2)) break } //Find4 while(a1 < X.Sz()) //Find5 if(X.c("41F9",a1)) { a2 = X.U16(a1+2,_BE); break } else { t = X.c("41FA",a1); a1 += 2; if(t) { a2 = a1+X.U16(a1,_BE); break } } while(a1 < X.Sz()) { if(X.c("08870002",a1)) break; a1 += 2 } //Find6 a2 = a1+6; //OK6 if(X.c("41F9",a2-2)) { a2 = X.U16(a2,_BE); d7 = a2 } else a2 += X.U16(a2,_BE); while(a1 < X.Sz()) { if(X.c("08C70002",a1)) break; a1 += 2 } //Find7 a1 += d1; a2 = a1; if(X.c("41F9",a2-2)) a2 = X.U16(a2,_BE); else a2 += X.U16(a2,_BE); while(a1 < X.Sz()) { t = X.c("41FA",a1); a1 += 2; if(t) break } //Find8 a2 = a1+X.U16(a1,_BE); var skip = 0; bad = ''; while(a1 < X.Sz()) { if(X.c("0EF80E10",a1)) { skip = 1; break } if(X.c("7000101A",a1)) break; a1 += 2 } //Find9 if(!skip) { a2 = a1-2+X.U16(a1-2,_BE); while(a1 < X.Sz()) //FindA if(X.c("0EF80E10",a1)) { skip = 1; break } else { t = X.c("41FA",a1); a1 += 2; if(t) break } a2 = a1; a1 += X.U16(a1,_BE); } if(!skip) if(a1 > X.Sz()) { bad = bad.addIfNone('!short'); skip = 2 } if(!skip) { sz = a1; if(!d7) skip = 1 } if(!skip) while(a2 < X.Sz()) { //FindEnd if(X.c("41FA",a2)) sz = a1 = a2+2+X.U16(a2+2,_BE)+14; if(!X.c("110010",a2)) break; else a2 += 2; } //EndTable skipped -> Skip2 if(skip != 2) { d0 = p2-p1; if(d0 > 0) d0 >>= 3; if(d0 > 0) x = d0 } return true } if(!bDetected && isSpecialFXST()) { sName = "Special FX ST module (.DODA)"; bDetected = 1; if(bad != '') sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { if(x > 1) sOption(x,'×'); if(sz != -1) sOption(outSz(sz),'sz:') } } function isTronicDP() { a0 = d1 = 0x10+X.U16(2,_BE)+X.U16(6,_BE)+X.U16(10,_BE)+X.U16(14,_BE); if(a0 > X.Sz() || a0 % 2) return; a0 += X.U16(a0,_BE); if(a0 % 2) return; if(!X.c("005800B0",a0+4)) return; return true } if(!bDetected && isTronicDP()) { sName = "Tronic Delta Packer module (.DP)"; bDetected = 1; sOption('in:TronicTracker(?)') } function isDigitalSonixChrome() { //ref UADE player RE if(!X.U16(0)) return; if(!(smp=X.U8(2))) return; if((ord=X.U8(3)) < 2) return; d2 = smpsz = X.U32(4,_BE); if(!d2 || d2%2 || d2 > X.Sz() || d2 > 0x80000) return; d3 = X.U32(8,_BE); if(d3 > 0x20000) return; a0 = 0xC; x = 0; for(i=ord-1; i; i--) { d4 = X.I32(a0,_BE); if(d4 < 0 || d4 > 0x20000 || d4%2) return false; if(!X.U8(a0+4)) x++; a0 += 6 } if(!X.c("00000000 0000",a0)) return; a0 += 6; //@d2de~e4 d3 <<= 2; a0 += d3; //d2e6~8 a2 = a0+smp*0x12; //d2ea~f4 s = 0; while(a0 < X.Sz() && a0 < a2) { d1 = X.I32(a0+2,_BE); if(!isWithin(d1, 0,d2)) return; d0 = X.U32(a0+0xC,_BE); if(d0 > d2) return; if(X.U8(a0+0x10) > 0x40 || X.U8(a0+0x11)) return; //this check's not in the player a0 += 0x12; } if(a0 > X.Sz() || d2 != d0+X.I32(a0-0x10,_BE)) return; sz = a0+smpsz; return true } if(!bDetected && isDigitalSonixChrome()) { sName = "Andrew Bailey & David Hanlon's Digital Sonix & Chrome module (.DSC)"; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption('ord:'+ord+' smp:'+smp+' sz:'+outSz(sz)) } } function isPaulShields() { //ref https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/PaulShields/src/Paul%20Shields_v3.asm if(!X.c("00000000 0000000 0000")) return; if((t = X.U16(0xA4)) === X.U16(0xA8) && t === X.U16(0xAC) && t === X.U16(0xB0) && (t = X.I16(0xA0,_BE)) > 0 && !(t%2) && X.c("00B400B6",t)) { fmt = 1; p = 0xA6 } else if((t = X.U16(0x204)) === X.U16(0x208) && t === X.U16(0x20C) && t === X.U16(0x210) && (t = X.I16(0x200,_BE)) > 0 && !(t%2) && X.c("02140216",t)) { fmt = -1; p = 0x206 } else if((t = X.U16(0x202)) === X.U16(0x206) && t === X.U16(0x20A) && t === X.U16(0x20E) && (t = X.I16(0x204,_BE)) > 0 && !(t%2) && (X.c("FFEC",t-2) || X.c("FFE8",t-2))) { fmt = 0; p = 0x204 } else return; mp = 0; a3 = 0; for(i=0; i < 4; i++) { t = X.U16(p,_BE); if(mp < t) mp = t; p += 4 } a3 += mp; mp = X.U16(a3-2,_BE); while(a3 < X.Sz()) { t = X.U16(a3,_BE); a3 += 2; if(t == mp) break } smpp = a3; if(!isWithin(smpp,0x400,0x4000)) return; if(fmt == 1) a3 = X.I16(0xAA,_BE); else if(fmt == 0) a3 = X.I16(0x204,_BE); else a3 = X.I16(0x20A,_BE); ord = 0; while(a3 < X.Sz()) { t = X.U16(a3,_BE); a3 += 2; if(t == mp) break; ord++ } if(!isWithin(ord,1,0x80)) return; for(i=p=smp=smpsz=0; i < 0x10; i++) { p += 2; if(fmt != 1) p += 20; if(t = X.U16(p,_BE)) { smpsz += t; smp++ } p += 8; if(fmt != 1) p += 2; } smpsz <<= 1; if(!smp || !isWithin(smpsz,0x2000,0x20000)) return; sz = smpp+smpsz; return true; } if(!bDetected && isPaulShields()) { sName = "Paul Shields' module (.PS)"; sVersion = 'f.'+fmt; bDetected = 1; if(X.isVerbose()) { sOption('ord:'+ord+' smp:'+smp+' smpsz:'+Hex(smpsz)+' sz:'+outSz(sz)) } } function isROL() { // ref https://moddingwiki.shikadi.net/wiki/ROL_Format // the "signature" can contain filenames and (cut off) software names if(X.Sz() < 0xB6+(45*15+4+2) || !isWithin(X.U32(0), 0x30000,0x40000) || !X.c("'Tempo'00", 0xB6)) return; if(!isWithin(X.U16(0x2C), 1,0x30) || !isWithin(X.U16(0x2E), 1,0x10)) return; if(!isWithin(X.U16(0x30), 0x10,0x50) || !isWithin(X.U16(0x32), 0x20,0x50)) return; if(!isWithin(X.U8(0x34), 0,1) || (mode=X.U8(0x35)) > 1) return; bpm0 = X.F16(0xC5); q = true; ch = voices = X.U8(0x35)? 9: 11; ev = X.U16(0xC7); for(i=mclk=0,p=0x36; i < 45; i++,p+=2) { if(i < 11) { if(!X.U16(p)) ch--; mclk = Math.max(mclk, X.U16(p)) } } for(i=0x36; i < 0x4C && q; i += 2) if(X.U16(i) > 0x10FF) q = false; for(; i < 0x90 && q; i += 2) if(X.U16(i) > 0x1FF) q = false; if(!q) return; p = 0xCB+X.U16(0xC9)*6; //skip tempo events mtln = mdur = notev = insev = volev = pitev = 0; for(i=0; i < voices; i++) { p += 0xF; dur = 0; tln = X.U16(p); p += 2; if(tln) do { dur += X.U16(p+2); p += 4; notev++ } while (dur < tln && p < X.Sz()); //load note events if(tln > mtln) mtln = tln; if(dur > mdur) mdur = dur; p += 0xF; insev += (t=X.U16(p)); p += 2+14*t+0xF; //skip ins.events volev += (t=X.U16(p)); p += 2+6*t+0xF; //skip vol.events pitev += (t=X.U16(p)); p += 2+6*t; //skip pitch events } sz = p; return true; } if(!bDetected && isROL()) { sName = "Ad Lib's AdLib Visual Composer pianoroll (.ROL)"; bDetected = 1; if(X.isVerbose()) { c = X.SA(4,40); if(c != '\\roll\\default') sOption(c); sOption('ch:'+(ch!=voices?ch+'/':'')+voices+' rhythm:'+X.U16(0x2C)+'/'+X.U16(0x2E) +' bpm0:'+bpm0.toFixed(1)+' len:'+mdur+' notes:'+notev+' ins.ev:'+insev +' ins.ev:'+insev+' vol.ev:'+volev+' pitchev:'+pitev+' sz:'+outSz(sz)) } } function isGYMX() { if(X.Sz() < 0x1AC || !X.c("'GYMX'")) return; for(i=4; i < 0x1A8; i++) if(isWithin(X.U8(i), 1,0xA) || isWithin(X.U8(i),0xE,0x1F)) return; unpsz = X.U32(0x1A8); if(unpsz <= 2) if(parseMDGYM(0x1AC, X.isDeepScan() ? BCParseToEoF : BCParseToReasonable) <= 0) return; return true } if(!bDetected && isGYMX()) { sName = "Sega Genesis/Mega Drive YM2612 chiptune (.GYM)"; bDetected = 1; if(unpsz <= 2) sVersion = sVersion.append('unpacked'); if(X.isVerbose()) { sOptionT(X.SC(0x4,0x20,'CP1252')); sOptionT(X.SC(0x24,0x20,'CP1252'),'for: '); sOptionT(X.SC(0x44,0x20,'CP1252'),'at: '); sOptionT(X.SC(0x64,0x20,'CP1252'),'emu: ') sOptionT(X.SC(0x84,0x20,'CP1252'),'by: '); sOptionT(X.SC(0xA4,0x100,'CP1252')); if(unpsz > 2) sOptionT(X.U32(0x1A8),'unp.sz:') } } function isSoundMaster() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/SoundMaster/Sound%20Master_v1.asm if(!X.c("6000.... 6000.... 6000") || (p=base=a6=X.I16(2,_BE)+2) <= 0 || p%2 || (playp=X.I16(6,_BE)+6) <= 0 || playp%2) return; for(p1 = p+30; p < p1; p += 2) if(X.c("47FA",p-2)) break; if(p >= p1) return; var lea1 = p; t = Math.min(X.Sz(),0x20000); for(; p < t; p += 2) if(X.c("4E75",p-2)) break; if(p >= X.Sz() || p >= t) return; fmt = 'old'; if(X.c("177C0000",p-8)) { fmt = 'new'; p -= 6 } if(!X.c("00BFE001",p-6)) return; p = base; x = 1; d0 = 0; if(X.c("1740",p+6) || X.c("1740",p+4)) { for(; p < X.Sz(); p += 2) if(X.c("47FA",p-2)) break; p += X.I16(p,_BE); a6 = p; } else skipold: do { //a one-time "loop" to have a way to break off if(X.c("3C00",p)) { p = lea1; a3 = a6 = p+X.I16(p,_BE); for(; p < X.Sz(); p += 2) if(X.c("7600",p-2)) break; a3 += X.I16(p-4,_BE)+3; d0 = 7; for(; d0; a3+=3,x++,d0--) { if(!X.U16(a3,_BE) && X.U8(a3+2) == 1) break; } d0 = X.U8(a3-1); break skipold; } else if(X.c("4A00",p+0x28)) { x++; d0 = X.I16(p+0x34,_BE) } for(; p < X.Sz(); p += 2) if(X.c("47FA",p-2)) break; p += X.I16(p,_BE); a6 = p; } while(0); ord = d0; for(p = 0xC; p < X.Sz(); p += 2) if(X.c("1743",p-2)) break; a3 = a6; pos = a6+X.I16(p,_BE); for(p = 0xC; p < X.Sz(); p += 2) if(X.c("5203",p-2)) break; sz = -1; patchable = X.c("177C", p+10); if(patchable) { a2 = base; a3 += X.I16(p+2,_BE); if(!ord) ord = X.U8(a3); if(fmt == 'new') { for(p = base+2; p < X.Sz(); p += 2) if(X.c("41EB",p-2)) break; a3 = a6; a6 += X.I16(p,_BE); a3 += X.I16(p+4,_BE); a6 += X.I32(a3,_BE); smpip = a6; songsz = a6+X.I16(a3-2,_BE); smp = smpsz = 0; for(;a6 < X.Sz();) { d3 = X.I32(a6,_BE); a6 += 4; if(d3 > 0 && (ssz = X.U16(a6,_BE)<<1)) { smp++; d3 += ssz; if(smpsz < d3) smpsz = d3; } a6 += 6; if(a6 >= songsz) break } } else { // old format for(p = base+2; p < X.Sz(); p += 2) if(X.c("3D70",p-2)) break; for(; p < X.Sz(); p += 2) if(X.c("D5F0",p-2)) break; a3 = a6+X.I16(p-4,_BE); a6 += X.I32(a3,_BE); t = a6; a6 += X.U16(p-0x12,_BE); smpip = a6; smp = smpsz = 0; a3 = a6+0x80; for(d1 = 32; d1; d1--) { if(X.U16(a3,_BE) > 1) { smp++; ssz = X.U16(a3,_BE)<<1; d3 = ssz+X.I32(a6,_BE); if(smpsz < d3) smpsz = d3; } a6 += 4; a3 += 2 } songsz = t+X.U16(p-8,_BE); } sz = songsz+smpsz } return true } if(!bDetected && isSoundMaster()) { sName = "Sound Master module (.SM,.SMPRO,.SM3)"; sVersion = fmt; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,'×'); if(patchable) sOption('ord:'+ord+' sz:'+outSz(sz)); //else sOption('unpatchable or precooked'); } } function isTomyTracker() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/TomyTracker/src/Tomy%20Tracker_v2.asm if(X.Sz() < 0x6C0) return; if((sz=X.U32(0,_BE)) > 0x200000 || sz%2) return; if((d2=X.U32(4,_BE)) > sz || d2%2) return; d2 -= 0x2C0; if(d2 & 0x3FF) return; ptn = d2 >>= 10; d2--; p = 0x1BC; if(X.U8(p)) return; ord = d1 = X.I8(p+1); if(ord < 0) return; p += 4; d2 <<= 10; d3 = 0; for(; d1; p+=2,d1--) { if((t=X.I16(p,_BE)) & 0x3FF) return; if(d3 < t) d3 = t } if(d2 != d3) return; for(smp = 0, p = 14; p < 0x1C0; p += 0xE) if(X.U16(p,_BE)) smp++; return true } if(!bDetected && isTomyTracker()) { sName = "Tom Pakarinen's Tomy Tracker module (.SG)"; bDetected = 1; if(X.isVerbose()) { sOption('ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } } function isSoundcontrol() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/Soundcontrol/src/Soundcontrol_v3.asm if(!X.c("0003",0x20)) if(!X.c("0002",0x20) || X.U32(0x1C,_BE)) return; if(X.U16(0x10,_BE)) return; if((p = X.I16(0x12,_BE)) < 0 || p % 2) return; if(!X.c("FFFF0000 0400",p+0x3E)) return; title = X.readBytes(0,0x10); if(charStat(title,1).indexOf('allasc') < 0) return; title = decEncoding(title,"CP437"); a2 = 0; a3 = sz = 0x40+X.U32(0x10,_BE); d2 = X.U32(0x14,_BE); sz += d2; a4 = sz; d1 = X.U32(0x18,_BE); sz += d1+X.U32(0x1C,_BE); d2 -= 0x400; if (X.Sz() < sz) return; ord = d1 = Util.divu64(d1,12); d1--; voc = 0; for(d3 = 6; d3; d3--,a4 += 2) for(p = a4,d4 = ord; d4; d4--,p += 12) if(X.U16(p,_BE)) { voc++; break } a3 += 0x43C; smp = d3 = 0; while(d2 > d3) { d4 = X.U32(a3,_BE); a3 += d4; d3 += d4; smp++ } x = 1; nv = 0; sv = ''; if(X.U32(0x1C,_BE)) //crude fixes, go switch(sz) { case 95960: x = 2; //hndongame2; fallthrough case 54544: sv = 'v4.0'; break; //hndtitle case 81906: sv = 'v5.0'; break //hndintro } else switch(sz) { case 126446: x = 3; sv = 'v3.0'; break; //number9 case 136612: x = 2; sv = 'v3.0'; break; //domination 1 case 154704: x = 2; //dynatsong; fallthrough case 103808: sv = 'v3.2'; break; //eleven6 } for(p = 0x40, ptn = 0; p < 0x240; p += 2) if(X.U16(p,_BE)) ptn++; return true } if(!bDetected && isSoundcontrol()) { sName = "Holger Gehrmann's Soundcontrol module (.SCT)"; sVersion = sv; bDetected = 1; if(X.isVerbose()) { sOptionT(title); if(x > 1) sOption(x,'×'); sOption('ch:'+voc+' ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } } function isSoundfactory() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/Soundfactory/src/Soundfactory_v2.asm if((sz=X.U32(0,_BE)) > 0x200000 || sz > X.Sz()) return; x = 16; lastfound = false; for(p=0x13; p >= 4; p--) { if((t=X.U8(p)) > 0xF) return; if(!lastfound && t) {x = p-4; lastfound = true } } m = X.U32(0x14,_BE); for(p = 0x18; p < 0x114; p+=4) { if((t=X.U32(p,_BE)) > 0x200000 || t > sz) return false; if(m > t) m = t } if(m != 0x114) return; if(X.isDeepScan()) { p = 0x114; smp = smpsz = 0; for(;p < sz-8;) { //seek 84h at an even offset do { q = X.fSig(p,sz-8-p,"84"); if(q < 0) { p = sz; continue} else p = q+(q%2) } while(p < sz && !q%2); //_log("found "+Hex(q)) if(p < sz && (d1=X.U8(p+1)) <= 0x1F) { d1 >>= 2; smpp[d1] = p; d4 = X.U16(p+2,_BE)<<1; smpsz += d4-38; smp++; p += d4 } else p += 2; } if(!smp || smp > 32) return; } return true } if(!bDetected && isSoundfactory()) { sName = "Soundfactory module (.PSF)"; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption((X.isDeepScan()?'smp:'+smp+' smpsz:'+Hex(smpsz)+' ':'')+'sz:'+outSz(sz)) } } function isBeniTracker() { //from https://modland.com/pub/software/trackers/DOS/Beni%20Tracker/Beni%20Tracker%20v1.8.rar / BT18.BAS -> SUB loadmod //ref BT18.DOC & https://modland.com/pub/software/trackers/DOS/Beni%20Tracker/Beni%20Tracker%20v1.3.rar / BeniTrk.doc ord = X.U8(0); ptn = X.U8(1); ins = X.U8(2); if(!ptn || ptn > 0xCC || ins > 0x1F) return; var ptnmap = [], insmap = []; p = 3; mptn = mins = 0; for(i=0; i < ptn; i++) { if((t = X.U8(p++)) > 0xCB) return; if(mptn < t) mptn = t; if(ptnmap.indexOf(t) < 0) ptnmap.push(t) } if(ins) { for(i=0; i < ins; i++) { if(!isWithin(t = X.U8(p++),1,0x1F)) return; if(mins < t) mins = t; if(insmap.indexOf(t) < 0) insmap.push(t) } } rptn = ptnmap.length; rins = insmap.length; mptn++; if(rptn != ptn || (ins && rins != ins)) return; for(o = 0; o < ord; o++) for(i=0; i < 9; i++) if(ptnmap.indexOf(X.U8(p++)) < 0) return; notes = 0; for(i=0; i < ptn*0x40; i++,p+=3) { var nt = X.U8(p) >> 4, ns = (X.U8(p) & 1) << 4 | X.U8(p+1) >> 4; if(nt > 12 || ns && insmap.indexOf(ns) < 0) return; if(nt != 12) notes++; } p += ins*0xB; if(X.c("'B.J.'",p)) { p += 4; sv = 'v1.8' } else sv = 'v1.3'; if(sv == 'v1.3' && ptn > 100) return; sz = p; return true; } if(!bDetected && isBeniTracker()) { sName = "SPP's Beni Tracker (Adlib) module (.PIS)"; sVersion = sv; bDetected = 1; if(X.isVerbose()) { sOption('ord:'+ord+' ptn:'+ptn+(ptn!=mptn?'/'+mptn:'')+' ins:'+ins+(ins!=mins?'/'+mins:'') +' notes:'+notes+' sz:'+outSz(sz)) } } function isSteveBarrett() { //ref reversing the eagleplayer and the module's player code for(p=0; p < 0x10; p += 4) if(!X.c("6000",p) || (t=X.U16(p+2,_BE)) > X.Sz() || t%2) return false; t = X.I16(6,_BE)+6; if(!X.c("49FA....1940....4E75 43FA.... 49FA.... 41FA.... 45FA",t) || !X.c("'FORM'66",t+0x1C)) return false; t = X.I16(10,_BE)+10; if(!X.c("49FA....4CFA00FF",t) || !X.c("103A.... 660C 1940.... 6100... .6000",t+10) || !X.c("2A4C DAD8 22CD 2A4C DAD8 22CD 2A4C DAD8 22CD",t+0x34)) return false; t = X.I16(0xE,_BE)+0xE; if(!X.c("70002A7C 00DFF0A8 3A803B40",t) || !X.c("1A801B40 00011B40 00021B40",t+0x1A)) return false; initp = X.I16(2,_BE)+2; if(!X.c("43FA....49FA....41FA....45FA",initp) || !X.c("'FORM'66",initp+0x12)) return false; a0 = 0; for(p = initp; p < initp+0x10; p += 2) //find the sample ptr if(X.c("41FA",p-2)) { a0 = p+X.I16(p,_BE); break } if((p=6+X.fSig(initp,0x1000,"E7404281")) < 6) return false; t = p+X.I16(p,_BE); //possibly orderlist ptr for(; p < X.Sz(); p += 2) if(X.c("41FA",p-2)) break; for(; p < X.Sz(); p += 2) if(X.c("D08043FA",p)) break; p += 4; p += X.I16(p,_BE); x = (p-t)>>3; for(p = a0,smp=0; p < X.Sz(); smp++) { if(!X.c("'FORM'........'8SVXVHDR'",p)) { if(!X.U32(p)) p += 4; break } p += 8+X.U32(p+4,_BE); } sz = p; if(!smp) return false; return true; } if(!bDetected && isSteveBarrett()) { sName = "Steve Barrett's module (.SB)"; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption('smp:'+smp+' sz:'+outSz(sz)) } } function isQuartetPSG() { // ref the eagleplayer RE if(X.Sz() < 0x400 || !X.c("49FA",0x10)) return false; for(p=0; p < 0x10; p += 4) if(!X.c("6000",p) || (t=X.I16(p+2,_BE)) <= 0 || t%2) return false; if(!X.c("48E7FFFE 4DFA.... 51EE.... 41FA",p=2+X.I16(2,_BE))) return false; if(!X.c("48E7FFFE 4DFA.... 4A2E.... 6700.... 70033F00 49FA",p=6+X.I16(6,_BE))) return false; if(!X.c("48E7FFFE 4DFA.... 51EE.... 6100",p=10+X.I16(10,_BE))) return false; for(p = 0x10; p < X.Sz(); p += 2) if(X.c("40C2",p)) break; for(; p < X.Sz(); p += 2) if(X.c("41FA",p)) break; p += 6; sz = p+X.I16(p,_BE); p += 2; for(; p < X.Sz(); p += 2) if(X.c("43E9",p-2)) break; sz += X.I16(p,_BE) << 1; a3 = sz; if(sz > X.Sz()) return false; for(a0 = 0; p < X.Sz(); p += 2) { if(X.c("206C0032",p)) { a0 += 8; p += 4 } if(X.c("08380007",p) || X.c("08390007",p)) break } for(; p < sz; p += 2) if(X.c("40C1",p)) break; for(p += 4; p < X.Sz(); p += 2) if(X.c("4CDF",p)) break; for(; p < sz; p += 2) if(X.I32(p,_BE) == 0x56) break; for(x = 0; p < a3; p += 2) if(X.I16(p,_BE) == 0x46) x++; x >>= 2; return true } if(!bDetected && isQuartetPSG()) { sName = "Illusions/Microdeal Quartet module (SQT.)"; sVersion = "PSG synth"; bDetected = 1; if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption(outSz(sz),'sz:') } } function isSonicArranger() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/Sonic_Arranger/Sonic Arranger_v1.asm p = modp = smp = synsmp = ord = ptn = 0; x = 1; sv = bad = ''; owner = []; if(X.c("'SOARV1.0STBL'")) { x = X.I32(0xC,_BE); spd0 = X.U8(0x11); ptnlen0 = X.U8(0x13); pst0 = X.U16(0x14,_BE); ped0 = X.U16(0x16,_BE); lp0 = X.U16(0x18,_BE); irqps0 = X.U16(0x1A,_BE); if(!isWithin(spd0,2,16) || !isWithin(irqps0,16,120) || pst0 > ped0 || lp0 > ped0) return false; p = 0x10+x*12; if(!X.c("'OVTB'",p)) return false; //"OverTable" ord = X.I32(p+4,_BE); if(ped0 > ord) return false; p += 0x18+(ord << 4); if(!X.c("'NTBL'",p-0x10)) return false; ntbl = X.I32(p-0xC,_BE); p += ntbl << 2; if(!X.c("'INST'",p-8)) return false; ptn = Util.divu64(ntbl,0x10); ins = X.I32(p-4,_BE); inss = []; for(i=0; i < ins; i++,p+=0x98) { if(X.U16(p,_BE)) synsmp++; else smp++; t = X.readBytes(p+0x7A,0x1E,true); t = decEncoding(t,CPAmiga).trim(); if(t != '') inss.push(t) } var sc; if(!X.c("'SD8B'",p)) return false; smp = X.I32(p+4,_BE); sc = smp; p += 8+smp*0x26; pp = p; p += smp << 2; for(; sc-- && p < X.Sz(); pp += 4) p += X.U32(pp,_BE); if(!X.c("'SYWT'",p)) return false; synsmp = X.I32(p+4,_BE); p += 8+(synsmp << 7); if(!X.c("'SYAR'",p)) return false; t = X.I32(p+4,_BE); p += 8+(t << 7); if(!X.c("'SYAF'",p)) return false; t = X.I32(p+4,_BE); p += 8+(t << 7); if(!X.c("'EDAT'",p)) return false; sz = p+24; sv = 'song'; } else { if(X.c("4EFA")) { //detect & skip replay if((t=X.I16(2,_BE)) <= 0 || t%2) return false; if(!X.c("48E7FFFE 41FA",t+2) || !X.c("201045F0 0800228A 43FA",t+0xE) || !X.c("20280004 45F00800 228A 43FA",t+0x1A)) return false; if((p=X.I16(t+8,_BE)) <= 0 || p%2) return false; p += t+8; modp = p; sv = '+replayer'; } else sv = 'pure'; if(p+0x28 > X.Sz() || !X.c("00000028",p)) return false; spd0 = X.U16(p+0x28,_BE); irqps0 = X.U16(p+0x32,_BE); lp0 = X.U16(p+0x30,_BE); if(!isWithin(spd0,2,16) || !isWithin(irqps0,16,120)) return false; x = (X.I32(p+4,_BE)-0x28)/12; if(x == 1 || X.I16(p+0x3C,_BE) < 0) x = 1; var ptrs = [0]; for(i=0; i < 8; i++) { t = X.I32(p,_BE); p += 4; if(t <= 0 || t%2 || t < ptrs[ptrs.length-1]) return false; ptrs.push(t) } var ordp = ptrs[2], ptnp = ptrs[3], insp = ptrs[4], a = ptrs[5]; sc = X.I32(modp+t,_BE); //ord recs contain u16 references and a couple control bytes ST and NT ord = Util.div64(ptnp-ordp,0x10); ptn = Util.div64(insp-ptnp,0x40); ins = Util.div64(a-insp,0x98); p = modp+t; if(p > X.Sz()) return false; for(i=0; i < ins; i++) if(X.U16(modp+insp+i*0x98,_BE)) synsmp++; else smp++; if(smp != sc) bad = bad.addIfNone('!inconsistentsmpcnt'+sc); //be cool to understand how that happens... p += 4; if(smp) for(pp=p, p+=sc<<2; sc-- && p < X.Sz(); pp += 4) p += X.U32(pp,_BE); if(!X.c("'deadbeef'",p)) if(X.isHeuristicScan()) bad = bad.addIfNone('!badeof'); else return false; p += 12; sc = p; //skip 'deadbeef '; sc is now for counting the string length // There's no real need to include the "programowner" info into calcsize but let's; // otherwise the eagleplayer thinks the file is "too short", although nobody really cares... for(lim = Math.min(p+0x400,X.Sz()); p < lim;) { c = X.U8(p++)^0xFF; if(c == 0xFF || isWithin(c,0,8) || isWithin(c,11,12) || isWithin(c,14,0x1F)) break; if(c == 0xA) { c = 0x20; if(owner[owner.length-1] == 0x20) continue } owner.push(c) } if(owner[owner.length-1] == 0x20) owner.pop(); sz = p; if(c != 0xFF && p-sc != 0x50) bad = bad.addIfNone('!badinfo'); } bpm0 = (15*irqps0/spd0).toFixed(1); owner = decEncoding(owner,CPAmiga).trim(); return true } if(!bDetected && isSonicArranger()) { sName = "BrainTrace Design's Sonic Arranger module (.SA"+(sv == 'pure'?',.LION':'')+")"; bDetected = 1; sVersion = sv; if(bad != '') sVersion = sVersion.appendS('malformed:'+bad,'/'); if(X.isVerbose()) { if(x > 1) sOption(x,'×'); if(owner != '') sOption(addEllipsis(owner,0xA0,0x80),'info:"','"'); sOption('bpm0:'+bpm0+(ord?' ord:'+ord:'')+(lp0?' lp0:'+lp0:'')+(ptn?' ptn:'+ptn:'')+(ins?' ins:'+ins:'') +(smp?' wf.smp:'+smp:'')+(synsmp?' syn.smp:'+synsmp:'')+' sz:'+outSz(sz)) } } if(!bDetected && X.c("'SASI'00000000000100")) { sName = "BrainTrace Design/MEDIA Verlags Sonic Arranger synth instrument"; bDetected = 1 } function isJT() { if(X.Sz() < 1700) return; for(p = 0; p < 40; p += 2) if(X.c("02390001",p)) break; if(p == 40) return; p += 8; if(!X.c("66..4E75",p++)) return; if((t = X.I8(p++)) <= 0) return; p += t; if(X.c("4A39",p)) for(j=4; j--; p += 0x12) if(!X.c("4A39",p)) return; if(!X.c("78001839",p)) return; for(j = p;;) { p = X.fSig(j,0x40000,"1400E302"); if(p < 0) return; else if(i % 2) { j = p+1; continue } else break } var org = X.U32(p+6,_BE); for(;;) { p = X.fSig(j,0x40000,"03580328"); if(p < 0) return; else if(i % 2) { j = p+1; continue } else break } org -= p; for(p=0; p < 0x40000; p += 2) if(X.c("B23C00FF",p) || X.c("0C0100FF",p)) break; if(p >= 0x40000) return; for(; p < 0x40000; p += 2) if(X.c("267C",p-2)) break; if(p >= 0x40000) return; p += 4; //? for(; p < 0x40000; p += 2) if(X.c("49F9",p-2)) break; if(p >= 0x40000) return; smpip = X.U32(p,_BE)-org; p += 4; for(; p < 0x40000; p += 2) if(X.c("0026267C",p-4)) break; if(p >= 0x40000) return; p += 4; //? for(; p < 0x40000; p += 2) if(X.c("23F4",p)) break; if(p >= 0x40000) return; subsongp = X.U32(p-4,_BE)-org; p += 6; x = 0; for(p=subsongp; p < 0x40000; p += 0x12) { if(X.U8(p+16) != 12) break; t = X.U32(p,_BE); if(X.U32(p+4,_BE) != t || X.U32(p+8,_BE) != t || X.U32(p+12,_BE) != t) x++; else break } j = X.U32(smpip,_BE)-org; i = smpip+4; info = (j-i) >> 2; d0 = X.I32(j+4,_BE); d1 = X.I16(j+2,_BE)*2 + d0; for(smp = 1; i < j; i += 4) { t = X.U32(i,_BE)-org; d3 = X.U32(t+4,_BE); if(!d3) continue; d4 = X.I16(t+2,_BE)*2+d3; if(d3 < d0) d0 = d3; if(d4 > d1) d1 = d4; smp++ } songsz = d0-org; sz = d1-org; for(i=0; i < 0x40000; i+=2) if(X.c("4E75",i-2)) break; specialmsg = ''; //I've no modules to test this on if((d1=X.U8(i-3)) != 2) specialmsg = X.SC(i,0x100,CPAmiga); return true; } if(!bDetected && isJT()) { sName = "Jeroen 'WAVE' Tel's module (.JT)"; bDetected = 1; if(X.isVerbose()) { if(specialmsg != '') sOption(specialmsg); if(x > 1) sOption(x,'×'); sOption('smp:'+smp+' songsz:'+Hex(songsz)+' sz:'+outSz(sz)) } } function isTCBTracker() { //ref ftp://ftp.scene.org/pub/resources/gotpapers/manuals/tcb_tracker_1.0_manual_1990.pdf if(X.Sz() <= 0x132 || !X.c("'AN COOL'") || (ptn = X.U32(8,_BE)) > 127 || (tmp0 = X.U8(0xC)) > 15 || X.U8(0xD) || (ord = X.I8(0x8E)) <= 0) return; if(X.SA(7,1) == '!') fmt = 0; else if(X.SA(7,1) == '.') fmt = 1; else return; if(!fmt) ptnp = 0x110; else ptnp = 0x132; smpp = ptnp+ptn*0x200; if(smpp+0xD4 > X.Sz()) return; if(!X.c("FFFFFFFF00000000",smpp+0xCC) || X.U32(smpp+0x44,_BE) != 0xD4) return; smp = 0; p = smpp+0x48; for(i=0; i < 16 && p < X.Sz(); i++) if(X.U32(p,_BE) != 1) smp++; sz = smpp+X.U32(smpp,_BE); return true } if(!bDetected && isTCBTracker()) { sName = "Anders 'AN Cool' Nilsson's TCB Tracker module (.TCB)"; sVersion = 'f.'+fmt; bDetected = 1; if(X.isVerbose()) sOption('tempo:'+tmp0+' ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)); } function is669() { //from https://modland.com/pub/documents/format_documentation/Composer%20669,%20Unis%20669%20(.669).txt if(!X.c("'if'") && !X.c("'JN'") || X.Sz() < 0x1F1+0x600) return; //not easy to make the signature more deficient than this one! if((smp=X.U8(0x6E)) > 0x40 || (ptn=X.U8(0x6F)) > 0x80 || (lp=X.U8(0x70)) >= 0x80) return; for(ic=0,i=2; i < 0x6D; i++) if(isWithin(X.U8(i),1,31) && ++ic > 40) return; for(i=ord=0; i < 0x80; i++) { //from 71h: order list; from F1h: ptn tempos; from 171h: ptn breaks if((o=X.U8(0x71+i)) >= ptn && o < 0xFE) return; if(o < 0x80 && !(t=X.U8(0xF1+i))) return; if(t > 15 || X.U8(0x171+i) >= 0x40) return; if(o < 0xFE) ord++; } sz = 0x1F1+smp*0x19+ptn*0x600; if(X.Sz() < sz) return; for(i = rsmp = 0; i < smp; i++) { //smp filename may have custom messages (the lunar forest), but too rarely ssz = X.U32(0x1FE+i*0x19); slps = X.U32(0x202+i*0x19); slpe = X.U32(0x206+i*0x19); if(ssz) rsmp++; else continue; if(ssz > 0x4000000) return; //a sanity check from openmpt if([0xFFFFF,0xF0FFFF,0xFFFFFFFF].indexOf(slps) < 0 && slps > ssz) return; if([0xFFFFF,0xF0FFFF,0xFFFFFFFF].indexOf(slpe) < 0 && (slpe > ssz || slpe < slps)) return; sz += ssz; } return true } if(!bDetected && is669()) { sName = ( X.c("'if'") ? "Renaissance's Composer 669" : "Jason 'JsNO BAR----' Nunn's UNIS 669 Composer" ) + " module (.669)"; bDetected = 1; if(X.isVerbose()) { t = X.SC(0x02,36,'CP850').trim(); //the seemingly most-used encoding for'em t = t.appendS(X.SC(0x26,36,'CP850').trim(),' '); t = t.appendS(X.SC(0x4A,36,'CP850').trim(),' '); sOption(t); sOption('ord:'+ord+(lp?' loop:'+lp:'')+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } } function isBuzzic10() { // doesn't detect empty modules with no sound, as the format's already too sparse if(X.Sz() < 0xAEA8) return; susv = 0; // suspicious values like zero volume ins = X.U32(0x4A00); if(!ins || ins > 128) return; trk = X.U32(0x8E8C); if(!trk || trk > 64) return; //not that many tracks even fit on screen tho', and there's no horizontal scrolling, so it'd be much fewer //however, technically, it does have the format space even to fit 128 tracks. But only 64 names for them. ptn = X.U32(0x8E84); if(!ptn || ptn > 128) return; gvol = X.F32(0x8E94); if(gvol < 0 || gvol > 2) return; gvol = Math.round(gvol*100)+'%'; bpm = X.U8(0x8E98); if(bpm < 10) susv++; start = X.U32(0x8E9C); ord = X.U32(0x8EA0); if(!ord) susv++; if(ord > 127 || start > ord) return; ord++; floop = X.U32(0x8EA4); if(floop > 1) return; for(i = 0; i < ins; i++) { //test instruments p = i*0x94; if(p+0x93 > Math.min(X.Sz(), 0x4A00)) return; var mute = X.U8(p+0x80); if(mute > 1) return; var note = X.I8(p+0x81); if(!note) susv++; if(note < 0 && -note > trk) return; //track link has to call a track var nend = X.I8(p+0x82); if(nend < 0 && -nend > trk) return; var len = X.U8(p+0x83); if(len > 127) return; var vol = X.I8(p+0x84); if(vol < 0 && -vol > trk) return; if(!len) susv++; if(!vol) susv++; var osc = X.U8(p+0x85); if(osc > 3) return; if(osc < 3 && !note) susv++; //only noise doesn't need the note var dtn = X.I8(p+0x86); if(note > 0 && note+dtn <= 0) return; if(dtn < -32 || dtn > 64) susv++; var atk = X.U8(p+0x87), dcy = X.U8(p+0x88), sus = X.U8(p+0x89); if(dcy < atk || sus < dcy || sus > 127 || atk > 127 || sus > 127) return; if(!atk && !dcy && !sus) susv++; var cut = X.I8(p+0x8A); if(cut < 0 && -cut > trk) return; //cutoff mod @ +0x8B var res = X.I8(p+0x8C); if(res < 0 && -res > trk) return; var dly = X.U8(p+0x8D), rep = X.U8(p+0x8E), damp = X.U8(p+0x8F); if(dly > 127 || rep > 127 || damp > 127) return; var lvwrap = X.I8(p+0x90); if(lvwrap < 0 && lvwrap > trk) return; var lvhard = X.I8(p+0x91); if(lvhard < 0 && lvhard > trk) return; var comprlo = X.U8(p+0x92), comprhi = X.U8(p+0x93); if((comprlo > 127 || comprhi > 127) || (!comprhi && comprlo) || (comprhi && comprhi <= comprlo)) return; // they CAN both be 0... } if(susv > ins*3) { if(debug>0)_logIt("data too suspicious"); return } for(i = 0x4A04; i < 0x4E84; i++) if(X.U8(i) > 127) return; // testing patterns for(i = 0x4E84; i < 0x4E84+64*128; i++) //testing tracks... all 64 of'em if(X.U8(i) > ptn) { if(debug>0)_logIt("@"+Hex(i)+": bad ptn"); return } if(!isAllZeroes(0x4E84+64*128,64*128)) return false; // the uneditable tracks would stay as 0, fair enough // there are absolutely no checks made on the text values so there's no meaning in checking those return true } if(!bDetected && X.isDeepScan() && isBuzzic10()) { sName = "Buzzic module (.BUZ)"; sVersion = 'v1.0'; bDetected = 1; sOption('trk:'+trk+' ord:'+ord+(start?' (from '+start+')':'')+' ptn:'+ptn+' ins:'+ins +' bpm:'+bpm+' gvol:'+gvol+' sz:44712') } function isBuzzic11() { //detection only slightly different from the above if(X.Sz() < 0xB0A8) return false; susv = 0; ins = X.U32(0x4C00); if(!ins || ins > 128) return; trk = X.U32(0x908C); if(!trk || trk > 64) return; // this editor has better limits on max tracks ptn = X.U32(0x9084); if(!ptn || ptn > 128) return; gvol = X.F32(0x9094); if(gvol < 0 | gvol > 1.91) return; gvol = Math.round(gvol*100)+'%'; bpm = X.U8(0x9098); if(bpm < 10) susv++; start = X.U32(0x909C); ord = X.U32(0x90A0); if(!ord) susv++; if(ord > 127 || start > ord) return; ord++; floop = X.U32(0x90A4); if(floop > 1) return; for(i = 0; i < ins; i++) { p = i*0x98; if(p+0x97 > Math.min(X.Sz(), 0x4A00)) return; var mute = X.U8(p+0x80); if(mute > 1) return; var note = X.I8(p+0x81); if(!note) susv++; if(note < 0 && -note > trk) return; var nend = X.I8(p+0x82); if(nend < 0 && -nend > trk) return; var len = X.U8(p+0x83); if(len > 127) return; var vol = X.I8(p+0x84); if(vol < 0 && -vol > trk) return; if(!len) susv++; if(!vol) susv++; var osc = X.U8(p+0x85); if(osc > 3) return; if(osc < 3 && !note) susv++; var dtn = X.I8(p+0x86); if(note > 0 && note+dtn <= 0) return; if(dtn < -32 || dtn > 64) susv++; var atk = X.U8(p+0x87), dcy = X.U8(p+0x88), sus = X.U8(p+0x89); if(dcy < atk || sus < dcy || sus > 127 || atk > 127 || sus > 127) return; if(!atk && !dcy && !sus) susv++; var cut = X.I8(p+0x8A); if(cut < 0 && -cut > trk) return; var res = X.I8(p+0x8C); if(res < 0 && -res > trk) return; var dly = X.U8(p+0x8D), rep = X.U8(p+0x8E), damp = X.U8(p+0x8F); if(dly > 127 || rep > 127 || damp > 127) return; var lvwrap = X.I8(p+0x90); if(lvwrap < 0 && lvwrap > trk) return; var lvhard = X.I8(p+0x91); if(lvhard < 0 && lvhard > trk) return; var comprlo = X.U8(p+0x92), comprhi = X.U8(p+0x93); if((comprlo > 127 || comprhi > 127) || (!comprhi && comprlo) || (comprhi && comprhi <= comprlo)) return; var pan = X.I8(p+0x94); if(pan > 118) return; // funny—looks like an input filter typo, ah well var fltfreq = X.I8(p+0x95), fltres = X.I8(p+0x97); //frqmod @ +0x96 if((fltfreq < 0 && -fltfreq > trk) || (fltres < 0 && -fltres > trk)) return; } if(susv > ins*3) { if(debug>0)_logIt("too suspicious"); return } for(i = 0x4C04; i < 0x5084; i++) if(X.U8(i) > 127) return; // testing patterns for(i = 0x5084; i < 0x7084; i++) //testing tracks... orderlists? all 64 of'em if(X.U8(i) > ptn) { if(debug>0)_logIt("@"+Hex(i)); return } if(!isAllZeroes(0x7084,0x2000)) return; return true } if(!bDetected && X.isDeepScan() && isBuzzic11()) { sName = "Buzzic module (.BUZ)"; sVersion = 'v1.1'; bDetected = 1; sOption('trk:'+trk+' ord:'+ord+(start?' (from '+start+')':'')+' ptn:'+ptn+' ins:'+ins +' bpm:'+bpm+' gvol:'+gvol+' sz:45224') } function isMXDRV() { // fmt https://www.vector.co.jp/download/file/dos/art/fh003454.html / DOC/MDXFORM.DOC // ref ditto / SRC/MDX2MUS.ASM // useful links: https://gorry.haun.org/mx/index_e.html function re(p,t) { if(debug>-1)_l2r('mdx',p,t); return false } //detection starts from here if(X.Sz() < 4+2+9*2+9*2) return false; //0d0a1a+00, vd ptr, chn ptrs, f100 f100.... da1 = X.fSig(0,Math.min(0x400,X.Sz()),"0D0A1A"); //the longest title I saw was that long if(da1 < 0) return false; crypt = X.c("00'crypt'",da1-6); sus = crypt? -10: 0; for(i = 0; i < da1; i++) if(X.U8(i) < 0x20 && [0,9,0x1B,0xA,0x1A].indexOf(X.U8(i)) < 0) return false; title = X.SC(0,da1,'SJIS'); p = X.fSig(da1+3,Math.min(15,X.Sz()-da1),"00"); if(p < 0) return false; if(da1+3 != p) pdxfn = X.SC(da1+3,p,'SJIS'); else pdxfn = ""; p++; ofs = p; bad = ''; comp = false; ch = 9; if(X.SA(ofs+4,4) == "LZX "&& (lzxsz = X.U32(ofs+0x12,_BE))) { comp = true; sz = X.fSig(ofs+0x16,TOEOF,"'[ LZX.X ]'0D0A0000")+13; if(sz < 13) bad = bad.addIfNone('!short'); usedch = ch; bpm0 = notes = vdn = 0; //re(ofs,"←ofs, lzxsz = "+lzxsz+" sz="+Hex(sz)); return true; // stop right there because omg no } if(crypt) vd = -1; else { vd = X.U16(ofs,_BE)+ofs; if(vd > X.Sz()) { vd = -1; sus++ } //the bytes before voicedata (OPM voices, instruments) will be the F1 command (stop playback), //UNLESS, for example, you're Dig Dug2/dd2-10.mdx which is 84k long and the ins ptr just can't reach there //It still plays, so we have to accept this mockery, but we're holding a grudge... if(X.U8(vd-2) != 0xF1 && X.U8(vd-3) != 0xF1) { vd = -1; sus++ } //re(vd,'vd') p += 2; } if(!X.c("0014",p) && !X.c("0022",p)) return false; m = Math.min(0xFFFFF,X.Sz()-2); //dd2-10.mdx is larger than it'd be allowed but still plays if(crypt) { sz = X.fSig(ofs+20,m,"'protected by cryptmdx v1.00 (c)1995 H.Yano'00")+0x2B; usedch = ch; bpm0 = 0; return true } var chn0 = chn = oldchn = X.U16(p,_BE)+ofs; //we begin with mml data 0 ptr, stored as offset from post-info point if(!isWithin(chn,p,m)) return re(chn,'!chn'+Hex(p)+'-'+Hex(m)); // it shouldn't point at EoF-ish nor to 0 or 1 ch = (chn-ofs-2)/2; //0x14 or 0x22, ie. either 9 or 16 usedch = [0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0]; notes = vdn = mp = 0; vds = []; bpm0 = -1; var q = -1, lp = [], v = [0,1]; // v is for registering the presence of expected commands across the file; all must be 1 if(X.isDeepScan()) { visited = []; for(i=0; i < m; i++) visited[i] = 0 } // to keep looping in check for(k=1; k <= ch; k++) { //check the rest of channels p += 2; //re(p,'--= Parsing ch'+k+'/'+ch+' =--'); if(p > mp) mp = p; if(k == ch) if(isWithin(vd, oldchn+2,X.Sz())) chn = vd; else chn = m; else { chn = X.U16(p,_BE)+ofs; if(!isWithin(chn,oldchn+2,m) || (X.U8(chn-2) != 0xF1 && X.U8(chn-3) != 0xF1)) { //re(chn,'DEBUG2:'+Hex(X.U24(chn-3,_BE))+' ch'+ch); chn = oldchn; usedch[k-1] = false; } if(!isWithin(chn,oldchn+2,m)) { re(chn,'!p='+Hex(p)+',ch['+k+'] not between '+Hex(oldchn+2)+' and '+Hex(m)); sus += 2 } if(X.U8(chn-2) != 0xF1 && X.U8(chn-3) != 0xF1) { bad = bad.addIfNone('!badchnend@'+Hex(chn-2)+'='+Hex(X.U24(chn-3,_BE))); if(!X.isDeepScan()) sus++ } } clk = 0; var cnotes = 0; if(X.isDeepScan()) for(q=oldchn,stop=false; !stop && q != chn && q < m; ) { //_log(''+Hex(q)+' >> '+MDXCmdStr(k-1,q)); // !! the heavy logger of music data here. Much fun, much debug info visited[q] = 1; if(q > mp) mp = q; var c = X.U8(q++); if(c < 0x80) clk += c+1; //rest else if(c <= 0xDF) { cnotes++; notes++; usedch[k-1] = true; clk += X.U8(q++)+1 } //note or sample else switch(c) { //MMLscript case 0xFF: if(bpm0 < 0) bpm0 = X.U8(q); q++; break; //tempo0 (t) case 0xFE: a = X.U8(q); b = X.U8(q+1);//OPM reg set: reg and data if(!isYM2151Reg()) { sus++; bad = bad.addIfNone('!OPMreg@'+Hex(q-2)) } else if(a == 8 && (b&0xC8)) { cnotes++; notes++; usedch[b&7] = true } else if(isWithin(a, 0x60,0x7F)) v[0] = true; q += 2; break; case 0xFD: t = X.U8(q++); if(vds.indexOf(t) < 0) vds.push(t); break; //vd selection (@) case 0xFC: q++; break; //pan case 0xFB: t = X.U8(q++); if(isWithin(t,0x16,0x7F)) { bad = bad.addIfNone('!FB@'+Hex(q-2)+'='+Hex(t)); sus++ } v[0] = 1; break; //volume (v or @v) case 0xFA: case 0xF9: case 0xF7: case 0xEE: case 0xE8: break; //vmin, vmax, let ring, PCM8wide, syncwait, useful4Ach-head case 0xF8: t = X.U8(q++); if(!t/* || isWithin(t,9,0x7f)*/) { bad = bad.addIfNone('!F8@'+Hex(q-1)); sus++ } break; //snd len (q or @q) case 0xF6: if(X.U8(q+1)) q++; else q += 2; break; //repeat start: num, 00 (apparently not always present) case 0xF5: if(X.U8(q+X.I16(q,_BE)-1) != 0xF6) { bad = bad.addIfNone('!F5→F6@'+Hex(q)); sus++ } q += 2; break; //repeat end: ofs to repstart+2 case 0xF4: if(X.U8(q+X.I16(q,_BE)+1) != 0xF5) { bad = bad.addIfNone('!F4→F5@'+Hex(q)); sus++ } q += 2; break; //repeat stop: ofs to repend+1 case 0xF3: q += 2; break; //detune (D) case 0xF2: q += 2; break; //portamento (_) case 0xF1: //endplay (optionally loopptr) //we'll stop here, ignoring possible unused music data that may follow past it, //because some files, like dd2-00.mdx, use the space BETWEEN channels to store unrelated data... if(X.U8(q)) { lp[k] = q+2+X.I16(q,_BE); //normally, the loop is the channel's end but dd1-*.mdx are using F1 like jmp $+... //if(!isWithin(lp[k],oldchn,chn)) { if(!isWithin(lp[k],chn0,m)) { bad = bad.addIfNone('!loopOOB@'+Hex(q-1)); sus++ } if(visited[lp[k]]) { stop = true; q += 2 } else q = lp[k]; } else q++; if(vd > 0 && vd < q) vd = q; break; case 0xF0: q++; break; // key-on delay (k) case 0xEF: q++; break; //send sync to channel # case 0xED: q++; break; //ADPCM/noisewave#, H or P(f command) case 0xEC: case 0xEB: case 0xEA: t = X.U8(q++); //LFO ctl for 音程, 音量. OPMLFO ctl if(t != 0x80 && t != 0x81) q += 4; break; case 0xE9: q++; break; //LFO delay (MD) case 0xE7: if(X.U8(q) != 1) { bad = bad.addIfNone('!E7@'+Hex(q-1)); sus++ } q += 2; break //fadeout: 01, spd ($FO) default: stop = true; bad = bad.addIfNone('!unk'+Hex(c)); sus++ //unknown commands do stop-play } if(q > mp) mp = q; } // /if isDeepScan scan the channel if(cnotes) usedch[k-1] = true; //re(oldchn,'ch'+(k-1)+' stopped @'+Hex(q)+', has '+Hex(chn-oldchn)+' data ...'+Hex(X.U24(chn-3,_BE))+']') //re(q,'ch'+(k-1)+' v:'+v.join('')+' clk:'+clk+' ... cmd:'+Hex(c)) oldchn = chn; if(sus > 8) return re(mp,sus+' '+bad); } // /for k=1; k<=ch if(X.isDeepScan() && v[0] != '1') { bad = bad.addIfNone('!novol'); sus++ } if(sus > 8) return re(mp,sus+' '+bad); if(vd > 0 && vd < chn) { bad = bad.addIfNone('!ins@'+Hex(vd)+' 0 && vd < chn)?chn:(vd > 0)?vd:p; vds.length && p < m; p+=0x1B) { if(!vds.length) break; //found all the instruments we used if(!(X.U8(p+1)&0xC0) && !(X.U8(p+2)&0xF0) //test for empty bytes at FL&CON and slot mask && vdsavl.indexOf(t=X.U8(p)) < 0) //a new instrument found vdsavl.push(t); else break; //test for dupes vds = vds.filter(function(a,b,c){return a!=X.U8(p)}); //remove the matching element from the used vd list if(p > mp) mp = p; } vdsavl.sort(function(a,b){return a-b}); //re(p,'vdfound:'+outArray(vdsavl,16)) if(vds.length) bad += '!missingInst'+outArray(vds,16); sz = mp+27; } sz = X.isDeepScan()? mp: -1; if(vd == X.Sz()) sz = vd; return true; } if(!bDetected && isMXDRV()) { sName = "Konami's X68k Music Data eXtended module (.MDX)"; bDetected = 1; if(pdxfn != "") sVersion = sVersion.appendS('+ '+pdxfn,' '); if(ch > 9) sVersion += "#EX-PCM"; if(comp) sVersion = sVersion.appendS('compressed','/'); if(crypt) sVersion = sVersion.appendS('cryptmdx','/'); if(bad.length) sVersion = sVersion.appendS('malformed'+bad+(sus?'/sus'+sus:''),'/'); if(X.isVerbose()) { sOption(addEllipsis(title),'"','"'); for(ch=0,i=0; i < 16; i++) if(usedch[i]) ch++; if(!crypt) sOption('ch:'+ch+' bpm0:'+(bpm0 < 0?'default':bpm0) +(notes? ' notes:'+notes: '')+(vdn? ' ins:'+vdn: '')+(sz > 0? ' sz:'+outSz(sz): '')); else sOption('sz:'+outSz(sz)) } } function isFredF() { //ref https://github.com/neumatho/NostalgicPlayer/blob/main/Source/Agents/Players/Fred/FredWorker.cs var p = modp = ofsdiff = 0; bad = ''; function _check0() { if(X.Sz() < 0xB0E) return false; if(!X.c("4EFA....4EFA....4EFA....4EFA")) return false; p = X.I16(2,_BE)+2; if(p <= 0x10 || p%2) return false; // The init routine just has 2 variants it seems, the second I only found in furball*.fred. // Maybe out in the wild there are more but: if(!X.c("123A.... B0016200 007E47FA 08761680 45FA0873 49FA086E D5C01892 E7887E03 7C0041FA 08D8",p) && !X.c("42380001 123A.... B0016200 007E47FA 08B61680 45FA08B3 49FA08AE D5C01892 E7887E03 7C0041FA 0918",p)) return false; // and this is as-is from NP. Not sure why this specific way of looking for it for(i=0; i < 4; i++) if(X.c("123A....B001",p+i*2)) { modp = p+i*2+1+X.I16(p+i*2+2,_BE); break } if(i == 4 || modp > X.Sz()) return false; for(; i < 60; i++) if(X.c("47FA....D7FA",p+i*2)) { ofsdiff = p+(i+1)*2+X.I16(p+i*2+2,_BE); return true } return false } if(!_check0()) return false; p = modp+1; x = X.U8(p++)+1; if(x > 10) return false; spd0 = X.U8(p++); spds = []; for(i=0; i < 10; i++) { t = X.U8(p++); if(spds.indexOf(t) < 0) spds.push(t) } p++; var insp = ofsdiff+X.U32(p,_BE), trkp = ofsdiff+X.U32(p+4,_BE), ptnsz = Math.abs(insp-trkp); // subsong start pos per voice init and read var stpt = [], ordt = [], trkt = [], trks = []; for(i=0,ord=[],p+=0x26C/*replay data*/; i < x; i++) { stpt[i] = [0,0,0,0]; ord[i] = 0 } //_l2r('frf',p,'starts') for(i=0; i < x; i++) for(j=0; j < 4 && p < X.Sz(); j++,p+=2) stpt[i][j] = (X.U16(p,_BE) - x*8) >> 1; //_l2r('frf',p,' -> '+outArray(stpt,16)) if(p > X.Sz()) return false; ordp = p; for(otsz=(Math.min(insp,trkp)-p)>>1,i=0; i < otsz; i++,p+=2) ordt.push(X.I16(p,_BE)); trksz = Math.abs(insp-trkp); for(i=tr=0; i < trksz; tr++) { // for checking ofs in the orderlist for(si=i; X.U8(p+(i++)) != 0x80 && i != trksz && p+i < X.Sz();){} if(i == trksz && X.U8(p+i-1) != 0x80) break; trkt[si] = tr } for(i=0; i < x && p < X.Sz(); i++) { for(j=0; j < 4 && p < X.Sz(); j++) { for(on=true,c=stpt[i][j]; c - stpt[i][j] < 0xFF && ordt[c] >= 0; c++) if(typeof trkt[ordt[c]] == 'undefined') return false; } } for(syn=smp=0,msmpp=0x7fffffff,Msmpp=smpe=0,p=insp;;) { var smpp = X.U32(p,_BE), tsyn = X.I16(p+4,_BE), ssz = X.U16(p+6,_BE) << 1; var tins = X.U8(p+0x27); if(p+0x28 >= X.Sz() || p+0x3F >= msmpp) break; if(tins != 0xFF) if(smpp) { smpp += ofsdiff; if(smpp > X.Sz()) break; if(smpp < msmpp) msmpp = smpp; if(smpp > Msmpp && smpp < X.Sz()) { Msmpp = smpp; smpe = smpp+ssz } smp++ } else { if(tsyn === -779) /* giants-1.fred fix*/ break; if(tsyn != -1 && tins != 0) return false; syn++ } p += 0x40; } if(smp) sz = smpe; else sz = p; return true } if(!bDetected && isFredF()) { sName = "Fred & Julien Clermonte's Fred Editor module (.FRED,.FRD)"; sVersion = 'final'; bDetected = 1; if(bad != '') sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption('tempo:'+spds.sort().join('-')+(smp?' smp:'+smp:'')+(syn?' syn:'+syn:'')+' sz:'+outSz(sz)) } } function isDSMIAMF() { // ref https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_amf.cpp if(!X.c("'AMF'")) return false; var v = X.U8(3); if(v != 1 && !isWithin(v, 8, 0xE)) return false; if(v < 9) p = 4; else p = 0x24; smp = X.U8(p); ord = X.U8(p+1); trk = X.U16(p+2); ch = v >= 9? X.U8(p+4): 16; if(!smp || !ord || !trk) return false; if(v >= 9) p += 5; else p += 4; if(v < 12 && !isWithin(ch,1,16)) return false; if(!isWithin(ch,1,32)) return false; var rc = v >= 11? (v >= 12? 32: 16): v >= 9? 16: 0; p += rc; if(v >= 13) { tmp0 = X.U8(p++); if(tmp0 < 32) tmp0 = 125; spd0 = X.U8(p++) } else { tmp0 = 125; spd0 = 6 } var ptnsz = 0, psz = [], trkp = p; if(v >= 14) trkp += 2; for(i=0; i < ord; i++) { if(v >= 14) { psz[ord] = X.U16(p); ptnsz += X.U16(p); p += 2 } p += ch*2 } var truncshd = false; if(v == 10) { var s = p; for(i=0; i < smp; i++) { if(s+65 < X.Sz()) if(X.U8(s) > 1 || X.U32(s+46) > smp || (ssz=X.U32(s+50)) > 0x100000 || X.U8(s+56) > 0x40 || X.U32(s+57) > ssz || X.U32(s+61) > ssz) { truncshd = true; break } else s += 65; } } smps = []; var smpsz = 0; rsmp = 0; for(i=0; i < smp; i++) { t = X.SC(p+1,0x20,'CP437').trim(); if(t.length) smps.push(t); if(v < 10) { smpsz += (t=X.U16(p+50)); if(t) rsmp++; p += 59 } else { smpsz += (t=X.U32(p+50)); if(t) rsmp++; p += (truncshd? 59: 65) } } trkc = 0; for(i=0; i < trk; i++) { t = X.U16(p); p += 2; if(t > trkc) trkc = t } for(i=0; i < trkc; i++) { t = X.U16(p); p += 3; if(t) p += t*3+ (v==1? 3: 0) } sz = p+smpsz; return true } if(!bDetected && isDSMIAMF()) { sName = "Digital Sound and Music Interface Advanced Music Format module (.AMF)"; sVersion = "v"+X.U8(3); bDetected = 1; if(X.isVerbose()) { sOptionT(X.SC(4,32,'CP437')); sOption(addEllipsis(smps.join(' '),0xA0),'smp/msg:"','"'); sOption('ch:'+ch+' spd0:'+spd0+' tmp0:'+tmp0+' ord:'+ord+' trk:'+(trkc != trk?trkc+'/':'')+trk +' smp:'+(rsmp==smp?'':rsmp+'/')+smp+' sz:'+outSz(sz)) } } function isSAdT() { //the signature's good enough but there also are sanity checks //ref https://github.com/adplug/adplug/blob/master/src/sa2.cpp if(!X.c("'SAdT'") || !isWithin(nV=X.U8(4),1,9)) return false; const hasArpList = 0x80, hasV7Ptn = 0x40, hasActCh = 0x20, hasTrkOrd = 0x10, hasArp = 8, hasOldBPM = 4, hasOldPtn = 2, hasUnk127 = 1; var notedis=0, fl; switch(nV) { case 1: notedis = 0x18; fl = hasUnk127 | hasOldPtn | hasOldBPM; break; case 2: notedis = 0x18; fl = hasOldPtn | hasOldBPM; break; case 3: notedis = 0xC; fl = hasOldPtn | hasOldBPM; break; case 4: notedis = 0xC; fl = hasArp | hasOldPtn | hasOldBPM; break; case 5: notedis = 0xC; //fallthru case 6: fl = hasArp | hasArpList | hasOldPtn | hasOldBPM; break; case 7: fl = hasArp | hasArpList | hasV7Ptn; break; case 8: fl = hasArp | hasArpList | hasTrkOrd; break; case 9: fl = hasArp | hasArpList | hasTrkOrd | hasActCh } p = 5 + 31*(fl & hasArp? 15: 11); for(i=0,inst=[]; i < 29; i++) { if((t=X.SC(p+1,X.U8(p),'CP437').trim()) != '') inst.push(t); p += 0x11 } p += 3; var orderlist = X.readBytes(p,128); p += 128; if(fl & hasUnk127) p += 0x7F; if(!isWithin(ptn=X.U16(p),1,64)) return false; p += 2; if(!isWithin(ord=X.U8(p++),1,0x80)) return false; for(i=rptn=0; i < ord; i++) if((orderlist[i]+1) > rptn) rptn = orderlist[i]+1; delete orderlist; if(rptn > ptn || (lp=X.U8(p++)) >= ord) return false; bpm = X.U16(p); p += 2; if(fl & hasOldBPM) bpm = bpm*5/2; if(fl & hasArpList) p += 0x200; if(fl & hasTrkOrd) p += 9*0x40; if(fl & hasActCh) { actch = X.U16(p) << 16; p += 2 } else actch = -1; trk = 0; if(fl & hasOldPtn) while(trk < ptn && p < X.Sz()) { p += 64*9*5; trk++ } else if(fl & hasV7Ptn) while(trk < ptn && p < X.Sz()) { p += 64*9*3; trk++ } else while(trk < 64*9 && p < X.Sz()) { p += 64*3; trk++ } sz = p; return true } if(!bDetected && isSAdT()) { if(nV < 8) sName = "Surprise! AdLib Tracker module (.SAT)"; else sName = "Surprise! AdLib Tracker 2 module (.SA2)"; sVersion = "v"+nV; bDetected = 1; if(X.isVerbose()) { sOptionT(addEllipsis(inst.join(" "),0xA0),'ins/msg:"','"'); sOption('bpm:'+bpm+(actch>=0?'ch:'+actch:'') +' ord:'+(lp?lp+'-':'')+ord+' ptn:'+(rptn!=ptn?rptn+'/':'')+ptn+(trk!=ptn?' trk:'+trk:'')+' sz:'+outSz(sz)) } } /*function isTFMX() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/TFMX/src/TFMX_v4.asm if(!X.c("'TFMX'")) return false; if(X.U8(4) !== 0x20) { if(!X.c("'-SONG '",4)) return false; if(!X.c("'by'",10)) if(!X.c("'(Empty) '",0x10) && X.U8(0x10) !== 0x20 && !X.c("'0='",0x10)) return false; } if(X.U32(0x1D0)) { _l2r('tfmx',0x1d0,'dw non-zero'); return false } if(X.c("0E60",14)) return false; if(X.c("0860",14) && !X.c("090C",0x1224)) return false; if(X.c("0920",14) && !X.c("9305",0xF24)) return false; if((a0=X.I32(0x600,_BE)) <= 0 || (a0&1)) return false; if((a1=X.I32(0x7FC,_BE)) <= 0 || (a1&1)) return false; if(a1 > X.Sz()) a1 = X.Sz(); for(; a0 < a1; a0 += 4) if(X.U8(a0) > 0x24) return false; for(i=0, x=1, d5=0x1F; 0x148+i <= X.Sz();) { d2 = X.U16(0x142+i,_BE); d3 = X.U16(0x144+i,_BE); if(d2 == d3 && d3 == X.U16(0x146+i,_BE)) break; d5--; i += 2; x++; if(x == 0x20) break; } if(x != 0x20) for(;d5; i += 2,d5--) if(X.U16(0x142+i,_BE)-X.U16(0x102+i,_BE)) x++; sz = 0x7FC; while(!X.c("07000000",sz) && sz < X.Sz()) sz += 4; bad = ''; if(sz >= X.Sz()) bad = bad.addIfNone('!short'); sz += 4; return true } if(!bDetected && isTFMX()) { sName = "Chris Hülsbeck's The Final Musicsystem eXtended module (MDAT.+SMPL.)"; // sVersion = 'v1.5'; if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { if(x > 1) sOption(x,'×') sOption('sz:'+outSz(sz)) } } function isTFMX_7V() { //from reversing the eagleplayer if(!X.c("'TFMX-SONG '")) return false; if(!(d1=X.U32(0x1D0,_BE))) d1 = 0x800; var found = false; if(X.c("08B0",14)) if(X.c("01F4FF00",0x204)) found = true; if(!found) for(i=0,a1=0x100; !found && i < 0x20; i++) { t = X.U16(a1,_BE); a1 += 2; if(t == 0x1FF) continue; t <<= 4; t += d1; a2 = t; if(t > X.Sz()) return false; for(; !found && a2 < X.Sz(); ) { var effe = X.c("EFFE",a2); a2 += 2; if(effe) { var is3 = X.c("0003",a2); a2 += 2; if(is3) if(X.U16(a2,_BE)) if(X.U8(a2) || !X.U8(a2+3)) { found = true; break } a2 += 12 } } } if(!found) return false return true } if(!bDetected && isTFMX_7V()) { sName = "Chris Hülsbeck's The Final Musicsystem eXtended module (MDAT.,+SMPL.)"; sVersion = '7V' } function isTFMX_ST() { //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/TFMX_ST/TFMX%20ST_v1.asm if(!X.c("'TFMX-SONG '")) return false; if(d1=X.U32(0x1D0,_BE)) if(X.U16(12,_BE)) return false; if(d2=X.U32(0x1D4,_BE)) d1 = X.U32(0x1D8,_BE); else { if((d1=X.I32(0x600,_BE)) <= 0 || (d1&1)) return false; if((d2=X.I32(0x7FC,_BE)) <= 0 || (d2&1)) return false; } d2 = Math.min(d2,X.Sz()); smp = st = 0; for(; d1 < d2; d1 += 4) if(X.U8(d1) == 0x48) smp++; else if(X.U8(d1) > 0x3F) st++; if(!st) return false; sz=-5; // for(i=0, x=1, d5=0x1F; 0x148+i <= X.Sz();) { // d2 = X.U16(0x142+i,_BE); d3 = X.U16(0x144+i,_BE); if(d2 == d3 && d3 == X.U16(0x146+i,_BE)) break; // d5--; i += 2; x++; if(x == 0x20) break; // } // if(x != 0x20) for(;d5; i += 2,d5--) if(X.U16(0x142+i,_BE)-X.U16(0x102+i,_BE)) x++; bad = ''; if(sz >= X.Sz()) bad = bad.addIfNone('!short'); sz += 4; return true } if(!bDetected && isTFMX_ST()) { sName = "Chris Hülsbeck's The Final Musicsystem eXtended module ST module (MDST.+SMPL.)"; if(X.isVerbose()) { sOption('smp:'+smp) } } */ function isTFMX() { //from https://github.com/neumatho/NostalgicPlayer/blob/main/Source/Agents/Players/Tfmx/TfmxWorker.cs / TestModule, Load if(X.Sz() < 0x200) return false; var hdrsz = tp = mdatsz = smplsz = -1, p0 = 0, maxlen = 0x30000; title = album = by = ''; flag5 = -1; tfmxst = false; function isStFile(p0) { var stidx, edidx = X.U32(p0+0x1D4,_BE); if(!edidx) { stidx = X.U32(p0+0x600,_BE); edidx = X.U32(p0+0x7FC,_BE) } else { stidx = X.U32(p0+0x1D8,_BE); stidx = X.U32(p0+stidx,_BE) } var i, buf = X.readBytes(p0+stidx, edidx-stidx); for(i=0; i < buf.length; i+=4) if(isWithin(buf[i],0x40,0x7F)) return true; return false } if(X.c("'TFMX-MOD'")) { // a PC-originating module wrapper format??? hdrsz = p0 = 0x14; sz = X.U32(12,_LE); smplsz = sz-X.U32(8,_LE); mdatsz = X.U32(8,_LE)-8; if(!mdatsz || !isWithin(sz, 0x212, X.Sz())) return false; for(; sz < X.Sz();) { t = X.U8(sz); var tagsz = X.U16(sz+1,_LE); //_l2r('tfmx',sz,'MOD: tag#'+t+' sz:'+tagsz) sz += 3; if(!t && !tagsz) break; switch(t) { case 1: by = X.SC(sz,tagsz,"CP1252"); break; case 2: album = X.SC(sz,tagsz,"CP1252"); break; case 5: flag5 = X.U8(sz); break; case 6: title = X.SC(sz,tagsz,"CP1252"); break; } if(!t) { sz += 17; break } else sz += tagsz } } if(X.c("'TFHD'")) { hdrsz = X.U32(4,_BE); tp = X.U8(8); v = X.U8(9); mdatsz = X.U32(10,_BE); smplsz = X.U32(14,_BE); sz = hdrsz+mdatsz+smplsz; if(hdrsz < 18 || !mdatsz || !isWithin(sz, 0x212, X.Sz())) return false; if((tp&0x80) || !(tp&0x7F)) p0 = p = hdrsz; else switch(tp&0x7F) { case 1: tp = '1.5'; break; case 2: tp = 'pro'; break; case 3: tp = '7v'; break; default: return false } } else if(X.c("'TFMX '",p0) && !X.c("'SONG'",p0+5)) tp = '1.5'; else if(X.c("'TFMX-SONG'",p0) || X.c("'TFMX_SONG'",p0) || X.c("'tfmxsong'",p0)) { //pro or 7v? //check the trackstep (info for sequencing and mastering) var tm = 0, gottms = false, stp = X.readBytes(p0+0x100,31), trksp = X.U32(p0+0x1D0,_BE); if(!trksp) trksp = 0x800; for(i=0; i < 31; i++) { var getNext = true, pos = stp[i]; if(pos == 0x1FF) break; while(getNext && p < X.Sz()) { p = p0+trksp+pos*16; t = X.U16(p,_BE); cmd = X.U16(p+2,_BE); p += 4; if(t != 0xEFFE) getNext = false; else switch(cmd) { case 1: //loop a section if(!tm) { tm = -1; pos++ } else if(tm < 0) { pos = X.U16(p,_BE); tm = X.I16(p+2,_BE)-1; p += 4 } else { tm--; pos = X.U16(p,_BE); p += 2 } break; case 2: case 4: pos++; break; //set tempo + start master vol slide case 3: gottms = true; pos++; break; //start master vol slide too default: getNext = gottms = false } } if(gottms) break } if(isStFile()) return false; else { tfmxst = true; if(gottms) tp = '7v'; else tp = 'pro' } } else return false; for(i=0,p=p0+0x10,cmt=''; i < 6; i++,p += 40) cmt = cmt.appendS(decAnsi(p,40,CPAmiga).trim(),' '); //F0 bytes cmt cmt = cmt.trim(); _l2r('tfmxcmt',p0+0x10,decAnsi(p,40*6,CPAmiga).trim()) var sst = [], sed = [], tmp = []; for(i=0; i < 0x20; i++) { sst.push(X.I16(p,_BE)); p += 2 } for(i=0; i < 0x20; i++) { sed.push(X.I16(p,_BE)); p += 2 } for(i=0; i < 0x20; i++) { tmp.push(X.I16(p,_BE)); p += 2 } p += 0x10; // after the st/ed/tmp reads + 20 it's gonna be +60+80 = +E0 post-cmt var trkp = X.I32(p,_BE), ptnp = X.I32(p+4,_BE), insp = X.I32(p+8,_BE); if(!ptnp) ptnp = 0x200; else ptnp -= 0x200; if(!insp) insp = 0x400; else insp -= 0x200; if(!trkp) trkp = 0x600; else trkp -= 0x200; p += 0x30; if(p > X.Sz()) return false; var datap = p, maxlen = Math.min(maxlen+datap,X.Sz()); ptnp += datap; insp += datap; trkp += datap; if(hdrsz > 0) len = mdatsz; else len = Math.min(maxlen,X.Sz())-p; for(ins=mip=0,p=insp,ino=X.I32(p,_BE); ins < 0x100 && p+4 <= X.Sz(); ins++,p+=4) { t = X.I32(p,_BE)-0x200+datap; if((t & 3) || !isWithin(t,trkp,maxlen) || (t & !X.c("F0000000",t-4) && !X.c("07000000",t-4)) || (ins && Math.abs(t-ino) > 0x2000)) break; // 07000000 is the end-of-data command, // F0000000 is the end pattern command (may happen because data may be mixed. // 2000h is an empirically appropriate max size of a record, should be good enough to deter FPs either way if(mip < t) mip = t; if(ins) ino = t } ptn = Math.min((insp-ptnp)>>2, 128); var lg = X.U32(ptnp,_BE)-0x200+datap; pt = ptn; trkst = (lg - trkp) >> 4; if(trkst < 0) trkst = 0; if(hdrsz < 0) switch(Math.max(insp,ptnp,mip)) { //what's the file ending with? inst.ptr table, ptn.ptr table, instruments? case insp: sz = insp+ins*4; break; case mip: //_l2r('tfmx',mip,'tracing last instrument rec') for(p=mip; p < maxlen; p += 4) if(X.c("07000000",p)) break; sz = p; if(sz < maxlen) sz += 4; break; case ptnp: //need to parse the pattern table to find out where it should end _l2r('tfmx',datap,'p:'+Hex(p)+' ptnp:'+Hex(ptnp)+' insp:'+Hex(insp)+' trkp:'+Hex(trkp)+' trkst['+Hex(ptnp)+'='+Hex(lg)+']:'+Hex(trkst)+' len:'+Hex(len)+'/'+Hex(maxlen)) for(p=ptnp+4,po=X.I32(ptnp,_BE),pt=1; pt < 0x100; p += 4,pt++) { t = X.I32(p,_BE)-0x200+datap; //_l2r('tfmx',p,'ptn['+Hex(pt)+'] ptr:'+Hex(t)+'; '+((t&3)?'X':'O')+(!X.c("F0000000",t-4) && !X.c("07000000",t-4)? 'X':'O')+Hex(Math.abs(t-po)) ) if((t & 3) || !isWithin(t,trkp,maxlen) || (!X.c("F0000000",t-4) && !X.c("07000000",t-4)) || Math.abs(t-po) > 0x2000) break; po = t } sz = p; break } x = -1; var max0s = 2; ord = [0];// there should be at least one, we all hope (empty files exist but who needs those) for(i=0; i < 32 && max0s > 0; i++) { x++; if(!sst[i]) max0s--; if(sst[i] == 0x1FF || sed[i] == 0x1FF) break;if(sst[i] <= trkst) ord[x] = sed[i]-sst[i]+1; if(sst[i] >= trkst) break; if(sst[i] == sed[i] && !sst[i] && !sst[i+1]) break; } if(!x) x = 1; return true } if(!bDetected && isTFMX()) { sName = "Chris Hülsbeck's The Final Musicsystem eXtended module (TFX.,.TFM,MDAT.+SMPL.,MDST.+SMPL.)"; bDetected = 1; switch(tp) { case '1.5': sVersion = 'v1.5'; break; case 'pro': sVersion = 'Professional'; break; case '7v': sVersion = '7 voices' } if(tfmxst) sVersion = 'ST '+sVersion; if(pt < ptn) sVersion += '/malformed!badptn'; if(X.isVerbose()) { sOptionT(title); if(x > 1) sOption(x,'×'); sOption(album,'in: '); sOptionT(by,'by: '); if(flag5 >= 0) sOption(flag5,'flag5:') if(cmt == '(Empty)') cmt = ''; sOption(addEllipsis(cmt,0xA0),'msg:"','"'); sOption('ord:'+ord.join('+')+' ptn:'+ptn+(ptn!=pt? '/'+pt: '')+' ins:'+(ins>0x80? '128/': '')+ins+' sz:'+outSz(sz)) } } function isThePlayer22to41() { //ref prowiz /r/TP22a.c & TP30a.c & TP40.c & TP41a.c if(!X.c("'P22A'") && !X.c("'P30A'") && !X.c("'P40A'") && !X.c("'P40B'") && !X.c("'P41A'")) return false; ptn = X.U8(4); smp = X.U8(6); volofs = (X.SA(1,3) == '41A')? 0x20: 0x22; if(ptn > 0x7F || !smp || smp > 0x1F) return false; for(i=0; i < smp; i++) { if(!isWithin(X.U16(volofs+i*16,_BE),1,0x40)) return false; if(volofs == 0x20 && X.U16(volofs+2+i*16,_BE) % 74) return false; //incorrect finetune in 4.1a } for(i=smpsz=0; i < smp; i++) { ssz = X.U16(24+i*16,_BE) << 1; //_l2r('p2~4',24+i*16,'ssz['+i+'] = '+ssz); if(!ssz || ssz > 0xFFFE || (X.U16(30+i*16,_BE) << 1) > ssz+2) return false; smpsz += ssz } if(smpsz <= 4) return false; if(X.SA(1,1) < '4') ord = (X.U8(5)>>1)-1; else ord = X.U8(5); p = 0x10+smp*0x10; var trkp = X.U32(8,_BE), trktp = X.U32(0xC,_BE), smpp = X.U32(0x10,_BE), memofs = 0; if(p != trktp) { memofs = trktp-p; trkp -= memofs; trktp -= memofs; smpp -= memofs } if(!isWithin(trkp,p,X.Sz()) || !isWithin(trktp,p,X.Sz()) || !isWithin(smpp,p,X.Sz())) return false; for(i=p=0; i < smp; i++) if(volofs == 0x20 && X.U16(volofs+2+i*16,_BE) > 0x456) continue; else if((sp=X.U32(20+i*16,_BE)) > p) { p = sp-memofs; ssz = X.U16(24+i*16,_BE) } sz = 4+smpp+p+(ssz<<1); return true } if(!bDetected && isThePlayer22to41()) { sName = "Jarno 'Guru' Paananen's The Player module (."+X.SA(0,2)+'X,.'+X.SA(0,4)+')'; sVersion = 'v'+X.SA(1,1)+'.'+X.SA(2,2); bDetected = 1; if(X.isVerbose()) { sOption('ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } } function isThePlayer56X() { //from prowiz /r/TP50a.c & TP60a.c & TP61a.c if(X.Sz() < 7) return false; z = sig = X.c("'P50A'") || X.c("'P60A'") || X.c("'P61A'")? 4: 0; smpp = X.U16(z,_BE)+z; ptn = X.U8(z+2); if(!ptn || ptn > 0x7F) return false; smp = X.U8(z+3); if(smp & 0x20) return false; pksmp = smp & 0x40; dtsmp = smp & 0x80; smp &= 0x3F; if(!smp || 7+smp*6 > X.Sz()) return false; if(pksmp) z += 4; if(smpp < z+4+smp*6+ptn*8 || smpp > X.Sz()) return false; smpsz = notes = 0; var unpsmpsz = vols = 0; for(i=0,p=z+4; i < smp; i++,p+=6) { if(isWithin(ssz=X.U16(p,_BE),0x8000,0xFFDF) || !ssz) return false; if(ssz > 0xFFDF && 0xFFFF-ssz > smp) return false; var spk = X.U8(p+2)&0x80, ft = X.U8(p+2)&0x7F; if(ft > 0xF || X.U8(p+3) > 0x40) return false; vols |= X.U8(p+3); if(isWithin(X.U16(p+4,_BE),ssz,0xFFFE)) return false; //lp if(ssz < 0xFF00) { smpsz += ssz << (spk? 0: 1); unpsmpsz += ssz << 1 } } if(!vols || (pksmp && X.U32(z,_BE) != unpsmpsz)) return false; for(i=0; i < ptn*4; i++) if(X.U16(z+4+smp*6,_BE)+4+z+smp*6+ptn*8 > smpp) return false; i = mptn = 0; function _5() { for(; (t=X.U8(z+4+smp*6+ptn*8+i)) != 0xFF && i < 0x80; i++) { if(t%2 || t > ptn*2) return false; if(t > mptn) mptn = t } mptn >>=1; return true } function _6() { for(; (t=X.U8(z+4+smp*6+ptn*8+i)) != 0xFF && i < 0x80; i++) { if(t > ptn-1) return false; if(t > mptn) mptn = t } return true } if(_6()) v = 6; else if(_5()) v = 5; else return false; if(/*z+4+smp*6+ptn*8+i > smpp ||*/ !i || i == 0x80) return false; ord = i; mptn++; function _is5060() { for(i=ord+z+5+smp*6+ptn*8; i < smpp; i++) { if((t=X.U8(i)) & 0x80) i += 3; else { if(t > 0x49 || (((t<<4)&0x10) | (X.U8(i+1)>>4)) > smp) return false; if(t >= 2) notes++; i += 2 } } return (notes > 0) } function _is61() { for(i=ord+z+5+smp*6+ptn*8; i < smpp; i++) { if((t=X.U8(i)) == 0x7F) continue; else if(t == 0xFF) switch(X.U8(i+1) & 0xC0) { case 0: i++; continue; case 0x40: i += 2; continue; case 0xC0: if(i < X.U16(i+2,_BE)-1) return false; i += 3; continue } switch(t & 0xF0) { case 0xF0: if((X.U8(i+1)&0x1F) > smp) return false; i += 2; continue; case 0x70: if((X.U8(i+1)&0x1F) > smp) return false; i += 1; continue; case 0xE0: i += 2; continue; case 0x60: i += 1; continue } if((t & 0x80) == 0x80) { if((((t<<4)&0x10) | (X.U8(i+1)>>4)) > smp) return false; i += 3; continue } if((((t<<4)&0x10) | (X.U8(i+1)>>4)) > smp) return false; i += 2 } return true } if(v == 6) if(_is5060()) sv = '6.0'; else if(_is61()) sv = '6.1'; else return false; else if(_is5060()) sv = '5.0'; return true } if(!bDetected && isThePlayer56X()) { sName = "Jarno 'Guru' Paananen's The Player module (.P"+sv[0]+'X,.P'+sv[0]+sv[2]+'A)'; sVersion = 'v'+sv+'A'; bDetected = 1; if(dtsmp) sVersion = sVersion.appendS('deltasmp','/'); if(pksmp) sVersion = sVersion.appendS('packedsmp','/'); if(X.isVerbose()) { sOption('ord:'+ord+' ptn:'+(mptn!=ptn?mptn+'/':'')+ptn+' smp:'+smp +(notes>0?' notes:'+notes:'')+' sz:'+outSz(smpp+smpsz)) } } function isThomasHermann() { //ref the eagleplayer RE if(X.Sz() < 0x1A90) return false; var ofs = X.I32(0x2E,_BE); if(!isWithin(ofs,2,0x4000000) || ofs % 2) return false; if(X.I32(0,_BE)-ofs != 0x40) return false; p = 4; for(i=0,d4=0x40; i < 4; i++,p+=4) { d4 += 0x400; if(X.I32(p,_BE)-ofs != d4) return false } for(i=0; i < 3; i++,p+=4) { d4 += 0x100; if(X.I32(p,_BE)-ofs != d4) return false } smp = X.U8(0x23); sz = smp-1; smpsz = -1; for(p = 0x44; p < 0x1040; p += 4) if((t=X.U32(p-4,_BE)-ofs) > sz) sz = t; sz += 0x40; if((sz-0x1A90)%3) return false; if(sz == 0x2E10) x = 5; else if(sz == 0x2780) x = 3; else x = 1; ptn = Util.divu64(Util.divu64(sz-0x1A90,3), X.U8(0x29)+1); bad = ''; if(ptn > 0x400) bad = bad.addIfNone('!badptn'); if(smp > 0x1F) bad = bad.addIfNone('!badsmp'); else for(i=0,p=0x14F0; i < smp; i++,p+=0x30) smpsz += X.U16(p,_BE); d1 = 0x100+X.U8(0x21)-X.U8(0x22)+1; d1 *= 2+X.U8(0x2C); d2 = d1; d1 *= X.U16(0x2A,_BE); d3 = Util.divu64(sz == 0x37EE ? 0xAEC80: 0xAD300, X.U8(0x29)+1); d1 = Util.divu64(d1, d3); dur = secondsToTimeStr(d1) return true } if(!bDetected && isThomasHermann()) { sName = "Thomas Hermann's module (.THM+.SMP)"; bDetected = 1; if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { if(x > 1) sOption(x,'×'); sOption('len.'+dur+' ptn:'+ptn+' smp:'+smp+' smpsz:'+smpsz+' sz:'+outSz(sz)) } } function isJaytrax() { //ref https://github.com/pachuco/jaytrax/raw/refs/heads/master/lib_oldjaytrax/jxs.c etc. //ch/ss = 16, ord/ss = 256, rows/ptn = 64, eff/inst = 4, wf/inst = 16, smp/wf = 256, arps/song = steps/arp = 16, //se_ch = _FTsteps = 16, _FX = 18 if(X.Sz() < 26243 || !isWithin(X.U32(0),0xD80,0xD81)) return false; if(!(ptn=X.U32(4)) || !(x=X.U32(8)) || !(ins=X.U32(0xC))) return false; if(!isAllZeroes(0x10,0x24)) return false; //reserved mbpm = 400; Mbpm = ch = smp = 0; ord = []; titles = []; for(s=0,p=0x34; s < x && p < X.Sz(); s++,p+=0x40B4) { // 0x40 bytes padding, 0x10 channel muting for(i=p+0x40; i < p+0x50; i++) if(X.U8(i) > 1) return false; if(!isWithin(bpm=X.U32(p+0x50),10,300)) return false; if(mbpm > bpm) mbpm = bpm; if(Mbpm < bpm) Mbpm = bpm; if(!isWithin(X.U8(p+0x54),0,3)) return false; //groove type if((startpos=X.U32(p+0x58)) > (endpos=X.U32(p+0x60))) return false; if((looppos=X.U32(p+0x68)) > endpos) return false; //_l2r('jxs',X.U32(p+0x6C),' - loopstep, '+Hex(X.U16(p+0x70))+' - songloop') if(!isWithin(t=X.U16(p+0x92),1,16)) return false; if(ch < t) ch = t; if(!isWithin(delay=X.U16(p+0x94),2000,60000)) return false; // delay amts follow, until... if(!isWithin(amp=X.U16(p+0xA6),20,999)) return false; if(X.isDeepScan()) for(o=p+0xB4; o < p+0x40B4; o += 4) // not so necessary but we can do it so... if(X.U16(o) >= ptn || !X.U16(o+2) || (X.U16(o+2) & ~0x78)) return false; //ptnlen constraints t = X.SC(p+0x72,0x20,"CP1250"); if(t !== 'Empty' && t.trim() !== '') titles.push(t.trim()); ord.push(endpos) } p += ptn*64*5; //patterns for(i=0; i < ptn && p < X.Sz(); i++) p += 4+X.U32(p); //pattern names for(i=0; i < ins && p < X.Sz(); i++,p+=0x2208) { //inst recs if([1234,1235].indexOf(X.U16(p)) < 0) return false; //mugi ver // sOption(X.SA(p+2,32)) //inst.name; nobody leaves any messages in them though if(X.U16(p+0x22) > 16 || !isWithin(X.U16(p+0x24),1,0x100)) return false; //wf, wlen. Should be 1~16 and 10~256, but faulty files still play! if(X.U16(p+0x26) > 0xFF || X.U16(p+0x28) > 16 || X.U16(p+0x2A) > 32) return false; //mastervol, am wave/spd if(X.U16(p+0x2E) > 15 || X.U16(p+0x30) > 16 || X.U16(p+0x32) > 64) return false; //ft, fm wave/spd; spd should be <= 32 but kingtut.jxs has 57! if(X.U32(p+0x200)) smp++; if(t=X.U32(p+0x204)) p += t; //smp len } if(p > X.Sz()) return false; p += 0x100; //arp table return true } if(!bDetected && isJaytrax()) { sName = "Reinier 'Rhino' van Vliet's Jaytrax/Syntrax module (.JXS)"; sVersion = 'v.'+X.U32(0); bDetected = 1; if(X.isVerbose()) { if(titles.length > 1) sOption(addEllipsis(titles.join('/'),0xC0),'×'+x+' subsongs:'); else { if(titles.length) sOption(titles[0]); if(x > 1) sOption(x,'×') } if(x > 1) ord = ord.join('+'); else ord = (startpos? startpos+'~': '')+(looppos > startpos? '('+looppos+'-)': '')+endpos; sOption('ch:'+ch+' bpm:'+mbpm+(mbpm!=Mbpm? '-'+Mbpm: '') +' ord:'+ord+' ptn:'+ptn+' ins:'+ins+' smp:'+smp+' sz:'+outSz(p)); } } function isiXalanceUnp() { //ref https://github.com/arnaud-neny/rePlayer/blob/646aeb86f4c0c2e57b38292e88f525680c207004/source/Replays/IXalance/webixs/Module.cpp#L481 if(X.U8(0) != 0x21 || X.U8(9) != 0x80) return false; if(!(ord=X.U16(1)) || !(ins=X.U16(3)) || !(smp=X.U16(5)) || smp > ins || !(ptn=X.U16(7))) return false; if(!isWithin(mvol=X.U8(0xA),1,0x20) || !isWithin(spd=X.U8(0xB),1,0x20) || !isWithin(tmp=X.U8(0xC),0x20,0xA0)) return false; if(charStat(X.readBytes(0xD,0x1A),1).indexOf('allxsc') < 0) return false; for(p=0x27; p < 0x67; p++) if(X.U8(p) > 0x40) return false; for(p=0xA7; p < 0xA7+ord; p++) if(X.U8(p) != 0xFF && X.U8(p) >= ptn) return false; if(X.U8(p-1) != 0xFF) return false; var id; rins = 0; rsmp = 0; bad = ''; //_l2r('ixu',p,'insts') for(i=0; i < ins && p < X.Sz(); i++) if(['I','i'].indexOf(id=X.SA(p++,1)) < 0) return false // the small 'i' is the kb reset? else if(id === 'I') { if(X.U8(p+2) > 0x80) return false; // normally all volumes are up to 40h, but SOME files... p += X.I8(p+5) >= 0? 244: 6; //vol, kb setup for(j=3; j; j--) if(X.U8(p++)) { if(X.U8(p+1) > X.U8(p+2) || X.U8(p+3) > X.U8(p+4)) return false; //lp/sustainlp beginning/end tests p += 5 + X.U8(p)*3; //env node points } rins++ } //_l2r('ixu',p,'smps') for(i=smpsz=0; i < smp && p < X.Sz(); i++) { id = X.SA(p++,1); if(['S','s'].indexOf(id) < 0) return false; // the small 's' is the flags reset if(id == 'S') { if(X.U8(p) > 0x40 || X.U8(p+2) > 0x40) return false; //gvl, volume var fl = X.U8(p+1), ssz = X.I32(p+3), lpb = X.U32(p+7), lpe = X.U32(p+0xB), slpb = X.U32(p+0xE), slpe = X.U32(p+0x13), fn = X.readBytes(p+0x20,13); if(charStat(fn,1).indexOf('allxsc') < 0) return false; fn = decEncoding(fn,CP437); //_l2r('ixu',p,'smp'+i+': ['+ssz+'] ('+lpb+'~'+lpe+') s('+slpb+'~'+slpe+')'+fn) switch(fn) { // broken(?) samples (I guess IT214 compression played a part) case '909OH.WAV': ssz = 3424; break; case '909SD.WAV': ssz = 3413; break; case 'CRASH.WAV': ssz = 16098 } if(lpb > ssz || lpe > ssz || slpb > ssz || slpe > ssz || lpb > lpe || slpb > slpe) return false; smpsz += ssz; p += 0x2D; rsmp++ } } //_l2r('ixu',p,'ptns') for(i=0; i < ptn && p < X.Sz(); i++) { id = X.SA(p++,1); if(['P','p'].indexOf(id) < 0) return false; // the small 'p' is the flags reset if(id == 'P') { var psz = X.U16(p), rows = X.U16(p+2); if(!psz || !rows) return false; p += 4+psz } } j = X.U32(p); p += 4; // In principle, this marks the end of replayable part, but there's more info about SFXI to potentially account for. // In practice, maybe it can be copied from .IT files //_l2r('ixu',p,'input for wfsmp x'+j) for(i=0; i < j && p < X.Sz(); i++,p+=0x10C) { if(charStat(X.readBytes(p,8),1).indexOf('allxsc') < 0) break //_l2r('ixu',p,i+': '+X.SA(p+4,8)) } j = X.U8(p++); //_l2r('ixu',p,'input for synsmp x'+j) return true } if(!bDetected && isiXalanceUnp()) { sName = "Sahara Surfers' iXalance module (.IXS)"; sVersion = 'unpacked'; bDetected = 1; if(bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if(X.isVerbose()) { sOptionT(X.SA(0xD,0x1A,'CP1250')); sOption('ord:'+ord+' ptn:'+ptn+' ins:'+(rins!=ins?rins+'/':'')+ins +' smp:'+(rsmp!=smp?rsmp+'/':'')+smp+' smpsz:'+smpsz+'s sz:'+outSz(p)) } } function isOPX() { var p = 0x7E; if(X.c("200D0A1A",0x7A)) { if(!X.c("0D0A",0x35) || !X.c("0D0A",0x6C)) return; //obligatory line breaks? } else if(!X.c("20202020",0x7A)) //wiped out with spaces! // 2 fringe cases: if(X.c("04C50964c504641A2609810F9919008C82100C830382100CC464C464C464C4641A")) p = 0; // no header else if(X.c("'msx2'00469E2A4E8A22626C2D'bl-demo.bas'00",0xA2F) && X.c("'OPXPLAY SYS'00",0xB2C)) p = 0xC7E; //a bit too much of a header :o else return; if(X.U8(0) != 4) for(i=0; i < 0x35; i++) if(X.U8(i) < 0x20) return; if(X.U8(p+1) > 2 || X.U8(p+3) > 0x3F || X.U8(p+4) > 6 || X.U8(p+6) > 5 || X.U8(p+7) > 0x21 || X.U8(p+8) > 1 || X.U8(p+9) > 0x4F || X.U8(p+10) || X.U8(p+12) > 1 || X.U8(p+14) > 3 || X.U8(p+16) > 3 || X.U8(p+18) > 3) return; return true } if(!bDetected && isOPX()) { sName = "MSX Performer OPX chiptune (.OPX)"; bDetected = 1; if(X.isVerbose()) { sOption(addEllipsis(X.SC(0,0x7B,'SJIS'))) } } // new stable detections :go here ↑ // BELOW THIS POINT ARE THE DETECTIONS THAT ARE IFFIER THAN THE REST // There are sanity-checked formats that nevertheless have some signature in a known place; // those that have some signatures that aren't just "0000" in calculated places; // those that are checked for pure mathematical dependencies and possible byte ranges; // those that are very heavy to that, and those less so. // // Some are in dire need of amending, and they're set to go after the other detections, // so you won't miss the good matches because of these and will hopefully spend less time waiting for detects function isImagesMusicSystem() { //goes before Soundtracker .STK for speed //from https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/ImagesMusicSystem/src/Images Music System_v3.asm //is this a hack of Soundtracker? Vice versa? if(X.Sz() < 0x73C) return false; smpp = X.U32(0x438,_BE); if(smpp <= 0x43C) return false; d1h = (smpp-0x43C) % 0x300; if(d1h) return false; ptn = d2 = Util.div64(smpp-0x43C,0x300); ord = X.U8(0x3B6); if(ord > 127) return false; mptn = 0; for(i = 0; i <= ord; i++) { t = X.U8(0x3B8+i); if(t > 127) return false; if (mptn < t) mptn = t } if(ptn != mptn+1) return false; smp = smpsz = 0; smps = []; bad = ""; smpns = []; for(i = 0; i < 31; i++) { if(X.isVerbose()) smpns.push(X.SC(0x14+i*30,0x16,'CP437').trim()); t = X.U16(0x14+i*30+0x16,_BE); if(t) { smp++; smpsz += t<<1 } } msmp = smpns[smpns.length-1]; sz = smpp+smpsz; if(sz < X.Sz()) bad = bad.addIfNone("!short"); a1 = 0x3B8; d1 = ord; x = a0 = notes = 0; if(X.isVerbose()) { do { //NextPos a0 = 0x43C+X.U8(a1)*0x300; a3 = a0+0x300; a1++; do { //NextPatPos var z = X.readBytes(a0,2), nsmp = ((z[0] & 0xC0) >> 2) | (z[1] >> 4); if(z[0] & 0x3F) { notes++; if(debug && nsmp > msmp) bad = bad.addIfNone("!missingsmp#"+nsmp) } if(z[1] & 0x0F === 0x0B) { x++; break } else a0 += 3 } while(a0 < a3 && a0 < X.Sz()); d1-- } while(d1); if(!x) x = 1; } else x = 1; if(smpp === 28732 && smpsz === 12898 && X.c("'beast-busters1.st'") ) x = 11; return true } if(!bDetected && isImagesMusicSystem()) { //https://www.exotica.org.uk/wiki/Images_(format) sName = "Neil Crossley's Images Music System module (.IMS)"; bDetected = 1; sVersion = "v1.0"; if(bad != "") sVersion = sVersion.appendS("malformed"+bad,"/"); if(X.isVerbose()) { sOption(X.SC(0,20,'CP437')); if(x > 1) sOption(x,"×"); sOption(addEllipsis(smpns.filter(funSampleName).join(","),0x100,0xA0),'smp/msg:"','"'); sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(sz)) } } function isSoundtrackerMOD() { //goes after IMS for speed //ref http://asle.free.fr/prowiz/prowiz.src.zip / r/SoundTracker.c // & https://github.com/OpenMPT/openmpt/blob/master/soundlib/Load_mod.cpp if(X.Sz() < 555) return false; function invalidChars(buf) { var c = 0; for(var i = 0; i < buf.length; i++) { if(buf[i] && (buf[i] < 0x20 || isWithin(0x80,0xFE)) && [0xA,0xD,0xE].indexOf(buf[i]) < 0) c++; } return c } function re(p,t) { if(debug>1)_l2r('stk',p,t); return false } function npTest(n) { const valid = [0, 856,808,762,720,678,640,604,570,538,508,480,453, 428,404,381,360,339,320,302,285,269,254,240,226, 214,202,190,180,170,160,151,143,135,127,120,113]; return valid.indexOf(n) >= 0 || valid.indexOf(n-1) >= 0 || valid.indexOf(n+1) >= 0 } const UST1_00=0,UST1_80=1,ST2_00_Exterminator=2,ST_III=3,ST_IX=4,MST1_00=5,ST2_00=6; var ic = 0, hasDiskNames = true, minV = UST1_00; ic = invalidChars(X.readBytes(0,20)); bad = ""; allsmpsz = allvols = smp = minV = 0; snames = []; for(k=0; k < 15; k++) { var sn = X.readBytes(20+k*30,22,true), sname = decEncoding(sn,CPAmiga).trim(); if(/ST-[0-9A-F]+:/i.test(sname)) ic -= 4; else snames.push(sname); ic += invalidChars(sn); re(20+k*30,"STKsmp["+k+'] "'+sname.trim()+'" invalid chars:'+ic+" ("+charStat(sn,1)+")") if(ic > 10) return re(20+k*30,"!title or sample names too broken"); if(X.U8(20+k*30) && !/^st-[0-9a-f]\d:/i.test(sname)) hasDiskNames = false; slen = X.U16(42+k*30,_BE)*2; if(slen > 0x12000) return re(42+k*30,"!smp #"+k+" too large:"+Hex(slen)); if(X.U8(44+k*30) > 15) { bad = bad.addIfNone("!finetune"); ic+=16 } //finetune svol = X.U8(45+k*30); if(svol > 0x40) return false; sls = X.U16(46+k*30,_BE), sll = X.U16(48+k*30,_BE); if(slen > 9998 || sls > 4999) minV = Math.max(minV,MST1_00); if(slen) smp++; allsmpsz += slen; allvols += svol; //_log("smp["+k+"] <"+X.SA(20+k*30,22)+"> ["+slen+"] @"+Hex(20+k*30)+" -> vol:"+svol+" loopstart:"+sls+" looplen:"+sll); if(sll > slen+2) { re(42+k*30,"!smp "+k+" LpLen "+sll+" > sSz "+slen); bad = bad.addIfNone("!sLpLen>sSz") } if(slen && sls >= slen) { re(46+k*30,"!smp "+k+" LpStart "+sls+" >= sSz "+slen); bad = bad.addIfNone("!sLpStart>=sSz") } if(sls && !sll) { re(42+k*30,"!smp "+k+" LpStart "+sls+" LpSz 0"); bad = bad.addIfNone("!sLpStart0LpSz") } if(sls && !slen) { re(46+k*30,"!smp "+k+" LpStart "+sls+" sSz 0"); bad = bad.addIfNone("!sLpStart0SSz") } } //_log("5:allsmpsz="+allsmpsz+" allvols="+allvols); if(allsmpsz < 8 || !allvols) return re(20,"!smps too small or no smpvols"); ord = X.U8(0x1D6); if(ord > 128) return false; restartp = X.U8(0x1D7); if(restartp > 220) return false; if(!restartp || /jjk55/.test(X.SA(0,6))) restartp = 0x78; bpm0 = 125; if(restartp != 0x78) { bpm0 = (709379*125 / (50*122*(240-restartp))).toFixed(2); //between ≈60 and ≈976 if(minV > UST1_80) minV = Math.max(minV, hasDiskNames?ST_IX:MST1_00); else minV = Math.max(minV, hasDiskNames?UST1_80:ST2_00_Exterminator); } ptn = offptn = badptn = ord_ = 0; usedptns = []; usedsmps = []; for(o=0; o < 128; o++) { x = X.U8(0x1D8+o); if(x > 63) return re(0x1D8+o,"!impossible ptn #"+x); if(ptn <= x) { ptn = x+1; if(o < ord) { offptn = ptn; if(usedptns.indexOf(x) < 0) usedptns.push(x) } } if(x >= badptn) badptn = ptn+1; if(x) ord_++; //a heuristic to count out suspiciously many zeroes } ord_++; //_log("ptn:"+ptn+" off.ptn:"+offptn+" badptn:"+badptn+" used ptns:"+usedptns) songszoffptn = 0x258+0x400*offptn; if(songszoffptn > X.Sz()) return re(songszoffptn,"!patterns cut off"); ic = tnDxx = notes = 0; for(i=0; i < ptn; i++) { emptycmd = nDxx = badnote = ptnic = ptnotes = 0; for(row=0; row < 64; row++) for (chn=0; chn < 4; chn++) { var ofs = 0x258+(i<<10)+(row<<4)+(chn<<2); x = X.readBytes(ofs, 4); if(X.isDeepScan()) { if(!emptycmd && !x[0] && !x[1] && !x[2] && !x[3]) { emptycmd++; if(emptycmd > 32) minV = ST2_00 } else emptycmd = 0 } var smpn = (x[0]&0xF0) | ((x[2]&0xF0) >> 4), np = ((x[0]&0xF) << 8) + x[1], fx = x[2]&0xF; //if(debug>2)_log("@"+Hex(ofs)+" ptn "+i+": "+Hex(x[0])+" "+Hex(x[1])+" "+Hex(x[2])+" "+Hex(x[3])+": smp#"+smpn+" np:"+Hex(np)+" fx:"+Hex(fx)); if(usedptns.indexOf(i) >= 0) if(smpn > 15) { ptnic++; //if(debug>2)_log(" bad smp "+np+" @"+Hex(ofs)+" ptn"+i+" row"+row+" chn"+chn) } else if(usedsmps.indexOf(smpn) < 0) usedsmps.push(smpn); if((X.isDeepScan() || notes < 100) && !npTest(np)) { ptnic += 2; badnote++; //if(debug>2)_log(" bad note "+np+" @"+Hex(ofs)+" ptn"+i+" row"+row+" chn"+chn) } else if(np) ptnotes++; if(X.isDeepScan()) switch(fx) { case 1: case 2: if(x[3] > 0x1F && minV == UST1_80) minV = hasDiskNames ? UST1_80 : UST1_00; else if(fx == 1 && x[3] > 0 && x[3] < 3) minV = Math.max(minV,ST2_00_Exterminator); else if(fx == 1 && (x[3] == 0x37 || x[3] == 0x47) && minV <= ST2_00_Exterminator) minV = hasDiskNames ? UST1_80 : UST1_00; break; case 0xB: minV = ST2_00; break; case 0xC: case 0xD: case 0xE: minV = Math.max(minV,ST2_00_Exterminator); if(fx == 0xD) { emptycmd = 1; if(!x[3] && !row) break; nDxx++ } break; case 0xF: if(minV < ST_III) minV = ST_III; break; } } if(ptn >= offptn && ptnic > 64) ptn = offptn; else { ic += ptnic; notes += ptnotes; if(badnote) bad = bad.addIfNone('!badnotes') } if(ic > Math.max(512,ptn*128)) return re('!badbytes:'+ic); if(nDxx && nDxx < 3) minV = ST2_00; tnDxx += nDxx; } if(tnDxx > ptn+32 && minV == ST2_00) minV = MST1_00; if(X.isDeepScan()) switch(minV) { case UST1_00: tracker = "Karsten Obarski's Ultimate ST 1.0~21"; break; case UST1_80: tracker = "Karsten Obarski's Ultimate ST 1.8~2.0"; break; case ST2_00_Exterminator: tracker = "The Exterminator's ST 2.0 / D.O.C.'s ST II"; break; case ST_III: tracker = "Il Scuro/Defjam's ST III / Alpha Flight ST IV / D.O.C.'s' ST IV / VI"; break; case ST_IX: tracker = "D.O.C.'s' ST IX"; break; case MST1_00: tracker = "Tip/The New Masters' Master ST 1.0"; break; case ST2_00: tracker = "D.O.C.'s ST 2.0~2"; break; default: tracker = "???" } sz = 0x258+0x400*ptn+allsmpsz; var sizediff = Math.abs(sz-X.Sz()), orddiff = Math.abs(ord-ord_); var nzord = ord?ord:0.0001, sus = 0; if(ic > 20) sus++; if(!isWithin(smp,3,15)) sus++; if(sizediff > 2048) sus++; if(sz > X.Sz()) sus++; if(!restartp) sus++; if(!ord || !ord_ || badptn > ptn+2) sus++; if(orddiff/nzord > 0.8) sus++; if(!ptn) sus++; if(notes < 2) sus++; if(allvols < smp) sus++; if(!isWithin(bpm0,20,300)) sus++; //_log("ic="+ic+" smp="+smp+" sizediff="+sizediff+" ord||ptn="+(ord||ord_||ptn)+" maxptn="+(badptn>ptn+2)+" od%="+(orddiff/nzord).toFixed(1)+" notes:"+notes+" bpm0:"+bpm0+" how sus:"+sus) if(sus >= 4) // free strikes // If there are enough bad notes, the samples are kinda few or kinda many, //the size is more than two patterns' lengths different (especially smaller), //either no length or no "official" patterns are there, the orderlist is mostly zeroes, //it's just a couple notes or they're strange periods, the avg volume's too low, and the bpm0's weird... return re(sus,'!too suspicious'); if(ic) bad = bad.addIfNone('!baddata='+ic); if(sz > X.Sz()) bad = bad.addIfNone('!short'); if(sus) bad = bad.addIfNone('!sus+'+sus) return true; } if(!bDetected && isSoundtrackerMOD()) { sName = "Karsten Obarski's SoundTracker module (.STK,.MOD)"; bDetected = 1; if(bad != "") sVersion = 'malformed'+bad; if(X.isVerbose()) { sOptionT(X.SA(0,0x14)); if(X.isDeepScan()) sOption(tracker,"in:"); sOption(snames.filter(funSampleName).join(" "),'smps/msg:"','"'); sOption('bpm0:'+bpm0+' ord:'+ord+(ord_!=ord? '/'+ord_: '')+' ptn:'+(offptn!=ptn? offptn+'/': '')+ptn +' smp:'+smp+(X.isDeepScan()? ' notes:'+notes: '')+' sz:'+outSz(sz)) } } function isComposer670() { spd = X.U8(0); if(!isWithin(spd,1,15)) return false; ord = X.U8(1); if(!ord || ord >= 128) return false; ptn = X.U8(2); if(!ptn) return false; //while 0 is possible, there's no way we'll reliably detect the file then smp = X.U8(3); if(smp > 0x20) return false; opl = X.U8(4); lp = X.U8(5); if(lp > ord) return false; smpp = X.U32(6); if(smpp > X.Sz()) return false; p = 0xA; for(i=0; i < ord; i++) if(X.U8(p++) >= ptn) return false; ptnpt = p; p += ptn*4; for(i=smpsz=0; i < smp; i++,p+=16) { if(X.U32(p)) return false; var _l = X.U32(p+4), _ls = X.U32(p+8), _le = X.U32(p+12); if(!_l || _l > 0xFFFFF) return false; smpsz += _l; if(_le < 0xFFFFF && (_le > _l || _ls > _le)) return false } for(i=0; i < opl; i++,p+=11) { if(X.U8(p) & 0xF0) return false; if(X.U8(p+5) & 0xFC) return false; if(X.U8(p+10) & 0xFC) return false; } for(i=notes=0,ptnp=p,bad=false; i < ptn; i++) { p = ptnp+X.U32(ptnpt+i*4); if(p > smpp-3) return false; if(i >= ptn-1) ptnend = smpp; else ptnend = ptnp+X.U32(ptnpt+i*4+4); if(!isWithin(ptnend - p, 3,0x1000)) return false; for(r = 0; p < ptnend;) { var cmd = X.U8(p++); if(cmd <= 0xC) { p += 2; notes++ } else if(cmd >= 0x20 && cmd <= 0x2C) p++; else if(cmd == 0x40) r += X.U8(p++); else if(cmd == 0x60) break; else return false } if(r > 64) return false } sz = smpsz+smpp; return opl+smp > 0 } if(!bDetected && isComposer670()) { sName = "CDFM/Composer 670 module (.670)"; sVersion = 'compact'; bDetected = 1; if(bad) sVersion = "malformed!badptn"; if(X.isVerbose()) sOption('spd:'+spd+' ord:'+ord+(lp?' lp:'+lp:'')+' ptn:'+ptn+' smp:'+smp+' fm:'+opl+' notes:'+notes+' sz:'+outSz(sz)) } function isLDS() { //ref https://github.com/adplug/adplug/blob/master/src/lds.cpp if(X.Sz() < 136) return false; if((mode = X.U8(0)) > 2) return false; if(X.U8(1) > 0x1F && X.U8(1) != 0xD0) return false; //speed, byte1 if(X.U8(2) < 0x42 || X.U8(2) > 0x43) return false; //speed, byte2 if((tempo = X.U8(3)) < 3 || tempo > 0x1F || ((ptnsz = X.U8(4)) & 0x87)) return false; for(i=5; i < 14; i++) if(X.U8(i) > 4) return false; if((regbd = X.U8(0xE)) > 2) return false; if(!(ins = X.U16(0xF)) || ins > 0x3F) return false; for(p = 0x11; p < 0x11+0x2E*ins; p += 0x2E) { if(X.U8(p+4) > 3 && X.U8(p+4) != 0xE1 || X.U8(p+9) > 4) return false; if(X.U8(p+0xA) > 0x7F || (X.U8(p+0xC) & 0xC0)) return false; if(!isWithin(X.I8(p+0x15), -0x30, 0x30) || !isWithin(X.I8(p+0x17), -0x30, 0x30)) return false; if(!isWithin(X.I8(p+0x1B), -0x30, 0x30) || !isWithin(X.I8(p+0x20), -0x30, 0x30)) return false; if((X.U8(p+0x24) > 0x30) || X.U8(p+0x25) > 1 || !isWithin(X.I8(p+0x27), -4, 0)) return false; if(isInside(X.U8(p+0x2B), 0x30, 0xE8) || X.U16(p+0x2C)) return false; } ord = X.U16(p); if(!ord || ord > 0x60) return false; p += 2; mp = -1; ptnp = p+ord*9*3+2; for(i=0; i < ord; i++) for(j=0; j < 9; j++) { pt = X.U16(p); if(pt%2 || pt+ptnp > X.Sz() || pt > 0x4000) return false; if(mp < pt) mp = pt; p += 3; } digisnd = X.U16(p); p += 2; sz = ptnp+digisnd; //digital sounds value seems to point just beyond the patterns! if(X.Sz() < sz) return false; ptn = Util.divu64(digisnd,2); return true } if(!bDetected && isLDS()) { sName = 'Loudness Sound System Ad Lib module (.LDS)'; bDetected = 1; if(X.isVerbose()) sOption('ch:9 mode:'+mode+' spd:'+X.U16(1)+' tempo:'+tempo +' ord:'+ord+' ptn:'+ptn+' ins:'+ins+' sz:'+outSz(sz)) } function isKSM() { for(i=0; i < 4; i++) if(!isWithin(X.U8(i),0,0x57)) return false; for(; i < 0xB; i++) if(X.U8(i)) return false; for(; i < 0x10; i++) if(X.U8(i) < 0xFB) return false; for(; i < 0x20; i++) if([0xF0,4,6,8,0xC].indexOf(X.U8(i)) < 0) return false; for(c=0; i < 0x25; i++) if(X.U8(i) > 5) return false; else if(!X.U8(i)) c++; if(c > 3) return false; for(; i < 0x2A; i++) if(X.U8(i)) return false; for(; i < 0x30; i++) if(X.U8(i) > 1) return false; for(i=0x40; i < 0x50; i++) if(!isWithin(X.U8(i),0x20,0x3F)) return false; if(!X.c("32323232 323232",0x44)) return false; return true } if(!bDetected && isKSM()) { sName = "Ken Silverman's Adlib module (.KSM)"; bDetected = 1; if(X.isVerbose()) sOption('notes:'+(notes=X.U16(0x50))+' sz:'+outSz(0x52+notes*4)) } function isTMC() { function rt(p,m) { if(debug>1)_l2r('tmc',p,m); return false } //ref http://atariki.krap.pl/index.php/TMC if(X.Sz() < 0x1D0 || X.U8(0x23) != 0x20) return false; //data starts from 1A0+instr.+ptns., obligatory space if((bin = parseAtariBinary())[0] < 0x1D6) return rt('!binsz'); // an Atari binary, of this size if(X.U8(bin[1][0][1]+5) != 0xFF) return rt(0,'!ptnend'+outArray(bin,16)); // last ptn ends with FF if(!isWithin(spd0=X.U8(0x24),1,0x10) || !isWithin(ticks=X.U8(0x25),1,4)) return rt(0x25,'!spd'+spd0+'/'+ticks); for(ins=t0=0,p0=0x10000,p=0x26; p < 0x66; p++) { if(!X.U8(p) && !X.U8(p+0x40)) continue; if([0,9].indexOf(X.U8(p)&0xF) < 0) return rt('!susins'); t = (X.U8(p+0x40) << 8)+X.U8(p)+6-X.U16(2); if(t < 0 || t <= t0) return rt(t,'!-insptr'); t0 = t; if(t > 0) { if(!isWithin(t,0x1A0,bin[1][0][1]+6)) return rt(t,'!insptr'); else ins++; if(p0 > t) p0 = t } } if(!ins) return rt(p0,'!0inst'); if([0,9].indexOf(X.U8(0xA6) & 0xF) < 0) return rt(p0,'!0ptnptr'); //still depends on instrument record length for(ptn=t0=0,p=0xA6; p < 0x126; p++) { t = (X.U8(p+0x80) << 8)+X.U8(p)-X.U16(2)+6; if(p0 > t) p0 = t; if(t < 0 || t <= t0) return rt(t,'!-ptnptr'); t0 = t; if(t && !isWithin(t,0x1A0,bin[1][0][1]+6)) return rt(t,'!ptnptr'); if(t && X.U8(t) != 0xFF) ptn++ } ord = (p0-0x1A6) >> 4; for(p=0x1A7,pt=-1,ic=0; p < p0; p += 2) if(!X.c("FF",p) && !X.c("7F",p)) if(X.U8(p) > 0x7F) ic++; else if(X.U8(p) >= pt) pt = X.U8(p)+1; return true } if(!bDetected && isTMC()) { sName = "Marcin 'Jaskier' Lewandowski's Theta Music Composer module (.TMC,.TM4,.TM8)"; sVersion = 'v1.x'; bDetected = 1; if(ic) sVersion = sVersion.appendS('malformed!'+ic+'ptns','/'); if(X.isVerbose()) { sOption(decAnsi(6,0x1E,CPATASCII,Chars0to1FATASCII_PL)); //Polish is prevalent, so... sOption('spd0:'+spd0+' ticks:'+ticks+' ord:'+ord+' ptn:'+(pt!=ptn?pt+'/':'')+ptn+' ins:'+ins+' sz:'+outSz(bin[0])) } } function isRMT() { function rt(p,m) { if(debug>1)_l2r('rmt',p,m); return false } //ref http://atariki.krap.pl/index.php/RMT_%28format_pliku%29 & http://atariki.krap.pl/index.php/Rmt if((bin = parseAtariBinary(0))[0] < 0x100) return rt('!binsz'); base = X.U16(2); p = bin[1][0][0]; ch = X.U8(p+3)-0x30; if(!X.c("'RMT'",p) || ![4,8].includes(ch)) return; var trklen = X.U8(p+4); if(!trklen) trklen = 256; spd0 = X.U8(p+5); if(!spd) return; ticks = X.U8(p+6); if(!ticks) return; v = X.U8(p+7); var instp = p+X.U16(p+8)-base, trktlp = p+X.U16(p+0xA)-base, trkthp = p+X.U16(p+0xC)-base, trklstp = p+X.U16(p+0xE)-base; //_l2r('rmt',p,'instp='+Hex(instp)+' trktlp='+Hex(trktlp)+' trkthp='+Hex(trkthp)+' trklstp='+Hex(trklstp)); if(instp > X.Sz() || trktlp < instp || trkthp < trktlp || trklstp < trkthp || trktlp > X.Sz() || trkthp > X.Sz() || trklstp > X.Sz()) return; //TODO extract more data return true } if(!bDetected && isRMT()) { sName = "Radik 'Raster' Štěrba's Raster Music Tracker module (.RMT)"; sVersion = 'v'+v; bDetected = 1; if(X.isVerbose()) { if(bin[1].length > 1) sOption('metadata present'); //TODO; don't have sample files sOption('ch:'+ch+' spd0:'+spd0+' ticks:'+ticks+' sz:'+outSz(bin[0])); } } function isPollyTracker() { //A trivial RLE compression with AE as the special command and a few glitches. //Underneath that, a trivial format that also messes up the lowercase letters for no reason. //Everything's space-padded, even the samples. if(!X.c("AE") || X.Sz() < 121) return false; p = 1; sz = unpsz = -1; var o = end = lc = 0; var u = Array(0x10000); var last = [-1,-2,-3,-4]; function rB(q) { //this exists just to check for the unpacked sequences, we actually have better checks last[lc++] = X.U8(q); if(lc > 3) lc = 0; //PT packs sequences over 3 ch long so any we encounter in the file is cause enough to break off if(last[0] === last[1] === last[2] === last[3]) { end = 1; return -1 } else return X.U8(q) } function ret(s) { delete u; if(debug)_log(s); return false } while(!end && o < (X.isDeepScan() ? 65536 : 0x100) && p < Math.min(X.isDeepScan() ? 65535: 0x100,X.Sz())) { t = rB(p++); if(t == 0xAE) { c = rB(p++); if(c < 0) return ret("PTFault: bad count"); if(!c) { end = true; break } else if(c === 1) { u[o++] = 0xAE; continue } b = rB(p++); if(b < 0) return ret("PTFault: bad byte"); for(;c; c--) u[o++] = b } else u[o++] = t } if((tempo = u[0x1FC1]) < 0x10) return ret("PTFault: tempo < 10h"); if(u[0x1F80] || u[0x1F90]) return ret('PTFault: nonzero smp#0'); if(o%0x100) //fixing what seems like the packer's glitch. The lil bud always picks up some extra bytes while(o%0x100 && u[o-1] === 0x20) o--; if(o%0x100 || (X.isDeepScan() && o < 8192) || o > 65535 || p > 65535) return ret('PTFault: bad range! o='+Hex(o)+' p='+Hex(p)); if((modsz = ((u[0x1FC3]+0x10) << 8)) != o) return ret('PTFault: allsmpsz mismatch: '+Hex(modsz)+' != '+Hex(o)); var msmp = [4,12]; smp = 0; for(i=0x1F81; i < 0x1F90; i++) { // find max sample, count samples included if(u[i] >= 0x10) smp++; if(u[i] > msmp[0]) { msmp[0] = u[i]; msmp[1] = u[i+0x10] } } if((lastsmpend = ((msmp[0]+0x10)<<8) + (msmp[1]<<8)) != o) return ret('PTFault: last smp end '+Hex(lastsmpend)+' != '+Hex(o)); notes = ic = 0; for(i=0; i < Math.min(0x1F00,o); i++) //test all the patterns, it's still fast //Notes aren't allowed to have smp#0 or note#0 but be a non-zero byte. //But PT v1.2 is glitchy, and earlier versions clearly allowed smp#0, so it does sometimes happen. if(u[i] && u[i] != 0xF0) { notes++; if((u[i]&0xF0) == u[i]) ic++ } if(X.isDeepScan()) for(i=0x2000; i < o; i++) //test all the samples if(u[i] > 0x3F) return ret('PTFault: bad sample @'+Hex(i)); unpsz = o; sz = p; ord = ptn = 0; for(i = 0x1F00; i < 0x1F80; i++) { if(!u[i]) break; ord++; if((pt = u[i]-0xDF) > ptn) ptn = pt } if(ic > ptn<<2) return ret('PTFault: '+ic+' bad notes'); // Let's adapt the text info too. for(i = 0x1FA0; i < 0x1FC0; i++) { if(u[i] && u[i] < 0x1A) u[i] += 0x60 } info = decEncoding(u.slice(0x1FA0,0x1FB0),CPAmiga); composer = decEncoding(u.slice(0x1FB0,0x1FC0),CPAmiga); delete u; return true; } if(!bDetected && isPollyTracker()) { sName = "Polly Tracker module (.MOD)"; bDetected = 1; if(X.isVerbose() && X.isDeepScan()) { sOptionT(info); sOptionT(composer,'by:'); sOption('tempo:'+Hex(tempo)+' ord:'+ord+' ptn:'+ptn+' smp:'+smp+' notes:'+notes+' unpsz:'+unpsz+' sz:'+outSz(sz)) } } function isSidMUS() { //ref NostalgicPlayer Source/Ports/LibSidPlayFp/SidTune/Mus.cs :: Detect, TryLoad // & https://github.com/MyDeveloperThoughts/ComputeSidPlayerC64Source/blob/main/notes/musFileFormat.md if(X.Sz() < 27) return; const HLT = 0x014F; var loadaddr = X.U16(0), len1 = X.U16(2), len2 = X.U16(4), len3 = X.U16(6); var v1p = 8+len1, v2p = v1p+len2, v3p = v2p+len3; if(v3p > X.Sz() || (v1p & 1) || (v2p & 1) || (v3p & 1)) return; if(!X.c("014F",v1p-2) || !X.c("014F",v2p-2) || !X.c("014F",v3p-2)) return; // voices must HLT at the end sz = v3p; t = ""; if(X.Sz() > v3p && (p=X.fSig(v3p,0x1000,"00")-v3p+1) > 0) { t = decAnsi(v3p,p,CPFullCPETshifted,true).trim(); sz += p } return true } if(!bDetected && isSidMUS()) { sName = "COMPUTE!'s Enhanced SidPlayer tune (.MUS+.STR+.WDS)"; bDetected = 1; if(X.isVerbose()) { sOption((t.length?'"'+addEllipsis(t,0x100,0xA0)+'"':'').append('sz:'+outSz(sz))); } } function isUltima6M() { //ref https://github.com/adplug/adplug/blob/master/src/u6m.cpp if(X.Sz() < 421 || !isWithin(unpsz=X.U16(0),0x30E,0xB21) || !X.c('00000007',2)) return false; //a rough filter // a finer filter: actually unpacking LZW and double-checking there var C, cW, o = 0, lim = Math.min(X.Sz(),unpsz), br = new BitReader(4), end = false, pW = 0, cwsz = 9, nextcw = 0x102, stk = [], dictsz = defdictsz = 0x1000, dict = [], contains = 0x102; for(i=0; i < dictsz-0x100; i++) dict.push({'rt':0, 'cw':0}) //new dictionary var dest = []; for(i=0; i < unpsz; i++) dest.push(0); //unpacked module function getstring(codeword) { //puts the string into a stack var c = codeword; while(c > 0xFF) { stk.push(dict[c-0x100]['rt']); c = dict[c-0x100]['cw'] } stk.push(c & 0xFF) } while(!end && br.offset <= lim && o <= unpsz) { //lzw decomp if(cwsz < 9 || cwsz > 12) return false; cW = br.read(cwsz); switch(cW) { case 0x100: cwsz = 9; nextcw = 0x102; dictsz = 0x200; contains = 0x102; //re-init the dictionary if(cwsz < 9 || cwsz > 12) return false; cW = br.read(cwsz); if(o >= unpsz) return false; dest[o++] = cW & 0xFF; break; case 0x101: end = true; break; //end of data default: getstring(cW < nextcw ? cW : pW); //codeword is already in the dictionary? get cW; else, pW C = stk[stk.length-1] & 0xFF; if(cW < nextcw) while(stk.length) { if(o >= unpsz) return false; dest[o++] = stk.pop() & 0xFF } else { //codeword not yet defined while(stk.length) { if(o >= unpsz) return false; dest[o++] = C; stk.pop() } if(cW != nextcw) return false; } if(contains < dictsz) { dict[contains-0x100] = { 'rt':C, 'cw':pW }; contains++ } nextcw++; if(nextcw >= dictsz) if(cwsz < 12) { cwsz++; dictsz <<= 1 } } pW = cW } if(!end) return false; sz = br.offset; if(dest[0] != 0x83 || dest[1] || (dest[2]&8) || (dest[3]&0x20) || (dest[5]&0x80) || dest[6] > 1) return false; //_logBase64(toBase64(dest)); //outputs the unpacked module for further saving return true } if(!bDetected && isUltima6M()) { sName = 'Ultima 6 Adlib module (.M)'; sOption('unpsz:'+unpsz+' sz:'+outSz(sz)); bDetected = 1 } function isQuartetST() { if(!isWithin(X.U16(0,_BE),4,0x10)) return false; if(!isWithin(X.U16(2,_BE),8,0x20)) return false; if(!isWithin(X.U16(4,_BE),4,0x30)) return false; if(!isWithin(X.U8(6),1,4) || !X.c("0400000000",7)) return false; if(!X.c("'WT'",0xC) && X.U32(0xC,_BE)) return false; if(!isWithin(X.U8(0x17),3,0x77)) return false; if((t=X.U32(0x18,_BE)) > 0x4C || (t&3)) return false; sz = 0x10; var szlim = Math.min(X.Sz(),0xFFFF); x = 0; for(p=0x1C; p < Math.min(X.Sz()-1,0x400); p+=12) if(!isWithin(X.U16(p,_BE),0x46,0x6C)) return false; while(sz < szlim) { if(!X.c("0056",sz)) break; x++; for(i=0; i < 4; i++) for(sz += 2; sz < szlim; sz+=2) if(X.c("0046",sz)) break; sz += 0xC; break //TODO? Fugue.4v or Sweet Dreams.4v have more info after the 4 iterations, but it looks funny there //_log(Hex(sz)) } spd0 = X.U16(0xE,_BE); return !x || sz <= szlim } if(!bDetected && isQuartetST()) { sName = "Illusions/Microdeal Quartet module (QTS.+SMP., .4V+.SET)"; sVersion = "samples"; bDetected = 1; if(X.isVerbose()) { //if(x > 1) sOption(x,'voices?'); //TODO for the same reason sOption((spd0?'spd0:'+spd0+' ':'')+'sz:'+outSz(sz)) } } function isSQDigitalTracker() { //ref https://bitbucket.org/zxtune/zxtune/src/develop/src/formats/chiptune/digital/sqdigitaltracker.cpp if(X.Sz() < 0x4400) return false; if(X.U8(0x100) != 0x7C && X.U8(0x11F) != 0x7C) return false; //title surrounded by | | if(charStat(X.readBytes(0x100,0x20),1).indexOf('allasc') < 0) return false; if(X.U8(0x204) != 0xFF) return false; tempo = X.U8(0x210); if(!isWithin(tempo,2,10)) return false; ord = X.U8(0x212)+1; if(!isWithin(ord,1,0x65)) return false; loop = X.U8(0x211); if(loop >= ord) return false; if(charStat(X.readBytes(0x300,0x80),1).indexOf('allasc') < 0) return false; sz = 0x4000; //var regions = []; for(i=0; i < 8; i++) { // check layouts, calc size if(X.U8(0xC0+i*4)) return false; //address, lower byte if(!isWithin(X.U8(0xC0+i*4+1),0x80,0xC0)) return false; //address, higher byte if(!isWithin((bnk=X.U8(0xC0+i*4+2)),0x58, 0x5F)) return false; //bank if(!isWithin((sec=X.U8(0xC0+i*4+3)),1,0x80)) return false; //sectors var lst = X.U16(0xC0+i*4), lsz = sec << 8; bnk &= 7; //if(lst >= 0xC000 && lst+lsz <= 0x10000) regions[bnk] = [sz, lsz]; sz += lsz } if(sz > X.Sz()) return false; sz += 0x400; // data at the end; tracker settings? nobody'll miss it, but... //_l2r('sqd',0x4400,'regions:'+outArray(regions,16)) title = X.SC(0x101,0x1E,"CP1251").trim(); for(i=smp=0; i < 0x10; i++) { //sample info parser if(X.U8(0x120+i*8+4) > 1) return false; // var rst = X.U16(0x120+i*8), rlp = X.U16(0x120+i*8+2); // if(rst < 0x8000 || rst < rlp) continue; // bnk = X.U8(0x120+i*8+5) & 7; var smpbase = rst < 0xC000? 0x8000: 0xC000; // //_l2r('sqd',0x120+i*4,'used bank #'+bnk+' at '+Hex(rst)+'..'+Hex(rlp)) // if(typeof regions[bnk] != "undefined") { // smp++; // var ssz = Math.min(0x10000-rst,regions[bnk][1]), sp = regions[bnk][0] + rst - smpbase; // } } for(i=ptn=0; i < 100; i++) if((t = X.U8(0x1A0+i)) > 0x1F) return false; else if(ptn < t) ptn = t; ptn++; return true } if(isSQDigitalTracker()) { sName = "SQ Digital Tracker module (.SQD,.M)"; bDetected = 1; if(X.isVerbose()) { sOptionT(title); sOption('tempo:'+tempo+' ord:'+ord+(loop?' loop:'+loop:'')+' ptn:'+ptn+' sz:'+outSz(sz)); } } function isSAS() { //from the eagleplayer RE if(X.U8(0) || !X.c("00000200",0xC)) return false; for(p=0x10,ptn=0; p < 0x1010; p += 2) { //orderlist? if(X.I32(p) == -1) break; if(X.U8(p)) return false; if(X.U8(p+1) > ptn) ptn = X.U8(p+1) } ptn++; ord = (p-0x10) >> 3; d2 = p; p = 0x1010 + ptn*0x30; while(p < Math.min(X.Sz(),0x30000)) { if(X.U32(p,_BE)) break; p += 4 } if(!X.c("'FORM'........'8SVXVHDR'",p+0x280)) return false; smptp = p; smp = 0; smps = ''; for(i=0x20,sz=0; i--; p+=4) { //q for smpstart, p for smpsz? if(!X.U8(p)) { var sp = smptp+X.I32(p,_BE), ssz = X.I32(p+0x80,_BE); if(sp < 0x280 || !X.c("'FORM'........'8SVXVHDR'",sp)) return false; smp++; if(sp+ssz > sz) sz = sp+ssz; //if((t=X.fSig(sp,0x30,"'NAME'00")) > -1) smps = smps.appendS(X.SA(t+8,X.U32(t+4,_BE)),' ') //not much to show } } return true } if(!bDetected && isSAS()) { sName = "Michael Winterberg's Speedy A1 System module (.SAS)"; bDetected = 1; if(X.isVerbose()) { //sOption(smps,'smps:"','"'); sOption('ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz)) } } function isMFP() { // from the binary eagleplayer REing (it's actually different for some reason) // ref https://gitlab.com/uade-music-player/uade/-/raw/master/amigasrc/players/wanted_team/MagneticFieldsPacker/src/Magnetic Fields Packer_v3.asm if(X.Sz() < 0x17E || !isWithin(ord=X.U8(0xF8), 1, 0x7F) || X.U8(0xF9) != 0x7F) return false; var x17a = X.U16(0x17A,_BE); p = 0x179; allsmpsz = 0; if(x17a != X.U16(0x17C,_BE) || x17a != ord) return false; ord_ = -1; ptn = 0; for(; p > 0xF9; p--) { if((o=X.U8(p)) > 100) return false; if(o && ord_ < 0) ord_ = p-0xF9; if(o >= ptn) ptn = o+1 } if(ord_ < 0) ord_ = 1; for(p=smp=i=0; i < 31; i++, p += 8) if(ssz=X.U16(p,_BE)) { smp++; allsmpsz += ssz } allsmpsz <<= 1; for(p=0x17E,i=m=0; i < x17a*4; i++,p+=2) m = Math.max(m,X.U16(p,_BE)); p += m; //the source and player diverge from here, I mix them together if(ptn == 1) for(t=X.U16(p-2,_BE),p+=2; p < X.Sz(); p += 2) if(X.U16(p-2,_BE) == t) return true; //from src //from bin: for(q=p,m=0; q < p+4; q++) m = Math.max(m,X.U8(q)); //@e4b2, ofs 4ca+ for(a3=p+m+4,m=0; q < a3; q++) m = Math.max(m,X.U8(q)); //@e4c4 ofs 4e2+ for(a3=p+m+4,m=0; q < a3; q++) m = Math.max(m,X.U8(q)); //@e4d6 ofs 4e2+ p += m*2+4; songsz = p; // back to src which continues where the bin left off: while(X.c("04040404 08080808",p) && p < 0xFFFF) p += 0x10; return true } if(!bDetected && isMFP()) { sName = "Shaun Southern's Magnetic Fields Packer module (.MFP+.SMP)"; bDetected = 1; //without the smp file, the smp.*.set will be used if(X.isVerbose()) { sOption('ord:'+ord+(ord != ord_? '/'+ord_: '')+' ptn:'+ptn+' smp:'+smp +' smpsz:'+allsmpsz+' songsz:'+songsz+' sz:'+outSz(p)) } } function isADL() { //ref https://github.com/adplug/adplug/blob/master/src/adl.cpp -> CadlPlayer::load // & https://www.vgmpf.com/Wiki/index.php?title=ADL_(Westwood) if(X.Sz() < 720) return; //v1 min. size // Active Pointers, Zeroes and Invalid Chars are heuristics to filter out random sparse files in the obscurity that is ADL // There must be at least some active pointers, and too many zeroes at prog start is suspicious. IC is when a prog doesn't start on a well-expected byte p = ap = z = ic = 0; nV = 4; ofs = 500; //track entries for(; p < ofs; p+=2) { //500=1F4h is the trackentries buffer if(nV == 4 && isWithin(w = X.U16(p), 0x1F4,0xFFFE)) { //in v4, all entries are either within 500 or FFFF if(debug>1)_logIt('@'+Hex(p)+': '+Hex(w)) nV = 3 /*or less*/; ofs = X.c("6C776DFFFFFF6E6F",0x78) ? 250 : 120 // 78h, or FAh just for loresfx.adl } } const M = Math.min(0xFFFF+ofs,X.Sz()); p = ofs; // v1: EoB; v2: EoB2, Kyr1, Dune2; v3: LandsOfLore, Kyr2 // _trackEntries[] _soundData[] -- program/instrument offsets are ofs-relative // | pt ids (ord?) | Program pt: sound/music tracks | Instrument pt: adlib ins | Trk data | Ins data | // v1: 120 bytes | 150 words | 150 words | @2D0h // v2: 120 bytes | 250 words | 250 words | @460h // loresfx.adl: 250 bytes | 250 words | 250 words | @4E2h // v3: 250 words | 500 words | 500 words | @9C4h //if(debug>0)_logIt(' v'+nV+' ofs:'+ofs+'/'+Hex(ofs)) // test prog offsets: start with the first 150 if(nV < 4) { nprog = 150; //for v1 for(i=0; i < nprog; i++) { w = X.U16(p); p += 2; if(w && w != 0xFFFF) { ap++; if(w < 1000) { nV = 1; if(X.U16(0x78) != 0x258 /*in v1, the 0th prog always starts at 2D0*/) return } if(!isWithin(w, 600,M)) { if(debug>0)_logIt('!w='+w+'<600 or > sz'); return } w += ofs; y = X.U8(w); if(y != 0x8E && y > 9) { // progs always start with 1~9 or, seldom, 0 or 8E //if(debug>1)_logIt('!v'+nV+'@'+Hex(p-2)+': ['+Hex(w)+'] = '+Hex(y)) z++ } } } //if(debug>0)_logIt(' v'+nV+'@'+Hex(p)) // check the rest of the program offsets: if(nV > 1) { if(X.Sz() < 1120) return; //v2/3 min. size nprog = 250; p = ofs+300; for(i=150; i < nprog; i++,p+=2) { w = X.U16(p); if(w && w != 0xFFFF) { ap++; if(!isWithin(w, 1000,M)) { if(debug>0)_logIt('!w='+w+'<1000 or > sz'); return } w += ofs; y = X.U8(w); if(!y) z++; if(y != 0x8E && y > 9) { //if(debug>1)_logIt('!v'+nV+'@'+Hex(p)+': ['+Hex(w)+'] = '+Hex(y)) ic++ } } } } //if(debug>0)_logIt('v'+nV+'@'+Hex(p)+' ') } else { //v4 if(X.Sz() < 2500) return; nprog = 500; p = ofs; for(i=0; i < nprog; i++,p+=2) { w = X.U16(p); if(w && w != 0xFFFF) { ap++; if(!isWithin(w, 2000,M)) { if(debug>0)_logIt('!w='+w+'< 2000 or > sz'); return } w += ofs; y = X.U8(w); if(!y) z++; if(y != 0x8E && y > 9) { //if(debug>1)_logIt('!v'+nV+'@'+Hex(p)+': ['+Hex(w)+'] = '+Hex(y)) ic++; } } } } // also test ins offsets and find the max one+11 = filesize: for(mw=i=0,mo=(nprog<<1)+ofs; i < nprog; i++,p+=2) { w = X.U16(p); if(w && w != 0xFFFF) { ap++; w += ofs; //if(debug>1)_logIt('@'+Hex(p)+': ['+Hex(w)+'] = '+Hex(X.U8(w))) if (!isWithin(w, mo,X.Sz())) { if(debug>0)_logIt(!'@'+Hex(p)); return; } mw = Math.max(mw,w) } } sz = mw+11; if(sz < 6900) return; ptn = []; if(nV == 4) { for(p=0; p < 500; p+=2) if(isWithin(y=X.U16(p),1,0xFFFE)) if(!ptn.includes(y)) ptn.push(y); } else for(p=ofs; p < 250; p+=2) if(isWithin(y=X.U16(p),1,0xFFFE)) if(!ptn.includes(y)) ptn.push(y); ptn = ptn.length; if(debug>0)_log('@'+Hex(p)+' v:'+nV+' ic:'+ic+' zeros:'+z+' ap:'+ap+' ptn:'+ptn) return ic < 5 && z < 50 && ap > 1 // heuristics } if(!bDetected && isADL()) { sType = 'audio'; sName = "Westwood ADL module (.ADL)"; bDetected = 1; if(ofs == 250) sVersion = 'v.sfx'; else sVersion = 'v'+[,'1','2','2','3'][nV]; if(X.isVerbose()) sOption('ptn:'+ptn+' sz:'+outSz(sz)) } function isFLS() { //from https://ay.strangled.net/Ay_Emul30.src.7z/Players.pas -> FoundFLS if(X.Sz() < 0x34) return; var orda, ptna, smpa, p, cura, mp, maxd, dif, i, j; function re(m) { if(debug>0)_log('[isFLS]@'+Hex(p)+': '+m); return } function ValidSmpP() { return p >= 12 + orn*2 && !((p - orn*2) % 6) } function ValidSmpParams(o) { var lp = X.U8(o), lpsz = X.U8(o+1); if(lp > 0x20) return; if(!lp) { if(!isWithin(lpsz, 1,0x20)) return; } else if(!isWithin(lpsz, 1,0x21-lp)) return; return true } ordp = X.U16(0); ornp = X.U16(2); smpp = X.U16(4); orn = smpp-ornp; if(!isWithin(orn, 0,30) || orn % 2) return; orn >>= 1; orda = ordp; smp = ordp-smpp; if(smp <= 0 || smp > 16*4 || smp % 4) return; smp >>= 2; ptna = X.U16(6); ord = ptna-orda-1; if(!isWithin(ord, 1,256)) return; if(X.Sz() < 12+ord+1+36*smp+34*orn+3-1) return; p = 6; mp = 6+orn*2+smp*4; maxd = X.Sz()+1-mp; mp += 31*6; if(mp > X.Sz()+1-ord-1-3) { mp = X.Sz()+1-ord-1-3; if(mp % 2) --mp; } while(p < mp) { cura = X.U16(p); dif = cura-orda; if(!isWithin(dif, 1,maxd)) break; if(ValidSmpP() && p+6 < mp && ValidSmpParams(p)) { smpa = X.U16(p+2); if((!orn || smpa-X.I16(p-2) == 32) && ( smp == 1 && orda-smpa == 32*3 || smp > 1 && ValidSmpParams(p+4) && X.I16(p+6)-smpa == 32*3 ) ) break; } if(cura < ptna) return re('!cura < ptna: '+Hex(cura)+' < '+Hex(ptna)); p += 2; } if(!ValidSmpP()) return re('!post-cycle invalid smp ofs'); mp = p+smp*4; if(mp > X.Sz()+1-ord-1-3) return; maxd = X.Sz()+1-mp; var ic = 0; //heuristic time for(i=0; i < smp; i++,p+=4) { if(!ValidSmpParams(p)) ic++; if(ic > 1) return re('!badsmpparams'); cura = X.U16(p+2); dif = cura-orda; if(!isWithin(dif, 1, maxd)) return re('!bad cura-orda'); } for(i=0; i < ord; i++,p++) if(!isWithin(X.U8(p), 1,31)) return re('!badpos'); if(X.U8(p)) return re('!badordendmarker'); j = ptna-p-1; if((ornp-j) % 2 || (smpp-j) % 2) return re('!odd orna or smpa'); orda -= j; if(orda % 2) return re('!odd orda'); sz = X.U16(orda-2)+0x60-j; if(sz <= orda) return re('!size<=orda'); return true; } if(!bDetected && isFLS()) { sName = "Amadeus Voxon/Flash Inc.'s Flash Tracker module (.FLS)"; bDetected = 1; if(X.isVerbose()) { sOption('ord:'+ord+' ptn:'+ptn+' smp:'+smp+' orn:'+orn+' sz:'+outSz(sz)) } } //the following signature detectors seem shaky to me [Kae] so they're heuristic and in parallel //use _setResult(TYPE, NAME, VERSION, OPTIONS) if(X.isHeuristicScan()) { //parallel block // Let's start with just judging by the extensions: if(extIs("imf") || extIs("wlf")) { //a detector is quite impossible to produce... if(extIs("imf")) freq = "560Hz (or 280Hz if Duke Nukem II)"; else freq = "700Hz"; _setResult("~audio","id/Apogee Music Format chiptune (.IMF)","","freq: "+freq); } else if(extIs("svar") && X.c("'PK'")) { //TODO detect in-zip _setResult("~audio","SVArTracker module (.SVAR)","",""); } //these are compares at 0, so they can be non-parallel, to optimise it all if(X.c("8400")) { if(X.U8(2) == 0xF0) sversion = "adv."; else sversion = ""; _setResult("~audio","Sierra Adlib chiptune (.SCI)",sversion,"") } else if(X.c("1C52")) { _setResult("~audio","Sound Interface System module (.LEM)","","") } else if(X.c("'NED'")) { _setResult("~audio","Nerd Tracker ][ module (.NED)","","") } else if(X.c("'MODU'")) _setResult("~audio","NovoTrade Packer module (.NTP)","",X.isVerbose()?X.SA(4,16):''); else if((X.c("'Ice!'") || X.c("'ICE!'"))) { //TODO find a sanity check to narrow it down, then move it to the other sanities dsize = X.U32(8,_BE); _setResult("~audio","Atari ST module (.SND,.SNDH)","compressed",X.isVerbose()? "orig.sz:"+dsize+" sz:"+outSz(X.U32(4,_BE)): '') } function isVortex1() { //ref https://ay.strangled.net/Ay_Emul30alpha11.src.7z / Formats.pas // & https://f.rdw.se/AY-3-8910-datasheet.pdf hdr = X.SA(0,2); if(['AY','YM','ay','ym'].indexOf(hdr) < 0 || X.U8(2) > 6) return false; hasyear = ['AY','YM'].indexOf(hdr) < 0; yr = 0; if(hasyear) { yr = X.U16(0xA,_LE); if(yr && (yr < 1980 || yr > 2050)) return false; } unpsz = X.U32(hasyear?0xC:0xA,_LE); if(unpsz < 2 || unpsz > 0xA00000) return false; // maxsize set a bit up from enlight '97 megamix.vtx chipfrq = X.U32(5,_LE); if(chipfrq < 800000 || chipfrq > 4000000) return false; //2M would be ok intfrq = X.U8(9); return true } if(isVortex1()) { if(!X.U8(2)) sversion = "1ch"; else sversion = "2ch"; switch (hdr) { case 'AY': case 'ay': sversion += " AY-3-8910/12"; break; case 'YM': case 'ym': sversion += " YM2149"; break; default: sversion += " unk.chip" // never reached } if(X.isVerbose()) { p=hasyear?0x10:0x0E; t = X.SC(p,Math.min(256,X.Sz()-p),'CP1251'); sOptionT(t); p+=t.length+1; a = X.SC(p,Math.min(256,X.Sz()-p),'CP1251'); sOptionT(a,"by:"); p+=a.length+1; if(hasyear) { if(yr) sOption(yr,"'"); pr = X.SC(p,Math.min(256,X.Sz()-p),'CP1251'); p+=pr.length+1; sOptionT(pr,"for:"); tn = X.SA(p,Math.min(256,X.Sz()-p)); sOptionT(tn,"in:"); p+=tn.length+1; c = X.SA(p,Math.min(256,X.Sz()-p)); sOptionT(c); //p+=c.length+1; } sOption((X.U8(2)&7).toString(2).padStart(3,'0'),"mode:"); sOption(chipfrq,"chip freq:","Hz"); sOption(intfrq,"int.freq:","kHz") t = Util.div64(unpsz,intfrq*14); sOption("time:"+secondsToTimeStr(t)); loop = X.U16(3,_LE); if(loop) sOption(loop,"loop:"); } _setResult("~audio","Vortex Project chiptune (.VTX)",sversion,sOptions); sOptions = "" } function isMXDRVPDX() { // the format is very very very basic so FPs happen //and it's not possible to test more //the first bytes until the first sample starts are a table of addresses and sizes of the samples // (if the address is 0 just skip it), // then the samples go. That's all. // the table can be tons of bytes long, much longer than the max reasonable 800h if(X.Sz() < 0x300 || X.Sz() > 0x4000+0xFFFFFF) return false; sz = en = 0; var oldendp = nonzeroaddr = -1, smpst = 0xFFFFFFFF, ptrs = []; sus = 0; bad = ''; for(i=0; i*8 < (smpst == 0xFFFFFFFF? 0x300: Math.min(smpst,X.Sz())); i++) { var p = X.U32(i*8,_BE), s = X.U32(i*8+4,_BE); if(!p) continue; //if(p < i*8) _l2r('pdx',p,i+'*8 is higher?!'); if(p < i*8 || s > 0xFFFFF) return false; if(nonzeroaddr < 0) nonzeroaddr = i; if(smpst > p && p >= 0x300) smpst = p; oldendp = p+s; ptrs.push([p,s]); en++; if(p+s > sz) sz = p+s } if(!en || findGaps(ptrs,2).length > 4) return false; ptrs = ptrs.sort(function (a, b) { if(a[0] != b[0]) return a[0]-b[0]; else return a[1]-b[1] }); //if(ptrs[0][0] % 8 || !isWithin(ptrs[0][0],0x300,0x4000)) _l2r('pdx',i*8,'!smpst='+Hex(ptrs[0][0])); if(ptrs[0][0] % 8 || !isWithin(ptrs[0][0],0x300,0x4000)) return false; //_l2r('pdx',sz,outArray(findGaps(ptrs,2),16)) return true } if(isMXDRVPDX()) { sversion = ''; if(sz > X.Sz() && !X.isVerbose()) bad += '!short'; if(bad.length) sversion = sversion.appendS('malformed'+bad+(sus?'sus'+sus:''),'/'); _setResult("~audio","Konami's MXDRV PCM resource (.PDX)", sversion, X.isVerbose()? 'entries:'+en+' sz:'+outSz(sz): '') } function isKDM() { // ref http://advsys.net/ken/kdmsongs.zip/KDMSRC.ZIP/kdmwin/KDMENG.C if(X.Sz() < 12) return false; if(X.U32(0,_LE)) return false; //kdmversionum numnotes = X.U32(4,_LE); if(!numnotes || numnotes > 8192) return false; numtracks = X.U32(8,_LE); if(!numtracks || numtracks > 256) return false; sz = 12+numtracks*4+numnotes*11; if((sz != X.Sz()) && (sz != X.Sz()+numnotes)) return false; return true } if(isKDM()) { if(sz > X.Sz()) sversion = "no panning effects"; else sversion = ""; _setResult("~audio","Ken Silverman's Digital Music module (.KDM)",sversion,X.isVerbose()? "trk:"+numtracks+" notes:"+numnotes: ''); } function isDigitalStudio() { //ref https://bitbucket.org/zxtune/zxtune/src/develop/src/formats/chiptune/digital/digitalstudio.cpp if(X.Sz() < 111104) return false; lp = X.U8(0); if(lp > 63) return false; ptn = 0; for(i = 1; i < 100; i++) { pt = X.U8(i); if(pt > 0x1F) return false; if(pt > ptn) ptn = pt } ptn++; tmp = X.U8(0x64); ord = X.U8(0x65); if(!ord || ord > 100) return false; if(lp > ord) return false; title = X.readBytes(0x66,28); for(i=0; i < 28; i++) if(title[i] < 0x20 || title[i] > 0x7F) return false; title = decEncoding(title,CPSpeccy); compiled = !isAllZeroes(0xC8,0x38); allsmp = smp4bit = 0; smps = []; for(p=0x100; p < 0x200; p += 0x10) { var sst = X.U16(p), stlp = X.U16(p+2), spage = X.U8(p+4), sninbank = X.U8(p+5), ssz = X.U16(p+6); for(i=8; i < 16; i++) if(X.I8(p+i) < 0x20) return false; t = decAnsi(p+8,8,CPSpeccy,false).trim(); if(t != '') smps.push(t) } return true; } if(isDigitalStudio()) { sname = "Underground Systems Digital Studio module (.DST)"; sversion = compiled?'compiled':''; if(X.isVerbose()) { sOptionT(title); sOptionT(smps.filter(funSampleName).join(' '),'smp/msg:"','"'); sOption('ord:'+ord+' ptn:'+ptn+(lp?' loop:'+lp:'')+' page0:'+X.U8(0x200)+' sz:'+outSz(compiled?0x1C200:0x1B200)) soption = sOptions; sOptions = '' } else soption = ''; _setResult("~audio",sname,sversion,soption) } function isExtremeTrackerZX() { //from https://bitbucket.org/zxtune/zxtune/src/develop/src/formats/chiptune/digital/extremetracker1.cpp if(X.Sz() < 112640) return false; if((lp = X.U8(0)) > 63) return false; if((tmp = X.U8(1)) < 3 || tmp > 0xF) return false; if((ord = X.U8(2)) > 64) return false; title = X.readBytes(3,30); for(i=0; i < 30; i++) if(title[i] < 0x20 || title[i] > 0x7F) return false; title = decEncoding(title,CPSpeccy); ptn = 0; for(p = 0x22; p < 0x86; p++) { if((pt = X.U8(p)) > 0x1F) return false; if(pt > ptn) ptn = pt } ptn++; for(; p < 0xA6; p++) { var ps = X.U8(p); if(ps < 4 || ps > 0x40) return false } var qstvw = [0x51,0x53,0x54,0x56,0x57]; for(i=0; p < 0xBA; i++, p += 4) { if(X.U8(p) > 0x7C) return false; if(X.U8(p+1) != qstvw[i]) return false; if(X.U8(p+2) && X.U8(p+2) < 0x84) return false; if(X.U8(p+3) > 0x10) return false } var sus = 0; for(p=0xBC; p < 0xCB; p++) if(X.U8(p)) sus++; if(sus > 3) return false; var sig = X.readBytes(0xCB,0x35,true); if(charStat(sig,true).indexOf('allasc') <= 0) return false; if(X.U8(0xFF)) return false; smps = []; for(p = 0x100; p < 0x200; p+= 0x10) { if(qstvw.indexOf(X.U8(p+4)) < 0) return false; if(X.U8(p+5) > 0x10) return false; if(X.U8(p+6) > 0x7C) return false; t = X.readBytes(p+8,8); for(i=0; i < 8; i++) if(t[i] < 0x20 || t[i] > 0x7F) return false; t = decEncoding(title,CPSpeccy).trim(); if(t != '') smps.push(t) } } if(isExtremeTrackerZX()) { sname = "Red Limited's Extreme Tracker module (.ET1)"; if(X.isVerbose()) { sOptionT(title); sOptionT(smps.filter(funSampleName).join(' '),'smp/msg:"','"'); sOption('tmp0:'+tmp+' ord:'+ord+' ptn:'+ptn+(lp?' loop:'+lp:'')+' sz:'+outSz(112640)) soption = sOptions; sOptions = '' } else soption = ''; _setResult("~audio",sname,sversion,soption) } function isMON() { if(!X.c("4EFA....4EFA....4EFA")) return false; var t = X.U16(2,_BE); if (t > X.Sz() - 10) return false; return X.c("4BFA.... 08AD 0000",t+2) } if(isMON()) _setResult("~audio","Jeroen 'WAVE' Tel & Charles Deenen's Maniacs of Noise module (.MON)","","") function isJHSTSMP() { if(X.Sz() < 0x80) return false; oldp = smp = 0; for(i = 0; i < 0x80; i += 8) { p = X.U16(i,_BE); if(p > X.Sz()) return false; if(p) { if(p < oldp) return false; oldp = p; smp++ } if(!X.c("0010 01000000",i+2) && !X.c("0000 00000000",i+2)) return false; } if(smp < 8) return false; // I only saw files with at least 10 return true } if(isJHSTSMP()) _setResult("~audio","Jochen 'Mad Max' Hippel's Atari ST sample set (SMP.set)","", X.isVerbose()? "smp:"+smp+" sz:"+outSz(oldp): '') function isV2M() { //ref https://github.com/farbrausch/fr_public/blob/master/v2/v2mplayer.cpp ::InitBase //with kind commentary from Tammo "kb" Hinrichs notes = chs = 0; if(X.Sz() < 480) return false; timediv = X.U32(0,_LE); if(!timediv || [0x60,0x80,480].indexOf(timediv) < 0) return false; //empirical maxtime = X.U32(4); if(!maxtime) return false; gdnum = X.U32(8); if(!gdnum) return false; p = 12+10*gdnum; var pcs = pbs = ccs = 0; for(ch=0; ch < 16; ch++) { notenum = X.U32(p); p += 4; notes += notenum; if(notenum > 1000000) return false; // nobody'll write a million-note synth epic, will they @_@ if(notenum) { chs++; p += 5*notenum; if(p > X.Sz()) return false; pcnum = X.U32(p); pcs += pcnum; p += 4+4*pcnum; //pgm change events pbnum = X.U32(p); pbs += pbnum; p += 4+5*pbnum; //pitch bends for(cn=0; cn < 7; cn++) { ccnum = X.U32(p); ccs += ccnum; p += 4+4*ccnum; //control changes } } if(p > X.Sz()) return false; } if(!notes || ccs > notes*50 || pbs > notes*3 || pcs > notes*3 || maxtime < notes) { //*50 & 3 are arbitrary //_l2r('V2M',p,'notes:'+notes+' pcs:'+pcs+' pbs:'+pbs+' ccs:'+ccs) return false } size = X.U32(p); if(size > 0x4000) return false; //globals p += 4+size; if(p > X.Sz()) return false; size = X.U32(p); if(size > 0x100000) return false; //patchmap p += 4+size; if(p > X.Sz()) return false; //_l2r('V2M',p,'speech -> '+Hex(p+4+X.U32(p))) spsize = X.U32(p); p += 4; if(spsize < 0x2000) { for(i=p+4,q=X.U32(p)*4,t=Math.min(X.Sz,p+4+q); i < t; i+=4) if(!isWithin(X.U32(i), q, p-4+spsize)) return false; p += spsize //speech size -- except tons of files are shorter than that, so we'll read the pointers! } sz = p; return true; } if(!bDetected && X.isDeepScan() && isV2M()) { sName = "farbrausch V2 Synthesizer module (.V2M)"; bDetected = 1; if(X.isVerbose()) sOptions = 'ch:'+chs+' notes:'+notes+' timediv:'+timediv+' maxtime:'+maxtime +(spsize?' syn.speech':'')+' sz:'+outSz(sz); } function isTwinTeam() { if(!X.c("01000000", 0x06) || X.Sz() < 1500 || X.Sz() > 9000 || X.calculateEntropy(12,1200) < 7.8) return false; //a quick check because that's a lot of algo //ideally, get the checks from https://github.com/adplug/adplug/blob/master/src/dmo.cpp return true } if(isTwinTeam()) { _setResult("~audio","TwinTeam's Twin Trackplayer module (.DMO)","",X.isVerbose()?'unp.sz:'+X.U16(0xC):'') } function isVoices_8() { //this is a WIP until someone manages to test the tracker without it freezing up on I/O soption = ''; smp = ptn = smpsz = 0; for(i=0; i < 0x20; i++) { if(charStat(t=X.readBytes(i*0x20,0x10),1).indexOf('allxsc') < 0) return false; var c = t.indexOf(0); if(!c) continue; if(c < 0) return false; for(j=15; j > c && !t[j];) j--; if(j > c) return false; var ssz = X.U32(i*0x20+0x14,_BE); if(ssz) { smpsz += ssz; smp++ } } tmp0 = X.U8(0x480); ord = X.U8(0x481); if(!smpsz || !tmp0 || tmp0 > 0xF || !ord || ord > 0x80) return false; for(i=0; i < ord; i++) if((t=X.U8(0x482+i)+1) > ptn) ptn = t; if(ptn > 32) return false; for(; i < 128; i++) if(X.U8(0x482+i)) return false; sz = 0x502+ptn*0x800+smpsz; if(X.Sz() < sz) return false; soption = 'tmp0:'+tmp0+' ord:'+ord+' ptn:'+ptn+' smp:'+smp+' sz:'+outSz(sz); return true } if(isVoices_8()) _setResult("~audio","SHINING 8's Voices_8/8CHNL Soundtracker module",'',X.isVerbose()?soption:'') function isHSC() { //ref https://github.com/libxmp/libxmp/blob/master/src/bitrot/loaders/hsc_load.c // & https://github.com/libxmp/libxmp/raw/refs/heads/master/docs/formats/hsc.txt if(X.Sz() < 1587+1152 || X.Sz() > 59187+1) return; if(isAllZeroes(0,127*12)) return; p = t = ic = 0; //a heuristic run on lots of HSCs dictates these things: const rangesb01 = [[0x0A,0x0D], [0x17,0x0E], [0x23,0x26], [0x29,0x2D], [0x3A,0x3F], [0x45,0x50], [0x5A,0x5E], [0x69,0x6B], [0x75,0x77], [0x7A,0x7D], [0x83,0x85], [0x89,0x8A], [0xB3,0xBF], [0xD3,0xDF], [0xFA,0xFE]], rangesb2 = [[0x1B,0x1C], [0x21,0x2F], [0x34,0x3E], [0x41,0x47], [0x49,0x54], [0x5A,0x5E], [0x66,0x72], [0x75,0x7F], [0x81,0x87], [0x89,0xBF], [0xC9,0xCF], [0xD1,0xDF]], rangesb3 = [[0x2B,0x2E],, [0x36,0x3E], [0x45,0x4C], [0x51,0x57], [0x59,0x67], [0x69,0x6C], [0x6E,0x71], [0x76,0x80], [0x88,0x8F], [0x9D,0xAF], [0xB1,0xBF], [0xC1,0xC9], [0xCB,0xCF]], rangesb4 = [[1,5], [7,0x10], [0x15,0x1E], [0x27,0x2C], [0x39,0x3E], [0x45,0x4F], [0x57,0x5F], [0x69,0x6D], [0x8A,0x8E], [0x9A,0x9F], [0xAC,0xB0], [0xB9,0xBF], [0xC7,0xD1], [0xD7,0xDF], [0xE8,0xEF], [0xFA,0xFD]], rangesb5 =[[1,0xF], [0x19,0x1E], [0x27,0x2E], [0x37,0x3F], [0x49,0x4F], [0x58,0x5F], [0x6A,0x6E], [0x78,0x7F], [0x89,0x8F], [0x9A,0x9F], [0xAC,0xAE], [0xBA,0xC6], [0xC9,0xD2], [0xD5,0xE3], [0xEA,0xEE], [0xFA,0xFC]], rangesb6 = [[0xA,0xE], [0x1B,0x1E], [0x24,0x26], [0x37,0x3A], [0x3C,0x3F], [0x49,0x4E], [0x5A,0x60], [0x6B,0x6E], [0x7C,0x7E], [0x80,0x83], [0x8A,0x90], [0x9A,0xA1], [0xA7,0xAF], [0xB1,0xC6], [0xC8,0xCD], [0xCF,0xDC], [0xDE,0xE0], [0xE2,0xE6], [0xE8,0xED]], rangesb7 = [[0xC,0xE], [0x19,0x1E], [0x27,0x2E], [0x39,0x41], [0x59,0x5E], [0x6A,0x6E], [0x79,0x7F], [0x8A,0x95], [0x9A,0xA5], [0xAB,0xC6], [0xCA,0xCD], [0xD1,0xDE], [0xE0,0xED]], rangesb8 = [[0x12,0x15], [0x17,0x1F], [0x23,0x36], [0x38,0x3F], [0x41,0x4D], [0x4F,0x51], [0x5A,0x60], [0x62,0x68], [0x6A,0x6D], [0x6F,0x7E], [0x80,0x93], [0x95,0xF5]], rangesb9 = [[0x10,0x17], [0x19,0x40], [0x42,0x60], [0x65,0x68], [0x6A,0x76], [0x7A,0x90], [0x92,0xB1]], rangesbA = [[0x10,0x1C], [0x21,0x2F], [0x31,0x42], [0x49,0x54], [0x56,0x5D], [0x60,0x6D], [0x6F,0x72], [0x74,0x88], [0x78A,0x98]], rangesbB = [[0xA,0xF], [0x12,0x1F], [0x21,0x2F], [0x31,0x36], [0x38,0x3F], [0x45,0x56], [0x58,0x5F], [0x61,0x66], [0x68,0x6F], [0x78,0x7F], [0x81,0x96], [0x9A,0xEF], [0xF1,0xFE]]; for(i=0,m=X.isDeepScan()?127:16; i < m; i++,p+=12) { t = X.U8(p); if(isWithinRanges(t, rangesb01) || isWithin(t, 0xA5,0xB1)) ic++; t = X.U8(p+1); if(isWithinRanges(t, rangesb01) || isWithin(t, 0x92,0xA7)) ic++; t = X.U8(p+2); if(t >= 0xE1 || isWithinRanges(t, rangesb2)) ic++; t = X.U8(p+3); if(t >= 0xD1 || isWithinRanges(t, rangesb3)) ic++; t = X.U8(p+4); if(isWithinRanges(t, rangesb4)) ic++; t = X.U8(p+5); if(isWithinRanges(t, rangesb5)) ic++; t = X.U8(p+6); if(isWithinRanges(t, rangesb6)) ic++; t = X.U8(p+7); if(isWithinRanges(t, rangesb7)) ic++; t = X.U8(p+8); if(t >= 0xF7 || isWithinRanges(t, rangesb8)) ic++; t = X.U8(p+9); if(t >= 0xB3 || isWithinRanges(t, rangesb9)) ic++; t = X.U8(p+0xA); if(t >= 0x9A || isWithinRanges(t, rangesbA)) ic++; t = X.U8(p+0xB); if(isWithinRanges(t, rangesbB)) ic++; if(ic > 2) return } //test the orderlist: ptn = ord = x = 0; //_logIt('@'+Hex(p)+' testing ords='+outArray(X.readBytes(0x600,0x33), 16)) if(X.U8(0x600) > 0xB1) return; visited = []; for(i=0; i < 0x32; i++) visited[i] = false; // prep for the loops for(p=0x600; p < 0x633; p++) { if(visited[p-0x600]) break; visited[p-0x600] = true; if(isInside(t, 0x31,0x80)) t = 0xFF; //pattern out of range = end song if((t = X.U8(p)) > 0xB1) break; //rainyday.hsc doesn't have FF else if((t & 0x80) && t <= 0xB1) { //løøps t &= 0x3F; t += 0x600; //_logIt('@'+Hex(p)+' -=loop=-') if(t > 0x632 || X.U8(t) > 0xB1 || t == p) { if(debug>0)_logIt('@'+Hex(p)+', t:'+Hex(t)+' :: '+Hex(X.U8(t))); return; } else p = 0x600+t-1; } else if(t & 0x80) ic++; else { if(ptn < t) ptn = t; ord++ } } for(q=0x632; q > 0x600; q--) if(X.U8(q) == 0xFF) break; //_logIt('ord:'+ord+' ptn:'+ptn+' last:'+Hex(X.U8(p))) if(!ord || !ptn && X.U8(p) != 0xFF) return; if(!x) x++; ptn++; if(ptn > 50) return; //test number of patterns p = 0x633; sz = p + ptn*0x480; var safeptns = 0; for(i=0; i < ptn*0x240 && safeptns < 100; i++) { // just test a hundred patterns to be safe and sure it's a HSC n = X.U8(p++); m = X.U8(p++); if(n || m) { //the same heuristic run on lots of HSCs says these things too: if(n >= 0xCA || isWithinRanges(n, [[0x62,0x7E], [0x81,0x8F], [0x91,0xC8]])) return; //_logIt('@'+Hex(p-2)+' n is within range') if(isWithinRanges(m, [[0x38,0x43], [0x45,0x51], [0x56,0x5F], [0x69,0x80], [0x82,0x88], [0x8A,0x9B], [0x9D,0x9F], [0xAA,0xAE], [0xD7,0xDD], [0xDF,0xE6], [0xE8,0xEF], [0xF9,0xFE]])) return; //_logIt('@'+Hex(p-1)+' m is within range') if(isWithin(m, 7,0xF)) if(n != 0x80 /*fmtrk2.hsc should be valid*/) { if(n != 0) /*return;*/ ic++; //2.hsc starts with a single broken n = 14h } //test effects 07..0F //_logIt('@'+Hex(p-2)+' test1 passed') if(isWithin(m, 0x70,0x9F)) { //test effects 7x..9x if(m != 0x81 && m != 0x89) return; //rainyday.hsc should be valid ic++; //_logIt('@'+Hex(p-2)+" test2 IC'ed -> "+ic) } if(ic > 20) return; safeptns++; } } // if(sz > X.Sz()) return; //if(sz%2) sz++; // all HSC files are word-aligned like it were Amiga, but it aint. Not sure whether to include if(ic) bad = '!ic'+ic; return true } if(isHSC()) { var soption = ''; if(X.isVerbose()) { if(x > 1) soption = '×'+x; soption = soption.appendS('ord:'+ord+' ptn:'+ptn+' sz:'+outSz(sz),', ') } _setResult("~audio","Hannes Seifert's HSC Adlib Composer/ECR HSC-Tracker module (.HSC)",(bad.length?'malformed'+bad:''),soption) } function isFMX() { if(X.Sz() < Math.max(X.U16(0x1E),0x30)) return false; ch = 0; var t; for(i=oldp=0; i < 0x10; i++) { if(!isWithin(t = X.U16(i*2), Math.max(0x30,oldp),X.Sz())) return false; if(i && X.U8(t-1) != 0x80) return false; if(X.U8(t) != 0x80) ch++; oldp = t } return true } if(isFMX()) _setResult("~audio","K.Ohshima's FMX chiptune (.FMX)",'',X.isVerbose()?'ch:'+ch:''); // these are HEAVY as well as heuristic, so they must come last function isGYM() { if(X.Sz() < 0x160) return; _gyminfo = parseMDGYM(0, X.isDeepScan()? BCParseToEoF: BCParseToReasonable); if(debug>0)_logIt('gym?'+outArray(_gyminfo,16)) if(_gyminfo[0] < 0) return; return true } if(isGYM()) _setResult("~audio", "Sega Genesis/Mega Drive YM2612 chiptune (.GYM)", "headerless", X.isDeepScan() ? "notes:" + _gyminfo[0] + " sz:"+outSz(_gyminfo[1]) : ""); function isOPMLog() { // the headerless one's nooooot easy to check if(X.Sz() < 0x160) return; var tmr; if(debug>0){ tmr = new CheckpointTimer(); tmr.init(300); } _cyminfo = parseYM2151RegLog(0, X.isDeepScan()? BCParseToEoF: BCParseToReasonable); if(debug>0)tmr.next('OPM (.cym) parsed'); if(debug>0)_logIt('cym?'+outArray(_cyminfo,16)); if(_cyminfo[0] < 0) return; return true } if(!X.isOverlay() && isOPMLog()) _setResult("~audio","YM2151 OPM/Callus chiptune (.CYM)","headerless", X.isDeepScan() ? "notes:" + _cyminfo[0] + " sz:"+outSz(_cyminfo[1]) : ""); function isAdlibLog() { if(X.Sz() < 0x160) return; var tmr; if(debug>0){ tmr = new CheckpointTimer(); tmr.init(300); } _opl2info = parseYM3812RegLog(0, X.isDeepScan()? BCParseToEoF: BCParseToReasonable); if(debug>0)tmr.next('OPM (.cym) parsed'); if(debug>0)_logIt('cym?'+outArray(_cyminfo,16)); if(_opl2info[0] < 0) return; return true } if(!X.isOverlay() && isAdlibLog()) _setResult("~audio","YM3812/OPL2/Ad Lib chiptune","headerless", X.isDeepScan() ? "notes:" + _opl2info[0] + " sz:"+outSz(_opl2info[1]) : "") } //isHeuristicScan parallel block return result(); } /* beautify ignore:end */ ================================================ FILE: db/Binary/audio_8svx.1.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research meta("audio", "8SVX"); function detect() { if (Binary.compare("'FORM'")) { if (Binary.findString(0, Binary.getSize(), "BODY") != -1 && Binary.findString(0, Binary.getSize(), "FORM") != -1 && Binary.findString(0, Binary.getSize(), "ANNO") != -1) { bDetected = true; } } return result(); } ================================================ FILE: db/Binary/audio_ACM.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens TG@kaens meta("audio", "Interplay ACM waveform audio (.ACM)"); function detect() { //from https://github.com/dtiefling/snd2acm-portable/blob/master/src/general.h if (!File.compare("97280301") || File.getSize() < 0x10) return false; var smp = File.read_uint32(4), ch = File.read_uint16(8), r = File.read_uint16(0xA); if (!smp || !isWithin(ch, 1, 2) || !isWithin(r, 6000, 49716)) return false; bDetected = true; if (Binary.isVerbose()) { var sr = (r / 1000).toFixed(1); sOption('ch: ' + ch + ' s/r: ' + sr + 'kHz len: ' + secondsToTimeStr(Util.divu64(smp + (r >> 1), r * ch))); } return result(); } ================================================ FILE: db/Binary/audio_ADX.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG@kaens) meta("audio", "CRI Middleware's ADX 4-bit ADPCM stream (.ADX,.ADP)"); function detect() { //from https://wiki.multimedia.cx/index.php/CRI_ADX_file // & https://github.com/vgmstream/vgmstream/blob/master/src/meta/adx.c if (!X.c("8000")) return false; if (!isWithin(p=X.U16(2,_BE)+4, 0x14, X.Sz())) return false; if (!X.c("'(c)CRI'",p-6)) return false; fmt = X.U8(4); if ([2,3,4].indexOf(fmt) < 0) return false; if (X.U8(5)%0x12 || X.U8(6) != 4) return false; //frame size 12h (rarely a multiple thereof), 4 bit per sample only if ((ch=X.U8(7)) > 8) return false; nV = X.U8(0x12); // if ([3,4,5].indexOf(nV) < 0) return false; bDetected = 1; sVersion = ""; switch(nV) { case 3: sVersion = "v3"; break; case 4: sVersion = "v4"; break; case 5: sVersion = "v4NL" } switch(fmt) { case 2: sVersion += " fixed-coefficient"; break; case 4: sVersion += " exponential-scale"; } if(X.U8(0x13) > 0) sVersion += " encrypted"; if(X.isVerbose()) { sOption(X.U8(7)+'ch '+(sr=X.U32(8,_BE))+'Hz len ' +secondsToTimeStr(((smp=X.U32(0x0C,_BE))/sr/ch).toFixed(0))); } return result(); } ================================================ FILE: db/Binary/audio_AHX.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG@kaens) meta("audio", "CRI Middleware's AHX ADPCM stream (.AHX)"); function detect() { //from https://github.com/vgmstream/vgmstream/blob/master/src/meta/ahx.c if (!X.c("8000")) return false; if (!isWithin(p=X.U16(2,_BE)+4, 0x14, X.Sz())) return false; if (!X.c("'(c)CRI'",p-6)) return false; fmt = X.U8(4); if ([0x10,0x11].indexOf(fmt) < 0) return false; if (X.U8(5) || X.U8(6)) return false; //frames and bit per sample are 0 in AHX if (X.U8(7) != 1) return false; //1 ch only if (X.U8(0x12) != 6) return false; bDetected = 1; sVersion = ""; switch(fmt) { case 0x10: sVersion += "+bigger frames"; } if(X.U8(0x13) > 0) sVersion += " encrypted"; if(X.isVerbose()) { sz = X.fSig(p,TOEOF,"'AHXE(c)CRI'"); if(sz > 0) sz += 10; sOption('1ch '+(sr=X.U32(8,_BE))+'Hz len ' +secondsToTimeStr(((smp=X.U32(0x0C,_BE))/sr).toFixed(0))+' sz:'+outSz(sz)) } return result(); } ================================================ FILE: db/Binary/audio_AIF.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Audio_Interchange_File_Format meta("audio", "AIF"); function detect() { if (Binary.compare("464f524d00......'AIFFCOMM'")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/audio_AU.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens TG@kaens meta("audio", "NeXT/Sun Au waveform audio (.AU,.SND)"); /* beautify ignore:start */ function detect() { //ref https://en.wikipedia.org/wiki/Au_file_format // & https://sox.sourceforge.net/AudioFormats-11.html#ss11.2 // & http://soundfile.sapp.org/doc/NextFormat/soundstruct.h if (X.c("'.snd'")) { tp = 'BE'; en = _BE } // all these options, but only .snd is truly still found out there so I didn't test the rest else if (X.c("'dns.'")) { tp = 'LE'; en = _LE } else if (X.c("00'ds.'")) { tp = 'LE-ds.DEC'; en = _LE } else if (X.c("'.sd'00")) { tp = 'BE-ds.'; en = _BE } else return false; if (!isWithin(dataofs = X.U32(4, en), 0x18, X.Sz())) return false; bad = ''; if (dataofs < 0x1C) bad = bad.addIfNone('!badofs'+Hex(dataofs)); datasz = X.I32(8, en); ch = X.U32(0x14, en); if(!ch || ch > 0x100) return false; sr = X.U32(0x10, en); if(!sr) return false; bDetected = true; sVersion = tp; fmt = X.U32(0xC, en); if (fmt > 0x1D) sVersion = sVersion.appendS('unknown format ('+Hex(fmt)+')', '/'); else sVersion = sVersion.appendS( ["unspecified format", "8-bit G.711 μ-law", "8-bit linear PCM", "16-bit linear PCM", "24-bit linear PCM", "32-bit linear PCM", "32-bit IEEE floating point", "64-bit IEEE floating point", "Fragmented sample data", "nested format", "DSP program", "DSP 8-bit fixed-point data", "DSP 16-bit fixed-point data", "DSP 24-bit fixed-point data", "DSP 32-bit fixed-point data", "unknown format (0Fh)", /*10*/"Sound Kit's visual data", "μ-law squelch", "16-bit linear w/emphasis", "16-bit linear compressed", "16-bit linear w/emphasis compressed", "Music Kit DSP commands", "Music Kit DSP commands: samples", "ITU-T G.721 4-bit ADPCM", "ITU-T G.722 4-bit SB-ADPCM", "ITU-T G.723 3-bit SB-ADPCM", "ITU-T G.723 5-bit SB-ADPCM", "8-bit G.711 A-law","AES",/*1D*/"8-bit Delta μ-law"][fmt], '/'); if (bad.length) sVersion = sVersion.appendS('malformed'+bad,'/'); if (X.isVerbose()) { info = []; t = 0x18; while(t < dataofs && t < X.Sz()) { if ((z = X.fSig(t, Math.min(X.Sz(),0x100,dataofs-t), "00")) < 0) z = dataofs; i = X.SC(t,z-t,'CP437').trim(); if(i.length) info.push(i); t = z+1 } sOption(addEllipsis(info.join('; '), 0xC0), 'info:"', '"'); sOption('ch:' + ch + ' s/r:' + (sr / 1000).toFixed(1) + 'kHz'+(datasz > 0? ' sz:'+outSz(dataofs+datasz): '')); } return result(); } /* beautify ignore:end */ ================================================ FILE: db/Binary/audio_BCSTM.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kae meta("audio", "Nintendo CTR Stream (.BCSTM)"); function detect() { // ref https://www.3dbrew.org/wiki/BCSTM if (!X.c("'CSTM'FF") && !X.c("'CSTM'FE") || X.U8(5) < 0xFE) return false; var e = X.U8(5) == 0xFE ? _LE : _BE; if (!X.c("'INFO'", ip = X.U32(0x18, e))) return false; ip += 0x20; // stream info ofs if (!X.c("'SEEK'", t = 0x40 + X.U32(0x44, e)) || t != X.U32(0x24, e)) return false; if (!X.c("'DATA'", t = t + X.U32(t + 4, e)) || t != X.U32(0x30, e)) return false; bDetected = true; sVersion = 'v' + X.U32(8, e).toString(16) + '_' + (e == 0xFE ? 'le' : 'be'); if (X.isVerbose()) { var enc = X.U8(ip), senc = ['PCM8', 'PCM16', 'DSP ADPCM', 'IMA ADPCM'][enc], lp = X.U8(ip + 1), ch = X.U8(ip + 2), sr = X.U32(ip + 4, e); sOption(senc + ' ' + ch + 'ch ' + sr + 'Hz' + (lp ? ' looped' : '') + ' sz:' + outSz(X.U32(0xC, e))); } return result(); } ================================================ FILE: db/Binary/audio_BCWAV.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kae meta("audio", "Nintendo Binary CTR Wave (.BCWAV)"); function detect() { //ref https://www.3dbrew.org/wiki/BCWAV if (!X.c("'CWAV'FF") && !X.c("'CWAV'FE") || X.U8(5) < 0xFE) return false; var e = X.U8(5) == 0xFE? _LE: _BE; if(!X.c("'INFO'", ip=X.U32(0x18,e)) || !X.c("'DATA'", X.U32(0x24,e)) || ip+X.U32(ip+4,e) != X.U32(0x24,e)) return false; bDetected = true; sVersion = 'v'+X.U32(8,e).toString(16)+'_'+(e==0xFE?'le':'be'); if(X.isVerbose()) { var enc = X.U8(ip+8), senc = ['PCM8', 'PCM16', 'DSP ADPCM', 'IMA ADPCM'][enc], lp = X.U8(ip+9), sr = X.U32(ip+0xC,e), ch = X.U8(ip+0x1C); var dsz = X.U32(X.U32(0x24,e)+4,e)-8, len = ''; switch(enc) { case 0: len = (dsz/sr/ch).toFixed(1).toString(); break; case 1: len = (dsz/sr/2/ch).toFixed(1).toString(); break; case 3: len = (dsz*2/sr/ch).toFixed(1).toString(); } sOption(senc+' '+ch+'ch '+sr+'Hz'+(lp?' looped':'') +(len.length?' len '+secondsToTimeStr(len):'')+' sz:'+outSz(X.U32(0xC,e))); } return result(); } ================================================ FILE: db/Binary/audio_CXT.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG @kaens) meta("audio", "Adobe Director Protected Cast file (.CXT)"); /* beautify ignore:start */ function detect() { const debug = 0; var p = 0xC, e = _BE, labl = [], txts = [], sz = -1, snds = 0, sndh = 0, snd = 0, hksz = 4, end = false, checklist = [false, false, false]; if (X.Sz() < 0x10) return; if(X.c("'RIFX'") && ["MV93","FGDM", "MC95", "FGDC"].includes(X.SA(8,4))) e = _BE; else if(X.c("'XFIR'") && ["39VM","MDGF", "59CM", "CDGF"].includes(X.SA(8,4))) e = _LE; else return; if((sz = 8+X.U32(4, e)) < 12) return; if(debug) var chunks = ""; while (p < X.Sz() && p < sz) { hkhd = X.SA(p, 4); hksz = X.U32(p + 4, e); //_l2r('cxt',p,hkhd+' ['+Hex(hksz)+']') if(debug) chunks += " " + hkhd + " [" + Hex(hksz) + "] @" + Hex(p); p += 8; if(hkhd.slice(0,3) === "CAS") checklist[0] = 1; else if(hkhd === "KEY*") checklist[1] = 1; else if(hkhd.slice(0,3) === "snd") checklist[2] = 1; switch (hkhd) { case "sndH": sndh++; break; case "sndS": snds++; break; case "snd ": snd++; break; } hksz += hksz & 1; //align p += hksz } // end of chunks if(!checklist[0] || !checklist[1] || !checklist[2]) return; bDetected = true; sVersion = e == _LE? "le": "be"; if (debug) if (chunks != "") _l2r('rifx',0,'chunks: ['+chunks+']'); if(X.isVerbose()) { sOption('snd:'+snd+' sndH:'+sndh+' sndS:'+snds+' sz:'+outSz(sz)) } return result(); } /* beautify ignore:end */ ================================================ FILE: db/Binary/audio_DSS.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG@kaens) meta("audio",""); /* beautify ignore:start */ function detect() { //ref https://ffmpeg.org/doxygen/trunk/dss_8c_source.html - but the ds2 files are different with no code in sight if(X.c("02'dss'") || X.c("03'dss'")) sName = "Digital Speech Standard audio (.DSS)"; else if(X.c("02'ds2'") || X.c("03'ds2'") || X.c("02'enc'") || X.c("03'enc'")) { sName = "Digital Speech Standard Pro audio (.DS2)"; } else return false; nv = X.U8(0); v1 = X.c("'dss'",1); hdrsz = nv * 0x200; if(X.Sz() < hdrsz) return false; tm = X.SA(0x26,12); if(charStat(tm,1).indexOf('allnum') < 0 || !isWithin(tm.slice(2,4),'01','12') || !isWithin(tm.slice(4,6),'01','31') || !isWithin(tm.slice(6,8),'00','23') || !isWithin(tm.slice(8,10),'00','59') || !isWithin(tm.slice(10,12),'00','59')) return false; // I'm not checking the year, what if this script (and indeed civilisation) survives until the 2100s! tm = '20'+tm.slice(0,2)+'-' + tm.slice(2,4)+'-' + tm.slice(4,6) + ' ' + tm.slice(6,8)+':' + tm.slice(8,10)+':' + tm.slice(10,12); dur = X.SA(0x3E,6); if(charStat(dur,1).indexOf('allnum') < 0 || !isWithin(dur.slice(2,4),'00','59') || !isWithin(dur.slice(4,6),'00','59')) return false; dur = dur.slice(0,2)+'h'+dur.slice(2,4)+'m'+dur.slice(4,6)+'s'; auth = X.readBytes(0xC,0x10); if(charStat(auth,1).indexOf('allxsc') < 0) return false; else auth = decEncoding(auth,CP437); if(v1) switch(cn = X.U8(0x2A4)) { case 0: co = 'DSS standard-play mode 11025Hz b/r '+(8*41*11025*512/(506*264)/1000).toFixed(3)+'k'; break; case 2: co = 'g723.1 long-play mode 8000Hz'; break; default: co = 'unknown ('+Hex(cn)+')' } else { cn = 0; co = 'DSS standard-play mode'; } if(cn == 0) asz = hdrsz+3750*(dur.slice(0,2) * 3600 + dur.slice(3,5) * 60 + dur.slice(6,8)); else asz = -1 cmt = ""; if(v1) { cmt = X.readBytes(0x31E,0x40); if(charStat(cmt,1).indexOf('allxsc') < 0) return false; else cmt = decEncoding(cmt,CP437) } else for(i = 0x240; i < 0x3A6; i += 60) { if((t = X.SC(i, 30, 'CP437').trim() + ': ' + X.SC(i+30, 30, 'CP437').trim()) != ': ') cmt = cmt.appendS(t,', ') } // TODO traverse the blocks to check the filesize bDetected = 1; sVersion = 'v'+nv; if(X.c("'enc'",1)) sVersion += ' encrypted'; if(X.isVerbose()) { sOptionT(auth,'by: '); sOption(tm,'on: '); sOption(cmt); sOption(co,'codec: '); sOption(dur,'duration: '); if(asz > 0) sOption('approx.filesize: '+(asz/0x100000).toFixed(2)+'M') } return result() } /* beautify ignore:end */ ================================================ FILE: db/Binary/audio_EXA.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG@kaens) meta("audio","Electronic Arts' EA-XA stream (.EXA)"); function detect() { // This one is built with sx.exe -sndstream %s.wav -=%s.exa //ref https://github.com/vgmstream/vgmstream/blob/master/src/meta/ea_schl.c if (X.Sz() < 0x20 || !X.c("'SC'")) return false; var cfg = X.U16(2,_BE) << 16, sc = sr = ch = nv = pf = cd1 = cd2 = -1, bps = 16, blke = _LE, e = X.U16(4)? _LE: _BE; var p = 0, hksz = 0, c = 0, eof = 0; for (; p < X.Sz() && !eof; ) { var hkhd = X.SA(p,4), hksz = X.U32(p+4, e); if(X.c("'SC'",p)) c++; switch (hkhd) { case 'SCHl': c++; q = p+8; pfid = X.SA(q,4); if (pfid !== 'GSTR' && pfid.slice(0,2) !== 'PT') { q += 4; pfid = X.SA(q,4) } //patching "nbapsstream" if(pfid === 'GSTR') { pf = 8/*generic*/; q += 4 } else if(pfid.slice(0,2) === 'PT') pf = X.U16(q+2,_LE); else return false; q += 4; function rd() { // bytecount being FF means custom data, > 4 we just skip here var r = 0, c = X.U8(q++); if (c == 0xFF) { q += 4+X.U32(q,_BE); return 0 } if (c > 4) { q += c; return 0 } for(; c > 0; c--) r = Util.shlu64(r,8) + X.U8(q++); return r } hdend = 0; while(!hdend && q < p+hksz && q < X.Sz()) { var tp = X.U8(q++); /* beautify ignore:start */ switch (tp) { case 0: if(!hdend) rd(); break; case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 0xA: case 0xB: case 0xC: case 0xD: case 0xE: case 0xF: case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x19: case 0x1B: case 0x1C: case 0x1D: case 0x1E: case 0x1F: case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: rd(); break; case 0xFC: case 0xFD: break; case 0x83: cd1 = rd(); break; case 0xA0: cd2 = rd(); break; case 0x80: nv = rd(); break; case 0x81: bps = rd(); break; case 0x82: ch = rd(); if (ch > 6) return false; break; case 0x84: sr = rd(); break; case 0x85: sc = rd(); break; case 0x86: case 0x87: /*lpst, lped(add 1)*/ case 0x88: case 0x89: case 0x94: case 0x95: case 0xA2: case 0xA3: /*ch ofs*/ case 0x8F: case 0x90: case 0x91: case 0xAB: case 0xAC: case 0xAD: /*dsp/n64blk coefs */ case 0x1A: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2A: /* rel lp ofs */ case 0x8C: /* play flags */ case 0x8A: case 0x8B: case 0x8D: case 0x8E: case 0x92: case 0x93: case 0x98: case 0x99: case 0x9C: case 0x9D: case 0x9E: case 0x9F: case 0xA6: case 0xA7: case 0xA1: rd(); break; case 0xFF: case 0xFE: hdend = 1; break; default: return false } } break; case 'SCCl': c++; break; case 'SCDl': c++; break; case 'SCEl': c++; /*→*/ case '': case '\xFF\xFF\xFF\xFF': eof = true; break; } p += hksz || 1; //avoids accidental ∞loops } //_l2r('exa',c,' ') if (eof || c > 3) { bDetected = true; if ([2,3,4,6,8,9,0xE,0x10].indexOf(pf) >= 0) blke = _BE; if (ch <= 0) ch = 1; if (nv == -1) if (pf <= 4) nv = 0; else if (pf <= 5) nv = 1; else if (pf <= 8) nv = 2; else if (pf <= 0x14) nv = 3; sVersion = 'v'+nv; if (cd1 < 0 && nv == 0) switch (pf) { // checks from Ctrl+F "codec1 defaults" case 0: case 3: case 4: cd1 = 0; break; // PC, MAC, SAT? PCM case 1: cd1 = 6; break; // PSX? VAG case 2: cd1 = 5; break; // N64? N64 :) default: bad = bad.addIfNone('!badcodec1'); } if (cd1 >= 0 && cd2 < 0) switch (cd1) { //converts from Ctrl+F "codec1 to codec2" case 0: if(pf == 0) cd2 = bps == 8? 2: (blke == _BE? 1: 0); else cd2 = bps == 8? 9: (blke == _BE? 7: 8); break; case 5: cd2 = 6; break; case 6: cd2 = 5; break; case 7: if(pf == 0 || pf == 3) cd2 = 3; else cd2 = 0xA; break; case 9: cd2 = 4; break; default: bad = bad.addIfNone('!badcodec1'); } if(cd2 < 0) switch(pf) { //plaform-wise codec defaults case 0: case 3: case 8: case 9: case 0xA: case 0xE: cd2 = 0xA; break; case 1: case 5: cd2 = 5; break; case 6: cd2 = 7; break; case 7: cd2 = 8; break; case 0x10: case 0x14: cd2 = 0x12; break; default: bad = bad.addIfNone('!badcodec2'); } if(sr < 0) switch(pf) {//platform-wise sample rate defaults case 0: case 1: case 2: case 3: case 4: case 5: case 0xA: sr = 22050; break; case 6: case 7: sr = 24000; break; case 0x10: case 0x14: sr = 32000; break; case 9: case 0xE: sr = 44100; break; case 8: sr = 48000; break; default: bad = bad.addIfNone('!badsmprate'); } /* beautify ignore:end */ if(!isWithin(pf,0,0x14)) sVersion += '#unk.platform'; else sVersion += '#'+['PC', 'Sony Playstation', 'Nintendo 64', 'MAC', 'Sega Saturn', 'Sony Playstation 2', 'Nintendo Gamecube/Wii', 'Microsoft Xbox', 'Generic', 'Microsoft X360', 'Sony PSP', 'pc-eaac', 'x360-eaac', 'psp-eaac', 'Sony Playstation 3', 'ps3-eaac', 'Nintendo Wii', 'wii-eaac', 'pc64-eaac', 'mobile-eaac', 'Nintendo 3DS'][pf]; // small letters mean unused, you don't expect to see those sVersion += blke == _LE? '/le': '/be'; if(blke != e) sVersion += '/file'+(e == _LE? '_le': '_be'); var codecs2 = ['S16LE_INT','S16BE_INT','S8_INT','EA-XA_INT','MT10','VAG','N64','S16BE','S16LE','S8','EA-XA', 'u8_int','cdxa','ima_int','layer1','Layer2','Layer3',,'GCADPCM','s24le_int','XboxADPCM','s24be_int','MT5', 'EALayer3','xas0_int','ealayer3_int','ATRAC3','ATRAC3+'], senc = isWithin(cd2,0,0x1B)? codecs2[cd2]: cd2<0? '': 'SND10'; if (X.isVerbose()) { sOption((senc.length?'codec:'+senc+' ':'')+ch+'ch '+sr+'Hz'+(bps>0?' '+bps+'bit':'') +' len '+secondsToTimeStr((sc/sr).toFixed(0))+' sz:'+outSz(p)); } } return result(); } ================================================ FILE: db/Binary/audio_FLAC.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens meta("audio", "FLAC waveform audio (.FLAC)"); function detect() { //ref https://xiph.org/flac/format.html#format_overview if (!File.compare("'fLaC'")) return; end = 0; p = 4; hk = hks = malformed = ""; ch = rate = bps = smp = smplen = sz = xa = xna = 0; seekt = -1; while (!end && p < File.getSize()) { t = File.read_uint8(p); if (p == 5 && (t & 0xFF)) return; last = t & 0x80; mdbt = t & 0x7F; mdsz = File.read_uint24(p + 1, _BE); p += 4; switch (mdbt) { case 0: hk = "STREAMINFO"; minb = File.read_uint16(p, _BE), maxb = File.read_uint16(p + 2, _BE), minf = File.read_uint24(p + 4, _BE), maxf = File.read_uint24(p + 7, _BE); if (minb < 16 || maxb > 65535 || minb > maxb) malformed += "!badblksz"; br = new BitReader(p + 10, _BE); rate = br.read(20); ch = 1 + br.read(3); bps = 1 + br.read(5); smp = br.read(36); smplen = smp / rate; break; case 1: hk = "PADDING"; break; case 2: hk = "APP"; s = File.read_ansiString(p, 4); switch (s) { //from https://xiph.org/flac/id.html on 2024-02-20 case "ATCH": hk += ":Flacfile"; break; case "BSOL": hk += ":beSolo"; break; case "BUGS": hk += ":Bugs Player"; break; case "Cues": hk += ":GoldWave"; break; case "Fica": hk += ":CUE Splitter"; break; case "Ftol": hk += ":flac-tools"; break; case "MOTB": hk += ":MOTB MetaCzar"; break; case "MPSE": hk += ":MP3 Stream Editor"; break; case "MuML": hk += ":MusicML"; break; case "RIFF": hk += ":Sound Devices RIFF c.s"; break; case "SFFL": hk += ":Sound Font FLAC"; break; case "SONY": hk += ":Sony Creative Software"; break; case "SQEZ": hk += ":flacsqueeze"; break; case "TtWv": hk += ":TwistedWave"; break; case "UITS": hk += ":UITS Embedding tools"; break; case "aiff": hk += ":FLAC AIFF c.s"; break; case "imag": hk += ":flac-image file"; break; case "peem": hk += ":Parseable Embedded Extensible Metadata"; break; case "qfst": hk += ":QFLAC Studio"; break; case "riff": hk += ":FLAC RIFF c.s (OpenMPT?)"; break; case "tune": hk += ":TagTuner"; break; case "w64 ": hk += ":FLAC Wave64 chunks"; break; case "xbat": hk += ":XBAT"; break; case "xbat": hk += ":xmcd"; break; default: hk += ":<" + s + ">" } break; case 3: hk = "SEEKTABLE"; seekt = p; hk += "#" + Math.floor(mdsz, 18); break; case 4: hk = "VORBIS_COMMENT"; break; case 5: hk = "CUESHEET"; xa = xna = 0; trkn = File.read_uint8(p + 0x18B); u = p + 0x18C; for (i = 0; i < trkn; i++) { u += 0x15; if (File.read_uint8(u++) & 0x80) xna++; else xa++; u += 0x0D; u += 12 * File.read_uint8(u++); } break; case 6: hk = "PICTURE"; break; case 0x7F: end = 1; hk = "frames"; break; default: hk = "unknown" + Hex(mdbt) } if (hk != "frames") hks = hks.append("[" + hk + "]"); p += mdsz; if (last) end = 1; } if (sz < p) sz = p; t = p + (smp * bps * ch >> 3); if (sz < t) sz = t; _log("t:" + t) if (seekt >= 0) for (i = 0; i < mdsz / 18; i++) { smpn = File.read_uint64(seekt + i * 18, _BE); seek = p + File.read_uint64(seekt + 8 + i * 18, _BE); st = seek + (File.read_uint16(seekt + 16 + i * 18, _BE) * bps * ch >> 3); if (sz < st) sz = st } end = 0; if (!smp && File.isDeepScan()) while (!end && p < File.getSize()) { end = 1 // TODO. Or not to do, this is the question >__> But prolly do; no other way to always find filesize } if (malformed) sVersion += malformed; bDetected = 1; if (Binary.isVerbose()) { sOption(Math.floor(smplen / 60) + ":" + (Math.floor(smplen) % 60).padStart(2, '0')); if (xa > 1 || xna) sOption("x" + xa + "+" + xna); //audio and non-audio tracks sOption(hks); sOption(rate + "Hz ch:" + ch + " bps:" + bps);//+" sz:"+sz); if (minb === maxb) sOption("fixed-size stream"); } return result(); } ================================================ FILE: db/Binary/audio_FSB.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Status: WIP meta("audio", "FMOD Sample Bank (.FSB)"); function detect() { if (Binary.getSize() >= 0x24) { if (Binary.compare("'FSB'..")) { var nSamples, nExtVer, nMode; var sID = Binary.getString(0, 4); sVersion = sID; bDetected = true; switch (sID) { case "FSB1": nSamples = Binary.read_int32(0x04); break; case "FSB2": nSamples = Binary.read_int32(0x04); break; case "FSB3": nSamples = Binary.read_int32(0x04); nExtVer = Binary.read_int32(0x10); nMode = Binary.read_int32(0x14); break; case "FSB4": nSamples = Binary.read_int32(0x04); nExtVer = Binary.read_int32(0x10); nMode = Binary.read_int32(0x14); break; case "FSB5": nSamples = Binary.read_int32(0x08); nExtVer = Binary.read_int32(0x10); nMode = Binary.read_int32(0x18); switch (nMode) { case 0x01: sOption("PCM8"); break; // 8bit integer PCM data. case 0x02: sOption("PCM16"); break; // 16bit integer PCM data. case 0x03: sOption("PCM24"); break; // 24bit integer PCM data. case 0x04: sOption("PCM32"); break; // 32bit integer PCM data. case 0x05: sOption("PCMFLOAT"); break; // 32bit floating point PCM data. case 0x06: sOption("GCADPCM"); break; // Compressed Nintendo 3DS/Wii DSP data. case 0x07: sOption("IMA ADPCM"); break; // Compressed IMA ADPCM data. case 0x08: sOption("VAG"); break; // Compressed PlayStation Portable ADPCM data. case 0x09: sOption("HEVAG"); break; // Compressed PSVita ADPCM data. case 0x0A: sOption("XMA"); break; // Compressed Xbox360 XMA data. case 0x0B: sOption("MP3"); break; // Compressed MPEG layer 2 or 3 data. case 0x0C: sOption("CELT"); break; // Compressed CELT data. case 0x0D: sOption("AT9"); break; // Compressed PSVita ATRAC9 data. case 0x0E: sOption("XWMA"); break; // Compressed Xbox360 xWMA data. case 0x0F: sOption("VORBIS"); break; // Compressed Vorbis data. case 0x10: sOption("FADPCM"); break; case 0x11: sOption("OPUS"); break; default: bDetected = false; } break; default: bDetected = false; } sOption("Samples:" + nSamples); } } return result(); } ================================================ FILE: db/Binary/audio_HMI.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://moddingwiki.shikadi.net/wiki/Human_Machine_Interfaces_MIDI_Format meta("audio", "Human Machine Interfaces"); function detect() { if (Binary.compare("'HMI-MIDISONG061595'0000000000000000000000000000000000000000ff00ffffffffff01")) { sVersion = "2.0"; sOptions = "MIDI"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/audio_OGG.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://file-recovery.com/ogg-signature-format.htm meta("audio", "Vorbis"); function detect() { if (Binary.compare("'OggS'00020000000000000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/audio_PAF.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Created with Audiacity // https://www.filetypeadvisor.com/extension/paf meta("audio", "Ensoniq PARIS (.PAF)"); function detect() { if (Binary.compare("20'paf'00000000000000000000AC44")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/audio_PVF.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Created with Audiacity // https://fileinfo.com/extension/pvf meta("audio", "Portable Voice Format (.PVF)"); function detect() { if (Binary.compare("'PVF'")) { var freq = Binary.getString(7, 5).trim(); if (/^[0-9]{5}/.test(freq)) { if (X.isVerbose()) sVersion = freq; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/audio_RIFF-IMA.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kae // https://github.com/vgmstream/vgmstream/blob/master/src/meta/riff_ima.c meta("audio", "Nintendo DS RIFF IMA-ADPCM stream (.STRM,.BIN,.LBIN)"); function detect() { if (X.c("'RIFF'") && X.c("'IMA '", 8) && X.U32(0xC) && X.U32(4) >= 0x2D) { bDetected = true; if (X.isVerbose()) { var ch = X.U32(0x24), len = Util.divu64((X.U32(4) - 0x2C) << 8, X.U16(0xC)) >> 8; sOption( 'ch:' + ch + ' len ' + secondsToTimeStr(len) + ' s/r:' + X.U32(0xC) + 'Hz ' + ['not looped', 'looped'][+(X.U32(0x20) != 0)] + ' sz:' + outSz(X.U32(4)) ); } } return result(); } ================================================ FILE: db/Binary/audio_SOU.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php/SCUMM/Technical_Reference/Sound_resources#v5-v6_-_MONSTER.SOU meta("audio", "SOU"); function detect() { if (Binary.compare("'SOU'2000000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/audio_STRM.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kae // https://github.com/Gota7/NitroStudio2/blob/master/docs/specs/stream.md meta("audio", "Nintendo DS multi-channel stream (.STRM)"); function detect() { if ((!X.c("'STRM'FE") && !X.c("'STRM'FF")) || X.U8(4) == X.U8(5) || X.U8(5) < 0xFE || !X.c("'HEAD'", 0x10)) return; var e = X.U8(4) == 0xFF ? _LE : _BE, dp = 0x10 + X.U32(0x14, e); if (X.U8(0x19) > 1 || dp > X.Sz()) return; if (!X.c("'DATA'", dp) || X.U32(0x28, e) != dp + 8 || X.U32(8, e) != dp + X.U32(dp + 4, e)) return; bDetected = true; sVersion = ['PCM8s', 'PCM16', 'IMA-ADPCM'][X.U8(0x18)] + '/' + (e == _LE ? 'le' : 'be'); if (X.isVerbose()) { var ch = X.U8(0x1A), len = (X.U32(0x24, e) / X.U16(0x1C, e)).toFixed(0); sOption( 'ch:' + ch + ' len ' + secondsToTimeStr(len) + ' s/r:' + X.U16(0x1C, e) + 'Hz ' + ['not looped', 'looped'][X.U8(0x19)] + ' sz:' + outSz(X.U32(dp + 4, e) + dp) ); } return result(); } ================================================ FILE: db/Binary/audio_STRM.2.sg ================================================ // Detect It Easy: detection rule file // Author: Kae meta("audio", "José Ramón 'Gryzor87' García/Abylight's Nintendo 3DS stream (.STRM)"); function detect() { //ref https://github.com/Gota7/NitroStudio2/blob/master/docs/specs/stream.md if (!X.c("'STRM'E8030000") || !X.U32(0x10) || X.U32(0x18) < 0x1F || (sz=X.U32(0x10)) != X.U32(0x18)) return; bDetected = true; if (X.isVerbose()) { const m = Math.min(sz, X.Sz()); var sr = X.U32(8), len = 0; if (X.isDeepScan()) for(p=0x1E; p < m; len++) { // parse AAC to count samples var fsy = (X.U16(p,_BE) >> 4) & 0xFFF, fsz = (X.U32(p+2,_BE) >> 5) & 0x1FFF; if(fsy != 0xFFF || fsz <= 8) break; p += fsz } if(p < m) sVersion = 'malformed!badAAC'; len = (len * 1024 / sr).toFixed(0); sOption((len?'len '+secondsToTimeStr(len)+' ':'')+'s/r:'+sr+'Hz'+' sz:'+outSz(0x1E+sz)) } return result(); } ================================================ FILE: db/Binary/audio_ShockwaveAudio.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://preservation.tylerthorsted.com/2023/08/04/shockwave-audio/ meta("audio", "Shockwave Audio"); function detect() { if (Binary.compare("000001..00000003")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/audio_TUN.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Lego Racers // https://fileinfo.com/extension/tun meta("audio", "TUN"); function detect() { if (Binary.compare("'ALP'")) { var soundOption = Binary.getString(8, 5).trim(); if (/^[A-Z]{5}$/.test(soundOption)) { if (X.isVerbose()) sOptions = soundOption; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/audio_VOC.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens TG@kaens meta("audio", "Creative (Sound Blaster) Voice waveform (.VOC)"); /* beautify ignore:start */ function detect() { //from https://sourceforge.net/p/sox/code/ci/master/tree/src/voc.c bad = ''; if (!X.c("'Creative Voice File'1A")) if (X.c("'Creative Voice File'..1A")) bad = bad.addIfNone('!bad1Asig'); else return false; nV = X.U16(0x16); if ((((~nV) + 0x1234) & 0xFFFF) != X.U16(0x18)) return false; //version validation codec = ''; function getCodec(bCodec) { switch (bCodec) { case 0: codec = '8-bit uPCM'; break; case 1: codec = 'Creative 8 to 4-bit ADPCM'; break; case 2: codec = 'Creative 8 to 3-bit ADPCM'; break; case 3: codec = 'Creative 8 to 2-bit ADPCM'; break; case 4: codec = '16-bit sPCM'; break; case 5: codec = 'CCITT a-Law'; break; case 6: codec = 'CCITT u-Law'; break; case 0x2000: codec = 'Creative 16 to 4-bit ADPCM'; break; default: codec = "invalid codec " + Hex(bCodec) } return codec } sV = nV.toString(16).padStart(4, '0'); sVersion = 'v' + sV[1] + '.' + sV.slice(2, 4); bn = sz = -1; // block counter, expected filesize extended = z = false; // "extended info overrides" flag, 0 (terminator) flag p = 0x1A; rate = Hz = bps = bCodec = 0; info = []; while (p < (X.isDeepScan() ? X.Sz() : 0xFFFF) && !z) { //scan blocks bst = p; bhd = X.U8(p++); bn++; // block start, header byte, number bsz = X.U24(p); p += 3; at = '';// '@'+Hex(bst)+'['+bn+']: '; switch (bhd) { case 0: info.push(at + 'EoF'); p -= 3; z = true; break; case 1: // sound data if (!extended) { rate = 1000000 / (256 - X.U8(p)); Hz = rate < 100000 ? Math.round(rate) + "Hz" : (rate / 1000).toFixed(1) + 'kHz'; bCodec = X.U8(p + 1); } info.push(at + 'audio data in ' + codec + ' at ' + Hz/*+' ->'+Hex(p+bsz)*/); //if extended, treat as case 2 p += bsz; break; case 2: // sound data continues p += bsz; break; case 3: // silence len = X.U16(p) + 1; rate = 1000000 / (256 - X.U8(p + 2)); Hz = rate < 100000 ? Math.round(rate) + "Hz" : (rate / 1000).toFixed(1) + 'kHz'; info.push(at + 'silence (' + (len / rate).toFixed(2) + ' sec at ' + Hz + ')'); p += bsz; break; case 4: // marker info.push(at + 'marker #' + X.U16(p)); p += bsz; break; case 5: // asciiz string s = X.SA(p, bsz); p += bsz; info.push(at + '"' + s + '"'); break; case 6: n = X.U16(p); p += bsz; info.push(at + (n == 0xFFFF ? 'infinite' : n) + ' repeats { '); break; case 7: info.push(at + 'end repeat }'); break; case 8: //extended info if (!extended) { chn = X.U8(p + 3) + 1; rate = 256000000 / (chn * (65536 - X.U16(p))); Hz = rate < 100000 ? Math.round(rate) + "Hz" : (rate / 1000).toFixed(1) + 'kHz'; bCodec = X.U8(p + 2); } extended = true; p += bsz; info.push(at + 'set to ' + getCodec(bCodec) + ' at ' + Hz + ', ' + chn + 'chn'); break; case 9: // new-format audio data if (nV < 0x112) bad = bad.addIfNone('!badver'); rate = X.U32(p); if (!rate) bad = bad.addIfNone('!badrate@' + Hex(bst)); z = true; break; Hz = rate < 100000 ? rate + "Hz" : (rate / 1000).toFixed(1) + 'kHz'; bps = X.U8(p + 4); chn = X.U8(p + 5); bCodec = X.U16(p + 6); info.push(at + 'audio in ' + bps + 'bps ' + getCodec(bCodec) + ' at ' + Hz + ', ' + chn + 'chn '/*+'->'+Hex(bsz)*/); p += bsz; break; default: bad = bad.addIfNone('!invalidblock@' + Hex(bst)); z = true; } if (p == X.Sz()) z = true; if (X.isDeepScan()) if (p > X.Sz()) bad = bad.addIfNone('!short'); // for ripping, we should test this in each audiodata block else sz = p } bDetected = true; if (bad != '') sVersion = sVersion.appendS('malformed' + addEllipsis(bad, 0x80, 0x40), '/') if (X.isVerbose()) { sOption(addEllipsis(info.join('; '), 0x200, 0x100)); sOption(outSz(sz), 'sz:') } return result(); } /* beautify ignore:end */ ================================================ FILE: db/Binary/audio_WAV.1.sg ================================================ // Detect It Easy: detection rule file // Authors: Levis // Jason Hood // Kaens (TG @kaens) // ref. official RIFF WAVE format doc; vgmstream > riff.c, msadpcm_decoder.c meta("audio", "RIFF container/WAVE file (.WAV)"); /* beautify ignore:start */ function detect() { const debug = 0; var p = 0xC, e = _BE, labl = [], txts = [], dcsamples = cue = 0, nFormat = nRate = nChannels = nBPS = 0, dur = -1, sz = -1, lp = 0, fmtsz = 0, datasz = 0, hksz = 4, hkhd = "", title = "", dt = "", by = "", genre = "", cms = "", cmt = "", cop = "", sft = "", end = false, checklist = [false, false, false]; if (X.Sz() < 36) return; if(X.c("'RIFF'........'WAVE'")) e = _LE; else if(X.c("'RIFX'........'WAVE'")) e = _BE; else return; if((sz = 8+X.U32(4, e)) < 12) return; function msadpcm_check_coefs(o) { //returns new offset or -1 for a failed check const coefs = [ [256,0], [512,-256], [0,0], [ 192,64], [240, 0], [460,-208], [392,-232] ]; var c = X.U16(o, e); if(c != 7) return -1; o += 2; for(var i=0; i < 7; i++,o+=4) { var c1 = X.I16(o, e), c2 = X.I16(o + 2, e); if (c1 != coefs[i][0] || c2 != coefs[i][1]) return -1; } return o } if(sz-8 >= X.Sz() && X.c("'NXBF'",0x24)) sz = X.Sz(); if(debug) var chunks = ""; while (p < X.Sz() && p < sz) { hkhd = X.SA(p, 4); hksz = X.U32(p + 4, e); if(debug) chunks += " " + hkhd + " [" + Hex(hksz) + "] @" + Hex(p); p += 8; switch (hkhd) { case "fmt ": checklist[0] = true; fmtsz = hksz; nFormat = X.U16(p, e); nChannels = X.U16(p + 2, e); nRate = X.U32(p + 4, e); nBlockSize = X.U16(p + 0xC, e); nBPS = X.U16(p + 0x0E, e); switch (nFormat) { case 0x0000: sVersion = "Yamaha AICA ADPCM (unofficial)"; if(sz-4 == X.Sz()) sz -= 4; else if(sz-8 == X.Sz()) sz -= 8; else if(sz+2 == X.Sz()) sz -= 2; if(hksz == 0x12) hksz += 2; break; case 0x0001: if((nBPS & 7) || !isWithin(nBPS, 8,32)) return; sVersion = "Microsoft PCM" + (nBPS == 32? "32_le": nBPS == 24? "24_le": nBPS == 16? "16":"8U") +" (uncompressed)"; break; case 0x0002: if(nBPS == 4) { if(msadpcm_check_coefs(p+0x14) < 0) { if(debug)_l2r('wav',2,'coefs are off'); return } } else if(nBPS == 16 && nBlockSize == 2*nChannels && sz >= 0x14-8) sVersion = "MS-IMA ADPCM"; else sVersion = "Microsoft ADPCM"; break; case 0x0003: if(nBPS != 32) return; sVersion = "Microsoft IEEE float"; break; case 0x0004: sVersion = "Compaq VSELP"; break; case 0x0005: sVersion = "IBM CVSD"; break; case 0x0006: sVersion = "ITU G.711 a-law"; break; case 0x0007: sVersion = "ITU G.711 u-law"; break; case 0x0008: sVersion = "Microsoft DTS"; break; case 0x0009: sVersion = "DRM"; break; case 0x000A: sVersion = "WMA 9 Speech"; break; case 0x000B: sVersion = "Microsoft Windows Media RT Voice"; break; case 0x0010: sVersion = "OKI-ADPCM"; break; case 0x0011: if(nBPS == 4) sVersion = "MS-IMA ADPCM"; else sVersion = "Intel IMA/DVI-ADPCM"; if((sz-8) >> 2 == X.U32(0x30, e)) sz = X.Sz(); else if(X.Sz()-sz-0x10 <= 0x900 && X.c("'cont'",sz)) sz += 8+X.U32(sz+4, e); break; case 0x0012: sVersion = "Videologic Mediaspace ADPCM"; break; case 0x0013: sVersion = "Sierra ADPCM"; break; case 0x0014: sVersion = "Antex G.723 ADPCM"; break; case 0x0015: sVersion = "DSP Solutions DIGISTD"; break; case 0x0016: sVersion = "DSP Solutions DIGIFIX"; break; case 0x0017: sVersion = "Dialogic OKI ADPCM"; break; case 0x0018: sVersion = "Media Vision ADPCM"; break; case 0x0019: sVersion = "HP CU"; break; case 0x001A: sVersion = "HP Dynamic Voice"; break; case 0x0020: if(nBPS == 4) sVersion = "Yamaha AICA ADPCM"; else sVersion = "Yamaha ADPCM"; break; case 0x0021: sVersion = "SONARC Speech Compression"; break; case 0x0022: sVersion = "DSP Group True Speech"; break; case 0x0023: sVersion = "Echo Speech Corp."; break; case 0x0024: sVersion = "Virtual Music Audiofile AF36"; break; case 0x0025: sVersion = "Audio Processing Tech."; break; case 0x0026: sVersion = "Virtual Music Audiofile AF10"; break; case 0x0027: sVersion = "Aculab Prosody 1612"; break; case 0x0028: sVersion = "Merging Tech. LRC"; break; case 0x0030: sVersion = "Dolby AC2"; break; case 0x0031: sVersion = "Microsoft GSM610"; break; case 0x0032: sVersion = "MSN Audio"; break; case 0x0033: sVersion = "Antex ADPCM"; break; case 0x0034: sVersion = "Control Resources VQLPC"; break; case 0x0035: sVersion = "DSP Solutions DIGIREAL"; break; case 0x0036: sVersion = "DSP Solutions DIGIADPCM"; break; case 0x0037: sVersion = "Control Resources CR10"; break; case 0x0038: sVersion = "Natural MicroSystems VBX ADPCM"; break; case 0x0039: sVersion = "Crystal Semiconductors IMA ADPCM"; break; case 0x003A: sVersion = "Echo Speech ECHOSC3"; break; case 0x003B: sVersion = "Rockwell ADPCM"; break; case 0x003C: sVersion = "Rockwell DIGITALK"; break; case 0x003D: sVersion = "Xebec Multimedia"; break; case 0x0040: sVersion = "Antex G.721 ADPCM"; break; case 0x0041: sVersion = "Antex G.728 CELP"; break; case 0x0042: sVersion = "Microsoft MSG723"; break; case 0x0043: sVersion = "IBM AVC ADPCM"; break; case 0x0045: sVersion = "ITU-T G.726"; break; case 0x0050: sVersion = "Microsoft MPEG"; break; case 0x0051: sVersion = "RT23 or PAC"; break; case 0x0052: sVersion = "InSoft RT24"; break; case 0x0053: sVersion = "InSoft PAC"; break; case 0x0055: sVersion = "MP3"; break; case 0x0059: sVersion = "Cirrus"; break; case 0x0060: sVersion = "Cirrus Logic"; break; case 0x0061: sVersion = "ESS Tech. PCM"; break; case 0x0062: sVersion = "Voxware Inc."; break; case 0x0063: sVersion = "Canopus ATRAC"; break; case 0x0064: sVersion = "APICOM G.726 ADPCM"; break; case 0x0065: sVersion = "APICOM G.722 ADPCM"; break; case 0x0066: sVersion = "Microsoft DSAT"; break; case 0x0067: sVersion = "Microsoft DSAT-DISPLAY"; break; case 0x0069: if(nBPS == 4) sVersion = "XBOX IMA ADPCM"; else sVersion = "Voxware Byte Aligned"; if(sz-8 == X.Sz()) sz -= 8; else if(sz-4 == X.Sz()) sz -= 4; else if(sz+8 == X.Sz()) sz += 8; break; case 0x0070: sVersion = "Voxware ACB"; break; case 0x0071: sVersion = "Voxware AC10"; break; case 0x0072: sVersion = "Voxware AC16"; break; case 0x0073: sVersion = "Voxware AC20"; break; case 0x0074: sVersion = "Voxware MetaVoice"; break; case 0x0075: sVersion = "Voxware MetaSound"; break; case 0x0076: sVersion = "Voxware RT29HW"; break; case 0x0077: sVersion = "Voxware VR12"; break; case 0x0078: sVersion = "Voxware VR18"; break; case 0x0079: sVersion = "Voxware TQ40"; break; case 0x007A: if(extIs('med')) { if(nBPS == 4) sVersion = "4-bit MS-IMA ADPCM"; else if(nBPS == 3) sVersion = "3-bit MS-IMA ADPCM"; else sVersion = "Voxware SC3/med" } else sVersion = "Voxware SC3"; break; case 0x007B: sVersion = "Voxware SC3"; break; case 0x0080: sVersion = "Soundsoft"; break; case 0x0081: sVersion = "Voxware TQ60"; break; case 0x0082: sVersion = "Microsoft MSRT24"; break; case 0x0083: sVersion = "AT&T G.729A"; break; case 0x0084: sVersion = "Motion Pixels MVI-MV12"; break; case 0x0085: sVersion = "DataFusion G.726"; break; case 0x0086: sVersion = "DataFusion GSM610"; break; case 0x0088: sVersion = "Iterated Systems Audio"; break; case 0x0089: sVersion = "Onlive"; break; case 0x008A: sVersion = "Multitude, Inc. FT SX20"; break; case 0x008B: sVersion = "Infocom IT’S A/S G.721 ADPCM"; break; case 0x008C: sVersion = "Convedia G729"; break; case 0x008D: sVersion = "Congruency, Inc. (not specified)"; break; case 0x0091: sVersion = "Siemens SBC24"; break; case 0x0092: sVersion = "Sonic Foundry Dolby AC3 APDIF"; break; case 0x0093: sVersion = "MediaSonic G.723"; break; case 0x0094: sVersion = "Aculab Prosody 8kbps"; break; case 0x0097: sVersion = "ZyXEL ADPCM"; break; case 0x0098: sVersion = "Philips LPCBB"; break; case 0x0099: sVersion = "Studer Professional Audio Packed"; break; case 0x00A0: sVersion = "Maiden PhonyTalk"; break; case 0x00A1: sVersion = "Racal Recorder GSM"; break; case 0x00A2: sVersion = "Racal Recorder G720.a"; break; case 0x00A3: sVersion = "Racal G723.1"; break; case 0x00A4: sVersion = "Racal Tetra ACELP"; break; case 0x00B0: sVersion = "NEC AAC NEC Corporation"; break; case 0x00FF: sVersion = "AAC"; break; case 0x0100: sVersion = "Rhetorex ADPCM"; break; case 0x0101: sVersion = "IBM u-Law"; break; case 0x0102: sVersion = "IBM a-Law"; break; case 0x0103: sVersion = "IBM ADPCM"; break; case 0x0111: sVersion = "Vivo G.723"; break; case 0x0112: sVersion = "Vivo Siren"; break; case 0x0120: sVersion = "Philips Speech Processing CELP"; break; case 0x0121: sVersion = "Philips Speech Processing GRUNDIG"; break; case 0x0123: sVersion = "Digital G.723"; break; case 0x0125: sVersion = "Sanyo LD ADPCM"; break; case 0x0130: sVersion = "Sipro Lab ACEPLNET"; break; case 0x0131: sVersion = "Sipro Lab ACELP4800"; break; case 0x0132: sVersion = "Sipro Lab ACELP8V3"; break; case 0x0133: sVersion = "Sipro Lab G.729"; break; case 0x0134: sVersion = "Sipro Lab G.729A"; break; case 0x0135: sVersion = "Sipro Lab Kelvin"; break; case 0x0136: sVersion = "VoiceAge AMR"; break; case 0x0140: sVersion = "Dictaphone G.726 ADPCM"; break; case 0x0150: sVersion = "Qualcomm PureVoice"; break; case 0x0151: sVersion = "Qualcomm HalfRate"; break; case 0x0155: sVersion = "Ring Zero Systems TUBGSM"; break; case 0x0160: sVersion = "Microsoft Audio1"; break; case 0x0161: sVersion = "Windows Media Audio V2 V7 V8 V9 / DivX audio (WMA) / Alex AC3 Audio"; break; case 0x0162: sVersion = "Windows Media Audio Professional V9"; break; case 0x0163: sVersion = "Windows Media Audio Lossless V9"; break; case 0x0164: sVersion = "WMA Pro over S/PDIF"; break; case 0x0170: sVersion = "UNISYS NAP ADPCM"; break; case 0x0171: sVersion = "UNISYS NAP ULAW"; break; case 0x0172: sVersion = "UNISYS NAP ALAW"; break; case 0x0173: sVersion = "UNISYS NAP 16K"; break; case 0x0174: sVersion = "MM SYCOM ACM SYC008 SyCom Technologies"; break; case 0x0175: sVersion = "MM SYCOM ACM SYC701 G726L SyCom Technologies"; break; case 0x0176: sVersion = "MM SYCOM ACM SYC701 CELP54 SyCom Technologies"; break; case 0x0177: sVersion = "MM SYCOM ACM SYC701 CELP68 SyCom Technologies"; break; case 0x0178: sVersion = "Knowledge Adventure ADPCM"; break; case 0x0180: sVersion = "Fraunhofer IIS MPEG2AAC"; break; case 0x0190: sVersion = "Digital Theater Systems DTS DS"; break; case 0x0200: sVersion = "Creative Labs ADPCM"; break; case 0x0202: sVersion = "Creative Labs FASTSPEECH8"; break; case 0x0203: sVersion = "Creative Labs FASTSPEECH10"; break; case 0x0210: sVersion = "UHER ADPCM"; break; case 0x0215: sVersion = "Ulead DV ACM"; break; case 0x0216: sVersion = "Ulead DV ACM"; break; case 0x0220: sVersion = "Quarterdeck Corp."; break; case 0x0230: sVersion = "I-Link VC"; break; case 0x0240: sVersion = "Aureal Semiconductor Raw Sport"; break; case 0x0241: sVersion = "ESST AC3"; break; case 0x0250: sVersion = "Interactive Products HSX"; break; case 0x0251: sVersion = "Interactive Products RPELP"; break; case 0x0260: sVersion = "Consistent CS2"; break; case 0x0270: sVersion = "ATRAC3/Sony SCX"; break; case 0x0271: sVersion = "Sony SCY"; break; case 0x0272: sVersion = "Sony ATRAC3"; break; case 0x0273: sVersion = "Sony SPC"; break; case 0x0280: sVersion = "TELUM Telum Inc."; break; case 0x0281: sVersion = "TELUMIA Telum Inc."; break; case 0x0285: sVersion = "Norcom Voice Systems ADPCM"; break; case 0x0300: if(sz-8 == X.Sz()) sz -= 8; if(nBPS == 4 && nBlockSize == 0x400*nChannels && sz == 0x14-8 && nChannels == 1) sVersion = "DVI IMA"; else sVersion = "Fujitsu FM TOWNS SND"; break; case 0x0301: sVersion = "Fujitsu (not specified)"; break; case 0x0302: sVersion = "Fujitsu (not specified)"; break; case 0x0303: sVersion = "Fujitsu (not specified)"; break; case 0x0304: sVersion = "Fujitsu (not specified)"; break; case 0x0305: sVersion = "Fujitsu (not specified)"; break; case 0x0306: sVersion = "Fujitsu (not specified)"; break; case 0x0307: sVersion = "Fujitsu (not specified)"; break; case 0x0308: sVersion = "Fujitsu (not specified)"; break; case 0x0350: sVersion = "Micronas Semiconductors, Inc. Development"; break; case 0x0351: sVersion = "Micronas Semiconductors, Inc. CELP833"; break; case 0x0400: sVersion = "Brooktree Digital"; break; case 0x0401: sVersion = "Intel Music Coder (IMC)"; break; case 0x0402: sVersion = "Ligos Indeo Audio"; break; case 0x0450: sVersion = "QDesign Music"; break; case 0x0500: sVersion = "On2 VP7 On2 Technologies"; break; case 0x0501: sVersion = "On2 VP6 On2 Technologies"; break; case 0x0555: sVersion = "Level-5 4-bit ADPCM"; //unofficial var fsz = sz+4*(X.U16(0x16, e)-1); if (fsz < X.Sz() && X.Sz() - fsz < 0x10) sz = fsz; break; case 0x0680: sVersion = "AT&T VME VMPCM"; break; case 0x0681: sVersion = "AT&T TCP"; break; case 0x0700: sVersion = "YMPEG Alpha (dummy for MPEG-2 compressor)"; break; case 0x08AE: sVersion = "ClearJump LiteWave (lossless)"; break; case 0x1000: sVersion = "Olivetti GSM"; break; case 0x1001: sVersion = "Olivetti ADPCM"; break; case 0x1002: sVersion = "Olivetti CELP"; break; case 0x1003: sVersion = "Olivetti SBC"; break; case 0x1004: sVersion = "Olivetti OPR"; break; case 0x1100: sVersion = "Lernout & Hauspie"; break; case 0x1101: sVersion = "Lernout & Hauspie CELP"; break; case 0x1102: sVersion = "Lernout & Hauspie SBC"; break; case 0x1103: sVersion = "Lernout & Hauspie SBC"; break; case 0x1104: sVersion = "Lernout & Hauspie SBC"; break; case 0x1400: sVersion = "Norris Comm. Inc."; break; case 0x1401: sVersion = "ISIAudio"; break; case 0x1500: sVersion = "AT&T Soundspace Music Compression"; break; case 0x181C: sVersion = "VoxWare RT24 speech"; break; case 0x181E: sVersion = "Lucent elemedia AX24000P Music"; break; case 0x1971: sVersion = "Sonic Foundry LOSSLESS"; break; case 0x1979: sVersion = "Innings Telecom Inc. ADPCM"; break; case 0x1C07: sVersion = "Lucent SX8300P speech"; break; case 0x1C0C: sVersion = "Lucent SX5363S G.723 compliant"; break; case 0x1F03: sVersion = "CUseeMe DigiTalk (ex-Rocwell)"; break; case 0x1FC4: sVersion = "NCT Soft ALF2CD ACM"; break; case 0x2000: sVersion = "FAST Multimedia DVM"; break; case 0x2001: sVersion = "Dolby DTS"; break; case 0x2002: sVersion = "RealAudio 1 / 2 14.4"; break; case 0x2003: sVersion = "RealAudio 1 / 2 28.8"; break; case 0x2004: sVersion = "RealAudio G2 / 8 Cook (low bitrate)"; break; case 0x2005: sVersion = "RealAudio 3 / 4 / 5 Music (DNET)"; break; case 0x2006: sVersion = "RealAudio 10 AAC (RAAC)"; break; case 0x2007: sVersion = "RealAudio 10 AAC+ (RACP)"; break; case 0x2500: sVersion = "Reserved range to 0x2600 Microsoft"; break; case 0x3313: sVersion = "makeAVIS (ffvfw fake AVI sound from AviSynth scripts)"; break; case 0x4143: sVersion = "Divio MPEG-4 AAC audio"; break; case 0x4201: sVersion = "Nokia adaptive multirate"; break; case 0x4243: sVersion = "Divio G726 Divio, Inc."; break; case 0x434C: sVersion = "LEAD Speech"; break; case 0x564C: sVersion = "LEAD Vorbis"; break; case 0x5756: sVersion = "WavPack Audio"; break; case 0x674F: sVersion = "Ogg Vorbis (mode 1)"; break; case 0x6750: sVersion = "Ogg Vorbis (mode 2)"; break; case 0x6751: sVersion = "Ogg Vorbis (mode 3)"; break; case 0x676F: sVersion = "Ogg Vorbis (mode 1+)"; break; case 0x6770: sVersion = "Ogg Vorbis (mode 2+)"; break; case 0x6771: sVersion = "Ogg Vorbis (mode 3+)"; break; case 0x7000: sVersion = "3COM NBX 3Com Corporation"; break; case 0x706D: sVersion = "FAAD AAC"; break; case 0x7A21: sVersion = "GSM-AMR (CBR, no SID)"; break; case 0x7A22: sVersion = "GSM-AMR (VBR, including SID)"; break; case 0xA100: sVersion = "Comverse Infosys Ltd. G723 1"; break; case 0xA101: sVersion = "Comverse Infosys Ltd. AVQSBC"; break; case 0xA102: sVersion = "Comverse Infosys Ltd. OLDSBC"; break; case 0xA103: sVersion = "Symbol Technologies G729A"; break; case 0xA104: sVersion = "VoiceAge AMR WB VoiceAge Corporation"; break; case 0xA105: sVersion = "Ingenient Technologies Inc. G726"; break; case 0xA106: sVersion = "ISO/MPEG-4 advanced audio Coding"; break; case 0xA107: sVersion = "Encore Software Ltd G726"; break; case 0xA109: sVersion = "Speex ACM Codec xiph.org"; break; case 0xDFAC: sVersion = "DebugMode SonicFoundry Vegas FrameServer ACM"; break; case 0xF1AC: sVersion = "Free Lossless Audio Codec FLAC"; break; case 0xFFFE: sVersion = "Extensible"; var guid1 = X.U32(0x20, _LE), guid2 = (X.U16(0x24, _LE) << 16) | X.U16(0x26, _LE), guid3 = X.U32(0x28,_BE), guid4 = X.U32(0x2C,_BE); if(guid1 == 1 && guid2 == 0x10 && guid3 == 0x800000AA && guid4 == 0x00389B71) if(nBPS == 16) sVersion += ":PCM16"; if(guid1 == 0xE923AABF && guid2 == 0xCB584471 && guid3 == 0xA119FFFA && guid4 == 0x01E4CE62) sVersion += ":ATRAC3+"; if(guid1 == 0x47E142D2 && guid2 == 0x36BA4D8D && guid3 == 0x88FC6165 && guid4 == 0x4F8C836C) sVersion += ":ATRAC9"; if(sz +0x18 == X.Sz()) sz += 0x18; else if(sz+0x38 == X.Sz()) sz += 0x38; else if(sz+0x40 == X.Sz()) sz -= 0x40; break; case 0xFFFF: sVersion = "Development"; break; default: sVersion = "Unknown:"+Hex(nFormat,4) } break; case "fact": dcsamples = X.U32(p, _LE); break; //the uncompressed (factual?) file size? case "data": checklist[1] = true; datasz = hksz; if (nBPS && nFormat == 1 && !(nBPS % 8)) { var nmSeconds = Math.round(X.U32(p - 4, e) / (nBPS >> 3) / nRate / nChannels * 10000) / 10; dur = new Date(nmSeconds).toISOString().substr(11, 8); } break; case "cue": var q = p + 4, hhd = "", hsz = 0; while (q < p + hksz && q < X.Sz()) { hhd = X.SA(q, 4); hsz = X.U32(q+4, _LE); q += 8; if(hhd == 'data') cue++; q += hsz + hsz & 1; } break; case "cmnt": cmt = cmt.appendS(X.SC(p+2,hksz-8,'SJIS'),'\n'); //gamerip stuff, so Japanese break; case "LIST": case "list": // lowercase non-standard but there are such files... if(["INFO","ADTL"].includes(X.SA(p,4).toUpperCase())) { var q = p + 4, hhd = "", hsz = 0; while (q < p + hksz && q < X.Sz()) { hhd = X.SA(q, 4); hsz = X.U32(q+4, _LE); q += 8; switch (hhd) { case "INAM": title = X.SC(q,hsz,'CP1252'); break; case "IART": by = X.SC(q,hsz,'CP1252'); break; case "ICMS": cms = X.SC(q,hsz,'CP1252'); break; case "ICOP": cop = X.SC(q,hsz,'CP1252'); break; case "ICRD": dt = X.SC(q,hsz,'CP1252'); break; case "ISFT": sft = X.SC(q,hsz,'CP1252'); break; case "IGNR": genre = X.SC(q,hsz,'CP1252'); break; case "ICMT": cmt = cmt.appendS(X.SC(q,hsz,'CP1252'),'\n'); break; case "labl": labl.push(X.SC(q+4,hsz-4,'CP1252').trim()); break; case "ltxt": txts.push(X.SC(q+0x14,hsz-0x14, X.SA(q+0x12,2)).trim()); break; } hsz += hsz & 1; q += hsz } } break; case "smpl": lp = X.U32(p+0x1C, e); break; case "wsmp": lp = X.U32(p+0x10, e); break; case "ctrl": lp = (X.I32(p, e) ? 1 : 0); break; case "NXBF": hksz = X.U32(p, e); p += 4; ch += '/'+X.U32(p+0xC, e); lp = X.I32(0x10, e) >= 0 ? 1 : 0; break; case "JUNK": checklist[2] = true; break } hksz += hksz & 1; //align p += hksz } // end of chunks if(!checklist[0] || !checklist[1]) return; bDetected = true; sVersion += e == _LE? "/le": "/be"; fact = Math.round(dcsamples / 0x100000); function is_ue4_msadpcm() { if(!extIs('adpcm')) return; //TODO tighten it enough that it can tell em apart function is_ue4_blocks() { var maxj = Math.min(10*nBlockSize, datasz); for(j=0; j < maxj; j += nBlockSize) { var coefs = X.U8(j), scale = X.U16(j+1, _LE); if(coefs > 7) return; if(nBlockSize == 0x200) { if(scale == 0x00E6 && coefs != 0) return } else if(scale > 0x4000) return } return true } if(nChannels < 2 || fact > 0) return; if(fmtsz == 0x36 && nBlockSize != 0x200) return; if(fmtsz == 0x32 && ![0x200,0x9B,0x69].includes(nBlockSize)) return; return true } if(nFormat == 2 && nBPS == 4 && is_ue4_msadpcm()) sVersion = sVersion.appendS('UE4','/'); if((nFormat & 0xFF00) == 0x6700 && sz+1 == X.Sz()) sz += 1; if (debug) if (chunks != "") _l2r('riff-wave',0,'chunks: ['+chunks+']'); if(X.isVerbose()) { sOptionT(addEllipsis(title)); sOptionT(dt, 'created: '); sOptionT(addEllipsis(by),'by: '); sOptionT(genre, 'genre: '); sOptionT(addEllipsis(sft), 's/w: '); sOptionT(addEllipsis(cms), 'cms.by: '); sOptionT(cop, '©'); sOption(addEllipsis(cmt.trim()),'cmt: "', '"'); if(labl.length) sOptionT(addEllipsis(labl.filter(function(x){return x.length>0}).join('; ')),'labels: "', '"'); if(txts.length) sOptionT(addEllipsis(txts.filter(function(x){return x.length>0}).join('; ')),'captions: "', '"'); sOption('ch:' + nChannels + (nBPS ? ' ' + nBPS + '-bit' : '') + ' s/r:' + nRate + 'Hz' + (dcsamples ? ' fact:' + fact + 'M' : '') //for compressed things only + (dur !== -1 ? ' len: '+dur : '') + (lp > 0 ? ' looped'+(lp>1?'×'+lp:'') : '') +' sz:'+outSz(sz)); } return result(); } /* beautify ignore:end */ ================================================ FILE: db/Binary/audio_WEM.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG @kaens) // ref. vgmstream > wwise.c , coding_utils.c init("audio", "Audiokinetic Wwise RIFF (.WEM,.BNK)"); includeScript("vgmcodingutils"); /* beautify ignore:start */ function detect() { const debug = 0; var p = 0xC, e = _BE, fmtsz = fmtp = 0, xma2sz = xma2p = 0, datasz = datap = 0, vorbsz = vorbp = 0, wiihsz = wiihp = 0, seeksz = seekp = 0, smplsz = smplp = 0, metasz = metap = 0, hksz = 4, hkhd = "", title = "", dt = "", by = "", genre = "", cms = "", cmt = "", cop = "", sft = ""; if (X.Sz() < 36) return; if(!X.c("'WAVE'",8) && !X.c("'XWMA'",8)) return; if(X.c("'RIFF'")) e = _LE; else if(X.c("'RIFX'")) e = _BE; else return; if(debug) var chunks = ""; while (p < X.Sz()) { hkhd = X.SA(p, 4); hksz = X.U32(p + 4, e); p += 8; if(debug) chunks += " " + hkhd + " [" + Hex(hksz) + "] @" + Hex(p); switch (hkhd) { case "fact": return; //shouldn't have any case "fmt ": fmtp = p; fmtsz = hksz; break; case "XMA2": xma2p = p; xma2sz = hksz; break; case "data": datap = p; datasz = hksz; break; case "vorb": vorbp = p; vorbsz = hksz; break; case "WiiH": wiihp = p; wiihsz = hksz; break; case "seek": seekp = p; seeksz = hksz; break; case "smpl": smplp = p; smplsz = hksz; break; case "meta": metap = p; metasz = hksz; break; default: if (p + hksz > X.Sz()) return } p += hksz } // end of chunks if(!datap) return; var nFormat = nRate = nChannels = nBPS = 0, dur = -1, sz = 8+X.U32(4, e), smp = xsz = chlo = chtp = 0; iswem = extIs('wem') || extIs('bnk'), info = [], lp = prefetch = false; if(xma2p) { nFormat = 0x165; info = xma2_pase_xma2_chunk(xma2p); nChannels = info[0]; nRate = info[1]; lp = info[2]; smp = info[3] } else { if(fmtsz < 0x10) return; nFormat = X.U16(fmtp, _LE); nChannels = X.U16(fmtp + 2, _LE); nRate = X.U32(fmtp + 4, _LE); nBlockSize = X.U16(fmtp + 0xC, _LE); nBPS = X.U16(fmtp + 0x0E, _LE); if (fmtsz > 0x10 && nFormat != 0x165 && nFormat != 0x166) xsz = X.U16(fmtp+0x14,_BE); if(xsz == 6) if((chlo=X.U32(p+0x14,_BE)) == nChannels) { chtp = (chlo >> 8) & 0xF; chlo >>= 12 } } if(nFormat == 0x166) { info = xma2_parse_fmt_chunk_extra(p, _BE); lp = info[0]; smp = info[1] } if(smplp && smplsz >= 34 && X.U32(p+0x1C) == 1 && X.U32(p+0x28) == 0) lp = true; switch(nFormat) { case 0x0001: sVersion = 'older Wwise, PCM'; prefetch = 1; break; case 0x0002: sVersion = 'newer Wwise IMA:platform ADPCM'; prefetch = 1; if(xsz == 0xC+nChannels*0x2E) sVersion += ':DSP+coefs'; else if(xsz == 0xA && wiihp) sVersion += ':WiiH_DSP'; else if(nBlockSize == 0x104*nChannels) sVersion += ':PTADPCM'; break; case 0x0069: sVersion = 'older Wwise IMA'; prefetch = 1; break; case 0x0161: sVersion = 'Microsoft WMAv2'; prefetch = 1; break; case 0x0162: sVersion = 'Microsoft WMAPro'; prefetch = 1; break; case 0x0165: sVersion = 'Microsoft XMA2'; prefetch = 1; break; case 0x0166: sVersion = 'fmt-chunk Microsoft XMA2'; prefetch = 1; break; case 0x3039: sVersion = 'Opus NX'; prefetch = 1; break; case 0x3040: sVersion = 'Opus'; prefetch = 1; break; case 0x3041: sVersion = 'Wwise 2019.2.3 Opus_WEM/WW'; prefetch = 1; break; case 0x8311: sVersion = 'Wwise 2019.1 PTADPCM'; prefetch = 1; break; case 0xAAC0: sVersion = 'AAC'; break; case 0xFFF0: sVersion = 'DSP'; prefetch = 1; break; case 0xFFFB: sVersion = 'HEVAG'; break; case 0xFFFC: sVersion = 'ATRAC9'; prefetch = 1; break; case 0xFFFE: sVersion = 'PCM for Wwise Authoring'; prefetch = 1; break; case 0xFFFF: sVersion = 'Vorbis'; prefetch = 1; break; default: if(iswem) _setResult('audio', 'Wwise: unknown format ', Hex(nFormat, 4), ''); return } if(datap+datasz > X.Sz()) { if(datap+datasz < 0x5000 && X.Sz() > 0x10000) { _setResult('audio', 'Wwise: bad rip?', '' , 'datasz:'+Hex(datasz)); return; } if(prefetch) prefetch = 2; else return } if(nFormat == 0xFFFE && prefetch == 2 && X.c("'OggS'",datap)) sVersion = 'CP2077 Opus'; bDetected = true; sVersion += e == _LE? "/le": "/be"; if(smp) { var nmSeconds = Math.round(smp / nRate / nChannels * 10000) / 10; dur = new Date(nmSeconds).toISOString().substr(11, 8); } if(X.isVerbose()) { sOption('ch:' + nChannels + (nBPS ? ' ' + nBPS + '-bit' : '') + ' s/r:' + nRate + 'Hz' + (dur !== -1 ? ' len: '+dur : '') + (lp ? ' looped': '') +' sz:'+outSz(sz)); } return result(); } /* beautify ignore:end */ ================================================ FILE: db/Binary/audio_mp3.2.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood /* Ref: http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm http://www.codeproject.com/Articles/8295/MPEG-Audio-Frame-Header */ meta("audio", "MP3 Audio File"); includeScript("duration"); var MP3 = { aVersion: ["2.5", "2", "1"], aLayer: ["III", "II", "I"], aRatev1: [32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, // Layer III 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, // Layer II 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448 ], // Layer I aRatev2: [8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, // Layers III & II 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256 ], // Layer I aFreq: [11025, 12000, 8000, // v2.5 22050, 24000, 16000, // v2 44100, 48000, 32000 ], // v1 aCh: ["Stereo", "Joint stereo", "Dual mono", "Mono"], header: function (nOffset) { // AAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM var nHeader = X.U32(nOffset, _BE); if ((nHeader & 0xFFE00000) != ~~0xFFE00000) // AAAAAAAAAAA { return null; } var nVer = (nHeader >>> 19) & 3; // BB if (nVer == 1) // reserved { return null; } if (nVer > 1) { --nVer; } var nLayer = (nHeader >>> 17) & 3; // CC if (nLayer == 0) // reserved { return null; } --nLayer; var nBitrateIndex = (nHeader >>> 12) & 15; // EEEE if (nBitrateIndex == 0 || nBitrateIndex == 15) // free/bad { return null; } --nBitrateIndex; var nSamplingIndex = (nHeader >>> 10) & 3; // FF if (nSamplingIndex == 3) // reserved { return null; } var nPadding = (nHeader >>> 9) & 1; // G var nChannelMode = (nHeader >>> 6) & 3; // II var nBitrate = nVer == 2 ? this.aRatev1[nLayer * 14 + nBitrateIndex] : this.aRatev2[(nLayer == 2) * 14 + nBitrateIndex]; var nFreq = this.aFreq[nVer * 3 + nSamplingIndex]; var nTime; if (nLayer == 2) // Layer I { nTime = 384 / nFreq; } else if (nLayer == 1 || nVer == 2) // Layer II or v1,Layer III { nTime = 1152 / nFreq; } else // v2/2.5,Layer III { nTime = 576 / nFreq; } var bVBR = 1; var nVBR = Binary.findString(nOffset, 40, "Xing"); if (nVBR == -1) { nVBR = Binary.findString(nOffset, 40, "Info"); bVBR = 0; } if (nVBR != -1 && (X.U8(nVBR + 7) & 1)) { nTime *= X.U32(nVBR + 8, _BE); nOffset = bVBR ? -1 : -2; } else if (X.c("'VBRI'", nOffset + 32)) { nTime *= X.U32(nVBR + 46, _BE); nOffset = -1; } else { if (nLayer == 2) // Layer I { nOffset += Math.floor(12000 * nBitrate / nFreq + nPadding) * 4; } else { // 125 = 1000/8 = kilobits to bytes nOffset += Math.floor(125 * nBitrate * nTime + nPadding); } } return [this.aVersion[nVer], this.aLayer[nLayer], nBitrate, nFreq, this.aCh[nChannelMode], nTime, nOffset ]; } } function detect() { if (X.Sz() >= 128) { if (X.c("'TAG'", X.Sz() - 128)) { sOptions = "ID3v1"; } var nOffset = 0, bID3v2 = 0; if (X.c("'ID3'")) { nOffset = (X.U8(6) << 21) | (X.U8(7) << 14) | (X.U8(8) << 7) | (X.U8(9)); nOffset += 10; if (sOptions == "") { sOptions = "ID3v2"; } else { sOptions += "&2"; } bID3v2 = 1; } else if (X.c("'WAVEfmt '........55", 8)) { nOffset = Binary.findString(50, 50, "data") + 8; } var aResult1, aResult = null; aResult1 = MP3.header(nOffset); if (aResult1 == null) { if (bID3v2) { // There may be some junk between the ID3 tag & the data (Win7 // sample music files - C:\Users\Public\Music\Sample Music). // Since the ID3 tag is a fair indicator of an MP3, do a search // for v1,Layer III header. nOffset = Binary.findSignature(nOffset, 768, "FFFB"); aResult1 = MP3.header(nOffset); } if (aResult1 == null) { return ""; } } if (aResult1[6] > 0) { aResult = MP3.header(aResult1[6]); if (aResult == null) { return ""; } } bDetected = true; // Assume version, layer & channels don't change. sVersion = aResult1[0] + ",Layer " + aResult1[1]; if (File.isVerbose()) { var nFrames = 1, nRateSum = aResult1[2], nFreqSum = aResult1[3], nSeconds = aResult1[5]; var bVBR = 0, bVF = 0; while (aResult != null) { nFrames++; nRateSum += aResult[2]; nFreqSum += aResult[3]; nSeconds += aResult[5]; if (aResult[2] != aResult1[2]) { bVBR = 1; } if (aResult[3] != aResult1[3]) { bVF = 1; } aResult = MP3.header(aResult[6]); } sOptions = sOptions.append(Math.round(nRateSum / nFrames) + "kbps"); if (bVBR) { sOptions += "(avg)"; } sOptions = sOptions.append(Math.round(nFreqSum / nFrames) + "Hz"); if (bVF) { sOptions += "(avg)"; } sOptions = sOptions.append(aResult1[4], duration(nSeconds)); } } return result(); } ================================================ FILE: db/Binary/backup_images.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("format", ""); function detect() { if (Binary.compare("7ca0932f")) { bDetected = true; sName = "R-Studio image"; if (Binary.compare("78da", 0x38) != -1) { sOptions = "compressed (zlib)"; } } else if (Binary.compare("'$CAN'")) { switch (Binary.readByte(4)) { case 0xe4: sOptions = "First or single file"; break; case 0x60: sOptions = "next file"; break; } bDetected = true; sName = "Norton Ghost image"; } return result(); } ================================================ FILE: db/Binary/bin.Atari_ST.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("format", "Atari ST TOS executable"); function detect() { if (Binary.compare("601a0000....................0000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/bin.IDA.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Status: WIP meta("format"); includeScript("zlib"); function detect() { if (Binary.getSize() >= 0x20) { if (Binary.compare("'IDA'..0000") && Binary.compare("DDCCBBAA", 0x1A)) { var nVer = Binary.read_uint16(0x1E); sVersion = nVer + ".0"; switch (Binary.getString(0, 4)) { case "IDA0": bDetected = true; sName = "IDA Database (.IDB)"; break; case "IDA1": bDetected = true; sName = "IDA Database for 32-bit binary (.IDB)"; break; case "IDA2": bDetected = true; sName = "IDA Database for 64-bit binary (.I64)"; break; } if (bDetected) { switch (nVer) { case 2: detect_zlib(Binary, Binary.read_uint32(0x06) + 0x05); break; case 3: detect_zlib(Binary, Binary.read_uint32(0x06) + 0x05); break; case 4: detect_zlib(Binary, Binary.read_uint32(0x06) + 0x05); break; case 5: detect_zlib(Binary, Binary.read_uint32(0x06) + 0x09); break; case 6: detect_zlib(Binary, Binary.read_uint32(0x06) + 0x09); break; } } } else if (Binary.compare("'IDASGN'")) { sName = "IDA FLIRT Signature Database (.SIG)"; bDetected = true; const nVer = Binary.read_uint8(0x06), nModules = Binary.read_uint16(0x12), nFlags = Binary.read_uint8(0x10), nLibNameSz = Binary.read_uint8(0x22), nLibNameOf = 0x25; sVersion = nVer; if (!nModules) { nModules = Binary.read_uint32(0x25); nLibNameOf += 4; if (nVer >= 10) nLibNameOf += 4; } sOptions = "\"" + Binary.getString(nLibNameOf, nLibNameSz) + "\""; if (Binary.isVerbose()) { detect_zlib(Binary, nLibNameOf + nLibNameSz); sOption("modules:" + nModules); // count modules sOption("p:" + Binary.read_uint8(0x7)); // processor id sOption("a:" + Binary.read_uint16(0xE)); // application type sOption("o:" + Binary.read_uint16(0xC)); // os type sOption("f:" + Binary.read_uint32(0x8)); // file format type } } else if (Binary.compare("'IDATIL'")) { sName = "IDA Type Information List (.TIL)"; sOptions = "\"" + Binary.getString(0xF, Binary.read_uint8(0xE)) + "\""; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/bin.ISO_9660.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "ISO 9660"); function detect() { if (Binary.getSize() > 0x8010) { if (Binary.compare("01'CD001'01", 0x8000) || Binary.compare("01'CD001'01", 0x9318) || Binary.compare("01'CD001'01", 0x9310)) { bDetected = true; } } return result(); } ================================================ FILE: db/Binary/bin.RPGMaker2Kdata.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens TG@kaens meta('game'); function detect() { /* beautify ignore:start */ function isLCF() { //internal if (!X.isHeuristicScan() && (!X.c("'Lcf'", 1) || charStat(X.readBytes(1, X.U8(0)), 1).indexOf('allasc' < 0))) return false; return true } function isXYZ() { if (!X.c("'XYZ1'")) return false; w = X.U16(4); h = X.U16(6); var max = X.isHeuristicScan() ? 0x8000 : 0xA00; // 99.9999% images are within 800×800, but the official limit's 32000 if (!isWithin(w, 1, max) || !isWithin(h, 1, max)) return false; return true } if (!bDetected && isXYZ()) { sName = 'RPGMaker 2000/2003 bitmap (.XYZ)'; bDetected = true; if (X.isVerbose()) sOption(w + '×' + h); } function isLSD() { //ref https://github.com/EasyRPG/liblcf/blob/master/src/generated/lcf/lsd/chunks.h etc. if (!isLCF()) return false; if (!X.c("0B") || !X.c("64", 12)) return false; bad = ''; if (!X.c("'LcfSaveData'", 1)) if (!X.isHeuristicScan()) return false; else bad = bad.addIfNone('!badsig'); // easyRPG won't quit just because the sig is wrong! if (!isWithin(dt = X.F64(0x10), 365 * 100, 365 * 200)) return false; // date test, days since 1900. I'll test 2000~2100, let's be real here var delphiEpoch = new Date(Date.UTC(1899, 11, 30)); dt = new Date(delphiEpoch.getTime() + dt * 86400000); dt = dt.toISOString(); // Convert days to milliseconds, then to string ch0nm = ch1fs = ch2fs = ch3fs = ch4fs = ''; ch0lv = ch0hp = ch1fsi = ch2fsi = ch3fsi = ch4fsi = -1; info = ''; for (idx = 0, p = 0x18; p < X.Sz();) { idx = readVarUInt(p); if (!isWithin(idx[0], 1, 3)) return false; p += idx[0]; idx = idx[1]; if (!idx) break; sz = readVarUInt(p); if (!isWithin(sz[0], 1, 5)) return false; p += sz[0]; sz = sz[1]; switch (idx) { case 0x0B: heronm = X.SC(p, sz, 'SJIS'); break; case 0x0C: herolv = readVarUInt(p, sz)[1]; break; case 0x0D: herohp = readVarUInt(p, sz)[1]; break; case 0x15: ch1fs = X.SC(p, sz, 'SJIS'); break; case 0x16: ch1fsi = readVarUInt(p, sz)[1]; break; case 0x17: ch2fs = X.SC(p, sz, 'SJIS'); break; case 0x18: ch2fsi = readVarUInt(p, sz)[1]; break; case 0x19: ch3fs = X.SC(p, sz, 'SJIS'); break; case 0x1A: ch3fsi = readVarUInt(p, sz)[1]; break; case 0x1B: ch4fs = X.SC(p, sz, 'SJIS'); break; case 0x1C: ch4fsi = readVarUInt(p, sz)[1]; break; } p += sz } bad = ''; v = ''; sz = p; for (calcidx = 0x65; p < X.Sz(); calcidx = (calcidx < 0x72 ? calcidx + 1 : 0xC8)) { idx = readVarUInt(p); if (!isWithin(idx[0], 1, 3)) return false; p += idx[0]; idx = idx[1]; if (!idx) break; if (calcidx != idx) if (calcidx != 0xC8) { bad = bad.addIfNone('!brokenchunk'); break } sz = readVarUInt(p); if (!isWithin(sz[0], 1, 5) || !sz[1]) return false; p += sz[0]; sz = sz[1]; switch (idx) { case 0xC8: tag = 'easyRPG_data'; if (readVarUInt(p)[1] == 1) { t = readVarUInt(p + 1)[1]; v = readVarUInt(p + 2)[1]; v = (((v >> 8) & 0xFF) | (v & 0xFF) << 8).toString(16) } break; case 0x6C: tag = 'actors'; for (q = p + 2/*2D array idx? skip 2 bytes, test more*/; q < p + sz;) { idx2 = readVarUInt(q); if (!isWithin(idx2[0], 1, 3)) { _l2r('lsd', q, 'idx2=' + Hex(idx2[0]) + ' is weird'); q = p + sz; continue } q += idx2[0]; idx2 = idx2[1]; if (!idx2) break; sz2 = readVarUInt(q); if (!isWithin(sz2[0], 1, 5)) return false; q += sz2[0]; sz2 = sz2[1]; switch (idx2) { case 1: t = X.SA(q, sz2); info = info.append('actor:' + (t == '\x01' ? '*' : X.SC(q, sz2, 'SJIS'))); break case 2: t = X.SA(q, sz2); info = info.append('title:' + (t == '\x01' ? '*' : X.SC(q, sz2, 'SJIS'))); break case 0x0B: t = X.SC(q, sz2, 'SJIS'); if (t.length) info = info.append('char:' + t); break case 0x15: t = X.SC(q, sz2, 'SJIS'); if (t.length) info = info.append('sprite:' + t); break case 0x1F: info = info.append('level:' + readVarUInt(q)[1]); break case 0x21: t = readVarUInt(q)[1]; if (t) info = info.append('hpmod:' + t); break case 0x22: t = readVarUInt(q)[1]; if (t) info = info.append('spmod:' + t); break case 0x47: info = info.append('curhp:' + readVarUInt(q)[1]); break case 0x48: info = info.append('cursp:' + readVarUInt(q)[1]); break } q += sz2 } break; case 0x65: tag = 'system'; break; case 0x66: tag = 'screen'; break; case 0x67: tag = 'pictures'; break; case 0x68: tag = 'party_loc'; break; case 0x69: tag = 'boat_loc'; break; case 0x6A: tag = 'ship_loc'; break; case 0x6B: tag = 'airship_loc'; break; case 0x6D: tag = 'inventory'; break; case 0x6E: tag = 'teleport_targets'; break; case 0x6F: tag = 'map_info'; break; case 0x70: tag = 'panorama'; break; case 0x71: tag = 'fg_ev_execstate'; break; case 0x72: tag = 'common_events'; break; default: tag = 'ERROR!' + Hex(idx) } p += sz; if (idx == 0xC8) break } if (p > X.Sz()) return false; sz = p; if (idx == 0xC8) sVersion = 'easyRPG' + (v.length ? ' v' + v.slice(0, 4) : ''); else sVersion = 'RPG_RT'; return true } if (!bDetected && isLSD()) { sName = "RPGMaker 2000/2003 save data (.LSD)"; bDetected = true; if (bad.length) sVersion = sVersion.appendS('malformed' + bad, '/') if (X.isVerbose()) { sOption('on: ' + dt.slice(0, 19)); sOption(heronm + ' lv.' + herolv + ' ' + herohp + 'HP', 'preview: '); if (ch1fsi >= 0) sOption(ch1fs); if (ch2fsi >= 0) sOption(ch2fs); if (ch3fsi >= 0) sOption(ch3fs); if (ch4fsi >= 0) sOption(ch4fs); sOption(info, 'info: ') sOption(outSz(sz), 'sz:') } } function isLMT() { //ref https://github.com/EasyRPG/liblcf/blob/master/src/generated/lcf/lmt/chunks.h etc. if (!isLCF()) return false; if (!X.c("0A")) return false; bad = ''; if (!X.c("'LcfMapTree'", 1)) // if(!X.isHeuristicScan()) return false; // else // bad = bad.addIfNone('!badsig'); // easyRPG won't quit just because the sig is wrong! But we will, because there's not much more to detect it by i = readVarUInt(0xB); if (!isWithin(i[0], 1, 5)) return false; p = 0xB + i[0] + 1; len = i[1]; title = ''; maps = []; for (idx = i = 0; p < X.Sz() && i < len;) { if (idx == 0x33) { p += readVarUInt(p)[0]; aid = readVarUInt(p); p += aid[0]; aid = aid[1]; //array idx if (aid < ++i) { bad = bad.addIfNone('!badidx'); break } } if (i >= len) break; idx = readVarUInt(p); if (!isWithin(idx[0], 1, 3)) return false; p += idx[0]; idx = idx[1]; sz = readVarUInt(p); if (!isWithin(sz[0], 1, 5) || !sz[1]) return false; p += sz[0]; sz = sz[1]; switch (idx) { case 1: t = X.SC(p, sz, 'SJIS'); if (!title.length) title = t; else maps.push(aid + '.' + t); break; } p += sz; } //tree_order length is in aid for (i = 0; i < aid + 1; i++) p += readVarUInt(p)[0]; // tree_order + active_node //_l2r('lmt',p,'Start') for (i = 0; p < X.Sz();) { idx = readVarUInt(p); if (!isWithin(idx[0], 1, 3)) return false; p += idx[0]; idx = idx[1]; if (!idx) break; sz = readVarUInt(p); if (!isWithin(sz[0], 1, 5) || !sz[1]) return false; p += sz[0]; sz = sz[1]; p += sz } sz = p; if (sz > X.Sz()) return false; return true } if (!bDetected && isLMT()) { sName = "RPGMaker 2000/2003 map tree data (.LMT)"; bDetected = true; if (bad.length) sVersion = sVersion.appendS('malformed' + bad, '/') if (X.isVerbose()) { sOption('for: ' + title); sOption(addEllipsis(maps.join('\r'), 0xC000), len + ' maps:'); sOption(outSz(sz), 'sz:') } } function isLDB() { //ref https://github.com/EasyRPG/liblcf/blob/master/src/generated/lcf/ldb/chunks.h etc. if (!isLCF()) return false; if (!X.c("0B") || !X.c("0B", 0xC)) return false; bad = ''; if (!X.c("'LcfDataBase'", 1)) // if(!X.isHeuristicScan()) return false; // else // bad = bad.addIfNone('!badsig'); // easyRPG won't quit just because the sig is wrong! But we will, because there's not much more to detect it by var debug = -1, char = []; chars = []; function ret(p, t) { if (debug >= 1) _l2r('ldb', p, t); return false } for (idx = i = 0, p = 0xC; p < X.Sz(); i++) { // go over all chunks found idx = readVarUInt(p); if (!isWithin(idx[0], 1, 3)) return ret(p, 'bad idx'); p += idx[0]; idx = idx[1]; if (!isWithin(idx, 0xB, 0x1F)) if (i < 14) return ret(p, 'bad tag ' + idx); else { p--; break } //to tell the expected file length. idx = 00 is the last byte sz = readVarUInt(p); if (!isWithin(sz[0], 1, 6) || !sz[1]) return ret(p, 'bad size ' + sz[1]); p += sz[0]; sz = sz[1]; if (idx == 0xB) { // an array; let's analyse the Characters one for (q = p; q < p + sz && q < X.Sz();) { for (len = j = 0; q < p + sz && q < X.Sz(); j++) { t = readVarUInt(q); if (!isWithin(t[0], 1, 3)) return false; q += t[0]; t = t[1]; if (!len) { len = t; j = 0 } t = readVarUInt(q); if (!isWithin(t[0], 1, 3)) return false; q += t[0]; t = t[1]; for (; q < p + sz && q < X.Sz();) { idx1 = readVarUInt(q); if (!isWithin(idx1[0], 1, 3)) return false; q += idx1[0]; idx1 = idx1[1]; if (!idx1) { q--; break } sz1 = readVarUInt(q); if (!isWithin(sz1[0], 1, 5)) return ret(q, 'sz off at idx1=' + Hex(idx1)); q += sz1[0]; sz1 = sz1[1]; switch (idx1) { case 1: char.push(X.SC(q, sz1, 'SJIS')); break; //name case 2: char.push(X.SC(q, sz1, 'SJIS')); break; //title default: if (char.length) chars.push(char.join(': ')); char = [] } q += sz1 } } i++ } } p += sz } sz = p; return true } if (!bDetected && isLDB()) { sName = "RPGMaker 2000/2003 database (.LDB)"; bDetected = true; if (bad.length) sVersion = sVersion.appendS('malformed' + bad, '/') if (X.isVerbose()) { sOption(addEllipsis(chars.join(', ')), 'chars:') sOption(outSz(sz), 'sz:') } } function isLMU() { //ref https://github.com/EasyRPG/liblcf/blob/master/src/generated/lcf/ldb/chunks.h etc. if (!isLCF()) return false; if (!X.c("0A")) return false; bad = ''; if (!X.c("'LcfMapUnit'", 1)) return false; id = -1; bg = ''; bgf = false; for (idx = i = 0, p = 0xB; p < X.Sz(); i++) { // go over all chunks found idx = readVarUInt(p); if (!isWithin(idx[0], 1, 3)) return false; p += idx[0]; idx = idx[1]; if (!isWithin(idx, 1, 91)) if (i < 3) return false else break //to tell the expected file length. idx = 00 is the last byte sz = readVarUInt(p); if (!isWithin(sz[0], 1, 6) || !sz[1]) return false; p += sz[0]; sz = sz[1]; switch (idx) { case 1: id = readVarUInt(p)[1]; break; case 31: bgf = true; break; case 32: bg = X.SC(p, sz, 'SJIS'); break } p += sz } sz = p; if (sz > X.Sz()) return false; return true } if (!bDetected && isLMU()) { sName = "RPGMaker 2000/2003 map unit (.LMU)"; bDetected = true; if (bad.length) sVersion = sVersion.appendS('malformed' + bad, '/') if (X.isVerbose()) { if (id >= 0) sOption(id, 'id:'); if (bgf) sOption(bg, 'bg:"', '"'); sOption(outSz(sz), 'sz:') } } return result() /* beautify ignore:end */ } ================================================ FILE: db/Binary/data_overlay_null_padding.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Detects zero-byte overlay padding added by linkers to align the output file // to sector (0x200) or page (0x1000) boundaries. // Example: TLINK32 pads PE files with null bytes up to the next 0x1000 boundary. function detect() { if (!Binary.isOverlay()) { return result(); } var nSize = Binary.getSize(); if (Binary.isZeroFilled(0, nSize)) { _setResult("overlay", "null padding", "", ""); } } ================================================ FILE: db/Binary/data_overlays.6.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("data", ""); function detect() { if (Binary.isOverlay()) { if (Binary.compare("'aWAW'")) { sName = "CreateInstall data"; bDetected = true; } else if (Binary.compare("';!@Install@!UTF-8!'")) { sName = "7-zip Installer data"; bDetected = true; } else if (Binary.compare("00'TMSAMVOH'")) { sName = "ActiveMark protector data"; bDetected = true; } else if (Binary.compare("....................'MSCF'00")) { sName = "Actual Installer data"; bDetected = true; } else if (Binary.compare("'10JP'")) { sName = "Adveractive Installer data"; bDetected = true; } else if (Binary.compare("'EWETAR DATA FILE!! VER 1.00 <<<>>>'")) { sName = "Aeco Systems installer data"; bDetected = true; } else if (Binary.compare("c0ab........60ea")) { sName = "ARJSFX32 data"; bDetected = true; } else if (Binary.compare("67570402")) { sName = "ARQ archive"; bDetected = true; } else if (Binary.compare("0b0bafaf0b0ba4")) { sName = "AutoPlay Media Studio installer data"; bDetected = true; } else if (Binary.compare("'wwgT)'") || Binary.compare("..120100....0000")) { sName = "ClickTeam installer data"; bDetected = true; } else if (Binary.compare("'CK16'")) { sName = "CrypKey Installer archive"; bDetected = true; } else if (Binary.compare("........'DIMDMSCF'")) { sName = "Dimd SFX data"; sOptions = "CAB"; bDetected = true; } else if (Binary.compare("'[metadata]'")) { sName = "distutils installer data"; bDetected = true; } else if (Binary.compare("b297e169")) { sName = "Envoy Packager data"; bDetected = true; } else if (Binary.compare("'EPSF'")) { sName = "Eschalon Installer archive"; bDetected = true; } else if (Binary.compare("........'SPIS'1a'LH5'")) { sName = "GPInstall data"; sOptions = "SPIS LH5"; bDetected = true; } else if (Binary.compare("'zlb'1A") || Binary.compare("'idska32'1A")) { sName = "Inno Setup Installer data"; bDetected = true; } else if (Binary.compare("'Inno Setup Messages'")) { sName = "Inno Setup uninstall data"; bDetected = true; } else if (Binary.compare("'1CNT'")) { sName = "LucasArts Update Installer data"; bDetected = true; } else if (Binary.compare("'MPU'0d")) { sName = "MP-ZipTool SFX32 data"; bDetected = true; } else if (Binary.compare("'MPQ'1a20")) { sName = "MPQ archive"; bDetected = true; } else if (Binary.compare("'PK??NOS_PO'") || Binary.compare("'NOS_PO'")) { sName = "NOS Installer data"; bDetected = true; } else if (Binary.compare("970300000201")) { sName = "Pantaray QSetup data"; sVersion = "10.X"; bDetected = true; } else if (Binary.compare("370700000201")) { sName = "Pantaray QSetup data"; sVersion = "11.X"; bDetected = true; } else if (Binary.compare("04'PBG'")) { sName = "Paquet archive"; bDetected = true; } else if (Binary.compare("'PB'................................'7z'")) { sName = "Paquet Builder"; sOptions = "7zip"; bDetected = true; } else if (Binary.compare("'qres'")) { sName = "QT installer data"; bDetected = true; } else if (Binary.compare("4B2A9A") || Binary.compare("4B2A84")) { sName = "RTPatch archive"; bDetected = true; } else if (Binary.compare("e0e0e1e1e2e2e3e3e4e4e5e5e6e6e7e7")) { sName = "Setup Factory installer data"; sVersion = "8.X, 9.X"; bDetected = true; } else if (Binary.compare("e0e1e2e3e4e5e6")) { sName = "Setup Factory installer data"; sVersion = "4.X, 5.X"; bDetected = true; } else if (Binary.compare("67155234ff4d3642")) { sName = "STATICSUP installer data"; bDetected = true; } else if (Binary.compare("'ESIV'") || Binary.compare("'SIVM'", 0xf000)) { sName = "Vise Installer data"; bDetected = true; } else if (Binary.compare("'RsDl'")) { sName = "WinImage SFX data"; bDetected = true; } else if (Binary.compare("'IMP'0a")) { sName = "IMP archive"; bDetected = true; } else if (Binary.compare("'@Daisy@Lucy@xyzzy@'................1f8b08")) { sName = "WinPatch Apply Program data"; sOptions = "gzip"; bDetected = true; } else if (Binary.compare("'@Daisy@Lucy@xyzzy@'1f8b08")) { sName = "WinPatch Apply Program data"; sOptions = "gzip"; bDetected = true; } else if (Binary.compare("'***messages***'")) { sName = "WinRAR Installer data"; bDetected = true; } else if (Binary.compare("fffe2a002a002a006d0065007300730061006700650073002a002a002a00")) { sName = "WinRAR Installer data"; sVersion = "5.X"; bDetected = true; } /* else if(Binary.compare("'Rar!'")) { sName="RAR archive"; bDetected=1; } */ else if (Binary.compare("'MPV*'")) { sName = "ZipCentral SFX-32 data"; bDetected = true; } else if (Binary.compare("'[20/20]'")) { sName = "PCInstall data"; bDetected = true; } else if (Binary.compare("'ISSetupStream'")) { sName = "InstallShield data"; sVersion = "18.X"; bDetected = true; } else if (Binary.compare("'FWS'") || Binary.compare("'CWS'")) { sName = "Adobe Flash"; bDetected = true; } else if (Binary.compare("'Smart Install Maker v'")) { sName = "Smart Install Maker data"; sVersion = Binary.getString(Binary.getOverlayOffset() + 0x17); bDetected = true; } else if (Binary.compare("....0000dcedbd")) { sName = "PackageForTheWeb data"; sOptions = "InstallShield"; bDetected = true; } else if (Binary.compare("'00000000000000BD00000000000000010000000000000001'", 0x19a0)) { sName = "Autodesk Self-Extract data"; bDetected = true; } else if (Binary.compare("c0dececb8d8d8d8d")) { sName = "Ghost Installer archive"; sOptions = "xored MSCF, mask: 8D"; bDetected = true; } else if (Binary.compare("02060a0405fd59")) { sName = "CreateInstall data"; sVersion = "2003.3.5"; bDetected = true; } else if (Binary.compare("'RWMV'")) { sName = "VMWare Installation Launcher data"; bDetected = true; } else if (Binary.compare("........'GRCSETUPINFORMATION'")) { sName = "Codegear Installer data"; bDetected = true; } else if (Binary.compare("'xvm'0003")) { sName = "Spoon Studio data"; bDetected = true; } else if (Binary.compare("2f30ee1f5e4ee51e")) { sName = "Advanced Installer data"; sOptions = "MS Compound-like format"; bDetected = true; } else if (Binary.compare("'^OPT'")) { var ArcOffset = Binary.findString(Binary.getOverlayOffset(), 0x50, "^ARC"); if (ArcOffset != -1) { if (Binary.compare("1f8b08", ArcOffset + 4)) { sName = "Adobe SVG Installer"; sOptions = "gzip"; bDetected = true; } } } else if (Binary.compare("07d26cbf2159abaa0100000000")) { sName = "Chilkat ZIP Self-Extractor data"; bDetected = true; } else if (Binary.compare("'IST'00")) { sName = "Dolphin Virtual Machine data"; sVersion = "5.0"; bDetected = true; } else if (Binary.compare("'@._P-DATA_.@'")) { sName = "CodeFusion Wizard data"; bDetected = true; } else if (Binary.compare("'ASWsetupFPkgFil3'")) { sName = "avast! Antivirus installer data"; bDetected = true; } else if (Binary.compare("5b3e")) { var ArcOffset = Binary.findSignature(Binary.getOverlayOffset(), 0x500, "'PK'0304"); if (ArcOffset != -1) { sName = "InstallAnywhere data"; sOptions = "zip"; bDetected = true; } } else if (Binary.compare("........efbeadde'NullsoftInst'")) { sName = "NSIS data"; bDetected = true; } else if (Binary.compare("................fec1cd666ebccf01fec1cd666ebccf0100..............78da")) { sName = "Internet Download Manager installer data"; sOptions = "zlib"; bDetected = true; } else if (Binary.compare("d513e4e801000000")) { sName = "Install4j installer data"; bDetected = true; } else if (Binary.compare("efbbbf';!@Install@!UTF-8!'")) { sName = "7-zip Installer data"; bDetected = true; } else if (Binary.compare("'UM'030a00")) { sName = "Sony Windows installer data"; bDetected = true; } else if (Binary.compare("7b00320030003700320036003300370037002d00")) { sName = "ADS Self Extractor data"; bDetected = true; } else if (Binary.findSignature(Binary.getOverlayOffset(), Math.min(0x100, Binary.getOverlaySize()), "7b00320030003700320036003300370037002d00") != -1) { sName = "ADS Self Extractor data"; bDetected = true; } else if (Binary.compare("276327631226097513180178")) { sName = "Chaos Software installer data"; bDetected = true; } else if (Binary.compare("'OWS9G1'", 0xb)) { sName = "Gentee installer data"; bDetected = true; } else if (Binary.compare("'SQ5SFX'")) { sName = "Squeez SFX data"; bDetected = true; } else if (Binary.compare("'Inno Setup Setup Data'")) { sName = "Inno Setup data"; bDetected = true; } else if (Binary.findSignature(Binary.getOverlayOffset(), Math.min(0x100, Binary.getOverlaySize()), "'MSCF00000000'") != -1) { sName = "CAB archive"; bDetected = true; } else if (Binary.findSignature(Binary.getOverlayOffset(), Math.min(0x100, Binary.getOverlaySize()), "'ISc('") != -1) { sName = "InstallShield archive"; bDetected = true; } else if (Binary.compare("'ExcelsiorII1'")) { sName = "Excelsior installer data"; bDetected = true; } else if (Binary.compare("'InstallShield'00")) { sName = "InstallShield data"; sOptions = "2.X-3.X"; bDetected = true; } else if (Binary.compare("'wwwwI'874712")) { sName = "Multimedia Fusion installer data"; bDetected = true; } else if (Binary.compare("'PIMPFILE'00")) { sName = "PIMP installer data"; bDetected = true; } else if (Binary.compare("'tiz1'........78da")) { sName = "Tarma installer data"; sOptions = "zlib"; bDetected = true; } else if (Binary.compare("'XXataDfOnigeB'")) { sName = "I-D Media installer data"; bDetected = true; } else if (Binary.compare("'This is the end of the executable'")) { sName = "SwiftView installer data"; bDetected = true; } else if (Binary.compare("1f8b08", 0x3000)) { sName = "BulletProofSoft installer data"; sOptions = "gzip"; bDetected = true; } else if (Binary.compare("'AddD'03")) { sName = "SecuROM data"; var nOffset = Binary.getOverlayOffset(); sVersion = Binary.getString(nOffset + 8); bDetected = true; } else if (Binary.compare("'NB02'")) { sName = "CodeView 3.14 debug information"; bDetected = true; } else if (Binary.compare("'NB09'")) { sName = "CodeView 4.10 debug information"; bDetected = true; } else if (Binary.compare("'NB11'")) { sName = "CodeView 5.0 debug information"; bDetected = true; } else if (Binary.compare("'NB10'")) { sName = "PDB 2.0 file link"; bDetected = true; } else if (Binary.compare("'RSDS'")) { sName = "PDB 7.0 file link"; bDetected = true; } else if (Binary.compare("'[(*|*)]MZ'")) { sName = "Mioplanet installer executable+data" bDetected = true; } else if (Binary.compare("'MPV'")) { sName = "DelZip SFX data"; bDetected = true; } else if (Binary.compare("'MPU'00")) { sName = "CoffeeCup SFX data"; bDetected = true; } else if (Binary.compare("''")) { sName = "KRZIP archive"; bDetected = true; } else if (Binary.compare("..........87000001........5d0000800000")) { sName = "Smart Install Maker data"; bDetected = true; } else if (Binary.compare("'RS'")) { sName = "AOLSetup data"; bDetected = true; } else if (Binary.compare("'TGCF'")) { sName = "Setup-Specialist archive"; bDetected = true; } else if (Binary.compare("a3484bbe986c4aa9")) { sName = "AutoIt compiled script"; sVersion = "2.XX-3.XX"; bDetected = true; } else if (Binary.compare("'MSCF'00000000")) { sName = "CAB archive"; bDetected = true; } else if (Binary.compare("'PK'0304")) { sName = "ZIP archive"; bDetected = true; } else if (Binary.compare("'$_BIM_CONFIG_START_$")) { sName = "Bytessence Install Maker data"; bDetected = true; } else if (Binary.compare("........'.eh_frame'00")) { sName = "BitRock installer data"; bDetected = true; } else if (Binary.compare("09050000")) { sName = "ThinApp data"; bDetected = true; } else if (Binary.compare("BDA6EEE9F9EDEFEDE5ED")) { sName = "Hamrick Software XOR-ed ZIP"; bDetected = true; } else if (Binary.compare("000000000000000038e8020000000000")) { sName = "Box Stub installer data"; bDetected = true; } else if (Binary.compare("a7870800")) { sName = "Install Factory data"; bDetected = true; } else if (Binary.compare("a7870800")) { sName = "Install Factory data"; bDetected = true; } else if (Binary.compare("a6d6b210")) { sName = "Sax Software archive"; bDetected = true; } else if (Binary.compare("'Win_Sfx_For_Windows_'")) { sName = "XZIP-SFX data"; sOptions = "by Netzip"; bDetected = true; } else if (X.SU16(2, 16) == "[GeneralOptions]") { sName = "Advanced Installer data"; bDetected = true; } else if (Binary.compare("d90e0100889f")) { sName = "Winlicense xored EXE (0xC5 xor mask)"; bDetected = true; } /* var ArcOffset=Binary.findSignature(Binary.getOverlayOffset(),0x400, "'|http:'"); if(ArcOffset!=-1) { sName="Pantaray QSetup data"; sVersion="6.X"; bDetected=1; } var ArcOffset=Binary.findSignature(Binary.getOverlayOffset(),0x400, "'|www.'"); if(ArcOffset!=-1) { sName="Pantaray QSetup data"; sVersion="8.X"; bDetected=1; } */ } return result(); } ================================================ FILE: db/Binary/debug_data_debugData.1.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("debug data", ""); function detect() { var size = Binary.getSize(); // Borland debug info if (Binary.readWord(0) === 0x52FB) { var minor = Binary.readByte(2), major = Binary.readByte(3), minorStr = ((minor >> 4) * 10 + (minor & 0x0F)).toString(), majorStr = ((major >> 4) * 10 + (major & 0x0F)).toString(), sVer = majorStr + "." + minorStr; _setResult(sType, "Borland", sVer, "TDS" + (Binary.readWord(0xE) ? " " + Binary.readWord(0xE) + " symbols" : "")); return true; } else if (Binary.compare("'FB09'")) { _setResult(sType, "Borland", "", "Delphi TDS"); return true; } else if (Binary.compare("'FB0A'")) { _setResult(sType, "Borland", "", "C++ TDS"); return true; } var debugSize = Binary.readDword(size - 4); // Watcom debug info if (size > 16 && Binary.readWord(size - 14) === 0x8386) { if (size - debugSize >= 0) { _setResult(sType, "Watcom", Binary.readByte(size - 12) + "." + Binary.readByte(size - 11), "0x" + debugSize.toString(16) + " bytes"); } return true; } // CodeView debug info if (size > 16 && Binary.readWord(size - 8) === 0x424E) { if (/^NB0[5789]|NB1[01]$/.test(Binary.read_ansiString(size - 8, 4))) { if (size - debugSize >= 0) { _setResult(sType, "CodeView", "4.0", "0x" + debugSize.toString(16) + " bytes"); } return true; } } // DWARF debug info if (size > 16 && Binary.readDword(size - 16) === 0x534954) { if (Binary.readDword(size - 12) === 0 && Binary.readDword(size - 8) === 0) { var debugOffset = size - debugSize; if (debugOffset >= 0) { var viStruct = get_DWRAF_vi(debugOffset, size - debugOffset); if (viStruct.bIsValid) { _setResult(sType, "DWARF", viStruct.sVersion, "0x" + debugSize.toString(16) + " bytes, Watcom"); } return true; } } } if (Binary.isDebugData()) { if (Binary.compare("'RSDS'")) { sName = "PDB file link"; _setResult(sType, sName, "7.0", ""); return true; } } return result(); } ================================================ FILE: db/Binary/font.ADOBE.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Info : Adobe Type I Font (AFM, PFB, PFM) // Status: WIP meta("font"); function detect() { if (Binary.getSize() >= 0x0F) { if (Binary.compare("'StartFontMetrics '") && Binary.compare("'.'", 0x12)) { sName = "Adobe Font Metrics (.AFM)"; sVersion = "v" + Binary.getString(0x11, 0x03); bDetected = true; } else if (Binary.read_uint16(0) == 384 && Binary.read_uint16(Binary.getSize() - 2) == 896) { sName = "Adobe Printer Font Binary (.PFB)"; bDetected = true; if (Binary.isVerbose()) { var sFontText = Binary.getString(0x06, 0x0200); var aFontName = sFontText.match(/%!PS-AdobeFont-1.0: (.*?)[\r\n]/); if (aFontName) { sOption(aFontName[1]); } } } else if (Binary.compare("0001") && Binary.getSize() == Binary.read_uint32(0x02)) { sName = "Adobe Printer Font Metrics (.PFM)"; bDetected = true; if (Binary.isVerbose()) { sOptions = Binary.getString(0x06, 0x3C); } } } return result(); } ================================================ FILE: db/Binary/font_BMF.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: https://www.angelcode.com/products/bmfont/doc/file_format.html meta("font", "AngelCode Bitmap Font (.FNT)"); function detect() { if (Binary.getSize() >= 0x30) { if (Binary.compare("'BMF'")) { bDetected = true; switch (Binary.read_uint8(0x03)) { case 1: sVersion = "v1"; sOptionT("Binary"); break; case 2: sVersion = "v2"; sOptionT("Binary"); break; case 3: sVersion = "v3"; sOptionT("Binary"); break; default: bDetected = false; } if (bDetected && Binary.isVerbose()) { var nOffset = 0x04; while (nOffset < Binary.getSize()) { var nBlockTypeIdentifier = Binary.read_uint8(nOffset); nOffset += 1; var nBlockSize = Binary.read_uint32(nOffset); nOffset += 4; switch (nBlockTypeIdentifier) { case 1: sOptionT('"' + Binary.getString(nOffset + 0xE) + '"'); sOptionT("Size:" + Binary.read_int16(nOffset)); // fontSize break; case 2: sOptionT("pages:" + Binary.read_int16(nOffset + 4) + "x" + Binary.read_int16(nOffset + 6) + "x" + Binary.read_int16(nOffset + 8)); // scaleW, scaleH, pages break; case 3: break; case 4: sOptionT("chars:" + nBlockSize / 20); break; case 5: sOptionT("kerning_pairs:" + nBlockSize / 10); break; } nOffset += nBlockSize; } } } else if (Binary.isPlainText() && Binary.find_utf8String(0, 200, "info face") >= 0 && Binary.find_utf8String(0, 200, "stretchH") >= 0) { bDetected = true; if (Binary.find_utf8String(0, 200, "= 0) { sOptionT("XML") } else (sOptionT("Text")) } } return result(); } ================================================ FILE: db/Binary/font_FFN.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://fifam.miraheze.org/wiki/FFN meta("font", "FFN"); function detect() { if (Binary.compare("'FNTF'......00")) { sOptions = "Windows"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/font_TFM.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://ctan.org/tex-archive/obsolete/graphics/metapost/base/texmf/fonts/tfm/ meta("font", "TFM"); function detect() { if (Binary.compare("....0012000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/font_VTF.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE meta("font", "VTF"); function detect() { bDetected = Binary.compare("'TNFV'"); return result(); } ================================================ FILE: db/Binary/font_XTT.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://file.org/extension/xtt#xbox360systemfontfile meta("font", "Xbox 360 System Font (.XTT)"); function detect() { if (Binary.compare("78 74 74 66")) { var font = Binary.getString(1, 3).trim(); if (/^[a-z]{3}$/.test(font)) { if (X.isVerbose()) sOptions = font; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_AS.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE meta("format", "AS"); function detect() { if (Binary.compare("'Act;'")) { var actor = Binary.getString(4, 5).trim(); if (/^[a-zA-Z/]{5}/.test(actor)) { if (X.isVerbose()) sOptions = actor; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_AmigaIcon.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens TG@kaens meta("format", "Amiga Icon Format (.INFO)"); function detect() { if (Binary.compare("E310 0001")) { //http://www.evillabs.net/index.php/Amiga_Icon_Formats bDetected = true; ic_Type = File.read_uint8(0x30); switch (ic_Type) { case 1: sVersion = "DISK"; break; case 2: sVersion = "DRAWER"; break; case 3: sVersion = "TOOL"; break; case 4: sVersion = "PROJECT"; break; case 5: sVersion = "GARBAGE"; break; case 6: sVersion = "malformed:DEVICE"; break; case 7: sVersion = "KICK"; break; case 8: sVersion = "malformed:APPICON"; break; default: sVersion = "malformed" } if (Binary.isVerbose()) { ic_DefaultTool = File.read_uint8(0x32) != 0; ic_ToolTypes = File.read_uint8(0x36) != 0; ic_CurrentX = File.read_int32(0x3A, _BE); ic_CurrentY = File.read_int32(0x3E, _BE); ic_DrawerData = File.read_uint8(0x42) != 0; ic_ToolWindow = File.read_uint8(0x46) != 0; p = 4; //struct Gadget ga_Width = File.read_int16(p + 0x08, _BE); ga_Height = File.read_int16(p + 0x0A, _BE); ga_SelectRender = File.read_uint8(p + 0x16) != 0; p = 0x4E; if (ic_DrawerData) { p += 0x38; sOption("Drawer data present") } //struct Image #1 im_Width = File.read_int16(p + 4, _BE); if (im_Width % 2 == 1) im_Width++; im_Height = File.read_uint16(p + 6, _BE); im_Depth = File.read_uint16(p + 8, _BE); icoinfo = "icon: " + im_Width + "×" + im_Height + "@" + im_Depth + " at [" + Hex(p + 0x14) + ".."; p += 0x14 + im_Width * im_Height * im_Depth / 8; icoinfo += Hex(p) + ")"; //round par intended! sOption(icoinfo); if (ga_SelectRender) { //struct Image #1 im_Width = File.read_int16(p + 4, _BE); if (im_Width % 2 == 1) im1_Width++; im_Height = File.read_int16(p + 6, _BE); im_Depth = File.read_int16(p + 8, _BE); info = "sel.icon: " + im_Width + "×" + im_Height + "@" + im_Depth + " at [" + Hex(p + 0x14) + ".."; p += 0x14 + im_Width * im_Height * im_Depth / 8; icoinfo += Hex(p) + ")"; //round par intended! sOption(icoinfo); } //_log("p="+Hex(p)); if (File.getFileBaseName().toLowerCase() == "pn") {//POKEYNoise info p = File.findSignature(6, File.getSize() - 20, "'SONGS='") - 1; //TODO do it actually smart if (p > 0) { tp = ""; x = ""; t = ""; c = ""; cp = ""; pn = false; tagsz = File.getSize() - p; tagl = []; tagr = []; while (p < File.getSize()) { lr = File.read_ucsdString(p); tagl.push(lr.split("=")[0]); tagr.push(lr.split("=")[1]); p += lr.length + 5 } for (i = 0; i < tagl.length; i++) switch (tagl[i]) { case "SONGS": x = tagr[i]; break; case "TYPE": if (tagr[i] == "POKEY") pn = true; break; case "NAME": t = tagr[i]; break; case "CREATOR": c = tagr[i]; break; case "COPYRIGHT": cp = tagr[i]; break; } if (pn) { sOption("POKEYNoise info found"); sOption(t); if (x > "1") sOption(x, "x"); sOption(c, "by "); sOption(cp, "(c) ") } } } } } return result(); } ================================================ FILE: db/Binary/format_BCD1.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/BJNFNE/DEV7/blob/master/tools/BCD1Creator/BCD1Creator.cpp // https://wiki.scummvm.org/index.php?title=Gob/DEV7_Information#BCD1_Format meta("format", "BCD1"); function detect() { if (Binary.compare("'[ENVIINFO]'")) { var name = Binary.getString(11, 4).trim(); if (/^[A-Za-z0]{4}$/.test(name)) { if (X.isVerbose()) sOptions = name; bDetected = true; } } else if (Binary.compare("'[AppliInfo]'")) { var name = Binary.getString(13, 4).trim(); if (/^[A-Za-z]{4}$/.test(name)) { if (X.isVerbose()) sOptions = name; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_BOU.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Coktel Vision games // https://github.com/scummvm/scummvm/blob/master/engines/gob/inter_adibou1.cpp meta("format", "BOU"); function detect() { var appli = Binary.getString(0, 20).trim(); if (/^[CLcl]\d{2}([Cc]alcul|[Ll]ecture) \d ans/.test(appli)) { if (X.isVerbose()) sOptions = appli; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_BSP.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://developer.valvesoftware.com/wiki/BSP_(Source) meta("format", "BSP"); function detect() { if (Binary.compare("'VBSP'15000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_BTF.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://docs.ebpf.io/concepts/btf/ meta("format", "BTF"); function detect() { bDetected = Binary.compare("9feb01001800000000000000"); return result(); } ================================================ FILE: db/Binary/format_BackupMii.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Nintendo Wii - BackupMii/BootMii // https://github.com/DarkMatterCore/xyzzy-mod/blob/a5139f246c4d2602c07abc0301e5917106fa4183/source/xyzzy.c#L275 // https://wiibrew.org/wiki/BackupMii meta("format", "BackupMii"); function detect() { if (Binary.compare("'BackupMii v1'")) { var consoleId = Binary.getString(25, 8).trim(); if (/^[a-z0-9]{8}$/.test(consoleId)) { if (X.isVerbose()) sOptions = "ConsoleID: " + consoleId; sVersion = "1.0"; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_CCD.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.elby.ch/ meta("format", "CloneCD Control"); function detect() { if (Binary.compare("'[CloneCD]'")) { var versionNumber = Binary.getString(19, 1).trim(); if (/^[0-9]{1}/.test(versionNumber)) { if (X.isVerbose()) sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_CSO.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/jamie/ciso meta("format", "Compressed ISO file (.CISO)"); function detect() { if (Binary.compare("'CISO'0000000000......000000000008")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_CTRK.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=Gob/DEV7_Information#File_Formats meta("format", "CTRK"); function detect() { if (Binary.compare("01000800000000000000")) { sOptions = File.cleanString(Binary.getString(0x0000001a)); bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_CURE.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=Gob/DEV7_Information#File_Formats meta("format", "Mesh configuration (.CURE)"); function detect() { if (Binary.compare("'[Global]'")) { var name = Binary.getString(10, 4).trim(); if (/^[a-zA-Z]{4}/.test(name)) { if (X.isVerbose()) sOptions = name; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_CVM.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kae // https://amicitia.miraheze.org/wiki/CVM ← found by BJNFNE // https://github.com/JayFoxRox/cvm_tool/blob/master/cvm_parser.h meta("format", "CRI Middleware's PS2 CVM/ROFS image (.CVM)"); function detect() { if (X.Sz() < 0x800 || !X.c("'CVMH'") || !isAllZeroes(0x0C, 0x10) || !X.c("'ROFS'", 0x34)) return; var versionNumber = X.SA(0x44, 4); if (!/^[0-9\.]{4}/.test(versionNumber)) return; var sz = X.U64(0x1C,_BE), sec = X.U32(0x80,_BE), p = 0, hkhd, hksz, end = false; if(sz < 0xC+X.U64(4,_BE)) return; if (!isWithin(sec, 1, (0xC+X.U64(4,_BE)-0x100)>>2)) return; while (p < sz && p < X.Sz()) { hkhd = X.SA(p, 4); hksz = X.U64(p+4,_BE); p += 0xC; if (!hksz || !charStat(hkhd, true).includes('allasc')) return; switch(hkhd) { case 'CVMH': break; //already got all info... case 'ZONE': break; //nothing to see here... default: end = true; break; //time to stop, we found unexpected characters } if(end) break; p += hksz } sVersion = 'v'+versionNumber; bDetected = true; if (X.isVerbose()) sOption(outSz(sz),'sz:'); else if (sz < X.Sz()) sVersion += '/malformed!short'; return result(); } ================================================ FILE: db/Binary/format_DESKTOP.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Linux based dists for the desktop shortcuts // Rewritten by DosX meta("format", "Desktop Entry (.desktop)"); function detect() { if (Binary.isText() && (Binary.compare("'#'") || Binary.compare("'\n'") || Binary.compare("'['")) && Binary.isSignaturePresent(0, 512, "'[Desktop Entry]'")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_DSW.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.ibm.com/docs/en/informix-servers/15.0.0?topic=bladesmith-microsoft-visual-c-files meta("format", "Microsoft Developer Studio Workspace"); function detect() { if (Binary.compare("'Microsoft Developer Studio Workspace File'")) { var versionNumber = Binary.getString(57, 5).trim(); if (/^\d+\.\d{2}$/.test(versionNumber)) { sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_DTA.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://zenhax.com/viewtopic.php@t=1382.html meta("format", "DTA"); function detect() { if (Binary.compare("03000000....08")) { var model = Binary.getString(7, 8).trim(); if (/^[a-z0-9]{8}/.test(model)) { if (X.isVerbose()) sOptions = model; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_Director.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Director File Format Info: // XFIR = 58464952 (Big endian) // RIFX = 52494658 (Little endian) // Platform type: // BE = Mac based Director game // LE = Windows based Director game // https://github.com/rvanlaar/director-extrator/blob/master/extract.py // https://github.com/einstein95/py_scripts/blob/main/shock.py // https://wiki.scummvm.org/index.php?title=Director meta("format", "Director (.DXR/.DIR/.DCR/.DRX/.CXT/.CST/.CCT)"); function detect() { if (Binary.compare("5249465800")) { sOptions = Binary.getString(0x00000008, 8); sVersion = "Win"; bDetected = true; } else if (Binary.compare("58464952......00")) { sOptions = Binary.getString(0x00000008, 8); sVersion = "Mac"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_DunkleSchattenConfig.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://werbespiel.blogspot.com/2010/07/dunkle-schatten.html meta("format", "Dunkle Schatten Config"); function detect() { if (Binary.compare("'DSchCFG'000001")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_DunkleSchattenSave.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://werbespiel.blogspot.com/2010/07/dunkle-schatten.html meta("format", "Dunkle Schatten Save"); function detect() { if (Binary.compare("'DSchSAV'000001")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_Empty.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "Empty file"); function detect() { if (Binary.getSize() == 0) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_FAS.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/FAS-and-VLX-files.html meta("format", "FAS"); function detect() { if (Binary.compare("0d0a20'FAS4-FILE'")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_FLDB.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE meta("format", "Becker file location databases"); function detect() { if (Binary.compare("'FLDB'", 0x00000014)) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_FNX.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Iron Willy meta("format", "FNX"); function detect() { if (Binary.compare("'adgames'")) { var copyrightYear = Binary.getString(17, 4).trim(); if (/^[12]\d{3}$/.test(copyrightYear)) { sVersion = copyrightYear; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_FST.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE meta("format", "FST"); function detect() { if (Binary.compare("';Ligne de commentaires'0d0a")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_GAL.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://graphicsgale.com/ meta("format", "Gale (.GAL)"); function detect() { if (Binary.compare("'Gale102'..00000001")) { var frame = Binary.getString(20, 6).trim(); if (/^[A-Za-z0-9]{6}/.test(frame)) { sVersion = "1.0.2"; sOptions = frame; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_GBI.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.gburner.com/ meta("format", "gBurner Image (.GBI)"); function detect() { if (Binary.compare("'GBI'000000000000000000000000004C")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_GME.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/entropia/tip-toi-reveng/blob/master/GME-Format.md meta("format", "GME"); function detect() { if (Binary.compare("'1CHOMPTECH DATA FORMAT CopyRight 2009'", 0x0020)) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_GameMaps.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Author of original rule: Arjan Onwezen // Info: https://moddingwiki.shikadi.net/wiki/GameMaps_Format meta("format", "GameMaps (TED editor)"); function detect() { if (Binary.compare("'TED5v1.0'..ff")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_GamingRoot.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://learn.microsoft.com/en-us/answers/questions/4116358/gamingroot-and-xboxgames-keeps-generating-even-if meta("format", "GamingRoot"); function detect() { if (Binary.compare("52 47 42 58 01 00 00 00 58 00 62 00 6F 00 78 00 47 00 61 00 6D 00 65 00 73 00 00 00")) { sVersion = "Xbox Games"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_HIV.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-hives meta("format", "Windows Registry Hive (.HIV)"); function detect() { if (Binary.compare("'regf'..0000000..00000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_HNM.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Woody_Woodpecker:_Escape_from_Buzz_Buzzard_Park meta("format", "HNM"); function detect() { if (Binary.compare("'HNM6'0000..108002")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_HSM.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Woody Woodpecker: Escape from Buzz Buzzard Park // https://en.wikipedia.org/wiki/Woody_Woodpecker:_Escape_from_Buzz_Buzzard_Park meta("format", "HSM"); function detect() { if (Binary.compare("'1LMB'000000108002")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_ILK.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://learn.microsoft.com/en-us/cpp/build/reference/ilk-name-incremental-database-file meta("format", "Name incremental database file (.ILK)"); function detect() { if (Binary.compare("'Microsoft Linker Database'0a0a071a000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_IPCH.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Rewritten by DosX // https://fileinfo.com/extension/ipch meta("format", "Intellisense Precompiled Header File (.IPCH)"); function detect() { if (Binary.compare("'EDG C/C++ version '")) { var versionInfo = Binary.getString(18, 3).trim(); if (versionInfo) { sVersion = versionInfo; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_ITL.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://home.vollink.com/gary/playlister/ituneslib.html meta("format", "iTunes Library"); function detect() { if (Binary.compare("'hdfm'00000090")) { var versionNumber = Binary.getString(17, 8).trim(); if (/^[0-9/.]{8}$/.test(versionNumber)) { if (X.isVerbose()) sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_IVF.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/Duck_IVF meta("format", "Duck IVF"); function detect() { if (Binary.compare("'DKIF'00002000")) { var codecInfo = Binary.getString(8, 4).trim(); if (/^[A-Z0-9]{4}$/.test(codecInfo)) { if (X.isVerbose()) sOptions = "Codec: " + codecInfo; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_Img.UDIF.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "Universal Disk Image Format"); function detect() { if (Binary.compare("7801730d62626060")) { sOptions = "read-only zlib-compressed"; bDetected = true; } else if (Binary.compare("45520200") && Binary.compare("'disk image'", 0x410)) { sOptions = "read/write"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_InnoSetupUninstall.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://jrsoftware.org/isinfo.php meta("format", "Inno Setup Uninstall Log"); function detect() { if (Binary.compare("'Inno Setup Uninstall Log (b) 64-bit'")) { sVersion = "64-bit"; var uuid = Binary.getString(64, 39).trim(); if (/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/.test(uuid)) { if (X.isVerbose()) sOptions = "UUID: " + uuid; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_InterleafFile.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.legoisland.org/wiki/Interleaf_File meta("format", "Interleaf File"); function detect() { if (Binary.compare("52494646........'OMNI'")) { var metadata = Binary.getString(12, 4).trim(); if (/^[A-Za-z]{4}/.test(metadata)) { if (X.isVerbose()) sOptions = metadata; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_LCA.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // http://zenhax.com/viewtopic.php@t=17622.html meta("format", "LCA"); function detect() { if (Binary.compare("4c45474f")) { var vcaFile = Binary.getString(85, 12).trim(); if (/^[A-Z0-9/.]{12}$/.test(vcaFile)) { if (X.isVerbose()) sOptions = vcaFile; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_LGX.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Lernwerkstatt 7 // http://www.binblind.de/software/Logox/index.html meta("format", "Logox4 Speechengine"); function detect() { if (Binary.compare("'LGX'")) { var versionNumber = Binary.getString(7, 5).trim(); if (/^[0-9]{5}/.test(versionNumber)) { if (X.isVerbose()) sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_LIXS.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Island_Xtreme_Stunts meta("format", "LIXS"); function detect() { if (Binary.compare("'Island Xtreme Stunts - Silicon Dreams'")) { var copyrightYear = Binary.getString(40, 5).trim(); if (/^[12]\d{3}$/.test(copyrightYear)) { sVersion = copyrightYear; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_LVL.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.mobygames.com/game/138556/the-energy-thieves/ Used by Adiboo & The Energy Thieves (2004) meta("format", "LVL"); function detect() { if (Binary.compare("1C070000....0000")) { var worldrender = Binary.getString(16, 13).trim(); if (/^[A-Za-z]{13}/.test(worldrender)) { sOptions = worldrender; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_MAT.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/MATLAB meta("format", "MatLab"); function detect() { if (Binary.compare("'MATLAB'")) { var versionNumber = Binary.getString(7, 3).trim(); if (/^[0-9/.]{3}$/.test(versionNumber)) { if (X.isVerbose()) sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_MDL.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://developer.valvesoftware.com/wiki/MDL meta("format", "MDL"); function detect() { if (Binary.compare("'IDST'")) { var idstVersion = Binary.getString(4, 1).trim(); if (/^[0-9]{1}/.test(idstVersion)) { if (X.isVerbose()) sVersion = idstVersion; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_MDS.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE meta("format", "Alcohol 120% Media Descriptor Sidecar file (.MDS)"); function detect() { if (X.c("'MEDIA DESCRIPTOR'01")) { //always v1.xx, as per libMirage parser.c var cdt = ''; switch (X.U16(0x12, _LE)) { //an additional test, too case 0: cdt = 'CD'; break; case 1: cdt = 'CD-R'; break; case 2: cdt = 'CD-RW'; break; case 0x10: cdt = 'DVD'; break; case 0x12: cdt = 'DVD-R'; break; default: return; } sVersion = 'v1-' + X.U8(0x11) + '/' + cdt; // not '.' until this is zero-padded bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_MS-DBG.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Status: WIP // https://github.com/libyal/libmdmp/blob/main/documentation/Minidump%20(MDMP)%20format.asciidoc meta("format", "Windows Minidump (.DMP)"); function detect() { if (Binary.getSize() >= 9) { if (Binary.compare("'MDMP'93A7")) { bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_MS-PST.sg ================================================ // Detect It Easy: detection rule file // Author: Arjan Onwezen // Info: https://msopenspecs.azureedge.net/files/MS-PST/%5bMS-PST%5d.pdf meta("format", "Microsoft Outlook Personal Storage Table (PST)"); function detect() { if (Binary.getSize() > 1024) { if (Binary.compare("21 42 44 4E") && Binary.compare("53 4D", 8)) { bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_MS-VHD.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Status: WIP meta("format", "Microsoft Virtual Hard Disk (.VHD)"); function detect() { if (Binary.getSize() >= 0x200) { if (Binary.compare("'conectix'", Binary.getSize() - 0x200)) { bDetected = true; nOffset = Binary.getSize() - 0x200 sVersion = "v" + Binary.read_uint16(nOffset + 0xC, _BE) + "." + Binary.read_uint16(nOffset + 0xE, _BE); switch (Binary.read_uint32(nOffset + 0x3C, _BE)) { // case 1: sOption("deprecate"); break; case 2: sOption("Fixed"); break; case 3: sOption("Dynamically"); break; case 4: sOption("Differencings"); break; default: return; } sOption("OrginalSize:" + Binary.bytesCountToString(Binary.read_uint64(nOffset + 0x28, _BE))); sOption("CurrentSize:" + Binary.bytesCountToString(Binary.read_uint64(nOffset + 0x30, _BE))); if (Binary.isVerbose()) { sOption("CreaterApp:" + Binary.getString(nOffset + 0x1C, 4)); sOption("v" + Binary.read_uint16(nOffset + 0x20, _BE) + "." + Binary.read_uint16(nOffset + 0x22, _BE)); switch (Binary.read_uint32(nOffset + 0x24, _BE)) { case 0x57693272: sOption("WI2R"); break; case 0x5769326B: sOption("WINDOWS"); break; case 0x57327275: sOption("W2RU"); break; case 0x57326B75: sOption("W2KU"); break; case 0x4D616320: sOption("MACINTOSH"); break; case 0x4D163258: sOption("MACX"); break; default: return; } } } } return result(); } ================================================ FILE: db/Binary/format_MS-VHDX.sg ================================================ // Detect It Easy: detection rule file // Author: Arjan Onwezen // Info: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-vhdx/83e061f8-f6e2-4de1-91bd-5d518a43d477 meta("format", "Virtual Hard Disk v2 (VHDX)"); function detect() { if (Binary.getSize() > 0x100000) { if (Binary.compare("76 68 64 78 66 69 6C 65")) { bDetected = true; sOption("CreaterApp:" + Binary.read_unicodeString(8, 50)); } } return result(); } ================================================ FILE: db/Binary/format_MS-XNA.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Status: WIP meta("format", ""); function detect() { if (Binary.getSize() >= 9) { if (Binary.compare("'XNB'")) { bDetected = true; sName = "Microsoft XNA Game Studio Binary Package (.XNB)" var nXNA_Ver = Binary.read_uint8(0x4); var fFlag = Binary.read_uint8(0x5); switch (nXNA_Ver) { case 3: sVersion = "v3.0"; break; case 4: sVersion = "v3.1"; break; case 5: sVersion = "v4.0"; break; default: bDetected = false; } /* XNA Studio platforms: 'w' = Windows, 'm' = Windows Phone 7, 'x' = X360 * MonoGame extensions: 'i' = iOS, 'a' = Android, 'X' = MacOSX, 'P' = PS4, 'S' = Switch, etc */ switch (Binary.read_uint8(0x3)) { case 0x77: sOption("Windows"); break; case 0x78: sOption("Xbox 360"); break; case 0x6D: sOption("Windows Phone 7"); break; case 0x69: sOption("iOS"); break; case 0x61: sOption("Android"); break; case 0x58: sOption("MacOSX"); break; case 0x50: sOption("PS4"); break; case 0x53: sOption("Switch"); break; default: sOption("UNKNOWN"); // bDetected=false; } if (Binary.isVerbose()) { if ((fFlag & 0x01) >> 0) { sOption("hiDef") }; if ((fFlag & 0x80) >> 2) { sOption("compressed") }; if (!Binary.getSize() == Binary.read_uint32(0x5)) { sOption("wrong size!") }; } } else if (Binary.compare("'WBND'")) { bDetected = true; sName = "Microsoft XACT Wave Bank (.XWB)" } else if (Binary.compare("'SDBK'")) { bDetected = true; sName = "Microsoft XACT Sound Bank (.XSB)" } else if (Binary.compare("'XGSF'")) { bDetected = true; sName = "Microsoft XACT Global Settings File (.XGS)" } } return result(); } ================================================ FILE: db/Binary/format_OBC.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Original location to look at is "'OBC Copyright MDO 1999"' since OBCEditor (https://github.com/BJNFNE/DEV7/blob/master/tools/OBCEditor/OBCEditor.py) // updates the copyright year from the systemtime it wouldn't match with the old 1999 hardcoded variant. // OBC is an compiled scripting language which get compiled to their OBC script. // https://wiki.scummvm.org/index.php?title=Gob/DEV7_Information#STK21/OBC meta("format", "Compiled DEV7 object (.OBC)"); function detect() { if (Binary.compare("'OBC Copyright MDO'20")) { var copyrightYear = Binary.getString(18, 5).trim(); if (/^[12]\d{3}$/.test(copyrightYear)) { sVersion = copyrightYear; sOptions = File.cleanString(Binary.getString(0x0054, 14)); bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_OpenSSH.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.openssh.com/ meta("format", "OpenSSH Private Key"); function detect() { if (Binary.compare("2d2d2d2d2d424547494e20'OPENSSH PRIVATE KEY'2d2d2d2d2d")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_P7X.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://stackoverflow.com/questions/38634052/what-is-the-structure-of-appxsignature-p7x meta("format", "P7X"); function detect() { if (Binary.compare("'PKCX0'82")) { sOptions = "PKCX0"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_PAT.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.gimp.org/ meta("format", "Gimp Pattern"); function detect() { if (Binary.compare("000000..00000..10000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_PDB.1.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // --------------------------------- // Author of original rule: BJNFNE // https://en.wikipedia.org/wiki/Program_database meta("format", "Microsoft Program Database (.PDB)"); function detect() { if (Binary.compare("'BSJB'0100")) { sVersion = "1.0"; bDetected = true; } else if (Binary.compare("'Microsoft C/C++ program database 2.00\r\n\'1A4A470000")) { sVersion = "2.0"; bDetected = true; } else if (Binary.compare("'Microsoft C/C++ MSF 7.00\r\n'1A4453000000")) { sVersion = "7.0"; bDetected = true; } if (bDetected) { var refs = { "'$'11'@P:Microsoft.VisualBasic'00": "VB.NET", "%%%%%%%%%%'.cs'00": "C#", "'$'11'@P:FSharp.Core'00": "F#", "'std::'%%%%%%": "C++" // todo }; for (var key in refs) { if (Binary.isSignaturePresent(0, 0x900000, key)) { sLang = refs[key]; break; } } } return result(); } ================================================ FILE: db/Binary/format_PEM.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail meta("format", "Privacy-Enhanced Mail (.PEM)"); function detect() { if (Binary.compare("2d2d2d2d2d424547494e20'CERTIFICATE'2d2d2d2d2d")) { sVersion = "Certificate"; bDetected = true; } else if (Binary.compare("2d2d2d2d2d424547494e20'PRIVATE KEY'2d2d2d2d2d")) { sVersion = "Private Key"; bDetected = true; } else if (Binary.compare("2d2d2d2d2d424547494e20'RSA PRIVATE KEY'2d2d2d2d2d")) { sVersion = "RSA Private Key"; bDetected = true; } else if (Binary.compare("2d2d2d2d2d424547494e20'ENCRYPTED PRIVATE KEY'2d2d2d2d2d")) { sVersion = "Encrypted Private Key"; bDetected = true; } else if (Binary.compare("2d2d2d2d2d424547494e20'PUBLIC KEY'2d2d2d2d2d")) { sVersion = "Public Key"; bDetected = true; } else if (Binary.compare("2d2d2d2d2d424547494e20'CERTIFICATE REQUEST'2d2d2d2d2d")) { sVersion = "Certificate Signing Request (CSR)"; bDetected = true; } else if (Binary.compare("2d2d2d2d2d424547494e20'PKCS7'2d2d2d2d2d")) { sVersion = "PKCS7/CMS Message"; bDetected = true; } else if (Binary.compare("2d2d2d2d2d424547494e20'X509 CRL'2d2d2d2d2d")) { sVersion = "Certificate Revocation List (CRL)"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_PGP.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.gnupg.org/ meta("format", "GPG"); function detect() { if (Binary.compare("2d2d2d2d2d424547494e20'PGP'205349474e41545552452d2d2d2d2d")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_POL.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://learn.microsoft.com/en-us/previous-versions/windows/desktop/policy/registry-policy-file-format meta("format", "Registry Policy File"); function detect() { if (Binary.compare("5052656701000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_PRI.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://learn.microsoft.com/en-us/windows/win32/menurc/pri-indexing-reference meta("format", "PRI"); function detect() { if (Binary.compare("'mrm_pri2'00000100")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_PS-X.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://problemkaputt.de/psxspx-cdrom-file-playstation-exe-and-system-cnf.htm meta("format", "PlayStation executable (PS1)"); function detect() { if (Binary.compare("'PS-X EXE'")) { var regionString = Binary.getString(76, 48).trim(); if (regionString) { if (X.isVerbose()) sOptions = "Region: " + regionString; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_PSM2CFG.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Dunkle Schatten // https://wiki.multimedia.cx/index.php/Engines/PSM meta("format", "PSM2CFG"); function detect() { if (Binary.compare("'PSM2CFG'")) { var versionNumber = Binary.getString(17, 4).trim(); if (/^[0-9\.]{4}$/.test(versionNumber)) { sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_RARREG.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.win-rar.com/products-winrar.html meta("format", "RAR registration data (.RARREG)"); function detect() { if (Binary.compare("'RAR registration data'0d0a")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_RCK.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Woody_Woodpecker:_Escape_from_Buzz_Buzzard_Park meta("format", "RCK"); function detect() { if (Binary.compare("'RKET'00000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_RCO.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE meta("format", "Resource Container (.RCO)"); function detect() { if (Binary.compare("0050524600010000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_RGS.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by InstallShield Professional // https://file.org/extension/rgs meta("format", "InstallShield"); function detect() { if (Binary.compare("'HKCR'0d0a7b0d0a09")) { sVersion = "Windows Registry Script"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_RedShirt.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Uplink_(video_game) meta("format", "RedShirt"); function detect() { if (Binary.compare("'REDSHIRT'00")) { sVersion = "v1.0"; bDetected = true; } else if (Binary.compare("'REDSHRT2'00")) { sVersion = "v2.0"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_SDI.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/System_Deployment_Image meta("format", "System Deployment Image (.SDI)"); function detect() { if (Binary.compare("'$SDI0001'0000000000000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_SFK.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.reddit.com/r/audioengineering/comments/4208al/does_anyone_know_the_actual_format_of_sony_sfk/ meta("format", "SFK"); function detect() { if (Binary.compare("'SFPK'0100000040")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_SHBIN.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.3dbrew.org/wiki/SHBIN meta("format", "Shader Binary"); function detect() { if (Binary.compare("'DVLB'")) { var dvlp = Binary.getString(12, 4).trim(); if (/^[A-Z]{4}/.test(dvlp)) { if (X.isVerbose()) sOptions = dvlp; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_SLN.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://learn.microsoft.com/en-us/cpp/build/reference/project-and-solution-files?view=msvc-170 meta("format", "Visual Studio solution file"); function detect() { if (Binary.compare("efbbbf0d0a'Microsoft Visual Studio Solution File'")) { var versionNumber = Binary.getString(59, 5).trim(); if (/^\d+\.\d{2}$/.test(versionNumber)) { sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_SLNX.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://devblogs.microsoft.com/dotnet/introducing-slnx-support-dotnet-cli/ meta("format", "SLNX"); function detect() { if (Binary.compare("''0d0a2020")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_SSHPublicKey.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Public-key_cryptography meta("format", "SSH Public Key"); function detect() { if (Binary.compare("'ssh-ed25519'20")) { sOptions = "ed25519"; bDetected = true; } else if (Binary.compare("'ssh-rsa'20")) { sOptions = "RSA"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_SystemErr.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=Gob/DEV6_Information#Error_Messages (Used in Coktel Vision games) meta("format", "System_Err"); function detect() { if (Binary.compare("'System_Err'")) { var errorLine = Binary.getString(11, 32).trim(); if (/^[ A-Za-z0-9\-\:\\\.]{1,}$/.test(errorLine)) { if (X.isVerbose()) sOptions = errorLine; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_TLB.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // http://justsolve.archiveteam.org/wiki/Microsoft_Type_Library meta("format", "Microsoft Type Library"); function detect() { if (Binary.compare("'MSFT'020001000000000009040000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_TOT.1.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // --- // Samples by: BJNFNE // https://github.com/scummvm/scummvm-tools/blob/77daf9269a65c428a8445653c2b59196dfd52021/engines/gob/degob_script_v1.cpp meta("format", "TOT"); function detect() { if (Binary.compare("?? ** 00'") && Binary.isSignaturePresent(0, 32, "00 00 '(c)'")) { bDetected = true; var versionInfo = Binary.findSignature(0, 64, "'Version ' %% 2E %%"); if (versionInfo !== -1) { sVersion = Binary.getString(versionInfo + 8, 4); } var copyrightYear = Binary.findSignature(0, 64, "'19' %% %%"); if (copyrightYear !== -1) { sVersion += (sVersion ? ", " : String()) + Binary.getString(copyrightYear, 4); } } return result(); } ================================================ FILE: db/Binary/format_TPU.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Turbo_Pascal#Units meta("format", "Turbo Pascal Unit (.TPU)"); function detect() { if (Binary.compare("'TPUQ'00000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_UCM.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://tcrf.net/Crazy_Machines meta("format", "UCM"); function detect() { if (Binary.compare("'UCM1'02000000")) { sVersion = "1.0"; sOptions = Binary.getString(0x0008); bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_UPC.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://abandonware-magazines.github.io/magazines/magazine.html?m=Wiz&n=057&pagenumbers=1,12 (Used in My Fearless Friend made by Makh Shevet) meta("format", "UPC"); function detect() { if (Binary.compare("'UPC'")) { var frc = Binary.getString(13, 3).trim(); if (/^[A-Z]{3}$/.test(frc)) { if (X.isVerbose()) sOptions = frc; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_UPF.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://abandonware-magazines.github.io/magazines/magazine.html?m=Wiz&n=057&pagenumbers=1,12 (Used in My Fearless Friend made by Makh Shevet) meta("format", "UPF"); function detect() { if (Binary.compare("'UPF'")) { var frf = Binary.getString(13, 3).trim(); if (/^[A-Z]{3}$/.test(frf)) { if (X.isVerbose()) sOptions = frf; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_UPI.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://abandonware-magazines.github.io/magazines/magazine.html?m=Wiz&n=057&pagenumbers=1,12 (Used in My Fearless Friend made by Makh Shevet) meta("format", "UPI"); function detect() { if (Binary.compare("'UPI'")) { var fri = Binary.getString(13, 3).trim(); if (/^[A-Z]{3}$/.test(fri)) { if (X.isVerbose()) sOptions = fri; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_VDI.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Storage/VDICore.h meta("format", "Virtual Disk Image (.VDI)"); function detect() { if (Binary.getSize() >= 0x200) { if (Binary.compare("7F10DABE", 0x40)) { sVersion = "v" + Binary.read_uint16(0x44) + "." + Binary.read_uint16(0x46); var sImgText = Binary.getString(0); var aImgName = sImgText.match(/<<< (.*?)\ >>>/); if (aImgName) { sOptions = "\"" + sOptions.append(aImgName[1]) + "\""; bDetected = true; } if (bDetected && Binary.isVerbose()) { switch (Binary.read_uint16(0x4C)) { case 1: sOption("Normal dynamically"); break; case 2: sOption("Preallocated fixed size"); break; case 3: sOption("Dynamically growing for undo/commit changes"); break; case 4: sOption("Dynamically growing for differencings"); break; } sOption("Size:" + Binary.bytesCountToString(Binary.read_uint64(0x0170))); } } } return result(); } ================================================ FILE: db/Binary/format_VM2.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.psdevwiki.com/ps3/PS2_Savedata meta("format", "PS2 Memory Card"); function detect() { if (Binary.compare("'Sony PS2 Memory Card Format 1.2.0.0'000000000000020200100000")) { sVersion = "1.2.0.0"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_VTF.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/Wanty5883/Titanfall2/blob/master/documentation/textures/valve-texture-format-vtf/README.md meta("format", "Valve Texture"); function detect() { if (Binary.compare("'VTF'0007000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_VVD.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://developer.valvesoftware.com/wiki/VVD meta("format", "VVD"); function detect() { if (Binary.compare("'IDSV'04000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_W3D.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://director-online.dasdeck.com/buildArticle.php?id=1121 meta("format", "Shockwave 3D"); function detect() { if (Binary.compare("'IFX'000800000011000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_WASM.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/WebAssembly meta("format", "WebAssembly (.WASM)"); function detect() { if (Binary.compare("00'asm'010000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_WBFS.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://file-extensions.com/docs/wbfs meta("format", "Wii Backup File System"); function detect() { if (Binary.compare("'WBFS'00....000915000001000000")) { sOptions = File.cleanString(Binary.getString(0x00000200, 6)); bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_XBE.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://xboxdevwiki.net/Xbe meta("format", "Xbox Executable (.XBE)"); function detect() { if (Binary.compare("'XBEH'000000000000000000000000")) { sOptions = "unsigned"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_XBF.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.markup.xamlbinarywriter?view=winrt-26100 meta("format", "XBF"); function detect() { if (Binary.compare("'XBF'")) { var id = Binary.getString(68, 32).trim(); if (/^[A-Z0-9]{32}/.test(id)) { if (X.isVerbose()) sOptions = id; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_XCG.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Battlecry 3 // https://en.wikipedia.org/wiki/Warlords_Battlecry_III meta("format", "XCG (Graphics)"); function detect() { if (Binary.compare("'xcg File'")) { var versionNumber = Binary.getString(9, 4).trim(); if (/^[0-9/.]{4}$/.test(versionNumber)) { sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_XCI.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Battlecry 3 // https://en.wikipedia.org/wiki/Warlords_Battlecry_III meta("format", "XCI"); function detect() { if (Binary.compare("'xci File'")) { var versionNumber = Binary.getString(9, 4).trim(); if (/^[0-9/.]{4}$/.test(versionNumber)) { sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_XCR.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Used by Battlecry 3 // https://en.wikipedia.org/wiki/Warlords_Battlecry_III meta("format", "XCR"); function detect() { if (Binary.compare("'xcr File'")) { var versionNumber = Binary.getString(9, 4).trim(); if (/^[0-9/.]{4}$/.test(versionNumber)) { sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_XCS.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/Engines/XPAT#XCS meta("format", "XPAT Compiled Script (.XCS)"); function detect() { if (Binary.compare("58 43 53")) { var platform = Binary.getString(4, 2).trim(); if (/^[A-Z]{2}$/.test(platform)) { sVersion = platform; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_XDelta.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Xdelta meta("format", "XDelta"); function detect() { if (Binary.compare("d6c3c4000502")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_XEX.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://free60.org/System-Software/Formats/XEX/ meta("format", "Xbox Executable File (.XEX)"); function detect() { if (Binary.compare("'XEX2'000000..00")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_ZZDATA.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // http://www.cdinteractive.co.uk/forums/cdinteractive/viewtopic.php?t=2115 meta("format", "ZZDATA"); function detect() { if (Binary.compare("'DIRINFO'000000000000000000")) { sVersion = "CD-I"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_ZinsSAV.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.mobygames.com/game/9264/captain-zins/ meta("format", "Captain Zins Save"); function detect() { if (Binary.compare("'ZinsSAV'000001")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_bin.AAALogo.1.sg ================================================ // Detect It Easy: detection rule file // Author: Tembo (http://tembolab.pl/products/executable-image-viewer.html) meta("format", "AAA Logo"); function detect() { if (Binary.getSize() >= 90) { if (Binary.compare("2CA46774")) { bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_bin.COL.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kae meta("format", "RenderWare collision data (.COL)"); // Criterion Software/Rockstar Games function detect() { var hksz = 0, lst = [], c = 0, bad = ''; for (p = 0; p < X.Sz(); c++, p += hksz) { if (!X.c("'COLL'", p) || X.U8(p - 1) || p + 8 > X.Sz()) if (!X.c("'COLL'", --p)) break; else bad = bad.addIfNone('!badchunk'/*+'@'+Hex(p+1-hksz)*/); // In GTA:SA, peds.col has 3 chunks that are 1 byte shorter than declared! // They seem to be linked to the unusual entity name length. hksz = 8 + X.U32(p + 4, _LE); if (p + hksz > X.Sz()) return; var entity = X.SA(p + 8, 8); if (!entity.length) break; //_l2r('col',p,entity+':'+charStat(X.readBytes(p+8,8,true))); if (charStat(entity, 1).indexOf('allasc') < 0) return; lst.push(X.SA(p + 8, 8)) } if (!c) return; if (bad.length) sVersion = sVersion.appendS('malformed' + bad, '/'); if (X.isVerbose()) { sOption(addEllipsis(lst.join(','))); sOption(outSz(p), 'sz:'); } bDetected = true; return result(); } ================================================ FILE: db/Binary/format_bin.GuitarPro.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // WIP // Authors: // Tembo (http://tembolab.pl/products/executable-image-viewer.html) // Kaens TG@kaens meta("format", "Arobas Music Guitar Pro"); /* beautify ignore:start */ function detect() { if (Binary.getSize() > 31) { if (Binary.compare("'BCFZ'") || Binary.compare("'BCFS'")) { sVersion = "6.X"; sName += " Tablature"; bDetected = true; } else if (Binary.compare("'GPAR'")) { sVersion = "6.X"; sName += " Soundbank"; bDetected = true; } else if ((X.c("18") || X.c("19")) && X.c("'FICHIER GUITAR PRO'20",1)) { // sV = /v(\d*)\.(\d*)/.exec(X.SA(X.U8(0)-4,6)); if (sV[0]) { sName += " Tablature"; bDetected = true; sVersion = sV[0]; nV = Number(sV[1]+sV[2]); enc = 'CP1251'; tempo = ''; p = 0x1F; // ref https://github.com/CoderLine/alphaTab/blob/develop/src/importer/Gp3To5Importer.ts → readScore() title = X.SC(p+5,X.U8(p+4),enc); p += 4+X.U32(p); subtitle = X.SC(p+5,X.U8(p+4),enc); p += 4+X.U32(p); artist = X.SC(p+5,X.U8(p+4),enc); p += 4+X.U32(p); album = X.SC(p+5,X.U8(p+4),enc); p += 4+X.U32(p); words = X.SC(p+5,X.U8(p+4),enc); p += 4+X.U32(p); if(nV >= 500) { music = X.SC(p+5,X.U8(p+4),enc); p += 4+X.U32(p) } else music = words; cr = X.SC(p+5,X.U8(p+4),enc); p += 4+X.U32(p); tab = X.SC(p+5,X.U8(p+4),enc); p += 4+X.U32(p); instructions = X.SC(p+5,X.U8(p+4),enc); p += 4+X.U32(p); var notice = '', noticeLines = X.U32(p); p += 4; for (i = 0; i < noticeLines && p < X.Sz(); i++) { if (i > 0) notice += '\r\n'; notice += X.SC(p+5,X.U8(p+4),enc); p += 4+X.U32(p); } if(nV < 500) p++; //triplet feel before gp5 if(nV >= 400) for(p+=4,i=0; i < 5 && p < X.Sz(); i++) p += 8+X.U32(p+4); // beat lyrics if(nV >= 510) p += 19; //rse master settings if(nV >= 500) { for(p+=30,i=0; i < 10 && p < X.Sz(); i++) p += 4+X.U32(p); //page setup and text field stencils tempo = X.SC(p+5,X.U8(p+4),enc).trim(); p += 4+X.U32(p) } if(t=X.U32(p)) tempo = tempo.appendS(t+'bpm',':'); p += 4; if(nV >= 510) p++; //hide tempo? p += 4; if(nV >= 400) p++; //key & octave p += 64*12; //playback info if(nV >= 500) p += 2*19+4; //direction signs & ...4 bytes bars = X.U32(p); trk = X.U32(p+4); p += 8; for(i=0; i < bars && p < X.Sz(); i++) { //read master bars var f = X.U8(p++); if(f&1) p++; if(f&2) p++; if(f&8) p++; if((f&0x10) && nV < 500) p++; if(f&0x20) p += 8+X.U32(p); //annotated bar if(f&0x40) p += 2; if(nV >= 500) { p += 3; if(f&3) p += 4 } } for(i=0,trks=[]; i < trk && p < X.Sz(); i++) { //read track data //_l2r('gpx',p,'track '+i+' data') var f = X.U8(p++); if((t=X.SC(p+1,X.U8(p),enc).trim()) != '') trks.push(t); p += 41; var strings = X.U32(p); p += 32; //strings & tunings var frets = X.U32(p+12), capo = X.U32(p+16); p += 24; //port,index,fxch,frets,capo,colour //_l2r('gpx',p,j+': strings:'+strings+' frets:'+frets+' capo|'+capo) if(nV >= 500) p += 45; if(nV >= 510) { p += 8+X.U32(p); p += 4+X.U32(p) } } /*// This block has bugs to find (there's just a couple at most; add checkpoints to alphaTab, compare) // AND it's gonna be rather sluggish even if all is right. TODO for(i=0; i < bars && p < X.Sz(); i++) for(j=0; j < trk && p < X.Sz(); j++) { //read bars → voices → beats if(nV >= 500) { p++; voc = 2 } else voc = 1; for(v=0; v < voc; v++) { var beatnum = X.U32(p); p += 4; for(k=0; k < beatnum && p < X.Sz(); k++) { //_l2r('gpx',p,'bar:'+i+' voc:'+v+' beat:'+k) f = X.U8(p++); if(f&0x40) p++; p++; if(f&0x20) p += 4; if(f&2) { //read chord info if(nV >= 500) { p += 17+22+4+4+28; p += 1+X.U8(p); p += 26 } else if(X.U8(p++)) if(nV >= 400) { p += 16+22+4+4+28; p += 1+X.U8(p); p += 26 } else { p += 25+35+4+24+36 } else p += 4+X.U32(p)+4+4*(nV >= 406? 7: 6); } if(f&4) { text = X.SC(p+5,X.U8(p+4),enc); p += X.U32(p) } // could be more lyrics inside beat text if(f&8) { //read beat fx fs = X.U8(p++); f2 = 0; if(nV >= 400) f2 = X.U8(p++); if((fs&0x20)) { p++; if(nV < 400) p += 4 } //slapPop if(f2&4) { //read tremolo bar effect (beat) p += 5; var pts = X.U32(p); p += 4+pts*9 } if(fs&0x40) p += 2; //stroke if(f2&2) p++; //pickstroke } if(f&0x10) { //read mix table change p++; if(nV >= 500) p += 16; var a = []; for(z=0; z < 6 && p < X.Sz(); z++) a.push(X.U8(p++)); if(nV >= 500) p += 4+X.U32(p); a.push(X.U32(p)); p += 4; for(z=0; z < 6 && p < X.Sz(); z++) if(a[z]) p++; if(a[7]) { p++; if(nV >= 510) p++ } if(nV >= 400) p++; //mixtableflags if(nV >= 500) p++; //wahtype if(nV >= 510) { p += 4+X.U32(p); p += 4+X.U32(p) } } f = X.U8(p++); //stringflags??? for(l=6; l >= 0 && p < X.Sz(); l--) if((f&(1<= 500) { if(f2&1) p += 8; p++ } if(f2&8) { var xf = X.U8(p++), xf2 = nV >= 400? X.U8(p++): 0; if(xf&1) { p += 5; pts = X.U32(p); p += 4+pts*9 } //read bend if(xf&0x10) p += 4+(nV >= 500? 1: 0); //read grace if(xf2&4) p++; if(xf2&8) p++; if(xf2&0x10) { t = X.U8(p++); if(nV >= 500) if(t == 2) p += 3; else if(t == 3) p++ } //read AH if(f&0x20) p += 2; } } if(nV >= 500) { f = X.U16(p); p += 2; if(f&0x800) p++; } } } } sz = p;*/ //_l2r('gpx',p,outArray(trks)) if(X.isVerbose()) { sOptionT(title,' title:"','"'); sOptionT(subtitle,'~','~'); sOptionT(artist,'artist:"','"'); sOptionT(album,'album:"','"'); sOptionT(cr,'©'); sOptionT(tab,'tab:'); sOptionT(instructions,'instructions:'); sOptionT(notice,'notice:'); sOption(tempo,'tempo:'); sOption(trk,'tracks:'); sOption(bars,'bars:'); } } } } return result() } /* beautify ignore:end */ ================================================ FILE: db/Binary/format_bin.Hermes.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "Hermes JavaScript bytecode"); function detect() { if (Binary.getSize() >= 0xC) { if (Binary.compare("C61FBC03C103191F", Binary.read_uint64(0, _BE))) { sVersion = Binary.read_uint32(8); bDetected = true; } } sLang = "JavaScript"; return result(); } ================================================ FILE: db/Binary/format_bin.JMDL.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "Microstation Java (JMDL) Compiled Class"); function detect() { if (Binary.getSize() >= 8 && Binary.compare("CAFEBEEF")) { // var nMinor = X.U16(4,_BE); var nMajor = X.U16(6, _BE); if (nMajor) { sVersion = "JDK "; switch (nMajor) { case 0x2D: sVersion += "1.1"; break; case 0x2E: sVersion += "1.2"; break; case 0x2F: sVersion += "1.3"; break; case 0x30: sVersion += "1.4"; break; } bDetected = nMajor >= 0x2D && nMajor <= 0x42; } } sLang = "Java"; return result(); } ================================================ FILE: db/Binary/format_bin.JSC.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP meta("format", "JavaScript Compiled/Bytenode (.JSC)"); var VersionHash = [ ["11.8.172.17", "4aaade2a", "6e55fcb4"], ["11.3.244.8", "88b331c0", "bc2e4000"], ["10.8.168.25", "22162e5c", "866ceba8"], ["10.2.154.26", "353c3291", "82a06935"], ["9.6.180.15", "96a2e9d1", "77a0eea2"], ["9.6.180.14", "efecf234", "15e726e8"], ["9.5.172.25", "87f3c490", "7845cebc"], ["9.5.172.21", "22b0877a", "d54c6bc9"], ["9.4.146.26", "4f3466a4", "ee64ddac"], ["9.4.146.24", "34bdcb66", "251899cd"], ["9.4.146.19", "1c8f8b6a", "15375929"], ["8.6.395.17", "4e4909d8", "a8d671f0"], ["8.6.395.16", "2e933797", "42ff7bd2"], ["8.4.371.23", "422a9510", "305d5cb4"], ["8.4.371.19", "9ee57fe0", "8b279ced"], ["8.3.110.9", "98545131", "878c72a5"], ["8.1.307.31", "2cb9ba58", "8912ed09"], ["8.1.307.30", "22d2f67c", "f8e02587"], ["7.9.317.25", "e46e0ba2", "affe52ff"], ["7.9.317.23", "327e22f1", "a5ef90cb"], ["7.8.279.23", "f4ca7648", "2453843a"], ["7.8.279.17", "533dd511", "2e4f9afd"], ["7.7.299.13", "7ee98716", "8f1d647f"], ["7.7.299.11", "f4bd9236", "defcacc7"], ["7.6.303.29", "62a5311c", "905e664f"], ["7.4.288.27", "8d2f9651", "84fec91f"], ["7.5.288.22", "8176065f", "8b9ea960"], ["7.4.288.21", "4e79ebb1", "27f6dd21"], ["7.0.276.38", "5aa2a8c8", "261396d3"], ["7.0.276.32", "302bcaf2", "1c3c201f"], ["6.8.275.32", "4914c00b", "8af4d4f4"], ["6.8.275.30", "34fd59c5", "91d1cc59"], ["6.8.275.24", "70ff0c52", "74a2eeac"], ["6.7.288.49", "f5e4a619", "aa47d109"], ["6.7.288.46", "555f09bb", "6070752b"], ["6.7.288.45", "3f06ef23", "ca0b678f"], ["6.7.288.43", "bc67142f", "884dad18"], ["6.6.346.32", "9ac1441d", "600024b1"], ["6.6.346.27", "741c5f3b", "91b8852b"], ["6.6.346.24", "cbb74c67", "3e6b9b38"], ["6.2.414.78", "4d9d4c8d", "c2f91993"], ["6.2.414.77", "2e12ba35", "818125c8"], ["6.2.414.72", "90a269a0", "96890b15"], ["6.2.414.66", "a8f60b85", "36eba645"], ["6.2.414.54", "6ed53280", "82f11b7d"], ["6.2.414.50", "ae6544a8", "bd692ce0"], ["6.2.414.46", "4e617339", "81adf054"], ["6.2.414.44", "c60a7c87", "7e207921"], ["6.2.414.32", "42110b24", "84d039aa"], ["6.1.534.50", "a0f6f0f4", "9e10b69f"], ["6.1.534.48", "f14f22a0", "82467775"], ["6.1.534.47", "79276eb0", "221a8fc5"], ["6.1.534.46", "babe69a4", "64318412"], ["6.1.534.42", "166f25d9", "9892d1c2"], ["6.0.287.53", "a1bc32d4", "6fcdcd18"], ["6.0.286.52", "2cf4293d", "a030b731"], ["5.5.372.43", "b96063d0", "c10a0c40"], ["5.1.281.111", "bb23baab", "78f44bee"], ["4.6.85.32", "35a37732", "ca4b83fd"], ["4.5.103.53", "15953e0e", "b217e70b"], ["3.28.71.20", "26145e77", "fec9a40d"], ]; function detect() { if (Binary.getSize() >= 0x20) { if (Binary.compare("DEC0", 0x02)) { bDetected = true; for (i = 0; i < VersionHash.length; i++) { if (Binary.compare(VersionHash[i][1], 0x04)) { sVersion = "v" + VersionHash[i][0] + " x86" } else if (Binary.compare(VersionHash[i][2], 0x04)) { sVersion = "v" + VersionHash[i][0] + " x64" }; } } } sLang = "JavaScript"; return result(); } ================================================ FILE: db/Binary/format_bin.Java.1.sg ================================================ // Detect It Easy: detection rule file // Author: Levis , LinXP // doc-ref: https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-4.html meta("format", "Java Class File (.CLASS)"); function detect() { if (Binary.getSize() >= 8) { if (Binary.compare("CAFEBABE")) { bDetected = true; var nMinor = Binary.read_uint16(0x04, _BE), nMajor = Binary.read_uint16(0x06, _BE); switch (nMajor) { // https://en.wikipedia.org/wiki/Java_version_history case 45: sVersion = "JDK 1.1"; break; // February 1997 case 46: sVersion = "JDK 1.2"; break; // December 1998 case 47: sVersion = "JDK 1.3"; break; // May 2000 case 48: sVersion = "JDK 1.4"; break; // February 2002 case 49: sVersion = "Java SE 5.0"; break; // September 2004 case 50: sVersion = "Java SE 6"; break; // December 2006 case 51: sVersion = "Java SE 7"; break; // July 2011 case 52: sVersion = "Java SE 8"; break; // March 2014 case 53: sVersion = "Java SE 9"; break; // September 2017 case 54: sVersion = "Java SE 10"; break; // March 2018 case 55: sVersion = "Java SE 11"; break; // September 2018 case 56: sVersion = "Java SE 12"; break; // March 2019 case 57: sVersion = "Java SE 13"; break; // September 2019 case 58: sVersion = "Java SE 14"; break; // March 2020 case 59: sVersion = "Java SE 15"; break; // September 2020 case 60: sVersion = "Java SE 16"; break; // March 2021 case 61: sVersion = "Java SE 17"; break; // September 2021 case 62: sVersion = "Java SE 18"; break; // March 2022 case 63: sVersion = "Java SE 19"; break; // September 2022 case 64: sVersion = "Java SE 20"; break; // March 2023 case 65: sVersion = "Java SE 21"; break; // September 2023 case 66: sVersion = "Java SE 22"; break; // March 2024 case 67: sVersion = "Java SE 23"; break; // September 2024 case 68: sVersion = "Java SE 24"; break; // March 2025 case 69: sVersion = "Java SE 25"; break; // September 2025 } if (sVersion && nMinor) { sVersion += "." + nMinor; } if (bDetected && Binary.isVerbose()) { var nOffset = 0x08; var constantPoolCount = Binary.read_uint16(nOffset, _BE); nOffset += 2; for (pool = 1; pool < constantPoolCount; pool++) { switch (Binary.read_uint8(nOffset)) { // Tag case 1: // CONSTANT_Utf8 nOffset += 1 + 2 + Binary.read_uint16(nOffset + 1, _BE); break; case 3: // CONSTANT_Integer case 4: // CONSTANT_Float nOffset += 1 + 4; break; case 5: // CONSTANT_Long case 6: // CONSTANT_Double nOffset += 1 + 4 + 4; break; case 7: // CONSTANT_Class case 8: // CONSTANT_String case 16: // CONSTANT_MethodType nOffset += 1 + 2; break; case 9: // CONSTANT_Fieldref case 10: // CONSTANT_Methodref case 11: // CONSTANT_InterfaceMethodref case 12: // CONSTANT_NameAndType case 18: // CONSTANT_InvokeDynamic nOffset += 1 + 2 + 2; break; case 15: // CONSTANT_MethodHandle_info nOffset += 1 + 1 + 2; break; default: sOption("err unk tag:" + nOffset); } } var nAccessFlagss = Binary.read_uint16(nOffset, _BE); if (nAccessFlagss & 0x0001) { sOption("ACC_PUBLIC"); } if (nAccessFlagss & 0x0002) { sOption("ACC_PRIVATE"); } if (nAccessFlagss & 0x0004) { sOption("ACC_PROTECTED"); } if (nAccessFlagss & 0x0008) { sOption("ACC_STATIC"); } if (nAccessFlagss & 0x0010) { sOption("ACC_FINAL"); } if (nAccessFlagss & 0x0020) { sOption("ACC_SUPER"); } if (nAccessFlagss & 0x0040) { sOption("ACC_VOLATILE"); } if (nAccessFlagss & 0x0080) { sOption("ACC_TRANSIENT"); } if (nAccessFlagss & 0x0100) { sOption("ACC_NATIVE"); } if (nAccessFlagss & 0x0200) { sOption("ACC_INTERFACE"); } if (nAccessFlagss & 0x0400) { sOption("ACC_ABSTRACT"); } if (nAccessFlagss & 0x0800) { sOption("ACC_STRICT"); } } } } sLang = "Java"; return result(); } ================================================ FILE: db/Binary/format_bin.KeePass.1.sg ================================================ // Detect It Easy: detection rule file // Author: Arjan Onwezen // Info: https://gist.github.com/lgg/e6ccc6e212d18dd2ecd8a8c116fb1e45 // Rewritten by BJNFNE meta("format", "KeePass"); function detect() { if (Binary.compare("03 D9 A2 9A")) { bDetected = true; if (Binary.compare("65 FB 4B B5", 4)) { sVersion = "1.X"; sOptions = ".KBD"; bDetected = true; } if (Binary.compare("66 FB 4B B5", 4)) { sVersion = "2.X, pre-release (alpha/beta)"; sOptions = ".KBDX"; bDetected = true; } if (Binary.compare("67 FB 4B B5", 4)) { sVersion = "2.X"; sOptions = ".KBDX"; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_bin.LUA.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP meta("format", "Lua Bytecode (.LUAC)"); function detect() { if (Binary.getSize() >= 8) { if (Binary.compare("1B'Lua'..00")) { bDetected = true; switch (Binary.read_uint8(0x04)) { case 0x50: sVersion = "v5.0"; break; case 0x51: sVersion = "v5.1"; break; case 0x52: sVersion = "v5.2"; break; case 0x53: sVersion = "v5.3"; break; case 0x54: sVersion = "v5.4"; break; default: return; } if (Binary.isVerbose()) { switch (Binary.read_uint8(0x06)) { case 0: sOption("BigEndian"); break; case 1: sOption("LittleEndian"); break; default: return; } } } } sLang = "Lua"; return result(); } ================================================ FILE: db/Binary/format_bin.NVA.1.sg ================================================ // Detect It Easy: detection rule file // Author: Tembo (http://tembolab.pl/products/executable-image-viewer.html) meta("format", "NVA"); function detect() { if (Binary.getSize() >= 8) { if (Binary.compare("'%NVA'")) { sVersion = Binary.getString(5, 3); bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_bin.Nintendo-certified-file.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kae // from https://www.psdevwiki.com/ps3/Certified_File // & https://www.psdevwiki.com/ps3/SELF_-_SPRX#ELF_Header meta("format", "Unknown Certified File"); function detect() { if (X.c("'SCE'00")) { var tp, e; if (X.c('0000 0002', 4)) e = _BE; //PS3 else if (X.c('0300 0000', 4)) e = _LE; //Vita else return; // PS3/Vita Certified File const attr = X.U16(8, e), tp = X.U16(0xA, e), exhdsz = X.U32(0xC, e), fofs = X.U64(0x10, e), fsz = X.U64(0x18, e), CFfsz = (e == _BE) ? 0 : X.U64(0x20, e), padding = (e == _BE) ? 0 : X.U64(0x28, e); var p = e == _BE? 0x20 : 0x30; switch (tp) { case 1: const eexhdsz = X.U64(p, e); if(!(e == _BE && eexhdsz == 3 || e == _LE && eexhdsz == 4)) return; const progidhdp = X.U64(p+8, e), ehdrp = X.U64(p+0x10, e), phdrp = X.U64(p+0x18, e), shdrp = X.U64(p+0x20, e); if (progidhdp+0x20 != ehdrp || ehdrp+0x40 != phdrp) return; if(X.c("7F 'ELF' .. .. 01", ehdrp)) sName = "Nintendō signed ELF/PRX (.SELF,.SPRX)"; else sName = "Nintendō signed ELF/PRX, headerless (.SELF,.SPRX)"; break; case 2: sName = "Nintendō signed revoke list (.SRVK)"; break; case 3: sName = "Nintendō signed package (.SPKG)"; break; case 4: sName = "Nintendō signed security policy profile (.SSPP)"; break; case 5: sName = "Nintendō signed diff (.SDIFF)"; break; case 6: sName = "Nintendō signed param.sfo"; break; default: if (X.isHeuristicScan()) { sType = '~'+sType; sName += ' type '+Hex(tp); } else return; } if (!isWithin(fofs, p,X.Sz()) || fsz < fofs) return; bDetected = true; sVersion = e == _BE ? 'PS3' : 'PSVita'; if(attr == 0x8000) sOption('fSELF'); if(X.isVerbose()) sOption(outSz(fofs+fsz),'sz:') } return result(); } ================================================ FILE: db/Binary/format_bin.PEFF.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://en.wikipedia.org/wiki/Preferred_Executable_Format // Rewritten by BJNFNE meta("format", "Preferred Executable Format"); function detect() { if (Binary.compare("'Joy!peff'00000001")) { sVersion = "1.0"; bDetected = true; } else if (Binary.compare("'Joy!peffpwpc'00000001")) { sOptions = "PowerPC"; sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_bin.PalmFile.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG @kaens) // TODO parse PQA too, why not /* beautify ignore:start */ meta("format", "Palm OS file "); function detect() { //ref https://jichu4n.github.io/palm-pdb/assets/Palm%20File%20Format%20Specification.pdf // & https://github.com/jichu4n/palm-os-sdk/blob/master/sdk-3.1/include/Core/System/DataPrv.h if (/S98[0-3]/.test(X.SA(0, 4)) && X.U32(4) <= 0x20 && !X.U32(0xC) && (!X.U32(0x10) || isWithin(X.U32(0x10), 0x20, 0x800000)) && X.U32(0x14) < 0x20000 && (!X.U32(0x18) || isWithin(X.U32(0x18), X.U32(0x14), 0x800000)) && X.U32(0x1C) <= 0x40) return //too many FPs with the S98 chiptunes var bad = '', sus = 0; function palmDateToStr(dt, desc) { // Palm OS date starts from Jan 1, 1904...... if (typeof desc != 'string') desc = ''; var msecs = new Date(1904, 0, 1).getTime() + dt * 1000; var date = new Date(msecs); if (!isWithin(date.getFullYear(), 1996, 2040) //...but not many file makers seem to have actually known that lol && date.getFullYear() != 1907) { // 1907 is courtesy Graffiti Sniper - Golgo 13 xmas cards. The game's from 2001 msecs = new Date(0).getTime() + (dt * 1000); date = new Date(msecs) } if (!isWithin(date.getFullYear(), 1996, 2040) && date.getFullYear() != 1907) if (isWithin(dt, 1996, 2040)) return 'y' + dt // some don't even realise it has a format and think it's just the year. (ZioGolf's zgrsc.pdb :D) else return ''; //thankfully even with the special snowflakes it's tight enough for detection var r = date.toISOString().slice(0, 19); return r.slice(0, 4) == '1907' ? '2001' + r.slice(4, 19) : r } const dmHdrAttrBackup = 1, dmHdrAttrLaunchableData = 2; var name = X.SA(0, 0x20), nc = charStat(name, true); if (nc.indexOf('asc') < 0) return; var attr = X.U16(0x20, _BE), v = X.U16(0x22, _BE), dtCre = X.U32(0x24, _BE), dtMod = X.U32(0x28, _BE), dtBak = X.U32(0x2C, _BE), modnum = X.U32(0x30, _BE), appinfo = X.U32(0x34, _BE), sortinfo = X.U32(0x38, _BE), tp = 'PDB', tp_ = X.SA(0x3C, 4), by = X.SA(0x40, 4); var idseed = X.U32(0x44, _BE), nextrec = X.U16(0x48, _BE), numrec = X.U16(0x4C, _BE), p = numrec ? 0x4E : 0x50; if (!numrec) sus += 3; //useless pdb, or, more realistically, a FP if (numrec > 0x7FFF) sus += 2; //haven't seen this many yet... if (modnum > 0xFFF) sus += 2; //can't be that many versions, right? if (nextrec) { sus++; bad = bad.addIfNone('!baddbdir') } //Palm specs say reject this db (artefacts of pre-v4 OSes) if (idseed > 0xFFFFFF) sus++; if (!/\w{3,}/.test(by)) return; switch (tp_) { case 'appl': tp = 'PRC'; break; case 'pqa ': if (by == 'clpr') tp = 'PQA'; else return; default: if (charStat(X.readBytes(p, 4), true).indexOf('allasc') >= 0) { tp = 'PRC'; bad = bad.addIfNone('!badtype' + X.SA(p, 4)) } } var dt = palmDateToStr(dtMod, 'mod'), endp, reclen = 8, m = i = 0, mhk = '', uniq = []; if (dtMod && dt === '') { sus += 2; bad = bad.addIfNone('!nodate') } if (dtCre && palmDateToStr(dtCre, 'cre') === '') sus++; if (dtBak && palmDateToStr(dtBak, 'bak') === '') sus++; if (tp === 'PRC') for (reclen = 10, endp = p + reclen * numrec; p < endp; p += reclen) { // PRC RsrcEntryType if (p + 10 > X.Sz()) { /*debug('lookahead shorted out');*/ return } var hkhd = X.SA(p, 4), hkid = X.U16(p + 4, _BE), hkofs = X.U32(p + 6, _BE); if (!isWithin(hkofs, p, X.Sz()) || !/\w{3,}/.test(hkhd) || uniq.indexOf(hkofs) >= 0) return; uniq.push(hkofs); if (m < hkofs) { m = hkofs; mhk = hkhd } if (hkhd === 'tver') sVersion = 'v' + X.SA(m, 0x100).trim() } else if (tp === 'PDB') for (reclen = 8, endp = p + reclen * numrec; p < endp; p += reclen) { // PDB RecordEntryType if (p + 8 > X.Sz()) return; var hkofs = X.U32(p, _BE), hkattr = X.U8(p + 4), hkid = X.U24(p + 5, _BE); //the ID is unique. Not in reality though if (!isWithin(hkofs, p, X.Sz()) || uniq.indexOf(hkofs) >= 0) return; uniq.push(hkofs); if (m < hkofs) m = hkofs } //else TODO parse PQA reclist if (appinfo && !isWithin(appinfo, 0x4E + reclen * numrec, X.Sz()) || sortinfo && !isWithin(sortinfo, 0x4C + reclen * numrec, X.Sz()) || appinfo && sortinfo && sortinfo < appinfo) { /*debug('appinfo/sortinfo bad address');*/ return } if (sVersion != '') sVersion = tp_.appendS(sVersion, ' '); else sVersion = tp_; if (appinfo && Math.abs(appinfo - p) > 0x10) { //_l2r('Palm OS file',p,'appinfo should be '+Hex(appinfo)); return } if (sus > 3) return; if (tp == 'PRC') if (['taic', 'tAIN', 'tver', 'tSTR'].indexOf(mhk) >= 0) sz = outSz(X.fSig(m, -1, '00') + 1); //text fields, most end with 0. Some do have 0 padding... else if (mhk == 'tSTL') { var ll = X.U8(m + 2, _BE), z; m += 4; for (i = 0; i < ll && m <= X.Sz(); i++) { z = X.fSig(m, TOEOF, "00"); if (z < 0) { bad = bad.addIfNone('!short'); break } m = z + 1 } sz = outSz(m) } else if (['pref'].indexOf(mhk) >= 0) sz = outSz(m + 10); else if (X.c("'RIFF'........'WAVE'", m)) sz = outSz(m + X.U32(m + 4) + 8); else { sz = Hex(Math.max(m, p, appinfo, sortinfo)) + '+' + mhk; if (mhk === 'code' && !X.c("4E75", X.Sz() - 2)) bad = bad.addIfNone("!noRTSatEoF") } else // PDB? PQA? sz = Math.max(m, p) + '+' + mhk; sName = "Palm OS file (." + tp + ")"; bDetected = true; if (sus) bad += '!sus×' + sus; if (bad != '') sVersion = sVersion.appendS('malformed' + bad, '/'); if (X.isVerbose()) { sOption(name); sOption(by, 'by:'); sOption(dt, 'lastmod' + (modnum > 1 ? ' (×' + modnum + ')' : '') + ':'); sOption(Hex(idseed), "idseed:") if (appinfo) sOption('appinfo'); if (sortinfo) sOption('sortinfo'); sOption(numrec, 'res:'); sOption(sz, 'sz:') } return result() } /* beautify ignore:end */ ================================================ FILE: db/Binary/format_bin.Python.1.sg ================================================ // Detect It Easy: detection rule file // Author: Levis // History: // Update sign to detect version of Python from 1.0 to 3.4 // Update sign to detect version of Python from 3.4 to 3.13a1 (by LinXP) // Update sign to detect forks of Python and Some other versions (by northkatz) // Full info: https://github.com/python/cpython/blob/main/Lib/importlib/_bootstrap_external.py#L463 // Version history: https://github.com/python/cpython/blob/main/Include/internal/pycore_magic_number.h meta("format", "Python Compiled Module"); function detect() { if (Binary.getSize() >= 64) { if (Binary.read_uint16(0x02) == 0x0099) { bDetected = true; switch (Binary.read_uint32(0)) { case 0x00999902: sVersion = "1.0"; break; case 0x00999903: sVersion = "1.1-1.2"; break; default: return; } } else if (Binary.read_uint16(0x02) == 0x0A0D && Binary.isSignaturePresent(0x10, 0x100, "00 00 00 00")) { bDetected = true; var magicValue = Binary.read_uint16(0); switch (magicValue) { case 11913: sVersion = "1.3"; break; case 5892: sVersion = "1.4"; break; case 20121: sVersion = "1.5-1.5.2"; break; case 50428: sVersion = "1.6"; break; case 50823: sVersion = "2.0-2.0.1"; break; case 60202: sVersion = "2.1-2.1.2"; break; case 60717: sVersion = "2.2"; break; case 62011: sVersion = "2.3a0"; break; case 62021: sVersion = "2.3a0"; break; case 62041: sVersion = "2.4a0"; break; case 62051: sVersion = "2.4a3"; break; case 62061: sVersion = "2.4b1"; break; case 62071: sVersion = "2.5a0"; break; case 62081: sVersion = "2.5a0"; break; case 62091: sVersion = "2.5a0"; break; case 62092: sVersion = "2.5a0"; break; case 62101: sVersion = "2.5b3"; break; case 62111: sVersion = "2.5b3"; break; case 62121: sVersion = "2.5c1"; break; case 62131: sVersion = "2.5c2"; break; case 62135: sVersion = "2.5 (Dropbox)"; break; case 62151: sVersion = "2.6a0"; break; case 62161: sVersion = "2.6a1"; break; case 62171: sVersion = "2.7a0"; break; case 62181: sVersion = "2.7a0"; break; case 62191: sVersion = "2.7a0"; break; case 62201: sVersion = "2.7a0"; break; case 62211: sVersion = "2.7a0"; break; case 62218: sVersion = "2.7 (PyPy)"; break; case 22138: sVersion = "2.7 (Pyston)"; break; case 2657: sVersion = "2.7 (Pyston-0.6.1)"; break; case 3000: sVersion = "3.0"; break; case 3010: sVersion = "3.0"; break; case 3020: sVersion = "3.0"; break; case 3030: sVersion = "3.0"; break; case 3040: sVersion = "3.0"; break; case 3050: sVersion = "3.0"; break; case 3060: sVersion = "3.0"; break; case 3061: sVersion = "3.0"; break; case 3071: sVersion = "3.0"; break; case 3081: sVersion = "3.0"; break; case 3091: sVersion = "3.0"; break; case 3101: sVersion = "3.0"; break; case 3103: sVersion = "3.0"; break; case 3111: sVersion = "3.0a4"; break; case 3131: sVersion = "3.0b1"; break; case 3141: sVersion = "3.1a1"; break; case 3151: sVersion = "3.1a1"; break; case 3160: sVersion = "3.2a1"; break; case 3170: sVersion = "3.2a2"; break; case 3180: sVersion = "3.2a3"; break; case 48: sVersion = "3.2 or 3.2 (PyPy)"; break; case 3187: sVersion = "3.2 (PyPy)"; break; case 3190: sVersion = "3.3a1"; break; case 3200: sVersion = "3.3a1"; break; case 3210: sVersion = "3.3a1"; break; case 3220: sVersion = "3.3a2"; break; case 3230: sVersion = "3.3a4"; break; case 64: sVersion = "3.3 (PyPy)"; break; case 3250: sVersion = "3.4a1"; break; case 3260: sVersion = "3.4a1"; break; case 3270: sVersion = "3.4a1"; break; case 3280: sVersion = "3.4a1"; break; case 3290: sVersion = "3.4a4"; break; case 3300: sVersion = "3.4a4"; break; case 3310: sVersion = "3.4rc2"; break; case 3320: sVersion = "3.5a1"; break; case 3330: sVersion = "3.5b1"; break; case 3340: sVersion = "3.5b2"; break; case 3350: sVersion = "3.5b3"; break; case 3351: sVersion = "3.5.2"; break; case 112: sVersion = "3.5 (PyPy)"; break; case 3360: sVersion = "3.6a0"; break; case 3361: sVersion = "3.6a1"; break; case 3370: sVersion = "3.6a2"; break; case 3371: sVersion = "3.6a2"; break; case 3372: sVersion = "3.6a2"; break; case 3373: sVersion = "3.6b1"; break; case 3375: sVersion = "3.6b1"; break; case 3376: sVersion = "3.6b1"; break; case 3377: sVersion = "3.6b1"; break; case 3378: sVersion = "3.6b2"; break; case 3379: sVersion = "3.6rc1"; break; case 192: sVersion = "3.6 (PyPy)"; break; case 160: sVersion = "3.6.1 (PyPy)"; break; case 3390: sVersion = "3.7a1"; break; case 3391: sVersion = "3.7a2"; break; case 3392: sVersion = "3.7a4"; break; case 3393: sVersion = "3.7b1"; break; case 3394: sVersion = "3.7b5"; break; case 240: sVersion = "3.7 (PyPy)"; break; case 3400: sVersion = "3.8a1"; break; case 3401: sVersion = "3.8a1"; break; case 3410: sVersion = "3.8a1"; break; case 3411: sVersion = "3.8b2"; break; case 3412: sVersion = "3.8b2"; break; case 3413: sVersion = "3.8b4 or 3.8.10 (Graal) or 3.8.12-3.8.16 (PyPy)"; break; case 256: sVersion = "3.8 (PyPy)"; break; case 21150: sVersion = "3.8.5 (Graal)"; break; case 3420: sVersion = "3.9a0"; break; case 3421: sVersion = "3.9a0"; break; case 3422: sVersion = "3.9a0"; break; case 3423: sVersion = "3.9a2"; break; case 3424: sVersion = "3.9a2"; break; case 3425: sVersion = "3.9a2 or 3.9.10-3.9.16 (PyPy)"; break; case 336: sVersion = "3.9 (PyPy)"; break; case 3430: sVersion = "3.10a1"; break; case 3431: sVersion = "3.10a1"; break; case 3432: sVersion = "3.10a2"; break; case 3433: sVersion = "3.10a2"; break; case 3434: sVersion = "3.10a6"; break; case 3435: sVersion = "3.10a7"; break; case 3436: sVersion = "3.10b1"; break; case 3437: sVersion = "3.10b1"; break; case 3438: sVersion = "3.10b1"; break; case 3439: sVersion = "3.10b1"; break; case 384: sVersion = "3.10 (PyPy)"; break; case 21280: sVersion = "3.10 (Graal)"; break; case 3450: sVersion = "3.11a1"; break; case 3451: sVersion = "3.11a1"; break; case 3452: sVersion = "3.11a1"; break; case 3453: sVersion = "3.11a1"; break; case 3454: sVersion = "3.11a1"; break; case 3455: sVersion = "3.11a1"; break; case 3456: sVersion = "3.11a1"; break; case 3457: sVersion = "3.11a1"; break; case 3458: sVersion = "3.11a1"; break; case 3459: sVersion = "3.11a1"; break; case 3460: sVersion = "3.11a1"; break; case 3461: sVersion = "3.11a1"; break; case 3462: sVersion = "3.11a2"; break; case 3463: sVersion = "3.11a3"; break; case 3464: sVersion = "3.11a3"; break; case 3465: sVersion = "3.11a3"; break; case 3466: sVersion = "3.11a4"; break; case 3467: sVersion = "3.11a4"; break; case 3468: sVersion = "3.11a4"; break; case 3469: sVersion = "3.11a4"; break; case 3470: sVersion = "3.11a4"; break; case 3471: sVersion = "3.11a4"; break; case 3472: sVersion = "3.11a4"; break; case 3473: sVersion = "3.11a4"; break; case 3474: sVersion = "3.11a4"; break; case 3475: sVersion = "3.11a5"; break; case 3476: sVersion = "3.11a5"; break; case 3477: sVersion = "3.11a5"; break; case 3478: sVersion = "3.11a5"; break; case 3479: sVersion = "3.11a5"; break; case 3480: sVersion = "3.11a5"; break; case 3481: sVersion = "3.11a5"; break; case 3482: sVersion = "3.11a5"; break; case 3483: sVersion = "3.11a5"; break; case 3484: sVersion = "3.11a5"; break; case 3485: sVersion = "3.11a5"; break; case 3486: sVersion = "3.11a6"; break; case 3487: sVersion = "3.11a6"; break; case 3488: sVersion = "3.11a6"; break; case 3489: sVersion = "3.11a6"; break; case 3490: sVersion = "3.11a6"; break; case 3491: sVersion = "3.11a6"; break; case 3492: sVersion = "3.11a7"; break; case 3493: sVersion = "3.11a7"; break; case 3494: sVersion = "3.11a7"; break; case 3495: sVersion = "3.11a7"; break; case 416: sVersion = "3.11 (PyPy)"; break; case 21290: sVersion = "3.11 (Graal)"; break; case 3500: sVersion = "3.12a1"; break; case 3501: sVersion = "3.12a1"; break; case 3502: sVersion = "3.12a1"; break; case 3503: sVersion = "3.12a1"; break; case 3504: sVersion = "3.12a1"; break; case 3505: sVersion = "3.12a1"; break; case 3506: sVersion = "3.12a1"; break; case 3507: sVersion = "3.12a1"; break; case 3508: sVersion = "3.12a1"; break; case 3509: sVersion = "3.12a1"; break; case 3510: sVersion = "3.12a2"; break; case 3511: sVersion = "3.12a2"; break; case 3512: sVersion = "3.12a2"; break; case 3513: sVersion = "3.12a4"; break; case 3514: sVersion = "3.12a4"; break; case 3515: sVersion = "3.12a5"; break; case 3516: sVersion = "3.12a5"; break; case 3517: sVersion = "3.12a5"; break; case 3518: sVersion = "3.12a6"; break; case 3519: sVersion = "3.12a6"; break; case 3520: sVersion = "3.12a6"; break; case 3521: sVersion = "3.12a7"; break; case 3522: sVersion = "3.12a7"; break; case 3523: sVersion = "3.12a7"; break; case 3524: sVersion = "3.12a7"; break; case 3525: sVersion = "3.12b1"; break; case 3526: sVersion = "3.12b1"; break; case 3527: sVersion = "3.12b1"; break; case 3528: sVersion = "3.12b1"; break; case 3529: sVersion = "3.12b1"; break; case 3530: sVersion = "3.12b1"; break; case 3531: sVersion = "3.12b1"; break; case 12897: sVersion = "3.12 (Rust)"; break; case 3550: sVersion = "3.13a1"; break; case 3551: sVersion = "3.13a1"; break; case 3552: sVersion = "3.13a1"; break; case 3553: sVersion = "3.13a1"; break; case 3554: sVersion = "3.13a1"; break; case 3555: sVersion = "3.13a1"; break; case 3556: sVersion = "3.13a1"; break; case 3557: sVersion = "3.13a1"; break; case 3558: sVersion = "3.13a1"; break; case 3559: sVersion = "3.13a1"; break; case 3560: sVersion = "3.13a1"; break; case 3561: sVersion = "3.13a1"; break; case 3562: sVersion = "3.13a1"; break; case 3563: sVersion = "3.13a1"; break; case 3564: sVersion = "3.13a1"; break; case 3565: sVersion = "3.13a1"; break; case 3571: sVersion = "3.13"; break; case 12641: sVersion = "3.13.0 (Rust)"; break; case 3600: sVersion = "3.14"; break; case 3627: sVersion = "3.14rc3"; break; default: sVersion = "Unknown"; } if (X.isVerbose()) sVersion = sVersion.append("magic: " + magicValue); } } sLang = "Python"; return result(); } ================================================ FILE: db/Binary/format_bin.SWF.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "Small Web Format (.SWF)"); includeScript("zlib"); function detect() { if (Binary.getSize() >= 32 && Binary.compare("%% %% %% ?? ?? ?? ?? 00")) { switch (Binary.getString(0, 3)) { case "FWS": sOptions = "uncompressed"; bDetected = true; break; case "CWS": if (detect_zlib(Binary, 0x08)) bDetected = true; break; case "ZWS": sOptions = "LZMA"; bDetected = true; } if (bDetected) { sVersion = Binary.read_uint8(0x03); } } return result(); } ================================================ FILE: db/Binary/format_bin.VCF.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens // https://en.wikipedia.org/wiki/vCard // https://www.rfc-editor.org/rfc/rfc6350, 6868, 9554, 9555 meta("format", "vCard/Virtual Contact File (.VCF,.vcard)"); function detect() { var ep, vp, sV; if ( !X.c("'BEGIN:VCARD'0d0a") || (ep=X.fSig(20,0x2000,"0d0a'END:VCARD'")) < 20 || (vp=X.fSig(10,ep,"0d0a'VERSION:'")) < 10 || !/\d(\.\d)?/.test(sV=X.SA(vp+10,3).trim()) ) return; bDetected = true; var nV = 2.1; const sz = ep+13, st = 11; sVersion = 'v'+sV; if (X.isVerbose()) { if ( X.fSig(st, ep, "0d0a'GEO:geo:'") > st || X.fSig(st, ep, "0d0a'ANNIVERSARY'") > st || X.fSig(st, ep, "0d0a'CALADRURI'") > st || X.fSig(st, ep, "0d0a'CALURI'") > st || X.fSig(st, ep, "0d0a'CLIENTPIDMAP'") > st || X.fSig(st, ep, "0d0a'FBURL'") > st || X.fSig(st, ep, "0d0a'GENDER'") > st || X.fSig(st, ep, "0d0a'PRONOUNS'") > st || X.fSig(st, ep, "0d0a'KIND'") > st || X.fSig(st, ep, "0d0a'MEMBER'") > st || X.fSig(st, ep, "0d0a'RELATED'") > st || X.fSig(st, ep, "0d0a'XML'") > st) nV = 4.0; if ( X.fSig(st, ep, "0d0a'CATEGORIES:'") > st || X.fSig(st, ep, "0d0a'CLASS:'") > st || X.fSig(st, ep, "0d0a'IMPP'") > st || X.fSig(st, ep, "0d0a'NAME'") > st || X.fSig(st, ep, "0d0a'NICKNAME'") > st || X.fSig(st, ep, "0d0a'PRODID'") > st || X.fSig(st, ep, "0d0a'PROFILE'") > st || X.fSig(st, ep, "0d0a'SORT-STRING'") > st) nV = Math.max(nV, 3.0); if ( (+sV) < nV || (nV == 4.0 && sV == "4.0" && ( X.fSig(st, ep, "0d0a'LABEL'") > st || X.fSig(st, ep, "0d0a'SORT-STRING'") > st )) ) sOption('version-incompatible fields'); sOption(outSz(sz),'sz:') } return result(); } ================================================ FILE: db/Binary/format_bin.WindowsIconCacheDB.1.sg ================================================ // Detect It Easy: detection rule file // Author: Arjan Onwezen meta("format", "Windows IconCacheDB"); function detect() { if (Binary.getSize() >= 20) { if (Binary.compare("..000000'Win4'")) { bDetected = true; switch (Binary.read_uint16(12)) { case 6000: sOption("Vista (Build 6000)"); break; case 6001: sOption("Vista (Build 6001)"); break; case 7600: sOption("Windows 7 (Build 7600)"); break; case 7601: sOption("Windows 7 (Build 6701)"); break; case 10586: sOption("Windows 10 (Build 10586)"); break; default: sOption("Unknown version"); } } } return result(); } ================================================ FILE: db/Binary/format_database.SQLite.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: https://www.sqlite.org/fileformat.html meta("format", "SQLite 3 database (.SQLITE)"); function detect() { if (Binary.compare("'SQLite format 3'00")) { bDetected = true; var nAppID = Binary.read_uint32(0x44, _BE), nSQLiteVersionNumber = Binary.read_uint32(0x60, _BE), nChangeCount = Binary.read_uint32(0x18, _BE); var nMajor = nSQLiteVersionNumber / 1000000 >> 0, nMinor = (nSQLiteVersionNumber - nMajor * 1000000) / 1000 >> 0, nRelease = nSQLiteVersionNumber - (nMajor * 1000000) - (nMinor * 1000) >> 0; sVersion = nMajor + "." + nMinor + "." + nRelease; switch (Binary.read_uint32(0x38, _BE)) { case 1: sOption("UTF-8"); break; case 2: sOption("UTF-16LE"); break; case 3: sOption("UTF-16BE"); break; default: return; } if (nAppID && Binary.isVerbose()) { sOption("AppID: " + nAppID); } if (nChangeCount && Binary.isVerbose()) { sOption("Changes: " + nChangeCount); } } return result(); } ================================================ FILE: db/Binary/format_databases.1.sg ================================================ // Detect It Easy: detection rule file // Authors: hypn0 , Kaens (TG@kaens) meta("format", ""); /* beautify ignore:start */ function detect() { if (Binary.compare("00010000'Standard Jet DB'00")) { sName = "Microsoft Access database (.MDB)"; bDetected = true; } function isDBF() { // from https://independent-software.com/dbase-dbf-dbt-file-format.html // & https://www.clicketyclick.dk/databases/xbase/format/dbf.html // & https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers nv = X.U8(0); v5 = false; switch (nv) { case 0x02: sv = 'FoxBase 1.0'; break; case 0x03: sv = 'FoxBase 2.x / dBASE III, no memo file'; break; case 0x04: sv = 'dBASE IV, no memo file'; break; case 0x05: sv = 'dBASE V, no memo file'; break; case 0x07: sv = "VISUAL OBJECTS v1.x for dBase III, no memo file"; break; case 0x30: sv = 'Visual FoxPro (possibly with DBC)'; break; case 0x31: sv = 'Visual FoxPro with auto increment'; break; case 0x32: sv = 'Visual FoxPro with varchar/varbinary'; break; case 0x43: sv = 'dBASE IV SQL Table, no memo file / Flagship .dbv memo var size'; break; case 0x64: sv = 'dBASE IV SQL System, no memo file'; break; case 0x83: sv = 'FoxBase 2.x / dBASE III+ with memo file'; break; case 0x87: sv = 'VisualObjects 1.x with memo file'; break; case 0x8B: sv = 'dBASE IV with memo file'; break; case 0x8C: sv = 'dBASE V with memo file'; break; case 0x8E: sv = 'dBASE IV with SQL table'; break; case 0xB3: sv = '.dbv with memo table'; break; case 0xCB: sv = 'dBASE IV SQL Table with memo file'; break; case 0xE5: sv = 'Clipper SIX with memo file'; break; case 0xF5: sv = 'FoxPro 2 with memo file'; break; case 0xFB: sv = 'FoxPro 2, no memo file'; break; default: return false; } if (nv == 2) { recc = X.U16(1); if (!recc) return false; recsz = X.U16(6); if (!recsz) return false; hdrsz = 0x209; rectp = 8; enc = 'IBM437'; } else { y = X.U8(1); if (y < 80) y += 2000; else y += 1900; m = X.U8(2); d = X.U8(3); if (X.c('000000', 1)) { upd = 'never' } else { if (!isWithin(y, 1970, 2100) || !isWithin(m, 1, 12) || !isWithin(d, 1, 31)) return false; upd = y + '-' + m.padStart(2, '0') + d.padStart(2, '0') } recc = X.U32(4); if (!recc) return false; hdrsz = X.U16(8); recsz = X.U16(0xA); if (hdrsz < 0x20 || !recsz) return false; res0 = X.U24(0xC); res1 = X.readBytes(0xF, 13); res2 = X.U32(0x1C); if ([4, 0x8C].indexOf(nv) >= 0) { rectp = 0x44; enc = 'CP' + X.SA(0x22, 3); if (isWithin((t = X.SA(0x25, 1)), '0', '9')) enc += t; if (enc == 'CPKOI8') enc += X.SA(0x26, 1); v5 = true } else { rectp = 0x20; switch (X.U8(0x1D)) { case 0x02: enc = 'CP850'; break; //DOS Multilingual case 0x03: enc = 'CP1252'; break; //Windows ANSI case 0x04: enc = 'CP10000'; break; //aka. 'macintosh', MAC Roman/W.European Mac case 0x64: enc = 'CP852'; break; //Eastern-European MS-DOS case 0x65: enc = 'CP865'; break; //Nordic MS-DOS case 0x66: enc = 'CP866'; break; //Russian MS-DOS case 0x67: enc = 'IBM861'; break; //Icelandic MS-DOS //case 0x68: enc = 'Kamenicky (Czech) MS-DOS'; break; //case 0x69: enc = 'Mazovia (Polish) MS-DOS'; break; case 0x6A: enc = 'IBM737'; break; //Greek MS-DOS (aka. 437G) case 0x6B: enc = 'IBM857'; break; //Turkish MS-DOS case 0x96: enc = 'CP10007'; break; // aka. 'x-mac-cyrillic', Russian Mac case 0x97: enc = 'CP10029'; break; // aka. 'x-mac-ce', MAC Latin 2/C.European Mac case 0x98: enc = 'CP10006'; break; //aka. 'x-mac-greek', Greek Mac case 0xC8: enc = 'CP1250'; break; //C.European Windows case 0xC9: enc = 'CP1251'; break; //Russian Windows case 0xCA: enc = 'CP1254'; break; //Turkish Windows case 0xCB: enc = 'CP1253'; break; //Greek Windows case 0x01: default: enc = 'IBM437' //OEM US } } //TODO check res* depending on version } validC = ['C', 'N', 'L', 'D', 'M', 'F', 'B', 'G', 'P', 'Y', 'T', 'I', 'V', 'X', '@', 'O', '+', '0']; fldc = 0; totalfldsz = 1 /* we begin with a deletion flag */; p = rectp; old = [0, 1]; while (X.U8(p) != 0xD && p < hdrsz) { var name = X.readBytes(p, v5 ? 0x1F : 11); ns = charStat(name, 1); // _log('fld#'+fldc+' @'+Hex(p)+': '+decEncoding(name,CP866)+' (ns=['+ns+'])') if (!name[0] || (ns.indexOf('allxsc') < 0 && ns.indexOf('allforeign') < 0)) return false; tp = X.SA(v5 ? p + 0x20 : p + 0xB, 1); if (validC.indexOf(tp) < 0) return false; if (nv == 2) fldst = X.U16(p + 0xD); else if (v5) fldst = 0; else fldst = X.U32(p + 0xC); fldsz = X.U8(nv == 2 ? p + 0xC : v5 ? p + 0x21 : p + 0x10); if (!fldsz) return false; // _log(' sz:'+fldsz+', old: '+old+'; '+old[0]+'+'+Hex(old[1])+' = '+Hex(old[0]+old[1])+' ?? '+Hex(fldst)) if (old[0] && fldst && old[0] + old[1] != fldst) return false; old = [fldsz, fldst]; totalfldsz += fldsz; decn = X.U8(nv == 2 ? p + 0xF : p + 0x11); if (tp === 'N' && decn > fldsz) return false; fldc++; p += nv == 2 ? 0x10 : v5 ? 0x30 : 0x20; if (charStat(name.slice(0, name.indexOf(0)), 1).indexOf('foreign') >= 0 && enc == "IBM437") enc = "CP1251"; // pesky Russians? } // _log('@'+Hex(p)+': '+fldc+' fields total size '+totalfldsz+' vs. '+recsz) if (totalfldsz - recsz != 0) return false; del = 0; if (X.isDeepScan()) { p = hdrsz; for (i = 0; i < recc; i++, p += recc) if (X.U8(p) == 0x2A) del++ } sz = hdrsz + recc * recsz; if (X.U8(sz) == 0x1A) sz++; return sz <= X.Sz() || X.isHeuristicScan() } if (!bDetected && isDBF()) { sName = "dBase Database (.DBF)"; sVersion = sv; bDetected = true; if (X.isVerbose()) { sOption('fld:' + fldc + ' rec: ' + recc + (del ? '(* ' + del + ')' : '') + ' enc: ' + enc + ' sz: ' + outSz(sz)) } } return result(); } /* beautify ignore:end */ ================================================ FILE: db/Binary/format_doc.CHM.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Authors: // sendersu (sendersu on exelab.ru), // Kaens (TG @kaens) meta("format", "Microsoft Compiled HTML Help"); function detect() { if (Binary.compare("'ITSF'..000000")) { bDetected = true; sVersion = Binary.read_int32(4, _LE); sOption(Binary.read_uint32(0x14, _LE), "LangID: "); } return result(); } ================================================ FILE: db/Binary/format_doc.DJVU.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens TG@kaens meta("format", "DjVu document (.DJVU)"); function detect() { var sdjv = false; if (X.c("'AT&TFORM'")) if (X.c("'DJVM'........00", 12)) sVersion = 'multi-page'; else if (X.c("'DJVU'........00", 12)) sVersion = 'single-page'; else if (X.c("'DJVI'........00", 12)) sVersion = 'multi-file'; else if (X.c("'THUMTH44'", 12)) sVersion = 'thumbnails'; else return false; else if (X.c("'SDJVFORM'")) { sName = "Secure " + sName; sdjv = true } else return false; bad = ""; sz = X.U32(8, _BE) + 12; if (X.Sz() < sz) bad = bad.addIfNone('!short'); if (X.isDeepScan() && !sdjv) { //can't say I've ever seen an sdjv so nothing to test on var compfiles = minw = minh = mindpi = mingm = 0xFFFFFFFF, maxw = maxh = maxdpi = maxgm = 0; p = 0x10; while (p < sz) { hkhd = X.SA(p, 4); hksz = X.U32(p + 4, _BE); p += 8; //_log('@'+Hex(p-8)+':'+hkhd); switch (hkhd) { case 'INFO': sVersion = sVersion.appendS('image', '/'); break; case 'NAVM': if (X.isVerbose()) sOptions = sOptions.addIfNone(' bookmarks,'); break; case 'ANTa': case 'ANTz': if (X.isVerbose()) sOptions = sOptions.addIfNone('annotated,'); break; case 'DIRM': compfiles = X.U16(p + 1); break; case 'FORM': if (!X.c("'DJV'", p) && !X.c("'THUM'", p)) { _log('bad subchunk ' + X.SA(p, 8)); return false } q = p + 4; while (q < p + hksz) { shd = X.SA(q, 4); ssz = X.U32(q + 4, _BE); q += 8; if (q + ssz > p + hksz) { bad = bad.addIfNone('!short'); break } switch (shd) { case 'INFO': var w = X.U16(q, _BE), h = X.U16(q + 2, _BE), dpi = X.U16(q + 6, _LE /*yes*/), gm = X.U8(q + 8); if (w < minw) minw = w; if (w > maxw) maxw = w; if (h < minh) minh = h; if (h > maxh) maxh = h; if (dpi < mindpi) mindpi = dpi; if (dpi > maxdpi) maxdpi = dpi; if (gm < mingm) mingm = gm; if (gm > maxgm) maxgm = gm; break; case 'INCL': //if(X.isVerbose()) sOptionT(X.SA(q,ssz),'includes '); //included filenames, normally too many break; case 'TXTa': case 'TXTz': if (X.isVerbose()) sOptions = sOptions.addIfNone('text&layoutinfo,'); break; case 'Djbz': case 'Sjbz': case 'FG44': case 'BG44': case 'TH44': case 'WMRM': case 'FGbz': case 'BGjp': case 'FGjp': case 'Smmr': break; } q += ssz; if (q % 2) q++ } break; default: bad = bad.addIfNone('!badchunk<' + hkhd + '>@' + Hex(p - 8)); } p += hksz; if (p % 2) p++ } } if (sOptions.length && sOptions[sOptions.length - 1] == ',') sOptions = sOptions.slice(0, sOptions.length - 1); bDetected = true; if (bad != '') sVersion = sVersion.appendS('malformed' + addEllipsis(bad, 0x80, 0x40), '/') if (X.isVerbose()) { if (X.isDeepScan()) { sOption((minw != maxw ? '[' + minw + '~' + maxw + ']' : minw) + '×' + (minh != maxh ? '[' + minh + '~' + maxh + ']' : minh)); sOption((mindpi != maxdpi ? '[' + mindpi + '~' + maxdpi : mindpi), '', 'dpi'); sOption('gamma ' + (mingm != maxgm ? '[' + (mingm / 10).toFixed(1) + '~' + (maxgm / 10).toFixed(1) + ']' : (mingm / 10).toFixed(1))); } sOption(outSz(sz), 'sz:') } return result(); } ================================================ FILE: db/Binary/format_doc.HLP.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "MS Help"); function detect() { if (Binary.compare("3f5f0300")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_doc.PDF.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "PDF"); function detect() { if (/^\%PDF-\d+\.\d+/.test(File.read_ansiString(0, 10))) { sVersion = File.getString(5, 3); bDetected = true; var c = 0; for (i = 8; i < 15; i++) if (File.read_uint8(i) & 0x80) c++; if (c) sOptions = "binary data"; } return result(); } ================================================ FILE: db/Binary/format_doc.RTF.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "RTF"); function detect() { if (/^{\\rtf1?/.test(File.read_ansiString(0, 6))) { bDetected = true; for (var i = 4; i < Math.min(File.getSize(), 0x100); i++) if (File.read_uint8(i) & 0x80) { return; } } return result(); } ================================================ FILE: db/Binary/format_iCalender.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://icalendar.org/ meta("format", "iCalendar (.ICS)"); function detect() { if (Binary.compare("42 45 47 49 4E 3A 56 43 41 4C 45 4E 44 41 52")) { var utf = Binary.getString(33, 5).trim(); if (/^[A-Z0-9/-]{5}$/.test(utf)) { if (X.isVerbose()) sOptions = utf; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_img.VM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 & Arjan Onwezen meta("format", "VMWare Virtual Disk (VMDK)"); function detect() { if (Binary.compare("'KDMV'01") || Binary.compare("'KDMV'02") || Binary.compare("'KDMV'03")) { sVersion = File.read_uint8(4); bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_text.RegistryFile.sg ================================================ // Detect It Easy: detection rule file // Author: Arjan Onwezen meta("format", "Registry file"); function detect() { if (Binary.compare("'REGEDIT4'0D 0A 0D 0A")) { bDetected = true; sVersion = "4.0"; } else if (Binary.compare("'Windows Registry Editor Version 5.00'0D 0A 0D 0A")) { bDetected = true; sVersion = "5.0"; } else if (Binary.compare("FF FE 57 00 69 00 6E 00 64 00 6F 00 77 00 73 00 20 00 52 00 65 00 67 00 69 00 73 00 74 00 72 00 79 00 20 00 45 00 64 00 69 00 74 00 6F 00 72 00 20 00 56 00 65 00 72 00 73 00 69 00 6F 00 6E 00 20 00 35 00 2E 00 30 00 30 00 0D 00 0A 00 0D 00 0A 00")) { bDetected = true; sVersion = "5.0"; sOption("UTF-16LE"); } return result(); } ================================================ FILE: db/Binary/format_text.pdb.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG @kaens) meta("format", "Protein Data Bank file"); function detect() { if (Binary.compare("'HEADER'") && (Binary.isHeuristicScan() || extIs("pdb"))) { //ref http://www.wwpdb.org/documentation/file-format-content/format33/sect1.html L = ['', '', '', '', '']; ttl = ''; L[0] = Binary.read_ansiString(0, Binary.findSignature(0, 81, "0A")); if (/[\x20-\x7F]{65,}/.test(L[0])) { bDetected = true; if (Binary.isVerbose()) { p = L[0].length + 1; for (i = 1; i < L.length; i++) { L[i] = Binary.read_ansiString(p, Binary.findSignature(p, 81, "0A") - p); p += L[i].length + 1; } for (i = 0; i < L.length; i++) { switch (L[i].substr(0, 6)) { case "HEADER": sOptionT(L[i].substr(10, 40), "Classification: "); sOptionT(L[i].substr(62, 10), "ID: "); //4 is the format, but 10 for future-proofing sOptionT(L[i].substr(50, 9), "dep. "); break; case "TITLE ": ttl += ' ' + L[i].substr(10, 70).trim(); break; } } sOptionT(ttl, "Title: ") } } } return result(); } ================================================ FILE: db/Binary/format_text.plaintext.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "Plain text"); function detect() { if (Binary.isPlainText()) { var sText = Binary.getString(0, Math.min(Binary.getSize(), 3)); // UTF-8 BOM. if (/^\xef\xbb\xbf/.test(sText)) { sName = "UTF-8 text"; } var size = Binary.getSize() < 4096 ? Binary.getSize() : 4096, pos = Binary.findByte(0, size, 10); if (pos !== -1) { sOptions = (pos != 0 && Binary.readByte(pos - 1) == 13) || (pos + 1 < Binary.getSize() && Binary.readByte(pos + 1) == 13) ? "CRLF" : "LF"; } else if (Binary.findByte(0, size, 13) != -1) { sOptions = "CR"; } bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_video.BIK.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/Bink_Video meta("format", "Bink Video"); function detect() { if (Binary.compare("'BIK'........00....0000....0000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_video.BK2.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.radgametools.com/bnkmain.htm // https://filext.com/file-extension/BK2 meta("format", "BinkMovie"); function detect() { if (Binary.compare("'KB2'00")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_video.FLV.1.sg ================================================ // Detect It Easy: detection rule file // Author: Tembo (http://tembolab.pl/products/executable-image-viewer.html) meta("format", "Flash Video"); function detect() { if (Binary.getSize() > 37) { if (Binary.compare("'FLV'") && Binary.compare("'onMetaData'", 27)) { bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_video.MOV.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/QuickTime_File_Format // https://developer.apple.com/documentation/quicktime-file-format/movie_data_atom meta("format", "QuickTime Movie"); function detect() { if (Binary.compare("........'moov'")) { var codec = Binary.getString(11, 5).trim(); if (/^[a-z]{5}$/.test(codec)) { sOptions = codec; bDetected = true; } } else if (Binary.compare("........6d646174")) { sOptions = "Movie data atom"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_video.MP4.1.sg ================================================ // Detect It Easy: detection rule file // Author: A.S.L - 2019 meta("format", "MP4 Video"); function detect() { if (Binary.getSize() > 100) { if (Binary.compare("000000..'ftyp'")) { sOptions = Binary.getString(16); // example : isomiso2avc1mp41 / isomavc1 / isom bDetected = true; } } return result(); } ================================================ FILE: db/Binary/format_video.Matroska.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/Matroska meta("format", "Matroska Video (.MKV)"); function detect() { if (Binary.compare("1a45dfa3a34286810142f7810142f2810442f38108428288'matroska'")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_video.RobotAnimation.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/Robot_Animation meta("format", "Robot Animation"); function detect() { if (Binary.compare("1600534f4c00")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_video.Smacker.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/Smacker meta("format", "Smacker Video"); function detect() { if (Binary.compare("'SMK2'....0000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/format_video.VMD.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/VMD meta("format", "Video and Media Data (.VMD)"); function detect() { if (Binary.compare("2e03000001")) { sVersion = "Adi2/Adibou1/Playtoons/Woodruff"; sOptions = "Video+Sound"; bDetected = true; } else if (Binary.compare("2e0300000700a4030000000040018800011002003003000069763332")) { // 69763332 = iv32 sOptions = "Indeo 3 (compressed)"; sVersion = "3.24.01.01"; bDetected = true; } else if (Binary.compare("2e0302000700........00004001f000000001003003000049563332")) { // 49563332 = IV32 sOptions = "Indeo 3 (compressed)"; sVersion = "3.24.15.03"; bDetected = true; } else if (Binary.compare("2e030105000200000000008007e001")) { bDetected = true; } else if (Binary.compare("2e03..000100....000000008002")) { sOptions = "Video+Sound"; sVersion = "Adi4/Adibou2"; bDetected = true; } else if (Binary.compare("2e030200000015")) { sOptions = "Adibou2 (Sciences)"; bDetected = true; } else if (Binary.compare("2e0302000000..000000000000000000001101004403")) { sOptions = "Sound only"; sVersion = "Adiboud'chou"; bDetected = true; } else if (Binary.compare("2e0302000d00")) { sOptions = "Video+Sound"; sVersion = "Adibou2 (Sciences)/Adi4"; bDetected = true; } else if (Binary.compare("3200..000000")) { sOptions = "Sound only"; sVersion = "Adi5/Adibou3"; bDetected = true; } else if (Binary.compare("2e0302001d00..00..00..00")) { sOptions = "Video+Sound"; bDetected = true; } else if (Binary.compare("2e0302..........00000000000000000010..003003")) { sOptions = "Sound only"; bDetected = true; } else if (Binary.compare("32000200..00..0000000000..00..00......0034")) { sOptions = "Animation only"; sVersion = "Adibou3"; bDetected = true; } else if (Binary.compare("2e0301000100........................02003003")) { sOptions = "Animation+Sound"; sVersion = "Adibou2"; bDetected = true; } else if (Binary.compare("2e0301000100......................1001003003")) { sOptions = "Sound only"; sVersion = "Adibou2"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/formats.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 , LinXP meta("format"); includeScript("zlib"); function detect() { var TrueTypeTags = []; TrueTypeTags['BASE'] = TrueTypeTags['cmap'] = TrueTypeTags['DSIG'] = TrueTypeTags['EBDT'] = TrueTypeTags['Feat'] = TrueTypeTags['FFTM'] = TrueTypeTags['GDEF'] = TrueTypeTags['GPOS'] = TrueTypeTags['GSUB'] = TrueTypeTags['LTSH'] = TrueTypeTags['OS/2'] = 1; if (Binary.compare("950412de00000000") || Binary.compare("de12049500000000")) { sName = "GNU Gettext Machine Object (.MO)"; } else if (TrueTypeTags[Binary.getString(0xC, 4)]) { sName = "TrueType font (.TTF)"; } else if (Binary.compare("f702018392c01c3b")) { sName = "Device Independent Document (.DVI)"; } else if (Binary.compare("31be000000ab0000") || Binary.compare("32be000000ab0000")) { sName = "Windows Write document (.WRI)"; } else if (Binary.compare("'MICROSOFT PIFEX'0087010000", 0x171)) { sName = "Microsoft Program Information (.PIF)"; } else if (Binary.compare("4c0000000114020000000000c000000000000046")) { sName = "Windows Shortcut (.LNK)"; } else if (Binary.compare("'Zinc Data File Version'")) { sName = "Zinc Data (.DAT)"; } else if (Binary.compare("00010000'Jet System DB '00")) { sName = "Microsoft Access Workgroup Information (.MDW)"; } else if (Binary.compare("dca5..00..................00000000") || Binary.compare("eca5c100..................00000000")) { sName = "Microsoft Word 2 document"; } else if (Binary.compare("'OTTO'................'CFF '")) { sName = "OpenType - CFF compact font (.OTF)"; } else if (Binary.compare("3cb86418caef9c95")) { sName = "Qt Message (.QM)"; } else if (Binary.compare("'SIB file: TsiLang binary translation data'")) { sName = "TsiLang binary translation data (.SIB)"; } else if (Binary.compare("......00..........000200") && Binary.compare("00'LP'", 0x21)) { sName = "Embedded OpenType font (.EOT)"; } else if (Binary.compare("d4c3b2a1020004")) { sName = "TCPDUMP's style capture (.ACP/PCAP)"; } else if (Binary.compare("'HSP'")) { sName = "OS/2 help file"; } else if (Binary.compare("'LN'0200")) { sName = "Quick Help"; } else if (Binary.compare("'MZIP'")) { sName = "MZIP archive"; } else if (Binary.compare("'Kaydara FBX Binary '00")) { sName = "Kaydara FBX Binary (.FBX)"; sVersion = Binary.read_uint16(0x17); } else if (Binary.compare("89'FCP'0D0A1A0A")) { sName = "High-Logic FontCreator Project (.FCP)"; sVersion = Binary.read_uint16(0x08) + "." + Binary.read_uint16(0x0A); detect_zlib(Binary, 0x14 + Binary.read_uint32(0x10) * 0x11 + 0x0C); } else if (Binary.compare("'XALZ'")) { sName = "Xamarin Compressed DLL"; sOptions = sOptions.append("LZ4 compression", "Index:" + Binary.read_uint32(0x4), "Original size:" + Binary.read_uint32(0x8)) } bDetected = bDetected || Boolean(sName); return result(); } ================================================ FILE: db/Binary/graphics.1.sg ================================================ // Detect It Easy: detection rule file // Authors: hypn0 , Kaens (TG@kaens) meta("image"); function detect() { if (Binary.compare("d7cdc69a0000")) { sName = "Windows MetaFile (.WMF)"; } else if (Binary.compare("ff4fff51002f0000")) { sName = "JPEG-2000 Code Stream (.JP2)"; } else if (Binary.compare("0000000C6A50....................'ftypjp2'..........'jp2'20")) { sName = "LuraWave JPEG-2000 (.JP2)"; } else if (Binary.compare("'P4'0a")) { sName = "Unix Portable BitMap (.PBM)"; } else if (Binary.compare("'P5'0a") || Binary.compare("'P6'0a")) { sName = "Portable BitMap Package (.PPM)"; } else if (Binary.compare("01da010100")) { sName = "Silicon Graphics bitmap (.SGI)"; } else if (Binary.compare("010009000003............................................'WMFC'")) { sName = "Windows Metafile (old Win 3.x format) (.WMF)"; } else if (Binary.compare("01000000640000000000000000000000") && Binary.compare("'EMF'000001", 0x29)) { sName = "Windows Enhanced Metafile (.EMF)"; } else if (Binary.compare("'WGq'")) { sName = "Liar-soft Windows Computer Graphics image (.WCG)"; } bDetected = bDetected || Boolean(sName); return result(); } ================================================ FILE: db/Binary/image.PNG.1.sg ================================================ // Detect It Easy: detection rule file // Authors: LinXP, Kae (TG@kaens) // doc-ref: http://www.libpng.org/pub/png/spec/1.2/PNG-Contents.html meta("image"); function detect() { if (File.compare("89'PNG'0D0A1A0A........'IHDR'")) { bDetected = true; sName = "Portable Network Graphics (.PNG)"; ct = File.read_uint8(0x19); switch (ct) { case 0: sOption("grey"); break; case 2: sOption("RGB"); break; case 3: sOption("indexed"); break; case 4: sOption("grey+alpha"); break; case 6: sOption("RGBA"); break; default: sOption("unk.colour type"); } if (File.read_uint8(0x1C)) sOption("interlaced"); if (File.compare("00000008'acTL'", 0x21)) { } if (File.isVerbose()) { var p = 8, col = 0, end = simplea = musthaveplte = false, w = h = "?", af = icc = title = auth = desc = timestamp = sw = warn = cmt = sd = ""; mainloop: while (!end && p < File.getSize()) { hksz = File.read_uint32(p, _BE); hkhd = File.read_ansiString(p + 4, 4); if (p + 12 + hksz > File.getSize()) { sVersion += "!short"; break } // the CRC algo in DiE seems to be different for this: // crc = File.calculateCRC32(p,8+hksz); ccrc = File.read_uint32(p+8+hksz,_BE); // if(crc != ccrc) sVersion += "!badchunk "//+hkhd+"@"+Hex(p); p += 8; switch (hkhd) { case "IEND": end = true; break; case "IHDR": w = File.read_uint32(p, _BE); h = File.read_uint32(p + 4, _BE); col = 1 << File.read_uint8(p + 8); musthaveplte = File.read_uint8(p + 9) == 3; break; case "PLTE": musthaveplte = false; break; case "tRNS": simplea = true; break; case "iCCP": icc = File.read_codePageString(p, 79, "CP850"); break; case "iTXt": case "tEXt": var i = p; if (hkhd === "iTXt") { t1 = File.read_codePageString(i, 79, "CP850").toLowerCase(); i += t1.length + 1; if (!File.read_uint8(i += 2)) break; //not messing with compressed tags t = File.read_codePageString(i, 0x100, "CP850"); i += t.length + 1; //language tag t = File.read_codePageString(i, 0x100, "CP850"); i += t.length + 1; //translated keyword t2 = File.read_utf8String(i, hksz - i); } else { t1 = File.read_codePageString(p, 79, "CP850").toLowerCase(); i += t1.length + 1; t2 = File.read_codePageString(i, hksz - i, "CP850") } _log("t1:" + t1.slice(0, 4)); switch (t1) { case "title": title = t2; break; case "author": auth = t2; break; case "description": desc = t2; break; case "creation time": timestamp = t2; break; case "software": sw = t2; break; case "warning": warn = t2; break; case "comment": cmt = t2; break; default: if (t1.slice(0, 4) == "xml:") desc = desc.append("XML info found") } break; case "sBIT": switch (ct) { case 0: sd = File.read_uint8(p); break; case 2: case 3: sd = "R" + File.read_uint8(p) + "G" + File.read_uint8(p + 1) + "B" + File.read_uint8(p + 2); break; case 4: sd = "g" + File.read_uint8(p) + "a" + File.read_uint8(p + 1); break; case 6: sd = "R" + File.read_uint8(p) + "G" + File.read_uint8(p + 1) + "B" + File.read_uint8(p + 2) + "a" + File.read_uint8(p + 3); break; } case "tIME": timestamp = "UTC" + File.read_uint16(p, _BE) + "-" + File.read_uint8(p + 2) + "-" + File.read_uint8(p + 3) + "T" + File.read_uint8(p + 4) + ":" + File.read_uint8(p + 5) + ":" + File.read_uint8(p + 6); break; case "acTL": sName = "Animated Portable Network Graphics (.PNG)"; af = Binary.read_uint32(p, _BE); break; default: for (i = 0; i < 4; i++) { var c = hkhd[i]; if (c < 'A' || (c > 'Z' && c < 'a') || c > 'z') { sVersion += "!badchunkheader"; break } } } p += 4 + hksz; } if (musthaveplte) sVersion += "!badpalette"; if (!end) sVersion += "!noIEND"; sOption(w + "x" + h); sOption(col, "colours:"); sOption(af, "frames:"); sOption(sd, "src.depth:"); if (simplea) sOption("simple alpha"); sOptionT(icc); sOption(title); sOption(auth, "by:"); sOption(timestamp, "on:"); sOption(sw, "in:"); sOption(warn, "/!\\:"); sOption(addEllipsis(desc, 70, 0x200)); sOption(cmt); sOption(p, "sz:") } } return result(); } ================================================ FILE: db/Binary/image_ANI.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("image", "Windows Animated Cursor"); function detect() { if (Binary.getSize() >= 48) { if (Binary.compare("'RIFF'........'ACON'")) { var nOffset = Binary.findString(12, Binary.getSize() - 12, "framicon"); if (nOffset != -1) { sOptions = Binary.readByte(nOffset + 18) + "x" + Binary.readByte(nOffset + 19); // Read the BPP from the first icon, as the header is unreliable. nOffset += 12 + Binary.readDword(nOffset + 30); sOptions = sOptions.append(Binary.readWord(nOffset + 14) + "bpp"); } nOffset = Binary.findSignature(12, Binary.getSize() - 12, "'anih'24000000"); if (nOffset != -1) { var nCount = Binary.readDword(nOffset + 12); sOptions = sOptions.append(nCount + (nCount == 1 ? " icon" : " icons")); } bDetected = true; } } return result(); } ================================================ FILE: db/Binary/image_BMP.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("image", "Windows Bitmap"); function detect() { if (Binary.getSize() >= 40) { if (Binary.compare("'BM'")) { if (Binary.getSize() >= Binary.readDword(2)) { switch (Binary.readDword(14)) { case 40: sVersion = "3"; break; case 108: sVersion = "4"; break; case 124: sVersion = "5"; break; } if (sVersion) { switch (Binary.readDword(0x1e)) { case /*BI_RLE8*/ 1: case /*BI_RLE4*/ 2: sOptions = "RLE"; break; case /*BI_JPEG*/ 4: sOptions = "JPEG"; break; case /*BI_PNG*/ 5: sOptions = "PNG"; break; } nHeight = ~~Binary.readDword(0x16); if (nHeight < 0) { nHeight = -nHeight; sOptions = sOptions.append("top-down"); } sOptions = sOptions.append(Binary.readDword(0x12) + "x" + nHeight, Binary.readWord(0x1c) + "bpp"); } bDetected = true; } } } return result(); } ================================================ FILE: db/Binary/image_CUR.1.sg ================================================ // Detect It Easy: detection rule file // Authors: Jason Hood , Kae meta("image", "Windows Cursor"); includeScript("CurIcoBPP"); function detect() { if (X.Sz() >= 40) { if (X.c("00000200")) { // Find the biggest, assuming square. var nCount = X.U16(4); var nWidth = 0, nHeight = 0, nBPP = 0, sz = 6 + nCount * 16; if (sz === 6 || sz > X.Sz()) return false; var nHotX, nHotY; for (var i = 0; i < nCount; i++) { if (Binary.read_uint8(9 + i * 16)) return false; sz_ = Binary.read_uint32(14 + i * 16, _LE); if (!sz_ || sz_ > X.Sz() - 22) return false; sz += sz_; var w = X.U8(6 + i * 16); if (w > nWidth) { nWidth = w; nHeight = X.U8(7 + i * 16); nBPP = getCurIcoBPP(6 + i * 16); nHotX = X.I16(10 + i * 16); nHotY = X.I16(12 + i * 16); } else if (w == nWidth) { var b = getCurIcoBPP(6 + i * 16); if (b > nBPP) { nBPP = b; nHotX = X.I16(10 + i * 16); nHotY = X.I16(12 + i * 16); } } } sOptions = nWidth + "x" + nHeight; if (nBPP != 0) { sOptions = sOptions.append(nBPP + "bpp"); } sOptions = sOptions.append("(" + nHotX + "," + nHotY + ")"); if (nCount > 1) { sOptions = sOptions.append(nCount + " cursors"); } sOptions = sOptions.append("sz:" + sz); bDetected = true; } } return result(); } ================================================ FILE: db/Binary/image_DDS.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP meta("image", "DirectDraw Surface (.DDS)"); function detect() { if (Binary.getSize() >= 0x40) { if (Binary.compare("'DDS '7C000000")) { bDetected = true; if (Binary.isVerbose()) { sOption(Binary.read_uint32(0x0C) + "x" + Binary.read_uint32(0x10)); var sFourCC = Binary.getString(0x54, 0x04); if (sFourCC) { sOption("compressed: " + sFourCC); } else { sOption("uncompressed"); } if (Binary.read_uint32(0x1C)) { sOption("MipMap"); } } } } return result(); } ================================================ FILE: db/Binary/image_EPS.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP meta("image", "Encapsulated PostScript (.EPS)"); function detect() { if (Binary.getSize() >= 0x40) { if (Binary.compare("'%!PS-Adobe-'", 0x00) && Binary.compare("' EPSF-'", 0x0E)) { sVersion = sVersion.append(Binary.getString(0x0B, 0x03), Binary.getString(0x14, 0x03)); var sText = Binary.getString(0x00, 0x0400) bDetected = true; if (Binary.isVerbose()) { var aCreator = sText.match(/%%Creator: (.*?)[\r\n]/); if (aCreator) { sOptions = sOptions.append("Creator:" + aCreator[1]); } var aPages = sText.match(/%%Pages: (.*?)[\r\n]/); if (aPages) { sOptions = sOptions.append("Pages:" + aPages[1]); } } } } return result(); } ================================================ FILE: db/Binary/image_FSH.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.wiki.sc4devotion.com/index.php?title=FSH_Format // https://rewiki.miraheze.org/wiki/EA_SSH_FSH_Image_(Type_1) meta("image", "FSH"); function detect() { if (Binary.compare("'SHPI'......00..000000")) { sOptions = "PC"; bDetected = true; } return result(); } ================================================ FILE: db/Binary/image_GIF.1.sg ================================================ // Detect It Easy: detection rule file // Authors: Kae (TG@kaens) meta("image", "Graphics Interchange Format file (.GIF)"); function detect() { //ref https://www.w3.org/Graphics/GIF/spec-gif89a.txt if (!File.compare("'GIF87'") && !File.compare("'GIF89'") || File.getSize() < 11) return; sVersion = Binary.getString(4, 2); if (/\d[a-z]/.test(sVersion) < 0) return; sVersion = "v198" + sVersion; bDetected = true; if (!File.isDeepScan() && !File.compare("3B", File.getSize() - 1)) sVersion += "/malformed"; if (!File.isVerbose()) return result(); var fl = File.read_uint8(0x0A), ar = File.read_uint8(0x0C), malformed = ""; sOption(File.read_uint16(6) + "x" + File.read_uint16(8)); var col = 1 << ((fl & 7) + 1); sOption(col, "col:"); var bgc = File.read_uint8(0x0B); if (bgc) sOption(bgc, "bgc:"); if (ar) sOption((ar + 15) / 64, "a/r:"); if (File.isDeepScan()) { p = 0x0D; imgs = 0; cmt = ""; if (fl & 0x80) { p += 3 * col; } blocksp = p; //skip global palette mainloop: for (; ;) { var ch = File.read_uint8(p++); if (ch === 0x3B) break; else if (ch === 0x21) { var c = File.read_uint8(p++); switch (c) { case 0xF9: p += File.read_uint8(p++); break; //graphics control extension case 0xFE: //comments c = File.read_uint8(p++); if (c) { cmt += File.read_ansiString(p, c); p += c } case 0xFF: //application data extension c = File.read_uint8(p++); if (c === 11) { t = File.read_ansiString(p, c); sOption(t, "appdata:"); p += c; c = File.read_uint8(p++); while (c && p < File.getSize()) { p += c; c = File.read_uint8(p++) } } else { malformed += "!badappext"; break mainloop } break; default: c = File.read_uint8(p++); while (c) { p += c; c = File.read_uint8(p++) } } } if (p >= File.getSize()) { malformed += "!short"; break } if (ch != 0x2C) continue; imgs++; if (!File.read_uint16(p + 4) || !File.read_uint16(p + 6)) { malformed += "!badimg"; break } p += 8 /*skip coords,w,h*/; fl = File.read_uint8(p++); p++ /*skip the min.lzw code size*/ if (fl & 0x80) { col = 1 << ((fl & 7) + 1); p += 3 * col; _log(" local palettes skipped @" + Hex(p)) } c = File.read_uint8(p++); while (c && p < File.getSize()) { p += c; c = File.read_uint8(p++) } if (p >= File.getSize()) { malformed += "!short"; break } } if (ch != 0x3B) malformed += "!badEoS"; if (!imgs) { bDetected = false; return } else if (imgs > 1) sOption(imgs, "frames:"); if (malformed) sVersion += "/malformed" + malformed; else sOption(p, "sz:"); } } ================================================ FILE: db/Binary/image_ICNS.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Apple_Icon_Image_format meta("image", "Apple Icon Image"); function detect() { if (Binary.compare("'icns'00")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/image_ICO.1.sg ================================================ // Detect It Easy: detection rule file // Authors: Jason Hood , Kae meta("image", "Windows Icon"); includeScript("CurIcoBPP"); function detect() { if (X.c("00000100")) { // Find the biggest, assuming square. var nCount = X.U16(4, _LE), sz = 6 + nCount * 16; if (!nCount || sz > X.Sz()) return false; var nWMax = 0, nHMax = 0, nBPPM = 0, nWMin = 0xFFFFFFFFF, nHMin = 0xFFFFFFFFF, nBPPm = 0xFFFFFFFFF, w, h, b; for (var i = 0; i < nCount; i++) { if (X.U8(9 + i * 16) || X.U16(10 + i * 16, _LE) > 8 || !isWithin(X.U16(12 + i * 16, _LE), 1, 32)) return false; w = X.U8(6 + i * 16); b = getCurIcoBPP(6 + i * 16); sz_ = X.U32(14 + i * 16, _LE); if (!sz_ || sz_ > X.Sz() - 22) return false; sz += sz_; if (w === 0) { var nOffset = X.U32(18 + i * 16, _LE); if (X.c("89'PNG\r\n'1A0A........'IHDR'", nOffset)) { w = X.I32(nOffset + 16, _BE); h = X.I32(nOffset + 20, _BE); } else if (X.c("28000000", nOffset)) { w = Math.abs(X.I32(nOffset + 4, _LE)); h = Math.abs(X.I32(nOffset + 8, _LE)); // abs for top-down and otherwise weird BMPs } else return false // unknown format after all } else { // _log("bmp, ht @ " + Hex(i * 16 + 7)); h = X.U8(7 + i * 16); } nWMin = Math.min(w, nWMin); nHMin = Math.min(h, nHMin); nBPPm = Math.min(b, nBPPm); nWMax = Math.max(w, nWMax); nHMax = Math.max(h, nHMax); nBPPM = Math.max(b, nBPPM); } if (!nWMax || !nHMax) return false; sOption((nWMin != nWMax || nHMin != nHMax ? nWMin + 'x' + nHMin + ' ~ ' : '') + nWMax + "x" + nHMax); sOption((nBPPm != nBPPM ? nBPPm + '~' : '') + nBPPM + "bpp"); if (nCount > 1) sOption(nCount + " icons"); sOption("sz: " + sz) bDetected = true; } return result(); } ================================================ FILE: db/Binary/image_IMG.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=Gob/DEV7_Information#Images meta("image", "Image (DEV7)"); function detect() { if (Binary.compare("'IMG10'")) { var img10 = Binary.getString(3, 2).trim(); if (/^[0-9]{2}$/.test(img10)) { if (X.isVerbose()) sVersion = img10; bDetected = true; } } else if (Binary.compare("'IMG1.0.1'")) { var img101 = Binary.getString(3, 5).trim(); if (/^\d+\.\d+\.\d+$/.test(img101)) { if (X.isVerbose()) sVersion = img101; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/image_JNG.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: http://www.libpng.org/pub/mng/spec/jng.html meta("image", "JPEG Network Graphics (.JNG)"); function detect() { if (Binary.getSize() >= 0x40) { if (Binary.compare("8B'JNG\r\n'1A0A........'JHDR'")) { bDetected = true; if (Binary.isVerbose()) { sOption(Binary.read_uint32(0x10, _BE) + "x" + Binary.read_uint32(0x14, _BE)); switch (File.read_uint8(0x18)) { case 8: sOption("Gray"); break; case 10: sOption("Color"); break; case 12: sOption("Gray Alpha"); break; case 14: sOption("Color Alpha"); break; default: return; } } } } return result(); } ================================================ FILE: db/Binary/image_JPEG.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("image", "JPEG"); function detect() { if (X.Sz() >= 22) { if (X.c("FFD8FFE0....'JFIF'00")) { bDetected = true; sVersion = X.U8(11) + "."; if (X.U8(12) < 10) { sVersion = sVersion + "0"; } sVersion = sVersion + X.U8(12); // Search for a Start Of Frame to get dimensions. var nOffset = 2; while (nOffset < X.Sz()) { var wTag = X.U16(nOffset, _BE); if (wTag >= 0xFFC0 && wTag <= 0xFFC3) { sOptions = X.U16(nOffset + 7, _BE) + "x" + X.U16(nOffset + 5, _BE); switch (X.U8(nOffset + 9)) { case 1: sOptions = sOptions.append("grey"); break; case 3: sOptions = sOptions.append("YCbCr"); break; case 4: sOptions = sOptions.append("CMYK"); break; } break; } nOffset += 2 + X.U16(nOffset + 2, _BE); } } else if (X.c("FFD8FFE1....'Exif'00")) { bDetected = true; sVersion = X.U8(11) + "."; if (X.U8(12) < 10) sVersion = sVersion + "0"; sVersion = sVersion + X.U8(12); sOptions = "EXIF"; } else if (X.c("FFD8FFDB")) { bDetected = true; sOptions = "OLD"; } } return result(); } ================================================ FILE: db/Binary/image_JPEGXL.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("image", "JPEG XL"); function detect() { if (Binary.getSize() >= 20) { if (Binary.compare("FF0A")) { sOptions = "codestream"; bDetected = true; } else if (Binary.compare("0000000C4A584C200D0A870A")) { sOptions = "ISOBMFF-based container"; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/image_KTX.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP meta("image", ""); function detect() { if (Binary.getSize() >= 0x40) { if (Binary.compare("AB'KTX 11'BB0D0A1A0A")) { bDetected = true; sName = "Khronos Texture (.KTX)"; if (Binary.isVerbose()) { sOption(Binary.read_uint32(0x24) + "x" + Binary.read_uint32(0x28)); //TODO derive size ref https://registry.khronos.org/KTX/specs/1.0/ktxspec.v1.html } } else if (Binary.compare("AB'KTX 20'BB0D0A1A0A")) { bDetected = true; sName = "Khronos Texture (.KTX2)"; if (Binary.isVerbose()) { sOption(Binary.read_uint32(0x14) + "x" + Binary.read_uint32(0x18)); //ref https://registry.khronos.org/KTX/specs/2.0/ktxspec.v2.html p = 0x50; sz = 0; //max ofs among the levels' ends for(i = 0; i < Math.max(1,Binary.read_uint32(0x28)); i++, p += 0x18) if((t = Binary.read_uint64(p)) > sz) { sz = t + Binary.read_uint64(p+8) } sOption('sz:'+outSz(sz)) } } // https://github.com/BinomialLLC/basis_universal/wiki/.basis-File-Format-and-ETC1S-Texture-Video-Specification else if (Binary.compare("734213004D00")) { bDetected = true; sName = "Basis Universal GPU Texture (.BASIS)"; if (Binary.isVerbose()) { //sOption(Binary.read_uint32(0x14)+"x"+Binary.read_uint32(0x18)); } } } return result(); } ================================================ FILE: db/Binary/image_LBM.1.sg ================================================ // Detect It Easy: detection rule file // Authors: Kaens TG@kaens meta("image", "IFF InterLeaved BitMap (.IFF,.LBM)"); function detect() { if (File.compare("'FORM'") && (File.compare("'ILBM'", 8) || File.compare("'PBM '", 8))) { sz = File.read_uint32(4, _BE) + 8; if (File.getSize() < sz) sVersion = "malformed!short"; p = 0x0C; end = Math.min(File.getSize(), sz); w = viewportMode = hsx = -1; while (p < end) { hkhd = File.read_ansiString(p, 4); hksz = File.read_uint32(p + 4, _BE); p += 8; switch (hkhd) { case "BMHD": w = File.read_uint16(p, _BE); h = File.read_uint16(p + 2, _BE); x0 = File.read_int16(p + 4, _BE); y0 = File.read_int16(p + 6, _BE); numPlanes = File.read_uint8(p + 8); mask = File.read_uint8(p + 9); co = File.read_uint8(p + 0xA); tcol = File.read_uint16(p + 0xC); xa = File.read_uint8(p + 0xE); ya = File.read_uint8(p + 0xF); pw = File.read_int16(p + 0x10, _BE); ph = File.read_int16(p + 0x12, _BE); break; case "CAMG": viewportMode = File.read_uint32(p, _BE); break; case "GRAB": hsx = File.read_int16(p, _BE); hsy = File.read_int16(p + 2, _BE); break; } p += hksz; if (hksz % 2) p++; } if (w < 0) return; if (File.isVerbose()) { sOption(w + "x" + h + " (" + x0 + "," + y0 + ") [" + pw + "x" + ph + "] AR" + xa + ":" + ya); sOption("planes:" + numPlanes); switch (co) { case 0: sOption("uncompressed"); break; case 1: sOption("RLE"); break; case 2: sOption("vertical RLE"); break; default: sOption("unk.compression") } if (mask >= 2) sOption("t.col:" + Hex(tcol)); if (viewportMode >= 0) sOption(Hex(viewportMode), "view_port_mode:"); if (hsx >= 0) sOption("hotspot: (" + hsx + "," + hsy + ")") } bDetected = true; } return result(); } ================================================ FILE: db/Binary/image_MNG.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: http://www.libpng.org/pub/mng/spec/ meta("image", "Multiple-image Network Graphics (.MNG)"); function detect() { if (Binary.getSize() >= 0x40) { if (Binary.compare("8A'MNG\r\n'1A0A........'MHDR'")) { bDetected = true; if (Binary.isVerbose()) { sOption(Binary.read_uint32(0x10, _BE) + "x" + Binary.read_uint32(0x14, _BE)); sOption("frames:" + Binary.read_uint32(0x18, _BE)); } } } return result(); } ================================================ FILE: db/Binary/image_PCX.1.sg ================================================ // Detect It Easy: detection rule file // Authors: LinXP, Kae (TG@kaens) meta("image", "ZSoft PiCture eXchange file (.PCX)"); function detect() { //ref https://www.fileformat.info/format/pcx/spec/a10e75307b3a4cc49c3bbe6db4c41fa2/view.htm if (X.Sz() >= 0x50) { if (X.U8(0) === 10) { switch (nv = X.U8(0x01)) { case 0: sVersion = "v2.5 using a fixed EGA palette"; break; case 2: sVersion = "v2.8 using a modifiable EGA palette"; break; case 3: sVersion = "v2.8 using no palette"; break; case 4: sVersion = "Windows"; break; case 5: sVersion = "v3.0+ or 24-bit"; break; default: return; } var sus = '', inv = 0; // strictly-speaking-invalid or highly unlikely parameter counter var rle = X.U8(0x02); if (rle > 1) return; if (!rle) { inv++; sus += '!uncompressed' } var w = X.U16(0x08) - X.U16(0x04) + 1, h = X.U16(0x0A) - X.U16(0x06) + 1; if (w <= 0 || h <= 0) return; var xdpi = X.U16(0xC), ydpi = X.U16(0xE); if(xdpi && !isWithin(xdpi,32,600)) { inv++; sus += '!susXdpi' }; if(ydpi && !isWithin(ydpi,32,600)) { inv++; sus += '!susYdpi' }; var bpplane = X.U8(0x03), nplanes = X.U8(0x41), bpx = bpplane * nplanes, pal = ext = false; if ([1, 2, 4, 8, 24].indexOf(bpplane) < 0) return; if (!nplanes || nplanes > 4) return; if (X.U8(0x40)) { inv += 2; sus += '!resnon0' } if (!isAllZeroes(0x4A, 0x36)) ext = true; if (pal && ([0, 3].indexOf(nv) < 0 || bpx > 4)) { inv++; sus += '!badpalette' } var bpline = X.U16(0x42); if (bpline % 2) return; if (bpline < w*bpx >> 3) { inv++; sus += '!bpline'+bpline+' 3) return; if (inv && sus != "!uncompressed") sVersion = sVersion.appendS('sus'+sus,'/') if (X.isVerbose()) { sOption(w + "x" + h); if (rle) sOption("RLE"); if (ext) sOption("extra_block"); sOption(bpx, "bit/pixel:"); sOption(bpplane, "bit/plane:"); if(bpline < w*bpx >> 3) sOption(bpline, "scanline:"); sOption(xdpi + "x" + ydpi, "res:", " dpi"); if (X.U16(0x46) * X.U16(0x48)) sOption(X.U16(0x46) + "x" + X.U16(0x48), "screen:"); if (!rle) sOption(0x80 + (w * h * bpx >> 3), "sz:") } bDetected = true } } return result() } ================================================ FILE: db/Binary/image_PSD.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/ meta("image", "Adobe Photoshop"); function detect() { if (Binary.getSize() >= 0x20) { if (Binary.compare("'8BPS'")) { bDetected = true; switch (File.read_uint16(0x04, _BE)) { // Version check case 1: sName += " (.PSD)"; sVersion = "v1.0"; break; case 2: sName += " BIG (.PSB)"; sVersion = "v2.0"; break; default: bDetected = false; } const channelCount = Binary.read_uint16(0x0C, _BE), imageHeight = Binary.read_uint32(0x0E, _BE), imageWidth = Binary.read_uint32(0x12, _BE), bitsPerChannel = Binary.read_uint16(0x16, _BE), colorMode = Binary.read_uint16(0x18, _BE); sOption(imageWidth + "x" + imageHeight); switch (colorMode) { case 0: sOption("Bitmap"); break; case 1: sOption("Gray-scale"); break; case 2: sOption("Indexed"); break; case 3: sOption("RGB"); break; case 4: sOption("CMYK"); break; case 7: sOption("Multichannel"); break; case 8: sOption("Duotone"); break; case 9: sOption("Lab"); break; default: bDetected = false; } sOption((channelCount * bitsPerChannel) + "-bit"); } } return result(); } ================================================ FILE: db/Binary/image_PVR.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: http://powervr-graphics.github.io/WebGL_SDK/WebGL_SDK/Documentation/Specifications/PVR%20File%20Format.Specification.pdf meta("image", ""); function detect() { var PixelFormat = ['PVRTC 2bpp RGB', 'PVRTC 2bpp RGBA', 'PVRTC 4bpp RGB', 'PVRTC 4bpp RGBA', 'PVRTC-II 2bpp', 'PVRTC-II 4bpp', 'ETC1', 'BC1\\DXT1', 'DXT2', 'BC2\\DXT3', 'DXT4', 'BC3\\DXT5', 'BC4', 'BC5', 'BC6', 'BC7', 'UYVY', 'YUY2', 'BW1bpp', 'R9G9B9E5 Shared Exponent', 'RGBG8888', 'GRGB8888', 'ETC2 RGB', 'ETC2 RGBA', 'ETC2 RGB A1', 'EAC R11', 'EAC RG11', 'ASTC_4x4', 'ASTC_5x4', 'ASTC_5x5', 'ASTC_6x5', 'ASTC_6x6', 'ASTC_8x5', 'ASTC_8x6', 'ASTC_8x8', 'ASTC_10x5', 'ASTC_10x6', 'ASTC_10x8', 'ASTC_10x10', 'ASTC_12x10', 'ASTC_12x12', 'ASTC_3x3x3', 'ASTC_4x3x3', 'ASTC_4x4x3', 'ASTC_4x4x4', 'ASTC_5x4x4', 'ASTC_5x5x4', 'ASTC_5x5x5', 'ASTC_6x5x5', 'ASTC_6x6x5', 'ASTC_6x6x6' ]; if (Binary.getSize() >= 0x34) { if (Binary.compare("'PVR'03")) { bDetected = true; sName = "PowerVR PVR texture (.PVR)"; if (Binary.isVerbose()) { sOption(Binary.read_uint32(0x18) + "x" + Binary.read_uint32(0x1c)); sOption(PixelFormat[Binary.read_uint64(0x08)]); if (Binary.read_uint32(0x10)) { sOption("Linear RGB"); } else { sOption("Standard RGB"); } } } } return result(); } ================================================ FILE: db/Binary/image_QOI.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: https://qoiformat.org/qoi-specification.pdf meta("image", "Quite OK Image (.QOI)"); function detect() { if (Binary.getSize() >= 0x0E) { if (Binary.compare("'qoif'")) { bDetected = true; sOptions = sOptions.append(Binary.read_uint32(0x04, _BE) + "x" + Binary.read_uint32(0x08, _BE)); switch (File.read_uint8(0x0C)) { case 3: sOption("RGB"); break; case 4: sOption("RGBA"); break; default: return; } switch (File.read_uint8(0x0D)) { case 0: sOption("sRGB with linear alpha"); break; case 1: sOption("all channels linear"); break; default: return; } } } return result(); } ================================================ FILE: db/Binary/image_SMDH.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.3dbrew.org/wiki/SMDH meta("image", "SMDH"); function detect() { if (Binary.compare("'SMDH'00000000")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/image_TGA.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG@kaens) meta("image", "Truevision Advanced Raster Graphics Adapter bitmap (.TGA,.ICB,.VDA,.VST)"); function detect() { //ref https://github.com/ImageMagick/ImageMagick/blob/main/coders/tga.c // & https://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf if (X.Sz() < 0x12) return false; var msg = bad = "", idlen = X.U8(0), cmt = X.U8(1), col = 0, depth = 0, it = X.U8(2), bpp = X.U8(0x10), strcls = "", co = "none"; if ((bpp < 1 || bpp >= 17) && bpp != 24 && bpp != 32) return false; switch (it) { case 1: if (!cmt) return; strcls = "pseudo"; if (X.isVerbose()) sOption("colormap"); break; case 2: if (X.isVerbose()) sOption("RGB"); col = "24bit"; break; case 3: if (X.isVerbose()) sOption("monochrome"); break; case 9: if (!cmt) return; co = "rle"; strcls = "pseudo"; if (X.isVerbose()) sOption("RLE colormap"); break; case 10: co = "rle"; if (X.isVerbose()) sOption("RLE RGB"); col = "24bit"; break; case 11: co = "rle"; if (X.isVerbose()) sOption("RLE monochrome"); break; case 32: if (!cmt) return; co = "hdr"; strcls = "pseudo"; if (X.isVerbose()) sOption("H/d/RLE colormap"); break; case 33: if (!cmt) return; co = "hdrq"; strcls = "pseudo"; if (X.isVerbose()) sOption("H/d/RLE 4-pass colormap"); break; default: return; } var sus = 0, cmin = X.U16(3), cmlen = X.U16(5), cmsz = X.U8(7), x0 = X.U16(8), y0 = X.U16(0xA), w = X.U16(0xC), h = X.U16(0xE), attr = X.U8(0x11); if (!w || !h || w > 4096 || h > 2048 || x0 > 1600 || y0 > 1200 || cmsz > 32 || (attr & 0xC0)) return false; // suspiciousness is probably the only way to filter out all the FPs, so let's measure that if (x0) sus++; if (y0) sus++; if (w < 4) sus++; if (h < 4) sus++; if (w > 1600) sus++; if (h > 1200) sus++; if (attr & 0x10) sus++; // that's right-to-left if (!cmsz && cmlen) return false; if (cmt == 1 && (it == 2 || it == 10)) sus++; //shouldn't have colour maps with True-color if (cmsz < 15 || isWithin(cmsz, 17, 23) || isWithin(cmsz, 25, 31)) sus++; if (cmlen > 256) sus++; if (cmin) sus++; if (it == 2 || it == 10) { if (cmin) sus++; if (cmlen) sus++; if (cmsz) sus++ } if (it != 1 && it != 9 && it != 32 && it != 33) depth = bpp <= 8 ? 8 : (bpp <= 16 ? 5 : 8); else depth = cmsz <= 8 ? 8 : (cmsz <= 16 ? 5 : 8); var col = 1 << depth; if (strcls == "pseudo") if (cmt) col = cmin + cmlen; else { col = 1 << bpp; if (col > X.Sz()) return } p = 0x12; if (idlen) msg = X.SC(p, idlen, 'CP437'); p += idlen; //_log("colormap? @"+Hex(p)+" type:"+cmt+" index:"+cmin+" len:"+cmlen+" size:"+cmsz); if (cmt) { if (col < cmin) col = cmin; switch (cmsz) { case 8: default: p += col; break; case 15: case 16: p += col * 2; break; case 24: p += col * 3; break; case 32: p += col * 4; break; } } if (cmlen > col) sus++; if (sus > 3) { //_log('TGAFault: '+sus+'-fold suspicious!'); return; } //unpack! var pix = base = flag = skip = index = runlen = ofs = 0, ofsss = 1; if (((attr & 0xC0) >> 6) == 2) ofsss = 2; if (co != "hdr" && co != "hdrq") for (var y = 0; y < h && p < X.Sz(); y++) { for (var x = 0; x < w && p < X.Sz(); x++) { if (co == "rle") if (runlen) { runlen--; skip = flag != 0 } else { runlen = X.U8(p++); skip = 0; flag = runlen & 0x80; if (flag) runlen -= 0x80; } if (!skip) switch (bpp) { case 1: if (!(x & 7)) p++; break; case 8: default: p++; break; case 15: case 16: p += 2; break; case 24: p += 3; break; case 32: p += 4; break; } } } else p = 0; //giving up on reading huffman/delta etc. (not even Imagemagick can do that) ofs += ofsss; if (ofs > w) { base++; ofs = base } if (p > X.Sz()) if (X.isHeuristicScan()) bad = bad.addIfNone("!short"); else return; //because the format is shaky and FPs are more than possible ea = 0; if (X.isHeuristicScan()) { function isNewTGA(ext) { if (ext <= p) return false; //let's see if it's not us accidentally catching the next resource. ea = X.U32(ext - 8); esz = X.U16(ea); var dd = X.U32(ext - 4); //_l2r('tga',p,'ext='+Hex(ext)+' dd='+Hex(dd)+' ea='+Hex(ea)+' ['+Hex(esz)+']'+' ext/esz check:'+(ea && ea+esz > ext)); if (p > ext - 8 || (ea && p > ea) || (dd && p > dd) || ((dd || ea) && ea == dd) || (ea && ea + esz > ext) || (dd && ea && ea < dd && ea + esz > dd)) return false; //false alarm if (ea) { if (esz == 495) sV = "v2.0"; else sV = "v2.X"; auth = X.SC(ea + 2, 41, 'CP437'); xmsg = X.SC(ea + 43, 324, 'CP437'); timestamp = X.U16(ea + 371) + "-" + X.U16(ea + 369) + "-" + X.U16(ea + 367) + " " + X.U16(ea + 373) + ":" + X.U16(ea + 375) + ":" + X.U16(ea + 377); sw = X.SC(ea + 426, 41, 'CP437').trim() + " v" + Math.floor(X.U16(ea + 467) / 100).toString() + '.' + (X.U16(ea + 467) % 100).toString() + X.SC(ea + 469, 1, 'CP437'), gamma = (X.U16(ea + 478) / X.U16(ea + 480)).toFixed(1); } else sV = "v2.X"; if (dd) { var ddtn = X.U16(dd); var dsz = ddtn * 10 + 2; if (dd + dsz > ext || (ea && dd + dsz > ea)) return false; for (i = 0; i < ddtn; i++) { var dtp = X.U32(dd + 4 + i * 10), dtsz = X.U32(dd + 8 + i * 10); if (dtp + dtsz > ext || dtp + dtsz < p) return false; } } return true } sigsz = 15; found = false; //first, check for the strange signature sometime soon after the end of data ext = X.fSig(p, 0x1000, "'TRUEVISION-XX.'00"); if (isNewTGA(ext)) found = true; //then, check for the _proper_ signature sometime soon after the end of data if (!found) { sigsz = 18; ext = X.fSig(p, 0x1000, "'TRUEVISION-XFILE.'00"); if (isNewTGA(ext)) found = true } //if broken (hello H2_Hero_01a.tga with two broken v2-sigs), just give up and try our luck with the eof-sig: if (!found) { ext = X.fSig(X.Sz() - 20, 21, "'TRUEVISION-XFILE.'00"); if (isNewTGA(ext)) found = true } if (found) { sVersion = sV; p = ext + sigsz } else sVersion = "v1.X"; } else sVersion = "v1.X"; if (X.isVerbose()) { sOption(w + "x" + h + " (" + x0 + "," + y0 + ")"); sOption(bpp, "bpp:"); if (bpp < 24) sOption(col, "colours:"); if (ea) { sOption(gamma, "gamma:"); sOptionT(auth, "by:"); sOption(timestamp, "on:"); sOption(sw, "in:"); sOption(xmsg, 'msg:"', '"') } if (co != "rle" || X.isDeepScan()) sOption(outSz(p), "sz:") } if (bad) sVersion += "/malformed" + bad; bDetected = true; return result(); } ================================================ FILE: db/Binary/image_TIFF.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // Status: WIP // doc-ref: meta("image", "Tagged Image File Format (.TIFF)"); function detect() { if (Binary.getSize() >= 0x0E) { bDetected = true; switch (Binary.read_uint32(0x00, _BE)) { case 0x4D4D002A: var bEndian = _BE; sOption("BE"); break; case 0x49492A00: var bEndian = _LE; sOption("LE"); break; default: return; } var nOffset = Binary.read_uint32(0x04, bEndian), nTagCount = Binary.read_uint16(nOffset, bEndian); nOffset += 2; var nWidth, nHeight, nBPS, nCol, nComp; while (nTagCount--) { var nTag = Binary.read_uint16(nOffset, bEndian), nType = Binary.read_uint16(nOffset + 2, bEndian), nCount = Binary.read_uint32(nOffset + 4, bEndian); switch (nTag) { case 0x100: nWidth = ReadTagValue(nType); break; // ImageWidth (256) case 0x101: nHeight = ReadTagValue(nType); break; // ImageLength (257) case 0x102: nBPS = nCount * ReadTagValue(nType); break; // BitsPerSample (258) case 0x103: nComp = ReadTagValue(nType); break; // Compression (259) case 0x106: nCol = ReadTagValue(nType); break; // PhotometricInterpretation (262) case 271: sOption("Make:" + ReadTagValue(nType)); break; // Make (271) case 50706: sName = "Digital Negative (.DNG)"; break; // DNGVersion (50706) default: break; } nOffset += 0x0C; } switch (nComp) { case 1: sOption("Uncompressed"); break; case 2: sOption("Huffman"); break; case 3: sOption("Group 3"); break; case 4: sOption("Group 4"); break; case 5: sOption("LZW"); break; case 6: sOption("embedded JPEG (602Photo software)"); break; case 7: sOption("JPEG"); break; case 32771: sOption("Alchemy software type 6 unknown compression"); break; case 32773: sOption("PackBits"); break; case 32946: sOption("Deflate"); break; case 34690: sOption("LDF bitonal"); break; case 65000: sOption("Kodak DCR"); sName = "Kodak DCS Pro SLR (.DCR)"; break; } if (nWidth != 0 && nHeight != 0) { sOption(nWidth + "x" + nHeight); } sOption(nBPS + "-bit "); switch (nCol) { case 0: sOption("W/B"); break; case 1: sOption("B/W"); break; case 2: sOption("RGB"); break; case 3: sOption("index"); break; } } function ReadTagValue(nType) { var nTempValue = 0, nTempOffset = 0; switch (nType) { case 1: break; // eBYTE case 2: nTempOffset = Binary.read_uint32(nOffset + 8, bEndian); nTempValue = Binary.getString(nTempOffset, nCount); return nTempValue; // eASCII case 3: // eSHORT if (nCount == 1) { nTempValue = Binary.read_uint16(nOffset + 8, bEndian); return nTempValue; } else { nTempOffset = Binary.read_uint32(nOffset + 8, bEndian); while (nCount--) { nTempValue = Binary.read_uint16(nTempOffset, bEndian); nTempOffset += 2; } return nTempValue; } case 4: // eLONG if (nCount == 1) { nTempValue = Binary.read_uint32(nOffset + 8, bEndian); return nTempValue; } else { nTempOffset = Binary.read_uint32(nOffset + 8, bEndian); while (nCount--) { nTempValue = Binary.read_uint32(nTempOffset, bEndian); nTempOffset += 4; } return nTempValue; } case 5: break; // eRATIONAL case 6: break; // eSBYTE case 7: break; // eUNDEF case 8: break; // eSSHORT case 9: break; // eSLONG case 10: break; // eSRATIONAL case 11: break; // eFLOAT case 12: break; // eDOUBLE } } return result(); } ================================================ FILE: db/Binary/image_XAR.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP // doc-ref: http://site.xara.com/support/docs/webformat/spec/XARFormatDocument.pdf meta("image", "Xar Vector graphic file (.XAR)"); function detect() { if (Binary.getSize() >= 0x40) { if (Binary.compare("'XARA'A3A30D0A")) { bDetected = true; var sProducer = Binary.getString(0x1F), sProducerVersion = Binary.getString(0x1F + sProducer.length + 1), sProducerBuild = Binary.getString(0x1F + sProducer.length + 1 + sProducerVersion.length + 1); sName = sProducer + " Document (.XAR)"; sVersion = sProducerVersion; if (Binary.isVerbose()) { sOption("build: " + sProducerBuild); switch (Binary.getString(0x10, 3)) { case 'CXW': sOption("Web file"); break; case 'CXN': sOption("Paper-publishable file"); break; } } } } return result(); } ================================================ FILE: db/Binary/image_XCF.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.gimp.org/ meta("image", "eXperimental Computing Facility (GIMP Image)"); function detect() { if (Binary.compare("67 69 6D 70 20 78 63 66")) { var versionNumber = Binary.getString(9, 4).trim(); if (/^[a-z-0-9]{4}/.test(versionNumber)) { if (X.isVerbose()) sVersion = versionNumber; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/image_bin.ZBMP.1.sg ================================================ // Detect It Easy: detection rule file // Author: Kaens (TG @kaens) meta("image", "Zlib-packed BMP file (.ZBM)"); function detect() { // found in ex. Snails for Palm OS, .zbm are simply zlib archives at offset 0x10 of uncompressed bitmap images if (X.c("'ZBMP'") && X.c("78DA", 0x10) && (w = X.U32(4)) && w < 0x10000 && (h = X.U32(8)) && h < 0x10000) { bDetected = true; sOptions = w + 'x' + h; //if(n=X.U32(0xC) sOption(n,'x')) } return result(); } ================================================ FILE: db/Binary/image_heuristic.image.HDR.1.sg ================================================ // Detect It Easy: detection rule file // Authors: Kaens TG@kaens meta("~image", "Greg Ward's RGBE / Radiance HDR (.hdr, .pic, .rgbe, .xyze)"); function detect() { if (X.isHeuristicScan()) { bDetected = ( X.fSig(0, 0x80, "'#?RADIANCE'0A") >= 0 || X.fSig(0, 0x80, "'#?RGBE'0A") >= 0 ) && X.fSig(0x0A, 0x400, "0A'FORMAT='") >= 0; } return result(); } ================================================ FILE: db/Binary/protector_javascript-obfuscator.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/javascript-obfuscator/javascript-obfuscator meta("protector", "javascript-obfuscator"); function detect() { // Is JS file? if (isSignatureInBeginAndEndPresent("'function'") && ( isSignatureInBeginAndEndPresent("'var '") || isSignatureInBeginAndEndPresent("'const '") || isSignatureInBeginAndEndPresent("')();'") )) { if (isSignatureInBeginAndEndPresent("'_0x'")) { if (isSignatureInBeginAndEndPresent("'_0x' .. .. .. .. '('") || isSignatureInBeginAndEndPresent("'_0x' .. .. .. .. .. '('") || isSignatureInBeginAndEndPresent("'_0x' .. .. .. .. .. .. '('")) { bDetected = true; } } if (isSignatureInBeginAndEndPresent("'parseInt(' .. '('")) { sOptions = "mangled"; bDetected = true; } if (isSignatureInBeginAndEndPresent("'=[\"'") && isSignatureInBeginAndEndPresent("'\",\"'") || isSignatureInBeginAndEndPresent("'=[' 27") && isSignatureInBeginAndEndPresent("27 ',' 27")) { sOptions += (sOptions.length !== 0 ? " + " : String()) + "strings array"; } } return result(); } function isSignatureInBeginAndEndPresent(signature) { var chunkToAnalyze = 1024 * 10; if (chunkToAnalyze > Binary.getSize()) chunkToAnalyze = Binary.getSize(); if (Binary.isSignaturePresent(0, chunkToAnalyze, signature) || chunkToAnalyze != Binary.getSize()) { return Binary.isSignaturePresent(Binary.getSize() - chunkToAnalyze, chunkToAnalyze, signature); } } ================================================ FILE: db/Binary/rom_32X.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://plutiedev.com/rom-header meta("rom", "Mega Drive (Mega Everdrive extensions)"); function detect() { if (Binary.compare("'SEGA SSF '", 0x100)) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/script_text.Shell.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("script", "Shell"); includeScript("shell-script"); function detect() { if (isInterpreter("sh")) { bDetected = true; } return result(); } ================================================ FILE: db/Binary/shellcode.pe_to_shellcode.1.sg ================================================ // Detect It Easy: detection rule file // Author: nicholasmckinney // Detects hashezerade's reflective pe_to_shellcode generator // https://github.com/hasherezade/pe_to_shellcode meta("shellcode", "pe_to_shellcode"); function detect() { bDetected = false; // https://github.com/hasherezade/pe_to_shellcode/blob/master/pe2shc/stub2/stub32.bin var stub32 = "558BEC51518D45F85350E8AA0100005984C0750883C8FFE9A4000000" + "56578B7D08B84D5A00006639070F858C0000008B773C03F7813E50450000757F8D86A0" + "00000033DB391875046AFDEB71FF76345750E8FB00000083C40C84C075046AFCEB5C39" + "9E80000000742357FFB684000000FFB680000000FF75FCFF75F8E86F00000083C41484" + "C075046AFBEB318D86C0000000391874095750E82800000059598B4628B90020000003" + "C766854E167408536A0157FFD0EB07FFD0EB036AFE585F5E5BC9C204008B4424045657" + "8B7C24108B008B74380C85F674128B0E85C9740C6A006A0157FFD183C60475EE5FB001" + "5EC3538B5C241855568B7424185703F3EB3C03C350FF5424188BE885ED74408B7E1003" + "FBEB1F79050FB7C1EB058D430203C185C074295055FF54242085C0741F890783C7048B" + "0F85C975DB83C6148B460C85C075BD85F60F95C05F5E5D5BC332C0EBF78B4424045355" + "568B08034C241457EB478B410483F808723F8D68F8D1ED6A005B74320FB7545908668B" + "C266C1E80C6685C074216683F803752B8B44241881E2FF0F00002B44241C03D6035424" + "180102433BDD72CE0349048B3185F675B3B0015F5E5D5BC332C0EBF7565768029FE66A" + "E88B0100008BF05985F67431688DBDC13F56E87C0000008BF8595985FF741E68FF1F7C" + "C956E869000000595985C0740D8B4C240C894104B0018939EB0232C05F5EC353568B74" + "240C83CAFF8A1E84DB743B8A7C24105784FF750A8D43BF3C19770380C3206A085F8BCA" + "0FBEC3D1E933C28BD181F22083B8ED24010F44D1D0FB83EF0175E3468A1E84DB75CB5F" + "F7D25E8BC25BC351515355568B742418B84D5A00005766390675618B463C8B44307885" + "C074568B54301C33FF8B4C30188954241C8B5430208B443024894C241085C974388D1C" + "328D2C308B4C241C0FB745006A018D048103C6894424188B0303C650E84FFFFFFF5959" + "3B44242074164783C50283C3043B7C241072CE33C05F5E5D5B5959C38B4424148B0003" + "C6EBEF56578B7C240C83CAFF33F60FB7076685C0745B5355807C2418000FB7C8894C24" + "1475108D41BF6683F819770783C120894C2414668B5C24146A085D8BC233CAD1E88BD0" + "81F22083B8ED80E1010F44D066D1EB66895C241483ED0174068B4C2414EBD9460FB704" + "776685C075A95D5BF7D25F8BC25EC364A1300000005356578B780C83C7148B37EB288D" + "46F885C074258B581885DB741E8378300074126A00FF7030E85AFFFFFF59593B442410" + "740C8B363BF775D433C05F5E5BC38BC3EBF800000000000000"; // https://github.com/hasherezade/pe_to_shellcode/blob/master/pe2shc/stub2/stub64.bin var stub64 = "56488BF44883E4F04883EC20E805000000488BE65EC348895C240857" + "4883EC30488BF9488D4C2420E83702000084C0750883C8FFE9BD000000B84D5A000066" + "39070F85AA00000048635F3C4803DF813B504500000F8597000000488D8BB000000083" + "3900750AB8FDFFFFFFE9860000004C8B4330488BD7E86201000084C07507B8FCFFFFFF" + "EB6F83BB9000000000742A0F28442420488D4C2420488B93900000004C8BC7660F7F44" + "2420E89300000084C07507B8FBFFFFFFEB3C488D8BD00000008339007408488BD7E833" + "0000008B4328B9002000004803C766854B16740E4533C0488BCF418D5001FFD0EB09FF" + "D0EB05B8FEFFFFFF488B5C24404883C4305FC348895C2408574883EC208B01488BFA48" + "8B5C10184885DB741B4C8B0B4D85C974134533C0488BCF418D500141FFD14883C30875" + "E5488B5C2430B0014883C4205FC3488BC4488958084889681048897018488978204156" + "4883EC208BDA498BF04903D84C8BF1EB4A8BC84803CE41FF16488BE84885C074628B7B" + "104803FEEB2679050FB7D1EB07488D56024803D14885D27447488BCD41FF56084885C0" + "743B4889074883C708488B0F4885C975D24883C3148B430C85C075AF4885DB0F95C048" + "8B5C2430488B6C2438488B742440488B7C24484883C420415EC332C0EBE148895C2408" + "48897C2410448B09498BD84C03CA4C8BDA33FF458B114585D27459418379040872F141" + "8B51044C8BC74883EA0848D1EA7435430FB74C41080FB7C166C1E80C6685C074236683" + "F80A752681E1FF0F0000498BC34103CA482BC34903CB49FFC04801014C3BC272CB418B" + "41044C03C8EBA332C0EB02B001488B5C2408488B7C2410C348895C2408488974241057" + "4883EC20488BD9B9029FE66AE8FD010000488BF84885C07432BA8DBDC13F488BC8E893" + "000000488BF04885C0741DBAFF1F7CC9488BCFE87E0000004885C0740B48894308B001" + "488933EB0232C0488B5C2430488B7424384883C4205FC3448A09448ADA4C8BD14183C8" + "FFEB414584DB750C418D41BF3C1977044180C120BA08000000418BC8410FBEC14133C0" + "D1E9448BC14181F02083B8ED2401440F44C141D0F94883EA0175DB49FFC2458A0A4584" + "C975BA41F7D0418BC0C3488BC448895808488968104889701848897820415441564157" + "B84D5A0000448BFA4C8BC16639010F85870000004863413C8B8C088800000085C97478" + "498D040833FF8B68184885ED746A448B4820448B50244D03C8448B601C4D03D0410FB7" + "02458B194D03D883CAFF498D3484EB2741BE080000008BCA0FBEC333C2D1E98BD181F2" + "2083B8ED24010F44D1D0FB4983EE0175E249FFC3418A1B84DB75D2F7D2413BD7742D48" + "FFC74983C2024983C104483BFD72A833C0488B5C2420488B6C2428488B742430488B7C" + "2438415F415E415CC3428B04064903C0EBDC48895C240848897C2410440FB7094183C8" + "FF33FF8ADA448BD74C8BD9EB4684DB750F418D41BF6683F8197705664183C120BA0800" + "0000418BC8410FB7C14133C0D1E9448BC14181F02083B8ED2401440F44C16641D1E948" + "83EA0175DA49FFC2470FB70C53664585C975B4488B5C240841F7D0488B7C2410418BC0" + "C348895C240848896C24104889742418574883EC2065488B0425600000008BE9488B78" + "184883C720488B1F483BDF7430488D43F04885C07427488B70304885F6741E488B4860" + "4885C9740B33D2E834FFFFFF3BC57405488B1BEBD0488BC6EB0233C0488B5C2430488B" + "6C2438488B7424404883C4205FC300000000000000000000000000"; var redir32_64_Start = "4D5A4552E8000000005B4883EB09534881C3", redir32_Start = "4D5A4552E8000000005883E8095005", redir64_Start = "4D5A4552E800000000594883E909488BC14805"; var signatures = [redir32_64_Start, redir32_Start, stub32, redir64_Start, stub64]; var nSize = Binary.getSize(); if (nSize > 0x4000) { nSize = 0x4000; } for (var i = 0; i < signatures.length; i++) { if (Binary.isSignaturePresent(0, nSize, signatures[i])) { bDetected = true; if (i <= 2) { sOptions = "x86"; } else { sOptions = "AMD64"; } } } return result(); } ================================================ FILE: db/Binary/shellcode_donut.1.sg ================================================ // Detect It Easy: detection rule file // Author: nicholasmckinney meta("shellcode", "Donut"); function detect() { bDetected = false; // https://github.com/TheWover/donut/blob/dafea1702ce2e71d5139c4d583627f7ee740f3ae/donut.c#L1235 var bInstCall = Binary.readByte(0); if (bInstCall != 0xE8) { return result(); } if (Binary.readWord(1) != Binary.readWord(5)) { return result(); } var callDest = Binary.readDword(1) // https://github.com/TheWover/donut/blob/dafea1702ce2e71d5139c4d583627f7ee740f3ae/donut.c#L1239 var popECXOffset = callDest + 5; // 1 byte for E8 (call opcode) and 4 bytes for destination offset if (Binary.readByte(popECXOffset) != 0x59) { return result(); } bDetected = true; var archDetectionOffset = popECXOffset + 1; var archDetectBytes = Binary.readDword(archDetectionOffset) & 0x00ffffff; switch (archDetectBytes) { // https://github.com/TheWover/donut/blob/dafea1702ce2e71d5139c4d583627f7ee740f3ae/donut.c#L1242-L1248 case 0x52515a: sOptions = "x86"; break; // https://github.com/TheWover/donut/blob/dafea1702ce2e71d5139c4d583627f7ee740f3ae/donut.c#L1270-L1273 case 0x48c031: sOptions = "x86 + AMD64"; break; default: sOptions = "AMD64"; } return result(); } ================================================ FILE: db/Binary/shellcode_srdi-monoxgas.1.sg ================================================ // Detect It Easy: detection rule file // Author: nicholasmckinney // https://github.com/monoxgas/sRDI/blob/9fdd5c44383039519accd1e6bac4acd5a046a92c/Python/ShellcodeRDI.py meta("shellcode", "Monoxgas sRDI"); function detect() { if (Binary.isDeepScan()) { // 32-bit and 64-bit start out with the same first 5 bytes (relative jump) var jumpStartOffset = Binary.findSignature(0, Binary.getSize(), "E800000000"); var currentOffset = jumpStartOffset + 5; // Possible 64-bit sRDI // https://github.com/monoxgas/sRDI/blob/9fdd5c44383039519accd1e6bac4acd5a046a92c/Python/ShellcodeRDI.py#L76-L80 if (Binary.readDword(currentOffset) == 0xC8894959) { sOptions = "AMD64"; bDetected = true; } else if (Binary.readDword(currentOffset) == 0xE5895558) { // Possible 32-bit sRDI sOptions = "x86"; bDetected = true; } } return result(); } ================================================ FILE: db/Binary/source_text.HTML.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("source", "HTML"); function detect() { var sText = Binary.getHeaderString(); if (/^<\s*(!DOCTYPE\s+)?html\b[^>]*>/im.test(sText)) { bDetected = true; } sLang = "HTM"; return result(); } ================================================ FILE: db/Binary/source_text.Pascal.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("source", "Pascal"); function detect() { var sText = Binary.getHeaderString(); /* if(/^unit/im.test(sText)) { bDetected = true; } */ if (/^\s*program\s.*\s*uses\s/im.test(sText)) { bDetected = true; } sLang = "Pascal"; return result(); } ================================================ FILE: db/Binary/source_text.XML.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("source", "XML"); function detect() { var sText = Binary.getHeaderString(); // Ignore the UTF-8 BOM. if (/^(?:\xef\xbb\xbf)?<\?xml/.test(sText)) { var aVersion = sText.match(/version="(.*?)"/); if (aVersion) { sVersion = aVersion[1]; } bDetected = true; } return result(); } ================================================ FILE: db/Binary/source_text.c.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("source", "C/C++"); function detect() { var sText = Binary.getHeaderString(); if (/^#ifndef (\w+).*\s+^#define \1/m.test(sText) || /#\s*pragma (?:once|hdrstop)/.test(sText)) { sOptions = "header"; bDetected = true; } if (/^(?:class\b|virtual\b|public:|private:|template\b)/m.test(sText)) { if (!(/\sdef\s/.test(sText))) // to avoid false positives on python { sName = "C++"; bDetected = true; } } else { var aInclude = sText.match(/^#include ["<].*?[>"]/mg); if (aInclude) { bDetected = true; for (var i = 0; i < aInclude.length; i++) { if (aInclude[i].indexOf(".") < 0) { sName = "C++"; break; } } } else if (/^#define/m.test(sText)) { bDetected = true; } } return result(); } ================================================ FILE: db/Binary/source_text.python.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("source", "Python"); function detect() { var sText = Binary.getHeaderString(); if ((/import\s/.test(sText)) && (/class\s/.test(sText)) && (/self/.test(sText))) { if (/\sdef\s/.test(sText)) { bDetected = true; } } sLang = "Python"; return result(); } ================================================ FILE: db/Binary/text.script.2.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("script"); includeScript("shell-script"); function detect() { if (sInterpreter) { // Capitalize the first letter, lowercase the rest. sName = sInterpreter.substr(0, 1).toUpperCase() + sInterpreter.substr(1).toLowerCase(); bDetected = true; } return result(); } ================================================ FILE: db/Binary/win_resources.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format"); function detect() { if (Binary.isResource()) { var mapNames = { "1": "Resource Cursor", "2": "Windows Bitmap", "3": "Resource Icon", "4": "Resource Menu", "5": "Resource Dialog", "6": "Resource String Table", "7": "Font Directory", "8": "Font", "9": "Accelerators", "10": "RC Data", "11": "Message Table", "12": "Windows Cursor", "14": "Windows Icon", "15": "Name Table", "16": "Resource Version Info", "17": "DlgInclude", "23": "HTML", "24": "Manifest" }; var sResName = mapNames[Binary.getScanID()]; if (sResName) { sName = sResName; sOptions = "Resources"; bDetected = true; } } return result(); } ================================================ FILE: db/Borland ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Borland Delphi tests for Borland C++ first, so ensure we only do it once. var bBorlandC; if (typeof bBorlandC === "undefined") { bBorlandC = 0; if (PE.compare("'MZ'50000200000004000F00FFFF0000B80000000000000040001A00000000000000000000000000000000000000000000000000000000000000000000020000BA10000E1FB409CD21B8014CCD219090'This program must be run under Win32\r\n$'370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'PE'0000")) { bBorlandC = 1; } else if (PE.compareEP("A1........C1E002A3")) { bBorlandC = 1; } else if (PE.compareEP("EB10'fb:C++HOOK'90")) { bBorlandC = 2; } else if (PE.section.length > 1) { var nOffset = PE.section[1].FileOffset; var nSize = Math.min(1024, PE.section[1].FileSize); if (PE.isSignaturePresent(nOffset, nSize, "'Borland C++ - Copyright'")) { bBorlandC = 1; } } } ================================================ FILE: db/CFBF/Microsoft_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("Installer", "Microsoft Installer"); function detect() { if (CFBF.getFileFormatVersion() == 4.62) { sVersion = "1.X-5.X"; bDetected = true; } return result(); } ================================================ FILE: db/CFBF/Microsoft_Office.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "Microsoft Office"); function detect() { if (CFBF.getFileFormatVersion() == 3.62) { sVersion = "1997-2003"; bDetected = true; } return result(); } ================================================ FILE: db/CFBF/_CFBF.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "Compound File Binary Format"); function detect() { sName = CFBF.getFileFormatName(); sVersion = CFBF.getFileFormatVersion(); sOptions = CFBF.getFileFormatOptions(); bDetected = true; return result(); } ================================================ FILE: db/CFBF/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = CFBF; var X = CFBF; ================================================ FILE: db/COM/32-bit_crypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "32-bit crypt"); function detect() { if (Binary.compare("6633c9678a81........34..2c..34..678881........6683c1..6681f9........75")) { sOptions = "by SWW //DiGiTAl FaCToRY"; bDetected = true; } return result(); } ================================================ FILE: db/COM/COM_Sccrambler.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "COM Sccrambler"); function detect() { if (Binary.compare("e9$$$$fcbe....8bfeb9....515657b4..04..ac90902ac432c4aae2..5f5e5903f183ee..a5a4b8....5083eb..33c9")) { sVersion = "0.1"; sOptions = "1995 by Moshe"; bDetected = true; } return result(); } ================================================ FILE: db/COM/Character_Intro_Engine.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "Character Intro Engine"); function detect() { if (Binary.compare("e9$$$$2e8b26....81c4....2ea1....2ea3....0e588ec08ed88bdc83c3..b1..d3eb43b4..cd21fc")) { sOptions = "by //UCF"; bDetected = true; } else if (Binary.compare("e9$$$$2e8b26....81c4....0e588ec08ed88bdc83c3..b1..d3eb43b4..cd21fc")) { sOptions = "by //UCF"; bDetected = true; } return result(); } ================================================ FILE: db/COM/Crypt_(CyPoxl).2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Crypt by CyPoxl"); function detect() { if (Binary.compare("e9$$$$e8$$$$8bfc368b2d8bcd81ed....c3")) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db/COM/Crypt_(Dismember).2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Crypt by Dismember"); function detect() { if (Binary.compare("0E179C58F6C4..74..EB..90B4..BE....BF....B9....68....68....68....57F3A4C3")) { sVersion = "1.7"; bDetected = true; } else if (Binary.compare("e9$$$$bf....8bf7acad918ae157ac32c4f6d0d0c412e1aae2")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/COM/Deep_Crypter.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Deep Crypter"); function detect() { if (Binary.compare("90e9$$$$e80000598be981ed....81e9....be....8dbe....668b056689048dbe....8bd78bdf83c3..8a043205f6d0")) { sVersion = "0.1b"; sOptions = "by PLasMoiD"; bDetected = true; } return result(); } ================================================ FILE: db/COM/Dn.COM_Cruncher.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Dn.COM Cruncher"); function detect() { if (Binary.compare("33dbb5..8bf98be9be....57f3a4bf....c3")) { sVersion = "1.2"; bDetected = true; } return result(); } ================================================ FILE: db/COM/Inbuild_Encryption.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Inbuild Encryption"); function detect() { if (Binary.compare("b9....bb....2ed2072e281f43e2")) { sVersion = "1.0"; sOptions = "by Christoph Gabler"; bDetected = true; } return result(); } ================================================ FILE: db/COM/LHarc_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "LHarc SFX"); function detect() { if (Binary.compare("eb$$fcbc....bb....e8....8cc82e0306....8ed88ec005....2e3b06....76..bb....e9....bf....33d28bc2b9....d1e873..35....e2..abfec275..be....bf....b8....ba....2e3a24")) { sVersion = "1.13S, 1.13L"; bDetected = true; } else if (Binary.compare("e9$$$$fcbc....bb....e8....8cc805....8ec0b8....cd21be....268816....26c706........ace8....74..263a06")) { sVersion = "1.14c"; bDetected = true; } else if (Binary.compare("e9$$$$fcbc....e8....9090908cc805....8ec0b8....cd21be....268816....26c706........ace8....74..263a06")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/Maveriks_C0der.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Mavericks C0der"); function detect() { if (Binary.compare("e9$$$$2e8b0e....49bb....fcbe....8a26....ac32c488074388c4e2..b9....ffe1")) { sVersion = "1.XX"; bDetected = true; } else if (Binary.compare("e9$$$$2e8b3e....81c7....2e8b058ac82ea3....2e8a45..2ea2....be....462e8a0432c12e88048ac83bf775..e9")) { sVersion = "1.00a"; bDetected = true; } return result(); } ================================================ FILE: db/COM/Microsoft_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Microsoft C"); function detect() { if (Binary.compare("fab8....05....b1..d3e88ccb03c38ed88cd0a3....8bc4a3....8cd88ed0bb....8be3fb891e....b8....a3....0633c0")) { sVersion = "1.04"; bDetected = true; } return result(); } ================================================ FILE: db/COM/Microsoft_RTL.3.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("library", "Microsoft RTL"); function detect() { if (Binary.compare("b430cd213c..73..c38cdf8b36....2e893e....2bf781fe....72..be....b8....05....73..e8....33c050e8....b8ff4ccd218be0")) { sVersion = "1990"; bDetected = true; } else if (Binary.compare("b430cd213c..73..c38cdf8b36....2e893e....2bf781fe....72..be....bb....81c3....73..e8....33c050e8....b8....cd21")) { sVersion = "1992"; bDetected = true; } return result(); } ================================================ FILE: db/COM/MrHDKiller_Protection.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Mr.HDKiLLeR PriotectioN"); function detect() { if (Binary.compare("e9$$$$4851442ea1....2d....8bd805....8bf0bf....b9....90f3a48bcb")) { sVersion = "1.1p"; sOptions = "//eMX!"; bDetected = true; } return result(); } ================================================ FILE: db/COM/PC_FORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "PC/FORTH"); function detect() { if (Binary.compare("90e9$$$$29c08ed8bb....8a072ea2....80c8..80e0..8807a1....2ea3....a1....2ea3....a1....2ea3....a1....2ea3....8cc88ed08ec08ed8a3....8b26")) { sOptions = "1983 by Laboratory Microsystems Inc."; bDetected = true; } return result(); } ================================================ FILE: db/COM/RDT_ENC_3.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "RDT_ENC 3"); function detect() { if (COM.compare("e9$$$$be....8bfe8bce33c08ed8c706........c606......26acba....52fe0e....74..e8....d0c8fec83206....c3")) { sOptions = "by mr. Wicked"; bDetected = true; } return result(); } ================================================ FILE: db/COM/RTD_Compressor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "RTD_compressor"); function detect() { if (Binary.compare("bf....be....b5..57f3a5c3")) { sOptions = "by Mr.Wicked"; bDetected = true; } return result(); } ================================================ FILE: db/COM/RTD_Compressor2.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "RTD_Compressor 2"); function detect() { if (Binary.compare("fcbf....be....b5..57f3a5c3")) { sOptions = "1997 by mr. Wicked"; bDetected = true; } return result(); } ================================================ FILE: db/COM/SHOW_IT.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "SHOW IT"); function detect() { if (Binary.compare("bf....32db2e8a150ad274..b4..cd214780fa..75..fec380fb..75..32db53b4..cd16b4..cd165b75")) { sVersion = "1.2"; bDetected = true; } return result(); } ================================================ FILE: db/COM/SPHINX_C--.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "SPHINX C--"); function detect() { if (Binary.compare("58bc....50b44abb....cd2173..b409ba....cd21c38cc88ec0bf....be....31d2bb....ac3c..74")) { sVersion = "1993"; bDetected = true; } else if (Binary.compare("58bc....50b44abb....cd2173..c3")) { sVersion = "0.203 (1994)"; bDetected = true; } else if (Binary.compare("58bc....50b44abb....cd2173..b409ba....cd21c3")) { bDetected = true; } else if (Binary.compare("eb$$31c08ec026c706........268c0e....e9$$$$c8......b8....e8")) { bDetected = true; } else if (Binary.compare("e9....'SPHINXC--'")) { bDetected = true; } else if (Binary.compare("0e07bf....be....31d2bb....ac3c..74..3c..74..3c..74..aaac")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/Shade's_COM_Encryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "ShadE's COM encRYPTOR"); function detect() { if (Binary.compare("e9$$$$33c033db33c933d233edbf....be....b9....ac83c3..d3c38d9f....8dae....03dd")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/COM/Shadow_COM_encryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Shadow COM encryptor"); function detect() { if (Binary.compare("e9$$$$b9....bb....be....bf....ad33c3ab86dff7d3e2..68")) { sVersion = "1.0"; sOptions = "by Tailgunner"; bDetected = true; } return result(); } ================================================ FILE: db/COM/TPC_Scramble.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "TPC Scramble"); function detect() { if (Binary.compare("e9$$$$b0..bb....5351b9....2e3007fec043e2..bb....c707....c647....33c033db59c3")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/Text_Header.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "Text Header"); function detect() { if (Binary.compare("e9$$$$b9....be....bf....f3a468....c3")) { sVersion = "1.0"; sOptions = "from EXE2COM 9.50 by B. Vorontsov"; bDetected = true; } return result(); } ================================================ FILE: db/COM/The_DRAW.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "The DRAW"); function detect() { if (Binary.compare("eb$$b40fcd10bb....3c..74..3c..74..c606......bb....3c..74..ba....b409cd21c3")) { sVersion = "4.6"; bDetected = true; } else if (Binary.compare("eb$$b40fcd108ccb8edbbb....b4..3c..74..3c..73..bb....8a26....3c..73..8d16")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/Tiny_Xor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Tiny Xor [tDCE]"); function detect() { if (Binary.compare("e9$$$$fcb8....bb....b9....be....300402c386c486df46e2..be....c704....c644....33c033db33c9ffe6")) { sVersion = "0.52b"; sOptions = "by ThE DOCTOr //DiPG"; bDetected = true; } return result(); } ================================================ FILE: db/COM/Unknown_cryptors.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Unknown cryptor"); function detect() { if (Binary.compare("fa8cde8ccf8edf8ec783c7..bb....8b1f83c3..b1..d3eb2bfbe8")) { sVersion = "#01"; bDetected = true; } else if (Binary.compare("e9$$$$b9....b3..be....bf....acfec332c3aae2")) { sVersion = "#02"; sOptions = "exe 0-relocs crypt"; bDetected = true; } else if (Binary.compare("'GENERATED'00'FILE'bc....bf....8bf7b9....b3..ac34..d2c02ac3d2c832c3fec3aae2")) { sVersion = "#03"; sOptions = "GENERATED FILE"; bDetected = true; } else if (Binary.compare("3ec606......90eb$$2e8a36....8ec08cd8be....bf....2e033e....26a3....26893e....26a3....26c706........0e07")) { sVersion = "#04"; bDetected = true; } else if (Binary.compare("e8$$$$fc8bec8b4e..2bc08bf9f2aebb....03d9875e..fec58bf1ac8ad0ad8bc88bfeac32c2aae2")) { sVersion = "#05"; bDetected = true; } else if (Binary.compare("fc525756ba....b9....be....bf....52f3a52ec606......c3")) { sVersion = "#06"; bDetected = true; } else if (Binary.compare("b4..be....bf....b9....68....68....68....57f3a4c3")) { sVersion = "#07"; bDetected = true; } else if (Binary.compare("b8....05....50c3")) { var nOffset = Binary.readWord(1) + Binary.readWord(4) - 256; if (Binary.compare("90902ea1....8bc85005....9083e9..bf....2e8035..47495083f9..74..c3", nOffset)) { sVersion = "#08"; sOptions = "xorer"; bDetected = true; } } else if (Binary.compare("e9$$$$e8$$$$5e83ee..2e8984....06562e8c9c....0e070e1fb430cd213c..7d..bb....03dee8....b0..b44ccd21")) { sVersion = "#11"; bDetected = true; } else if (Binary.compare("e9$$$$b9....be....bf....bb....5357ad3d....74..c1c8..bb....03d933c3abe2")) { sVersion = "#15"; sOptions = "xorer"; bDetected = true; } else if (Binary.compare("e9$$$$e8$$$$5d83ed..0e1f0e07be....03f5bf....b9....f3a460be....0204463b")) { sVersion = "#16"; sOptions = "1995 by A.V.Lemenkov"; bDetected = true; } else if (Binary.compare("e9$$$$be....56b9....c704....c644....8134....4646cce2")) { sVersion = "#17"; sOptions = "xorer"; bDetected = true; } else if (Binary.compare("60bb....be....bf....8bcf03fb5781e9....f3a4c3")) { sName = "Com-crypt"; sVersion = "#18"; bDetected = true; } else if (Binary.compare("e9$$$$8b1e....81eb....b8....5053b430cd215beb")) { sVersion = "#19"; sOptions = "by WICKED!"; bDetected = true; } else if (Binary.compare("e9$$$$bf....8bf43bf776..8be7e8$$$$5f53518bdf43b9....2bcb300f43e2")) { sVersion = "#20"; sOptions = "(xorer) 1988 by Executive Systems, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/COM/VGA_font_loader.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "VGA font loader"); function detect() { if (Binary.compare("e9$$$$b8....8ed8fafcbf....8b36....8e1e....b9....f3a5b8....8ed8c706........8c0e....8cc88ed8")) { sOptions = "by Pete I. Kvitek"; bDetected = true; } return result(); } ================================================ FILE: db/COM/VSF&K_protection.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "VSF&K protection"); function detect() { if (Binary.compare("e9$$$$eb$$8cdb8cca8edafa8becbe....bc....bf....313c312446474c75")) { sOptions = "1992"; bDetected = true; } return result(); } ================================================ FILE: db/COM/WSP_self_update.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "WSP self update"); function detect() { if (Binary.compare("bb....b4..ba....cd212e891e....b4..bb....cd2173..ba....e9")) { sVersion = "1.50"; bDetected = true; } return result(); } ================================================ FILE: db/COM/WiZ_Cryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "WiZ Cryptor"); function detect() { if (Binary.compare("e9$$$$fa60561e8ed8be....bf....b8....8706....ab8cc88706....ab1f68....9c5880cc..509dfc")) { sVersion = "1.00a"; sOptions = "by SP0T //UCL"; bDetected = true; } return result(); } ================================================ FILE: db/COM/_COM.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "MS-DOS"); function detect() { if (COM.isVerbose()) { sName = COM.getOperationSystemName(); sVersion = COM.getOperationSystemVersion(); sOptions = COM.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/COM/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = COM; var X = COM; ================================================ FILE: db/COM/compiler_8086_Forth_83.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "8086 Forth 83"); function detect() { if (Binary.compare("e9$$$$8cc88ed88ed08ec0a1....b0..a3....2d....a3....2d....8be8bb....031e....892f2d....a3....bb....031e....89078be0be....e9")) { sVersion = "2.1.0"; sOptions = "1985"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_ASIC-Basic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "ASIC-Basic"); function detect() { if (Binary.compare("e9$$$$33dbb4..cd108916....cc90b0..ba....33c9b7..b4..cd1031d28916....b4..30ffcd1090")) { sVersion = "5.0"; sOptions = "1994 by David Visti of 80/20 Software"; bDetected = true; } else if (Binary.compare("e9$$$$33dbb4..cd108916....cc90b0..a2....ba....a0....3c..75..b4..b0..cd2172..a3")) { sOptions = "by David Visti of 80/20 Software"; bDetected = true; } else if (Binary.compare("e9$$$$33dbb4..cd108916....cc90fcb9....be....bf....f3a490fcb9....be....bf....f3a4")) { sVersion = "3.0"; sOptions = "by David Visti of 80/20 Software"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_BAT2EXEC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "BAT2EXEC"); function detect() { if (COM.compare("eb$$fcbd....8b....8b......8b......b44acd21a1....8986")) { sOptions = "by Douglas Boling"; sVersion = "1.5"; bDetected = true; } else if (COM.compare("fcbd....8b....8b......8b......b44acd21a1....8986")) { sOptions = "by Douglas Boling"; sVersion = "1.2"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_BatLite.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "BatLite"); function detect() { if (Binary.compare("eb$$e8....bb....8bf3031e....891e....81fb....73..bb....8bfb891e....031e....81c3....8be3b1..d3eb43")) { sOptions = "1991-95 by Pieter A. Hintjens"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_Borland_C++.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Borland C++"); function detect() { if (Binary.compare("8cca2e8916....b430cd218b2e....8b1e....8edaa3....8c06....891e....892e....e8....a1....8ec033c08bd88bf8b9....fcf2aee3")) { sOptions = "1991"; bDetected = true; } else if (Binary.compare("8cca2e8916....b430cd218b2e....1e2c..daa3....8c06....891e....892e....e8....a1....8ec033c08bd88bf8b9....fcf2aee3")) { sOptions = "1991"; bDetected = true; } sLang = "C++"; return result(); } ================================================ FILE: db/COM/compiler_Datalight_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Datalight/Northwest C"); function detect() { if (Binary.compare("eb$$fab8....b9....d3e88cc903c18ed88c06....8bd82b1e....891e....268b1e....2bd881fb....72..bb....8bd003d342b1..d3e38ed08be381eb....81fb....77")) { sVersion = "3.10 S"; sOptions = "by Walter Bright"; bDetected = 1; } sLang = "C"; return result(); } ================================================ FILE: db/COM/compiler_Easy!-C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Easy!-C"); function detect() { if (Binary.compare("9c55568ccd83c5..8db6....56be....56cb")) { sOptions = "1993 by Flight Technologys"; //spelling taken from file bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_Fig-FORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Fig-FORTH"); function detect() { if (Binary.compare("90e9$$$$be....8cc88ed88b26....8ed08ec0fc8b2e....e8$$$$b0..ba....b4..cd21c3")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_ForthCMP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "ForthCMP"); function detect() { if (Binary.compare("90e9$$$$8cc88ed08ec08ed8bc....b430cd2180f8..73..ba....b409cd2131c0cd218cc881c0....8b1e....81eb....39d8")) { sOptions = "1995 by Thomas Almy"; bDetected = true; } if (Binary.compare("e9$$$$bc....c706........bd....892e....fce8....b8....cd21")) { sVersion = "2.1"; sOptions = "by Thomas Almy"; bDetected = true; } if (Binary.compare("e9$$$$bc....c706........bd....892e....b4..bb....cd21fce8")) { sVersion = "2.1"; sOptions = "by Thomas Almy"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_ForthCMP.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "ForthCMP"); function detect() { if (Binary.compare("90e9$$$$8cc88ed08ec08ed8bc....b430cd2180f8..73..ba....b409cd2131c0cd218cc881c0....8b1e....81eb....39d8")) { sOptions = "1995 by Thomas Almy"; bDetected = true; } if (Binary.compare("e9$$$$bc....c706........bd....892e....fce8....b8....cd21")) { sVersion = "2.1"; sOptions = "by Thomas Almy"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_GP-FORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "GP-FORTH"); function detect() { if (Binary.compare("e9$$$$8cc88ed8a1....a3....a1....a3....e8$$$$a1....3d....74..0306....72..a3....b1..d3e8408ccb8ec35003d8")) { sVersion = "93.9-94.7"; sOptions = "1990-94 by Golden Porcupine Software"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_Lattice_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Lattice C"); function detect() { if (Binary.compare("fab8....05....b1..d3e88ccb03c38ed88ed0")) { if (Binary.compare("a3....bc....fbfc8cd88cc92bc1b1..d3c0a3....8126", 19)) { sVersion = "3.0"; } else if (Binary.compare("bc....fb8cd88cc92bc1b1..d3c0a3....8126", 19)) { sVersion = "3.0"; } else if (Binary.compare("bc....fbb430cd210ac075", 19)) { sVersion = "2.1"; } else if (Binary.compare("268b1e....2bd8f7c3....75..b1..d3e3eb..bb", 19)) { sVersion = "1.01"; } else if (Binary.compare("bb....2bd8f7c3....75..b1..d3e3eb..bb", 19)) { sVersion = "1.0"; } bDetected = true; } else if (Binary.compare("eb$$fab8....05....b1..d3e88ccb03c32ea3....8ed88ed0bc....fbb430cd21")) { sVersion = "2.1"; bDetected = true; } else if (Binary.compare("b8....05....b1..d3e88ccb03c38ed88ed0268b1e....2bd8f7c3....75..b1..d3e3eb")) { sVersion = "1.01"; bDetected = true; } else if (Binary.compare("e9$$$$e8....8cc88ec0eb$$fab8....05....b1..d3e88ccb03c38ed88ed0bc....fbb430cd21")) { sVersion = "2.1"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_MICRO-C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "MICRO-C"); function detect() { if (Binary.compare("bb....b44acd21bc....be....bf....bb....b9....8a043c..74..3c..75..46eb")) { sOptions = "by Dave Dunfield"; bDetected = true; } else if (Binary.compare("bb....b44acd2133c08be0bf....b9....2bcff3aabe....bf....bb....b9....8a043c..74..46")) { sOptions = "by Dave Dunfield"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_MINIFORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "MINIFORTH"); function detect() { if (Binary.compare("e9$$$$fc33c08bd8a3....89c52d....a3....89c4b8....a3....891e....be....adffe0")) { sVersion = "1.0"; sOptions = "1988 by Ted Beach"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_MoonRock.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "MoonRock"); function detect() { if (Binary.compare("bc....bb....b1..d3eb81c3....b4..cd2172..b8....cd212e891e....2e8c06....b8....ba....cd21")) { sVersion = "0.52.b01"; sOptions = "1994-2000 by Rowan Crowe"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_OUTFORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "OUTFORTH"); function detect() { if (Binary.compare("90e9$$$$29c08ed8bb....8a0780c8..80e0..88078cc88ed08ec08ed8a3....ba....b4..b0..cd21ba....b4..b0..cd21be....8b26....8b2e....fce9")) { sOptions = "1989 by Norman L. Hills"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_PBFC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Personal Batch File Compiler"); function detect() { if (Binary.compare("eb$$90fcbd....8b....8b......8b......b44acd21a1....8986")) { sOptions = "1993, 2003 by Kinglion Software Workroom"; sVersion = "1.6c"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_RMCOBOL.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "RM/COBOL"); function detect() { if (Binary.compare("e9$$$$e8$$$$e8$$$$5a2e8c1e....b1..bb....81c3....f6c3..74..83c3..81e3....58fa8be3fb50d3eb52062e8e06....8bd3")) { sVersion = "2.2"; sOptions = "1985 by Ryan-McFarland Corp."; bDetected = true; } sLang = "Cobol"; return result(); } ================================================ FILE: db/COM/compiler_SP-FORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "SP-FORTH"); function detect() { if (Binary.compare("8b26....8bec83ed..e9$$$$e8$$$$83ed..8976..5eadffe0")) { sVersion = "1.01"; sOptions = "1992 by Stroyprogress Ltd."; bDetected = true; } else if (Binary.compare("8b26....8bec83ed..e9$$$$e8$$$$87ec5687ec5eadffe0")) { sVersion = "1.5"; sOptions = "1993"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_Surpas-86.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Surpas-86 (Pascal compiler)"); function detect() { if (Binary.compare("e9$$$$e9$$$$b8....05....25....b1..d3e88cca03d08eda2ea1....2bc2a3....33db2d....73..8b1e....b1..d3e333c0")) { sVersion = "1.0"; sOptions = "1987 by Tixaku Pty Ltd"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_TCOM.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Forth Target COMpiler"); function detect() { if (Binary.compare("8cc805....8ed88ed0b8....8be0a3....b8....8bf0a3....c704....2d....a3....bb....8bebe8")) { sOptions = "by Tom Zimmer"; bDetected = true; } else if (Binary.compare("8cc805....8ed88ed08ec08b1e....81c3....8bf3891e....83c3..891e....c707....81c3....8be3891e....83c3..891e....c706")) { sOptions = "by Tom Zimmer"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_Turbo_C++.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Turbo C++"); function detect() { if (Binary.compare("8cca2e8916....b430cd218b2e....8b1e....8edaa3....8c06....891e....892e....e8....c43e....8bc78bd8b9....fcf2ae")) { sVersion = "1990"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_Turbo_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Turbo C"); function detect() { if (Binary.compare("8cca2e8916....8b2e....8b1e....8eda8c06....892e....e8....8cda2bea8b3e....81ff....73..bf....893e")) { sVersion = "1988"; bDetected = true; } else if (Binary.compare("8cca2e8916....b430cd218b2e....8b1e....8edaa3....8c06....891e....892e....c706")) { sVersion = Binary.compare("8e", 42) ? "1987" : "1988"; bDetected = true; } else if (Binary.compare("8cca2e8916....b430cd218b2e....8b1e....8edaa3....8c06....891e....892e....8cda")) { sOptions = "1990"; bDetected = true; } else if (Binary.compare("e9$$$$8cca2e8916....b430cd218b2e....8b1e....8edaa3....8c06....891e....892e....e8....c43e")) { sVersion = "1990"; bDetected = true; } else if (Binary.compare("fb8cca2e8916....b430cd218b2e....8b1e....8edaa3....8c06....891e....892e....c706........e8")) { sVersion = "1987"; bDetected = true; } else if (Binary.compare("8cca2e8916....e8....8cda2bea8b3e....81c7....72..b1..d3ef473bef72..833e......75..bf....3bef")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_Turbo_Pascal.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Turbo Pascal"); function detect() { if (Binary.compare("e9$$$$e8$$$$e8$$$$b430e8$$$$80fc..74..80fc..74..80fc..74..80fc..74..55")) { sVersion = "3.0"; sOptions = "1985"; bDetected = true; } else if (Binary.compare("e9$$$$e8$$$$..8cc82e03....2e03....2e03....2e3b06....76")) { sVersion = "3.0"; sOptions = "1985"; bDetected = true; } else if (Binary.compare("e9$$$$eb$$e8....b8....b1..d3e88cca03d08eda2ea1....2bc2a3")) { sVersion = "3.0"; sOptions = "1985"; bDetected = true; } else if (Binary.compare("e9$$$$e9$$$$b8....b1..d3e88cca03d08eda2ea1....2bc2a3")) { sVersion = "3.0"; sOptions = "1985"; bDetected = true; } else if (Binary.compare("e9$$$$c706............................8b0c39c174..4e4ef3a5")) { sVersion = "3.0"; sOptions = "1985"; bDetected = true; } else if (Binary.compare("e9$$$$e8$$$$1ee8$$$$5051b8....b1..d3e88cc903c18ed85958c3")) { sVersion = "3.0"; sOptions = "1985"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_UNIFORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "UNIFORTH"); function detect() { if (Binary.compare("90e9$$$$8cc88ed88ed08ec0fc8b26....8b2e....8b3e....893e....ba....b8....cd21ba....b8....cd218b1e....8d4f..894d..8b0e....8bc1")) { sOptions = "1985 by Unified Software Systems"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_Vienna-C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Vienna-C"); function detect() { if (Binary.compare("90e9$$$$8cc88ed8e8....803e......75..8a3e....883e....8b1e....891e....a3....8ec00306....8ed0a3....8b26....8b2e....be....c706")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_Watcom_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Watcom C"); function detect() { if (Binary.compare("e9$$$$fb8cc98ec126bb....83c3..80e3..26891e....268c1e....26a1....3d....73..b8....01c383c3..80e3..8ed189dc26891e....89dad1")) { sName += "/C++16"; sVersion = "1994"; bDetected = true; } else if (Binary.compare("e9$$$$fb8cc98ec1bb....83c3..80e3..26891e....268c1e....26a1....3d....73..b8....03d883c3..80e3..8ed18be326891e....8bd3d1ea")) { sName += "/C++16"; sVersion = "1993"; bDetected = true; } else if (Binary.compare("e9$$$$fb8cc9bb....8ec1268c1e....26a1....3d....73..b8....03d88ed18be326891e....83c3")) { sName += "/C++16"; sVersion = "1988"; bDetected = true; } else if (Binary.compare("e9$$$$fb8cc98ec1bb....83c3..83e3..26891e....268c1e....26a1....3d....73..b8....03d88ed18be326891e....83c3..83e3..8bd3d1ea")) { sVersion = "1991"; bDetected = true; } else if (Binary.compare("e9$$$$0e0e1f07b4..ba....cd21ba....cd21e8....803e......74..b4..ba....cd21e9")) { sName += "/C++32"; sVersion = "1995"; bDetected = true; } else if (Binary.compare("eb$$fb8cc98ec1bb....83c3..80e3..26891e....268c1e....26a1....3d....73..b8........83c3..80e3..8ed1")) { sName = "Open Watcom C/C++16"; sVersion = "2002 by Sybase, Inc."; sOptions = "type 1"; bDetected = true; } else if (Binary.compare("eb$$fb8cc98ec1bb....83c3..80e3..891e....8c1e....a1....3d....73..b8....03d883c3..80e3..8ed1")) { sName = "Open Watcom C/C++16"; sVersion = "2002 by Sybase, Inc."; sOptions = "type 2"; bDetected = true; } else if (Binary.compare("eb$$fb8cc98ec126bb....83c3..80e3..26891e....268c1e....26a1....3d....73..b8........83c3..80e3..8ed1")) { sName = "Open Watcom C/C++16"; sVersion = "2002 by Sybase, Inc."; sOptions = "type 3"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_Zbikowski_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Zbikowski C"); function detect() { if (Binary.compare("8975..8a0430e48946..408bf88a85....30e425....74..8b46..2d....eb..8b76..8a0430e42d....8346")) { sOptions = "1983 by Mark Zbikowski (Microsoft Corp.)"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_Zortech_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Zortech C"); function detect() { if (Binary.compare("eb$$fab8....05....b9....d3e88cc903c18ed88c06....268b1e....891e....8bd82b1e....891e....268b1e....2bd881fb....72")) { sVersion = "2.10"; sOptions = "1990 by Walter Bright"; bDetected = true; } else if (Binary.compare("eb$$fcbe....b9....8b3e....5703f981c7....57f3a45f81c7....ffe7")) { sVersion = "2.00"; sOptions = "1990 by Walter Bright"; bDetected = true; } else if (Binary.compare("eb$$8cc883c0..50b8....50cbfc8e06....b0..b9....33fff2aeae75..4747be....e8")) { sVersion = "2.00"; sOptions = "1990 by Walter Bright"; bDetected = true; } else if (Binary.compare("eb$$fab8....05....b9....d3e88cc903c1dbe38ed88c06....8bd82b1e....891e....268b1e....2bd8")) { sVersion = "4.00"; sOptions = "by Walter Bright"; bDetected = true; } return result(); } ================================================ FILE: db/COM/compiler_muSIMP-83.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "muSIMP-83"); function detect() { if (Binary.compare("e9$$$$8cc88ed88ed0bc....a3....ba....e8....c606......e8....803e......75..0e17bc....e8....e8....eb")) { sVersion = "4.12"; sOptions = "1985 by The SOFT WAREHOUSE"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_A3E.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "A3E (text2com)"); function detect() { if (Binary.compare("1e33c050be....81c6....b8....8ec0bf....b9....f3a5cb")) { sOptions = "1992 by JHSoft"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_AutoCracker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "AutoCracker"); function detect() { if (Binary.compare("e9$$$$e8$$$$be....e8$$$$5133c9ac3c..74..32c8d1e1b4..8ad03c..74..cd21eb")) { sVersion = "1.X"; sOptions = "1997 Dmitry Gorshkov"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_COM2TXT.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "COM2TXT"); function detect() { if (Binary.compare("'XP5~~-~}P]XP-@?->@1Fq1Fx0F6,00F7,b(F8ZRu(XP2FzE,@r42fzWBxG!='")) { sOptions = "1997 by GyikSoft"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_COMT.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "COMT"); function detect() { if (Binary.compare("'ENC.COM.B&F='")) { sVersion = "0.1d"; sOptions = "(com2text) by Alex Pruss"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_CRX2COM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "CRX2COM"); function detect() { if (Binary.compare("e9$$$$8b1e....c1....81c3....e8....b4..ba....cd21bb....e8....b4..ba....cd21b8....ba....cd2173")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_E2C.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "E2C (EXE2COM) by The DoP"); function detect() { if (Binary.compare("be....bf....b9....57f3a5c3")) { sVersion = "1.00-1.02"; bDetected = true; } else if (Binary.compare("be....bf....b9....fc57f3a5c3")) { sVersion = "1.02a"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_EXE2COM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "EXE2COM"); function detect() { if (Binary.compare("e9$$$$bf....be....a5a48cda83c2..50b9....ad970115e2")) { sVersion = "1.0"; sOptions = "by D'B"; bDetected = true; } else if (Binary.compare("e9$$$$e800005b508cc005....8b0e....03c889....8b0e")) { sVersion = "1.0"; sOptions = "by Microsoft"; bDetected = true; } else if (Binary.compare("b3..b9....33d2be....8bfeac32c3aa434932e403d0e3..eb..3b16....75..be....8bc6b1..d3e88cdb03c30344..a3....8cc805")) { sOptions = "CRC check"; bDetected = true; } else if (Binary.compare("e8$$$$bf....be....a5a48cda83c2..0116....81c2....8ed2bc....eb")) { sOptions = "by //ViP"; bDetected = true; } else if (Binary.compare("e9$$$$bf....be....a5a48cda83c2..50b4..bb....cd21580116....81c2....8ed2")) { sOptions = "0-Relocs by dR.No //ViP"; bDetected = true; } else if (Binary.compare("e9$$$$bf....be....a5a48cda83c2..0116....81c2....8ed2bc....eb..ea")) { sOptions = "0-Relocs by Sage //UCF"; bDetected = true; } else if (Binary.compare("e9$$$$e800005b81eb....8db7....bf....b9....f3a58db7....538ccf83c7..ad")) { sVersion = "2.0"; sOptions = "by Paul Shpilsher"; bDetected = true; } else if (Binary.compare("e9$$$$8cca81c2....3b16....76..ba....b409cd21cd20")) { sOptions = "generic, type 1"; bDetected = true; } else if (Binary.compare("be....8b043d....74..ba....b409cd21cd208bc6b1..d3e88cdb03c303....a3....8cc805....a3....8b44")) { sOptions = "by RaskY"; bDetected = true; } else if (Binary.compare("bf....be....b9....fcf3a4068ccb83c3..011e....011e....b9....8b54..03d381c2....8ec28b3c")) { sVersion = "1.0"; sOptions = "by Milkov"; bDetected = true; } else if (Binary.compare("bf....be....b9....fcf3a48ccb011e....011e....eb00bf....be....b9....bb....bd....fa")) { sVersion = "1.0"; sOptions = "by Milkov"; bDetected = true; } else if (Binary.compare("eb$$be....8bc6b1..d3e88cdb03c30344..89048cc805....8be88b44..b1..d3e803c50344..bb....8b1f")) { sOptions = "by JauMing Tseng"; bDetected = true; } else if (Binary.compare("e8$$$$bf....be....a5a48cda83c2..50b4..bb....cd21b9....ad970115e2")) { sVersion = "1.0d"; sOptions = "1994 by D'B"; bDetected = true; } else if (Binary.compare("e9$$$$92be....bf....fca5a48ccb83c3..b9....ad97011de2")) { sOptions = "1996 by EM-Phaser"; bDetected = true; } else if (Binary.compare("b430cd213c..73..33c00650cb")) { sOptions = "by JVP"; bDetected = true; } else if (Binary.compare("bf....be....b9....f3a48cd805....0344..8ccb9305....8be60364..8b4c..e3..5f5a")) { sName = "CC"; sVersion = "2.61 beta"; sOptions = "EXE2COM"; bDetected = true; } else if (Binary.compare("e8$$$$bf....be....a5a48cda83c2..50b4..bb....cd21580116....81c2....8ed2bc....eb")) { sOptions = "by unknown"; bDetected = true; } else if (Binary.compare("e9$$$$e9$$$$8cca81c2....3b16....76..ba....b409cd21cd20")) { sOptions = "generic, type 2"; bDetected = true; } else if (Binary.compare("be....8b043d4d5a74$$8bc6b1..d3e88cdb03c30344..a3....8cc8")) { sOptions = "by BuZZ Soft"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_EXETools_EXE2COM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "EXETools EXE2COM"); function detect() { if (Binary.compare("e9$$$$e800005d8bcd83ed..bf....be....2bcff3a4b9....be....03f5e3..8cdb035e..ad8bf8011de2")) { sVersion = "2.0, 2.1"; bDetected = true; } else if (Binary.compare("68....68....68....68....68....68....5fbe....b9....f3a4c3")) { sOptions = "com header from EXETools 2.1"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_FIXCRK.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "FIXCRK"); function detect() { if (Binary.compare("'ROMANOID'32e4b0..cd104c5abf....c606......bd....e8....c606......bf....bd....e8....bd....c606......bf")) { sOptions = "by romanoid"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_FromBAT.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "FromBAT"); function detect() { if (Binary.compare("e9$$$$be....bf....bb....c604..b9....fe04803c..77..c644....b80629cd21be....3c..74..8a04880743e2")) { sOptions = "1991 by Clockwork Software"; bDetected = true; } if (Binary.compare("e9$$$$fcbe....bf....bb....c604..b9....fe04803c..77..c644....b80629cd21be....3c..74..8a04880743e2")) { sName = "BatchMaster"; sOptions = "1993 by Clockwork Software"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_MAKEBOO.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "MAKEBOO"); function detect() { if (Binary.compare("'XPHPD[0GG0G,0G51G31GB'27'(G+(G:u'27'0g?(G>(GE1G@arwIV_F*=US@<1|_,5wXNg-7muTu(4'")) { sOptions = "executable2text"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_NetCode.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "NetCode"); function detect() { if (Binary.compare("'T_OOWW3=XXWX5 2PY5w3P_-l.P-KD1Ep-OLPZ-pJP-pw40PQX5fsPu'")) { sVersion = "1.11"; sOptions = "by JauMing Tseng //Nide"; bDetected = true; } else if (Binary.compare("':?7%00%CCPY-@=PZ5+")) { sVersion = "1.40"; sOptions = "by JauMing Tseng //Nide"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_NetRun.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "NetRun"); function detect() { if (Binary.compare("'XPPPYZIQD[L-f6-g41GDSXu'17'@,~P^P_O,!(GU(GZ(Gnu5'")) { sVersion = "3.10"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_TurboBAT.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "TurboBAT"); function detect() { if (Binary.compare("ba....b4..909006b8....8ec0b9....268a26....80e4..26a0....24..3ac4")) { sVersion = "3.10"; bDetected = true; } else if (Binary.compare("e9$$$$fcbd....8b6e..8b66..8b5e..b4..cd21a1....8946..b8....50c646....8b5e..ffe3")) { bDetected = true; } else if (Binary.compare("9090909090909006b8....8ec0b9....268a26....80e4..26a0....24..3ac474..26a0....24")) { sOptions = "unregistered"; bDetected = true; } else if (Binary.compare("ba....b4..cd2106b8....8ec0b9....268a26....80e4..26a0....24..3ac474..26a0....24")) { sVersion = "3.16-9u"; bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_Vacsina.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "Vacsina EXE2COM"); function detect() { if (Binary.compare("e9$$$$e8....5b508cc005....8b0e....894f..8b0e....03c8894f..8b0e....894f..8b0e....03c8894f..8b3e....8b16")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/converter_XCK2COM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "XCK2COM"); function detect() { if (Binary.compare("e9$$$$be....e8....ad89c15156e8....be....e8")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/cryptor_Anti-Lamer_Cryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Anti-Lamer Cryptor"); function detect() { if (Binary.compare("e9$$$$fa8cd3ba....8ed233d28ed38bdafb33c08ec026f716....eb")) { sVersion = "1.0"; sOptions = "1999 by Ozzman //iHC"; bDetected = true; } return result(); } ================================================ FILE: db/COM/cryptor_CSCRYPT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "CSCRYPT"); function detect() { if (Binary.compare("e9$$$$e8000059eb$$cceb$$e4..bb....ba....eb$$81eb....0c..2bcb")) { sVersion = "3.30"; sOptions = "by Christian Schwarz"; bDetected = true; } return result(); } ================================================ FILE: db/COM/cryptor_EXINCT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "EXINCT"); function detect() { if (Binary.compare("e8$$$$ba....b8....cd218bd8b8....33c933d2cd2191b4..cd218bdc8b072d....89078bf05603f183ee..8904")) { sOptions = "by Razor 1911"; bDetected = true; } return result(); } ================================================ FILE: db/COM/cryptor_J0B_cryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "J0B cryptor"); function detect() { if (Binary.compare("e9$$$$fabe....8d0e....2bcee8$$$$5051ba....8bda301cac32c35183c4..b9")) { sOptions = "1996"; bDetected = true; } else if (Binary.compare("e9$$$$be....e8$$$$5052ac8a26....28e00ac0")) { sOptions = "1996"; bDetected = true; } return result(); } ================================================ FILE: db/COM/cryptor_PU-Cryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "PU-Cryptor"); function detect() { if (Binary.compare("e9$$$$fce8$$$$068cc8a3....b0..bf....b9....263005fec047e2")) { sOptions = "1994"; bDetected = true; } else if (Binary.compare("e9$$$$fcb0..bf....b9....300547e2")) { sOptions = "1992"; bDetected = true; } else if (Binary.compare("e9$$$$fcb0..bf....b9....263005fec047e2")) { sOptions = "1994"; bDetected = true; } else if (Binary.compare("e9$$$$fcbc....e8$$$$068cc8a3....b0..bf....b9....263005fec047e2")) { sOptions = "1994"; bDetected = true; } else if (Binary.compare("e9$$$$bc....fce8$$$$068cc8a3....b0..bf....b9....263005fec047e2")) { sOptions = "1994"; bDetected = true; } return result(); } ================================================ FILE: db/COM/cryptor_Phrozen_Crew_cryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Phrozen Crew cryptor"); function detect() { if (Binary.compare("e9$$$$eb$$be....8b3c83ef..578bf781c6....83c6..bf....a5a55f83ef..5733f6bd....33c9300a414f8bf175..5f83ff..74")) { sOptions = "1998"; bDetected = true; } return result(); } ================================================ FILE: db/COM/cryptor_SDW.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Shadow Com Cryptor (SDW)"); function detect() { if (Binary.compare("e9$$$$545b3bdc75..eb$$9c5b81cb....539d9c5825....75..e8")) { sVersion = "1.7X"; sOptions = "by MANtiC0RE"; bDetected = true; } else if (Binary.compare("e9$$$$545b3bdc75..eb$$9c5b81cb....539d9c5825....74..50584c4c5b33c3")) { sVersion = "1.78"; sOptions = "by MANtiC0RE"; bDetected = true; } else if (Binary.compare("e9$$$$ac2d....04..89c5e8....f514..f9362633f6")) { sVersion = "1.79"; sOptions = "by MANtiC0RE"; bDetected = true; } else if (Binary.compare("e9$$$$e9$$$$e4..e8....e4..e9$$$$26fb78")) { sVersion = "1.7"; sOptions = "by MANtiC0RE"; bDetected = true; } else if (Binary.compare("b8....bd....2e8a76..80f6..80ee..2e8876..83c5..4874..eb")) { sVersion = "1.80"; sOptions = "by MANtiC0RE"; bDetected = true; } else if (Binary.compare("be....31d281c2....2e8034..83ee..83c2..74..31c005....50c3")) { sVersion = "1.80"; sOptions = "by MANtiC0RE"; bDetected = true; } return result(); } ================================================ FILE: db/COM/cryptor_Sydex.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Sydex cryptor"); function detect() { if (Binary.compare("eb$$ba....b8....bb....33ed8bf8434f505952494748542053..4445582c..414c4c")) { sOptions = "1987 by Sydex and C.P.Guzis"; bDetected = true; } else if (Binary.compare("e9$$$$ba....b8....bb....33ed8bf8434f505952494748542053..4445582c..414c4c")) { sOptions = "1987 by Sydex and C.P.Guzis"; bDetected = true; } else if (Binary.compare("e9$$$$33c09e8bd88bc88bd08be88bf08bf88cc88ed88ec08ed08d26....8d36")) { sOptions = "1986,1987 by Sydex and C.P.Guzis"; bDetected = true; } return result(); } ================================================ FILE: db/COM/cryptor_UComCry.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "UComCry"); function detect() { if (Binary.compare("e9$$$$6006fae4640c40e664b8....8ec026c706")) { sOptions = "by UniquE"; bDetected = true; } return result(); } ================================================ FILE: db/COM/cryptor_USCC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Shitty COM Cryptor"); function detect() { if (Binary.compare("e9$$$$60bb....b9....300f43e2")) { sVersion = "1.4"; sOptions = "by UniquE"; bDetected = true; } return result(); } ================================================ FILE: db/COM/cryptor_cryptors.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Cryptor"); function detect() { if (Binary.compare("e9$$$$60c704....c644....b9....bf....ac32018bd64a")) { sVersion = "0.04"; sOptions = "by SkullC0DEr"; bDetected = true; } else if (Binary.compare("e9$$$$60c704....c644....e8$$$$5f83c7..33dbb9....8a043201")) { sName = "crypt 95-97"; sOptions = "type 2 by SkullC0DEr"; bDetected = true; } else if (Binary.compare("e800005dbf....e8$$$$fa065733ff57078d76..b9....8004..46e2")) { sOptions = "by Synopsis"; bDetected = true; } else if (Binary.compare("eb$$fdbf....ba....33c01e8ed8a3....1fb1..525e3bfa74..ac3205aae2..eb")) { sOptions = "by Min-Jei-Chen"; bDetected = true; } else if (Binary.compare("e8$$$$eb$$8cca8eda8ec2be....bf....b9....eb$$ad2ea3....2e3136....8bc18bdef7e3eb$$2e3106....2e3116....2ea1....abe2")) { sOptions = "by PHOENiX"; bDetected = true; } else if (Binary.compare("5053515756b8....508bf0b9....b0..8bfe0004f71404..46e2")) { sOptions = "by FalCoN'AleX"; bDetected = true; } else if (Binary.compare("40429c58f6c4..74..eb....b4..be....bf....b9....68....68....68....57f3a4c3")) { sOptions = "by Terrible BloodSucker //FDs Group"; bDetected = true; } else if (Binary.compare("e9$$$$e80000fa9cfc505393584c4c3bc35b74..9de8....32e480c4..3065..47e2")) { sName += ' N1'; sOptions = "by ZeroCoder //XG"; bDetected = true; } else if (Binary.compare("be....b9....ac03d8e2..81fb....74..cd19be....8bfeb9....8a26....ac32c1aae2")) { sOptions = "by Kai"; bDetected = true; } else if (Binary.compare("eb$$c606......f873..e9$$$$be....bf....0633c08ec0bb....fa268b07268917a3")) { sName += ' N2'; sOptions = "by ZeroCoder //XG"; bDetected = true; } else if (Binary.compare("e9$$$$e800002e9c589e72..fa9cfc505393584c4c3bc35b74..9de8....32e480c4")) { sOptions = "by Digital Information Pirates Group (DiPG)"; bDetected = true; } else if (Binary.compare("'PHROZEN'fa'CREW'0d....fbfdbe....ac300481fe....77..94")) { sOptions = "by Phrozen Crew"; bDetected = true; } else if (Binary.compare("0e1fb9....be....80....301c46e2..eb")) { sOptions = "by Dwolf //ROK"; bDetected = true; } else if (Binary.compare("2e8036....28eb00c3")) { sName += " #2"; sOptions = "by Misha"; bDetected = true; } else if (Binary.compare("be....e8$$$$5d8bce8d72..bf....fd5747acaa86c4ac32c4aae2..8d75..fcf98d7e..c3")) { sOptions = "by TGT"; bDetected = true; } else if (Binary.compare("e9$$$$33dbb9....d1e941b8....8b97....33c28987....924343e2..68....c3")) { sOptions = "by hijaq"; bDetected = true; } else if (Binary.compare("e9$$$$0e179c58f6c4..75..b9....b8....2bc8bf....be....8a0551b9....8ae0862432c44ee2..88054759e2..e9")) { sOptions = "1996 by WildRover"; bDetected = true; } else if (Binary.compare("668d3e....66b9........678137....6683c7..e2..e9")) { sOptions = "by PCY group"; bDetected = true; } else if (Binary.compare("e9$$$$66b8........66a3....be....8bfeb9....fcad35....f7d0abe2..68....c3")) { sOptions = "by Evil Genius //rPG"; bDetected = true; } else if (Binary.compare("e9$$$$9cfafc1e06bb....b44acd21b448bb....cd218ec0be....b9....51bf....57f3a5061fb9....5e8bfe")) { sOptions = "by AliS S0fT //VCrT"; bDetected = true; } else if (Binary.compare("eb$$e8$$$$eb$$e4210c..e62133c08ed80e50558becc746......5dfa8f06....8f06....fb9c580d....509d")) { sVersion = "#2"; sOptions = "by RAZOR 1911"; bDetected = true; } else if (Binary.compare("'SNOWPANTHER'e9$$$$................8db7....bf....b9....f3a58db7....538ccf83c7..ad09c074..91ad")) { sName += " #1"; sOptions = "by Snow Panther //DTG"; bDetected = true; } else if (Binary.compare("fcbe....bf....b9....90ba....c606......90ac0fb61e....03da8a2732c4aafe06....803e......75..c606")) { sOptions = "by pASkuda"; bDetected = true; } else if (Binary.compare("e9$$$$50538bdc8cd0bc....8ed49090909090909090909090909090909033e48ed4bc....909090909090909090909090909090908ed08be35b58c606")) { sOptions = "by Crack Soft"; bDetected = true; } else if (Binary.compare("e9$$$$16179c58f6c4..74..faeb..e8$$$$58")) { sVersion = "1.0"; sOptions = "1999 by Alex"; bDetected = true; } else if (Binary.compare("e8$$$$33ed83ed..2ed0....5e0e8bfe81e7....f7df03fe2e893526a1....8ec0263b06....74..f92eff35")) { sOptions = "by DREAMMASTER"; bDetected = true; } else if (Binary.compare("b8....ffe0")) { var nOffset = Binary.readWord(1) - 256; if (Binary.compare("be....8be88bd88bf883c5..908bd04a5287d687fe5981e9....52", nOffset)) { sOptions = "by BlackLight, MANtiCORE"; bDetected = true; } } else if (Binary.compare("'FALCON//TULACREW'0d....e9$$$$be....b9....33c0f7d03004eb..04..32e046e2")) { sOptions = "by FALCON //UCL"; bDetected = true; } else if (Binary.compare("bb....b9....be....301c02df86df46e2")) { sName += " #1"; sOptions = "by dR.No"; bDetected = true; } else if (Binary.compare("be....b9....b8....bb....33c34086c44b86fb93300446e2")) { sName += " #2"; sOptions = "by dR.No"; bDetected = true; } else if (Binary.compare("a3....eb$$5351525756b9....fa8bdc8cd2bc....03e1d1e94c4c5886e9d3c033c186e9f7d050e2")) { sOptions = "by venus soft."; bDetected = true; } else if (Binary.compare("e9$$$$3aac....3a29fc1aa8....80cd..1e0e0e1f0726fe06....ba....be....81f6....80f9")) { sName += " #1"; sOptions = "by LiGHt DRUiD //SOS"; bDetected = true; } else if (Binary.compare("e9$$$$fd1e0e81de....89f63bf23aaf....03f423f61bf40a2d80f9..18dd0e071f03f433f081e6")) { sName += " #2"; sOptions = "by LiGHt DRUiD //SOS"; bDetected = true; } else if (Binary.compare("fcbe....8bfeac3206....8006......84c0aa75..be....e8")) { sOptions = "by Sludge Vohaul //DAT"; bDetected = true; } else if (Binary.compare("'[HPA]'b5..8bf98be9be....57f3a4c3")) { sOptions = "by Hungarian Pirates Alliance [HPA]"; bDetected = true; } else if (Binary.compare("bc....bb....b4..cd21bb....b9....8037..43e2..b409ba....cd21b8....cd21891e")) { sOptions = "by .EXEcutor //SOS"; bDetected = true; } else if (Binary.compare("e9$$$$e800005b8bcc8cd2fa33c08ec08ed0bc....588947..90588947..900e8bc305....508ed28be1fb")) { sOptions = "1998 by Demon Magister Protection"; bDetected = true; } else if (Binary.compare("eb$$2ea3....8cc82e0306....502eff36....cb")) { sOptions = "1991 by YMI"; bDetected = true; } else if (Binary.compare("53515256570633c08ec0fa26a1....268b16....fb075052b8....06508cca33c08ec058fa26a3....268916....fb07")) { sOptions = "1991 by Elisoft"; bDetected = true; } else if (Binary.compare("b8....5650c3")) { var nOffset = Binary.readWord(1) - 256; if (Binary.compare("bf....8bdeb9....8b0533c689074747434346e2..c3", nOffset)) { sOptions = "by PC0R$AiR //UCL"; bDetected = true; } } else if (Binary.compare("908cc8515a54e9$$$$36c0e0..eb$$eb$$6a..e8$$$$58eb$$e8$$$$58eb$$e8$$$$eb$$2eeb$$eb$$665eeb$$eb$$7c")) { sName = "Rowdy's Strong Protection {MtE}"; bDetected = true; } else if (Binary.compare("0f011e....fbe9$$$$e90000c0c3..f8eb$$6a..c0e9..e800000f23dae8000059665e36e8")) { sName = "Rowdy's Strong Protection {MtE}"; bDetected = true; } else if (Binary.compare("fa499033c0fbe9$$$$e800005eeb")) { sName = "Rowdy's Strong Protection"; bDetected = true; } else if (Binary.compare("e9$$$$5060bf....c706........c605..e8....5e5681c6....b9....5756ffe7")) { sOptions = "1998 by StrangeLion"; bDetected = true; } else if (Binary.compare("e8$$$$5f87f757b9....ac34..aae2..c3")) { sName = "Wumpus soft lab cryptor"; bDetected = true; } else if (Binary.compare("e8$$$$5eb9....ac32c12e8844..e2..e9")) { sOptions = "by MXL //RIP"; bDetected = true; } else if (Binary.compare("e9$$$$8d36....fd8d0e....81e9....d1e9add1c835....8944..e2..ff26")) { sOptions = "1989 by Sydex"; bDetected = true; } else if (Binary.compare("e9$$$$bb....b4..b0..8b0e....8a1728c230e28857..43fec0e2")) { sOptions = "1999 by SLine"; bDetected = true; } else if (Binary.compare("'(C)1997'00'by'00'PSH'0d0a..005b..3139287a..2850..81c6....33db8bfeb9....ad35")) { sOptions = "1997 by PSH"; bDetected = true; } else if (Binary.compare("e9$$$$bf....be....b9....b0..2e8a1c32c132d82e881d4647e2..e9")) { sName = "SAGE-crypt"; bDetected = true; } else if (Binary.compare("e9$$$$fcb0..bf....b9....263005fec047e2..b9....be....e8")) { sName = "PU-Disk encryption"; sOptions = "1992"; bDetected = true; } else if (Binary.compare("e9$$$$bb....8a073c..74..e8$$$$50515234..3c..74..b4..8ad0cd21e9")) { sOptions = "1999 by Leon"; bDetected = true; } else if (Binary.compare("fa'SNOW'fa'PANTHER'fabc....bf....8bf7b9....b3..ac34..d2c02ac3d2c832c3fec3aae2")) { sName += " #2"; sOptions = "by Snow Panther //DTG"; bDetected = true; } else if (Binary.compare("e9$$$$c704....c644....b9....5683c6..8bfeb2..b6..ac32c202d6aae2..c3")) { sOptions = "1997 by Ment0R //UCL"; bDetected = true; } else if (Binary.compare("eb$$bb....8b0f03d981c3....8be38cc88ed88ec08ed0b8....ba....cd21b3..ccb3..cc")) { sOptions = "1993 by The Shadow Lord"; bDetected = true; } else if (Binary.compare("eb$$ccbe....bb....b2..bf....cc8b0d8bc103c7cc05....83c7..8be0cc")) { sOptions = "by The Shadow Lord"; bDetected = true; } else if (Binary.compare("eb$$bb....001f4beb$$001f4beb")) { sName = "Crypt.Trivial.173"; sOptions = "1998 by SMT"; bDetected = true; } else if (Binary.compare("'SFINKS_SOFT___'fafcb430cd21fb33c0502ec606......0783e9..3be175..26c706........b9")) { sOptions = "by SFINKS SOFT"; bDetected = true; } else if (Binary.compare("e8$$$$1e33c08ed8f716....eb$$f716....1f5ebf....57b9....ac34..aae2")) { sOptions = "by R!SC"; bDetected = true; } else if (Binary.compare("e9$$$$6033edbe....b4..bd....bf....ac32c4aa80c4..fec43bf575..33c0b9....f3ab61bf....ffe7")) { sOptions = "by DarkGrey //DSA"; bDetected = true; } else if (Binary.compare("'(C)1997'00'by'00'PSH'............................bc....6081c6....33db8bfeb9....ad35....c1c0..03d8abe2")) { sOptions = "1997 by PSH"; bDetected = true; } else if (Binary.compare("eb$$bf....33dbba....fcbe....8bcfccad")) { sName += " #3"; sOptions = "by Misha /ACE"; bDetected = true; } else if (Binary.compare("e9$$$$061e33c08ed8be....8904be....89041e071fb8....bf....268905be....b9....8a04263205")) { sOptions = "by SafeSoft"; bDetected = true; } return result(); } ================================================ FILE: db/COM/driver_DIGPAK.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("driver", "DIGPAK"); function detect() { if (Binary.compare("e9$$$$8cc88ed88ec0e8$$$$1e56be....33c08ed8c5340bf674")) { sOptions = "1992 by The Audio Solutions"; bDetected = true; } else if (Binary.compare("e9$$$$8cc88ed88ec0c706........c706........c706........b8....50e8$$$$558bec061e5657fc")) { sOptions = "1991 by The Audio Solutions"; bDetected = true; } return result(); } ================================================ FILE: db/COM/driver_MIDPAK.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("driver", "MIDPAK"); function detect() { if (Binary.compare("e9$$$$bb....d1ebd1ebd1ebd1eb43b8....cd21fa8cc88ed0bc....fb8ed88ec0c706")) { sOptions = "1992 by The Audio Solutions"; bDetected = true; } return result(); } ================================================ FILE: db/COM/immunizer_ARF_AV_Inject.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "ARF/AV Inject"); function detect() { if (Binary.compare("e9$$$$b8....50558bec83c4..061e90c746......c746......c646....c746......c746......8b5e..8dbf....b9")) { sVersion = "2.4"; sOptions = "1995 by ARF Enterprises"; bDetected = true; } return result(); } ================================================ FILE: db/COM/immunizer_CPAV.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "Central Point Anti-Virus immunizer"); function detect() { if (Binary.compare("e9$$$$e9$$$$e8$$$$5b81eb....5051525657558beb2ec686......268e06....061fb9....bf....8bc7fcf2ae26803d..75")) { sVersion = "1993"; bDetected = true; } return result(); } ================================================ FILE: db/COM/immunizer_F-XLOCK.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "F-XLOCK"); function detect() { if (Binary.compare("e8$$$$505351521e8e1e....33db8b07433d....74..75..43833f..75..4343")) { sVersion = "1.16"; bDetected = true; } return result(); } ================================================ FILE: db/COM/immunizer_IMMUN.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "IMMUN"); function detect() { if (Binary.compare("e9$$$$5053515256571e06e8....5e81ee....2e8936....8bfe81c7....2e8b1d2bfb83c7..81ef....8befb430cd21")) { sVersion = "1.2r"; sOptions = "1993 by J.Bleuel"; bDetected = true; } return result(); } ================================================ FILE: db/COM/immunizer_TAV.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "Turbo Anti-Virus"); function detect() { if (Binary.compare("e9$$$$e9$$$$e800005b81eb....5051525657558beb2ec686......268e06....061f")) { sOptions = "by CARMEL Software Engineering"; bDetected = true; } return result(); } ================================================ FILE: db/COM/immunizer_VSS.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "Viren Schutz Schild"); function detect() { if (Binary.compare("e9$$$$e8$$$$5b81eb....1e065051525354555657061e8bebb430cd2186e03d....73..e9")) { sVersion = "1993 by Ralph Roth"; bDetected = true; } return result(); } ================================================ FILE: db/COM/other_XLOADER.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "XLOADER"); function detect() { if (Binary.compare("fc8cdb33c08ec0b8....26a3....268c0e....5052faba....b0..ee42ec")) { sVersion = "2.00"; sOptions = "by CyberMan + ST!LLS0N"; bDetected = true; } return result(); } ================================================ FILE: db/COM/other_integrity_checker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "integrity checker"); function detect() { if (Binary.compare("e9$$$$505351521ea1....8ed829db43833f..75..434389dab8....cd211fb9....ba....72..89c3b4..cd21")) { sOptions = "1990-92 by D.A. Martynoff"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_4kZIP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "4kZIP"); function detect() { if (Binary.compare("fcb1..e8$$$$8736....b8....d3e0482306....66d32e....280e....77..506633c0ac8a0e....80c1..66d3e0")) { sOptions = "by pascal //Digital Nightmare"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_AVPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "AVPACK"); function detect() { if (Binary.compare("eb$$8cda0316....3916....73..b409ba....cd21c3")) { sVersion = "1.22"; sOptions = "Andrei Volkov"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_COMPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "COMPACK"); function detect() { if (Binary.compare("BE....E8....5D83C5..55505351520E070E1F8BCE8D72..BF....D1E9FD57F3A5")) { sVersion = "4.5"; bDetected = true; } else if (Binary.compare("BE....E8....5D83C5..55505351520E070E1F8D72..bf....b9....90fd57f3a58d75..fcf98bfdc3")) { sVersion = "4.5?"; bDetected = true; } else if (Binary.compare("BE....E8....5D83C5..555053510E070E1F8BCE8D72..BF....D1E9FD57F3A5")) { sVersion = "5.1"; bDetected = true; } else if (Binary.compare("BE....E8....5D83C5..550e1f0e07505351528bce8d72..bf....d1e9fd57f3a58d75..fcf98bfdc3")) { sVersion = "4.5"; bDetected = true; } else if (Binary.compare("be....0e530e520e070e1fe800005d8bce8d72..bf....d1e9fd57f3a58d75..fcf98d7e..c3")) { sVersion = "4.4"; sOptions = "1990"; bDetected = true; } else if (Binary.compare("be....505351520e070e1fe800005d8bce8d72..bf....d1e9fd57f3a58d75..fcf98d7e..c3")) { sVersion = "4.4"; sOptions = "1990"; bDetected = true; } else if (Binary.compare("BE....E8....5D83C5..558bce8d72..bf....d1e9fd57f3a58d75..fcf98bfdc3")) { sVersion = "4.5?"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_Cheat_packer.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Cheat packer"); function detect() { if (Binary.compare("eb$$b9....ba....bf....bb....b8....be....83ec..8becfc8866..32e48976..8bf703c18bf83bfe76..fd574e4f")) { sOptions = "1993 by TWIN of TRSi"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_Compressor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Compressor"); function detect() { if (Binary.compare("eb$$8cc8488ec026813e........72..05....8ec0be....ba....33ffb9....b0..f3aa")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_CyberWare_Packer.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "CyberWare Packer"); function detect() { if (Binary.compare("565056fd8bfc83ef..b9....be....fea447ffe7")) { sOptions = "1997"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_Diet.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Diet"); function detect() { if (Binary.compare("bf....3bfc72$$fdbe....b9....f3a5fc8bf7bf....adad8be8b2..e9")) { sVersion = "1.00"; sOptions = "modified"; bDetected = true; } else if (Binary.compare("bf....3bfc72$$be....b9....fdf3a5fc8bf7bf....adad8be8b2..e9")) { sVersion = "1.00, 1.00d"; bDetected = true; } else if (Binary.compare("......bf....b9....3bfc72$$fdf3a5fc8bf7bf....adad8be8b2..e9")) { sVersion = "1.02b, 1.10a"; bDetected = true; } else if (Binary.compare("......bf....b9....3bfc72$$31dbeb$$fdf3a5fc8bf7bf....adad8be8b2..e9")) { sVersion = "1.20"; bDetected = true; } else if (Binary.compare("f99ceb$$55061e575652515350e8$$$$59b1..d3e98cc803c18ed88ec0")) { sVersion = "1.44/1.45"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_EXC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "EXC"); function detect() { if (Binary.compare("e9$$$$e8$$$$5f81fc....72..8745..a3....8a45..a2....fc8db5....bd....8cca")) { sVersion = "1.0.0"; sOptions = "by Kris Heidenstrom"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_ICE.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "ICE"); function detect() { if (Binary.compare("eb$$be....8bfe8b0e....8b16....b8....50fcad33c2ab8bd0e2")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_LGLZ.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "LGLZ"); function detect() { if (Binary.compare("bf....3bfc72$$be....b9....fdf3a4fc8bf746bf....e8")) { sVersion = "1.03/04"; sOptions = "1996"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_PKLITE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "PKLITE"); function detect() { if (Binary.compare("B8....BA....3bc473..8bc42d....25....8bf8b9....be....fcf3a58bd8b1..d3eb8cd903d95333db53cb")) { sVersion = "1.12, 1.20"; bDetected = true; } else if (Binary.compare("B8....BA....3bc473..8bc42d....9025....8bf8b9....90be....fcf3a58bd8b1..d3eb8cd903d95333db53cb")) { sVersion = "1.15"; bDetected = true; } else if (Binary.compare("50B8....BA....3bc473..8bc42d....25....8bf8b9....be....fcf3a58bd8b1..d3eb8cd903d95333db53cb")) { sVersion = "1.50"; bDetected = true; } else if (Binary.compare("B8....BA....8cdb03d83b1e....73..83eb..fa8ed3bc....fb83eb..8ec353b9....33ff57be....fcf3a5cb")) { sVersion = "1.00, 1.03"; sOptions = "exe2com"; bDetected = true; } else if (Binary.compare("ba....a1....2d....8ccb81c3....3bc377..05....3bc377..b4..ba....cd21cd20")) { sVersion = "1.00c"; bDetected = true; } else if (Binary.compare("ba....b8....05....3b06....73..2d....fa8ed0fb2d....8ec050b9....33ff57be....fcf3a5cb")) { sVersion = "1.1X"; bDetected = true; } else if (Binary.compare("B8....BA....3bc473..8bc42d....25....8bf8b9....be....fcf3a58bd8b1")) { sVersion = "1.12, 1.15, 1.20"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_PRO-PACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "PRO-PACK"); function detect() { if (Binary.compare("83ec..8becbe....fce8....05....8bc8e8....8bd003c605....8bf8e8....ad88....32e489....8bf703c18bf83bfe76")) { sVersion = "2.08-2.19"; bDetected = true; } else if (Binary.compare("83ec..8becbe....fce8....05....8bc8e8....8bd003c605....8bf8e8....8946..895e..ad8866..32e48976..8bf703c18bf83bfe76")) { sVersion = "2.08-2.19"; sOptions = "-m1, locked"; bDetected = true; } else if (Binary.compare("be....fce8....05....8bc8e8....8bd003c605....8bf883c6..ad32e48bee8bf703c18bf83bfe76")) { sVersion = "2.14"; sOptions = "-m2"; bDetected = true; } else if (Binary.compare("be....fce8....05....8bc8e8....8bd003c605....8bf8e8....5350ad32e48bee8bf703c18bf83bfe76")) { sVersion = "2.08-2.19"; sOptions = "-m2"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_SCRE2B.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "SCRE2B"); function detect() { if (Binary.compare("8cda0116....ff2e....00")) { sVersion = "1.02"; sOptions = "by Graeme W. McRae"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_SCRNCH.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "SCRNCH"); function detect() { if (Binary.compare("eb$$bb....b44acd2181eb....73..ba....b9....e9")) { sVersion = "1.02"; sOptions = "1988 by Graeme W. McRae"; bDetected = true; } else if (Binary.compare("bb....b44acd2181eb....73..ba....b9....e9$$$$0e1fb440bb....cd21b8....cd21")) { sVersion = "1.00"; sOptions = "1988 by Graeme W. McRae"; bDetected = true; } else if (Binary.compare("bb....b44acd2181eb....73..ba....b9....e9$$$$b440bb....cd21b8....cd21")) { sVersion = "1.01"; sOptions = "1988 by Graeme W. McRae"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_SHRINK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "SHRINK"); function detect() { if (Binary.compare("509cfcbe....bf....57b9....f3a48b0e....be....bf....f3a4c3")) { sVersion = "1.0"; sOptions = "by Thomas G. Hanlin"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_Scramb.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Scramb"); function detect() { if (Binary.compare("e9$$$$e8$$$$5b0e1f81eb....8bc305....508bc803d12bfac3")) { sVersion = "1.20"; sOptions = "by B.U.G."; bDetected = true; } else if (Binary.compare("e9$$$$e8....5b0e1f81eb....8bc305....508bc803d12bfac3")) { sVersion = "1.20"; sOptions = "by B.U.G."; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_Six-2-Four.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Six-2-Four"); function detect() { if (Binary.compare("'[ESP]'b5..8bf98be9be....57f3a4c3")) { sVersion = "1.1"; sOptions = "Boogie //ESP"; bDetected = true; } else if (Binary.compare("'PULP'83c4..fcbf....be....b5..57f3a5c3")) { sVersion = "1.0"; sOptions = "Kimmy //Pulp"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_TPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "TPACK"); function detect() { if (Binary.compare("03'TUSCON'030d0a005868....60e9")) { sVersion = "0.5c"; sOptions = "1996 by Max //TUSCON"; bDetected = true; } else if (Binary.compare("68....fd60be....bf....b9....f3a48bf7bf....fc46e9")) { sVersion = "0.55c"; sOptions = "1996 by Max //TUSCON"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_Triplex.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Triplex"); function detect() { if (Binary.compare("bd....be....5553525a5b505351520e1f0e078bce8d72..bf....d1e9fd57f3a5")) { sOptions = "1994"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_UPX.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "UPX"); function detect() { if (Binary.compare("b9....be....bf....fdf3a4fcf7e19387f783ee..19ed57")) { sVersion = "0.50"; sOptions = "dos/com"; bDetected = true; } else if (Binary.compare("81fc....77..cd20b9....be....bf....bb....fdf3a4fc87f783ee")) { sVersion = "0.81-1.20"; sOptions = "dos/com"; bDetected = true; } else if (Binary.compare("b9....be....bf....bd....fdf3a4fcf7e19387f783c6..57e9")) { sVersion = "0.30-0.40"; sOptions = "dos/com"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_X-PACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "X-PACK"); function detect() { if (Binary.compare("bd....be....bf....b8....99fcfa33c9e9$$$$8bd9ffd5")) { sOptions = "by Jari Kytojoki"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_XE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "XE"); function detect() { if (Binary.compare("be....56bf....b9....fc56f3a55fe9")) { sVersion = "1.42"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_XPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "XPACK/LZCOM"); function detect() { if (Binary.compare("e9$$$$fa8bece8....06bf....57e8....06b8....50be....bf....cb")) { sVersion = "1.67"; bDetected = true; } else if (Binary.compare("e9$$$$fa8bece8....fb06bf....57e8....06b8....50be....bf....cb")) { sVersion = "1.67.1"; bDetected = true; } else if (Binary.compare("e9$$$$8cc805....8ec0bf....8bf7fcb9....f3a506b8....50cb")) { sVersion = "1.65"; bDetected = true; } else if (Binary.compare("e9$$$$8cc8a3....05....8ec0bf....8bf7fcb9....f3a506b8....50cb")) { sVersion = "1.4"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_aPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "aPACK"); function detect() { if (Binary.compare("be....bf....8bcffc57f3a4c3")) { sVersion = "0.98-0.99 small"; bDetected = true; } else if (Binary.compare("8cc880c4..8ec0fcb9....be....8bfe57f3a55fbe....0668....1e078ed8cb")) { sVersion = "0.82b-0.94b"; bDetected = true; } else if (Binary.compare("8cc805....8ec0598ed051be....bf....5057fcb2..bd....50a4ffd5")) { sVersion = "0.61"; bDetected = true; } else if (Binary.compare("8cc805....8ec0598ed051be....bf....5057fcb6..bd....ffd5")) { sVersion = "0.58-0.74"; bDetected = true; } else if (Binary.compare("8cc880c4..8ec0fcb9....be....8bfe57f3a55fbe....06ba....521e078ed8cb")) { sVersion = "0.82-0.94"; bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_com_RLE_packer.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "com RLE packer"); function detect() { if (Binary.compare("60be....bf....8b0e....f3a4be....bf....57b9....f3a4c3")) { sOptions = "by NOP/PC"; bDetected = true; } else if (Binary.compare("fc8cc833ff05....8ec006be....b9....57f3a40e07cb")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/packer_envelope.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "envelope"); function detect() { if (Binary.compare("60ba....3bd472$$be....8bfeb9....bb....fcad33c343abe2")) { sOptions = "by ROWDY, St.Petersburg"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_ABK-Scrambler.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ABK-Scrambler"); function detect() { if (Binary.compare("b430cd2186e03d....73..cd209c06b8....50cf")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_ACE_Scrambler.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "A.C.E. Scrambler"); function detect() { if (Binary.compare("2c..fec024..34..fec824..34..bb....0c..eb$$24..0c..81eb....f6d8eb$$2c..fec0ffe3")) { sOptions = "1996"; bDetected = true; } else if (Binary.compare("24..0c..f6d8eb$$fec8bb....04..0c..f6d804..fec0f6d881eb....24..f6d8fec034..0c..04..2c..ffe3")) { sOptions = "1996"; bDetected = true; } else if (Binary.compare("34..fec834..0c..24..04..fec0bb....0c..2c..0c..81eb....eb$$fec0f6d82c..fec0f6d80c..ffe3")) { sOptions = "1996"; bDetected = true; } else if (Binary.compare("24..fec82c..bb....fec8f6d8eb$$04..81eb....0c..fec0fec80c..34..ffe3")) { sOptions = "1996"; bDetected = true; } else if (Binary.compare("24..eb$$04..bb....f6d834..fec8fec0eb$$0c..81eb....34..24..34..eb$$ffe3")) { sOptions = "1996"; bDetected = true; } else if (Binary.compare("34..fec804..24..0c..04..bb....0c..04..f6d881eb....0c..fec8f6d824..0c..ffe3")) { sOptions = "1996"; bDetected = true; } else if (Binary.compare("f6d834..2c..bb....0c..34..fec004..34..fec004..81eb....2c..34..24..eb$$04..2c..04..ffe3")) { sOptions = "1996"; bDetected = true; } else if (Binary.compare("fec0eb$$24..34..bb....f6d834..fec024..fec0f6d834..81eb....f6d80c..eb$$04..ffe3")) { sOptions = "1996"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_AVAST-Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "AVAST-Protect"); function detect() { if (Binary.compare("eb$$8cc82e0306....502eff36....cb")) { sOptions = "1999 by P.Baudis"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_AdFlt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "AdFlt"); function detect() { if (Binary.compare("68....9c0fa00fa860fd6a..0fa1be....ad6664ff36....648b16....643106....6664ff36....648916....adff36")) { sVersion = "2.0"; sOptions = "by EliCZ"; bDetected = true; } else if (Binary.compare("9c0fa06660fd6a..0fa1be....ad6664ff36....648b16....668f06....643106....6664ff36....648916....668f06....adff36")) { sOptions = "by EliCZ"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Adys_COM-Scrambler.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Ady`s COM-Scrambler"); function detect() { if (Binary.compare("33c08ed88ec0fcfabe....8bfead2ea3....ad2ea3....b8....ab8cc8ab")) { sOptions = "1993"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Anti-hack_encryption_system.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Anti-hack encryption system"); function detect() { if (Binary.compare("eb$$bd....33c08ec026c706........268c0e....8b46..26a3....268c0e....0e07")) { sOptions = "by Rezaul Kabir //Shuvro"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_BIN-Lock.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "BIN-Lock"); function detect() { if (Binary.compare("eb$$31c08ec026c706........268c0e....26c706........268c0e....2ec706........2e8c0e....cccd01eb")) { sVersion = "1.00"; sOptions = "by Hit-BBS Programmers crew"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Best_Protection_Kit-B.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Best Protection Kit-B"); function detect() { if (Binary.compare("eb$$fc8c06....e421a2....b0..e621fb33c08ed08be0be....8d3e....b9")) { sOptions = "1993 by Eric Zmiro"; bDetected = true; } else if (Binary.compare("eb$$fc8c06....e421a2....b0..e621fbf433c08ed08be0be....8d3e....b9")) { sOptions = "1992 by Eric Zmiro"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_BinCOD.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "BinCOD"); function detect() { if (Binary.compare("e9$$$$60fa6a000726ff36....26ff36....26c706........26c706........fbb9....bf....03f9ac")) { sVersion = "1.1"; sOptions = "by SierraMan"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Budokan.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Budokan"); function detect() { if (Binary.compare("bf....b9....8bc1fd3305abe2..e9")) { sOptions = "by Electronic Arts, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_C-crypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "C-crypt"); function detect() { if (Binary.compare("e9$$$$e800005d83ed..55d9d09c5825....509d5057bf....b0..aa5f58665166b9........cc")) { sVersion = "1.02"; sOptions = "by De'FeinD //uCT"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_CC#3.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CC#3"); function detect() { if (Binary.compare("e9$$$$e800005d33db8bc3bf....893f81c3....532eff36....1f1e568d76..8bfbb9....f2a4c6")) { sOptions = "by ZeroCoder //XG"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_CC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CC"); function detect() { if (Binary.compare("b8....ba....3be073..b409ba....cd21b8....cd218bdc81eb....83e3..fcbe....8bfbb9....f3a48bc3b1..d3e88cc903c15033c050cb")) { sVersion = "1.0"; sOptions = "1991 by B.Vorontsov"; bDetected = true; } else if (Binary.compare("ba....b430cd213c..73..33c00650cbb9....b8....eb$$05....fc80c4..eb")) { sVersion = "2.61 Beta"; sOptions = "by UniHackers"; bDetected = true; } else if (Binary.compare("e9$$$$b9....be....8bfe5156b4..ac32c4c0c4..02e1aae2..bf....5e59f3a4be....56c3")) { sVersion = "1.01"; sOptions = "by B.Vorontsov"; bDetected = true; } else if (Binary.compare("bf....be....b9....fdf3a5fc8bf7bf....adad8be8b2..e9")) { sVersion = "1998"; sOptions = "by B.Vorontsov"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_CC286.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CC286x2"); function detect() { if (Binary.compare("e9$$$$eb$$e800005d81ed....eb$$bf....eb$$b0..eb$$e664eb$$b0..eb$$aaeb$$4f8d9e....eb$$538bdf")) { sVersion = "2.1"; sOptions = "by Dark Stalker //UCF"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_CCC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CCC"); function detect() { if (Binary.compare("e9$$$$e800005b8b4c..501736890e....8b47..1347..3347..2b47..36a3....83c6..b9....8b7f..037f..ac363006")) { sOptions = "by ZeroCoder //XG"; bDetected = true; } else if (Binary.compare("e9$$$$e800005b8b4c..501736890e....8b47..3347..36a3....83c6..b9....8b7f..037f..ac363006")) { sOptions = "by ZeroCoder //XG"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_CHECKPRG.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CHECKPRG"); function detect() { if (Binary.compare("33c0be....8bd8b9....bf....ba....474a74..ac320503d8e2")) { sOptions = "1992 by Jordi Mas Hernandez"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_CNT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CNT"); function detect() { if (Binary.compare("'CNT'58e8$$$$5e8b4c..bf....ac3306....3306")) { sOptions = "by C0NTRiVER"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_COM-Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "COM-Protect"); function detect() { if (Binary.compare("e9$$$$8b1e....83eb..b8....5053b430cd215b9ceb")) { sOptions = "1995 by Mr.Wicked"; bDetected = true; } else if (Binary.compare("e9$$$$565699521fe8....5d8d86....0e508f06....8f06....83c6..565f0e1fb9....b8....a3")) { sOptions = "1994 by SiAC"; bDetected = true; } else if (Binary.compare("2e8006......eb00c3")) { sOptions = "1994 by Misha //UCF"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_COM-Protection.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "COM-Protection"); function detect() { if (Binary.compare("e9$$$$eb$$86c08ec086dbeb$$05....87db8b2e....97eb$$aaaaeb$$aaaaeb$$bb....03ddb9....03cd87cbb8")) { sOptions = "by JAM //UCF"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_COMCRYPT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ComCrypt"); function detect() { if (Binary.compare("e9$$$$b9....be....89f70e1f0e07bb....fcad31d8abe2")) { sOptions = "1997 by HPA" bDetected = true; } else if (Binary.compare("e9$$$$eb$$5053575152061e572e8b36....81c6....8a5c..2e881e....8a5c")) { sVersion = "1.0b"; bDetected = true; } else if (Binary.compare("e9$$$$b9....be....89f7fcac04..aae2..b8....bf....abb0..aab8....5033c0c3")) { sOptions = "1997 by HPA" bDetected = true; } else if (Binary.compare("b8....ffe0")) { if (Binary.compare("bb....b9....33c02e802f..43e2", Binary.readWord(1) - 0x100)) { sOptions = "by Stone" bDetected = true; } } return result(); } ================================================ FILE: db/COM/protector_COMPROTECT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "COMPROTECT (RCP)"); function detect() { if (Binary.compare("b8....15....72..8ac4bb....50515253555657061e50b8....58eb")) { sVersion = "2.10"; sOptions = "1988-95 by Ralph Roth"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_COP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "COP"); function detect() { if (Binary.compare("bf....be....b9....ac3206....aae2")) { sVersion = "1.0"; sOptions = "by Jack A. Orman"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_CodeLock.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CodeLock"); function detect() { if (Binary.compare("e9$$$$bb....535856535981e9....31ff575a5dbe....e9")) { sVersion = "4.0"; sOptions = "1993 by Dr. Detergent"; bDetected = true; } else if (Binary.compare("e9$$$$b430cd213c037d$$068e06....061f31c0505e565fae")) { sVersion = "3.0"; sOptions = "1993 by Dr. Detergent"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Codesafe.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Codesafe"); function detect() { if (Binary.compare("e9$$$$5033c08ec02ef606......74..26ff36....061e07e8....07268f06....fb2e8c1e....26ff36....268f06")) { sOptions = "by EliaShim Ltd"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_ComProt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ComProt"); function detect() { if (Binary.compare("e9$$$$e800005e8bee81ed....8db6....b9....f61446e2")) { sVersion = "1.0b"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_ComProtector.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ComProtector"); function detect() { if (Binary.compare("e9$$$$b9....bb....bf....2e8a0734..fec8c0c0..2e88052e000d2e002d4743e2")) { sVersion = "1.0"; sOptions = "1998 by Marco Ruhmann"; bDetected = true; } else if (Binary.compare("e9$$$$b9....e800005b83c3..90fa8bd48be133c02e030e....2ec007..0f23f82e2b0e....2e300f0f23d8")) { sVersion = "1.1"; sOptions = "1998 by Marco Ruhmann"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Comlock.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Comlock by Trouble Makers"); function detect() { if (Binary.compare("e9$$$$eb$$bb....be....81c6....03f3bf....b9....f3a42e8a87....be....8bc82e300446ffc0e2")) { sVersion = "0.10"; bDetected = true; } else if (Binary.compare("e9$$$$eb$$bb....be....81c6....03f3bf....b9....f3a42e8a87....be....8bcb2e300446fec0e2")) { sVersion = "0.10"; bDetected = true; } else if (Binary.compare("e9$$$$eb$$bb....be....81c6....03f3bf....b9....f3a42e8a87....8bcbbe....2e3004fec046e2")) { sVersion = "0.1X"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_CrAcKeR.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CrAcKeR"); function detect() { if (Binary.compare("eb$$be....8bfe5633c0be....ac02e081fe....72..5eac34..aa81fe....72")) { sVersion = "0.2a"; sOptions = "by Deu$"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Crack2EXE.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Crack2exe"); function detect() { if (Binary.compare("b9....bf....8035..47e2..be....8034..46803c..75..be....e8....be....e8....be....e8....bd")) { sName += "/486"; sVersion = "0.02 Alfa"; sOptions = "1996 by Professor Nimnul"; bDetected = true; } else if (Binary.compare("b9....bf....8035..47e2..d7aa6de9")) { sVersion = "0.02"; sOptions = "(crypted) 1996 by Professor Nimnul"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_CryptCom.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CryptCom"); function detect() { if (Binary.compare("e9$$$$be....56b9....c704....c644....8134....4646e2..31f631c9c3")) { sVersion = "2.0"; sOptions = "by Nowhere Man"; bDetected = true; } else if (Binary.compare("bf....57be....90b9....f3a4c3")) { sVersion = "1.1"; sOptions = "by Frank Baumgartner"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Crypto-King.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Crypto-King"); function detect() { if (Binary.compare("bf....be....57b9....f3a4c3")) { sVersion = "1.08"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_DCFR.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "DCFR"); function detect() { if (Binary.compare("b8....ba....3bc4eb$$72$$5250b9....bb....8b0733c140890743e2")) { sVersion = "0.0.4"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_DS-CRP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "DS-CRP"); function detect() { if (Binary.compare("b8....50c3")) { var nOffset = Binary.readWord(1) - 256 + 8; if (Binary.compare("e800005d81ed....9c32e4509d9c5880e4..80fc..74..b4..509d9c5880e4..74..9deb", nOffset)) sVersion = "1.30"; sOptions = "by Dark Stalker //UCF"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Deeper.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Deeper"); function detect() { if (Binary.compare("90e9$$$$e8000059fa8bdc36c747......36837f....75..fb66fafb8be981ed....81e9....be....8dbe....668b05668904")) { sVersion = "1.0c"; bDetected = true; } if (Binary.compare("90e9$$$$e80000fa8bdc36c747......36837f....75..fb598be981ed....81e9....be....8dbe....668b05668904")) { sVersion = "1.0a"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_E2C-Scrambler.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "E2C-Scrambler"); function detect() { if (Binary.compare("e9$$$$fabc....c1ea..8ccd03ea8ec5bf....be....b9....bb....fdac320702c1d2c002c5aa4381fb....75..bb....e2")) { sOptions = "1999 by Amokk //FTW"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_E2C1.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "E2C protection"); function detect() { if (Binary.compare("bc....33c050b8....50ba....b8....cd21b8....cd21bf....be....b9....9081ff....74..8a050204aa46e2..eb")) { sOptions = "1990 by Erik Labs"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_EPW.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "EPW"); function detect() { if (Binary.compare("e9$$$$06571e565552515350bb....81c3....2e8b078ccb03c305....50b8....50cb")) { sVersion = "1.2"; sOptions = "by Aland D. Jones"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_EXETools.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "EXETools by Dismember"); function detect() { if (Binary.compare("68....68....68....be....bf....57b9....f3a4c3")) { sVersion = "2.1 /E"; bDetected = true; } else if (Binary.compare("e9$$$$e800005d8bcd83ed..bf....be....2bcff3a4b9....be....03f5")) { sVersion = "2.1"; bDetected = true; } else if (Binary.compare("68....bf....8bf757b9....51b4..ac32c4c0c4..02e102f0aae2..33c0595e5f57eb")) { sVersion = "2.0"; bDetected = true; } else if (Binary.compare("68....68....68....be....bf....57b9....f3a4c3")) { sVersion = "2.1 /E"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Encriptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Encriptor"); function detect() { if (Binary.compare("eb$$b9....be....bf....acd0c8aae2..be....bf....acaa")) { sVersion = "1.00c"; sOptions = "by Dark Stalker //UCF"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Entropy_Coder.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Entropy Coder"); function detect() { if (Binary.compare("be....bf....b9....fdf3a447fcffe7")) { sOptions = "by Sergey Lukashev"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_ExOM.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ExOM"); function detect() { if (Binary.compare("'EXOM'fabd....ffe5")) { sVersion = "0.0X"; sOptions = "by Abdelaziz BELBACHiR"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_FCRYPT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "FCRYPT"); function detect() { if (Binary.compare("e9$$$$505351be....bf....8befb9....fcacd0c032c1d0c032c1aae2..595b58ffe5")) { sVersion = "2.10b"; sOptions = "1992-93 by Chip & Dale SoftGroup"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_GOAT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "GOAT"); function detect() { if (Binary.compare("5156505253813c....75$$424a81c3....8bdb595e585a5bb4..ba....cd21b8....cd21474f")) { sOptions = "1996 by Martin Overton"; bDetected = true; } else if (Binary.compare("50565351b8....807c....74$$8bc0585e5b59b4..ba....cd21b8....cd21474f4154")) { sOptions = "1996 by Martin Overton"; bDetected = true; } else if (Binary.compare("56515052807c....75$$81c2....8bc05e59585ab4..ba....cd21b8....cd21474f4154")) { sOptions = "1996 by Martin Overton"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Guardian_Angel.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Guardian Angel"); function detect() { if (Binary.compare("e9$$$$06fcbe....eb$$ba....eb$$eb$$eb$$8a04eb$$eb$$eb$$d0c8eb$$2ad0eb$$32c6eb$$d1c2eb$$8804eb$$eb$$eb$$4681fe....74")) { sVersion = "1.0"; bDetected = true; } else if (Binary.compare("e9$$$$06fcbe....8be8e4210c..eb$$e6218bc5ba....8be8e4210c..eb$$e6218bc58a0ceb")) { sVersion = "1.0"; bDetected = true; } else if (Binary.compare("e9$$$$06fcbb....eb$$eb$$eb$$b9....8be8e42102..eb$$e6218bc58a17eb")) { sVersion = "1.0"; bDetected = true; } else if (Binary.compare("e9$$$$06fcbb....8be8e4210c..eb$$e6218bc5ba....eb$$eb$$eb$$8a0f")) { sVersion = "1.0"; bDetected = true; } else if (Binary.compare("e9$$$$06fcbe....eb$$......eb$$8a..8be8e4210c..eb$$e6218bc5fe")) { sVersion = "1.0"; bDetected = true; } else if (Binary.compare("e9$$$$06fcbf....8be8e4210c..eb$$e6218bc5bb....eb$$8a05eb$$eb$$eb$$fe")) { sVersion = "1.0"; sOptions = "registered"; bDetected = true; } else if (Binary.compare("e9$$$$e800005d81ed....9c588bc825....509d9c5825....3d....75..eb")) { sVersion = "1.0b"; bDetected = true; } else if (Binary.compare("e9$$$$06fcbb....eb$$ba....eb$$eb")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_HDKPROTC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "HDKPROTC"); function detect() { if (Binary.compare("e9$$$$4851442ea1....2d....8bd805....8bf0bf....b9....f3a48bcbd1e9b8....8bf08bf8066a..07268b2e")) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_HackStop.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "HackStop"); function detect() { if (Binary.compare("fabe....ffe6")) { sVersion = "1.17cr"; bDetected = true; } else if (Binary.compare("fabd....ffe5")) { sVersion = "1.13cs"; bDetected = true; } else if (Binary.compare("fabb....ffe3")) { sVersion = "1.14s"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_IntroC0der.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "IntroC0der"); function detect() { if (Binary.compare("be....b9....8bfeac32c1d2c032c5aae2")) { sOptions = "1995 by SkullC0der"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Keygen_crypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "KeyGen Crypt"); function detect() { if (Binary.compare("e9$$$$e800005d8d7e..575eb9....ad35....abe2")) { sVersion = "1.00"; sOptions = "by Majestic"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Khrome_Crypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Khrome Crypt"); function detect() { if (Binary.compare("b9....b8....eb$$05....fc80c4..eb$$eb$$f4")) { sVersion = "0.3"; sOptions = "1997 by Teraphy"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_LAME_GG.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "LAME GG (PROPHECY protection)"); function detect() { if (Binary.compare("e9$$$$e8$$$$5eb9....314c..33c08ee003c605....faeb$$648b1e....899c....648b1e....899c....64a3....648c0e")) { sOptions = "1999"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_LAMPROT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "LAMPROT"); function detect() { if (Binary.compare("e9$$$$8b0e....be....bf....f3a4b9....bb....8a0734..880743e2..33c033c933db33d233ff33f668....c3")) { sOptions = "by gds //FH"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Lock-Master.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Lock-Master"); function detect() { if (Binary.compare("e9$$$$eb$$31c0061e502d....501f0726ff77..26ff77..8f87....8f87....ffb7....ffb7....585b29c353bb....5a1f07")) { sVersion = "9.0"; sOptions = "by Andrew Kacy"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_MASK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "MASK"); function detect() { if (Binary.compare("e8$$$$5557cd03fc4d41534bfa8bec836e....8b6e..fb49e8....5b81eb....50d6515256")) { sVersion = "2.0"; sOptions = "1995 by JosB M. L. Lopes."; bDetected = true; } else if (Binary.compare("e8$$$$5557cd03fc4d41534bfa8bec8346....ff76..5d49e8....5b81eb....50d6515256")) { sVersion = "2.4"; sOptions = "1995 by JosB M. L. Lopes."; bDetected = true; } else if (Binary.compare("e8$$$$5557cd03fc4d41534bfd50fa8bc4f7dcbc....9449fbd651521f5256")) { sVersion = "2.5"; sOptions = "1995 by JosB M. L. Lopes."; bDetected = true; } else if (Binary.compare("e8$$$$5557cd03fc4d41534bfa8bec836e....ff76..5d49e800005b81eb")) { sVersion = "2.3"; sOptions = "1995 by JosB M. L. Lopes."; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_MCLock.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "MCLock"); function detect() { if (Binary.compare("e9$$$$909090fa29c08ec026c606......26c606......268c0e....26c606......26c606......268c0e....fbcd01")) { sVersion = "1.2, 1.3"; bDetected = true; } else if (Binary.compare("e9$$$$eb00e9$$$$909090fa29c08ec026c606......26c606......268c0e....26c606......26c606......268c0e....fbcd01")) { sVersion = "1.2, 1.3"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_MESS.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "MESS"); function detect() { if (Binary.compare("....................b9....f326ace3..eb$$ba....b409cd21cd20")) { sVersion = "1.07"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_MSCC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "MSCC"); function detect() { if (Binary.compare("e9$$$$0e07be....bf....b9....f3a4b9....be....accc9803d8e2")) { sVersion = "1.0a"; sOptions = "1997 by Mad $cientist"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_MegaShield.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "MegaShield"); function detect() { if (Binary.compare("90b8....e72133d252be....bd....b9....ad03d0d3c233c2d3ca2bd0e2")) { sVersion = "1.01a"; sOptions = "by t-REX //PSA"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Microxor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "MiCRoXoR"); function detect() { if (Binary.compare("e8$$$$bf....5e57b9....300ca4e2..c3")) { sOptions = "2000 by Jibz"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_NH.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "NH"); function detect() { if (Binary.compare("be....bf....57b9....f3a4c3")) { bDetected = true; sOptions = "by MANtiC0RE"; } return result(); } ================================================ FILE: db/COM/protector_NoAV.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "NoAV"); function detect() { if (Binary.compare("e9$$$$68....60be....66b8........668706....b9....51c1e9..41be....5156bf....e8")) { sOptions = "by VAG"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Nodebug.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Nodebug"); function detect() { if (Binary.compare("e8$$$$b430cd21b4..03f897d6405e50978b4d..ac32c1aae2")) { sVersion = "1.0 part 1"; sOptions = "by JVP"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_PCOM.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PCOM"); function detect() { if (Binary.compare("be....b9....2e8a0434..2e880446e2")) { sVersion = "2.8b2, 2.8b3 -e -i"; sOptions = "1999"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_PCRYPT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PCRYPT"); function detect() { if (Binary.compare("'PCRYPT'ff'v3.51'00e9")) { sVersion = "3.51"; sOptions = "1997 by MERLiN //DTG"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_PCVault-Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PCVault-Protect"); function detect() { if (Binary.compare("be....fcac3c..75..e9....ac3c..74..e9....eb")) { sOptions = "1993 by E. Johnson"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_PROTECT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PROTECT! COM"); function detect() { var nLimit = Math.min(65536, Binary.getSize()); if (Binary.findSignature(0, nLimit, "0c02e9......e421e9......88e0..........eb....e621e9......88c4........e9......e621eb") != -1) { sVersion = "5.5"; bDetected = true; } else if (Binary.findSignature(0, nLimit, "e42150e9......e621e9......58e621e9......b0ffeb") != -1) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("e9$$$$ba....81f2")) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("e9$$$$bb....81c3....eb")) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("e9$$$$be....81ee....bb....d1cb8b04")) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("e9$$$$bf....81ef....eb")) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("e9$$$$be....81ee....bb....d1cb8b04")) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("e9$$$$bf....81f7")) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("e9$$$$ba....81c2....eb")) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("e9$$$$bd....81f5....eb")) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("e9$$$$bd....d1cd")) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("e9$$$$bb....81f3")) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("e9$$$$1efd2efe")) { sVersion = "5.5"; bDetected = true; } else if (Binary.compare("e9$$$$e800005d81ed....33c08ed88bf0bf....b9....fcf3a5fd87fe8cc08ed833c08ec04f4f")) { sVersion = "4.0"; bDetected = true; } else if (Binary.compare("e9$$$$1eb430cd213c..73..cd20be....e8....e8....1f8cd88ec0")) { sVersion = "6.0"; bDetected = true; } else if (Binary.compare("e8$$$$501e060e550e1f33c08ec0fafc26a1....5026a1....50")) { sVersion = "3.0/3.1"; bDetected = true; } else if (Binary.compare("b8....50b8....50e9$$$$c606......eb$$8cc6060b01c3")) { sVersion = "2.0"; sOptions = "1993"; bDetected = true; } else if (Binary.compare("b8....50e9$$$$c606......eb$$8cc6060701c3eb")) { sVersion = "1.0"; sOptions = "1993"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_PTP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PTP"); function detect() { if (Binary.compare("'PTP50'fafafcb430cd21fb585c582bc05257502ec606")) { sVersion = "5.0"; bDetected = true; } else if (Binary.compare("'PTP40'fafafcb430cd21fb585c582bc05257502ec606")) { sVersion = "4.0"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_PassCOM.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PassCOM"); function detect() { if (Binary.compare("e9$$$$be....bf....b9....8ae1ac32c402e1aae2..68....c3")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Propellerhead_encryption.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Propellerhead encryption"); function detect() { if (Binary.compare("e9$$$$b430cd2180fc..72..90e9....90bb....81c3....53b0..04..51b9....e9")) { sOptions = "1997"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_ProtEXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ProtEXE (com)"); function detect() { if (Binary.compare("e9$$$$9c5053515256571e0655fabe....8a64..8b54..8bda81c3....8c4f..908b0f894c..8a4f..884c..8bfe8bca83e9..fcac")) { sVersion = "3.0"; sOptions = "1996"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_R-Crypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "R-Crypt"); function detect() { if (Binary.compare("e9$$$$68....60bf....b9....b0..2e3005fec047e2..61c706........c606")) { sVersion = "0.91"; bDetected = true; } else if (Binary.compare("e9$$$$68....60bf....b9....b0..2e300547fec0e2..61c706........c606")) { sVersion = "0.93"; bDetected = true; } else if (Binary.compare("e9$$$$bf....57b9....c705....c645....8135....4747e2..33ffc3")) { sVersion = "0.92"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_RCC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "RCC II"); function detect() { if (Binary.compare("fabc....ffe4")) { var nOffset = Binary.readWord(2) - 256; if (Binary.compare("83c4..bc....60e8$$$$e8$$$$50b8....58eb", nOffset)) { sVersion = "0.51/386"; bDetected = true; } } else if (Binary.compare("90bd....ffe5")) { var nOffset = Binary.readWord(2) - 256; if (Binary.compare("faf7dc87ec83c4..81c4....f7dc83ec..87ecbc....50535251061eb9....b0..e6", nOffset)) { sVersion = "1.08h"; bDetected = true; } } else if (Binary.compare("fcbe....bf....5657b9....f3a55e5f33db33d2")) { sVersion = "1.08h"; bDetected = true; } else if (Binary.compare("e9$$$$9c505351525657551e06fcb8....cd21")) { sName = "RCC/286"; sVersion = "1.10"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_RSCC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "RSCC"); function detect() { if (Binary.compare("b1..32ff82c7..b2..b5..b3..81c2....d0c203d133d1f7d232d13097")) { sVersion = "1.03"; bDetected = true; } else if (Binary.compare("....82........81......32..80....2b..81")) { sVersion = "1.04"; bDetected = true; } else if (Binary.compare("....80........81......30..80....30..80")) { sVersion = "1.04"; bDetected = true; } else if (Binary.compare("32ed80c5..b2..b6..29ff81cf....32c980")) { sVersion = "1.04"; bDetected = true; } else if (Binary.compare("29ff81f7....33d281f2....31c981c9....f81015a64975..fa53f889ea8944")) { sVersion = "1.04"; bDetected = true; } else if (Binary.compare("2aed80cd..28c982c1..2ad282ca..bb....81c2....f7da03d102d128174383")) { sVersion = "1.04"; bDetected = true; } else if (Binary.compare("28ed82cd..2aff82cf..32db80f3..b1..33c081c0....05....d0c033c1f7d002c1f83187")) { sVersion = "1.04"; bDetected = true; } else if (Binary.compare("30c982f1..29d281ca....be....32ed82f5..81c2....d0c2f7da33d1")) { sVersion = "1.03"; bDetected = true; } else if (Binary.compare("32ff82c7..b3..30ed80c5..b1..f88197........4343e2")) { sVersion = "1.03"; bDetected = true; } else if (Binary.compare("f5bb....b8....bf....2e8037..81ff....4374..4875..90b5..1f9b")) { sVersion = "1.20"; bDetected = true; } else if (Binary.compare("33d281f2....2bdb81f3....b9....3197....83c3..497f..2a142cca3aca")) { sVersion = "1.04"; bDetected = true; } else if (Binary.compare("2bc981c1....29d281f2....33db81c3....81c2....291783c3..497f..ab")) { sVersion = "1.03"; bDetected = true; } else if (Binary.compare("b9....2bdb81cb....f880b7......434975..55fc532245..ef57f9")) { sVersion = "1.03"; bDetected = true; } else if (Binary.compare("bf....8bf7b9....b4..8a0532c480c4..aae2")) { sVersion = "1.0X"; sOptions = "mutated COM like RSCC"; bDetected = true; } else if (Binary.compare("b9....be....8bfeadd1c034..86c42ae003c7abe2")) { sVersion = "1.0X"; sOptions = "mutated COM like RSCC"; bDetected = true; } else if (Binary.compare("fc50be....bf....57b9....f3a4c3")) { sVersion = "1.0X"; sOptions = "mutated COM like RSCC"; bDetected = true; } else if (Binary.compare("eb$$fcbe....bf....57b9....f3a4bf....be....b9....c3")) { sVersion = "1.0X"; sOptions = "mutated COM like RSCC"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_SCC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "SCC"); function detect() { if (Binary.compare("fd53565b0fa1be....ad648b16....643106....648916....adff36....643306")) { sOptions = "by The Cleric //LZ0"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_SCRAM.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "SCRAM!"); function detect() { if (Binary.compare("'SCRAM'b430cd213c..77..cd20bc....b9....8bfcb2..584cf6d82ac2d2c8feca32d181ff....73..eb")) { sVersion = "0.8a1"; sOptions = "1997 by bushwoelie & ACP"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Scrambler.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Scrambler"); function detect() { if (Binary.compare("eb$$fafc31ff8ec726ff36....26ff36....8d36....b9....f3a4b9....cd00")) { sVersion = "1.00"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Scrypt!.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Scrypt!"); function detect() { if (Binary.compare("e9$$$$e8$$$$e800005a5f578bf78bce33dbb7..acfec0f6d032c7aa86fb43c1c3..331e....331e....331e....331e")) { sVersion = "0.4"; sOptions = "by DarkGrey //DTG"; bDetected = true; } else if (Binary.compare("e9$$$$e8$$$$5d81ed....b9....be....03f58bfeb4..ac32c4f6d4aae2")) { sVersion = "0.4"; sOptions = "1998 by DarkGrey //DTG"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Scrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "SCRYPT"); function detect() { if (Binary.compare("e9$$$$e800005d8d5e..eb$$53eb$$66bd........e9$$$$b8....eb$$cc")) { sVersion = "1.0"; sOptions = "1998 by hijaq //BAC"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_SelfCrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "SelfCrypt"); function detect() { if (Binary.compare("8cc88ed833ffbe....bb....8a048a1132c288043c..74..4683ff..7d..47eb")) { sOptions = "1999 by MCS"; bDetected = true; } else if (Binary.compare("e8$$$$eb$$8cca8eda8ec2be....bf....b9....2ec706........31c0ada3....3136....8bc18bdef7e33106....3116....a1....abe2")) { sVersion = "1994 by PHOENiX"; bDetected = true; } else if (Binary.compare("e8$$$$eb$$8cca8eda8ec2be....bf....b9....ad2ea3....2e3136....8bc18bdef7e32e3106....2e3116....2ea1....abe2")) { sVersion = "1994 by PHOENiX"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_SelfProtect386.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "SelfProtect386"); function detect() { if (Binary.compare("'=SYRIUS=DIRE=SERVICE='071a")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_SnoopStop.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "SnoopStop"); function detect() { if (Binary.compare("90e9$$$$eb$$55e80000598be981ed....66608d9e....8d8e....2bcb2e8a0734..34..34..fec0f6d0")) { sVersion = "1.15"; sOptions = "1998 by Trills and Technologies"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_SoftGuard.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Softguard"); function detect() { if (Binary.compare("e9$$$$8cc88ed88c06....8cc73bc774..8bfc368b052ea3....368b45..2ea3....a1....a3....a1....a3....a1....b1")) { sOptions = "1984-86"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Steplock.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Steplock"); function detect() { if (Binary.compare("e9$$$$0e1fb9....030e....be....d204282c46e2")) { sVersion = "1.00A"; sOptions = "by Morten Pedersens"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_TCEC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "TCEC"); function detect() { if (Binary.compare("1aff5fb9....f326ace3..eb")) { sVersion = "3.60"; sOptions = "by ThE CLERiC! //LZ0, EVD"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_UnPackStop.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "UnPackStop"); function detect() { if (Binary.compare("68....c3")) { var nOffset = Binary.readWord(1) - 256; if (Binary.compare("8bc450be....bf....eb$$b8....501f58eb", nOffset)) { sVersion = "0.95"; sOptions = "by Szaszi (Szabo Laszlo)"; bDetected = true; } } return result(); } ================================================ FILE: db/COM/protector_UniCrypt.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "UniCrypt"); function detect() { if (Binary.compare("8cc805....50b8....50cb")) { sVersion = "1.01"; sOptions = "1998 by V.Slinchuk"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_Venus.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Venus crypt"); function detect() { if (Binary.compare("b9....fa8bdc8cd2bc....03e1d1e94c4c5886e9d3c033c186e9f7d050e2")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_XORCOPY.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "XORCOPY"); function detect() { if (Binary.compare("e9$$$$b8....bb....ba....3107434039d375..c606......c606......c606......31c031db31d2e9")) { sVersion = "1.0"; sOptions = "1995 by DeiMoS"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_XcomOR.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "XcomOR by madmax"); function detect() { if (Binary.compare("'MMX'e8$$$$83c5..8306......b8....5050ffe0")) { sVersion = "0.XX"; bDetected = true; } else if (Binary.compare("'MMX'668136............eb$$668136............eb")) { sVersion = "0.99i, 0.99h"; bDetected = true; } else if (Binary.compare("'MMX'b409ba....cd21e8$$$$1e6a..1f8136........8136........8b1e....a1....501f813f....75")) { bDetected = true; } else if (Binary.compare("'MMX'b8....ba....87ecbc....eb$$50b409cd2187e533edeb$$4f030de8")) { sName = "XcomOR/486 by madmax"; bDetected = true; } else if (Binary.compare("'MMX'b8....ba....87ecbc....eb$$50b409cd2187e533ede8$$$$1e6a..1f")) { sVersion = "0.99f"; bDetected = true; } else if (Binary.compare("e8$$$$8006......b4..5050c3bf....57bb....8b4d..81")) { sVersion = "0.99a"; bDetected = true; } else if (Binary.compare("'MMX'eb$$4feb$$8b0dba....83c2..90eb")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_XoReR.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "XoReR"); function detect() { if (Binary.compare("e9$$$$ba....b9....51b0..e660fab430cd213c..73..33c00650cbbf....8b36....59e2")) { sVersion = "2.l"; sOptions = "by dR.No //ViP"; bDetected = true; } else if (Binary.compare("e9$$$$be....8bfeb9....33db80c3..ac32c3aae2")) { sVersion = "1.0"; sOptions = "by dR.No //ViP"; bDetected = true; } else if (Binary.compare("e9$$$$b8....e721b8....cd21b430cd218b2e....8b1e....bf....b9....b430cd2132..73..be....bf....b9....fcac300547e2")) { sVersion = "1.0 [2nd pass]"; sOptions = "by dR.No //ViP"; bDetected = true; } else if (Binary.compare("e9$$$$ba....b9....51b8....e721b430cd213c..73..33c00650cb")) { sVersion = "2.0"; sOptions = "1998 by dR.No //ViP"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_XorCom.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "XorCom"); function detect() { if (Binary.compare("e9$$$$fcbe....bf....57b9....ac34..aae2..c3")) { sVersion = "1.0"; sOptions = "by tFF"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_aPatch.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "aPatch"); function detect() { if (Binary.compare("e8$$$$fde8$$$$ffc75e83ee..e8$$$$5d8176......c646....eb")) { sVersion = "0.05-0.33"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_acBBS_protection.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "acBBS protection p1"); function detect() { if (Binary.compare("e9$$$$bf....b9....870581f0....86e0faeb$$e8$$$$501e33c08ed8eb$$8706....eb$$8706....8706....1f58c3")) { sOptions = "1994 by p.q."; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_com-crypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "com-crypt"); function detect() { if (Binary.compare("b8....ffe0")) { sOffset = Binary.readWord(1); if (Binary.compare("5756bf....b8....abb8....abb0..aa89feb9....31dbad01c329cb89d8abe2", sOffset - 0x100)) { sOptions = "by BlackLight, MANtiCORE"; bDetected = true; } else if (Binary.compare("be....562ec704....2ec744......2ec644....b9....8a0434..880446", sOffset - 0x100)) { sName = "com-crypt on BASIC"; sOptions = "by BlackLight, MANtiCORE"; bDetected = true; } } else if (Binary.compare("e8$$$$b7..538b4f..8a47..c0c8..880743e2")) { sOptions = "by Frenzy"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_fds-cp.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "fds-cp"); function detect() { if (Binary.compare("8cca2e8916....b4..8b2e....8b1e....8edaa3....8c06....891e....892e....eb")) { sVersion = "0.04a"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_mCrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "mCrypt"); function detect() { if (Binary.compare("e9$$$$1e06be....bf....b9....0e1f0e07e8$$$$33c0fa5083c4..83ec..58fb0bc075..c3")) { sVersion = "0.1a"; sOptions = "1998 by //UFO CREW"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_protection.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "protection"); function detect() { if (Binary.compare("33db9090b9....fcad03d8e2..b9....be....8bfefcad33c3ab43e2")) { sOptions = "by ROWDY, St.Petersburg"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_spirit.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "$pirit"); function detect() { if (Binary.compare("e9$$$$b430cd21f6d12ea6e8....b462cd21e8....3636fb969034..c3")) { sVersion = "1.X"; bDetected = true; } else if (Binary.compare("e9$$$$aee8$$$$e4210c..fbe62190b8....fb5026509087c1")) { sVersion = "1.5"; bDetected = true; } else if (Binary.compare("e9$$$$369f9f1c..e9$$$$e8$$$$e421f80c..e6218d06....fc505089c1fb")) { sVersion = "1.5"; bDetected = true; } else if (Binary.compare("e9$$$$f8d72606b435cd2107e8$$$$1c..1c..33d226f6da12ddfcf905....f8f5f6ea")) { sVersion = "1.5"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_sticker.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "sticker"); function detect() { if (Binary.compare("be....8bc6b1..d3e88cdb03c30344..a3....8cc805....a3....8b44..b1..d3e8")) { sOptions = "1994 by TigraSoft"; bDetected = true; } return result(); } ================================================ FILE: db/COM/protector_x3.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "x3"); function detect() { if (Binary.compare("e8$$$$5ebf....57b9....ac34..aae2..c3")) { sVersion = "1.4"; sOptions = "by MANtiC0RE"; bDetected = true; } else if (Binary.compare("ba....2e408b142633f6402681c6....2e1ad3")) { sVersion = "1.4"; sOptions = "by MANtiC0RE"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_ACiDDRAW.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "ACiDDRAW"); function detect() { if (Binary.compare("e9$$$$b8....cd10b4..b9....cd10e8....ba....90e8....3d....75..e9....3d....75..e9....3d....75..e9....3d....75..eb")) { sVersion = "1.2"; bDetected = true; } else if (Binary.compare("eb$$b8....cd10b4..b9....cd10e8....ba....90e8....3d....75..e9....3d....75..e9....3d....75..e9....3d....75..eb")) { sVersion = "1.2"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_ANS2ALL.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "ANS2ALL"); function detect() { if (Binary.compare("e9$$$$e8$$$$b8....cd103c..75..80fb..73..58b8....cd21fcb8....8ec0be....bf....b9....f3a4fa")) { sVersion = "1.3"; sOptions = "by ZeroCoder //XG"; bDetected = true; } if (Binary.compare("e9$$$$2bc9b6..b2..b7..b4..cd212ad22af6b7..b4..cd10b6..32d2b7..b4..cd101e33c050")) { sOptions = "by ZeroCoder //XG"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_ASC2COM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "ASC2COM"); function detect() { if (Binary.compare("e9$$$$e8$$$$33c0cd333d....75..c606......b8....cd338916....c3")) { sVersion = "2.02"; sOptions = "1992 by MorganSoft"; bDetected = true; } else if (Binary.compare("e8$$$$e8$$$$b401b7..b9....cd10c3f8bb....8b073d....75..c3")) { sVersion = "1.10B"; sOptions = "1989 by MorganSoft"; bDetected = true; } else if (Binary.compare("e9$$$$e8$$$$50535157bb....803f..74..33c98a0f438bfbb8....e3")) { sVersion = "2.01 Compressed"; sOptions = "1992 by MorganSoft"; bDetected = true; } else if (Binary.compare("e9$$$$e8$$$$e8$$$$b4..b7..b9....cd10c3")) { sOptions = "1989 by MorganSoft"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_DOC2COM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "DOC2COM"); function detect() { if (Binary.compare("fc8b0e....498b36....8bfeac3204aae2")) { sOptions = "by Jerry DePyper"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_DOC2PAGE.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "DOC2PAGE"); function detect() { if (Binary.compare("e9$$$$fc8a0e....32ede3..bf....b0..f3ae74..e8....ba....cd21ba....cd21e9")) { sOptions = "by Th. Edel"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_GTXT.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "GTXT"); function detect() { if (Binary.compare("bb....b4..b1..8a070ac074..247f3c..75..438a070ac0")) { sVersion = "1.1"; sOptions = "by EGans 05/08/86"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_HYPDOC.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "HYPDOC"); function detect() { if (Binary.compare("e9$$$$e8....e8....e8....2ec606......2ec606......b9....2e8a26....b0..e8....2ec606......2ec606......2e8b3e....0e07")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_List.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "List"); function detect() { if (Binary.compare("bc....1e2bc0508926....b430cd213c")) { sOptions = "by Vernon D. Buerg"; bDetected = true; } else if (Binary.compare("bc....1e2bc0508926....e8$$$$b430cd213c")) { sVersion = "6.00"; sOptions = "1985 by Vernon D. Buerg"; bDetected = true; } else if (Binary.compare("bc....1e2bc0508926....b430cd21a2")) { sVersion = "6.2a"; sOptions = "1987 by Vernon D. Buerg"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_MakeRead.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "MakeRead"); function detect() { if (Binary.compare("e9$$$$c706........c606......c606......e8....bf....893e....bf....893e....b4..b0..0106....578bc78b3e....fcab")) { sVersion = "1.8"; sOptions = "1987"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_ONLINE-HELP.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "ONLINE-HELP"); function detect() { if (Binary.compare("e9$$$$8cc805....2ea3....be....ac3c..74..72..3c..72..3c..77..4e33c033dbba....8a1c80eb..80fb..77")) { sOptions = "1990 by Clockwork Software"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_PFL2COM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "PFL2COM"); function detect() { if (Binary.compare("eb$$be....bf....53bb....8a1780fa..74..80fa..75..c706")) { sOptions = "by C.P.White 1987-90"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_RELETTER.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "RELETTER"); function detect() { if (Binary.compare("e9$$$$bc....bf....bb....8a0784c075..e9....438a073c..74..3c..74..89da438a073c..74")) { sVersion = "1.0"; sOptions = "1993 by Hans J. Baer"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_SHOWV20.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "SHOW"); function detect() { if (Binary.compare("e9$$$$b8....2b06....a3....e8$$$$bf....cd1125....3d....74..bf....893e....c3")) { sName += "V20"; sOptions = "1992-93 by Simple Software Co."; bDetected = true; } if (Binary.compare("e9$$$$b8....2b06....a3....e8$$$$50a0....a2....58c3")) { sOptions = "1992-93 by Simple Software Co."; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_TXT2COM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "TXT2COM"); function detect() { if (Binary.compare("e8$$$$c706........803e......75..8d36....e8....e8....e8....e8....e8....ffa7")) { sVersion = "1.1"; sOptions = "1987 by Keith P. Graham"; bDetected = true; } else if (Binary.compare("e9$$$$c706........803e......75..8d36....e8....e8....e8....e8....e8....ffa7")) { sVersion = "1.1"; sOptions = "1987 by Keith P. Graham"; bDetected = true; } else if (Binary.compare("8d26....e8$$$$b4..cd103c..74..c706........c706........3c..74..3c..74..8d16....b409cd21cd20c706")) { sVersion = "2.06"; sOptions = "1989 by Keith P. Graham"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_TXTmaker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "TXTmaker"); function detect() { if (Binary.compare("eb$$b4..33dbcd1080fc..74..b0..eb$$b44ccd21")) { sVersion = "1.22"; sOptions = "1991 by Jack A. Orman"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_Txt2Exe.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "Txt2Exe"); function detect() { if (Binary.compare("bf....033e....b9....2b0e....d1e9b8....f3abb4..cd1030e4a3....b8....cd10b8....8a1e....cd10")) { sVersion = "3.1b"; sOptions = "2001 by BlackLight"; bDetected = true; } return result(); } ================================================ FILE: db/COM/self-displayer_readme.com.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "README.COM"); function detect() { if (Binary.compare("bb....b8....cd21be....fcbf....f6c2..74..f6c2..74..bf....ac3c..74..b4")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/sfx_LHA.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "LHA SFX"); function detect() { if (Binary.compare("eb$$fcbc....8cc805....8ec0eb$$bb....e8....061fb430cd218bd81e3c..72..368e06....33c08bf8b9....f2aeae")) { sVersion = "2.05L, 2.10-2.13, 2.55"; bDetected = true; } else if (Binary.compare("eb$$00fcbc....8cc805....8ec0eb$$bb....e8....061fb430cd218bd81e3c..72..368e06....33c08bf8b9....f2aeae")) { sVersion = "2.13S"; bDetected = true; } return result(); } ================================================ FILE: db/COM/sfx_PKZip.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "PKZip mini-sfx"); function detect() { if (Binary.compare("b9....bf....2bcf32c0f3aab430cd21a3....8da5....8926....b8....e8")) { sVersion = "2.04g"; bDetected = true; } if (Binary.compare("b9....bf....2bcf32c0f3aa8da5....83e4..8926....b430cd21a3....8cd8")) { sVersion = "2.50"; sOptions = "1999 by PKWARE Inc."; bDetected = true; } return result(); } ================================================ FILE: db/COM/simple_ansi_viewer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "simple ANSI viewer"); function detect() { if (Binary.compare("b8....bb....b9....0e1fba....cd21b8004ccd21")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/simple_self-displayer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "simple self-displayer"); function detect() { if (Binary.compare("b8....8ec0b4..b9....cd102bc92bffb8....51b9....f3ab59be....2bdb2bed2bd28bfdac")) { bDetected = true; } return result(); } ================================================ FILE: db/COM/virus.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("virus", ""); function detect() { if (Binary.compare("e9$$$$fa8bece800005b81eb....2ef687......74..8db7....bc....31343124464c75")) { sName = "Cascade.1701"; bDetected = true; } else if (Binary.compare("e9$$$$89e5fae800005b81eb....2ef687......74..8db7....bc....31343124464c75")) { sName = "Cascade.1704"; bDetected = true; } return result(); } ================================================ FILE: db/CurIcoBPP ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Read the bits per pixel of Windows cursors & icons from the image. // nOffset: position of the header. function getCurIcoBPP(nOffset) { var nBPP = 0; nOffset = Binary.readDword(nOffset + 12); if (Binary.readDword(nOffset) == 0x28) { nBPP = Binary.readWord(nOffset + 14); } else if (Binary.compare("89'PNG\r\n'1A0A", nOffset)) { // Just assume a PNG is going to be 8-bit RGBA. nBPP = 32; } return nBPP; } ================================================ FILE: db/DEX/_DEX.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "Android"); function detect() { if (DEX.isVerbose()) { sName = DEX.getOperationSystemName(); sVersion = DEX.getOperationSystemVersion(); sOptions = DEX.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/DEX/_DEX2.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "DEX"); function detect() { sName = DEX.getFileFormatName(); sVersion = DEX.getFileFormatVersion(); sOptions = DEX.getFileFormatOptions(); bDetected = true; return result(); } ================================================ FILE: db/DEX/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = DEX; var X = DEX; ================================================ FILE: db/DEX/compiler_dexlib2.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "dexlib2"); function detect() { if (DEX.getMapItemsHash() == 0x0e27e776) { bDetected = true; } return result(); } ================================================ FILE: db/DEX/library_UnicomSDK.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "UnicomSDK"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcom/unicom/dcLoader/Utils;"); return result(); } ================================================ FILE: db/DEX/obfuscator_ProGuard.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("obfuscator", "ProGuard"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcom/google/android/gms/common/ProGuardCanary;"); return result(); } ================================================ FILE: db/DEX/protector_AESObfuscator.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "AESObfuscator"); function detect() { bDetected = DEX.isDexStringPresent("AESObfuscator.java"); sLang = "Java"; return result(); } ================================================ FILE: db/DEX/protector_APKProtect.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "APKProtect"); function detect() { bDetected = DEX.isDexStringPresent("APKProtect"); return result(); } ================================================ FILE: db/DEX/protector_AlibabaProtection.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "AlibabaProtection"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcom/ali/mobisecenhance/StubApplication;"); return result(); } ================================================ FILE: db/DEX/protector_AllatoriObfuscator.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Allatori"); function detect() { bDetected = DEX.isDexStringPresent("ALLATORIxDEMO"); sVersion = bDetected ? "Demo" : String(); return result(); } ================================================ FILE: db/DEX/protector_ApkEncryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "ApkEncryptor"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcn/beingyi/sub/utils/Native;"); return result(); } ================================================ FILE: db/DEX/protector_AppSolid.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "AppSolid"); function detect() { bDetected = DEX.isDexItemStringPresent("Lweb/apache/sax/app;"); return result(); } ================================================ FILE: db/DEX/protector_BaiduProtection.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "BaiduProtection"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcom/baidu/protect/StubApplication;"); return result(); } ================================================ FILE: db/DEX/protector_BangcleProtection.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "BangcleProtection"); function detect() { bDetected = DEX.isDexStringPresent("apkFilePath"); return result(); } ================================================ FILE: db/DEX/protector_EasyProtector.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "EasyProtector"); function detect() { bDetected = DEX.isDexStringPresent("com.easyprotector.android"); return result(); } ================================================ FILE: db/DEX/protector_Jiagu.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Jiagu"); function detect() { bDetected = DEX.isDexStringPresent("/.jiagu"); return result(); } ================================================ FILE: db/DEX/protector_Kiwi.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Allatori"); function detect() { bDetected = DEX.isDexStringPresent("Kiwi__Version__Obfuscator"); return result(); } ================================================ FILE: db/DEX/protector_LIAPP.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "LIAPP"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcom/lockincomp/liapp/LiappClassLoader;"); return result(); } ================================================ FILE: db/DEX/protector_MedusaH.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Medusah"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcom/seworks/medusah/MedusahDex;"); return result(); } ================================================ FILE: db/DEX/protector_ModGuard.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "ModGuard"); function detect() { if (DEX.isDexStringPresent("ModGuard - Protect Your Piracy v1.2 by ill420smoker")) { sVersion = "v1.2"; } else if (DEX.isDexStringPresent("ModGuard - Protect Your Piracy v1.3 by ill420smoker")) { sVersion = "v1.3"; } return result(); } ================================================ FILE: db/DEX/protector_NQShield.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "NQShield"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcom/nqshield/Common;"); return result(); } ================================================ FILE: db/DEX/protector_NagaPTProtection.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "NagaPTProtection"); function detect() { bDetected = DEX.isDexStringPresent("LIBRARY_DDOG") || DEX.isDexStringPresent("LIBRARY_FDOG"); return result(); } ================================================ FILE: db/DEX/protector_PangXie.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Jiagu"); function detect() { bDetected = DEX.isDexStringPresent("PangXie") || DEX.isDexStringPresent("nsecure"); return result(); } ================================================ FILE: db/DEX/protector_QDBH.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "QDBH"); function detect() { bDetected = DEX.isDexStringPresent("/qdbh"); return result(); } ================================================ FILE: db/DEX/protector_SecNeo.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "SecNeo"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcom/secneo/apkwrapper/ApplicationWrapper;"); return result(); } ================================================ FILE: db/DEX/protector_TencentProtection.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "TencentProtection"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcom/tencent/StubShell/TxAppEntry;"); return result(); } ================================================ FILE: db/DEX/protector_VDog.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Vdog"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcom/vdog/Common;"); return result(); } ================================================ FILE: db/DEX/protector_Yidun.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Yidun"); function detect() { bDetected = DEX.isDexItemStringPresent("La/_;"); return result(); } ================================================ FILE: db/DEX/tool_ApkToolPlus.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("tool", "ApkToolPlus"); function detect() { bDetected = DEX.isDexItemStringPresent("Lcom/linchaolong/apktoolplus/jiagu/utils/ApkToolPlus;"); return result(); } ================================================ FILE: db/DOS16M/_DOS16M.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "DOS16M"); function detect() { if (DOS16M.isVerbose()) { sName = DOS16M.getOperationSystemName(); sVersion = DOS16M.getOperationSystemVersion(); sOptions = DOS16M.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/DOS16M/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = DOS16M; var X = DOS16M; ================================================ FILE: db/DOS16M/compiler_Watcom.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Watcom C"); function detect() { bDetected = true; // Always true return result(); } ================================================ FILE: db/DOS4G/_DOS4G.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "DOS4G"); function detect() { if (DOS4G.isVerbose()) { sName = DOS4G.getOperationSystemName(); sVersion = DOS4G.getOperationSystemVersion(); sOptions = DOS4G.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/DOS4G/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = DOS4G; var X = DOS4G; ================================================ FILE: db/DOS4G/compiler_Watcom.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Watcom C"); function detect() { bDetected = true; // Always true return result(); } ================================================ FILE: db/ELF/Borland_Kylix.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Borland Kylix"); function detect() { if (ELF.isSectionNamePresent("borland.ressym")) { bDetected = true; } else if (ELF.isSectionNamePresent("borland.reshash")) { bDetected = true; } else if (ELF.isSectionNamePresent("borland.resdata")) { bDetected = true; } else if (ELF.isSectionNamePresent("borland.resspare")) { bDetected = true; } sLang = "Pascal/C/C++"; return result(); } ================================================ FILE: db/ELF/Free_Pascal.4.sg ================================================ // Detect It Easy: detection rule file // Author: Levis // EP sigs by hypn0 // Lazarus Free Pascal meta("compiler", "Free Pascal"); function detect() { if (ELF.compareEP("5989e38d44....83e4..8915........a3........890d........891d........e8........8925........31ede8........c3")) { sVersion = "2.6.0"; bDetected = true; } else if (ELF.compareEP("31ED5989E3")) { bDetected = true; } else if (ELF.isSectionNamePresent(".fpc.resources")) { bDetected = true; } else if (ELF.isSectionNamePresent(".fpcdata")) { bDetected = true; var nSection = ELF.getSectionNumber(".fpcdata"), nOffset = ELF.getSectionFileOffset(nSection), nSize = ELF.getSectionFileSize(nSection); if (nSize > 0) { var nStringOffset = ELF.findString(nOffset, 4, "FPC "); if (nStringOffset != -1) { sVersion = ELF.getString(nStringOffset + 4); } } } else if (ELF.isSectionNamePresent(".data")) { var nSection = ELF.getSectionNumber(".data"), nOffset = ELF.getSectionFileOffset(nSection), nSize = ELF.getSectionFileSize(nSection); if (nSize >= 0x100) { var nStringOffset = ELF.findString(nOffset + nSize - 0x100, 0x100, "FPC "); if (nStringOffset != -1) { sVersion = ELF.getString(nStringOffset + 4); bDetected = true; } } } sLang = "Pascal"; return result(); } ================================================ FILE: db/ELF/HP_C++.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "HP C++"); function detect() { if (ELF.isSectionNamePresent(".HP.init")) { bDetected = true; } sLang = "C++"; return result(); } ================================================ FILE: db/ELF/IBM_AIX_kernel_loader.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("boot", "IBM AIX kernel loader"); function detect() { if (ELF.getNumberOfPrograms() >= 4) { if (ELF.getProgramFileSize(1) <= 0x100) { if (ELF.findString(ELF.getProgramFileOffset(1), Math.min(0x100, ELF.getProgramFileSize(1)), "IBM,RPA-Client-Config") != -1) { bDetected = true; } } } if (ELF.findString(ELF.getProgramFileOffset(0), Math.min(0x100, ELF.getProgramFileSize(0)), "PowerPC") != -1) { sVersion = "PowerPC"; } return result(); } ================================================ FILE: db/ELF/Oracle_Solaris_Studio.4.sg ================================================ // Detect It Easy: detection rule file // Author: anonymous meta("compiler", "Oracle Solaris Studio"); function getOSSVersion() { var sResult = ""; var nSection = ELF.getSectionNumber(".comment"); if (nSection != -1) { var nSectionOffset = ELF.getSectionFileOffset(nSection); var nSectionSize = ELF.getSectionFileSize(nSection); var nOffset = ELF.findString(nSectionOffset, nSectionSize, "Sun WorkShop"); if (nOffset != -1) { return ELF.getString(nOffset + 13, 100); } nOffset = ELF.findString(nSectionOffset, nSectionSize, "acomp: Sun C"); if (nOffset != -1) { return ELF.getString(nOffset + 13, 100); } nOffset = ELF.findString(nSectionOffset, nSectionSize, "SUNWCC.h"); if (nOffset != -1) { return "5.X"; } } return sResult; } function detect() { if (ELF.compareEP("bc1020..e003....1300....e022....a203a0..1300....e222....1300....e222....a52c20..a404a0..a40440122700....e804....80a520")) // SPARC instruction set { if (ELF.isSectionNamePresent(".SUNW_version")) { bDetected = true; } var sOSSVersion = getOSSVersion(); if (sOSSVersion) { bDetected = true; sVersion = sOSSVersion; } } sLang = "C/C++"; return result(); } ================================================ FILE: db/ELF/_ELF.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "Unix"); function detect() { if (ELF.isVerbose()) { sName = ELF.getOperationSystemName(); sVersion = ELF.getOperationSystemVersion(); sOptions = ELF.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/ELF/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = ELF; var X = ELF; ================================================ FILE: db/ELF/compiler_DMD.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "DMD"); function getVersion() { var nSection = ELF.getSectionNumber(".comment"); if (nSection != -1) { var nOffset = ELF.findString( ELF.getSectionFileOffset(nSection), ELF.getSectionFileSize(nSection), "DMD v"); if (nOffset != -1) { return ELF.getString(nOffset + 5, 20); } } return String(); } function detect() { var versionString = getVersion(); if (versionString) { bDetected = true; sVersion = versionString; } sLang = "D"; return result(); } ================================================ FILE: db/ELF/compiler_FASM.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "FASM"); function detect() { if (ELF.getElfHeader_shstrndx() == 0 && ELF.getElfHeader_shnum() == 0 && ELF.getElfHeader_shentsize()) { sVersion = "1.X"; bDetected = true; for (var i = 0; i < ELF.getNumberOfPrograms() - 1 && bDetected; i++) { if (ELF.getProgramFileOffset(i) == 0) { bDetected = false; } } } sLang = "ASMx" + (ELF.is64() ? "64" : "86"); return result(); } ================================================ FILE: db/ELF/compiler_Go.4.sg ================================================ // Detect It Easy: detection rule file // Author: fernandom - menteb.in meta("compiler", "Go"); function detect() { if (ELF.isSectionNamePresent(".gosymtab") || ELF.isSectionNamePresent(".gopclntab") || ELF.isSectionNamePresent(".go.buildinfo") || ELF.isSectionNamePresent(".note.go.buildid")) { bDetected = true; } //x86-64 if (ELF.compareEP("488d742408488b3c24b810174200ffe0b870f94100ffe0000000000000000000")) { bDetected = true; sVersion = "1.2.2"; } else if (ELF.compareEP("488d742408488b3c24b8907f4200ffe0b800564200ffe0000000000000000000")) { bDetected = true; sVersion = "1.3 or 1.3.1"; } else if (ELF.compareEP("488d742408488b3c24b8c07f4200ffe0b830564200ffe0000000000000000000")) { bDetected = true; sVersion = "1.3.2"; } else if (ELF.compareEP("488d742408488b3c24b8e07f4200ffe0b850564200ffe0000000000000000000")) { bDetected = true; sVersion = "1.3.3"; } else if (ELF.compareEP("488d742408488b3c24488d0510000000ffe00000000000000000000000000000")) { bDetected = true; sVersion = "1.4.x or 1.5.X"; } else if (ELF.compareEP("488d742408488b3c24488d0510000000ffe0cccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.6.X-1.9.X"; } else if (ELF.compareEP("e92bc9ffffcccccccccccccccccccccc8b7c2408b8e70000000f05c3cccccccc")) { bDetected = true; sVersion = "1.10.X"; } else if (ELF.compareEP("e9cbc6ffffcccccccccccccccccccccc8b7c2408b8e70000000f05c3cccccccc")) { bDetected = true; sVersion = "1.11.X"; } else if (ELF.compareEP("e9dbc6ffffcccccccccccccccccccccc8b7c2408b8e70000000f05c3cccccccc")) { bDetected = true; sVersion = "1.12.X"; } else if (ELF.compareEP("e92bc6ffffcccccccccccccccccccccc8b7c2408b8e70000000f05c3cccccccc")) { bDetected = true; sVersion = "1.13.X"; } else if (ELF.compareEP("e92bc4ffffcccccccccccccccccccccc8b7c2408b8e70000000f05c3cccccccc")) { bDetected = true; sVersion = "1.14.X"; } else if (ELF.compareEP("e91bcbffffcccccccccccccccccccccccccccccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.15.X"; } else if (ELF.compareEP("e95bcaffffcccccccccccccccccccccccccccccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.16.X"; } else if (ELF.compareEP("e93bc6ffffcccccccccccccccccccccccccccccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.17.X"; } else if (ELF.compareEP("e9fbc5ffffcccccccccccccccccccccccccccccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.18.X"; } else if (ELF.compareEP("e99bc8ffffcccccccccccccccccccccccccccccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.22.X-1.23.X"; } else if (ELF.compareEP("e95bc5ffffcccccccccccccccccccccccccccccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.20.X"; } else if (ELF.compareEP("e9bbc8ffffcccccccccccccccccccccccccccccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.23.X"; } else if (ELF.compareEP("e9dbc8ffffcccccccccccccccccccccccccccccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.23.2"; } else if (ELF.compareEP("e91bc7ffffcccccccccccccccccccccccccccccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.23.5"; } else if (ELF.compareEP("e95bc8ffffcccccccccccccccccccccccccccccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.24.X"; } else if (ELF.compareEP("e97bc8ffffcccccccccccccccccccccccccccccccccccccccccccccccccccccc")) { bDetected = true; sVersion = "1.24.X"; } else if (ELF.compareEP("4831ed4889e7488d35........4883e4..e8........8b37488d57..49c7c0")) { bDetected = true; sVersion = "1.24.0"; } else if (ELF.compareEP("31ed4989d15e4889e24883e4..505449c7c0........48c7c1........48c7c7")) { bDetected = true; sVersion = "1.24.1"; } //x86 else if (ELF.compareEP("83ec088b4424088d5c240c890424895c2404e87902ffffe804000000cd030000")) { bDetected = true; sVersion = "1.2.2"; } else if (ELF.compareEP("83ec088b4424088d5c240c890424895c2404e8f977feffe804000000cd030000")) { bDetected = true; sVersion = "1.3 or 1.3.1"; } else if (ELF.compareEP("83ec088b4424088d5c240c890424895c2404e8e977feffe804000000cd030000")) { bDetected = true; sVersion = "1.3.2"; } else if (ELF.compareEP("83ec088b4424088d5c240c890424895c2404e8c977feffe804000000cd030000")) { bDetected = true; sVersion = "1.3.3"; } else if (ELF.compareEP("83ec088b4424088d5c240c890424895c2404e89932ffffe804000000cd030000")) { bDetected = true; sVersion = "1.4.X"; } else if (ELF.compareEP("83ec088b4424088d5c240c890424895c2404e809000000cd0300000000000000")) { bDetected = true; sVersion = "1.5.X"; } else if (ELF.compareEP("83ec088b4424088d5c240c890424895c2404e809000000cd03cccccccccccccc")) { bDetected = true; sVersion = "1.6.X-1.9.X"; } else if (ELF.compareEP("e9....ffffccccccccccccccccccccccb8fc0000008b5c2404cd80cd03c3cccc")) { bDetected = true; sVersion = "1.10"; } else if (ELF.compareEP("e9ebd8ffffccccccccccccccccccccccb8fc0000008b5c2404cd80cd03c3cccc")) { bDetected = true; sVersion = "1.10.X"; } else if (ELF.compareEP("e96bdbffffccccccccccccccccccccccb8fc0000008b5c2404cd80cd03c3cccc")) { bDetected = true; sVersion = "1.11.X"; } else if (ELF.compareEP("e97b..ffffccccccccccccccccccccccb8fc0000008b5c2404cd80cd03c3cccc")) { bDetected = true; sVersion = "1.12.X"; } else if (ELF.compareEP("e99bffffccccccccccccccccccccccb8fc0000008b5c2404cd80cd03c3cccc")) { bDetected = true; sVersion = "1.13.X"; } else if (ELF.compareEP("e99bd9ffffccccccccccccccccccccccb8fc0000008b5c2404cd80cd03c3cccc")) { bDetected = true; sVersion = "1.14.X"; } else if (ELF.compareEP("e9abdcffffccccccccccccccccccccccb8010000008b5c2404cd80cd03c3cccc")) { bDetected = true; sVersion = "1.15.X"; } else if (ELF.compareEP("e9dbdcffffccccccccccccccccccccccb8010000008b5c2404cd80cd03c3cccc")) { bDetected = true; sVersion = "1.16.X"; } else if (ELF.compareEP("e92bdeffffccccccccccccccccccccccb8010000008b5c2404cd80cd03c3cccc")) { bDetected = true; sVersion = "1.17.X"; } else if (ELF.compareEP("e9..ddffffccccccccccccccccccccccb8010000008b5c2404cd80cd03c3cccc")) { bDetected = true; sVersion = "1.23.X-1.24.X"; } /* // generic rule for amd64 and 386 else if (ELF.compareEP("e9....ffff..................................................cccc")) { bDetected = true; sVersion = "1.10.X-1.17.X"; } */ // arm else if (ELF.compareEP("00009de504108de204409fe500f084e2feffffea")) { bDetected = true; } sLang = "Go"; return result(); } ================================================ FILE: db/ELF/compiler_MWCC.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://decomp.wiki/compilers/MWCC meta("compiler", "MW MIPS C"); function detect() { if (ELF.compareOverlay("4d57204d495053204320436f6d70696c65722028322e342e312e303129")) { sVersion = "2.4.1.01"; sOptions = "PlayStation 2"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/ELF/compiler_Rust.4.sg ================================================ // Detect It Easy: detection rule file // Author: fernandom - menteb.in meta("compiler", "Rust"); function detect() { //x86 if (ELF.compareEP("f30f1efb31ed5e89e183e4..505452e8........81c3")) { bDetected = true; } else if (ELF.compareEP("31ed5e89e183e4..505452e8........81c3")) { bDetected = true; } else if (ELF.compareEP("31ed89e083e4..5050e8........8104")) { bDetected = true; } //x86-64 if (ELF.compareEP("4831ed4889e7488d35........4883e4..e8$$$$$$$$488b37488d57..4531c94c8d05........488d0d........488d3d$$$$$$$$5541574156")) { bDetected = true; } else if (ELF.compareEP("f30f1efa31ed4989d15e4889e24883e4..50544531c031c9488d3d$$$$$$$$504889f14863d7488d05$$$$$$$$5541574156")) { bDetected = true; } else if (ELF.compareEP("f30f1efa31ed4989d15e4889e24883e4..50544c8d05........488d0d........488d3d$$$$$$$$504889f14863d7488d05$$$$$$$$4156")) { bDetected = true; } else if (ELF.compareEP("f30f1efa31ed4989d15e4889e24883e4..50544c8d05........488d0d........488d3d$$$$$$$$504889f14863d7488d05$$$$$$$$5541574156")) { bDetected = true; } else if (ELF.compareEP("f30f1efa31ed4989d15e4889e24883e4..50544531c031c9488d3d$$$$$$$$5541574156")) { bDetected = true; } else if (ELF.compareEP("f30f1efa31ed4989d15e4889e24883e4..50544531c031c9488d3d$$$$$$$$41574156")) { bDetected = true; } else if (ELF.compareEP("f30f1efa31ed4989d15e4889e24883e4..50544531c031c9488d3d$$$$$$$$504889f14863d7488d05$$$$$$$$53")) { bDetected = true; } else if (ELF.compareEP("f30f1efa31ed4989d15e4889e24883e4..50544531c031c9488d3d$$$$$$$$554889e541574156")) { bDetected = true; } else if (ELF.compareEP("31ed4989d15e4889e24883e4..50544531c031c9488d3d$$$$$$$$41574156")) { bDetected = true; } else if (ELF.compareEP("31ed4989d15e4889e24883e4..50544c8d05........488d0d........488d3d$$$$$$$$504889f14863d7488d05$$$$$$$$5541574156")) { bDetected = true; } else if (ELF.compareEP("31ed4989d15e4889e24883e4..50544c8d05........488d0d........488d3d$$$$$$$$41574156")) { bDetected = true; } else if (ELF.compareEP("4831ed4889e7488d35........4883e4..e8$$$$$$$$4881ec........8b074989f8ffc04898")) { bDetected = true; } else if (ELF.compareEP("4831ed4889e7488d35........4883e4..e8$$$$$$$$4881ec........8b0783c0..4898")) { bDetected = true; } else if (ELF.compareEP("4831ed4889e7488d35........4883e4..e8$$$$$$$$8b37488d57..488d3d$$$$$$$$41574156")) { bDetected = true; } //ARM64 if (ELF.compareEP("1d0080d21e0080d2e0030091........210000911fec7c92")) { bDetected = true; } else if (ELF.compareEP("1f2003d51d0080d21e0080d2e50300aae10340f9e2230091e6030091")) { bDetected = true; } else if (ELF.compareEP("1d0080d21e0080d2e50300aae10340f9e2230091e6030091")) { bDetected = true; } else if (ELF.compareEP("1d0080d21e0080d2fd030091e50300aae10340f9e2230091e6030091")) { bDetected = true; } //ARM32 if (ELF.compareEP("00b0a0e300e0a0e304109de40d20a0e104202de504002de5")) { bDetected = true; } else if (ELF.compareEP("00b0a0e300e0a0e310109fe501108fe00d00a0e10fc0c0e3")) { bDetected = true; } //ARMv7 if (ELF.compareEP("f0000b4ff0000e03497944684620f00f0ce54600f002f8..")) { bDetected = true; } else if (ELF.compareEP("f0000b4ff0000e02bc6a4604b401b4dff824a008a39a44df")) { bDetected = true; } else if (ELF.compareEP("f0000b4ff0000e5df8041b6a464df8042d4df8040ddff828")) { bDetected = true; } if (ELF.isStringInTablePresent(".strtab", "rust_panic")) { bDetected = true; var nSection = ELF.getSectionNumber(".debug_str"), nOffset = ELF.getSectionFileOffset(nSection), nSize = ELF.getSectionFileSize(nSection); if (nSize > 0) { var nStringOffset = ELF.findString(nOffset, 6, "rustc "); if (nStringOffset != -1) { sVersion = ELF.getString(nStringOffset); } } } sLang = "Rust"; return result(); } ================================================ FILE: db/ELF/compiler_VBCC.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "VBCC"); function detect() { if (ELF.getElfHeader_entry() == 0) { // EP == 0 if (ELF.compare("6000000048......................7c08....9001....9421....bdc1....3d......902b....3d......39ad....3960....800b....3d......90", ELF.getSectionFileOffset(1))) { // PPC instruction set sVersion = "0.7"; bDetected = true; } } sLang = "C"; return result(); } ================================================ FILE: db/ELF/compiler_Watcom.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Watcom"); function detect() { var nData = ELF.getSectionNumber(".data"); var nOffset = ELF.getSectionFileOffset(nData); var nSize = ELF.getSectionFileSize(nData); if (ELF.findString(nOffset, nSize, "WATCOM") != -1) { bDetected = true; } else if (ELF.compareEP("33ed8925........598bf48d44....505651e8")) { sName = "Open Watcom C/C++32"; sOptions = "2002"; bDetected = true; } sLang = "C/C++"; return result(); } ================================================ FILE: db/ELF/compiler_Zig.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Zig"); function detect() { if ((ELF.isSectionNamePresent(".rodata")) && (ELF.isDeepScan())) { var nIndex = ELF.getSectionNumber(".rodata"); var nOffset = ELF.getSectionFileOffset(nIndex); var nSize = ELF.getSectionFileSize(nIndex); var nVersionOffset = ELF.findSignature(nOffset, nSize, "5a49475f44454255475f434f4c4f52"); // ANSI ZIG_DEBUG_COLOR if (nVersionOffset != -1) { bDetected = true; } } sLang = "Zig"; return result(); } ================================================ FILE: db/ELF/compiler_gcc.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "GCC"); function getVersion(nOffset, nSize) { var versionString = ELF.findString(nOffset, nSize, "GCC:"); if (versionString != -1) { return ELF.getString(versionString + 5, 100); } return String(); } function detect() { if (ELF.compareEP("31ed5e89e183e4..50545268........68........515668........e8")) { if (ELF.compareEP("$$$$$$$$57565383ec..8b7424..8b7c24..8b5c24..b8........85c00f84........8b0d........85c90f94c025........a3........8b5424..8b4c24..8d44....a3........8b5424..8915........90", 29)) { sVersion = "4.7.2, exe"; bDetected = true; } else if (ELF.compareEP("$$$$$$$$55b8........57565383ec..85c08b7c24..8bb424........8b9c24........0f84........8b15........31c085d20f94c08b5424..8b4c24..a3........8d44....8b9424........a3........8915........6690", 29)) { sVersion = "4.6.1, exe"; bDetected = true; } else if (ELF.compareEP("$$$$$$$$5589e557565383ec..8b7d..8b75..8b5d..b8........85c00f84........a1........85c00f94c025........a3", 29)) { sVersion = "4.5.3, exe"; bDetected = true; } else if (ELF.compareEP("$$$$$$$$55b8........89e557565383ec..85c08b7d..8b75..8b5d..74..31c0833d..........0f94c0", 29)) { sVersion = "4.4.6, exe"; bDetected = true; } else if (ELF.compareEP("$$$$$$$$55b8........89e557565383ec..85c08b7d..8b5d..74..31c08b15........85d20f94c0", 29)) { sVersion = "4.4.5, exe"; bDetected = true; } else if (ELF.compareEP("$$$$$$$$55b8........89e557565383ec..85c08b....8b5d..74..31c0833d..........0f94c0", 29)) { sVersion = "4.3.3, exe"; bDetected = true; } else if (ELF.compareEP("$$$$$$$$55ba........89e557565381ec........85d20f85........8b45..8b4d..8915........8d54", 29)) { sVersion = "4.1.2, exe"; bDetected = true; } } else if (ELF.compareEP("31ed5589e583e4..8d45..83ec..50ff75..52e8$$$$$$$$5589e557565383ec..8b5d..8b7d..8d74....8935........85db7e..8b0785c074..a3........0fb610")) { sVersion = "4.4.7, exe"; // BSD bDetected = true; } else if (ELF.compareEP("5589e5565383ec..83e4..8b5d..89d18d74....85db8935........7e..8b45..85c074..a3........0fb610")) { sVersion = "4.2.1, exe"; // BSD bDetected = true; } else if (ELF.compareEP("55575653e8........81c3........83ec..8b93........8b8b........8b83........8b2a8b93........890c24895424..8b93........895424..eb")) { sVersion = "4.7.2, so"; bDetected = true; } else if (ELF.compareEP("5589e557565383ec..83e4..8b5d..89d78d74....85db8935........7e..8b45..85c074..a3........89c10fb601")) { sVersion = "3.4.6, exe"; // BSD bDetected = true; } else if (ELF.compareEP("5589e557565383ec..89d18d7d..8b5f..8d74....8935........85db7e..837d....74..8b45..a3........89c28038..74..8db6........8dbf........803a..75..8d42..a3")) { sVersion = "3.2.1, exe"; // BSD bDetected = true; } else if (ELF.compareEP("5557565383ec..8b7424..8b6c24..8b3ec745..........c74424..........c74424..........8b078904248d4424..894424..ff57")) { sVersion = "3.2, so"; // BSD bDetected = true; } else if (ELF.compareEP("7c290b785421....38......9421ff..7c0803a690......3d......85......48")) { // PowerPC instruction set sVersion = "3.2.X"; bDetected = true; } else if (ELF.compareEP("6a..6a..8bec52b8........85c074")) { sVersion = "2.95.2"; bDetected = true; } else if (ELF.isStringInTablePresent(".strtab", "gcc2_compiled.")) { sVersion = "2.X"; bDetected = true; } else if (ELF.isStringInTablePresent(".dynstr", "GCC_3.0")) { sVersion = "3.X"; bDetected = true; } else if (ELF.isSectionNamePresent(".gcc_except_table")) { bDetected = true; } var nSection = ELF.getSectionNumber(".comment"); if (nSection != -1 && !sVersion) { var versionString = getVersion(ELF.getSectionFileOffset(nSection), ELF.getSectionFileSize(nSection)); if (versionString) { sVersion = versionString; bDetected = true; } } if (!sVersion) { if (ELF.isOverlayPresent()) { // TODO Check!!! var versionString = getVersion(ELF.getOverlayOffset(), Math.min(8192, ELF.getOverlaySize())); if (versionString) { sVersion = versionString; // Version mb corrupted! bDetected = true; } } } sLang = "C"; return result(); } ================================================ FILE: db/ELF/compiler_gdc.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "gdc"); function detect() { if (ELF.isLibraryPresent("libgphobos.so.2")) { bDetected = true; } sLang = "C/C++"; return result(); } ================================================ FILE: db/ELF/compiler_ldc.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "ldc"); function getLDCVersion() { var sResult = ""; var nSection = ELF.getSectionNumber(".comment"); if (nSection != -1) { var nSectionOffset = ELF.getSectionFileOffset(nSection); var nSectionSize = ELF.getSectionFileSize(nSection); var nOffset = ELF.findString(nSectionOffset, nSectionSize, "ldc version "); if (nOffset != -1) { sResult = ELF.getString(nOffset + 12, 20); } } return sResult; } function detect() { if (ELF.isLibraryPresent("libphobos2-ldc-shared.so.98") || ELF.isLibraryPresent("libdruntime-ldc-shared.so.98")) { bDetected = true; } var sLDCVersion = getLDCVersion(); if (sLDCVersion) { bDetected = true; sVersion = sLDCVersion; } sLang = "D"; return result(); } ================================================ FILE: db/ELF/compiler_movfuscator.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("compiler", "movfuscator"); function detect() { if (ELF.compareEP("A1........8B98........8B03BA........668B9400........8913A1........8B98........")) { bDetected = true; sVersion = "v2"; _setResult("protection", "M/o/Vfuscator", "", ""); } sLang = "C"; return result(); } ================================================ FILE: db/ELF/library_Curl.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://curl.se/libcurl/ meta("library", "Curl"); function detect() { if (ELF.isLibraryPresent("libcurl.so.4")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_FFmpeg.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://ffmpeg.com/ meta("library", "FFmpeg"); function detect() { if (ELF.isLibraryPresent("libffmpeg.so")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_FLAC.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/xiph/flac meta("library", "FLAC"); function detect() { if (ELF.isLibraryPresent("libFLAC.so.14")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_Flexlm.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("library", ""); function detect() { var nOffset = ELF.findSignature(0, ELF.getSize(), "'@(#) F'"); if (nOffset != -1) { sName = ELF.getString(nOffset, 200).match(/\w\S*/i); sVersion = ELF.getString(nOffset, 200).match(/\d\S*/i); bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_FluidSynth.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.fluidsynth.org/ meta("library", "FluidSynth"); function detect() { if (ELF.isLibraryPresent("libfluidsynth.so.3")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_FreeType.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://freetype.org/ meta("library", "FreeType"); function detect() { if (ELF.isLibraryPresent("libfreetype.so.6")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_GLEW.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://glew.sourceforge.net/ meta("library", "GLEW"); function detect() { if (ELF.isLibraryPresent("libGLEW.so.2.2")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_GLIBC.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "GLIBC"); function getMaxVersion(sValue1, sValue2) { var aString1 = sValue1.toString().split('.'); var aString2 = sValue2.toString().split('.'); for (var i = 0; i < 3; i++) { if (aString1[i] > aString2[i]) { return sValue1; } else if (aString1[i] < aString2[i]) { return sValue2; } } return sValue2; } function detect() { if (ELF.isSectionNamePresent(".dynstr")) { var nSection = ELF.getSectionNumber(".dynstr"); var nOffset = ELF.getSectionFileOffset(nSection); var nSize = ELF.getSectionFileSize(nSection); var nCurrentOffset = nOffset; var nCurrentSize = nSize; var sLIBCVersion; while (nCurrentSize > 0) { nCurrentOffset = ELF.findString(nCurrentOffset, nSize, "GLIBC_"); if (nCurrentOffset == -1) { break; } bDetected = true; sLIBCVersion = ELF.getString(nCurrentOffset + 6); sVersion = getMaxVersion(sVersion, sLIBCVersion); nCurrentSize = nSize - (nCurrentOffset - nOffset + 1); nCurrentOffset++; } sOptions = ELF.getGeneralOptions(); } return result(); } ================================================ FILE: db/ELF/library_LZMA.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://tukaani.org/xz/liblzma-api/ meta("library", "LZMA"); function detect() { if (ELF.isLibraryPresent("liblzma.so.5")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_Lego1.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/isledecomp/isle-portable meta("library", "Lego1"); function detect() { if (ELF.isLibraryPresent("liblego1.so")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_MPEG2.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://libmpeg2.sourceforge.io/ meta("library", "MPEG2"); function detect() { if (ELF.isLibraryPresent("libmpeg2.so.0")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_Mikmod.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://sourceforge.net/projects/mikmod/ meta("library", "Mikmod"); function detect() { if (ELF.isLibraryPresent("libmikmod.so.3")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_OGG.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.xiph.org/ogg/ meta("library", "OGG"); function detect() { if (ELF.isLibraryPresent("libogg.so.0")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_OpenAL.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.openal.org/ meta("library", "OpenAL"); function detect() { if (ELF.isLibraryPresent("libopenal.so.1")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_PulseAudio.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.freedesktop.org/wiki/Software/PulseAudio/ meta("library", "PulseAudio"); function detect() { if (ELF.isLibraryPresent("libpulse.so.0")) { bDetected = true; } return result(); } ================================================ FILE: db/ELF/library_QT.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "Qt"); function getQTVersion() { var sResult = ""; var nSize = ELF.getSize(); var nOffset = ELF.findString(0, nSize, "/usr/local/Trolltech/Qt-"); if (nOffset != -1) { sResult = ELF.getString(nOffset + 24); var aVersion = sResult.match(/(.*)\//); if (aVersion) { sResult = aVersion[1]; } } return sResult; } function detect() { if (ELF.isStringInTablePresent(".dynstr", "libQtCore.so.4")) { sVersion = "4.X"; bDetected = true; } else if (ELF.isStringInTablePresent(".dynstr", "libQt5Core.so.5")) { sVersion = "5.X"; bDetected = true; } else if (ELF.isStringInTablePresent(".dynstr", "libQt6Core_x86.so")) { sVersion = "6.X"; bDetected = true; } else if (ELF.isStringInTablePresent(".dynstr", "libQt6Core.so.6")) { sVersion = "6.X"; bDetected = true; } if (bDetected) { var sQTVersion = getQTVersion(); if (sQTVersion) { sVersion = sQTVersion; } } return result(); } ================================================ FILE: db/ELF/library_SDL.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "SDL"); function getSDLVersion() { var sResult = ""; var nSection = ELF.getSectionNumber(".dynstr"); if (nSection != -1) { var nOffset = ELF.getSectionFileOffset(nSection); var nSize = ELF.getSectionFileSize(nSection); var nVersionOffset = ELF.findString(nOffset, nSize, "libSDL-"); if (nVersionOffset != -1) { var sSDLVersion = ELF.getString(nVersionOffset); var aVersion = sSDLVersion.match(/libSDL-(.*).so/); if (aVersion) { sResult = aVersion[1]; } } } return sResult; } function detect() { if (ELF.isStringInTablePresent(".dynstr", "SDL_Init")) { bDetected = true; } if (bDetected) { sVersion = getSDLVersion(); } return result(); } ================================================ FILE: db/ELF/packer_Ezuri.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Rewritten from yara (YARA-Rule by f0wl) by KDSS-Research // Optimized and rewritten (again) by DosX meta("packer", "Ezuri"); function detect() { if (ELF.isSectionNamePresent(".strtab") && ELF.isSectionNamePresent(".gopclntab") && ELF.isSectionNamePresent(".noptrdata") && ELF.isSectionNamePresent(".rodata")) { var strtab = ELF.getSectionNumber(".strtab"), gopclntab = ELF.getSectionNumber(".gopclntab"), noptrdata = ELF.getSectionNumber(".noptrdata"), rodata = ELF.getSectionNumber(".rodata"); var nOffset = ELF.findString(ELF.getSectionFileOffset(strtab), ELF.getSectionFileSize(strtab), "main.runFromMemory"); if (nOffset != -1 && ELF.findString(ELF.getSectionFileOffset(strtab), ELF.getSectionFileSize(strtab), "main.aesDec") != -1 && ELF.findString(ELF.getSectionFileOffset(gopclntab), ELF.getSectionFileSize(gopclntab), "crypto/cipher.NewCFBDecrypter") != -1 && ELF.findString(ELF.getSectionFileOffset(rodata), ELF.getSectionFileSize(rodata), "/proc/self/fd/%d") != -1 && ELF.findString(ELF.getSectionFileOffset(rodata), ELF.getSectionFileSize(rodata), "/dev/null") != -1 && ELF.findSignature(ELF.getSectionFileOffset(noptrdata), ELF.getSectionFileSize(noptrdata), "A5 63 63 C6 84 7C 7C F8") != -1 && ELF.findSignature(ELF.getSectionFileOffset(noptrdata), ELF.getSectionFileSize(noptrdata), "63 7C 77 7B F2 6B 6F C5 30 01 67 2B FE D7 AB 76") != -1) { bDetected = true; } } return result(); } ================================================ FILE: db/ELF/packer_PyInstaller.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("packer", "PyInstaller"); // python = 💩 function detect() { // they insert pkgs into the section named "pydata" const pydata = ELF.getSectionNumber("pydata") // we can find the magic number in the section if (pydata != -1 && ELF.findSignature( ELF.getSectionFileOffset(pydata), ELF.getSectionFileSize(pydata), "4d45490c0b0a0b0e" ) != -1) bDetected = true; sLang = "Python"; return result(); } ================================================ FILE: db/ELF/packer_UPX.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "UPX"); function getUPXOptions(nOffset) { var nMethod = ELF.readByte(nOffset + 2); var nLevel = ELF.readByte(nOffset + 3); var sCompression = ""; switch (nMethod) // From http://sourceforge.net/p/upx/code/ci/default/tree/src/conf.h { case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: sCompression = "NRV"; break; case 14: sCompression = "LZMA"; break; case 15: sCompression = "zlib"; break; } if (sCompression) { sOptions = sOptions.append(sCompression); if (nLevel == 8) { sOptions = sOptions.append("best"); } else { sOptions = sOptions.append("brute"); } } } function detect() { var nSize = ELF.getSize(); if (ELF.compare("'UPX!'", nSize - 0x24)) { getUPXOptions(nSize - 0x20); bDetected = true; } else if (ELF.compareEP("E8........EB0E5A585997608A542420E9........60")) { sVersion = "3.X"; bDetected = true; } var nOffset = ELF.findString(0, nSize, "$Id: UPX"); if (nOffset != -1) { sVersion = ELF.getString(nOffset + 9, 4); bDetected = true; } return result(); } ================================================ FILE: db/ELF/packer_Virbox.2.sg ================================================ // Detect It Easy: detection rule file // Author: Vito <@ScalletaZ> meta("packer", "Virbox"); function detect() { for (var i = 0; i < ELF.getNumberOfPrograms(); i++) { var nOffset = ELF.getProgramFileOffset(i); if (ELF.findString(nOffset, 32, "Virbox Protector") != -1) { sVersion = "Virbox Protector"; bDetected = true; break; } } return result(); } ================================================ FILE: db/ELF/packer_exepak.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "exepak"); function detect() { if (ELF.compareEP("b9........81e9........89cb83e9..be........89f7033d........f3a48b15........b8")) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db/ELF/protector_Burneye.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Burneye"); function detect() { if (ELF.compareEP("FF35........9C608B0D........E9")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/ELF/protector_HASP.1.sg ================================================ // Detect It Easy: detection rule file // Author: Hand Mill /* If errors pls contact HandMill on exelab.ru */ meta("protector", "HASP"); function detect() { if (ELF.getNumberOfSections() == 2) { if (ELF.isSectionNamePresent("protect") && (ELF.getSectionFileSize(0) == 0)) { var nOffset = ELF.getProgramFileOffset(3); var nSize = ELF.getProgramFileSize(3); if (ELF.findString(nOffset, nSize, "hasp") != -1) { bDetected = true; } else { var nOffset = ELF.getProgramFileOffset(1); var nSize = ELF.getProgramFileSize(1); if (ELF.findString(nOffset, nSize, "hasp") != -1) { bDetected = true; } } } } return result(); } ================================================ FILE: db/FASM ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // FASM's PE DOS stub is tested twice - once to detect FASM as a compiler and // again to prevent being detected as a linker (FASM has no linker). Detect it // once here. var bFASM; if (!bFASM && PE) { bFASM = PE.compare("'MZ'80000100000004001000FFFF00004001000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21'This program cannot be run in DOS mode.\r\n$'0000000000000000'PE'0000"); } ================================================ FILE: db/FPC ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Free Pascal // Author: Rinat Aminow var bFPC; if (typeof bFPC === "undefined" && typeof PE !== "undefined") { if (PE.section[".data"]) { var nOffset = PE.section[".data"].FileOffset + PE.section[".data"].FileSize - 0x1024; bFPC = PE.findString(nOffset, 0x1024, "FPC ") != -1; } } ================================================ FILE: db/IPA/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = IPA; var X = IPA; ================================================ FILE: db/ISO9660/_ISO9660.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "ISO9660"); function detect() { if (ISO9660.isVerbose()) { sName = ISO9660.getFileFormatName(); sVersion = ISO9660.getFileFormatVersion(); sOptions = ISO9660.getFileFormatOptions(); if (sName) { bDetected = true; } } return result(); } ================================================ FILE: db/ISO9660/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = ISO9660; var X = ISO9660; ================================================ FILE: db/ISO9660/bootloader_Grub.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/GNU_GRUB meta("bootloader", "Grub"); function detect() { if (ISO9660.compare("'GRUB'", 0x00000180)) { bDetected = true; } return result(); } ================================================ FILE: db/ISO9660/filesystem_AppleHFS.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Hierarchical_File_System_(Apple) meta("filesystem", "Apple HFS"); function detect() { if (ISO9660.compare("'Apple_HFS'", 0x430) || ISO9660.compare("'Apple_map_partiton'", 0x230)) { sOptions = "ISO"; bDetected = true; } else if (ISO9660.compare("'Apple_HFS'", 0x440) || ISO9660.compare("'Apple_map_partiton'", 0x240)) { sOptions = "BIN"; bDetected = true; } return result(); } ================================================ FILE: db/ISO9660/iso_Rimage.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://rimage.incom.de/en/ meta("iso", "Rimage Image Server"); function detect() { if (Binary.compare("'Rimage Image Server Version: 8.6.604.1'", 0x00008373)) { sVersion = "8.6.604.1"; bDetected = true; } return result(); } ================================================ FILE: db/ISO9660/library_IMAPI.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://learn.microsoft.com/en-us/windows/win32/imapi/imapi-interfaces meta("library", "IMAPI"); function detect() { var sDataPreparer = ISO9660.getDataPreparerIdentifier(); if (sDataPreparer.indexOf("IMAPI ISO-9660 Formatter") !== -1) { sVersion = "1.0"; bDetected = true; // Check if it's Microsoft & Roxio version if (sDataPreparer.indexOf("Microsoft & Roxio") !== -1) { sOptions = "Microsoft & Roxio"; } } return result(); } ================================================ FILE: db/ISO9660/library_IMAPI2.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://learn.microsoft.com/en-us/windows/win32/imapi/imapi-interfaces meta("library", "IMAPI2"); function detect() { var sDataPreparer = ISO9660.getDataPreparerIdentifier(); if (sDataPreparer.indexOf("IMAPI2") !== -1) { bDetected = true; // Try to extract version if present // Format: "IMAPI2 (1.0) ISO9660 FORMATTER COPYRIGHT (C) 2004-2007 MICROSOFT" var nVerPos = sDataPreparer.indexOf("IMAPI2"); if (nVerPos !== -1) { var sVersionPart = sDataPreparer.substring(nVerPos + 6).trim(); if (sVersionPart.charAt(0) === '(') { var nClosePos = sVersionPart.indexOf(")"); if (nClosePos !== -1) { sVersion = sVersionPart.substring(1, nClosePos); } } } } return result(); } ================================================ FILE: db/ISO9660/library_libburn.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://dev.lovelyhq.com/libburnia/libburn meta("library", "libburn"); function detect() { var sDataPreparer = ISO9660.getDataPreparerIdentifier(); if (sDataPreparer.indexOf("LIBBURN") !== -1) { bDetected = true; // Try to extract version if present // Format: "XORRISO-1.5.4 2021.01.30.150001, LIBISOBURN-1.5.4, LIBISOFS-1.5.4, LIBBURN-1.5.4" var nVerPos = sDataPreparer.indexOf("LIBBURN-"); if (nVerPos !== -1) { var sVersionPart = sDataPreparer.substring(nVerPos + 8), nCommaPos = sVersionPart.indexOf(","); if (nCommaPos !== -1) { sVersion = sVersionPart.substring(0, nCommaPos); } else { // No comma, might be at end of string sVersion = sVersionPart.trim(); } } } return result(); } ================================================ FILE: db/ISO9660/library_libisoburn.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://dev.lovelyhq.com/libburnia/libisoburn meta("library", "libisoburn"); function detect() { var sDataPreparer = ISO9660.getDataPreparerIdentifier(); if (sDataPreparer.indexOf("LIBISOBURN") !== -1) { bDetected = true; // Try to extract version if present // Format: "XORRISO-1.5.4 2021.01.30.150001, LIBISOBURN-1.5.4, LIBISOFS-1.5.4, LIBBURN-1.5.4" var nVerPos = sDataPreparer.indexOf("LIBISOBURN-"); if (nVerPos !== -1) { var sVersionPart = sDataPreparer.substring(nVerPos + 11), nCommaPos = sVersionPart.indexOf(","); if (nCommaPos !== -1) { sVersion = sVersionPart.substring(0, nCommaPos); } else { var nSpacePos = sVersionPart.indexOf(" "); if (nSpacePos !== -1) { sVersion = sVersionPart.substring(0, nSpacePos); } } } } return result(); } ================================================ FILE: db/ISO9660/library_libisofs.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://dev.lovelyhq.com/libburnia/libisofs meta("library", "libisofs"); function detect() { var sDataPreparer = ISO9660.getDataPreparerIdentifier(); if (sDataPreparer.indexOf("LIBISOFS") !== -1) { bDetected = true; // Try to extract version if present // Format: "XORRISO-1.5.4 2021.01.30.150001, LIBISOBURN-1.5.4, LIBISOFS-1.5.4, LIBBURN-1.5.4" var nVerPos = sDataPreparer.indexOf("LIBISOFS-"); if (nVerPos !== -1) { var sVersionPart = sDataPreparer.substring(nVerPos + 9), nCommaPos = sVersionPart.indexOf(","); if (nCommaPos !== -1) { sVersion = sVersionPart.substring(0, nCommaPos); } else { var nSpacePos = sVersionPart.indexOf(" "); if (nSpacePos !== -1) { sVersion = sVersionPart.substring(0, nSpacePos); } } } } return result(); } ================================================ FILE: db/ISO9660/partition_EFI_PART.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/EFI_system_partition meta("partition", "EFI PART"); function detect() { if (ISO9660.compare("'EFI PART'", 0x00000200)) { bDetected = true; } return result(); } ================================================ FILE: db/ISO9660/tool_CDBurnerXP.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://cdburnerxp.se/ meta("tool", "CDBurnerXP"); function detect() { if (ISO9660.compare("'CDBURNERXP PRO 3'", 0x0000823e)) { sVersion = "Pro 3"; bDetected = true; } return result(); } ================================================ FILE: db/ISO9660/tool_CDIMAGE.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/oscdimg-command-line-options meta("tool", "CDIMAGE"); function detect() { var sAppId = ISO9660.getApplicationIdentifier(); if (sAppId.indexOf("CDIMAGE") !== -1) { bDetected = true; // Try to extract version if present // Format: "CDIMAGE 2.54 (01/01/2005 TM)" var nVerPos = sAppId.indexOf("CDIMAGE"); if (nVerPos !== -1) { var sVersionPart = sAppId.substring(nVerPos + 8).trim(), nSpacePos = sVersionPart.indexOf(" "); if (nSpacePos !== -1) { sVersion = sVersionPart.substring(0, nSpacePos); } } } return result(); } ================================================ FILE: db/ISO9660/tool_CeQuadrat.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("tool", "CeQuadrat"); function detect() { var sDataPreparer = ISO9660.getDataPreparerIdentifier().toUpperCase(); if (sDataPreparer.indexOf("CEQUADRAT") !== -1 && sDataPreparer.indexOf("ISO-9660 FORMATTER") !== -1) { bDetected = true; // Try to extract year/version from copyright notice // Format: "COPYRIGHT (C) 1995" or "COPYRIGHT (C) 1995-1998" var nIndex = sDataPreparer.indexOf("COPYRIGHT (C)"); if (nIndex !== -1) { var sYearPart = sDataPreparer.substring(nIndex + 14, nIndex + 30).trim(), nYearEnd = sYearPart.indexOf(" "); if (nYearEnd !== -1) { sVersion = sYearPart.substring(0, nYearEnd).trim(); } } } return result(); } ================================================ FILE: db/ISO9660/tool_ImgBurn.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.imgburn.com/ meta("tool", "ImgBurn"); function detect() { if (ISO9660.compare("'ImgBurn'", 0x00008373)) { sVersion = ISO9660.getString(0x0000837C, 7); bDetected = true; } return result(); } ================================================ FILE: db/ISO9660/tool_MKARCHISO.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/archlinux/archiso/blob/master/archiso/mkarchiso meta("tool", "MKARCHISO"); function detect() { if (ISO9660.compare("'REPARED BY MKARCHISO'", 0x000081bf)) { bDetected = true; } return result(); } ================================================ FILE: db/ISO9660/tool_NeroBurningROM.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://www.nero.com/ meta("tool", "Nero Burning ROM"); function detect() { var sAppId = ISO9660.getApplicationIdentifier(); if (sAppId.indexOf("NERO___BURNING_ROM") !== -1) { bDetected = true; } else if (sAppId.indexOf("NERO BURNING ROM") !== -1) { bDetected = true; // Try to extract version if present var nVerPos = sAppId.indexOf("VER "); if (nVerPos !== -1) { var sVersionRaw = sAppId.substring(nVerPos + 4, nVerPos + 13).trim(); // Convert version "12,0,20,0" -> "12.0.20000" var versionParts = sVersionRaw.split(","); if (versionParts.length >= 3) { var major = versionParts[0], minor = versionParts[1], build = parseInt(versionParts[2], 10) * 1000; sVersion = major + "." + minor + "." + build.toString(); } } } return result(); } ================================================ FILE: db/ISO9660/tool_PersonalRomMaker.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE meta("tool", "The Personal RomMaker"); function detect() { if (ISO9660.compare("'The Personal RomMaker (32-bit Windows 95 V4.10)'", 0x00000800)) { sVersion = "4.10"; sOptions = "Windows 95 32-bit"; bDetected = true; } return result(); } ================================================ FILE: db/ISO9660/tool_QuickToPix.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://phantom.sannata.org/viewtopic.php?t=40730 meta("tool", "QuickToPix"); function detect() { if (ISO9660.compare("'MI_QUICKTOPIX'", 0x000081bf)) { bDetected = true; } else if (ISO9660.compare("'MI QUICKTOPIX 2.00 BUILD 209_PHB_MPO'", 0x000081bf)) { sVersion = "2.00"; sOptions = "Build: 209_PHB_MPO"; bDetected = true; } return result(); } ================================================ FILE: db/ISO9660/tool_RoxioToast.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Roxio_Toast meta("tool", "Roxio Toast"); function detect() { if (ISO9660.compare("'TOAST 2.5 Partition'", 0x00000410)) { sVersion = "2.5"; bDetected = true; } else if (ISO9660.compare("..'Toast 3.0 PPC HFS Optimizer'", 0x0000040f)) { sVersion = "3.0"; sOptions = "PowerPC HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("'Toast 3.0.2 PPC HFS Optimizer'", 0x00000410)) { sVersion = "3.0.2"; sOptions = "PowerPC HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("'Toast 3.0.5 PPC HFS Optimizer'", 0x00000410)) { sVersion = "3.0.5"; sOptions = "PowerPC HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("....'Toast 3.5 PPC HFS Optimizer'", 0x0000040e)) { sVersion = "3.5"; sOptions = "PowerPC HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("'Toast 3.5.3 PPC Partition'", 0x00000410)) { sVersion = "3.5.3"; bDetected = true; } else if (ISO9660.compare("'Toast 3.5.4 PPC HFS Optimizer'", 0x00000410)) { sVersion = "3.5.4"; sOptions = "PowerPC HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("'Toast 3.5.5 PPC HFS Optimizer'", 0x00000410)) { sVersion = "3.5.5"; sOptions = "PowerPC HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("....'Toast 3.5.6 PPC Partition'", 0x0000040e)) { sVersion = "3.5.6"; sOptions = "PowerPC"; bDetected = true; } else if (ISO9660.compare("'Toast 3.5.6 PPC HFS Optimizer'", 0x00000410)) { sVersion = "3.5.6"; sOptions = "PowerPC HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("'Toast 3.5.7 PPC HFS Optimizer'", 0x00000410)) { sVersion = "3.5.7"; sOptions = "PowerPC HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("'Toast 3.5.7 PPC Partition'", 0x00000410)) { sVersion = "3.5.7"; sOptions = "PowerPC"; bDetected = true; } else if (ISO9660.compare("'Toast 4.0 PPC HFS Optimizer'", 0x00000410)) { sVersion = "4.0"; sOptions = "HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("....'Toast 4.1 Partition'", 0x0000040e)) { sVersion = "4.1"; bDetected = true; } else if (ISO9660.compare("....'Toast 4.1.3 Partition'", 0x0000040e)) { sVersion = "4.1.3"; bDetected = true; } else if (ISO9660.compare("'Toast F-4.1.3 Partition'", 0x00000410)) { sVersion = "F-4.1.3"; bDetected = true; } else if (ISO9660.compare("'Toast 5.0 HFS Optimizer'", 0x00000410)) { sVersion = "5.0"; sOptions = "HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("'Toast 5.0.2 HFS/Joliet Builder'", 0x00000410)) { sVersion = "5.0.2"; sOptions = "HFS/Joliet Builder"; bDetected = true; } else if (ISO9660.compare("'Toast 5.0.2 HFS Optimizer'", 0x00000410)) { sVersion = "5.0.2"; sOptions = "HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("'Toast 5.1.1 HFS Optimizer'", 0x00000410)) { sVersion = "5.1.1"; sOptions = "HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("'Toast 5.2.3 HFS Optimizer'", 0x00000410)) { sVersion = "5.2.3"; sOptions = "HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("'Toast 6.0 HFS Optimizer'", 0x00000410)) { sVersion = "6.0"; sOptions = "HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("..'Toast 6.0.7 HFS Optimizer'", 0x0000040f)) { sVersion = "6.0.7"; sOptions = "HFS Optimizer"; bDetected = true; } else if (ISO9660.compare("'Toast 9.0.2 HFS Optimizer'", 0x00000410)) { sVersion = "9.0.2"; sOptions = "HFS Optimizer"; bDetected = true; } return result(); } ================================================ FILE: db/ISO9660/tool_UltraISO.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.ultraiso.com/ meta("tool", "UltraISO"); function detect() { if (ISO9660.getString(0x8373) == "ULTRAISO") { sVersion = ISO9660.getString(0x837c); bDetected = true; } if (!bDetected) { var sAppId = ISO9660.getApplicationIdentifier(); if (sAppId.indexOf("UltraISO") !== -1) { bDetected = true; // Try to extract version if present // Format: "UltraISO V7.2 CD & DVD Image Creator, Copyright (c)2002-2004 EZB Systems, Inc." var nVerPos = sAppId.indexOf("UltraISO"); if (nVerPos !== -1) { var sVersionPart = sAppId.substring(nVerPos + 9).trim(); if (sVersionPart.charAt(0) === 'V') { var nSpacePos = sVersionPart.indexOf(" "); if (nSpacePos !== -1) { sVersion = sVersionPart.substring(1, nSpacePos); } } } } } return result(); } ================================================ FILE: db/ISO9660/tool_WinISO.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://winiso.com/ meta("tool", "WinISO"); function detect() { if (ISO9660.compare("'WinISO software'", 0x0000813e)) { bDetected = true; } return result(); } ================================================ FILE: db/ISO9660/tool_genisoimage.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Part of cdrkit project meta("tool", "genisoimage"); function detect() { var sAppId = ISO9660.getApplicationIdentifier().toUpperCase(); if (sAppId.indexOf("GENISOIMAGE") !== -1) { bDetected = true; // Try to extract version from copyright years // Format: "GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM" var nCdrkitPos = sAppId.indexOf("CDRKIT TEAM"); if (nCdrkitPos !== -1) { // Look for the year range before "CDRKIT TEAM" var sPart = sAppId.substring(0, nCdrkitPos), nLastCPos = sPart.lastIndexOf("(C)"); if (nLastCPos !== -1) { var sYearPart = sPart.substring(nLastCPos + 4).trim(), nSpacePos = sYearPart.indexOf(" "); if (nSpacePos !== -1) { sVersion = sYearPart.substring(0, nSpacePos).trim(); } } } } return result(); } ================================================ FILE: db/ISO9660/tool_xorriso.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://www.gnu.org/software/xorriso/ meta("tool", "xorriso"); function detect() { var sDataPreparer = ISO9660.getDataPreparerIdentifier(); if (sDataPreparer.indexOf("XORRISO") !== -1) { bDetected = true; // Try to extract version if present // Format: "XORRISO-1.5.4 2021.01.30.150001, LIBISOBURN-1.5.4, LIBISOFS-1.5.4, LIBBURN-1.5.4" var nVerPos = sDataPreparer.indexOf("XORRISO-"); if (nVerPos !== -1) { var sVersionPart = sDataPreparer.substring(nVerPos + 8), nSpacePos = sVersionPart.indexOf(" "); if (nSpacePos !== -1) { sVersion = sVersionPart.substring(0, nSpacePos); } } } return result(); } ================================================ FILE: db/Image/_Image.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "Image"); function detect() { if (Image.isVerbose()) { sName = Image.getFileFormatName(); sVersion = Image.getFileFormatVersion(); sOptions = Image.getFileFormatOptions(); if (sName) { bDetected = true; } } return result(); } ================================================ FILE: db/Image/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = Image; var X = Image; ================================================ FILE: db/JAR/_JAR.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("virtual machine", "JVM"); function detect() { if (JAR.isVerbose()) { sName = JAR.getOperationSystemName(); sVersion = JAR.getOperationSystemVersion(); sOptions = JAR.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/JAR/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = JAR; var X = JAR; ================================================ FILE: db/JAR/tool_SingleJar.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("tool", "SingleJar"); function detect() { if (JAR.getManifestRecord("Created-By") == "singlejar") { bDetected = true; } return result(); } ================================================ FILE: db/JPEG/_Jpeg.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "JPEG"); function detect() { sName = Jpeg.getFileFormatName(); sVersion = Jpeg.getFileFormatVersion(); sOptions = Jpeg.getFileFormatOptions(); if (sName) { bDetected = true; } return result(); } ================================================ FILE: db/JPEG/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = Jpeg; var X = Jpeg; ================================================ FILE: db/JPEG/camera_camera.2.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("camera", ""); function detect() { sName = Jpeg.getExifCameraName().replace(/\s{2,}/g, " ").trim(); if (sName) { bDetected = true; } return result(); } ================================================ FILE: db/JPEG/image_DQT.4.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("image", "DQT"); function detect() { bDetected = true; sOptions = Jpeg.getDqtMD5(); return result(); } ================================================ FILE: db/JPEG/image_comment.4.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("image", "comment"); function detect() { sOptions = Jpeg.getComment(); if (sOptions) { bDetected = true; } return result(); } ================================================ FILE: db/JPEG/tool_Tools.3.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("tool", ""); function detect() { if (Jpeg.isChunkPresent(0xE2)) { _setResult("tool", "FlashPix/ICC", "", ""); } if (Jpeg.isChunkPresent(0xE3)) { _setResult("tool", "Kodak", "", ""); } if (Jpeg.isChunkPresent(0xE4)) { _setResult("tool", "FlashPix", "", ""); } if (Jpeg.isChunkPresent(0xE5)) { _setResult("tool", "Ricoh", "", ""); } if (Jpeg.isChunkPresent(0xE6)) { _setResult("tool", "GoPro", "", ""); } if (Jpeg.isChunkPresent(0xE7)) { _setResult("tool", "Pentax/Qualcomm", "", ""); } if (Jpeg.isChunkPresent(0xE8)) { _setResult("tool", "Spiff", "", ""); } if (Jpeg.isChunkPresent(0xE9)) { _setResult("tool", "MediaJukebox", "", ""); } if (Jpeg.isChunkPresent(0xEA)) { _setResult("tool", "PhotoStudio", "", ""); } if (Jpeg.isChunkPresent(0xEB)) { _setResult("tool", "HDR", "", ""); } if (Jpeg.isChunkPresent(0xEC)) { _setResult("tool", "Photoshop", "", "Web"); } if (Jpeg.isChunkPresent(0xED)) { _setResult("tool", "Photoshop", "", ""); } if (Jpeg.isChunkPresent(0xEE)) { _setResult("tool", "Adobe", "", ""); } if (Jpeg.isChunkPresent(0xEF)) { _setResult("tool", "GraphicConverter", "", ""); } return result(); } ================================================ FILE: db/JavaClass/_JavaClass.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "JavaClass"); function detect() { sName = JavaClass.getFileFormatName(); sVersion = JavaClass.getFileFormatVersion(); sOptions = JavaClass.getFileFormatOptions(); bDetected = true; return result(); } ================================================ FILE: db/JavaClass/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = JavaClass; var X = JavaClass; ================================================ FILE: db/LE/_LE.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "Windows"); function detect() { if (LE.isVerbose()) { sName = LE.getOperationSystemName(); sVersion = LE.getOperationSystemVersion(); sOptions = LE.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/LE/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = LE; var X = LE; ================================================ FILE: db/LE/compiler_Watcom_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Watcom C"); function detect() { if (LE.compareEP("eb$$fb83e4..8bdc891d........891d........66b8....66a3........bb........2bc0b430cd21a2")) { sName = "Watcom C/C++"; sOptions = "1988-93"; bDetected = true; } else if (LE.compareEP("eb$$fb83e4..89e3891d........891d........66b8....66a3........bb........29c0b430cd21a2")) { sName = "Open Watcom C/C++"; sOptions = "1988-2002"; bDetected = true; } else if (LE.compareEP("eb$$fb83e4..89e3891d........891d........55575666b8....cd21668cc00f00e875..0f00eb75")) { sName = "Open Watcom C/C++"; sOptions = "1988-1995"; bDetected = true; } sLang = "C/C++"; return result(); } ================================================ FILE: db/LE/packer_UPX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "UPX"); function getUPXOptions(nOffset) { var nMethod = LE.readByte(nOffset + 2); var nLevel = LE.readByte(nOffset + 3); var sCompression = ""; switch (nMethod) // From http://sourceforge.net/p/upx/code/ci/default/tree/src/conf.h { case 2: sCompression = "NRV2B_LE32"; break; case 3: sCompression = "NRV2B_8"; break; case 4: sCompression = "NRV2B_LE16"; break; case 5: sCompression = "NRV2D_LE32"; break; case 6: sCompression = "NRV2D_8"; break; case 7: sCompression = "NRV2D_LE16"; break; case 8: sCompression = "NRV2E_LE32"; break; case 9: sCompression = "NRV2E_8"; break; case 10: sCompression = "NRV"; break; case 14: sCompression = "LZMA"; break; case 15: sCompression = "zlib"; break; } if (sCompression) { sOptions = sOptions.append(sCompression); if (nLevel == 8) { sOptions = sOptions.append("best"); } else { sOptions = sOptions.append("brute"); } } } function getUPXVersion() { var nEP = LE.getEntryPointOffset(); var nOffset1 = LE.findString(nEP - 1024, 1024, "$Id: UPX "); var nOffset2 = LE.findString(nEP, 1024, "UPX!"); if (nOffset2 != -1) { getUPXOptions(nOffset2 + 4); } if (nOffset1 != -1) { sVersion = LE.getString(nOffset1 + 9, 4); } if ((sVersion == "") && (nOffset2 != -1)) { sVersion = LE.getString(nOffset2 - 5, 4); } } function detect() { if (LE.compareEP("bf........6957..........061e07578db7........8dbf........b9........fdf3a5fc8d77..5f83cd..57e9")) { sOptions = "for Watcom C"; bDetected = true; } else if (LE.compareEP("bf........be........6957..........57fc31db83cd..909001db75")) { sOptions = "for Watcom C"; bDetected = true; } getUPXVersion(); return result(); } ================================================ FILE: db/LX/_LX.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "OS/2"); function detect() { if (LX.isVerbose()) { sName = LX.getOperationSystemName(); sVersion = LX.getOperationSystemVersion(); sOptions = LX.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/LX/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = LX; var X = LX; ================================================ FILE: db/LX/compiler_Borland_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Borland C++"); function detect() { if (LX.compareEP("8b4424..a3........5868........50e8........e9$$$$$$$$558bec83ec..535756e8........68")) { sVersion = "1992"; } else if (LX.compareEP("8b4424..a3........5868........50e9$$$$$$$$558bec83ec..53575668........ff35")) { sVersion = "1992"; } bDetected = bDetected || Boolean(sVersion) || Boolean(sOptions); sLang = "C/C++"; return result(); } ================================================ FILE: db/LX/compiler_Watcom_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Watcom C/C++"); function detect() { if (LX.compareEP("e9$$$$$$$$535152565783ec..e8........8b5c24..a3........894424..eb")) { sOptions = "1988-95"; } else if (LX.compareEP("e9$$$$$$$$535152565783ec..8b7424..83c724....74..e8")) { sOptions = "1988-95"; } else if (LX.compareEP("e9$$$$$$$$53515283ec..b8........8b4c24..8b5c24..8b5424..e8........89e0")) { sOptions = "1988-95"; } else if (LX.compareEP("e9$$$$$$$$535152565783ec..8b7424..837c24....74..e8")) { sOptions = "1988-95"; } else if (LX.compareEP("e9$$$$$$$$535152565781ec........8bb424........83bc24..........74..e8")) { sOptions = "1988-95"; } else if (LX.compareEP("e9$$$$$$$$5351525657558b5c24..8b7424..85f674..5653e8........8b15")) { sOptions = "1988-94"; } else if (LX.compareEP("e9$$$$$$$$53515283ec..837c24....74..e8........ba........89c3")) { sOptions = "1988-94"; } else if (LX.compareEP("e9$$$$$$$$53575581ec........8b9c24........8b9424........85d274..5253")) { sOptions = "1988-94"; } else if (LX.compareEP("e9$$$$$$$$535657558b5c24..8b7424..85f674..5653e8........8b15")) { sOptions = "1988-94"; } else if (LX.compareEP("e9$$$$$$$$535152575581ec........8b9c24........8b9424........85d274..5253")) { sOptions = "1988-94"; } else if (LX.compareEP("e9$$$$$$$$5351525657558b5c24..8b7424..85f674..8b15........83fa..7e..8d5a..31c0891d")) { sOptions = "1988-2002"; } else if (LX.compareEP("eb$$e9$$$$$$$$51525589e550508b45..eb..89d08d50..8038..75..8b45..a3........8915")) { sName = "Watcom C 386"; sOptions = "1989, 1992"; } else if (LX.compareEP("eb$$e9$$$$$$$$51525589e5837d....74..e8........89c2e8........89d0")) { sName = "Watcom C 386"; sOptions = "1989, 1992"; } else if (LX.compareEP("e9$$$$$$$$535657558b5c24..8b7424..85f674..8b15........83fa..7e..8d5a..31c0")) { sName = "Open Watcom C/C++"; sOptions = "1988-2002"; } else if (LX.compareEP("e9$$$$$$$$535152565589e583ec..b8........e8........a1........83c0..24..31d2")) { sName = "Open Watcom C/C++"; sOptions = "1988-2002"; } else if (LX.compareEP("e9$$$$$$$$53515257c8......8b5d..837d....0f84........833d..........7e..ff")) { sName = "Open Watcom C/C++"; sOptions = "1988-2002"; } bDetected = bDetected || Boolean(sVersion) || Boolean(sOptions); sLang = "C/C++"; return result(); } ================================================ FILE: db/MACH/_MACH.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "macOS"); function detect() { if (MACH.isVerbose()) { sName = MACH.getOperationSystemName(); sVersion = MACH.getOperationSystemVersion(); sOptions = MACH.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/MACH/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = MACH; var X = MACH; ================================================ FILE: db/MACH/compiler_Delphi.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Delphi"); function detect() { var nSection = MACH.getSectionNumber("__rodata"); if (nSection != -1) { var nOffset = MACH.findSignature(ACH.getSectionFileOffset(nSection), MACH.getSectionFileSize(nSection), "'TObject'"); if (nOffset != -1) { sName = "Embarcadero Delphi"; sVersion = "XE2-XE6" bDetected = true; } } sLang = "Delphi"; return result(); } ================================================ FILE: db/MACH/compiler_Rust.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Rust"); function detect() { //x86-64 if (MACH.compareEP("554889e5415741564154534883ec..31ffbe........31c0e8........83f8")) { bDetected = true; } else if (MACH.compareEP("554889e54883ec..4889f14863d7488d05........488945..488d35........488d7df84531c0")) { bDetected = true; } else if (MACH.compareEP("554889e5415741564154534881ec........31ffbe........31c0e8........83f8")) { bDetected = true; } else if (MACH.compareEP("554889e541574156534881ec........31ffbe........31c0e8........83f8")) { bDetected = true; } else if (MACH.compareEP("554889e541574156534883ec..31ffbe........31c0e8........83f8")) { bDetected = true; } //ARM64 if (MACH.compareEP("ff8300d1fd7b01a9fd430091e30301aa027c4093")) { bDetected = true; } else if (MACH.compareEP("ff....d1fc6f..a9fa67..a9f85f..a9f657..a9f44f..a9")) { bDetected = true; } else if (MACH.compareEP("ffc303d1fa670aa9f85f0ba9f6570ca9f44f0da9fd7b0ea9")) { bDetected = true; } else if (MACH.compareEP("ff8302d1f85f06a9f65707a9f44f08a9fd7b09a9fd430291")) { bDetected = true; } sLang = "Rust"; return result(); } ================================================ FILE: db/MACH/compiler_Zig.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Zig"); function detect() { if ((MACH.isSectionNamePresent("__cstring")) && (MACH.isDeepScan())) { var nIndex = MACH.getSectionNumber("__cstring"); bDetected = MACH.findSignature( MACH.getSectionFileOffset(nIndex), MACH.getSectionFileSize(nIndex), "5a49475f44454255475f434f4c4f52"); // ANSI ZIG_DEBUG_COLOR } sLang = "Zig"; return result(); } ================================================ FILE: db/MACH/compiler_gcc.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "gcc"); function detect() { /* if(MACH.isLibraryPresent("libstdc++.6.dylib")) { sOptions="libstdc++"; bDetected=1; } else if(MACH.isLibraryPresent("libc++.1.dylib")) { sOptions="C++"; bDetected=1; } else if(MACH.isLibraryPresent("libgcc_s.1.dylib")) { sOptions="C/C++"; bDetected=1; } else if(MACH.isLibraryPresent("libobjc.A.dylib")) { sOptions="Objective-C"; bDetected=1; } */ if (MACH.isLibraryPresent("libgcc_s.1.dylib")) { sOptions = "C/C++"; bDetected = true; } sLang = "C/C++"; return result(); } ================================================ FILE: db/MACH/library_Carbon.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "Carbon"); function detect() { if (MACH.isLibraryPresent("Carbon")) { bDetected = true; } else if (MACH.isLibraryPresent("CarbonCore")) { bDetected = true; } return result(); } ================================================ FILE: db/MACH/library_Cocoa.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "Cocoa"); function detect() { if (MACH.isLibraryPresent("Cocoa")) { bDetected = true; } return result(); } ================================================ FILE: db/MACH/library_QT.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "QT"); function getVersion() { var current = MACH.getLibraryCurrentVersion("QtCore"); return ((current >> 16) & 0xFF) + "." + ((current >> 8) & 0xFF) + "." + (current & 0xFF); } function detect() { if (MACH.isLibraryPresent("QtCore")) { sVersion = getVersion(); bDetected = true; } return result(); } ================================================ FILE: db/MACH/library_WebKit.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "WebKit"); function detect() { if (MACH.isLibraryPresent("WebKit")) { bDetected = true; } return result(); } ================================================ FILE: db/MACH/library_java.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "Java Runtime"); function detect() { if (MACH.isLibraryPresent("libjava.dylib")) { bDetected = true; } else if (MACH.isLibraryPresent("libjvm.dylib")) { bDetected = true; } sLang = "Java"; return result(); } ================================================ FILE: db/MACH/packer_UPX.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "UPX"); function detect() { if (MACH.getNumberOfSections() == 2) { var nOffset = MACH.findString(0, MACH.getSize(), "$Id: UPX"); if (nOffset != -1) { sVersion = MACH.getString(nOffset + 9, 4); bDetected = true; } } return result(); } ================================================ FILE: db/MACH/packer_Virbox.2.sg ================================================ // Detect It Easy: detection rule file // Author: Vito <@ScalletaZ> meta("packer", "Virbox"); function detect() { if (MACH.getSectionNumber("__vdata") != -1) { sVersion = "Virbox Protector"; bDetected = true; } return result(); } ================================================ FILE: db/MACHOFAT/_MACHOFAT.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "macOS"); function detect() { if (MACHOFAT.isVerbose()) { sName = MACHOFAT.getOperationSystemName(); sVersion = MACHOFAT.getOperationSystemVersion(); sOptions = MACHOFAT.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/MACHOFAT/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = MACHOFAT; var X = MACHOFAT; ================================================ FILE: db/MACHOFAT/converter_lipo.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("converter", "lipo"); function detect() { bDetected = true; // Always true return result(); } ================================================ FILE: db/MFC ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // MFC is tested twice - as a library and as a compiler (to distinguish C from // C++). Detect it once here. var aMFC; if (!aMFC && PE) { aMFC = PE.isLibraryPresentExp(/^MFC(\d+?)(u?)(d?)\.dll/i); if (!aMFC) { if (PE.section[".data"] && PE.isSignatureInSectionPresent(PE.section[".data"].Number, "'CMFCComObject'")) { aMFC = 1; } } } ================================================ FILE: db/MSDOS/ACE.6.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood includeScript("ACE"); function detect() { detect_ACE(0); return result(); } ================================================ FILE: db/MSDOS/Adys_COM2EXE.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("converter", "Ady`s COM2EXE"); function detect() { if (MSDOS.compare("'Ady'27", 28)) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Adys_Glue.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Ady`s Glue"); function detect() { if (MSDOS.compareEP("2E........0E1FBF....33DB33C0AC")) { sVersion = "1.10"; bDetected = true; } else if (MSDOS.compareEP("2E8C06....0E0733C08ED8BE....BF....FCB9....56F3A51E075F")) { sVersion = "0.10"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Anti-hack_encryption_system.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Anti-hack encryption system"); function detect() { if (MSDOS.compareEP("eb$$bd....33c08ec026c706........268c0e....8b46..26a3....268c0e....0e07")) { sOptions = "by Rezaul Kabir //Shuvro"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Aztec_C-86.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Aztec C-86"); function detect() { if (MSDOS.compareEP("bd....85ed75..8cdd2e8c1e....8b1e....2bdd81fb....76..8d9e....8cc02bd8b4..cd21bb....8ec5")) { sVersion = "3.40"; sOptions = "1988"; bDetected = true; } else if (MSDOS.compareEP("bd....85ed75..b8....e9....2e8c1e....8ec5268c1e....bd....83c5..d1ddb1..d3ed81e5....8cc2")) { sVersion = "3.40b"; sOptions = "1986"; bDetected = true; } else if (MSDOS.compareEP("bd....85ed75..8cdd8b1e....2bdd81fb....76..8d9e....8cc02bd8b4..cd21bb....8ec5268c1e....b1..d3e3")) { sVersion = "5.2a"; sOptions = "1992"; bDetected = true; } else if (MSDOS.compareEP("bd....85ed75..b8....50e8....8ec5268c1e....bd....83c5..d1ddb1..d3ed81e5....8cc203ea268b1e....d3eb")) { sVersion = "5.2a"; sOptions = "1992"; bDetected = true; } else if (MSDOS.compareEP("bd....85ed75..b8....509a........8ec5268c1e....bd....83c5..d1ddb1..d3ed81e5....8cc203ea268b1e....d3eb")) { sVersion = "5.2a"; sOptions = "1992"; bDetected = true; } else if (MSDOS.compareEP("bd....85ed75..b0..e9....2e8c1e....8ec5268c1e....bd....83c5..d1ddb1..d3ed81e5....8cc203ea268b1e....d3eb")) { sVersion = "5.2a"; sOptions = "1992"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed82e80........ba....75..e8....3d....75..e9$$$$8cc38edb2e891e....be....8a0c80f9..74..80f9..7e")) { sVersion = "3.20X"; bDetected = true; } else if (MSDOS.compareEP("eb$$3d....74..eb$$2ec606......502e891e....2e890e....2e8916....8cd82ea3....8cc02ea3....2e8936")) { sVersion = "3.20X"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/BlackWolf_Protection.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "BlackWolf Protection"); function detect() { if (MSDOS.compareEP("061e0e0e071fbe....b9....871481c2....53e8")) { sOptions = "1996 by p.q."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Black_fist.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "BlacK FiST"); function detect() { if (MSDOS.compareEP("eb$$061ee8....1f072ea1....2e8b1e....8cd12e2b0e....fa8ed1fb5053cb")) { sOptions = "1993"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Borland_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("compiler", "Borland C/C++"); function detect() { var nOffset = 0; if (MSDOS.compareEP("FB")) { nOffset = 1; } if (MSDOS.compareEP("BA....2E8916....B430CD218B2E02008B1E2C008EDA", nOffset)) { var nDataSeg = MSDOS.readWord(MSDOS.getEntryPointOffset(nOffset + 1)); nOffset = MSDOS.addressToOffset(nDataSeg); bDetected = true; } else if (MSDOS.compareEP("8CCA2E8916....B430CD218B2E02008B1E2C008EDAA3")) { var nDataOfs = MSDOS.readWord(MSDOS.getEntryPointOffset(22)); nOffset = MSDOS.addressToOffset(0, nDataOfs - 120); bDetected = true; } nOffset = MSDOS.findString(nOffset, 64, " - Copyright "); if (nOffset != -1) { sVersion = MSDOS.getString(nOffset + 13, 4); if (MSDOS.compare("43", nOffset - 1)) { sName = "Turbo C"; if (sVersion == "(c) ") { sVersion = MSDOS.getString(nOffset + 17, 4); } } else if (MSDOS.compare("'Turbo'", nOffset - 9)) { sName = "Turbo C/C++"; } else if (sVersion == "1991") { sVersion = "3.1"; } else if (sVersion == "1994") { sVersion = "4.X"; } bDetected = true; } if (MSDOS.compareEP("b4..cd103c..74..b8....cd10ba....2e8916....8b2e....8b1e....8eda8c06....891e....892e....a1")) { sVersion = "1991"; bDetected = true; } else if (MSDOS.compareEP("ba....2e8916....b430cd218b2e....8b1e....8edaa3....8c06....891e....892e....e8")) { sVersion = "1991"; bDetected = true; } else if (MSDOS.compareEP("ba....2e8916....b430cd218b2e....8b1e....8edaa3....8c06....891e....892e....c43e....8bc78bd8")) { sVersion = "1988"; bDetected = true; } else if (MSDOS.compareEP("BA....2E89......B4..CD218B......8B......8EDAA3....8C......89......89......C7..........E8....C4......8bc78bd8b9....26........75")) { sName = "Turbo C"; sVersion = "1988"; bDetected = true; } else if (MSDOS.compareEP("BA....2E89......B4..CD218B......8B......8EDAA3....8C......89......89......8cd22bea8b3e....81ff....73..bf....893e....b1")) { sName = "Turbo C"; sVersion = "1988"; bDetected = true; } else if (MSDOS.compareEP("BA....2E89......B4..CD218B......8B......8EDAA3....8C......89......53E8....0733FF2BDB8BC3B9....FCF2AEE3..4326......75..80")) { sName = "Turbo C"; sVersion = "1990"; bDetected = true; } else if (MSDOS.compareEP("FBBA....2E89......B430CD218B......8B......8EDAA3....8C......89......89......C706........E8....C4......8BC78BD8B9....2681")) { sName = "Turbo C"; sVersion = "1987"; bDetected = true; } else if (MSDOS.compareEP("FB8cca2E89......B430CD218B......8B......8EDAA3....8C......89......89......C706........E8....C4......8BC78BD8B9....2681")) { sName = "Turbo C"; sVersion = "1987"; bDetected = true; } else if (MSDOS.compareEP("BA....2E89......B430CD218B......8B......8EDAA3....8C......89......89......C706........8ec333c0b9....8bf88bd82681......75")) { sName = "Turbo C"; sVersion = "1987"; bDetected = true; } else if (MSDOS.compareEP("8cca2E89......B430CD218B......8B......8EDAA3....8C......89......89......C706")) { sName = "Turbo C"; sVersion = "1988"; bDetected = true; } else if (MSDOS.compareEP("8cca2E89......B430CD218B......8B......8EDAA3....8C......89......89......E8")) { sName = "Turbo C"; sVersion = "1990"; bDetected = true; } else if (MSDOS.compareEP("8cd8bb....8edb8cd38bccfa8e16....bc....fbe8....fa8ed38be1fbea")) { sName = "Turbo C"; sVersion = "1988"; bDetected = true; } sLang = sName.indexOf("C++") !== -1 ? "C" : "C++"; return result(); } ================================================ FILE: db/MSDOS/Borland_Pascal.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Borland Pascal"); function detect() { if (MSDOS.compareEP("9AFFFF00009AFFFF00005589E531C09AFFFF0000")) { sVersion = "7.0*"; bDetected = true; } else if (MSDOS.compareEP("B8....BB....8ED08BE38CD88EC00E1FA1....25....A3....E8....833E......75")) { sVersion = "7.0*"; sOptions = "Protected Mode"; bDetected = true; } else if (MSDOS.compareEP("B8....8ED88C......8CD38CC02BD88BC405....C1....03D8B4..CD210E")) { sVersion = "7.0*"; bDetected = true; } else if (MSDOS.compareEP("9a########ba....8eda8c06....33ed8bc405....b1..d3e88cd203c2a3....a3")) { sVersion = "7.0"; bDetected = true; } else if (MSDOS.compareEP("9a########ba....8eda8c06....33ede8....e8....8bc405....b1..d3e88cd203c2a3....a3....0306....a3....a3....a3....a3....8e06....26a1....a3....c706")) { sVersion = "6.0"; bDetected = true; } else if (MSDOS.compareEP("9a########06ba....8eda268b3e....8ec25b8bef83ed..1eb8....8ed8b9....2bc8d1e1")) { sVersion = "6.0-7.0"; bDetected = true; } else if (MSDOS.compareEP("9a########ba....8eda8c06....8bc405....a3....8c16....05....b1..d3e88cd203c2a3....a3")) { sVersion = "6.0-7.0"; bDetected = true; } else if (MSDOS.compareEP("9a########ba....8edae8....8c06....33ed8bc405....b1..d3e88cd203c2c706")) { sVersion = "6.0-7.0"; bDetected = true; } else if (MSDOS.compareEP("9a########5589e50ee8$$$$5589e583ec..31c0")) { sVersion = "6.0-7.0"; bDetected = true; } else if (MSDOS.compareEP("9a########ba....8eda8c06....8bc405....b1..d3e88cd203c2a3....a3....26a1....2d....a3....c706")) { sVersion = "4.0-6.0"; sOptions = "1987"; bDetected = true; } else if (MSDOS.compareEP("9a########54583bc475..9c585080cc..509d9c589d80e4..75..bb....e8....b8....cd21ba....8eda")) { sVersion = "6.0-7.0"; sOptions = "1992 by Borland & Eagle Performance Software"; bDetected = true; } else if (MSDOS.compareEP("9a........5589e5bf....0e57e8$$$$f9")) { sName = "Turbo Pascal"; sVersion = "6.0-7.0"; bDetected = true; } else if (MSDOS.compareEP("9a########b8....8ed88c06....cb")) { sName = "Turbo Pascal"; sVersion = "6.0-7.0"; bDetected = true; } else if (MSDOS.compareEP("9a########ba....8eda8c06....b430cd2186c43d....73..0e1f")) { sName = "Turbo Pascal"; sVersion = "6.0-7.0"; bDetected = true; } else if (MSDOS.compareEP("31ed9a########2e8e1e....b451cd21891e....803e......74..f706........74..e8")) { sName = "Turbo Pascal"; sVersion = "6.0-7.0"; bDetected = true; } if (MSDOS.compareEP("9a########f860f972..8bdc36c51f83c3..807f....74..807f")) { sName = "Turbo Pascal"; sVersion = "6.0-7.0"; bDetected = true; } else if (MSDOS.compareEP("9A0000")) { var nDataSeg = MSDOS.readWord(MSDOS.getEntryPointOffset(3)); var nOffset = MSDOS.addressToOffset(nDataSeg); nOffset = MSDOS.findSignature(nOffset, Math.min(1024, MSDOS.getSize() - nOffset), "'Portions Copyr ight (c) 1983,9'..' Borland'"); if (nOffset != -1) { switch (MSDOS.getString(nOffset + 29, 1)) { case "0": sVersion = "5.0"; sName = "Turbo Pascal"; break; // guess case "1": sVersion = "6.0"; sName = "Turbo Pascal"; break; // guess case "2": sVersion = "7.0"; break; } bDetected = true; } } sLang = "Pascal"; return result(); } ================================================ FILE: db/MSDOS/Borland_RTM.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "Borland RTM DPMI loader"); function getBLVersion() { var sResult = ""; var nOffset = MSDOS.findString(0, MSDOS.getSize(), "RTM loader version") if (nOffset != -1) { sResult = MSDOS.getString(nOffset + 19); sResult = sResult.substr(0, sResult.indexOf(' ')); } return sResult; } function detect() { if (MSDOS.compareEP("b8....8ed8b8....bb....8ed08be38926....0626......8ec0263b......74..e9")) { sVersion = "1.0-1.5"; bDetected = true; } if (bDetected) { var sBL = getBLVersion(); if (sBL) { sVersion = sBL; } } return result(); } ================================================ FILE: db/MSDOS/Borland_TDS.5.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("debug", "Borland TLINK Symbol Table Present"); function detect() { if (MSDOS.compareOverlay("FB52")) { var offset = MSDOS.getOverlayOffset(); var minor = MSDOS.readByte(offset + 0x2); var major = MSDOS.readByte(offset + 0x3); var minorStr = ((minor >> 4) * 10 + (minor & 0x0F)).toString(); var majorStr = ((major >> 4) * 10 + (major & 0x0F)).toString(); sVersion = majorStr + "." + minorStr; sOptions = "TDS"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Borland_TLINK.5.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("linker", "Borland TLINK"); function detect() { var nVer = MSDOS.readWord(0x1E); if ((nVer & 0xFF) == 0xFB) { sVersion = ((nVer >> 8) / 16).toFixed(1); bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/CSCRYPT_Pro.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CSCRYPT Pro"); function detect() { if (MSDOS.compareEP("8d36....565f81ef....b8....81ef....81c0....81f7....2e2935474781c6....e9")) { sVersion = "3.30/386"; sOptions = "1995-97 by Christian Schwarz"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Concurrent_Small_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Concurrent Small C"); function detect() { if (MSDOS.compareEP("b8....8ed826a1....2d....80fc..72..9090b8....b1..d3e0fa8cdb8ed38be050fbb8....2d....d3e08bd8fec7fec73b..72..9090")) { sVersion = "1.0"; sOptions = "1996 by Andy Yuen"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/CopyQM_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "CopyQM SFX"); function detect() { if (MSDOS.compareEP("e9$$$$b8....8ec0a1....26a3....268c1e")) { if (MSDOS.compareOverlay("'TX'")) { sVersion = "3.24"; sOptions = "1996 by Sydex"; bDetected = true; } } return result(); } ================================================ FILE: db/MSDOS/Crypt_(Dismember).2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Cryptor by Dismember"); function detect() { if (MSDOS.compareEP("1E8CDA83....8EDA8EC2BB....BA....85D274..B4..33FF33F6B9....AC32C4C0....02..2E........AAE2")) { sVersion = "1.3"; bDetected = true; } else if (MSDOS.compareEP("0E179C58F6....74..E9....1EB0..E6..8CDA83....8EDA8EC2BB....BA....85D274..B4..33FF33F6B9")) { sVersion = "1.7"; bDetected = true; } else if (MSDOS.compareEP("0E179C58F6....74..EB$$b0..e6..33c9e2..b430cd213c..73..33c00650cb")) { sVersion = "1.7"; bDetected = true; } else if (MSDOS.compareEP("fa061e8cdd83c5..2e012e....2e012e....e8....e8....1f072e8e16....2e8b26....fb2eff2e")) { sVersion = "2.0"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$bf....8bf7acad918ae157ac32c4f6d0d0c412e1aae2")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Crypt_(LightShow).2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Crypt by LightShow //ECLIPSE"); function detect() { if (MSDOS.compareEP("e9$$$$eb$$8cc8fa8ed0bc....fb8cc0bb....83e8..8ed833f64b8ccd8cc02ea3....33c08ec026a1....2ea3....26a1")) { sVersion = "1.21"; bDetected = true; } else if (MSDOS.compareEP("eb$$8cc883e8..8ed833f68ccb8cc02ea3....2bc08ec08bf8b9....26ff36....26ff36....26894d..26895d..b9")) { sVersion = "1.15"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$eb$$8cc8fa8ed0bc....8cc0bb....83e8..8ed833f64b8ccd8cc02ea3....5333c08ec0268c0e....26c706........1f")) { sVersion = "1.20"; bDetected = true; } else if (MSDOS.compareEP("eb$$8cc8fa8ed0bc....fb8cc0bb....83e8..8ed833f64b8ccd8cc02ea3....33c08ec026a1....2ea3....26a1")) { bDetected = true; } else if (MSDOS.compareEP("eb$$2e8b36....2e8974..8ccb8cc02e8944..2bc08ec08ed88bf82e8b4c..81c1....6a..ff36....ff36....894d..895d")) { sVersion = "1.11"; sOptions = "1994"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/DAEMON_Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "DAEMON Protect"); function detect() { if (MSDOS.compareEP("60609C8CC932C9E30C520F014C24FE5A83C20C8B1A9D61")) { sVersion = "0.6.7"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/DOS32_loader.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("loader", "DOS32 loader"); function detect() { if (MSDOS.compareEP("8cd88ccb2bd88bc4b1..d3e803d843b4..cd218e06....8cd80e1fa3....a3....a3....fc33c033ffeb")) { sVersion = "3.3"; sOptions = "1995 by Adam Seychell"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/DOS_16M.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "DOS/16M DOS Extender"); function detect() { if (MSDOS.compareEP("bf....8ed781c4....be....2bf73689......8bc6b1..d3e04836a3....be....468936....8cc32bdef7dbb44acd21368c......1607fcbf....b9....2bcf33c0")) { sOptions = "1991 by Rational Systems, Inc."; bDetected = true; } else if (MSDOS.compareEP("bf....8ec78ed7bc....368c......ff36....268f......be....ac8ad8b7..88388b3e....4f8ec726a1....36f726....4836a3....8e06....33c08bc8f7d18bf8f2ae26")) { sOptions = "1994 by Tenberry Software Inc."; bDetected = true; } else if (MSDOS.compareEP("bf....8ec78ed7bc....368c1e....ff36....368f06....be....ac8ad8b7..88388b3e....4f8ec726a1....36f726....4836a3....8e06....33c08bc8f7d18bf8f2ae26")) { sOptions = "1995 by Tenberry Software"; bDetected = true; } else if (MSDOS.compareEP("bf....8ec78ed7bc....368c1e....ff36....368f06....be....ac8ad8b7..883816078b3e....4f8ec726a1....36f726....4836a3....8e06....33c08bc8f7d18bf8f2ae26")) { sOptions = "1994 by Rational Systems, Inc."; bDetected = true; } else if (MSDOS.compareEP("bf....8ec78ed7bc....368c1e....1607be....ac98508b3e....4f8ec726a1....c1e0..4836a3....8e06....33c08bc8f7d18bf8f2ae26")) { sOptions = "1993 by Rational Systems, Inc."; bDetected = true; } else if (MSDOS.compareEP("bf....8ed781c4....be....2bf7368926....368926....8bc6b1..d3e04836a3....be....468936....8cc32bdef7dbb4..cd21")) { sOptions = "1989 by Rational Systems, Inc."; bDetected = true; } else if (MSDOS.compareEP("BF....8ED781C4....BE....2BF78BC6B1..D3E04836A3....368926....BE....468936....8CC32BDEF7DBB4..CD21368C")) { sOptions = "1987-1992 by Rational Systems, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/DOS_32A.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "DOS/32A DOS Extender"); function detect() { if (MSDOS.compareEP("fb0e1f8c1e....8c06....8c16....26a1....a3....fce8....e8....e8....8cd0268b36....05")) { sVersion = "R9-07.0101.2011"; sOptions = "1996-98, 2002 by Narech Koumar (Supernar Systems, Ltd.)"; bDetected = true; } else if (MSDOS.compareEP("0e1f8cc08cd3a3....2bd88bc4d1e8d1e8")) { sVersion = "R8-07.0101.0076"; sOptions = "1996-98, 2002 by Narech Koumar (Supernar Systems, Ltd.)"; bDetected = true; } else if (MSDOS.compareEP("0e1f8c1e....8c06....8c16....26a1....a3....fbfce8")) { sVersion = "04-20-06"; sOptions = "1996-2006 by Narech Koumar (Supernar Systems, Ltd.)"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Digital_Research_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Digital Research C"); function detect() { if (MSDOS.compareEP("eb$$0e17bc....a1....8cdb0e1f891e....a3....8cc80306....a3....b9....2bdb8bf3bf....8cc803050306")) { sVersion = "1.1"; sOptions = "1983"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/Disk_eXPress.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("sfx", "Disk eXPress"); function detect() { if (MSDOS.compareOverlay("be9b8710415302")) { if (MSDOS.compareEP("fca3....891e....49890e....bb....8c1f83e4..8967..b8....50")) { sOptions = "1991-93 by Albert J. Shan"; bDetected = true; } } return result(); } ================================================ FILE: db/MSDOS/EMMXXXX0_check.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "EMMXXXX0 check by Symantec"); function detect() { if (MSDOS.compareEP("b8....cd213c..73..0e1fba....b409cd210633c050cb8cd88ccbfabc....8ed3fbfc8ec3bf....be....b9....fc")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/EXETools_COM2EXE.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "EXETools COM2EXE"); function detect() { if (MSDOS.compareEP("e800005d83ed..8cda2e8996....83c2..8eda8ec22e0196....60bb....ba....85d274..b4..33ff33f6b9....ac")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/EXE_Manager.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "EXE Manager"); function detect() { if (MSDOS.compareEP("b4301e06cd212ea3....bf....b9....33c02e....47e2..2e3b06....74..b8....cd1033c050cb")) { sVersion = "3.0"; sOptions = "1994 by Solar Designer"; bDetected = true; } else if (MSDOS.compareEP("1e54583bc475..b43006cd212ea3....bf....8befb9....33c02e030547e2")) { sVersion = "4.0"; sOptions = "1996 by Solar Designer"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/EXE_Packer.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "EXE Packer"); function detect() { if (MSDOS.compareEP("1E068CC383....2E........B9....8CC88ED88BF14E8BFE")) { sVersion = "7.0"; bDetected = true; } else if (MSDOS.compareEP("EB$$1E068CC383....0E1F011E....011E....BE....B9....FCAD3BC174")) { sVersion = "7.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/EXE_encryption.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "EXE encryption"); function detect() { if (MSDOS.compareEP("501e068cc88ed88ec0e8....5b81eb....2ae4be....03f3882446fec40ae475..8b87....ba....f7e28987")) { sOptions = "1992 by E.Akulow"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Eliashim's_CodeTrack.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Eliashim's CodeTrack"); function detect() { if (MSDOS.compareEP("e9$$$$502e8c06....33c08ec02ef606......74..26ff36")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/File_Shield.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "File Shield"); function detect() { if (MSDOS.compareEP("50b430cd213c..7d..e9....e8$$$$b8....bb....b9....ba....cd212ec706........81fb....75..2ec706........2e8916")) { sVersion = "1.2"; sOptions = "by McAfee"; bDetected = true; } else if (MSDOS.compareEP("501eeb$$2ea1....2e8b1e....2e8b0e....ba....2e8916....e8$$$$535051cd12")) { sVersion = "1.5"; sOptions = "by McAfee"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Fitted_Modula-2.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Fitted Modula-2"); function detect() { if (MSDOS.compareEP("9a########558bec2e8e1e....a1....d1c873..8be55dca0000")) { sVersion = "2.0a"; sOptions = "1988"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/GFX_to_EXE.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "GFX to EXE"); function detect() { if (MSDOS.compareEP("eb$$2ea1....3c..74..be....bd....8ccabf....83e7..bb....c1eb..03d32e8b1e....2e8b0e....8eda3c..75..30253c")) { sVersion = "2.0"; sOptions = "by t-Rex"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/GamBit_Pro_Library.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "GamBit Pro Library"); function detect() { if (MSDOS.compareEP("ba....2e8916....b430cd218b2e....8b1e....8edaa3....8c06") && MSDOS.compareOverlay("'RS'000102")) { sOptions = "1994 by Nikita Ltd."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/GameWizard_DOS_Extender.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "GameWizard DOS Extender"); function detect() { if (MSDOS.compareEP("b430cd2186c43d....73..ba....e8....ba....b1..d3ea8cc803d08edafa8ed2bc....fb2e8916....2e8c06....368c0e....2e8c16....e8")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Graphic_WorkShop.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "Graphic WorkShop"); function detect() { if (MSDOS.compareEP("e9$$$$2ec706........b8....a9....74..25....bb....2bd8432e011e....e8")) { sVersion = "6.0-7.1"; sOptions = "by Alchemy Mindworks Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Guardian_Angel.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Guardian Angel"); function detect() { if (MSDOS.compareEP("068cc88ed88ec0fc......8be8e4210c..eb")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("068CC88ED88EC0FCBF....EB")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("068CC88ED88EC0FCBB....EB")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("068CC88ED88EC0FCBE....EB")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/H+BEDV_SelfCheck.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "H+BEDV SelfCheck"); function detect() { if (MSDOS.compareEP("1e0e1ffcbe....33d233dbb9....ac3287....3084....0294....80d6..fec3e2..3b16....75..b8....cd213d....8bc374..b430cd21ba")) { sVersion = "1.74-2.41"; sOptions = "1993-94 by H+BEDV Datentechnik GmbH"; bDetected = true; } else if (MSDOS.compareEP("1e0e1fb8....cd213d....8bc374..b430cd21ba....3c..b8....72..fcbe....33d233dbb9....ac3287....3084....0294....80d6..fec3e2")) { sVersion = "1.10"; sOptions = "1993 by H+BEDV Datentechnik GmbH"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Header_Changer.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "Header Changer"); function detect() { if (MSDOS.compareEP("8cdb81c3....53bb....53501e068cdb81c3....53bb")) { sOptions = "by Shay Lev Ary"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Hi-Tech_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Hi-Tech C"); function detect() { if (MSDOS.compareEP("fcba....b1..d3ea8cc803c28ed88ed0268b1e....4b2bd8b8....f7c3....75..d3e38bc38be0be....b9....2bce32c0")) { sVersion = "3.06"; sOptions = "1984-87 by HI-TECH Software"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/HyperLOCK_386.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "HyperLOCK 386"); function detect() { if (MSDOS.compareEP("e9$$$$fabf....b0..b9....2e8a2581ff....72..2e3005472ac4")) { sVersion = "1.00"; sOptions = "1993 by Jayeson Lee-Steere"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/IBM_PC_Pascal.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // http://www.edm2.com/index.php/IBM_PC_Pascal_Compiler meta("compiler", "IBM PC Pascal"); function detect() { if (MSDOS.compareEP("b8....8ed88c06....fa8ed0268b1e....2bd881fb....7e..bb....d1e3")) { sVersion = "2.00"; sOptions = "1984"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed88bd08c06....268b1e....891e....2bd8f7c3....75..b1..d3e3")) { sVersion = "2.05"; sOptions = "1987"; bDetected = true; } else if (MSDOS.compareEP("ba....b4..b0..8cc98ed9cd21")) { sVersion = "2.00"; sOptions = "1984"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed88c06....ba....d1eab9....2bcad1ea")) { sVersion = "1.00"; sOptions = "1981"; bDetected = true; } else if (MSDOS.compareEP("2e8e1e....8cd08cdb2bc3d1e0")) { sVersion = "2.02"; sOptions = "1987"; bDetected = true; } sLang = "Pascal"; return result(); } ================================================ FILE: db/MSDOS/John_Socha_Library.3.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("library", "John Socha Library"); function detect() { if (MSDOS.compareEP("bb....8edb2e891e....8d06....25....fa8ed38be0fb26a1....a3....b430cd21a2....8826....3c..73..8d16....b409cd2133c05006cb")) { sVersion = "1986 Peter Norton Computing, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Khrome_Crypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Khrome Crypt"); function detect() { if (MSDOS.compareEP("B9....B8....EB..80....EB..EB..EB..66..........66")) { sVersion = "0.3"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/LSI_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "LSI C-86"); function detect() { if (MSDOS.compareEP("b8....8ed0bc....368c......b430cd2136......8a......32ff438e......161f33ffb9....32c0fceb")) { bDetected = true; } else if (MSDOS.compareEP("b8....8ec00617bc....268c......b430cd2126a3....fcbe....8a0e....32edbf....f3a426......47")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/L_O_V_E__FORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "L.O.V.E. FORTH"); function detect() { if (MSDOS.compareEP("e9$$$$fc2e8c1e....8cc88ec08ed8bb....e8....bb....e8....bb....e8....bb....e8....8bec2b2e")) { sVersion = "1.29"; sOptions = "1988-92 by Homer Seywerd, Wolodymyr R. Elehew and Peter Cav"; bDetected = true; } else if (MSDOS.compareEP("fcbb....e8$$$$8b8f....09c974..8cd88cda0387....0397....1e068ed88ec28bf98bf14f4efdf3a4")) { sVersion = "1.20"; sOptions = "1988-92 by Homer Seywerd, Wolodymyr R. Elehew and Peter Cav"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Lahey_Fortran.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Lahey Fortran"); function detect() { if (MSDOS.compareEP("EA########dbe3fcb8....8ed88c06....54583bc474..c606......d92e....eb")) { sOptions = "1984-91 by Lahey Computer Systems Inc."; bDetected = true; } sLang = "Fortran"; return result(); } ================================================ FILE: db/MSDOS/Lattice_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Lattice C"); function detect() { if (MSDOS.compareEP("fab8....8ed8b8....8ed0bc....90fb")) { sVersion = "3.0"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed8b8....8ed02e8b26....fbb8....a3....8c06....26a1....a3....be")) { sVersion = "3.0"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed8b8....8ed0b8....8be02e8c06....fbbb....b4..cd2173..e9")) { sVersion = "3.00"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed8b8....8ed0bc....fb8cd88cc92bc1b1..d3c0a3....8126........25....a3....33c0")) { sVersion = "3.00"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed8b8....8ed0bc....fbb8....a3....8c06....26a1....a3")) { sVersion = "2.00"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed8b8....8ed0b8....8be0fbbb....b4..cd21ba....72")) { sVersion = "2.00"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed8b8....8ed0bc....fbb430cd210ac075..b8....a3....8c06")) { sVersion = "2.1"; bDetected = true; } else if (MSDOS.compareEP("fa8cc78cd68bccba....8ec2268e16....bc....fb8ec75651501e06")) { sVersion = "2.1"; bDetected = true; } else if (MSDOS.compareEP("fcb8....8ed88926....8306......06fa8ed081c4....fbc706........c606......33c0a2....a2....b8....2d....a3....03c4")) { sVersion = "6.0"; bDetected = true; } else if (MSDOS.compareEP("fcb8....8ed88926....8306......fa8ed081c4....fbc706........b8....a3....a3....bb....2bd8")) { sVersion = "6.0"; if (MSDOS.compareEP("891e....03dc", 43)) { sOptions = "overlay"; } bDetected = true; } else if (MSDOS.compareEP("8cc88ed8ba....b409cd21b8....8ed8ba....b409cd21bb....8b178b4f..8ed9b409cd21b8....cd21cb")) { sVersion = "3.30"; sOptions = "driver"; bDetected = true; } else if (MSDOS.compareEP("fa8cdeb9....8ed98926....8c16....8936....8bec8b46..a3....8b46..a3....fbfca1....0bc075..40a3....8cd8")) { sVersion = "3.00"; sOptions = "overlay"; bDetected = true; } else if (MSDOS.compareEP("8bec8b5e..8b46..2ea3....2e891e....c746......8b46..8b5e..8cc78cd68bccba....8ec2268e16....bc....8bd0")) { sVersion = "3.00"; sOptions = "overlay"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed88ed0268b1e....2bd8f7c3....75..b1..d3e3eb..bb....8be3891e....b8....a3....0633c0508bec")) { sVersion = "1.00"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed88ed08c06....268b1e....2bd8f7c3....75..b1..d3e3eb..bb....8be3fb891e....b8....a3....0633c0508bec")) { sVersion = "1.02"; bDetected = true; } else if (MSDOS.compareEP("fc508cc00bc05874..b8....8ed88cc0a3....2906....8b1e....b4..cd2126a1....a3....8cc0a3....c706........268a1e")) { sVersion = "3.30"; bDetected = true; } else if (MSDOS.compareEP("eb$$fafcb8....8ed88cc0a3....2906....a3....c706........8b1e....b4..cd2126a1....a3....268a1e....26c606")) { sVersion = "3.30"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$fc268b36....bf....2e8c06....8ec732c0b430cd21fc8cd93c..73..b0..26a2....33ed33db8edb8b07d1e8")) { sVersion = "2.00"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$8cc78cd68bcc83c1..2e8c06....ba....8ec2268e16....bc....5651501e57b8....8ed833ff26f685......75")) { sVersion = "2.00"; bDetected = true; } else if (MSDOS.compareEP("fabe....8b14b8....8ed8b8....8ed0bc....8916....fbb430cd210ac075..b8....a3....8c06....803e......7c")) { sVersion = "2.1"; bDetected = true; } else if (MSDOS.compareEP("fafcb8....8ed88f06....8f06....8becc446..a3....8c06....8b46..2b46..a3....8b46..a3....8e46..8b5e..b8....8ed0")) { sVersion = "2.1"; sOptions = "overlay"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed8b8....8ed0b8....8be0fbbb....b44acd21ba....73..e9")) { sVersion = "2.1-3.0"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed8b8....8ed0bc....fb8c06....268e06....8c06....c706........b8....a3")) { sVersion = "2.1-3.0"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/Logitech_Modula-2.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Logitech Modula-2"); function detect() { if (MSDOS.compareEP("8cdb83c3..8cc88ec0bf....33c0268a05473c..74..3c..74..03f08b0c03cb890ceb..26c5358cd903cb8ed983c7..eb..b8....03c350b8....5033c0")) { sVersion = "3.00"; sOptions = "Aug 1987"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Meridian_Ada.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Meridian Adavantage ADA"); function detect() { if (MSDOS.compareEP("b8....8ed89a........558bec5583ec..168d46..509a........894e..895e..83fb..75..83f9..75")) { if (MSDOS.compareEP("9a", 43)) { sVersion = "1993"; } else if (MSDOS.compareEP("33c050ba....521ebe....569a", 43)) { sVersion = "1991"; } bDetected = true; } else if (MSDOS.compareEP("b8....8ed89a########04..2bc0f3508a46..83e0")) { sVersion = "1988"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed89a########515006b8....8ec0b9....b8....8bf8fcf3ab075859cb")) { sVersion = "1988"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed89a########e8$$$$c8......57561eb8....8ed868....9a")) { sVersion = "1988"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed89a########8c06....8c16....8926....a1....a3....8b16....8916....8c06....9a")) { sVersion = "1988"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Meridian_Pascal.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Meridian Pascal"); function detect() { if (MSDOS.compareEP("b8....501f9a########8926....8926....8c16....8c16....8c06....8c06....9a........c706")) { sOptions = "1985-1988 by Meridian Software Systems, Inc."; bDetected = true; } if (MSDOS.compareEP("b8....8ed89a########8c06....8c16....8926....a1....a3....a1....a3....a1....a3")) { sOptions = "1985-1988 by Meridian Software Systems, Inc."; bDetected = true; } else if (MSDOS.compareEP("b8....8ed89a########558bec5583ec..8c06....8c16....8926....cd..8946..f646")) { sOptions = "1985 by Meridian Software Systems, Inc."; bDetected = true; } sLang = "Pascal"; return result(); } ================================================ FILE: db/MSDOS/MetaWare_High_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "MetaWare High C"); function detect() { if (MSDOS.compareEP("b8....50b8....50cbeb$$bd....2e8e1e....26a1....a3....8cd805....268b1e....3bc376..2bd8b1..d3e3eb..26a3....938cc02bd8b44acd212bdb8cd8fa8ed08be3fbc706........c706")) { sVersion = "1983-1986"; bDetected = true; } else if (MSDOS.compareEP("eb$$33ed2e8e1e....26a1....a3....26a1....2d....bb....fa8ed08be3fbc706........c706........bb....3bc373..2bd8b1..d3e3011e....011e....2e8e1e....9c0654582bc4d1f8")) { sVersion = "1983-1988"; bDetected = true; } else if (MSDOS.compareEP("eb$$fa6633e42e8e16....bc....6633f66633ff6633c92e8e1e....be....2e8e06....bf....b9....e8")) { sVersion = "1983-1990"; bDetected = true; } else if (MSDOS.compareEP("eb$$bd....2e8e1e....26a1....a3....26a1....2d....bb....fa8ed08be3fbc706........c706........bb")) { sVersion = "1983-1986"; bDetected = true; } else if (MSDOS.compareEP("eb$$bd....2e8e1e....26a1....a3....268b......b1..4b891e....b8....05....3bc376..8bc3ba....2bc2d3e0")) { sVersion = "1983-1986"; bDetected = true; } else if (MSDOS.compareEP("eb$$bd....2e8e1e....268b1e....b1..4b891e....b8....05....3bc376..8bc350a3....a3....2bd8b1..d3c38cc12bc1")) { sVersion = "1983-1985"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/MetaWare_Professional_Pascal.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "MetaWare Professional Pascal"); function detect() { if (MSDOS.compareEP("b8000050b8....50cbeb..e8....2bc050e8....c3....bd....2e8e")) { sVersion = "1983-1986"; bDetected = true; } else if (MSDOS.compareEP("eb$$bd....2e8e1e....26a1....a3....26a1....2d....bb....fa8ed08be3fb")) { sVersion = "1983-1986"; bDetected = true; } else if (MSDOS.compareEP("eb$$bd....2e8e1e....26a1....2d....bb....fa8ed08be3fb")) { sVersion = "1983-1986"; bDetected = true; } else if (MSDOS.compareEP("eb$$33ed2e8e1e....26a1....a3....8cd805....268b1e....3bc376..2bd8b1..d3e3eb")) { sVersion = "1983-1988"; bDetected = true; } sLang = "Pascal"; return result(); } ================================================ FILE: db/MSDOS/Micro_Focus_Cobol.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Micro Focus Cobol"); function detect() { if (MSDOS.compareEP("e9$$$$e9$$$$e8....8edac606......b8....0306....8ed28be08c0e....4a8bc28706....2bd0e8")) { sVersion = "1981, 1985 by Micro Focus Ltd"; bDetected = true; } if (MSDOS.compareEP("e8....51e8$$$$8bf0e8$$$$061e5657558bece8....72..a1....8be55d5f5e1f07c3")) { sVersion = "4.5"; bDetected = true; } sLang = "Cobol"; return result(); } ================================================ FILE: db/MSDOS/Micro_Focus_DOS_extender.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "Micro Focus DOS Extender"); function detect() { if (MSDOS.compareEP("eb$$b8....8ed854583bc475..0f01e0a8..74..e8....75..2e800e......eb..c8......0f014e..80")) { sVersion = "1993 by Micro Focus Ltd"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Microsoft_Basic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Microsoft Basic"); function detect() { if (MSDOS.compareEP("eb$$0e1fb8....e8....8eda938a170ad274..b4..cd2143eb..b8....cd21")) { sVersion = "7.10"; bDetected = true; } else if (MSDOS.compareEP("9a########591fa1....1e510e1ffc3d....74..e9....b430cd213c..73..e9$$$$ba....0e1fb409cd21b8....cd21")) { sVersion = "5.60"; sOptions = "1986"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$8cc88ed8e8....8a170ad274..b4..cd2143eb..b2..b4..cd21")) { sVersion = "5.60"; sOptions = "1986"; bDetected = true; } sLang = "Basic"; return result(); } ================================================ FILE: db/MSDOS/Microsoft_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("compiler", "Microsoft"); function detect() { if (MSDOS.compareEP("b430cd213c..73..33c00650cbbf....8b36....2bf781fe....72..be....fa8ed781c4....fb73..161f")) { sName += " Quick C"; sVersion = "2.5X"; sOptions = "1990"; bDetected = true; } else if (MSDOS.compareEP("fc8cc02ea3....8ed8a1....2ea3....2ea3....be....ac32e403f0c6....b8....8ec02680........75")) { sName += " Quick C"; sVersion = "2.51a"; sOptions = "1990"; bDetected = true; } else if (MSDOS.compareEP("b430cd213c..73..b8....50e8....92b409cd21cd20bf")) { sName += " C/C++"; sVersion = "1986"; bDetected = true; } else if (MSDOS.compareEP("b430cd213c..73..b8....50900ee8....92b409cd21cd20bf")) { sName += " C/C++"; sVersion = "1986"; bDetected = true; } else if (MSDOS.compareEP("b430cd213c..73..b8....509a........92b409cd21cd20bf....8b36....2bf781fe....72..be....fa8ed781c4....fb73..33c050")) { sName += " C/C++"; sVersion = "1986"; bDetected = true; } else if (MSDOS.compareEP("b430cd213c..73..cd20bf....8b36....2bf776..8bc405....d1d8b1..d3e83bf072..8bf0fa8ed781c4....fb73")) { sName += " Quick C"; sVersion = "1987-89"; bDetected = true; } else if (MSDOS.compareEP("bf....8b36....2bf781fe....72..be....fa8ed781c4....fb73..e9....81e4....3689......3689......8bc6b1")) { sName += " C/C++"; sVersion = "1985"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed88ed0268b1e....2bd8f7c3....75..b1..d3e3eb..bb....8be3fb891e....b8....a3....0633c0508bec")) { sName += " C/C++"; sVersion = "1.04"; bDetected = true; } else if (MSDOS.compareEP("b430cd213c..73..cd20bf....8b36....2bf781fe....72..be....fa8ed781c4....fb73")) { sName += " Quick C"; if (MSDOS.compareEP("81", 54)) { sVersion = "1.0"; sOptions = "1987"; } else if (MSDOS.compareEP("83", 54)) { sVersion = "2.00"; sOptions = "1989"; } else if (MSDOS.compareEP("8b", 54)) { sVersion = "2.X"; sOptions = "1989"; } bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Microsoft_C_Library.3.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("library", "Microsoft C Library"); function detect() { if (MSDOS.compareEP("fa8cc78cd68bccba....8ec2268e16....bc....fb8ec75651501e062e8c06....b8....8ed8e8....b8....8ec08cc8262b06....26a3....803e")) { sVersion = "1986"; bDetected = true; } else if (MSDOS.compareEP("bf....8b36....2bf781fe....72..be....fa8ed781c4....fb73..161f0ee8....33c0500ee8....b8....cd21")) { sVersion = "1985"; bDetected = true; } else if (MSDOS.compareEP("061e33c08ed88b1e....a1....8ec0268b47..3d....75..ba....1f07e9....1f07be....ac0ac074..e8....72")) { sName += " (possibly)"; sVersion = "1986"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Microsoft_Fortran.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Microsoft Fortran"); function detect() { if (MSDOS.compareEP("b430cd213c..73..9a########558becb8....501eb8....50b8....509a")) { sVersion = "1987"; bDetected = true; } sLang = "Fortran"; return result(); } ================================================ FILE: db/MSDOS/Microsoft_Quick_Basic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Microsoft Quick Basic"); function detect() { if (MSDOS.compareEP("1e071e2e8e1e....b430cd2150812e........8b36....ad91ade3..3d....72..3d....73..ba....eb..0bc075..c706........c706........33c99a")) { bDetected = true; } else if (MSDOS.compareEP("e9$$$$8cda83c2..8edaa1....0e1ffc3d....74..e9....b430cd213c..73..e9$$$$ba....0e1fb409cd21b8....cd21")) { sVersion = "2.0"; bDetected = true; } else if (MSDOS.compareEP("9a########591fa1....1e510e1ffc")) { sVersion = "3.0"; bDetected = true; } else if (MSDOS.compareEP("eb$$0e1fb8....509a........8eda938a170ad274..b4..cd2143eb")) { sVersion = "4.5"; bDetected = true; } else if (MSDOS.compareEP("9a########591fa0....1e51063c..74")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("bf....a1....2ea3....2bc73d....72..b8....fa8ed781c4....fb969f2e8826....9683e4")) { sVersion = "4.0"; bDetected = true; } else if (MSDOS.compareEP("9a########06ba....8eda268b3e....8ec257b9....be....bf....0e1ffcf3a4b1")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed88c06....fa8ed0bc....fbb430cd21a3....3c..75..06b4..cd218c06....b9")) { sVersion = "4.X"; bDetected = true; } sLang = "Basic"; return result(); } ================================================ FILE: db/MSDOS/Microsoft_Quick_Pascal.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Microsoft QuickPascal"); function detect() { if (MSDOS.compareEP("b0..9a########50b430cd213c..73..cd20b8....8ed88c06....c706........8c0e....58545b3bdc74..0ac074..be....e8....32c0e9")) { sVersion = "1.0-1.08"; sOptions = "1989"; bDetected = true; } sLang = "Pascal"; return result(); } ================================================ FILE: db/MSDOS/Microsoft_RTL.3.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("library", "Microsoft RTL"); function detect() { if (MSDOS.compareEP("b430cd213c..73..cd208cc18cd32bd981c3....b4..cd2172..8cd6bf....2bf7b1..d3e6fa8ed703e6fb")) { bDetected = true; } else if (MSDOS.compareEP("1e068cc88ed88cc0a3....83c0..a3....b430cd213c..73..b8....8ed8b8....ea........e8....e8....e8....8e")) { sVersion = "1992"; bDetected = true; } else if (MSDOS.compareEP("b430cd213c..73..cd20bf....b8....03c405....b1..d3e88bf0fa8ed781c4....fb73..161f9a........33c0509a")) { sVersion = "1987"; bDetected = true; } else if (MSDOS.compareEP("2e8c06....2e8c1e....bb....8edb1ee8....1f8b1e....0bdb74..8cd18bd4fa8ed3bc....fb5351521ee8....1f5a")) { sVersion = "1990"; bDetected = true; } else if (MSDOS.compareEP("2e8c1e....bb....8edb1ee8....1f8b1e....0bdb74..8cd18bd4fa8ed3bc....fb5351521ee8....1f5a")) { sVersion = "1990"; bDetected = true; } else if (MSDOS.compareEP("1eb8....8ed8b430cd213c..73..ba....e8....0633c050cb")) { sVersion = "1990"; bDetected = true; } else if (MSDOS.compareEP("1e069a########502e8c06....2ea1....2e0b06....75..26a1....2ea3....26a1....2ea3....58cb")) { sVersion = "1990"; bDetected = true; } else if (MSDOS.compareEP("b8....cd212e8816....b2..b8....cd21b4..cd218edbb8....83e8..8ec033f633ffb9....fcf3a5bb")) { sVersion = "1992"; bDetected = true; } else if (MSDOS.compareEP("b4..cd218edbb8....83e8..8ec033f633ffb9....fcf3a5bb")) { sVersion = "1992"; bDetected = true; } else if (MSDOS.compareEP("8cd03d....75..8cd83d....75..8ccab8....e8....e9....8cdb8ccab8....e8....eb..908cd83d")) { sVersion = "1990"; bDetected = true; } else if (MSDOS.compareEP("b430cd213c..73..cd20bf....8b36....2bf781fe....72..be....fa8ed781c4....fb73..161f")) { sVersion = "1988"; bDetected = true; } else if (MSDOS.compareEP("b4..cd213c..73..33c00650cb86e03d....b0..72..bf....8b36....2bf781fe....72..be")) { sVersion = "1992"; bDetected = true; } else if (MSDOS.compareEP("bf....8edffa8ed781c4....fb33dbb8....cd210bdb74..881e....883e....8816....8836....b8")) { sVersion = "1992"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Microsoft_RTL_(Clipper).3.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("library", "Microsoft RTL (CLIPPER 5.01)"); function detect() { if (MSDOS.compareEP("e8$$$$1e06fc8cc88ed88c06....b430cd2186e0a3....e8....891e....890e....b8....bb....e8....071fc3")) { sVersion = "1988"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/MultiLoop_Protection.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "MultiLoop Protection"); function detect() { if (MSDOS.compareEP("1e06b8....8ec0b0..b9....be....2e300404..46e2")) { sOptions = "1992 by J&A"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Netware_loader.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("loader", "Netware loader"); function detect() { if (MSDOS.compareEP("e9$$$$b8....cd213c..72..a1....3d....75..a1....3d....75..e9$$$$1e8cc88ed833c08ec0268b1e....891e")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/PDC_Prolog.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "PDC Prolog"); function detect() { if (MSDOS.compareEP("b8....8ed88cc6bb....8ec3bb....268b178ec6b9....8bdad3eb8cd003d88cc02bd843b44acd2173..b0..b44ccd21")) { sOptions = "1992 by Prolog Development Center"; bDetected = true; } sLang = "Visual Prolog"; return result(); } ================================================ FILE: db/MSDOS/PK_sig.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "PK signature"); function detect() { if (MSDOS.compareEP("c706....'PK'8cd805....50b8....50cb")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/PROPACK_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("sfx", "PROPACK SFX"); function detect() { if (MSDOS.compareEP("558bec83ec..8c5e..e8....be....e8....b80030cd21ba....0e3c..72..a1....8ec033ff33c0b9....f2aeae75..fec0af75..5a8bd7061f")) { sVersion = "2.18"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Pacific_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Pacific C"); function detect() { if (MSDOS.compareEP("fcb8....8ed826a1....488bd881eb....ba....3bd372..8bda2bc3b9....d3e048488ed38be0")) { sVersion = "7.51"; sOptions = "1984-91 by HI-TECH Software"; bDetected = true; } else if (MSDOS.compareEP("fcc516....b8....8ed88ed0268b1e....4b2bd8b8....f7c3")) { sVersion = "7.51"; sOptions = "1984-91 by HI-TECH Software"; bDetected = true; } else if (MSDOS.compareEP("fc8d16....b8....8ed826a1....488bd881eb....ba....3bd372..8bda2bc3b9....d3e048488ed38be0")) { sVersion = "7.51"; sOptions = "1984-91 by HI-TECH Software"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/Panda_immunizer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "Artemis Professional"); function detect() { if (MSDOS.compareEP("e8$$$$5d81ed....2e8c8e....2e8c86....fc268e06....33ff32c0b9....f2ae26803d..75..83c7..2e89be")) { sOptions = "by Panda Software"; sVersion = "2.10s"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Pascal_MT+86.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Pascal/MT+86"); function detect() { if (MSDOS.compareEP("e8$$$$8cc82e0306....2e0306....2e0306....2e0306....3b06....76..2ea1....2d....2ea3....3d....7f..1ee8")) { sVersion = "3.1"; sOptions = "1982 by Digital Research, Inc."; bDetected = true; } else if (MSDOS.compareEP("e8$$$$8cc82e0306....2e0306....2e0306....2e0306....3b06....76..1ee8")) { sVersion = "3.01"; sOptions = "1982 by Digital Research, Inc."; bDetected = true; } sLang = "Pascal"; return result(); } ================================================ FILE: db/MSDOS/Phar_Lap.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "Phar Lap DOS Extender"); function detect() { if (MSDOS.compareEP("eb$$8cd88ec0b8....8ed8c706........b8....2d....3bc476..c706........8f06....8f06....58a3....a3....a3....8cd88d1e....8ed0")) { sVersion = "1986-93 (C5S2S2P6)"; bDetected = true; } else if (MSDOS.compareEP("eb$$8cd88ec0b8....8ed8bb....8cc02bd881c3....b44acd2173..e9....8d06....05....8cdb8ed38be0fcb8....8ec033c033db33c9")) { sVersion = "1986-91 (C5S2S2PJ)"; bDetected = true; } else if (MSDOS.compareEP("b8....50b8....50cb")) { sVersion = "1986-91 (C3S2S2P8)"; bDetected = true; } else if (MSDOS.compareEP("eb$$bd....2e8e1e....26a1....a3....268b1e....b1..8cdab8....05....3bc376..8bc32bc23d....76..b8....d3e0bb....891e....c706")) { sVersion = "1986-89 (C5S2S2P6)"; bDetected = true; } else if (MSDOS.compareEP("eb$$33ed2e8e1e....26a1....a3....8d06....a3....9d06....a3....8d06....a3....8cd88d1e....8ed08be3bb....26891e....8cc02bd8")) { sVersion = "1986-89 (C5S2S2P6)"; bDetected = true; } else if (MSDOS.compareEP("eb$$33ed2e8e1e....26a1....a3....268b1e....b1..4b891e....b8....05....3bc376..8bc3ba....2bc2d3e0c706........c706")) { sVersion = "1986-89 (C5S2S2P7)"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed8b8....cd21a3....3c..7d..b4..ba....8edaba....cd2106b8....50cb")) { sVersion = "1986-89 (C5S2S2PN)"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/RAR.6.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood includeScript("rar-file"); function detect() { detect_RAR(0); } ================================================ FILE: db/MSDOS/REC_small.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "REC.small"); function detect() { if (MSDOS.compareEP("8cd81ee8$$$$83c0..5fb9....81ef....87ef408ed82bdbb2..0017424383fb..75..e2")) { sVersion = "1.2"; sOptions = "by Ralf Roth"; bDetected = true; } else if (MSDOS.compareEP("8cd81ee8$$$$5d83c0..81ed....b9....408ed82bdbb2..0017fec24383fb..75..e2")) { sVersion = "1.01"; sOptions = "by Ralf Roth"; bDetected = true; } else if (MSDOS.compareEP("8cd81ee8000083c0..5db9....81ed....408ed82bdbb2..0017fec24383fb..75..e2")) { sVersion = "1.02"; sOptions = "by Ralf Roth"; bDetected = true; } else if (MSDOS.compareEP("b9....8cd883c0..fa8bdc8cd7bc....44408ed02be4b2..8bec0056..424483fc..75..e2")) { sVersion = "1.05"; sOptions = "by Ralf Roth"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/REC_small_AV.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "REC.small"); function detect() { if (MSDOS.compareEP("eb$$8cd81ee8$$$$83c0..5fb9....81ef....87ef408ed82bdbb2..0017424383fb..75..e2")) { sVersion = "1.03"; sOptions = "by Ralf Roth"; bDetected = true; } else if (MSDOS.compareEP("eb$$8cd81ee8$$$$83c0..5fb9....81ef....87ef408ed82bdbb2..001702d34383fb..75..e2")) { sVersion = "4.01"; sOptions = "by Ralf Roth"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/RLE_com-packer.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "RLE com-packer"); function detect() { if (MSDOS.compareEP("60be....bf....8b0e....f3a4be....bf....57b9....f3a4c3")) { sOptions = "by NOP/PC"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/RM_FORTRAN.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "RM/FORTRAN"); function detect() { if (MSDOS.compareEP("fc1eb8....8ed89a........81ec....8becc706........c706........33ffbe....b8....8ec0b9....f3a5897e..b8....ab8cdb8ec3bb")) { bDetected = true; } sLang = "Fortran"; return result(); } ================================================ FILE: db/MSDOS/RTLink_VM_Manager.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", ".RTLink VM Manager"); function detect() { if (MSDOS.compareEP("9a########1e069a........2e8c06....8cc88ed852ba....b0..9a........5afcb8....2b06....d1e0")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/RTPatch_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "RTPatch SFX"); function detect() { if (MSDOS.compareEP("e8$$$$8ccb8edb8c06....a3....8cc00106....0106....fd26a1....bb....b1..d3eb2bc38ec0bf....83e7..8bf7b9....d1e9f3a5fc")) { sVersion = "3.20"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Realia_Cobol.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Realia Cobol"); function detect() { if (MSDOS.compareEP("9a########9a########3c..75..8ed38be22bdb2bd2cb")) { sVersion = "4.X"; sOptions = "1984-92 by Realia, Inc."; bDetected = true; } sLang = "Cobol"; return result(); } ================================================ FILE: db/MSDOS/Realia_SPITBOL.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Realia SPITBOL"); function detect() { if (MSDOS.compareEP("2e8c1e....fc8ccaa1....0e1ffe06....a3....0116....b9....be....ad0bc074..03c28944..e2..8e06....bf....b1..b0..f3ae")) { sVersion = "3.6"; sOptions = "1983-84 by Realia, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/SHOW_IT.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "SHOW IT"); function detect() { if (MSDOS.compareEP("bf....32db2e8a150ad274..b4..cd214780fa..75..fec380fb..75..32db53b4..cd16b4..cd165b75")) { sVersion = "1.2"; sOptions = "converted to exe"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Self_UnStuffer.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Self UnStuffer"); function detect() { if (MSDOS.compareEP("86e303e9ace3$$1000e3$$00e40ec400e3")) { if (MSDOS.compareOverlay("0101'Aladdin'")) { sVersion = "1.1"; sOptions = "by Aladdin Systems, Inc."; bDetected = true; } } return result(); } ================================================ FILE: db/MSDOS/Small_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Small C"); function detect() { if (MSDOS.compareEP("b8....8ed826a1....2d....80fc..72..b8....b1..d3e0fa8cdb8ed38be050fbb8....2d....d3e08bd8fec73bdc72..b8....50e8")) { sVersion = "2.2"; sOptions = "1982-88 by J. E. Hendrix"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed826a1....2d....3d....72..b8....b1..d3e0fa8cdb8ed38be050fbb8....2d....d3e08bd881c3....3bdc72..b8....cd21")) { sVersion = "2.1"; sOptions = "1982-88 by J. E. Hendrix"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/StonyBrook_Pascal.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "StonyBrook Pascal+"); function detect() { if (MSDOS.compareEP("31ED9A........5589E581EC....B8....0E509A........BE....1E0EBF....1E071FFC")) { sVersion = "7.0"; bDetected = true; } else if (MSDOS.compareEP("31ed9a........5589e5b8....50ff1e")) { sVersion = "6.13"; bDetected = true; } else if (MSDOS.compareEP("31ed9a........5589e581ec....16078dbe....b9....31c0fcf3ab1e07")) { sVersion = "6.12"; bDetected = true; } else if (MSDOS.compareEP("31ed9a........5589e59a........c706........c706........e8")) { sVersion = "6.1G"; bDetected = true; } else if (MSDOS.compareEP("31ed9a........5589e583ec..9a........9a")) { sVersion = "6.14"; bDetected = true; } sLang = "Pascal"; return result(); } ================================================ FILE: db/MSDOS/Sydex_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Sydex SFX"); function detect() { if (MSDOS.compareEP("b8....8ec0b430cd2186e0ba....3d....72..a1....26a3....bf....8a1d32ff47883926893e....268c1e....8cd88cc3")) { sOptions = "1994 by Sydex, Inc."; bDetected = true; } if (MSDOS.compareEP("b8....8ec0e8....ba....3d....b8....72..e8....26a3....26890e....268916....8cd88cc381c3....2bd88ec0b4..cd21")) { if (MSDOS.compareOverlay("'SXD'00")) { sOptions = "1997 by Sydex, Inc."; bDetected = true; } } return result(); } ================================================ FILE: db/MSDOS/Topspeed_Modula.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Topspeed Modula"); function detect() { if (MSDOS.compareEP("e90000fc2bedbc....b8....8ed88c06....26a1....a3....54583bc4b8....75..b430cd213c..74..3c..77..b8....8cdbe8....86c4a3....8e06")) { sVersion = "2.0"; bDetected = true; } else if (MSDOS.compareEP("1eba....8eda8b0e....8b36....ff36....5053a1....48ba....8eda890e....8936....a3....c706........2ea1....a3")) { sName += ' RTL'; sOptions = "1989 by JPI"; bDetected = true; } else if (MSDOS.compareEP("1eba....8eda8b0e....8b36....ff36....50a1....48ba....8eda890e....8936....a3....58c706........c706")) { sName += ' RTL'; sOptions = "1989 by JPI"; bDetected = true; } else if (MSDOS.compareEP("1eba....8eda8b0e....8b36....ff36....50a1....48ba....8eda890e....8936....a3....c706........58c706")) { sName += ' RTL'; sOptions = "1989 by JPI"; bDetected = true; } else if (MSDOS.compareEP("fc1eba....8eda8b0e....8b36....ff36....50a1....ba....8eda890e....8936....a3....58c706........c706")) { sName += ' RTL'; sOptions = "1989 by JPI"; bDetected = true; } else if (MSDOS.compareEP("ea########2e8c1e....fc2ef706........74..e8....eb..b8....ba....0e1fcd212bc02ef706........74")) { sVersion = "2.0"; sOptions = "by JPI"; bDetected = true; } else if (MSDOS.compareEP("ea########2e8c1e....fc2bc08cd3ba....8ec2bf....b9....f3ab423bd372..508becffe0")) { sVersion = "1.17"; sOptions = "by JPI"; bDetected = true; } else if (MSDOS.compareEP("ea########8cdb2e8e1e....891e....fc2ef706........74..2bc02e8e1e....ff36....8cd3ba....8ec2bf....b9....f3ab423b..72")) { sOptions = "by JPI"; bDetected = true; } sLang = "Modula"; return result(); } ================================================ FILE: db/MSDOS/UR_FORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "UR/FORTH"); function detect() { if (MSDOS.compareEP("fc2e8c06....2e8e1e....e8$$$$b430cd213c..73..e8")) { sVersion = "1.03"; sOptions = "1986-88 by Laboratory Microsystems, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Unknown_cryptors.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Unknown cryptor"); function detect() { if (MSDOS.compareEP("fa8cde8ccf8edf8ec783c7..bb....8b1f83c3..b1..d3eb2bfbe8")) { sVersion = "#01"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$b9....b3..be....bf....acfec332c3aae2")) { sVersion = "#02"; sOptions = "exe 0-relocs crypt"; bDetected = true; } else if (MSDOS.compareEP("3ec606......90eb$$2e8a36....8ec08cd8be....bf....2e033e....26a3....26893e....26a3....26c706........0e07")) { sVersion = "#03"; bDetected = true; } else if (MSDOS.compareEP("9090e9$$$$8cd88be8b8....8be08ccb8edb8ec3bf....892de8....8cc88ed88ec01e33db8edbbb....81eb....8b071f1ebb")) { sVersion = "#04"; bDetected = true; } else if (MSDOS.compareEP("eb$$be....bf....2e89352eff26")) { sOptions = "protector"; sVersion = "#05"; bDetected = true; } else if (MSDOS.compareEP("bf....b8....fa8ed08be7fb1e1eb8....0e500e501efc8cd08ec0be....8cc806b9....578ed8f3a5cb")) { sOptions = "Russ"; sVersion = "#06"; bDetected = true; } else if (MSDOS.compareEP("........0e1f8b0e....8bf14e89f78cdb031e....8ec3fdf3a453b8....50cb")) { sOptions = "Aidstest"; sVersion = "#07"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$e8$$$$bb....e8$$$$29c9e8$$$$e8$$$$e9$$$$8ed9e9$$$$870feb$$e8$$$$eb$$51eb$$eb$$29dbe8$$$$bf....e9$$$$e8$$$$871de8$$$$53eb$$b3..b7..bf....2e8a05")) { sOptions = "by Matrix Technologies"; sVersion = "#08"; bDetected = true; } else if (MSDOS.compareEP("bd....50060ee8$$$$065733ff570e1f07be....b9....8004..46e2..b1..ac268a1d04..aa80eb..885c..e2")) { sOptions = "SYN!"; sVersion = "#09"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$eb$$bf....e9$$$$26f6e8$$$$e9$$$$8edee8$$$$8735e8$$$$56e9")) { sOptions = "by Matrix Technologies"; sVersion = "#10"; bDetected = true; } else if (MSDOS.compareEP("b3..060e1f8b0e....8bf14e89f78cdb031e....8ec3fdf3a453b8....50cb")) { sOptions = "Aidstest"; sVersion = "#11"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$eb$$8cca8eda8ec2be....bf....b9....2ec706........31c0ada3....3136....8bc18bdef7e33106....3116....a1....abe2")) { sVersion = "#12"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Upper_Deck_Forth.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Upper Deck Forth"); function detect() { if (MSDOS.compareEP("fc2e8c06....b8....cd213c..73..b4..2e8e1e....ba....cd212eff36....33c050cb")) { sVersion = "2.00"; sOptions = "1990, 1991 by Upper Deck Systems"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Visual_Cobol.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Visual COBOL (XO)"); function detect() { if (MSDOS.compareEP("9a########061fbe....b9....ac3cff75..e2..ad8ed88b0e....8ed08be1eb")) { sVersion = "3.3"; sOptions = "1993 by mbp Software & Systems"; bDetected = true; } sLang = "Cobol"; return result(); } ================================================ FILE: db/MSDOS/WWPACK_mutator.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "WWPACK mutation engine"); function detect() { if (MSDOS.compareEP("8cc981c1....51b9....510606b1..51b1..8cd383eb..5351fc8cd5b8....8cca03d0be....33ff4d8ec58edab1..f3a54a4879")) { sVersion = "1.0"; sOptions = "by Barthazi Andras"; bDetected = true; } else if (MSDOS.compareEP("8cc981c1....51b9....5106068ccab8....03d0b1..518cd383eb..53b1..51fc8cd5be....33ff4d8ec58eda4ab9....50")) { sOptions = "by MR WiCKED"; bDetected = true; } else if (MSDOS.compareEP("81ce....1bf78a....80fa..2a95....fc03f633f281e6....1e10ea0e1f00d20e0732b4....21da2efe06")) { sOptions = "1996 by van Hauser"; bDetected = true; } else if (MSDOS.compareEP("8ccab8....03d08cc981c1....51b9....510606b1..518cd383eb..53b1..51fc8cd5be....33ff4d8ec58eda4ab9....50")) { sVersion = "3.04a"; sOptions = "by Boogie"; bDetected = true; } else if (MSDOS.compareEP("8cd383eb..8cc981c1....51b9....510606b1..51fc8cd5b1..5351b8....8cca")) { sVersion = "3.04a"; sOptions = "by Boogie"; bDetected = true; } else if (MSDOS.compareEP("8cc981c1....51b9....51b1..068cd30651b1..b8....8cca03d0fc")) { sVersion = "3.04a"; sOptions = "by Boogie"; bDetected = true; } else if (MSDOS.compareEP("8cc981c1....51b9....510606fc8cd5b1..51b1..8cd383eb..5351")) { sVersion = "3.04a"; sOptions = "by Boogie"; bDetected = true; } else if (MSDOS.compareEP("8cc981c1....51b9....fc8cd5510606b1..51b1..8cd383eb..5351")) { sVersion = "3.04a"; sOptions = "by Boogie"; bDetected = true; } else if (MSDOS.compareEP("f9be....81ee....2e80b4......eb")) { sVersion = "1.1c"; bDetected = true; } else if (MSDOS.compareEP("061e0e0e071fb430cd2186e03d....73..cd20eb$$eb$$5055528cd2fa50b8....58eb")) { sOptions = "REC by R0SE"; bDetected = true; } else if (MSDOS.compareEP("8cc98cd383eb..81c1....51b9....510606b1..518ccafc8cd5b1..5351b8")) { sVersion = "1.0"; sOptions = "by Barthazi Andras"; bDetected = true; } else if (MSDOS.compareEP("......81......2e80..")) { sOptions = "by unknown"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Whitesmiths_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Whitesmiths C (dos86)"); function detect() { if (MSDOS.compareEP("be....8cd18cd83bc175..a3....e9....8bde8a0f81e1....03d9d1e941ff3783eb..e2..8bf48cd936890e....8cd18ed98c06....8c06")) { sVersion = "3.3"; sOptions = "1988 by Whitesmiths, Ltd. and Cosmic, Sarl"; bDetected = true; } else if (MSDOS.compareEP("be....8cdb8cd03bc374..8a0c81e1....03f1d1e941ff3483ee..e2..8bf4b9....8ed9")) { sVersion = "3.2"; sOptions = "1987 by Whitesmiths, Ltd"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/Window_book.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "Window book"); function detect() { if (MSDOS.compareEP("e9$$$$e8$$$$fc5e8cda8b1e....bd....8edd8ec5b9....bf....2bcf33c02ea3....41d1e9f3ab891e....8916....8ec2bb....03dd")) { if (MSDOS.findSignature(MSDOS.getOverlayOffset(), 2000, "1a1a7bf7") != -1) { sVersion = "4.20"; bDetected = true; } } else if (MSDOS.compareEP("e9$$$$e8$$$$fc5e8cdaa1....bd....8edd8ec5a3....b9....bf....2bcf33c02ea3....d1e9f3ab8916....8ec2bb....a1....03c7")) { if (MSDOS.findSignature(MSDOS.getOverlayOffset(), 2000, "1a1a7bf7") != -1) { bDetected = true; } } return result(); } ================================================ FILE: db/MSDOS/Wizardy_protection.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Wizardy protection"); function detect() { if (MSDOS.compareEP("2eff16....e9")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/WordPerfect_EXEPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "WordPerfect EXEPack"); function detect() { if (MSDOS.compareEP("958cc005....0e1fa3....0306....8ec08b0e....8bf94f8bf7fdf3a48b16....50b8....50cb")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/XOPEN+_Protection.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "XOPEN+ Protection"); function detect() { if (MSDOS.compareEP("8cca8cdd8eda81ea....8916....ba....8eddea")) { sOptions = "1994"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/Zbikowski_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Zbikowski C"); function detect() { if (MSDOS.compareEP("ba....8cd32bdab1..d3e3fa8ed203e3fbfc8b1e....8bc32bc2a9....74..8bda80c7..33c0eb..b1..d3e02d....36a3")) { sOptions = "1983 by Mark Zbikowski (Microsoft Corp.)"; bDetected = true; } else if (MSDOS.compareEP("ba....8cd32bdab1..d3e3fa8ed203e3fbbe....8b1e....36891e....33ff8bc70bdb74..b9....8ec3f2ae")) { sOptions = "1983 by Mark Zbikowski (Microsoft Corp.)"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/Zip.6.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood includeScript("zip-file"); function detect() { detect_Zip(0); } ================================================ FILE: db/MSDOS/Zortech(Symantec)_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Zortech/Symantec C"); function detect() { if (MSDOS.compareEP("fafcb8....8ed88c......268b......891e....8bd82b1e....891e....268b1e....2bd881fb....72..bb....8bd003d342b1..d3e38ed08be381eb....80ff..73..ba....e9....fbb430cd21a3")) { sVersion = "2.10 - 3.0r1*, 4.0"; bDetected = true; } else if (MSDOS.compareEP("fafcb8....8ed88ed08ec0bc....33c050e8....eb")) { sVersion = "2.10 - 3.0r1, 4.0"; bDetected = true; } else if (MSDOS.compareEP("fafcb8....8ed0bc....b8....8ed88c06....660fb7c066c1e0..ba")) { sVersion = "3.0"; sOptions = "1991"; bDetected = true; } else if (MSDOS.compareEP("fafcb8....8ed88ed0bc....2e8c06....33d21e2e8e1e....be....8a0e....32ede3")) { sVersion = "3.0"; sOptions = "1991"; bDetected = true; } else if (MSDOS.compareEP("fafcb8....8ed8bb....81c3....8ed08be3fb8becbe....268a0c4632ed8bd9")) { sVersion = "3.0"; sOptions = "1991"; bDetected = true; } else if (MSDOS.compareEP("fafcb8....8ed88ed0bc....b4..cd214b891e....8cc0a3....b8....cd21")) { sVersion = "2.10 - 3.0r1, 4.0"; bDetected = true; } else if (MSDOS.compareEP("fafcb8....8ed833c08ed88bf8bb....b9....b8....8905")) { sVersion = "2.10 - 3.0r1, 4.0"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed8a3....8c06....268b......891e....8bd82b1e....891e....268b......891e....2bd881fb....72..bb....8bd003d34289")) { sVersion = "2.0"; bDetected = true; } else if (MSDOS.compareEP("fab8....8ed88c06....268b1e....891e....8bd82b1e....891e....268b1e....2bd881fb....72..bb....8bd0")) { sVersion = "2.00"; sOptions = "1989 by Walter Bright"; bDetected = true; } else if (MSDOS.compareEP("fab8....dbe38ed88c06....8bd82b1e....891e....268b1e....2bd881fb....72..bb....8bd003d342b1..d3e38ed08be381eb....81fb....77")) { sVersion = "4.0"; bDetected = true; } else if (MSDOS.compareEP("eb$$fab8....05....b9....d3e88cc903c18ed88c06....268b1e....891e....8bd82b1e....891e....268b1e....2bd8")) { sVersion = "4.0"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$fc06b8....cd21bf....8cc98ed9be....b9....f3")) { bDetected = true; } else if (MSDOS.compareEP("fafcb8....8ed8bb....81c3....8ed08be38becfb8cc0a3....be....268b04a3....8b36")) { bDetected = true; } else if (MSDOS.compareEP("fafcb8....8ed88c06....8ed0bc....fbba....e8....b8....cd2186c4")) { bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/Zurenava_DOS_Extender.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "Zurenava DOS Extender"); function detect() { if (MSDOS.compareEP("be....bf....b9....56fcf3a55fe9")) { sVersion = "0.45"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/_LE.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("type", "LE"); function detect() { if (MSDOS.isLE()) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/_LX.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("type", "LX"); function detect() { if (MSDOS.isLX()) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/_MSDOS.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "MS-DOS"); function detect() { if (MSDOS.isVerbose()) { sName = MSDOS.getOperationSystemName(); sVersion = MSDOS.getOperationSystemVersion(); sOptions = MSDOS.getOperationSystemOptions(); if (sName === "Unknown") { sName = "DOS-like"; } bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/_NE.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("type", "NE"); function detect() { if (MSDOS.isNE()) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = MSDOS; var X = MSDOS; /** * Get the “base” offset, after the header. * @param {Int} [nOffset=0] - The offset from the base offset. * @returns {Int} */ MSDOS.getBaseOffset = function (nOffset) { if (arguments.length == 0) { nOffset = 0; } return (MSDOS.readWord(8) << 4) + nOffset; } /** * Translate segment/offset address pair to file offset. * @param {UShort} nSegment - Segment address. * @param {UShort} [nOffset=0] - Offset address. * @returns {Int} */ MSDOS.addressToOffset = function (nSegment, nOffset) { if (arguments.length == 1) { nOffset = 0; } nOffset += nSegment << 4; return MSDOS.getBaseOffset(nOffset & 0xFFFFF); } // Backward compatibility alias MSDOS.AddressToOffset = function () { MSDOS.addressToOffset.apply(this, arguments); } /** * Get the entry point file offset. * @param {Int} [nOffset=0] - The offset from the entry point. * @returns {Int} */ MSDOS.getEntryPointOffset = function (nOffset) { if (arguments.length == 0) { nOffset = 0; } return MSDOS.addressToOffset(MSDOS.readWord(0x16), MSDOS.readWord(0x14)) + nOffset; } /** * Get the NewExe (or LE/LX) file offset (assuming it's valid). * @param {Int} [nOffset=0] - The offset from the NewExe offset. * @returns {Int} */ MSDOS.getNEOffset = function (nOffset) { if (arguments.length == 0) { nOffset = 0; } return MSDOS.readDword(0x3C) + nOffset; } ================================================ FILE: db/MSDOS/anti-tracing_add-on.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "anti-tracing add-on"); function detect() { if (MSDOS.compareEP("fc33d28ec2bf....abab8ccb33ff81eb....53bb....531e0733dbcb")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_ASIC-Basic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "ASIC-Basic"); function detect() { if (MSDOS.compareEP("b8....8ed88ec033dbb4..cd108916....cc901ebf....8cc82d....8ed833c98a0e....83f9..72..b9....26be....fc")) { sVersion = "5.0"; sOptions = "1994 by David Visti of 80_20 Software"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed88ec033dbb4..cd108916....1ebf....8cc82d....8ed833c98a0e....83f9..72..b9....26be....fc")) { sVersion = "5.0"; sOptions = "1994 by David Visti of 80_20 Software"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_Ada89.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Ada89"); function detect() { if (MSDOS.compareEP("e9$$$$8cda8cc939d173$$1e0e1fb4..b0..ba....cd21b4..b0..ba....cd211f8cd9b8....8b1e....8ed88ec0")) { sOptions = "1989 by RR Software, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_ApBasic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "ApBasic"); function detect() { if (MSDOS.compareEP("eb$$8cc02ea3....268b36....8cc88ed88ec08cc82e0106....2e0106....2ea1....2e8b16....33db2e")) { sVersion = "1.2"; sOptions = "1987-89 by Comptech Software, Inc."; bDetected = true; } else if (MSDOS.compareEP("eb$$8cc02ea3....268b36....8cc88ed88ec08cc82e0106....2e0106....e8....2ea1....2e8b16....33db2e")) { sOptions = "1991 by Comptech Software, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_BAT2EXEC.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "BAT2EXEC"); function detect() { if (MSDOS.compareEP("eb$$fcbd....8b....8b......8b......b44acd21a1....8986....8b9e....ffe3")) { sVersion = "1.5"; bDetected = true; } else if (MSDOS.compareEP("fcbd....8b....8b......8b......b44acd21a1....8986....8b9e....ffe3")) { sVersion = "1.2"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_BSTAR_FORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "BSTAR_FORTH(16)"); function detect() { if (MSDOS.compareEP("e9$$$$8c0e....8c0e....a1....a3....e8....a3....a1....a3....e8....a3....a1....a3....e8....e8....8b0e....e3..1e8e06....a1")) { sVersion = "0.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_BatLite.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "BatLite"); function detect() { if (MSDOS.compareEP("eb$$e8....bb....8bf3031e....891e....81fb....73..bb....8bfb891e....031e....81c3....8be3b1..d3eb43")) { sOptions = "1991-95 by Pieter A. Hintjens (COM2EXE converted)"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_BetterBASIC.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "BetterBASIC"); function detect() { if (MSDOS.compareEP("e9$$$$fa2ec706........2e8c1e....b8....05....b1..d3e805....bb....83c3..d3eb8cc98ed1bc....2ec706........03c88ed903cb8ec1")) { sOptions = "1984-86 by Summit Software Technology Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_CII-C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "CII-C"); function detect() { if (MSDOS.compareEP("eb$$dbe3fcb8....8ed88c06....26a1....3b06....76..2b06....8cdf81c7....3bf873..8bc7be....3bf0")) { bDetected = true; } else if (MSDOS.compareEP("dbe3fcb8....8ed88c06....26a1....3b06....76..2b06....be....3bf073..2bc63b06....72..3b06")) { bDetected = true; } else if (MSDOS.compareEP("eb$$dbe3fcb8....8ed88c06....26a1....3b06....76..2b06....be....3bf073..2bc63b06....72..3b06")) { bDetected = true; } else if (MSDOS.compareEP("eb$$dbe3fcb8....8ed88c06....9c58a9....75..26a1....3b06....76..2b06....8cdf81c7....3bf8")) { bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/compiler_Easy!-C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Easy!-C"); function detect() { if (MSDOS.compareEP("9c55568ccd83c5..8db6....56be....56cb")) { sOptions = "1993 by Flight Technologys"; //spelling taken from file bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/compiler_GRASP.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // Note: GRaphic Animation System for Professionals meta("compiler", "GRASP Interpreter"); function detect() { if (MSDOS.compareEP("8cd88ec0b8....8ed88c06....8c16....8926....26a1....3b06....77..e9....2b06....8cdf81c7....3bf873..8bc7")) { sVersion = "4.00e - 5.0"; sOptions = "1993 by John Bridges"; bDetected = true; } else if (MSDOS.compareEP("8cd88ec0b8....8ed88c06....26a1....3b06....77..e9....2b06....8cdf81c7....3bf873..8bc7")) { sVersion = "4.0b"; sOptions = "1991 by John Bridges"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_MegaBasic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "MegaBasic"); function detect() { if (MSDOS.compareEP("e9$$$$1eff36....ff36....8cc88ed88ec02e8f06....2e8f06....2e8f06....2e8c0e....b430cd213c..ba....73..e8....2eff36....33c050cb")) { sVersion = "4.00"; sOptions = "1991-94 by Kristofer Sweger"; bDetected = true; } sLang = "Basic"; return result(); } ================================================ FILE: db/MSDOS/compiler_MegaBasic1.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "MegaBasic"); function detect() { if (MSDOS.compareEP("e9$$$$b9....33f633ff1607fcf3a5368c1e....a1....161fa3....e8....bc....b430cd21a2....0ac074..86e0")) { sVersion = "5.40"; sOptions = "1985-87 by Christopher Cochran"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$b8....cd21360806....84c074..8bf886e08bd0d40a86c4360906....86c48ac48ae6d50a")) { sVersion = "5.812"; sOptions = "1994 by Christopher Cochran"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$b430cd21360806....0ac074..86e08bd0d40a86c4360906....86c48ac48ae6d50a")) { sVersion = "5.73"; sOptions = "1992 by Christopher Cochran"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$b9....33f633ff1607fcf3a5368c1e....161fe8....bc....b430cd21a2....0ac074..86e0")) { sOptions = "1985 by Christopher Cochran"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$b9....33f633ff1607fcf3a5268c1e....161fe8....bc....0e1fba....b8....cd21ba....b8")) { sOptions = "1985 by Christopher Cochran"; bDetected = true; } sLang = "Basic"; return result(); } ================================================ FILE: db/MSDOS/compiler_PCC.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "PCC (DeSmet C)"); function detect() { if (MSDOS.compareEP("e9$$$$368c1e....a1....8cd32bc377..e9....483d....72..b8....b1..d3e03bc473..e9....368b1e....36031e....83c3..3be375..8be0368926....b430cd213c..72..36c606......c606")) { sVersion = "1.2"; sOptions = "by Mark DeSmet (C Ware Corporation)"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$368c1e....a1....8cd32bc377..e9....483d....72..b8....b1..d3e03bc473..e9....368b1e....36031e....83c3..3be375..8be0368926....b430cd213c..72..36c606......36a2....c606")) { sVersion = "3.X"; sOptions = "1984-86 by Mark DeSmet (C Ware Corporation)"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$368c1e....a1....8cd32bc377..e9....483d....72..b8....b1..d3e03bc473..e9....8be0c606......c606......b9....be....468a84....3c..74..3c..75..b8....50")) { sVersion = "2.X"; sOptions = "1984-86 by Mark DeSmet (C Ware Corporation)"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$368c1e....a1....36a3....a1....8cd32bc377..e9....483d....72..b8....b1..d3e03bc473..e9....368b1e....36031e....83c3..3be375..8be0368926")) { sVersion = "3.1"; sOptions = "1984-86 by Mark DeSmet (C Ware Corporation)"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/compiler_Power_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Power C"); function detect() { if (MSDOS.compareEP("b8....05....b1..d3e88cca03c28b0e....8cdb8ed8891e....890e....8ec0ba....1e8cc88ed8b8....cd21588ed8bf....33c0")) { sVersion = "2.0.X"; sOptions = "1989-91 by Mix Software"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/compiler_SP-FORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "SP-FORTH"); function detect() { if (MSDOS.compareEP("b8....8ed88bec81c5....c746......e8$$$$8b46..25....0d....cd218b46..83ed..8946..c3")) { sVersion = "2.5.13"; bDetected = true; } if (MSDOS.compareEP("b8....8ed88bec81c5....c746......e8$$$$e8$$$$8bc583ed..8946..c3")) { sVersion = "2.5.X"; sOptions = "1994"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_Symantec_BASIC.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Symantec BASIC"); function detect() { if (MSDOS.compareEP("e8$$$$1e060e1f9a........8c06....33c08ec026a1....a3....26a1....a3....ba....b0..9a........fa26c706........268c0e....fb071fc3")) { sVersion = "1.1a"; sOptions = "1993"; bDetected = true; } sLang = "Basic"; return result(); } ================================================ FILE: db/MSDOS/compiler_Topspeed_C.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Topspeed C"); function detect() { if (MSDOS.compareEP("8cc1e3$$1eba....8eda8b0e....8b36....ff36....50a1....ba....8eda890e....8936....a3....58")) { sVersion = "2.0"; sOptions = "1989 by JPI"; bDetected = true; } else if (MSDOS.compareEP("8cc1e3$$1eba....8eda8b0e....8b36....ff36....50a1....48ba....8eda890e....8936....a3....c706........58")) { sVersion = "2.0"; sOptions = "1989 by JPI"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/MSDOS/compiler_Turbo_Basic.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Turbo Basic"); function detect() { if (MSDOS.compareEP("2E8C......2EC706........E8....E8")) { sVersion = "1.0"; sOptions = "1987"; bDetected = true; } else if (MSDOS.compareEP("faba....8ec28ed2bc....fb8bfc32edbe....8a0e....8bc12bf94f81e7....268c1e....8be78ec2fcf3a48eda8bf7bb....9150")) { sVersion = "1.0"; sOptions = "1987"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_Turbo_Prolog.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Turbo Prolog"); function detect() { if (MSDOS.compareEP("fab8....8ed8b8....a3....8ed0bc....fb8c06....268e06....8c06....b8....a3....9a")) { sVersion = "2.0"; sOptions = "1986-88"; bDetected = true; } sLang = "Prolog"; return result(); } ================================================ FILE: db/MSDOS/compiler_WATCOM.4.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("compiler", "WATCOM C"); function detect() { if (MSDOS.compareEP("E9....'WATCOM C'")) { bDetected = true; } else if (MSDOS.isSignaturePresent(0, Math.min(2048, MSDOS.getSize()), "'WATCOM C'")) { bDetected = true; } else if (MSDOS.isLE()) { var nLE = MSDOS.getNEOffset(); var nDataPage = MSDOS.readDword(nLE + 0x80); var nOffset = MSDOS.readDword(nLE + 0x1C); if (MSDOS.compare("EB..'WATCOM C'", nDataPage + nOffset)) { bDetected = true; } } else if (MSDOS.compareEP("e9$$$$fbb9....8ec126bb....83c3..80e3..26891e....268c1e....01e383c3..80e3..8ed189dc26891e....89dad1ea")) { sName = "Open Watcom C/C++16"; sVersion = "2002 by Sybase, Inc."; bDetected = true; } else if (MSDOS.compareEP("e9$$$$fbb9....8ec1bb....83c3..80e3..26891e....268c1e")) { sName = "Open Watcom C/C++16"; sVersion = "1988-2002 by Sybase, Inc."; bDetected = true; } else if (MSDOS.compareEP("8cd8bb....8edb8b1e....0bdb74..8cd18bd4fa8ed3bc....fb50535152a3....e8....5a595b580bdb74..fa8ed18be2fb")) { sName += "/C++"; sVersion = "1990 by WATCOM Systems Inc."; bDetected = true; } else if (MSDOS.compareEP("eb$$2e8c06....2e8c16....2e8926....fa8cc88ed0bc....fb2ec706........b8....cd213c..72..2e830e......e8....8bd8")) { sName += "/C++"; sVersion = "1991 by WATCOM Systems Inc."; bDetected = true; } else if (MSDOS.compareEP("eb$$2e8c06....2e8c16....2e8926....2ea1....2e0306....fa8ed0bc....fbb8....b1..d3e874..33c054593bcc75..9cb9")) { sVersion = "1992 by WATCOM Systems Inc."; bDetected = true; } else if (MSDOS.compareEP("eb$$33ed2e8e1e....26a1....a3....8d06....a3....8d06....a3....8d06....a3....8cd88d1e....8ed08be3bb....26891e")) { sName += " 386"; sVersion = "1990 by WATCOM Systems Inc."; bDetected = true; } else if (MSDOS.compareEP("eb$$2e8c06....2e8c16....2e8926....2ea3....2e8916....2e891e....fa8cc88ed0bc....fbe8....8bd8e8....2ea2....fa")) { sVersion = "1990 by WATCOM Systems Inc."; bDetected = true; } else if (MSDOS.compareEP("faba....8eda8916....8c06....8c0e....b8....a3....b8....a3....8ed28be0fb0633c9518becbe....268b04a3....8ec28e1e")) { sVersion = "1988 by WATCOM Systems Inc."; bDetected = true; } else if (MSDOS.compareEP("eb$$2e8c06....2e8c16....2e8926....2ea3....2e8916....2e891e....2e8c1e....fa8cc88ed0bc....fbe8....8bd8fa2e8e16")) { sVersion = "1992 by WATCOM Systems Inc."; bDetected = true; } else if (MSDOS.compareEP("EB....00'*** NULL assignment detected'00'")) { sName = "Open Watcom C/C++16"; sVersion = "2.0"; bDetected = true; } sLang = sName.indexOf("C++") !== -1 ? "C" : "C++"; return result(); } ================================================ FILE: db/MSDOS/compiler_WPFORTH.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "WPFORTH"); function detect() { if (MSDOS.compareEP("bd....bc....b8....0e5b81c3....8ed3ffe0")) { sVersion = "1.0"; sOptions = "1993 by Albert Chan"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_djgpp.4.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("compiler", "djgpp"); function detect() { if (MSDOS.compare("'go32stub'", 512)) { sVersion = "2"; bDetected = true; } else if (MSDOS.isSignaturePresent(0, Math.min(8192, MSDOS.getSize()), "'StubInfoMagic!!'")) { sVersion = "1"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/compiler_muLISP-87.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "muLISP"); function detect() { if (MSDOS.compareEP("e9$$$$eb$$8cc88ed88ed0bc....a3....b8....cd21891e....8c06....a0....5084c075..b8....8ec026803e......75..26c416....8cc1")) { sName += "-87"; sOptions = "1983-1989 by Soft Warehouse, Inc."; bDetected = true; } else if (MSDOS.compareEP("e9$$$$eb$$8cc88ed88ed0bc....a3....b8....cd21891e....8c06....b8....cd21891e....8c06....ba....b8....cd21a0....5084c0")) { sName += "-90"; sOptions = "1983-1990 by Soft Warehouse, Inc."; bDetected = true; } sLang = "LISP"; return result(); } ================================================ FILE: db/MSDOS/converter_EXE2COM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "EXE2COM"); function detect() { if (MSDOS.compareEP("b3..b9....33d2be....8bfeac32c3aa494332e403d0e3..eb")) { sVersion = "9.50a"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$92be....bf....fca5a48ccb83c3..b9....ad97011de2")) { sOptions = "1996 by EM-Phaser"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$e9$$$$8cca81c2....3b16....76..ba....b409cd21cd20")) { sOptions = "generic, type 2"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$bf....be....a5a48cda83c2..50b4..bb....cd21580116....81c2....8ed2")) { sOptions = "0-Relocs by dR.No //ViP"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/converter_FromBAT.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "FromBAT"); function detect() { if (MSDOS.compareEP("e9$$$$be....bf....bb....c604..b9....fe04803c..77..c644....b80629cd21be....3c..74..8a04880743e2")) { sOptions = "1991 by Clockwork Software"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/converter_GRABBER.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "GRABBER"); function detect() { if (MSDOS.compareEP("e9$$$$fc8cdb8cc88ed8a3....8ec3891e....8b1e....b1..d3e383c3..b44acd2173..eb")) { sVersion = "6.30-6.31"; sOptions = "1991 by G. A. Monroe"; bDetected = true; } else if (MSDOS.compareEP("eb$$fc8cdbb8....8ed8a3....8ec3891e....8b1e....b1..d3e383c3..b44acd2172..b8")) { sVersion = "6.32"; sOptions = "1991 by G. A. Monroe"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$fc8cdb8cc88ed88ec0891e....e8")) { sVersion = "3.70-3.87"; sOptions = "1991 by G. A. Monroe"; bDetected = true; } else if (MSDOS.compareEP("eb$$fc8cdbb8....8ed88ec3891e....a3....8b1e....b1..d3e383c3..b44acd2173..b4")) { sVersion = "3.91-3.94"; sOptions = "1991-92 by G. A. Monroe"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/converter_com2exe.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("converter", "com2exe"); function detect() { if (MSDOS.compareEP("b8....50c3")) { sVersion = "9.50"; bDetected = true; } else if (MSDOS.compareEP("16179c58f6c4..74..faeb")) { sName = "COM -> EXE"; sOptions = "1993 by R.Roth"; bDetected = true; } else if (MSDOS.compareEP("fcbe....bf....b9....f3a568....c3")) { sVersion = "2.1"; sOptions = "1997 by X-HACKS Group"; bDetected = true; } else if (MSDOS.compare("02000000fffff0fffeff....0001f0ff1c00000000000000", 0x8)) { sOptions = "by Stefan Esser"; bDetected = true; } else if (MSDOS.compare("040000100010f0fffeff00000001f0ff..000000", 0x8)) { sOptions = "by MasterBall Systems"; bDetected = true; } else if (MSDOS.compare("02000000fffff0fffeff00000001f0ff1c0000000000924b", 0x8)) { sOptions = "by Tnarchistic KA0T"; bDetected = true; } else if (MSDOS.compare("0200....fffff0fffeff00000001f0ff1c00000000000000", 0x8)) { sOptions = "by Fabrice Bellard"; bDetected = true; } else if (MSDOS.compare("02000000fffff0fffeff00000001f0ff1c00000020202020", 0x8)) { sOptions = "by cINOgEN"; bDetected = true; } else if (MSDOS.compare("0500aaaafffff0fffeff00000001f0ff1c00000000000000", 0x8)) { sOptions = "by COMSEC"; bDetected = true; } else if (MSDOS.compare("0400aaaaffff0000feff00000001f0ff4000000053545542", 0x8)) { sOptions = "by DblStar Software"; bDetected = true; } else if (MSDOS.compare("0200aaaafffff0fffeff00000001f0ff0000454c49544500", 0x8)) { sOptions = "by Elite x"; bDetected = true; } else if (MSDOS.compare("02000010fffff0fffeff00000001f0ff1c00000000000000", 0x8)) { sOptions = "by HENDRX"; bDetected = true; } else if (MSDOS.compare("02000000fffff0fffeff00000001f0ff1c0000004d455353", 0x8)) { sOptions = "MESS /E"; bDetected = true; } else if (MSDOS.compare("0200aaaafffff0ff000000000001f0ff1c00000050484158", 0x8)) { sOptions = "by PHaX"; bDetected = true; } else if (MSDOS.compare("2000aa00ffffaaaa00aa00000001f0ff0000000000000000", 0x8)) { sOptions = "SCRb2e"; bDetected = true; } else if (MSDOS.compare("02008f0daaaaf0fffeff00000001f0ff1c0000000000524f", 0x8)) { sOptions = "by Rose"; bDetected = true; } else if (MSDOS.compare("0200d70dfffff0fffeff00000001f0ff1c00005472696c6c", 0x8)) { sOptions = "by Trills nT"; bDetected = true; } else if (MSDOS.compare("02000000fffff0ff000000000001f0ff1c00000000000000", 0x8)) { sOptions = "UNP x"; bDetected = true; } else if (MSDOS.compare("04000100fffff0fffeffaaaaaa0200001c000000aa020000", 0x8)) { sVersion = "1.0"; sOptions = "Comvert"; bDetected = true; } else if (MSDOS.compare("18000000fffff0fffeff00000001f0ff1c00000020202020", 0x8)) { sOptions = "WWPACK"; bDetected = true; } else if (MSDOS.compare("0200....fffff0ff648400000001f0ff1c00000000000000", 0x8)) { sOptions = "by unknown"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/cryptor_EXE-Cryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "EXE-Cryptor"); function detect() { if (MSDOS.compareEP("e9$$$$1e062e8c06....fc0e1fe8$$$$8cc9bb....83c5..5e2ead1e2e81")) { sOptions = "1993-1995 by Rolle&Schild" bDetected = true; } else if (MSDOS.compareEP("e9$$$$1e062e8c06....fc0e1ffa8bec8c4e..c746......fe0e")) { sOptions = "1993 by Rolle&Schild" bDetected = true; } else if (MSDOS.compareEP("e9$$$$1e062e8c06....fc0e1ffa8bec8c4e..c746......fe0e....f972..ba....0e1fbb....8b0e")) { sOptions = "1992 by RKT-LANDMARK" bDetected = true; } else if (MSDOS.compareEP("e9$$$$1e062e8c06....fc0e1f8926....8306......fa8c0e....fe0e....f972..ba....0e1fbb")) { sOptions = "by RKT-LANDMARK" bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/cryptor_TUCCRYP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "TUCCRYP"); function detect() { if (MSDOS.compareEP("eb$$2e8c06....8cca8ec28edab4..ba....cd218cda2ea1....2bd08edabb....2e8b0e....b2..51b9....8a0732c28807fec280")) { sVersion = "2+"; sOptions = "George Stark"; bDetected = true; } else if (MSDOS.compareEP("eb$$2e8c06....8cca8ec28edab4..ba....cd218cda2ea1....2bd08edabb....2ea1....ba....f7e28bc8")) { sName = "TUC cryPack"; sVersion = "1.0"; sOptions = "George Stark"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/cryptor_deep-CRyPTer.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("cryptor", "deep-CRyPTer"); function detect() { if (MSDOS.compareEP("..E9....E8....598BE981......81......BE....8D......66....66....8D......8BD78BDF")) { sVersion = "0.1c"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/dos_extender.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "dos extender by Doug Huffman"); function detect() { if (MSDOS.compareEP("0e1f8cc6b4..50bb....cd2173..58cd2172..03de8bebb8....cd21065356b8....cd2f0bc075")) { sVersion = "1991"; bDetected = true; } else if (MSDOS.compareEP("0e1f06b4..50bb....cd2173..58cd2172..8cc003d88bebb8....cd210653b8....cd2f0bc075")) { sVersion = "1992"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/dos_extender1.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "DOS protected mode extender"); function detect() { if (MSDOS.compareEP("fafc0e1fe8....8cc0660fb7c066c1e0..6667a3........66b8........66c1e0..6667a3........66670905........66670905")) { sVersion = "1994 by TRAN (Thomas Pytel)"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/dos_extender2.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "DOS extender"); function detect() { if (MSDOS.compareEP("bc....bb....438cc02bd8b4..cd2173..9a........0e1feb")) { sVersion = "1986-90 by Ergo Computing, Inc."; bDetected = true; } else if (MSDOS.compareEP("b8....8ed0bc....bb....8cc02bd843b4..cd21b8....8ed8c606......b8....8ed88cc0a3")) { sVersion = "1986-91 by Ergo Computing, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_Blinker.0a.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("extender", "Blinker"); function detect() { if (MSDOS.isNE()) { if (MSDOS.compare("'BLINKER'", MSDOS.getBaseOffset(0x18))) { bDetected = true; nOffset = MSDOS.getNEOffset(-0x1200); if (nOffset > 0) { nOffset = MSDOS.findString(nOffset, 0x1200, "Blinker "); if (nOffset != -1) { sVersion = MSDOS.getString(nOffset + 8, 4); } } } } else if (MSDOS.compareEP("e8$$$$558bec5053515256571e06fc8cc88ed8e8....bf....8845..8c")) { bDetected = true; } else if (MSDOS.compareEP("e8$$$$1e06fc8cc88ed8e8....bf....8845..8c1e....c41e....891d")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_CWSDPMI.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "CWSDPMI"); function detect() { if (MSDOS.compareEP("8b2e....ba....8eda8c06....2bea8b3e....81c7....b1..d3ef473bef72..bf....3bef77..8bfd8bdfd3e7")) { sVersion = "0.90+ (r4)"; sOptions = "1997 by Charles W. Sandmann"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$8b2e....ba....8eda8c06....2bea8b3e....81c7....b1..d3ef473bef72..bf....3bef77..8bfd8bdfd3e7")) { sVersion = "0.90+ (6b)"; sOptions = "2001 by Charles W. Sandmann"; bDetected = true; } else if (MSDOS.compareEP("ba....8eda8cd32bdac1e3..8ed203e38c06....fcb430cd213c0373..b0..ba....e9")) { sName += " (ELFstub)"; sVersion = "1.00"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_CauseWay_DOS_Extender.6.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "CauseWay DOS Extender"); function detect() { if (MSDOS.compareEP("fa161f26a1....83e8..8ed0fb061607be....8bfeb9....f3a407368c......8bd88cca3603......368b......fd8bc53d....76")) { sVersion = "3.1X-3.4X"; bDetected = true; } else if (MSDOS.compareEP("eb$$8be88cc60e1f8cc005....0106....b8....cd213c..73..b8....cd21803e......74..8cc005....0306....268b16....3bc273..8ec0a1....33ff")) { sVersion = "2.64, 3.25"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_DOS32.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "DOS32"); function detect() { if (MSDOS.compareEP("0e1ffc9c5b8bc380f4..509d9c583ae775..ba....b409cd21b44ccd218c06....26a1....a3")) { sVersion = "3.3"; sOptions = "1995 by Adam Seychell"; bDetected = true; } else if (MSDOS.compareEP("0e1f068c06....26a1....a3....8ec06633ff6633c96649fc32c0f2ae26380575..83c7")) { sVersion = "3.0"; sOptions = "by Adam Seychell"; bDetected = true; } else if (MSDOS.compareEP("0e1ffc9c5b8bc380f4..509d9c5838fc75..ba....b409cd21b44ccd21")) { sVersion = "3.5c rev6"; sOptions = "1995 by Adam Seychell"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_DOS4G.0a.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("extender", "DOS/4G"); function detect() { if (MSDOS.isSignaturePresent(0, Math.min(1024, MSDOS.getSize()), "'DOS/4G'")) { bDetected = true; } else if (MSDOS.isSignaturePresent(0, Math.min(1024, MSDOS.getSize()), "'DOS4GW'") || MSDOS.isSignaturePresent(MSDOS.getNEOffset() - 1024, 1024, "'dos4gw'")) { sName += 'W'; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_DOSX16.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "DOSX16"); function detect() { if (MSDOS.compareEP("eb$$b430cd213c0372..b8....ba....2bc2268b1e....2bd8b1..d3e08bc881fb....72..1e068eda8ec333f6")) { bDetected = true; } else if (MSDOS.compareEP("eb$$b430cd213c0372..b8....ba....2bc2268b1e....81eb....2bd8b1..d3e08bc881fb....72..1e068eda8ec333f6")) { sVersion = "type 1"; sOptions = "CodeView"; bDetected = true; } else if (MSDOS.compareEP("eb$$b430cd213c0372..e8$$$$56571e060e1fb8....cd213c0372..77..80fc..72..b452cd2126a1....3d")) { sVersion = "type 2"; sOptions = "CodeView"; bDetected = true; } else if (MSDOS.compareEP("eb$$8cc8fa8ed0bc....fb0e1f8c06....c406....a3....8c06....e8....b8....b1..d3e805....a3....e8")) { sVersion = "type 3"; sOptions = "CodeView"; bDetected = true; } else if (MSDOS.compareEP("eb$$b8....8ed88c06....8ed0bc....50bb....b44acd21588ec0")) { sVersion = "type 4"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_EMX.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "EMX DOS Extender"); function detect() { if (MSDOS.compareEP("b8....8ed88c06....e8....e8....e8....e8")) { sVersion = "0.8f-0.9d"; bDetected = true; } else if (MSDOS.compareEP("b8....8ed88cd88ed0bc....e8....3c..72..26a1")) { sVersion = "0.8f"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_Go32Stub.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "Go32Stub DOS-Extender"); function detect() { if (MSDOS.compareEP("0e1f8c1e....8c06....fcb430cd21")) { sVersion = "2.0"; bDetected = true; } else if (MSDOS.compareEP("68....1fbd....9081ed....8c06....fcb430cd21")) { sVersion = "2.02T"; bDetected = true; } else if (MSDOS.compareEP("ba....8eda8cd32bdac1e3..8ed203e3bd....81ed....8c06....fcb430cd21")) { sVersion = "2.02T"; bDetected = true; } else if (MSDOS.compareEP("fc0e1fb4..bb....b9....ba....cd21061e07bf....b9....30c0f3aa07e9")) { sVersion = "2.02T"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_PMODE.0a.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("extender", "PMODE/W"); function detect() { if (MSDOS.compare("'PMODE/W v'", 0x55)) { sVersion = MSDOS.getString(0x5e, 4); bDetected = true; } else if (MSDOS.compareEP("fc1607bf....8bf757b9....f3a5061e071f5fbe....060ea4ad8be8b2..1eb8....50cb")) { sVersion = "1.12-1.33"; sOptions = "1994-1997 by Daredevil and Tran."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_PRO32.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "PRO32 Protected Mode DOS Extender"); function detect() { if (MSDOS.compareEP("e8$$$$8cc82ea3....fa6633f68eeeb8....8ed8b9....66658b0466890483c6..e2..6633c0bb")) { sVersion = "1.7"; sOptions = "1996-99 by Dieter Pawelczak"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_RSX.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "RSX DPMI DOS Extender"); function detect() { if (MSDOS.compareEP("8cc2b8....8ed88ec08ed0bc....8916....e8....b44ccd21")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_Stub-386.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "Stub-386 DPMI DOS Extender"); function detect() { if (MSDOS.compareEP("0e1f8c06....b430cd213c..73..b8....eb..c606......c606......c606......c606......9a")) { sOptions = "1997 by LADsoft"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_TMTSTUB.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "TMTSTUB DOS Extender"); function detect() { if (MSDOS.compareEP("b462cd218bc38ccb538edb8c0e....8c0e....8c0e....2bd8bd....03ddc1e5..b44acd2173..ba....e9")) { sVersion = "0.31"; sOptions = "32bit WDOSX-based DOS-extender and loader by Rustam Gadeyev"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_WDOSX.0a.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("extender", "WDos/X"); function detect() { if (MSDOS.compare("'WDOSX'", 52)) { sVersion = MSDOS.getString(58, 4); sOptions = "1996-1999 by Michael Tippach"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_WDOSX32.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "WDOSX32"); function detect() { if (MSDOS.compareEP("bc....fcbf....ba....e8....b8....abe8....ba....e8....b0..aabe....bf....89faac3c..75..e8....57444f53584c45")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_XMLOD.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "XMLOD DOS-Extender"); function detect() { if (MSDOS.compareEP("8cd805....8ed88ed0bc....90908d06....ffd0")) { sOptions = "1991 by IGC, Inc."; bDetected = true; } else if (MSDOS.compareEP("fa8cd805....8ed88ed0bc....90908d1e....c1eb..03c333f6268b5c")) { sVersion = "1992"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/extender_Xtender.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("extender", "Xtender DOS Extender"); function detect() { if (MSDOS.compareEP("0e1fe8$$$$e8$$$$b8....9c5b80e7..539d9c5980e5..80fd..74..4080cf..539d9c5980e5..74..40668bdc66")) { sVersion = "1.04.36037"; sOptions = "by vyc/sophtXS"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/immunizer_CPAV.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "Central Point Anti-Virus"); function detect() { if (MSDOS.compareEP("e8$$$$5b81eb....50515256578beb1e2ec6........268e......061fb9....bf....8bc7eb")) { sVersion = "1992-1993"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/immunizer_F-XLOCK.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "F-XLOCK"); function detect() { if (MSDOS.compareEP("505050535152561e8bdc8cd805....368947..36c747......8e1e....33db8b07433d....74..75..43833f..75..4343")) { sVersion = "1.16"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/immunizer_Oyster.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "Oyster"); function detect() { if (MSDOS.compareEP("061e55565752515350e8$$$$508cc805....8ed858c3")) { sVersion = "3.01 1991-95 by BEST"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/immunizer_PGPROT.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "PGPROT Antivirus Vaccine"); function detect() { if (MSDOS.compareEP("e9$$$$2ea3....2e8c1e....2e8c06....0e1f8cc00106....0106....26ff36....0732c033ffb9....f2ae26803d..75..47")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/immunizer_Palladix.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "Palladix Virus Protector"); function detect() { if (MSDOS.compareEP("2e8c1e....b8....cd2172..3c..72..b8....cd218cc08ed88bd3b8....cd218cc88ed8b8....ba....cc8cc88ed88ec0be....8bfe")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/immunizer_TTW.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "TTW"); function detect() { if (MSDOS.compareEP("ab33c08bd88bc889c28bf889c6db52..e9")) { sOptions = "1994-95 by TTW Inc."; bDetected = true; } if (MSDOS.compareEP("d88b....c2....89c6071fcb")) { sOptions = "1994-95 by TTW Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/joiner_TurboChainer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("joiner", "TurboChainer"); function detect() { if (MSDOS.compareEP("ba....8eda8cd32bdad1e3d1e3d1e3d1e3fa8ed203e3fbb8....8ed81efc8d06....83c0..501ebe....8cc08ed8075f8b0c32ed5146f3a4591f")) { sVersion = "1.03"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/joiner_V-Load.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("joiner", "V-Load"); function detect() { if (MSDOS.compareEP("33f62ef606......74..0e588bd881e3....75..b1..d3e02bf0d3ee065b0e582bc3b1..bb....8bd3d3eb81e2")) { sVersion = "0.9c1"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/library_ParsecCollection.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE meta("library", "Parsec Collection"); function detect() { if (MSDOS.compareOverlay("0D0A41205041525345432050726F64756374696F6E")) { sOptions = "EOF"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/loader_32stub.0a.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("loader", "32stub for PE files"); function detect() { if (MSDOS.compareEP("8cc88ed88c1e....8c06....8c06....8c06....8bdc83c3..d1ebd1ebd1ebd1eb8cd003d82b1e....b8....cd21")) { sOptions = "by Borland"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/mbp_SHRINK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "mbp SHRINK"); function detect() { if (MSDOS.compareEP("061e508cc005....2e0106....2e0106....8bd02e0306....2ea3....2e8b3e....8ed80355..8955..8b3d0bff74")) { sOptions = "by mbp Software & Systems"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/other_AutoHack.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "AutoHack addition"); function detect() { if (MSDOS.compareEP("0e1fb409ba....cd21fa8e06....be....8b0e....83f9..74..fdd1e1")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/other_Coderunner.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // CodeRunneR is an effective tool for creating new TSRs and porting existing applications to a TSR environment. // http://www.drdobbs.com/msis-coderunner-makes-your-tsrs-run/184402267?pgno=5 meta("other", "CodeRunneR"); function detect() { if (MSDOS.compareEP("e9$$$$e8$$$$fc5e8cdaa1....bd....8edd8ec5a3....b9....bf....2bcf33c02ea3....41d1e9f3ab8916")) { sOptions = "1989 by Micro Systems Software, Inc."; bDetected = true; } else if (MSDOS.compareEP("e9$$$$e8$$$$fc5e8cda8b1e....bd....8edd8ec5b9....bf....2bcf33c02ea3....41d1e9f3ab891e")) { sOptions = "1989 by Micro Systems Software, Inc."; bDetected = true; } else if (MSDOS.compareEP("e9$$$$e8$$$$fc5e8cdaa1....bd....8edd8ec5a3....b9....bf....2bcf33c02ea3....d1e9f3ab8916")) { sOptions = "1992 by OP"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/other_DemoMaker.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "DemoMaker"); function detect() { if (MSDOS.compareEP("be....ad8ed833f6b8....8ec0bf....b9....ac3c..75..3a0474..e2..b8....8ed8b409ba....cd21b8....cd21")) { sVersion = "1.55"; sOptions = "1993-94 by R.Janorkar"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/overlay_overlays.6.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("overlay", ""); function detect() { if (MSDOS.compareOverlay("....'-lh'..2d") || MSDOS.compareOverlay("....'-lz'..2d")) { sName = "LHA archive"; switch (MSDOS.readByte(MSDOS.getOverlayOffset() + 0x5)) { case 0x30: bDetected = true; break; case 0x31: bDetected = true; break; case 0x32: bDetected = true; break; case 0x33: bDetected = true; break; case 0x34: bDetected = true; break; case 0x35: bDetected = true; break; case 0x36: bDetected = true; break; case 0x64: bDetected = true; break; case 0x73: bDetected = true; break; } } else if (MSDOS.compareOverlay("60ea")) { sName = "ARJ archive"; bDetected = true; } else if (MSDOS.compareOverlay("'ZOO'............'Archive'")) { bDetected = true; sName = "ZOO archive"; } else if (MSDOS.compareOverlay("4c0103")) { bDetected = true; sName = "COFF executable"; } else if (MSDOS.compareOverlay("0101'Aladdin'")) { sName = "Self UnStuffit data"; sVersion = "1.1"; sOptions = "by Aladdin Systems, Inc."; bDetected = true; } else if (MSDOS.compareOverlay("7f'ELF'010101")) { sName = "ELF executable"; bDetected = true; } else if (MSDOS.compareOverlay("................'BSA'")) { sName = "BSN archive"; bDetected = true; } else if (MSDOS.compareOverlay("'W4'")) { sName = "W4 executable"; bDetected = true; } else if (MSDOS.compareOverlay("fef2fc")) { sName = "FOXPRO archive"; bDetected = true; } else if (MSDOS.compareOverlay("'SXD'00")) { sName = "Sydex archive"; bDetected = true; } else if (MSDOS.compareOverlay("'RS'000102")) { sName = "GamBit Pro Library archive"; bDetected = true; } else if (MSDOS.compareOverlay("'PK'0304")) { sName = "ZIP archive"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_32LiTe.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.softpedia.com/get/Compression-tools/32LiTE.shtml meta("packer", "32LiTe"); function detect() { if (MSDOS.compareEP("1E060E1F0E07BE....BF....8BCFFC57F3A48CC80106....C333FF")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_AINEXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "AINEXE"); function detect() { if (MSDOS.compareEP("a1....2d....8ed0bc....8cd836a3....05....36a3....2ea1....8ad4b1..d2eafec9d3e08cd336")) { sVersion = "2.1"; bDetected = true; } else if (MSDOS.compareEP("0e07b9....be....33fffcf3a4a1....2d....8ed0bc....8cd836......05....36......2e")) { sVersion = "2.3"; bDetected = true; } else if (MSDOS.compareEP("a1....2d....8ed0bc....8cd836a3....05....36a3....2ea1....8ad4b1..d2ead3e08cd3368b2e....2e032e....fdfeca")) { sVersion = "2.22"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_AVPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "AVPACK"); function detect() { if (MSDOS.compareEP("501E0E1F160733F68BFEB9....FCF3A506BB....53CB")) { sVersion = "1.20"; bDetected = true; } else if (MSDOS.compareEP("EB$$501E0E1F160733F68BFEB9....FCF3A506BB....53CB")) { bDetected = true; } else if (MSDOS.compareEP("e9$$$$8cda0316....8bda0316....3b16....76..ba....b409cd21cd208cd28bccfa8ed3bc....fb5251501e53b8")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_Amisetup.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Amisetup loader"); function detect() { if (MSDOS.compareEP("b8....50b8....501e8cc88ed8e8$$$$9c5b81e3....539d9c5b81e3....81fb....74..c3")) { sOptions = "by Robert Muchsel"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_COMPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "COMPACK"); function detect() { if (MSDOS.compareEP("BE....E8....5D83....55505351520E070E1F8BCE")) { sVersion = "4.5"; bDetected = true; } else if (MSDOS.compareEP("BD....50068CCB03DD8CD24B8EDBBE....BF....8EC2B9....F3A54A4D75")) { sVersion = "5.1"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_CRYPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "CRYPACK"); function detect() { if (MSDOS.compareEP("EB..061E8CD805....8ED833DB0E0733FFBE....8A0726....32C48807473BFE")) { sVersion = "3.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_Compress-EXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Compress-EXE"); function detect() { if (MSDOS.compareEP("9c508cdb53530e1f83c3..33ff8ec38bd3015d..015d..b9....be....fc32e4ac3c..77")) { sVersion = "1.0"; sOptions = "1990 by W.ZhongHua"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_DIET.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "DIET"); function detect() { if (MSDOS.compareEP("BF....3BFC72..B44CCD21BE....B9....FDF3A5FC")) { sVersion = "1.00/1.00d"; bDetected = true; } else if (MSDOS.compareEP("FC061E0E8CC801......BA....03............................00000000")) { sVersion = "1.00d"; bDetected = true; } else if (MSDOS.compareEP("fc061e0e8cc80106....ba....03c28bd805....8edb8ec033f633ffb9....f3a54b484a79..8ec38ed8be....ad8be8b2..ea")) { sVersion = MSDOS.compareEP("64", 55) ? "1.10a/1.20" : "1.00"; bDetected = true; } else if (MSDOS.compareEP("BE....BF....B9....3BFC72..B44CCD21FDF3A5FC")) { sVersion = "1.02b/1.10a/1.20"; bDetected = true; } else if (MSDOS.compareEP("F89C061E5756525153500EFC8CC8BA....03D052")) { sVersion = "1.44/1.45f"; bDetected = true; } else if (MSDOS.compareEP("F99CEB$$061e5756525153500efc8cc82e0106....ba....03c28bd805....8edb8ec033f633ff")) { sVersion = "1.43/1.44"; bDetected = true; } else if (MSDOS.compareEP("F99CEB$$061e5756525153500efc8cc8ba....03d052ba....52ba....03c28bd805....8edb")) { sVersion = "1.45f"; bDetected = true; } else if (MSDOS.compareEP("061e0efc8cc80106....ba....03c28bd805....8edb8ec033f633ffb9....f3a54b484a79")) { sVersion = "1.44b"; bDetected = true; } else if (MSDOS.compareEP("bd....1e068ccb03dd8cd24b8edbbe....bf....8ec2b9....f3a54a4d")) { sVersion = "1.45d"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_DSHIELD.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "DSHIELD"); function detect() { if (MSDOS.compareEP("06E8....5E83EE..16179C58B9....25....2E")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_DexEXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "DexEXE"); function detect() { if (MSDOS.compareEP("8b2e....2e8c0e....2e8c0e....83ed..8ed5bc....501eba....f91bea8ec58cc805....8ed80e06fc33f68bfe8adeb1..d3e2d2ebb8....74..b9....f3a5")) { sVersion = "2.1"; sOptions = "by Kaljevic Dejan"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_EXECUTRIX.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "EXECUTRIX-COMPRESSOR"); function detect() { if (MSDOS.compareEP("e9$$$$0e1fa3....8c1e....8c1e....268b......89......8ccbb8....05....05....2bc3a3....8cd01e5b2bc3a3....b430cd21")) { sOptions = "by Knowledge Dynamics Corp"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_EXEPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "EXEPACK"); function detect() { if (MSDOS.compareEP("8cc005....0e1fa3....0306....8ec08b0e....8bf94f8bf7fdf3a4")) { switch ((MSDOS.readByte(18) << 8) | MSDOS.readByte(20)) { case 0x0010: sVersion = "3.65"; break; case 0x9910: sVersion = "4.00"; break; case 0x1510: sVersion = "4.03"; break; case 0x0012: case 0x0112: sVersion = "4.06"; break; case 0x0014: case 0x2d10: case 0x7c10: sVersion = "4.00 - 4.06"; break; case 0x8410: sVersion = "4.0x (possibly)"; break; } bDetected = true; } else if (MSDOS.compareEP("428cc005....0e1fa3....0306....8ec08b0e....8bf94f8bf7fdf3a4")) { if (MSDOS.readByte(18) == 0x00 && MSDOS.readByte(20) == 0x10) { sVersion = "3.65"; } bDetected = true; } else if (MSDOS.compareEP("..52428be88cc005....0e1fa3....0306....8ec0..0e....8bf94f8bf7fdf3a4")) { if (MSDOS.readByte(18) == 0x00 && MSDOS.readByte(20) == 0x10) { sVersion = "3.65"; } bDetected = true; } else if (MSDOS.compareEP("8be88cc0......0e1fa3....0306....8ec08b0e........4f8bf7fdf3a4")) { if (MSDOS.readByte(20) == 0x10) { sVersion = "3.69"; } else if (MSDOS.readByte(18) == 0x00 && MSDOS.readByte(20) == 0x12) { sVersion = "5.31.009"; } bDetected = true; } else if (MSDOS.compareEP("8be88cc0......0e1fa3....0306....06b8....06008b....8bf7fdf3a450b8....50cb")) { sVersion = "5.31.009"; bDetected = true; } else if (MSDOS.compareEP("8bc6f7d0d3e88cda2bd073..8cd82bd2d3e003f08eda8bc7")) { sVersion = "3.65"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_ExeLITE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "ExeLITE"); function detect() { if (MSDOS.compareEP("fc8cc80106....ba....03c28bd805....8edb8ec033ff33f6b9....f3a5484b4a75..8ec38ed8be")) { sVersion = "1.00"; bDetected = true; } else if (MSDOS.compareEP("b8....bb....0e5a03c20e5053cb")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_LGLZ.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "LGLZ"); function detect() { if (MSDOS.compareEP("fc1e060e8cc80106....ba....03c28bd805....8edb8ec033f633ffb9....f3a54b484a79..8ec38ed8be....ad95b2..ea")) { sVersion = "1.04"; sOptions = "by G.Lyapko"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_LZEXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "LZEXE"); function detect() { if (MSDOS.compareEP("060e1f8b0e....8bf14e89f78cdb03......8ec3fdf3a453b8....50cb")) { sVersion = "0.91, 1.0"; bDetected = true; } else if (MSDOS.compareEP("060e1f8b0e....8bf14e89f78cdb03......8ec3b4..31edfdac01c5aae2")) { sVersion = "0.90"; bDetected = true; } else if (MSDOS.compareEP("50060e1f8b0e....8bf14e89f78cdb03......8ec3fdf3a453b8....50cb")) { sVersion = "0.91c"; bDetected = true; } else if (MSDOS.compareEP("50060e1f8b36....83e6..8bfe8bced1e9418cdb031e....8ec3fdf3a553b8....50cb")) { sVersion = "0.91c"; bDetected = true; } else if (MSDOS.compareEP("50060e1f8b0e....8bf14e8cdb89f703......8ec3fdf3a4b8....5350cb")) { sVersion = "0.91"; sOptions = "1990"; bDetected = true; } else if (MSDOS.compareEP("0e1f068b0e....8bf14e89f78cdb031e....8ec3fdf3a453b8....50cb")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("0e1f8b0e....89ce504e8cdb0689f7031e....fd8ec3f3a453b8....50cb")) { sVersion = "?.?"; bDetected = true; } else if (MSDOS.compareEP("060e1f8b0e....8bf14e8bfe8cdb031e....8ec3fdf3a453b8....50cb")) { sVersion = "1.0a"; bDetected = true; } else if (MSDOS.compareEP("060e1f8b0e....8bf14e89f78cdb031e....fd8ec3f3a453b8....50cb")) { sVersion = "1.0a"; bDetected = true; } else if (MSDOS.compareEP("8cd805....2e0106....2eff2e")) { sVersion = "1.00a"; sOptions = "suspicious, look like a trick"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_MSLite.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "MSLite"); function detect() { if (MSDOS.compareEP("538cd315....8beceb$$b8....ffe0")) { sVersion = "2.3"; sOptions = "1998 by A.Cheng //Mercury Soft"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_Optlink.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Optlink"); function detect() { if (MSDOS.compareEP("87c0eb$$fc8c..83c2..5216070e1f0116....0116....33f633ffb9....f3a506b8....50cb")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("87c006571e56525153509cfc8cc283c2..16070e1f0116....0116....33f633ffb9....f3a506b8....50bd....cb")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("87c0eb$$8cda83c2..5216070e1f0116....0116....33f633ffb9....f3a506b8....50cb")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("87c0fc8cda83c2..16070e1f0116....0116....33f633ffb9....f3a506b8....50bd....cb")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("87c0555657525153509cfc8cda83c2..16070e1f0116....0116....33f633ffb9....f3a506b8....50bd....cb")) { sOptions = "prepacked"; sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("bf....8edffa8ed781c4....fbb430cd21a2....8826....3c..73..8d16....b409cd2133c05006cb")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("87c08cda83c2..16070e1f0116....0116....33f633ffb9....f3a506b8....50bd....cb")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_PGMPAK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "PGMPAK"); function detect() { if (MSDOS.compareEP("fa1e1750b430cd213c..73..b44ccd21fcbe....bf....e8....e8....bb....ba....8ac38bf3")) { sVersion = "0.13"; bDetected = true; } if (MSDOS.compareEP("1e1750b430cd213c..73..b44ccd21fcbe....bf....e8....e8....bb....ba....8ac38bf3")) { sVersion = "0.15"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_PKEXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "PKEXE"); function detect() { if (MSDOS.compareEP("fa50535152565755061e8cc88bd88ed80106....0106....0306....33f68ec006e8")) { sOptions = "1994 by D.Usov"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_PKLITE.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "PKLITE"); function detect() { if (MSDOS.compare("'PKLITE'", 0x1E) || MSDOS.compare("'PKlite'", 0x1E)) { var bBit = MSDOS.readByte(0x1D); sVersion = (bBit & 0x7) + "." + ("0" + MSDOS.readByte(0x1C)).slice(-2); if (bBit & 0x8) { sOptions = "Extra compression"; } if (bBit & 0x10) { sOptions = sOptions.append("Multi-segment file"); } bDetected = true; } else if (MSDOS.compareEP("1FB409BA....CD21B8....CD21")) { sVersion = "1.50"; sOptions = "CRC check"; bDetected = true; } else if (MSDOS.compareEP("50B8....BA....05....3B060200")) { sVersion = "1.50"; bDetected = true; } else if (MSDOS.compareEP("B8....BA....05....3B060200")) { sVersion = "1.12-1.13"; bDetected = true; } else if (MSDOS.compareEP("b8....ba....05....2d....fa8ed0fb2d....8ec050b9....33ff57be....fc565706518cc88ec0")) { sVersion = "1.12"; sOptions = "extra compression"; bDetected = true; } else if (MSDOS.compareEP("ba....b8....05....3B06....73..2d....fa8ed0fb2d....8ec050b9....33ff57be....fcf3a5cb")) { sVersion = "1.1X"; bDetected = true; } else if (MSDOS.compareEP("b8....05....3B06....72..cd20b9....2d....8ed02d....8ec006ba....be....33ff571e571feb")) { sVersion = "1.1X"; bDetected = true; } else if (MSDOS.compareEP("B8....BA....3bc473..8bc42d....25....8bf8b9....be....fcf3a58bd8b1..d3eb8cd903d95333db53cb")) { sVersion = "1.12, 1.20"; bDetected = true; } else if (MSDOS.compareEP("50532b06....0a06....8b1e....5b58b8....ba....8cdb03d83b1e....73..83eb..fa8ed3bc....fb")) { sVersion = "1.05"; bDetected = true; } else if (MSDOS.compareEP("8cd805....ba....903b06....72..b409ba....cd21cd20")) { sVersion = "1.15"; bDetected = true; } else if (MSDOS.compareEP("B8....BA....8cdb03d83b1e....73..83eb..fa8ed3bc....fb83eb..8ec353b9....33ff57be....fcf3a5cb")) { sVersion = "1.03-1.05"; bDetected = true; } else if (MSDOS.compareEP("B8....BA....8cdb03d83b1e....73..83eb..fa8ed3bc....fb83eb..908ec353b9....33ff57be....90fcf3a5cb")) { sVersion = "1.03"; sOptions = "type 2"; bDetected = true; } else if (MSDOS.compareEP("2e8c1e....8b1e....8cda81c2....3bda72..81eb....83eb..fa8ed3bc....fbfdbe....8bfe8ccab9....03d1")) { sVersion = "1.00c"; bDetected = true; } else if (MSDOS.compareEP("b8....ba....3b06....73..2d....8ed02d....518ec050b9....33ff57be....fcf3a5")) { sName += " [hacked] by Shay Lev Ary"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_PKTINY.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "PKTINY"); function detect() { if (MSDOS.compareEP("2ec606......2ec606......2ec606......e9")) { sVersion = "1.0" sOptions = "by Thomas Monkemeier"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_PMWLite.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "PMWLite"); function detect() { if (MSDOS.compareEP("e8$$$$fc1633c033db8ec026c406....26813e........75..26813e........74..26891e....26891e....07c3")) { sVersion = "1.33"; sOptions = "by Daredevil & Tran"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_PRO-PACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("packer", "PRO-PACK"); function detect() { if (MSDOS.compareEP("0e8cd38ec38cca8eda8b......8bf183....8bfed1..fdf3a553b8....508b")) { sVersion = "2.13-2.14"; bDetected = true; } else if (MSDOS.compareEP("8cd38ec38cca8eda8b0e....8bf183ee..8bfed1..fdf3a553b8....508b......cb")) { sVersion = "2.08"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_Pack.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Pack"); function detect() { if (MSDOS.compareEP("eb$$2e8c1e....2e8c06....8cc383c3..2e891e....8cc88ed8505351525657061eb462cd212e891e....b4..33db4bcd21")) { sVersion = "1.0"; sOptions = "1987 by K.Kokkonen"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_Packers.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Packer"); function detect() { if (MSDOS.compareEP("fd1e0e81de....89f63bf23ab0....03f433f003f333f781d6....0e28de1a72..00d62250..1250..81e6....07")) { sOptions = "by mARQUIS dE sOIRPE //mDS/uCF"; bDetected = true; } else if (MSDOS.compareEP("e800005e83c6..90b9....8cd805....2ec43c8cc303d88ec326010583c6..e2")) { sName = "relocation packer"; sOptions = "by The DoP"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_RERP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "RERP"); function detect() { if (MSDOS.compareEP("fc1e068cc383c3..0e1fbe....b9....ad3bc175..ad3bc174..03c38ec0ad8bf826011deb")) { sVersion = "0.02"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_RIXEPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "RIXEPACK"); function detect() { if (MSDOS.compareEP("eb$$fc2e8c1e....8cc88ed8a3....8cc34b8ec326031e....81eb....0306....05....3bc3")) { sOptions = "1986, 1990 by RIX SoftWorks, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_RJcrush.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "RJcrush"); function detect() { if (MSDOS.compareEP("06FC8CC8BA....03D052BA....52BA....03C28BD805....8EDB8EC033F633FFB9")) { sVersion = "1.00"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_Relpack.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Relpack"); function detect() { if (MSDOS.compareEP("eb$$2e8c1e....2e8c06....8cc383c3..8cc88ed8be....fcad3d........ad3d........03c38ec0ad")) { sVersion = "1.0"; sOptions = "by TurboPower Software"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_SCRNCH.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "SCRNCH"); function detect() { if (MSDOS.compareEP("eb$$bb....b44acd2181eb....73..ba....b9....e9$$$$0e1fb440bb....cd21b8....cd21")) { sVersion = "1.02"; sOptions = "by Graeme W. McRae"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_SEA-AXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "SEA-AXE"); function detect() { if (MSDOS.compareEP("fcbc....0e1fe8....26a1....8b1e....2bc38ec0b1..d3e38bcbbf....8bf7f3a5bf....0657cb")) { bDetected = true; } else if (MSDOS.compareEP("fcbc....0e1fa3....e8....a1....8b1e....2bc38ec0b1..d3e38bcbbf....8bf7f3a5bf....0657cb")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_Scramb.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Scramb"); function detect() { if (MSDOS.compareEP("e9$$$$e8$$$$5b0e1f81eb....8bc305....508bc803d12bfac3")) { sVersion = "1.20"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_Shrinker.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Shrinker"); function detect() { if (MSDOS.compareEP("bb....ba....81c3....b8....b1..d3e803c38cd9498ec12603......2bc872..fa8ed3bc....fb")) { sVersion = "3.0"; sOptions = "1997 by A.S.M."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_TSCRUNCH.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "TSCRUNCH"); function detect() { if (MSDOS.compareEP("e9$$$$061e55575652515350161f0e078bf4bf....b9....fcf3a4b430cd213c0373..be....e9")) { sOptions = "by Clarion software"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_Tenth_Planet.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Tenth Planet Soft packer"); function detect() { if (MSDOS.compareEP("50068cca8edabe....fcad95ad9303da8ec38b0c8bf14e8bfefdf3a4b8....0650cb")) { sOptions = "1996"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_TinyProg.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "TinyProg"); function detect() { if (MSDOS.compareEP("e9$$$$eb$$83ec..83e4..8bec50be....0336....8cd28cd803....33c275..fc8ec233ff")) { sVersion = "3.X"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$eb$$83ec..83e4..8bec50be....0336....8cd28cd803....33c275..fc8ec233ff")) { sVersion = "3.X"; bDetected = true; } else if (MSDOS.compareEP("eb$$83ec..83e4..8bec50be....0336....8cd28cd803....33c275..fc8ec233ff")) { sVersion = "3.X"; sOptions = "modified"; bDetected = true; } else if (MSDOS.compareEP("83ec..83e4..8bec50be....0336....8cd28cd803....33c275..fc8ec233ff")) { sVersion = "3.X"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$2ec606......e9$$$$83ec..83e4..8bec50be............8cd28cd803....33c275..fc8ec233ff")) { sVersion = "3.X"; sOptions = "modified"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_Tinyprot.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "TinyProt"); function detect() { if (MSDOS.compareEP("061e575650535152bd....0e1f8cc005....8ec0be....8b44..8cc103c18944..06b8....cd21891e....8c06....b8....cd21891e....8c06....07ba....b8....45cd21cd01")) { bDetected = true; } else if (MSDOS.compareEP("18..00..eb$$83ec..83e4..8bec50be....0336....8cd28cd80344..33c275..fc")) { sVersion = "1.0c-e"; sOptions = "1996 by I.Hakszer"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_UCEXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "UCEXE"); function detect() { if (MSDOS.compareEP("501e0e1ffc33f6e8....160733f633ffb9....f3a506b8....50cb")) { sVersion = "2.3"; sOptions = "1996 by A.Cadach"; bDetected = true; } else if (MSDOS.compareEP("501e0e1ffc2bf6e8....16072bf68bfeb9....f3a406b8....50cb")) { sVersion = "2.4"; sOptions = "1996 by A.Cadach"; bDetected = true; } else if (MSDOS.compareEP("501e0e1ffc160733f633ffb9....f3a506b8....50cb")) { sVersion = "3.0"; sOptions = "1996 by A.Cadach"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_UPX.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "UPX"); function getUPXVersion(nSize) { var sResult = "", nOffset = MSDOS.findString(0, nSize, "$Id: UPX"); if (nOffset !== -1) { sResult = MSDOS.getString(nOffset + 9, 4); } return sResult; } function detect() { sVersion = getUPXVersion(Math.min(8192, MSDOS.getSize())); if (sVersion) { bDetected = true; } else { if (MSDOS.compareEP("..............fcb430cd213c03")) { sVersion = "3.X"; bDetected = true; } else if (MSDOS.compareEP("B9....BE....89F71EA9....8CC805....8ED805....8EC0FDF3A5FC2E........73..92AFAD0E0E")) { sVersion = "0.82"; bDetected = true; } else if (MSDOS.compareEP("8CCBB9....BE....89F71EA9....8D......8ED805....8EC0FDF3A5FC")) { sVersion = "0.20-0.60"; bDetected = true; } else if (MSDOS.isSignaturePresent(0, Math.min(128, MSDOS.getSize()), "'UPX!'")) { bDetected = true; } else if (MSDOS.compareEP("f99cb9....be....89f71ea9....8cc805....8ed805....8ec0fdf3a5fc2e........73..92afad0e0e")) { sVersion = "?.??"; bDetected = true; } else if (MSDOS.compareEP("8ccb8dbf....57b9....ba....be....89f71e1ea9....8d87....8daf....8ed88ec5fdf3a5fc")) { sVersion = "0.05"; bDetected = true; } if (bDetected) { // Correct version for large files. sUPXVersion = getUPXVersion(MSDOS.getSize()); if (sUPXVersion) { sVersion = sUPXVersion; } } } return result(); } ================================================ FILE: db/MSDOS/packer_WWPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "WWPACK"); function detect() { if (MSDOS.compare("'WWP'", 0x1c)) { if (MSDOS.compareEP("B8....8CCA03D08CC981C1....51")) { if (MSDOS.compareEP("6A..06068CD383....536A..FC", 14)) { sVersion = "3.00"; sOptions = "Extractable"; } else if (MSDOS.compareEP("33C9B1..510606BB....538CD3", 14)) { sVersion = "3.02"; sOptions = "Extractable"; } else if (MSDOS.compareEP("BB....53", 20)) { sVersion = "3.03"; } else if (MSDOS.compareEP("B1..518CD3", 20)) { sVersion = "3.05c4"; sOptions = "Modified"; } } else if (MSDOS.compareEP("BE....BA....BF....B9....8CCD8EDD81ED....06068BDD2BDA8BD3FC")) { sVersion = "3.00"; sOptions = "Relocations pack"; } else if (MSDOS.compareEP("BE....BF....B9....8CCD81ED....8BDD81EB....8BD3FCFA1E8EDB011533C02EAC")) { sVersion = "3.02"; sOptions = "Relocations pack"; } else if (MSDOS.compareEP("0305....B8....8CCA03D08CC981C1....51B9....510606B1..518CD3")) { sVersion = "3.05c4"; if (MSDOS.compareEP("1A", 3)) { sOptions = "Extractable"; } else if (MSDOS.compareEP("1B", 3)) { sOptions = "Unextractable"; } if (MSDOS.compareEP("C0", 2)) { sOptions = sOptions.append("Password check", "Virus shield"); } else if (MSDOS.compareEP("80", 2)) { sOptions = sOptions.append("Password check"); } else if (MSDOS.compareEP("40", 2)) { sOptions = sOptions.append("Virus shield"); } } bDetected = true; } else if (MSDOS.compareEP("BE....BF....B9....8CCD81ED....8BDD81EB....8BD3FCFA")) { sVersion = "3.04/3.05"; sOptions = "Relocations pack"; bDetected = true; } else if (MSDOS.compareEP("b8....8cca03d08cc981c1....51b9....510606b1..518cd383eb..53b1")) { sVersion = "3.05beta P"; bDetected = true; } else if (MSDOS.compareEP("b8....8cca03d08cc981c1....51b9....510606fc8cd5b1..51b1..8cd3")) { sVersion = "3.0x P"; bDetected = true; } else if (MSDOS.compareEP("b8....8cca03d08cc981c1....51b9....510606b1..51fc8cd5b1..8cd3")) { sVersion = "3.0x P"; bDetected = true; } else if (MSDOS.compareEP("b8....8cca03d08cc981c1....51b9....510606bb....538cd383eb..53b1")) { sVersion = "3.03 PU"; bDetected = true; } else if (MSDOS.compareEP("b8....8cca03d08cc981c1....5133c9b1..510606bb....538cd383eb..53b1")) { sVersion = "3.02, 3.02a P"; bDetected = true; } else if (MSDOS.compareEP("b8....8cca03d0fc8cd58cc981c1....51b9....510606b1..51b1..8cd383eb..53514d")) { sVersion = "3.04 PR"; sOptions = "Relocations pack"; bDetected = true; } else if (MSDOS.compareEP("fa1e8ed8b8....cd218ed98bd3b8....cd211fe800005a83c2..87d4ffe4")) { sVersion = "3.05 PU"; bDetected = true; } else if (MSDOS.compareEP("b8....8cca03d08cc981c1....516a..06068cd383eb..536a..fc8cd5be....33ff")) { sVersion = "3.0 P"; bDetected = true; } else if (MSDOS.compareEP("be....ba....bf....b9....8ccd8edd81ed....06068bdd2bda8bd3fc8ec3")) { sVersion = "3.0"; sOptions = "Relocations pack"; bDetected = true; } else if (MSDOS.compareEP("ba....faf9............72..0633c98ec1bf....ab8bc6ab07e8....5a")) { sVersion = "3.03 PU"; sOptions = "Relocations pack modified"; bDetected = true; } else if (MSDOS.compareEP("faba....f8bb....b9....73..0633c98ec1bf....ab8bc6ab07e8....5a")) { sVersion = "3.03 PU"; sOptions = "Relocations pack"; bDetected = true; } else if (MSDOS.compareEP("b8....8cca03d08ccd81c5....55b9....510606b1..518cd383eb..53b1..51fc8cd5be....33ff")) { sVersion = "3.05c PU"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_XPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "XPACK"); function detect() { if (MSDOS.compareEP("8becfa33c08ed0bc....2e8f06....2e8f06....eb$$0ebb....535feb$$178be5fb48d1e8eb")) { sVersion = "1.52"; bDetected = true; } if (MSDOS.compareEP("e90000e9$$$$2ec706........8beceb$$2ec606......eb009a")) { sVersion = "1.0j"; bDetected = true; } if (MSDOS.compareEP("b8....15....8beceb$$b8....ffe0")) { sVersion = "1.65, 1.66"; bDetected = true; } if (MSDOS.compareEP("b8....15....813e........e8$$$$e8$$$$eb$$1e0e1f8beceb")) { sVersion = "1.67.l"; bDetected = true; } if (MSDOS.compareEP("b8....15....eb$$b8....ffe0")) { sVersion = "1.67j"; bDetected = true; } if (MSDOS.compareEP("8beceb$$b8....ffe0")) { sVersion = "1.65b2"; bDetected = true; } if (MSDOS.compareEP("e9$$$$8beceb$$b8....ffe0")) { sVersion = "1.44"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_ZIPSCRUB.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "ZIPSCRUB relocations compressor"); function detect() { if (MSDOS.compareEP("8cc88ed88cc381c3....891e....8bc30306....8ec08b0e....8bf14e8bfefdf3a450b8....50cb")) { bDetected = true; } else if (MSDOS.compareEP("8cc88ed88cc381c3....8bc30306....8ec08b0e....8bf14e8bfefdf3a450b8....50cb")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/packer_aPACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "aPACK"); function detect() { if (MSDOS.compareEP("1E068CCBBA....03DAFC33F633FF4B8EDB8D......8EC0B9....F3A54A75..8EC38ED833FFBE....05....0E50")) { sVersion = "0.90-0.99,XE_1.3-1.4"; bDetected = true; } else if (MSDOS.compareEP("1E068CCBBA....03DA8D87....FC33F633FF484B8EC08EDBB9....F3A54A75..8EC38ED833FFBE....05....0E50")) { sVersion = "0.82"; bDetected = true; } else if (MSDOS.compareEP("8cc88ed805....8ec050be....33fffcb2..bd....33c950a4ffd5")) { sVersion = "0.94"; sOptions = "-m -d"; bDetected = true; } else if (MSDOS.compareEP("8cc880c4..8ec0fcb9....be....8bfe57f3a55fbe....06ba....521e078ed8cb")) { sVersion = "0.82-0.94"; sOptions = "converted to exe"; bDetected = true; } else if (MSDOS.compareEP("1e060e1f0e07be....bf....8bcffc57f3a4c3")) { sVersion = "0.98, 0.99"; sOptions = "-t"; bDetected = true; } else if (MSDOS.compareEP("1e068cc88ed805....8ec050be....33fffcb6..bd....ffd5")) { sVersion = "0.69-0.74"; sOptions = "-t"; bDetected = true; } else if (MSDOS.compareEP("be....bf....8bcffc57f3a4c3")) { sVersion = "0.98-0.99 small"; bDetected = true; } else if (MSDOS.compareEP("1e068cc88ed805....8ec050be....33fffcb6..bd....8bde83e6..c1eb..8cd803c38ed8")) { sVersion = "0.73-0.74 big"; bDetected = true; } else if (MSDOS.compareEP("0e1f0e07be....bf....8bcffc57f3a4c3")) { sVersion = "0.98"; bDetected = true; } else if (MSDOS.compareEP("1e068cc88ed805....8ec050be....33fffcb2..bd....33c950a4")) { sVersion = "0.96"; sOptions = "-m"; bDetected = true; } else if (MSDOS.compareEP("1e06ba....8ccb03dafc33f633ff4b8edb8d87....8ec0b9....f3a54a75..8ec38ed833ffbe....05....0e506a..cb")) { sVersion = "0.90-0.99"; bDetected = true; } else if (MSDOS.compareEP("8cc88ed805....8ec050be....33fffcb6..bd....ffd5")) { sVersion = "0.73-0.82"; sOptions = "-d"; bDetected = true; } else if (MSDOS.compareEP("1e068cc88ed805....8ec0be....33fffcb6..bd....ffd5")) { sVersion = "0.58"; sOptions = "type 2"; bDetected = true; } else if (MSDOS.compareEP("1e068cc88ed805....8ec050be....33fffc8cc82e0106....b2..bd....33c9")) { sVersion = "0.98, 0.99"; sOptions = "-m -h"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/patcher_Patchers.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("patcher", "Patcher"); function detect() { if (MSDOS.compareEP("b409ba....cd21ba....cd21b8....ba....cd2173..b409ba....cd21ba....cd21cd20a3....b409ba....cd21")) { sName = "CrAcKeR"; sVersion = "0.2a"; sOptions = "by Deu$"; bDetected = true; } else if (MSDOS.compareEP("b409ba....eb$$cd21b409ba....eb$$cd21b409ba....eb$$cd21b409ba....eb")) { sOptions = "by Mr. KIM"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_$pirit.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "$pirit"); function detect() { if (MSDOS.compareEP("E8....F9E8....B4..CD212D....13F2E8....2A01F5E9")) { sVersion = "1.5"; bDetected = true; } else if (MSDOS.compareEP("ACB4..CD2106B4..CD21079FE8....FC90")) { sVersion = "1.5"; bDetected = true; } else if (MSDOS.compareEP("123fe8$$$$e4..900c..36e6..ba....f9525289d126b8....36b5..3ecd16fd5a")) { sVersion = "1.5"; bDetected = true; } else if (MSDOS.compareEP("ac03d9e8$$$$e4..fb0c..fbe6..90ba....5252fd89d1b8....30ed2ecd16905a87d190b8....fb86cdf530ed3ecd16f95ac3")) { sOptions = "$UPD 2.1 1996 by Night $pirit"; bDetected = true; } else if (MSDOS.compareEP("1c..3a1fe8....f5e8....fde8....04..9035....f8f6dff9d0d5fdfbfcc3")) { bDetected = true; } else if (MSDOS.compareEP("e8$$$$e4210c1ae6212eb9....2e51f85189c9f8b8....b5..2ecd163659fdfd87c986cd3eb5..2eb8....f9cd1659c3")) { bDetected = true; } else if (MSDOS.compareEP("e8$$$$ba....f8ec0c..36eef5b8....50f950269089c128edf9b8....cd165887c1b8....f886e93e30ed36cd1658fdc3")) { sVersion = "1.5"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$ba....fbec0c..eeb9....51512efd89c9fdb8....b5..3ecd165987c9b8....86e9b5..f8cd1659f9c3")) { sVersion = "1.5"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$e4212e0c..e6212eb9....5151fd89c93eb5..fcb8....fbcd162e5987c926b8....fd")) { sVersion = "1.5"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$26e421f80c..e621f98d1e....53365389d93e30edb8....cd165b")) { sVersion = "1.5"; bDetected = true; } else if (MSDOS.compareEP("91221db4..cd21d2d1e9$$$$b4..cd21a6e8")) { sVersion = "1.5"; bDetected = true; } else if (MSDOS.compareEP("b4..cd21b4..cd21e8$$$$ba....ec900c..26ee8d0e....51fd51")) { sVersion = "1.5"; bDetected = true; } else if (MSDOS.compareEP("95e8$$$$fbba....3eecfc0c..3eeefb8d0e....51512687c9b8....28ed26cd162e59fdfb87c9b8....fd88e9f8b5..cd1626592ec3")) { sVersion = "1.5"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_ABKprot.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "ABKprot"); function detect() { if (MSDOS.compareEP("B430CD2186E03D....73..9C8CC0065B595153BA....87F256CF0E1F0E07")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_AEP.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "AEP"); function detect() { if (MSDOS.compareEP("E8$$$$E4212EA3....33C08BD85DB9....50B8....E6210FA9E6..538BDFE42123D84B0FA14B66")) { sVersion = "1.00"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_ALEC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ALEC"); function detect() { if (MSDOS.compareEP("c1ed..1346..2e391cb9....f981c1....bb....81c3....2ec007..431346..4975..8e0000d518de3701e2c8......330ce8")) { sVersion = "1.3"; sOptions = "1996 by rANDOM //UCF"; bDetected = true; } else if (MSDOS.compareEP("b9....81c1....bb....81c3....71..908a24402e802f..4372..90")) { sVersion = "1.3"; sOptions = "1996 by rANDOM //UCF"; bDetected = true; } else if (MSDOS.compareEP("b9....81c1....84221a24bf....81c7....2e3856..408422")) { sVersion = "1.6"; sOptions = "1996 by rANDOM //UCF"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_ANTI-TRACE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ANTI-TRACE"); function detect() { if (MSDOS.compareEP("2ec606......eb$$e9$$$$8cd805....50b8....5033c0cb")) { sVersion = "1.0"; sOptions = "by Oren Maurice"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_AVAST_CRC-Check.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "AVAST CRC-CHECK"); function detect() { if (MSDOS.compareEP("eb$$8cc82e0306....502eff36....CB")) { sVersion = "7.70"; sOptions = "1999"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Aluwain.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Aluwain"); function detect() { if (MSDOS.compareEP("8BEC1EE8....9D5E")) { sVersion = "8.09"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Anti-LAME.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Anti-LAME"); function detect() { if (MSDOS.compareEP("060e07bb....31c09090b9....268a0730e0268807fec443e2..078cc005....05....50b8....50b8....50c3")) { sOptions = "by [ptPower"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Antilame.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Antilame"); function detect() { if (MSDOS.compareEP("fd2ad01e03fa33fe81d7....2efe06....12d30e0e0780f6..1f85fe33ff1216....b2..81d2....84e2ba....d1c232f7")) { sVersion = "1.0b"; sOptions = "by Phantomlord"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Bitlok.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "BITLOK"); function detect() { if (MSDOS.compareEP("eb$$b430cd213c..72..2e8c1e....8cdb83c3..2e011e....0e1feb$$33c0eb$$bf....eb$$b9....eb$$51eb$$2bcf")) { sVersion = "3.1"; sOptions = "by Yellow Rose Software Workgroup"; bDetected = true; } else if (MSDOS.compareEP("fa8ccc8ed4bc....9c51525657550e1f2e8c06....2ec606......0e07be....b9....b0..e3")) { sName = "BITLOK-7NT"; sVersion = "11/13/93-04/22/95"; sOptions = "by Mr. Lei (Yellow Rose Co.)"; bDetected = true; } else if (MSDOS.compareEP("fa8ccc8ed4bc....9c51525657550e1f2e8c06....0e07be....b9....b0..e3")) { sName = "BITLOK-7NT"; sVersion = "05/21/93"; sOptions = "by Mr. Lei (Yellow Rose Co.)"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Bunny.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Bunny"); function detect() { if (MSDOS.compareEP("fae9$$$$8cc02ea3....8cd82ea3....8cd02ea3....8bc42ea3....8cc88ed88ec08ed0bc....e8")) { sVersion = "4.1"; sOptions = "1993 by M.Bunjes"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_CC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CC"); function detect() { if (MSDOS.compareEP("b8....ba....3be073..b409ba....cd21b8....cd218bdc81eb....83e3..fcbe....8bfbb9....f3a48bc3b1..d3e88cc903c15033c050cb")) { sVersion = "1.0"; sOptions = "1991 by B.Vorontsov"; bDetected = true; } else if (MSDOS.compareEP("ba....b430cd213c..73..33c00650cbb9....b8....eb$$05....fc80c4..eb")) { sVersion = "2.61 Beta"; sOptions = "by UniHackers"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_CEPexe.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CEPexe"); function detect() { if (MSDOS.compareEP("8cdd0e070e1fbf....be....b9....fcf3a41f5f8f..8f....8f....8c....8f....8f....595f5e8cc88ec08ed8ea")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_CERBERUS.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "CERBERUS"); function detect() { if (MSDOS.compareEP("9C2BED8C....8C....FAE4..88....1607BF....8EDD9BF5B9....FCF3A5")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_COMCRYPT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "COMCRYPT"); function detect() { if (MSDOS.compareEP("e9$$$$b9....be....89f70e1f0e07bb....fcad31d8abe2")) { bDetected = true; } else if (MSDOS.compareEP("e9$$$$eb$$5053575152061e572e8b36....81c6....8a5c..2e881e....8a5c")) { sVersion = "1.0b"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_COMPROTECT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "COMPROTECT"); function detect() { if (MSDOS.compareEP("b8....15....72..8ac4bb....50515253555657061e50b8....58eb")) { sVersion = "2.10"; sOptions = "1988-95 by Ralph Roth (converted to exe)"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_CONVOY.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CONVOY++"); function detect() { if (MSDOS.compareEP("e9$$$$2e8c06....2ea3....b8....cd2f3c..75..b8....ba....0e1fcd21b8....cd21")) { sOptions = "1993 by ELIAS Copy-Protection System"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$2e8c06....2ea3....e8$$$$5056571e062e8b3e....2e8106........2e893e....0e0733c08ed833f6b9")) { sVersion = "3.2"; sOptions = "1993 by ELIAS Copy-Protection System"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_CRYPTEXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "CRYPTEXE"); function detect() { if (MSDOS.compareEP("EB..8BDCEB..EA........01EA83FC..74..EB")) { sVersion = "1.04"; bDetected = true; } else if (MSDOS.compareEP("eb$$8bdceb$$bc....eb$$83fc..74..eb$$cd20eb$$8be3")) { sVersion = "1.04"; bDetected = true; } else if (MSDOS.compareEP("2e8c1e....eb$$fa50b8....58eb$$eb$$8bdceb$$bc....eb$$83fc..eb$$74..fa")) { sVersion = "1.01b"; sOptions = "1996 by DoP"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_China Locker.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "China Locker"); function detect() { if (MSDOS.compareEP("e9$$$$fc2e891e....2e890e....2e8916....2e8936....2e893e....2e8c16....2e8926....2e8c1e....90909090")) { sVersion = "1995.02.02"; sOptions = "by China Locker Software"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Ciphator.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Ciphator"); function detect() { if (MSDOS.compareEP("9393E8$$$$586A..0E68....CF")) { sVersion = "4.6"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Codesafe.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Codesafe"); function detect() { if (MSDOS.compareEP("e9$$$$5033c08ec02ef606......74..26ff36....061e07e8....07268f06....fb2e8c1e....26ff36....268f06")) { sOptions = "by EliaShim Ltd"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_ComProtector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "ComProtector"); function detect() { if (MSDOS.compareEP("E9....E8....5E8BEE81......8D......B9....F61446E2..4B")) { sVersion = "1.0b"; bDetected = true; } else if (MSDOS.compareEP("E9....B9....BB....BF....2E....34..FEC8C0....2E....2E....2E....4743E2")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_ComprEXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ComprEXE"); function detect() { if (MSDOS.compareEP("fc1e068cdd83c5..89e8ba....8b1e....29d3538ed88ec331f631ffb9....f3a540434a75..b8....50cb")) { sVersion = "1.0"; sOptions = "by Tom Torfs"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Copy_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Copy Protector"); function detect() { if (MSDOS.compareEP("2EA2....5351521E06B4..1E0E1FBA....CD211F")) { sVersion = "2.0"; bDetected = true; } else if (MSDOS.compareEP("E9....505351521E0657E8....5F83EF..B4..1E0E1F")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Copylock_PC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Copylock PC"); function detect() { if (MSDOS.compareEP("0e1fb9....bf....8135....83c7..e2")) { sOptions = "1990 by Rob Northen Computing"; bDetected = true; } else if (MSDOS.compareEP("0e1f8c1e....8c06....1e07bf....33f6")) { sOptions = "1990 by Rob Northen Computing"; bDetected = true; } else if (MSDOS.compareEP("0e1fb9....bf........83c7..e2")) { sOptions = "1990 by Rob Northen Computing"; bDetected = true; } else if (MSDOS.compareEP("0e1fb9....bf............83c7..e2")) { sOptions = "1990 by Rob Northen Computing"; bDetected = true; } else if (MSDOS.compareEP("0e1f8cc0a3....90909090909090909090a1")) { sOptions = "1990 by Rob Northen Computing"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_CrAcKeR.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CrAcKeR"); function detect() { if (MSDOS.compareEP("eb$$be....8bfe5633c0be....ac02e081fe....72..5eac34..aa81fe....72")) { sVersion = "0.2a"; sOptions = "by Deu$"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_CrackStop.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CrackStop"); function detect() { if (MSDOS.compareEP("B4..BB....B9....8BECCD21FAFC03....05....FFE0")) { sVersion = "1.X"; bDetected = true; } else if (MSDOS.compareEP("bd....be....ffe6")) { sVersion = "1.0b"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Cruncher.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Cruncher"); function detect() { if (MSDOS.compareEP("2E........2E......B430CD213C0373..BB....8EDB8D......B409CD210633C050CB")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_CryExe.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "CryExe"); function detect() { if (MSDOS.compareEP("E9$$$$E9$$$$E9$$$$BB....E8$$$$31EDEB$$8EDDEB$$872FE8$$$$E8$$$$55E9$$$$E9$$$$31C0EB$$EB$$E8")) { sVersion = "4.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_CryptCom.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "CryptCom"); function detect() { if (MSDOS.compareEP("e9$$$$be....56b9....c704....c644....8134....4646e2..31f631c9c3")) { sVersion = "2.0"; sOptions = "by Nowhere Man"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_CrypteXeC.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "CrypteXeC"); function detect() { if (MSDOS.compareEP("FD25....E8....3EBA....EC0C..26EE..B9....5151..87C9")) { sVersion = "1.01"; bDetected = true; } else if (MSDOS.compareEP("06b4..cd2107e8....acac3ee8....d7e9")) { sVersion = "1.01"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Crypto-box.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Crypto-box"); function detect() { if (MSDOS.compareEP("e9$$$$9c50520e538bec2e892e....1e06b8....8bf80e07b8....8ed82e8b1e....8b078bf0")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_DCREXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "DCREXE"); function detect() { if (MSDOS.compareEP("e8$$$$52e8$$$$5a83c2..ffe2")) { sVersion = "2.0"; sOptions = "by LuCe" bDetected = true; } else if (MSDOS.compareEP("e8$$$$53e8$$$$5b83c3..ffe3")) { sVersion = "2.0"; sOptions = "by LuCe" bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_DMC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "DMC"); function detect() { if (MSDOS.compareEP("e9$$$$2e8c16....2e8926....2ea3....8cc88ed0bc....2ea1....505351525657551e060e1f8c06....a1")) { sVersion = "3.5"; sOptions = "by Adlersparre & Associates" bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Deeper.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Deeper"); function detect() { if (MSDOS.compareEP("90e9$$$$e8000059fa8bdc36c747......36837f....75..fb66fafb8be981ed....81e9....be....8dbe....668b05668904")) { sVersion = "1.0c"; bDetected = true; } if (MSDOS.compareEP("90e9$$$$e80000fa8bdc36c747......36837f....75..fb598be981ed....81e9....be....8dbe....668b05668904")) { sVersion = "1.0a"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_E-PROT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "E-PROT 386+"); function detect() { if (MSDOS.compareEP("81f8....be....90bd....2e8076....454e75")) { sVersion = "1.0.3"; sOptions = "2000 by MasterBall Systems, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_EEXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "EEXE"); function detect() { if (MSDOS.compareEP("B430CD213C0373..BA1F000E1FB409CD21B8FF4CCD21")) { sVersion = "1.12"; sOptions = "1994 by F.P.Budzyn" bDetected = true; } else if (MSDOS.compareEP("b430cd213c..73..0e1fb409ba....cd21b8....cd21")) { sOptions = "1994 by F.P.Budzyn" bDetected = true; } else if (MSDOS.compareEP("33c08ed806be....bf....b9....fcf3a5b4..cd21")) { sVersion = "1.11"; sOptions = "1994 by F.P.Budzyn" bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_EPW.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "EPW"); function detect() { if (MSDOS.compareEP("06571e5655525153502e8c......8cc005....2ea3....8ed8a1")) { sVersion = "1.2"; bDetected = true; } else if (MSDOS.compareEP("06571E5655525153502E8C0608008CC083")) { sVersion = "1.30"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$06571e565552515350bb....81c3....2e8b078ccb03c305....50b8....50cb")) { sVersion = "1.20"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_ETS.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ETS (ENCRYPT THE SHiT)"); function detect() { if (MSDOS.compareEP("60061eeb$$bf....8cc82e8985....2e8b8d....8ec02e8bbd....e8")) { sVersion = "1.0"; sOptions = "by Da BLoB / MAFiA"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_EXE-Crypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "EXE-Crypt"); function detect() { if (MSDOS.compareEP("90eb$$2e8c......2e89......8cc88ed0bc....1e060e1f8cc005....8ec01ee8....1f8cc3be....2e8b......83....74")) { sVersion = "1.00"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_EXE-Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "EXE-Protect"); function detect() { if (MSDOS.compareEP("e800005d81ed....1e06..1fb4..8db6....b9....8a1446cd21909090")) { sOptions = "by Phrozen Crew"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_EXEGUARD.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "EXEGUARD"); function detect() { if (MSDOS.compareEP("BA....BF....EB$$E8$$$$53BB....EB$$EB$$5B0E075051535653BB....EB")) { sVersion = "1.3"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_EXEHigh.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "EXEHigh"); function detect() { if (MSDOS.compareEP("8cca8b2e....8eda8c06....8cda2bea8b3e....81ff....73..bf....893e....81c7....033e....b1..d3ef47d3e7fa")) { sVersion = "1.01"; sOptions = "by NoddegamrA"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_EXETools.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "EXETools"); function detect() { if (MSDOS.compareEP("e800005d83ed..1e8cda83c2..8eda8ec2bb....ba....85d274..b4..33ff33f6b9....ac32c4c0c4")) { sVersion = "2.1 /E"; bDetected = true; } else if (MSDOS.compareEP("68....68....68....be....bf....57b9....f3a4c3")) { sVersion = "2.1 /E"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Encriptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Encriptor"); function detect() { if (MSDOS.compareEP("EB..B9....BE....BF....ACD0C8AAE2..BE....BF....ACAA")) { sVersion = "1.00c"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Enkryptonator.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Enkryptonator"); function detect() { if (MSDOS.compareEP("1e1eb430cd21b4..3c..73..cd21be....e8....e8....e8....1f07e9")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_ExeCode.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ExeCode"); function detect() { if (MSDOS.compareEP("E9$$$$FA8CC302DF5033C02E8C16....2E8926....8ED0BC....BE....B9....33FF2EC706........32DBB0..E664AC")) { sVersion = "1.0"; sOptions = "1995 by Balazs Scheidler"; bDetected = true; } else if (MSDOS.compareEP("E9$$$$8be8ba....b409cd212ea1....8cc303c3b1..2e8b1e....f7c3....74..83c3..d3eb2e891e....be....bf....b9....f3a5")) { sVersion = "1.0 unregistered"; sOptions = "1995 by Balazs Scheidler"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_ExeLock.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "EXELock666"); function detect() { if (MSDOS.compareEP("068CC88EC0BE....26....34..26....4681......75..40B3..B3..F3")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("ba....bf....eb$$e8$$$$53bb....eb$$eb$$5beb$$0633c08ec0b8....26a3....268c0e....075052faba....b0..ee")) { sVersion = "1.0X"; sOptions = "by ST!LLS0N"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_FACRYPT.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "FACRYPT"); function detect() { if (MSDOS.compareEP("B9....B3..33D2BE....8BFEAC32C3AA494332E403D0E3")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_FSE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "FSE by ZeNiX Yang //pCE'98"); function detect() { if (MSDOS.compareEP("607d..7a..d1ce89f68bf601fb8bf731f781c7....f8f8")) { sVersion = "0.6"; bDetected = true; } else if (MSDOS.compareEP("60d1cef533de33c8c7c6....d1cee9$$$$fbf98bd029c131db")) { sVersion = "0.6+"; bDetected = true; } else if (MSDOS.compareEP("607d..7a..d1ce89f68bf601fb8bf731f781c7....f8e8")) { sVersion = "0.6+"; bDetected = true; } else if (MSDOS.compareEP("60b3..b7..7e..f5d1c2fb81e9....c7c0....bd....81c5....d1ce33c4fd79..e9")) { sVersion = "0.5"; bDetected = true; } else if (MSDOS.compareEP("eb$$6025....eb$$eb$$8cc0fa66c1cc..eb$$44bc....eb$$2ea3....66c1cc..e9")) { sVersion = "0.4+"; bDetected = true; } else if (MSDOS.compareEP("60fff08fc603f6b1..b5..fff18fc2f8e9")) { sVersion = "0.55"; bDetected = true; } else if (MSDOS.compareEP("60cefd33db81c3....81f3....81c3....fd45eb")) { sVersion = "0.5c"; bDetected = true; } else if (MSDOS.compareEP("607c..79..81ef....cc7f..8bc82bc103d431db81c3....fb81ea....e9")) { sVersion = "0.5c02"; bDetected = true; } else if (MSDOS.compareEP("6033f131c731f78bd9be....d1cf31c1c7c3....d1c3fd8bf8fb33c7bf....d1c7")) { sVersion = "0.5c04"; bDetected = true; } else if (MSDOS.compareEP("60be....c7c5....c7c3....c7c2....81f2....2e319a....33d62e8bba....31ef")) { sVersion = "0.5s"; bDetected = true; } else if (MSDOS.compareEP("6031fbce29f6c7c7....d1c333dfe8....76..c8......e8")) { sVersion = "0.6"; bDetected = true; } else if (MSDOS.compareEP("60fdd1c3f533ebc7c3....87d389d79705....7c..e9")) { sVersion = "0.61+"; bDetected = true; } else if (MSDOS.compareEP("6072..fbe9$$$$03cee9$$$$b9....d1c981f1....8bd9d1cf")) { sVersion = "0.61+"; bDetected = true; } else if (MSDOS.compareEP("6089f731fffbb8....03e9c7c1....47f9fceb")) { sVersion = "0.62"; bDetected = true; } else if (MSDOS.compareEP("60be....c7c3....2e3198....81c3....81c6....8bfe01df75..e9")) { sVersion = "0.62"; bDetected = true; } else if (MSDOS.compareEP("60fff08fc2f9bf....fb31da8bf42bdef5f971..03f0c7c3....87dd")) { sVersion = "0.63"; bDetected = true; } else if (MSDOS.compareEP("60c7c6....b8....bf....bb....2e81b1........81f6....81c3....81c7....05....75..543e51")) { sVersion = "0.63"; bDetected = true; } else if (MSDOS.compareEP("60fc81f3....f5be....fde9$$$$2be84a8bd129d9")) { sVersion = "0.5"; bDetected = true; } else if (MSDOS.compareEP("6033d9c7c1....7c..c7c6....75..76..bd....2bcd31c2")) { sVersion = "0.5"; bDetected = true; } else if (MSDOS.compareEP("60c7c5....c7c6....bf....31f62e31ab")) { sVersion = "0.5"; bDetected = true; } else if (MSDOS.compareEP("60c7c7....c7c3....c7c5....2e31ab....2e31bb....81c5")) { sVersion = "0.5"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_GA-Header.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "GA-Header"); function detect() { if (MSDOS.compareEP("8cd02ea3....2e8926....8cc88ed0bc....061e0e1fbe....b8....8ec0bf....b9")) { sVersion = "1.00"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_GOAT.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "GOAT"); function detect() { sOptions = "1996 by Martin Overton //ChekWARE"; if (MSDOS.compareEP("5051568bc033c0904149813c....75..83f9..75..0bc033c058595eb8")) { bDetected = true; } else if (MSDOS.compareEP("515056528bc233d2f7e04149813c....75..3d....73..0bc933d259585e5ab8")) { bDetected = true; } else if (MSDOS.compareEP("1650525351564a33db74..434b813c....74..81f9....75..0bd2b8....8ed85e585a5b5917b8")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_HACKSTOP.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "HackStop"); function detect() { if (MSDOS.compareEP("FABD....FFE56A49480C..E4..3F983F")) { sVersion = "1.00"; bDetected = true; } else if (MSDOS.compareEP("B430CD2186E03D....73..B42FCD21B0..B44CCD2150B8....58EB")) { sVersion = "1.10/1.11"; bDetected = true; } else if (MSDOS.compareEP("B430CD2186E03D000373..B42FCD21B42ACD21B42CCD21B0FFB44CCD2150B8....58EB")) { sVersion = "1.10p1"; bDetected = true; } else if (MSDOS.compareEP("B430CD2186E03D....73..B4..CD21B0..B44CCD2153BB....5BEB")) { sVersion = "1.11c"; bDetected = true; } else if (MSDOS.compareEP("B430CD2186E03D....73..B0..B4..CD2150B8....58EB$$EB$$b8....CD2150B2..B8....CD21")) { sVersion = "1.00"; bDetected = true; } else if (MSDOS.compareEP("521eb430cd2186e03d....73..cd200e1fb4..e8")) { sVersion = "1.11f-1.12s"; bDetected = true; } else if (MSDOS.compareEP("FABD....D4854E32EBEB")) { sVersion = "1.13"; bDetected = true; } else if (MSDOS.compareEP("fabd....ffe5")) { sVersion = "1.13cs"; sOptions = "converted to exe"; bDetected = true; } else if (MSDOS.compareEP("52B8....1ECD2186E03D....73..CD200E1FB409E8....24..EA")) { sVersion = "1.13"; bDetected = true; } else if (MSDOS.compareEP("FABE....050C00071D4A461E16FDAC44........F16D84D33D....CFAFFB34DB33..........D0D6....92B4249E")) { sVersion = "1.17"; bDetected = true; } else if (MSDOS.compareEP("52BA....5AEB..9A........30CD21......FD02....CD200E1F52BA....5AEB")) { sVersion = "1.18"; bDetected = true; } else if (MSDOS.compareEP("52BA....5AEB..9A........30CD21......D602....CD200E1F52BA....5AEB")) { sVersion = "1.19s"; bDetected = true; } else if (MSDOS.compareEP("52B430CD2152FA..FB3D....EB..CD200E1FB409E8")) { sVersion = "1.11f"; sOptions = "modified"; bDetected = true; } else if (MSDOS.compareEP("53bb....5beb$$eb$$9c1e52b430cd2186c43d....73..cd200e1f53bb....5beb")) { sVersion = "1.20"; bDetected = true; } else if (MSDOS.compareEP("1e52B8....cd2186c43d....73..cd2052ba....5aeb")) { sVersion = "1.18s"; bDetected = true; } else if (MSDOS.compareEP("5d1eb430cd2186e03d....73..cd200e1fb409e8")) { sVersion = "1.11gs"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$3adb74..b8014ccd21eb..b430cd21fa8bec8b46..05....ffe0")) { sVersion = "1.17 regged"; bDetected = true; } else if (MSDOS.compareEP("521ee9$$$$0e1fb409e8$$$$5acd211f5a53bb....5beb$$eb$$e8$$$$e8$$$$52ba....5aeb")) { sVersion = "1.11f"; bDetected = true; } else if (MSDOS.compareEP("b8....521ecd2186e03d....73..cd200e1fb4..e8$$$$5acd211f5a53bb....5beb")) { sVersion = "1.12cs"; bDetected = true; } else if (MSDOS.compareEP("50b8....58eb$$eb$$9c1e52b430cd2186c43d....73..cd200e1f50")) { sVersion = "1.19/386"; bDetected = true; } else if (MSDOS.compareEP("9c5751e8$$$$e8$$$$5fb9....b8....2e87052e3185....47d1c8e2")) { sVersion = "1.20/386"; bDetected = true; } else if (MSDOS.compareEP("b430cd2186e03d....73..b0..b44ccd2150b8....58eb")) { sVersion = "0.97.6-0.99b"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_HASP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "HASP Key Envelope"); function detect() { if (MSDOS.compareEP("e9$$$$e800005d81ed....2ea3....8cd82ea3....05....2ea3....2e0306....2ea3....2e833e......75..e8")) { bDetected = true; } else if (MSDOS.compareEP("e9$$$$e800005d81ed....2ea3....8cd82ea3....83c0..2ea3....2e0306....2ea3....2e833e......75..e8")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_HEALTH.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "HEALTH"); function detect() { if (MSDOS.compareEP("1EE8....2E8C06....2E893E....8BD7B8....CD218BD80E1FE8....0657A1....26")) { sVersion = "5.1"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_HaSPeX-Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "HaSPeX-Protect"); function detect() { if (MSDOS.compareEP("fa8cc88ed88cd38bd48ed0bc....b9....8bf44444fdad35....50eb")) { sOptions = "1996"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Hardlock.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Hardlock"); function detect() { if (MSDOS.compareEP("2ec6........be....bf....b9....2ea1....d1e92e8b1d2e31052e030402e12bc6d0c403c34683ef")) { sOptions = "dongle envelope by Aladdin"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Inertia.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Inertia encryption"); function detect() { if (MSDOS.compareEP("505351525657551e060eb8....500e5805....5031c050cb")) { bDetected = true; } else if (MSDOS.compareEP("505351525657551e8cc88ed8be....8cc3011e....8cc92bcb83e9..33db8cc005....8ed8")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Int01-Destroyer.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Int01-Destroyer"); function detect() { if (MSDOS.compareEP("fc33d28ec2bf....abab8cca33ff81ea....52ba....521e0733d2cb")) { sOptions = "1994"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Ironthorn.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Ironthorn"); function detect() { if (MSDOS.compareEP("9ce80000581e5704..bf....5feb$$ffd0")) { sVersion = "1.0:2000"; sOptions = "modified HackStop 1.19 by ReDragon"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_JAM.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "JAM"); function detect() { if (MSDOS.compareEP("50061607BE....8BFEB9....FDFAF32EA5FB06BD....55CB")) { sVersion = "2.21"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_JmCryptExe.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "JmCryptExe"); function detect() { if (MSDOS.compareEP("e9$$$$e9$$$$1e068cd805....8ed88ec02e0106....2e0106....8be82ea1....2e8b0e")) { sVersion = "0.7i"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$e9$$$$2e8c1e....e8$$$$530633db8ec3bb....268e47..bb....26813f....74..e9")) { sVersion = "0.7"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$2e8c1e....8cc88ed806a1....8ec08b1e....b4..cd210773..e9")) { sVersion = "0.7?"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Joke.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Joke fileheader"); function detect() { if (MSDOS.compareEP("bb....e8....bd....2863..53454ee8....9893928a80....52cb")) { sOptions = "by SEN"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_KeyMaker.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "KeyMaker"); function detect() { if (MSDOS.compareEP("fc0e1f8706....871e....870e....8716....8736....873e....872e....268b07a3....8cc0a3....8cc88ec08edaf3a5")) { sVersion = "3.0"; sOptions = "1998 by TIME Software"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Kvetch.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Kvetch"); function detect() { if (MSDOS.compareEP("bb....ba....0e1f068cd005....8ec00efc8bcbd1e133ffd1e18bf7d1e1f3a5b8....0650cb")) { sVersion = "1.X"; sOptions = "1992 by Tal Nevo"; bDetected = true; } else if (MSDOS.compareEP("ba....bb....060e0e1f8cd005....8ec08bcbd1e1d1e1d1e133ff8bf7fcf3a506b8....50cb")) { sVersion = "1.02c"; sOptions = "1992 by Tal Nevo"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_LOCK.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "LOCK"); function detect() { if (MSDOS.compareEP("b430cd21faba....2e8006......80ea..2e8816....e8$$$$2ec606......fbbf....b9....0e072e8a0534..aae2")) { sVersion = "1.1"; sOptions = "by Psycho //ENiAC"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_LOCK91.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "LOCK91"); function detect() { if (MSDOS.compareEP("eb$$8cc88ed88ec08cd8a3....a1....2906....e421500c..24..e621e8")) { sOptions = "dongle envelope"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_LamerStop.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "LamerStop"); function detect() { if (MSDOS.compareEP("E8....05....CD2133C08EC026......2E......26......2E......BA....FA")) { sVersion = "1.0c"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_LockTite+.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "LockTite+"); function detect() { if (MSDOS.compareEP("8cc88ed88cc381c3....8bc30306....8ec08b0e....8bf14e8bfefdf3a450b8....50cb")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_MEGALITE.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "MEGALITE"); function detect() { if (MSDOS.compareEP("B8....BA....05....3B2D73..72..B409BA....CD21CD90")) { sVersion = "1.20a"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_MESS.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "MESS"); function detect() { if (MSDOS.compareEP("....................B9....F3..ACE3..EB..BA....B409CD21CD20..............................B430CD213C0277")) { sVersion = "1.07"; bDetected = true; } else if (MSDOS.compareEP("........FAB9....F326ACE3..EB$$1E0E1FBA....81EA....B409CD211FB44CCD21")) { sVersion = "1.20"; bDetected = true; } else if (MSDOS.compareEP("........FA545b3bdc75..eb$$9c5b81cb....5381e3....75..9d9c5825....75..1e0e1f")) { sVersion = "1.29"; bDetected = true; } else if (MSDOS.compareEP("........FAb9....f326ace3..eb$$1e0e1fba....b409cd211fb44ccd21")) { sVersion = "1.X"; bDetected = true; } else if (MSDOS.compareEP("'MESS'b9....83c4..f326ace3..eb$$ba....b409cd21cd20")) { sVersion = "1.07"; bDetected = true; } else if (MSDOS.compareEP("'MESS'fa545b3bdc75..eb$$9c5b81cb....539d9c5825....75..1e0e1fba....b409cd211f")) { sVersion = "1.25"; bDetected = true; } else if (MSDOS.compareEP("'MESS'b9....83c4..f326ace3..eb")) { sVersion = "1.14"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Maker.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Maker (CDAT)"); function detect() { if (MSDOS.compareEP("eb$$558bec9ceb$$505351525657061eb8....cd210653eb$$b8....cd2106531e1e0e1f8ccab1..eb")) { sVersion = "3.0"; sOptions = "1992 by PST"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Mandrake.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Mandrake"); function detect() { if (MSDOS.compareEP("b8....8ed8b8....8ec0e8$$$$bb....b9....b8....2bc1568bf0268a3488305ee2..b4..b7..cd10")) { sOptions = "by H.P.G. Soft"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_MutaWWP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "MutaWWP"); function detect() { if (MSDOS.compareEP("e8$$$$5e8bd683ea..83c6..060e1e0e1f33ff8cd383eb..8ec3b9....f3a45805....500e5333c951cb")) { sVersion = "1.0"; sOptions = "by Stefan Esser"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Mutate.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Mutate"); function detect() { if (MSDOS.compareEP("e8$$$$58e9$$$$2ec606......eb$$1eeb$$50eb$$33c0f872..eb")) { sVersion = "1.1 (16,20.05.1996)"; sOptions = "1996 by PReDaToR 666"; bDetected = true; } else if (MSDOS.compareEP("33c0eb$$83e8..e9$$$$2e802e......eb$$1eeb$$50eb$$33c0f872..eb")) { sVersion = "1.1 (18.05.1996)"; sOptions = "1996 by PReDaToR 666"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$f8e9$$$$2e8006......eb$$1eeb$$50e9$$$$33c0f873..e9")) { sVersion = "1.1 (20.05.1996)"; sOptions = "1996 by PReDaToR 666"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_NOCLIP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "NOCLIP"); function detect() { if (MSDOS.compareEP("e9$$$$ff26....9c5053518cd8a3")) { sVersion = "4.X"; sOptions = "by TD Technologia Digital"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_NOTA.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "NOTA"); function detect() { if (MSDOS.compareEP("eb$$061e33c08ed8be....0e07bf....b9....fcf3a41f8cd3be....8bd48ed6bc....8bf436c744......36c744......8ed38be2ba....e8")) { sVersion = "1.1"; sOptions = "1990 by Novitex"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_NTShell.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "NTShell"); function detect() { if (MSDOS.compareEP("2e8c1e....8cca8eda8ec2fa8ed2bc....fbe80000eb$$b9....5e8bfeeb")) { sVersion = "4.0"; sOptions = "by Mr. ZhouHui"; bDetected = true; } else if (MSDOS.compareEP("2e8c06....8cc88ed8fa8ed0bc....fbff36....268b1e....8ec333ffb9")) { sVersion = "2.01"; sOptions = "by Mr. ZhouHui"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Nodebug.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Nodebug"); function detect() { if (MSDOS.compareEP("fcbe....b9....31d22ead01c2e2")) { sVersion = "1.0 part 2"; sOptions = "by JVP"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Novex.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Novex Key Envelope"); function detect() { if (MSDOS.compareEP("0e1f06b8....bb....0e07cd012ea1....263947..070675..2ec606......eb..06f8b8....cd212e891e....2e8c06....b8")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Overlay.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Overlay"); function detect() { if (MSDOS.compareEP("fa8cc283c2..2e0116....8cc82bc22e8b0e....8bea8bf8be....8bc103c903c881c1....03c18ad983e3..2e0387")) { sVersion = "3.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_PACKWIN.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PACKWIN"); function detect() { if (MSDOS.compareEP("8cc0fa8ed0bc....fb060e1f2e8b0e....8bf14e8bfe8cdb2e031e....8ec3fdf3a453b8....50cb")) { sVersion = "1.0"; sOptions = "by Yellow Rose"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_PC-Guard.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PC-Guard"); function detect() { if (MSDOS.compareEP("b8....fcfdb9....be....f82e180cf5fcfc74..fccc")) { sVersion = "3.05 PRO"; sOptions = "1994/97 by Ceklic Blagoje //COMSEC"; bDetected = true; } else if (MSDOS.compareEP("2bdb81cb....f8fdbf....2bd281ca....f52e291dfcf7d3fdfccc")) { sVersion = "3.05"; sOptions = "1994/97 by Ceklic Blagoje //COMSEC"; bDetected = true; } else if (MSDOS.compareEP("bb....f5b9....fcfdbe....fdfc2e190cfcfdf8f7d9d1d9f8f8")) { sVersion = "3.XX"; sOptions = "by Ceklic Blagoje //COMSEC"; bDetected = true; } else if (MSDOS.compareEP("be....fcb9....fdf5f5ba....fc2e102cf8d1d1d1c9f7d9")) { sVersion = "3.XX"; sOptions = "by Ceklic Blagoje //COMSEC"; bDetected = true; } else if (MSDOS.compareEP("33db81c3....f8fdbe....f8f5fcba....f52e111cfcfd72")) { sVersion = "3.XX"; sOptions = "by Ceklic Blagoje //COMSEC"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_PCOM.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PCOM"); function detect() { if (MSDOS.compareEP("be....b9....2e8a0434..2e880446e2")) { sVersion = "2.8b2, 2.8b3 -e -i"; sOptions = "1999"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_PROTECT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PROTECT! EXE"); includeScript("read"); function detect() { var bEnableNewEngine = true; // Need more researches if (bEnableNewEngine) { var a1 = [0xFD, 0x1E, 0x0E, 0x0E, 0x07, 0x1F], a2 = [0xFD, 0x1E, 0x0E, 0x07, 0x0E, 0x1F], a3 = [0xFC, 0x1E, 0x0E, 0x1F, 0x0E, 0x07], a4 = [0xFC, 0x1E, 0x0E, 0x0E, 0x1F, 0x07], a5 = [0x1E, 0xFD, 0x0E, 0x07, 0x0E, 0x1F], a6 = [0x1E, 0xFD, 0x0E, 0x0E, 0x07, 0x1F], a7 = [0x1E, 0xFC, 0x0E, 0x1F, 0x0E, 0x07], a8 = [0x1E, 0xFC, 0x0E, 0x0E, 0x1F, 0x07], bt = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00], cnt_arr = 0, ep = MSDOS.OffsetToVA(MSDOS.getEntryPointOffset()), count = 0; while (count < 0x50) { count++; var byte = MSDOS.readByte(MSDOS.VAToOffset(ep)); if (byte == 0xFD || byte == 0x1E || byte == 0x0E || byte == 0x07 || byte == 0x1F || byte == 0xFC) { bt[cnt_arr] = byte; cnt_arr++; } if (cnt_arr == 6) { break; } ep = MSDOS.getDisasmNextAddress(ep); } if (compareArrays(a1, bt) || compareArrays(a2, bt) || compareArrays(a3, bt) || compareArrays(a4, bt) || compareArrays(a5, bt) || compareArrays(a6, bt) || compareArrays(a7, bt) || compareArrays(a8, bt)) { sVersion = "5.5"; bDetected = true; } } if (MSDOS.compareEP("1e0e0e1f07") || MSDOS.compareEP("1e0e0e071f") || MSDOS.compareEP("1e0e1f0e07")) { var b = MSDOS.readByte(MSDOS.getEntryPointOffset() + 5); if (b == 0xBA || b == 0xBB || b == 0xBD || b == 0xBE || b == 0xBF || b == 0xE8) { sVersion = "5.0"; sOptions = "type 1"; bDetected = true; } } else if (MSDOS.compareEP("5053515657061e0e1f")) { sVersion = "5.0"; sOptions = "type 2"; bDetected = true; } else if (MSDOS.compareEP("0e071e0e1f")) { var b = MSDOS.readByte(MSDOS.getEntryPointOffset() + 5); if (b == 0xBA || b == 0xBB || b == 0xBD || b == 0xBE || b == 0xBF) { sVersion = "4.1"; bDetected = true; } } else if (MSDOS.compareEP("8cdb0e0e1f07b9....e800005e81c6....89f7ac34..aae2")) { sVersion = "4.0"; bDetected = true; } else if (MSDOS.compareEP("2ea3....8cd82ea3....8cc82ea3....2e892e....33c08ed8fafcbe....0e07")) { sVersion = "3.1"; bDetected = true; } else if (MSDOS.compareEP("2ea3....8cd82ea3....8cc82ea3....2e892e....33c08ec0fafc26a1....2ea3....26a1")) { sVersion = "3.0"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$1e068cc88ed88ec0be....8bfeb9....ac")) { sVersion = "2.0"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$1e068cc88ed88ec02ec606")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("8cd805....50b8....501e068cda83c2..b9....be....0e1fad8bd8ad03c28ec0260117e2")) { sOptions = "relocpacker"; sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("1eb430cd213c..73..cd20be....e8....e8")) { sVersion = "6.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_PVAC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PVAC"); function detect() { if (MSDOS.compareEP("33c08ed806be....bf....b9....fcf3a5bf....b2..fa8926....bc....8bf42e8a0402c2a3....a3....8cdb")) { sVersion = "1.04"; sOptions = "(1993) by Fernando Papa Budzyn" bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_PassEXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PassEXE"); function detect() { if (MSDOS.compareEP("061E0E0E071FBE....B9....871481......EB..C7......840087......FB1F584A")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Pksmart.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Pksmart"); function detect() { if (MSDOS.compareEP("ba....8cc88bc803c281c1....51b9....511e8cd38d6f..55b1..51fc4bbe....33ff8ed88ec3b1..f3a5484a79..0e078edb33f633ffcb")) { sVersion = "1.0b"; sOptions = "by Alex"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_ProtEXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ProtEXE"); function detect() { // new algo var ep_off = MSDOS.getEntryPointOffset(); var i = 0; while (i < 20) { i++; switch (MSDOS.readByte(ep_off)) { case 0xE9: { var addr = MSDOS.readWord(ep_off + 1); if (addr > 0x7fff) { ep_off = ep_off - (0xffff - addr) + 2 } else { ep_off = ep_off + addr + 3 } break; } case 0xE8: { var addr = MSDOS.readWord(ep_off + 1); if (addr > 0x7fff) { ep_off = ep_off - (0xffff - addr) + 2 } else { ep_off = ep_off + addr + 3 } break; } case 0xEB: { var addr = MSDOS.readByte(ep_off + 1); if (addr > 0x7f) { ep_off = ep_off - (0xff - addr) + 1 } else { ep_off = ep_off + addr + 2 } break; } } var a = MSDOS.readByte(ep_off); if ((a == 0xbb || a == 0xbe || a == 0xbf) && MSDOS.compare("0600", ep_off + 1)) { sVersion = "3.10-3.11"; bDetected = true; break; } if (a != 0xbb && a != 0xbe && a != 0xbf && a != 0xe9 && a != 0xe8 && a != 0xeb) { break; } } // some old sigs if (MSDOS.compareEP("9c9c5825....509d9c5825....3d....74..9c5825....0d....509d9c5825....74..ba....b0..eb")) { sVersion = "2.11"; bDetected = true; } else if (MSDOS.compareEP("9c505351525657551e06fcb8....cd2184c075..cd20a8..04..eb$$eb$$ba....ec0c..eb")) { sVersion = "3.0"; sOptions = "by T.Torfs"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Protector"); function detect() { if (MSDOS.compareEP("'FCP/IV'bc....c3", -6)) { sOptions = "by FCP/IV (Future Crew)"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Quadru-Lock.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Quadru-Lock"); function detect() { if (MSDOS.compareEP("9c508cda5252bb....8cc8488ed805....8ec0b9....8bf12bf38bfefdf3a44050ffd1")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_R-Crypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "R-Crypt"); function detect() { if (MSDOS.compareEP("e9$$$$68....60bf....b9....b0..2e3005fec047e2..61c706........c606")) { sVersion = "0.91, 0.93"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_REC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "REC"); function detect() { if (MSDOS.compareEP("061eb430cd213c..73..33c00650cbbf....8b36....2bf781fe....eb$$52ba....5aeb")) { sVersion = "0.33-0.35"; bDetected = true; } else if (MSDOS.compareEP("061e52b8....1ecd2186e03d....73..cd200e1fb4..e8$$$$5acd21")) { sVersion = "0.24-0.32"; bDetected = true; } else if (MSDOS.compareEP("061eb430cd213c..73..33c00650cb")) { sVersion = "0.40c2"; bDetected = true; } else if (MSDOS.compareEP("061e53bb....5beb$$eb$$eb$$2ec606")) { sVersion = "0.40.5, 0.40.6"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_RHC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "RHC"); function detect() { if (MSDOS.compareEP("8cd8ba....8eda8ec2a3....b8....cd10b8....8ec0be....bb....b9....518bfbb9....b4..acabe2")) { sVersion = "1.99.test"; sOptions = "1999 by Rowdy"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_ROSETINY.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "RoseTiny"); function detect() { if (MSDOS.compareEP("e8$$$$53bb....5beb$$eb$$582d....50061e5751e8$$$$e8$$$$5fb9....b8....2e87052e3145..47d1c8e2")) { bDetected = true; } else if (MSDOS.compareEP("eb$$5053b430cd2186e03d....73..cd2006502bc08ec08506....b8....eb")) { sVersion = "0.95"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_SSI-Lock.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "SSI-Lock"); function detect() { if (MSDOS.compareEP("1e0e1fba....b4..cd211f2bc00650cb")) { sVersion = "3.0 (overlay)"; sOptions = "1991, 1992 by Software Security, Inc."; bDetected = true; } else if (MSDOS.compareEP("2e8c06....2e8c1e....0e1f8c06....892e....893e....8936....8916....890e....891e....a3....9c5825....a3....fb0e1f")) { sVersion = "3.0"; sOptions = "1991, 1992 by Software Security, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Secure.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Secure"); function detect() { if (MSDOS.compareEP("8CC805....50B8....50B0..068CD20683....50B0..52FC508CD28CCDBB....03EB4A8EDD8EC24DB9....33FFBE....AD35....ABE2")) { sVersion = "2.1b"; bDetected = true; } else if (MSDOS.compareEP("8CC805....50B8....50CB")) { sVersion = "2.1b"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$fa4c904c81f3....56be....5eeb$$eb$$81f3....444490fb5bf7c2....eb$$53b9....eb")) { sVersion = "0.29"; bDetected = true; } else if (MSDOS.compareEP("e8")) { var offset = MSDOS.readWord(MSDOS.getEntryPointOffset() + 1) + MSDOS.getEntryPointOffset() + 3; if (MSDOS.findSignature(offset, MSDOS.getSize() - offset, "2e8037..43e2f9") != -1) { sVersion = "0.19"; bDetected = true; } } return result(); } ================================================ FILE: db/MSDOS/protector_SelfChk.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "SelfChk"); function detect() { if (MSDOS.compareEP("1e1eb430cd21b44c3c..73..cd21be....e8....e8....b8....1f07e9....0e0e1f07fcc3")) { sVersion = "1.21"; sOptions = "1999 by Tsahi Chitin"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Shrink.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Shrink"); function detect() { if (MSDOS.compareEP("509CFCBE....BF....57B9....F3A48B......BE....BF....F3A4C3")) { sVersion = "1.0"; bDetected = true; } else if (MSDOS.compareEP("E9....509CFCBE....8BFE8CC805....8EC00657B9")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_SnoopStop.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "SnoopStop"); function detect() { if (MSDOS.compareEP("..E9....EB..20......73..20....411A05")) { sVersion = "1.15"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_SuckStop.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "SuckStop"); function detect() { if (MSDOS.compareEP("EB......BE....B430CD21EB..9B")) { sVersion = "1.11"; bDetected = true; } else if (MSDOS.compareEP("'KAOT'58eb$$be....b430cd21eb$$3c..77..cd204e75..6a..0e6a..fec3cf")) { sVersion = "1.11r"; sOptions = "1997 by KA0T //N0Ps"; bDetected = true; } else if (MSDOS.compareEP("'KAOT'5ceb$$be....b430cd21eb$$3c..77..cd204e75..c706........1e6a..0fa1")) { sVersion = "1.10r"; sOptions = "1997 by KA0T //N0Ps"; bDetected = true; } else if (MSDOS.compareEP("'KAOT'5ceb$$be....b430cd21eb$$3c..77..cd204e75..6a..0e6a..fec3cf")) { sOptions = "1997 by KA0T //N0Ps"; bDetected = true; } else if (MSDOS.compareEP("3a324a1d....fb37fb1d....1d....be....81ee....6a..593a32")) { sVersion = "1.0"; sOptions = "1997 by KA0T //N0Ps"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_TCEC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "TCEC"); function detect() { if (MSDOS.compareEP("e4640c..e66466fae800005d81ed....b8....8bd48da6....b9....8bdc2ec00f..2e30072e000f44e2")) { sVersion = "3.59r5"; sOptions = "by ThE CLERiC! //LZ0, EVD"; bDetected = true; } else if (MSDOS.compareEP("54434543b9....83c4..33c0509df326ace3..eb")) { sVersion = "3.55"; sOptions = "by ThE CLERiC! //LZ0, EVD"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_TraceLock.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "TraceLock"); function detect() { if (MSDOS.compareEP("1e06e8$$$$0e0e1f07b4..b9....be....8bfefcac32c4d2c802e1aae2..b8....35....8706....c3")) { sVersion = "0.9"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Trap.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Trap"); function detect() { if (MSDOS.compareEP("e800005b83c3..908bd3e8$$$$5b2e803f..74..90908bdab9....eb")) { sVersion = "1.21"; sOptions = "by Christoph Gabler"; bDetected = true; } else if (MSDOS.compareEP("8cd0bb....8ed333c98ed0b9....eb$$e2..33d2")) { sVersion = "1.18"; sOptions = "by Christoph Gabler"; bDetected = true; } else if (MSDOS.compareEP("8cd0bb....8ed333d28ed0b9....eb$$e2..33d2")) { sVersion = "1.X"; sOptions = "by Christoph Gabler"; bDetected = true; } else if (MSDOS.compareEP("b9....eb$$e2$$eb..90cd20e2")) { sVersion = "1.15"; sOptions = "by Christoph Gabler"; bDetected = true; } else if (MSDOS.compareEP("e800005b83c3..908bd3e8$$$$5b2e803f..74..90908bdab9....2ec0")) { sVersion = "1.20"; sOptions = "1998 by Christoph Gabler"; bDetected = true; } else if (MSDOS.compareEP("05....eb$$bb....81ebfa..85f9eb$$eb$$39fbeb")) { sVersion = "1.22"; sOptions = "by Christoph Gabler"; bDetected = true; } else if (MSDOS.compareEP("81ea....eb$$b9....81c1....39d0bb....85c3b9....f505....bb....ba....81c2")) { sVersion = "1.23"; sOptions = "by Christoph Gabler"; bDetected = true; } else if (MSDOS.compareEP("eb$$39c281c3....eb$$81c3....39cc81ea....39e2b9....85da39e9eb")) { sVersion = "1.24"; sOptions = "by Christoph Gabler"; bDetected = true; } else if (MSDOS.compareEP("8cd1ba....8ed233d28ed18bcaeb")) { sVersion = "1.13"; sOptions = "by Christoph Gabler"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$5d81ed....458cd68bfc0f23c70f23ceb0..e6..fa0e17")) { sVersion = "1.26b1"; sOptions = "2000 by Christoph Gabler"; bDetected = true; } else if (MSDOS.compareEP("8cd1ba....8ed233d28ed18bcab9....eb")) { sVersion = "1.14"; sOptions = "by Christoph Gabler"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_Un2pack.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Un2pack"); function detect() { if (MSDOS.compareEP("9cba....2d....81e1....81f3....b4..9db8....ba....8cdb03d83b1e....73..83eb..fa8ed3bc")) { sVersion = "2.0"; sOptions = "1994 by The CCS-Productions"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_UnPackStop.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "UnPackStop"); function detect() { if (MSDOS.compareEP("3670..b8....81c0....bb....43e8....5f83c7..0e570656cbbe....eb")) { sVersion = "0.9X"; sOptions = "by Szaszi (Szabo Laszlo)"; bDetected = true; } else if (MSDOS.compareEP("68....c3")) { var nOffset = MSDOS.readWord(MSDOS.getEntryPointOffset() + 1) - 32; if (MSDOS.compare("bf....e2..a541b9....2e31154747e2", nOffset)) { sVersion = "0.95"; sOptions = "by Szaszi (Szabo Laszlo)"; bDetected = true; } else if (MSDOS.compare("b9....39fe2e31154747eb", nOffset)) { sVersion = "0.95 freeware"; sOptions = "by Szaszi (Szabo Laszlo)"; bDetected = true; } } else if (MSDOS.compareEP("4e46555dbb....70..b8....81c0....4c44cd213efc268b2e....8ec5")) { sVersion = "0.94"; sOptions = "by Szaszi (Szabo Laszlo)"; bDetected = true; } else if (MSDOS.compareEP("b8....40bb....4be8$$$$be....eb$$5f83c7..0e570656cb")) { sVersion = "0.94"; sOptions = "by Szaszi (Szabo Laszlo)"; bDetected = true; } else if (MSDOS.compareEP("424a5159bb....4bb8....404a42cd2190fc")) { sVersion = "0.96"; sOptions = "by Szaszi (Szabo Laszlo)"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_XDOC.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "XDOC"); function detect() { if (MSDOS.compareEP("2e8c16....eb00ea....ffff")) { sVersion = "1.20"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_aPatch.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "aPatch"); function detect() { if (MSDOS.compareEP("e8$$$$fde8$$$$ffc75e83ee..e8$$$$5d8176......c646....eb$$ffe5")) { sVersion = "0.05-0.33"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_cramble.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "cramble"); function detect() { if (MSDOS.compareEP("E9....609CFC..................01..012A..FF")) { sVersion = "0.2b3"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_iLUCRYPT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "iLUCRYPT"); function detect() { if (MSDOS.compareEP("8becfac746......4c4cc3fbbf....b8....2e3105d1c84f")) { sVersion = "4.01X"; sOptions = "by Christian Schwarz"; bDetected = true; } else if (MSDOS.compareEP("bf....b8....2e3105d1c84f81ff....73..b7..df53..961e")) { sVersion = "4.017"; sOptions = "by Christian Schwarz"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/protector_nbuild.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "nbuild"); function detect() { if (MSDOS.compareEP("B9....BB....C0....80....43E2")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/runtime_VROOMM.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE meta("runtime", "VROOMM (Virtual Real-time Object-Oriented Memory)"); function detect() { if (MSDOS.compareOverlay("46424f56")) { // FBOV bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/self-displayer_ANS2ALL.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "ANS2ALL"); function detect() { if (MSDOS.compareEP("eb$$be....bf....b9....8ccd81ed....8bdd83eb..8bd3fcfa909090909090")) { sVersion = "0.9beta"; sOptions = "by ZeroCoder //XG"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/self-displayer_GIFEXE.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "GIFEXE"); function detect() { if (MSDOS.compareEP("ba....2e8916....b430cd218b2e....8b1e....8edaa3....8c06") && MSDOS.compareOverlay("'GIF87a'") && MSDOS.isSignaturePresent(MSDOS.getSize()-6, 6, "'GIFEXE'")) { sVersion = "1.0"; sOptions = "1990, 1991 by Steve Enns and Dan Magosse"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/self-displayer_RELETTER.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "RELETTER"); function detect() { if (MSDOS.compareEP("e9$$$$bc....bf....bb....8a0784c075..e9....438a073c..74..3c..74..89da438a073c..74")) { sVersion = "1.0"; sOptions = "1993 by Hans J. Baer (converted to exe)"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/self-displayer_SimplyWare.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", ""); function detect() { if (MSDOS.compareEP("b8....8ed88c06....fa8ed0bc....fbb430cd21a3....0650b434cd218c06....8bc3485b86df81fb")) { var nOffset = MSDOS.getOverlayOffset(); if (MSDOS.findSignature(nOffset - 0x1000, 0x1000, "'Simply Docs Viewer'") != -1) { sName = "Simply Docs Viewer"; sVersion = "3.0"; sOptions = "1990-94 by SimpleWare"; bDetected = true; } else if (MSDOS.compareOverlay("'Simply Help!'")) { sName = "Simply Help! TSR Viewer" sOptions = "1990-94 by SimpleWare"; bDetected = true; } } return result(); } ================================================ FILE: db/MSDOS/self-displayer_TXT2COM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "TXT2COM + generic com2exe"); function detect() { if (MSDOS.compareEP("e8$$$$c706........803e......75..8d36....e8....e8....e8....e8....e8....ffa7")) { sVersion = "1.1"; sOptions = "1987 by Keith P. Graham"; bDetected = true; } else if (MSDOS.compareEP("8d26....e8$$$$b4..cd103c..74..c706........c706........3c..74..3c..74..8d16....b409cd21cd20c706")) { sVersion = "2.06"; sOptions = "1989 by Keith P. Graham"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/self-displayer_TXTmaker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "TXTmaker"); function detect() { if (MSDOS.compareEP("eb$$b4..33dbcd1080fc..74..b0..eb$$b44ccd21")) { sVersion = "1.22"; sOptions = "1991 by Jack A. Orman"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/self-displayer_Txt2Exe.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "Txt2Exe"); function detect() { if (MSDOS.compareEP("8cc88ed88cc08ed0bc....b4..cd10a2....3c..74..268a1e....0e07")) { sVersion = "4.01"; sOptions = "1996 by Wang Lisan"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/self-displayer_self-displayer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("self-displayer", "Unknown"); function detect() { if (MSDOS.compareEP("b8....cd10b409ba....eb$$cd21b409ba....eb$$cd21b409ba....eb")) { sOptions = "1997 //d4c"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_ARC.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("sfx", "ARC SFX"); function detect() { if (MSDOS.compareEP("8CC88CDB8ED88EC089......2BC3A3....89......BE....B9....BF....BA....FCAC32C28AD8")) { sVersion = "1.10"; sOptions = "1986-89 by Wayne Chin and Vernon D. Buerg"; bDetected = true; } else if (MSDOS.compareEP("558bec83ec..32c02ea2....2ea2....2ea2....8cd78ec78d7e..be....fcac3c..74..3c..76..3c..75..ac")) { sOptions = "1988-89 by NoGate Consulting"; bDetected = true; } else if (MSDOS.compareEP("558bec83ec..a1....2ea3....2ec606......8cd78ec78d7e..be....fcac3c..74..3c..76..3c..75..ac")) { sOptions = "1988-89 by NoGate Consulting"; bDetected = true; } else if (MSDOS.compareEP("bb....8edb8c06....c706........8cd02bc3b9....d3e003c4fa8ed38be0fb05....b9....d3e8408cd303c3a3")) { sVersion = "7.1"; sOptions = "1990 by System Enhancement Associates (SEA), Inc."; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_ARJ.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("sfx", "ARJ"); function detect() { if (MSDOS.compare("'RJSX'", 0x1c)) { sVersion = "old"; bDetected = true; } else if (MSDOS.isSignaturePresent(0, Math.min(1000, MSDOS.getSize()), "'aRJsfX'")) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_ChSFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "CHZ SFX (ChSFX)"); function getChSFXVersion() { var sResult = ""; var nStringOffset = MSDOS.findString(0, Math.min(0x100, MSDOS.getSize()), "ChSFX"); if (nStringOffset != -1) { sResult = MSDOS.getString(nStringOffset + 6); sResult = sResult.replace(/\s+$/, ''); } return sResult; } function detect() { if (MSDOS.compareEP("ba....e8$$$$1e0e1fe8$$$$52568bf2fcb4..eb$$ac0ac075")) { sVersion = getChSFXVersion(); bDetected = true; } else if (MSDOS.compareEP("8d16....e8$$$$1e0e1fe8$$$$52568bf2fcb4..eb$$ac0ac075")) { sVersion = getChSFXVersion(); bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_EXARJ.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "EXARJ small"); function detect() { if (MSDOS.compareEP("fcbb....e8....b430cd218bd8063c..72..8e06....33c08bf8b9....f2aeae75..40af061f8bd775..e8")) { sOptions = "1994 by Jakub Jelinek"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_ICE.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "ICE SFX"); function detect() { if (MSDOS.compareEP("eb$$be....8bfe8b0e....8b16....b8....50fcad33c2ab8bd0e2")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_LH.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("sfx", "LH"); function detect() { if (MSDOS.compare("'LH'27's SFX '", 0x24)) { bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_LHA.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "LHA SFX"); function detect() { if (MSDOS.compareEP("eb$$fcbc....8cc805....8ec0eb$$bb....e8....061fb430cd218bd81e3c..72..368e06....33c08bf8b9....f2aeae")) { sVersion = "2.05L, 2.10-2.13, 2.55"; bDetected = true; } else if (MSDOS.compareEP("eb$$fcbc....8cc805....8ec0e8....bb....e8....061fb430cd218bd81e3c..72..368e06....33c08bf8")) { sVersion = "2.13"; bDetected = true; } else if (MSDOS.compareEP("eb$$00fcbc....8cc805....8ec0eb$$bb....e8....061fb430cd218bd81e3c..72..368e06....33c08bf8b9....f2aeae")) { sVersion = "2.13S"; sOptions = "converted to exe"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$fcbc....8cc805....8ec0b8....cd21be....268816....26c706........ac")) { sVersion = "1.13L"; sOptions = "converted to exe"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_LHarc.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "LHarc SFX"); function detect() { if (MSDOS.compareEP("eb$$fcbc....bb....e8....8cc82e0306....8ed88ec005....2e3b06....76..bb....e9....bf....33d28bc2b9....d1e873..35....e2..abfec275..be....bf....b8....ba....2e3a24")) { sVersion = "1.13S, 1.13L"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$fcbc....bb....e8....8cc805....8ec0b8....cd21be....268816....26c706........ace8....74..263a06")) { sVersion = "1.14c"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$fcbc....e8....9090908cc805....8ec0b8....cd21be....268816....26c706........ace8....74..263a06")) { bDetected = true; } else if (MSDOS.compareEP("eb$$0d....fcbc....bb....e8....8cc82e0306....8ed88ec005....2e3b06....76..bb....e9")) { sVersion = "1.14c"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_PKSFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "PKSFX"); function detect() { if (MSDOS.compareEP("b430cd213c..73..cd20bf....8b36....2bf776..8bc405....d1d8b1..d3e83bf0")) { if (MSDOS.compareOverlay("1a")) { sOptions = "ARC"; bDetected = true; } } return result(); } ================================================ FILE: db/MSDOS/sfx_PKZIP-SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "PKZIP-SFX"); function detect() { if (MSDOS.compareEP("fc2e8c......a1....8ccb81c3....3bc372..2d....2d....fabc....8ed0fb2d....a3....8ec0e8....a1")) { sVersion = "1.1(1989-90)"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_PKZIP_mini-sfx.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "PKZIP mini-sfx"); function detect() { if (MSDOS.compareEP("b9....bf....2bcf32c0f3aab430cd21a3....8926....e8....b8....e8....e8")) { sVersion = "2.04c(1992)"; bDetected = true; } if (MSDOS.compareEP("b8....a3....bf....b9....2bcf32c0f3aab430cd21a3....a1....a3....e8....b8")) { sVersion = "1.1(1990)"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "SFX"); function detect() { if (MSDOS.compareEP("fc1e8a1e....16070e1f33d2e8....bd....885e..8f46..bf....33d28bc2b9....d1e873..35....e2..abfec275..be....e8")) { sVersion = "3.33"; sOptions = "(LHA archive) by LARC"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/sfx_ZOO.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "ZOO SFX"); function detect() { if (MSDOS.compareEP("ba....2e8916....8b2e....8eda8c06....b8....8cda05....83c3..8ed28be0e8")) { if (MSDOS.compareOverlay("'ZOO'............'Archive'")) { bDetected = true; } } return result(); } ================================================ FILE: db/MSDOS/unknown_immunizer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("immunizer", "unknown immunizer"); function detect() { if (MSDOS.compareEP("be....e9$$$$501e06b8....cd21fc80fc..75..3c..75..b4..cd213c")) { sOptions = "type 1"; bDetected = true; } else if (MSDOS.compareEP("be....8e06....8cdd31ff8bc7b9....f2aeae75..af061f")) { sOptions = "type 2"; bDetected = true; } return result(); } ================================================ FILE: db/MSDOS/virus.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("virus", ""); function detect() { if (MSDOS.compareEP("e8....5e83ee..b8....cd213d....75..0e1f81c6....bf....b9....fcf3a4061f06b8....50cb")) { sName = "TaiPan.438"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$9090be....8bfee8$$$$5081c7....b9....b8....902e31054790e2")) { sName = "Burglar.1150"; bDetected = true; } return result(); } ================================================ FILE: db/NE/_NE.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "Windows"); function detect() { if (NE.isVerbose()) { sName = NE.getOperationSystemName(); sVersion = NE.getOperationSystemVersion(); sOptions = NE.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/NE/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = NE; var X = NE; ================================================ FILE: db/NE/compiler_Borland_C++.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Borland C++"); function detect() { if (NE.compareEP("53510633c0509a........5807595b9a........0bc075..e9")) { sOptions = "1994 type 1"; bDetected = true; } else if (NE.compareEP("893e....56571e510656e3..1e33c050519a........91e3")) { sOptions = "1994 type 2"; bDetected = true; } else if (NE.compareEP("53510633c050e8....5807595b9a........0bc075..e9")) { sOptions = "1993 type 1"; bDetected = true; } else if (NE.compareEP("b8....8ed853510633c0509a........5807595b9a........0bc075..e9")) { sOptions = "1993 type 2"; bDetected = true; } else if (NE.compareEP("893e....56571e510656e3..1e33c05051900ee8....91e3")) { sOptions = "1991"; bDetected = true; } return result(); } ================================================ FILE: db/NE/compiler_Borland_Pascal.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Borland Pascal"); function detect() { if (NE.compareEP("9a........9a........9a........9a........9a........5589e56a..9a........ff36....bf....1e5768....9a")) { sVersion = "7.1"; bDetected = true; } return result(); } ================================================ FILE: db/NE/compiler_Watcom_C.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Watcom C"); function detect() { if (NE.compareEP("e9$$$$9a........0bc074..8c06....5756065352891e....8c06....2bc0509a")) { sOptions = "1991"; bDetected = true; } else if (NE.compareEP("e9$$$$b9....51b9....51b9....51b9....5153508cd18bdc83c3..8cd2b8....ea")) { sOptions = "1991"; bDetected = true; } else if (NE.compareEP("e9$$$$535152565706558becb9....51b9....51b9....51b9....5153508cd18bdc83c3..8cd2b8....9a")) { sOptions = "1991"; bDetected = true; } else if (NE.compareEP("e9$$$$9a........0bc075..e9....8c06....575606535253be....8936....8c1e....268a078804")) { sOptions = "1993"; bDetected = true; } else if (NE.compareEP("eb$$9a........09c075..e9....8c06....5756065352891e....8c06....29c0509a")) { sName = "Watcom C/C++16"; sOptions = "1995"; bDetected = true; } else if (NE.compareEP("eb$$5351525657065589e553508cd189e383c3..8cd23eb8....9a")) { sName = "Watcom C/C++16"; sOptions = "1995"; bDetected = true; } else if (NE.compareEP("e9$$$$535152565706558bec53508cd18bdc83c3..8cd2b8")) { sOptions = "1992"; bDetected = true; } else if (NE.compareEP("eb$$535152565706558bec53508cd18bdc83c3..8cd2b8")) { sName = "Open Watcom C/C++16 for OS/2"; sOptions = "2002"; bDetected = true; } else if (NE.compareEP("eb$$9a........0bc075$$8c06....575606535253be")) { sName = "Open Watcom C/C++16 for Windows"; sOptions = "2002"; bDetected = true; } sLang = sName.indexOf("C++") !== -1 ? "C" : "C++"; return result(); } ================================================ FILE: db/NE/game_engine_DirectorPlayer.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=Director meta("game engine", "Director Player"); function detect() { if (NE.compareOverlay("140002004d11650000000200c0252500")) { sVersion = "1.0-3.0"; bDetected = true; } return result(); } ================================================ FILE: db/NE/installer_CoktelVisionInstaller.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=Coktel_Vision meta("installer", "Coktel Vision"); function detect() { if (NE.compareOverlay("65000300ea010400fa0c0300e6010400")) { bDetected = true; } return result(); } ================================================ FILE: db/NE/installer_Setup-Specialist.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Setup-Specialist"); function detect() { if (NE.compareEP("eb$$53510633c0509a........5807595b9a........0bc075..e9")) { sOptions = "1995-1998 by Thilo-Alexander Ginkel"; bDetected = true; } else if (NE.compareEP("eb$$53510633c050900ee8....5807595b9a........0bc075..e9")) { sOptions = "1995-1997 by Thilo-Alexander Ginkel"; bDetected = true; } return result(); } ================================================ FILE: db/NE/library_MS_RTL.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("library", "MS RTL"); function detect() { if (NE.compareEP("fca3....891e....49890e....bb....8c1f83e4..8967..b8....508967..f7d0508967..8967..8926....1e68....1e68....9a")) { sOptions = "1990 type 1"; bDetected = true; } else if (NE.compareEP("558bec508bc416509a........5886e0a3....1e68....1e68....9a")) { sOptions = "1988 type 1"; bDetected = true; } else if (NE.compareEP("fc8926....8926....8c1e....49890e....a3....891e")) { sOptions = "1988 type 2"; bDetected = true; } else if (NE.compareEP("fc8926....49890e....a3....891e....1e68....1e68....9a")) { sOptions = "1988 type 3"; bDetected = true; } else if (NE.compareEP("c8......57561eb8....8ed89a")) { sOptions = "1990 type 2"; bDetected = true; } else if (NE.compareEP("c8......5756bb....8ec326a3....9a")) { sOptions = "1990 type 3"; bDetected = true; } return result(); } ================================================ FILE: db/NE/sfx_ARC_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "ARC SFX"); function detect() { if (NE.compareEP("a3....891e....890e....8b0e....bb....e8....72..8b0e....bb....e8....73..b9....890e....bb....e8")) { sOptions = "1991 by SEA, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/NE/sfx_PKZIP-SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "PKZIP-SFX"); function detect() { if (NE.compareEP("fca3....891e....49890e....bb....8c1f83e4..8967..b8....508967..f7d0508967..8967..8926....508bc416509a")) { sOptions = "1989-91 by PKWARE Inc."; bDetected = true; } return result(); } ================================================ FILE: db/NE/sfx_Sydex_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Sydex SFX"); function detect() { if (NE.compareEP("b8....8ec0e8....ba....3d....72..e8....26a3....26890e....268916....68....1ee8....83c4..ba....85c074")) { sOptions = "1995 by Sydex, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/NPM/_NPM.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "NodeJS package"); function detect() { if (NPM.isVerbose()) { sType = "operation system"; sName = NPM.getOperationSystemName(); sVersion = NPM.getOperationSystemVersion(); sOptions = NPM.getOperationSystemOptions(); bDetected = true; } return result(); } ================================================ FILE: db/NPM/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = NPM; var X = NPM; ================================================ FILE: db/NPM/language_JavaScript.5.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("language", "JavaScript"); function detect() { if (NPM.isArchiveRecordPresentExp("(.*?).js")) { bDetected = true; } return result(); } ================================================ FILE: db/NPM/language_TypeScript.5.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("language", "TypeScript"); function detect() { if (NPM.isArchiveRecordPresentExp("(.*?).ts")) { bDetected = true; } return result(); } ================================================ FILE: db/NPM/package_PackageName.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("package", ""); function detect() { var _sName = NPM.getPackageJsonRecord("name"); if (_sName) { sName = _sName; sVersion = NPM.getPackageJsonRecord("version"); bDetected = true; } return result(); } ================================================ FILE: db/PDF/_PDF.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "PDF"); function detect() { sName = PDF.getFileFormatName(); sVersion = PDF.getFileFormatVersion(); sOptions = PDF.getFileFormatOptions(); bDetected = true; return result(); } ================================================ FILE: db/PDF/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = PDF; var X = PDF; ================================================ FILE: db/PDF/converter_markdown-pdf.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("converter", "markdown-pdf"); function detect() { if (PDF.compare("'%PDF-1.4'0A'1 0 obj'0A'<<'0A'/Title ('FEFF')'0A'/Creator ('FEFF')'0A'/Producer ('FEFF00'Q'00't'00' '00'5'00'.'00'5'00'.'00'1)'")) { sVersion = "11.0.0"; bDetected = true; } return result(); } ================================================ FILE: db/PDF/converter_mdpdf.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("converter", "mdpdf"); function detect() { if (PDF.compare("'%PDF-1.4'0A'%'D3EBE9E10A'1 0 obj'0A'< meta("format", "pdf"); function detect() { var sHeaderComment = PDF.getHeaderCommentAsHex(); if (sHeaderComment) { _setResult("complier", "HeaderComment", sHeaderComment, ""); } } ================================================ FILE: db/PDF/format_PersonalData.5.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "pdf"); function detect() { var list_autor = PDF.getStringValuesByKey("/Author"); for (var i = 0; i < list_autor.length; i++) { _setResult("personal data", "Author", "", list_autor[i]); } } ================================================ FILE: db/PDF/format_RTSN_secure.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "pdf"); function detect() { if (PDF.findSignature(0, PDF.getSize(), "'obj'0D'<< '0D'/Filter /RTSN_secure '0D'/V 1 '0D'/pw (BLUEMOON)'0D'>> '0D'endobj'") != -1) { _setResult("protector", "RTSN_secure", "1.0", ""); } } ================================================ FILE: db/PDF/format_Tools.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "pdf"); function detect() { var list_creator = PDF.getStringValuesByKey("/Creator"); for (var i = 0; i < list_creator.length; i++) { _setResult("tool", "Creator", PDF.getHeaderCommentAsHex(), list_creator[i]); } var list_producer = PDF.getStringValuesByKey("/Producer"); for (var i = 0; i < list_producer.length; i++) { _setResult("tool", "Producer", PDF.getHeaderCommentAsHex(), list_producer[i]); } } ================================================ FILE: db/PE/ACE.6.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood includeScript("ACE"); function detect() { detect_ACE(0); return result(); } ================================================ FILE: db/PE/Cab.6.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood includeScript("cab"); function cab_resource(bShowOptions) { for (var i = 0; i < PE.resource.length; i++) { if (detect_Cab(PE.resource[i].Offset, PE.resource[i].Size, bShowOptions)) { return true; } } return false; } function detect(bShowOptions) { if (!detect_Cab(PE.getOverlayOffset(), PE.getOverlaySize(), bShowOptions) && !cab_resource(bShowOptions)) { var rsrcSection = PE.section[".rsrc"]; if (rsrcSection) { if (rsrcSection.FileOffset > rsrcSection.VirtualSize) { var nOffset = rsrcSection.FileOffset + rsrcSection.VirtualSize; nOffset = (nOffset + 0x1ff) & -0x200; while (!detect_Cab(nOffset, rsrcSection.FileSize, bShowOptions) && nOffset > rsrcSection.FileOffset && !_isStop()) { nOffset -= 0x200; } } } } return result(); } ================================================ FILE: db/PE/Microsoft.6.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // This file has a lot of results // Microsoft linker // Microsoft Visual C/C++ // Visual Basic // MASM // MFC // Rewritten by DosX: 2 jul 2025 function detect() { var linkerName = String(), linkerVersion = String(), linkerOptions = String(), cppCompilerName = String(), cppCompilerVersion = String(), cppCompilerOptions = String(), masmCompilerName = String(), masmCompilerVersion = String(), masmCompilerOptions = String(), vbCompilerName = String(), vbCompilerVersion = String(), vbCompilerOptions = String(), dotNetLibraryName = String(), dotNetLibraryVersion = String(), dotNetLibraryOptions = String(), mfcLibraryName = String(), mfcLibraryVersion = String(), mfcLibraryOptions = String(), toolName = String(), toolVersion = String(), toolOptions = String(); // // ================================================== // Advanced detection of .NET applications // ================================================== // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // ================================================== // function findNetCoreConfigOffset() { return PE.findString(PE.section[0].FileOffset, PE.getSize(), ".NETCoreApp,Version=v"); } function findNetFrameworkConfigOffset() { return PE.findString(PE.section[0].FileOffset, PE.getSize() - PE.getOverlaySize(), ".NETFramework,Version=v"); } function getNetConfigStringByOffset(configOffset) { var result = PE.getString(configOffset).split("=")[1]; if (result && result[0] !== 'v' && result.length > 7) result = String(); result = result.substr(1); return File.cleanString(result); } if (PE.isNet()) { const netFrameworkConfigPattern = findNetFrameworkConfigOffset(); if (netFrameworkConfigPattern != -1) { dotNetLibraryName = ".NET Framework"; // .NET Framework better than .NET Core dotNetLibraryVersion = String(getNetConfigStringByOffset(netFrameworkConfigPattern)); if (dotNetLibraryVersion) { // antifake if (dotNetLibraryVersion.length >= 4 && dotNetLibraryVersion[1] !== "4" && dotNetLibraryVersion[1] !== "3" && dotNetLibraryVersion[1] !== "2" && dotNetLibraryVersion[2] !== "." && isNaN(Number(dotNetLibraryVersion[3]))) { dotNetLibraryVersion = String(); } } } else if (PE.isRichSignaturePresent() && PE.isTLSPresent()) { const netCoreConfigPattern = findNetCoreConfigOffset(); if (netCoreConfigPattern != -1 && PE.compare("18", netCoreConfigPattern - 1) && PE.getNETVersion().substr(0, 4) === "v4.0") { // Is .NET Core DLL dotNetLibraryName = ".NET Core"; dotNetLibraryVersion = getNetConfigStringByOffset(netCoreConfigPattern); // antifake if (dotNetLibraryVersion.length >= 2 && isNaN(Number(dotNetLibraryVersion[1]))) { dotNetLibraryVersion = String(); } } } dotNetLibraryVersion = File.cleanString(dotNetLibraryVersion); // remove strange symbols if (PE.isSignaturePresent(0x00, PE.getSize(), "'.NETCoreApp'")) { dotNetLibraryName = ".NET Core"; } else if (!dotNetLibraryName) { dotNetLibraryName = ".NET Framework"; } var clrVersion = File.cleanString(PE.getNETVersion()); clrVersion = clrVersion.substring(1, clrVersion.length); dotNetLibraryVersion += (dotNetLibraryVersion ? ", " : String()) + "CLR " + clrVersion; // dotNetLibraryVersion = PE.getNETVersion(); if (PE.compare("'MZ'90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000....00000E1FBA0E00B409CD21B8014CCD21'This program cannot be run in DOS mode.\r\r\n$'00000000")) { linkerName = "Microsoft Linker"; } } else { var isNetNative = false; var rdataSection = PE.section[".rdata"]; if (rdataSection && PE.isFunctionPresent("LoadLibraryExW") && PE.isFunctionPresent("ShellExecuteW") && PE.findString(rdataSection.FileOffset, rdataSection.FileSize, "__clrcall") !== -1 && ( PE.isSignatureInSectionPresent(rdataSection.Number, "002E004E0045005400200043006F00720065") || PE.isSignatureInSectionPresent(rdataSection.Number, "2E004E00450054002000520075006E00740069006D006500") ) ) { dotNetLibraryVersion = "Loader"; } const dotNetDebugHeaderName = "DotNetRuntimeDebugHeader"; var secondSection = PE.section[1]; // By index, can be ".rdata" or ".managed" // Checking for signs of .NET Native debug information var isDotNetRuntimeDebugBuild = ( secondSection && ( PE.isExportFunctionPresent(dotNetDebugHeaderName) || ( PE.compare("48 8d 05", secondSection.FileOffset) && ( // .managed, debug PE.section[".managed"] || // .NET ~8.X PE.section["hydrated"] ) ) ) ); // General PE format check if (PE.compareEP("48") && PE.compare("90", PE.getEntryPointOffset() - 1) && // NOP before OEP PE.isRichSignaturePresent() && PE.getExportSection() !== -1 && // EAT always present PE.getNumberOfSections() >= 6) { // PE.isLibraryPresentExp(/^api-ms-win-crt-.*\.dll$/) if (isDotNetRuntimeDebugBuild || ( PE.isSignatureInSectionPresent(secondSection.Number, "'System.' %% %% %% %% %% %%") && ( PE.isSignatureInSectionPresent(secondSection.Number, "'DOTNET_' %%") || // .rdata, release PE.isSignatureInSectionPresent(secondSection.Number, "'D'00'O'00'T'00'N'00'E'00'T'00'_'") // .rdata, release (.NET 10) ) )) { isNetNative = true; if (isDotNetRuntimeDebugBuild) { dotNetLibraryOptions = "debug"; } else { dotNetLibraryOptions = "release"; } if (PE.section[0].Name !== ".text" || (secondSection.Name !== ".rdata" && secondSection.Name !== ".managed") || ( !PE.isDll() && // executable? PE.getNumberOfExports() === 1 && // only one export PE.getExportFunctionName(0) !== dotNetDebugHeaderName // and it's not DotNetRuntimeDebugHeader )) { dotNetLibraryOptions = dotNetLibraryOptions.append("modified"); } } // TODO: Improve & add .NET 10 support (!!!!!!) const netCoreConfigPattern = findNetCoreConfigOffset(); if (netCoreConfigPattern != -1) dotNetLibraryVersion = getNetConfigStringByOffset(netCoreConfigPattern); } if (dotNetLibraryVersion !== String() || dotNetLibraryOptions !== String()) dotNetLibraryName = ".NET " + (isNetNative ? "Native" : "Core"); if (isNetNative) { _setLang("Native MSIL/C#"); } } // // ================================================== // var isCppDetected = false, hasWideMainFunction = 0; msvcRuntimeLibrary = PE.isLibraryPresentExp(/^MSVCR/i); if (msvcRuntimeLibrary) { hasWideMainFunction = PE.isLibraryFunctionPresent(msvcRuntimeLibrary[0], "__wgetmainargs"); } if (!PE.is64()) { if (PE.compareEP("558BEC51C745FC01000000837D0C007510833D")) { if (PE.compareEP("00", -4)) { sOptions = mfcLibraryOptions.append("libcd"); } else if (PE.compareEP("00", -8)) { sOptions = mfcLibraryOptions.append("libcmtd"); } else { sOptions = mfcLibraryOptions.append("msvcrtd"); } cppCompilerVersion = "12.00"; isCppDetected = true; } else if (PE.compareEP("558BEC538B5D08568B750C578B7D1085F67509833D")) { if (PE.compareEP("CA", -1)) { cppCompilerOptions = cppCompilerOptions.append("libc"); } else if (PE.compareEP("59", -7)) { cppCompilerOptions = cppCompilerOptions.append("libcmt"); } else { cppCompilerOptions = cppCompilerOptions.append("msvcrt"); } cppCompilerVersion = "12.00"; isCppDetected = true; } else if (PE.compareEP("558BEC6AFF68........68........64A100000000506489250000000083")) { var mainFunctionOffset; switch (PE.readByte(PE.getEntryPointOffset() + 31)) { case 0x10: if (PE.compareEP("83", 107)) { cppCompilerOptions = cppCompilerOptions.append("libc"); mainFunctionOffset = 116; } else { cppCompilerOptions = cppCompilerOptions.append("libcmt"); mainFunctionOffset = 133; } if (PE.compareEP("E8", mainFunctionOffset)) { cppCompilerOptions = cppCompilerOptions.append("wmain"); --mainFunctionOffset; } if (PE.compareEP("FF", mainFunctionOffset + 25)) { cppCompilerOptions = cppCompilerOptions.append("glob"); } break; case 0x20: cppCompilerOptions = cppCompilerOptions.append("msvcrt"); if (hasWideMainFunction) { cppCompilerOptions = cppCompilerOptions.append("wmain"); } if (PE.compareEP("FF", 109)) { cppCompilerOptions = cppCompilerOptions.append("glob"); } break; case 0x58: if (PE.compareEP("33", 87)) { cppCompilerOptions = cppCompilerOptions.append("libc"); mainFunctionOffset = 116; } else { cppCompilerOptions = cppCompilerOptions.append("libcmt"); mainFunctionOffset = 134; } if (PE.compareEP("E8", mainFunctionOffset)) { cppCompilerOptions = cppCompilerOptions.append("wWinMain"); } break; case 0x68: cppCompilerOptions = cppCompilerOptions.append("msvcrt"); if (PE.compareEP("5F", 45)) { cppCompilerOptions = cppCompilerOptions.append("wWinMain"); } break; case 0x90: cppCompilerOptions = cppCompilerOptions.append("libcd"); if (PE.compareEP("E8", 241)) { cppCompilerOptions = cppCompilerOptions.append("wWinMain"); } break; case 0x94: cppCompilerOptions = cppCompilerOptions.append("msvcrtd"); if (PE.compareEP("83", 233)) { cppCompilerOptions = cppCompilerOptions.append("wWinMain"); } break; case 0xA4: if (PE.compareEP("00", 125)) { cppCompilerOptions = cppCompilerOptions.append("libcd"); mainFunctionOffset = 160; } else { cppCompilerOptions = cppCompilerOptions.append("libcmtd"); mainFunctionOffset = 179; } if (PE.compareEP("E8", mainFunctionOffset)) { cppCompilerOptions = cppCompilerOptions.append("wWinMain"); } break; case 0xE0: switch (PE.readByte(PE.getEntryPointOffset() + 38)) { case 0xB8: cppCompilerOptions = cppCompilerOptions.append("libcd"); if (PE.compareEP("E8", 241)) { cppCompilerOptions = cppCompilerOptions.append("wmain"); } break; case 0xC7: cppCompilerOptions = cppCompilerOptions.append("msvcrtd"); if (hasWideMainFunction) { cppCompilerOptions = cppCompilerOptions.append("wmain"); } if (PE.compareEP("FF", 121)) { cppCompilerOptions = cppCompilerOptions.append("glob"); } break; } break; case 0xE8: cppCompilerOptions = cppCompilerOptions.append("libcd"); break; case 0xF0: if (PE.compareEP("00", 125)) { cppCompilerOptions = cppCompilerOptions.append("libcd"); mainFunctionOffset = 160; } else { cppCompilerOptions = cppCompilerOptions.append("libcmtd"); mainFunctionOffset = 179; } if (PE.compareEP("E8", mainFunctionOffset)) { cppCompilerOptions = cppCompilerOptions.append("wmain"); --mainFunctionOffset; } if (PE.compareEP("FF", mainFunctionOffset + 25)) { cppCompilerOptions = cppCompilerOptions.append("glob"); } break; } cppCompilerVersion = "11.00-13.10"; isCppDetected = true; } else if (PE.compareEP("6A0C68........E8........33C0408945E48B750C33FF3BF7750C393D")) { switch (PE.readByte(PE.getEntryPointOffset() - 1)) { case 0xC0: cppCompilerOptions = cppCompilerOptions.append("libc"); break; case 0x00: cppCompilerOptions = cppCompilerOptions.append("libcmt"); break; } cppCompilerVersion = "13.10"; isCppDetected = true; } else if (PE.compareEP("6A..68........E8........66813D")) { cppCompilerVersion = "13.10"; isCppDetected = true; } else if (PE.compareEP("6A..68........E8........BF940000008BC7E8")) { mainFunctionOffset = 0; var mainFunctionType; switch (PE.readByte(PE.getEntryPointOffset() + 1)) { case 0x18: mainFunctionType = "wmain"; mainFunctionOffset = 197; break; case 0x60: mainFunctionType = "wWinMain"; mainFunctionOffset = 199; break; } if (mainFunctionOffset) { if (PE.compareEP("6A", mainFunctionOffset)) { cppCompilerOptions = cppCompilerOptions.append("libcmt"); mainFunctionOffset += 62; } else { cppCompilerOptions = cppCompilerOptions.append("libc"); mainFunctionOffset += 69; } if (PE.compareEP("E8", mainFunctionOffset)) { cppCompilerOptions = cppCompilerOptions.append(mainFunctionType); } } cppCompilerVersion = "13.10"; isCppDetected = true; } else if (PE.compareEP("8BFF558BEC837D0C017505E8")) { if (PE.compareEP("8B", 16)) { cppCompilerOptions = cppCompilerOptions.append(PE.compareEP("E8", 74) ? "libcmtd" : "msvcrtd"); } else { cppCompilerOptions = cppCompilerOptions.append(PE.compareEP("8B", 35) ? "libcmt" : "msvcrt"); } cppCompilerVersion = "15.00-16.00"; isCppDetected = true; } else if (PE.compareEP("8BFF558BECE8......00E8......005DC3")) { switch (PE.readByte(PE.getEntryPointOffset() + 58)) { case 0x88: cppCompilerOptions = cppCompilerOptions.append("msvcrtd", "wWinMain"); cppCompilerVersion = "15.00"; break; case 0x8C: cppCompilerOptions = cppCompilerOptions.append("msvcrtd"); cppCompilerVersion = "15.00"; break; case 0x90: cppCompilerOptions = cppCompilerOptions.append("msvcrtd"); if (hasWideMainFunction) { cppCompilerOptions = cppCompilerOptions.append("wWinMain"); } cppCompilerVersion = "16.00"; break; case 0x94: cppCompilerOptions = cppCompilerOptions.append("libcmtd"); if (PE.compareEP("52", 145)) { cppCompilerOptions = cppCompilerOptions.append("wWinMain"); } cppCompilerVersion = "15.00"; break; case 0x98: cppCompilerOptions = cppCompilerOptions.append("libcmtd"); if (PE.compareEP("6A", 645)) { cppCompilerOptions = cppCompilerOptions.append("wWinMain"); } cppCompilerVersion = "16.00"; break; case 0xE4: cppCompilerOptions = cppCompilerOptions.append("msvcrtd"); if (hasWideMainFunction) { cppCompilerOptions = cppCompilerOptions.append("wmain"); } if (PE.compareEP("FF", -0x9B)) { cppCompilerOptions = cppCompilerOptions.append("glob"); } cppCompilerVersion = "15.00-16.00"; break; case 0xE8: cppCompilerOptions = cppCompilerOptions.append("libcmtd"); if (PE.compareEP("E8", 92)) { if (PE.compareEP("E8", 184)) { cppCompilerOptions = cppCompilerOptions.append("wmain"); hasWideMainFunction = 1; } cppCompilerVersion = "15.00"; } else { if (PE.compareEP("E8$$$$$$$$8BFF558BEC83EC10", 213)) { cppCompilerOptions = cppCompilerOptions.append("wmain"); hasWideMainFunction = 1; } cppCompilerVersion = "16.00"; } if (hasWideMainFunction) { if (PE.compareEP("10", -6)) { cppCompilerOptions = cppCompilerOptions.append("glob"); } } else { if (PE.compareEP("CC", -2)) { cppCompilerOptions = cppCompilerOptions.append("glob"); } } break; } isCppDetected = true; } else if (PE.compareEP("E8......00E9$$$$$$$$6A..68........E8")) { var nEP = PE.getEntryPointOffset(); nEP += 10 + ~~PE.readDword(nEP + 6); if (PE.compare("10", nEP + 1)) { cppCompilerOptions = cppCompilerOptions.append("msvcrt"); if (hasWideMainFunction) { cppCompilerOptions = cppCompilerOptions.append("wmain"); } if (PE.compareEP("FF", -48)) { cppCompilerOptions = cppCompilerOptions.append("glob"); } } else if (PE.compare("33DB", nEP + 12)) { cppCompilerOptions = cppCompilerOptions.append("msvcrt"); if (PE.compare("89", nEP + 53) || PE.compare("E0", nEP + 60)) { cppCompilerOptions = cppCompilerOptions.append("wWinMain"); } } else if (PE.compare("3935", nEP + 14)) { cppCompilerOptions = cppCompilerOptions.append("libcmt"); if (PE.compareEP("E8$$$$$$$$8B", -150)) { cppCompilerOptions = cppCompilerOptions.append("wmain"); } if (PE.compareEP("FF", -0xA3)) { cppCompilerOptions = cppCompilerOptions.append("glob"); } } else if (PE.compare("8D4598", nEP + 12)) { cppCompilerOptions = cppCompilerOptions.append("libcmt"); if (PE.compareEP("51", 15)) { cppCompilerOptions = cppCompilerOptions.append("wWinMain"); } } else if (PE.compare("33F68975FC", nEP + 12)) { cppCompilerOptions = cppCompilerOptions.append("libcmt"); if (PE.compare("E8", nEP + 170)) { cppCompilerOptions = cppCompilerOptions.append("wWinMain"); } } else if (PE.compare("B8'MZ'", nEP + 12)) { cppCompilerOptions = cppCompilerOptions.append("libcmt"); if (PE.compare("E8", nEP + 149)) { cppCompilerOptions = cppCompilerOptions.append("wmain"); --nEP; } if (PE.compare("FF", nEP + 174)) { cppCompilerOptions = cppCompilerOptions.append("glob"); } } cppCompilerVersion = "15.00-16.00"; isCppDetected = true; } else if (PE.compareEP("64A100000000558BEC6AFF68")) { isCppDetected = true; } else if (PE.compareEP("64A100000000506489250000000083C4A8535657")) { cppCompilerVersion = "11.00"; isCppDetected = true; } else if (PE.compareEP("535657BB........8B......553BFB75")) { cppCompilerVersion = "8.00"; isCppDetected = true; } else if (PE.compareEP("56E8........8BF0E8........68........68........E8........6A..68........56E8")) { cppCompilerVersion = "8.00"; isCppDetected = true; } else if (PE.compareEP("53B8........8B......565785DB5575")) { cppCompilerVersion = "10.20"; isCppDetected = true; } else if (PE.compareEP("558BEC83EC4456FF15........6A018BF0FF15")) { cppCompilerVersion = "12.00"; isCppDetected = true; } else if (PE.compareEP("558BEC83EC4456FF15........8BF08A063C22")) { cppCompilerVersion = "12.00"; isCppDetected = true; } else if (PE.compareEP("558D6C....81EC........8B45..83F801560F84........85C00F84")) { cppCompilerVersion = "12.00"; isCppDetected = true; } // else if(PE.compareEP("837C24080175098B442404A3....0010E88BFFFFFF")) { // Pure Basic 4.0 // cppCompilerVersion = "12.00"; // isCppDetected = true; // } else if (PE.compareEP("558BEC538B5D08568B750C85F6578B7D10")) { cppCompilerVersion = "13.00"; isCppDetected = true; } else if (PE.compareEP("833D........00741A68........E8........85C059740BFF742404FF15........59E8........68........68........E8........85C059597554565768........E8........BE........8BC6BF")) { cppCompilerVersion = "14.00"; isCppDetected = true; } else if (PE.compareEP("6A1468........E8........BB94000000536A008B..........FFD750FF..........8BF085F6750A6A12E8........59EB18891E56FF..........5685C0751450FFD750FF..........B8")) { cppCompilerVersion = "14.00"; isCppDetected = true; } else if (PE.compareEP("8BFF558BEC538B5D08568B750C85F6578B7D100F84....000083FE01")) { cppCompilerVersion = "14.00"; isCppDetected = true; } else if (PE.compareEP("8BFF558BEC538B5D08568B750C85F6578B7D107509833D........00EB2683FE01740583FE027522A1........85C07409575653FFD085C0740C575653E8......FF85C0750433C0EB4E575653E8......FF83FE0189450C750C85C07537575053E8......FF85F6740583FE037526575653E8......FF85C0750321450C837D0C007411A1........85C07408575653FFD089450C8B450C5F5E5B5DC20C00")) { cppCompilerVersion = "14.00"; isCppDetected = true; } else if (PE.compareEP("558BEC83EC10A1........8365F8008365FC005357BF4EE640BB3BC7BB0000FFFF740D85C37409F7D0A3........EB60568D45F850FF15........8B75FC3375F8FF15........33F0FF15........33F0FF15........33F08D45F050FF15........8B45F43345F033F03BF77507BE4FE640BBEB0B85F375078BC6C1E0100BF08935........F7D68935........5E5F5BC9C3")) { cppCompilerVersion = "14.00"; isCppDetected = true; } else if (PE.compareEP("558BEC83EC245356578965F8")) { isCppDetected = true; } } else { if (PE.compareEP("4883EC2885D248895C243048896C243848897424408BDA488BE9498BF0751E3915")) { cppCompilerVersion = "14.00"; // DLL isCppDetected = true; } else if (PE.compareEP("4883EC5848895C247048897C247866813D")) { cppCompilerVersion = "14.00"; // console, msvcrt isCppDetected = true; } else if (PE.compareEP("4883EC3848895C245048897C2458FF15")) { cppCompilerVersion = "14.00"; // console, static isCppDetected = true; } else if (PE.compareEP("488BC44881EC........4889581848897820488D4888FF15")) { cppCompilerVersion = "14.00"; // GUI isCppDetected = true; } else if (PE.compareEP("4883EC28E8........4883C428E9$$$$$$$$48895C24")) { cppCompilerVersion = "16.00"; isCppDetected = true; } else if (PE.compareEP("4883EC28E8........E8........4883C428C3")) { cppCompilerVersion = "16.00"; // debug isCppDetected = true; } else if (PE.compareEP("48895C24084889742410574883EC20498BF88BDA488BF183FA017505E8")) { cppCompilerVersion = "16.00"; // DLL isCppDetected = true; } else if (PE.compareEP("4C894424188954241048894C24084883EC28837C2438017505E8")) { cppCompilerVersion = "16.00"; // DLL debug isCppDetected = true; } } if (isCppDetected) { cppCompilerName = "Microsoft Visual C/C++"; } if (PE.isRichSignaturePresent()) { linkerName = "Microsoft Linker"; } var mfcLibraryMatch = PE.isLibraryPresentExp(/^MFC(\d+?)(u?)(d?)\.dll/i); if (mfcLibraryMatch) { mfcLibraryVersion = (mfcLibraryMatch[1] / 10).toFixed(1); if (mfcLibraryMatch[2]) { mfcLibraryOptions = "Unicode"; } if (mfcLibraryMatch[3]) { mfcLibraryOptions = mfcLibraryOptions.append("debug"); } mfcLibraryName = "MFC"; } if (PE.isDeepScan() && (mfcLibraryName == String())) { var dataSection = PE.section[".data"]; if (dataSection && PE.isSignatureInSectionPresent(dataSection.Number, "'CMFCComObject'")) { mfcLibraryName = "MFC"; mfcLibraryOptions = "static"; } } if (PE.isNet()) { if (PE.isNetObjectPresent("Microsoft.VisualBasic")) { vbCompilerName = "VB.NET"; vbDetected = true; } } else if (PE.isLibraryPresentExp(/^MSVBVM60(\.DLL)?/i)) { vbCompilerName = "Microsoft Visual Basic"; vbCompilerVersion = "6.0"; vbCompilerOptions = getVbOptions(); } else if (PE.isLibraryPresentExp(/^MSVBVM50(\.DLL)?/i)) { vbCompilerName = "Microsoft Visual Basic"; vbCompilerVersion = "5.0"; vbCompilerOptions = getVbOptions(); } else if (PE.isLibraryPresentExp(/^VB40032(\.DLL)/i)) { vbCompilerName = "Microsoft Visual Basic"; vbCompilerVersion = "4.0"; } if (vbCompilerVersion && ( PE.isLibraryPresentExp(/^(VB40032|MSVBVM[56]0)$/i) || (vbCompilerVersion === "6.0" && !PE.isRichSignaturePresent()) )) { vbCompilerOptions = vbCompilerOptions.append("modified/patched"); } // Rich var richLinkerName = String(), richLinkerVersion = String(), richLinkerOptions = String(), richCppCompilerName = String(), richCppCompilerVersion = String(), richCppCompilerOptions = String(), richMasmCompilerName = String(), richMasmCompilerVersion = String(), richMasmCompilerOptions = String(), richVbCompilerName = String(), richVbCompilerVersion = String(), richVbCompilerOptions = String(); for (var i = PE.getNumberOfRichIDs() - 1; i >= 0; i--) { var richId = PE.getRichID(i); if (richId > 1) { var richVersion = String(), richOptions = String(), isLinker = 0, isCompiler = 0, isMasm = 0, isBasic = 0; var richIdMap = { 0x0002: { isLinker: 1, richVersion: "5.10" }, 0x0004: { isLinker: 1, richVersion: "6.00" }, 0x0007: { isBasic: 1, richVersion: "5.00", richOptions: "Native" }, 0x0008: { isCompiler: 1, richVersion: "11.00", richOptions: "C/C++" }, 0x0009: { isBasic: 1, richVersion: "6.00", richOptions: "Native" }, 0x000a: { isCompiler: 1, richVersion: "12.00", richOptions: "C" }, 0x000b: { isCompiler: 1, richVersion: "12.00", richOptions: "C++" }, 0x000e: { isMasm: 1, richVersion: "6.13" }, 0x000f: { isMasm: 1, richVersion: "7.01" }, 0x0010: { isLinker: 1, richVersion: "5.11" }, 0x0012: { isMasm: 1, richVersion: "6.14", richOptions: "MMX2 support" }, 0x0013: { isLinker: 1, richVersion: "5.12" }, 0x0015: { isCompiler: 1, richVersion: "12.00", richOptions: "C/std" }, 0x0016: { isCompiler: 1, richVersion: "12.00", richOptions: "C++/std" }, 0x0017: { isCompiler: 1, richVersion: "12.00", richOptions: "C/book" }, 0x0018: { isCompiler: 1, richVersion: "12.00", richOptions: "C++/book" }, 0x001b: { isBasic: 1, richVersion: "7.00", richOptions: "Native" }, 0x001c: { isCompiler: 1, richVersion: "13.00", richOptions: "C" }, 0x001d: { isCompiler: 1, richVersion: "13.00", richOptions: "C++" }, 0x001e: { isLinker: 1, richVersion: "6.10" }, 0x0020: { isLinker: 1, richVersion: "6.01" }, 0x0022: { isBasic: 1, richVersion: "6.10", richOptions: "Native" }, 0x0023: { isCompiler: 1, richVersion: "12.10", richOptions: "C" }, 0x0024: { isCompiler: 1, richVersion: "12.10", richOptions: "C++" }, 0x0025: { isLinker: 1, richVersion: "6.20" }, 0x0028: { isLinker: 1, richVersion: "6.21" }, 0x002a: { isMasm: 1, richVersion: "6.15" }, 0x002b: { isCompiler: 1, richVersion: "13.00", richOptions: "LTCG/C" }, 0x002c: { isCompiler: 1, richVersion: "13.00", richOptions: "LTCG/C++" }, 0x002d: { isMasm: 1, richVersion: "6.20" }, 0x002f: { isBasic: 1, richVersion: "6.20", richOptions: "Native" }, 0x0030: { isCompiler: 1, richVersion: "12.20", richOptions: "C" }, 0x0031: { isCompiler: 1, richVersion: "12.20", richOptions: "C++" }, 0x0032: { isCompiler: 1, richVersion: "12.20", richOptions: "C/std" }, 0x0033: { isCompiler: 1, richVersion: "12.20", richOptions: "C++/std" }, 0x0034: { isCompiler: 1, richVersion: "12.20", richOptions: "C/book" }, 0x0035: { isCompiler: 1, richVersion: "12.20", richOptions: "C++/book" }, 0x0039: { isCompiler: 1, richVersion: "13.00", richOptions: "C/std" }, 0x003a: { isCompiler: 1, richVersion: "13.00", richOptions: "C++/std" }, 0x003c: { isLinker: 1, richVersion: "6.22" }, 0x003d: { isLinker: 1, richVersion: "7.00" }, 0x0040: { isMasm: 1, richVersion: "7.00" }, 0x0041: { isCompiler: 1, richVersion: "13.00", richOptions: "POGO_I_C" }, 0x0042: { isCompiler: 1, richVersion: "13.00", richOptions: "POGO_I_CPP" }, 0x0043: { isCompiler: 1, richVersion: "13.00", richOptions: "POGO_O_C" }, 0x0044: { isCompiler: 1, richVersion: "13.00", richOptions: "POGO_O_CPP" }, 0x0047: { isLinker: 1, richVersion: "7.10p" }, 0x004b: { isMasm: 1, richVersion: "7.10p" }, 0x004c: { isCompiler: 1, richVersion: "13.10p", richOptions: "C" }, 0x004d: { isCompiler: 1, richVersion: "13.10p", richOptions: "C++/book" }, 0x004e: { isCompiler: 1, richVersion: "13.10p", richOptions: "C/std" }, 0x004f: { isCompiler: 1, richVersion: "13.10p", richOptions: "C++/std" }, 0x0050: { isCompiler: 1, richVersion: "13.10p", richOptions: "LTCG/C" }, 0x0051: { isCompiler: 1, richVersion: "13.10p", richOptions: "LTCG/C++" }, 0x0052: { isCompiler: 1, richVersion: "13.10p", richOptions: "POGO_I_C" }, 0x0053: { isCompiler: 1, richVersion: "13.10p", richOptions: "POGO_I_C" }, 0x0054: { isCompiler: 1, richVersion: "13.10p", richOptions: "POGO_O_C" }, 0x0055: { isCompiler: 1, richVersion: "13.10p", richOptions: "POGO_O_CPP" }, 0x0056: { isLinker: 1, richVersion: "6.24" }, 0x005a: { isLinker: 1, richVersion: "7.10" }, 0x005f: { isCompiler: 1, richVersion: "13.10", richOptions: "C" }, 0x0060: { isCompiler: 1, richVersion: "13.10", richOptions: "C++/book" }, 0x0061: { isCompiler: 1, richVersion: "13.10", richOptions: "C/std" }, 0x0062: { isCompiler: 1, richVersion: "13.10", richOptions: "C++/std" }, 0x0063: { isCompiler: 1, richVersion: "13.10", richOptions: "LTCG/C" }, 0x0064: { isCompiler: 1, richVersion: "13.10", richOptions: "LTCG/C++" }, 0x0065: { isCompiler: 1, richVersion: "13.10", richOptions: "POGO_I_C" }, 0x0066: { isCompiler: 1, richVersion: "13.10", richOptions: "POGO_I_C" }, 0x0067: { isCompiler: 1, richVersion: "13.10", richOptions: "POGO_O_C" }, 0x0068: { isCompiler: 1, richVersion: "13.10", richOptions: "POGO_O_CPP" }, 0x006d: { isCompiler: 1, richVersion: "14.00", richOptions: "C" }, 0x006e: { isCompiler: 1, richVersion: "14.00", richOptions: "C++/book" }, 0x006f: { isCompiler: 1, richVersion: "14.00", richOptions: "C/std" }, 0x0070: { isCompiler: 1, richVersion: "14.00", richOptions: "C++/std" }, 0x0071: { isCompiler: 1, richVersion: "14.00", richOptions: "LTCG/C" }, 0x0072: { isCompiler: 1, richVersion: "14.00", richOptions: "LTCG/C++" }, 0x0073: { isCompiler: 1, richVersion: "14.00", richOptions: "POGO_I_C" }, 0x0074: { isCompiler: 1, richVersion: "14.00", richOptions: "POGO_I_C" }, 0x0075: { isCompiler: 1, richVersion: "14.00", richOptions: "POGO_O_C" }, 0x0076: { isCompiler: 1, richVersion: "14.00", richOptions: "POGO_O_CPP" }, 0x0078: { isLinker: 1, richVersion: "8.00" }, 0x007d: { isMasm: 1, richVersion: "8.00" }, 0x0080: { isCompiler: 1, richVersion: "14.00", richOptions: "CVTCIL/C" }, 0x0081: { isCompiler: 1, richVersion: "14.00", richOptions: "CVTCIL/C++" }, 0x0082: { isCompiler: 1, richVersion: "14.00", richOptions: "LTCG/MSIL" }, 0x0083: { isCompiler: 1, richVersion: "15.00", richOptions: "C" }, 0x0084: { isCompiler: 1, richVersion: "15.00", richOptions: "C++" }, 0x0085: { isCompiler: 1, richVersion: "15.00", richOptions: "C/std" }, 0x0086: { isCompiler: 1, richVersion: "15.00", richOptions: "C++/std" }, 0x0087: { isCompiler: 1, richVersion: "15.00", richOptions: "CVTCIL/C" }, 0x0088: { isCompiler: 1, richVersion: "15.00", richOptions: "CVTCIL/C++" }, 0x0089: { isCompiler: 1, richVersion: "15.00", richOptions: "LTCG/C" }, 0x008a: { isCompiler: 1, richVersion: "15.00", richOptions: "LTCG/C++" }, 0x008b: { isCompiler: 1, richVersion: "15.00", richOptions: "LTCG/MSIL" }, 0x008c: { isCompiler: 1, richVersion: "15.00", richOptions: "POGO_I_C" }, 0x008d: { isCompiler: 1, richVersion: "15.00", richOptions: "POGO_I_C" }, 0x008e: { isCompiler: 1, richVersion: "15.00", richOptions: "POGO_O_C" }, 0x008f: { isCompiler: 1, richVersion: "15.00", richOptions: "POGO_O_CPP" }, 0x0091: { isLinker: 1, richVersion: "9.00" }, 0x0095: { isMasm: 1, richVersion: "9.00" }, 0x009d: { isLinker: 1, richVersion: "10.00" }, 0x009e: { isMasm: 1, richVersion: "10.00" }, 0x00aa: { isCompiler: 1, richVersion: "16.00", richOptions: "C" }, 0x00ab: { isCompiler: 1, richVersion: "16.00", richOptions: "C++" }, 0x00ac: { isCompiler: 1, richVersion: "16.00", richOptions: "CVTCIL/C" }, 0x00ad: { isCompiler: 1, richVersion: "16.00", richOptions: "CVTCIL/C++" }, 0x00ae: { isCompiler: 1, richVersion: "16.00", richOptions: "LTCG/C" }, 0x00af: { isCompiler: 1, richVersion: "16.00", richOptions: "LTCG/C++" }, 0x00b0: { isCompiler: 1, richVersion: "16.00", richOptions: "LTCG/MSIL" }, 0x00b1: { isCompiler: 1, richVersion: "16.00", richOptions: "POGO_I_C" }, 0x00b2: { isCompiler: 1, richVersion: "16.00", richOptions: "POGO_I_C" }, 0x00b3: { isCompiler: 1, richVersion: "16.00", richOptions: "POGO_O_C" }, 0x00b4: { isCompiler: 1, richVersion: "16.00", richOptions: "POGO_O_CPP" }, 0x00ba: { isLinker: 1, richVersion: "10.10" }, 0x00bb: { isMasm: 1, richVersion: "10.10" }, 0x00bc: { isCompiler: 1, richVersion: "16.10", richOptions: "C" }, 0x00bd: { isCompiler: 1, richVersion: "16.10", richOptions: "C++" }, 0x00be: { isCompiler: 1, richVersion: "16.10", richOptions: "CVTCIL/C" }, 0x00bf: { isCompiler: 1, richVersion: "16.10", richOptions: "CVTCIL/C++" }, 0x00c0: { isCompiler: 1, richVersion: "16.10", richOptions: "LTCG/C" }, 0x00c1: { isCompiler: 1, richVersion: "16.10", richOptions: "LTCG/C++" }, 0x00c2: { isCompiler: 1, richVersion: "16.10", richOptions: "LTCG/MSIL" }, 0x00c3: { isCompiler: 1, richVersion: "16.10", richOptions: "POGO_I_C" }, 0x00c4: { isCompiler: 1, richVersion: "16.10", richOptions: "POGO_I_C" }, 0x00c5: { isCompiler: 1, richVersion: "16.10", richOptions: "POGO_O_C" }, 0x00c6: { isCompiler: 1, richVersion: "16.10", richOptions: "POGO_O_CPP" }, 0x00cc: { isLinker: 1, richVersion: "11.00" }, 0x00cd: { isMasm: 1, richVersion: "11.00" }, 0x00ce: { isCompiler: 1, richVersion: "17.00", richOptions: "C" }, 0x00cf: { isCompiler: 1, richVersion: "17.00", richOptions: "C++" }, 0x00d0: { isCompiler: 1, richVersion: "17.00", richOptions: "CVTCIL/C" }, 0x00d1: { isCompiler: 1, richVersion: "17.00", richOptions: "CVTCIL/C++" }, 0x00d2: { isCompiler: 1, richVersion: "17.00", richOptions: "LTCG/C" }, 0x00d3: { isCompiler: 1, richVersion: "17.00", richOptions: "LTCG/C++" }, 0x00d4: { isCompiler: 1, richVersion: "17.00", richOptions: "LTCG/MSIL" }, 0x00d5: { isCompiler: 1, richVersion: "17.00", richOptions: "POGO_I_C" }, 0x00d6: { isCompiler: 1, richVersion: "17.00", richOptions: "POGO_I_C" }, 0x00d7: { isCompiler: 1, richVersion: "17.00", richOptions: "POGO_O_C" }, 0x00d8: { isCompiler: 1, richVersion: "17.00", richOptions: "POGO_O_CPP" }, 0x00de: { isLinker: 1, richVersion: "12.00" }, 0x00df: { isMasm: 1, richVersion: "12.00" }, 0x00e0: { isCompiler: 1, richVersion: "18.00", richOptions: "C" }, 0x00e1: { isCompiler: 1, richVersion: "18.00", richOptions: "C++" }, 0x00e2: { isCompiler: 1, richVersion: "18.00", richOptions: "CVTCIL/C" }, 0x00e3: { isCompiler: 1, richVersion: "18.00", richOptions: "CVTCIL/C++" }, 0x00e4: { isCompiler: 1, richVersion: "18.00", richOptions: "LTCG/C" }, 0x00e5: { isCompiler: 1, richVersion: "18.00", richOptions: "LTCG/C++" }, 0x00e6: { isCompiler: 1, richVersion: "18.00", richOptions: "LTCG/MSIL" }, 0x00e7: { isCompiler: 1, richVersion: "18.00", richOptions: "POGO_I_C" }, 0x00e8: { isCompiler: 1, richVersion: "18.00", richOptions: "POGO_I_C" }, 0x00e9: { isCompiler: 1, richVersion: "18.00", richOptions: "POGO_O_C" }, 0x00ea: { isCompiler: 1, richVersion: "18.00", richOptions: "POGO_O_CPP" }, 0x00f0: { isLinker: 1, richVersion: "12.10" }, 0x00f1: { isMasm: 1, richVersion: "12.10" }, 0x00f2: { isCompiler: 1, richVersion: "18.10", richOptions: "C" }, 0x00f3: { isCompiler: 1, richVersion: "18.10", richOptions: "C++" }, 0x00f4: { isCompiler: 1, richVersion: "18.10", richOptions: "CVTCIL/C" }, 0x00f5: { isCompiler: 1, richVersion: "18.10", richOptions: "CVTCIL/C++" }, 0x00f6: { isCompiler: 1, richVersion: "18.10", richOptions: "LTCG/C" }, 0x00f7: { isCompiler: 1, richVersion: "18.10", richOptions: "LTCG/C++" }, 0x00f8: { isCompiler: 1, richVersion: "18.10", richOptions: "LTCG/MSIL" }, 0x00f9: { isCompiler: 1, richVersion: "18.10", richOptions: "POGO_I_C" }, 0x00fa: { isCompiler: 1, richVersion: "18.10", richOptions: "POGO_I_C" }, 0x00fb: { isCompiler: 1, richVersion: "18.10", richOptions: "POGO_O_C" }, 0x00fc: { isCompiler: 1, richVersion: "18.10", richOptions: "POGO_O_CPP" }, 0x0102: { isLinker: 1, richVersion: "14.00" }, 0x0103: { isMasm: 1, richVersion: "14.00" }, 0x0104: { isCompiler: 1, richVersion: "19.00", richOptions: "C" }, 0x0105: { isCompiler: 1, richVersion: "19.00", richOptions: "C++" }, 0x0106: { isCompiler: 1, richVersion: "19.00", richOptions: "CVTCIL/C" }, 0x0107: { isCompiler: 1, richVersion: "19.00", richOptions: "CVTCIL/C++" }, 0x0108: { isCompiler: 1, richVersion: "19.00", richOptions: "LTCG/C" }, 0x0109: { isCompiler: 1, richVersion: "19.00", richOptions: "LTCG/C++" }, 0x010a: { isCompiler: 1, richVersion: "19.00", richOptions: "LTCG/MSIL" }, 0x010b: { isCompiler: 1, richVersion: "19.00", richOptions: "POGO_I_C" }, 0x010c: { isCompiler: 1, richVersion: "19.00", richOptions: "POGO_I_C" }, 0x010d: { isCompiler: 1, richVersion: "19.00", richOptions: "POGO_O_C" }, 0x010e: { isCompiler: 1, richVersion: "19.00", richOptions: "POGO_O_CPP" } }; var richInfo = richIdMap[richId]; if (richInfo) { isLinker = richInfo.isLinker || 0; isCompiler = richInfo.isCompiler || 0; isMasm = richInfo.isMasm || 0; isBasic = richInfo.isBasic || 0; richVersion = richInfo.richVersion || String(); richOptions = richInfo.richOptions || String(); } var formattedVersion = richVersion + "." + PE.getRichVersion(i); if (isLinker && richVersion == "14.00" || isMasm && richVersion == "14.00" || isCompiler && richVersion == "19.00") { var buildNumber = PE.getRichVersion(i); var minorVersion = 0; if (buildNumber > 25000) { if (buildNumber < 25506) minorVersion = 10; else if (buildNumber < 25830) minorVersion = 11; else if (buildNumber < 26128) minorVersion = 12; else if (buildNumber < 26428) minorVersion = 13; else if (buildNumber < 26726) minorVersion = 14; else if (buildNumber < 26926) minorVersion = 15; else if (buildNumber < 27508) minorVersion = 16; else if (buildNumber < 27702) minorVersion = 20; else if (buildNumber < 27905) minorVersion = 21; else if (buildNumber < 28105) minorVersion = 22; else if (buildNumber < 28314) minorVersion = 23; else if (buildNumber < 28610) minorVersion = 24; else if (buildNumber < 28805) minorVersion = 25; else if (buildNumber < 29110) minorVersion = 26; else if (buildNumber < 29333) minorVersion = 27; else if (buildNumber < 30133) minorVersion = 28; else if (buildNumber < 30401) minorVersion = 29; else if (buildNumber < 30818) minorVersion = 30; else if (buildNumber < 31114) minorVersion = 31; else if (buildNumber < 31424) minorVersion = 32; else if (buildNumber < 31721) minorVersion = 33; else if (buildNumber < 32019) minorVersion = 34; else if (buildNumber < 32019) minorVersion = 34; else if (buildNumber < 32323) minorVersion = 35; else if (buildNumber < 32532) minorVersion = 36; // VS 2022 17.6.x else if (buildNumber < 32543) minorVersion = 36; // VS 2022 17.6.x (14.36.32532-14.36.32535) else if (buildNumber < 32822) minorVersion = 36; // VS 2022 17.7.0 (14.36.32543) else if (buildNumber < 33130) minorVersion = 37; // VS 2022 17.7.x else if (buildNumber < 33520) minorVersion = 38; // VS 2022 17.8.0 (14.38.33135) else if (buildNumber < 33811) minorVersion = 39; // VS 2022 17.9.x (14.39.33520-14.39.33523) else if (buildNumber < 34120) minorVersion = 40; // VS 2022 17.10.x (14.40.33811-14.40.33818) else if (buildNumber < 34436) minorVersion = 41; // VS 2022 17.11.0 (14.41.34120) else if (buildNumber < 34808) minorVersion = 42; // VS 2022 17.12.4 (14.42.34436) else if (buildNumber < 35000) minorVersion = 43; // VS 2022 17.13.x (14.43.34808-14.43.34810) else if (buildNumber < 35224) minorVersion = 44; // VS 2022 17.14.x (14.44.35207-14.44.35223) else if (buildNumber < 36000) minorVersion = 50; // VS 2026 18.0.x-18.3.x (14.50.35503-14.50.35724) else if (buildNumber < 37000) minorVersion = 51; // VS 2026 18.0.4 (14.51.36014) else minorVersion = 51; // Future versions } if (minorVersion) { if (isLinker || isMasm) { formattedVersion = "14." + minorVersion + "." + buildNumber; } else if (isCompiler) { formattedVersion = "19." + minorVersion + "." + buildNumber; } } } if (isLinker) { if (formattedVersion > richLinkerVersion) { richLinkerName = "Microsoft Linker"; richLinkerVersion = formattedVersion; richLinkerOptions = richOptions; } } else if (isCompiler) { if (formattedVersion > richCppCompilerVersion) { richCppCompilerName = "Microsoft Visual C/C++"; richCppCompilerVersion = formattedVersion; richCppCompilerOptions = richOptions; } } else if (isMasm) { if (formattedVersion > richMasmCompilerVersion) { richMasmCompilerName = "MASM"; richMasmCompilerVersion = formattedVersion; richMasmCompilerOptions = richOptions; } } else if (isBasic) { if (formattedVersion > richVbCompilerVersion) { richVbCompilerName = "Visual Basic"; richVbCompilerVersion = formattedVersion; richVbCompilerOptions = richOptions; } } } } if (richLinkerName) { linkerName = richLinkerName; linkerVersion = richLinkerVersion; linkerOptions = richLinkerOptions; } if (richVbCompilerName) { vbCompilerName = richVbCompilerName; vbCompilerVersion = richVbCompilerVersion; vbCompilerOptions = richVbCompilerOptions; } else if (richCppCompilerName) { cppCompilerName = richCppCompilerName; cppCompilerVersion = richCppCompilerVersion; cppCompilerOptions = richCppCompilerOptions; } else if (richMasmCompilerName) { masmCompilerName = richMasmCompilerName; masmCompilerVersion = richMasmCompilerVersion; masmCompilerOptions = richMasmCompilerOptions; } if (PE.isDeepScan()) { if (richCppCompilerName == String()) { if (PE.section.length >= 3) { var msVisualCrtPattern = "'Microsoft Visual C++ Runtime Library'" if (PE.isSignatureInSectionPresent(0, msVisualCrtPattern) || PE.isSignatureInSectionPresent(1, msVisualCrtPattern) || PE.isSignatureInSectionPresent(2, msVisualCrtPattern)) { cppCompilerName = "Microsoft Visual C/C++"; } } } } if (PE.isVerbose()) { if (richCppCompilerName == String()) { if (PE.isLibraryPresent("msvcrt.dll")) { var nMajorLinkerVersion = PE.getMajorLinkerVersion(), nMinorLinkerVersion = PE.getMinorLinkerVersion(); if (nMajorLinkerVersion >= 3 && nMajorLinkerVersion <= 14 && nMinorLinkerVersion < 40) { cppCompilerName = "Microsoft Visual C/C++"; } } } } if (PE.isVerbose()) { if (mfcLibraryName) { if (cppCompilerName == String()) { cppCompilerName = "Microsoft Visual C/C++"; // TODO Version } if (linkerName == String()) { linkerName = "Microsoft Linker"; // TODO Version } } if (cppCompilerName || richVbCompilerName || masmCompilerName) { if (linkerName == String()) { var nMajorLinkerVersion = PE.getMajorLinkerVersion(), nMinorLinkerVersion = PE.getMinorLinkerVersion(); if (nMajorLinkerVersion >= 3 && nMajorLinkerVersion <= 14 && nMinorLinkerVersion < 40) { linkerName = "Microsoft Linker"; } } } } if (linkerName) { if (linkerVersion == String()) { var nMajorLinkerVersion = PE.getMajorLinkerVersion(), nMinorLinkerVersion = PE.getMinorLinkerVersion(); if (nMajorLinkerVersion >= 3 && nMajorLinkerVersion <= 14 && nMinorLinkerVersion < 40) { linkerVersion = PE.getCompilerVersion(); } } } if (cppCompilerName && linkerName) { var linkerMajorVersion = linkerVersion.match(/\d+\.\d+/gm); if (linkerMajorVersion) { toolName = "Microsoft Visual Studio"; var vsVersionMap = { "6.00": "6.0", "7.00": "2002", "7.10": "2003", "8.00": "2005", "9.00": "2008", "10.00": "2010", "11.00": "2012", "12.00": "2013", "14.00": "2015", "14.10": "2017, 15.0-15.2", "14.11": "2017, 15.3", "14.12": "2017, 15.5", "14.13": "2017, 15.6", "14.14": "2017, 15.7", "14.15": "2017, 15.8", "14.16": "2017, 15.9", "14.20": "2019, 16.0", "14.21": "2019, 16.1", "14.22": "2019, 16.2", "14.23": "2019, 16.3", "14.24": "2019, 16.4", "14.25": "2019, 16.5", "14.26": "2019, 16.6", "14.27": "2019, 16.7-16.8", "14.28": "2019, 16.9-16.10", "14.29": "2019, 16.11", "14.30": "2022, 17.0", "14.31": "2022, 17.1", "14.32": "2022, 17.2", "14.33": "2022, 17.3", "14.34": "2022, 17.4", "14.35": "2022, 17.5", "14.36": "2022, 17.6", "14.37": "2022, 17.7", "14.38": "2022, 17.8", "14.39": "2022, 17.9.1", "14.40": "2022, 17.10", "14.41": "2022, 17.11", "14.42": "2022, 17.12", "14.43": "2022, 17.13", "14.44": "2022, 17.14", "14.50": "2026, 18.0-18.3", "14.51": "2026, 18.4" }; toolVersion = vsVersionMap[linkerMajorVersion] || ""; } } if (masmCompilerVersion == "6.14.8444" && linkerVersion == "5.12.8078") { toolName = "MASM32"; toolVersion = "8-11"; } if (vbCompilerName) { _setLang("VB" + (vbCompilerName.indexOf(".NET") !== -1 ? ".NET" : "")); _setResult("compiler", vbCompilerName, vbCompilerVersion, vbCompilerOptions); } else if (cppCompilerName) { if (!_isResultPresent("compiler", "Rust")) { // check is Rust detected if (cppCompilerOptions.indexOf("C++") !== -1 || cppCompilerOptions.indexOf("CPP") !== -1) { _setLang("C++"); } else if (cppCompilerOptions == "C" || cppCompilerOptions.indexOf("/C") !== -1 || cppCompilerOptions.indexOf("_C") !== -1) { _setLang("C"); } else { _setLang("C/C++"); } } // if not detected if (!_isResultPresent("compiler", cppCompilerName)) _setResult("compiler", cppCompilerName, cppCompilerVersion, cppCompilerOptions); } else if (masmCompilerName) { _setLang("ASMx" + (PE.is64() ? "64" : "86")); _setResult("compiler", masmCompilerName, masmCompilerVersion, masmCompilerOptions); } if (dotNetLibraryName) { if (PE.isNetObjectPresent("FSharp.Core")) _setLang("F#"); if (!_isLangDetected()) _setLang("MSIL/C#"); _setResult("library", dotNetLibraryName, dotNetLibraryVersion, dotNetLibraryOptions); } if (mfcLibraryName) { _setResult("library", mfcLibraryName, mfcLibraryVersion, mfcLibraryOptions); } if (linkerName && _getNumberOfResults("linker") < 1) { _setResult("linker", linkerName, linkerVersion, linkerOptions); } if (toolName && toolVersion) { _setResult("tool", toolName, toolVersion, toolOptions); } } function getVbOptions() { var result = String(); // Check if sections exist before accessing section[0] if (PE.getNumberOfSections() === 0) { return result; } var firstSection = PE.section[0]; var vbSignatureOffset = PE.findDword(firstSection.FileOffset, firstSection.FileSize, 0x21354256); if (vbSignatureOffset === -1) { vbSignatureOffset = PE.findDword(firstSection.FileOffset, firstSection.FileSize, 0x21364256); } if (vbSignatureOffset !== -1) { var virtualAddress = PE.readDword(vbSignatureOffset + 0x30), fileOffset = PE.VAToOffset(virtualAddress); if (fileOffset !== -1) { result = (PE.readDword(fileOffset + 0x20) === 0) ? "P-Code" : "Native"; } } return result; } ================================================ FILE: db/PE/Microsoft_Class_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Microsoft Class Installer for Java"); function detect() { if (PE.compareEP("64A1........558BEC6A..68........68........50648925........83EC..5356578965..FF15")) { for (var i = 0; i < PE.resource.length && !bDetected; i++) { if (PE.resource[i].Type == 280) { // ZIP if (PE.compare("'PK'0304", PE.resource[i].Offset)) { sVersion = "4.X"; sOptions = "zip"; bDetected = true; } } } } return result(); } ================================================ FILE: db/PE/Microsoft_Compound-based_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Microsoft Compound-based installer (MSI)"); function detect() { if (PE.compareEP("558becb9........6a..6a..4975..51535657b8........e8........33c05568........64ff3064892033c05568") && PE.compareOverlay("d0cf11e0a1b11ae1")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/Microsoft_Help.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "Microsoft Help (compiled) (.hxs)"); function detect() { if (PE.isSectionNamePresent(".its")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/Microsoft_JScript.6.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "JScript"); function detect() { if (PE.isNetObjectPresent("Microsoft.JScript.Vsa")) { bDetected = true; } sLang = "JavaScript"; return result(); } ================================================ FILE: db/PE/_FixDetects.9.sg ================================================ // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev function detect() { removeFalsePositive({ falsePositive: { packer: "AHpacker" }, ifPresents: { packer: "ExE Pack" } }); removeFalsePositive({ falsePositive: { linker: "Turbo Linker" }, ifPresents: { linker: "Microsoft Linker" } }); removeFalsePositive({ falsePositive: { tool: "Borland Delphi" }, ifPresents: { tool: "Microsoft Linker" } }); removeFalsePositive({ falsePositive: { compiler: "FASM", language: "ASMx86" }, ifPresents: { packer: "Simple Pack" } }); // Number of "compiler" more than 1? Remove Visual C++. if (_isResultPresent("compiler", "Microsoft Visual C/C++") && _getNumberOfResults("compiler") > 1) { _removeResult("compiler", "Microsoft Visual C/C++"); if (_getNumberOfResults("language") > 1 && _isLangPresent("C/C++")) { _removeResult("language", "C/C++"); } } // Visual Studio? -> C# if (_isLangPresent("MSIL/C#") && _isResultPresent("tool", "Microsoft Visual Studio")) { _removeResult("language", "MSIL/C#"); _setLang("C#"); } } function removeFalsePositive(data) { var falsePositive = data.falsePositive, ifPresents = data.ifPresents; var falsePositiveKey = String(), falsePositiveValue = String(); for (var key in falsePositive) { if (falsePositive.hasOwnProperty(key)) { falsePositiveKey = key; falsePositiveValue = falsePositive[key]; break; } } var ifPresentsKey = String(), ifPresentsValue = String(); for (var key in ifPresents) { if (ifPresents.hasOwnProperty(key)) { ifPresentsKey = key; ifPresentsValue = ifPresents[key]; break; } } if (_isResultPresent(falsePositiveKey, falsePositiveValue) && _isResultPresent(ifPresentsKey, ifPresentsValue)) { _removeResult(falsePositiveKey, falsePositiveValue); } } ================================================ FILE: db/PE/_NetCompilersLibs.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev function detect() { // https://github.com/0xd4d/dnlib if (PE.isNetObjectPresent("dnlib") && PE.isNetObjectPresent("ModuleDef")) _setResult("library", "dnlib", "", ""); // https://www.mono-project.com/docs/tools+libraries/libraries/Mono.Cecil/ if (PE.isNetObjectPresent("Mono.Cecil")) _setResult("library", "Mono.Cecil", "", ""); // https://github.com/Washi1337/AsmResolver if (PE.isNetObjectPresent("AsmResolver")) _setResult("library", "AsmResolver", "", ""); // https://learn.microsoft.com/en-us/dotnet/framework/reflection-and-codedom/using-the-codedom if (PE.isNetObjectPresent("System.CodeDom.Compiler")) { // Standard .NET library var languages = ""; if (PE.isNetObjectPresent("CSharpCodeProvider")) languages = "C#"; if (PE.isNetObjectPresent("VBCodeProvider")) languages += (languages ? " + " : "") + "VB.NET"; if (PE.isNetObjectPresent("JScriptCodeProvider")) // Should check the relation to System.CodeDom...... languages += (languages ? " + " : "") + "JScript"; if (languages) { _setResult("library", "CodeDom Compiler", "", languages); } } } ================================================ FILE: db/PE/_PE.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("operation system", "Windows"); function detect() { if (PE.isVerbose()) { sName = PE.getOperationSystemName(); sOptions = PE.getOperationSystemOptions(); bDetected = true; var rossymSection = PE.section[".rossym"]; if (rossymSection && rossymSection.Characteristics == 0x42000802) { sVersion = "React OS, 0.3+"; } else { sVersion = PE.getOperationSystemVersion(); } } return result(); } ================================================ FILE: db/PE/__GenericHeuristicAnalysis_By_DosX.7.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq /* ██████╗ ███████╗███╗ ██╗███████╗██████╗ ██╗ ██████╗ ██╔════╝ ██╔════╝████╗ ██║██╔════╝██╔══██╗██║██╔════╝ ██║ ███╗█████╗ ██╔██╗ ██║█████╗ ██████╔╝██║██║ ██║ ██║██╔══╝ ██║╚██╗██║██╔══╝ ██╔══██╗██║██║ ╚██████╔╝███████╗██║ ╚████║███████╗██║ ██║██║╚██████╗ ╚═════╝ ╚══════╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ██╗ ██╗ ██╗███████╗██╗ ██╗██████╗ ██╗███████╗████████╗██╗ ██████╗ ██╗ ██╔╝ ██║ ██║██╔════╝██║ ██║██╔══██╗██║██╔════╝╚══██╔══╝██║██╔════╝ ╚██╗ ██╔╝ ███████║█████╗ ██║ ██║██████╔╝██║███████╗ ██║ ██║██║ ╚██╗ ╚██╗ ██╔══██║██╔══╝ ██║ ██║██╔══██╗██║╚════██║ ██║ ██║██║ ██╔╝ ╚██╗ ██║ ██║███████╗╚██████╔╝██║ ██║██║███████║ ██║ ██║╚██████╗ ██╔╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ █████╗ ███╗ ██╗ █████╗ ██╗ ██╗ ██╗███████╗██╗███████╗ ██╔══██╗████╗ ██║██╔══██╗██║ ╚██╗ ██╔╝██╔════╝██║██╔════╝ ███████║██╔██╗ ██║███████║██║ ╚████╔╝ ███████╗██║███████╗ ██╔══██║██║╚██╗██║██╔══██║██║ ╚██╔╝ ╚════██║██║╚════██║ ██║ ██║██║ ╚████║██║ ██║███████╗██║ ███████║██║███████║ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝╚═╝ ╚══════╝╚═╝╚══════╝ */ // ┌──────────────────────────┤ ABOUT ├──────────────────────────┐ // │ This heuristic analysis helps detect the presence of │ // │ obfuscation, packers, licensing systems, debugging │ // │ information, file integrity issues, or even potential │ // │ malicious code using advanced and complex checks. It │ // │ includes pinpoint scanning, intelligent inspections, │ // │ signature-based analysis, thorough file content │ // │ evaluation, and much more! >:) │ // │ │ // │ Supported archictures: │ // │ 1. I386 (x86_32) 2. AMD64 (x86_64) │ // │ 3. ARM 4. ARM THUMB │ // │ 5. ARMNT (ARMv7) │ // │ │ // └─────────────────────────────────────────────────────────────┘ // ┌─────────────────────────┤ CONTACTS ├────────────────────────┐ // │ ┌ Author is DosX │ // │ └┬─ E-Mail: collab@kay-software.ru │ // │ ├─ GitHub: https://github.com/DosX-dev │ // │ └─ Telegram: @DosX_dev │ // ├─────────────────────────────────────────────────────────────┤ // │ If I don't respond to email, message to Telegram │ // └─────────────────────────────────────────────────────────────┘ // ┌──────────────────────────┤ DONATE ├─────────────────────────┐ // │ ┌ Did you like my work? Thank you! What about donation? │ // │ │ This will greatly help the development! │ // │ └─┐ │ // │ ├─ BTC: bc1qclzlujunh8zyyxaar8y8t0chwfardesq9uvphh │ // │ │ │ // │ ├─ SOL: 6693kpkspRU2fauVpMkVznnETGX7GdMsLFQED6QFfaWa │ // │ │ │ // │ ├─ TRX: TYezKdq5YkrSmmUy6d9e212KcHxQigtTqJ │ // │ │ │ // │ ├─ ETH: 0xd5f1e450a4A9325165ed6b5ed5E28Da882AB932a │ // │ │ ERC-20 ─┘ │ // │ │ │ // │ └─ USDT: TYezKdq5YkrSmmUy6d9e212KcHxQigtTqJ │ // │ TRC-20 ─┘ │ // └─────────────────────────────────────────────────────────────┘ // ┌───────────────────────────────────────────────┐ // │ For the module to work correctly, official │ // │ Detect It Easy components are recommended │ // ├───────────────────────────────────────────────┘ // └─┐ // └── Please don't read the code out loud // unless you have exorcism skills "use strict"; const PE_Cached = {}, // PE-related cache-map logType = { warning: -2, // Service warnings about: -1, // Information about a module nothing: 0, // General information about the scanning process any: 1, // Native and .NET net: 2 // .NET only }, heurLabel = "HEUR"; var lastOffsetDetected = "0x00"; function detect() { if (stubForWrongEnvironment()) return null; // 'PE' is undefined if (stubForLegacyEngines()) return null; // old DIE version return main(); } function main() { initializeCache(); if (PE.isHeuristicScan()) { if (!PE.isVerbose()) { log(logType.warning, "To get the full heuristic scan result use \"--verbose\""); } log(logType.about, "Generic Heuristic Analysis by DosX (@DosX_dev)"); log(logType.nothing, "Scanning has begun!"); if (PE_Cached.isDotNet) { // Detection obfuscation and anti-analysis techniques specific to .NET scanForObfuscations_NET(); scanForAntiAnalysis_NET(); } else { // Detection of anomalies specific to Native scanForObfuscations_Native(); } // Detection of anomalies most commonly found in packers, cryptors, protectors... scanForPackersAndCryptors_NET_and_Native(); // Detection licensing information (detecting possible DRM systems or licensing strings) scanForLicensingSystems_NET_and_Native(); // A cursory checks of the file format integrity scanForBadFileFormat_NET_and_Native(); // Detection of debug information (headers, sections, strings...) scanForDebugData_NET_and_Native(); // Detection for suspicious or potentially malicious patterns scanForMaliciousCode_NET_and_Native(); if (PE.isVerbose()) { // Detection of programming language, compiler, linker scanForLanguagesAndCompilers_NET_and_Native(); // Detection of specific markers and pointers that are read by the operating system scanForInterestingMarkers_NET_and_Native(); } // >> Happy end << log(logType.nothing, "Scan completed."); } else { log(logType.warning, "Heuristic scan is disabled. Use '--heuristicscan' to enable"); } unloadCache(); } function stubForLegacyEngines() { if (typeof PE.getNetAssemblyName === "undefined") { stdout(">>> Update DIE Engine to 3.20 and higher for using Heuristic-analyzer by DosX <<<"); debugger; return true; } return false; } function stubForWrongEnvironment() { if (typeof PE === "undefined") { stdout(">>> Wrong environment! 'PE' is undefined. Check DIE-engine for correct installation <<<"); debugger; return true; } if (PE.isHeuristicScan() && PE.isVerbose() && !_getNumberOfResults("operation system")) { stdout(">>> Script is running outside the environment! Are you in debug mode? <<<"); debugger; } return false; } /** * Outputs a warning message to the appropriate output stream. * * Depending on the environment, this function will: * - Use `console.warn` if `console` is available. * - Use `_setResult` if `File` is available. * - Use `_error` if it is defined as a function. * - Throw an error if none of the above conditions are met. * * @param {string} stringToOut - The warning message to output. * @returns {void} No return value; */ function stdout(stringToOut) { if (typeof console === "object") { console.warn(stringToOut); } else if (typeof File === "object") { _setResult("~warning", stringToOut, String(), String()); } else { if (typeof _error === "function") { _error(stringToOut); } else { throw stringToOut; } } } /** * Initialize the PE-related cache by reading values from the PE API and storing them * into the global PE_Cached object. * * The function constructs a temporary map containing typed entries sourced from the PE * interface, then copies each entry into PE_Cached. * * Side effects: * - Mutates the global PE_Cached object by adding/updating the keys listed above. * * @function initializeCache * @returns {void} No return value; updates PE_Cached as a side effect. */ function initializeCache() { var cacheMap = { /* Local functions */ /* Boolean */ isArchX86: isArchX86, /* Boolean */ isCppClrLikeApp: isCppClrLikeApp, /* Boolean */ isVbNetStandardLibraryPresent: isVbNetStandardLibraryPresent, /* Boolean */ isJscriptNetStandardLibraryPresent: isJscriptNetStandardLibraryPresent, /* String */ firstEpAsmInstruction: getFirstEpAsmInstruction, /* Native functions */ /* Boolean */ is64bit: PE["is64"], /* Boolean */ isDotNet: PE["isNet"], /* Boolean */ isDynamicLinkLibrary: PE["isDll"], /* Boolean */ isNetGlobalCctorPresent: PE["isNetGlobalCctorPresent"], /* Boolean */ isRichSignaturePresent: PE["isRichSignaturePresent"], /* Number */ numberOfSections: PE["getNumberOfSections"], /* Number */ numberOfRichIDs: PE["getNumberOfRichIDs"], /* Number */ numberOfUnmanagedResources: PE["getNumberOfResources"], /* Number */ numberOfUnmanagedImports: PE["getNumberOfImports"], /* Number */ numberOfUnmanagedExports: PE["getNumberOfExports"], /* Number */ indexOfImportsSection: PE["getImportSection"], /* Number */ indexOfExportsSection: PE["getExportSection"], /* String */ nameOfNetAssemblyName: PE["getNetAssemblyName"], /* String */ nameOfNetModuleName: PE["getNetModuleName"] }; for (var key in cacheMap) { const functionBody = cacheMap[key]; if (functionBody) { PE_Cached[key] = functionBody(); } else { stdout(">>> PE API function '" + key + "' is undefined! <<<"); debugger; } } } /** * Clears the PE cache by setting it to undefined. * * @function unloadCache * @returns {void} No return value; sets PE_Cached to undefined. */ function unloadCache() { PE_Cached = undefined; } // #region "obfuscations (.NET)" function scanForObfuscations_NET() { log(logType.nothing, "Scanning for obfuscation..."); var options = String(); var isDetected = Boolean(); // Is managed entry point modified? Let's check it using default .NET EP names var isEntryPointModified = false; const vbNetEntries = [ "Main", "main", "MAIN", "MyApplication" ], defaultEntries = [ // like MSIL, C#, C++ NET etc "Main", "main", // F# entry "main@", // F# entry "
$", // For programs with top-level operators (C#) "mainCRTStartup", // C++ CLR .NET (CLI) "wWinMainCRTStartup", // C++ CLR .NET (GUI) "_WinMainCRTStartup" ] if (!PE_Cached.isDynamicLinkLibrary) { if (PE_Cached.isVbNetStandardLibraryPresent) { if (isAllNetReferencesMissing(vbNetEntries)) { isEntryPointModified = true; } } else if (isAllNetReferencesMissing(defaultEntries)) { isEntryPointModified = true; } if (isEntryPointModified) { log(logType.net, "No \"Main\" method found"); } } if (isEntryPointModified) options = "Modified managed EP"; // .cctor can execute code before the Main method is called var isNetCctorPresent = false; if (PE_Cached.isNetGlobalCctorPresent && !PE_Cached.isCppClrLikeApp && !isUnpackagedWindowsAppSdkLinked()) { log(logType.net, "Global constructor detected!"); isNetCctorPresent = true; } if (isNetCctorPresent) options = addOption(options, "CLR constructor"); // If .NET meta headers are not present in the default .NET section, then the file is mutant var isStrangeEpPosition = false; const netMetaHeaders = [ "~", "Strings", "US", "GUID", "Blob" ]; // Specify the default .NET section index const defaultNetSection = 0; // Check conditions for a strange entry point position (not for CLR apps) if (!PE_Cached.isDynamicLinkLibrary && PE_Cached.numberOfSections > 1 && !PE_Cached.isCppClrLikeApp) { // Iterate through .NET metadata headers for (var s = 0; s < netMetaHeaders.length; s++) { const headerName = netMetaHeaders[s]; // Check if the signature is not present in the default .NET section if (!PE.isSignatureInSectionPresent(defaultNetSection, "00'#" + headerName + "'00")) { isStrangeEpPosition = true; break; } } } if (isStrangeEpPosition) options = addOption(options, "Strange EP position"); // .NET files has a specific pattern of the entry point var isNativeEntryPointModified = false; if (!PE_Cached.isDynamicLinkLibrary && !PE_Cached.isCppClrLikeApp) { // not for CLR apps if (!PE_Cached.is64bit && PE_Cached.isArchX86) { // FF2500????00: jmp dword ptr [ ... ] const firstOpCode = getFirstEpAsmOpCode(); if (firstOpCode !== "JMP") { if (PE.VAToOffset(PE.getAddressOfEntryPoint()) !== -1) { log(logType.net, "Very strange EP pattern: " + getEpAsmPattern(true, 4).split("|").join(" .. ")); } else { log(logType.net, "No native entry point"); } isNativeEntryPointModified = true; } } else { // AMD64 if (PE.VAToOffset(PE.getAddressOfEntryPoint()) !== 0x00) { isNativeEntryPointModified = true; } } } if (isNativeEntryPointModified) options = addOption(options, "Modified native EP"); // Check if the specified DOS message is not found in the DOS stub var isDosMessageModified = false; if (PE.findSignature(PE.getDosStubOffset(), PE.getDosStubSize(), "'This program cannot be run in DOS mode.'") === -1) { log(logType.net, "DOS-stub modified!"); isDosMessageModified = true; } if (isDosMessageModified) options = addOption(options, "Modified DOS"); // PE file must contain at least two sections: one for code and one for resources. var isOneSectionFile = false; if (PE_Cached.numberOfSections === 1) { log(logType.net, "Only one section found!"); isOneSectionFile = true; } if (isOneSectionFile) options = addOption(options, "Only one section"); // Check for strange sections var isStrangeSectionsPresent = false; const badChars = '_-=+~!@#$%^&*()"№;%:?*():;,/\\|\'`<>.0123456789'; // Very very bad! if (PE_Cached.numberOfSections > (!PE_Cached.isCppClrLikeApp ? 6 : 10) || !PE.section[".text"]) { isStrangeSectionsPresent = true; } else { // Iterate through each section for (var i = 0; i < PE_Cached.numberOfSections && !isStrangeSectionsPresent; i++) { const sectionName = PE.getSectionName(i); // Check if the first character is not "." and the length of name is less than 3 if (sectionName[0] !== "." && sectionName.length < 3) { isStrangeSectionsPresent = true; break; } // Iterate through characters after "." // Check if the character is in the badChars list for (var d = 0; d < badChars.length && !isStrangeSectionsPresent; d++) { if (sectionName.substr(1, sectionName.length).indexOf(badChars[d]) !== -1) { isStrangeSectionsPresent = true; } } if (!isAsciiString(sectionName) && !isStrangeSectionsPresent) { isStrangeSectionsPresent = true; } } } if (isStrangeSectionsPresent) options = addOption(options, "Strange sections"); // Check for strange resources var isStrangeUnmanagedResourcesPresent = false; for (var i = 0; i < PE_Cached.numberOfUnmanagedResources && !isStrangeUnmanagedResourcesPresent; i++) { const unmanagedResourceName = PE.getResourceNameByNumber(i); if (unmanagedResourceName && (!isAsciiString(unmanagedResourceName) || isNameObfuscated(unmanagedResourceName))) { log(logType.net, "Strange unmanaged resource name: " + unmanagedResourceName); isStrangeUnmanagedResourcesPresent = true; } } if (isStrangeUnmanagedResourcesPresent) options = addOption(options, "Strange unmanaged resources"); // Check for a lot of sections (more than 10 -> this is a lot for .NET) var tooManySectionsPresent = false; if (PE_Cached.numberOfSections > 10) { tooManySectionsPresent = true; } if (tooManySectionsPresent) options = addOption(options, "Too many sections"); const opCodes = new NetOpCodes(); // A popular way to obfuscate numbers/booleans var isIntConfusionPresent = false; const intConfusionXorPattern = opCodes.ldc_i4 + opCodes.ldc_i4 + opCodes.xor + opCodes.ldc_i4; if (validateNetByteCode(intConfusionXorPattern)) { if (validateNetByteCode( // samples by: Inx Obfuscator intConfusionXorPattern + (opCodes.setStrict(opCodes.bne_un_s, "09") + opCodes.ldc_i4_2 + opCodes.stloc_0 + opCodes.sizeof + opCodes.add) ) || validateNetByteCode( // samples by: MindLated, NetShield intConfusionXorPattern + (opCodes.bne_un + opCodes.ldc_i4 + opCodes.stloc + opCodes.sizeof + opCodes.add) ) || validateNetByteCode( // samples by: VavilonProtect intConfusionXorPattern + (opCodes.bne_un + opCodes.ldc_i4_2 + opCodes.stloc_s + opCodes.sizeof + opCodes.add) ) ) { log(logType.net, "Int confusion detected! Offset: " + lastOffsetDetected); isIntConfusionPresent = true; } } if (isIntConfusionPresent) options = addOption(options, "Int confusion"); // Virtualization is a method of protection in which some code segments are rewritten into instructions inherent in the built-in virtual machine and executed by it var isVirtualizationPresent = false; if ( isAllNetReferencesPresent( [ "System.Reflection", // System.Reflection.dll "GetILGenerator", // MSIL: 'System.Reflection.Emit.DynamicMethod::GetILGenerator()' "BeginInvoke", "EndInvoke", "OpCode" // MSIL: 'System.Reflection.Emit.OpCode' ] ) && ( validateNetObject("Ldarg_0") || // MSIL: 'System.Reflection.Emit.OpCodes.Ldarg_0' validateNetObject("CreateDelegate") // MSIL: 'System.Delegate.CreateDelegate' ) && !isFrameworkComponent() ) { log(logType.net, "Virtualization-like behavior detected!"); isVirtualizationPresent = true; } if (isVirtualizationPresent) options = addOption(options, "Virtualization"); // Hiding calls using delegate tricks var callsEncrypt = false; if ( isAllNetReferencesPresent( [ "GetTypeFromHandle", // MSIL: 'System.Type::GetTypeFromHandle( ... )' "BinaryReader", // MSIL: 'System.IO.BinaryReader' "CreateDelegate", // MSIL: '[Delegate].CreateDelegate' "MakeByRefType", // MSIL: 'System.Type::MakeByRefType()' "DynamicMethod" // MSIL: 'System.Reflection.Emit.DynamicMethod' ] ) && !isFrameworkComponent() ) { callsEncrypt = true; } if (callsEncrypt) options = addOption(options, "Calls encrypt"); // https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.suppressildasmattribute var isAntiIldasmPresent = false; if (validateNetObject("SuppressIldasmAttribute")) { isAntiIldasmPresent = true; } if (isAntiIldasmPresent) options = addOption(options, "Anti-ILDASM"); // Anti de4dot via inheritance var isAntiDe4dotPresent = false; if ( validateSignature("'Form'******00'Form'******00'Form'******00") || // samples by: NetShield validateNetObject("Form0") // samples by: MindLated ) { log(logType.net, "File may be protected by de4dot!"); isAntiDe4dotPresent = true; } if (isAntiDe4dotPresent) options = addOption(options, "Anti-de4dot"); // An obfuscation method in which calli is used instead of regular calls var isCalliInvokesPresent = false; if (validateNetByteCode( // samples by: MindLated opCodes.setStrict(opCodes.ldftn, "** ?? 00 0A") + opCodes.setStrict(opCodes.calli, "** 00 00 11") ) || validateNetByteCode( // samples by: ArmDot, DarksProtector opCodes.ldelem_i + opCodes.setStrict(opCodes.calli, "** 00 00 11") )) { log(logType.net, "Calli invokes detected! Offset: " + lastOffsetDetected); isCalliInvokesPresent = true; } if (isCalliInvokesPresent) options = addOption(options, "Calli invokes"); // An obfuscation method that uses ldftn to create pointers to methods, which are then used in the code var isLdftnPointersPresent = false; if (validateNetByteCode( opCodes.nop + opCodes.setStrict(opCodes.ldftn, "** 00 00 06") + opCodes.stelem_i ) || validateNetByteCode( opCodes.nop + opCodes.setStrict(opCodes.ldftn, "** 00 00 0A") + opCodes.stelem_i ) || validateNetByteCode( // samples by: Quantum (private) opCodes.setStrict(opCodes.ldftn, "** 00 00 0A") + opCodes.setStrict(opCodes.calli, "** 00 00 11") )) { log(logType.net, "Ldftn pointers method-obfuscation detected! Offset: " + lastOffsetDetected); isLdftnPointersPresent = true; } if (isLdftnPointersPresent) options = addOption(options, "Ldftn pointers"); // Turns the code into spaghetti by splitting it into blocks that it executes depending on the situation var isCtrlFlowPresent = false; if ( validateNetByteCode( // samples by: ConfuserEx opCodes.nop + opCodes.ldloc_0 + opCodes.ldc_i4 + opCodes.mul + opCodes.ldc_i4 + opCodes.xor + opCodes.br_s + opCodes.nop + opCodes.ldloc_0 + opCodes.ldc_i4 + opCodes.mul + opCodes.ldc_i4 + opCodes.xor + opCodes.br_s ) || validateNetByteCode( // samples by: ConfuserEx (neo mod) opCodes.ldc_i4 + opCodes.ldc_i4 + opCodes.xor + opCodes.dup + opCodes.stloc_0 + opCodes.ldc_i4_3 + opCodes.rem_un + opCodes.switch__nobody ) || validateNetByteCode( // samples by: .NET Reactor (v6.9.8) opCodes.setStrict(opCodes.ldc_i4, "00 00 00 00") + opCodes.br + opCodes.br + opCodes.ldloc ) || validateNetByteCode( // samples by: .NET Reactor opCodes.ldsfld + opCodes.brfalse + opCodes.pop + opCodes.setStrict(opCodes.ldc_i4, "01 00 00 00") + // MSIL: 'ldc.4 1' opCodes.br + opCodes.nop ) || validateNetByteCode( // samples by: .NET Reactor opCodes.setNullValue(opCodes.ldc_i4) + opCodes.ldsfld + opCodes.brtrue + opCodes.pop + opCodes.ldc_i4 + opCodes.br ) || validateNetByteCode( // samples by: .NET Reactor (legacy~~) opCodes.stloc + opCodes.ldloc + opCodes.joinNoBodyAndValue(opCodes.switch__nobody, "** ** ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 00 00", "switch__nobody") + opCodes.ldc_i4 + opCodes.br ) || validateNetByteCode( // Crypto Obfuscator opCodes.ldc_i4_3 + opCodes.joinNoBodyAndValue(opCodes.switch__nobody, "01 00 00 00 F6 FF FF FF") + opCodes.ldc_i4_1 + opCodes.brtrue_s + opCodes.ldtoken + opCodes.pop ) || validateNetByteCode( // samples by: MindLated, NetShield opCodes.setNullValue(opCodes.ldc_i4) + // MSIL: 'ldc.i4 0' opCodes.stloc + opCodes.br + opCodes.nop + opCodes.ldloc + opCodes.setStrict(opCodes.ldc_i4, "01 00 00 00") + // MSIL: 'ldc.i4 1' opCodes.ceq + opCodes.brfalse ) || validateNetByteCode( // samples by: Rose Obfuscator opCodes.setNullValue(opCodes.ldc_i4) + // MSIL: 'ldc.i4 0' opCodes.stloc + opCodes.br + opCodes.nop + opCodes.ldloc + opCodes.ldc_i4 + opCodes.ceq + opCodes.brfalse ) || validateNetByteCode( // samples by: Smart Assembly opCodes.ldc_i4 + opCodes.br + opCodes.ldloc_s + opCodes.ldc_i4_s + opCodes.ldc_i4_0 + opCodes.stelem_i1 + opCodes.ldc_i4 + opCodes.br ) || validateNetByteCode( // samples by: ConfuserEx (Beds mod) opCodes.ldc_i4 + opCodes.ldc_i4 + opCodes._unknown + opCodes.ldc_i4 + opCodes._unknown + opCodes.stloc_0 + opCodes.nop + opCodes.ldloc_0 + opCodes.ldc_i4 + opCodes.ldc_i4 + opCodes._unknown + opCodes.ldc_i4 + opCodes._unknown + opCodes.ceq + opCodes.brfalse_s ) || validateNetByteCode( // samples by: DotNetPatcher opCodes.setStrict(opCodes.stloc_s, "05") + opCodes.nop + opCodes.ldloc_s + opCodes._unknown + opCodes.ceq + opCodes.brfalse_s + opCodes._unknown + opCodes.setStrict(opCodes.stloc_s, "05") + opCodes.nop + opCodes.ldloc_s + opCodes._unknown + opCodes.ceq + opCodes.brfalse_s ) || validateNetByteCode( // samples by: VMProtect opCodes.ldloc_0 + opCodes.setStrict(opCodes.ldc_i4, "?? ** ** **") + opCodes._unknown + opCodes.stloc_0 + opCodes.ldloc_0 + opCodes.setStrict(opCodes.ldc_i4, "?? ** ** **") + opCodes.xor + opCodes.stloc_0 ) || validateNetByteCode( // samples by: VMProtect opCodes.setStrict(opCodes.ldc_i4, "?? ** ** **") + opCodes._unknown + opCodes.stloc_0 + opCodes.setStrict(opCodes.ldftn, "** ?? ?? ??") ) ) { log(logType.net, "Control flow obfuscation detected! Offset: " + lastOffsetDetected); isCtrlFlowPresent = true; } if (isCtrlFlowPresent) options = addOption(options, "Ctrl flow"); const afterCtorOffset = PE.findSignature(PE.getDosStubOffset() + PE.getDosStubSize(), PE.getSize() - PE.getOverlaySize(), "''00**") + 8; // Indicates that the file uses short object names. Typically this indicates the presence of an obfuscation // There are two ways to detect short names - find one-letter objects or just use signature mask at Ctor offset :D var isShortNamesPresent = false; if (PE.compare("00**00**00", afterCtorOffset) || PE.compare("00****00****00****00", afterCtorOffset) || PE.compare("00******00******00******00", afterCtorOffset) || PE.compare("00********00********00********00", afterCtorOffset) || PE.compare("00****00****00", afterCtorOffset) || PE.compare("00****00**00", afterCtorOffset) || PE.compare("00**00****00", afterCtorOffset)) { log(logType.net, "Short names detected! (mask)"); isShortNamesPresent = true; } if (!isShortNamesPresent && PE.compare("00**00", afterCtorOffset)) { // the second way :D var shortNamesFound = 0; const chars = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm"; for (var i = 1; i < chars.length && !isShortNamesPresent; i++) { if (PE.isNetObjectPresent(chars[i])) { log(logType.net, "Short name found: \"" + chars[i] + "\" (" + shortNamesFound + "/20)"); shortNamesFound++; } if (shortNamesFound === 20) { isShortNamesPresent = true; } } } if (isShortNamesPresent) options = addOption(options, "Short names"); // Scan for strange patterns after .ctor (like "a1b2c3d4e5f6g7h8i9j0") var badNamings = false; var buffer = String(); // get next 0x12c bytes after .ctor for (var i = 0; i < 0x12c; i++) { var currentByte = PE.readByte(afterCtorOffset + i).toString(16); if (currentByte === '0') currentByte += '0'; buffer += currentByte; buffer += ' '; } var bufferString = String(); // 0x00 to [0x20, 0x20, 0x20] const bufferArray = replaceAllInString(buffer, '00 ', '20 20 20 ').split(' '); // buffer to a string for (var i = 0; i < bufferArray.length; i++) bufferString += String.fromCharCode(parseInt(bufferArray[i], 16)); const patternsToExplore = bufferString.split(" "); var strangePatternsCounter = 0; // https://web.archive.org/web/20190719134346/http://bartdesmet.net/blogs/bart/archive/2008/08/21/how-c-array-initializers-work.aspx var isPrivateImplementationDetailsPresent = validateNetObject(""); for (var i = 0; i < patternsToExplore.length && !badNamings; i++) { const currentStringPattern = patternsToExplore[i]; if (isPrivateImplementationDetailsPresent && currentStringPattern.length === 40) { break; } if (currentStringPattern.indexOf("<") === -1 && !/^([0-9A-F]{64})$/.test(currentStringPattern) && // These names may be generated by the compiler isNameObfuscated(currentStringPattern)) { strangePatternsCounter++; } if (strangePatternsCounter > 2) badNamings = true; } if (badNamings) options = addOption(options, "Bad namings"); // AntiTamper protects the file from modification var isAntiTamperPresent = false; if ( validateNetUnicodeString(" is tampered.") || // samples by: .NET Reactor validateNetUnicodeString("ping 127.0.0.1 > nul") || // samples by: ConfuserEx (Trinity, SkiDzEx like) validateNetUnicodeString("/C ping 1.1.1.1 -n 1 -w 3000 > Nul & Del \"") || // samples by: MindLated validateNetUnicodeString( // samples by: ConfuserEx opCodes.ldloc_s + opCodes.ldc_i4_0 + opCodes.ldloc_s + opCodes.ldc_i4_0 + opCodes.ldelem_u4 + opCodes.ldloc_s + opCodes.ldc_i4_0 + opCodes.ldelem_u4 + opCodes._unknown + opCodes.stelem_i4 + opCodes.ldloc_s + opCodes.ldc_i4_1 + opCodes.ldloc_s + opCodes.ldc_i4_1 + opCodes.ldelem_u4 + opCodes.ldloc_s + opCodes.ldc_i4_1 + opCodes.ldelem_u4 + opCodes._unknown + opCodes.stelem_i4 + opCodes.ldloc_s + opCodes.ldc_i4_2 + opCodes.ldloc_s + opCodes.ldc_i4_2 + opCodes.ldelem_u4 + opCodes.ldloc_s + opCodes.ldc_i4_2 + opCodes.ldelem_u4 + opCodes._unknown + opCodes.stelem_i4 + opCodes.ldloc_s + opCodes.ldc_i4_3 + opCodes.ldloc_s + opCodes.ldc_i4_3 + opCodes.ldelem_u4 + opCodes.ldloc_s + opCodes.ldc_i4_3 + opCodes.ldelem_u4 + opCodes._unknown + opCodes.stelem_i4 + opCodes.ldloc_s + opCodes.ldc_i4_4 + opCodes.ldloc_s + opCodes.ldc_i4_4 + opCodes.ldelem_u4 + opCodes.ldloc_s + opCodes.ldc_i4_4 + opCodes.ldelem_u4 + opCodes._unknown + opCodes.stelem_i4 ) || validateNetByteCode( // samples: ConfuserEx (Beds mod, private) opCodes.ldloc_s + opCodes._unknown + opCodes.shr_un + opCodes.ldloc_s + opCodes.ldc_i4_s + opCodes.shl + opCodes.or + opCodes.stloc_s + opCodes.ldloc_s + opCodes._unknown + opCodes.shr_un + opCodes.ldloc_s + opCodes.ldc_i4_s + opCodes.shl + opCodes.or + opCodes.stloc_s + opCodes.ldloc_s + opCodes._unknown + opCodes.shr_un + opCodes.ldloc_s + opCodes.ldc_i4_s + opCodes.shl + opCodes.or + opCodes.stloc_s ) ) { log(logType.net, "Anti-tamper detected!"); isAntiTamperPresent = true; } if (isAntiTamperPresent) options = addOption(options, "Anti-tamper"); // If in the assembly you can find the second object starting with “”, then this is a fakeee! var isModuleCtorMultiple = false; var currentCtorOffset = PE.findSignature(PE.getDosStubOffset() + PE.getDosStubSize(), PE.getSize() - PE.getOverlaySize(), "00''00"); if (currentCtorOffset !== -1) { var secondCtorNameOffset = PE.findSignature(currentCtorOffset + 10, PE.getSize() - PE.getOverlaySize(), "''"); if (secondCtorNameOffset !== -1 && PE.readByte(secondCtorNameOffset + 8) !== 0x00) { log(logType.net, "Fake detected! Offset: 0x" + Number(secondCtorNameOffset).toString(16)); isModuleCtorMultiple = true; } } if (isModuleCtorMultiple) options = addOption(options, "Fake .cctor name"); var isBadCctor = false; if (currentCtorOffset === -1) { log(logType.net, "It seems that the .cctor is missing. Bad PE format!"); isBadCctor = true; } if (isBadCctor) options = addOption(options, "Bad .cctor format"); // Detects the use of unusual mathematical expressions that would be simplified by the compiler. // For example, an expression like "912874 + 39188124^834" var isMutationsPresent = false; const mathOpCodes = [ opCodes.add, opCodes.sub, opCodes.mul, opCodes.div, opCodes.xor, opCodes.shr, opCodes.shl, opCodes.or, opCodes.not, opCodes.and ]; const mathTemplates = [ // %s = math opcode opCodes.ldc_i4 + opCodes.ldc_i4 + "%s" + opCodes.stloc, // samples by: .NET Reactor opCodes.ldc_i4 + opCodes.ldc_i4 + "%s" + opCodes.ldsfld, // samples by: .NET Reactor opCodes.ldc_i4 + opCodes.ldc_i4 + "%s" + opCodes.ldc_i4 + opCodes.add, // samples by: ConfuserEx (Beds mod) opCodes.ldloc_1 + opCodes.ldc_i4 + opCodes.ldc_i4 + "%s" + opCodes.ldc_i4 + opCodes.ldc_i4, // samples by: SkiDzEX opCodes.ldloc + opCodes.ldc_i4 + opCodes.ldc_i4 + opCodes.ldc_i4 + "%s" + opCodes.stelem_i1, // samples by: .NET Reactor opCodes.ldc_i4 + opCodes.ldc_i4 + "%s" + opCodes.br_s // samples by: [Unknown protector, only samples] ]; for (var y = 0; y < mathTemplates.length && !isMutationsPresent; y++) { const template = mathTemplates[y]; for (var e = 0; e < mathOpCodes.length && !isMutationsPresent; e++) { if (e === 0 && !validateNetByteCode(replaceAllInString(template, "%s", opCodes._unknown))) break; // No math mutations const pattern = replaceAllInString(template, "%s", mathOpCodes[e]); if (validateNetByteCode(pattern)) { log(logType.net, "Math mutations detected! Offset: " + lastOffsetDetected); isMutationsPresent = true; } } } if (isMutationsPresent) options = addOption(options, "Math mutations"); // VB NET apps with resources only var isStringsEncryptionPresent = false; if (PE_Cached.isVbNetStandardLibraryPresent && !isFrameworkComponent()) { if (validateNetObject("Resources") && !validateGlobalUnicodeString(".Resources")) { log(logType.net, "It appears that the strings are hidden/encrypted and can be loaded dynamically."); isStringsEncryptionPresent = true; } } if (isStringsEncryptionPresent) options = addOption(options, "Strings encryption"); // A type of obfuscation of numbers in which they are inverted several times from positive to negative and vice versa... var isMathInversionsPresent = false; if (validateNetByteCode(opCodes.ldc_i4 + opCodes.not) && ( validateNetByteCode( // ~(-(~(-(~(-(~(-( num )))))))) opCodes.ldc_i4 + opCodes.not + opCodes.neg + opCodes.not + opCodes.neg + opCodes.not + opCodes.neg + opCodes.not + opCodes.neg ) || validateNetByteCode( // ~(~(-(-(~(~( num )))))) opCodes.ldc_i4 + opCodes.not + opCodes.not + opCodes.neg + opCodes.neg + opCodes.not + opCodes.not ) || validateNetByteCode( // ~(-(~(~(-(-( num )))))) opCodes.ldc_i4 + opCodes.not + opCodes.neg + opCodes.not + opCodes.not + opCodes.neg + opCodes.neg ) || validateNetByteCode( // ~(-(~(-(~(~( num )))))) opCodes.ldc_i4 + opCodes.not + opCodes.neg + opCodes.not + opCodes.neg + opCodes.not + opCodes.not ) || validateNetByteCode( // ~(-(~(-(~(-( num )))))) opCodes.ldc_i4 + opCodes.not + opCodes.neg + opCodes.not + opCodes.neg + opCodes.not + opCodes.neg ) )) { log(logType.net, "Math inversions detected, offset " + lastOffsetDetected); isMathInversionsPresent = true; } if (isMathInversionsPresent) options = addOption(options, "Math inversions"); // A technique that allows you to avoid code decompilation. dnSpy gives a parsing error when trying to open such a file var invalidOpCodes = false; if ( /* validateNetByteCode( // samples by: SugarGuard opCodes.setStrict(opCodes.box, "?? 00 00 01") + opCodes.ret ) || */ validateNetByteCode( // samples by: ConfuserEx (Beds mod) opCodes.setStrict(opCodes.calli, "FF FF FF FF") + opCodes.setStrict(opCodes.sizeof, "FF FF FF FF") ) ) { log(logType.net, "Invalid OpCodes detected, offset " + lastOffsetDetected); invalidOpCodes = true; } if (invalidOpCodes) options = addOption(options, "Invalid OpCodes"); // Some protections include their own dependencies in the form of runtime libraries var isProtectionRuntimePresent = false; var runtimeFound = String(); const protectionsRuntime = [ // Need more { lib: "haspdnert.dll", name: "SafeNet Sentinel LDK" }, { lib: "AgileDotNet.VMRuntime.dll", name: "Agile" }, { lib: "Xerin.Runtime.dll", name: "XerinFuscator" }, { lib: "CliSecureRd64.dll", name: "CliSecure" }, { lib: "CliSecureRd.dll", name: "CliSecure" }, { lib: "Protect32.dll", name: "ILProtector" }, { lib: "Protect64.dll", name: "ILProtector" }, { lib: "OneVM.Runtime.dll", name: "OneVM" }, { lib: "MRuntime3.dll", name: "Maxtocode" }, { lib: "Attick.dll", name: "Maxtocode" }, { lib: "HVMRuntm.dll", name: "DNGuard" } ]; for (var i = 0; i < protectionsRuntime.length; i++) { const runtimeInfo = protectionsRuntime[i], runtimeLibraryName = runtimeInfo.lib, protectorName = runtimeInfo.name; if (validateNetObject(runtimeLibraryName) || // "runtime.dll" validateNetObject(runtimeLibraryName.substring(0, runtimeLibraryName.length - 4))) { // "runtime" log(logType.net, protectorName + " runtime detected!"); isProtectionRuntimePresent = true; runtimeFound = protectorName; break; } } // Clean up: release the dictionary protectionsRuntime = undefined; if (isProtectionRuntimePresent) options = addOption(options, runtimeFound + " runtime"); const obfuscatorsAttributes = [ "Xenocode.Client.Attributes.AssemblyAttributes.ProcessedByXenocode", // Xenocode "CryptoObfuscator.ProtectedWithCryptoObfuscatorAttribute", // Crypto Obfuscator "SecureTeam.Attributes.ObfuscatedByAgileDotNetAttribute", // Agile.NET "Xenocode.Client.Attributes.AssemblyAttributes", // Xenocode "SmartAssembly.Attributes.PoweredByAttribute", // Smart Assembly "ObfuscatedByAgileDotNetAttribute", // Agile.NET "NineRays.Obfuscator.Evaluation", // Spices.Net "ObfuscatedByCliSecureAttribute", // CliSecure "BabelObfuscatorAttribute", // Babel "AsStrongAsFuckAttribute", // AsStrongAsFuck "ProtectedByDotnetsafer", // DotNetSafer "Macrobject.Obfuscator", // Macrobject "DotfuscatorAttribute", // Dotfuscator "CodeWallTrialVersion", // CodeWall "ConfusedByAttribute", // ConfuserEx "ObfuscatedByGoliath", // Goliath "NETSpider.Attribute", // NETSpider "NineRays.Obfuscator", // Spices.Net "PoweredByAttribute", // Smart Assembly "RustemSoft.Skater", // Skater "Beds-Protector", // fake Beds Protector "BabelAttribute", // Babel "MRuntime3.dll", // Maxtocode "YanoAttribute", // Yano "EMyPID_8234_", // Eazfuscator.NET "ZYXDNGuarder", // DNGuard "SkiDzEX", // ConfuserEx based "Sixxpack", // Sixxpack "____KILL", // CodeVeil "Reactor", // Fake .NET Reactor ]; var isFakeSignaturesPresent = false; var isWatermarkPresent = false; var signaturesCounter = 0; var obfuscatorAttributeFound = String(); // Iterate through obfuscators attributes for (var t = 0; t < obfuscatorsAttributes.length; t++) { if (validateNetObject(obfuscatorsAttributes[t])) { obfuscatorAttributeFound = obfuscatorsAttributes[t]; signaturesCounter++; if (signaturesCounter > 1) { isFakeSignaturesPresent = true; break; } } } if (isFakeSignaturesPresent) { options = addOption(options, "Fake signatures"); } else { // "Watermark" is only possible in the absence of fake signatures if (signaturesCounter === 1) { log(logType.net, "Watermark (Attribute) found: \"" + obfuscatorAttributeFound + "\""); isWatermarkPresent = true; } if ((!isWatermarkPresent && ( validateSignature("'Obfuscated'") || validateSignature("'obfuscated'") || validateSignature("'ByAttribute'") || validateSignature("'ObfuscatorAttribute'") || validateNetObject("ObfuscationAttribute") )) && !isFrameworkComponent()) { // System.Reflection.ObfuscationAttribute isWatermarkPresent = true; } } if (isWatermarkPresent) options = addOption(options, "Watermark"); // The module name must always contain the assembly name and the output file extension (Assembly "App", Module "App.dll"). // If this standard is not followed, it means that the sample was modified after compilation. var isBuildInfoModified = false; var buildAssemblyName = PE_Cached.nameOfNetAssemblyName, buildModuleName = PE_Cached.nameOfNetModuleName; if (buildAssemblyName.indexOf("Interop.") === 0) { buildAssemblyName = buildAssemblyName.substring(8, buildAssemblyName.length); } if (buildAssemblyName !== getFileNameWithoutExtension(buildModuleName) || buildAssemblyName === buildModuleName) { isBuildInfoModified = true; if (PE_Cached.isJscriptNetStandardLibraryPresent && buildModuleName === "JScript Module") { isBuildInfoModified = false; } } if (isBuildInfoModified) options = addOption(options, "Modified build info"); const protectorsLabelsToRemove = [ // Protectors with these names will be removed from results "SafeNet Sentinel LDK .NET", "Xenocode Postbuild", "Smart Assembly", "Dotfuscator", "Babel .NET", "Spices.Net", "Maxtocode", "FISH .NET", "CliSecure", "CodeWall", "CodeVeil", "Sixxpack", "DNGuard", "Goliath", "Agile", "Yano" ], packersLabelsToRemove = [ "Quest PowerGUI", "DataAnubis", "NsPack", "ASPack" ], protectionsLabelsToRemove = [ "Sentinel SuperPro dongle reference", "Unikey/Activator dongle reference", "Eutron SmartKey dongle reference", "SenseLock dongle reference", "Hardlock dongle reference", "WIBU Key dongle reference", "Wizzkey dongle reference", "SoftLok dongle reference", "NetHASP dongle reference" ]; // Волки делают АУФ 🐺☝️ if (isFakeSignaturesPresent) { for (var i = 0; i < protectorsLabelsToRemove.length; i++) { _removeResult("protector", protectorsLabelsToRemove[i]); } for (var i = 0; i < packersLabelsToRemove.length; i++) { _removeResult("cryptor", packersLabelsToRemove[i]); _removeResult("packer", packersLabelsToRemove[i]); } for (var i = 0; i < protectionsLabelsToRemove.length; i++) { _removeResult("protection", protectionsLabelsToRemove[i]); } } if (options.length != 0) isDetected = true; if (isDetected) { _setResult("~protection", "Obfuscation", String(), PE.isVerbose() ? options : String()); } } // #endregion // #region "anti-analysis (.NET)" function scanForAntiAnalysis_NET() { log(logType.nothing, "Scanning for anti-analysis tricks..."); var options = String(); var isDetected = false; // Assumes the file can detect debugging protection var isAntiDebugPresent = false; const debuggerObject = "Debugger", // MSIL: 'System.Diagnostics.Debugger' from System.Diagnostics.dll isAttached = "get_IsAttached", // MSIL: '*.Debugger::get_IsAttached()' isLogging = "IsLogging" // MSIL: '*.Debugger::IsLogging()' if ( ( ( // .NET Functions validateNetObject(debuggerObject) || validateNetUnicodeString(debuggerObject) // Check for 'Debugger' ) && ( (validateNetObject(isAttached) || validateNetUnicodeString(isAttached)) || // Check for 'get_IsAttached' property (validateNetObject(isLogging) || validateNetUnicodeString(isLogging)) // Check for 'IsLogging' function ) || ( // Native (WinAPI) functions validateNetObject("CheckRemoteDebuggerPresent") || validateNetObject("IsDebuggerPresent") || validateNetObject("NtRemoveProcessDebug") || validateNetObject("NtQueryInformationProcess") ) ) && !isFrameworkComponent() ) { isAntiDebugPresent = true; } if (isAntiDebugPresent) options = addOption(options, "Anti-debug"); // A type of protection in which, after launching an application, it erases the headers and/or PE signature behind itself var isAntiDumpPresent = false; if ( !isFrameworkComponent() && validateNetObject("VirtualProtect") && ( // from 'kernel32.dll', WinAPI // Need to check isAllNetReferencesPresent( // samples by: ConfuserEx, SkiDzEX [ "System.Runtime.InteropServices", // System.Runtime.InteropServices.dll "Marshal", // MSIL: '*.Marshal::GetHINSTANCE( ... )' "GetHINSTANCE", // MSIL: '*.Marshal::GetHINSTANCE( ... )' "IntPtr", // MSIL: 'System.IntPtr' "op_Explicit" // MSIL: 'System.IntPtr::op_Explicit' ] ) || isAllNetReferencesPresent( // samples by: Inx Obfuscator [ "System.Diagnostics", // System.Diagnostics "memcpy", // from 'msvcrt.dll', WinAPI "IntPtr", // MSIL: 'System.IntPtr' "get_MainModule", // MSIL: '*.Process::get_MainModule()' "get_BaseAddress" // MSIL: '*.ProcessModule::get_BaseAddress()' ] ) || isAllNetReferencesPresent( // samples by: MindLated [ "System.Runtime.InteropServices", // System.Runtime.InteropServices.dll "Marshal", // MSIL: '*.Marshal::GetHINSTANCE( ... )' "GetHINSTANCE", // MSIL: '*.Marshal::GetHINSTANCE( ... )' "IntPtr", // MSIL: 'System.IntPtr' "CopyBlock", "InitBlock" ] ) ) ) { isAntiDumpPresent = true; } if (isAntiDumpPresent) options = addOption(options, "Anti-dump"); // https://medium.com/@tarunrd77/dnspy-static-analysis-of-a-net-malware-012806424acf const antiDnSpyTriggers = [ "dnspy", "dnSpy", "DNSPY" ]; var isAntiDnSpyPresent = false; // Iterate through anti-DnSpy triggers for (var l = 0; l < antiDnSpyTriggers.length && !isAntiDnSpyPresent; l++) { const dnSpyName = antiDnSpyTriggers[l]; // Check if the signature for anti-DnSpy trigger is valid using Unicode signature mask or the original signature if ( validateGlobalUnicodeString(dnSpyName) || validateSignature("'" + dnSpyName + "'") ) { isAntiDnSpyPresent = true; } } if (isAntiDnSpyPresent) options = addOption(options, "Anti-dnSpy"); // https://github.com/icsharpcode/ILSpy const antiIlSpyTriggers = [ "ilspy", "ilSpy", "ILSpy", "ILSPY" ]; var isAntiIlSpyPresent = false; for (var l = 0; l < antiIlSpyTriggers.length && !isAntiIlSpyPresent; l++) { const ilSpyName = antiIlSpyTriggers[l]; // Check if the signature for anti-ILSpy trigger is valid using Unicode signature mask or the original signature if ( validateGlobalUnicodeString(ilSpyName) || validateSignature("'" + ilSpyName + "'") ) { isAntiIlSpyPresent = true; } } if (isAntiIlSpyPresent) options = addOption(options, "Anti-ILSpy"); const isGetModuleHandleDetected = validateSignature("'GetModuleHandle'"); // from 'kernel32.dll' // https://en.wikipedia.org/wiki/Sandboxie const sbieVariants = [ "sbiedll.", "SbieDll.", "SBIEDLL." ]; var isAntiSbiePresent = false; if (isGetModuleHandleDetected) { // Iterate through Sandboxie variants for (var l = 0; l < sbieVariants.length && !isAntiSbiePresent; l++) { const sbieLib = sbieVariants[l]; // Check if the signature for Sandboxie variant is valid using Unicode signature mask or the original signature if ( PE.isNetObjectPresent("IsSandboxiePresent") || // https://github.com/AdvDebug/AntiCrack-DotNet/blob/f3cd8104e952580e0edf298101139d15befe008e/AntiCrack-DotNet/AntiVirtualization.cs#L53 validateGlobalUnicodeString(sbieLib) || validateSignature("'" + sbieLib + "'") ) { isAntiSbiePresent = true; } } } if (isAntiSbiePresent) options = addOption(options, "Anti-SandBoxie"); // https://help.comodo.com/topic-394-1-767-9229-the-sandbox.html const comodoVariants = [ "cmdvrt32.", "cmdvrt64.", "CMDVRT32.", "CMDVRT64." ]; var isAntiComodoPresent = false; if (isGetModuleHandleDetected) { // Iterate through Comodo Sandbox variants for (var l = 0; l < comodoVariants.length && !isAntiComodoPresent; l++) { const comodoLib = comodoVariants[l]; // Check if the signature for Comodo Sandbox variant is valid using Unicode signature mask or the original signature if ( PE.isNetObjectPresent("IsComodoSandboxPresent") || // https://github.com/AdvDebug/AntiCrack-DotNet/blob/f3cd8104e952580e0edf298101139d15befe008e/AntiCrack-DotNet/AntiVirtualization.cs#L64 validateGlobalUnicodeString(comodoLib) || validateSignature("'" + comodoLib + "'") ) { isAntiComodoPresent = true; } } } if (isAntiComodoPresent) options = addOption(options, "Anti-Comodo"); // https://blog.360totalsecurity.com/en/how-to-use-360-sandbox/ const qihoo360Variants = [ "SxIn.", "SXIn." ]; var isAntiQihoo360Present = false; if (isGetModuleHandleDetected) { // Iterate through Qihoo 360 Sandbox variants for (var l = 0; l < qihoo360Variants.length && !isAntiQihoo360Present; l++) { const qihoo360Lib = qihoo360Variants[l]; // Check if the signature for Qihoo 360 Sandbox variant is valid using Unicode signature mask or the original signature if ( PE.isNetObjectPresent("IsQihoo360SandboxPresent") || // https://github.com/AdvDebug/AntiCrack-DotNet/blob/f3cd8104e952580e0edf298101139d15befe008e/AntiCrack-DotNet/AntiVirtualization.cs#L75 validateGlobalUnicodeString(qihoo360Lib) || validateSignature("'" + qihoo360Lib + "'") ) { isAntiQihoo360Present = true; } } } if (isAntiQihoo360Present) options = addOption(options, "Anti-Qihoo 360"); // https://www.networkintelligence.ai/blogs/cuckoo-sandbox/ const cuckooVariants = [ "cuckoomon.", "CUCKOOMON." ]; var isAntiCuckooPresent = false; if (isGetModuleHandleDetected) { // Iterate through Cuckoo Sandbox variants for (var l = 0; l < cuckooVariants.length && !isAntiCuckooPresent; l++) { const cuckooLib = cuckooVariants[l]; // Check if the signature for Cuckoo Sandbox variant is valid using Unicode signature mask or the original signature if ( PE.isNetObjectPresent("IsCuckooSandboxPresent") || // https://github.com/AdvDebug/AntiCrack-DotNet/blob/f3cd8104e952580e0edf298101139d15befe008e/AntiCrack-DotNet/AntiVirtualization.cs#L86 validateGlobalUnicodeString(cuckooLib) || validateSignature("'" + cuckooLib + "'") ) { isAntiCuckooPresent = true; } } } if (isAntiCuckooPresent) options = addOption(options, "Anti-Cuckoo"); // https://www.winehq.org/ var isAntiWinePresent = false; var wineGetUnixFileName = "wine_get_unix_file_name"; if (isGetModuleHandleDetected && ( validateGlobalUnicodeString(wineGetUnixFileName) || validateSignature("'" + wineGetUnixFileName + "'") )) { isAntiWinePresent = true; } if (isAntiWinePresent) options = addOption(options, "Anti-Wine"); var isAntiVmPresent = false; if (validateNetUnicodeString("vmware") || validateNetUnicodeString("VirtualBox") || validateNetUnicodeString("VMBusHID") || validateGlobalUnicodeString("WDAGUtilityAccount")) { isAntiVmPresent = true; } if (isAntiVmPresent) options = addOption(options, "Anti-VM"); if (options.length != 0) isDetected = true; if (isDetected) { _setResult("~protection", "Anti analysis", String(), PE.isVerbose() ? options : String()); } } // #endregion /** * Determines if the current PE file is a C++/CLR .NET application. * * @returns {boolean} True if the PE file matches the C++/CLR .NET application heuristics, otherwise false. */ function isCppClrLikeApp() { return PE_Cached.isDotNet && PE_Cached.isRichSignaturePresent && PE.isLibraryPresent("KERNEL32.DLL") && PE_Cached.isNetGlobalCctorPresent; } /** * Checks if the PE file is linked with an unpackaged Windows App SDK. * * This function verifies the presence of specific .NET objects that indicate * the application uses the Windows App SDK in an unpackaged deployment scenario. * * @returns {boolean} True if both "AutoInitialize" and "InitializeWindowsAppSDK" * .NET objects are present in the PE file, false otherwise. */ function isUnpackagedWindowsAppSdkLinked() { return PE.isNetObjectPresent("AutoInitialize") && PE.isNetObjectPresent("InitializeWindowsAppSDK"); } /** * Microsoft Intermediate Language (MSIL) OpCodes class for .NET assembly analysis. * * This class provides a comprehensive collection of MSIL instruction opcodes with their * corresponding bytecode patterns for signature-based detection in .NET assemblies. * All opcode values are verified against the official Microsoft .NET Runtime source code * and ECMA-335 Common Language Infrastructure (CLI) specification. * * @class NetOpCodes * @description Represents MSIL opcodes as hexadecimal string patterns for bytecode matching. * * Features: * - Complete MSIL instruction set coverage (93 opcodes) * - Support for both single-byte (0x00-0xFF) and two-byte (0xFE00-0xFEFF) opcodes * - Wildcard pattern support using '?' for variable operands * - Prefix instruction handling (volatile, tail, readonly, etc.) * - Helper methods for strict value substitution and null value setting * * Pattern Format: * - Fixed bytes: "58" (add instruction) * - Variable operands: "28????????" (call with 4-byte method token) * - Short operands: "2B??" (br.s with 1-byte offset) * - Two-byte opcodes: "FE01" (ceq instruction) * * Helper Methods: * - setStrict(opcode, value): Sets specific operand values for opcodes * - setNullValue(opcode): Replaces wildcards with zero bytes * * @see {@link https://docs.microsoft.com/en-us/dotnet/api/system.reflection.emit.opcodes} Microsoft OpCodes Documentation * @see {@link https://www.ecma-international.org/publications-and-standards/standards/ecma-335/} ECMA-335 CLI Specification * @see {@link https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/OpCodes.cs} .NET Runtime Source */ function NetOpCodes() { // ========== BASIC STACK OPERATIONS ========== this.dup = "25"; // MSIL: 'dup' - Duplicate top stack value this.nop = "00"; // MSIL: 'nop' - No operation this.pop = "26"; // MSIL: 'pop' - Remove top stack value // ========== ARITHMETIC OPERATIONS ========== this.add = "58"; // MSIL: 'add' - Add two values this.add_ovf = "D6"; // MSIL: 'add.ovf' - Add signed integer values with overflow check this.add_ovf_un = "D7"; // MSIL: 'add.ovf.un' - Add unsigned integer values with overflow check this.div = "5B"; // MSIL: 'div' - Divide two values this.div_un = "5C"; // MSIL: 'div.un' - Divide unsigned values this.mul = "5A"; // MSIL: 'mul' - Multiply two values this.mul_ovf = "D8"; // MSIL: 'mul.ovf' - Multiply signed integer values with overflow check this.mul_ovf_un = "D9"; // MSIL: 'mul.ovf.un' - Multiply unsigned integer values with overflow check this.neg = "65"; // MSIL: 'neg' - Negate value this.rem = "5D"; // MSIL: 'rem' - Remainder when dividing two values this.rem_un = "5E"; // MSIL: 'rem.un' - Remainder (unsigned) this.sub = "59"; // MSIL: 'sub' - Subtract two values this.sub_ovf = "DA"; // MSIL: 'sub.ovf' - Subtract native int with overflow check this.sub_ovf_un = "DB"; // MSIL: 'sub.ovf.un' - Subtract unsigned int with overflow check // ========== LOGICAL OPERATIONS ========== this.and = "5F"; // MSIL: 'and' - Bitwise AND this.not = "66"; // MSIL: 'not' - Bitwise NOT this.or = "60"; // MSIL: 'or' - Bitwise OR this.shl = "62"; // MSIL: 'shl' - Shift left this.shr = "63"; // MSIL: 'shr' - Shift right this.shr_un = "64"; // MSIL: 'shr.un' - Shift right (unsigned) this.xor = "61"; // MSIL: 'xor' - Bitwise XOR // ========== COMPARISON OPERATIONS ========== this.ceq = "FE01"; // MSIL: 'ceq' - Compare equal this.cgt = "FE02"; // MSIL: 'cgt' - Compare greater than this.cgt_un = "FE03"; // MSIL: 'cgt.un' - Compare greater than (unsigned) this.clt = "FE04"; // MSIL: 'clt' - Compare less than this.clt_un = "FE05"; // MSIL: 'clt.un' - Compare less than (unsigned) // ========== CONSTANT LOADING ========== this.ldc_i4_m1 = "15"; // MSIL: 'ldc.i4.m1' - Load constant -1 this.ldc_i4 = "20????????"; // MSIL: 'ldc.i4' - Load 32-bit integer constant this.ldc_i4_0 = "16"; // MSIL: 'ldc.i4.0' - Load constant 0 this.ldc_i4_1 = "17"; // MSIL: 'ldc.i4.1' - Load constant 1 this.ldc_i4_2 = "18"; // MSIL: 'ldc.i4.2' - Load constant 2 this.ldc_i4_3 = "19"; // MSIL: 'ldc.i4.3' - Load constant 3 this.ldc_i4_4 = "1A"; // MSIL: 'ldc.i4.4' - Load constant 4 this.ldc_i4_5 = "1B"; // MSIL: 'ldc.i4.5' - Load constant 5 this.ldc_i4_6 = "1C"; // MSIL: 'ldc.i4.6' - Load constant 6 this.ldc_i4_7 = "1D"; // MSIL: 'ldc.i4.7' - Load constant 7 this.ldc_i4_8 = "1E"; // MSIL: 'ldc.i4.8' - Load constant 8 this.ldc_i4_s = "1F??"; // MSIL: 'ldc.i4.s' - Load small integer constant this.ldc_i8 = "21????????????????"; // MSIL: 'ldc.i8' - Load 64-bit integer constant this.ldc_r4 = "22????????"; // MSIL: 'ldc.r4' - Load 32-bit float constant this.ldc_r8 = "23????????????????"; // MSIL: 'ldc.r8' - Load 64-bit float constant this.ldnull = "14"; // MSIL: 'ldnull' - Load null reference // ========== ARGUMENT OPERATIONS ========== this.ldarg = "FE09????"; // MSIL: 'ldarg' - Load argument this.ldarg_0 = "02"; // MSIL: 'ldarg.0' - Load argument 0 this.ldarg_1 = "03"; // MSIL: 'ldarg.1' - Load argument 1 this.ldarg_2 = "04"; // MSIL: 'ldarg.2' - Load argument 2 this.ldarg_3 = "05"; // MSIL: 'ldarg.3' - Load argument 3 this.ldarg_s = "0E??"; // MSIL: 'ldarg.s' - Load argument (short form) this.starg_s = "10??"; // MSIL: 'starg.s' - Store to argument (short form) this.ldarga = "FE0A????"; // MSIL: 'ldarga' - Load argument address this.ldarga_s = "0F??"; // MSIL: 'ldarga.s' - Load argument address (short form) this.starg = "FE0B????"; // MSIL: 'starg' - Store to argument this.ldloca = "FE09????"; // MSIL: 'ldloca' - Load local variable address this.ldloca_s = "12??"; // MSIL: 'ldloca.s' - Load local variable address (short form) // ========== LOCAL VARIABLE OPERATIONS ========== this.ldloc = "FE0C????"; // MSIL: 'ldloc' - Load local variable this.ldloc_0 = "06"; // MSIL: 'ldloc.0' - Load local variable 0 this.ldloc_1 = "07"; // MSIL: 'ldloc.1' - Load local variable 1 this.ldloc_2 = "08"; // MSIL: 'ldloc.2' - Load local variable 2 this.ldloc_3 = "09"; // MSIL: 'ldloc.3' - Load local variable 3 this.ldloc_s = "11??"; // MSIL: 'ldloc.s' - Load local variable (short form) this.stloc = "FE0E????"; // MSIL: 'stloc' - Store to local variable this.stloc_0 = "0A"; // MSIL: 'stloc.0' - Store to local variable 0 this.stloc_1 = "0B"; // MSIL: 'stloc.1' - Store to local variable 1 this.stloc_2 = "0C"; // MSIL: 'stloc.2' - Store to local variable 2 this.stloc_3 = "0D"; // MSIL: 'stloc.3' - Store to local variable 3 this.stloc_s = "13??"; // MSIL: 'stloc.s' - Store to local variable (short form) // ========== FIELD OPERATIONS ========== this.ldfld = "7B????????"; // MSIL: 'ldfld' - Load instance field this.ldflda = "7C????????"; // MSIL: 'ldflda' - Load field address this.ldsfld = "7E????????"; // MSIL: 'ldsfld' - Load static field this.ldsflda = "7F????????"; // MSIL: 'ldsflda' - Load static field address this.stfld = "7D????????"; // MSIL: 'stfld' - Store to instance field this.stsfld = "80????????"; // MSIL: 'stsfld' - Store to static field // ========== ARRAY OPERATIONS ========== this.ldelem = "A3????????"; // MSIL: 'ldelem' - Load array element this.ldelem_i = "97"; // MSIL: 'ldelem.i' - Load array element (native int) this.ldelem_i1 = "90"; // MSIL: 'ldelem.i1' - Load array element (8-bit signed) this.ldelem_i2 = "92"; // MSIL: 'ldelem.i2' - Load array element (16-bit signed) this.ldelem_i4 = "94"; // MSIL: 'ldelem.i4' - Load array element (32-bit signed) this.ldelem_i8 = "96"; // MSIL: 'ldelem.i8' - Load array element (64-bit signed) this.ldelem_r4 = "98"; // MSIL: 'ldelem.r4' - Load array element (32-bit float) this.ldelem_r8 = "99"; // MSIL: 'ldelem.r8' - Load array element (64-bit float) this.ldelem_ref = "9A"; // MSIL: 'ldelem.ref' - Load array element (object reference) this.ldelem_u1 = "91"; // MSIL: 'ldelem.u1' - Load array element (unsigned 8-bit) this.ldelem_u2 = "93"; // MSIL: 'ldelem.u2' - Load array element (unsigned 16-bit) this.ldelem_u4 = "95"; // MSIL: 'ldelem.u4' - Load array element (unsigned 32-bit) this.ldelema = "8F????????"; // MSIL: 'ldelema' - Load array element address this.ldlen = "8E"; // MSIL: 'ldlen' - Load array length this.newarr = "8D????????"; // MSIL: 'newarr' - Create new array this.stelem = "A4????????"; // MSIL: 'stelem' - Store to array element this.stelem_i = "9B"; // MSIL: 'stelem.i' - Store to array element (native int) this.stelem_i1 = "9C"; // MSIL: 'stelem.i1' - Store to array element (8-bit) this.stelem_i2 = "9D"; // MSIL: 'stelem.i2' - Store to array element (16-bit) this.stelem_i4 = "9E"; // MSIL: 'stelem.i4' - Store to array element (32-bit) this.stelem_i8 = "9F"; // MSIL: 'stelem.i8' - Store to array element (64-bit) this.stelem_r4 = "A0"; // MSIL: 'stelem.r4' - Store to array element (32-bit float) this.stelem_r8 = "A1"; // MSIL: 'stelem.r8' - Store to array element (64-bit float) this.stelem_ref = "A2"; // MSIL: 'stelem.ref' - Store to array element (object reference) // ========== INDIRECT OPERATIONS ========== this.ldind_i = "4D"; // MSIL: 'ldind.i' - Load indirect native int this.ldind_i1 = "46"; // MSIL: 'ldind.i1' - Load indirect 8-bit value this.ldind_i2 = "48"; // MSIL: 'ldind.i2' - Load indirect 16-bit value this.ldind_i4 = "4A"; // MSIL: 'ldind.i4' - Load indirect 32-bit value this.ldind_i8 = "4C"; // MSIL: 'ldind.i8' - Load indirect 64-bit value this.ldind_r4 = "4E"; // MSIL: 'ldind.r4' - Load indirect 32-bit float this.ldind_r8 = "4F"; // MSIL: 'ldind.r8' - Load indirect 64-bit float this.ldind_ref = "50"; // MSIL: 'ldind.ref' - Load indirect object reference this.ldind_u1 = "47"; // MSIL: 'ldind.u1' - Load indirect unsigned 8-bit value this.ldind_u2 = "49"; // MSIL: 'ldind.u2' - Load indirect unsigned 16-bit value this.ldind_u4 = "4B"; // MSIL: 'ldind.u4' - Load indirect unsigned 32-bit value this.stind_i = "DF"; // MSIL: 'stind.i' - Store indirect native int this.stind_i1 = "52"; // MSIL: 'stind.i1' - Store indirect 8-bit value this.stind_i2 = "53"; // MSIL: 'stind.i2' - Store indirect 16-bit value this.stind_i4 = "54"; // MSIL: 'stind.i4' - Store indirect 32-bit value this.stind_i8 = "55"; // MSIL: 'stind.i8' - Store indirect 64-bit value this.stind_r4 = "56"; // MSIL: 'stind.r4' - Store indirect 32-bit float this.stind_r8 = "57"; // MSIL: 'stind.r8' - Store indirect 64-bit float this.stind_ref = "51"; // MSIL: 'stind.ref' - Store indirect object reference // ========== CONTROL FLOW ========== this.beq = "3B????????"; // MSIL: 'beq' - Branch if equal this.beq_s = "2E??"; // MSIL: 'beq.s' - Branch if equal (short form) this.bge = "3C????????"; // MSIL: 'bge' - Branch if greater or equal this.bge_s = "2F??"; // MSIL: 'bge.s' - Branch if greater or equal (short form) this.bge_un = "41????????"; // MSIL: 'bge.un' - Branch if greater or equal (unsigned/unordered) this.bge_un_s = "34??"; // MSIL: 'bge.un.s' - Branch if greater or equal (unsigned/unordered, short) this.bgt = "3D????????"; // MSIL: 'bgt' - Branch if greater than this.bgt_s = "30??"; // MSIL: 'bgt.s' - Branch if greater than (short form) this.bgt_un = "42????????"; // MSIL: 'bgt.un' - Branch if greater than (unsigned/unordered) this.bgt_un_s = "35??"; // MSIL: 'bgt.un.s' - Branch if greater than (unsigned/unordered, short) this.ble = "3E????????"; // MSIL: 'ble' - Branch if less or equal this.ble_s = "31??"; // MSIL: 'ble.s' - Branch if less or equal (short form) this.ble_un = "43????????"; // MSIL: 'ble.un' - Branch if less or equal (unsigned/unordered) this.ble_un_s = "36??"; // MSIL: 'ble.un.s' - Branch if less or equal (unsigned/unordered, short) this.blt = "3F????????"; // MSIL: 'blt' - Branch if less than this.blt_s = "32??"; // MSIL: 'blt.s' - Branch if less than (short form) this.blt_un = "44????????"; // MSIL: 'blt.un' - Branch if less than (unsigned/unordered) this.blt_un_s = "37??"; // MSIL: 'blt.un.s' - Branch if less than (unsigned/unordered, short) this.bne_un = "40????????"; // MSIL: 'bne.un' - Branch if not equal (unsigned) this.bne_un_s = "33??"; // MSIL: 'bne.un.s' - Branch if not equal (unsigned, short) this.br = "38????????"; // MSIL: 'br' - Unconditional branch this.br_s = "2B??"; // MSIL: 'br.s' - Unconditional branch (short form) this.break_ = "01"; // MSIL: 'break' - Breakpoint instruction this.brfalse = "39????????"; // MSIL: 'brfalse' - Branch if false/null/zero this.brfalse_s = "2C??"; // MSIL: 'brfalse.s' - Branch if false/null/zero (short) this.brtrue = "3A????????"; // MSIL: 'brtrue' - Branch if true/non-null/non-zero this.brtrue_s = "2D??"; // MSIL: 'brtrue.s' - Branch if true/non-null/non-zero (short) this.call = "28????????"; // MSIL: 'call' - Call method this.calli = "29????????"; // MSIL: 'calli' - Call indirect this.callvirt = "6F????????"; // MSIL: 'callvirt' - Call virtual method this.jmp = "27????????"; // MSIL: 'jmp' - Jump to method this.ldtoken = "D0????????"; // MSIL: 'ldtoken' - Load metadata token this.ldftn = "FE06????????"; // MSIL: 'ldftn' - Load function pointer this.ldvirtftn = "FE07????????"; // MSIL: 'ldvirtftn' - Load virtual function pointer this.leave = "DD????????"; // MSIL: 'leave' - Exit protected region this.leave_s = "DE??"; // MSIL: 'leave.s' - Exit protected region (short form) this.ret = "2A"; // MSIL: 'ret' - Return from method this.switch__nobody = "45"; // MSIL: 'switch' - Switch statement // ========== TYPE OPERATIONS ========== this.box = "8C????????"; // MSIL: 'box' - Convert value type to object reference this.castclass = "74????????"; // MSIL: 'castclass' - Cast object to class this.ckfinite = "C3"; // MSIL: 'ckfinite' - Check if value is finite number this.conv_i = "D3"; // MSIL: 'conv.i' - Convert to native int this.conv_i1 = "67"; // MSIL: 'conv.i1' - Convert to 8-bit integer this.conv_i2 = "68"; // MSIL: 'conv.i2' - Convert to 16-bit integer this.conv_i4 = "69"; // MSIL: 'conv.i4' - Convert to 32-bit integer this.conv_i8 = "6A"; // MSIL: 'conv.i8' - Convert to 64-bit integer this.conv_ovf_i = "D4"; // MSIL: 'conv.ovf.i' - Convert to native int with overflow check this.conv_ovf_i_un = "8A"; // MSIL: 'conv.ovf.i.un' - Convert unsigned to native int with overflow check this.conv_ovf_i1 = "B3"; // MSIL: 'conv.ovf.i1' - Convert to 8-bit integer with overflow check this.conv_ovf_i1_un = "82"; // MSIL: 'conv.ovf.i1.un' - Convert to unsigned 8-bit integer with overflow check this.conv_ovf_i2 = "B5"; // MSIL: 'conv.ovf.i2' - Convert to 16-bit integer with overflow check this.conv_ovf_i2_un = "83"; // MSIL: 'conv.ovf.i2.un' - Convert to unsigned 16-bit integer with overflow check this.conv_ovf_i4 = "B7"; // MSIL: 'conv.ovf.i4' - Convert to 32-bit integer with overflow check this.conv_ovf_i4_un = "84"; // MSIL: 'conv.ovf.i4.un' - Convert to unsigned 32-bit integer with overflow check this.conv_ovf_i8 = "B9"; // MSIL: 'conv.ovf.i8' - Convert to 64-bit integer with overflow check this.conv_ovf_i8_un = "85"; // MSIL: 'conv.ovf.i8.un' - Convert to unsigned 64-bit integer with overflow check this.conv_ovf_u = "D5"; // MSIL: 'conv.ovf.u' - Convert to native unsigned int with overflow check this.conv_ovf_u_un = "8B"; // MSIL: 'conv.ovf.u.un' - Convert unsigned to native unsigned int with overflow check this.conv_ovf_u1 = "B4"; // MSIL: 'conv.ovf.u1' - Convert to unsigned 8-bit integer with overflow check this.conv_ovf_u1_un = "86"; // MSIL: 'conv.ovf.u1.un' - Convert unsigned to unsigned 8-bit integer with overflow check this.conv_ovf_u2 = "B6"; // MSIL: 'conv.ovf.u2' - Convert to unsigned 16-bit integer with overflow check this.conv_ovf_u2_un = "87"; // MSIL: 'conv.ovf.u2.un' - Convert unsigned to unsigned 16-bit integer with overflow check this.conv_ovf_u4 = "B8"; // MSIL: 'conv.ovf.u4' - Convert to unsigned 32-bit integer with overflow check this.conv_ovf_u4_un = "88"; // MSIL: 'conv.ovf.u4.un' - Convert unsigned to unsigned 32-bit integer with overflow check this.conv_ovf_u8 = "BA"; // MSIL: 'conv.ovf.u8' - Convert to unsigned 64-bit integer with overflow check this.conv_ovf_u8_un = "89"; // MSIL: 'conv.ovf.u8.un' - Convert unsigned to unsigned 64-bit integer with overflow check this.conv_r_un = "76"; // MSIL: 'conv.r.un' - Convert unsigned integer to floating-point this.conv_r4 = "6B"; // MSIL: 'conv.r4' - Convert to 32-bit float this.conv_r8 = "6C"; // MSIL: 'conv.r8' - Convert to 64-bit float this.conv_u = "E0"; // MSIL: 'conv.u' - Convert to native unsigned int this.conv_u1 = "D2"; // MSIL: 'conv.u1' - Convert to unsigned 8-bit integer this.conv_u2 = "D1"; // MSIL: 'conv.u2' - Convert to unsigned 16-bit integer this.conv_u4 = "6D"; // MSIL: 'conv.u4' - Convert to unsigned 32-bit integer this.conv_u8 = "6E"; // MSIL: 'conv.u8' - Convert to unsigned 64-bit integer this.isinst = "75????????"; // MSIL: 'isinst' - Test if object is instance of class this.mkrefany = "C6????????"; // MSIL: 'mkrefany' - Push typed reference to value this.refanytype = "FE1D"; // MSIL: 'refanytype' - Push type token from typed reference this.refanyval = "C2????????"; // MSIL: 'refanyval' - Push address from typed reference this.sizeof = "FE1C????????"; // MSIL: 'sizeof' - Get size of value type this.unbox = "79????????"; // MSIL: 'unbox' - Convert object reference to value type this.unbox_any = "A5????????"; // MSIL: 'unbox.any' - Convert boxed type to value // ========== OBJECT OPERATIONS ========== this.cpblk = "FE17"; // MSIL: 'cpblk' - Copy block of memory this.cpobj = "70????????"; // MSIL: 'cpobj' - Copy value type this.initblk = "FE18"; // MSIL: 'initblk' - Initialize block of memory this.initobj = "FE15????????"; // MSIL: 'initobj' - Initialize value type this.ldobj = "71????????"; // MSIL: 'ldobj' - Load value type from address this.ldstr = "72????????"; // MSIL: 'ldstr' - Load string literal this.localloc = "FE0F"; // MSIL: 'localloc' - Allocate space from local memory pool this.newobj = "73????????"; // MSIL: 'newobj' - Create new object instance this.stobj = "81????????"; // MSIL: 'stobj' - Store value type to address // ========== EXCEPTION HANDLING ========== this.endfilter = "FE11"; // MSIL: 'endfilter' - End exception filter clause this.endfinally = "DC"; // MSIL: 'endfinally' - End finally clause this.rethrow = "FE1A"; // MSIL: 'rethrow' - Rethrow current exception this._throw = "7A"; // MSIL: 'throw' - Throw exception // ========== PREFIX INSTRUCTIONS ========== this.constrained = "FE16????????"; // MSIL: 'constrained' - Constrain type for virtual method call this.no_ = "FE19??"; // MSIL: 'no.' - Skip fault check (typecheck, rangecheck, nullcheck) this.readonly = "FE1E"; // MSIL: 'readonly' - Subsequent array address operation performs no type check this.unaligned = "FE12??"; // MSIL: 'unaligned.' - Subsequent pointer instruction might be unaligned (alignment: 1, 2, or 4) this.volatile = "FE13"; // MSIL: 'volatile' - Subsequent pointer reference is volatile // ========== UTILITY OPCODES ========== this._unknown = "**"; // MSIL: - - Unknown opcode pattern (any byte except 0x00) this._any = "??"; // MSIL: - - Any single byte pattern this.arglist = "FE00"; // MSIL: 'arglist' - Return argument list handle /** * Sets strict operand values for MSIL opcodes with variable operands. * * This method replaces wildcard patterns ('??') in opcode masks with specific * hexadecimal values, allowing for precise bytecode pattern matching. * * @method setStrict * @param {string} opCodeMask - The opcode pattern with wildcards (e.g., "20????????") * @param {string} value - The hexadecimal value to substitute (e.g., "01 00 00 00") * @returns {string} The opcode pattern with substituted values * * @example * // Set ldc.i4 instruction to load constant value 1 * var pattern = opCodes.setStrict(opCodes.ldc_i4, "01 00 00 00"); * // Result: "2001000000" (ldc.i4 1) * * @example * // Set specific method token for call instruction * var callPattern = opCodes.setStrict(opCodes.call, "10 00 00 06"); * // Result: "2810000006" (call method token 0x06000010) * * @throws {Error} If operand size doesn't match the expected size */ this.setStrict = function (opCodeMask, value) { // Remove spaces from opcode mask and value opCodeMask = removeWhitespaces(opCodeMask); value = removeWhitespaces(value); // Find the index of the special pattern "??" in the opcode mask var indexOfSpecialPattern = opCodeMask.indexOf("??"); // Check if the opcode mask has a body (contains the special pattern "??") var isOpCodeMaskHasBody = indexOfSpecialPattern !== -1; // -1 if not found // Extract the opcode in hexadecimal var opCodeInHex = isOpCodeMaskHasBody ? opCodeMask.substring(0x00, indexOfSpecialPattern) : opCodeMask; // Check if the opcode mask has a body and the length of the body matches the length of the value if (isOpCodeMaskHasBody && opCodeMask.substring(opCodeInHex.length).length != value.length) { _error("The size of the input values does not match."); } // Combine the opcode in hexadecimal with the value return opCodeInHex + value; } /** * Sets all wildcard operands in an opcode pattern to zero bytes. * * This method replaces all wildcard patterns ('??') in the opcode mask with * zero bytes ('00'), useful for matching instructions with null/empty operands. * * @method setNullValue * @param {string} opCodeMask - The opcode pattern containing wildcards * @returns {string} The opcode pattern with all wildcards replaced by '00' * * @example * // Set ldc.i4 instruction to load zero value * var pattern = opCodes.setNullValue(opCodes.ldc_i4); * // Result: "2000000000" (ldc.i4 0) * * @example * // Create null branch instruction * var brPattern = opCodes.setNullValue(opCodes.br); * // Result: "3800000000" (br with zero offset) * * @throws {Error} If the opcode mask contains no wildcards to replace */ this.setNullValue = function (opCodeMask) { if (opCodeMask.indexOf("??") === -1) { _error("Instruction does not have a body to overwrite the value."); } return replaceAllInString(opCodeMask, "??", "00"); } /** * Joins an opcode without wildcards with additional bytes. * * This method concatenates opcodes that don't have wildcards (like switch) * with specific byte sequences, useful for instructions with variable-length operands. * * @method joinNoBodyAndValue * @param {string} opCode - The opcode without wildcards (e.g., "45" for switch) * @param {string} value - The hexadecimal bytes to append (e.g., "02 00 00 00 XX XX XX XX") * @param {string} [opCodeName] - Optional: name of the opcode variable for validation * @returns {string} The combined opcode pattern * * @example * // Create switch instruction with 2 targets * var switchPattern = opCodes.joinNoBodyAndValue(opCodes.switch__nobody, "02 00 00 00 10 00 00 00 20 00 00 00", "switch__nobody"); * // Result: "45020000001000000020000000" (switch with 2 targets at offsets 0x10 and 0x20) * * @throws {Error} If the opcode contains wildcards (should use setStrict instead) * @throws {Error} If opCodeName is provided but doesn't contain '__nobody' */ this.joinNoBodyAndValue = function (opCode, value, opCodeName) { // Type validation if (!opCode || typeof opCode !== "string") { _error("Invalid opcode provided."); } if (!value || typeof value !== "string") { _error("Invalid value provided."); } // Check that opcode doesn't contain wildcards if (opCode.indexOf("??") !== -1) { _error("Opcode contains wildcards. Use setStrict() instead."); } // Optional validation: check if opcode name contains '__nobody' if (opCodeName && typeof opCodeName === "string") { if (opCodeName.indexOf("__nobody") === -1) { _error("joinNoBodyAndValue should only be used with '__nobody' opcodes (variable-length instructions)."); } } return opCode + removeWhitespaces(value); } } /** * Removes all whitespace characters from a string including spaces, tabs, newlines, and carriage returns. * * @param {string} inputString - The input string to remove whitespaces from * @returns {string} The string with all whitespace characters removed, or an empty string if input is invalid */ function removeWhitespaces(inputString) { // Type validation to prevent runtime errors if (!inputString || typeof inputString !== "string") { return String(); } // Regex removes all whitespace: spaces, tabs, newlines, carriage returns return inputString.replace(/\s+/g, String()); } /** * Replaces all occurrences of a specified substring within a given string with a new substring. * Uses split/join algorithm for single-pass replacement. * * @param {string} inputString - The original string in which to perform the replacements. * @param {string} search - The substring to search for within the input string. * @param {string} replacement - The substring to replace each occurrence of the search substring with. * @returns {string} - The modified string with all occurrences of the search substring replaced by the replacement substring. */ function replaceAllInString(inputString, search, replacement) { // Type validation to prevent runtime errors if (!inputString || typeof inputString !== "string") { return String(); } if (!search || typeof search !== "string") { return inputString; } if (typeof replacement !== "string") { replacement = String(); } // Split on search string and join with replacement (single pass) return inputString.split(search).join(replacement); } /** * Sanitizes section names to prevent DiE output corruption from malformed PE files. * Removes control characters that could break console output or cause display issues. * * @param {string} sectionName - The section name to clean and sanitize. * @returns {string} - The sanitized section name safe for DiE output. */ function clearSectionName(sectionName) { // Type validation to prevent runtime errors if (!sectionName || typeof sectionName !== "string") { return String(); } // Remove control characters (0x00-0x1F) and extended control chars (0x7F-0x9F) // This prevents newlines, tabs, null bytes from breaking DiE output format var cleaned = sectionName.replace(/[\x00-\x1F\x7F-\x9F]/g, String()); // Remove leading/trailing whitespace cleaned = cleaned.trim(); return cleaned; } /** * Checks if a given string consists only of ASCII printable characters (ASCII range 0x20 to 0x7E). * * @param {string} inputString - The string to validate. * @returns {boolean} Returns true if the string contains only ASCII printable characters, otherwise false. */ function isAsciiString(inputString) { // Type validation to prevent runtime errors if (!inputString || typeof inputString !== "string") { return false; } return /^[\x20-\x7E]+$/.test(inputString); } /** * Returns the file name without its extension. * * @param {string} fileName - The name of the file, possibly including an extension. * @returns {string} The file name without the extension. If no extension is found, returns the original file name. */ function getFileNameWithoutExtension(fileName) { // Type validation to prevent runtime errors if (!fileName || typeof fileName !== "string") { return String(); } // Remove the file extension by splitting on the last dot and returning the first part var lastDotIndex = fileName.lastIndexOf("."); if (lastDotIndex === -1) { return fileName; // No extension found, return original name } return fileName.substring(0, lastDotIndex); } // #region "packers and cryptors (.NET and Native)" function scanForPackersAndCryptors_NET_and_Native() { // For .NET and Native apps log(logType.nothing, "Scanning for packers and cryptors..."); var options = String(); var isDetected = Boolean(), isCryptor = Boolean(); if (PE_Cached.isDotNet) { var isAssemblyInvokeFound = false; if (!isFrameworkComponent() && PE_Cached.nameOfNetModuleName !== "System.dll" && isAllNetReferencesPresent( // TODO: update [!!!] [ "System.Reflection", // System.Reflection.dll "get_EntryPoint", // MSIL: '*.Assembly::get_EntryPoint()' "Assembly", // MSIL: 'System.Reflection.Assembly' from System.Reflection.dll "Invoke", // MSIL: '*.MethodBase::Invoke(object, object[])' "Load" // MSIL: '*.Assembly::Load(uint8[])' ] )) { isAssemblyInvokeFound = true; options = "Assembly invoke"; } // Check if any class from System.Security.Cryptography namespace is used (non-full name) - for cryptors if (findAndMark("System.Security.Cryptography", false) != String()) { // Specify cryptography classes to look for const cryptoClasses = [ "TripleDESCryptoServiceProvider", "RSACryptoServiceProvider", "DSACryptoServiceProvider", "DESCryptoServiceProvider", "AesCryptoServiceProvider", "Rfc2898DeriveBytes", "TripleDES", "Rijndael", "ECDsaCng", "AesAEAD", "Aes192Cbc", "Aes256Cbc", "Aes128Cbc", "AesManaged", "AesCng", "RC2CryptoServiceProvider", "RNGCryptoServiceProvider" ]; // Iterate through cryptography classes for (var i = 0; i < cryptoClasses.length; i++) { if (!isCryptor) { var cryptoClassSign = cryptoClasses[i], result = findAndMark( cryptoClassSign, true ); // Check if assembly invoke is found and the cryptography class is present if (isAssemblyInvokeFound && result.length) { log(logType.net, "Crypto class present: " + cryptoClassSign); isCryptor = true; // Add the cryptography class to options options = addOption(options, cryptoClassSign); } } } } // Check if any class from System.IO.Compression namespace is used (non-full name) if (findAndMark("System.IO.Compression", false).length) { // Specify compression classes to look for const compressionClasses = [ "DeflateStream", "GZipStream" ]; // Iterate through compression classes for (var i = 0; i < compressionClasses.length; i++) { var compressionClassSign = compressionClasses[i], result = findAndMark(compressionClassSign, true); // Check if assembly invoke is found and the compression class is present if (isAssemblyInvokeFound && result.length) { log(logType.net, "Compression class present: " + compressionClassSign); // If it's a cryptor, add the compression class to options if (isCryptor) options = addOption(options, compressionClassSign); // Break the loop if a match is found break; } } } // RunPE is a method for running payload from RAM, with minimal writing to disk. var isRunPePresent = false; if (validateNetObject("RunPE") || validateNetObject("PELoader") || // https://github.com/nettitude/RunPE/blob/main/RunPE/Internals/PELoader.cs validateNetObject("CMemoryExecute") || // https://github.com/wojciech-kulik/Sample-Projects/blob/master/Windows%20Desktop/WIN32_MemoryAppLoader/MemoryAppLoader/CMemoryExecute.cs (validateNetObject("GetProcAddress") && validateNetUnicodeString("WriteProcessMemory") && validateNetUnicodeString("VirtualAllocEx") && validateNetUnicodeString("ZwUnmapViewOfSection")) || ( (validateNetObject("WriteProcessMemory") || validateNetObject("NtWriteVirtualMemory")) && (validateNetObject("ZwUnmapViewOfSection") || validateNetObject("NtUnmapViewOfSection")) && (validateNetObject("CreateProcess") || validateNetObject("NtCreateProcess") || validateNetObject("CreateProcessA") || validateNetObject("CreateProcessW")) && validateNetObject("VirtualAllocEx")) ) { log(logType.net, "RunPE-like behavior detected!"); isRunPePresent = true; } if (isRunPePresent) options = addOption(options, "RunPE"); } // Self-Extracting archives // TODO: Upgrade var isSfx = false; if (!PE_Cached.isDynamicLinkLibrary && PE.isOverlayPresent()) { const overlayPatterns = [ "'Rar!'", // samples by: WinRAR "'PK'03", // samples by: Zip SFX (by Intel) "';!@Install@!UTF-8!'", "'7z'BCAF271C", "efbbbf';!@Install@!UTF-8!'" // samples by: 7z ] for (var l = 0; l < overlayPatterns.length; l++) { if (PE.compareOverlay(overlayPatterns[l])) { log(logType.nothing, "SFX overlay pattern: " + overlayPatterns[l]); isSfx = true; } } if (!isSfx && !PE_Cached.isDotNet) { const sfxEntries = [ // "E8$$$$$$$$558BEC83EC..A1........8365....8365....5357BF........3BC7BB........74..85C374..F7D0", // samples by: WinZip // "558BEC6A..68........68........64A1........50648925........83....5356578965..FF15", // samples by: Zip SFX // "E8$$$$$$$$558BEC83EC..8365....8365....A1........5657BF........BE........3BC7", // samples by: WinRAR Installer // "E8$$$$$$$$8BFF558BEC83EC..A1........8365....8365....5357BF........BB", // samples by: Zip SFX // "558BEC83C4..B8........E8........33C05568........64FF30648920E8", // samples by: Zip SFX // "4883EC..E8$$$$$$$$48895C24..55488BEC4883EC..488365....48BB................488B05........483BC375", // samples by: WinRAR Installer "83EC..5657FF15........8BF08D4424..50C74424..........FF15........8A068B3D........3C..75..56FFD7", // samples by: Zip SFX "E9$$$$$$$$558BEC81EC........830D..........5356576A..33DBBF........68........895D..881D", // samples by: Microsoft Cabinet "558BEC83EC..56FF15........8BF08A003C..75..84C074..803E..74..46803E..75..803E..75..46EB", // samples by: Zip SFX "6A..33C0505050FF15........50E8$$$$$$$$55B8........8BECE8........53B9........5657BE", // samples by: Zip SFX "6A..68........E8........66813D............75..A1........81B8................75..", // samples by: Microsoft Cabinet "558BEC83EC..565733FFFF15........8BF0897D..8D45..50FF15........8A063C..75..56FF15", // samples by: Zip SFX "51526A..2EFF15........506A..6A..2EFF15........50E8........502EFF15........5A59C3", // samples by: WinIMP "558BEC81EC........535657FF15........A3........FF15........A1........6625....3D", // samples by: Microsoft Cabinet "558BECB8........E8........5356BE........578D45..5633DB5053FF15........85C00F84", // samples by: Zip SFX "A1........C1E0..A3........575133C0BF........B9........3BCF76..2BCFFCF3AA595F", // samples by: WinRAR Installer "558BEC83C4..5356E8$$$$$$$$E8........6A..E8........8905........E8........8905", // samples by: Zip SFX "FF15........B1..380874..B1..4080....74..380874..4080....75..80....74..4033", // samples by: WinZip "53FF15........B3..38..74..80C3..4033D28A083ACA74..3ACB74..408A083ACA75", // samples by: WinZip "558BEC83C4..535657E8........E8........33C05568........64FF30648920E8", // samples by: WinRAR "53FF15........B3..38..74..80C3..8A48..4033D23ACA74..3ACB74..8A48..40", // samples by: WinZip "E8$$$$$$$$53BB........E8........85C074..33D28A1083FA..75..40EB", // samples by: WinRAR "FFFE2A002A002A006D0065007300730061006700650073002A002A002A00", // samples by: WinRAR Installer "E8$$$$$$$$558BEC83C4..B8........53", // samples by: WinRAR Installer "8A48014033D23ACA740A3ACB74068A4801" // samples by: WinZip ] if (PE.isSectionNamePresent("_winzip_")) { isSfx = true; } if (PE_Cached.isArchX86) { for (var k = 0; k < sfxEntries.length; k++) { if (PE.compareEP(sfxEntries[k])) { log(logType.nothing, "EP like SFX: \"" + sfxEntries[k] + "\""); isSfx = true; } } } } } if (isSfx) options = addOption(options, "SFX"); var entryLikePacker = false; const entries = [ "53565755488D35........488DBE", // samples by: UPX (x64) "B8........68........64", // samples by: Petite (x32) "60..................E8", // samples by: Anticrack Software (x32) "33C08BC068........68", // samples by: ExE Pack (x32) "74..E9........60E8", // samples by: PE-PACK "EB0668........C39C", // samples by: PECompact (x32) "93071F05....8ED0BC", // samples by: aPack (x32) "60BE........8DBE", // samples by: UPX (x32) "B8........6A..68", // samples by: Petite (x32) "BE........AD8BF8", // samples by: WinUPack (x32) "68........9C60E8", // samples by: XComp, XPACK (x32) "53558BE833DBEB60", // samples by: WWPack (x32) "E8000000005D81ED", // samples by: ASPack (x32), TTP Pack (x32) "BD........C745", // samples by: kkrunchy (x32) "57565351524150", // samples by: mpress (x64) "B8........5064", // samples by: PECompact (x32) "8CCBBA....03DA", // // samples by: aPack (x32) "B8........669C", // samples by: Petite, Themida (x32) "E8........53", // samples by: Themida (x32), Safengine Shielden "8CC0FA8ED0BC", // samples by: PACKWIN (x32) "B8........60", // samples by: Petite, Themida (x32) "8B44240456", // samples by: ASDPack (x32) "1E068CC88E", // samples by: aPack (x32) "1E068CCBBA", // samples by: aPack (x32) "EB..9C60E8", // samples by: PECompact (x32) "9C60E8CA", // samples by: Petite (x??) "60FCBED4", // samples by: ANDPakk (x32) "60EB..5D", // samples by: ASPack (x32) "60EB..E8", // samples by: G!X Protector "64FF35", // samples by: Petite (x32) "6033C0", // samples by: yzPack (x32) "669C60", // samples by: Petite (x??) "EB..60", // samples by: kkryptor, dePACK (x32) "60E8", // samples by: mpress, Packman, Pack Master, Yodas Crypter, DxPack, ASPack, MSLRH, tElock (x32), WinUPack "6068", // samples by: BeRo, ExE Pack, AHPacker (x32) "9C60" // samples by: PEBundle (x32) ]; // Iterate through the entries to check against the entry point for (var e = 0; e < entries.length && !entryLikePacker; e++) { if (PE_Cached.isArchX86) { const entryToCheck = entries[e]; // If the entry point matches the current entry, set the flag to true and break the loop if (PE.compareEP(entryToCheck)) { log(logType.nothing, "EP like a packer: \"" + entryToCheck + "\""); entryLikePacker = true; } } } if (entryLikePacker) options = addOption(options, "EntryPoint"); // Check if the first instruction at entry point starts with a stack operation var isStartsWithStackOperation = false, firstEpAsmOpCode; // Get the opcode of the first instruction at entry point and check for specific stack operations if (PE_Cached.isArchX86) { firstEpAsmOpCode = getFirstEpAsmOpCode(); switch (firstEpAsmOpCode) { case "PUSHAL": case "PUSHA": case "PUSHF": case "POPA": log(logType.nothing, "\"" + firstEpAsmOpCode + "\" at EP"); isStartsWithStackOperation = true; } } else { firstEpAsmOpCode = getFirstEpAsmOpCode(); switch (firstEpAsmOpCode) { case "POP": case "STMDB": case "LDMIA": case "STMFD": case "LDMFD": log(logType.nothing, "\"" + firstEpAsmOpCode + "\" at EP"); isStartsWithStackOperation = true; } } if (isStartsWithStackOperation) options = addOption(options, firstEpAsmOpCode[0].toUpperCase() + firstEpAsmOpCode.toLowerCase().substring(1, firstEpAsmOpCode.length) + " at EP"); // Check if the entry point is in the last section var isLastSectionEP = false; if (!PE_Cached.isDynamicLinkLibrary) { if (PE_Cached.numberOfSections > 1) { // Get addresses of the last section and entry point var lastSectionAddress = -1, entryPointAddress = -1; // Get last section with non -1 address for (var i = 1; lastSectionAddress == -1; i++) { lastSectionAddress = PE.OffsetToVA(PE.getSectionFileOffset(PE_Cached.numberOfSections - i)); } entryPointAddress = PE.getAddressOfEntryPoint(); // Check if the entry point is greater than or equal to the last section address if (entryPointAddress >= lastSectionAddress) { log(logType.nothing, "EP address (0x" + entryPointAddress.toString(16) + ") more than last section address (0x" + lastSectionAddress.toString(16) + ")"); isLastSectionEP = true; } } } if (isLastSectionEP) options = addOption(options, "Last section EP"); // Check for strange calls if entry point is in the last section var isStrangeCallOrJmpPresent = false, firstOpCode; if (PE_Cached.isArchX86) { firstOpCode = getAsmOpCode(PE_Cached.firstEpAsmInstruction); if (!PE_Cached.isDynamicLinkLibrary) { if (isLastSectionEP && !PE.compareEP("E8 00 00 00 00") && (firstOpCode === "CALL" || firstOpCode === "JMP")) { log(logType.nothing, "Strange " + firstOpCode.toLowerCase() + " at EP to address: " + PE_Cached.firstEpAsmInstruction.split(" ")[1].toLowerCase()); isStrangeCallOrJmpPresent = true; } } } else { // ARM: Check for strange branch instructions firstOpCode = getAsmOpCode(PE_Cached.firstEpAsmInstruction); if (!PE_Cached.isDynamicLinkLibrary) { // ARM uses B (branch) and BL (branch with link) for jumps and calls if (isLastSectionEP && (firstOpCode === "B" || firstOpCode === "BL" || firstOpCode === "BX" || firstOpCode === "BLX")) { log(logType.nothing, "Strange " + firstOpCode.toLowerCase() + " at EP to address: " + PE_Cached.firstEpAsmInstruction.split(" ")[1].toLowerCase()); isStrangeCallOrJmpPresent = true; } } } if (isStrangeCallOrJmpPresent) options = addOption(options, "Strange " + firstOpCode.toLowerCase() + " at EP"); // Check for packers and protections by imports (hashes) var isImportsLikePacker = false; // [{Name}, {Version}, {ImportLibraryIndex}, {Hash/Hashes}, {Type (0 = packer, 1 = cryptor, 2 = protector, 3 = protection)}] // If {ImportLibraryIndex} is -1, it means the hash has no index var dbCollectionOfHashesDict = [ // packers ["UPX", "0.59-0.93", 0, 0xd4fdcab1, 0], // https://github.com/upx/upx ["UPX", "0.94-1.93", 0, 0x1d51299a, 0], ["UPX", "1.94-2.03", 0, [0xb3318086, 0x3778aab9], 0], ["UPX", "2.90-3.XX", 0, 0xf375ee03, 0], ["UPX", "2.90-3.XX", -1, 0xf737d853, 0], ["UPX", "3.91+", -1, [0x82a048fc, 0x554a1748], 0], ["PESpin", null, 2, 0xd4fdcab1, 0], ["NsPack", null, 0, 0xf375ee03, 0], // https://nspack.apponic.com/ ["NsPack", "3.X", 0, 0x86111e49, 0], // For .NET ["ASPack", "1.XX-2.XX", 0, 0x1272f45b, 0], // https://www.aspack.com/ ["ASPack", null, 0, 0xee6ea174, 0], ["MKFPACK", null, 0, 0x42b3e7f9, 0], ["MPRESS", null, 0, 0x174efb84, 0], // https://www.autohotkey.com/mpress/mpress_web.htm ["Packman", "0.0.0.1", 0, 0x174efb84, 0], ["Packman", "1.0", 0, 0x69076a83, 0], ["PECompact", "0.90-0.91", -1, 0xbea416d1, 0], // https://bitsum.com/portfolio/pecompact/ ["PECompact", "0.92-0.94", -1, 0x93312c2e, 0], ["PECompact", "0.97-0.971b", -1, 0xe6aa8495, 0], ["PECompact", "1.10b7-1.34", -1, 0xe4c11305, 0], ["PECompact", "1.30-1.40", 0, 0x9b3305ed, 0], ["PECompact", "1.40-1.84", 0, 0xcc5b2a3c, 0], ["PECompact", "2.40-3.XX", 0, 0x2652ce4f, 0], ["PECompact", "2.40-3.XX", -1, 0xdb8fbb75, 0], ["tElock", "1.0", -1, 0x051946f7, 0], // https://www.softpedia.com/get/Programming/Packers-Crypters-Protectors/Telock.shtml ["tElock", "0.98", 0, 0x3651f68d, 0], ["JDPACK", "2.00", 0, 0xc002db0e, 0], ["CRINKLER", null, 0, 0x0b0e1fbf, 0], ["XComp", "0.97-0.98", -1, 0xea1e66e4, 0], ["XPack", null, -1, [0x2ac44dd2, 0x6c170ab3], 0], ["kkrunchy", null, 0, 0x29188619, 0], // https://www.farbrausch.de/~fg/kkrunchy/ ["ANDPakk2", "0.18", -1, 0x29188619, 0], ["RLPack", "1.1-1.2", 0, 0x5bd1d713, 0], ["RLPack", "1.16+", 0, 0x6889715b, 0], ["Petite", "2.2", -1, 0x61e53682, 0], // https://www.un4seen.com/petite/ ["bambam", "0.1-0.4", 0, 0xb5b153cd, 0], ["py2exe", null, 2, 0xe5907ffa, 0], ["py2exe", null, -1, 0xc544ca52, 0], ["MEW", null, 0, 0x87214e52, 0], ["nPack", "1.1+", 0, 0xba8bf4be, 0], ["CExe", "1.0a", 0, 0xdcf764d2, 0], ["PE-PACK", "1.0", 0, 0xa4d96677, 0], ["BoxedApp", null, 0, 0x6206c0c2, 0], ["VPacker", "0.02.X", 0, 0xebc3bc90, 0], ["PKLITE32", "1.1", 0, [0x621f19fb, 0xee04c332], 0], ["PKLITE32", "1.1", 1, 0x184539e7, 0], ["PeX", "0.99", 0, 0x5fbf5fd8, 0], ["XComp", null, 0, 0x4bc52e77, 0], ["Fatpack", null, 0, 0x74244911, 0], // cryptors ["Yoda's Crypter", "1.X", -1, 0x1303a51b, 1], ["EXECryptor", "1.4-1.5", -1, 0xd1de53b5, 1], ["EXECryptor", "2.X", -1, 0xf51b2817, 1], ["Amber", null, -1, 0x97c72051, 1], ["Lumy", null, -1, 0x821669d5, 1], // protectors ["ASProtect", "1.XX-2.XX", 0, 0x1272f45b, 2], // https://www.asprotect.ru/ ["Shrinker", "3.2", 0, [0xb2a64858, 0x158af2d0, 0x49e8aa1f], 2], ["Shrinker", "3.5", 0, [0xe9ea0851, 0x3344b95d, 0x586088f3], 2], ["Enigma", "1.00-3.60", 0, 0xc002db0e, 2], // https://enigmaprotector.com/ ["Enigma", "2.XX", 0, 0xdd92de10, 2], ["Enigma", "3.70+", 0, 0xd04c7a50, 2], ["PCGUARD", "5.04-5.05", 0, [0x5a169c7a, 0x0b0b2965], 2], ["Vbs To Exe", null, 1, [0x2bc5f1f9, 0x009a2869, 0x5a7ce7d6, 0xe513a67d, 0x4d65f922], 2], ["eXPressor", "1.2", -1, [0x66b35c6e, 0x32f4466c], 2], // https://www.cgsoftlabs.ro/express.html ["eXPressor", "1.3", -1, [0x921d0280, 0xf51eba68, 0xbc84ce09], 2], ["eXPressor", "1.4.5.X", 0, [0x427816ab, 0x3c705cae, 0x4d02e093, 0x958a9ea2], 2], ["eXPressor", "1.5.0.X", -1, [0x7ababb5a, 0x95ca15e4, 0xbd41da20], 2], ["eXPressor", "1.6", -1, 0xca58fa0c, 2], ["eXPressor", "1.6", 0, 0x30bc0039, 2], ["eXPressor", "1.6.1", 0, 0xa5792a26, 2], ["eXPressor", "1.6.1", -1, 0x48ffd359, 2], ["VMProtect", "1.70", -1, 0x1ff3103f, 2], // https://vmpsoft.com/ ["VMProtect", "2.0.3-2.13", -1, 0x9d12b153, 2], ["VMProtect", "3.0.0", -1, 0x1e5500c1, 2], ["VMProtect", "3.0.9", -1, 0xc5fb6a4b, 2], ["VMProtect", "3.2.0-3.5.0", -1, 0x5caa99c7, 2], ["VMProtect", "3.6.0+", -1, [0x66e03954, 0xdae9f570], 2], ["YodasProtector", "1.0b", -1, 0x1303a51b, 2], ["ASM Guard", "2.XX+", -1, 0xf1e0d63b, 2], // https://github.com/DosX-dev/ASM-Guard ["Themida", "2.XX-3.XX", 0, 0x3ffccc8a, 2], ["Themida", null, 0, 0xad97c503, 2], [".NET Reactor", null, 0, 0x96be8e26, 2], // https://www.eziriz.com/dotnet_reactor.htm [".NET Reactor", null, 1, 0xb4cda32f, 2], ["Bat To Exe Converter", null, 0, 0x72a2ca64, 2], ["Vbs To Exe Converter", null, 0, 0x182aac68, 2], ["DNGuard", null, 0, 0x38432571, 2], // https://www.dnguard.net/ ["DNGuard", "4.9+", 0, 0x99f8b58e, 2], ["obfus.h", null, -1, 0x02f4771f, 2], // https://github.com/DosX-dev/obfus.h ; default, antidebug v1 ["Crunch", "1.0-2.0", 0, 0x615665dd, 2], ["Private EXE Protector", null, 0, 0xd89af68d, 2], // https://www.privacy-tutorials.com/private-exe-protector/ ["CodeVirtualizer", null, 4, 0x4fbeea23, 2], // https://www.oreans.com/CodeVirtualizer.php ["PELock", null, 0, [0x6eb8f6f1, 0xe571f715], 2], ["PELock", "2.X", 0, 0xe1689d7c, 2], ["CrypToCrack", "0.9.X", 0, 0x8b28bb4e, 2], ["DBPE", null, 0, [0x301ad755, 0x33406ae3], 2], ["Virbox", null, 0, 0xe6eb008d, 2], // https://lm-global.virbox.com/detail/virboxProtector.html ["Quick Batch File Compiler", null, -1, 0x347060fa, 2], // https://www.abyssmedia.com/quickbfc/ ["CodeVeil", null, 0, 0xd2c88a9c, 2] ]; const importValidatingResult = validateImportHashes(dbCollectionOfHashesDict); var versionByImportsDetected; if (importValidatingResult != null) { versionByImportsDetected = importValidatingResult[1]; log(logType.nothing, "Imports hash like " + importValidatingResult[0] + (versionByImportsDetected ? " (version " + versionByImportsDetected + ")" : String())); isImportsLikePacker = true; } // Clean up: release the dictionary dbCollectionOfHashesDict = undefined; if (isImportsLikePacker) options = addOption(options, "Imports like " + importValidatingResult[0] + (versionByImportsDetected ? " (v" + importValidatingResult[1] + ")" : String())); // Check for packers and protections by section names var isSectionNameLikePacker = false; // [{Name}, {Version}, {SectionNameSignature}] var dbCollectionOfSectionNamesDict = [ ["DBPE", null, " "], ["Themida", "2.XX", " "], // https://www.oreans.com/Themida.php ["Themida", "3.XX", [".imports", ".loadcon", ".themida", ".winlice"]], // . ["Themida", null, [".stub01", "WinLicen", ".v-lizer", "Themida "]], // . ["PEBundle", null, /^(PEB|peb)undle$/], // https://bitsum.com/pebundle.htm ["DZA Patcher", null, "yoda"], ["UPX", null, /^UPX[0-3]$/], // https://github.com/upx/upx ["VMProtect", null, /^\.vmp[0-3]$/], // https://vmpsoft.com/ [".NET Reactor", "2.XX", ".reacto"], // https://www.eziriz.com/dotnet_reactor.htm ["ACProtect", null, ".perplex"], // https://acprotect-standard.soft112.com/ ["ANDpakk2", null, "ANDpakk2"], ["ASM Guard", "2.XX", [".asmg", "ASMGUARD"]], // https://github.com/DosX-dev/ASM-Guard ["ASPack", "1.08-2.XX", ".adata"], // https://www.aspack.com/ ["ASPack", "2.XX", ".aspack"], // . ["ASPack", null, /^(\.)?ASPack$/], // . ["Alienyze", null, ".alien"], // https://alienyze.com/ ["BoxedApp", null, ".bxpck"], // https://www.boxedapp.com/ ["CodeVirtualizer", null, ".vlizer"], // https://www.oreans.com/CodeVirtualizer.php ["Enigma", null, /^\.enigma[12]$/], // https://enigmaprotector.com/ ["Eronana", null, ".packer"], // https://github.com/Eronana/packer ["MPRESS", null, /^\.MPRESS[12]$/], // https://www.autohotkey.com/mpress/mpress_web.htm ["NsPack", null, [/^(\.)?nsp[01]$/, /^PE[Pp][01]$/, ".Packer!"]], // https://nspack.apponic.com/ ["PE Diminisher", null, ".teraphy"], // https://web.archive.org/web/20060111104142/http://www.exetools.com/files/compressors/win/ped.zip ["PE-SHiELD", null, "PESHiELD"], // https://webscene.ir/tools/show/PE-SHIELD-0.25 ["PECompact", null, [/^PEC2(MO)?$/, /^pec(1)?$/]], // https://bitsum.com/portfolio/pecompact/ ["PELock", null, ["PELOCKnt", ".pelock"]], // https://www.pelock.com/ 💩 ["Petite", null, /^(\.)?petite$/], // https://www.un4seen.com/petite/ ["SecuROM", null, [/^\.cms_[dt]$/, ".securom", ".dsstext"]], // https://en.wikipedia.org/wiki/SecuROM ["StarForce", "3.X", [".sforce3", ".brick"]], // https://www.star-force.com/ ["Wise Installer", null, ".wise"], // https://wpkg.org/WISE_installer ["Gentee Installer", null, ".gentee"], // https://www.gentee.com/download/ ["Nullsoft Installer", null, ".ndata"], // https://sourceforge.net/projects/nsis/ ["WiX Installer", null, ".wixburn"], // https://github.com/wixtoolset ["BeRoEXEPacker", null, ["packerBY", "bero^fr "]], // https://blog.rosseaux.net/page/875fbe6549aa072b5ee0ac9cefff4827/BeRoEXEPacker ["Warbird", null, "?g_Encry"], // https://security-explorations.com/microsoft-warbird-pmp.html ["YodasCrypter", "1.X", "yC"], // https://sourceforge.net/projects/yodap/files/Yoda%20Crypter/1.3/yC1.3.zip/download ["eXPressor", null, /^\.ex_(cod|rsc)$/], // https://www.cgsoftlabs.ro/express.html ["kkrunchy", null, "kkrunchy"], // https://www.farbrausch.de/~fg/kkrunchy/ ["tElock", null, "UPX!"], // https://www.softpedia.com/get/Programming/Packers-Crypters-Protectors/Telock.shtml ["Private EXE Protector", null, [".-PEP-", ".TRIAL!", ".const"]], // https://github.com/NIKJOO/PEP ["AtomPePacker", null, ".ATOM"], // https://web.archive.org/web/20221012050538/https://github.com/ORCx41/AtomPePacker ["ExeStealth", null, "ExeS"], // https://web.archive.org/web/20250124130104/https://www.webtoolmaster.com/exestealth.htm ["RLPack", null, [".RLPack", ".packed"]], ["RLPack", null, "Obsidium"], // (Fake Obsidium section name) ["BattlEye", null, /^\.be[0-2]$/], // https://www.battleye.com/ (VMProtect-based) ["YodasProtector", "1.0b", [".y0da", ".yP"]], // https://yodap.sourceforge.net/ ["obfus.h", null, ".obfh"], // https://github.com/DosX-dev/obfus.h ["Windows PE Packer by Chenzs108", null, ".shell"], // https://github.com/czs108/Windows-PE-Packer ["SoftSentry", null, [/^_(stext|rdata|data|idata|rsrc|reloc)$/, ".prdata"]], // https://forum.exetools.com/showthread.php?t=1181 ["PE Lock Phantasm", "1.X", "DINGBOY"], // https://www.arteam.accessroot.com/download39d1.html ["XComp", null, /^\.XComp(0)?$/], // http://www.soft-lab.de/JoKo/ ["XVolkolak", null, ".xvlk"], // unpacker & reconstructor ["NetShield", null, "!Sugar"], // https://github.com/AdvDebug/NetShield_Protector ["Fatpack", null, ".fpack "], // https://github.com/Fatmike-GH/Fatpack ["Safengine Shielden", null, ".sedat"], // https://safengine.com/downloads/get-demo ["Inquartos Obfuscator", null, ".inq"], // http://www.vbnet.ru/forum/show.aspx?id=175877 ["WinUPack", null, [".ByDwing", ".Upack"]], // https://www.softpedia.com/get/PORTABLE-SOFTWARE/Compression-Tools/Windows-Portable-Applications-Portable-WinUpack.shtml ["Xenocode Postbuild", null, ".xcpad"], // https://download.cnet.com/xenocode-postbuild/3000-10250_4-10506240.html ["Alloy", null, ".alloy32"], ["Crinkler", null, "lz32.dll"], ["Crunch", "2.0", "BitArts"], ["CrypToCrack", null, ".ccp3p"], ["DxPack", "1.0", ["coderpub", ".reloc1"]], ["EXE Pack", null, "!EPack"], ["FishPE Shield", null, ".FishPE"], ["FishPE", null, ".FISHEP"], ["G!X Protector", null, ".g!x"], ["JDPack", null, ".jdpack"], ["Krypton", null, ["krypton", "YADO", "_!_!_!_"]], ["MEW", null, "MEW"], ["MaskPE", null, ".MaskPE"], ["Morphnah", "1.0.X", ".nah"], ["NakedPacker", null, /^\.naked[12]$/], ["NativeCryptor", null, /^(NATIVES|CONFIG|(F)?CRYPT)~$/], ["NeoLite", null, ".neolite"], ["PE-PACK", "1.0", "PEPACK!!"], ["Perplex", null, ".perplex"], ["RLP", null, ".rlp"], ["ORiEN", "2.XX", ".loader"], ["SC Pack", null, ".scpack"], ["SVK Protector", null, ["SVKP", /\.svkp( )?/]], ["SafeNet", null, /^\.AKS[1-3]$/], ["Shrinker", null, ".shrink1"], ["Simple Pack", null, ".spack"], ["Software Compress", null, "SoftComp"], ["StarForce", "4.X-5.X", ".ps4"], ["VCL", null, ".vcl"], ["VirtualizeProtect", null, "VProtect"], ["WWPack", null, ".WWPACK"], ["WWPack32", null, ".WWP32"], ["dePack", "1.3.5", ".depack"], ["hmimys", "1.3", "hmimys"], ["nPack", null, ".nPack"], ["yzPack", null, ".yzpack2"], ["NeoLite", null, ".neolit"], ["bambam", null, ".bedrock"], ["WibuKey", null, ".wibu"], ["Wibu CodeMeter", null, /^__wibu0[01]$/], ["AverCryptor", "1.0-1.02", [".avc", ".Polyene"]], ["Huan", null, ".huan"], ["Morphnah", "1.0.X", ".nah"], ["TSULoader", null, ".tsustub"], ["RPCrypt", null, /^\.R(Cryptor|PCrypt)$/], ["ExE Pack", null, ["!EPack", ".!ep"]], ["XerinFuscator", null, ".Xerin"], ["AZProtect 0001", null, "AZPR0001"], ["ExeShield", null, ".shield"], ["XPack", null, /^\.XPack(0)?$/], ["KByS", null, ".shoooo"], ["HyperTech Crackproof", null, "peC"], ["Byfron", null, /^\.byfron(1)?$/], ["DYAMAR", "1.3.X", /^\.dyamar[CD]$/], ["Alcatraz", null, ".0Dev"], ["Squishy", null, "logicoma"], ["DragonArmor", "0.0.4.1", /^(\.)?DAStub$/], ["EXECrypt", "1.0", "CRPT"], ["N-Code", "0.2", [".pepsi", "n-coded", ".vrs"]], ["NoodleCrypt", "2.X", [".Ncryo ", ".De-vir "]], ["TheArk", null, ["30cm", ".tw"]], ["Virbox", null, /^\.v(data[1-9]|irbox[1-9]?)$/], ["ElecKey", null, ".sstb"], ["PKLITE32", "1.1", ".pklstb"], [".BJFnt", "1.X", ".BJFnt"], ["Goliath", null, ".GOLIATH"], ["PE Encrypt", null, [".ice", ".lea"]], ["PECRYPT32", null, ".ficken"], ["PolyCrypt", "2.8", /^sec[0-9]$/], ["RCryptor", null, /^(\.)?RCryptor$/], ["SDProtector", null, ".data "], ["Shielden", null, ".sedata"], ["SimbiOZ", null, ".ximera"], ["LARP", "2.X", "SnD "], ["DalKrypt", "1.X", ".DalKiT"], ["Fish PE", "1.2-1.4", ".PEDATA"], ["NoobyProtect (Safengine)", null, "SE"], ["KeySec", null, ".ksec"], ["Lumy", null, ".lumy"], ["TomatoX", null, ".tomato"], ["PwdProtect", null, ".pwdprot"], ["ID Application", null, /^\.Prt(1)?$/], ["PETetris", null, "PETETRIS"] ]; const sectionNamesValidatingResult = validateSectionNames(dbCollectionOfSectionNamesDict.concat( (function () { var dbCollectionOfFakeSectionNamesDict = [ ["Enigma", /^(\.)?enigma$/i], ["UPX", [/^\.upx/i, /^upx/]], ["VMProtect", /^(\.)?vmp$/i], ["MPRESS", /^mpress/i], ["Denuvo", /denuvo/i], ["Themida", ".Themida"] ]; return dbCollectionOfFakeSectionNamesDict.map(function (entry) { return ["fake " + entry[0], null, entry[1]]; }); })() ).concat( [ ["a packer", null, [/p(a)?ck|sh(e)?ll|exe|^\.pe/i, /^PE/]], ["a cryptor", null, [/crypt|crpt|stub|enc|inj/i, /stb/]], ["a protector", null, [/(?!^prot$)prot|safe|lock|sec|virt|obf|guard|sh(ie)?ld/i, /DRM|drm/]] ] )); var versionBySectionDetected = String(); if (sectionNamesValidatingResult != null) { versionBySectionDetected = sectionNamesValidatingResult[1]; log(logType.nothing, "Sections like " + sectionNamesValidatingResult[0] + (versionBySectionDetected ? " (v" + versionBySectionDetected + ")" : String())); isSectionNameLikePacker = true; } // Clean up: release the dictionary dbCollectionOfSectionNamesDict = undefined; if (isSectionNameLikePacker) options = addOption(options, "Sections like " + sectionNamesValidatingResult[0] + (versionBySectionDetected ? " (v" + sectionNamesValidatingResult[1] + ")" : String())); // Check for packers and protections by resource names var isResourceNameLikePacker = false; // [{Name}, {Version}, {ResourceNameSignature}] var dbCollectionOfResourceNamesDict = [ ["Bat To Exe Converter", null, /^(?=[0-9A-F]{40}$)(?=.*[0-9])(?=.*[A-F])[0-9A-F]{40}$/], ["Fatpack", null, "FPACK"], ["Quick Batch File Compiler", null, "PLATFORMTARGETS"], ["ScriptCryptor", null, "AOPT"], ["ExeStealth", null, "TN"], [".NET Reactor", null, "__"], ["SoftEntry", null, "SENTRYABORTDLG"], ["ASM Guard", null, "ASMG.DLL"], ["UPX Protector", null, "SCAREBYTE"], ["Vbs To Exe", null, "B"], ["QQProtect", null, "QQPROTECT"] ]; const resourceNamesValidatingResult = validateResourceNames(dbCollectionOfResourceNamesDict); var versionByResourceDetected = String(); if (resourceNamesValidatingResult != null) { versionByResourceDetected = resourceNamesValidatingResult[1]; log(logType.nothing, "Resources like " + resourceNamesValidatingResult[0] + (versionByResourceDetected ? " (v" + versionByResourceDetected + ")" : String())); isResourceNameLikePacker = true; } // Clean up: release the dictionary dbCollectionOfResourceNamesDict = undefined; if (isResourceNameLikePacker) options = addOption(options, "Resources like " + resourceNamesValidatingResult[0] + (versionByResourceDetected ? " (v" + versionByResourceDetected + ")" : String())); // Check if there is a collision in sections var isCollisionInSectionsPresent = false; // Get section name collision between "0" and "1" const sectionNameCollision = PE.getSectionNameCollision("0", "1"); // Check if there is a collision if (sectionNameCollision.length) { log(logType.nothing, "Section names collision: \"" + clearSectionName(sectionNameCollision) + "\""); isCollisionInSectionsPresent = true; } if (isCollisionInSectionsPresent) options = addOption(options, "Sections collision (\"" + clearSectionName(sectionNameCollision) + "\")"); // Check if there are repeating section names var isSectionNamesRepeatingPresent = false; var sectionNamesDict = {}; for (var i = 0; i < PE_Cached.numberOfSections && !isSectionNamesRepeatingPresent; i++) { var sectionName = PE.getSectionName(i); sectionNamesDict[sectionName] = (sectionNamesDict[sectionName] || 0) + 1; if (sectionNamesDict[sectionName] > 1) { log(logType.nothing, "Section names repeating: \"" + clearSectionName(sectionName) + "\""); isSectionNamesRepeatingPresent = true; } } // Clean up: release the dictionary sectionNamesDict = undefined; if (isSectionNamesRepeatingPresent) options = addOption(options, "Section names repeating"); // Check for compressed sections using entropy var isCompressedSectionPresent = false; var compressedSectionIndex = -1; for (var t = 0; t < PE_Cached.numberOfSections && !isCompressedSectionPresent; t++) { compressedSectionIndex = t; if (PE.calculateEntropy(PE.getSectionFileOffset(compressedSectionIndex), PE.getSectionFileSize(compressedSectionIndex)) > 7.4) { log(logType.any, "Section #" + compressedSectionIndex + " (\"" + clearSectionName(PE.getSectionName(compressedSectionIndex)) + "\") entropy: " + PE.calculateEntropy(PE.getSectionFileOffset(compressedSectionIndex), PE.getSectionFileSize(compressedSectionIndex))); isCompressedSectionPresent = true; } } if (isCompressedSectionPresent) options = addOption(options, "Section #" + compressedSectionIndex + " (\"" + clearSectionName(PE.getSectionName(compressedSectionIndex)) + "\") compressed"); var standardSectionsWithUnusualValuesDict = [".bss", "BSS", ".tls", "hydrated"]; // Check for sections with strange characteristics var isSectionHasWrongOffsetOrSize = false; var sectionWithWrongOffsetOrSizeIndex = -1; var wrongOffset = false, wrongSize = false; for (var t = 0; t < PE_Cached.numberOfSections && !isSectionHasWrongOffsetOrSize; t++) { sectionWithWrongOffsetOrSizeIndex = t; if (standardSectionsWithUnusualValuesDict.indexOf(PE.getSectionName(sectionWithWrongOffsetOrSizeIndex)) === -1) { const currentSection = PE.section[sectionWithWrongOffsetOrSizeIndex]; // Todo: add more checks if (currentSection.FileOffset === 0x00 || currentSection.FileOffset > (PE.getSize() - PE.getOverlaySize())) { wrongOffset = true; } if (currentSection.FileSize === 0x00 || currentSection.FileSize > (PE.getSize() - PE.getOverlaySize())) { wrongSize = true; } isSectionHasWrongOffsetOrSize = wrongOffset || wrongSize; if (isSectionHasWrongOffsetOrSize) { log(logType.any, "Section #" + sectionWithWrongOffsetOrSizeIndex + " (\"" + clearSectionName(PE.getSectionName(sectionWithWrongOffsetOrSizeIndex)) + "\") has wrong " + (wrongOffset ? "offset (0x" + currentSection.FileOffset.toString(16) + ")" : String()) + (wrongOffset && wrongSize ? ", " : String()) + (wrongSize ? "size (0x" + currentSection.FileSize.toString(16) + ")" : String())); } } } if (isSectionHasWrongOffsetOrSize) options = addOption(options, "Section #" + sectionWithWrongOffsetOrSizeIndex + " (\"" + clearSectionName(PE.getSectionName(sectionWithWrongOffsetOrSizeIndex)) + "\") has wrong " + (wrongOffset ? "offset" : String()) + (wrongOffset && wrongSize ? " and " : String()) + (wrongSize ? "size" : String())); // Check for sections with identical offsets var isSectionHasDuplicateOffset = false; var currentSectionIndex = -1; var firstSectionIndex = 0, firstSectionName = String(), secondSectionIndex = 0, secondSectionName = String(); var sectionOffsetsDict = {}; for (var i = 0; i < PE_Cached.numberOfSections && !isSectionHasDuplicateOffset; i++) { currentSectionIndex = i; if (standardSectionsWithUnusualValuesDict.indexOf(PE.getSectionName(currentSectionIndex)) === -1) { var currentSectionOffset = PE.section[currentSectionIndex].FileOffset; if (currentSectionOffset !== 0) { if (typeof sectionOffsetsDict[currentSectionOffset] === "undefined") { sectionOffsetsDict[currentSectionOffset] = [currentSectionIndex]; } else { log(logType.any, "Section #" + sectionOffsetsDict[currentSectionOffset][0] + " (\"" + clearSectionName(PE.getSectionName(sectionOffsetsDict[currentSectionOffset][0])) + "\") and #" + currentSectionIndex + " (\"" + clearSectionName(PE.getSectionName(currentSectionIndex)) + "\") have one offset: 0x" + currentSectionOffset.toString(16)); firstSectionIndex = sectionOffsetsDict[currentSectionOffset][0]; secondSectionIndex = currentSectionIndex; firstSectionName = clearSectionName(PE.getSectionName(firstSectionIndex)); secondSectionName = clearSectionName(PE.getSectionName(secondSectionIndex)); isSectionHasDuplicateOffset = true; } } } } // Clean up: release the dictionary sectionOffsetsDict = undefined; if (isSectionHasDuplicateOffset) options = addOption(options, "Section #" + firstSectionIndex + " (\"" + firstSectionName + "\") and #" + secondSectionIndex + " (\"" + secondSectionName + "\") have one offset"); // Check for 'MZ' signature in the overlay var isPeAtOverlayDetected = false; if (PE.isOverlayPresent() && PE.getOverlaySize() >= 100 && PE.compareOverlay("'MZ'")) { log(logType.any, "PE signature at overlay detected"); isPeAtOverlayDetected = true; } if (isPeAtOverlayDetected) options = addOption(options, "PE at overlay"); // Check for a strange overlay in the PE file var hasStrangeOverlay = false; // Conditions to check for a strange overlay if (!isPeAtOverlayDetected && !isSfx && !PE.isSigned() && PE.isOverlayPresent()) { var overlayEntropy = PE.calculateEntropy(PE.getOverlayOffset(), PE.getOverlaySize()); if ( PE.getOverlaySize() > 150 && overlayEntropy > 7 || PE.getOverlaySize() > (PE.getSize() - PE.getOverlaySize()) ) { log(logType.any, "Overlay size: " + PE.getOverlaySize() + " bytes; Entropy: " + overlayEntropy); hasStrangeOverlay = true; } } if (hasStrangeOverlay) options = addOption(options, "Strange overlay"); // Checks if a PE file is embedded in the resources var isPeInResourcesPresent = false; for (var i = 0; i < PE_Cached.numberOfUnmanagedResources && !isPeInResourcesPresent; i++) { const resourceOffset = PE.getResourceOffsetByNumber(i); if (PE.compare("'MZ'", resourceOffset)) { log(logType.any, "PE signature in resources detected"); isPeInResourcesPresent = true; } } if (isPeInResourcesPresent) options = addOption(options, "PE in resources"); // Flag to indicate high entropy var isHighEntropy = false; // Checks for high entropy (ignore overlay) if (!(PE_Cached.isDynamicLinkLibrary && (PE.section[".rdata"] || PE.isSectionNamePresent(".rsrc"))) && // .dll with resources PE.calculateEntropy(0x00, PE.getSize() - PE.getOverlaySize()) > 7.3) { isHighEntropy = true; } if (isHighEntropy) options = addOption(options, "High entropy"); // Check for recurring import names var recurringImports = false; var importNamesDict = {}; if (!_isResultPresent("linker", "Turbo Linker")) { // Ignore Delphi for (var i = 0; i < PE_Cached.numberOfUnmanagedImports && !recurringImports; i++) { var name = PE.getImportLibraryName(i); importNamesDict[name] = (importNamesDict[name] || 0) + 1; if (importNamesDict[name] >= 3) { log(logType.nothing, "Recurring import name: \"" + name + "\""); recurringImports = true; } } } // Clean up: release the dictionary importNamesDict = undefined; if (recurringImports) options = addOption(options, "Recurring import names"); if (isImportsLikePacker && !_getNumberOfResults("packer") && !_getNumberOfResults("cryptor") && !_getNumberOfResults("protector") && !_getNumberOfResults("protection")) { var typeOfDetectedItem = String(); switch (importValidatingResult[4]) { case 0: typeOfDetectedItem = "packer"; break; case 1: typeOfDetectedItem = "cryptor"; break; case 2: typeOfDetectedItem = "protector"; break; case 3: typeOfDetectedItem = "protection"; break; } if (typeOfDetectedItem) { var version = String(), importAndSectionValidationVerdictsDiffer = false; if (importValidatingResult[1]) { version = importValidatingResult[1]; } else if (isSectionNameLikePacker && !/^(a [pc]|fake )$/.test(sectionNamesValidatingResult[0])) { if (importValidatingResult[0] === sectionNamesValidatingResult[0]) { // is same result if (sectionNamesValidatingResult[1]) { version = sectionNamesValidatingResult[1]; } } else { // Inconsistency of verdicts importAndSectionValidationVerdictsDiffer = true; } } _setResult("~" + typeOfDetectedItem, importValidatingResult[0] + (importAndSectionValidationVerdictsDiffer ? "-like" : String()), version, "Suspicion only"); } } if (options.length != 0) isDetected = true; if (isDetected) { var detectedType = isCryptor ? "cryptor" : "packer"; _setResult("~" + detectedType, "Generic", String(), PE.isVerbose() ? options : String()); } } // #endregion // #region "licensing systems (.NET and Native)" function scanForLicensingSystems_NET_and_Native() { // For .NET and Native apps log(logType.nothing, "Scanning for licensing systems..."); var options = String(); var isDetected = Boolean(); if (PE_Cached.isDotNet) { var isLicenseCheckingPresent = false; if (validateNetObject("CheckLicense") || validateNetObject("set_License") || validateNetObject("Licensing")) { isLicenseCheckingPresent = true; } if (isLicenseCheckingPresent) options = "DotNET methods"; // https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.licenseproviderattribute var isLicenseProviderPresent = false; if (validateNetObject("LicenseProviderAttribute")) { isLicenseProviderPresent = true; } if (isLicenseProviderPresent) options = addOption(options, "Provider attribute"); // https://learn.microsoft.com/ru-ru/dotnet/api/system.componentmodel.licensemanager var isLicenseManagerPresent = false; if (validateNetObject("LicenseManager")) { isLicenseManagerPresent = true; } if (isLicenseManagerPresent) options = addOption(options, "License manager"); } // Check for licensing strings var isInterestingStringsFound = false; const licesingStrings = [ /*[E]*/ "nter serial ", /*[S]*/ "erial key ", " activate ", " trial ", /*[W]*/ "rong activation", /*[W]*/ "rong licens", /*[L]*/ "icense expire", "valid license", /*[L]*/ "icense key", " full version", " purchase a "]; for (var i = 0; i < licesingStrings.length; i++) { const currentPatternToFind = licesingStrings[i]; if (PE.isSignaturePresent(0x00, PE.getSize(), "'" + currentPatternToFind + "'") || PE.isSignaturePresent(0x00, PE.getSize(), "'" + generateUnicodeSignatureMask(currentPatternToFind) + "'")) { isInterestingStringsFound = true; break; } } if (isInterestingStringsFound) options = addOption(options, "Strings"); var isDenuvoLibraryPresent = false; if (PE.isLibraryPresentExp(/(Core\\Activation|Activation64)/i)) { isDenuvoLibraryPresent = true; } if (isDenuvoLibraryPresent) options = addOption(options, "Denuvo DRM"); if (options.length != 0) isDetected = true; if (isDetected) { _setResult("~licensing", "Contains", String(), PE.isVerbose() ? options : String()); } } // #endregion // #region "corrupted data (.NET and Native)" function scanForBadFileFormat_NET_and_Native() { log(logType.nothing, "Scanning for corrupted data..."); var options = String(); var isDetected = Boolean(); // EP check var isEntryPointIncorrect = false; if (!PE.isEntryPointCorrect()) { isEntryPointIncorrect = true; } if (isEntryPointIncorrect) options = addOption(options, "EntryPoint"); // Section alignment check var isSectionAlignmentIncorrect = false; if (!PE.isSectionAlignmentCorrect()) { isSectionAlignmentIncorrect = true; } if (isSectionAlignmentIncorrect) options = addOption(options, "Section alignment"); // File alignment check var isFileAlignmentIncorrect = false; if (!PE.isFileAlignmentCorrect()) { isFileAlignmentIncorrect = true; } if (isFileAlignmentIncorrect) options = addOption(options, "File alignment"); // Check for correct header var isHeaderIncorrect = false; if (!PE.isHeaderCorrect()) { isHeaderIncorrect = true; } if (isHeaderIncorrect) options = addOption(options, "Header"); // Check for correct section headers var isRelocsTableIncorrect = false; if (!PE.isRelocsTableCorrect()) { isRelocsTableIncorrect = true; } if (isRelocsTableIncorrect) options = addOption(options, "Relocs"); // Check IAT (Import Address Table) // Can be destroyed when the PE dumped from memory var isImportTableIncorrect = false; if (!PE.isImportTableCorrect()) { isImportTableIncorrect = true; } if (isImportTableIncorrect) options = addOption(options, "IAT"); // Check EAT (only for .dll) var isExportTableIncorrect = false; if (PE_Cached.isDynamicLinkLibrary && !PE.isExportTableCorrect()) { isExportTableIncorrect = true; } if (isExportTableIncorrect) options = addOption(options, "EAT"); // Check for resources table var isResourcesTableIncorrect = false; if (!PE.isResourcesTableCorrect()) { isResourcesTableIncorrect = true; } if (isResourcesTableIncorrect) options = addOption(options, "Resources"); // Check for corrupted DotNET data var isNetImportsCorrupted = false; if (!PE_Cached.isDotNet && isNetMetaDataPresent() && PE_Cached.numberOfUnmanagedImports == 0) { isNetImportsCorrupted = true; } if (isNetImportsCorrupted) options = addOption(options, "DotNET headers/meta"); // Check for corrupted DotNET CLR version var isNetClrVersionCorrupted = false; if (PE_Cached.isDotNet && !isAsciiString(PE.getNETVersion())) { isNetClrVersionCorrupted = true; } if (isNetClrVersionCorrupted) options = addOption(options, "DotNET CLR version"); if (options.length != 0) isDetected = true; if (isDetected) { _setResult("~corrupted data", "Generic", String(), PE.isVerbose() ? options : String()); } } // #endregion // #region "debug data (.NET and Native)" function scanForDebugData_NET_and_Native() { // For .NET and Native apps log(logType.nothing, "Scanning for debug data..."); var options = String(); var isDetected = Boolean(); // Check for sections with debug data by name var isDebugSectionPresent = false; var debugSectionIndex = -1; for (var i = 0; i < PE_Cached.numberOfSections && !isDebugSectionPresent; i++) { debugSectionIndex = i; const currentSectionName = PE.getSectionName(i); if (/(debug|^\.stab(str)?$)/i.test(currentSectionName)) { // Detects TCC/GCC and modern LLVM debug sections log(logType.any, "Debug section detected: \"" + clearSectionName(PE.getSectionName(debugSectionIndex)) + "\""); isDebugSectionPresent = true; } } if (isDebugSectionPresent) options = "Section #" + debugSectionIndex + " (\"" + clearSectionName(PE.getSectionName(debugSectionIndex)) + "\")"; // .NET Native debug header, EAT function var isNetNativeDebugDataPresent = false; if (!PE_Cached.isDotNet && PE.isExportFunctionPresent("DotNetRuntimeDebugHeader")) { log(logType.any, ".NET Native debug symbols detected"); isNetNativeDebugDataPresent = true; } if (isNetNativeDebugDataPresent) options = addOption(options, "DotNET runtime header"); // Check for -Wl,--export-all-symbols linker option var isSymbolsExported = false; if (!PE_Cached.isDynamicLinkLibrary && PE.isExportFunctionPresent("main")) { log(logType.any, "The \"--export-all-symbols\" linker option was probably used"); isSymbolsExported = true; } if (isSymbolsExported) options = addOption(options, "Symbols exported"); // Check for absolute PDB path var isPdbFullPathPresent = false; var pdbExtensionPatternOffset = PE.findSignature( PE.getDosStubOffset() + PE.getDosStubSize(), PE.getSize() - PE.getOverlaySize(), "%% %% %% '.pdb' 00" ); var pdbPathBeginOffset = 0, pdbPath = String(); if (pdbExtensionPatternOffset !== -1) { for (var i = pdbExtensionPatternOffset; i > 0; i--) { if (PE.readByte(i) === 0x00) { pdbPathBeginOffset = i + 1; break; } } pdbPath = PE.getString(pdbPathBeginOffset, 256); if (pdbPath.length > 255) pdbPath = pdbPath.substring(0, 255) + " . . ."; pdbPath = pdbPath.replace(/[\n\r]/g, String()); if (pdbPath.match(/^[a-zA-Z]:\\/) !== null) { log(logType.any, "PDB absolute path: \"" + pdbPath + "\""); isPdbFullPathPresent = true; } } if (isPdbFullPathPresent) options = addOption(options, "Absolute PDB path"); // Check for portable (relative path) or embedded PDB var isPortableOrEmbeddedPdbDetected = false; var pdbTextType = String(); if (pdbPath && pdbPath[0] !== '.' && !isPdbFullPathPresent) { pdbTextType = validateSignature("00 52 53 44 53") ? "Embedded" : "Portable"; log(logType.any, pdbTextType + " PDB name: \"" + pdbPath + "\""); isPortableOrEmbeddedPdbDetected = true; } if (isPortableOrEmbeddedPdbDetected) options = addOption(options, pdbTextType + " PDB (release)"); // Check for Costura.Fody embedded PDB. It is a .NET tool (library) that embeds DLL builds into the main assembly. var isCosturaEmbeddedDebugData = false; if (PE_Cached.isDotNet && validateNetObject("costura.costura.pdb.compressed")) { log(logType.any, "Costura embedded PDB detected"); isCosturaEmbeddedDebugData = true; } if (isCosturaEmbeddedDebugData) options = addOption(options, "Costura.Fody embedded PDB"); if (options.length != 0) isDetected = true; if (isDetected) { _setResult("~debug data", "Contains", String(), PE.isVerbose() ? options : String()); } } // #endregion /** * Checks if the .NET Visual Basic standard library is present. * * @returns {boolean} True if the Microsoft.VisualBasic library is found; otherwise false. */ function isVbNetStandardLibraryPresent() { return PE.isNetObjectPresent("Microsoft.VisualBasic"); } /** * Checks if the .NET JScript standard library is present. * * @returns {boolean} True if the Microsoft.JScript library is found; otherwise false. */ function isJscriptNetStandardLibraryPresent() { return PE.isNetObjectPresent("Microsoft.JScript"); } /** * Determines if the current PE file is a .NET component. * * @returns {boolean} Returns true if the PE file is identified as a .NET component, otherwise false. */ function isFrameworkComponent() { if (!PE_Cached.isDotNet || !PE_Cached.isDynamicLinkLibrary || PE_Cached.isNetGlobalCctorPresent) { return false; } const buildAssemblyName = PE_Cached.nameOfNetAssemblyName, buildModuleName = PE_Cached.nameOfNetModuleName; if (buildAssemblyName.length >= 6 && buildAssemblyName.substring(0, 6) === "System" && buildModuleName === (buildAssemblyName + ".dll")) { return true; } return false; } /** * Validates the presence of a signature (pattern) within a specified range in a PE file. * * Searches for the given pattern starting from the DOS stub end until the PE size excluding the overlay. * Logs a message if the pattern is found and returns a boolean indicating the result. * * @param {string} pattern - The pattern to search for within the file. * @returns {boolean} True if the pattern is found, false otherwise. */ function validateSignature(pattern) { const offsetFound = PE.findSignature(PE.getDosStubOffset() + PE.getDosStubSize(), PE.getSize() - PE.getOverlaySize(), pattern), resultBool = offsetFound != -1; if (resultBool) { lastOffsetDetected = "0x" + Number(offsetFound).toString(16); log(logType.any, "Pattern found: " + pattern); } return resultBool; } /** * Searches all sections in the current PE file for the specified byte code. * If discovered, logs the offset at which it appears and returns true. * * @param {string} byteCode - The byte code signature to locate. * @returns {boolean} True if the byte code is found in any section, otherwise false. */ function validateNetByteCode(byteCode) { for (var s = 0; s < PE_Cached.numberOfSections; s++) { const sectionOffset = PE.getSectionFileOffset(s), sectionSize = PE.getSectionFileSize(s); var offsetFound = PE.findSignature(sectionOffset, sectionOffset + sectionSize, byteCode); if (offsetFound != -1) { lastOffsetDetected = "0x" + Number(offsetFound).toString(16); log(logType.net, "ByteCode detected: " + byteCode); return true; } } return false; } /** * Validates if the given .NET object is present in the PE file. * * @param {Object} object - The object to be validated. * @returns {boolean} - Returns true if the object is a .NET object, otherwise false. */ function validateNetObject(object) { const result = PE.isNetObjectPresent(object); if (result) log(logType.net, "Object present: " + object); return result; } /** * Validates if a .NET Unicode string is present in the PE file. * * @param {string} ustring - The Unicode string to validate. * @returns {boolean} - Returns true if the Unicode string is present, otherwise false. */ function validateNetUnicodeString(ustring) { const result = PE.isNetUStringPresent(ustring); if (result) log(logType.net, "String present: \"" + ustring + "\""); return result; } /** * Validates if a given Unicode string exists within the PE file. * * This function searches for the specified Unicode string within the PE file's * memory range, excluding the DOS stub and overlay sections. If the string is * found, it logs a message indicating the presence of the string. * * @param {string} ustring - The Unicode string to search for within the PE file. * @returns {boolean} - Returns true if the Unicode string is found, otherwise false. */ function validateGlobalUnicodeString(ustring) { const result = PE.findSignature(PE.getDosStubOffset() + PE.getDosStubSize(), PE.getSize() - PE.getOverlaySize(), generateUnicodeSignatureMask(ustring)) != -1; if (result) log(logType.nothing, "Unicode string found: \"" + ustring + "\""); return result; } /** * Generates a Unicode signature mask for the given input string. * * This function iterates through each character in the input string and appends * its Unicode representation to the output string. The first character is appended * without a prefix, while subsequent characters are prefixed with "00". * * "test" -> "'t'00'e'00's'00't'" * * @param {string} ustring - The input string for which to generate the Unicode signature mask. * @returns {string} The generated Unicode signature mask. */ function generateUnicodeSignatureMask(ustring) { var output = String(); // Iterate through each character in the input string for (var c = 0; c < ustring.length; c++) { // Append the Unicode representation of the character to the output output += (c != 0 ? "00" : String()) + "'" + ustring[c] + "'"; } // Return the generated Unicode signature mask return output; } /** * Checks if all .NET references in the provided array are missing. * * @param {Array} references - An array of .NET references to check. * @returns {boolean} - Returns true if all .NET references are missing, otherwise false. */ function isAllNetReferencesMissing(references) { // Iterate through the array of .NET references for (var i = 0; i < references.length; i++) { // Get the current reference const ref = references[i]; // If the .NET object corresponding to the reference is present, return false if (PE.isNetObjectPresent(ref)) { return false; } } // If all .NET references are missing, return true return true; } /** * Checks if all .NET references are present. * * @param {Array} references - An array of .NET references to check. * @returns {boolean} - Returns true if all .NET references are present, otherwise false. */ function isAllNetReferencesPresent(references) { // Iterate through the array of .NET references for (var i = 0; i < references.length; i++) { // Get the current reference const ref = references[i]; // If the .NET object corresponding to the reference is not present, return false if (!PE.isNetObjectPresent(ref)) { return false; } } // If all .NET references are present, return true return true; } /** * Searches for a signature in the first section of a PE file and marks it if found. * * @param {string} sign - The signature to search for. * @param {boolean} isFullName - A flag indicating whether to append '00' to the signature. * @returns {string} - The found signature if present, otherwise an empty string. */ function findAndMark(sign, isFullName) { if (PE.isSignatureInSectionPresent(0, ("00'" + sign + "'") + // 00'string (isFullName ? "00" : String()))) { // ... '00 return sign; } return String(); } /** * Determines if a given string name is obfuscated. * * The function checks for obfuscation in two cases: * 1. If the name contains spaces, it splits the name into tokens and checks each token for obfuscation. * 2. If the name does not contain spaces, it checks each chunk of the string (of size 20) for obfuscation. * * Logs a message if an obfuscated segment or chunk is found. * * @param {string} name - The string to analyze for obfuscation. * @returns {boolean} True if the name or any of its segments/chunks are obfuscated, false otherwise. */ function isNameObfuscated(name) { if (!name || name.length === 0) return false; if (name.indexOf(' ') !== -1) { const tokens = name.split(/\s+/); for (var i = 0; i < tokens.length; i++) { var currentToken = tokens[i]; // If it starts with an abbreviation and the string is separated by a space, then it is not obfuscated (samples: The Last Of Us: II Remastered resource files) if (i == 0 && currentToken.match(/^[A-Z]{3,}/)) { return false; } if (isTokenObfuscated(currentToken)) { log(logType.nothing, "Obfuscated string segment: \"" + currentToken + "\" in \"" + name + "\""); return true; } } return false; } // Split the name into chunks const CHUNK_SIZE = 20; for (var start = 0; start < name.length; start += CHUNK_SIZE) { const chunk = name.substring(start, start + CHUNK_SIZE); if (isTokenObfuscated(chunk)) { log(logType.nothing, "Obfuscated string chunk: \"" + chunk + "\" in \"" + name + "\""); return true; } } return false; } /** * Determines whether a given token is considered obfuscated based on advanced heuristics. * * The function checks for: * - Tokens shorter than 7 characters are automatically considered clean * - Common legitimate patterns (dates, versions, UUIDs, etc.) * - Hexadecimal strings (8+ chars) like 'd3adc0de' * - Regular expression patterns indicating mixed alphanumeric sequences * - Statistical character analysis with entropy detection * - Repetitive pattern detection * * @param {string} token - The string token to analyze * @returns {boolean} True if token matches obfuscation patterns, false otherwise */ function isTokenObfuscated(token) { if (!token || token.length < 7) return false; // === WHITELIST: Common legitimate patterns === // Date patterns: YYYY-YYYY, DD.MM.YYYY, YYYY-MM-DD if (token.match(/^\d{4}[-\/\.]\d{4}$/) || token.match(/^\d{1,2}[-\/\.]\d{1,2}[-\/\.]\d{2,4}$/) || token.match(/^\d{4}[-\/\.]\d{1,2}[-\/\.]\d{1,2}$/)) return false; // Version numbers: v1.2.3, 1.0.0.0, 10.15.7 if (token.match(/^v?\d+(\.\d+){1,4}$/i)) return false; // UUIDs: 550e8400-e29b-41d4-a716-446655440000 if (token.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)) return false; // Common hex prefixes: 0x1234ABCD, 0X1A2B3C4D if (token.match(/^0x[0-9a-f]+$/i)) return false; // File sizes with units: 123KB, 45.6MB, 1.5GB if (token.match(/^\d+(\.\d+)?(bytes?|[kmgt]b)$/i)) return false; // IP addresses: 192.168.1.1 if (token.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)) return false; // Common abbreviations/acronyms (all caps with digits): DX11, OpenGL3, Win32 if (token.match(/^[A-Z]{2,}[0-9]{1,3}$/)) return false; // Changelist/build numbers (pure digits 6-12 chars): CL 35398403, Build 123456 // Todo: upgrade if (token.match(/^\d{6,12}$/)) return false; // Version control tags: v1.0, v21.9 if (token.match(/^[Vv]\d{1,2}\.\d{1,4}/)) return false; // Build/CI server patterns: buildbot, jenkins, gitlab-runner, etc. // Contains common CI/build keywords with hyphens/underscores if (token.match(/(buildbot|builder|jenkins|gitlab|runner|relclient|steam|win32|win64|x64|x86)/i)) return false; // === OBFUSCATION DETECTION === var stats = { digits: 0, lower: 0, upper: 0, special: 0, transitions: 0 }; var charTypes = []; for (var i = 0; i < token.length; i++) { var char = token[i]; var prevType = charTypes[charTypes.length - 1]; var currType; if (char >= '0' && char <= '9') { stats.digits++; currType = 'digit'; } else if (char >= 'a' && char <= 'z') { stats.lower++; currType = 'lower'; } else if (char >= 'A' && char <= 'Z') { stats.upper++; currType = 'upper'; } else { stats.special++; currType = 'special'; } charTypes.push(currType); if (prevType && prevType !== currType) { stats.transitions++; } } const totalChars = token.length, alphaChars = stats.lower + stats.upper; // Detect excessive character type transitions (obfuscation indicator) if ((stats.transitions / totalChars) > 0.6 && stats.digits >= 4) return true; // Detect repetitive patterns (e.g., "a1b2c3d4e5") if (token.match(/^(?:[a-z]\d){4,}$/i)) return true; // Pattern: letter-digit-letter with 4+ total digits if (token.match(/^(?=\d|[a-z])(?=.*[a-z]\d[a-z])(?=(?:.*\d){4,})/i)) return true; // Detect pure hex strings (8+ chars) - likely hashes if (token.match(/^[0-9a-f]{8,}$/i)) { // Exception: common words that are hex-valid (like "decade", "faded") if (!token.match(/^(dead|beef|cafe|babe|fade|deed|feed|face|decade|deface)$/i)) { return true; } } // Repeating syllables/segments (e.g., "jnfasjknjnjnjn" - "nj" repeats 3+ times) // Detects 2-3 char segments repeating 3+ times consecutively if (token.match(/(.{2,3})\1{2,}/)) return true; // Mixed letters and digit clusters (e.g., "ac8a8sic8i19o9oi", "j9813jd1039i098") // Pattern: letter(s) + digit(s), repeated 4+ times with varying lengths if (token.match(/(?:[a-z]+\d+){4,}/i) && stats.digits >= 4) return true; // Chaotic alternating: single letter + multiple digits (e.g., "j9813jd1039i098") // Pattern: letter + 3+ digits, repeated 2+ times if (token.match(/(?:[a-z]\d{3,}){2,}/i)) return true; // Random consonant clusters without vowels (e.g., "jnfsjknjn", "bcdfgh") // 6+ consonants in a row (excluding common patterns and abbreviation-style names with doubled consonants like "spprgrss.dll") // Doubled consonants (pp, ss, rr, etc.) indicate vowel-stripped abbreviations, not obfuscation if (token.match(/[bcdfghjklmnpqrstvwxz]{6,}/i) && !token.match(/str|chr|thr|sch|scr|spr/i) && !token.match(/([bcdfghjklmnpqrstvwxz])\1/i)) return true; // Single consonant repeated excessively (e.g., "jnfasjknjnjnjn") // Same consonant appears 5+ times in strings shorter than 15 chars var consonantCounts = {}; for (var i = 0; i < token.length; i++) { var ch = token[i].toLowerCase(); if ('bcdfghjklmnpqrstvwxz'.indexOf(ch) !== -1) { consonantCounts[ch] = (consonantCounts[ch] || 0) + 1; if (consonantCounts[ch] >= 5 && token.length < 15) return true; } } // Keyboard walk patterns (e.g., "qwerty", "asdfgh", "zxcvbn") if (token.match(/qwerty|asdfgh|zxcvbn|yuiop|hjkl|cvbnm|poiuy|lkjh/i)) return true; // Excessive digit-letter boundaries (e.g., "a1b2c3d4e5f6") // Count transitions specifically between letters and digits (8+ transitions) var digitLetterTransitions = 0; for (var i = 1; i < token.length; i++) { var curr = token[i], prev = token[i - 1], currIsDigit = (curr >= '0' && curr <= '9'), prevIsDigit = (prev >= '0' && prev <= '9'), currIsLetter = ((curr >= 'a' && curr <= 'z') || (curr >= 'A' && curr <= 'Z')), prevIsLetter = ((prev >= 'a' && prev <= 'z') || (prev >= 'A' && prev <= 'Z')); if ((currIsDigit && prevIsLetter) || (currIsLetter && prevIsDigit)) { digitLetterTransitions++; } } if (digitLetterTransitions >= 8) return true; // Statistical thresholds for obfuscation return ( (stats.digits >= 7) || // Too many digits (stats.digits >= 4 && stats.digits / totalChars > 0.4) || // High digit density (raised from 0.35) (stats.digits >= 5 && stats.lower >= 3 && stats.upper >= 3) || // Balanced mix (suspicious) (stats.digits >= 6 && stats.lower >= 5) || // Many digits + lowercase (alphaChars >= 5 && stats.digits >= 5 && stats.upper === 0 && stats.lower === alphaChars) // No uppercase variation ); } // #region "obfuscations (Native)" function scanForObfuscations_Native() { log(logType.nothing, "Scanning for obfuscation..."); var options = String(); var isDetected = Boolean(); // PE file must contain at least two sections: one for code and one for resources. var isOneSectionFile = false; if (PE_Cached.numberOfSections === 1) { log(logType.any, "Only one section found!"); isOneSectionFile = true; } if (isOneSectionFile) options = addOption(options, "Only one section"); // Check for section names containing forbidden characters var isStrangeSectionsPresent = false; // Define forbidden characters const badSectionChars = '-=+~!@#$%^&*()"№;%:?*():;,/\\|\'`<> '; // Iterate through sections and characters to check for forbidden characters for (var i = 0; i < PE_Cached.numberOfSections && !isStrangeSectionsPresent; i++) { var sectionName = PE.getSectionName(i); if (sectionName.length < 3 || (/^.\d.+/.test(sectionName) && sectionName !== ".00cfg") || sectionName[0] === " ") { isStrangeSectionsPresent = true; } var isIdioticMinGwSectionsPresent = false; if (_isResultPresent("linker", "GNU linker ld (GNU Binutils)")) { if (PE.isSectionNamePresent(".build-id")) { isIdioticMinGwSectionsPresent = true; } else { for (var d = 1; d < 10 && !isIdioticMinGwSectionsPresent; d++) { // sections like "/5", "/2" etc if (sectionName.indexOf("/" + d) != -1) { isIdioticMinGwSectionsPresent = true; } } } } if (isIdioticMinGwSectionsPresent) { isStrangeSectionsPresent = false; break; } for (var d = 0; d < badSectionChars.length && !isStrangeSectionsPresent; d++) { // If forbidden character is found, set flag and break if (sectionName.indexOf(badSectionChars[d]) !== -1) { isStrangeSectionsPresent = true; } } if (!isAsciiString(sectionName) && !isStrangeSectionsPresent) { isStrangeSectionsPresent = true; } } if (isStrangeSectionsPresent) options = addOption(options, "Strange sections"); // Check for DOS header in the PE file var isDosMissing = false, isCustomDosPresent = false; // If DOS stub size is 0, set flag for missing DOS if (PE.getDosStubSize() === 0) { isDosMissing = true; } else { // Define messages to check for custom DOS const messages = [ "This program cannot be run in DOS mode.", // most popular (standard) "This program must be run under Windows", // twinBASIC "This program must be run under Win32", "This program must be run under Win64", "This program requires Win32", "This is a Windows NT character-mode executable" // Watcom C/C++ ]; isCustomDosPresent = true; // Iterate through messages to check for custom DOS for (var d = 0; d < messages.length && isCustomDosPresent; d++) { if (PE.isSignaturePresent(PE.getDosStubOffset(), PE.getDosStubSize(), "'" + messages[d] + "'")) { isCustomDosPresent = false; } } } // Add appropriate option based on DOS presence if (isDosMissing) options = addOption(options, "Missing DOS"); else if (isCustomDosPresent) options = addOption(options, "Custom DOS"); // It works if the file contains an import without an extension (for example, instead of "kernel32.dll" it is written "kernel32"). // Compilers don't do that var isContainsNoExtensionLibrary = false; for (var i = 0; i < PE_Cached.numberOfUnmanagedImports && !isContainsNoExtensionLibrary; i++) { const libraryName = PE.getImportLibraryName(i).toLowerCase(); if (libraryName.length > 4) { if (libraryName[libraryName.length - 4] !== ".") { isContainsNoExtensionLibrary = true; } } else { /* if (libraryName.indexOf(".") === -1) */ isContainsNoExtensionLibrary = true; } } if (isContainsNoExtensionLibrary) options = addOption(options, "No extension import"); // .exe files in imports are a separate type of sophistication. But this happens. var exeInImports = false; for (var i = 0; i < PE_Cached.numberOfUnmanagedImports && !exeInImports; i++) { const libraryName = PE.getImportLibraryName(i).toLowerCase(); if (libraryName.length > 4) { if (libraryName !== "ntoskrnl.exe" && libraryName.substr(libraryName.length - 4, 4) === ".exe") { exeInImports = true; } } } if (exeInImports) options = addOption(options, "EXE in imports"); // Checks if application resources can be read or if they are compressed/encrypted var isUnreadableResourcesPresent = false; for (var i = 0; i < PE_Cached.numberOfUnmanagedResources && !isUnreadableResourcesPresent; i++) { if (PE.getResourceOffsetByNumber(i) === -1) { isUnreadableResourcesPresent = true; } } if (isUnreadableResourcesPresent) options = addOption(options, "Unreadable resources"); // Checks is executable application has been compiled or converted to a DLL // Like https://github.com/hasherezade/exe_to_dll var exeAsDll = false; if (PE_Cached.isDynamicLinkLibrary && PE.isExportFunctionPresentExp(/^(Start|main|_start|(w)?WinMain|EntryPoint)$/)) { exeAsDll = true; } if (exeAsDll) options = addOption(options, "EXE as DLL"); // The .text section should always come first var isTextSectionNotFirst = false; if (PE_Cached.numberOfSections > 0 && (PE.section[0].Name !== ".text" && PE.section[0].Name !== ".textbss") && (PE.isSectionNamePresent(".text") || PE.isSectionNamePresent(".textbss")) && PE.section[0] === ".code") { isTextSectionNotFirst = true; } if (isTextSectionNotFirst) options = addOption(options, "\".text\" section is not first"); // If IAT (Import Address Table) is missing or empty var isIatMissing = false, isEmptyIatPresent = false; if (PE_Cached.indexOfImportsSection === -1 && !PE_Cached.isDynamicLinkLibrary) { // DLLs can be resource-only isIatMissing = true; } else if (PE_Cached.indexOfImportsSection !== -1 && !PE_Cached.numberOfUnmanagedImports) { isEmptyIatPresent = true; } if (isIatMissing) options = addOption(options, "No IAT"); else if (isEmptyIatPresent) options = addOption(options, "Empty IAT"); // If both IAT and EAT are missing (for DLLs only) var isDllIatAndEatMissing = false; if (PE_Cached.isDynamicLinkLibrary && PE.getAddressOfEntryPoint() && (PE_Cached.indexOfImportsSection === -1 && PE_Cached.indexOfExportsSection === -1)) { // DLLs without imports/exports and with EP (not a resource-only DLL) isDllIatAndEatMissing = true; } if (isDllIatAndEatMissing) options = addOption(options, "No IAT and EAT"); // If EAT (Export Address Table) is missing or empty (for DLLs only) var isDllEatMissing = false, isDllEmptyEatPresent = false; if (!isDllIatAndEatMissing && PE_Cached.isDynamicLinkLibrary) { if (PE_Cached.indexOfExportsSection === -1 && PE.getAddressOfEntryPoint()) { // DLL without exports and with EP (not a resource-only DLL) isDllEatMissing = true; } else if (PE_Cached.indexOfExportsSection !== -1 && PE_Cached.numberOfUnmanagedExports === 0) { // DLL with empty exports isDllEmptyEatPresent = true; } } if (isDllEatMissing) options = addOption(options, "No EAT"); else if (isDllEmptyEatPresent) options = addOption(options, "Empty EAT"); // Check if the entry point starts with NOP or a NOP-like instruction var isStartsWithNop = false; if (PE_Cached.isArchX86) { /* * NOP-equivalent instructions for x86/x64: * * Standard NOP instructions: * - 0x90 -> NOP (standard 1-byte NOP) * - 0x66 0x90 -> XCHG AX, AX (2-byte NOP) * - 0x0F 0x1F 0x00 -> NOP DWORD PTR [EAX/RAX] (3-byte NOP) * - 0x0F 0x1F 0x40 0x00 -> NOP DWORD PTR [EAX/RAX+0x00] (4-byte NOP) * - 0x0F 0x1F 0x44 0x00 0x00 -> NOP DWORD PTR [EAX/RAX+EAX/RAX*1+0x00] (5-byte NOP) * - 0x66 0x0F 0x1F 0x44 0x00 0x00 -> NOP WORD PTR [EAX/RAX+EAX/RAX*1+0x00] (6-byte NOP) * - 0x0F 0x1F 0x80 0x00 0x00 0x00 0x00 -> NOP DWORD PTR [EAX/RAX+0x00000000] (7-byte NOP) * - 0x0F 0x1F 0x84 0x00 0x00 0x00 0x00 0x00 -> NOP DWORD PTR [EAX/RAX+EAX/RAX*1+0x00000000] (8-byte NOP) * - 0x66 0x0F 0x1F 0x84 0x00 0x00 0x00 0x00 0x00 -> NOP WORD PTR [EAX/RAX+EAX/RAX*1+0x00000000] (9-byte NOP) * * Functional equivalents of NOP: * - 0x89 0xF6 -> MOV ESI, ESI (x86) * - 0x48 0x89 0xF6 -> MOV RSI, RSI (x64) * - 0x8D 0x76 0x00 -> LEA ESI, [ESI+0x00] (x86) * - 0x48 0x8D 0x76 0x00 -> LEA RSI, [RSI+0x00] (x64) * - 0x8D 0x74 0x26 0x00 -> LEA ESI, [ESI+EIZ+0x00] (x86) * - 0x48 0x8D 0x74 0x26 0x00 -> LEA RSI, [RSI+RIZ+0x00] (x64) * - 0x87 0xDB -> XCHG EBX, EBX (x86) * - 0x48 0x87 0xDB -> XCHG RBX, RBX (x64) * - 0x87 0xC9 -> XCHG ECX, ECX (x86) * - 0x48 0x87 0xC9 -> XCHG RCX, RCX (x64) * - 0x87 0xD2 -> XCHG EDX, EDX (x86) * - 0x48 0x87 0xD2 -> XCHG RDX, RDX (x64) * - 0x87 0xFF -> XCHG EDI, EDI (x86) * - 0x48 0x87 0xFF -> XCHG RDI, RDI (x64) * - 0x87 0xC0 -> XCHG EAX, EAX (x86) * - 0x48 0x87 0xC0 -> XCHG RAX, RAX (x64) * - 0x8D 0x00 -> LEA EAX, [EAX] (x86) * - 0x48 0x8D 0x00 -> LEA RAX, [RAX] (x64) */ // Universal NOP equivalents (work on both architectures) const nopEquivalentsUniversal = [ "XCHG AX, AX", "XCHG BX, BX", "XCHG CX, CX", "XCHG DX, DX", "XCHG SI, SI", "XCHG DI, DI", "XCHG BP, BP" ]; // Collections of NOP-equivalent instructions based on architecture const nopEquivalents32bit = [ // x86 "MOV ESI, ESI", "XCHG EAX, EAX", "XCHG EBX, EBX", "XCHG ECX, ECX", "XCHG EDX, EDX", "XCHG EDI, EDI", "LEA EAX, [EAX]", "LEA ESI, [ESI]", "LEA ESI, CS:[ESI]" ]; const nopEquivalents64bit = [ // x64 "MOV RSI, RSI", "XCHG RAX, RAX", "XCHG RBX, RBX", "XCHG RCX, RCX", "XCHG RDX, RDX", "XCHG RDI, RDI", "LEA RAX, [RAX]", "LEA RSI, [RSI]", "LEA RSI, CS:[RSI]" ]; // Combine universal and architecture-specific instructions const nopEquivalents = nopEquivalentsUniversal.concat( PE_Cached.is64bit ? nopEquivalents64bit : nopEquivalents32bit ); // First check for standard NOP opcode which covers all NOP variants with different operands if (getFirstEpAsmOpCode() === "NOP") { isStartsWithNop = true; } else { // Then check for all functional NOP equivalents that have different opcodes for (var i = 0; i < nopEquivalents.length && !isStartsWithNop; i++) { if (PE_Cached.firstEpAsmInstruction === nopEquivalents[i]) { isStartsWithNop = true; } } } } else { /* * NOP-equivalent instructions for ARM/ARM64: * * Standard NOP instructions: * - 0x00 0xF0 0x20 0xE3 -> NOP (ARM32 explicit) * - 0x1F 0x20 0x03 0xD5 -> NOP (ARM64 explicit) * * Functional equivalents of NOP: * - 0x00 0x00 0xA0 0xE1 -> MOV R0, R0 (ARM32) * - 0x01 0x10 0xA0 0xE1 -> MOV R1, R1 (ARM32) * - 0x02 0x20 0xA0 0xE1 -> MOV R2, R2 (ARM32) * - 0x03 0x30 0xA0 0xE1 -> MOV R3, R3 (ARM32) * - 0x04 0x40 0xA0 0xE1 -> MOV R4, R4 (ARM32) * - 0x05 0x50 0xA0 0xE1 -> MOV R5, R5 (ARM32) * - 0x06 0x60 0xA0 0xE1 -> MOV R6, R6 (ARM32) * - 0x07 0x70 0xA0 0xE1 -> MOV R7, R7 (ARM32) * - 0x08 0x80 0xA0 0xE1 -> MOV R8, R8 (ARM32) * - 0x09 0x90 0xA0 0xE1 -> MOV R9, R9 (ARM32) * - 0x0A 0xA0 0xA0 0xE1 -> MOV R10, R10 (ARM32) * - 0x0B 0xB0 0xA0 0xE1 -> MOV R11, R11 (ARM32) * - 0x0C 0xC0 0xA0 0xE1 -> MOV R12, R12 (ARM32) * - 0xE0 0x03 0x00 0xAA -> MOV X0, X0 (ARM64) * - 0xE1 0x03 0x01 0xAA -> MOV X1, X1 (ARM64) * - 0xE2 0x03 0x02 0xAA -> MOV X2, X2 (ARM64) * - 0xE3 0x03 0x03 0xAA -> MOV X3, X3 (ARM64) * - 0xE4 0x03 0x04 0xAA -> MOV X4, X4 (ARM64) * - 0xE5 0x03 0x05 0xAA -> MOV X5, X5 (ARM64) * - 0xE6 0x03 0x06 0xAA -> MOV X6, X6 (ARM64) * - 0xE7 0x03 0x07 0xAA -> MOV X7, X7 (ARM64) * - 0xE0 0x03 0x00 0x2A -> MOV W0, W0 (ARM64) * - 0xE1 0x03 0x01 0x2A -> MOV W1, W1 (ARM64) * - 0xE2 0x03 0x02 0x2A -> MOV W2, W2 (ARM64) * - 0xE3 0x03 0x03 0x2A -> MOV W3, W3 (ARM64) */ // ARM/ARM64 NOP equivalents const nopEquivalentsArm = [ "NOP", "MOV R0, R0", "MOV R1, R1", "MOV R2, R2", "MOV R3, R3", "MOV R4, R4", "MOV R5, R5", "MOV R6, R6", "MOV R7, R7", "MOV R8, R8", "MOV R9, R9", "MOV R10, R10", "MOV R11, R11", "MOV R12, R12", "MOV R13, R13", "MOV R14, R14", "MOV R15, R15" ]; const nopEquivalentsArm64 = [ "NOP", "MOV X0, X0", "MOV X1, X1", "MOV X2, X2", "MOV X3, X3", "MOV X4, X4", "MOV X5, X5", "MOV X6, X6", "MOV X7, X7", "MOV W0, W0", "MOV W1, W1", "MOV W2, W2", "MOV W3, W3" ]; const nopEquivalents = PE_Cached.is64bit ? nopEquivalentsArm64 : nopEquivalentsArm; // Check for standard NOP opcode if (getFirstEpAsmOpCode() === "NOP") { isStartsWithNop = true; } else { // Check for functional NOP equivalents for (var i = 0; i < nopEquivalents.length && !isStartsWithNop; i++) { if (PE_Cached.firstEpAsmInstruction === nopEquivalents[i]) { isStartsWithNop = true; } } } } if (isStartsWithNop) options = addOption(options, "Nop at EP"); // Check for "Stack-push address near EP" (CALL $+5) var isAddrToStackTrickPresent = false; if (PE_Cached.isArchX86) { // Check first 30 instructions for "Stack-push address near EP" // This trick uses "CALL $+5" (E8 00 00 00 00) to push next instruction address on stack if (!PE_Cached.isDynamicLinkLibrary) { for (var i = 0; i < 32 && !isAddrToStackTrickPresent; i++) { var asmInstruction = getAsmInstructionByIndex(i); if (!asmInstruction) break; // Safety check // Check if instruction is CALL if (getAsmOpCode(asmInstruction) === "CALL") { // Get address and offset for this instruction var disasmAddress = PE.getAddressOfEntryPoint(); for (var j = 0; j < i; j++) { disasmAddress = PE.getDisasmNextAddress(disasmAddress); } var currentOffset = PE.VAToOffset(disasmAddress); // Check if machine code matches E8 00 00 00 00 pattern if (PE.compare("E8 00 00 00 00", currentOffset)) { log(logType.any, "Stack-push address near EP found at offset: 0x" + currentOffset.toString(16)); isAddrToStackTrickPresent = true; } } } } } if (isAddrToStackTrickPresent) options = addOption(options, "Stack-push address near EP"); // Check for CPUID at entry point var isCpuidNearEpPresent = false; if (PE_Cached.isArchX86) { // Check first 15 instructions for CPUID instruction if (!PE_Cached.isDynamicLinkLibrary) { for (var i = 0; i < 15 && !isCpuidNearEpPresent; i++) { var asmInstruction = getAsmInstructionByIndex(i); if (!asmInstruction) break; // Safety check // Check if instruction is CPUID if (getAsmOpCode(asmInstruction) === "CPUID") { log(logType.any, "CPUID near EP found at instruction index: " + i); isCpuidNearEpPresent = true; } } } } if (isCpuidNearEpPresent) options = addOption(options, "Cpuid near EP"); // Check for TLS (Thread Local Storage) with a bad entry point (like INT3 or RET). Trick to hide the real EP. (like BoxedApp) var isTlsWithBadEpPresent = false; if (PE.isTLSPresent()) { if (PE_Cached.isArchX86) { if (/^INT( )?3$/.test(getAsmOpCode(PE_Cached.firstEpAsmInstruction)) || // INT3 (0xCC) / INT 3 (0xCD 0x03) /^RET( \d+)?$/.test(getAsmOpCode(PE_Cached.firstEpAsmInstruction))) { // All types of RET isTlsWithBadEpPresent = true; } } else { // ARM: Check for breakpoint or return instructions if (/^BKPT/.test(getAsmOpCode(PE_Cached.firstEpAsmInstruction)) || // BKPT (breakpoint) /^BRK/.test(getAsmOpCode(PE_Cached.firstEpAsmInstruction)) || // BRK (ARM64 breakpoint) /^RET/.test(getAsmOpCode(PE_Cached.firstEpAsmInstruction)) || // RET (ARM64 return) /^BX( )?LR$/.test(PE_Cached.firstEpAsmInstruction)) { // BX LR (ARM32 return)) { isTlsWithBadEpPresent = true; } } } if (isTlsWithBadEpPresent) options = addOption(options, "TLS hidden EP"); // Check for multiple JMPs leading to each other var proxyJumpsAtEpPresent = false; if (PE_Cached.isArchX86 && ( PE.compareEP("EB $$ EB") || PE.compareEP("EB $$ E9") || PE.compareEP("E9 ## ## ## ## EB") || PE.compareEP("E9 ## ## ## ## E9") )) { proxyJumpsAtEpPresent = true; } if (proxyJumpsAtEpPresent) options = addOption(options, "Proxy jmp at EP"); // Check if NOP padding is present at the entry point var isNopPaddingPresent = false; // Condition to check for NOP padding if (!isStartsWithNop && getEpAsmPattern(true, 5).indexOf(getInstructionsAsmPattern(["NOP", "NOP"])) !== -1) { isNopPaddingPresent = true; } if (isNopPaddingPresent) options = addOption(options, "Nop EP padding"); // Check for sections with full RWX permissions (Read, Write, Execute) var isRwxSectionPresent = false; var rwxSectionIndex = -1; const SECTION_FLAGS_EXECUTE = 0x20000000, // IMAGE_SCN_MEM_EXECUTE SECTION_FLAGS_READ = 0x40000000, // IMAGE_SCN_MEM_READ SECTION_FLAGS_WRITE = 0x80000000, // IMAGE_SCN_MEM_WRITE SECTION_FLAGS_CODE = 0x00000020; // IMAGE_SCN_CNT_CODE const RWX_MASK = SECTION_FLAGS_EXECUTE | SECTION_FLAGS_READ | SECTION_FLAGS_WRITE, RWX_CODE_MASK = RWX_MASK | SECTION_FLAGS_CODE; for (var i = 0; i < PE_Cached.numberOfSections && !isRwxSectionPresent; i++) { var currentSectionCharacteristics = PE.section[i].Characteristics; if ((currentSectionCharacteristics & RWX_MASK) === RWX_MASK || (currentSectionCharacteristics & RWX_CODE_MASK) === RWX_CODE_MASK) { isRwxSectionPresent = true; rwxSectionIndex = i; } } if (isRwxSectionPresent) options = addOption(options, "Section #" + rwxSectionIndex + " (\"" + clearSectionName(PE.getSectionName(rwxSectionIndex)) + "\") has RWX"); // Check for zero padding at the beginning of the entry point section var isEpSectionZeroPaddingPresent = false; var epSectionWithZeroPaddingIndex = -1; // Find the section that contains the entry point const entryPointRva = PE.getAddressOfEntryPoint() - PE.getImageBase(); for (var i = 0; i < PE_Cached.numberOfSections && !isEpSectionZeroPaddingPresent; i++) { const sectionVirtualAddress = PE.getSectionVirtualAddress(i), sectionVirtualSize = PE.getSectionVirtualSize(i); // Check if the entry point is within this section if (entryPointRva >= sectionVirtualAddress && entryPointRva < sectionVirtualAddress + sectionVirtualSize) { epSectionWithZeroPaddingIndex = i; // Check for zero padding at the beginning of the section if (PE.compare("00 00 00", PE.getSectionFileOffset(epSectionWithZeroPaddingIndex))) { isEpSectionZeroPaddingPresent = true; } } } if (isEpSectionZeroPaddingPresent) options = addOption(options, "EP-section #" + epSectionWithZeroPaddingIndex + " (\"" + clearSectionName(PE.getSectionName(epSectionWithZeroPaddingIndex)) + "\") zero padding"); // Check for a lot of sections (more than 20 -> this is a lot for native builds) var tooManySectionsPresent = false; if (PE_Cached.numberOfSections > 20) { tooManySectionsPresent = true; } if (tooManySectionsPresent) options = addOption(options, "Too many sections"); // Check for IAT directory presence var isIatDirEmpty = false; if (!_isResultPresent("linker", "Turbo Linker")) { // Ignore Delphi // Offset of the IAT directory (12 is the number of IMAGE_DIRECTORY_ENTRY_ entries, 8 is the size of each entry) const iatDirOffset = getOptHeaderOffset() + (PE_Cached.is64bit ? 0x70 : 0x60) + 12 * 8; if (PE_Cached.indexOfImportsSection !== -1 && PE.read_int32(iatDirOffset) === 0) { isIatDirEmpty = true; } } if (isIatDirEmpty) options = addOption(options, "IAT directory empty"); // Check for unused exception section var isUnusedExceptionSectionPresent = false; if (PE.isSectionNamePresentExp(/^\.[xp]data$/)) { // Offset of the exception directory (12 is the number of IMAGE_DIRECTORY_ENTRY_ entries, 8 is the size of each entry) var exceptionDirOffset = getOptHeaderOffset() + (PE_Cached.is64bit ? 0x88 : 0x78); if (PE.read_int32(exceptionDirOffset) === 0 && PE.read_int32(exceptionDirOffset + 4) === 0) { isUnusedExceptionSectionPresent = true; } } if (isUnusedExceptionSectionPresent) options = addOption(options, "Exceptions directory empty"); // Check for strange exports (Non-ASCII names) var isStrangeExportsPresent = false; if (PE_Cached.numberOfUnmanagedExports > 0) { for (var i = 0; i < PE_Cached.numberOfUnmanagedExports && !isStrangeExportsPresent; i++) { const functionName = PE.getExportFunctionName(i); if (functionName && ( /^\d/.test(functionName) || !isAsciiString(functionName) || ( !isItemMangled(functionName) && isNameObfuscated(replaceAllInString(functionName, "_", " ")) ) )) { isStrangeExportsPresent = true; } } } if (isStrangeExportsPresent) options = addOption(options, "Strange exports"); // Looks for sections whose names contain strange (or invalid) characters var isStrangeImportsPresent = false; const badImportChars = '=~!@#$%^&*()"№;%:?*():;,|\'`<> '; for (var i = 0; i < PE_Cached.numberOfUnmanagedImports && !isStrangeImportsPresent; i++) { const libraryName = PE.getImportLibraryName(i); if (isAsciiString(libraryName)) { for (var l = 0; l < badImportChars.length && !isStrangeImportsPresent; l++) { if (!isAsciiString(libraryName) || libraryName.indexOf(badImportChars[l]) !== -1) { isStrangeImportsPresent = true; } } } else if (libraryName.indexOf("MZ") !== 0) { // 'MZ' -> IAT corrupted isStrangeImportsPresent = true; } } if (isStrangeImportsPresent) options = addOption(options, "Strange imports"); // Check for strange resources var isStrangeResourcesPresent = false; for (var i = 0; i < PE_Cached.numberOfUnmanagedResources && !isStrangeResourcesPresent; i++) { const resourceName = PE.getResourceNameByNumber(i); if (resourceName && (!isAsciiString(resourceName) || isNameObfuscated(resourceName))) { log(logType.any, "Strange resource name: " + resourceName); isStrangeResourcesPresent = true; } } if (isStrangeResourcesPresent) options = addOption(options, "Strange resources"); // Check for zero linker version var isZeroLinkerVersionPresent = false; if (PE.getMajorLinkerVersion() === 0 && PE.getMinorLinkerVersion() === 0) { isZeroLinkerVersionPresent = true; } if (isZeroLinkerVersionPresent) options = addOption(options, "Zero linker version"); // Check for .NET metadata presence var isNetMetaDataInNativePresent = false; if (isNetMetaDataPresent() && PE_Cached.numberOfUnmanagedImports > 0) { isNetMetaDataInNativePresent = true; } if (isNetMetaDataInNativePresent) options = addOption(options, "DotNET meta"); // Check for .NET runtime attach functions var isNetRuntimeAttachFunctionPresent = false; if (PE.isFunctionPresent("_CorExeMain") || PE.isFunctionPresent("_CorDllMain")) { isNetRuntimeAttachFunctionPresent = true; } if (isNetRuntimeAttachFunctionPresent) options = addOption(options, "DotNET runtime attach"); // ASM Guard fake signatures if (PE.section[".asmg"] || PE.section["ASMGUARD"]) { for (var f = 0; f < 3; f++) _removeResult("packer", ["UPX", "MPRESS", "EP:MPRESS"][f]); } if (options.length != 0) isDetected = true; if (isDetected) { _setResult("~protection", "Generic", String(), PE.isVerbose() ? options : String()); } } // #endregion /** * Determines if the PE file's operating system architecture is x86-based. * * @returns {boolean|undefined} Returns true if the architecture is x86_32 (I386) or x86_64 (AMD64), * false if the architecture is ARM-based (ARM, ARMNT, THUMB), * undefined if the architecture is unknown or not recognized. */ function isArchX86() { switch (PE.getOperationSystemOptions().split(',')[0]) { case "I386": // x86 case "AMD64": // x86_64 return true; case "ARM": // ARM case "ARMNT": // ARMv7 case "THUMB": // ARM Thumb return false; default: return undefined; } } const _patternSplitter = "|"; /** * Generates a pattern of assembly instructions or opcodes from the entry point. * * @param {boolean} onlyOpCodes - If true, only the opcodes of the instructions are included in the pattern. * @param {number} numberOf - The number of instructions to include in the pattern. * @returns {string} The generated assembly pattern. */ function getEpAsmPattern(onlyOpCodes, numberOf) { // Initialize the result with a pattern splitter var result = _patternSplitter; // Get the address of the entry point var disasmAddress = PE.getAddressOfEntryPoint(); // Iterate through instructions up to the specified number for (var i = 0; i < numberOf; i++) { // Update the address to the next instruction if not the first iteration if (i >= 1) { disasmAddress = PE.getDisasmNextAddress(disasmAddress); } // Get the assembly instruction at the current address const asmInstruction = PE.getDisasmString(disasmAddress); // Append either the opcode or the full instruction to the result result += ( onlyOpCodes ? getAsmOpCode(asmInstruction) : // "MOV" asmInstruction // "MOV EAX, 4" ) + _patternSplitter; } // Return the generated assembly pattern return result; } var epAsmInstructions = []; /** * Retrieves the assembly instruction at the specified index from the entry point of a PE file. * * @param {number} index - The index of the assembly instruction to retrieve. * @returns {string} The assembly instruction at the specified index. */ function getAsmInstructionByIndex(index) { // Check if the instruction is already cached if (epAsmInstructions[index] !== undefined) { return epAsmInstructions[index]; } // Get the address of the entry point var disasmAddress = PE.getAddressOfEntryPoint(); // Iterate through instructions until the specified index is reached for (var i = 0; i <= index; i++) { // Update the address to the next instruction if not the first iteration if (i >= 1) { disasmAddress = PE.getDisasmNextAddress(disasmAddress); } // Cache the instruction if it hasn't been cached yet if (epAsmInstructions[i] === undefined) { epAsmInstructions[i] = PE.getDisasmString(disasmAddress); } // If the current iteration matches the specified index, retrieve the instruction if (i === index) { // Return the assembly instruction from cache return epAsmInstructions[index]; } } } /** * Generates a subpattern string to search for instructions within a pattern divided by a separator. * * This function allows you to create a subpattern that can be used to search for specific instructions * within a larger pattern string that is divided by a separator (_patternSplitter). * * Examples: * - "|OPCODE1|OPCODE2|OPCODE3|".indexOf("|OPCODE2|") * - "|OPCODE1|OPCODE2|OPCODE3|".indexOf(getInstructionsAsmPattern("OPCODE2")) * - "|OPCODE1|OPCODE2|OPCODE3|".indexOf("|OPCODE2|OPCODE3|") * - "|OPCODE1|OPCODE2|OPCODE3|".indexOf(getInstructionsAsmPattern(["OPCODE2", "OPCODE3"])) * * @param {string|string[]} instruction - The instruction or array of instructions to create the subpattern for. * @returns {string} The generated subpattern string. */ function getInstructionsAsmPattern(instruction) { return _patternSplitter + ( Array.isArray(instruction) ? instruction.join(_patternSplitter) : instruction ) + _patternSplitter; } /** * Retrieves the first assembly instruction at the entry point of the PE file. * * @returns {string} The disassembled string of the first instruction at the entry point. */ function getFirstEpAsmInstruction() { return getAsmInstructionByIndex(0); // return PE.getDisasmString(PE.OffsetToVA(PE.getEntryPointOffset())); } /** * Extracts the opcode from an assembly instruction. * * @param {string} instruction - The assembly instruction. * @returns {string} - The opcode of the instruction. */ function getAsmOpCode(instruction) { return instruction.indexOf(" ") !== -1 ? instruction.split(" ")[0] : instruction; } /** * Retrieves the first assembly operation code from the entry point of the executable. * * @returns {string} The assembly operation code of the first instruction at the entry point. */ function getFirstEpAsmOpCode() { return getAsmOpCode(PE_Cached.firstEpAsmInstruction); } /** * Checks if an item pattern appears to be a mangled symbol name. * * @param {string} itemPattern - The pattern string to check for mangling * @returns {boolean} True if the pattern appears to be a mangled symbol, false otherwise */ function isItemMangled(itemPattern) { // Check if the pattern is too short to be mangled if (itemPattern.length <= 5) { return false; } return ( (itemPattern[0] === '?' && (itemPattern.indexOf("@@") !== -1 || itemPattern[1] === '?')) || // MSVC mangling: starts with '?' and contains "@@" or has double '?' (itemPattern.substring(0, 2) === "_Z") || // GNU mangling: starts with "_Z" (itemPattern[0] === '@' && itemPattern.indexOf('$') !== -1) || // Borland C++ mangling: starts with '@' and contains '$' (itemPattern[0] === '$' && (itemPattern[1] === 's' || itemPattern[1] === 'S')) // Swift mangling: starts with '$s' or '$S' ); } /** * Returns information about the compiler and language based on a mangled symbol pattern. * * @param {string} itemPattern - The mangled symbol pattern to analyze. * @returns {{compiler: string, language: string} | undefined} An object containing the compiler and language if recognized, otherwise undefined. */ function getManglerInfoByMangledItem(itemPattern) { if (!isItemMangled(itemPattern)) { return undefined; } // Visual C++ (MSVC) if (itemPattern[0] === '?') { return { compiler: "Microsoft Visual C++", language: "C++" }; } // MinGW (GNU) if (itemPattern.substring(0, 2) === "_Z") { return { compiler: "MinGW", language: "C++" }; } // Borland C++ if (itemPattern[0] === '@' && itemPattern.indexOf('$') !== -1) { return { compiler: "Borland C++", language: "C++" }; } // Swift if (itemPattern[0] === '$' && (itemPattern[1] === 's' || itemPattern[1] === 'S')) { return { compiler: "Swift", language: "Swift" }; } return undefined; } /** * Extracts the unmangled name from a mangled C++ symbol. * * This function handles both Microsoft Visual C++ (MSVC) and GNU C++ (GCC) name mangling schemes: * - MSVC mangled names start with '?' and include patterns for functions, constructors, destructors, operators, and templates * - GCC mangled names start with '_Z' and include patterns for STL functions, namespaced functions, and regular functions * - Swift mangled names start with '$s' or '$S' and include patterns for types, functions, properties, and protocols * * @param {string} itemPattern - The mangled symbol name to decode * @returns {string} The unmangled function/symbol name, or the original pattern if it's not mangled or cannot be decoded * * @example * // MSVC examples * getNameOfMangledItem('?myFunction@@YAXXZ') // returns 'myFunction' * getNameOfMangledItem('??0MyClass@@QAE@XZ') // returns 'MyClass' (constructor) * getNameOfMangledItem('??$myTemplate@H@@YAXXZ') // returns 'myTemplate' * * @example * // GCC examples * getNameOfMangledItem('_Z9myFunctionv') // returns 'myFunction' * getNameOfMangledItem('_ZSt4cout') // returns 'cout' * getNameOfMangledItem('_ZN3std4cout') // returns 'cout' * * @example * // Borland examples * getNameOfMangledItem('@func$qi') // returns 'func' * getNameOfMangledItem('@Class@method$qpc') // returns 'method' * getNameOfMangledItem('@Class@$bctr$qi') // returns 'Class' (constructor) * * @example * // Swift examples * getNameOfMangledItem('$s11MaskStorages4SIMDPTl') // returns 'SIMD' * getNameOfMangledItem('$ss9_IndexBoxC6_unboxqd__SgySLRd__lF') // returns '_unbox' * getNameOfMangledItem('$sSn11descriptionSSvpMV') // returns 'description' */ function getNameOfMangledItem(itemPattern) { if (!isItemMangled(itemPattern)) { return itemPattern; } // MSVCPP mangled names start with '?' if (itemPattern[0] === '?') { // Regular function: ?myFunction@@YAXXZ if (itemPattern[1] !== '?') { return itemPattern.split("?")[1].split("@")[0]; } // Handle all ?? patterns if (itemPattern[1] === '?') { var parts, nameWithPrefix; // Simple template: ??$myTemplate@H@@YAXXZ if (itemPattern[2] === '$') { return itemPattern.split("$")[1].split("@")[0]; } // Complex template: ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ if (itemPattern.indexOf('?$') !== -1) { var complexMatch = itemPattern.match(/\?\?\d\?\$([^@]+)@/); if (complexMatch) { return complexMatch[1]; } } // Special mangler: ??_7MyClass@@6B@, ??_EMyClass@@QAEPAXI@Z if (itemPattern[2] === '_') { parts = itemPattern.split("?"); if (parts.length >= 3) { nameWithPrefix = parts[2].split("@")[0]; // For _E, _G, _R patterns, return the full name if (nameWithPrefix.length > 1 && /[EGR]/.test(nameWithPrefix[1])) { return nameWithPrefix; } // For _7 and other patterns, remove underscore and digit var nameAfterUnderscore = nameWithPrefix.substring(2); return nameAfterUnderscore.indexOf('_') === 0 ? nameAfterUnderscore.substring(1) : nameAfterUnderscore; } } // Constructor/destructor/operators: ??0MyClass@@QAE@XZ, ??1MyClass@@QAE@XZ, ??2@YAPAXI@Z if (/[0-9A-D]/.test(itemPattern[2])) { parts = itemPattern.split("?"); if (parts.length >= 3) { nameWithPrefix = parts[2].split("@")[0]; // Global operator (single character) if (nameWithPrefix.length === 1 && /[0-9A-D]/.test(nameWithPrefix[0])) { var operatorNames = { '2': 'operator_new', '3': 'operator_delete', '4': 'operator_assign', '5': 'operator_shift_left', '6': 'operator_shift_right', '8': 'operator_equal', '9': 'operator_not_equal', 'A': 'operator_subscript', 'B': 'operator_not', 'C': 'operator_cast', 'D': 'operator_cast_const' }; return operatorNames[nameWithPrefix[0]] || 'operator_unknown'; } // Class functions - remove first character return nameWithPrefix.substring(1); } } // Fallback parts = itemPattern.split("?"); if (parts.length >= 3) { var name = parts[2].split("@")[0]; return (name.length > 0 && /[0-9A-D]/.test(name[0])) ? name.substring(1) : name; } } } // GNUCPP mangled names start with '_Z' if (itemPattern.substring(0, 2) === "_Z") { // STL mangler: _ZSt4cout, _ZSt3minIiET_RKS0_S2_ if (itemPattern[2] === 'S' && itemPattern[3] === 't') { var stlMatch = itemPattern.match(/_ZSt(\d+)(.+)/); if (stlMatch) { return stlMatch[2].substring(0, parseInt(stlMatch[1], 10)); } } else if (itemPattern[2] === 'N') { // Namespace mangler: _ZN...E var components = [], remaining = itemPattern.substring(3); // Skip "_ZN" // Parse all components while (remaining.length > 0 && remaining[0] !== 'E' && /^\d/.test(remaining)) { var lengthMatch = remaining.match(/^(\d+)/); if (lengthMatch) { var length = parseInt(lengthMatch[1], 10), nameStart = lengthMatch[1].length; if (remaining.length >= nameStart + length) { var name = remaining.substring(nameStart, nameStart + length); components.push(name); remaining = remaining.substring(nameStart + length); } else { break; } } else { break; } } // Return the last component (function name) if (components.length > 0) { return components[components.length - 1]; } } else { // Regular mangler: _Z9myFunctionv, _Z3fooi var regularMatch = itemPattern.match(/_Z(\d+)(.+)/); if (regularMatch) { var funcNameLength = parseInt(regularMatch[1], 10); return regularMatch[2].substring(0, funcNameLength); } } } // Borland C++ mangled names start with '@' if (itemPattern[0] === '@') { var parts = itemPattern.split('@'); // Simple function: @func$qi if (parts.length === 2) { return parts[1].split('$')[0]; } // Class method: @Class@method$qpc if (parts.length >= 3) { var methodName = parts[2].split('$')[0]; // Constructor: @Class@$bctr$... if (methodName === '$bctr') { return parts[1]; // Return class name } // Destructor: @Class@$bdtr$... if (methodName === '$bdtr') { return '~' + parts[1]; // Return destructor name } // Regular method return methodName; } } // Swift mangled names start with '$s' or '$S' if (itemPattern[0] === '$' && (itemPattern[1] === 's' || itemPattern[1] === 'S')) { var pos = 2, identifiers = []; // Parse length-prefixed identifier function parseIdentifier(str, startPos) { if (startPos >= str.length || !/^\d/.test(str[startPos])) { return null; } var match = str.substring(startPos).match(/^(\d+)/); if (!match) return null; var len = parseInt(match[1], 10), digitLen = match[1].length; if (startPos + digitLen + len > str.length) { return null; } return { name: str.substring(startPos + digitLen, startPos + digitLen + len), nextPos: startPos + digitLen + len }; } // Parse ALL length-prefixed identifiers, skipping markers/types/substitutions // We want to collect ALL readable names and return the last one var loopLimit = 50; // Safety limit to prevent infinite loops while (pos < itemPattern.length && loopLimit-- > 0) { var char = itemPattern[pos]; // Try to parse length-prefixed identifier if (/^\d/.test(char)) { var result = parseIdentifier(itemPattern, pos); if (result) { identifiers.push(result.name); pos = result.nextPos; continue; } } // Skip substitution references (x, q, y, z and combinations like qd__, yz, etc.) if (/^[xqyz]/.test(char)) { pos++; // Skip additional substitution characters while (pos < itemPattern.length && /^[xqyzd_0-9]/.test(itemPattern[pos])) { pos++; } continue; } // Skip single-letter markers if followed by digit or known pattern if (/^[a-zA-Z]$/.test(char)) { var nextChar = pos + 1 < itemPattern.length ? itemPattern[pos + 1] : String(); // Check for stdlib type codes (2 letters starting with S) if (char === 'S' && /^[a-zA-Z]/.test(nextChar)) { var afterStdlib = pos + 2 < itemPattern.length ? itemPattern[pos + 2] : String(); // If after stdlib type there's a marker + digit, skip stdlib and continue if (/^[a-z]$/.test(afterStdlib)) { var afterMarker = pos + 3 < itemPattern.length ? itemPattern[pos + 3] : String(); if (/^\d/.test(afterMarker)) { pos += 3; // Skip Sx + marker continue; } } // If directly followed by digit, skip stdlib type if (/^\d/.test(afterStdlib)) { pos += 2; continue; } } // Single letter followed by digit - skip it if (/^\d/.test(nextChar)) { pos++; continue; } } // Can't parse further - stop break; } // Return the last identifier (most specific name) if (identifiers.length > 0) { return identifiers[identifiers.length - 1]; } // Fallback: check for stdlib type codes at current position if (pos < itemPattern.length && itemPattern[pos] === 'S' && pos + 1 < itemPattern.length) { var typeCode = itemPattern.substring(pos, pos + 2); var stdlibTypes = { 'Sa': 'Array', 'Sb': 'Bool', 'Sc': 'UnicodeScalar', 'Sd': 'Double', 'Sf': 'Float', 'Sg': 'Optional', 'Sh': 'Set', 'Si': 'Int', 'SL': 'Collection', 'Sl': 'Slice', 'Sm': 'Mirror', 'Sn': 'Numeric', 'So': 'ObjectiveC', 'Sp': 'UnsafePointer', 'Sq': 'Optional', 'SR': 'Sequence', 'Sr': 'UnsafeRawPointer', 'Ss': 'String', 'SS': 'String', 'St': 'Range', 'ST': 'Equatable', 'Su': 'UInt', 'Sv': 'UnsafeRawBufferPointer', 'Sw': 'UnsafeBufferPointer', 'Sx': 'Strideable', 'SY': 'RawRepresentable', 'Sy': 'RawRepresentable', 'Sz': 'BinaryInteger', 'SD': 'Dictionary', 'SE': 'Encodable', 'SH': 'Hashable', 'Sk': 'KeyPath', 'SK': 'KeyPath' }; if (stdlibTypes[typeCode]) { return stdlibTypes[typeCode]; } } } return itemPattern; } /** * Validates import hashes within a database collection. * Iterates through each entry in the collection, checking if the import position hash is present. * If a matching hash is found, returns the corresponding entry; otherwise, returns null. * * @param {Array} dbCollection - The database collection to validate, where each entry is an array containing at least a position and hash. * @returns {Array|null} The first entry with a matching import position hash, or null if none found. */ function validateImportHashes(dbCollection) { for (var i = 0; i < dbCollection.length; i++) { var position = dbCollection[i][2], hash = dbCollection[i][3]; if (Array.isArray(hash)) { for (var j = 0; j < hash.length; j++) { if (PE.isImportPositionHashPresent(position, hash[j])) return dbCollection[i]; } } else if (PE.isImportPositionHashPresent(position, hash)) { return dbCollection[i]; } } return null; } /** * Validates section names within a database collection against known PE section names or regular expressions. * Iterates through the collection and checks if any section signature matches a known section name or passes a regular expression test. * * @param {Array} dbCollection - The database collection to validate, where each item is expected to have a section signature at index 2. * @returns {Array|null} The first matching item from the collection, or null if no match is found. */ function validateSectionNames(dbCollection) { for (var i = 0; i < dbCollection.length; i++) { var sectionSignature = dbCollection[i][2]; if (Array.isArray(sectionSignature)) { for (var j = 0; j < sectionSignature.length; j++) { if ((typeof sectionSignature[j] === "string" && PE.isSectionNamePresent(sectionSignature[j])) || (sectionSignature[j] instanceof RegExp && PE.isSectionNamePresentExp(sectionSignature[j]))) { return dbCollection[i]; } } } else if ((typeof sectionSignature === "string" && PE.isSectionNamePresent(sectionSignature)) || (sectionSignature instanceof RegExp && PE.isSectionNamePresentExp(sectionSignature))) { return dbCollection[i]; } } return null; } /** * Validates resource names within a database collection against known PE resource names or regular expressions. * Iterates through the collection and checks if any resource signature matches a known resource name or passes a regular expression test. * * @param {Array} dbCollection - The database collection to validate, where each item is expected to have a resource signature at index 2. * @returns {Array|null} The first matching item from the collection, or null if no match is found. */ function validateResourceNames(dbCollection) { for (var i = 0; i < dbCollection.length; i++) { var resourceSignature = dbCollection[i][2]; if (Array.isArray(resourceSignature)) { for (var j = 0; j < resourceSignature.length; j++) { if ((typeof resourceSignature[j] === "string" && PE.isResourceNamePresent(resourceSignature[j])) || (resourceSignature[j] instanceof RegExp && PE.isResourceNamePresentExp(resourceSignature[j]))) { return dbCollection[i]; } } } else if ((typeof resourceSignature === "string" && PE.isResourceNamePresent(resourceSignature)) || (resourceSignature instanceof RegExp && PE.isResourceNamePresentExp(resourceSignature))) { return dbCollection[i]; } } return null; } /** * Calculates and returns the offset of the PE optional header within the file. * * The function reads the e_lfanew field at offset 0x3C to find the PE header start, * then adds 4 bytes for the PE signature and 20 bytes for the COFF header to locate * the start of the optional header. * * @returns {number} The offset (in bytes) to the optional header in the PE file. */ function getOptHeaderOffset() { return PE.read_int32(0x3C) + 4 + 20; } /** * Checks if the .NET CLR metadata directory is present in the PE file. * * This function determines the presence of the .NET CLR Runtime Header * by reading the appropriate Data Directory entry from the PE Optional Header. * It supports both PE32 and PE32+ formats. * * @returns {boolean} True if the .NET CLR metadata directory is present, false otherwise. */ function isNetMetaDataPresent() { var optHeaderOffset = getOptHeaderOffset(); var numRvaAndSizesOffset, clrDirOffset; if (!PE_Cached.is64bit) { numRvaAndSizesOffset = optHeaderOffset + 0x5C; clrDirOffset = optHeaderOffset + 0xD0; // CLR offset for PE32 } else { numRvaAndSizesOffset = optHeaderOffset + 0x6C; clrDirOffset = optHeaderOffset + 0xE0; // CLR offset for PE64 } // Check if the offsets are within the bounds of the PE file size if (clrDirOffset + 8 > PE.getSize() || numRvaAndSizesOffset + 4 > PE.getSize()) { return false; } // Check if the number of RVA and sizes is valid if (PE.read_int32(numRvaAndSizesOffset) < 15) { return false; } // Read CLR directory RVA and size var clrRva = PE.read_int32(clrDirOffset), clrSize = PE.read_int32(clrDirOffset + 4); // Validate CLR directory RVA and size return clrRva !== 0 && clrSize !== 0; } /** * Checks if a compiler has been detected in the analysis results. * * @returns {boolean} Returns true if any compiler or compiler-related results are found, false otherwise. */ function isCompilerDetected() { return _getNumberOfResults("compiler") > 0 || _getNumberOfResults("~compiler") > 0; } /** * Checks if a linker has been detected in the analysis results. * * @returns {boolean} Returns true if any linker or linker-related results are found, false otherwise. */ function isLinkerDetected() { return _getNumberOfResults("linker") > 0 || _getNumberOfResults("~linker") > 0; } // #region "languages and compilers (.NET and Native)" function scanForLanguagesAndCompilers_NET_and_Native() { log(logType.nothing, "Scanning for programming language..."); var c_cpp = _isLangPresent("C/C++"); // Unknown; C or C++ const extdb = [ ["C++", "cpp"], ["Rust", "rs"], ["Java", "jar"], ["Python", "pyd"], ["Kotlin", "kt"] ]; for (var i = 0; i < extdb.length; i++) { const langName = extdb[i][0], langExtName = extdb[i][1]; if (PE.isSignaturePresent(0x00, PE.getSize(), "%% %% %% %% %% %% %% %% '." + langExtName + "' 00")) { log(logType.any, "Lines of ." + langExtName + " files (" + langName + ") detected"); _setLangByHeur(langName); } } if (!_isLangDetected("C++") && PE.isSignaturePresent(0x00, PE.getSize(), "%% %% %% %% %% %% %% %% %% %% '.c' 00")) { log(logType.any, "Lines of .c files (C) detected (not a C++)"); _setLangByHeur("C"); } for (var i = 0; i < PE_Cached.numberOfUnmanagedResources; i++) { var resourceOffset = PE.getResourceOffsetByNumber(i); if (resourceOffset !== -1) { var resourceSignature = PE.getString(resourceOffset, 0x40); if (resourceSignature.split(" ")[0] === "object" && resourceSignature.indexOf(": ") !== -1) { _setLangByHeur("Object Pascal"); break; } } } var isPpLibraryPresent = false, isCLibraryPresent = false; for (var i = 0; i < PE_Cached.numberOfUnmanagedImports; i++) { const libraryName = PE.getImportLibraryName(i).toLowerCase(); // Detect mangler in imported libraries for (var k = 0; k < PE.getNumberOfImportThunks(i) && !isPpLibraryPresent; k++) { const functionName = PE.getImportFunctionName(i, k); // import, thunk if (isItemMangled(functionName)) { log(logType.any, "Mangler detected -> \"" + libraryName + "\", at function \"" + getNameOfMangledItem(functionName) + "\""); var isNotCpp = false; if (!isCompilerDetected()) { var manglerInfo = getManglerInfoByMangledItem(functionName); if (manglerInfo) { _setResult("~compiler", manglerInfo.compiler, String(), String()); if (!_isLangDetected()) _setLangByHeur(manglerInfo.language); if (manglerInfo.language !== "C++") isNotCpp = true; } } isPpLibraryPresent = !isNotCpp; // if language is unknown } } if ( libraryName.indexOf("++") !== -1 || libraryName.indexOf("cpp") !== -1 || libraryName.indexOf("msvcp") !== -1 ) { log(logType.any, "C++ library present -> \"" + libraryName + "\""); isPpLibraryPresent = true; } if (libraryName.indexOf("msvcr") !== -1 || libraryName.indexOf("crtdll") !== -1) { log(logType.any, "C library present -> \"" + libraryName + "\""); isCLibraryPresent = true; } } // Detect mangler in exports for (var e = 0; e < PE_Cached.numberOfUnmanagedExports && !isPpLibraryPresent; e++) { var exportName = PE.getExportFunctionName(e); if (exportName && isItemMangled(exportName)) { log(logType.any, "Mangler detected at exported item \"" + getNameOfMangledItem(exportName) + "\""); var isNotCpp = false; if (!isCompilerDetected()) { var manglerInfo = getManglerInfoByMangledItem(exportName); if (manglerInfo) { _setResult("~compiler", manglerInfo.compiler, String(), String()); if (!_isLangDetected()) _setLangByHeur(manglerInfo.language); if (manglerInfo.language !== "C++") isNotCpp = true; } } isPpLibraryPresent = !isNotCpp; } } // Detect compilers by Rich signature if (!isCompilerDetected() && PE_Cached.isRichSignaturePresent) { for (var j = 0; j < PE_Cached.numberOfRichIDs; j++) { const richId = PE.getRichID(j), richVersion = PE.getRichVersion(j), richCount = PE.getRichCount(j); if (richId === 0x000d && richVersion === 9782 && richCount === 0x0001) { _setResult("~compiler", "Microsoft Visual Basic", "6.0", String()); _setLangByHeur("VB"); break; } else if (richId === 0x0103) { _setResult("~compiler", "MASM", String(), String()); break; } } } // Detect IL2CPP by sections (thanks to AyukiDev) if (!isCompilerDetected()) { const il2cppSections = [ ".text$mn", ".rdata$zzzdbg", ".rtc$IAA", ".rtc$IZZ", ".rtc$TAA", ".rtc$TZZ", "il2cpp" ]; for (var i = 0; i < il2cppSections.length; i++) { if (PE.isSectionNamePresent(il2cppSections[i])) { _setResult("~compiler", "IL2CPP Technology", String(), String()); _setLangByHeur("Native MSIL/C#"); break; } } } var isCLikeLibsNotFound = !isCLibraryPresent && !isPpLibraryPresent; var majorLinkerVersion = PE.getMajorLinkerVersion(), minorLinkerVersion = PE.getMinorLinkerVersion(); if (!isCompilerDetected() && !isLinkerDetected() && !PE_Cached.isDotNet) { var ehFrameSection = PE.section[".eh_frame"], buildIdSection = PE.section[".build-id"]; if (!ehFrameSection && !buildIdSection && ( PE_Cached.isRichSignaturePresent || PE.compare("'MZ'90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000....00000E1FBA0E00B409CD21B8014CCD21'This program cannot be run in DOS mode.\r\r\n$'00000000") || PE.compare("'MZ'90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000....000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") || PE.isSectionNamePresent(".00cfg") )) { if (PE.isSectionNamePresent(".gfids") || PE.isSectionNamePresent(".giats") || PE.isSectionNamePresent(".gljmp")) { _setResult("~tool", "Microsoft Visual Studio", String(), String()) } _setResult("~linker", "Microsoft Linker", (majorLinkerVersion !== 0 ? (majorLinkerVersion + "." + minorLinkerVersion) : String()), String()); _setResult("~compiler", "Microsoft Visual C/C++", String(), String()); if (!_isLangDetected() && isCLikeLibsNotFound) { if (isNetMetaDataPresent()) { _setLangByHeur("MSIL/C/C++"); } else { _setLangByHeur("C/C++"); } } } else if ( ehFrameSection || buildIdSection || ( PE.isSectionNamePresent(".CRT") && PE.isSectionNamePresent(".rdata") && PE.isSectionNamePresent(".xdata") && PE.isSectionNamePresent(".idata") && (PE.isSectionNamePresent(".tls") || PE.isSectionNamePresent(".bss")) || PE.isSectionNamePresent(".buildid") )) { _setResult("~compiler", "MinGW", String(), String()); if (!_isLangDetected() && isCLikeLibsNotFound) { _setLangByHeur("C/C++"); } } else if (PE.isSectionNamePresent(".flat") && !isPpLibraryPresent) { _setResult("~compiler", "FASM", String(), String()); _setLangByHeur("ASMx" + (PE_Cached.is64bit ? "64" : "86")); } } const rdataSection = PE.section[".rdata"]; if (rdataSection) { if (c_cpp && // if C/C++ detected by DIE PE.isSignaturePresent( rdataSection.FileOffset, rdataSection.FileSize, generateUnicodeSignatureMask("Visual C++"))) { log(logType.any, "Embedded Visual C++ Runtime detected."); isPpLibraryPresent = true; // Visual C++ Runtime library in resources } } if (isPpLibraryPresent || (c_cpp && PE.isSignaturePresent(0x00, PE.getSize() - PE.getOverlaySize(), "' C++ '"))) { _setLangByHeur("C++"); } else if (!_isLangPresent("C++") && isCLibraryPresent && (PE.isFunctionPresent("_iob") || PE.isFunctionPresent("printf") || PE.isFunctionPresent("malloc") || PE.isFunctionPresent("memset"))) { _setLangByHeur("C"); } else if (PE.isLibraryPresentExp(/^api-ms-win-crt*/i) || PE.isSectionNamePresent(".msvcjmc")) { _setLangByHeur("C/C++"); } else if (!_isLangDetected() && !_getNumberOfResults("compiler") && !PE_Cached.isDotNet) { if (!_getNumberOfResults("protector") && !_getNumberOfResults("cryptor") && !_getNumberOfResults("~cryptor") && !_getNumberOfResults("packer") && !_getNumberOfResults("~packer")) { _setLangByHeur("ASMx" + (PE_Cached.is64bit ? "64" : "86")); } } } // #endregion /** * Sets the language based on heuristic analysis. * * @param {string} languageName - The name of the detected language. */ function _setLangByHeur(languageName) { log(logType.any, languageName + " language detected!"); _setLang(languageName, heurLabel); } /** * Adds a new option to the existing options text, separated by " + " if optionsText is not empty. * * @param {string} optionsText - The current options text. * @param {string} newOptionText - The new option to add. * @returns {string} The updated options text with the new option appended. */ function addOption(optionsText, newOptionText) { if (optionsText) optionsText += " + "; optionsText += newOptionText; return optionsText; } /** * Logs a message with a specific type and text. * * @param {number} messageTypeId - The type of the message. * -2: Error, * -1: About, * 1: Any, * 2: .NET. * @param {string} messageText - The text of the message to log. * Must not contain newline characters. * @throws Will throw an error if the messageText contains a newline character. */ function log(messageTypeId, messageText) { if (!messageText) { return; } else if (/\r|\n|\t/.test(messageText)) { messageText = messageText.replace(/[\r\n\t]+/g, " ").replace(/\s+/g, " ").trim(); // _error("Illegal char at log( ... )"); } var prefix = String(); if (messageTypeId !== -2) { prefix = heurLabel; } if (messageTypeId > -2 && messageTypeId !== 0) { prefix += "/"; } switch (messageTypeId) { case -2: prefix = "!"; break; case -1: prefix += "About"; break; case 1: prefix += "Any"; break; case 2: prefix += ".NET"; break; } if (typeof _log !== "undefined") { _log("[" + prefix + "] " + messageText); } else { _error("Unable to write log message"); } } //#region "malicious code (.NET and Native)" function scanForMaliciousCode_NET_and_Native() { log(logType.nothing, "Scanning for malicious code..."); var verdicts = []; const mayBeInfected = "May be infected, be careful!"; if (PE_Cached.isDotNet) { var requiredDotNetImports = [ "System.Diagnostics", "System.IO.Compression", "user32", "kernel32", "ntdll" // no ext ], foundImportsCount = 0, importSignature, pattern, allPatternImportsFound; for (var i = 0; i < requiredDotNetImports.length; i++) { importSignature = "00'" + requiredDotNetImports[i] + "'00"; if (PE.isSignatureInSectionPresent(0, importSignature)) { foundImportsCount++; } } if (PE.isSignatureInSectionPresent(0, "00'System.Net.Sockets'00") && foundImportsCount >= 2) { var maliciousImportPatterns = [ { type: "NjRAT", edition: "0.7D Green Edition", references: [ "w", "System.Drawing", "System.Windows.Forms", "System.Runtime.InteropServices", "avicap32.dll", "capGetDriverDescriptionA", "kernel32", "KERNEL32.DLL", "ntdll", "user32", "GetWindowText", "EnumChildWindows", "SendMessage", "GetWindowTextLength", "user32.dll", "winmm.dll" ], isVbNet: true }, { type: "NjRAT", edition: "0.7D Lime Edition", references: [ "Stub", "System.Drawing", "System.Windows.Forms", "System.Runtime.InteropServices", "avicap32.dll", "capGetDriverDescriptionA", "kernel32", "ntdll", "NtSetInformationProcess", "user32", "MapVirtualKey", "ToUnicodeEx", "GetKeyboardState", "user32.dll", "wintrust.dll" ], isVbNet: true }, { type: "NjRAT", edition: "0.7D", references: [ "Stub", "System.Drawing", "System.Windows.Forms", "System.Runtime.InteropServices", "avicap32.dll", "capGetDriverDescriptionA", "kernel32", "ntdll", "NtSetInformationProcess", "user32", "MapVirtualKey", "ToUnicodeEx", "GetKeyboardState", "user32.dll" ], isVbNet: true }, { type: "NjRAT", edition: "0.11G-0.12G", references: [ "k", "System.Drawing", "System.Windows.Forms", "System.Runtime.InteropServices", "avicap32.dll", "capGetDriverDescriptionA", "kernel32", "ntdll", "NtsetInformationProcess", "user32", "MapVirtualKey", "ToUnicodeEx", "GetKeyboardState", "GetForegroundWindow", "GetWindowTextLengthA", "GetAsyncKeyState", "user32.dll" ], isVbNet: true }, { type: "NjRAT", edition: "0.7D Danger Edition", references: [ "Stub", "System.Drawing", "System.Windows.Forms", "System.Runtime.InteropServices", "avicap32.dll", "capGetDriverDescriptionA", "Kernel32.dll", "KERNEL32.DLL", "user32", "GetWindowText", "EnumChildWindows", "GetForegroundWindow", "SendMessage", "GetWindowTextLength", "SetWindowPos", "user32.dll", "winmm.dll" ], isVbNet: true }, { type: "NjRAT", edition: "0.7D Golden Edition", references: [ "Stub", "System.Drawing", "System.Windows.Forms", "System.Runtime.InteropServices", "avicap32.dll", "kernel32", "Kernel32.dll", "ntdll", "NtSetInformationProcess", "user32", "user32.dll", "GetForegroundWindow", "GetWindowTextA", "winmm.dll" ], isVbNet: true }, { type: "XWorm", edition: "3.0-5.0", references: [ "System.Core", "System.Drawing", "System.Management", "System.Windows.Forms", "System.Runtime.InteropServices", "avicap32.dll", "capCreateCaptureWindowA", "kernel32.dll", "SetThreadExecutionState", "user32.dll", "GetForegroundWindow", "GetWindowText" ], isVbNet: true }, { type: "VenomRAT", edition: "6.X", references: [ "Microsoft.CSharp", "System.Core", "System.Drawing", "System.Management", "System.Windows.Forms", "System.Runtime.InteropServices", "kernel32.dll", "SetThreadExecutionState", "ntdll.dll", "RtlSetProcessIsCritical", "user32.dll", "GetWindowText", "GetForegroundWindow" ], isVbNet: true }, { type: "RevengeRAT", edition: "0.3", references: [ "System.Management", "System.Windows.Forms", "avicap32.dll", "capGetDriverDescriptionA", "kernel32", "psapi", "EmptyWorkingSet", "user32", "GetWindowText" ], isVbNet: true }, { type: "Webremote TorCT", edition: undefined, references: [ "System.Windows.Forms", "avicap32.dll", "capGetDriverDescriptionA", "capCreateCaptureWindowA", "user32", "SendMessage", "SetWindowPos", "DestroyWindow", "user32.dll", "GetForegroundWindow", "GetWindowText" ], isVbNet: true }, { // NjRAT Generic 1 type: "NjRAT", edition: undefined, references: [ "System.Drawing", "System.Windows.Forms", "GetForegroundWindow", "System.Runtime.InteropServices", "System.Security.Cryptography", "GetWindowText", "avicap32.dll", "A", "kl", "OK" ], isVbNet: true }, { // NjRAT Generic 2 (with USB-spreader) type: "NjRAT", edition: undefined, references: [ "System.Drawing", "System.Windows.Forms", "GetForegroundWindow", "System.Runtime.InteropServices", "System.Security.Cryptography", "GetWindowText", "avicap32.dll", "A", "kl", "USB" ], isVbNet: true } ]; for (var j = 0; j < maliciousImportPatterns.length; j++) { pattern = maliciousImportPatterns[j]; allPatternImportsFound = true; for (var k = 0; k < pattern.references.length && allPatternImportsFound; k++) { importSignature = "00'" + pattern.references[k] + "'00"; if (!PE.isSignatureInSectionPresent(0, importSignature)) { allPatternImportsFound = false; } } // If not all pattern imports were found, skip this pattern if (!allPatternImportsFound) { continue; } // Check for VB.NET standard library references if (pattern.isVbNet && !PE_Cached.isVbNetStandardLibraryPresent) { continue; } verdicts.push({ type: pattern.type, version: pattern.edition ? pattern.edition : String(), details: String() }); break; } } var separatorToSearch = generateUnicodeSignatureMask("|'|'|") + "00"; separatorToSearch = "??" + separatorToSearch.substring(2, separatorToSearch.length); // NjRAT Generic: Detect NjRAT via requests-separator or assembly name if (verdicts.length === 0 && ( PE_Cached.nameOfNetAssemblyName === "w" || PE_Cached.nameOfNetModuleName === "w.exe" || PE_Cached.nameOfNetAssemblyName === "k" || PE_Cached.nameOfNetModuleName === "k.exe" || PE.isNetObjectPresent("njLogger") || PE.isNetUStringPresent("|PWD| ") || PE.isSignatureInSectionPresent(0, separatorToSearch))) { verdicts.push({ type: "NjRAT", version: String(), details: String() }); } if (verdicts.length === 0 && PE.isNetObjectPresent("avfucker")) { verdicts.push({ type: "RAT Injector", version: String(), details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.asyncrat if (verdicts.length === 0 && ( PE_Cached.nameOfNetAssemblyName === "AsyncClient" || PE_Cached.nameOfNetModuleName === "AsyncClient.exe" || PE.isNetObjectPresent("Pastebin") )) { verdicts.push({ type: "AsyncRAT", version: String(), details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.nanocore if (verdicts.length === 0 && (PE.isNetObjectPresent("ClientLoaderForm") || PE_Cached.nameOfNetAssemblyName === "NanoCore Client")) { verdicts.push({ type: "NanoCore RAT", version: String(), details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.orcus_rat if (verdicts.length === 0 && (PE_Cached.nameOfNetModuleName === "Orcus.exe" || PE.isNetObjectPresent("Orcus.Connections"))) { verdicts.push({ type: "Orcus RAT", version: "1.3-1.9.1", details: String() }); } // https://www.broadcom.com/support/security-center/protection-bulletin/liberium-rat-malware if (verdicts.length === 0 && (PE_Cached.nameOfNetModuleName === "Client.exe" && PE.isNetObjectPresent("System.Security.Cryptography.X509Certificates"))) { verdicts.push({ type: "Liberium RAT", version: String(), details: String() }); } if (verdicts.length === 0 && PE.isNetObjectPresent("button_unlock_Click")) { verdicts.push({ type: "Liberium WinLocker", version: String(), details: String() }); } if (verdicts.length === 0 && PE_Cached.nameOfNetModuleName === "Kheir.exe") { verdicts.push({ type: "jnRAT", version: String(), details: String() }); } if (verdicts.length === 0 && PE_Cached.nameOfNetModuleName === "QatarC.exe") { verdicts.push({ type: "Qatar RAT", version: "1.2", details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.darkrat if (verdicts.length === 0 && (PE_Cached.nameOfNetModuleName === "Client.exe" && PE.isNetObjectPresent("fusion"))) { verdicts.push({ type: "DarkRAT", version: String(), details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.icarus (??) if (verdicts.length === 0 && PE.isNetObjectPresent("tosuck")) { verdicts.push({ type: "ICARUS Evil Worm RAT", version: String(), details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.noneuclid_rat if (verdicts.length === 0 && PE.isNetObjectPresent("isVM_by_wim_temper")) { verdicts.push({ type: "NonEuclid RAT", version: String(), details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.imminent_monitor_rat if (verdicts.length === 0 && PE.isNetObjectPresent("LZLoader") && PE.isNetObjectPresent("Injector")) { verdicts.push({ type: "Imminent Monitor RAT", version: String(), details: String() }); } if (verdicts.length === 0 && (PE.isSignatureInSectionPresent(0, "00" + generateUnicodeSignatureMask(" RAT") + "00 **") || PE.isNetObjectPresent("AntiTaskManager") || PE.isNetObjectPresent("BlockAvSites") || PE.isNetObjectPresent("UpdaterEXE") || ( // System.Net.Sockets + GetForegroundWindow + GetWindowsText PE.isNetObjectPresent("System.Net.Sockets") && PE.isNetObjectPresent("GetForegroundWindow") && PE.isNetObjectPresent("GetWindowText") && ( // Search for 'AntivirusProduct' or 'DisableTaskMgr' PE.isSignatureInSectionPresent(0, generateUnicodeSignatureMask("AntivirusProduct")) || PE.isSignatureInSectionPresent(0, generateUnicodeSignatureMask("DisableTaskMgr")) ) ) || ( // GetForegroundWindow + GetWindowText + NtSetInformationProcess PE.isNetObjectPresent("GetForegroundWindow") && PE.isNetObjectPresent("GetWindowText") && PE.isNetObjectPresent("NtSetInformationProcess") ))) { verdicts.push({ type: "RAT", version: String(), details: "General signs" }); } } if (verdicts.length === 0 && ( PE.isNetObjectPresent("potentiallyVulnerablePasswords") || PE.isNetObjectPresent("ScanGeckoBrowsersPaths") || PE.isNetObjectPresent("ScannedWallets") || PE.isNetObjectPresent("GetPasswords") || PE.isNetObjectPresent("ScanSteam") || PE.isNetObjectPresent("GetCookies") )) { verdicts.push({ type: "Stealer", version: String(), details: "General signs" }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.ramnit if (verdicts.length === 0 && PE.isSectionNamePresent(".rmnet")) { verdicts.push({ type: "Ramnit", version: String(), details: "infected" }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.neshta if (verdicts.length === 0 && PE_Cached.isArchX86 && PE.compareEP( "55" + // push ebp "8B EC" + // mov ebp, esp "83 C4 E0" + // add esp, -0x20 "33 C0" + // xor eax, eax "89 45 E0" + // mov dword ptr [ebp - 0x20], eax "89 45 E8" + // mov dword ptr [ebp - 0x18], eax "89 45 E4" + // mov dword ptr [ebp - 0x1c], eax "89 45 EC" + // mov dword ptr [ebp - 0x14], eax "B8 54 80 40 00" + // mov eax, 0x408054 "E8 12 BE FF FF" + // call $+5 - 0x41EE "33 C0" + // xor eax, eax "55" + // push ebp "68 20 82 40 00" + // push 0x408220 "64 FF 30" + // push dword ptr fs:[eax] "64 89 20" + // mov dword ptr fs:[eax], esp "B8 A8 91 40 00" + // mov eax, 0x4091a8 "B9 0B 00 00 00" // mov ecx, 0xb )) { verdicts.push({ type: "Neshta", version: String(), details: "infected" }); } // https://citec.us/forum/showthread.php/15998-ConsoleDevil if (verdicts.length === 0 && PE_Cached.isArchX86 && PE.compareEP( "68 .. .. .. .." + // push [...] "68 00 00 00 00" + // push 0 "68 .. .. .. .." + // push [...] "E8 .. .. .. .." + // call [...] "83 C4 0C" + // add esp, 0xc "68 00 00 00 00" // push 0 )) { var consoleDevilVersion = String(); if (PE.isImportPositionHashPresent(0, 0xb27ceda0) && PE.isImportPositionHashPresent(1, 0xa77d975c)) { consoleDevilVersion = "1.0"; } else if (PE.isImportPositionHashPresent(0, 0x1dec6c44) && PE.isImportPositionHashPresent(1, 0xf1ed6358)) { consoleDevilVersion = "1.2"; } if (consoleDevilVersion) { verdicts.push({ type: "ConsoleDevil RAT", version: consoleDevilVersion, details: String() }); } } // https://malpedia.caad.fkie.fraunhofer.de/details/win.poison_ivy if (verdicts.length === 0 && PE_Cached.isArchX86 && PE.compareEP( "B8 00 04 40 00" + // mov eax, 0x400400 "FF D0" + // call eax "6A 00" // push 0 ) && PE.isImportPositionHashPresent(0, 0xbd365a2a)) { verdicts.push({ type: "Poison Lvy RAT", version: String(), details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.ghost_rat if (verdicts.length === 0 && PE.isExportFunctionPresent("Ip")) { verdicts.push({ type: "Gh0st RAT", version: String(), details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.darkcomet if (verdicts.length === 0 && // Todo fix /* (PE.isImportPositionHashPresent(0, 0xcf603a7d) && PE.isImportPositionHashPresent(1, 0xe6aa7d45) && PE.isImportPositionHashPresent(2, 0xa26edfd0)) || */ // UPX packed (PE.isImportPositionHashPresent(0, 0xf375ee03) && PE.isImportPositionHashPresent(1, 0x6043ad68) && PE.isImportPositionHashPresent(2, 0x49e8b6dd)) || // MPRESS packed (PE.isImportPositionHashPresent(0, 0x174efb84) && PE.isImportPositionHashPresent(1, 0x4afe3a51) && PE.isImportPositionHashPresent(2, 0x3d9a43d0)) ) { verdicts.push({ type: "DarkComet RAT", version: "5.3", details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.bit_rat if (verdicts.length === 0 && PE_Cached.numberOfUnmanagedImports === 1) { var isBitRatDetected = false, isBitRatTorStubVersion = false; if (PE.isImportPositionHashPresent(0, 0x202c6668)) { isBitRatDetected = true; } else if (PE.isImportPositionHashPresent(0, 0x249e9ed3)) { isBitRatDetected = true; isBitRatTorStubVersion = true; } if (isBitRatDetected) { verdicts.push({ type: "BitRAT", version: String(), details: isBitRatTorStubVersion ? "Tor" : String() }); } } if (verdicts.length === 0 && (PE.isImportPositionHashPresent(0, 0x991f7f9a) && PE.isImportPositionHashPresent(1, 0x3495fca1)) || (PE.isImportPositionHashPresent(0, 0x7d78c0f9) && PE.isImportPositionHashPresent(1, 0x4b76cb0f))) { verdicts.push({ type: "Furax RAT", version: String(), details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/ps1.octopus if (verdicts.length === 0 && (PE.isImportPositionHashPresent(0, 0x42600eef) && PE.isSignatureInSectionPresent(0, "'Octopus'"))) { verdicts.push({ type: "Octopus RAT", version: String(), details: String() }); } if (verdicts.length === 0 && (PE_Cached.numberOfUnmanagedImports === 1 && PE.isImportPositionHashPresent(0, 0x06a04d16)) || (PE_Cached.numberOfUnmanagedImports > 4 && PE.isImportPositionHashPresent(0, 0xa719918b) && PE.isImportPositionHashPresent(-1, 0x9f8ccfc6)) ) { verdicts.push({ type: "Biorante", version: "1.X", details: String() }); } if (verdicts.length === 0 && PE.isImportPositionHashPresent(0, 0xb3318086) && // UPX packed PE.isImportPositionHashPresent(1, 0x3d9a43d0) && PE.isImportPositionHashPresent(7, 0xf3b2674d)) { verdicts.push({ type: "Smart RAT", version: "1.0.X", details: String() }); } if (verdicts.length === 0 && PE_Cached.numberOfUnmanagedImports === 1 && PE.isImportPositionHashPresent(0, 0x1b62aa20)) { verdicts.push({ type: "Ace RAT", version: "1.X", details: String() }); } if (verdicts.length === 0 && PE_Cached.numberOfUnmanagedImports === 1 && PE_Cached.isRichSignaturePresent && PE.isImportPositionHashPresent(0, 0x2d6f7e88)) { verdicts.push({ type: "Aquates RAT", version: "1.0", details: String() }); } if (verdicts.length === 0 && PE.section[0].Name === "\uFFFD\uFFFD50") { verdicts.push({ type: "Exception RAT", version: "1.0", details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.bozok if (verdicts.length === 0 && !PE_Cached.isRichSignaturePresent && PE.isImportPositionHashPresent(0, 0xbd365a2a)) { // kernel32.dll->ExitProcess var bozokRatVersion = String(); if (PE.isImportPositionHashPresent(1, 0x0ed01f83)) { bozokRatVersion = "1.0"; } else if (PE.isImportPositionHashPresent(1, 0xefd4be65)) { bozokRatVersion = "1.2-1.3"; } else if (PE.isImportPositionHashPresent(1, 0x58133a50)) { bozokRatVersion = "1.4-1.5.X"; } if (bozokRatVersion) { verdicts.push({ type: "Bozok RAT", version: bozokRatVersion, details: String() }); } } if (verdicts.length === 0 && !PE_Cached.isRichSignaturePresent) { // VB5 var aquaRatVersion = String(); if (PE.isImportPositionHashPresent(0, 0xfc2095af)) { aquaRatVersion = "0.0.1"; } else if (PE.isImportPositionHashPresent(0, 0x8bc8445e)) { aquaRatVersion = "0.2"; } if (aquaRatVersion && PE.isSignatureInSectionPresent(0, "'Aqua'")) { verdicts.push({ type: "Aqua RAT", version: aquaRatVersion, details: String() }); } } if (verdicts.length === 0 && (PE.isImportPositionHashPresent(0, 0x90648ec6) && PE.isImportPositionHashPresent(1, 0x199ccb02) && PE.isImportPositionHashPresent(2, 0x4bb25d37)) || (PE.isImportPositionHashPresent(0, 0x41b27a00) && PE.isImportPositionHashPresent(1, 0x56a9aa44) && PE.isImportPositionHashPresent(2, 0x4bb25d37)) || (PE.isImportPositionHashPresent(0, 0xc649d485) && PE.isImportPositionHashPresent(1, 0xf2e69b15) && PE.isImportPositionHashPresent(2, 0x4bb25d37)) || (PE.isImportPositionHashPresent(0, 0xe27edc0d) && PE.isImportPositionHashPresent(1, 0x1da5760e) && PE.isImportPositionHashPresent(2, 0x42779d34)) || // UPX packed (PE.isImportPositionHashPresent(0, 0x3d9a43d0) && PE.isImportPositionHashPresent(1, 0xc28f4fe3) && PE.isImportPositionHashPresent(2, 0x5d1bddcc)) || (PE.isImportPositionHashPresent(0, 0xf375ee03) && PE.isImportPositionHashPresent(1, 0x3d9a43d0) && PE.isImportPositionHashPresent(2, 0xc28f4fe3) && (PE.isImportPositionHashPresent(3, 0x5d1bddcc) || PE.isImportPositionHashPresent(3, 0xa2163984))) ) { verdicts.push({ type: "Babylon RAT", version: String(), details: String() }); } if (verdicts.length === 0 && PE.isImportPositionHashPresent(0, 0x519fb9a6) && PE.isImportPositionHashPresent(1, 0x69561fa8) && PE.isImportPositionHashPresent(2, 0xe6aa7d45)) { verdicts.push({ type: "Sinique RAT", version: "1.0", details: String() }); } // https://malpedia.caad.fkie.fraunhofer.de/details/win.netwire if (verdicts.length === 0 && PE.isImportPositionHashPresent(1, 0x5d1bddcc)) { var netWireVersion = String(); if (PE.isImportPositionHashPresent(0, 0xfa0dd025)) { netWireVersion = "1.2.X"; } else if (PE.isImportPositionHashPresent(0, 0x7845f465)) { netWireVersion = "1.4"; } if (netWireVersion) { verdicts.push({ type: "NetWire RAT", version: netWireVersion, details: String() }); } } // https://malpedia.caad.fkie.fraunhofer.de/details/win.remcos if (verdicts.length === 0 && PE.isImportPositionHashPresent(0, 0xf25ba92f) && PE.isImportPositionHashPresent(1, 0xf740ae08) && PE.isImportPositionHashPresent(2, 0xba3a1112)) { verdicts.push({ type: "Remcos RAT", version: String(), details: String() }); } // https://web.archive.org/web/20260108153947/https://indetectables.net/viewtopic.php?t=20716 if (verdicts.length === 0 && !PE_Cached.isRichSignaturePresent && PE_Cached.numberOfUnmanagedImports === 20 && PE.isImportPositionHashPresent(9, 0x5206612e) && PE.isImportPositionHashPresent(16, 0xf3b2674d) && PE.isImportPositionHashPresent(19, 0xabde73fb)) { verdicts.push({ type: "Daleth RAT", version: "1.0", details: String() }); } // https://web.archive.org/web/20090902161812/http://synsecurity.net/index.php?page=downloads if (verdicts.length === 0 && !PE_Cached.isRichSignaturePresent && PE_Cached.numberOfUnmanagedImports === 31 && PE.isImportPositionHashPresent(0, 0xcf603a7d) && PE.isImportPositionHashPresent(-1, 0x0201b2be) && PE.isImportPositionHashPresent(-1, 0x3ca208f6)) { verdicts.push({ type: "Syndrome RAT", version: "4.3.X", details: String() }); } if (verdicts.length === 0 && !PE_Cached.isRichSignaturePresent && PE.isTLSPresent() && ( (PE.isImportPositionHashPresent(18, 0xc3df3568) && PE.isSignatureInSectionPresent(0, "'lock_text'00")) || (PE.isImportPositionHashPresent(4, 0xc3df3568) && PE.isImportPositionHashPresent(5, 0x622ae906)) // UPX packed )) { verdicts.push({ type: "Amp WinLocker", version: "Sumhex Edition", details: String() }); } // https://max.ru/ if (verdicts.length === 0 && ( PE.getVersionStringInfo("ProductName") === "Max" || PE.getVersionStringInfo("CompanyName") === "Communication Platform LLC" )) { verdicts.push({ type: "MAX Spyware", version: String(), details: String() }); } // Many not-so-smart virus writers use base64 to pack // or hide malicious code, but do not realize that this // is very easily detected by heuristic analysis. const signaturesVariants = [ "TVoAAAAAA", // MZ ~[00 00 00 00 00] "TVqQAA", // MZ ~[90 00 03] "TVpQAA", // MZ ~[50 00 02] "TVp4AA" // MZ ~[78 00 01] ]; // Iterate through signature variants for (var s = 0; s < signaturesVariants.length; s++) { const trigger = signaturesVariants[s]; // Check if the signature is valid using Unicode signature mask or the original signature if ( validateGlobalUnicodeString(trigger) || validateSignature("'" + trigger + "'") ) { verdicts.push({ type: "Base64 payload", version: String(), details: mayBeInfected }); break; } } // Check for obfuscated names and anomalous signs in .NET and native assemblies if (PE_Cached.isDotNet && ( PE_Cached.nameOfNetAssemblyName.toLowerCase() === "stub" || PE_Cached.nameOfNetModuleName.toLowerCase().indexOf("stub.") === 0 || PE_Cached.nameOfNetAssemblyName.toLowerCase().indexOf("crypted") !== -1 || PE_Cached.nameOfNetModuleName.toLowerCase().indexOf("crypted") !== -1 || PE_Cached.nameOfNetAssemblyName.toLowerCase().indexOf("payload") !== -1 || PE_Cached.nameOfNetModuleName.toLowerCase().indexOf("payload") !== -1 || isNameObfuscated(PE_Cached.nameOfNetAssemblyName) || isNameObfuscated(PE_Cached.nameOfNetModuleName) || /(^tmp|\.tmp$)/.test(PE_Cached.nameOfNetModuleName) ) || PE.getVersionStringInfo("OriginalFilename").toLowerCase().indexOf("stub.") === 0 || PE.getVersionStringInfo("InternalName").toLowerCase().indexOf("stub.") === 0 || (function () { var fieldsToCheck = [ "Comments", "CompanyName", "FileDescription", "ProductName", "LegalCopyright", "LegalTrademarks", "OriginalFilename", "InternalName" ]; for (var i = 0; i < fieldsToCheck.length; i++) { if (isNameObfuscated(PE.getVersionStringInfo(fieldsToCheck[i]))) { return true; } } return false; })() ) { verdicts.push({ type: "Anomalous build info", version: String(), details: mayBeInfected }); } if (PE.isResourceNamePresentExp(/^(STUB|SERVER)(\.[A-Z]{3})?$/) || PE.isResourceNamePresentExp(/(PAYLOAD|SHELLCODE|INJECT|CRYPTED)/)) { verdicts.push({ type: "Anomalous resources", version: String(), details: mayBeInfected }); } for (var v = 0; v < verdicts.length; v++) { var verdict = verdicts[v]; _setResult("~malware", verdict.type, verdict.version, verdict.details); } } // #endregion // #region "interesting markers (.NET and Native)" function scanForInterestingMarkers_NET_and_Native() { log(logType.nothing, "Scanning for interesting markers..."); var options = String(); var isDetected = Boolean(); // https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ee417681(v=vs.85)#:~:text=Root%20Element:%20GameDefinitionFile,GameDefinition%20Attributes var isGdfSchemaPresent = false; for (var i = 0; i < PE_Cached.numberOfUnmanagedResources && !isGdfSchemaPresent; i++) { if (PE.getResourceNameByNumber(i) === "__GDF_XML") { if (PE.isSignaturePresent( PE.getResourceOffsetByNumber(i), PE.getResourceSizeByNumber(i), generateUnicodeSignatureMask("GameDefinitionFile"))) { isGdfSchemaPresent = true; } } } if (isGdfSchemaPresent) options = "GDF Schema"; if (options.length != 0) isDetected = true; if (isDetected) { _setResult("~marker", "Contains", String(), PE.isVerbose() ? options : String()); } } // #endregion // Every time I start writing bad code I get hit with my head on the keybofewuihdsowefjfqodgsa79dowqhdsioefurogrwhuoguethuhofrwyioguqwehuf ================================================ FILE: db/PE/_debug_data.5.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Detect It Easy: detection rule file // Reports each PE Debug Directory entry as a separate detection result. // For UNKNOWN-typed entries the raw data is inspected to identify the format. meta("debug data", "Records"); function detect() { var numOfDebugDataRecords = PE.getNumberOfDebugDataRecords(); if (numOfDebugDataRecords > 0) { bDetected = true; } for (var i = 0; i < numOfDebugDataRecords; i++) { var sType = PE.getDebugDataType(i); if (sType === "UNKNOWN") { detectUnknownDebugData(PE.getDebugDataOffset(i), PE.getDebugDataSize(i)); } else { sOptions = sOptions.append(sType.toLowerCase()); } } return result(); } function detectUnknownDebugData(nDataOffset, nDataSize) { if (nDataSize < 2) { return; } // Borland TDS (Turbo Debugger Symbols) if (PE.readWord(nDataOffset) === 0x52FB) { var minor = PE.readByte(nDataOffset + 2), major = PE.readByte(nDataOffset + 3), minorStr = ((minor >> 4) * 10 + (minor & 0x0F)).toString(), majorStr = ((major >> 4) * 10 + (major & 0x0F)).toString(), sVer = majorStr + "." + minorStr, nSymbols = PE.readWord(nDataOffset + 0xE); _setResult("debug data", "Borland TDS", sVer, nSymbols ? (nSymbols + " symbols") : ""); } else if (PE.compare("'FB09'", nDataOffset)) { _setResult("debug data", "Borland TDS", "", "Delphi TDS"); } else if (PE.compare("'FB0A'", nDataOffset)) { _setResult("debug data", "Borland TDS", "", "C++ TDS"); } } ================================================ FILE: db/PE/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = PE; var X = PE; /** * Get the signature at an offset of the entry point. * @see Binary.getSignature */ PE.getEntryPointSignature = function (nOffset, nSize) { return PE.getSignature(PE.nEP + nOffset, nSize); } /** * Add console and/or administrator requirement to the general options. * @returns {String} */ PE.getGeneralOptionsEx = function () { sResult = PE.getGeneralOptions(); if (PE.isConsole()) { sResult = sResult.append("console"); } if (/requireAdministrator/.test(PE.getManifest())) { sResult = sResult.append("admin"); } if (PE.isSignedFile()) { sResult = sResult.append("signed"); } return sResult; } /** * Locate the first library matching a pattern. * @returns {?Array} null if not found, otherwise: *
[-1] is the number of the library; *
[0] is the name of the library (lower cased); *
[1] onwards are the captured subpatterns. */ PE.isLibraryPresentExp = function (sLibraryPattern) { var aMatch = null; for (var n = 0; n < PE.getNumberOfImports(); n++) { aMatch = PE.getImportLibraryName(n).match(sLibraryPattern); if (aMatch) { aMatch[-1] = n; aMatch[0] = PE.getImportLibraryName(n).toLowerCase(); break; } } return aMatch; } /** * Locate the first export function matching a pattern. * @returns {?Array} null if not found, otherwise: *
[-1] is the number of the export function; *
[0] is the name of the export function; *
[1] onwards are the captured subpatterns. */ PE.isExportFunctionPresentExp = function (sExportPattern) { var aMatch = null; for (var n = 0; n < PE.getNumberOfExportFunctions(); n++) { aMatch = PE.getExportFunctionName(n).match(sExportPattern); if (aMatch) { aMatch[-1] = n; aMatch[0] = PE.getExportFunctionName(n); break; } } return aMatch; } /** * Locate the first section matching a pattern. * @returns {?Array} null if not found, otherwise: *
[-1] is the number of the section; *
[0] is the name of the section; *
[1] onwards are the captured subpatterns. */ PE.isSectionNamePresentExp = function (sSectionPattern) { var aMatch = null; for (var n = 0; n < PE.getNumberOfSections(); n++) { aMatch = PE.getSectionName(n).match(sSectionPattern); if (aMatch) { aMatch[-1] = n; aMatch[0] = PE.getSectionName(n); break; } } return aMatch; } /** * Locate the first resource matching a pattern. * @returns {?Array} null if not found, otherwise: *
[-1] is the number of the resource; *
[0] is the name of the resource; *
[1] onwards are the captured subpatterns. */ PE.isResourceNamePresentExp = function (sResourcePattern) { var aMatch = null; for (var n = 0; n < PE.getNumberOfResources(); n++) { aMatch = PE.getResourceNameByNumber(n).match(sResourcePattern); if (aMatch) { aMatch[-1] = n; aMatch[0] = PE.getResourceNameByNumber(n); break; } } return aMatch; } /** * The number of the last section. */ PE.nLastSection = PE.getNumberOfSections() - 1; function Section(number, name, virtsize, rva, filesize, offset, characteristics) { this.Number = number; this.Name = name; this.VirtualSize = virtsize; this.VirtualAddress = rva; this.FileSize = filesize; this.FileOffset = offset; this.Characteristics = characteristics; } /** * An array of sections, indexed by number and name (if not numeric). Members are the same as the functions. * @example * var rsrcSection = PE.section[".rsrc"].FileOffset; */ PE.section = []; for (var i = 0; i <= PE.nLastSection; i++) { PE.section[i] = new Section(i, PE.getSectionName(i), PE.getSectionVirtualSize(i), PE.getSectionVirtualAddress(i), PE.getSectionFileSize(i), PE.getSectionFileOffset(i), PE.getSectionCharacteristics(i)); if (PE.section[i].Name) { var name = PE.section[i].Name; // Don't do numeric names, as they are always treated as an index. if (+name.toString() != name) { // parseInt crashes the application if Delphi project uses diedll :( PE.section[name] = PE.section[i]; } } } // Create dummy sections for the few files that need them. PE.section[-1] = new Section(-1, "\0", 0, 0, 0, PE.getSize(), 0); if (PE.nLastSection == -1) { PE.section[0] = PE.section[-1]; } // Create an array of resources. function Resource(number, id, name, offset, size, type) { this.Number = number; this.Id = id; this.Name = name; this.Offset = offset; this.Size = size; this.Type = type; } /** * An array of resources, indexed by number and name (if not numeric). Members are the same as the functions. * @example * var packageInfoResource = PE.resource["PACKAGEINFO"].Offset; */ PE.resource = []; for (var i = 0; i < PE.getNumberOfResources(); i++) { PE.resource[i] = new Resource(i, PE.getResourceIdByNumber(i), PE.getResourceNameByNumber(i), PE.getResourceOffsetByNumber(i), PE.getResourceSizeByNumber(i), PE.getResourceTypeByNumber(i)); if (PE.resource[i].Name) { var name = PE.resource[i].Name; // Don't do numeric names, as they are always treated as an index. if ((+name).toString() != name) { // parseInt crashes the application if Delphi project uses diedll :( PE.resource[name] = PE.resource[i]; } } } ================================================ FILE: db/PE/archive_7z.6.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("archive", "7-Zip"); function detect() { const overlayOffset = PE.getOverlayOffset(); if (PE.compareOverlay("';!@Install@!UTF-8!'") || PE.compareOverlay("efbbbf';!@Install@!UTF-8!'")) { if (PE.isSignaturePresent(overlayOffset, 0x2000, "'7z'BCAF271C")) { sVersion = "SFX"; bDetected = true; } } else if (PE.compare("'7z'BCAF271C", overlayOffset)) { sVersion = PE.readByte(overlayOffset + 6) + "." + PE.readByte(overlayOffset + 7); if (sVersion.match(/^\d+\.\d+$/)) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/arj.6.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood includeScript("arj"); function detect() { detect_ARJ(0); return result(); } ================================================ FILE: db/PE/compiler_BatchToApp.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/DosX-dev/BatchToApp meta("compiler", "BatchToApp"); function detect() { bDetected = PE.isNetObjectPresent("GeneratedWithBatchToApp") && PE.isNetUStringPresent("Unable to execute."); sLang = "Batch"; return result(); } ================================================ FILE: db/PE/compiler_BeRo_Tiny_Pascal.6.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "BeRo Tiny Pascal"); function detect() { if (PE.compareEP("E9........' Compiled by: BeRoTinyPascal - (C) Copyright 2006, Benjamin '27'BeRo'27' Rosseaux '")) { bDetected = true; } sLang = "Pascal"; return result(); } ================================================ FILE: db/PE/compiler_Borland_C++.6.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Compiler_Versions // coauthor: sendersu (If errors pls contact sendersu on cracklab.team) meta("compiler", "Borland C++"); includeScript("Borland"); function detect() { bDetected = bBorlandC; if (bDetected == 2) { sVersion = "1999"; bDetected = true; } if (bDetected) { var dvclalResource = PE.resource["DVCLAL"]; if (PE.resource["PACKAGEINFO"] || dvclalResource) { sVersion = "Builder"; if (dvclalResource) { // try to decode DVCLAL (Delphi Visual Component Library Access License) values nOffset = PE.getResourceNameOffset("DVCLAL"); if (PE.compare("A28CDF987B3C3A7926713F090F2A2517", nOffset)) { sOptions = "Professional"; } else if (PE.compare("23785D23B6A5F31943F3400226D111C7", nOffset)) { sOptions = "Standard"; } else if (PE.compare("263D4F38C28237B8F3244203179B3A83", nOffset)) { sOptions = "Enterprise"; } } } } sLang = "C++"; return result(); } ================================================ FILE: db/PE/compiler_Cygwin32.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Cygwin32"); function detect() { if (PE.compareEP("5589E583EC04833D")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/compiler_DECFortran.4.sg ================================================ // Detect It Easy: detection rule file // Author: sendersu // If errors pls contact sendersu on cracklab.team meta("compiler", "DEC Visual Fortran (Windows)"); function detect() { if (PE.isSectionNamePresent(".data")) { var dataSection = PE.section[".data"]; var nVersionOffset = PE.findString(dataSection.FileOffset, dataSection.FileSize, "DEC Fortran RTL Message Catalog"); if (nVersionOffset != -1) { sVersion = "14-Jul-1999" bDetected = true; } } sLang = "Fortran"; return result(); } ================================================ FILE: db/PE/compiler_DMD.6.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // 27.12.2023 @DosX_dev add strings // 29.06.2025 @DosX_dev rule logic optimized // TODO: Rewrite this script meta("compiler", "DMD"); function detect() { if (PE.isNet()) return; // Doesn't support .NET if (PE.isSectionNamePresent(".minfo") && PE.isSectionNamePresent("._deh")) { bDetected = true; } var rdataSection = PE.section[".rdata"], rdataSectionOffset = -1, rdataSectionSize = -1; if (rdataSection) { rdataSectionOffset = rdataSection.FileOffset; rdataSectionSize = rdataSection.FileSize; } if (!bDetected) { if (rdataSection && PE.isDeepScan()) { if (PE.findSignature(rdataSectionOffset, rdataSectionSize, "'core.sys.windows.dll'") != -1 && PE.findSignature(rdataSectionOffset, rdataSectionSize, "'string.d'") != -1) { bDetected = true; } } } if (bDetected && rdataSection) { var strOffset = PE.findString(rdataSectionOffset, rdataSectionSize, "This program will continue, but will not operate when using DMD "); if (strOffset != -1) { sVersion = PE.getString(strOffset - 7, 5); if (sVersion.indexOf(".") == -1 || sVersion.split(".")[0].length != 1) { sVersion = String(); } } } sLang = "D"; return result(); } ================================================ FILE: db/PE/compiler_DarkBASIC.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "DarkBASIC Professional"); function detect() { if (PE.isOverlayPresent() && PE.isSignaturePresent(PE.getOverlayOffset(), 2048, "'dbprocore.dll'")) { bDetected = true; } sLang = "DarkBASIC"; return result(); } ================================================ FILE: db/PE/compiler_Delphi.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // 1995-2007 Borland Delphi // 2007-2014 Embarcadero Delphi; // https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Compiler_Versions // coauthor: sendersu meta("compiler", "Borland Delphi"); includeScript("Borland"); function getVersion() { if (PE.isNet()) { sOptions = ".NET"; if (PE.isNetObjectPresent("Borland.Vcl.Types")) { sVersion = "8"; } else if (PE.isNetObjectPresent("Borland.Eco.Interfaces")) { sVersion = "8 Eco WinForm"; } else if (PE.isNetObjectPresent("Borland.Delphi.System") && PE.isNetObjectPresent("WinForm")) { sVersion = "8 WinForm"; } else if (PE.isNetObjectPresent("Borland.Delphi.Units")) { sVersion = "2005"; } else if (PE.isNetObjectPresent("Borland.Studio.Delphi")) { sName = "Embarcadero Delphi"; sVersion = "XE*"; } else { return false; } return true; } var nSectionOffset = PE.section[0].FileOffset, nSectionSize = PE.section[0].FileSize, nOffset = nSectionOffset, nSize = nSectionSize, nOffset2, nAddress, nLng, nLng1, bNewVersion = false; var nAddressSize = PE.is64() ? 8 : 4; while (nSize > 0) { nOffset = PE.findSignature(nOffset, nSize, "0708'TControl'"); if (nOffset == -1) { break; } nAddress = PE.readDword(nOffset + 10); nOffset2 = PE.VAToOffset(nAddress); if (nOffset2 != -1) { if (nOffset2 >= nSectionOffset && (nOffset2 < nSectionOffset + nSectionSize)) { nLng = PE.readDword(nOffset2 - 10 * nAddressSize); nLng1 = PE.readDword(nOffset2 - 10 * nAddressSize - 11 * nAddressSize); switch (nLng) { case 0: if (nLng1 == 0x746E4907) { sVersion = "3"; } else if (nLng1 == 0x4F540774) { sVersion = "2"; } break; case 0x0B4: sVersion = "C++ Builder"; break; case 0x114: sVersion = "4"; break; case 0x120: sVersion = "5"; break; case 0x128: sVersion = "6 CLX"; break; case 0x12C: sVersion = "7 CLX"; break; case 0x138: sVersion = "Kylix"; break; case 0x15C: case 0x160: sVersion = (nLng1 == 0x40100000 || nLng1 == 0x100000) ? "7" : "6"; break; case 0x164: sVersion = "2005"; break; case 0x190: sVersion = "2006"; break; default: nLng = PE.readDword(nOffset2 - 13 * nAddressSize); if (nLng == 0x1A4) { sName = "Embarcadero Delphi"; sVersion = "2009"; } else if (nLng == 0x1AC) { var packageInfoResource = PE.resource["PACKAGEINFO"]; if (packageInfoResource) { nOffset = packageInfoResource.Offset; nSize = packageInfoResource.Size; if (PE.isSignaturePresent(nOffset, nSize, "'ExcUtils'")) { sName = "Embarcadero Delphi"; sVersion = "XE"; } else if (PE.isSignaturePresent(nOffset, nSize, "'StrUtils'")) { sName = "Embarcadero Delphi"; sVersion = "2010"; } else { sName = "Embarcadero Delphi"; sVersion = "2010 or XE"; } } } else if (nLng == 0x1B4) { // 32 sName = "Embarcadero Delphi"; sVersion = "XE2-XE4"; } else if (nLng == 0x2F0 || nLng == 0x2F8) { // 64 sName = "Embarcadero Delphi"; sVersion = "XE2"; } else if (nLng == 0x1BC) { // 32 sName = "Embarcadero Delphi"; sVersion = "XE5-XE6"; bNewVersion = true; } else { if (nAddressSize == 8) { nLng = PE.readDword(nOffset2 - 16 * nAddressSize); if (nLng == 0x2F8) { // 64 sName = "Embarcadero Delphi"; sVersion = "XE3-X4"; } else if (nLng == 0x308) { // 64 sName = "Embarcadero Delphi"; sVersion = "XE5-XE6"; bNewVersion = true; } } } } if (sVersion && !bNewVersion) { return true; } } } nOffset++; nSize = nSectionSize - (nOffset - nSectionOffset + 1); } if (PE.resource["PACKAGEINFO"]) { nOffset = PE.resource["PACKAGEINFO"].Offset; nSize = PE.resource["PACKAGEINFO"].Size; if (PE.isSignaturePresent(nOffset, nSize, "'System.SysUtils'")) { sName = "Embarcadero Delphi"; sVersion = "XE2-XE6"; bNewVersion = true; } else if (PE.isSignaturePresent(nOffset, nSize, "'ExcUtils'")) { sName = "Embarcadero Delphi"; sVersion = "XE"; } else if (PE.isSignaturePresent(nOffset, nSize, "'StrUtils'")) { sName = "Embarcadero Delphi"; sVersion = "2009-2010"; } else if (PE.isSignaturePresent(nOffset, nSize, "'ImageHlp'")) { sVersion = "2006"; } else if (PE.isSignaturePresent(nOffset, nSize, "'SysInit'")) { sVersion = "6-7 or 2005"; } if (sVersion && !bNewVersion) { return true; } } else { if (PE.findString(PE.section[0].FileOffset, PE.section[0].FileSize, "Borland\\Delphi") != -1) { sVersion = "2-3"; return true; } } if (bNewVersion) { var rdataSection = PE.section[".rdata"]; if (rdataSection) { var nVersionOffset = PE.findString(rdataSection.FileOffset, rdataSection.FileSize, "Embarcadero Delphi for Win"); if (nVersionOffset != -1) { var sCompilerVersion = PE.getString(nVersionOffset + 46, 4); if (sCompilerVersion == "28.0") { sVersion = "XE7"; } else if (sCompilerVersion == "29.0") { sVersion = "XE8"; } else if (sCompilerVersion == "30.0") { sVersion = "10 Seattle"; } else if (sCompilerVersion == "31.0") { sVersion = "10.1 Berlin"; } else if (sCompilerVersion == "32.0") { sVersion = "10.2 Tokyo"; } else if (sCompilerVersion == "33.0") { sVersion = "10.3 Rio"; } else if (sCompilerVersion == "34.0") { sVersion = "10.4 Sydney"; } else if (sCompilerVersion == "35.0") { sVersion = "11.0 Alexandria"; } else if (sCompilerVersion == "36.0") { sVersion = "12.0 Athens"; } else { sVersion = "12.X Athens++"; } } } return true; } return false; } function detect() { if (bBorlandC) { // can't be Delphi if it's already C/C++ return; } if (PE.resource["PACKAGEINFO"]) { bDetected = true; getVersion(); } if (PE.resource["DVCLAL"]) { bDetected = true; getVersion(); // try to decode DVCLAL (Delphi Visual Component Library Access License) values nOffset = PE.getResourceNameOffset("DVCLAL"); if (PE.compare("A28CDF987B3C3A7926713F090F2A2517", nOffset)) { sOptions = "Professional"; } else if (PE.compare("23785D23B6A5F31943F3400226D111C7", nOffset)) { sOptions = "Standard"; } else if (PE.compare("263D4F38C28237B8F3244203179B3A83", nOffset)) { sOptions = "Enterprise"; } } else if (PE.resource["TMAINFORM"]) { bDetected = true; getVersion(); } else if (PE.isNet()) { if (getVersion()) { bDetected = true; } } else if (PE.compare("0A06'string'", PE.section[0].FileOffset)) { sVersion = "2"; bDetected = true; } else if (PE.findSignature(PE.section[0].FileOffset, 100, "07'Boolean'") != -1) { bDetected = true; getVersion(); } else if (PE.findSignature(PE.section[0].FileOffset, 100, "06'String'") != -1) { bDetected = true; getVersion(); } else if (PE.findSignature(PE.section[0].FileOffset, 0x100, "FF25........8BC0FF25........8BC0")) { if (getVersion()) { bDetected = true; } } sLang = "Object Pascal (Delphi)"; return result(); } ================================================ FILE: db/PE/compiler_EuroASM.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://euroassembler.eu/ meta("compiler", "EuroASM"); function detect() { if (!PE.isNet() && !PE.isTLSPresent() && !PE.isRichSignaturePresent() && PE.getMajorLinkerVersion() === 1 && PE.getMinorLinkerVersion() === 0 && PE.getImageOptionalHeader("CheckSum") === 0) { if (PE.compare("89000100000004002100FFFF05000002618A00000000400000000000000000000000000000000000000000000000000000000000000000000000900000000E1FBA0E00B409CD21B8084CCD21", 2)) { sVersion = "20180508-20190402"; bDetected = true; } else if (PE.compare("89000100000004002100FFFF05000002BFA200000000400000000000000000000000000000000000000000000000000000000000000000000000900000000E1FBA0E00B409CD21B8084CCD21", 2)) { sVersion = "20240831+"; bDetected = true; } else if (PE.compare("'This program was launched in DOS but it requires Windows.'", 0x4e)) { bDetected = true; } } sLang = "ASMx" + (PE.is64() ? "64" : "86"); return result(); } ================================================ FILE: db/PE/compiler_Excelsior_JET.4.sg ================================================ // Detect It Easy: detection rule file // Author: sendersu // If errors pls contact sendersu on cracklab.team meta("compiler", "Excelsior JET"); function detect() { var nFound = 0; for (var i = 0; i <= PE.nLastSection; i++) { var nOffset = PE.section[i].FileOffset, sSection = PE.section[i].Name; if (sSection == ".jidata") { if (PE.isSignaturePresent(nOffset, 16, "'JIMP'")) { ++nFound; } } else if (sSection == ".jedata") { if (PE.isSignaturePresent(nOffset, 16, "'JEXP'")) { ++nFound; } } else if (sSection == ".config") { ++nFound; } if (nFound == 3) { bDetected = true; break; } } sLang = "Java"; return result(); } ================================================ FILE: db/PE/compiler_FASM.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "FASM"); includeScript("FASM"); function detect() { if (bFASM) { sVersion = PE.getCompilerVersion(); bDetected = true; // Correct version if (PE.getMajorLinkerVersion() > 2) { sVersion += "*"; } } sLang = "ASMx" + (PE.is64() ? "64" : "86"); return result(); } ================================================ FILE: db/PE/compiler_FreeBasic.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://freebasic.net/ meta("compiler", "FreeBASIC"); function detect() { if (PE.isNet()) return; // Doesn't support .NET if (PE.isSectionNamePresent(".CRT") && PE.isLibraryPresent("msvcrt.dll")) { sVersion = "MinGW"; // fb_StrAllocTempDescZEx if (PE.is64()) { bDetected = PE.compareEP("48") && PE.isSignatureInSectionPresent(0, "564889CE534889D34883EC28E8........4885C074..48893048895808488958104883C4285B5EC3"); } else { bDetected = PE.compareEP("83") && PE.isSignatureInSectionPresent(0, "5383EC088B5C2414E8........85C074..8B542410895804895808891083C4085BC20800"); } } if (!bDetected && PE.compareEP("E8....0000E801000000C35589E5")) { sVersion = "0.11+"; } sLang = "FreeBASIC"; return result(); } ================================================ FILE: db/PE/compiler_Free_Pascal.6.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Free Pascal"); includeScript("FPC"); function detect() { if (PE.compareEP("E8006E00005589E58B7D0C8B750889F88B5D1029")) { sVersion = "0.99.10"; bDetected = true; } else if (PE.compareEP("E8006E00005589E58B7D0C8B750889F88B5D1029", 19)) { sVersion = "0.99.10"; bDetected = true; } else if (PE.compareEP("C605........01E8....0000C605........00E8....000050E800000000FF25........55")) { sVersion = "1.0.10"; sOptions = "win32 console"; bDetected = true; } else if (PE.compareEP("C605........00E8....000050E800000000FF25........5589E5")) { sVersion = "1.0.10"; sOptions = "win32 GUI"; bDetected = true; } else if (PE.compareEP("5589E5C605........00E8........5531ED89E0A3........668CD5892D")) { sVersion = "1.0.4"; bDetected = true; } else if (PE.compareEP("C605........005589E55356578B7D08893D........8B7D0C893D........8B7D10893D")) { sVersion = "1.0.4"; sOptions = "DLL"; bDetected = true; } else if (PE.compareEP("5589E5C605........00E8........6A0064FF350000000089E0A3")) { sVersion = "2.0.0"; bDetected = true; } else if (PE.compareEP("C605........01E874000000C605........00E86800000050E800000000FF25........90")) { sVersion = "2.0.0"; bDetected = true; } else if (PE.compareEP("5589E5C605........0168........6AF6E8........50E8")) { sVersion = "2.6.0"; bDetected = true; } else if (PE.compareEP("C605..........E8$$$$$$$$5589E5C605..........E8........5531ed89e0A3........668cd5892d........dbe3d9")) { sVersion = "1.0.2"; bDetected = true; } if (bFPC) { var nVersionOffset = PE.findString(nOffset, 0x1024, "FPC "); if (nVersionOffset !== -1) { sVersion = PE.getString(nVersionOffset + 4); } bDetected = true; // Gui Lazarus ? if (PE.getResourceNameOffset("LAZ_PIC_DIALOG_TEMPLATE") != -1) { sOptions = "Lazarus"; } } sLang = "Pascal"; return result(); } ================================================ FILE: db/PE/compiler_Go.4.sg ================================================ // Detect It Easy: detection rule file // created by A.S.L - asl@onet.eu - 2019.01 // improved by fernandom - menteb.in - 2020.04 // improved by sendersu - cracklab.team - 2024.04 meta("compiler", "Go"); function detect() { bDetected = false; // All **UNMODIFIED** go compiled PE binaries have a .symtab section if (!PE.section[".symtab"]) { // If it doesn't have, let's try a heuristic only, no pattern matching // Who knows if pattern matching is good enough if (PE.isSignatureInSectionPresent(0, "ff20'Go build ID: '")) { sVersion = "1.15.0+"; bDetected = true; } } else { bDetected = true; if (PE.compareEP("488d742408488b3c24488d0510000000ffe0cccccccccccccccccccccccccccc") || PE.compareEP("83ec0c8b44240c8d5c241089442404895c2408c70424ffffffffe901000000cc")) { sVersion = "1.7.X-1.9.X"; } else if (PE.compareEP("e90bd8ffffcccccccccccccccccccccc8b5c240464c705340000000000000089") || PE.compareEP("e92bc7ffffcccccccccccccccccccccc51488b01488b7110488b490865488b3c")) { sVersion = "1.10"; } else if (PE.compareEP("e98bc8ffffcccccccccccccccccccccc51488b01488b7110488b490865488b3c") || PE.compareEP("e90bd9ffffcccccccccccccccccccccc8b5c240464c705340000000000000089")) { sVersion = "1.10.X"; } else if (PE.compareEP("e98bdbffffcccccccccccccccccccccc8b5c240464c705340000000000000089") || PE.compareEP("e9dbc5ffffcccccccccccccccccccccc51488b01488b7110488b490865488b3c")) { sVersion = "1.11-1.11.X"; } else if (PE.compareEP("e9ebc5ffffcccccccccccccccccccccc51488b01488b7110488b490865488b3c") || PE.compareEP("e99bdbffffcccccccccccccccccccccc8b5c240464c705340000000000000089")) { sVersion = "1.12 or 1.12.2-1.12.9"; } else if (PE.compareEP("e98bc4ffffcccccccccccccccccccccc51488b01488b7110488b490865488b3c") || PE.compareEP("e99bdaffffcccccccccccccccccccccc8b5c240464c705340000000000000089")) { sVersion = "1.12.1"; } else if (PE.compareEP("e92bc5ffffcccccccccccccccccccccc51488b01488b7110488b490865488b3c") || PE.compareEP("e9cbdaffffcccccccccccccccccccccc8b5c240464c705340000000000000089")) { sVersion = "1.13 or 1.13.2"; } else if (PE.compareEP("e9cbc3ffffcccccccccccccccccccccc51488b01488b7110488b490865488b3c") || PE.compareEP("e9cbd9ffffcccccccccccccccccccccc8b5c240464c705340000000000000089")) { sVersion = "1.13.1 or 1.13.3-9"; } else if (PE.compareEP("e9cbd8ffffcccccccccccccccccccccc8b5c240464c705340000000000000089") || PE.compareEP("e9cbc1ffffcccccccccccccccccccccc51488b01488b7110488b490865488b3c")) { sVersion = "1.14 or 1.14.X"; } else if (PE.compareEP("e9....ffffcccccccccccccccccccccc51488b01488b7110488b490865488b3c2530000000c7476800000000") || PE.compareEP("e9....ffffcccccccccccccccccccccc8b5c240464c705340000000000000089e58b4b0489c8c1e00229c489e78b7308fcf3")) { sVersion = "1.X"; } else if (PE.compareEP("e9....ffffcccccccccccccccccccccc83ec28895c241c896c241089742414897c2418890424894c2404e8") || PE.compareEP("e9$$$$$$$$488b3c24488d742408e9$$$$$$$$4889f84889f34883ec284883e4f0")) { // x86-64 sVersion = "1.18.X-1.24.0"; } else if (PE.isSignatureInSectionPresent(0, "ff20'Go build ID: '")) { sVersion = "1.15.0+"; } else { bDetected = false; } } sLang = "Go"; return result(); } ================================================ FILE: db/PE/compiler_IBM_VisualAge_C.6.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "IBM VisualAge C/C++"); function detect() { if (PE.compareEP("558bec68........64ff35........648925........83ec0457e8$$$$$$$$dbe3c3")) { sVersion = "4.0"; bDetected = true; } else if (PE.compareEP("83ec..837c24....75..ff15........85c075..33c0e8")) { sVersion = "4.0"; sOptions = "DLL"; bDetected = true; } else if (PE.compareEP("83ec..837c24....75..e8........85c00f85........33c0e8")) { sVersion = "4.0"; sOptions = "DLL"; bDetected = true; } else if (PE.compareEP("535783ec..e8........ff15........b8........e8........85c075..83c4..b8")) { sVersion = "3.5"; bDetected = true; } else if (PE.compareEP("558bec68........64ff35........648925........e8........ff15........83ec04b8........e8$$$$$$$$b801000000c3")) { sVersion = "3.6"; bDetected = true; } else if (PE.compareEP("558bec8b45..83f8..74..85c074..eb..6a006a006a00ff15")) { sOptions = "1996"; bDetected = true; } sLang = "C/C++"; return result(); } ================================================ FILE: db/PE/compiler_IBM_VisualAge_COBOL.6.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "IBM VisualAge COBOL"); function detect() { if (PE.compareEP("558bec81ec........e8$$$$$$$$558becb8........2d........8b40..c9c3")) { sVersion = "2.0"; bDetected = true; } else if (PE.compareEP("558bec68........64ff35........648925........e8........e8")) { sVersion = "2.2"; bDetected = true; } sLang = "COBOL"; return result(); } ================================================ FILE: db/PE/compiler_IBM_VisualAge_PL_I.6.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "IBM VisualAge PL/I"); function detect() { if (PE.compareEP("558bfc83e4..8bec33c08d15........8d0d........515250e8")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/compiler_Intel_C.6.sg ================================================ // Detect It Easy: detection rule file // Authors: hypn0, BJNFNE, DosX meta("compiler", "Intel C/C++"); function detect() { if (PE.isNet()) return; // Doesn't support .NET const watermarkPos = 0x4ce; if (PE.compareEP("83ec..56ff15........8bf08a063c..75..8a46..463c..74..84c074..8a46..463c..75..803e..75..46eb")) { bDetected = true; } else if (PE.compare("'Intel(R) C++ Compiler for 32-bit applications'", watermarkPos)) { sVersion = PE.getString(watermarkPos + 55, 8); if (sVersion && sVersion.indexOf(" ") !== -1) { sVersion = sVersion.split(" ")[0]; } else { sVersion = String(); } bDetected = true; } sLang = "C/C++"; return result(); } ================================================ FILE: db/PE/compiler_Kotlin.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Kotlin"); function detect() { if (PE.isNet()) return; // Doesn't support .NET const rdataSection = PE.section[".rdata"]; if (rdataSection && PE.isSignaturePresent(rdataSection.Offset, 512, "6B006F0074006C0069006E0078002E00630069006E007400650072006F007000")) { bDetected = true; } sLang = "Kotlin"; return result(); } ================================================ FILE: db/PE/compiler_LCC-Win32.4.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("compiler", "LCC-Win32") function detect() { if (PE.isNet()) return; // Doesn't support .NET if (PE.compareEP("64a1........5589e56a..68........68........506489..........83ec..53565789")) { sVersion = "1.3"; bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/PE/compiler_LDC.6.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "LDC"); function detect() { if (PE.isSectionNamePresent(".minfo") && (!(PE.isSectionNamePresent("._deh")))) { bDetected = true; } sLang = "D"; return result(); } ================================================ FILE: db/PE/compiler_LLVM.6.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/llvm/llvm-project meta("compiler", "LLVM"); function detect() { if (PE.section[".buildid"] || PE.compare("'LLD PDB.'", 0x0a27)) { sOptions = "LLD compiled"; bDetected = true; } sLang = "C/C++"; return result(); } ================================================ FILE: db/PE/compiler_Lahey_Fortran_90.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Lahey Fortran 90"); function detect() { if (PE.compareEP("eb$$b8........a3........c705................6a..e8$$$$$$$$558becff75..e8........595dc3")) { sVersion = "1994"; sOptions = "by Lahey Computer Systems Inc."; bDetected = true; } else if (PE.compareEP("558bec8b45..83e8..72..74..4874..4874..eb..68........e8........59e8")) { sVersion = "2001"; sOptions = "by Lahey Computer Systems Inc."; bDetected = true; } sLang = "Fortran"; return result(); } ================================================ FILE: db/PE/compiler_MinGW.6.sg ================================================ // Detect It Easy: detection rule file // Authors: DosX, fernandom meta("compiler", "MinGW"); includeScript("FPC"); function getMinGWVersion() { var sResult = ""; var rdataSection = PE.section[".rdata"]; if (rdataSection) { var nOffset = rdataSection.FileOffset, nSize = rdataSection.FileSize, nVersionOffset = PE.findString(nOffset, nSize, "GCC: "); if (nVersionOffset != -1) { sResult = PE.getString(nVersionOffset, 128); } if (!sResult) { var nVersionOffset = PE.findString(nOffset, nSize, "gcc-"); if (nVersionOffset != -1) { sResult = PE.getString(nVersionOffset); sResult = sResult.substring(0, sResult.indexOf('/')); } } } return sResult; } function detect() { if (PE.getMajorLinkerVersion() == 2) { var minor = PE.getMinorLinkerVersion(); if (!bFPC && (minor <= 30 || minor == 36 || minor == 41 || minor == 44 || minor == 56)) { if (PE.compare("'MZ'90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21'This program cannot be run in DOS mode.\r\r\n$'00000000000000'PE'0000")) { if (!PE.isSectionNamePresent(".rsrc")) { bDetected = true; } else { var rsrcSection = PE.section[".rsrc"]; if (rsrcSection && !PE.isSignaturePresent(rsrcSection.FileOffset + rsrcSection.FileOffset - 512, 512, "'Microsoft Corp.'")) { bDetected = true; } } } } } if (!bDetected && PE.compareEP("5589e583ec..e8$$$$$$$$5589e583ec..5383c4..68........e8........83c4..e8........e8........e8........83c4")) { sVersion = "2.9X"; bDetected = true; } if (bDetected) { sVersion = getMinGWVersion(); } else { var buildidSection = PE.section[".buildid"], rdataSection = PE.section[".rdata"]; if (rdataSection) { bDetected = PE.isSignaturePresent(rdataSection.FileOffset, 256, "'mingw'") } if (!bDetected && buildidSection && rdataSection) { bDetected = PE.isSignaturePresent(rdataSection.FileOffset, rdataSection.FileSize, "'Mingw'"); } } if (bDetected && !PE.isOverlayPresent()) { sOptions = "stripped"; } else if (!bDetected) { if (PE.isOverlayPresent()) { if (PE.compareOverlay("'.file' 00 00 00")) { bDetected = true; } } else { var ehFrameSection = PE.section[".eh_frame"]; if (ehFrameSection && (ehFrameSection.Characteristics & 0x40000040)) { bDetected = true; } } } sLang = "C/C++"; return result(); } ================================================ FILE: db/PE/compiler_Nim.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Nim"); function detect() { var rdataSection = PE.section[".rdata"]; if (!PE.isRichSignaturePresent() && rdataSection && PE.isLibraryPresentExp(/^msvcrt/i)) { var nOffset = rdataSection.FileOffset, nSize = rdataSection.FileSize; if (PE.findString(nOffset, nSize, "io.nim") !== -1 || PE.findString(nOffset, nSize, "fatal.nim") !== -1) { bDetected = true; } } sLang = "Nim"; return result(); } ================================================ FILE: db/PE/compiler_Pelles_C.6.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("compiler", "Pelles C") function detect() { if (PE.compareEP("5589E56AFF68........68........64FF35000000006489250000000083EC0C")) { bDetected = true; } sLang = "C"; return result(); } ================================================ FILE: db/PE/compiler_PerlApp.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "PerlApp"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..8365....6a..ff15")) { for (var i = 0; i < PE.getNumberOfResources(); i++) { if ((PE.resource[i].Type == "232") || (PE.resource[i].Name == "BFS")) { // BFS if (PE.compare("ff'BFS'01", PE.resource[i].Offset)) { bDetected = true; break; } } } } sLang = "Perl"; return result(); } ================================================ FILE: db/PE/compiler_PowerBASIC.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "PowerBASIC"); function detect() { if (PE.compareEP("558bec535657bb........662ef705............0f85........6a..ff15........e8........c783")) { bDetected = true; } sLang = "Basic"; return result(); } ================================================ FILE: db/PE/compiler_PureBasic.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "PureBasic"); function detect() { var codeSectionDetected = false; // If no code section is detected, then it is not PureBasic for (var i = 1; i < PE.getNumberOfSections() && !codeSectionDetected; i++) { if (PE.section[i].Characteristics == 0x60000020) { codeSectionDetected = true; } } if (!codeSectionDetected) return false; if (!PE.is64()) { if (PE.compareEP("68....0000680000000068......00E8......0083C40C6800000000E8......00A3")) { sVersion = "4.X-6.X"; bDetected = true; } else if (PE.compareEP("837C24080175..8B442404A3........E8")) { sVersion = "4.X"; bDetected = true; } } else { if (PE.compareEP("4883EC..49C7C0........4831D248B9................E8........4831C9E8")) { sVersion = "4.X-6.X"; bDetected = true; } } if (PE.isSectionNamePresent(".drectve")) { var sn = PE.getSectionNumber(".drectve"); if (PE.isSignatureInSectionPresent(sn, "'pb_datapointer'")) { sVersion = "6.X"; sOptions = "gcc"; bDetected = true; } } if (!bDetected && PE.getImportLibraryName(0) === "KERNEL32.dll") { const rdataSection = PE.section[".rdata"]; if (rdataSection) { bDetected = PE.findSignature(rdataSection.FileOffset, 5120, "1415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F30313233") !== -1; } } sLang = "PureBasic"; return result(); } ================================================ FILE: db/PE/compiler_RADBasic.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.radbasic.dev/ meta("compiler", "RAD Basic"); function detect() { if (PE.compareEP(PE.is64() ? "48 83 EC" : "E8") && PE.getImportFunctionName(0, 0) === "CloseHandle") { const rdataSection = PE.section[".rdata"]; if (rdataSection && PE.isSignatureInSectionPresent(rdataSection.Number, "'RADBasic'")) { bDetected = true; } } if (!bDetected && PE.isResourceNamePresent("RADBASICAPPICON")) { bDetected = true; } sLang = "VB"; return result(); } ================================================ FILE: db/PE/compiler_RealBasic.4.sg ================================================ // Detect It Easy: detection rule file // Author: sendersu // If errors pls contact sendersu on cracklab.team meta("compiler", "REALbasic (by Xojo.com)"); function detect() { if (PE.isOverlayPresent()) { var nOffset = PE.getOverlayOffset(), nSize = PE.getOverlaySize(); if (PE.isResourceGroupNamePresent("PICKLE") && PE.findString(nOffset, nSize, "REALbasic.Point") !== -1 && PE.findString(nOffset, nSize, "Xojo.Introspection") !== -1) { bDetected = true; } } sLang = "Basic"; return result(); } ================================================ FILE: db/PE/compiler_RosASM.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "RosASM"); includeScript("RosASM"); function detect() { if (bRosASM) { sVersion = PE.getCompilerVersion(); sOptions = PE.getGeneralOptionsEx(); // RosASM doesn't have a linker bDetected = true; // Correct version if (PE.getMajorLinkerVersion() > 3) { sVersion += "*"; } } sLang = "ASMx" + (PE.is64() ? "64" : "86"); return result(); } ================================================ FILE: db/PE/compiler_Rust.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("compiler", "Rust"); function detect() { /* if (!PE.is64()) { if (PE.compareEP("e8$$$$$$$$8b0d........5657bf........be........3bcf74..85ce75..e8")) { sVersion = "i686-pc-windows-msvc"; bDetected = true; } } else if (PE.compareEP("4883ec..e8$$$$$$$$48895c24..55488bec4883ec..488b05........48bb................483bc3")) { sVersion = "x86_64-pc-windows-msvc"; bDetected = true; } else if (PE.compareEP("48895c24..48897424..574883ec..498bf88bda488bf183fa..75..e8$$$$$$$$48895c24..55488bec4883ec..488b05........48bb................483bc3")) { sVersion = "x86_64-pc-windows-msvc"; bDetected = true; } */ var rdataSection = PE.section[".rdata"]; if (PE.isTLSPresent() && rdataSection && PE.section["_RDATA"] && PE.findSignature(rdataSection.FileOffset, rdataSection.FileSize, "4C6F63616C5C527573744261636B74726163654D75746578") != -1 && PE.findSignature(rdataSection.FileOffset, rdataSection.FileSize, "'/rust'") != -1) { bDetected = true; } sLang = "Rust"; return result(); } ================================================ FILE: db/PE/compiler_SpASM.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "SpASM"); includeScript("SpASM"); function detect() { if (bSpASM) { sVersion = PE.getCompilerVersion(); sOptions = PE.getGeneralOptionsEx(); // SpASM doesn't have a linker bDetected = true; // Correct version if (PE.getMajorLinkerVersion() > 3) { sVersion += "*"; } } _sLang = "ASMx" + (PE.is64() ? "64" : "86"); return result(); } ================================================ FILE: db/PE/compiler_Swift.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/swiftlang/swift meta("compiler", "Swift"); function detect() { if (PE.isNet() || PE.isRichSignaturePresent()) return; // Doesn't support .NET and files with Rich Signature if (PE.isLibraryPresentExp(/^swift/)) { bDetected = true; if (PE.isLibraryPresent("swiftCRT.dll")) { sOptions = "dynamic"; } } if (PE.getNumberOfSections() > 15 && PE.isSectionNamePresentExp(/^.sw5/)) { sVersion = "5.X"; bDetected = true; } sLang = "Swift"; sLangVersion = sVersion; return result(); } ================================================ FILE: db/PE/compiler_Symantec_C.6.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Symantec C/C++"); function detect() { if (PE.compareEP("83ec08535556578b7c24..8b7424..8b6c24..ff15........894424..a9........74..807c24")) { sVersion = "7.2"; sOptions = "DLL"; bDetected = true; } sLang = "C/C++"; return result(); } ================================================ FILE: db/PE/compiler_TASM32.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Turbo Assembler 32 (TASM32) by Borland. // Versions: 5.X. Linker: TLINK32. // https://en.wikipedia.org/wiki/Turbo_Assembler meta("compiler", "TASM32"); includeScript("Borland"); // sets bBorlandC includeScript("TASM32"); // uses bBorlandC; sets bTASM32 function detect() { if (bTASM32) { // Map TLINK32 linker version to TASM32 product version. // TLINK32 always stamps major version 2 in the PE optional header. if (PE.getMajorLinkerVersion() == 2 && PE.getMinorLinkerVersion() == 25) { sVersion = "5.x"; } bDetected = true; } sLang = "ASMx86"; return result(); } ================================================ FILE: db/PE/compiler_Virtual_Pascal.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Virtual Pascal"); function detect() { if (PE.compareEP("b9........b8........e8$$$$$$$$83ec..fc51e8")) { sVersion = "2.1"; bDetected = true; } sLang = "Pascal"; return result(); } ================================================ FILE: db/PE/compiler_Visual_Objects.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Visual Objects"); function detect() { if (PE.compare("'This Visual Objects application cannot be run in DOS mode'", 0x312)) { sVersion = "2.XX"; bDetected = true; } sLang = "Visual Objects"; return result(); } ================================================ FILE: db/PE/compiler_Visual_Prolog.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("compiler", "Visual Prolog"); function detect() { if (PE.compareEP("558bec57dbe3d92d........68........e8........8325..........75..6a..eb..33c066a1........50e8........8038")) { sVersion = "5.2"; bDetected = true; } sLang = "Visual Prolog"; return result(); } ================================================ FILE: db/PE/compiler_Watcom.6.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Watcom C/C++"); function detect() { if (PE.compare( /*[Tt]*/ "'his is a Windows '" /*(?:95|NT)*/, 0x4f)) { bDetected = true; } else if (PE.findString(PE.getEntryPointOffset(), 32, "watcom") != -1) { bDetected = true; } else if (PE.compareEP("e9$$$$$$$$5351525589e583ec..b8........e8........a1........83c0..24..31d229c489e18b1d")) { sOptions = "1995 by Watcom International"; bDetected = true; } else if (PE.compareEP("e9$$$$$$$$535657558b7c24..8b7424..8b6c24..83fe..0f87........89f02eff")) { sVersion = "1995"; // DLL32 bDetected = true; } else if (PE.compareEP("e9$$$$$$$$535657558b7424..8b7c24..8b6c24..83ff..0f87........89f82eff")) { sVersion = "1995"; // DLL32 bDetected = true; } else if (PE.compareEP("e9$$$$$$$$535589e583ec..b8........e8........a1........83c0..24..29c489e38b15")) { sVersion = "1995 EXE32, console"; bDetected = true; } else if (PE.compareEP("e9$$$$$$$$535152565783ec..e8........a3........894424..8d4424..31dbe8")) { sVersion = "1995"; // EXE32, console bDetected = true; } else if (PE.compareEP("e9$$$$$$$$535657558b7424..8b7c24..8b6c24..83ff..0f87........2eff")) { sVersion = "2000"; // DLL32 bDetected = true; } else if (PE.compareEP("c705................e9$$$$$$$$5351525589e583ec..b8........e8........a1........83c0..24..31d229c489e1")) { sVersion = "1995"; // EXE32 bDetected = true; } sLang = "C/C++"; return result(); } ================================================ FILE: db/PE/compiler_WutaoEPL.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.dywt.com.cn/ meta("compiler", "Wutao Easy Compiler"); function detect() { var ecodeSection = PE.section[".ecode"]; if (ecodeSection && PE.compare("'WTNE / MADE BY E COMPILER - WUTAO '", ecodeSection.FileOffset)) { sVersion = "4.X"; bDetected = true; } sLang = "Easy (EPL)"; return result(); } ================================================ FILE: db/PE/compiler_Xbase.4.sg ================================================ // Detect It Easy: detection rule file // Author: sendersu // If errors pls contact sendersu on cracklab.team // https://www.alaska-software.com/products/features-list.cxp#F14CTT meta("compiler", "Xbase++ Native Code Compiler"); function detect() { if (PE.isNet()) return; // Doesn't support .NET var xppSection = PE.section[".xpp"]; if (xppSection) { bDetected = PE.findString(xppSection.FileOffset, xppSection.FileSize, "XBPEXCEPTION"); } if (PE.isLibraryPresent("XBTBase1.dll")) { sOptions = "Runtime"; bDetected = true; } sLang = "Xbase++"; return result(); } ================================================ FILE: db/PE/compiler_Zig.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("compiler", "Zig"); function detect() { if (PE.compare("'MZ'78000100000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000780000000E1FBA0E00B409CD21B8014CCD21'This program cannot be run in DOS mode.\ 0000'PE'0000")) { var rdataSection = PE.section[".rdata"]; if (rdataSection && PE.isDeepScan()) { bDetected = (PE.findSignature(rdataSection.FileOffset, rdataSection.FileSize, "5A00490047005F00440045004200550047005F0043004F004C004F005200") !== -1); // ZIG_DEBUG_COLOR } } sLang = "Zig"; return result(); } ================================================ FILE: db/PE/compiler_tcc.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // The best compiler for C. Better than VC/Clang/GCC! // Thank you, Bellard. ;) // https://bellard.org/tcc/ meta("compiler", "Tiny C"); function detect() { if (PE.isNet()) return; var isLinkerDetected = false, isInitFuncDetected = false, isStdLibUsed = PE.isLibraryPresent("msvcrt.dll"); if (PE.compare("'MZ'90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A2400000000000000'PE'0000") && PE.getCompilerVersion() == "6.0" && !PE.section[".reloc"] && !PE.section[".tls"] && !PE.section[".rdata"] && !PE.section[".rsrc"]) { _setResult("linker", "TCC Linker", "6.0", ""); isLinkerDetected = true; } if (isStdLibUsed && PE.compareEP(PE.is64() ? "554889e54881ec........b8........8945..b8........4989c24c89d1e8" : "5589e581ec........908d45..50e8........83c4..b8........8945..b8........50e8........83c4")) isInitFuncDetected = true; if (isLinkerDetected || isInitFuncDetected) bDetected = true; if (bDetected && !isInitFuncDetected && PE.compareEP("5589E581EC........90E8")) { sVersion = "legacy"; isInitFuncDetected = true; } if (bDetected) { if (!isStdLibUsed) sOptions = "no std"; // detectible on last versions if (!isInitFuncDetected) sOptions = sOptions.append("no init"); // if EP is '_start()' } sLang = "C"; return result(); } ================================================ FILE: db/PE/compiler_twinBASIC.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://twinbasic.com/ meta("compiler", "twinBASIC"); function detect() { if (PE.isNet()) return; // Doesn't support .NET if (!PE.isRichSignaturePresent()) { if (PE.isImportPositionHashPresent(0, 0xc28f4fe3) && PE.isImportPositionHashPresent(1, 0x3f8b3302) || PE.isResourceNamePresent("TWINBASIC.ICO")) { bDetected = true; if (PE.is64()) { sVersion = "Professional/Ultimate"; } } } sLang = "twinBASIC"; return result(); } ================================================ FILE: db/PE/cryptor_Amber.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/EgeBalci/amber meta("cryptor", "Amber"); function detect() { if (PE.isImportPositionHashPresent(-1, 0x97c72051) && PE.compareEP(PE.is64() ? "48 83 EC .. 48 8B 05 .. .. .. .. C7 00 .. .. .. .. E8 .. .. .. .. E8 .. .. .. .. 90 90 48 83 C4" : // 64 bit "83 EC 0C C7 05 94 53 40 00 01 00 00 00 E8 9E 02 00 00 83 C4 0C E9 A6 FC FF FF 8D B6 00 00 00 00 83 EC 0C C7 05 94 53 40 00 00 00 00 00 E8 7E 02 00 00 83 C4 0C E9 86 FC FF FF 8D B6 00 00 00 00 83 EC 1C 8B 44 24 20 89 04 24 E8 1D 12 00 00 85 C0 0F 94 C0 83 C4 1C 0F B6 C0 F7 D8 C3 90 90 90 55 89 E5 83")) { // 32 bit bDetected = true; } return result(); } ================================================ FILE: db/PE/cryptor_AverCryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://web.archive.org/web/20071012084924/http://secnull.org/ meta("cryptor", "AverCryptor"); function detect() { if (PE.compareEP("60E8000000005D81ED........8BBD........8B8D........B8")) { bDetected = true; switch (PE.readByte(PE.getEntryPointOffset() + 65)) { case 0xFA: sVersion = "1.0"; break; case 0xF7: sVersion = "1.02"; } if (!PE.isSectionNamePresent(".avc")) { sOptions = "modified"; } } return result(); } ================================================ FILE: db/PE/cryptor_BattleshipCrypter.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Author A.S.L meta("cryptor", "Battleship Crypter"); function detect() { if (PE.compareEP("6818144000E8F0FFFFFF0000000000003000000038000000000000007A88CD659A43264D8DF747BE8615237F")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/cryptor_CronosCrypter.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://github.com/TalosSec/Cronos-Crypter meta("cryptor", "CronosCrypter"); function detect() { if (PE.isNet() && PE.isSignatureInSectionPresent(0, "43 72 6F 6E 6F 73 2D 43 72 79 70 74 65 72")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/cryptor_CryptEngine_MalwareCryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/DosX-dev/NET-MalwareCryptor meta("cryptor", "CryptEngine"); function detect() { if (PE.isNetObjectPresent("Inject") && PE.isNetUStringPresent("EntryPoint") && PE.isNetUStringPresent("Invoke") && PE.isNetUStringPresent("Load")) { sVersion = "NET-MalwareCryptor"; bDetected = true; } return result(); } ================================================ FILE: db/PE/cryptor_Duals_eXe_Encryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("cryptor", "Duals eXe Encryptor"); function detect() { if (PE.compareEP("558BEC81EC00050000E8000000005D81ED0E")) { switch (PE.readWord(PE.getEntryPointOffset() + 18)) { case 0x308: sVersion = "1.0"; break; case 0x43A: sVersion = "1.0b"; break; } bDetected = true; } return result(); } ================================================ FILE: db/PE/cryptor_EXECryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("cryptor", "EXECryptor"); function detect() { if (PE.isNet()) return; // Doesn't support .NET if (PE.compareEP("A4......00000000FFFFFFFF3C......94......D8......00000000FFFFFFFFB8")) { sVersion = "2.0/2.1"; sOptions = "protected IAT"; bDetected = true; } else if (PE.compareEP("558BEC83C4F4565753BE........B80000....8945FC89C28B460C09C00F84")) { sVersion = "2.0/2.1"; bDetected = true; } else if (PE.compareEP("BE........B80000....8945FC89C28B460C09C00F84..00000001D089C350FF15")) { sVersion = "2.1.17"; bDetected = true; } else if (PE.compareEP("E8$$$$$$$$E800000000............8B1C2481EB........B8........506A..68")) { sVersion = "2.2.4"; bDetected = true; } else if (PE.compareEP("5068........5881E0........E9......00870C2459E8......008945F8E9")) { sVersion = "2.2.6"; sOptions = "minimum protection"; bDetected = true; } else if (PE.compareEP("508BC687042468........5EE9........85C8E9........81C3........0F81")) { sVersion = "2.2.6"; sOptions = "DLL/minimum protection"; bDetected = true; } else if (PE.compareEP("E80000000058..........8B1C2481EB........B8........506A046800100000506A00B8")) { sVersion = "2.2/2.3"; sOptions = "compressed code"; bDetected = true; } else if (PE.compareEP("CC......00000000FFFFFFFF3C......B4......08......00000000FFFFFFFFE8")) { sVersion = "2.2/2.3"; sOptions = "protected IAT"; bDetected = true; } else if (PE.compareEP("5168........5981F1123CCB98E9532C0000F7D7E9EB6000008345F802E9E3360000")) { sVersion = "2.3.9"; sOptions = "compressed resources"; bDetected = true; } else if (PE.compareEP("68........E9......FF50C1C8188905........C3C1C01851E9......FF84C00F84")) { sVersion = "2.3.9"; sOptions = "minimum protection"; bDetected = true; } else if (PE.compareEP("5068........58C1C00FE9......00870424588945FCE9......FFFF05........E9")) { sVersion = "2.3.9"; sOptions = "DLL/compressed resources"; bDetected = true; } else if (PE.compareEP("5168........872C248BCD5D81E1........E9......008945F85168........5981F1")) { sVersion = "2.3.9"; sOptions = "DLL/minimum protection"; bDetected = true; } else if (PE.compareEP("56575331DB89C689D70FB60689C283E01FC1EA05742D4A74158D5C130246C1E00889")) { sVersion = "2.XX"; sOptions = "compressed resources"; bDetected = true; } else if (PE.compareEP("558BEC83C4ECFC5357568945FC8955F889C689D766813E4A430F852301000083C60A")) { sVersion = "2.XX"; sOptions = "max. compressed resources"; bDetected = true; } else if (PE.compareEP("E824......8B4C240CC70117..01..C781..............31C089411489411880A1")) { sVersion = "1.3.0.45"; bDetected = true; } else if (PE.compareEP("E8$$$$$$$$31c064ff30648920648f05........83c4..e9$$$$$$$$60e8$$$$$$$$83c4")) { sVersion = "1.4X-1.5X"; bDetected = true; } else if (PE.compareEP("E8$$$$$$$$31C064FF30648920CCC3")) { sVersion = "1.5X"; bDetected = true; } else if (PE.compareEP("83C6148B55FCE9..FFFFFF")) { sVersion = "2.1X"; bDetected = true; } else if (PE.compareEP("E9........669C60508D88........8D900416....8BDC8BE1")) { sVersion = "2.1X"; bDetected = true; } else if (PE.compareEP("FFE0E804000000FFFFFFFF5EC300")) { sVersion = "2.2X"; bDetected = true; } else if (PE.compareEP("E9$$$$$$$$E8$$$$$$$$0F")) { bDetected = true; } if (!bDetected) { var nNumberOfSections = PE.section.length; if (nNumberOfSections > 3 && PE.getNumberOfImports() == 2 && PE.getNumberOfImportThunks(1) == 1 && PE.getImportFunctionName(1, 0) == "MessageBoxA") { for (var nAdjust = 1; nAdjust < 3; nAdjust++) { if (PE.getImportSection() == nNumberOfSections - nAdjust && PE.section[nNumberOfSections - nAdjust - 1].FileSize == 0) { sVersion = nNumberOfSections > 4 ? "2.4X" : "2.X"; bDetected = true; break; } } } } return result(); } ================================================ FILE: db/PE/cryptor_Huan.1.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research // https://github.com/frkngksl/Huan meta("cryptor", "Huan"); function detect() { if (PE.isSectionNamePresent(".huan")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/cryptor_KCryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "K!Cryptor"); function detect() { if (PE.compareEP("558bec83ec..53565733db53ff15........8b3d........8945..b8........ff30be........56e8........68........6a..e8........83c4..6a..68........5753ffd0")) { sVersion = "0.11"; bDetected = true; } return result(); } ================================================ FILE: db/PE/cryptor_Kryptonit.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // sign by A.S.L - asl@onet.eu // https://github.com/ximerus/Kryptonite meta("cryptor", "Kryptonite"); function detect() { nOffset = 0x0093; if (PE.compareEP("558BEC")) { if (PE.compare("'Krypton'", nOffset)) { sVersion = "0.1-0.2"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/cryptor_LimeCrypter.2.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research meta("cryptor", "LimeCrypter"); function detect() { if (PE.isNet()) { bDetected = true; if (validateReferences( isPositive = true, references = [ "System.Security.Cryptography", "System.Collections.Generic", "System.Resources", "System.Reflection" ] )) { bDetected = false; return; // end } if (!PE.isSignatureInSectionPresent(0, "3c50726976617465496d706c656d656e746174696f6e44657461696c733e7b........................................................................7d") || !PE.isSignatureInSectionPresent(0, "24........................................................................") || !PE.isNetObjectPresent("o__SiteContainer0") || !PE.isNetObjectPresent("$$method0x6000005-1") || !PE.isNetObjectPresent("Assembly") || !PE.isNetObjectPresent("Rfc2898DeriveBytes") || !PE.isNetObjectPresent("AES_Decrypt") || !PE.isNetObjectPresent("<>p__Site1") || PE.isNetObjectPresent("Chainski")) { bDetected = false; } } return result(); } // validateReferences by DosX function validateReferences(isPositive, references) { for (var i = 0; i < references.length; i++) { var sign = "00'" + references[i] + "'00"; if (isPositive == true) { if (!PE.isSignatureInSectionPresent(0, sign)) { return true; } } else { // negative if (PE.isSignatureInSectionPresent(0, sign)) { return true; } } } return false; } ================================================ FILE: db/PE/cryptor_NativeCryptor_by_DosX.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("cryptor", "NativeCryptor by DosX"); function detect() { bDetected = PE.getNumberOfSections() >= 3 && PE.compareOverlay("'7stgc_hdr'00"); return result(); } ================================================ FILE: db/PE/cryptor_PEUnion.2.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research // Edited: DosX meta("cryptor", "PEUnion"); function detect() { // 32bit RUNPE stub if (!PE.isNet()) { bDetected = true; if (PE.is64()) { bDetected = false; } const kLib = "kernel32.dll"; if (validateNativeImports( isPositive = true, references = [ [kLib, "GetProcAddress"], [kLib, "ExitProcess"], [kLib, "GetModuleFileNameA"], [kLib, "GetComputerNameA"], [kLib, "VirtualAllocExNuma"], ["shlwapi.dll", "PathFindFileNameA"] ] )) { bDetected = false; } // ====== ENTRY POINT ====== // E8: call ... // 6A: push 0 // FF15A4: call dword ptr [...] // C3: ret // ========================= const entryPoint = "E8??????006A00FF15A4????00C3"; if (PE.getNumberOfSections() != 3 || !PE.compareEP(entryPoint) || !PE.isSectionNamePresent(".rsrc") || !PE.isSectionNamePresent(".idata") || !PE.isSectionNamePresent(".text") || PE.findString(PE.section[".rsrc"].FileOffset, PE.section[".rsrc"].FileSize, "") == -1 || !(PE.getSectionVirtualSize(1) + PE.getSectionVirtualSize(2) < PE.getSectionVirtualSize(0)) || !PE.isSignatureInSectionPresent(1, "00'Shlwapi.dll'00")) { // validate imports with signature <[S]hlwapi.dll> bDetected = false; } sOptions += "RunPE" } if (PE.isNet()) { bDetected = true; if (validateReferences( isPositive = true, references = [ "kernel32.dll", "LoadLibraryA", "GetProcAddress", "System.Runtime.InteropServices", "System.Runtime.CompilerServices", "System.IO", "System.Reflection", "System.Resources", "System.Collections.Generic", "System.Core", "System.Linq", "IEnumerable`1", "<>c__DisplayClass1", "Func`2" ], section = 0 )) { bDetected = false; } if (PE.isNetObjectPresent("BeginInvoke") || PE.isNetObjectPresent("EndInvoke")) { sOptions += "Invoke" } } sVersion = "4.0"; } // validateReferences by DosX function validateReferences(isPositive, references, section) { for (var i = 0; i < references.length; i++) { var sign = "00'" + references[i] + "'00"; if (isPositive == true) { if (!PE.isSignatureInSectionPresent(section, sign)) { return true; } } else { // negative if (PE.isSignatureInSectionPresent(section, sign)) { return true; } } } return false; return result(); } // and validateNativeImports by DosX also function validateNativeImports(isPositive, references) { // references[2] for (var i = 0; i < references.length; i++) { var importSign = references[i], library = importSign[0], entry = importSign[1]; if (isPositive == true) { if (!PE.isLibraryFunctionPresent(library, entry)) { return true; } } else { // negative if (PE.isLibraryFunctionPresent(library, entry)) { return true; } } } return false; } // I like coffee. Preferably with milk ================================================ FILE: db/PE/cryptor_RCryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("cryptor", "RCryptor"); function detect() { if (PE.compareEP("90589050908B00903C5090580F8567D6EF115068")) { sVersion = "1.??"; bDetected = true; } else if (PE.compareEP("8B042483E84F68........FFD0")) { sVersion = "1.1"; bDetected = true; } else if (PE.compareEP("558BEC8B44240483E84F68........FFD0585950")) { sVersion = "1.3/1.4"; bDetected = true; } else if (PE.compareEP("6183EF4F6068........FFD7")) { sVersion = "1.3b"; bDetected = true; } else if (PE.compareEP("832C244F68........FF542404834424044F")) { sVersion = "1.5"; bDetected = true; } else if (PE.compareEP("33D068........FFD2")) { sVersion = "1.6"; bDetected = true; } else if (PE.compareEP("8BC70304242BC78038500F851B8B1FFF68")) { sVersion = "1.6b/1.6c"; bDetected = true; } else if (PE.compareEP("60906161807FF04590600F851B8B1FFF68")) { sVersion = "1.6d"; bDetected = true; } else if (PE.compareEP("F7D183F1FF6A00F7D183F1FF810424........F7D183F1FF")) { if (PE.compareEP("E8", 24)) { sOptions = "Hide EP"; } sVersion = "2.0"; bDetected = true; } if (bDetected && !PE.isSectionNamePresentExp(/^(\.)?RCryptor$/)) { sOptions = "modified"; } return result(); } ================================================ FILE: db/PE/cryptor_RDG_Tejon_Crypter.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("cryptor", "RDG Tejon Crypter"); function detect() { if (PE.compareEP("6850171001E8EEFFFFFF000000000000300000003800000100000000B365D0B8919CE145AA1BEEE0C80467EE")) { sVersion = "0.7"; bDetected = true; } return result(); } ================================================ FILE: db/PE/cryptor_ReXCrypter.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/syrex1013/rexcrypter-2 meta("cryptor", "ReXCrypter"); function detect() { if (PE.isNet()) { var netAssemblyName = PE.getNetAssemblyName(); if (netAssemblyName.indexOf("ReXStub ") === 0) { var stubVersion = netAssemblyName.split(" ")[1]; if (stubVersion && stubVersion.length < 5) { sVersion = "1.0-2.0, stub " + stubVersion; } bDetected = true; } if (!bDetected) { if (PE.isNetObjectPresent("GetConsoleWindow") && PE.isNetObjectPresent("LoadInMem")) { sVersion = "custom stub"; bDetected = true; } } } return result(); } ================================================ FILE: db/PE/cryptor_Stones_PE_Encryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("cryptor", "Stone's PE Encryptor"); function detect() { if (PE.compareEP("555756525153E8........5D8BD581ED........2B95........83EA0B8995")) { switch (PE.getEntryPointSignature(35, 2)) { case "8DB5": sVersion = "1.0"; break; case "0195": sVersion = "1.13"; break; } bDetected = true; } else if (PE.compareEP("535152565755E8........5D81ED........FF95........B8........03C52B85")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/cryptor_Virogen_Crypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Virogen Crypt"); function detect() { if (PE.compareEP("9c55e8$$$$$$$$e8000000008b2c2481ed........83c4..c3")) { sVersion = "0.75"; bDetected = true; } return result(); } ================================================ FILE: db/PE/cryptor_XorCryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/DosX-dev/DotNET_XorCryptor meta("cryptor", "XorCryptor"); function detect() { if (/^[A-Za-z]{10,31}$/.test(PE.getNetAssemblyName()) && PE.isNetObjectPresent("LateIndexGet") && PE.isNetUStringPresent("System.Reflection.Assembly") && PE.isNetUStringPresent("EntryPoint") && PE.isNetUStringPresent("Load") && PE.isNetUStringPresent("Invoke")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/cryptor_Yodas_Crypter.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("cryptor", "Yoda's Crypter"); function detect() { if (PE.compareEP("60E8000000005D81ED........E8A1000000E8D1000000E885010000F785")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("60E8000000005D81ED........B9....00008DBD........8BF7")) { switch (PE.readWord(PE.getEntryPointOffset() + 14)) { case 0x009E: sVersion = "1.1"; break; case 0x097B: sVersion = "1.2"; break; default: sVersion = "1.X"; } bDetected = true; } else if (PE.compareEP("558BEC53565760E8000000005D81ED")) { if (PE.compareEP("E803000000EB01", 19)) { sVersion = "1.0b"; bDetected = true; } else if (PE.compareEP("B9", 19)) { sVersion = "1.3"; bDetected = true; } } else if (PE.compareEP("558BEC81ECC00000005356578DBD40FFFFFFB930000000B8CCCCCCCCF3AB60")) { sVersion = "1.3"; bDetected = true; } return result(); } ================================================ FILE: db/PE/custom_sfx_installers.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx"); function detect() { if (PE.compareEP("558bec6aff68........68........64a1........50648925........83ec..535657")) { if (PE.compareOverlay("....'-lh5-'")) { sName = "Toxsoft SFX"; bDetected = true; } else if (PE.findSignature(PE.getOverlayOffset(), 0x100, "'MSCF'") !== -1) { sName = "Webest SFX"; sVersion = "1.0"; bDetected = true; } else if (PE.compareOverlay("a6d6b210")) { sType = "installer"; sName = "Sax Software installer"; bDetected = true; } else if (PE.compareOverlay("'Win_Sfx_For_Windows_'")) { sName = "XZIP-SFX"; sOptions = "by Netzip"; bDetected = true; } else if (PE.getNumberOfResources() > 0) { for (var i = 0; i < PE.resource.length && !bDetected; i++) { if (PE.compare("'SZDD'88", PE.resource[i].Offset)) { sType = "installer"; sName = "custom installer with SZDD-archives"; bDetected = true; } } } } else if (PE.compareEP("558bec81ec........5333db53ff15........a3........891d........891d........e8........391d")) { if (PE.compareOverlay("'PK'0304")) { sType = "sfx"; sName = "ZIP-SFX"; sOptions = "by Ashampoo"; bDetected = true; } } else if (PE.compareEP("e8$$$$$$$$8b0d........5657bf........be........3bcf74..85ce75..e8........8bc8")) { if (PE.getNumberOfResources() > 0 && PE.compare("5d00008000........000000000000", PE.resource[0].Offset)) { sType = "installer"; sName = "Microsoft Windows update"; bDetected = true; } } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc7")) { if (PE.compareOverlay("........00020200")) { var a = PE.getOverlayOffset(); var b = PE.readWord(a); if (PE.compare("'SDLSOPKG'", a + b)) { sType = "installer"; sName = "SysDev Laboratories"; bDetected = true; } } } else if (PE.compareEP("64a1........558bec6a..68........68........50a1........648925........8b0d")) { if (PE.compareOverlay("'PK'0304")) { sType = "sfx"; sName = "ZIP-SFX"; sOptions = "by Aeco Systems"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/dotnet_only/about.txt ================================================ Scripts for .NET files only will be located here (PE.isNet() == true) ================================================ FILE: db/PE/emulator_Wine.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("emulator", "Wine"); function detect() { if (PE.compare("'Wine'", 0x40)) { sVersion = "1.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/engine_AGS.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.adventuregamestudio.co.uk/ meta("engine", "Adventure Game Studio (AGS)"); function detect() { if (PE.compareOverlay("434c49421a..00")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/format_AutoHotKey.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "Compiled AutoHotKey"); function detect() { if (PE.resource[">AUTOHOTKEY SCRIPT<"]) { sVersion = PE.getFileVersion(); bDetected = true; } else { var sManifest = PE.getManifest(); if (sManifest.indexOf("AutoHotkey") !== -1 && // First, we look for a substring to save processor cycles sManifest.match(/(\n?) // https://en.wikipedia.org/wiki/AutoIt meta("format", "AutoIt"); function detect() { if (PE.isResourceNamePresent("SCRIPT")) { sVersion = "3.XX"; bDetected = true; } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774..85c374..f7d0") && PE.compareOverlay("a3484bbe986c4aa9")) { sVersion = "3.XX"; bDetected = true; } else if (PE.getVersionStringInfo("FileDescription") == "Compiled AutoIt Script") { sVersion = PE.getFileVersionMS(); bDetected = true; } return result(); } ================================================ FILE: db/PE/game_engine_Atlas.3.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/Engines/Atlas meta("game engine", "Atlas"); function detect() { if (PE.getVersionStringInfo("ProductName") == "Atlas Game Engine") { bDetected = true; } return result(); } ================================================ FILE: db/PE/game_engine_DEV7.3.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=DEV7_Information meta("game engine", "DEV7"); function detect() { if (PE.getVersionStringInfo("ProductName") == "Dev7 VM v1.30b") { sVersion = "1.30b"; bDetected = true; } else if (PE.getVersionStringInfo("ProductName") == "Loader 7 v1.10a") { sVersion = "1.10a"; bDetected = true; } else if (PE.getVersionStringInfo("ProductName") == "Dev7 VM v1.30a") { sVersion = "1.30a"; sOptions = "Антошка 3"; bDetected = true; } else if (PE.getVersionStringInfo("ProductName") == "Dev7 VM v1.30") { sVersion = "1.30"; bDetected = true; } return result(); } ================================================ FILE: db/PE/game_engine_Director.3.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=Director meta("game engine", "Director"); function detect() { if (PE.isExportFunctionPresent("_FindEmbeddedMovie") || PE.isExportFunctionPresent("_GetCurrentEmbeddedMovie")) { sVersion = "7.0-7.0.2"; bDetected = true; } else if (PE.getVersionStringInfo("LegalCopyright") == "Copyright © 1985-1996 Macromedia, Inc.") { sVersion = "5.0-5.0.1"; bDetected = true; } else if (PE.getVersionStringInfo("LegalCopyright") == "Copyright © 1985-1997 Macromedia, Inc.") { sVersion = "6.0-6.5"; bDetected = true; } else if (PE.getVersionStringInfo("ProductName") == "Director 8 Shockwave Studio") { sVersion = "8.0"; sOptions = "Shockwave Studio"; bDetected = true; } else if (PE.getVersionStringInfo("ProductName") == "Director 8.5 Shockwave Studio") { sVersion = "8.5"; sOptions = "Shockwave Studio"; bDetected = true; } else if (PE.getVersionStringInfo("LegalCopyright") == "Copyright © 1985-2002 Macromedia, Inc.") { sVersion = "9.0"; bDetected = true; } else if (PE.getVersionStringInfo("LegalCopyright") == "Copyright © 1985-2003 Macromedia, Inc.") { sVersion = "10.0"; bDetected = true; } else if (PE.getVersionStringInfo("ProductName") == "Director MX 2004") { sVersion = "10.1"; sOptions = "MX 2004"; bDetected = true; } else if (PE.getVersionStringInfo("ProductName") == "Director 11.3") { sVersion = "11.0.3"; bDetected = true; } else if (PE.getVersionStringInfo("ProductName") == "Director 11.5") { sVersion = "11.5"; bDetected = true; } else if (PE.getVersionStringInfo("ProductVersion") == "12.0.1 Development") { sVersion = "12.0.1"; sOptions = "Development build"; bDetected = true; } return result(); } ================================================ FILE: db/PE/game_engine_Godot.3.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://godotengine.org meta("game engine", "Godot"); function detect() { if (PE.getVersionStringInfo("FileDescription") == "Godot Engine") { bDetected = true; } return result(); } ================================================ FILE: db/PE/game_engine_Wintermute.3.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=Wintermute meta("game engine", "Wintermute"); function detect() { if (PE.getVersionStringInfo("FileDescription") == "Wintermute Engine Runtime") { bDetected = true; } return result(); } ================================================ FILE: db/PE/game_engine_XPAT.3.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/Engines/XPAT meta("game engine", "XPAT"); function detect() { if (PE.getVersionStringInfo("FileDescription") === "Xpat Runtime Engine") { sVersion = "1.0.0.1"; sOptions = "1995"; bDetected = true; } return result(); } ================================================ FILE: db/PE/game_engine_Xash.3.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research meta("game engine", "Xash3D"); function detect() { var dataSection = PE.section[".data"]; if (dataSection && PE.findString(dataSection.FileOffset, dataSection.FileSize, "Xash Error") != -1 && PE.findString(dataSection.FileOffset, dataSection.FileSize, "xash.dll") != -1 && PE.findString(dataSection.FileOffset, dataSection.FileSize, "Unable to load the xash.dll") != -1) { bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_ACCAStore.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "ACCAStore"); function detect() { if (PE.compareEP("558bec83c4..b8........e8$$$$$$$$538bd833c0a3........6a..e8........a3........a1") && PE.getNumberOfResources() > 0 && PE.getResourceNameOffset("METRO_INFO") !== -1) { sVersion = "1.9.4.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_AOLSetup.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "AOLSetup"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..535657")) { if (PE.compareOverlay("'RS'")) { sVersion = "by America Online"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Acronis_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Acronis installer"); function detect() { if (PE.compareOverlay("'PK'0304")) { if (PE.compareEP("6a..68........e8........bf........8bc7e8........8965..8bf4893e56ff15") || PE.compareEP("6a..68........e8$$$$$$$$68........64a1........508b4424..896c24..8d6c24..2be05356578b45..8965..508b45..c7") || PE.compareEP("e8$$$$$$$$558bec83ec..a1........8365....8365....5357bf........3bc7bb........74") || PE.compareEP("558bec8b45..8b4d..8b55..83f8..75..8915........894d..8945..8955..5de9") || PE.compareEP("8b4424..83f8..8b4c24..8b5424..75..8915........894c24..894424..895424..e9") || PE.compareEP("e8$$$$$$$$558bec83ec..8365....8365....a1........5657bf........be........3bc7")) { sOptions = "ZIP"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Actual_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://www.actualinstaller.ru/ meta("installer", "Actual Installer"); function detect() { if (PE.compareEP("558bec83c4..b8........e8$$$$$$$$538bd833c0a3........6a..e8........a3........a1........a3........33c0a3........33c0a3........e8........ba........8bc3e8........5bc3")) { if (PE.compareOverlay("....................'MSCF'00")) { sVersion = "1.0.0.0"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Adobe_FlashPlayer_downloader.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // created by A.S.L - asl@onet.eu - 2019 // 2020.07 fixed meta("installer", "Adobe FlashPlayer downloader"); function detect() { if (PE.compareEP("B8......005064FF3500") && PE.isOverlayPresent()) { if (PE.getVersionStringInfo("InternalName") == "Adobe Download Manager") { sVersion = "2.0"; sOptions = "PECompact"; // packed stub bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Adobe_installers.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Adobe"); function detect() { if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774..85c374..f7d0")) { for (var i = 0; i < PE.resource.length; i++) { if (PE.resource[i].Type == 3284) { // ARCHIVE_7Z if (PE.findSignature(PE.resource[i].Offset, 6, "'7z'BCAF271C") != -1) { sName += " Reader Installer"; sOptions = "7zip sfx"; bDetected = true; break; } } } } else if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15")) { if (PE.compareOverlay("'^OPT'")) { var ArcOffset = PE.findString(PE.getOverlayOffset(), 0x50, "^ARC"); if (ArcOffset != -1) { if (PE.compare("1f8b08", ArcOffset + 4)) { sName += " SVG Installer"; sOptions = "gzip"; bDetected = true; } } } } else if (PE.compareEP("e8$$$$$$$$8b0d........5657bf........be........3bcf74..85ce75..e8........8bc8")) { if (PE.resource[0] && PE.findSignature(PE.resource[0].Offset, 6, "'7z'BCAF271C") != -1) { sName += " WebInstaller"; sOptions = "7zip sfx"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Advanced_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Advanced Installer"); function detect() { if (PE.compareOverlay("2f30ee1f5e4ee51e")) { if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774..85c374..f7d0")) { bDetected = true; } else if (PE.compareEP("558bec83ec..5657ff15........8bf085f675..6a..eb..e8........8a063c..8b3d........75..56ffd7")) { bDetected = true; } else if (PE.compareEP("e8$$$$$$$$8b0d........5657bf........be........3bcf74..85ce75..e8........8bc83bcf75..b9........eb")) { bDetected = true; } } else if (PE.compareOverlay("d0cf11e0a1b11ae1")) { if (PE.compareEP("558bec83ec..5657ff15........8bf085f675..6a..eb..e8........8a063c..8b3d........75..56ffd7")) { bDetected = true; } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774..85c374..f7d0")) { bDetected = true; } } else if (PE.isSignaturePresent(PE.getSize() - 0x50, 0x50, "'ADVINSTSFX'")) { if (PE.compareEP("558bec837d....75..e8$$$$$$$$8b0d........5657bf........be........3bcf74")) { bDetected = true; } else if (PE.compareEP("e8$$$$$$$$558bec83ec..8365....8365....a1........5657bf........be........3bc7")) { bDetected = true; } else if (PE.compareEP("558bec837d....75..e8........ff75..ff75..ff75..e8........83c4..5d")) { sVersion = "12.6.1"; bDetected = true; } } else if (PE.compareEP("e8$$$$$$$$8b0d........5657bf........be........3bcf74..85ce75..e8........8bc8")) { if (PE.read_unicodeString(PE.getOverlayOffset() + 2, 16) == "[GeneralOptions]") { bDetected = true; } } else if (PE.compareOverlay("c885'CP'd8e3")) { if (PE.compareEP("558bec837d....75..e8........ff75..ff75..ff75..e8........83c4..5d")) { sVersion = "16.3.0.0"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Adveractive.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Adveractive"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15") && PE.compareOverlay("'10JP'")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Aeco_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Aeco Systems installer"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50a1........648925........8b0d........83ec..8901") && PE.compareOverlay("'EWETAR DATA FILE!! VER 1.00 <<<>>>'")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Alchemy_Mindworks_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Alchemy Mindworks installer"); function detect() { if (PE.compareEP("a1........c1e0..a3........575133c0bf........b9........3bcf") && PE.getNumberOfResources() > 0) { for (var i = 0; i < PE.resource.length && !bDetected; i++) { if (PE.compare("504b0304", PE.resource[i].Offset)) bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Astrum.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Astrum"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15")) { if (PE.isOverlayPresent() != -1) { for (var i = 0; i < PE.getNumberOfResources(); i++) { if (PE.resource[i].Type == 77) { if (PE.findSignature(PE.resource[i].Offset, 0x140, "'AstrumInstallWizard'") != -1) { bDetected = true; break; } } } } } return result(); } ================================================ FILE: db/PE/installer_AutoPlay_Media_Studio.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "AutoPlay Media Studio"); function detect() { if (PE.compareOverlay("0b0bafaf0b0ba4")) { if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774..85c374..f7d0a3........eb")) { sVersion = "8.X"; bDetected = true; } if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15........33d28ad48915........8bc8")) { sVersion = "7.5.X"; bDetected = true; } } if (bDetected) { var sRawVersion = PE.getFileVersion().replace(/\.0\.0$/, ""); if (sRawVersion) { sVersion = sRawVersion; } } return result(); } ================================================ FILE: db/PE/installer_Autodesk_Self-Extract.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Autodesk Self-Extract"); function detect() { if (PE.compareEP("e8$$$$$$$$558bec83ec..a1........8365....8365....5657bf........be........3bc774..85c674..f7d0") && PE.compareOverlay("'00000000000000BD00000000000000010000000000000001'", 0x19a0)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_AutorunProEnterprise.1.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research meta("installer", "Autorun Pro Enterprise"); function detect() { var rsrcSection = PE.section[".rsrc"]; if (rsrcSection && PE.isSectionNamePresent("CODE")) { if (PE.findString(rsrcSection.FileOffset, rsrcSection.FileSize, "9AutoRunObjects") !== -1 && PE.findString(rsrcSection.FileOffset, rsrcSection.FileSize, "AutoRunObjects") !== -1) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_AutorunProEnterpriseII.1.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research meta("installer", "Autorun Pro Enterprise II"); function detect() { var rsrcSection = PE.section[".rsrc"], codeSection = PE.section["CODE"]; if (rsrcSection && codeSection) { bDetected = PE.findString(codeSection.FileOffset, codeSection.FileSize, "TAutoRunProjectX") !== -1 && PE.findString(rsrcSection.FileOffset, rsrcSection.FileSize, "AutoRunObjects") !== -1; } return result(); } ================================================ FILE: db/PE/installer_BitRock_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "BitRock Installer"); function detect() { if (PE.compareOverlay("........'.eh_frame'00")) { if (PE.compareEP("60be........8dbe........c787................5789e58d9c24........31c05039dc75..46465368")) { bDetected = true; } else if (PE.compareEP("83ec..c70424........ff15........e8........8d7426..8dbc27........a1........ffe0")) { bDetected = true; } } if (!bDetected) { if (/BitRock/.test(PE.getManifest())) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Bytessence_Install_Maker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Bytessence Install Maker"); function detect() { if (PE.compareOverlay("'$_BIM_CONFIG_START_$'")) { if (PE.compareEP("68........68........68........e8........83c4..68........e8........a3........68........68........68")) { sVersion = "5.40"; bDetected = true; } else if (PE.compareEP("4883ec..49c7c0........4831d248b9................e8........4831c9e8........488905........4d31c048c7c2........4831c9e8........488905........48b8")) { sVersion = "5.40"; sOptions = "x64"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_CNetX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "CNetX"); function detect() { if (PE.compareEP("83ec..56ff15........8bf08a063c..75..8a46..4684c074..3c..75")) { for (var i = 0; i < PE.resource.length && !bDetected; i++) { if (PE.compare("784b0304", PE.resource[i].Offset)) { sOptions = "modified ZIP"; bDetected = true; } } } return result(); } ================================================ FILE: db/PE/installer_CSDD_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("installer", "CSDD's"); function detect() { if (PE.compareEP("558bec6a..68........68........64a100000000506489250000000083c4..535657")) { if (PE.getNumberOfResources() > 0) { if (PE.resource[0].Name = "1") { if (PE.compare("ec7c7f7c", PE.getResourceOffsetByNumber(0))) { sVersion = "1.1"; bDetected = true; } } } } return result(); } ================================================ FILE: db/PE/installer_CZ_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "CZ installer"); function detect() { if (PE.compareEP("558bec83c4..b8........e8$$$$$$$$538bd833c0a3........6a..e8........a3........a1........a3") && PE.getNumberOfResources() > 0 && PE.getResourceNameOffset("CZ_STORAGE") != -1) { bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Calibre_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // sign by A.S.L - asl@onet.eu 2022.11.05 // compiler : x64 MSC++ v.14.19 // "LZIP" unpacker : nongnu.org/lzip/lzip.html - Antonio Diaz Diaz meta("installer", "Calibre Portable Installer"); function detect() { if (PE.resource["EXTRA"] && PE.section[".rsrc"].FileSize > 0x6000000 && // over 100 MB PE.getVersionStringInfo("ProductName") == "calibre") { sVersion = PE.getVersionStringInfo("FileVersion"); sOptions = ".LZ Archive"; bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Chaos_Software_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Chaos Software installer"); function detect() { if (PE.compareEP("4883ec..e8$$$$$$$$48895c24..574883ec..488b..........48836424....48bf................483bc774") && PE.compareOverlay("276327631226097513180178")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_ClickTeam.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://www.clickteam.com/download-centre/install-creator meta("installer", "ClickTeam"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15")) { if (PE.compareOverlay("'wwgT)'")) { bDetected = true; } else if (PE.compareOverlay("..120100....0000")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Codegear_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Codegear Installer"); function detect() { if (PE.compareEP("60be........8dbe........5783cd..eb$$8b1e83ee..11db72..b8........01db75..8b1e") && PE.compareOverlay("........'GRCSETUPINFORMATION'")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_CreateInstall.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("installer", "CreateInstall"); function detect() { if (PE.compareEP("558BEC81EC200200005356576A00FF15........68........894508FF15........85C074276A00A1........50FF15")) { bDetected = true; } else if (PE.compareEP("81EC0C0400005356575568605040006A016A00FF15........8BF0FF15........3DB7000000750F56FF15")) { if (PE.compareOverlay("02060a0405fd59")) { sVersion = "2003.3.5"; bDetected = true; } } else if (PE.compareOverlay("'aWAW'")) { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { bDetected = true; } else if (PE.compareEP("68........ff15........0bc074..e8")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_CrypKey_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "CrypKey"); function detect() { if (PE.compareEP("e8$$$$$$$$5668........e8........8bf068........56e8........a3........68........56e8........a3........68........56e8........a3........68........56e8........a3........68........56e8")) { if (PE.compareOverlay("'CK16'")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_DeployMaster.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "DeployMaster"); function detect() { if (PE.compareEP("558bec81c4........5333c08985........8985........b8........e8........33c05568........64ff30") && PE.compareOverlay("'BZh91'")) { sVersion = "2.8.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_DesktopX_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "DesktopX Installer"); function detect() { if (PE.compareEP("6a..68........6a..6a..ff15........50e8........50ff15")) { for (var i = 0; i < PE.resource.length; i++) { if (PE.resource[i].Type == 630 || PE.resource[i].Type == 726 || PE.resource[i].Type == 678 || PE.resource[i].Type == 774) { if (PE.compare("'PK'0304", PE.getResourceOffsetByNumber(i))) { bDetected = true; } } } } return result(); } ================================================ FILE: db/PE/installer_Eschalon_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Eschalon Installer"); function detect() { if (PE.compareEP("558bec81c4........53565733c08985........8985........e8$$$$$$$$e8$$$$$$$$31d28d")) { if (PE.compareOverlay("'EPSF'")) { sVersion = PE.getFileVersion().replace(/\.0\.0$/, String()); bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Excelsior_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Excelsior Installer"); function detect() { if (PE.compareEP("83ec..53555657e8........6a..5b391d........8bf37e..8b3d........a1........8b....8a08")) { if (PE.compareOverlay("'ExcelsiorII1'")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_FDM_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: A.S.L meta("installer", "FDM Installer"); function detect() { if (PE.compareOverlay("'###FDMDATA###'")) { bDetected = true; if (PE.compareEP("558BEC6AFF6820714000682C364000")) { sVersion = "1.0"; } } return result(); } ================================================ FILE: db/PE/installer_GPInstall.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "GPInstall"); function detect() { if (PE.compareOverlay("........'SPIS'1a'LH5'")) { sOptions = "SPIS LH5"; if (PE.compareEP("558bec83c4..5333c08945..b8........e8........33c05568........64ff30648920ba........33c0e8")) { bDetected = true; } else if (PE.compareEP("558bec83c4..53565733c08945..b8........e8........33c05568........64ff30648920ba........33c0e8")) { bDetected = true; } else if (PE.compareEP("558bec33c951515151515151535657b8........e8........33c05568........64ff30648920ba........33c0")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Gentee_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Gentee Installer"); function detect() { if (PE.compareEP("558bec81ec........538d85........5633db578d8d........68........895d..518945..53ff15")) { if (PE.findSignature(PE.getOverlayOffset(), 0x80, "'GEA'") != -1) { bDetected = true; } else if (PE.getNumberOfResources() > 0 && PE.compare("'GEA'", PE.getResourceNameOffset("SETUP_TEMP"))) { bDetected = true; } } else if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..33db895d..6a..ff15")) { if (PE.findSignature(PE.getOverlayOffset(), 0x80, "'GEA'") != -1 || PE.findSignature(PE.getSectionFileOffset(PE.getSectionNumber(".data")), 0x80, "'gentee'") != -1) { bDetected = true; } } else if (PE.compareEP("81ec........5356575568........6a..6a..ff15........8bf0ff15........3d........75..56") && PE.compareOverlay("'OWS9G1'", 0xb) != -1) { bDetected = true; } else if (PE.compareEP("558bec81ec........5356576a..ff15........68........ff15........85c074..6a..a1........50ff15........8bf06a..56ff15")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Ghost_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Ghost Installer"); function detect() { if (PE.compareEP("60be........8dbe........c787................5783cd..eb") && PE.compareOverlay("c0dececb8d8d8d8d")) { sOptions = "xored MSCF, mask: 8D"; sVersion = "1.0.0.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Gremlin_Patcher.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Gremlin Software Patcher/Updater"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83c4..5356578965..ff15")) { for (var i = 0; i < PE.resource.length; i++) { if (PE.resource[i].Type == 9942) { // FILES_MAIN (Name: IDR_FILES_MAIN) if (PE.findSignature(PE.resource[i].Offset, 256, "'SZDD'")) { sOptions = "SZDD"; bDetected = true; break; } } } } return result(); } ================================================ FILE: db/PE/installer_I-D_Media_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "I-D Media installer"); function detect() { if (PE.compareEP("558bec6a..68........68........64a100000000506489250000000083ec..5356578965")) { if (PE.compareOverlay("'XXataDfOnigeB'")) { sVersion = "1.0.0.13"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_IDM_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Internet Download Manager Installer"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..33db895d..6a..ff15")) { if (PE.compareOverlay("2a330000da050000fec1cd666ebccf01fec1cd666ebccf0100..............78da")) { sOptions = "zlib"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_INTENIUM.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("installer", "INTENIUM"); function detect() { if (PE.compareOverlay("'stgc_hdr'")) { sVersion = PE.getFileVersion(); bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Inno_Setup_Module.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("installer", "Inno Setup Module"); function getVersionAndOptions(nOffset) { var sRawVersion = PE.getString(nOffset); sVersion = sRawVersion.substring(0, sRawVersion.indexOf(')')); if (/\(u\)/.test(sRawVersion)) { sOptions = sOptions.append("unicode"); } else if (/\(a\)/.test(sRawVersion)) { sOptions = sOptions.append("ANSI"); } } function getVersion(sSection) { if (PE.section[sSection]) { var nOffset = PE.section[sSection].FileOffset, nSize = PE.section[sSection].FileSize; if (nSize < 0x4000) { // There are files with "data" section's size more as 0x2000 var nInno = PE.findString(nOffset, nSize, "Inno Setup Setup Data"); if (nInno != -1) { getVersionAndOptions(nInno + 23); return true; } else { nInno = PE.findSignature(nOffset, nSize, "'i1.'............'32'1A"); if (nInno != -1) { sVersion = PE.getString(nInno + 1).replace(/-.*/, ""); return true; } } } } return false; } function detect() { if (PE.compareOverlay("'zlb'1A") || PE.compareOverlay("'idska32'1A")) { if (!getVersion("DATA")) { getVersion(".data"); } bDetected = true; } else { if (PE.getString(0x30, 4) == "InUn") { sOptions = "uninstall"; var nOffset = PE.findString(PE.getOverlayOffset(), Math.min(0x100, PE.getOverlaySize()), "Inno Setup Messages"); if (nOffset != -1) { getVersionAndOptions(nOffset + 21); bDetected = true; } if (!bDetected) { nOffset = PE.findString(PE.section[0].FileOffset, PE.section[0].FileSize, "Inno Setup version"); if (nOffset != -1) { getVersionAndOptions(nOffset + 19); bDetected = true; } } if (!bDetected) { if (getVersion("DATA") || getVersion(".data")) { bDetected = true; } } } } if (!bDetected) { if (PE.compareOverlay("'Inno Setup Messages'")) { sOptions = "uninstall"; getVersionAndOptions(PE.getOverlayOffset() + 21); bDetected = true; } else if (PE.compareOverlay("'Inno Setup Setup Data'")) { getVersionAndOptions(PE.getOverlayOffset() + 23); bDetected = true; } } if (PE.compareOverlay("78da")) { sOptions = "zlib"; if (PE.compareEP("558bec83c4..53565733c08945..8945")) { bDetected = true; } else if (PE.compareEP("558bec83c4..e8........e8........e8")) { bDetected = true; } } else if (PE.compareOverlay("'Inno'", 0x34)) { sOptions = "with stub"; bDetected = true; } if (!bDetected) { if (PE.isNet()) { if (PE.getVersionStringInfo("Comments") == "This installation was built with Inno Setup.") { bDetected = true; } } } return result(); } ================================================ FILE: db/PE/installer_Instalit.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Instalit"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { for (var i = 0; i < PE.resource.length && !bDetected; i++) { if (PE.resource[i].Type == 854 || PE.resource[i].Type == 808 || PE.resource[i].Type == 884) { // DLLFILE or EXEFILE or CFGFILE sVersion = "7.10.11, x32"; bDetected = true; } else if (PE.resource[i].Type == 686 || PE.resource[i].Type == 640) { // CFGFILE or EXEFILE sVersion = "6.59.09, x32"; bDetected = true; } } } return result(); } ================================================ FILE: db/PE/installer_Install4j_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Install4j Installer"); function detect() { if (PE.compareOverlay("d513e4e801000000")) { if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774")) { bDetected = true; } else if (PE.compareEP("4883ec..e8$$$$$$$$48895c24..574883ec..488b05........48836424....48bf................483bc774")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_InstallAnywhere.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("installer", "InstallAnywhere"); function detect() { if (PE.compareEP("60BE........8DBE0070FDFF5783CDFFEB109090909090908A064688074701DB75078B1E83EEFC11DB72EDB80100000001DB7507")) { sVersion = "6.1"; bDetected = true; } else if (PE.compareEP("6a..68........e8........bf........8bc7e8........8965..8bf4893e56ff15........8b4e..890d")) { if (PE.compareOverlay("5b3e")) { var ArcOffset = PE.findSignature(PE.getOverlayOffset(), 0x500, "'PK'0304"); if (ArcOffset != -1) { sOptions = "zip"; bDetected = true; } } } else if (PE.compareEP("4883ec..e8$$$$$$$$48895c24..55488bec4883ec..488b..........488365....48bb................483bc375")) { if (PE.compareOverlay("5b3e")) { var ArcOffset = PE.findSignature(PE.getOverlayOffset(), 0x500, "'PK'0304"); if (ArcOffset != -1) { sOptions = "zip"; bDetected = true; } } } else if (PE.compareEP("e8$$$$$$$$558bec83ec..a1........8365....8365....5657bf........be........3bc774..85c674..f7")) { if (PE.compareOverlay("5b3e")) { var ArcOffset = PE.findSignature(PE.getOverlayOffset(), 0x500, "'PK'0304"); if (ArcOffset != -1) { sOptions = "zip"; bDetected = true; } } } return result(); } ================================================ FILE: db/PE/installer_InstallShield.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("installer", "InstallShield"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { if (PE.isOverlayPresent()) { nOffset = PE.readByte(PE.getOverlayOffset()) + PE.getOverlayOffset() + 12; if (PE.compare("135d658c", nOffset)) { sVersion = "3.X"; bDetected = true; } else if (PE.compare("'PK'0304", nOffset)) { sVersion = "3.X"; sOptions = "zip"; bDetected = true; } } else { for (var i = 0; i < PE.resource.length; i++) { if (PE.resource[i].Type == 3000) //IS2 { if (PE.compare("'SZDD'", PE.resource[i].Offset)) { sVersion = "2.X" bDetected = true; break; } } } } if (PE.isSectionNamePresent("_cabinet")) { bDetected = true; } } else if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15")) { if (PE.findSignature(PE.getOverlayOffset(), 0x100, "'InstallShield Native Installer'") !== -1) { sName += " Java Edition"; bDetected = true; } else if (PE.findSignature(PE.getOverlayOffset(), 0x100, "'setup.class'") !== -1) { sName += " Java Edition"; sVersion = "3.X"; bDetected = true; } } else if (PE.compareEP("558BEC83EC4456FF15........8BF085F675086AFFFF15........8A06578B3D")) { bDetected = true; } else if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15........33d2")) { if (PE.findSignature(PE.getOverlayOffset(), Math.min(0x2000, PE.getOverlaySize()), "'ISc('") !== -1) { sVersion = "19.X"; bDetected = true; } } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774..85c374..f7")) { if (PE.findSignature(PE.getOverlayOffset(), Math.min(0x2000, PE.getOverlaySize()), "'ISSetupStream'") !== -1) { sVersion = "18.X"; bDetected = true; } } else if (PE.compareEP("e8$$$$$$$$558bec83ec..a1........8365....8365....5657bf........be........3bc7")) { if (PE.findSignature(PE.getOverlayOffset(), Math.min(0x10000, PE.getOverlaySize()), "'ISc('") !== -1) { sVersion = "25.X"; bDetected = true; } } else if (PE.compareEP("e8$$$$$$$$8b0d........5657bf........be........3bcf74..85ce75..e8........8bc8")) { if (PE.compareOverlay("'ISSetupStream'")) { sVersion = "29.X"; bDetected = true; } } else if (PE.compareEP("e8$$$$$$$$558bec83ec..a1........8365....8365....5657bf........be........3bc774..85c674..f7")) { if (PE.compareOverlay("'ISSetupStream'")) { sVersion = "19.X"; bDetected = true; } } if (PE.getVersionStringInfo("ProductName").substr(0, 13) == "InstallShield" || PE.getVersionStringInfo("CompanyName") == "InstallShield Software Corporation") { sVersion = PE.getVersionStringInfo("FileVersion").replace(/, /g, ".").trim(); bDetected = true; } if (!bDetected) { if (/InstallShield/.test(PE.getManifest())) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_InstallUs.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "InstallUs"); function detect() { if (PE.compareEP("558bec83c4..b8........e8........a1........8b00ba........e8........8b0d........a1........8b008b15")) { if (PE.findSignature(PE.getOverlayOffset(), 0x1000, "'SPIS'1a'LZH'") !== -1) { sOptions = "SPIS LZH"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Install_Factory.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Install Factory"); function detect() { if (PE.compareOverlay("a7870800")) { if (PE.compareEP("5589e55383ec..55b8........505068........64ff35........648925........83ec..83e4..68")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_LucasArts_Update_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "LucasArts Update Installer"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15") && PE.compareOverlay("'1CNT'")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Miktex_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "MiKTeX Installer"); function detect() { if (PE.compareEP("e9$$$$$$$$4883ec..e8$$$$$$$$e9$$$$$$$$48895c24..55488bec4883ec..488b05........48bb................483bc375..488365")) { if (PE.compareOverlay("'TARTARTARTARTART'")) { sOptions = "tar"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Mioplanet_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Mioplanet installer"); function detect() { if (PE.compareEP("eb$$a1........c1e0..a3........526a..e8........8bd0e8........5ae8")) { if (PE.compareOverlay("'[(*|*)]MZ'")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Morton_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Morton Software Installer"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { for (var i = 0; i < PE.resource.length; i++) { if (PE.resource[i].Type == 856) { // RT_RCDATA if (PE.compare("'SZDD'", PE.resource[i].Offset)) { sOptions = "SZDD"; bDetected = true; break; } } } } return result(); } ================================================ FILE: db/PE/installer_Multimedia_Fusion_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Multimedia Fusion Installer"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965")) { if (PE.compareOverlay("'wwwwI'874712")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Myriad_Install.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Myriad Install"); function detect() { if (PE.compareEP("5589e5535683ec..55b8........505068........64ff35........648925........68........e8")) { if (PE.findSignature(PE.getOverlayOffset(), 0x100, "01006215") != -1) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_NOS_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "NOS Installer"); function detect() { if (PE.compareEP("50e8000000005b81eb........b9........2bd98bf381eb........8bfb81eb........575156e8........83c4..8bab........8d2c2b4d8a4d..80f9..74..83ed..8bd32b53")) { if (PE.compareOverlay("'PK??NOS_PO'") || PE.compareOverlay("'NOS_PO'")) { bDetected = true; } } if (PE.compareEP("e8$$$$$$$$58bb........8bb3........8d0433488a0880f9..74..83e8..8b108bb3........03f38dbb........578bca2bce5156")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Nullsoft_Scriptable_Install_System.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("installer", "Nullsoft Scriptable Install System"); function detect() { if (PE.isNet()) return; // Doesn't support .NET var nOffset = PE.getOverlayOffset(); if (!PE.compareOverlay("EFBEADDE'Null'..'oftInst'", 4) && !PE.compareOverlay("EFBEADDE'nsisinstall'")) { if (PE.isOverlayPresent()) { nOffset += PE.readDword(nOffset); if (nOffset + 4 >= PE.getSize() || !PE.compare("EFBEADDE'Null' %% 'oftInst'", nOffset + 4)) { nOffset = 0; } } } if (nOffset && PE.isOverlayPresent()) { // Method detection adapted from 7-Zip. nOffset += 0x1C; if (PE.compare("5D0000..00", nOffset)) { sOptions = sOptions.append("lzma", "solid"); } else if (PE.compare("5D0000....00", nOffset + 4)) { sOptions = sOptions.append("lzma"); } else { function BorZ(nOffset) { if (PE.readByte(nOffset) == 0x31 && PE.readByte(nOffset + 1) < 14) { return "bzip2"; } else { return "zlib"; } } if (PE.compare("8", nOffset + 3)) { sOptions = sOptions.append(BorZ(nOffset + 4)); } else { sOptions = sOptions.append(BorZ(nOffset), "solid"); } } bDetected = true; } var aVersion = PE.getManifest().match(/Null[sS]oft Install System v?(.*?) meta("installer", "O'Setup95"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { if (PE.compareOverlay("'FILE'")) { sOptions = "Celtech Software"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_PCInstall.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "PCInstall"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { if (PE.compareOverlay("'[20/20]'")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_PIMP.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "PIMP Installer"); function detect() { if (PE.compareEP("558bec81ec........56576a..be........598dbd........f3a56a..33c0598dbd........f3ab8d85........68........33f65056ff") && PE.compareOverlay("'PIMPFILE'00")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_PackageForTheWeb.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "PackageForTheWeb"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83....5356578965..ff15")) { if (PE.compareOverlay("....0000dcedbd")) { sOptions = "InstallShield"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Pantaray_QSetup.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Pantaray QSetup"); function detect() { if (PE.compareEP("558bec83c4..b8........e8$$$$$$$$538bd833c0a3........6a..e8........a3........a1........a3........33c0a3........33c0a3........e8........ba........8bc3e8........5bc3")) { if (PE.compareOverlay("970300000201")) { sVersion = "10.0.0.X"; bDetected = true; } else if (PE.compareOverlay("370700000201")) { sVersion = "11.0.0.X"; bDetected = true; } if (PE.findSignature(PE.getOverlayOffset(), 0x400, "'|http:'") !== -1) { sVersion = "6.0.0.0"; bDetected = true; } if (PE.findSignature(PE.getOverlayOffset(), 0x400, "'|www.'") !== -1) { sVersion = "8.0.0.0"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Paquet_Builder.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Paquet Builder"); function detect() { if (PE.compareEP("5589e56a..68........68........64ff35........648925........83ec..83ec..5356578965..68")) { if (PE.compareOverlay("'PB'................................'7z'")) { sOptions = "7zip"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Quick_Install.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Quick Install"); function detect() { if (PE.compareEP("558bec68........64ff35........648925........83ec0457e8$$$$$$$$dbe3c3") && PE.isSectionNamePresent("txt0")) { sOptions = "by Snow Storm Software"; bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_RNsetup.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("installer", "RNsetup"); function detect() { if (PE.compareEP("558bec6a..68........68........64a100000000506489250000000083c4..535657")) { if (PE.getNumberOfResources() > 0) { if (PE.resource[0].Name = "Archive") { if (PE.compare("'.rzt'", PE.getResourceOffsetByNumber(0))) { sVersion = "6.0"; bDetected = true; } } } } return result(); } ================================================ FILE: db/PE/installer_SCE_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Silver Creek Entertainment"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15")) { for (var i = 0; i < PE.resource.length; i++) { if (PE.compare("789c", PE.resource[i].Offset)) { sOptions = "zlib"; bDetected = true; break; } } } return result(); } ================================================ FILE: db/PE/installer_STATICSUP.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "STATICSUP"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { if (PE.compareOverlay("67155234ff4d3642")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Setup-Specialist.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Setup-Specialist"); function detect() { if (PE.compareEP("6a..68........e8........bf........8bc7e8........8965..8bf4893e56ff15") && PE.compareOverlay("'TGCF'")) { sVersion = "4.0.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Setup_Factory.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("installer", "Setup Factory"); function detect() { if (PE.compareEP("558BEC6AFF68..61400068..43400064A1000000005064892500000000")) { if (PE.compareEP("90614000", 6)) { sVersion = "6.0.0.3"; } else { sVersion = "6.X"; } bDetected = true; } else if (PE.compareOverlay("e0e0e1e1e2e2e3e3e4e4e5e5e6e6e7e7")) { if (PE.compareEP("e8$$$$$$$$558bec83ec..a1........8365....8365....5357bf........3bc7bb........74..85c374..f7d0a3........eb")) { sVersion = "8.0"; bDetected = true; } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774..85c374..f7d0a3........eb")) { sVersion = "9.0"; bDetected = true; } else if (PE.compareEP("4883ec..e8$$$$$$$$48895c24..574883ec..488b05........48836424....48bf................483bc774..48f7d0488905........eb")) { sVersion = "9.5"; bDetected = true; } } else if (PE.compareOverlay("e0e1e2e3e4e5e6")) { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15")) { sVersion = "5.0"; bDetected = true; } else if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { sVersion = "4.02"; bDetected = true; } } if (bDetected) { if (PE.getVersionStringInfo("Comments").indexOf("Trial") >= 0) { sOptions = "Trial"; } } return result(); } ================================================ FILE: db/PE/installer_SfxCA.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Sfx Custom Action"); function detect() { if (PE.compareOverlay("'MSCF'00000000")) { if (PE.compareEP("48895c24..48897424..574883ec..498bf88bda488bf183fa..75..e8........4c8bc7")) { sVersion = "3.8, by Outercurve Foundation"; bDetected = true; } else if (PE.compareEP("558bec837d....75..e8$$$$$$$$558bec83ec..8365....8365....a1........5657bf........be........3bc7")) { sVersion = "3.10, by Outercurve Foundation"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Smart_Install_Maker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://smart-install-maker.software.informer.com/ meta("installer", "Smart Install Maker"); function detect() { if (PE.compareEP("558bec83c4..b8........e8$$$$$$$$538bd833c0a3........6a..e8........a3........a1........a3........33c0a3")) { if (PE.compareOverlay("'Smart Install Maker v'")) { sVersion = PE.getString(PE.getOverlayOffset() + 0x17); bDetected = true; } else if (PE.compareOverlay("..........87000001........5d0000800000")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Sony_Windows_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Sony Windows Installer"); function detect() { if (PE.compareOverlay("'UM'030a00")) { if (PE.compareEP("4883ec..e8$$$$$$$$48895c....574883ec..488b..........48836424....48bf................483bc774")) { bDetected = true; } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Spoon_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // updated A.S.L 2022.08.06 meta("installer", "Spoon Installer"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15")) { if (PE.compareOverlay("'BZh91AY&SY'")) { sOptions = "BZIP2"; bDetected = true; } else if (PE.compareOverlay("']'00008000")) { sOptions = "Lzma"; bDetected = true; } if (PE.getAddressOfEntryPoint() == 0x0040C36E) { sVersion = "11 2005"; } } return result(); } ================================================ FILE: db/PE/installer_Squirrel.1.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/Squirrel/Squirrel.Windows meta("installer", "Squirrel"); function detect() { var versionString = PE.getVersionStringInfo("SquirrelAwareVersion"); if (versionString) { sVersion = versionString; if (sVersion == "1") { sVersion = "1.0.0-1.9.1"; } bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_SwiftView_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "SwiftView Inc. installer"); function detect() { if (PE.compareEP("558bec6a..68........68........64a100000000506489250000000083ec..5356578965") && PE.compareOverlay("'This is the end of the executable'")) { sVersion = "6.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Synactis_In-The-Box_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: A.S.L. 2019.07.25 meta("installer", "Synactis In-The-Box Installer"); function detect() { if (PE.getAddressOfEntryPoint() == 0x00A98B0) { if (PE.compareEP("558bEC83C4F0B8") && PE.compareOverlay("'['")) { sVersion = "4.0"; sOptions = "zip sfx"; bDetected = true; } } else if (PE.compareEP("'All In-The-Box Installer'", 0x60)) { sOptions = "zip sfx"; bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Tarma_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Tarma Installer"); function detect() { if (PE.compareOverlay("'tiz1'........78da")) { sOptions = "zlib"; if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..e8")) { bDetected = true; } else if (PE.compareEP("60be........8dbe........5783cd..eb")) { bDetected = true; } } if (PE.isSectionNamePresent(".tsustub") && PE.isSectionNamePresent(".tsuarch")) { if (PE.compareEP("558bec81ec........535633db5766899d........895d..895d..ff15")) { sName = "Tarma InstallMate"; sVersion = "9.0"; bDetected = true; } else if (PE.compareEP("48895c24..48896c24..48897424..574881ec........66836424....33f633ffff15........488d8c24........8bd8ff15")) { sName = "Tarma InstallMate"; sVersion = "9.0"; sOptions = "x64"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Themepak.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "THEMEPAK"); function detect() { if (PE.compareEP("558bec81ec........535657c745..........ff75..64ff35........648925........8d45")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_UFI_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: A.S.L. 2020.09.30 meta("installer", "UFI installer"); function detect() { if (PE.compareEP("558BEC") && PE.resource["BINFILE"] && PE.resource["BINFILE_2"]) { sVersion = "1.X, Flash"; bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_VMWare.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "VMWare"); function detect() { if (PE.compareOverlay("'RWMV'")) { if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774..85c374..f7d0")) { sName += " Installation Launcher"; bDetected = true; } else if (PE.compareEP("e8$$$$$$$$558bec83ec..a1........8365....8365....5357bf........3bc7bb........74..85c374..f7d0")) { sName += " Installation Launcher"; bDetected = true; } else if (PE.compareEP("4883ec..e8$$$$$$$$48895c24..574883ec..488b05........48836424....48bf................483bc774..48f7d0")) { sName += " Installation Launcher"; bDetected = true; } else if (PE.compareEP("e8$$$$$$$$558bec83ec..8365....8365....a1........5657bf........be........3bc7")) { sName += " Installation Launcher"; bDetected = true; } } if (PE.isOverlayPresent() && PE.compareEP("e8$$$$$$$$558bec83ec..a1........8365....8365....5357bf........3bc7bb........74..85c374..f7d0")) { var nSize = Math.min(PE.getOverlaySize(), 0x100); if (PE.findString(PE.getOverlayOffset(), nSize, "BZh91AY&") != -1) { sName += " Software Installer"; sOptions = "bzip2"; bDetected = true; } else if (PE.findSignature(PE.getOverlayOffset(), nSize, "d0cf11e0a1b11ae1") != -1) { sName += " Software Installer"; sOptions = "MS Compound"; bDetected = true; } } if (bDetected) { sVersion = PE.getFileVersion(); } return result(); } ================================================ FILE: db/PE/installer_Vise.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Vise"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15")) { if (PE.compareOverlay("'ESIV'")) { bDetected = true; } else if (PE.compare("'SIVM'", 0xf000)) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_WiX_Toolset_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "WiX Toolset Installer"); function detect() { if (PE.compareOverlay("'MSCF'00000000")) { if (PE.compareEP("e8$$$$$$$$558bec83ec..a1........8365....8365....5657bf........be........3bc774..85c674..f7")) { bDetected = true; } else if (PE.compareEP("e8$$$$$$$$558bec83ec..8365....8365....a1........5657bf........be........3bc774..85c674..f7")) { bDetected = true; } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774..85c374..f7")) { bDetected = true; } else if (PE.isSectionNamePresent(".wixburn")) { sVersion = "1.0"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_WinRAR_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "WinRAR Installer"); function detect() { if (PE.compareEP("e8$$$$$$$$558bec83c4..b8........53")) { if (PE.compareOverlay("'***messages***'")) { bDetected = true; } } else if (PE.compareEP("a1........c1e0..a3........575133c0bf........b9........3bcf76..2bcffcf3aa595f")) { if (PE.compareOverlay("'Rar!'1a")) { bDetected = true; } } else if (PE.compareEP("e8$$$$$$$$558bec83ec..68........68........e8........59598945..837d")) { if (PE.compareOverlay("'PK'0304")) { bDetected = true; } } if (PE.compareOverlay("fffe2a002a002a006d0065007300730061006700650073002a002a002a00")) { sOptions = "Unicode"; if (PE.compareEP("4883ec..e8$$$$$$$$48895c24..55488bec4883ec..488365....48bb................488b05........483bc375")) { sVersion = "5.X"; bDetected = true; } else if (PE.compareEP("e8$$$$$$$$558bec83ec..8365....8365....a1........5657bf........be........3bc7")) { sVersion = "5.X"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Winamp_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Winamp Installer"); function detect() { if (PE.compareEP("81ec........a1........8b0d........8b15........53894424..a1........894c24..8a0d........555657894424..884c24..b9")) { sVersion = "1.0"; sOptions = "1997-98 by Nullsoft, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/PE/installer_Windows_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("installer", "Windows Installer"); function detect() { for (var i = 0; i < PE.resource.length; i++) { if (PE.compare("D0CF11E0A1B11AE1", PE.resource[i].Offset)) { var nOffset = PE.findString(PE.resource[i].Offset, PE.resource[i].Size, "Windows Installer"); if (nOffset != -1) { var aVersion = PE.getString(nOffset).match(/ XML \((.*?)\)/); if (aVersion) { sOptions = "XML"; sVersion = aVersion[1]; } bDetected = true; } } } return result(); } ================================================ FILE: db/PE/installer_Wise_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("installer", "Wise Installer"); function detect() { if (PE.getOverlaySize() > 80) { var nOffset = PE.getOverlayOffset() + 77; if (PE.readDword(nOffset) == PE.getSize()) { bDetected = true; } else if (PE.isSectionNamePresent(".WISE")) { bDetected = true; } else if (PE.compareEP("558bec81ec........5356576a..ff15........ff15........8bf08975..8a063c..0f85........8a46..46")) { bDetected = true; } else if (PE.compareEP("558bec81ec........5356576a..5e6a..8975..ff15........ff15........8bf8897d..8a073c..0f85........8a47..47")) { bDetected = true; } } else if (PE.compareEP("81ec........535556576a..ff15........33db895c24..895c24..895c24..895c24..895c24..ff15........8a08894424")) { if (PE.isSectionNamePresent(".WISE")) { sOptions = "CAB"; bDetected = true; } } if (PE.compareEP("558bec81ec........53565733f6466a..8975..ff15........ff15........8bf88a07")) { if (PE.findSignature(PE.getOverlayOffset(), 0x1000, "'Wise Installation Wizard...'") != -1) { bDetected = true; } } if (PE.isSectionNamePresent(".WISE")) { if (PE.findSignature(PE.getSectionFileOffset(PE.getSectionNumber(".WISE")), 0x1000, "'Wise Installation Wizard...'") != -1) { bDetected = true; } } if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { if (PE.findSignature(PE.getOverlayOffset(), 0x1000, "504b0304") != -1) { sOptions = "ZIP"; bDetected = true; } else if (PE.compareOverlay("'MSCF'0000")) { sOptions = "CAB"; bDetected = true; } } if (PE.compareEP("558bec81ec........538d85........5633db57be........565053ff15........568d85........5050ff15........538d8d........536a..536a..68........51ff15")) { bDetected = true; } if (PE.compareEP("558bec81ec........538d85........565733f6")) { bDetected = true; } if (PE.compareEP("558bec81ec........5356be........578d85........5633db5053")) { if (PE.compare("'GLB'00", PE.getSectionFileOffset(PE.getSectionNumber(".data")) + 0x10)) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_Xoreax_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Xoreax Installer"); function detect() { if (PE.compareEP("558becb9........6a..6a..4975..51535657b8........e8........33c055")) { for (var i = 0; i < PE.getNumberOfResources(); i++) { if (PE.resource[i].Type == "RT_RCDATA") { if (PE.compare("5d0000", PE.resource[i].Offset)) { bDetected = true; break; } } } } return result(); } ================================================ FILE: db/PE/installer_distutils.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "distutils"); function detect() { if (PE.compareOverlay("'[metadata]'")) { if (PE.compareEP("e8........e9$$$$$$$$6a5868........e8........33f68975..8d45..50ff15........6a..5f897d..b8........663905........75")) { sVersion = "2.6" bDetected = true; } else if (PE.compareEP("6a..68........e8........33db895d..538b3d........ffd766........75..8b48..03c88139........75..0fb7")) { sVersion = "2.5" bDetected = true; } } return result(); } ================================================ FILE: db/PE/installer_sqx.1.sg ================================================ // Detect It Easy: detection rule file // Author: A.S.L // SIGNATURE CREATED : 2023.10.02 meta("installer", "SQX Archive Installer 2002"); function detect() { var dataSection = PE.section[".data"]; if (PE.compareEP("558bec83ec44") && dataSection && PE.findString(dataSection.FileOffset, dataSection.FileSize, "SFX kann nicht gestartet werden") != 1) { bDetected = true; } return result(); } ================================================ FILE: db/PE/joiner_Celesty_File_Binder.1.sg ================================================ // Detect It Easy: detection rule file // Author: Eliseu Filipi meta("joiner", "Celesty File Binder"); function detect() { if (PE.compareEP("E8261F0000E989FEFFFF8BFF558BEC83EC208B450856576A0859BE0C9240008D7DE0F3A58945F88B450C5F8945FC5E85C074")) { sVersion = "1.0"; sOptions = "static"; bDetected = true; } else if (PE.compareEP("E896040000E963FDFFFF8BFF558BEC81EC28030000A3E8514000890DE45140008915E0514000891DDC5140008935D8514000893DD4514000668C1500")) { sVersion = "1.0"; sOptions = "dynamic"; // AnyCPU bDetected = true; } sLang = "C++"; return result(); } ================================================ FILE: db/PE/joiner_ExeSplitter.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("joiner", "ExeSplitter"); function detect() { if (PE.compareEP("E99502000064A1000000008338FF74048B00EBF78B4004C3558BECB8000000008B750881E60000FFFF")) { sVersion = "1.2"; bDetected = true; } else if (PE.compareEP("E8000000005D81ED........E866FEFFFF55508D9D........538D9D")) { sVersion = "1.3"; sOptions = "Split Method"; bDetected = true; } else if (PE.compareEP("E9FE010000..............000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000073766345723031312E746D7000")) { // s v c E r 0 1 1 . t m p sVersion = "1.3"; sOptions = "Split Method"; bDetected = true; } else if (PE.compareEP("E8000000005D81ED........B9........8D85........80306640E2FA8F98676666")) { sVersion = "1.3"; sOptions = "Split+Crypt Method"; bDetected = true; } return result(); } ================================================ FILE: db/PE/joiner_FreeJoiner.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("joiner", "FreeJoiner"); function detect() { if (PE.compareEP("9087FF9090B92B000000BA........83C2039087FF9090B9040000009087FF9033C9C705")) { sVersion = "1.5.1"; bDetected = true; } else if (PE.compareEP("E846FDFFFF50E80C000000FF25........FF25........FF25........FF25........FF25")) { sVersion = "1.5.2 Stub engine 1.6"; bDetected = true; } else if (PE.compareEP("E833FDFFFF50E80D000000CCFF25........FF25........FF25........FF25........FF25")) { sVersion = "1.5.3 Stub engine 1.7"; bDetected = true; } else if (PE.compareEP("86D69086F2B9936008FE9086D69086F2B99D13450186D69086F281C2936008FE33C9B930744D")) { sVersion = "1.5.3 Stub engine 1.7.1"; bDetected = true; } else if (PE.compareEP("558BEC83C4F086FF680001000068........6A00E8F30100008AC06A0068800000006A036A00")) { sVersion = "Small build 014/015"; bDetected = true; } else if (PE.compareEP("E8....FFFF6A00E80D000000CCFF25........FF25........FF25........FF25........FF25")) { sVersion = "Small build 014-020"; bDetected = true; } else if (PE.compareEP("558BEC83C4F086FF86DB86FF680001000068........6A00E8FF0100008AE46A0068800000006A03")) { sVersion = "Small build 017"; bDetected = true; } else if (PE.compareEP("E8E1FDFFFF6A00E80C000000FF25........FF25........FF25........FF25........FF25")) { sVersion = "Small build 023"; bDetected = true; } else if (PE.compareEP("5032C48AC358E8DEFDFFFF6A00E80D000000CCFF25........FF25........FF25........FF25")) { sVersion = "Small build 029"; bDetected = true; } else if (PE.compareEP("5032..668BC358E8..FDFFFF6A00E80D000000CCFF25........FF25........FF25........FF25")) { sVersion = "Small build 031/032"; bDetected = true; } else if (PE.compareEP("506633C3668BC158E8ACFDFFFF6A00E80D000000CCFF25........FF25........FF25........FF25")) { sVersion = "Small build 033"; bDetected = true; } else if (PE.compareEP("5133CB86C959E89EFDFFFF6687DB6A00E80C000000FF25........FF25........FF25........FF25")) { sVersion = "Small build 035"; bDetected = true; } return result(); } ================================================ FILE: db/PE/joiner_MicroJoiner.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("joiner", "MicroJoiner"); function detect() { if (PE.compareEP("BE........BB........33ED83EE04392E7411")) { sVersion = "1.1"; bDetected = true; } else if (PE.compareEP("BF........83EC308BECE8C8FFFFFFE8C3FFFFFF")) { sVersion = "1.5"; bDetected = true; } else if (PE.compareEP("33C0648B38488BC8F2AFAF8B1F6633DB66813B")) { sVersion = "1.6"; bDetected = true; } else if (PE.compareEP("BF........8D5F216A0A586A04596057E88E000000")) { sVersion = "1.7"; bDetected = true; } return result(); } ================================================ FILE: db/PE/joiner_N-Joiner.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("joiner", "N-Joiner"); function detect() { if (PE.compareEP("6A0068........68........6A00E8140000006A00E813000000CCFF25........FF25........FF25........FF25")) { sVersion = "0.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/joiner_OxiJoiner.2.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research // https://happy-hack.net/pentest/10639-oxi-joiner-by-vazonez.html meta("joiner", "OxiJoiner"); function detect() { var rsrcSection = PE.section[".rsrc"]; if (PE.compareEP("e85c000000a30b3040006a00e868000000a313304000e86a000000a3703c40006a0aff350b3040006a00ff3513304000e8eaf4ffff6a00e813000000ccff257c204000ff2508204000ff250c204000ff") && rsrcSection && PE.findString(rsrcSection.FileOffset, rsrcSection.FileSize, "PAPADDING") !== -1) { bDetected = true; } return result(); } ================================================ FILE: db/PE/joiner_RJoiner.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("joiner", "RJoiner"); function detect() { if (PE.compareEP("558BEC81EC0C0200008D85F4FDFFFF56506804010000FF15")) { sVersion = "1.2"; bDetected = true; } else if (PE.compareEP("558BEC81EC0C0100008D85F4FEFFFF56506804010000FF15")) { sVersion = "1.2a"; bDetected = true; } else if (PE.compareEP("E803FDFFFF6A00E80C000000FF25........FF25........FF25")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/joiner_SFXRun.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("joiner", "SFXRun"); function detect() { if (PE.compareEP("ff15........8038..75..8a48..4080f9..74..84c975..eb..408a0880f9..74..80f9..74")) { sVersion = "1.1"; sOptions = "1999 by Sergey Sorokin"; bDetected = true; } return result(); } ================================================ FILE: db/PE/joiner_inPEct.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("joiner", "inPEct"); function detect() { if (PE.compareEP("E8000000005D5583C5208BF58BFEB9......00BA........AD8BD833C2C1C20703D3ABE2F3")) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_16Edit.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // http://old-dos.ru/index.php?page=files&mode=files&do=list&cat=231 meta("library", "16Edit"); function detect() { if (PE.isLibraryPresent("16Edit.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_7z.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "7-Zip"); function detect() { if (PE.isLibraryPresentExp(/^7z/) || PE.isLibraryPresentExp(/lib7z/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_AMD_FSR.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.amd.com/en/products/graphics/technologies/fidelityfx/super-resolution.html meta("library", "AMD FSR"); function detect() { if (PE.is64()) { if (PE.isLibraryPresentExp(/^ffx_fsr2/i)) { sVersion = "2.X"; } else if (PE.isExportFunctionPresent("ffxFsr2ContextCreate")) { sOptions = "static"; // EAT sVersion = "2.X"; } else if (PE.isLibraryPresentExp(/^ffx_fsr3/i)) { sVersion = "3.X"; } else if (PE.isExportFunctionPresent("ffxFsr3UpscalerContextCreate")) { sOptions = "static"; // EAT sVersion = "3.X"; } else if (PE.isLibraryPresentExp(/^ffx_fsr/i) || PE.isLibraryPresentExp(/fidelityfx/i)) { // unknown version bDetected = true; } else if (PE.isExportFunctionPresentExp(/^ffxFsr/)) { sOptions = "static"; // EAT } } bDetected = bDetected || Boolean(sVersion) || Boolean(sOptions); return result(); } ================================================ FILE: db/PE/library_AMD_GraphicalServices.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://gpuopen.com/amd-gpu-services-ags-library/ meta("library", "AMD Graphical Services"); function detect() { if (PE.isLibraryPresentExp(/^amd_ags_x(86|64)/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_ASIPort.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Copyright (c) 1991 Altura Software, Inc. // https://wiki.scummvm.org/index.php?title=Director meta("library", "ASIPort"); function detect() { if (PE.compareOverlay("35394a50")) { sVersion = "1.0"; sOptions = "Director Engine"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_AjaxMin.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // http://ajaxmin.codeplex.com/ meta("library", "AjaxMin"); function detect() { if (PE.isNetObjectPresent("AjaxMin")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Alibaba_CloudSDK.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/aliyun/aliyun-openapi-net-sdk meta("library", "Alibaba Cloud SDK"); function detect() { if (PE.isNetObjectPresent("aliyun-net-sdk-ram")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_CloudWatch.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.CloudWatch meta("library", "Amazon CloudWatch"); function detect() { if (PE.isNetObjectPresent("AWSSDK.CloudWatch")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_CloudWatchLogs.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.CloudWatchLogs meta("library", "Amazon CloudWatchLogs"); function detect() { if (PE.isNetObjectPresent("AWSSDK.CloudWatchLogs")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_DynamoDB.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.DynamoDBv2 meta("library", "Amazon DynamoDB"); function detect() { if (PE.isNetObjectPresent("AWSSDK.DynamoDBv2")) { sVersion = "2, 3.X-4.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_ElasticComputeCloudService.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.EC2 meta("library", "Amazon Elastic Compute Cloud Service"); function detect() { if (PE.isNetObjectPresent("AWSSDK.EC2")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_Glue.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.Glue meta("library", "Amazon Glue"); function detect() { if (PE.isNetObjectPresent("AWSSDK.Glue")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_Kinesis.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.Kinesis meta("library", "Amazon Kinesis"); function detect() { if (PE.isNetObjectPresent("AWSSDK.Kinesis")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_Lambda.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.Lambda meta("library", "Amazon Lambda"); function detect() { if (PE.isNetObjectPresent("AWSSDK.Lambda")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_RelationalDatabaseService.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.RDS meta("library", "Amazon Relational Database Service"); function detect() { if (PE.isNetObjectPresent("AWSSDK.RDS")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_SecretsManager.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.SecretsManager meta("library", "Amazon SecretsManager"); function detect() { if (PE.isNetObjectPresent("AWSSDK.SecretsManager")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_SecurityToken.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.SecurityToken meta("library", "Amazon Security Token Service"); function detect() { if (PE.isNetObjectPresent("AWSSDK.SecurityToken")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_ServicesSDK.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/aws/aws-sdk-net meta("library", "Amazon Services SDK"); function detect() { if (PE.isNetObjectPresent("AWSSDK.Core")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_SimpleEmail.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.SimpleEmail meta("library", "Amazon SimpleEmail"); function detect() { if (PE.isNetObjectPresent("AWSSDK.SimpleEmail")) { sVersion = "2, 3.X-4.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_SimpleQueueService.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.S3 meta("library", "Amazon Simple Queue Service"); function detect() { if (PE.isNetObjectPresent("AWSSDK.SQS")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_SimpleStorageService.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.S3 meta("library", "Amazon Simple Storage Service"); function detect() { if (PE.isNetObjectPresent("AWSSDK.S3")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_SingleSignOn.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.SSO meta("library", "Amazon Single Sign-On"); function detect() { if (PE.isNetObjectPresent("AWSSDK.SSO")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Amazon_X-Ray.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/AWSSDK.Glue meta("library", "Amazon X-Ray"); function detect() { if (PE.isNetObjectPresent("AWSSDK.XRay")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_AngleSharp.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/AngleSharp/AngleSharp meta("library", "AngleSharp"); function detect() { if (PE.isNetObjectPresent("AngleSharp")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Antlr.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/Antlr meta("library", "Antlr"); function detect() { if (PE.isNetObjectPresent("Antlr3.Runtime")) { sVersion = "3.X"; bDetected = true; } else if (PE.isNetObjectPresent("Antlr4.Runtime")) { sVersion = "4.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_AppleSoftwareUpdate.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.dllme.com/dll/files/softwareupdatefiles meta("library", "Apple Software Update"); function detect() { if (PE.isLibraryPresent("SoftwareUpdateFiles.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Argon2.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/P-H-C/phc-winner-argon2 meta("library", "Argon2"); function detect() { if (PE.isFunctionPresent("argon2_hash")) { bDetected = true; } else if (PE.isExportFunctionPresent("argon2_hash")) { sOptions = "static"; // EAT bDetected = true; } return result(); } ================================================ FILE: db/PE/library_AtMsg32.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/Engines/Atlas#AtMsg32.dll meta("library", "AtMsg32"); function detect() { if (PE.isLibraryPresent("AtMsg32.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Atlantic.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.magix.com/ meta("library", "VEGAS Atlantic Component"); function detect() { if (PE.isLibraryPresent("Atlantic.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Authorwave.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Adobe_Authorware meta("library", "Adobe Authorware"); function detect() { if (PE.compareOverlay("'PCRS'afbcadac16000000f8")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Autofac.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/autofac/Autofac meta("library", "Autofac IoC Container"); function detect() { if (PE.isNetObjectPresent("Autofac")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_BenchmarkDotNet.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/dotnet/BenchmarkDotNet meta("library", "BenchmarkDotNet"); function detect() { if (PE.isNetObjectPresent("BenchmarkDotNet")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Boost.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.boost.org/ meta("library", "Boost"); function detect() { if (PE.isLibraryPresentExp(/libboost/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_BrotliSharpLib.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/master131/BrotliSharpLib meta("library", "BrotliSharpLib"); function detect() { if (PE.isNetObjectPresent("BrotliSharpLib")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_CUDA-Driver.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "CUDA Driver"); function detect() { if (PE.isLibraryPresentExp(/^nvcuda/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Castle.Net.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/castleproject/Core meta("library", "Castle"); function detect() { if (PE.isNetObjectPresent("Castle.Core")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_ChilkatNativeLib.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.chilkatsoft.com/ meta("library", "ChilkatNativeLib"); function detect() { if (PE.isNetObjectPresent("ChilkatNativeLib")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Chromium_Embedded_Framework.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Chromium Framework"); function detect() { if (PE.isLibraryPresent("libcef.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Chromium_WebView.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Chromium WebView"); function detect() { if (PE.isLibraryPresent("chrome_elf.dll") || PE.isSectionNamePresent("CPADinfo")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_CliWrap.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/Tyrrrz/CliWrap meta("library", "CliWrap"); function detect() { if (PE.isNetObjectPresent("CliWrap")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_ClosedXML.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/ClosedXML/ClosedXML meta("library", "ClosedXML"); function detect() { if (PE.isNetObjectPresent("ClosedXML")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_CodeBase.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/MPSystemsServices/CodeBase-for-DBF meta("library", "CodeBase"); function detect() { if (PE.isExportFunctionPresent("??4l4linkSt@@QAEAAU0@ABU0@@Z")) { sVersion = "4.0"; sOptions = "static"; // EAT bDetected = true; } return result(); } ================================================ FILE: db/PE/library_CommandLineParser.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/commandlineparser/commandline meta("library", "CommandLineParser"); function detect() { if (PE.isNetObjectPresent("CommandLine") && PE.isNetObjectPresent("ParseArguments")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Costura.Fody.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "Costura.Fody"); function detect() { if (PE.isNetGlobalCctorPresent() && (PE.isNetObjectPresent("costura.costura.dll.compressed") || PE.isNetUStringPresent("costura.costura.dll.compressed"))) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Crc32_NET.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/force-net/Crc32.NET meta("library", "Crc32.NET"); function detect() { if (PE.isNetObjectPresent("Crc32.NET")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Crc_NET.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/GediminasMasaitis/crc-dot-net meta("library", "Crc.NET"); function detect() { if (PE.isNetObjectPresent("Crc") && (PE.isNetObjectPresent("CrcBase") || PE.isNetObjectPresent("Crc32Base")) && PE.isNetObjectPresent("Crc32") && PE.isNetObjectPresent("ComputeHash")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_CsvHelper.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/JoshClose/CsvHelper meta("library", "CsvHelper"); function detect() { if (PE.isNetObjectPresent("CsvHelper")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_D3DRM.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/DirectSound meta("library", "Direct3D Retained Mode"); function detect() { if (PE.isLibraryPresent("D3DRM.DLL")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_D3DXOF.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://learn.microsoft.com/en-us/windows/win32/direct3d9/directxfilecreate meta("library", "D3DXOF"); function detect() { if (PE.isLibraryPresent("d3dxof.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Dapper.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/DapperLib/Dapper meta("library", "Dapper"); function detect() { if (PE.isNetObjectPresent("Dapper")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_DeepCloner.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/force-net/DeepCloner meta("library", "DeepCloner"); function detect() { if (PE.isNetObjectPresent("DeepCloner")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Direct2D.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Direct2D"); function detect() { if (PE.isLibraryPresentExp(/^d2d*/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Direct3D.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Direct3D"); function detect() { var maxVersion = 0, re = /d3dx?(\d+)/i; for (var n = 0; n < PE.getNumberOfImports(); n++) { var m = PE.getImportLibraryName(n).match(re); if (m && /^\d+$/.test(m[1]) && Number(m[1]) > maxVersion) { maxVersion = Number(m[1]); } } for (var n = 0; n < PE.getNumberOfExportFunctions(); n++) { var m = PE.getExportFunctionName(n).match(re); if (m && /^\d+$/.test(m[1]) && Number(m[1]) > maxVersion) { maxVersion = Number(m[1]); } } if (maxVersion > 0) { sVersion = String(maxVersion); bDetected = true; } else if (PE.isLibraryPresentExp(/^d3d/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_DirectDraw.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/DirectDraw meta("library", "DirectDraw"); function detect() { if (PE.isLibraryPresent("DDRAW.DLL")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_DirectInput.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/DirectInput meta("library", "DirectInput"); function detect() { if (PE.isLibraryPresent("DINPUT.DLL")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_DirectSound.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/DirectSound meta("library", "DirectSound"); function detect() { if (PE.isLibraryPresent("DSOUND.DLL")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_DirectX.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "DirectX Graphics"); function detect() { if (PE.isLibraryPresentExp(/^dxgi/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_DirectorAPI.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=Director meta("library", "Director API"); function detect() { if (PE.compareOverlay("..304a50")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Discord.Net.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/discord-net/Discord.Net meta("library", "Discord.Net"); function detect() { if (PE.isNetObjectPresent("Discord.Net.Core")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_DnsClient.NET.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/MichaCo/DnsClient.NET meta("library", "DnsClient.NET"); function detect() { if (PE.isNetObjectPresent("DnsClient")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Dryloc.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/dadhi/DryIoc meta("library", "Dryloc IoC Container"); function detect() { if (PE.isNetObjectPresent("Dryloc")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_EAX_Unified.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://community.pcgamingwiki.com/files/file/367-eax-unified/ meta("library", "EAX Unified"); function detect() { if (PE.isLibraryPresent("EAX.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_EcmaScript_NET.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/PureKrome/EcmaScript.NET meta("library", "EcmaScript.NET"); function detect() { if (PE.isNetObjectPresent("EcmaScript.NET")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Edit_Dev.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=Gob/DEV6_Information meta("library", "Edit_Dev"); function detect() { if (PE.isLibraryPresent("edit_dev.dll")) { sOptions = "DEV6"; sVersion = "ADI4"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_ElectronApp.4.sg ================================================ // Detect It Easy: detection rule file // Author: sendersu // If errors pls contact sendersu on cracklab.team meta("library", "Electron package"); function detect() { var cpadInfoSection = PE.section["CPADinfo"]; if (cpadInfoSection && PE.isSectionNamePresent(".00cfg")) { bDetected = PE.findString(cpadInfoSection.FileOffset, cpadInfoSection.FileSize, "daPC"); } return result(); } ================================================ FILE: db/PE/library_EpicGames.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://onlineservices.epicgames.com/en-US/sdk meta("library", "Epic Games Services"); function detect() { if (PE.isLibraryPresentExp(/^EOSSDK/)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_ExcelDataReader.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/ExcelDataReader/ExcelDataReader meta("library", "ExcelDataReader"); function detect() { if (PE.isNetObjectPresent("ExcelDataReader")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_ExcelNumberFormat.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/andersnm/ExcelNumberFormat meta("library", "ExcelNumberFormat"); function detect() { if (PE.isNetObjectPresent("ExcelNumberFormat")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_ExifLibNet.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/oozcitak/exiflibrary meta("library", "ExifLibrary"); function detect() { if (PE.isNetObjectPresent("ExifLibrary")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_FAAD.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.rarewares.org/aac-decoders.php meta("library", "FAAD"); function detect() { if (PE.isLibraryPresentExp(/libfaad/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_FFmpeg.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.ffmpeg.org/ meta("library", "FFmpeg"); function detect() { if (PE.isLibraryPresentExp(/ffmpeg/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_FastExpressionCompiler.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/dadhi/FastExpressionCompiler meta("library", "FastExpressionCompiler"); function detect() { if (PE.isNetObjectPresent("FastExpressionCompiler")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_FastMember.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/mgravell/fast-member meta("library", "FastMember"); function detect() { if (PE.isNetObjectPresent("FastMember")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_FastRsync_NET.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/GrzegorzBlok/FastRsyncNet meta("library", "FastRsync.NET"); function detect() { if (PE.isNetObjectPresent("FastRsync")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Fastenshtein.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/DanHarltey/Fastenshtein meta("library", "Fastenshtein"); function detect() { if (PE.isNetObjectPresent("Fastenshtein")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Fasterflect.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/buunguyen/fasterflect meta("library", "Combres Optimizer"); function detect() { if (PE.isNetObjectPresent("Fasterflect")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_FlashPlayer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("library", "Flash Player"); function detect() { if (PE.compareEP("83....56FF15........8BF08A063C..75..8A....463C..74..84C074..8A....463C..75..80....75..46EB..3C..7E..8A")) { sVersion = PE.getFileVersion(); bDetected = true; } else if (PE.compareEP("83....56FF15........8BF08A063C..75..8A....463C..74..84C075..3c..75..46eb..3c..76..8da4")) { sVersion = "8.0"; bDetected = true; } else if (PE.compareEP("83ec..56ff15........8bf08a063c..75..8a46..463c..74..84c074..8a46..463c..75..803e..75..46eb")) { if (PE.compareOverlay("'CWS'") || PE.compareOverlay("'FWS'")) { sVersion = "7.0"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/library_FluentValidation.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/FluentValidation/FluentValidation meta("library", "FluentValidation"); function detect() { if (PE.isNetObjectPresent("FluentValidation")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Fox_Pro.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "FOXPRO"); function detect() { for (var i = 0; i <= PE.nLastSection; i++) { var nOffset = PE.findString(PE.section[i].FileOffset, 512, "VisualFoxProRuntime."); if (nOffset != -1) { sVersion = PE.getString(nOffset + 20) + ".0"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/library_FusionCache.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/ZiggyCreatures/FusionCache meta("library", "FusionCache"); function detect() { if (PE.isNetObjectPresent("ZiggyCreatures.FusionCache")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_FuzzySharp.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/JakeBayer/FuzzySharp meta("library", "FuzzySharp"); function detect() { if (PE.isNetObjectPresent("FuzzySharp")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_GitLabApiClient.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/nmklotas/GitLabApiClient meta("library", "GitLabApiClient"); function detect() { if (PE.isNetObjectPresent("GitLabApiClient")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_GoldSrc.3.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research // https://en.wikipedia.org/wiki/GoldSrc meta("library", "GoldSrc"); function detect() { var dataSection = PE.section[".data"]; if (dataSection) { if (PE.findString(dataSection.FileOffset, dataSection.FileSize, "VENGINE_") !== -1 && PE.findString(dataSection.FileOffset, dataSection.FileSize, "VFileSystem") !== -1 && PE.findString(dataSection.FileOffset, dataSection.FileSize, "_API_VERSION")) { bDetected = true; var apiVersion = PE.findString(dataSection.FileOffset, dataSection.FileSize, "_API_VERSION"); sOptions = "API v" + PE.getString(apiVersion + 12, apiVersion + 3); } } return result(); } ================================================ FILE: db/PE/library_Google_APIs.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/googleapis/google-api-dotnet-client meta("library", "Google APIs"); function detect() { if (PE.isNetObjectPresent("Google.Apis") || PE.isNetObjectPresent("Google.Apis.Auth") || PE.isNetObjectPresent("Google.Apis.Core")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Google_ProtoBuf.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/LibNoise meta("library", "Google ProtoBuf"); function detect() { if (PE.isNetObjectPresent("LibNoise")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Harmony.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/pardeike/Harmony meta("library", "Harmony"); function detect() { if (PE.isNetObjectPresent("0Harmony")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_HtmlAgilityPack.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://html-agility-pack.net/ meta("library", "Html Agility Pack"); function detect() { if (PE.isNetObjectPresent("HtmlAgilityPack")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Humanizer.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/Humanizr/Humanizer meta("library", "Humanizer"); function detect() { if (PE.isNetObjectPresent("Humanizer")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_ImageSharp.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/SixLabors/ImageSharp meta("library", "ImageSharp"); function detect() { if (PE.isNetObjectPresent("SixLabors.ImageSharp")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Intel_IPP.4.sg ================================================ // Detect It Easy: detection rule file // Author: sendersu // If errors pls contact sendersu on cracklab.team // https://en.wikipedia.org/wiki/Integrated_Performance_Primitives meta("library", "Intel IPP"); function detect() { if (PE.isSectionNamePresent("IPPCODE") && PE.isSectionNamePresent("IPPDATA")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Intel_TBB.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://ru.wikipedia.org/wiki/Intel_Threading_Building_Blocks meta("library", "Intel TBB"); function detect() { if (PE.isLibraryPresent("tbb.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Intel_XeSS.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.intel.com/content/www/us/en/developer/topic-technology/gamedev/xess2.html meta("library", "Intel XeSS"); function detect() { if (PE.isLibraryPresentExp(/(lib|ig)xess/)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Irony.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/daxnet/irony meta("library", "Irony"); function detect() { if (PE.isNetObjectPresent("Irony")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_LCL.5.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq includeScript("FPC"); meta("library", "LCL"); function detect() { if (bFPC) { var verInfoOffset = PE.findSignature(PE.section[0].FileOffset, PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(), "'LCLVersion' ?? ?? %% '.' %%"); if (verInfoOffset != -1) { sVersion = PE.getString(verInfoOffset + 12); bDetected = true; } } return result(); } ================================================ FILE: db/PE/library_LINQKit.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/scottksmith95/LINQKit meta("library", "LINQKit"); function detect() { if (PE.isNetObjectPresent("LinqKit")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_LZMA.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/LZMA meta("library", "LZMA"); function detect() { if (PE.isLibraryPresentExp(/liblzma/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_LazyCache.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/alastairtree/LazyCache meta("library", "LazyCache"); function detect() { if (PE.isNetObjectPresent("LazyCache")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Lego1.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.legoisland.org/wiki/Local_Files meta("library", "Lego1"); function detect() { if (PE.isLibraryPresent("Lego1.dll")) { sVersion = "release"; bDetected = true; } else if (PE.isLibraryPresent("Lego1d.dll")) { sVersion = "debug"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_LibLog.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/damianh/LibLog meta("library", "LibLog"); function detect() { if (PE.isNetObjectPresent("LibLog")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_LibNoise.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/LibNoise meta("library", "MoLibNoise"); function detect() { if (PE.isNetObjectPresent("LibNoise")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_LibPhoneNumber_NET.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/twcclegg/libphonenumber-csharp meta("library", "LibPhoneNumber.NET"); function detect() { if (PE.isNetObjectPresent("PhoneNumbers")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_LibSassBuilder.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/johan-v-r/LibSassBuilder meta("library", "LibSassBuilder"); function detect() { if (PE.isNetObjectPresent("LibSassBuilder")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_LibVLCSharp.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/LibVLCSharp meta("library", "LibVLCSharp"); function detect() { if (PE.isNetObjectPresent("LibVLCSharp") || PE.isNetObjectPresent("LibVLCSharp.Shared")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_LiteDB.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/mbdavid/litedb meta("library", "LiteDB"); function detect() { if (PE.isNetObjectPresent("LiteDB")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_LoadServ.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php?title=Gob/DEV6_Information meta("library", "LoadServ"); function detect() { if (PE.isLibraryPresent("LoadServ.dll")) { sOptions = "DEV6"; sVersion = "Adibou2"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Lua_Runtime.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Lua Runtime"); function detect() { if (PE.isLibraryPresentExp(/^lua5/i)) { sLang = "Lua"; sVersion = "5.X"; bDetected = true; } else if (PE.isExportFunctionPresentExp(/^lua(L)?_/)) { sOptions = "static"; // EAT bDetected = true; var rdataSection = PE.section[".rdata"]; if (rdataSection) { var embeddedLuaVersion = PE.findSignature(rdataSection.FileOffset, rdataSection.FileSize, "'Lua ' %% '.' %%"); if (embeddedLuaVersion !== -1) { sVersion = PE.getString(embeddedLuaVersion + 4, 3); } } } return result(); } ================================================ FILE: db/PE/library_MacroMix.4.sg ================================================ // Detect It Easy: detection rule file format // Author: BJNFNE // Rewritten by: DosX // https://wiki.scummvm.org/index.php/Director/Games meta("library", "MacroMix"); function detect() { var macroMixSection = PE.section["MacroMix"]; if (macroMixSection && (macroMixSection.Characteristics & 0x60000020)) { sOptions = "Director Engine"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_MailKit.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/jstedfast/MailKit meta("library", "MailKit"); function detect() { if (PE.isNetObjectPresent("MailKit")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_ManagedCuda.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/kunzmi/managedCuda meta("library", "ManagedCuda"); function detect() { if (PE.isNetObjectPresent("ManagedCuda")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Mapster.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/MapsterMapper/Mapster meta("library", "Mapster"); function detect() { if (PE.isNetObjectPresent("Mapster")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Markdig.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/xoofx/markdig meta("library", "Markdig"); function detect() { if (PE.isNetObjectPresent("Markdig")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_MassTransit.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/MassTransit/MassTransit meta("library", "MassTransit"); function detect() { if (PE.isNetObjectPresent("MassTransit")) { bDetected = true; } if (PE.isNetObjectPresent("MassTransit.AmazonSQS")) { sVersion = "AmazonSQS"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_MediatR.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/LuckyPennySoftware/MediatR meta("library", "MediatR"); function detect() { if (PE.isNetObjectPresent("MediatR")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_MemoryPack.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "MemoryPack Serializer"); function detect() { if (PE.isNetObjectPresent("MemoryPack") && PE.isNetObjectPresent("MemoryPack.Core")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_MessagePack.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/MessagePack-CSharp/MessagePack-CSharp meta("library", "MessagePack Serializer"); function detect() { if (PE.isNetObjectPresent("MessagePack")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Microsoft_AzureSDK.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nuget.org/packages/Azure.Core meta("library", "Microsoft Azure SDK"); function detect() { if (PE.isNetObjectPresent("Azure.Core")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Microsoft_Azure_SDK.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Microsoft Azure SDK"); function detect() { if (PE.isNetObjectPresent("Azure.Core")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Microsoft_C_Runtime.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Microsoft C/C++ Runtime"); function detect() { if (PE.isLibraryPresent("vcruntime140.dll") || PE.isLibraryPresent("vcruntime140_1.dll")) { sOptions = "dynamic"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Microsoft_Edge_WebView.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Microsoft Edge Chromium WebView"); function detect() { if (PE.isLibraryPresent("WebView2Loader.dll") || PE.isLibraryPresent("msedge_elf.dll")) { bDetected = true; } else if (PE.isNetObjectPresent("Microsoft.Web.WebView2") || PE.isNetObjectPresent("Microsoft.Web.WebView2.WinForms") || PE.isNetObjectPresent("Microsoft.Web.Wpf")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Microsoft_NET_Runtime.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", ".NET Core runtime"); function detect() { if (PE.isLibraryPresent("coreclr.dll")) { bDetected = true; sVersion = "5.XX+"; } return result(); } ================================================ FILE: db/PE/library_Microsoft_OpenAPI.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/Microsoft/OpenAPI.NET meta("library", "Microsoft OpenAPI"); function detect() { if (PE.isNetObjectPresent("Microsoft.OpenApi")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_MilesSoundSystem.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.radgametools.com/miles.htm meta("library", "Miles Sound System"); function detect() { if (PE.isLibraryPresent("mss32.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_MimeKit.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/jstedfast/MimeKit meta("library", "MimeKit"); function detect() { if (PE.isNetObjectPresent("MimeKit")) { if (PE.isNetObjectPresent("MimeKitLite")) { sVersion = "Lite"; } bDetected = true; } return result(); } ================================================ FILE: db/PE/library_MongoDB.NET.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/mongodb/mongo-csharp-driver meta("library", "MongoDB.NET Driver"); function detect() { if (PE.isNetObjectPresent("MongoDB") || PE.isNetObjectPresent("MongoDB.Driver") || PE.isNetObjectPresent("MongoDB.Driver.Core") || PE.isNetObjectPresent("MongoDB.Analyzer")) { bDetected = true; } if (PE.isNetObjectPresent("MongoDB.AspNetCore.OData")) { sVersion = "ASP.NET Core"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_MonkeyCache.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/jamesmontemagno/monkey-cache meta("library", "MonkeyCache"); function detect() { if (PE.isNetObjectPresent("MonkeyCache")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Moq.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/devlooped/moq meta("library", "Moq"); function detect() { if (PE.isNetObjectPresent("Moq") && PE.isNetObjectPresent("DownloadExists")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_NJsonSchema.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/RicoSuter/NJsonSchema meta("library", "NJsonSchema"); function detect() { if (PE.isNetObjectPresent("NJsonSchema")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_NSubstitute.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/nsubstitute/NSubstitute meta("library", "NSubstitute"); function detect() { if (PE.isNetObjectPresent("NSubstitute")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_NUnit.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/nunit/nunit meta("library", "NUnit"); function detect() { if (PE.isNetObjectPresent("NUnit") || PE.isNetObjectPresent("nunit.framework")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Nerdbank.Streams.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/dotnet/Nerdbank.Streams meta("library", "Nerdbank.Streams"); function detect() { if (PE.isNetObjectPresent("Nerdbank.Streams")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Newtonsoft.Json.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Newton Json"); function detect() { if (PE.isNetObjectPresent("Newtonsoft.Json")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Ninject.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // http://www.ninject.org/ meta("library", "Ninject"); function detect() { if (PE.isNetObjectPresent("Ninject")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_NodaTime.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/nodatime/nodatime meta("library", "NodaTime"); function detect() { if (PE.isNetObjectPresent("NodaTime")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Nvidia_DLSS.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nvidia.com/en-gb/geforce/technologies/dlss/ meta("library", "Nvidia DLSS"); function detect() { if (PE.isLibraryPresentExp(/^nvngx_dlss|\.dlss(\.|_)/i)) { bDetected = true; } else if (PE.isLibraryPresentExp(/^d3d/i) || PE.isLibraryPresentExp(/^physx/i)) { var rdataSection = PE.section[".rdata"]; if (rdataSection && PE.isSignaturePresent(rdataSection.FileOffset, rdataSection.FileSize, "%% 'DLSS' %%")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/library_Nvidia_PhysX.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nvidia.com/en-gb/drivers/physx/physx-9-19-0218-driver/ meta("library", "Nvidia PhysX"); function detect() { if (PE.is64() && PE.section[".rdata"] && PE.isLibraryPresentExp(/^physx/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Nvidia_Streamline.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://developer.nvidia.com/rtx/streamline meta("library", "Nvidia Streamline"); function detect() { if (PE.isLibraryPresent("sl.interposer.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_OodleCompression.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.radgametools.com/oodle.htm meta("library", "Oodle Compression"); function detect() { var oodleLibrary = PE.isLibraryPresentExp(/^oo2core_\d{1,2}_win/i); if (oodleLibrary) { var version = String(oodleLibrary).split("_")[1]; if (version) { sVersion = version; } bDetected = true; } else if (PE.isExportFunctionPresentExp(/^OodleLZ/)) { sOptions = "static"; // EAT bDetected = true; } return result(); } ================================================ FILE: db/PE/library_OpenAI.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "OpenAI SDK"); function detect() { if (PE.isNetObjectPresent("OpenAI")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_OpenAL.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "OpenAL"); function detect() { if (PE.isLibraryPresentExp(/openal/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_OpenCL.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "OpenCL"); function detect() { if (PE.isLibraryPresentExp(/opencl/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_OpenCV.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/opencv/opencv // https://github.com/shimat/opencvsharp meta("library", "OpenCV"); function detect() { if (PE.isNetObjectPresent("OpenCvSharp")) { bDetected = true; } else if (PE.isLibraryPresentExp(/^opencv/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_OpenColorIO.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://opencolorio.org/ meta("library", "OpenColorIO"); function detect() { if (PE.isLibraryPresentExp(/^OpenColorIO/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_OpenGL.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "OpenGL"); function detect() { if (PE.isLibraryPresentExp(/opengl/i)) { bDetected = true; } else if (PE.isExportFunctionPresentExp(/^ANGLE(GetDisplayPlatform|ResetDisplayPlatform)/)) { sVersion = "ANGLE"; sOptions = "static"; // EAT bDetected = true; } return result(); } ================================================ FILE: db/PE/library_OpenIddict.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://openiddict.com/ meta("library", "OpenIddict"); function detect() { if (PE.isNetObjectPresent("OpenIddict.Client") || PE.isNetObjectPresent("OpenIddict.Abstractions")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_OpenSSL.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "OpenSSL"); function detect() { if (PE.isLibraryPresentExp(/libssl|libcrypto/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_OpenTelemetry.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/open-telemetry/opentelemetry-dotnet meta("library", "OpenTelemetry"); function detect() { if (PE.isNetObjectPresent("OpenTelemetry") || PE.isNetObjectPresent("OpenTelemetry.Api")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_OpusAudio.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/xiph/opus meta("library", "Opus Audio"); function detect() { if (PE.isLibraryPresentExp(/^(opus(enc)?\.)|(ms|lib)opus|bass(_)?opus/i)) { bDetected = true; } else if (PE.isExportFunctionPresentExp(/^opus_(de|en)code/)) { sOptions = "static"; // EAT bDetected = true; } return result(); } ================================================ FILE: db/PE/library_PdfPig.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/UglyToad/PdfPig meta("library", "PdfPig"); function detect() { if (PE.isNetObjectPresent("UglyLoad.PdfPig")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Perfolizer.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/AndreyAkinshin/perfolizer meta("library", "Perfolizer"); function detect() { if (PE.isNetObjectPresent("Perfolizer")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Perl.3.sg ================================================ // Detect It Easy: detection rule file // Author: hbasrc meta("library", "Perl5 xs"); function detect() { if (!PE.isDll()) return; var sLib = PE.isLibraryPresentExp(/perl(5)_?(\d\d*)/i); if (sLib) { bDetected = true; sVersion = sLib[1] + "." + sLib[2]; sLang = "Perl"; } if (PE.isExportFunctionPresentExp("Perl_sv_bless|perl_parse")) { bDetected = true; sVersion = getPerlVersion(); sLang = "Perl"; return _setResult("library", "Perl Runtime", sVersion, ""); } return result(); } function getPerlVersion() { const verSig = [ "'erl5' %% '.dll'", // v5.X "'erl5' %% %% '.dll'", // v5.XX "'erl5_' %% '.dll'", // cygwin or msys "'erl5_' %% %% '.dll'" ]; var nExp = PE.getExportSection(), sPLVersion = String(), nMinorVer = 0, nGot = -1; for (var i = 0; i < verSig.length; ++i) { nGot = PE.findSignature(PE.section[nExp].FileOffset, PE.getSize(), verSig[i]); if (nGot > -1) break; } if (nGot > 0) { var sRes = PE.getString(nGot, 12); sRes = sRes.match(/(5)_?(\d\d*)/); if (sRes) { sPLVersion = sRes[1] + "." + sRes[2]; nMinorVer = Number(sRes[2]); } else { return sPLVersion; } // find 5.X.X or 5.XX.X var sSign = nMinorVer > 9 ? "'5.' %% %% '.' %% " : "'5.' %% '.' %%", patchVer = findPatchVersion(sSign); if (patchVer > 0) sPLVersion += "." + patchVer; } return sPLVersion; } function findPatchVersion(sSign) { var nOffset = 0, nSize = PE.getSize(), nPatchVer = 0, nGot = -1; // Traverse and find the max number while ((nGot = PE.findSignature(nOffset, nSize, sSign)) != -1) { var sRes = PE.getString(nGot, 12); nOffset = nGot + sRes.length; sRes = sRes.match(/5\.\d\d*\.(\d\d*)/); if (sRes && sRes[1] > nPatchVer) nPatchVer = sRes[1]; } return nPatchVer; } ================================================ FILE: db/PE/library_Plivo.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // http://github.com/plivo/plivo-dotnet meta("library", "Plivo"); function detect() { if (PE.isNetObjectPresent("Plivo")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Polly.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/App-vNext/Polly meta("library", "Polly"); function detect() { if (PE.isNetObjectPresent("Polly") || PE.isNetObjectPresent("Polly.Core")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_PortAudio.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.portaudio.com/ meta("library", "PortAudio"); function detect() { if (PE.isLibraryPresentExp(/^portaudio_x(86|64)/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Python.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "Python"); // !!!! 🐓🐓🐓🐓🐓 !!!! function detect() { var aPython = PE.isLibraryPresentExp(/^python(\d)(\d+)/i); if (aPython) { sVersion = aPython[1] + "." + aPython[2]; bDetected = true; } var aPython2 = PE.isLibraryPresentExp(/^libpython(\d.\d)/i); if (aPython2) { sVersion = aPython2[1]; bDetected = true; } sLang = "Python"; sLangVersion = sVersion; return result(); } ================================================ FILE: db/PE/library_QMixer.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.ixbt.com/multimedia/3dsoundfaq.html meta("library", "QMixer"); function detect() { if (PE.isLibraryPresent("QMDX.DLL")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Qt.4.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // coauthor: sendersu meta("library", "Qt"); includeScript("QtFramework"); function detect() { if (aQt) { sVersion = PE.getPEFileVersion(PE.getFileDirectory() + "/" + aQt[0]); if (!sVersion) { if (PE.getVersionStringInfo("ProductName") == "The Qt Company Ltd" || PE.getVersionStringInfo("ProductName") == "Qt5") { sVersion = PE.getPEFileVersion(PE.getFileDirectory() + "/" + ownName); // Check Linux !!! } if (!sVersion) sVersion = (aQt[3] ? aQt[3] : aQt[1]) + ".X"; } if (aQt[2]) { sOptions = "debug"; } bDetected = true; } if (!aQt && PE.section[".rdata"]) { if (PE.findString(PE.section[".rdata"].FileOffset, PE.section[".rdata"].FileSize, "QWidget") != -1) { sOptions = "static"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/library_RADVideoTools.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.radgametools.com/bnkdown.htm meta("library", "RAD Video Tools"); function detect() { if (PE.isLibraryPresentExp(/^(binkw|bink2|video_bink)/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_RNNoise.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/xiph/rnnoise meta("library", "RNNoise Noise Suppressor"); function detect() { if (PE.isLibraryPresentExp(/rnnoise/i) || PE.isFunctionPresent("rnnoise_init")) { bDetected = true; } else if (PE.isExportFunctionPresentExp(/^rnnoise_/)) { sOptions = "static"; // EAT bDetected = true; } return result(); } ================================================ FILE: db/PE/library_RabbitMQ.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/rabbitmq/rabbitmq-dotnet-client meta("library", "RabbitMQ"); function detect() { if (PE.isNetObjectPresent("RabbitMQ.Client")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_RamlToOpenApiConverter.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/StefH/RamlToOpenApiConverter meta("library", "RamlToOpenApiConverter"); function detect() { if (PE.isNetObjectPresent("RamlToOpenApiConverter")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_RestSharp.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/restsharp/RestSharp meta("library", "RestSharp HTTP"); function detect() { if (PE.isNetObjectPresent("RestSharp")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_SDL.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/libsdl-org/SDL meta("library", "SDL"); function detect() { if (PE.isLibraryPresentExp(/^sdl2/i)) { sVersion = "2"; } else if (PE.isLibraryPresentExp(/^sdl3/i)) { sVersion = "3"; } else if (PE.isLibraryPresentExp(/^sdl/i)) { bDetected = true; } bDetected = bDetected || Boolean(sVersion); return result(); } ================================================ FILE: db/PE/library_ScePad.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "PlayStation Controller SDK"); function detect() { if (PE.isLibraryPresentExp(/^libscepad/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_ScriptHookV.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.dev-c.com/gtav/scripthookv/ meta("library", "ScriptHookV for GTA V"); function detect() { if (PE.isLibraryPresent("ScriptHookV.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Scrutor.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/khellang/Scrutor meta("library", "Scrutor"); function detect() { if (PE.isNetObjectPresent("Scrutor")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_SecretRabbitCode.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://libsndfile.github.io/libsamplerate/ meta("library", "Secret Rabbit Code"); function detect() { if (PE.isLibraryPresentExp(/^libsamplerate/i) || PE.isFunctionPresent("src_set_ratio")) { bDetected = true; } else if ( PE.isExportFunctionPresent("src_set_ratio") || PE.isExportFunctionPresent("src_simple") || PE.isExportFunctionPresent("src_is_valid_ratio")) { sOptions = "static"; // EAT bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Serilog.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Serilog"); function detect() { if (PE.isNetObjectPresent("Serilog")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_SharpCompress.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/adamhathcock/sharpcompress meta("library", "SharpCompress"); function detect() { if (PE.isNetObjectPresent("SharpCompress")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_SharpZipLib.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/icsharpcode/SharpZipLib meta("library", "SharpZipLib Compression"); function detect() { if (PE.isNetObjectPresent("SharpZipLib")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Sigil.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/kevin-montrose/Sigil meta("library", "Sigil Helper"); function detect() { if (PE.isNetObjectPresent("Sigil")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_SkiaSharp.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/mono/SkiaSharp (.NET) meta("library", "SkiaSharp"); function detect() { if (PE.isNetObjectPresent("SkiaSharp")) { sVersion = "Mono-based"; bDetected = true; } else if (PE.isLibraryPresentExp(/^libskiasharp/i)) { sVersion = "Native"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Smacker.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.multimedia.cx/index.php/RAD_Game_Tools_Smacker_API meta("library", "RAD Game Tools Smacker API"); function detect() { if (PE.isLibraryPresent("smackw32.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_SmartHeap.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.xlsoft.com/en/products/microquill/smartheap.html meta("library", "SmartHeap"); function detect() { if (PE.isLibraryPresent("SHW32.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Snappier.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/brantburnett/Snappier meta("library", "Snappier Compression"); function detect() { if (PE.isNetObjectPresent("Snappier")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Spectre.Console.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/spectreconsole/spectre.console meta("library", "Spectre.Console"); function detect() { if (PE.isNetObjectPresent("Spectre.Console")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Stackify.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/stackify/stackify-api-dotnet meta("library", "Stackify"); function detect() { if (PE.isNetObjectPresent("StackifyLib")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Starkbank_ECDSA.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/starkbank/ecdsa-dotnet meta("library", "Starkbank ECDSA"); function detect() { if (PE.isNetObjectPresent("StarkbankEcdsa")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Steam.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Steam"); function detect() { if (PE.isLibraryPresentExp(/^steam/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Swashbuckle.AspNetCore.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/domaindrivendev/Swashbuckle.AspNetCore meta("library", "Swashbuckle.AspNetCore"); function detect() { if (PE.isNetObjectPresent("Swashbuckle.Core")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_TNTSI.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://otvet.mail.ru/question/64229866 meta("library", "TNTSI"); function detect() { if (PE.isLibraryPresent("TNTSI.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Tabula.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/BobLd/tabula-sharp meta("library", "Tabula"); function detect() { if (PE.isNetObjectPresent("Tabula")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Telegram.Bot.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/TelegramBots/Telegram.Bot meta("library", "Telegram.Bot"); function detect() { if (PE.isNetObjectPresent("Telegram.Bot")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Twilio.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/twilio/twilio-csharp meta("library", "Twilio REST Helper"); function detect() { if (PE.isNetObjectPresent("Twilio")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Twilio_SendGrid.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/sendgrid meta("library", "Twilio SendGrid"); function detect() { if (PE.isNetObjectPresent("SendGrid")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_UAParser.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/ua-parser/uap-csharp meta("library", "UAParser"); function detect() { if (PE.isNetObjectPresent("UAParser")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Unity.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Unity Engine"); function detect() { if (PE.isLibraryPresent("UnityPlayer.dll") || PE.isExportFunctionPresent("UnityMain")) { bDetected = true; } if (PE.isExportFunctionPresent("il2cpp_alloc")) { sLang = "Native MSIL/C#"; sOptions = "IL2CPP"; bDetected = true; _setResult("compiler", "IL2CPP Technology", String(), String()); } return result(); } ================================================ FILE: db/PE/library_VFW.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://en.wikipedia.org/wiki/Video_for_Windows meta("library", "Video for Windows (VFW)"); function detect() { if (PE.isLibraryPresent("MSVFW32.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Vorbis.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // Rewritten by: DosX // https://en.wikipedia.org/wiki/Vorbis meta("library", "Vorbis"); function detect() { if (PE.isLibraryPresentExp(/vorbis/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Vulkan.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Vulkan"); function detect() { if (PE.isLibraryPresentExp(/[V|v]ulkan/i)) { bDetected = true; } else if (PE.isExportFunctionPresentExp(/VULKAN/)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_WF.Guna.UI2.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Guna UI"); function detect() { if (PE.isNetObjectPresent("Guna.UI2") && PE.isNetObjectPresent("Guna.UI2.WinForms")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_WF.Krypton.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Krypton UI"); function detect() { if (PE.isNetObjectPresent("ComponentFactory.Krypton.Toolkit")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_WF.MetroFramework.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "MetroFramework UI"); function detect() { if (PE.isNetObjectPresent("MetroFramework")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_WF.ReaLTaiizor.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/Taiizor/ReaLTaiizor meta("library", "ReaLTaiizor UI"); function detect() { if (PE.isNetObjectPresent("ReaLTaiizor")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_WF_WPF.MaterialSkin.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "MaterialSkin UI"); function detect() { if (PE.isNetObjectPresent("MaterialSkin")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_WPF.AvalonEdit.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/icsharpcode/AvalonEdit meta("library", "AvalonEdit"); function detect() { if (PE.isNetObjectPresent("AvalonEdit")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_WPF.ControlzEx.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/MahApps/MahApps.Metro meta("library", "ControlzEx UI"); function detect() { if (PE.isNetObjectPresent("ControlzEx")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_WPF.MahApps_Metro.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/MahApps/MahApps.Metro meta("library", "MahApps Metro UI"); function detect() { if (PE.isNetObjectPresent("MahApps.Metro")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_WebActivatorEx.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/davidebbo/WebActivator meta("library", "WebActivator"); function detect() { if (PE.isNetObjectPresent("WebActivatorEx")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_WinSparkle.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/vslavik/winsparkle meta("library", "WinSparkle"); function detect() { if (PE.isLibraryPresent("WinSparkle.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_WwiseAudioEngine.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.audiokinetic.com/en/wwise/overview/ meta("library", "Wwise Audio Engine"); function detect() { if (PE.isFunctionPresent("g_pAKPluginList")) { bDetected = true; } else if (PE.isExportFunctionPresent("g_pAKPluginList")) { sOptions = "static"; // EAT bDetected = true; } return result(); } ================================================ FILE: db/PE/library_XLive.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://www.xbox.com/en-us/live meta("library", "Xbox Live"); function detect() { if (PE.isLibraryPresent("xlive.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_XPatFC.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://landbeforetime.fandom.com/wiki/The_Land_Before_Time:_Kindergarten_Adventure meta("library", "XPatFC"); function detect() { if (PE.isLibraryPresent("XpatFC.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Xerces-CPP.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/apache/xerces-c meta("library", "Xerces-C++ XML Parser"); function detect() { if (PE.isLibraryPresentExp(/^xerces/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Xojo.4.sg ================================================ // Detect It Easy: detection rule file // Author: Jupiter // https://www.xojo.com meta("library", "Xojo"); function detect() { if (PE.section["xojoinit"]) { // plugins if (PE.section["xojoplgn"]) { sOptions = sOptions.append("plugins"); } // x64 | x86 if (PE.isLibraryPresent("XojoGUIFramework64.dll")) { sVersion = "x64"; } else if (PE.isLibraryPresent("XojoGUIFramework32.dll")) { sVersion = "x86"; } //sVersion="2018r2"; bDetected = true; } return result(); } ================================================ FILE: db/PE/library_YUICompressor_NET.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/YUICompressor-NET/YUICompressor.NET meta("library", "YUICompressor.NET"); function detect() { if (PE.isNetObjectPresent("Yahoo.Yui.Compressor")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_YamlDotNet.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/aaubry/YamlDotNet meta("library", "YamlDotNet"); function detect() { if (PE.isNetObjectPresent("YamlDotNet")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_ZstdSharp.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/oleg-st/ZstdSharp meta("library", "ZstdSharp"); function detect() { if (PE.isNetObjectPresent("ZstdSharp")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_Zydis.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Zyan Disassembler"); function detect() { if (PE.isLibraryPresent("zydis.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_combres.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/buunguyen/combres meta("library", "Combres Optimizer"); function detect() { if (PE.isNetObjectPresent("Combres")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_curl.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "Curl"); function detect() { if (PE.isLibraryPresentExp(/libcurl/i)) { bDetected = true; } else if (PE.isExportFunctionPresentExp(/^curl_easy_/)) { sOptions = "static"; // EAT bDetected = true; } return result(); } ================================================ FILE: db/PE/library_discord-rpc.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://github.com/discord/discord-rpc meta("library", "Discord RPC"); function detect() { if (PE.isLibraryPresent("discord-rpc.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_dotless.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/dotless/dotless meta("library", "dotless"); function detect() { if (PE.isNetObjectPresent("dotless.Core")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_expat_xml_parser.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://libexpat.github.io/ meta("library", "Expat XML Parser"); function detect() { if (PE.isLibraryPresentExp(/^libexpat/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_gRPC_NET.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/grpc/grpc-dotnet meta("library", "gRPC.NET"); function detect() { if (PE.isNetObjectPresent("Grpc.Core.Api")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_iMuse.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // https://wiki.scummvm.org/index.php/SCUMM/Technical_Reference/iMuse_data meta("library", "iMuse"); function detect() { if (PE.isLibraryPresent("iMUSE.dll")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_java.3.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("library", "Java"); function detect() { if (PE.getOverlaySize() > 0x40) { if (PE.findString(PE.getOverlayOffset(), 0x40, "META-INF/MANIFEST.MF") != -1) { var nResSection = PE.getResourceSection(); if (nResSection != -1) { if (PE.isSignatureInSectionPresent(nResSection, "'Java Runtime Environment'")) { bDetected = true; } } } } sLang = "Java"; return result(); } ================================================ FILE: db/PE/library_libfvad.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/dpirch/libfvad meta("library", "libfvad"); function detect() { if (PE.isLibraryPresentExp(/fvad\./i)) { bDetected = true; } else if (PE.isExportFunctionPresentExp(/^fvad_/)) { sOptions = "static"; // EAT bDetected = true; } return result(); } ================================================ FILE: db/PE/library_libpng.4.sg ================================================ // Detect It Easy: detection rule file // Author: BJNFNE // http://www.libpng.org/ meta("library", "libpng"); function detect() { if (PE.isLibraryPresentExp(/^libpng/i)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_log4net.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/apache/logging-log4net meta("library", "log4net"); function detect() { if (PE.isNetObjectPresent("log4net")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_lz4net.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/MiloszKrajewski/lz4net meta("library", "lz4net"); function detect() { if (PE.isNetObjectPresent("LZ4")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_nClam.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/tekmaven/nClam meta("library", "nClam"); function detect() { if (PE.isNetObjectPresent("nClam")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_rlottie.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/Samsung/rlottie meta("library", "rlottie"); function detect() { if (PE.isLibraryPresentExp(/^rlottie/i)) { bDetected = true; } else if (PE.isExportFunctionPresentExp(/^(\?|_)+.{6,}rlottie/)) { sOptions = "static"; // EAT bDetected = true; } return result(); } ================================================ FILE: db/PE/library_sqlite.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/praeclarum/sqlite-net (.NET) meta("library", "SQLite"); function detect() { var sLibrary = PE.isLibraryPresentExp(/sqlite\d+/i); if (sLibrary) { var match = /sqlite(\d+)/i.exec(sLibrary); if (match) { sVersion = match[1]; } bDetected = true; } else { var sExportFunction = PE.isExportFunctionPresentExp(/sqlite\d+/i); if (sExportFunction) { sOptions = "static"; // EAT var match = /sqlite(\d+)/i.exec(sExportFunction); if (match) { sVersion = match[1]; } bDetected = true; } else if (PE.isLibraryPresentExp(/sqlite|sqlmin|sqllang|sqltses|sqldk/i)) { bDetected = true; } } if (!bDetected && PE.isNet()) { if (PE.isNetObjectPresent("SQLite-net")) { sName += "-net"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/library_wxWidgets.5.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("library", "wxWidgets"); includeScript("wxWidgets"); function detect() { if (aWx == 1) { sOptions = "static"; bDetected = true; } else if (aWx) { sVersion = (aWx[2] / 10).toFixed(1); if (aWx[1]) { sOptions = "universal"; } if (aWx[3]) { sOptions = sOptions.append("unicode"); } if (aWx[4]) { sOptions = sOptions.append("debug"); } bDetected = true; } return result(); } ================================================ FILE: db/PE/library_xUnit.net.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/xunit/xunit meta("library", "xUnit.net"); function detect() { if (PE.isNetObjectPresent("xunit.core") || PE.isNetObjectPresent("xunit.assert") || PE.isNetObjectPresent("xunit.analyzers")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/library_zlib.4.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("library", "zlib"); function detect() { if (PE.isLibraryPresentExp(/^zlib*/)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/linkers.6.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("linker"); includeScript("FASM"); includeScript("RosASM"); includeScript("SpASM"); includeScript("FPC"); function detect() { sVersion = PE.getCompilerVersion(); if (PE.compare("'MZ'90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21'This program cannot be run in DOS mode.\r\r\n$'0000000000000'PE'0000")) { var nMajor = PE.getMajorLinkerVersion(), nMinor = PE.getMinorLinkerVersion(); if (nMajor == 2) { if (nMinor == 55) { sName = "LCC Linker"; sVersion += "*"; sLang = "C"; bDetected = true; } else if (nMinor <= 40 || nMinor == 56) { sName = "GNU Linker ld (GNU Binutils)"; if (nMinor == 56) { sVersion += "*"; } bDetected = true; } else if (nMinor == 50) { sName = "Polink"; sVersion += "*"; bDetected = true; } } else if (nMajor == 1) { if (nMinor == 3) { sName = "LCC Linker"; bDetected = true; } } } else if (PE.compare("'This program must be run under Win'....0D0A24..00", 0x50)) { sName = "Turbo Linker"; if (sVersion == "2.25") { if (PE.isSectionNamePresent(".tls")) { sLang = "Object Pascal (Delphi)"; } } bDetected = true; } else if (PE.compare("FB..'jr'", 0x1e)) { sName = "Turbo Linker"; sVersion = (PE.readByte(0x1f) / 16).toFixed(1); if (PE.compare("'32STUB'", 0x200)) { sOptions = sOptions.append("RTM32"); } bDetected = true; } else if (PE.compare( /*[Tt]*/ "'his is a Windows '" /*(?:95|NT)*/, 0x4f)) { sName = "Watcom Linker"; sVersion += "*"; bDetected = true; } else if (PE.compare("'MZ'6c000100000002000000ffff000000000000110000004000000000000000'Win'....' Program!\r\n\b409ba0001cd21b44ccd2160000000'GoLink, GoAsm www.GoDevTool.com'00")) { sName = "GoLink"; bDetected = true; } var nMajor = PE.getMajorLinkerVersion(), nMinor = PE.getMinorLinkerVersion(); if (nMajor == 2 && nMinor == 18) { sName = "Watcom Linker"; bDetected = true; } else if (nMajor == 2 && nMinor == 52) { sName = "PowerBASIC Linker"; sLang = "Basic"; bDetected = true; } else if (nMajor == 255 && nMinor == 255) { sName = "IBM VisualAge"; bDetected = true; } else if (nMajor == 7 && nMinor == 32) { sName = "Symantec C/C++"; sVersion = "7.2"; bDetected = true; } // Correct version if (sName == "Borland Linker") { if (PE.getMajorLinkerVersion() > 15) { sVersion += "*"; } } // Doesn't have a linker. if (bFASM || bRosASM || bSpASM || bFPC) { bDetected = false; } return result(); } ================================================ FILE: db/PE/marker_AMD_PowerXpress.5.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://en.wikipedia.org/wiki/AMD_Hybrid_Graphics#PowerXpress meta("marker", "AMD PowerXpress"); function detect() { if (PE.isExportFunctionPresent("AmdPowerXpressRequestHighPerformance")) { bDetected = true; } else if (PE.isExportFunctionPresent("NoAmdPwrXpressRequestHighPerformance")) { sOptions = "Disabled"; bDetected = true; } return result(); } ================================================ FILE: db/PE/marker_Nvidia_Optimus.5.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.nvidia.com/en-us/geforce/technologies/optimus/technology/ meta("marker", "Nvidia Optimus"); function detect() { if (PE.isExportFunctionPresent("NvOptimusEnablement")) { bDetected = true; } else if (PE.isExportFunctionPresent("NoNvOptimEnablement")) { sOptions = "Disabled"; bDetected = true; } return result(); } ================================================ FILE: db/PE/native_only/about.txt ================================================ Scripts for Native files only will be located here (PE.isNet() == false) ================================================ FILE: db/PE/other_Dolphin_VM.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // Executable made by Dolphin XP ToGo Application (Dolphin Smalltalk platform) meta("other", "Dolphin Virtual Machine"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..33db895d..6a..ff15")) { if (PE.compareOverlay("'IST'00")) { sVersion = "5.0"; sOptions = "2003 by Object Arts"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/other_FileSplit_Self-Merger.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "Partridgesoft FileSplit Self-Merger"); function detect() { if (PE.compareEP("56576a..ff15........8bf8ff15........8a088b35........80f9..75..50ffd68a0884c974..80f9..75..50ffd6")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/other_GSplit.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("other", "GSplit Self-Uniting"); function detect() { if (PE.compareEP("558bec83c4..b8........e8$$$$$$$$538bd833c0a3........6a..e8........a3........a1........a3........33c0")) { if (PE.getNumberOfResources() > 0) { nOffset = PE.getResourceNameOffset("ENG"); { if (PE.compare("'GS'", nOffset)) { sVersion = "3.0"; bDetected = true; } } } } return result(); } ================================================ FILE: db/PE/packer_32LiTe.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://www.softpedia.com/get/Compression-tools/32LiTE.shtml meta("packer", "32LiTe"); function detect() { if (PE.compareEP("6006FC1E07BE........6A0468........68")) { sVersion = "0.03a"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_AHpacker.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "AHpacker"); function detect() { const epackSectionName = "!EPack"; if (PE.compareEP("6068........B8........FF1068........50B8........FF1068........6A40FFD08905") && PE.section[0].Name !== epackSectionName && PE.section[PE.nLastSection].Name !== epackSectionName) { sVersion = "0.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_ANDpakk.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "ANDpakk"); function detect() { if (PE.compareEP("60FCBED4004000BF001000015783CDFF33C9F9EB05A402DB75058A1E4612DB72F4")) { sVersion = "2.0.06"; bDetected = true; } else if (PE.getNumberOfSections() == 1 && PE.getNumberOfImports() == 1 && PE.getNumberOfImportThunks(0) == 2) { if (PE.section[0].Name == "ANDpakk2") { sVersion = "2.X"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/packer_ASDPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "ASDPack"); function detect() { if (PE.compareEP("8B442404565753E8CD010000C30000000000000000000000000010000000")) { sVersion = "2.0"; bDetected = true; } else if ( PE.getNumberOfImports() === 1 && PE.getNumberOfSections() === 3 && PE.getImportLibraryName(0) === "Kernel32.dll" && PE.isImportPositionHashPresent(0, 0x3651f68d) // GetModuleHandleA ) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_ASPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // http://www.aspack.com/ meta("packer", "ASPack"); function getASPackVersion(nOffset) { if (PE.compare("60E8000000005D81ED........B8........03C5", nOffset)) { sVersion = "1.00b-1.07b"; } else if (PE.compare("60EB..5DEB..FF..........E9", nOffset)) { sVersion = "1.08.00-1.08.02"; } else if (PE.compare("60E8000000005D............BB........03DD", nOffset)) { sVersion = "1.08.03"; } else if (PE.compare("60E8000000005D81ed........BB........01eb", nOffset)) { sVersion = "1.08.X"; sOptions = "possibly"; } else if (PE.compare("60E841060000EB41", nOffset)) { sVersion = "1.08.04"; } else if (PE.compare("60EB..5DFFE5E8........81ED........BB........03DD2B9D", nOffset)) { sVersion = "1.08.X"; } else if (PE.compare("60E870050000EB4C", nOffset)) { sVersion = "2.000"; } else if (PE.compare("60E872050000EB4C", nOffset)) { sVersion = "2.001"; } else if (PE.compare("60E872050000EB3387DB9000", nOffset)) { sVersion = "2.1"; } else if (PE.compare("60E93D040000", nOffset)) { sVersion = "2.11"; } else if (PE.compare("60E802000000EB095D5581ED39394400C3E93D040000", nOffset)) { sVersion = "2.11b"; } else if (PE.compare("60E802000000EB095D5581ED39394400C3E959040000", nOffset)) { sVersion = "2.11c-2.11d"; } else if (PE.compare("60E802000000EB095D55", nOffset)) { sVersion = "2.11d"; } else if (PE.compare("60E803000000E9EB045D4555C3E801", nOffset)) { sVersion = "2.12-2.42"; } else if (PE.compare("9060E8$$$$$$$$5D4555C3", nOffset)) { sVersion = "2.12b"; } else if (PE.compare("60e8$$$$$$$$8b2c2481ed........c3", nOffset)) { sVersion = "2.1X-2.39"; } else if (PE.compare("9060e8$$$$$$$$8b2c2481ed........c3", nOffset)) { sVersion = "2.1X-2.39"; } else { return false; } return true; } function detect() { var nOffset = PE.getEntryPointOffset(); if (nOffset != -1) { if (!getASPackVersion(nOffset)) { if (PE.compareEP("7500E9")) { nOffset += 3; bDetected = true; } else if (PE.compareEP("907500E9")) { nOffset += 4; bDetected = true; } else if (PE.compareEP("90907500E9")) { nOffset += 5; bDetected = true; } else if (PE.compareEP("90750190E9")) { nOffset += 5; bDetected = true; } else if (PE.compareEP("907501FFE9")) { nOffset += 5; bDetected = true; } else if (PE.compareEP("9090907500E9")) { nOffset += 6; bDetected = true; } else if (PE.compareEP("9090750190E9")) { nOffset += 6; bDetected = true; } else if (PE.compareEP("909090750190E9")) { nOffset += 7; bDetected = true; } if (bDetected) { // Can't simply adjust the offset, as the destination may be in a different section. nOffset = PE.RVAToOffset(PE.OffsetToRVA(nOffset) + 4 + ~~PE.readDword(nOffset)); bDetected = getASPackVersion(nOffset); } } else { bDetected = true; } } if (!bDetected) { if (PE.section[".aspack"] && PE.section[".adata"]) { sVersion = "2.12-2.XX"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/packer_Advanced_BAT_to_EXE_Converter.2.sg ================================================ // Detect It Easy: detection rule file // Author: A.S.L. 2018 // https://www.battoexeconverter.com/ meta("packer", "Advanced BAT to EXE Converter"); function detect() { if (PE.compareEP("558BEC6AFF68") && PE.compareOverlay("..02020202363A38393a")) { sVersion = "2.X-4.X"; bDetected = true; } sLang = "Batch"; return result(); } ================================================ FILE: db/PE/packer_AlushPacker.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/Alon-Alush/AlushPacker meta("packer", "AlushPacker"); function detect() { if (PE.getNumberOfImports() > 2 && PE.isRichSignaturePresent() && PE.isLibraryPresentExp(/vcruntime140/i) && ( PE.getImportFunctionName(0, 0) === "VirtualProtect" && PE.getImportFunctionName(0, 1) === "GetCurrentProcess" && PE.getImportFunctionName(0, 2) === "GetModuleHandleA" && PE.getImportFunctionName(0, 3) === "MultiByteToWideChar" && PE.getImportFunctionName(0, 4) === "FlushInstructionCache" )) { var packedLatestSection = PE.section[".packed"]; if (!packedLatestSection) { packedLatestSection = PE.section[PE.getNumberOfSections() - 1]; sOptions = "modified"; } if (PE.compare("00 ** ?? 00", packedLatestSection.FileOffset)) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/packer_Anskya_NTPacker_Generator.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "Anskya NTPacker Generator"); function detect() { if (PE.compareEP("558BEC83C4F053B8881D0010E8C7FAFFFF6A0A68201E0010A11431001050")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_AtomPePacker.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://web.archive.org/web/20221012050538/https://github.com/ORCx41/AtomPePacker meta("packer", "AtomPePacker"); function detect() { if (PE.is64() && PE.compareEP("4053574883EC**65488B1C25........FF15**......BA........41B8........488BC8")) { sOptions = PE.isSectionNamePresent(".ATOM") ? "x64 stub" : "modified"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_BatToExe.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "Bat To Exe"); function detect() { // Fatih Kodak if (PE.compareEP("68........68........68........e8........83c4..68........e8........a3........68........68........68........e8........a3")) { for (var i = 0; i < PE.getNumberOfResources() && !bDetected; i++) { if (PE.resource[i].Type == "RT_RCDATA") { bDetected = PE.compare("78 9c 63 60 18 05 23 19 00 00 02 00 00 01", PE.resource[i].Offset); } } } sLang = "Batch"; return result(); } ================================================ FILE: db/PE/packer_BatToExeConverter.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("packer", "Bat To Exe Converter"); function detect() { if (( PE.isImportPositionHashPresent(0, 0x72a2ca64) || PE.isImportPositionHashPresent(0, 0x2afcef3f) ) && PE.compareEP(PE.is64() ? "48 83 EC .. 49 C7 C0 .. .. .. .. 48 31 D2 48 B9 .. .. .. .. .. .. .. .. E8 .. .. .. .. 48 31 C9 E8 .. .. .. .. 48 89 05 .. .. .. .." : // 64 bit "68 .. .. .. .. 68 .. .. .. .. 68 .. .. .. .. E8 .. .. .. .. 83 C4 .. 68 .. .. .. .. E8 .. .. .. .. A3 .. .. .. ..")) { // 32 bit bDetected = true; } sLang = "Batch"; return result(); } ================================================ FILE: db/PE/packer_BeRoEXEPacker.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://blog.rosseaux.net/page/875fbe6549aa072b5ee0ac9cefff4827/BeRoEXEPacker meta("packer", "BeRoEXEPacker"); function detect() { var nEP = PE.compareEP("837C2408010F85") ? 11 : 0; if (PE.compareEP("60BE........BF........FCB28033DBA4B302E8", nEP)) { sVersion = "1.00"; sOptions = "LZBRR"; } else if (PE.compareEP("60BE........BF........FCAD8D1C07B0803BFB733BE8", nEP)) { sVersion = "1.00"; sOptions = "LZBRS"; } else if (PE.compareEP("6068........68........68........E8........BE........B9")) { sVersion = "1.00"; sOptions = "LZMA"; } else if (PE.compareEP("BA........8DB2........8B46..85C0745103C28B7E..8B1E85DB75028BDF03DA03FA525750FF15")) { sVersion = "1.00"; } else if (PE.compareEP("6068........68......0068........e8..040000..................00")) { sVersion = "1.00"; sOptions = "LZMA"; } else if (PE.compareEP("60e8000000005e81c6....0000bf........6081ec0804000089e357fc31c0b4")) { sVersion = "1.00"; sOptions = "CTX1"; } else if (PE.compareEP("60c8940c0060fcbe........ad8945fc33c0f7d08945f8f7d0b408b923030000")) { sVersion = "1.00"; sOptions = "LZBRA"; } else if (PE.compare("52c3'(C)BeRo!PE'0000", 2)) { bDetected = true; } bDetected = bDetected || Boolean(sVersion) || Boolean(sOptions); return result(); } ================================================ FILE: db/PE/packer_BoxedApp.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.boxedapp.com/ meta("packer", "BoxedApp"); function detect() { if (PE.isTLSPresent()) { const boxedAppSection = PE.section[".bxpck"]; if (boxedAppSection && PE.getNumberOfSections() > 2) { const mainSection = PE.section[boxedAppSection.Number + 1]; if (mainSection && mainSection.Name === ".main") { bDetected = true; } } if (!bDetected && PE.getNumberOfImports() === 2 && PE.compareEP("C200000000000000000000000000000000")) { sOptions = "modified"; bDetected = true; } if (bDetected && boxedAppSection && PE.isSignatureInSectionPresent(boxedAppSection.Number, "2000640065006D006F0020")) { sVersion = "demo"; } } return result(); } ================================================ FILE: db/PE/packer_CExe.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://compression.ru/arctest/self/cexe.htm meta("packer", "CExe"); function detect() { if (PE.compareEP("558BEC81EC0C02....56BE........8D85F8FEFFFF56506A..FF15........8A8DF8FEFFFF33D284C98D85F8FEFFFF7416")) { sVersion = "1.0a"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_CICompress.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "CICompress"); function detect() { if (PE.compareEP("6A046800100000FF35........6A00FF15........A3........97BE........E8710000003B05")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_Cxfreeze.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Made by KDSS-Research // Rewritten by: DosX meta("packer", "CX_Freeze"); function detect() { var rdataSection = PE.section[".rdata"]; if (rdataSection) { bDetected = (PE.findString(rdataSection.FileOffset, rdataSection.FileSize, "Unable to change DLL search path!") !== -1 && PE.isSignaturePresent(rdataSection.FileOffset, rdataSection.FileSize, "25006C0073005C006C00690062005C006C006900620072006100720079002E007A00690070003B0025006C0073005C006C0069006200") && PE.findString(rdataSection.FileOffset, rdataSection.FileSize, "Out of memory creating sys.path!") !== -1 && PE.findString(rdataSection.FileOffset, rdataSection.FileSize, "Unable to calculate directory of executable!") !== -1); } sLang = "Python"; return result(); } ================================================ FILE: db/PE/packer_DxPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "DxPack"); function detect() { if (PE.compareEP("60E8........5D8BFD81ED........2BB9........81EF........83BD..........0F84")) { switch (PE.readByte(PE.getEntryPointOffset() + 32)) { case 0xB9: sVersion = "1.0"; break; case 0xBD: sVersion = "0.86"; break; } bDetected = true; } else if (PE.compareEP("EB03C20C00558BEC81EC00100000B80000....B900100000BA0000....89")) { sVersion = "1.0"; bDetected = true; } var coderpubSection = PE.section["coderpub"]; if (bDetected && !coderpubSection) { sOptions = "modified"; } else if (!bDetected && coderpubSection) { if (PE.compareEP("558BEC") || PE.compareEP("880D........CC")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/packer_EXE32Pack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://exe32pack.apponic.com/ meta("packer", "Exe32Pack"); function detect() { if (PE.compareEP("3BC074028183553BC074028183533BC97401BC563BD27402818557E8000000003BDB7401BE5D8BD581ED")) { sVersion = "1.4X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_ExE_Pack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "ExE Pack"); function detect() { if (PE.compareEP("6068........B8........FF1068........50B8........FF1068........6A40FFD08905")) { if (PE.section[0].Name == "!EPack") { sVersion = "1.0-1.2"; bDetected = true; } } else if (PE.compareEP("9090909061B8........FFE0558BEC60558B75088B7D0CE802000000EB048B1C24C381C3")) { sVersion = "1.4 lite final"; bDetected = true; } else if (PE.compareEP("33C08BC068........68........E8")) { sVersion = "1.4 lite final"; bDetected = true; } else if (PE.section[PE.nLastSection].Name == ".!ep") { sVersion = "1.4"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_FSG.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "FSG"); function detect() { if (PE.compareEP("BE........BF........BB........53BB........B280")) { sVersion = "1.31"; } else if (PE.compareEP("BB........BF........BE........53E80A00000002D275058A164612D2")) { sVersion = "1.0"; } else if (PE.compareEP("BB........BF........BE........FCB2808A064688074702D275058A16")) { sVersion = "1.1"; } else if (PE.compareEP("EB02CD2003..8D..80....00..................EB02")) { sVersion = "1.10"; sOptions = "Watcom C/C++ EXE"; } else if (PE.compareEP("80E9A1C1C11368E4167546C1C1055EEB019D6864863746EB028CE05FF7D0")) { sVersion = "1.10"; sOptions = "WinRAR-SFX"; } else if (PE.compareEP("EB0102EB02CD20B8........EB0155BEF400000013DF13D80FB638D1F3F7")) { sVersion = "1.10"; sOptions = "WinRAR-SFX"; } else if (PE.compareEP("EB02CD202BC868........EB021EBB5EEB02CD2068B12B6E37405B0FB6C9")) { sVersion = "1.10"; sOptions = "Borland C++ 1999"; } else if (PE.compareEP("23CAEB025A0DE8020000006A3558C1C910BE........0FB6C9EB02CD20BB")) { sVersion = "1.10"; sOptions = "Borland C++"; } else if (PE.compareEP("2BC2E802000000954A598D3D52F12AE8C1C81CBE2E....18EB02ABA003F7")) { sVersion = "1.10"; sOptions = "Borland Delphi/Borland C++"; } else if (PE.compareEP("EB012EEB02A555BB........87FE8D05AACEE063EB0175BA5ECEE063EB02")) { sVersion = "1.10"; sOptions = "Borland Delphi/Borland C++"; } else if (PE.compareEP("EB02CD20EB02CD20EB02CD20C1E618BB........EB0282B8EB01108D05F4")) { sVersion = "1.10"; sOptions = "Borland Delphi/Microsoft Visual C++/ASM"; } else if (PE.compareEP("C1C810EB010FBF03746677C1E91D6883....77EB02CD205EEB02CD202BF7")) { sVersion = "1.10"; sOptions = "Borland Delphi/Microsoft Visual C++"; } else if (PE.compareEP("1BDBE8020000001A0D5B68........E801000000EA5A58EB02CD2068F400")) { sVersion = "1.10"; sOptions = "Borland Delphi/Microsoft Visual C++"; } else if (PE.compareEP("EB0156E802000000B2D9596880..4100E8020000006532595EEB02CD20BB")) { sVersion = "1.10"; sOptions = "Borland Delphi 2.0"; } else if (PE.compareEP("F7D80FBEC2BE........0FBEC9BF083B6507EB02D829BBECC59AF8EB0194")) { sVersion = "1.10"; sOptions = "MASM32/TASM32/Microsoft Visual Basic"; } else if (PE.compareEP("03F723FE33FBEB02CD20BB........EB0186EB0190B8F400000083EE052B")) { sVersion = "1.10"; sOptions = "MASM32/TASM32"; } else if (PE.compareEP("EB01DBE80200000086435E8D1DD075CF83C1EE1D6850..8F83EB023D0F5A")) { sVersion = "1.10"; sOptions = "MASM32"; } else if (PE.compareEP("EB0209940FB7FF68........81F68E0000005BEB0211C28D05F400000047")) { sVersion = "1.10"; sOptions = "Microsoft Visual Basic/MASM32"; } else if (PE.compareEP("C1CB10EB010FB90374F6EE0FB6D38D0583....EF80F3F62BC1EB01DE6877")) { sVersion = "1.10"; sOptions = "Microsoft Visual Basic 5.0/6.0"; } else if (PE.compareEP("2C711BCAEB012AEB01658D3580....0080C98480C968BBF4000000EB01EB")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 4.X/LCC Win32 1.X"; } else if (PE.compareEP("33D20FBED2EB01C7EB01D88D0580......EB02CD20EB01F8BEF4000000EB")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 5.0/6.0"; } else if (PE.compareEP("E8010000005A5EE802000000BADD5E03F2EB0164BB........8BFAEB01A8")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0/7.0/ASM"; } else if (PE.compareEP("0BD08BDAE80200000040A05AEB019DB8........EB02CD2003D38D35F400")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0/7.0"; } else if (PE.compareEP("87FEE80200000098CC5FBB80....00EB02CD2068F4000000E801000000E3")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0/7.0"; } else if (PE.compareEP("F7D84049EB02E00A8D3580......0FB6C2EB019C8D1DF4000000EB013C80")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0/7.0"; } else if (PE.compareEP("F7DB80EABFB92F4067BAEB010168AF..A7BA80EA9D58C1C2092BC18BD768")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0/7.0"; } else if (PE.compareEP("F7D0EB02CD20BEBB741CFBEB02CD20BF3B....FBC1C10333F7EB02CD2068")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0/ASM"; } else if (PE.compareEP("03DEEB01F8B8........EB02CD206817A0B3ABEB01E8590FB6DB680BA1B3")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0"; } else if (PE.compareEP("91EB02CD20BF50BC046F91BED0....6FEB02CD202BF7EB02F0468D1DF400")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0"; } else if (PE.compareEP("C1CE10C1F60F68........2BFA5B23F98D15........E801000000B65E0B")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0"; } else if (PE.compareEP("E8010000000E59E8010000005858BE........EB0261E968F4000000C1C8")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0"; } else if (PE.compareEP("EB014D83F64C68........EB02CD205BEB012368481C2B3AE80200000038")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0"; } else if (PE.compareEP("EB02AB35EB02B5C68D05........C1C211BEF4000000F7DBF7DB0FBE38E8")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0"; } else if (PE.compareEP("EB02CD20..CF....80....00................00")) { sVersion = "1.10"; sOptions = "Microsoft Visual C++ 6.0"; } else if (PE.compareEP("C1F007EB02CD20BE........1BC68D1DF40000000FB606EB02CD208A160F")) { sVersion = "1.20"; sOptions = "Borland C++"; } else if (PE.compareEP("0FBEC1EB010E8D35C3BEB622F7D16843....22EB02B5155FC1F11533F780")) { sVersion = "1.20"; sOptions = "Borland Delphi/Borland C++"; } else if (PE.compareEP("0FB6D0E8010000000C5AB8........EB0200DE8D35F4000000F7D2EB020E")) { sVersion = "1.20"; sOptions = "Borland Delphi/Microsoft Visual C++"; } else if (PE.compareEP("33C22CFB8D3D7E45B480E8020000008A45586802..8C7FEB02CD205E80C9")) { sVersion = "1.20"; sOptions = "MASM32/TASM32"; } else if (PE.compareEP("EB02CD20EB01918D35........33C26883937E7D0CA45B23C36877937E7D")) { sVersion = "1.20"; sOptions = "Microsoft Visual C++ 6.0/7.0"; } else if (PE.compareEP("C1E006EB02CD20EB0127EB0124BE........49EB01998D1DF4000000EB01")) { sVersion = "1.20"; sOptions = "Microsoft Visual C++ 6.0"; } else if (PE.compareEP("BB........BF........BE........53BB........B280A4B680FFD373F9")) { sVersion = "1.31"; } else if (PE.compareEP("BE........AD93AD97AD5696B280A4B680FF1373")) { sVersion = "1.33"; } else if (PE.compareEP("BE........AD97AD569683CD..EB")) { sVersion = "1.3.3"; } else if (PE.compareEP("8725........619455A4B6..FF13")) { sVersion = "2.0"; } bDetected = bDetected || Boolean(sVersion); return result(); } ================================================ FILE: db/PE/packer_Fatpack.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/Fatmike-GH/Fatpack meta("packer", "Fatpack"); function detect() { if (!PE.isNet() && PE.is64() && PE.isTLSPresent()) { if (PE.getNumberOfImports() === 1 && PE.isImportPositionHashPresent(0, 0x74244911)) { bDetected = true; if (PE.getNumberOfSections() === 6 && PE.getNumberOfResources() > 0) { sOptions = "resources payload"; if (!PE.isResourceNamePresent("FPACK")) { sOptions = sOptions.append("modified"); } } else if (PE.getNumberOfSections() === 5) { sOptions = "section payload"; if (PE.section[PE.nLastSection].Name !== ".fpack ") { sOptions = sOptions.append("modified"); } } else { sVersion = "custom"; } } } return result(); } ================================================ FILE: db/PE/packer_HTML_executable.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "HTML Executable"); function detect() { if (PE.compareEP("558bec83c4..b8........e8$$$$$$$$538bd833c0a3........6a..e8........a3")) { if (PE.compareOverlay("'GHE32'")) { bDetected = true; } } else if (PE.compareEP("558becb9........6a..6a..4975..535657b8........e8$$$$$$$$538bd833c0a3........6a..e8........a3")) { if (PE.compareOverlay("'HEEG'")) { bDetected = true; } } sLang = "HTML"; return result(); } ================================================ FILE: db/PE/packer_JDPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "JDPack"); function detect() { if (PE.compareEP("60E8000000005D8BD581ED........2B95........81EA06......8995........83BD")) { sVersion = "1.01"; bDetected = true; } else if (PE.compareEP("558BEC6AFF68........68........64A1000000005064892500000000......E801000000")) { sVersion = "2.00"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_KByS.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "KByS"); function detect() { if (PE.compareEP("60E8000000005E83EE0A8B0603C28B08894EF383EE0F56528BF0ADAD03C28BD86A04BF00100000")) { sVersion = "0.28b"; bDetected = true; } else if (PE.compareEP("68........E801000000C3C3608B7424248B7C2428FCB28033DBA4")) { sVersion = "0.28"; bDetected = true; } else if (PE.compareEP("B8........BA........03C2FFE0........60E800000000")) { sVersion = "0.28"; bDetected = true; } else if (PE.compareEP("68........90b8........c3608b7424..8b7c24")) { sVersion = "0.28b"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_MEW.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "MEW"); function detect() { if (PE.compareEP("33C0e9$$$$$$$$be........ac91ad95ad92ad515687f297fcb2..33dba4b3..ff55")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("E9........000000020000000C")) { sVersion = "SE 1.0"; bDetected = true; } else if (PE.compareEP("E9......FF0C")) { sVersion = "SE 1.1-1.2"; bDetected = true; } else if (PE.compareEP("e9$$$$$$$$be........8bdeadad50ad97b2")) { sVersion = "SE 1.1-1.2"; bDetected = true; } else if (PE.compareEP("BE5B00....AD91AD9353AD96565FACC0C0")) { bDetected = true; } else if (PE.compareEP("2BC0E9D090FFFF6AE0E8382B23700EA31C504018186824511007E565F8E8AF7022DD15D8023B558B00EC535756817D0C1060")) { sVersion = "10 1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_MPRESS.2.sg ================================================ // Detect It Easy: detection rule file // Author: ajax, adoxa // History: // 13:37 05.02.2013 create (ajax) // 2014-05-10 rewrite (adoxa) meta("packer", "MPRESS"); function detect() { var nSig = PE.getString(0x2e, 13); switch (nSig) { case "It's .NET EXE": case "Win32 .EXE.\r\n": case "Win64 .EXE.\r\n": case "Win32 .DLL.\r\n": case "Win64 .DLL.\r\n": var nOffset = PE.findString(0x1f0, 16, "v"); if (nOffset != -1) { sVersion = PE.getString(nOffset + 1, 0x1ff - nOffset); } bDetected = true; break; default: sOptions = "modified"; } if (!bDetected && !PE.isNet()) { if (PE.compareEP("575653515255e8$$$$$$$$e8$$$$$$$$5805........8b3003f02bc08bfe66adc1e0..8bc8ad2bc803f18bc8498a4439..74..880431eb")) { sVersion = "0.71-0.75"; bDetected = true; } else if (PE.compareEP("60e8$$$$$$$$e8$$$$$$$$5805........8b3003f02bc08bfe66adc1e0..8bc8ad2bc803f18bc8498a4439..74..880431eb")) { sVersion = "0.77"; bDetected = true; } else if (PE.compareEP("60e8$$$$$$$$5805........8b3003f02bc08bfe66adc1e0..8bc850ad2bc803f18bc857498a4439..74..880431eb")) { sVersion = "0.85-0.97"; bDetected = true; } else if (PE.compareEP("60e8$$$$$$$$5805........8b3003f02bc08bfe66adc1e0..8bc850ad2bc803f18bc85751498a4439..74..880431eb")) { sVersion = "1.27"; bDetected = true; } else if (PE.compareEP("60e8$$$$$$$$5805........8b3003f02bc08bfe66adc1e0..8bc850ad2bc803f18bc85751498a4439..88043175")) { sVersion = "2.01-2.12"; bDetected = true; } if (PE.is64()) { if (PE.compareEP("57565351524150e8$$$$$$$$488d05........488b304803f0482bc0488bfe66adc1e0..488bc8ad2bc84803f18bc8ffc98a4439..74..880431eb")) { sVersion = "0.71-0.92"; bDetected = true; } else if (PE.compareEP("57565351524150488d05........488b304803f0482bc0488bfe66adc1e0..488bc850ad2bc84803f18bc857ffc98a4439..74..880431eb")) { sVersion = "0.97"; bDetected = true; } else if (PE.compareEP("57565351524150488d05........488b304803f0482bc0488bfe66adc1e0..488bc850ad2bc84803f18bc857448bc1ffc98a4439..88043175")) { sVersion = "1.27-2.12"; bDetected = true; } } } return result(); } ================================================ FILE: db/PE/packer_MoleBox.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "MoleBox"); function detect() { if (PE.compareEP("e80000000060e8$$$$$$$$e8$$$$$$$$e8$$$$$$$$558bec83ec..56576a..ff15........8945..68........6a..ff15")) { sVersion = "2.3.3-2.6.4"; bDetected = true; } else if (PE.compareEP("e80000000060e8$$$$$$$$e8$$$$$$$$8b4424..508b4424..50e8$$$$$$$$558bec83ec..5356576a..ff15")) { sVersion = "2.3.3-2.6.4"; bDetected = true; } else if (PE.compareEP("60e8$$$$$$$$e8$$$$$$$$e8$$$$$$$$558bec83ec..56576a..ff15........8945..68........6a..ff15")) { sVersion = "2.0.0-2.3.0"; bDetected = true; } else if (PE.compareEP("eb$$b8........8338..74..50ff70..ff3050830424..e8$$$$$$$$558beca1........53568b75..85c0578bde75..6a..68........68........ff15")) { sVersion = "2.36"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_Mystic_Compressor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Mystic Compressor"); function detect() { if (PE.compareEP("558bec83ec..6a..ff35........6a..ff15........8d55..5268........68........ff15........6a..ff35")) { bDetected = true; } else if (PE.compareEP("558bec83c4..68........ff15........8945..68........ff75..ff15........8945..8d55..526a..68")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_NETZ.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", ".NETZ"); function detect() { if (PE.isNetObjectPresent("NetzStarter") && PE.isSignatureInSectionPresent(0, "00'NetzStarter'00'netz'00")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_NOS_Packer.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "NOS Packer"); function detect() { if (PE.compareEP("50e8000000005b81eb........b9........2bd98bf381eb........8bfb81eb........575156e8........83c4..8bab........8d2c2b4d8a4d..80f9..74..83ed..8bd32b53")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_NTPacker.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://hacking-software-free-download.blogspot.com/2013/02/nt-packer-v21.html meta("packer", "NTPacker"); function detect() { if (PE.compareEP("558BEC83C4E05333C08945E08945E48945E88945ECB8........E8....FFFF33C05568")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("4B 57 69 6E 64 6F 77 73 00 10 55 54 79 70 65 73 00 00 3F 75 6E 74 4D 61 69 6E 46 75 6E 63 74 69 6F 6E 73 00 00 47 75 6E 74 42 79 70 61 73 73 00 00 B7 61 50 4C 69 62 75 00 00 00")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_NTShell.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "NTSHELL"); function detect() { if (PE.compareEP("55e8........5d81ed........eb$$eb$$8d85........8dbd........eb$$8db5........eb$$8bcfeb$$2bc84ffdeb$$33dbeb$$8a07eb$$d2c8eb$$2a....eb$$E8")) { sVersion = "5.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_NakedPacker.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "NakedPacker"); function detect() { if (PE.compareEP("60FC0FB605............7531B8........2B05..............................05........A3........E89A000000A3")) { sVersion = "1.0"; sOptions = "by BigBoote"; bDetected = true; } else if (PE.isSectionNamePresent(".naked1") && PE.compareEP("60")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_NeoLite.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://github.com/russdill/Neo-Executable-Decompressor meta("packer", "NeoLite"); function detect() { if (PE.compareEP("8B4424048D5424FC2305........E8........FF35........50FF25")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("E9$$$$$$$$8B44....2305........E8$$$$$$$$5351525657C8......5081ED........8D..........B8........8B1D")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("E9") && (PE.compareEP("'NeoLite'", 29) || PE.compareEP("'NeoLite'", 33))) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("E9A6000000")) { sVersion = "2.0"; bDetected = true; } else if (PE.compareEP("8B4424042305........50E8........83C404FE05........0BC074")) { sVersion = "2.0"; bDetected = true; } else if (PE.compareEP("e9$$$$$$$$8b4424..8d5424..2e2305........e8........09c074..2eff35")) { sVersion = "1.01"; bDetected = true; } else if (PE.compareEP("e9$$$$$$$$e9$$$$$$$$8b4424..8d5424..2e2305........e8........09c074..2eff35")) { sVersion = "1.01"; bDetected = true; } else if (PE.compareEP("e9$$$$$$$$e9$$$$$$$$8b4424..8d5424..2305........e8........ff35........50ff25")) { bDetected = true; } else if (PE.compareEP("e9$$$$$$$$8b4424..8d5424..2305........e8........ff35........50ff25")) { sVersion = "2.0"; bDetected = true; } else if (PE.compareEP("e9$$$$$$$$8b4424..2305........e8........fe05........ffe0")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_NodeJS_Nexe.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://github.com/nexe/nexe meta("packer", "nexe"); function detect() { if (!PE.isExportFunctionPresent("napi_wrap")) return; // Has overlay at all bDetected = PE.isOverlayPresent() && PE.getOverlaySize() >= 0x100 && PE.findString(PE.section[1].FileOffset, PE.section[1].FileSize, "nexe~~sentinel") !== -1; sLang = "JavaScript"; return result(); } ================================================ FILE: db/PE/packer_NodeJS_Pkg.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://github.com/vercel/pkg meta("packer", "pkg"); function detect() { if (!PE.isExportFunctionPresent("napi_wrap")) return; // Has overlay at all bDetected = PE.isOverlayPresent() && PE.getOverlaySize() >= 0x100 && PE.findString(PE.section[1].FileOffset, PE.section[1].FileSize, "pkg/prelude/bootstrap.js") != -1; sLang = "JavaScript"; return result(); } ================================================ FILE: db/PE/packer_NsPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "NsPack"); function getNSPackVersion() { if (PE.section[0].FileSize > 0 && PE.section[0].FileOffset < 0x200) { sVersion = "2.X"; } else if (PE.section[0].FileSize == 0 && PE.section[0].FileOffset >= 0x200) { sVersion = "3.X"; } } function detect() { var nNumberOfFunctions = PE.getNumberOfImportThunks(0); if (nNumberOfFunctions == 6 && !PE.getSizeOfCode()) { if (PE.getImportFunctionName(0, 0) == "LoadLibraryA" && PE.getImportFunctionName(0, 1) == "GetProcAddress" && PE.getImportFunctionName(0, 2) == "VirtualProtect" && PE.getImportFunctionName(0, 3) == "VirtualAlloc" && PE.getImportFunctionName(0, 4) == "VirtualFree" && PE.getImportFunctionName(0, 5) == "ExitProcess") { getNSPackVersion(); bDetected = true; } } if (!bDetected) { if (PE.isLibraryPresent("mscoree.dll") && PE.getImportLibraryName(0) == "KERNEL32.dll" && PE.getImportFunctionName(0, nNumberOfFunctions - 1) == "GetSystemInfo") { getNSPackVersion(); sOptions = ".NET"; bDetected = true; } else if (PE.isImportPositionHashPresent(0, 0x86111e49) && PE.isNetObjectPresent("nsnet")) { sVersion = "3.X"; bDetected = true; } else if (PE.compareEP("9c60e8..........83....8d8d........8039..0f..........c601..8bc5")) { sVersion = "3.7"; bDetected = true; } else if (PE.compareEP("9c60e8........5d83ed..8d9d........8a033c..74..8d9d........8a03")) { sVersion = "3.1"; bDetected = true; } else if (PE.compareEP("9c60e8........5d83ed..8d85........8338..0f..........c700........8bd5")) { sVersion = "3.6"; bDetected = true; } else if (PE.compareEP("9c60e8........5d83ed..8d85........8038..0f..........c600..8bd5")) { sVersion = "3.5"; bDetected = true; } else if (PE.compareEP("9c60e8........5db8........2be88db5........8a063c..74..8bf5")) { sVersion = "2.9"; bDetected = true; } else if (PE.compareEP("e9$$$$$$$$e9$$$$$$$$e9$$$$$$$$9c60e8........5db8........2be88db5........8b06")) { sVersion = "2.3-2.9"; bDetected = true; } else if (PE.compareEP("9c60e8........5d83ed..8d85........8038..74..8d85........8038..0f84........c600..8bd5")) { sVersion = "3.3"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/packer_Nuitka.2.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research (koffidev365supp@gmail.com) // Rewritten by DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/Nuitka/Nuitka meta("packer", "Nuitka"); function detect() { var dataSection = PE.section[".rdata"] if (dataSection && !PE.isRichSignaturePresent()) { var dataSectionOffset = dataSection.FileOffset, dataSectionSize = dataSection.FileSize; if (PE.findString(dataSectionOffset, dataSectionSize, "__nuitka_version__") != -1) { bDetected = true; } else if (PE.findString(dataSectionOffset, dataSectionSize, "NUITKA_ONEFILE_PARENT") != -1) { sOptions = "OneFile"; bDetected = true; } } sLang = "Python"; return result(); } ================================================ FILE: db/PE/packer_PACKWIN.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "PACKWIN"); function detect() { if (PE.compareEP("8CC0FA8ED0BC....FB060E1F2E........8BF14E8BFE8CDB2E........8EC3FDF3A453B8....50CB")) { sVersion = "1.01p"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_PE-PACK.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "PE-PACK"); function detect() { if (PE.compareEP("60E8000000005D83ed..80bd..........0f84........c685..........8bc52b..........89..........89")) { sVersion = "0.99"; bDetected = true; } else if (PE.compareEP("74..E9$$$$$$$$60E8........5D83ED..80............0F84........C685..........8BC52B..........89")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_PECompact.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "PECompact"); function detect() { if (PE.compareEP("EB0668........C39C60BD........B902......B0908DBD........F3AA01AD........FFB5")) { sVersion = "0.90-0.92"; bDetected = true; } else if (PE.compareEP("EB0668........C39C60E8........5D555881ED........2B85........0185........50B902")) { sVersion = "0.94"; bDetected = true; } else if (PE.compareEP("EB$$9C60E8$$$$$$$$8BC483....938BE38B....81EB........87DD8B85........0185........66C785")) { sVersion = "1.68-1.84"; bDetected = true; } else if (PE.compareEP("eb$$9c60e8$$$$$$$$83c4..8b4424..50505b5d81ed........8b85........0185........66c785")) { sVersion = "1.00-1.3X"; bDetected = true; } else if (PE.compareEP("eb$$9c60e8$$$$$$$$5d555b81ed........8b85........0185........66c785")) { sVersion = "1.00-1.3X"; bDetected = true; } else if (PE.compareEP("33C08BC483C004938BE38B5BFC81")) { sVersion = "1.84"; bDetected = true; } else if (PE.compareEP("B8........05........5064FF350000000064892500000000CC90909090")) { sVersion = "2.0 beta"; bDetected = true; } else if (PE.compareEP("B8........80002840")) { sVersion = "2.X beta version"; bDetected = true; } else if (PE.compareEP("B8........5064FF35000000006489250000000033C08908'PECompact2'00")) { sVersion = "3.02.2 or 3.03.21 beta"; bDetected = true; } else if (PE.compareEP("B8........5064FF..........6489..........33C08908")) { sVersion = "2.20-3.02"; bDetected = true; } else if (PE.compareEP("B8........5064FF35000000006489250000000033C08908'PEC'")) { sVersion = "2.X"; if (PE.compareEP("32", 27)) { sOptions = "Slim Loader"; } bDetected = true; } else if (PE.compareEP("B8........5553515756528D98........8B5318528BE86A406800100000FF7304")) { sVersion = "2.53-2.76"; bDetected = true; } else if (PE.compareEP("B8........5064ff35........648925........33c0890800000000")) { sVersion = "2.78a-3.11"; bDetected = true; } else if (PE.compareEP("b8########b8........5553515756528d98")) { bDetected = true; } if (bDetected) { var nOffset = PE.findString(0, 0x600, "PEC2"); if (nOffset != -1) { var nBuildNumber = PE.readDword(nOffset + 4); switch (nBuildNumber) { case 20206: sVersion = "2.70"; break; case 20240: sVersion = "2.78a"; break; case 20243: sVersion = "2.79b1"; break; case 20245: sVersion = "2.79bB"; break; case 20247: sVersion = "2.79bD"; break; case 20252: sVersion = "2.80b1"; break; case 20256: sVersion = "2.80b5"; break; case 20261: sVersion = "2.82"; break; case 20285: sVersion = "2.92.0"; break; case 20288: sVersion = "2.93b3"; break; case 20294: sVersion = "2.96.2"; break; case 20295: sVersion = "2.97b1"; break; case 20296: sVersion = "2.98"; break; case 20300: sVersion = "2.98.04"; break; case 20301: sVersion = "2.98.05"; break; case 20302: sVersion = "2.98.06"; break; case 20303: sVersion = "2.99b"; break; case 20308: sVersion = "3.00.2"; break; case 20312: sVersion = "3.01.3"; break; case 20317: sVersion = "3.02.1"; break; case 20318: sVersion = "3.02.2"; break; case 20323: sVersion = "3.03.5b"; break; case 20327: sVersion = "3.03.9b"; break; case 20329: sVersion = "3.03.10b"; break; case 20334: sVersion = "3.03.12b"; break; case 20342: sVersion = "3.03.18b"; break; case 20343: sVersion = "3.03.19b"; break; case 20344: sVersion = "3.03.20b"; break; case 20345: sVersion = "3.03.21b"; break; case 20348: sVersion = "3.03.23b"; break; default: if (nBuildNumber) { if (X.isVerbose()) sOptions = "unknown magic: " + nBuildNumber } } } } else if (PE.isNet()) { if (PE.isSignaturePresent(0, 512, "00'PEC2XO'000000000000..0000..'.rsrc'00")) { sVersion = "2.X-3.X"; sOptions = ".NET"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "'mscoree.dll'000000'CorBindToRuntimeEx'")) { sVersion = "2.X-3.X"; sOptions = ".NET"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/packer_PKLITE.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "PKLITE32"); function detect() { if (PE.compareEP("68........68........68........e8$$$$$$$$558beca1")) { sVersion = "1.1"; bDetected = true; } else if (PE.compareEP("68........68........B8........2b4424..50e8$$$$$$$$558beca1")) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_Pack_Master.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "Pack Master"); function detect() { if (PE.compareEP("60E801000000E883C404E801000000E95D81ED........E804020000E8EB08EB02CD20FF24249A66BE4746")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_Packanoid.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "Packanoid"); function detect() { if (PE.compareEP("BF........BE........E89D000000B8........8B308B7804BB")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_Packman.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "Packman"); function detect() { if (PE.compareEP("0F85..FFFFFF8DB3........EB3D8B460C03C350FF5500568B36")) { sVersion = "0.0.0.1"; bDetected = true; } else if (PE.compareEP("60E800000000588D..........8D..........8D")) { sVersion = "0.0.0.1"; bDetected = true; } else if (PE.compareEP("60E8000000005B8D5BC6011B8B138D73146A08590116AD4975FA")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_PeX.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "PeX"); function detect() { if (PE.compareEP("E9$$$$$$$$60e8$$$$$$$$83c404e8")) { sVersion = "0.99"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_Petite.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "Petite"); function detect() { if (PE.compareEP("9C60E8CA......03..04..05..06..07..08")) { sVersion = "1.2"; bDetected = true; } else if (PE.compareEP("669C60E8$$$$$$$$582c..508bc88bd081c1........81c2........89208be15081")) { sVersion = "1.2"; bDetected = true; } else if (PE.compareEP("669C60508D8800F000008D90041600008BDC8BE1")) { sVersion = "1.3"; bDetected = true; } /*else if (PE.compareEP("B8........669C60508BD8030068........6a..ff....8bcc8da0")) { sVersion = "1.4"; bDetected = true; }*/ else if (PE.compareEP("669C60508BD803006854BC00006A00FF50148BCC")) { sVersion = "1.4"; bDetected = true; } else if (PE.compareEP("64FF350000000064892500000000669C60508BD8")) { sVersion = "2.1-2.3"; bDetected = true; } else if (PE.compareEP("B8........669C60508D..........68........83")) { bDetected = true; } else if (PE.compareEP("B8........669C60508D88........8d90........8bdc8be168")) { sVersion = "1.3, 1.3a"; bDetected = true; } /*else if (PE.compareEP("B8........669C60508BD803..6854BC....6A..FF50188BCC8DA054BC")) { sVersion = "2.0"; bDetected = true; }*/ else if (PE.compareEP("B8........6A..68........64FF35........648925........669C6050")) { sVersion = "2.1"; bDetected = true; } else if (PE.compareEP("B8........68........64FF35........648925........669C6050")) { sVersion = "2.2"; bDetected = true; } else if (PE.compareEP("b8........669c605033db8d90........68........833a..0f84........8b0a")) { sVersion = "2.2"; bDetected = true; } else if (PE.compareEP("b8........669c60508bd803..68........6a..ff50")) { sVersion = "1.4-2.2"; bDetected = true; } else if (PE.compareEP("B8........608DA8........68........6A40680030000068........6A00FF90........8944241CBB........8DB5........8BF850")) { sVersion = "2.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_PyInstaller.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("packer", "PyInstaller"); // python = 💩 includeScript("python"); function detect() { if (PE.isNet()) return; // Doesn't support .NET files const overlaySignatureDetected = PE.compareOverlay("78da"); if (overlaySignatureDetected) { const rdata = PE.section[".rdata"]; if (rdata && PE.findString( rdata.FileOffset, rdata.FileSize, "PyInstaller: FormatMessageW failed." ) != -1) { bDetected = true; } } for (var i = 0; i < PE.getNumberOfResources() && !bDetected; i++) { const resSize = PE.getResourceSizeByNumber(i); if (( resSize == 0x909b && // black PE.calculateMD5(PE.getResourceOffsetByNumber(i), resSize) == "20d36c0a435caad0ae75d3e5f474650c" ) || ( resSize == 0x952c && // white PE.calculateMD5(PE.getResourceOffsetByNumber(i), resSize) == "f6fbada22d6a6c07ef8fdaa504f117d5" )) { if (!overlaySignatureDetected) { sOptions = "custom"; } else { sOptions = PE.section[".rdata"] ? "modified" : "packed"; } bDetected = true; } } if (!bDetected && overlaySignatureDetected && PE.findSignature( PE.getOverlayOffset(), PE.getOverlaySize(), "4d45490c0b0a0b0e" ) != -1) { sOptions = "overlay"; bDetected = true; } var version; if (bDetected) { for (var i = 0; i < 2 && !version; i++) { var sign = PE.findSignature( PE.getOverlayOffset(), PE.getOverlaySize(), "70 79 74 68 6F 6E'" + [2, 3][i] + "'"); if (sign && PE.findString(sign, 15, ".") != -1) { version = getPythonVersionByDll(PE.getString(sign - 1, 15)); } } } sLang = "Python"; sLangVersion = version; return result(); } ================================================ FILE: db/PE/packer_QuestPowerGUI.2.sg ================================================ // Detect It Easy: detection rule file // Author: Arjan Onwezen // Rewritten by: DosX meta("packer", "Quest PowerGUI"); function detect() { bDetected = PE.isNetObjectPresent("Quest.PowerGUI.ScriptRunner"); sOptions = (bDetected && !PE.isConsole()) ? "Hide console" : ""; sLang = "PowerShell"; return result(); } ================================================ FILE: db/PE/packer_RLPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "RLPack"); function detect() { // DLL var nEP = PE.compareEP("807C2408010F85") ? 11 : 0; if (PE.compareEP("608BDDE8000000005D9532C095899D80000000B8", nEP)) { sVersion = "0.7.3 beta"; bDetected = true; } else if (PE.compareEP("60E8000000008D6424048B6C24FC8DB5........8D9D........33FF", nEP)) { sVersion = "1.0 beta"; bDetected = true; } else if (PE.compareEP("60E8000000008B2C2483C404", nEP)) { if (PE.compareEP("33FFEB", nEP + 24)) { sVersion = "1.11-1.14"; sOptions = "aPlib"; } else if (PE.compareEP("33FF6A", nEP + 24)) { sVersion = "1.11-1.14"; sOptions = "LZMA"; } else if (PE.compareEP("0000EB", nEP + 29)) { sVersion = "1.15-1.18"; sOptions = "aPlib"; } else if (PE.compareEP("00006A", nEP + 29)) { sVersion = "1.15-1.18"; sOptions = "LZMA"; } else if (PE.compareEP("33FFE8", nEP + 55)) { sVersion = "1.19-1.20"; sOptions = "aPlib"; } else if (PE.compareEP("33FF6A", nEP + 55)) { sVersion = "1.19-1.20"; sOptions = "LZMA"; } else if (PE.compareEP("EB0FFF", nEP + 56)) { sVersion = "1.17 Full Edition"; sOptions = "aPLib"; } else if (PE.compareEP("6A4068", nEP + 51)) { sVersion = "1.17 Full Edition"; sOptions = "LZMA"; } else if (PE.compareEP("33ffe8", nEP + 60)) { sVersion = "1.21"; sOptions = "aPLib"; } bDetected = true; } else if (PE.getNumberOfImports() === 1 && PE.compareEP("60") && PE.isSectionNamePresent(".RLPack")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_SC_Pack.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "SC Pack"); function detect() { if (PE.compareEP("558bec83c4..5356578d7d..50e8........5825........05........8945")) { sVersion = "0.2"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_SecuPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "SecuPack"); function detect() { if (PE.compareEP("558BEC83C4F053565733C08945F0B8CC3A4000E8E0FCFFFF33C05568EA3C400064FF306489206A0068800000006A036A006A")) { sVersion = "1.5"; sOptions = "Soft Stuttgart"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_SerGreen_Appacker.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "SerGreen Appacker"); function detect() { if (PE.isNet() && PE.compareOverlay("''")) { sVersion = "1.XX"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_SimplePackerByEronana.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/Eronana/packer meta("packer", "Eronana"); function detect() { if (PE.isSectionNamePresent(".packer") && PE.compareEP("60 68 00 ?? ?? ?? E8 17 FC FF FF 89 45 FC 61 FF 65 FC 00 00 00 00 00 00 00 00 00")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_Simple_Pack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "Simple Pack"); function detect() { if (PE.compareEP("60e8$$$$$$$$5b8d5b..6a..ff93........89c58b7d..8d74....8dbe........8b86........09c075..8d83........506a..68........55ff93")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("60e8$$$$$$$$5b8d5b..bd........8b7d..8d74....8dbe........0fb776..4e8b47..09c074..0fb747..09c074..6a..68........ff77..6a..ff93")) { sVersion = "1.2X"; bDetected = true; } else if ((PE.compareEP("6050") || PE.compareEP("55")) && PE.isSectionNamePresent(".spack")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_Software_Compress.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "Software Compress"); function detect() { if (PE.compareEP("E9BE000000608B7424248B7C2428FCB28033DBA4B302E86D0000")) { sVersion = "1.2"; bDetected = true; } else if (PE.compareEP("E800000000812C24AA1A41005DE800000000832C246E8B855D1A4100")) { sVersion = "1.4 LITE"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_Squishy.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Made by KDSS-Research meta("packer", "Squishy"); function detect() { if (PE.isSectionNamePresent("logicoma")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_TPP_Pack.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "TPP Pack"); function detect() { if (PE.compareEP("e8$$$$$$$$5d81ed........60e8$$$$$$$$5883c0..ffe0")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_TheArk.2.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research meta("packer", "TheArk"); function detect() { if (PE.isSectionNamePresent("adr") && PE.isSectionNamePresent("have") && PE.isSectionNamePresent("30cm") && PE.isSectionNamePresent(".tw")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_UPX.2.sg ================================================ // Detect It Easy: detection rule file // Authors: horsicq, ajax, adoxa, DosX meta("packer", "UPX"); function isPatchedUPX() { var isDetected = 0, nNumberOfFunctions = PE.getNumberOfImportThunks(0); if (nNumberOfFunctions > 1 && nNumberOfFunctions < 7) { if (PE.getSizeOfCode() && PE.getSizeOfUninitializedData() && PE.section.length > 2 && PE.section[0].FileSize == 0) { var funcCounter = 0; if (PE.getImportFunctionName(0, 0) == "LoadLibraryA") { funcCounter++; } if (PE.getImportFunctionName(0, 1) == "GetProcAddress") { funcCounter++; } if (nNumberOfFunctions == 4) { if (PE.getImportFunctionName(0, 2) == "VirtualProtect") { funcCounter++; } if (PE.getImportFunctionName(0, 3) == "ExitProcess") { funcCounter++; } } if (nNumberOfFunctions >= 3 && funcCounter < 4) { if (PE.getImportFunctionName(0, 2) == "ExitProcess") { funcCounter++; } else if (PE.isDll()) { if (PE.getImportFunctionName(0, 2) == "VirtualProtect") { funcCounter++; } } } if (nNumberOfFunctions == 6) { if (PE.getImportFunctionName(0, 2) == "VirtualProtect") { funcCounter++; } if (PE.getImportFunctionName(0, 3) == "VirtualAlloc") { funcCounter++; } if (PE.getImportFunctionName(0, 4) == "VirtualFree") { funcCounter++; } if (PE.getImportFunctionName(0, 5) == "ExitProcess") { funcCounter++; } } if (funcCounter == 2 && nNumberOfFunctions == 2 || funcCounter == 3 && nNumberOfFunctions >= 3 || funcCounter == 4 && nNumberOfFunctions == 4 || funcCounter == 6 && nNumberOfFunctions == 6) { isDetected = true; } if (isDetected) { if (PE.getAddressOfEntryPoint() == 0x00001018) { // (Win)Upack isDetected = false; } } } } return isDetected; } function getUPXOptions(nOffset) { var nMethod = PE.readByte(nOffset + 2), nLevel = PE.readByte(nOffset + 3), sCompression = ""; switch (nMethod) // From http://sourceforge.net/p/upx/code/ci/default/tree/src/conf.h { case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: sCompression = "NRV"; break; case 14: sCompression = "LZMA"; break; case 15: sCompression = "zlib"; break; } if (sCompression) { sOptions = sOptions.append(sCompression); if (nLevel == 8) { sOptions = sOptions.append("best"); } else { sOptions = sOptions.append("brute"); } } } function getUPXVersion() { var nOffset1 = PE.findString(0, 1024, "$Id: UPX "), nOffset2 = PE.findString(0, 1024, "UPX!"); if (nOffset2 != -1) { getUPXOptions(nOffset2 + 4); } if (nOffset1 != -1) { sVersion = PE.getString(nOffset1 + 9, 4); } if (!sVersion && nOffset2 != -1) { sVersion = PE.getString(nOffset2 - 5, 4); } if (sVersion) { if (+sVersion.toString() != sVersion) { if (PE.is64()) { sVersion = "3.91+"; } else { sVersion = "0.89+"; } sOptions = "modified"; } } } function detect() { if (PE.isNet()) return; // Doesn't support .NET if (!PE.is64()) { if (PE.compareEP("60BE........8DBE........57", PE.compareEP("807C") ? 27 : 0)) { bDetected = true; } else if (PE.compareEP("60e8000000005883e8..508db8........578db0........83cd..31db9090909001db75")) { sVersion = "0.70"; bDetected = true; } } else { if (PE.compareEP("53565755488D35........488DBE........57", PE.compareEP("4889") ? 24 : 0)) { bDetected = true; } } getUPXVersion(); if (sVersion) { bDetected = true; } if (!bDetected) { bDetected = isPatchedUPX(); } else { if (!sVersion) { if (PE.is64()) { sVersion = "3.91+"; // UPX 3.91 was the first version with a PE+ support. } sOptions = "modified"; } else if (!PE.isSectionNamePresent("UPX0")) { sOptions = sOptions.append("modified"); } } return result(); } ================================================ FILE: db/PE/packer_VPacker.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "VPacker"); function detect() { if (PE.compareEP("60e8$$$$$$$$558bec83c4..5356578b45..83c0..8b008945..837d....75..e8........8945..e8........8b10")) { sVersion = "0.02.10"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_VbsToExeConverter.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("packer", "Vbs To Exe Converter"); function detect() { if (PE.isImportPositionHashPresent(0, 0x182aac68) && PE.compareEP(PE.is64() ? "48 83 EC .. 49 C7 C0 .. .. .. .. 48 31 D2 48 B9 .. .. .. .. .. .. .. .. E8 .. .. .. .. 48 31 C9 E8 .. .. .. .. 48 89 05 .. .. .. .." : // 64 bit "68 .. .. .. .. 68 .. .. .. .. 68 .. .. .. .. E8 .. .. .. .. 83 C4 .. 68 .. .. .. .. E8 .. .. .. .. A3 .. .. .. ..")) { // 32 bit bDetected = true; } sLang = "VBScript"; return result(); } ================================================ FILE: db/PE/packer_WWPack32.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Enhanced by: DosX // https://www.wwpack32.venti.pl/ meta("packer", "WWPack32"); function detect() { if (PE.compareEP("53558be833dbeb$$e8000000005d3e807d....0f84........6083ed..33c033c9")) { sVersion = "1.XX"; bDetected = true; } else if (PE.isDll() && PE.section[PE.nLastSection].Name === ".WWP32") { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_WinUpack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "(Win)Upack"); function detect() { if (PE.compareEP("BE........AD8BF895A533C033")) { sVersion = "0.1X/0.20/0.21/0.24 beta"; } else if (PE.compareEP("BE........AD8BF86A0495A533C0AB")) { sVersion = "0.21 beta"; } else if (PE.compareEP("BE........AD8BF895AD91F3A5ADB5")) { sVersion = "0.24-0.27 beta/0.28 alpha"; } else if (PE.compareEP("BE........AD50FF7634EB7C4801")) { switch (PE.readByte(PE.getEntryPointOffset() + 62)) { case 0x37: sVersion = "0.37 beta"; break; case 0x38: sVersion = "0.38 beta"; break; case 0x39: sVersion = "0.39 final"; break; case 0x3A: sVersion = "0.399"; break; } } else if (PE.compareEP("6A07BE........AD8BF85995F3A5")) { sVersion = "0.22/0.23 beta"; } else if (PE.compareEP("BE........AD50..AD91F3A5")) { sVersion = "0.32 beta"; sOptions = "Patch"; } else if (PE.compareEP("BE........AD50..AD91..F3A5")) { sVersion = "0.32 beta"; } else if (PE.compareEP("BE........AD50....AD91F3A5")) { sVersion = "0.32 beta"; } else if (PE.compareEP("BE........AD50AD5066BE....6A..BF")) { sVersion = "0.34"; } else if (PE.compareEP("BE........FF36E9C3000000")) { sVersion = "0.36 beta"; } else if (PE.compareEP("60E809000000..................33C95E870E")) { sOptions = "Alt stub"; } else if (PE.compare("4D5A4C6F61644C696272617279410000504500004C0102004B45524E454C3332")) { sVersion = "0.33"; } else if (PE.compare("4D5A4B45524E454C33322E444C4C00004C6F61644C696272617279410000000047657450726F63416464726573730000")) { sVersion = "0.32"; } else if (PE.compare("4D5A4B45524E454C33322E444C4C00005045")) { bDetected = true; } bDetected = bDetected || Boolean(sVersion) || Boolean(sOptions); return result(); } ================================================ FILE: db/PE/packer_Windows_PE_Packer_by_Chenzs108.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/czs108/Windows-PE-Packer meta("packer", "Windows PE Packer by Chenzs108"); function detect() { if (!PE.is64() && !PE.isNet() && PE.getNumberOfSections() > 2 && PE.getNumberOfImports() === 1 && PE.isImportPositionHashPresent(0, 0x1272f45b)) { if (PE.compareEP("60E8E10000002E0002000000000000")) { var shellSectionByIndex = PE.section[PE.nLastSection]; if (shellSectionByIndex.Characteristics & 0xe0000040) { // R/W/X bDetected = true; if (shellSectionByIndex.Name !== ".shell") { sOptions = "modified sections"; } if (PE.getImportLibraryName(0) !== "Kernel32.dll") { sOptions += (sOptions ? " and " : "modified ") + "IAT"; } } } } return result(); } ================================================ FILE: db/PE/packer_XComp.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "XComp"); function detect() { if (PE.getNumberOfImports() == 1 && PE.isImportPositionHashPresent(0, 0x4bc52e77)) { // GetProcAddress, LoadLibraryA, VirtualAlloc, VirtualFree, VirtualProtect if (PE.compareEP("68........9C60E8$$$$$$$$E8$$$$$$$$5B5D833B00")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/packer_XPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "XPack"); function detect() { if (PE.getNumberOfImports() == 1 && PE.isImportPositionHashPresent(0, 0x6c170ab3)) { // GetProcAddress, LoadLibraryA, VirtualProtect if (PE.compareEP("68........9C60E8$$$$$$$$E8$$$$$$$$5B5D833B00")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/packer_aPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "aPack"); function detect() { if (PE.compareEP("1E068CC88ED8......8EC050BE....33FFFCB6")) { sVersion = "0.62"; bDetected = true; } else if (PE.compareEP("1E068CCBBA....03DA8D......FC33F633FF484B8EC08EDB")) { sVersion = "0.82"; bDetected = true; } else if (PE.compareEP("1E068CC88ED805....8EC050BE....33FFFCB2..BD....33C950A4BB....3BF376")) { sVersion = "0.98"; sOptions = "-m"; bDetected = true; } else if (PE.compareEP("8CCBBA....03DAFC33F633FF4B8EDB8D......8EC0B9....F3A54A75")) { sVersion = "0.98b"; bDetected = true; } else if (PE.compareEP("93071F05....8ED0BC....EA")) { // exe sVersion = "0.98b"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_dePACK.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "dePack"); function detect() { if (PE.compareEP("eb$$6068........68........e8$$$$$$$$558bec60558b75..8b7d..e8........eb..8b1c24c3")) { bDetected = true; } else if (PE.compareEP("eb$$6090eb$$61b8........ffe0")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_ezip.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "ezip"); function detect() { if (PE.isOverlayPresent()) { if (PE.compareEP("E919320000E97C2A0000E919240000E9FF230000E91E2E0000E9882E0000E92C250000E9AE150000E9772B0000E987020000E9702E")) { bDetected = true; sVersion = "1.X"; } } return result(); } ================================================ FILE: db/PE/packer_hXOR.2.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research // https://github.com/akuafif/hXOR-Packer meta("packer", "hXOR"); function detect() { if (PE.compareEP("5589e583ec18c7042402000000ff1538424100e8f8feffff908db426000000005589e583ec18c7042401000000ff1538424100e8d8feffff908db426000000005589e55383ec148b45088b008b003d")) { sVersion = "0.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_hmimys_PE-Pack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "hmimys PE-Pack"); function detect() { if (PE.compareEP("E8000000005D83ED056A00FF95E10E00008985850E00008B583C03D881C3F8000000")) { sVersion = "0.1"; bDetected = true; } else if (PE.compareEP("5E83C664AD50AD5083EE6CAD50AD50AD50AD50AD50E8E707")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("E8$$$$$$$$5EAD50AD5097AD50AD50AD50E8C0010000AD50AD9387DEB9")) { sVersion = "1.2"; bDetected = true; } else if (PE.isSectionNamePresent("hmimys")) { if (PE.compareEP("E8")) { sVersion = "1.3"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/packer_kkrunchy.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "kkrunchy"); function detect() { if (PE.compareEP("BD........C745..........B8........89450489455450C74510")) { sVersion = "0.23 alpha 2"; bDetected = true; } else if (PE.compareEP("BD........C745..........FF4D08C6450C058D7D1431C0B40489C1F3ABBF")) { sVersion = "0.2X"; bDetected = true; } else if (PE.compareEP("bd........c7............fcff4d0831d28d7d30be")) { bDetected = true; } else if (PE.compare("'MZfarbrauschPE'")) { bDetected = true; } if (bDetected && !PE.isSectionNamePresent("kkrunchy")) { sOptions = "modified"; } return result(); } ================================================ FILE: db/PE/packer_mPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "mPack"); function detect() { if (PE.compareEP("E90000000060E8140000005D81ED000000006A45E8A30000006800000000E85861E8AA0000004E")) { sVersion = "0.0.2"; bDetected = true; } else if (PE.compareEP("558BEC83....33C08945F0B8........E867C4FFFF33C05568........64FF306489208D55F033C0E893C8FFFF")) { sVersion = "0.0.3"; bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_mkfPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "mkfPack"); function detect() { if (PE.compareEP("e8$$$$$$$$5b81eb........8b93........536a..68........526a..ff93........5b8bf08bbb........03fb5657e8........83c4..8d93........5253ffe6")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_nPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "nPack"); function detect() { if (PE.compareEP("833D..........7505E901000000C3E841000000B8........2B05........A3........E85E000000E8")) { switch (PE.getEntryPointSignature(42, 7)) { case "E0010000E8EC06": sVersion = "1.1.150.2006.Beta"; break; case "EC010000E8F806": sVersion = "1.1.200.2006.Beta"; break; default: sVersion = "1.1.XXX"; } bDetected = true; } else if (PE.compareEP("833D..........7505E901000000C3E846000000E873000000B8........2B05........A3........E89C000000E8")) { switch (PE.readDword(PE.getEntryPointOffset() + 47)) { case 0x204: sVersion = "1.1.250.2006.Beta"; break; case 0x22D: sVersion = "1.1.300.2006.Beta"; break; case 0x248: sVersion = "1.1.800.2008.Beta"; break; default: sVersion = "1.1.XXX"; } bDetected = true; } else if (PE.compareEP("833C24..0F84........8D6424") && PE.isImportPositionHashPresent(0, 0xba8bf4be)) { bDetected = true; } if (bDetected && !PE.isSectionNamePresent(".nPack")) { sOptions = "modified"; } return result(); } ================================================ FILE: db/PE/packer_netshrink.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", ".netshrink"); function detect() { if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "20fe2b136028........13..203b28136028........13..11..11..161f4028........26")) { sVersion = "2.01 Demo"; sOptions = "Encrypted/Password mode"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "20ad65133228........13..206866133228........13..11..11..161f4028........26")) { sVersion = "2.01 Demo"; sOptions = "Encrypted/Password mode"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "20b9059f0728........13..2066059f0728........13..11..11..161f4028........26")) { sVersion = "2.01 Demo"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "20e6ea19be28........13..2039ea19be28........13..11..11..161f4028........26")) { sVersion = "2.01 Demo"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/packer_ps2exe.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/MScholtes/PS2EXE meta("packer", "PS2EXE"); function detect() { bDetected = PE.isNetUStringPresent("^-([^: ]+)[ :]?([^:]*)$"); sLang = "PowerShell"; return result(); } ================================================ FILE: db/PE/packer_py2exe.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "py2exe"); function detect() { for (var i = 0; i < PE.getNumberOfResources(); i++) { // py2exe magic number if (PE.compare("12345678", PE.resource[i].Offset)) { bDetected = true; break; } } sLang = "Python"; return result(); } ================================================ FILE: db/PE/packer_scr2exe.2.sg ================================================ // Detect It Easy: detection rule file // Author: sendersu // Edited: DosX // www.screen-record.com/screen2exe.htm meta("packer", "SCREEN2EXE/SCREEN2SWF"); function detect() { var rdataSection = PE.section[".rdata"]; if (!PE.is64() && PE.compareEP("E8........E9........8BFF558BEC83EC..5356") && rdataSection && PE.findString(rdataSection.FileOffset, rdataSection.FileSize, "Video created by SCREEN2EXE/SCREEN2SWF") != -1) { sVersion = PE.getFileVersion().split(", ").join("."); bDetected = true; } return result(); } ================================================ FILE: db/PE/packer_yzPack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("packer", "yzPack"); function detect() { if (PE.compareEP("6033C08D480750E2FD8BEC648B4030780C8B400C")) { sVersion = "1.0-1.1"; bDetected = true; } else if (PE.compareEP("4D5A52456083EC188BEC8BFC33C0648B4030780C8B400C8B701CAD8B4008EB098B403483C07C8B403CABE9")) { sVersion = "1.2"; bDetected = true; } else if (PE.compareEP("5A52456083EC188BEC8BFC33C0648B4030780C8B400C8B701CAD8B4008EB098B403483C07C8B403CABE9")) { sVersion = "1.12"; bDetected = true; } else if (PE.compareEP("25........6187CC5545455581EDCA00000055A4B302FF142473F833C9FF1424731833C0FF1424731FB3")) { sVersion = "2.0"; bDetected = true; } /* else if (PE.isSignaturePresent(0, 512, "'MZKERNEL32'")) { // false detect (Win)Upack sVersion = "2.0"; bDetected = true; } */ return result(); } ================================================ FILE: db/PE/patcher_CodeFusion_Wizard.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("patcher", "CodeFusion Wizard"); function detect() { if (PE.compareEP("558bec83c4..535657e8........e8........33c05568........64ff30648920e8........e8........a3........833d")) { if (PE.compareOverlay("'@._P-DATA_.@'")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/patcher_PMaker.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("patcher", "PMAKER"); function detect() { if (PE.compareEP("68........e8........6a..e8........a3........8b58..03d80fb743..0fb74b..8d7c18..813f........74..83c7")) { sVersion = "0.9"; bDetected = true; } return result(); } ================================================ FILE: db/PE/patcher_RPP.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("patcher", "R!SC Process Patcher"); function detect() { if (PE.compareEP("68........c705................68........68........6a..6a..6a..6a..6a..6a..6a..68........e8")) { sVersion = "1.X"; sOptions = "by R!SC"; bDetected = true; } return result(); } ================================================ FILE: db/PE/patcher_RTPatch.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("patcher", "RTPatch"); function detect() { if (PE.compareOverlay("4B2A9A") || PE.compareOverlay("4B2A84")) { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { sVersion = "10.50"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/patcher_dUP.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("patcher", "dUP diablo2oo2's Universal Patcher"); function detect() { if (PE.compareEP("e8$$$$$$$$558bec81c4........5657536a..e8........a3........c745..........6a..68")) { if (PE.getNumberOfResources() > 0) { nOffset = PE.getResourceNameOffset("DLL"); { if (PE.compare("a2", nOffset)) { sVersion = "2.0"; bDetected = true; } } } } return result(); } ================================================ FILE: db/PE/patcher_simple_patch.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("patcher", "simple patch"); function detect() { if (PE.compareEP("33c040c2")) { bDetected = true; } else if (PE.compareEP("33c0c3")) { bDetected = true; } else if (PE.compareEP("b801000000c2")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/player_Power_Screen_Recorder.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("player", "Power Screen Recorder"); function detect() { if (PE.compareEP("eb$$a1........c1e0..a3........526a..e8........8bd0e8........5ae8........e8")) { if (PE.findSignature(PE.getSize() - 0x500, 0x500, "'xzjtlx'") != -1) { sVersion = "6.X-7.X"; sOptions = "by www.tlxsoft.com"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protection_BattlEye.5.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://www.battleye.com/ meta("protection", "BattlEye"); function detect() { if (PE.getSectionNameCollision("0", "1") === ".be" && // VMProtect'ed (PE.isLibraryPresentExp(/ntdll/) || PE.isFunctionPresent("CryptCATAdminAcquireContext")) && PE.isSigned()) { bDetected = true; if (PE.isSignaturePresent(0x00, PE.getSize() - PE.getOverlaySize(), "'https://cdn.battleye.com/%S/%s/%s'")) { sVersion = "Launcher"; } } return result(); } ================================================ FILE: db/PE/protection_DS.Eutron_SmartKey_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "Eutron SmartKey dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; if (PE.findString(0, nSize, "skeydrv.dll") !== -1) { bDetected = true; } else { var nOffset = 0; var foundOffset; while ((foundOffset = PE.findString(nOffset, nSize - nOffset, "\\.\\")) !== -1) { nOffset = foundOffset + 4; if (PE.compare("'eusk2'", nOffset) || PE.compare("'Skey-'", nOffset) || PE.compare("'SkeyDev'", nOffset)) { bDetected = true; break; } } } return result(); } ================================================ FILE: db/PE/protection_DS.HASP_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "HASP dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; if (PE.findString(0, nSize, "HASPDOSDRV") != -1 || PE.findString(0, nSize, "HASPUT16.DLL") != -1) { bDetected = true; } else if ((PE.isLibraryPresent("MSVBVM60.DLL") || PE.isLibraryPresent("MSVBVM50.DLL")) && PE.findString(0, nSize, "haspvb32.dll") !== -1) { sVersion = "Visual Basic"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protection_DS.Hardlock_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "Hardlock dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; var nOffset = 0; var foundOffset; while (true) { foundOffset = PE.findString(nOffset, nSize - nOffset, "\\.\\"); if (foundOffset === -1) break; nOffset = foundOffset + 4; if (PE.compare("'HARDLOCK.VXD'", nOffset) || PE.compare("'FEnteDev'", nOffset)) { bDetected = true; break; } } return result(); } ================================================ FILE: db/PE/protection_DS.MARX_Crypto-Box_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "MARX Crypto-Box dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; if (PE.findString(0, nSize, "MARXDEV1.SYS") !== -1) { bDetected = true; } else { var nOffset = 0; var foundOffset; while (true) { foundOffset = PE.findString(nOffset, nSize - nOffset, "\\.\\"); if (foundOffset === -1) break; nOffset = foundOffset + 4; if (PE.compare("'MARXDEV'", nOffset) || PE.compare("'Cb7Dev'", nOffset) || PE.compare("'CB7'", nOffset) || PE.compare("'CBUSB'", nOffset)) { bDetected = true; break; } } } return result(); } ================================================ FILE: db/PE/protection_DS.Matrix_Hardware_Lock_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "Matrix Hardware Lock dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; if (PE.findString(0, nSize, "MxLPT_Sem") !== -1 || PE.findString(0, nSize, "MxUSB_Sem") !== -1) { // PE.findString(0, nSize, "MATRIX.INI") != -1 bDetected = true; } return result(); } ================================================ FILE: db/PE/protection_DS.NetHASP_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "NetHASP dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; if (PE.findString(0, nSize, "NETHASP_00112233445566zz") !== -1 || PE.findString(0, nSize, "nethasp.ini") !== -1) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protection_DS.SenseLock_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "SenseLock dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; if (PE.findString(0, nSize, "sense4.dll") !== -1 || PE.findString(0, nSize, "S4Open") !== -1) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protection_DS.Sentinel_SuperPro_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "Sentinel SuperPro dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; // Originally searched for "RNBOsproInitialize", "RNBOsproGetKeyInfo" and // "RNBOsproGetVersion", but this should be enough. if (PE.findString(0, nSize, "RNBOspro") !== -1) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protection_DS.Sentinel_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "Rainbow Sentinel dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; if (PE.findString(0, nSize, "SNTNLUSB") !== -1) { bDetected = true; } else { var nOffset = 0; var foundOffset; while (true) { foundOffset = PE.findString(nOffset, nSize - nOffset, "\\.\\"); if (foundOffset === -1) break; nOffset = foundOffset + 4; if (PE.compare("'SENTINEL.VXD'", nOffset) || PE.compare("'SntnlUsb'", nOffset)) { bDetected = true; break; } } } return result(); } ================================================ FILE: db/PE/protection_DS.SoftLok_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "SoftLok dongle reference"); function detect() { var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; if (PE.findSignature(0, nSize, "5c5c2e5c'MNXX'") !== -1 || PE.findSignature(0, nSize, "5c5c2e5c'SoftLok'") !== -1) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protection_DS.Unikey_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "Unikey/Activator dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; if (PE.findString(0, nSize, "SSIVDDP.DLL") !== -1 || PE.findSignature(0, nSize, "5C004400650076006900630065005C005300530049005000440044005000") !== -1) { // L"\\Device\\SSIPDDP" bDetected = true; } else { var nOffset = 0; var foundOffset; while (true) { foundOffset = PE.findString(nOffset, nSize - nOffset, "\\.\\"); if (foundOffset === -1) break; nOffset = foundOffset + 4; if (PE.compare("'SSIPDDP'", nOffset) || PE.compare("'PIPE\\SSINetPipe'", nOffset)) { bDetected = true; break; } } } return result(); } ================================================ FILE: db/PE/protection_DS.WIBU_Key_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "WIBU Key dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; if (PE.findString(0, nSize, "WIBUKEY") !== -1 || PE.findString(0, nSize, "WkWin32.dll") !== -1 || PE.findString(0, nSize, "WKWIN32.DLL") !== -1) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protection_HASP_HL_Protection.5.sg ================================================ // Detect It Easy: detection rule file // Author: ajax // History: // 23:45 16.01.2013 add HASP SRM x32 1.X and HASP SRM x64 1.x // 15:40 19.01.2013 change name // 0:01 12.02.2013 add HASP 4/HL x32 meta("protection", "HASP HL/SRM"); function detect() { if (!PE.is64()) { if (PE.compareEP("558bec535657608bc4a3........b8........2b05........a3........833d..........74..8b0d........51ff15")) { sVersion = "4.X"; sOptions = "HL"; bDetected = true; } else if (PE.compareEP("57565351E801000000..5805........508B3003F02BC08BFE66AD")) { sVersion = "1.X"; sOptions = "SRM"; bDetected = true; } else if (PE.compareEP("558bec535657608bc4a3........b8........2b05........a3........833d..........0f84........a1........50ff15")) { sVersion = "1.X"; sOptions = "HL"; bDetected = true; } } else { if (PE.compareEP("5750569C53515241504151488D05........488B304803F0482BC0488BFE66AD")) { sVersion = "1.X"; sOptions = "SRM"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protection_Microsoft_Warbird.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protection", "Microsoft Warbird"); function detect() { bDetected = PE.section["?g_Encry"] && PE.isFunctionPresent("NtQuerySystemInformation"); if (bDetected && PE.findSignature(0, PE.getSize() - PE.getOverlaySize(), "'?g_EncryptedSegmentSystemCall_")) sOptions = "VM"; return result(); } ================================================ FILE: db/PE/protection_Softlocx.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "Softlocx"); function detect() { if (PE.compareEP("eb$$55e8000000005d81ed........8bc555609c2b85........8985........ff74")) { sVersion = "6.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protection_SteamStub.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://gameindustry.eu/blog/steamstub-drm/ meta("protection", "SteamStub"); function detect() { if (PE.compareEP("e800000000505351525657558b4424..2d........8bcc83e4..51515150e8........83c4..5959598be1894424..5d5f5e5a595b58c3")) { bDetected = true; } else if (PE.compareEP("e8000000005053515256575541504151415241534154415541564157488b4c24..4881e9........488bc44883e4..50504883ec..e8........4883c4..5959")) { sOptions = "x64"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protection_Wibu_Codemeter.1.sg ================================================ // Detect It Easy: detection rule file // Author: sendersu // If errors pls contact sendersu on cracklab.team meta("protection", "Wibu Codemeter"); function detect() { var nFound = 0; var nOffset; for (var i = 0; i <= PE.nLastSection; i++) { nOffset = PE.section[i].FileOffset; sSection = PE.section[i].Name; if (sSection == "__wibu00") { ++nFound; } else if (sSection == "__wibu01") { ++nFound; } // actually you may see many more __wibuXX sections, // we test just first two if (nFound == 2) { bDetected = true; break; } } return result(); } ================================================ FILE: db/PE/protection_obfus_h.5.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/DosX-dev/obfus.h meta("protection", "obfus.h"); function detect() { if ((PE.section[".obfh"] || PE.isExportFunctionPresent("WhatSoundDoesACowMake")) && PE.isFunctionPresent("vsprintf")) bDetected = true; sLang = "C"; return result(); } ================================================ FILE: db/PE/protection_obfusheader_h.5.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/ac3ss0r/obfusheader.h meta("protection", "obfusheader.h"); function detect() { if (PE.section[".rdata"] && PE.isFunctionPresent("LoadLibraryA") && PE.isFunctionPresent("GetProcAddress") && PE.isSignaturePresent( PE.section[0].FileOffset, PE.getSize() - PE.getOverlaySize(), "00 'Stop reversing the ' ** ** ** **")) { bDetected = true; } const dataSection = PE.section[".data"]; if (dataSection && PE.compare("6162636465666768696A6B6C6D6E6F707172737475767778797A534C41494450", dataSection.FileOffset)) { sOptions = "data consts"; bDetected = true; } if (bDetected && PE.section[".vmp0"]) { sOptions = sOptions.append("fake signs"); _removeResult("protector", ["Enigma", "SecuROM", "Denuvo", "Themida/Winlicense"]); } sLang = "C++"; return result(); } ================================================ FILE: db/PE/protector_ACProtect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "ACProtect"); function detect() { if (PE.compareEP("60F950E801000000..58584950E801000000..5858790466B9B872E801000000")) { sVersion = "1.09g"; } else if (PE.compareEP("E801000000..83")) { sVersion = "1.41"; } else if (PE.compareEP("6050E801000000..83")) { sVersion = "1.3X"; } else if (PE.compareEP("60E801000000..83042406C3")) { sVersion = "1.4X"; } else if (PE.compareEP("600F87020000001BF8E801000000..83042406C3")) { sVersion = "1.90g"; } else if (PE.compareEP("68........68........C3C3")) { sVersion = "2.0.X"; } else { var perplexSection = PE.section[".perplex"]; if (perplexSection && (perplexSection.Characteristics & 0xe0000060)) { sVersion = "1.X"; } } bDetected = bDetected || Boolean(sVersion) || Boolean(sOptions); return result(); } ================================================ FILE: db/PE/protector_AHTeam_EP_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "AHTeam EP Protector"); function detect() { if (PE.compareEP("90") && PE.compareEP("90FFE0", 47)) { sVersion = "0.3"; bDetected = true; if (PE.compareEP("60E8........5EB9000000002BC0", 50)) { sOptions = "fake k.kryptor 9/kryptor a"; } else if (PE.compareEP("6A0068........E8........BF", 50)) { sOptions = "fake Microsoft Visual C++ 7.0"; } else switch (PE.getEntryPointSignature(50, 14)) { case "60E803000000E9EB045D4555C3E8": sOptions = "fake ASPack 2.12"; break; case "60E801000000905D81ED00000000": sOptions = "fake ASProtect 1.0"; break; case "538BD833C0A3000000006A00E800": sOptions = "fake Borland Delphi 6.0-7.0"; break; case "FC5550E8000000005DEB01E360E8": sOptions = "fake PCGuard 4.03-4.15"; break; case "EB03CD20C71EEB03CD20EA9CEB02": sOptions = "fake PE Lock NT 2.04"; break; case "E8000000005B83EB05EB04524E44": sOptions = "fake PE-Crypt 1.02"; break; case "60E800000000414E414B494E5D83": sOptions = "fake PESHiELD 2.X"; break; case "B800000000680000000064FF3500": sOptions = "fake PEtite 2.2"; break; case "9C608B442424E8000000005D81ED": sOptions = "fake Spalsher 1.X-3.X"; break; case "535152565755E8000000005D81ED": sOptions = "fake Stone's PE Encryptor 2.0"; break; case "60E8000000005D81ED06000000EB": sOptions = "fake SVKP 1.3X"; break; case "E90000000060E8000000005883C0": sOptions = "fake tElock 0.61"; break; case "EB16A85400004741424C4B434743": sOptions = "fake VIRUS/I-Worm Hybris"; break; case "5F81EF00000000BE000040008B87": sOptions = "fake VOB ProtectCD"; break; case "E8000000005D8100000000006A45": sOptions = "fake Xtreme-Protector 1.05"; break; case "E912000000000000000000000000": sOptions = "fake ZCode 1.01"; break; } } else if (PE.compareEP("55908bec906aff9090")) { sVersion = "0.3"; sOptions = "alt"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_ASM_Guard.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://github.com/DosX-dev/ASM-Guard meta("protector", "ASM Guard"); function detect() { if (PE.isOverlayPresent()) { if (PE.isSectionNamePresent("ASMGUARD")) { sVersion = "2.XX"; sOptions = "shell mutation"; bDetected = true; } else if (PE.isResourceNamePresent("NT.DLL")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_ASProtect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "ASProtect"); function detect() { if (PE.compareEP("6801......E801000000C3C3")) { sVersion = "1.23-2.56"; } else if (PE.compareEP("68########9060e8$$$$$$$$5d4555c3")) { sVersion = "SKE 2.1-2.2"; } else if (PE.compareEP("68########60e8$$$$$$$$5d4555c3")) { sVersion = "SKE 2.3-2.5"; } else if (PE.compareEP("60E803000000E9EB045D4555C3E801000000EB5DBBEDFFFFFF03DD81EB00......807D4D01750C8B74242883FE01895D4E75318D45535053FFB5ED0900008D453550E9820000000000000000000000000000000000")) { sVersion = "SKE 2.1/2.2"; } else if (PE.compareEP("9060E803000000E9EB045D4555C3E801000000EB5DBBEDFFFFFF03DD81EB00......807D4D01750C8B74242883FE01895D4E75318D45535053FFB5ED0900008D453550E98200000000000000000000000000000000")) { sVersion = "SKE 2.1/2.2"; } else if (PE.compareEP("9060E803000000E9EB045D4555C3E801000000EB5DBBEDFFFFFF03DD81EB00......807D4D01750C8B74242883FE01895D4E75318D45535053FFB5E50B00008D453550E98200000000000000000000000000000000")) { sVersion = "SKE 2.3"; } else if (PE.compareEP("9060E803000000E9EB045D4555C3E801000000EB5DBBEDFFFFFF03DD81EB00....00807D4D01750C8B74242883FE01895D4E75318D45535053FFB5DD0900008D453550E98200000000000000000000000000000000")) { bDetected = true; } else if (PE.compareEP("60E801000000905D81ED........BB........03DD2B9D")) { sVersion = "1.0"; } else if (PE.compareEP("60E9..05")) { sVersion = "1.1 BRS"; } else if (PE.compareEP("60E9........9178797979E9")) { sVersion = "1.1 MTE"; } else if (PE.compareEP("9060E9..04")) { sVersion = "1.1 MTEb"; } else if (PE.compareEP("9060E81B......E9FC")) { sVersion = "MTEc"; } else if (PE.compareEP("60E9..04....E9..............EE")) { sVersion = "1.1"; } else if (PE.compareEP("60E9$$$$$$$$81da........e8$$$$$$$$0fbffe0fbffd")) { sVersion = "1.1"; } else if (PE.compareEP("6801......C3")) { sVersion = "1.2"; } else if (PE.compareEP("9060E803000000E9EB045D4555C3E801000000EB5DBBEDFFFFFF03DD81EB........807D4D01750C8B74242883FE01895D4E75318D45535053FFB5D50900008D453550E98200000000000000000000000000000000")) { sVersion = "1.23 RC4 build 08.07"; } else if (PE.compareEP("60E8........E9........05........B9........AD35........AB4975F6EB045D4555C3")) { sVersion = "1.1"; } bDetected = bDetected || Boolean(sVersion); return result(); } ================================================ FILE: db/PE/protector_AT4RE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://bbs.kanxue.com/thread-67920-1.htm meta("protector", "AT4RE"); function detect() { if (PE.compareEP("0f3133c903c8eb$$0f312bc13d........0f83........e9$$$$$$$$b8........33f633db8a1c0680eb")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_AZProtect_0001.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://forum.hellroom.ru/index.php?topic=17435.0 meta("protector", "AZProtect 0001"); function detect() { if (PE.compareEP("EB70FC608C804D110070258100400D91BB608C804D11007021811D610D810040CE608C804D11007025812581258125812961418131611D610040B730")) { bDetected = true; if (!PE.isSectionNamePresent("AZPR0001")) { sOptions = "modified"; } } return result(); } ================================================ FILE: db/PE/protector_AbyssMedia_ScriptCryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.abyssmedia.com/scriptcryptor/ meta("protector", "ScriptCryptor"); function detect() { if (PE.isNet() || PE.isRichSignaturePresent() || !PE.getNumberOfExports()) return; // Doesn't support .NET, files with Rich Signature and without exports if (PE.isResourceNamePresent("AOPT") && PE.isImportPositionHashPresent(0, 0xcf603a7d) && PE.getNumberOfImports() === 15) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_ActiveMark.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "ActiveMARK"); function detect() { if (PE.compareOverlay("00'TMSAMVOH'")) { sVersion = "5.X"; bDetected = true; } else if (PE.compareEP("8925........EB")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Agile.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Agile"); function detect() { if (_getNumberOfResults("protector") <= 2 && PE.isNetObjectPresent("ObfuscatedByAgileDotNetAttribute")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Alcatraz.2.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research // https://github.com/weak1337/Alcatraz // https://www.elastic.co/security-labs/deobfuscating-alcatraz (protector was used in doubleloader) meta("protector", "Alcatraz"); function detect() { if (PE.isSectionNamePresent(".0Dev")) { // need more samples bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Alienyze.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // --- // First version of detect made by KDSS-Research // https://alienyze.com/ meta("protector", "Alienyze"); function detect() { bDetected = PE.compareEP("55 8b ec") && !PE.getNumberOfImports() && PE.getNumberOfSections() > 4 && PE.getSectionFileOffset(0) == 0x00; if (bDetected && PE.isSignaturePresent(0, PE.getSize(), "540068006900730020006D00650073007300610067006500200077006F006E002700740020006100")) { sVersion = "demo"; } if (bDetected && !PE.isSectionNamePresent(".alien")) { sOptions = "modified"; } return result(); } ================================================ FILE: db/PE/protector_AntiDote.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "AntiDote"); function detect() { if (PE.compareEP("E8BBFFFFFF84C0742F680401000068C02360006A00FF1508106000E840FFFFFF50")) { sVersion = "1.0 Beta"; bDetected = true; } else if (PE.compareEP("6869D60000E8C6FDFFFF6869D60000E8BCFDFFFF83C408E8A4FFFFFF84C074")) { sVersion = "1.2 Beta"; bDetected = true; } else if (PE.compareEP("e8$$$$$$$$e8000000005853515657508b1c2481")) { sVersion = "1.2 Demo"; bDetected = true; } else if (PE.compareEP("EB1066623A432B2B484F4F4B90E9083290909090909090909090807C240801")) { sVersion = "1.2 Demo"; bDetected = true; } else if (PE.compareEP("6890030000E8C6FDFFFF6890030000E8BCFDFFFF6890030000E8B2FDFFFF50")) { sVersion = "1.4 SE"; bDetected = true; } else if (PE.compareEP("E8F7FEFFFF05CB220000FFE0E8EBFEFFFF05BB190000FFE0E8BD00000008B2")) { sVersion = "1.2 Demo"; bDetected = true; } else if (PE.compareEP("6895010000E8D0FDFFFF6895010000E8C3FDFFFF6890030000E8BCFDFFFF68")) { sVersion = "1.4 osCE"; bDetected = true; } else if (PE.compareEP("68....0000E8..FDFFFF68....0000E8..FDFFFF6890030000E8..FDFFFF")) { sVersion = "1.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Anticrack_Software.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://www.softpedia.com/get/Security/Encrypting/Anti-Crack-Software-Protector-Basic.shtml meta("protector", "AntiCrack Software Basic"); function detect() { if (PE.compareEP("60..................E801000000............................................0000......04")) { sVersion = "1.09"; bDetected = true; } else if (PE.compareEP("60................0000........................E801000000..83042406C3..........00")) { sVersion = "1.09"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_ArmDot.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.armdot.com/ meta("protector", "ArmDot"); function detect() { if (PE.isNet() && PE.isSignatureInSectionPresent(0, "20 .. .. .. .. 8D .. .. .. .. FE 0E .. .. 20 .. .. .. .. 8D .. .. .. .. FE 0E .. .. 20 .. .. .. .. 8D .. .. .. .. FE 0E .. .. 20 .. .. .. ..") && PE.isSignatureInSectionPresent(0, "20 .. .. .. .. FE 0C .. .. 3F .. .. 00 00 20 .. .. .. .. FE 0C .. .. 3D .. .. 00 00")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Armadillo.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Armadillo"); function detect() { if (PE.compareEP("60E8000000005D50510FCAF7D29CF7D20FCAEB0FB9EB0FB8EB07B9EB0F90EB08FDEB0BF2EBF5EBF6F2EB08FDEBE9F3EBE4FCE99D0FC98BCAF7D1595850510FCAF7D29CF7D20FCAEB0FB9EB0FB8EB07B9EB0F90EB08")) { sVersion = "3.X-9.X"; bDetected = true; } else if (PE.compareEP("558BEC83EC0C5356578B450850FF15........83C4048945FC8B45FC51B900080000B906000000")) { sVersion = "4.44a public build"; bDetected = true; } else if (PE.compareEP("E8E3400000E916FEFFFF6A0C68........E8441500008B4D0833FF3BCF762E6AE05833D2F7F13B")) { sVersion = "5.00"; bDetected = true; } else if (PE.compareEP("837C2408017505E8DE4B0000FF7424048B4C24108B54240CE8EDFEFFFF59C20C006A0C68")) { sVersion = "5.00"; sOptions = "DLL"; bDetected = true; } else if (PE.compareEP("6A..8BB5........C1E6048B85........2507....8079054883C8F84033C98A88........8B95........81E207....8079054A83CAF84233C08A82")) { sVersion = "2.XX"; sOptions = "CopyMem II"; bDetected = true; } else if (PE.compareEP("60E8........5D5051EB0FB9EB0FB8EB07B9EB0F90EB08FDEB0BF2EBF5EBF6F2EB08FDEBE9F3EBE4FCE959586033C9")) { sVersion = "3.00"; bDetected = true; } else if (PE.compareEP("60E8........5D5051EB0FB9EB0FB8EB07B9EB0F90EB08FDEB0BF2EBF5EBF6F2EB08FDEBE9F3EBE4FCE959585051EB")) { sVersion = "3.00a-3.70a"; bDetected = true; } else { if (PE.getMajorLinkerVersion() == 0x53 && PE.getMinorLinkerVersion() == 0x52) { for (var i = 0; i <= PE.nLastSection; i++) { if (PE.compare("'PDATA000'", PE.section[i].FileOffset)) { sVersion = "6.X-9.X"; break; } } if (!sVersion) { if (PE.section.length > 7) { sVersion = "6.X-9.X"; } } bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Arxan.2.sg ================================================ // Detect It Easy: detection rule file // Author: securitystar meta("protector", "Arxan"); function detect() { if (PE.is64() && !PE.isNet()) { if (PE.compareEP("40 50 40 51 40 52 40 53 55 56 57 9C 48 83 EC 38 FC B8 01 00 00 00 B9 FF FF 00 00 E0 FE")) { bDetected = true; sVersion = "GuardIT ~2013"; } else { var ep = skipJumpsAndNops(PE.getEntryPointOffset()), rva = PE.compare("48 83 EC 28 E8", ep) ? PE.OffsetToRVA(ep) + PE.readSDword(ep + 5) + 9 : PE.OffsetToRVA(ep); if (rva != -1) { var addr = PE.OffsetToVA(PE.RVAToOffset(rva)); const limit = 32; var pushCount = 0; for (var i = 0; i < limit; i++) { if (PE.getDisasmString(addr).indexOf("PUSH") !== 0) break; pushCount++; addr = PE.getDisasmNextAddress(addr); } if (pushCount > 3 && PE.getDisasmString(addr).indexOf("LEA RSP,") === 0) { addr = PE.getDisasmNextAddress(addr); var movupdCount = 0; for (var i = 0; i < limit; i++) { if (PE.getDisasmString(addr).indexOf("MOVUPD") !== 0) break; movupdCount++; addr = PE.getDisasmNextAddress(addr); } if (movupdCount > 0 && PE.getDisasmString(addr) === "PUSH 0X10" && PE.getDisasmString(PE.getDisasmNextAddress(addr)) === "TEST RSP, 0XF") { bDetected = true; sVersion = "GuardIT "; sVersion += (pushCount < 14 || movupdCount < 16) ? "12.0+" : "2014-2021"; } } } } } return result(); } function skipJumpsAndNops(offset) { var rva = PE.OffsetToRVA(offset); while (true) { const byte = PE.readByte(PE.RVAToOffset(rva)); if (byte === 0xE9) { rva += PE.readSDword(PE.RVAToOffset(rva + 1)) + 5; } else if (byte === 0xEB) { rva += PE.readSByte(PE.RVAToOffset(rva + 1)) + 2; } else if (byte === 0x90) { rva++; } else { break; } } return PE.RVAToOffset(rva); } ================================================ FILE: db/PE/protector_BJFnt.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", ".BJFnt"); function detect() { if (PE.compareEP("EB01EA9CEB01EA53EB01EA51EB01EA52EB01EA56")) { sVersion = "1.1b"; bDetected = true; } else if (PE.compareEP("EB0269B183EC04EB03CD20EBEB01EB9CEB01EBEB")) { sVersion = "1.2 RC"; bDetected = true; } else if (PE.compareEP("EB033A4D3A1EEB02CD209CEB02CD20EB02CD2060")) { sVersion = "1.3"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Babel_.NET.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Babel .NET"); function detect() { if (PE.isNet()) { if (PE.isNetObjectPresent("BabelObfuscatorAttribute")) { sVersion = "1.0-2.X"; bDetected = true; } else if (PE.isNetObjectPresent("BabelAttribute")) { sVersion = "3.X"; bDetected = true; } // fake signatures if (bDetected && PE.isNetObjectPresent("BabelAttribute") && PE.isNetObjectPresent("BabelObfuscatorAttribute")) { bDetected = false; } } return result(); } ================================================ FILE: db/PE/protector_Berio.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Berio"); function detect() { if (PE.compareEP("909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090E9011200")) { sVersion = "1.00 beta"; bDetected = true; } else if (PE.compareEP("909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090E9017401")) { sVersion = "2.00 beta"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_ByfronTech.2.sg ================================================ // Detect It Easy: detection rule file // Author: @justmazz_ meta("protector", "Byfron Technologies"); function detect() { // Engine-managed detection flag // Set bDetected = true when detection criteria is met var containsRunExport = false, containsTextSection = false, containsByfronCodeSection = false, containsByfronDataSection = false; // --- EXPORT DETECTION --- // Byfron often exports a function named 'run' if (PE.isExportFunctionPresent("run")) { containsRunExport = true; } // --- SECTION ANALYSIS --- // .text - standard code section // .byfron - custom RX section used by Byfron // .byfron1 - initialized, discardable data used by Byfron const FLAGS_RX = 0x60000020, FLAGS_INITIALIZED_DATA_DISCARDABLE = 0x02000040; for (var i = PE.nLastSection; i >= 0; i--) { var sectionName = PE.getSectionName(i), sectionCharacteristics = PE.getSectionCharacteristics(i); if (sectionName == ".text") { containsTextSection = true; continue; } if (sectionName == ".byfron" && sectionCharacteristics == FLAGS_RX) { containsByfronCodeSection = true; continue; } if (sectionName == ".byfron1" && sectionCharacteristics == FLAGS_INITIALIZED_DATA_DISCARDABLE) { containsByfronDataSection = true; continue; } } // --- VALIDATION LOGIC --- // Conditions typically associated with Byfron: // 1. Exported function named 'run' // 2. No standard .text section // 3. Presence of either .byfron or .byfron1 sections if (containsRunExport) { if (!containsTextSection) { if (containsByfronCodeSection || containsByfronDataSection) { bDetected = true; } } } return result(); } ================================================ FILE: db/PE/protector_ByteGuard.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/mt-code/ByteGuard meta("protector", "ByteGuard"); function detect() { if (PE.isNet() && PE.isNetGlobalCctorPresent() && (PE.section[0].Name === ".text" || PE.isSectionNamePresent("UPX")) && PE.isNetUStringPresent("C# version only supports level 1 and 3") && PE.compareOverlay("%% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %%")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Cameyo.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Cameyo"); function detect() { if (PE.isOverlayPresent() && PE.compareOverlay("'MZ'") && PE.getVersionStringInfo("ProductName") == "Cameyo Application Virtualization") { sVersion = PE.getFileVersion(); bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_CliSecure.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://marketplace.visualstudio.com/items?itemName=MikeDr.CliSecureObfuscateNETCodeProtectionTool meta("protector", "CliSecure"); function detect() { if (PE.isNet()) { if (PE.isNetObjectPresent("ObfuscatedByCliSecureAttribute")) { sVersion = "4.0-5.X"; bDetected = true; } else if (PE.isNetObjectPresent("CliSecureRd.dll") || PE.isNetObjectPresent("CliSecureRd64.dll")) { bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "'Cli'00'S'00'e'00'c'00'u'00'r'00'e'")) { bDetected = true; } } else if (PE.compareEP("e9$$$$$$$$558bec81ec4c020000a1........33c58945f483")) { sVersion = "4.5"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Code-Lock.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://web.archive.org/web/20240616203445/http://www.chosenbytes.com/ meta("protector", "Code-Lock"); function detect() { if (PE.isLibraryPresent("CODE-LOCK.OCX")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_CodeCrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "CodeCrypt"); function detect() { if (PE.compareEP("E9........EB02833D58EB02FF1D5BEB020FC75F")) { switch (PE.readDword(PE.getEntryPointOffset() + 1)) { case 0x2c5: sVersion = "0.14b"; break; case 0x331: sVersion = "0.15b"; break; case 0x32e: sVersion = PE.compareEP("EB03FF1D34", 20) ? "0.164" : "0.16b-0.163b"; } bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_CodeVeil.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "CodeVeil"); function detect() { if (PE.compareEP("e9$$$$$$$$e9$$$$$$$$8bff60e8$$$$$$$$5ee8")) { sVersion = "1.2"; bDetected = true; } else if (PE.isNet()) { if (PE.isNetObjectPresent("____KILL")) { sVersion = "4.X"; bDetected = true; } else if (PE.isNetUStringPresent("E_TamperDetected")) { sVersion = "3.X-4.X"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Code_Virtualizer.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Code Virtualizer"); function detect() { if (PE.compareEP("609CFCE8000000005F81EF........8BC781C7........3B472C7502EB2E89472CB9A7000000EB0501448F")) { sVersion = "1.3.1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Codewall.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "CodeWall"); function detect() { if (PE.isNet()) { if (PE.isNetObjectPresent("CodeWallTrialVersion") || PE.isNetObjectPresent("CodeWallTrialVersion\u0001")) { sVersion = "4.X"; sOptions = "demo"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "9161d281........11..175813..11..11..32..28........11..6f........13..7e........2d..73")) { sVersion = "4.X"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Confuser.2.sg ================================================ // Detect It Easy: detection rule file // Author: Levis http://ltops9.wordpress.com/ meta("protector", "Confuser"); function getConfuserVersion() { var sResult = String(); var nVersionOffset = PE.findString(PE.section[0].FileOffset, PE.section[0].FileSize, "Confuser v"); if (nVersionOffset !== -1) { sResult = PE.getString(nVersionOffset + 10); } return sResult; } function detect() { if (PE.isNetObjectPresent("ConfusedByAttribute")) { var sConfuserVersion = getConfuserVersion(); if (sConfuserVersion) { sVersion = sConfuserVersion; } else { sVersion = "1.X"; } bDetected = true; } else if (PE.isNet()) { if (PE.section.length >= 2) { var nVersionOffset = PE.findString(PE.section[1].FileOffset, PE.section[1].FileSize, "ConfuserEx v"); if (nVersionOffset != -1) { sVersion = PE.getString(nVersionOffset + 12, 7); sName = "ConfuserEx"; bDetected = true; } } } if (PE.getNetAssemblyName().indexOf("вє∂ѕ ρяσтє¢тσя") == 0) { sName = "ConfuserEx"; sVersion = "Bed's mod"; bDetected = true; } else if (bDetected && PE.isNetObjectPresent("DotNetPatcherPackerAttribute")) { sName = "ConfuserEx"; sVersion = "DotNetPatcher mod"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_CopyMinder.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://www.microcosm.com/software-protection/copyminder meta("protector", "CopyMinder"); function detect() { if (PE.compareEP("8325........EF6A00E8........E8........CCFF25........FF25........FF25........FF25........FF25........FF25........FF25........FF25........FF25........FF25........FF25")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Crinkler.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Crinkler"); function detect() { if (PE.compareEP("B9........01C068........6A0058506A005F485DBB03000000BE........E9")) { sVersion = "0.1-0.2"; bDetected = true; } else if (PE.compareEP("B8........31DB43EB58")) { sVersion = "0.3-0.4"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Crunch.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Crunch"); function detect() { if (PE.compareEP("EB100000000000000000000000000000000055E800000000")) { sVersion = "4.0"; bDetected = true; } else if (PE.compareEP("EB1503000000060000000000000000000000680000000055E800000000")) { sVersion = "5.0"; bDetected = true; } else if (PE.compareEP("55E8........5D83ED068BC5556089AD........2B85")) { switch (PE.getEntryPointSignature(32, 2)) { case "80BD": sVersion = "1.0"; break; case "55BB": sVersion = "2.0"; break; } bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_CrypKey.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://www.crypkey.com/ meta("protector", "CrypKey"); function detect() { if (PE.compareEP("8B1D........83FB00750AE83C000000E8..0A00008B44240850E8..020000A1")) { bDetected = true; } else if (PE.compareEP("E8........5883E805505F578BF781EF........83C639BA........8BDFB90B......8B06")) { sVersion = "5.X-6.X"; bDetected = true; } else if (PE.compareEP("E8........E8........83F80075076A00E8")) { sVersion = "5.6.X"; bDetected = true; } else if (PE.compareEP("833D........00753468........E8")) { sVersion = "6.1X"; bDetected = true; } else if (PE.compareEP("8b4424..50e8$$$$$$$$558bec81c4........5081c4........53c745")) { sOptions = "Core module"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_CrypToCrack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://bbs.kanxue.com/thread-37904.htm meta("protector", "CrypToCrack"); function detect() { if (PE.compareEP("E801000000E8585B81E300FFFFFF66813B4D5A753784DB75338BF303....813E504500007526")) { sVersion = "0.9.2"; bDetected = true; } else if (PE.compareEP("5B81E300FFFFFF66813B4D5A75338BF303733C813E5045000075260FB746188BC869C0AD0B0000F7E02DAB5D414B69C9DEC0000003C1")) { sVersion = "0.9.3"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Cryptect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Cryptect"); function detect() { if (PE.compareEP("68........e8$$$$$$$$5052e9$$$$$$$$53660fcb560fb7df9c0fbff381d6........d2e7558bda57")) { bDetected = true; } else if (PE.compareEP("68........e8$$$$$$$$525166990fca999cf550c0de..d2d40fb7c3550fabe5f8565766")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_CryptoObfuscator.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Crypto Obfuscator"); function detect() { if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "000220....000a20ffffff0028........2a")) { sVersion = "5.X"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "0291203fffffff5f1f18620a067e........021758911f1062600a067e")) { sVersion = "5.X"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_DBPE.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "DBPE"); function detect() { if (PE.compareEP("9C5557565251539CFAE8........5D81ED5B5340..B0..E8........5E83C611B927......3006464975FA")) { sVersion = "1.53"; bDetected = true; } else if (PE.compareEP("9C6A10730BEB02C151E806......C41173F75BCD83C404EB0299EBFF0C247101E879E07A017583C4049DEB017568")) { sVersion = "2.10"; bDetected = true; } else if (PE.compareEP("EB$$9C5557565251539CE8........5D81ED")) { switch (PE.readByte(PE.getEntryPointOffset() + 0x5c)) { case 0xEB: sVersion = "2.10"; break; case 0x9C: sVersion = "2.33"; break; } bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_DNGuard.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "DNGuard"); function detect() { if (PE.isNet() && PE.isNetGlobalCctorPresent()) { if (_getNumberOfResults("protector") <= 1) { if (PE.isNetObjectPresent("ZYXDNGuarder") || PE.isNetObjectPresent("HVMRuntm.dll")) { bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "'A newer version of DNGuard Runtime library is needed to run this application.'")) { bDetected = true; } } } else if (PE.is64()) { var rdataSection = PE.section[".rdata"]; if (rdataSection && PE.isSignaturePresent(rdataSection.FileOffset, rdataSection.FileSize, "'DNGuard'") && PE.isImportPositionHashPresent(0, 0x38432571) && PE.compareEP("48 83 EC 28 E8 07 AD")) { bDetected = true; } } else if (!PE.is64() && PE.isImportPositionHashPresent(0, 0x99f8b58e)) { sVersion = "4.9+"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_DS.Sentinel_SuperPro.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Sentinel SuperPro"); function detect() { if (PE.compareEP("68........6A016A00FF15........A3........FF15........33C93DB7000000A1")) { sVersion = "6.4.0"; sOptions = "Automatic Protection"; bDetected = true; } else if (PE.compareEP("A1........558B......85C074..85ED75..A1........5055FF15........8B0D")) { sVersion = "6.4.1"; sOptions = "Automatic Protection"; bDetected = true; } else if (PE.compareEP("A1........85C00F85........C705................33C050C70485................E8")) { sVersion = "6.4.5.0"; sOptions = "Automatic Protection"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_DYAMAR.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "DYAMAR"); function detect() { if (PE.isSectionNamePresentExp(/^\.dyamar[CD]$/)) { sVersion = "1.3.5"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_DZA_Patcher.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "DZA Patcher"); function detect() { if (PE.compareEP("EB08'5H40L1N'0060E8000000005D8BD581ED........2B95........83EA108995........8B442420250000FFFF")) { sVersion = "1.3"; bDetected = true; } else if (PE.compareEP("BF........9968........68........5252525252525257E81501000085C0751C9952525752E8CB000000FF35")) { sVersion = "1.3"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Daemon_Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Daemon Protect"); function detect() { if (PE.compareEP("60609c8cc932c9e3$$9d6130e230e231c055e8")) { sVersion = "0.6.7"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_DalKrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "DalKrypt"); function detect() { if (PE.compareEP("68........5868........5F33DBEB0D8A140380EA0780F2048814034381FB........72EBFFE7")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_DeepSea.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "DeepSea"); function detect() { if (PE.isNet()) { var nOffset = PE.findString(PE.section[0].FileOffset, PE.section[0].FileSize, "DeepSeaObfuscator"); if (nOffset !== -1) { if (PE.compare("'Evaluation'", nOffset + 18)) { sOptions = "Evaluation"; sVersion = "4.X"; } bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Denuvo.2.sg ================================================ // Detect It Easy: detection rule file // Author: deadmau5 // Updated: DosX (@DosX-dev) // Updated 2: Nitr0-G (@Nitr0-G) (16.05.2025) // Updated 3: 0x80000003 (@0x80000003) (20.09.2025) // Updated 4: BJNFNE // https://en.wikipedia.org/wiki/Denuvo meta("protector", "Denuvo"); function detect() { if (PE.isNet()) return; // Native code only if (PE.isSectionNamePresentExp(/\.(e|sr|x(p|d))data$/) || PE.isSectionNamePresent(".arch") || PE.isSectionNamePresent(".xtext") || PE.isSectionNamePresent(".xtls")) { if (PE.is64()) { // Mad Max, Metal Gear Solid: TPP, Rise of the Tomb Raider if (PE.compareEP("51 52 41 50 41 51 4C 8D ?? ?? ?? ?? ?? 4C 8D ?? ?? ?? ?? ?? 4D 29 C1")) { sVersion = "1.0"; bDetected = true; } // Lords of the Fallen, Batman: AK, Just Cause 3, Sherlock Holmes: TdD, Tales of Berseria etc else if (PE.compareEP("48 8D 0D ?? ?? ?? ?? E9 ?? ?? ?? ??")) { sVersion = "2.0a"; bDetected = true; } // Yesterday Origins else if (PE.compareEP("48 89 ?? ?? ?? ?? ?? 48 89 ?? ?? ?? ?? ?? 4C 89 ?? ?? ?? ?? ?? 4C 89 ?? ?? ?? ?? ?? 48 83 FA 01")) { sVersion = "2.0b"; bDetected = true; } // Sniper Ghost Warrior 3 (beta), Dead Rising 4 (SteamStub-free) else if (PE.compareEP("?? ?? ?? ?? ?? ?? ?? ?? 4C 89 1C 24 49 89 E3")) { sVersion = "3.0a"; bDetected = true; } // Atomic Heart else if (PE.compareEP("48 8D 64 24 .. 50 51 52 80 3D .. .. .. .. .. 75 .. 48 8D 05 .. .. .. .. 48 8D 0D .. .. .. ..")) { sVersion = "17.0"; // v17.0, what? How? bDetected = true; } // Train Sim World CSX Heavy Haul else if (PE.compareEP("4D 8D ?? ?? ?? ?? ?? ?? ?? ?? ?? 48 89 ?? ?? ?? ?? ?? 48 8D ?? ?? 48 89 ?? 48 89 ?? 48 89")) { sVersion = "3.0b"; bDetected = true; } // Hello Kitty : Island Adventure / Unity else if (PE.compareEP("47 61 6D 65 41 73 73 65 6D 62 6C 79 44 65 6E 75 76 6F 44 72 6D 2E 64 6C 6C")) { sOptions = "Unity"; // The actual game exe won't show up as Denuvo because it only loads the GameAssembly.dll which is the one protected by Denuvo bDetected = true; } else if (PE.isSignaturePresent(PE.section[0].FileOffset, PE.getSize() - PE.getOverlaySize(), "64 65 6E 75 76 6F 5F 61 74 64 00 00 00 00 00 00")) { bDetected = true; } // Check if steam_api64.dll present if (PE.isLibraryPresent("steam_api64.dll")) { sOptions = "Steam"; bDetected = true; } // Check if eossdk-win32-shipping.dll present if (PE.isLibraryPresent("eossdk-win64-shipping.dll")) { sOptions = "Epic Games"; bDetected = true; } } else { // Pro Evolution Soccer 2017, Champions of Anteria if (PE.compareEP("55 89 E5 8D ?? ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? E8 ?? ?? ?? ??")) { sVersion = "1.0"; bDetected = true; } // Romance of 13 Kingdoms, 2Dark else if (PE.compareEP("8D ?? ?? ?? ?? ?? ?? 89 7C 24 04 89 E7")) { sVersion = "2.0"; bDetected = true; } // Check if steam_api.dll present if (PE.isLibraryPresent("steam_api.dll")) { sOptions = "Steam"; bDetected = true; } // Check if eossdk-win64-shipping.dll present if (PE.isLibraryPresent("eossdk-win32-shipping.dll")) { sOptions = "Epic Game Store"; bDetected = true; } // Check if uplay_r1_loader.dll present if (PE.isLibraryPresent("uplay_r1_loader.dll")) { sOptions = "uPlay"; bDetected = true; } } } if (!bDetected) { if (PE.isLibraryPresent("dbdata.dll")) { // Override additional info sOptions = "FIFA23 series"; bDetected = true; } // Check if uplay_r1_loader64.dll present if (PE.isLibraryPresent("uplay_r1_loader64.dll")) { sOptions = "uPlay"; bDetected = true; } // Check if Core/Activation64.dll present if (PE.isLibraryPresentExp(/^Core\/Activation(64)?.dll$/)) { sOptions = "Origin"; bDetected = true; } if (PE.isExportFunctionPresent("GetDenuvoTicketLocation")) { bDetected = true; } if (PE.isExportFunctionPresent("GetDenuvoTimeTicketRequest")) { bDetected = true; } } if (PE.isExportFunctionPresentExp(/^ANTICHEAT_OBFUSCATE_.+_CODEMARKER$/)) { _setResult("marker", "Denuvo", String(), String()); } return result(); } ================================================ FILE: db/PE/protector_DotFix_Nice_Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "DotFix NiceProtect"); function detect() { if (PE.compareEP("E9FF000000608B7424248B7C2428FCB28033DBA4B302E86D00000073F633C9E864000000731C33C0E85B0000007323B30241B010E84F00000012C073F7753FAAEBD4E84D0000002BCB7510E842000000EB28ACD1E8")) { sVersion = "2.1-2.5"; bDetected = true; } else if (PE.compareEP("60E8550000008DBD........68........033C248BF79068........9BDBE355DB04248BC7DB442404DEC1DB1C248B1C2466AD51DB04249090DA8D........DB1C24D1E129")) { bDetected = true; } else if (PE.compareEP("60be........8dbe........5783cd..eb$$619090505174..83c8..eb")) { bDetected = true; } else if (PE.compareEP("e8$$$$$$$$eb$$5aeb$$524aeb$$eb$$b9........eb$$eb$$dd..eb$$803411..eb$$eb$$e2")) { sVersion = "1.0-2.X"; bDetected = true; } else if (PE.compareEP("60BE") && PE.section["."]) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Dotfuscator.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Dotfuscator"); function detect() { if (_getNumberOfResults("protector") <= 2 && PE.isNetObjectPresent("DotfuscatorAttribute")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_DragonArmor.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "DragonArmor"); function detect() { if (PE.compareEP("BF........83C9FF33C068........F2AEF7D1495168........E8110A000083C40C68")) { sVersion = "0.0.4.1"; bDetected = true; } if (bDetected && !PE.isSectionNamePresentExp(/^(\.)?DAStub$/)) { sOptions = "modified"; } return result(); } ================================================ FILE: db/PE/protector_ENIGMA.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // 07.12.2014 detect x64, build date added //ajax meta("protector", "Enigma"); function getEnigmaVersion() { var nSection = PE.nLastSection, nOffset = PE.section[nSection].FileOffset, nSize = PE.section[nSection].FileSize; if (nSize == 0) { nOffset = PE.section[nSection - 1].FileOffset; nSize = PE.section[nSection - 1].FileSize; } var nVersionOffset = PE.findSignature(nOffset, nSize, "000000'ENIGMA'"); if (nVersionOffset != -1) { var sMajor = PE.readByte(nVersionOffset + 9), sMinor = PE.readByte(nVersionOffset + 10), bYear = PE.readWord(nVersionOffset + 11), bMonth = PE.readWord(nVersionOffset + 13), bDay = PE.readWord(nVersionOffset + 15), bHour = PE.readWord(nVersionOffset + 17), bMin = PE.readWord(nVersionOffset + 19), bSec = PE.readWord(nVersionOffset + 21); sVersion = sMajor + "." + sMinor + " build " + bYear + "." + bMonth + "." + bDay + " " + bHour + ":" + bMin + ":" + bSec; return true; } nVersionOffset = PE.findSignature(nOffset, nSize, "'Enigma Protector'"); if (nVersionOffset != -1) { sVersion = "5.X"; return true; } return false; } function getEnigmaVersion4x() { var nSection = PE.nLastSection, nOffset = PE.section[nSection - 1].FileOffset, nSize = PE.section[nSection - 1].FileSize; var nVersionOffset = PE.findSignature(nOffset, nSize, "000000'ENIGMA'"); if (nVersionOffset != -1) { var sMajor = PE.readByte(nVersionOffset + 9), sMinor = PE.readByte(nVersionOffset + 10), bYear = PE.readWord(nVersionOffset + 11), bMonth = PE.readWord(nVersionOffset + 13), bDay = PE.readWord(nVersionOffset + 15), bHour = PE.readWord(nVersionOffset + 17), bMin = PE.readWord(nVersionOffset + 19), bSec = PE.readWord(nVersionOffset + 21); sVersion = sMajor + "." + sMinor + " build " + bYear + "." + bMonth + "." + bDay + " " + bHour + ":" + bMin + ":" + bSec; return true; } return false; } function getEnigmaVersion_old1x() { var nSection = PE.nLastSection; var nVersionOffset = PE.findSignature(PE.section[nSection].FileOffset, PE.section[nSection].FileSize, "'ENIGMA'07' PROT'"); if (nVersionOffset != -1) { sVersion = 'v1.14'; return true; } return false; } function getEnigmaVersion_old() { var dataSection = PE.section[".data"]; if (dataSection) { var nOffset = dataSection.FileOffset, nOffset = PE.findString(nOffset, dataSection.FileSize, "Enigma protector v"); if (nOffset != -1) { sVersion = PE.getString(nOffset + 18, 4); return true; } } return false; } function detect() { if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "000000'ENIGMA'")) { bDetected = true; } } else { if (!PE.is64()) { if (PE.compareEP("558bec83c4..b8........e8........9a............e9$$$$$$$$60e8000000005d..ed")) { getEnigmaVersion(); bDetected = true; } else if (PE.compareEP("60e8000000005d81ed........81ed........e9")) { getEnigmaVersion(); bDetected = true; } else if (PE.compareEP("68........e8$$$$$$$$eb$$83c4..e9$$$$$$$$60e8000000005d81ed")) { getEnigmaVersion(); bDetected = true; } else if (PE.compareEP("eb$$e9$$$$$$$$60e8000000005d81ed........81ed........e9")) { getEnigmaVersion(); bDetected = true; } else if (PE.compareEP("e8$$$$$$$$83c4..e9$$$$$$$$60e8000000005d81ed........81ed........e9")) { getEnigmaVersion(); bDetected = true; } else if (PE.compareEP("60e8000000005d83....81ed")) { // first versions getEnigmaVersion_old(); bDetected = true; } else if (PE.compareEP("eb$$e9$$$$$$$$60e8000000005d83....81ed")) { // 1.14 getEnigmaVersion_old1x(); getEnigmaVersion_old(); bDetected = true; } } else if (PE.compareEP("5051525355565741504151415241534154415541564157489C4881EC080000000FAE1C24E8000000005D")) { getEnigmaVersion(); bDetected = true; } else if (PE.compareEP("eb$$60e8000000005d81ed........81ed........e9")) { getEnigmaVersion(); bDetected = true; } if (!bDetected) { if (PE.getNumberOfImports() > 1 && PE.getNumberOfImportThunks(1) == 1 && PE.getImportFunctionName(1, 0) == "MessageBoxA" && PE.getSectionCharacteristics(0) == 0xe0000040 && getEnigmaVersion()) { bDetected = true; } else if (PE.getSectionNameCollision("1", "2") == "enigma") { bDetected = true; } } if (PE.compareEP("60648b2d........3e8b6d..3e8b6d..e8........bb........c3")) { getEnigmaVersion4x(); bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_EXEFog.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "ExeFog"); function detect() { if (PE.compareEP("56e8$$$$$$$$5e5ee9$$$$$$$$e8$$$$$$$$5d83c5..55c3") || PE.compareEP("52e8$$$$$$$$83c4..5a8be4510fb6c981e5") || PE.findSignature(PE.getEntryPointOffset(), 0x1000, "6545c2fb195bbd004040ebef9155f0401897db0024e8e80000008387202e87d17820fb1cb800b0ef0b000000848e") != -1) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_EXE_Password_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: Eliseu Filipi // https://exe-password-protector.soft112.com/ meta("protector", "EXE Password Protector"); function detect() { if (PE.compareEP("6A606810B54000E82E020000BF940000008BC7E822F4FFFF8965E88BF4893E56FF1510B040008B4E10890D00ED40008B4604")) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Eazfuscator.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.gapotchenko.com/eazfuscator.net meta("protector", "EazFuscator"); function detect() { bDetected = PE.isNet() && PE.isSignaturePresent(PE.section[0].FileOffset, 1024, "'fefef'") && PE.isSignatureInSectionPresent(0, "00 E2 80 ** E2 80 ** E2 80 ** E2 80 ** E2 80 ** E2 80 ** E2 80 ** E2 80 ** E2 80 ** E2 80 **"); return result(); } ================================================ FILE: db/PE/protector_Elan_License_Manager.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Elan License Manager"); function detect() { if (PE.compareEP("8b4424..83f8..0f85........ff15........8b0d........a3........85c975..3c..75..a9")) { sVersion = "4.1.3"; sOptions = "1995 by Elan Computer Group, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_ElecKey.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // 2022.04.16 2.00.X version Thanks: A.S.L. meta("protector", "ElecKey"); function detect() { if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "83c42068........68........c744240800000000ff15........50ff15........85c0a3")) { sOptions = "AnyCPU"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "488b0dd2be01006641b83200488d917b070000ff15a040010033c9ff15b8400100488b")) { sOptions = "x64"; bDetected = true; } } if (!bDetected) { // 2.00.X if (PE.is64()) { if (PE.compareEP("41504151515257535556E8000000005B48B8................482BD8488BEB")) { sVersion = "2.00.X"; bDetected = true; } } else { if (PE.compareEP("515257535556E8000000005BB8........2BD8")) { sVersion = "2.00.X"; bDetected = true; } } } return result(); } ================================================ FILE: db/PE/protector_Escargot.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Escargot"); function detect() { if (PE.compareEP("EB08'(esc0.1)'6068")) { sVersion = "0.1"; bDetected = true; } else if (PE.compareEP("EB04'@0.1'6068")) { sVersion = "0.1 final"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Excalibur.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Excalibur"); function detect() { if (PE.compareEP("e9$$$$$$$$60e8$$$$$$$$5861eb$$609c9c6a..73..eb")) { sVersion = "1.03"; sOptions = "by forgot/uS/DFCG"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_ExeShield.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.softpedia.com/get/Security/Encrypting/ExeShield.shtml meta("protector", "ExeShield"); function detect() { if (PE.compareEP("E8040000008360EB0C5DEB05") && PE.compareOverlay("85c0") && PE.isRichSignaturePresent() && !PE.getNumberOfImports()) { bDetected = true; if (!PE.isSectionNamePresent(".shield")) { sOptions = "modified"; } } return result(); } ================================================ FILE: db/PE/protector_ExeStealth.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://unprotect.it/technique/exestealth/ meta("protector", "ExeStealth"); function detect() { if (PE.compareEP("60E8000000005D81ED........B97B0900008BF7AC")) { sVersion = "1.1"; bDetected = true; } else if (PE.compareEP("6090EB22'ExeStealth'")) { sVersion = "2.5"; bDetected = true; } else if (PE.compareEP("EB0060EB00E8000000005D81ED")) { sVersion = "2.70-2.71"; bDetected = true; } else if (PE.compareEP("EB00EB2F'Shareware - ExeStealth'00")) { sVersion = "2.72-2.73"; sOptions = "Shareware"; bDetected = true; } else if (PE.compareEP("EB00EB17'Shareware - ExeStealth'00")) { sVersion = "2.74"; sOptions = "Shareware"; bDetected = true; } else if (PE.compareEP("906090E8000000005D81ED........B915000000")) { sVersion = "2.75"; bDetected = true; } else if (PE.compareEP("EB58'Shareware-Version ExeStealth'")) { sVersion = "2.75a"; sOptions = "Shareware"; bDetected = true; } else if (PE.compareEP("EB..'ExeStealth V2 Shareware '")) { sVersion = "2.76"; sOptions = "Shareware"; bDetected = true; } else if (PE.compareEP("EB65'ExeStealth V2 - www'")) { sVersion = "2.76"; bDetected = true; } var tnResource = PE.resource["TN"]; if (!bDetected && tnResource) { if (PE.compare("'MZ'", tnResource.FileOffset) || PE.isSectionNamePresent("ExeS")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Exe_Guarder.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://www.exeicon.com/exeguarder/ meta("protector", "Exe Guarder"); function detect() { if (PE.compareEP("558BEC83C4D05356578D75FC8B442430250000FFFF81384D5A900074072D00100000EBF18945FCE8C8FFFFFF2DB2040000")) { sVersion = "1.8"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Exe_Shield.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Exe Shield"); function detect() { if (PE.compareEP("EB0668....0600C39C60E8020000")) { switch (PE.readWord(PE.getEntryPointOffset() + 3)) { case 0x1f90: sVersion = "1.7"; break; case 0x86f4: sVersion = "2.7"; break; case 0x8540: sVersion = "2.7b"; break; } bDetected = true; } else if (PE.compareEP("60E8000000005D81ED........B9EB0800008DBD........8BF7AC......F8")) { sVersion = "2.9"; bDetected = true; } else if (PE.compareEP("558BEC53565760E8000000005D81ED........B9........81E9........8BD581C2")) { sVersion = "1.3RC"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_FISH_.NET.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "FISH .NET"); function detect() { if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "0800'FISH_NET'")) { sVersion = "1.X"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "'FISH.NET'")) { sVersion = "1.X"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_FishPE_Shield.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://huaidan.org/archives/983.html meta("protector", "FishPE Shield"); function detect() { if (PE.compareEP("558BEC83C4D05356578B451083C00C8B008945DC")) { sVersion = "1.12/1.16"; bDetected = true; } else if (PE.compareEP("60E8EAFDFFFFFFD0C38D4000..0000002C000000")) { sVersion = "1.12/1.16"; bDetected = true; } else if (PE.compareEP("60E8........C390090000002C000000........C4030000BCA0000000400100")) { sVersion = "1.0X"; bDetected = true; } else if (PE.compareEP("60e8........61c3") && PE.compareEP("60e8$$$$$$$$558bec81c470ffffff535657")) { sVersion = "2.0.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Fish_PE.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Fish PE"); function detect() { if (PE.getNumberOfSections() == 2) { if (PE.section[0].FileSize == 0) { if (PE.compareEP("60e8070000006168........c35e56")) { sVersion = "1.2"; bDetected = true; } else if (PE.compareEP("60e821000000eb$$6168........c35e56")) { sVersion = "1.3"; bDetected = true; } else if (PE.compareEP("60b8........ffd05a")) { sVersion = "1.4"; bDetected = true; } } } return result(); } ================================================ FILE: db/PE/protector_FlashBack_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "FlashBack"); function detect() { if (PE.compareEP("60609c8cc932c9e3$$9d6190609061eb$$558bec83c4..b8........e8")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_G!X_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "G!X Protector"); function detect() { if (PE.compareEP("60EB05E8EB044000EBFAE80A000000")) { sVersion = "1.2"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_GameGuard.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://gameguard.nprotect.com/en/index.html meta("protector", "GameGuard"); function detect() { if (PE.compareEP("31FF740661E9'JMP0'")) { sVersion = "2006.5.X.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Goats_PE_Mutilator.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Goat's PE Mutilator"); function detect() { if (PE.compareEP("E8EA0B0000......8B1C79F663D88D22B0BFF64908C302BD3B6C294613285D")) { sVersion = "1.6"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Goliath.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Goliath"); function detect() { if (PE.isSectionNamePresent(".GOLIATH")) { if (PE.isNetObjectPresent("ObfuscatedByGoliath")) { bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "'.Goliath.NET.CodeShield.'")) { bDetected = true; } } if (bDetected && PE.isSignatureInSectionPresent(0, "20006500760061006C007500610074006500")) { sOptions = "demo"; } return result(); } ================================================ FILE: db/PE/protector_HASP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "HASP Protection"); function detect() { if (PE.compareEP("6a..602eff35........2eff35........68........e8........6683c4..2eff35........2eff35........b8........83c0..50")) { sOptions = "1997 by Aladdin Knowledge Systems Ltd."; bDetected = true; } if (PE.section[0].FileOffset == 0 && PE.section[0].FileSize == 0) { if (PE.getResourceSection() == 1) { if (/manager/im.test(PE.getVersionStringInfo("ProductName"))) { sVersion = PE.getVersionStringInfo("ProductVersion"); sOptions = PE.getVersionStringInfo("ProductName"); bDetected = true; } } } return result(); } ================================================ FILE: db/PE/protector_HackShield.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "HackShield"); function detect() { var impSection = PE.section[PE.getImportSection()]; if (impSection) { var nOffset = impSection.FileOffset, nSize = impSection.FileSize; nSize = Math.min(nSize, 0x2048); if (PE.findString(nOffset, nSize, "TerminateHackShield") != -1) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Hide&Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://download.cnet.com/hide-protect/3000-2092_4-10380452.html meta("protector", "Hide&Protect"); function detect() { if (PE.compareEP("909090E9D8..050095..5300954A5000") || PE.compareEP("909090E9........0000000000000000")) { sVersion = "1.016"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_HidePE.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "HidePE by BGCorp"); function detect() { if (PE.compareEP("6006FC1E07BE909090906A04689010909068")) { sVersion = "0.1"; sOptions = "32Lite 0.03"; } else if (PE.compareEP("6090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090EB02000090909004909090909090909090909090909090909090909090")) { sVersion = "0.1"; sOptions = "ACProtect 1.09"; } else if (PE.compareEP("60E82A0000005D5051EB0FB9EB0FB8EB07B9EB0F90EB08FDEB0BF2EBF5EBF6F2EB08FDEBE9F3EBE4FCE959585051EB85")) { sVersion = "0.1"; sOptions = "Armadillo 3.00"; } else if (PE.compareEP("9090909068........6764FF360000676489260000F190909090A8030000617508B801000000C20C006800000000C38B85260400008D8D3B0400005150FF95")) { sVersion = "0.1"; sOptions = "ASPack 2.XX"; } else if (PE.compareEP("609090909090905D909090909090909090909003DD")) { sVersion = "0.1"; sOptions = "ASProtect"; } else if (PE.compareEP("68########6f4067485e68........67494e68........50466f")) { sVersion = "1.2"; sOptions = "ASProtect"; } else if (PE.compareEP("558BEC83C49090909068........9090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090")) { sVersion = "0.1"; sOptions = "Borland Delphi 3.0"; } else if (PE.compareEP("558BEC9090909068........9090909090909090909090909090909090909090909090909090909000FF90909090909090900001909090909090909090EB0400000001909090909090900001909090909090909090")) { sVersion = "0.1"; sOptions = "Borland Delphi 5.0 KOL/MCK"; } else if (PE.compareEP("9090909068........6764FF360000676489260000F190909090538BD833C0A3090909006A00E8090900FFA309090900A109090900A30909090033C0A30909090033C0A309090900E8")) { sVersion = "0.1"; sOptions = "Borland Delphi 6.0-7.0"; } else if (PE.compareEP("5360BD909090908D45908D5D90E8000000008D01")) { sVersion = "0.1"; sOptions = "CD-Cops II"; } else if (PE.compareEP("90909090909090909090909090909090909090909090EB0B83EC10535657E8C4010085")) { sVersion = "0.1"; sOptions = "CodeSafe 2.0"; } else if (PE.compareEP("55E80E0000005D83ED068BC5556089AD........2B8500000000")) { sVersion = "0.1"; sOptions = "Crunch"; } else if (PE.compareEP("BE000140006A0559807E070074118B46909090909090909090909090909090909083C101")) { sVersion = "0.1"; sOptions = "DEF 1.0"; } else if (PE.compareEP("60E8000000005D8BFD81ED909090902BB90000000081EF9090909083BD90909090900F8400000000")) { sVersion = "0.1"; sOptions = "DxPack 1.0"; } else if (PE.compareEP("9CFE039060BE909041908DBE9010FFFF5783CDFFEB1090909090909090909090909090909090FE0B")) { sVersion = "0.1"; sOptions = "ExeSmasher"; } else if (PE.compareEP("9090909068........6764FF360000676489260000F190909090BBD0014000BF00104000BE9090909053E80A00000002D275058A164612D2C3FCB280A46A025B")) { sVersion = "0.1"; sOptions = "FSG 1.0"; } else if (PE.compareEP("BE90909000BF90909000BB9090900053BB90909000B280")) { sVersion = "0.1"; sOptions = "FSG 1.31"; } else if (PE.compareEP("90909090909090909090909090909090909090909090EB0B83EC0C535657E8240200FF")) { sVersion = "0.1"; sOptions = "Gleam 1.00"; } else if (PE.compareEP("60E8220000005D8BD581ED909090902B959090909081EA0690909089959090909083BD4500010001")) { sVersion = "0.1"; sOptions = "JDPack 1.X/JDProtect 0.9"; } else if (PE.compareEP("64A1010000005589E56AFF68........689A10409050")) { sVersion = "0.1"; sOptions = "LCC Win32 1.X"; } else if (PE.compareEP("5589E5535657837D0C017505E817909090FF7510FF750CFF7508A1")) { sVersion = "0.1"; sOptions = "LCC Win32 DLL"; } else if (PE.compareEP("2CE8EB1A90905D8BC581EDF67390902B859090909083E8068985FF01ECAD")) { sVersion = "0.1"; sOptions = "Lockless Intro Pack"; } else if (PE.compareEP("54E8000000005D8BC581EDF67340002B858775400083E806")) { sVersion = "0.1"; sOptions = "LTC 1.3"; } else if (PE.compareEP("9090909068........6764FF360000676489260000F19090909083EC4456FF15248149008BF08A063C22751C8A4601463C22740C84C074088A4601463C2275F4803E22750F46EB0C")) { sVersion = "0.1"; sOptions = "Macromedia Flash Projector 6.0"; } else if (PE.compareEP("E909000000000000020000000C90")) { sVersion = "0.1"; sOptions = "MEW 11 SE 1.0"; } else if (PE.compareEP("68........E80A00000000000000000030000000")) { sVersion = "0.1"; sOptions = "Microsoft Visual Basic 5.0-6.0"; } else if (PE.compareEP("9090909068........6764FF360000676489260000F1909090905A6890909090689090909052E99090FF")) { sVersion = "0.1"; sOptions = "Microsoft Visual Basic 6.0 DLL"; } else if (PE.compareEP("558BEC6AFF68........68........64A10000000050E9")) { sVersion = "0.1"; sOptions = "Microsoft Visual C++ 5.0+/MFC"; } else if (PE.compareEP("558BEC5190909001019090909068........90909090909090909090909000019090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909000019090909090")) { sVersion = "0.1"; sOptions = "Microsoft Visual C++ 6.0/Debug Version"; } else if (PE.compareEP("9090909068........6764FF360000676489260000F190909090558BEC83EC50535657BE909090908D7DF4A5A566A58B")) { sVersion = "0.1"; sOptions = "Microsoft Visual C++ 6.20"; } else if (PE.compareEP("558D6C010081EC000000008B459083F801560F840000000085C00F84")) { sVersion = "0.1"; sOptions = "Microsoft Visual C++ 7.0 DLL"; } else if (PE.compareEP("5589E5E802000000C9C39090455845")) { sVersion = "0.1"; sOptions = "MinGW GCC 2.X"; } else if (PE.compareEP("E9A60000009090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090")) { sVersion = "0.1"; sOptions = "Neolite 2.0"; } else if (PE.compareEP("9C60E8000000005DB8B38540002DAC8540002BE88DB500000000")) { sVersion = "0.1"; sOptions = "NorthStar PE Shrinker 1.3"; } else if (PE.compareEP("60E801010000E883C404E801909090E95D81EDD3224090E804029090E8EB08EB02CD20FF24249A66BE4746909090909090909090909090909090909090909090909090909090909090909090909090909090909090")) { sVersion = "0.1"; sOptions = "Pack Master 1.0/PEX Clone"; } else if (PE.compareEP("8B04249C60E8140000005D81ED0A45409080BD67444090900F8548FFED0A")) { sVersion = "0.1"; sOptions = "PE Intro 1.0"; } else if (PE.compareEP("60E8110000005D83ED0680BDE0049090010F84F2FFCC0A")) { sVersion = "0.1"; sOptions = "PE Pack 0.99"; } else if (PE.compareEP("525155576467A1300085C0780DE8070000005883C007C690C3")) { sVersion = "0.1"; sOptions = "PE Protect 0.9"; } else if (PE.compareEP("9090909068........6764FF360000676489260000F190909090EB066890909090C39C60E80290909033C08BC483C004938BE38B5BFC81")) { sVersion = "0.1"; sOptions = "PECompact 1.4+"; } else if (PE.compareEP("60E910000000EF4003A7078F071C375D43A704B92C3A")) { sVersion = "0.1"; sOptions = "PENightMare 2 Beta"; } /* else if (PE.compareEP("909090909090909090909090909090909090909090909090909090909090909090909090")) { // TODO Check sVersion = "0.1"; sOptions = "PENinja 1.31"; } */ else if (PE.compareEP("60E82B0000009090909090909090909090909090909090909090909090909090909090909090909090909090909090CCCC")) { sVersion = "0.1"; sOptions = "PESHiELD 0.25"; } else if (PE.compareEP("9090909068........6764FF360000676489260000F190909090B8009090006A00689090900064FF350000000064892500000000669C60508BD8030068")) { sVersion = "0.1"; sOptions = "PEtite 2.X/level 0"; } else if (PE.compareEP("60E8010000005583C404E801000000905D81FFFFFF0001")) { sVersion = "0.1"; sOptions = "PEX 0.99"; } else if (PE.compareEP("5589E5909090909090909090905090909090900001")) { sVersion = "0.1"; sOptions = "REALBasic"; } else if (PE.compareEP("0BC00BC00BC00BC00BC00BC00BC00BC0BA........FFE2BAE0104000B868241A40890283C203B84000E8EE890283C2FDFFE22D3D5B20486964655045205D3D2D90000000")) { sVersion = "0.1"; sOptions = "Ste@lth PE 1.01"; } else if (PE.compareEP("60E8000000005883E83D508DB8000000FF578DB0E8000000")) { sVersion = "0.1"; sOptions = "UPX 0.6"; } else if (PE.compareEP("0BC00BC00BC00BC00BC00BC00BC00BC0")) { sVersion = "0.1"; sOptions = "VBOX 4.3 MTE"; } else if (PE.compareEP("5589E583EC08909090909090909090909090909001FFFF0101010001909090909090909090909090909000010001000190900001")) { sVersion = "0.1"; sOptions = "Video-Lan-Client"; } else if (PE.compareEP("363E268AC060E800000000")) { sVersion = "0.1"; sOptions = "VOB ProtectCD 5"; } else if (PE.compareEP("E900000000909090905741")) { sVersion = "0.1"; sOptions = "WATCOM C/C++ EXE"; } else if (PE.compareEP("608BF033DB83C30183C001")) { sVersion = "0.1"; sOptions = "XCR 0.11"; } else if (PE.compareEP("E803000000EB019090")) { sVersion = "0.1"; sOptions = "Yoda's Protector 1.02"; } else if (PE.compareEP("90909090909090909090909090909090EB06009090909090909090EB08E8900000006690909090909090909090909090909090909090909090909090909090905166909090599090909090909090909090909090909090909090EB0200009090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090EB02E2909090EB088290909090909090909090909090909090909090909090909090909090EB020001")) { sVersion = "0.1"; sOptions = "Morphine 1.2"; } else if (PE.compareEP("EB01EA9CEB01EA53EB01EA51EB01EA52EB01EA5690")) { sVersion = "0.2"; sOptions = "BJFNT 1.1b"; } else if (PE.compareEP("EB0269B183EC04EB03CD20EBEB01EB9CEB01EBEB00")) { sVersion = "0.2"; sOptions = "BJFNT 1.2"; } else if (PE.compareEP("EB1066623A432B2B484F4F4B90E990909090")) { sVersion = "0.2"; sOptions = "Borland C++"; } else if (PE.compareEP("558BEC83C4B4B890909090E800000000E8000000008D4000")) { sVersion = "0.2"; sOptions = "Borland Delphi DLL"; } else if (PE.compareEP("558BEC83C49053565733C08945F08945D48945D0E800000000")) { sVersion = "0.2"; sOptions = "Borland Delphi Setup Module"; } else if (PE.compareEP("E912000000000000000000000000000000E9FBFFFFFFC3680000000064FF3500000000")) { sVersion = "0.2"; sOptions = "ZCode 1.01"; } else if (PE.compareEP("..BA........B8........890283C204B8........890283C204B8........890283C2F8FFE2'\r\n-=[ HidePE by BHCorp ]=-'")) { sVersion = "1.01"; } bDetected = bDetected || Boolean(sVersion) || Boolean(sOptions); return result(); } ================================================ FILE: db/PE/protector_HyperTech_Crackproof.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "HyperTech Crackproof"); function detect() { if (PE.getNumberOfImports() > 0 && PE.getImportLibraryName(0) === "KeRnEl32.dLl") { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_ILProtector.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // http://www.vgrsoft.net/Products/ILProtector meta("protector", "ILProtector"); function detect() { bDetected = PE.isNet() && PE.isNetGlobalCctorPresent() && PE.isNetObjectPresent("Protect32.dll") && PE.isNetObjectPresent("Protect64.dll"); return result(); } ================================================ FILE: db/PE/protector_ILUCRYPT.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "ILUCRYPT"); function detect() { if (PE.compareEP("8BECFAC746F7....4281FA....75F9FF66F7")) { sVersion = "4.015"; bDetected = true; } else if (PE.compareEP("8BECFAC7........4C4CC3FBBF....B8....2E....D1C84F81")) { sVersion = "4.018"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_IProtect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "IProtect"); function detect() { if (PE.compareEP("EB33'.FUXLoadLibraryA'00")) { sVersion = "1.0"; if (PE.compareEP("'FxLib.dll'00", 19)) { sOptions = "FxLib.dll mode"; } else if (PE.compareEP("'FxSub.dll'00", 19)) { sOptions = "FxSub.dll mode"; } bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Inquartos_Obfuscator.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Inquartos Obfuscator"); function detect() { if (PE.compareEP("e8$$$$$$$$bb........e8$$$$$$$$e8$$$$$$$$33c064ff306489204bccc3") && PE.isSectionNamePresent(".inq")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_IntelliProtector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "IntelliProtector"); function detect() { var nLastSectionOffset = PE.section[PE.nLastSection].FileOffset; if (PE.compare("E9........CC", nLastSectionOffset)) { var nVersionOffset = PE.findString(nLastSectionOffset, PE.section[PE.nLastSection].FileSize, "Protected by IntelliProtector"); if (nVersionOffset != -1) { sVersion = PE.getString(nVersionOffset + 30); bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_InxObfuscator.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "Inx Obfuscator"); function detect() { if (PE.isNet() && PE.findSignature(0x00, PE.getSize() - PE.getOverlaySize(), "0013'Inx .NET Obfuscator'0000") != -1) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Jar2exe.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://www.jar2exe.com/ meta("protector", "Jar2Exe"); function detect() { if (PE.compareOverlay("efbbbf")) { if (PE.findSignature(PE.getOverlayOffset(), Math.min(255, PE.getOverlaySize()), "504B0304") != -1) { if (PE.compareEP("558BEC6a..68........68........64a1........50648925........83ec..5356578965..ff15........33d28ad48915........8bc881e1........890d")) { sOptions = "x86"; bDetected = true; } else if (PE.compareEP("4883ec..48895c24..48897c24..ff15........488bc833d241b8........ff15........488bd84885c075..b8........e9")) { sOptions = "x64"; bDetected = true; } else if (PE.compareEP("eb$$a1........c1e0..a3........526a..e8........8bd0e8........5ae8........e8........6a..e8........5968........6a")) { bDetected = true; } } } else if (PE.compareEP("eb$$a1........c1e0..a3........526a..e8........8bd0e8........5ae8........e8........6a..e8........5968........6a")) { if (PE.compareOverlay("504b0304")) { bDetected = true; } } sLang = "Java"; return result(); } ================================================ FILE: db/PE/protector_KoiVM.2.sg ================================================ // Detect It Easy: detection rule file // Author: r0da https://github.com/whereisr0da // Edited: DosX meta("protector", "KoiVM"); function detect() { if (PE.isNet() && _getNumberOfResults("protector") <= 1) { if (PE.isSignatureInSectionPresent(0, "'KoiVM'") || PE.isSignatureInSectionPresent(0, "'VMEntryRun'")) { bDetected = true; } sVersion = "2.0+"; } return result(); } ================================================ FILE: db/PE/protector_Konekt_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Konekt Protector"); function detect() { if (PE.compareEP("fc5550e8$$$$$$$$5d50e8$$$$$$$$eb$$58eb$$40eb$$ffe0")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Krypton.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Krypton"); function detect() { if (PE.compareEP("8B0C24E90A7C01..AD4240BDBE9D7A04")) { sVersion = "0.2"; bDetected = true; } else if (PE.compareEP("8B0C24E9C08D01..C13A6ECA5D7E796DB3645A71EA")) { sVersion = "0.3"; bDetected = true; } else if (PE.compareEP("54E8........5D8BC581ED........2B85")) { switch (PE.getEntryPointSignature(21, 3)) { case "83E806": sVersion = "0.4"; break; case "EB43DF": sVersion = "0.5"; break; } bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_LARP.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "LARP"); function detect() { if (PE.compareEP("e8$$$$$$$$e8$$$$$$$$e8$$$$$$$$e8$$$$$$$$5d81ed........830424..83c4..ff6424")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_LDK.2.sg ================================================ // Detect It Easy: detection rule file // Author: sendersu // If errors pls contact sendersu on cracklab.team meta("protector", "SafeNet Sentinel LDK"); function detect() { if (PE.getNumberOfSections() == 4 && PE.isSectionNamePresent(".AKS1") && PE.isSectionNamePresent(".AKS2") && PE.isSectionNamePresent(".AKS3") && PE.isSectionNamePresent(".rsrc")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_LDK_.NET.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "SafeNet Sentinel LDK .NET"); function detect() { if (PE.isNet()) { if (PE.isNetObjectPresent(".protect") && PE.isNetObjectPresent("haspdnert.dll")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_LameCrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://www.sac.sk/download/security/lamecryp.zip meta("protector", "LameCrypt"); function detect() { if (PE.compareEP("60669CBB........80B3........904B83FBFF75F3669D61")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Laserlok.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Laserlok"); function detect() { if (PE.compareEP("eb$$eb$$5055e8$$$$$$$$5d508bc581ed........2d........3e2b85........3E8985........608d85........508d9d........2bd853")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_MSLRH.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "MSLRH"); function detect() { if (PE.compareEP("EB033A4D3A1EEB02CD209CEB02CD20EB02CD2060EB02C705EB02CD20E803000000E9EB04584050C3619D1FEB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150")) { sVersion = "0.32a"; sOptions = "fake .BJFNT 1.3"; } else if (PE.compareEP("60E802000000EB095D5581ED39394400C361EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A586BC003E802000000295A83C40458740475")) { sVersion = "0.32a"; sOptions = "fake ASPack 2.11d"; } else if (PE.compareEP("60E803000000E9EB045D4555C3E801000000EB5DBBEDFFFFFF03DD81EB00A002EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A586BC003")) { sVersion = "0.32a"; sOptions = "fake ASPack 2.12"; } else if (PE.compareEP("60E803000000E9EB045D4555C3E801000000EB5DBBEDFFFFFF03DD81EB0073000061EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A586B")) { sVersion = "0.32a"; sOptions = "fake ASPack 2.12"; } else if (PE.compareEP("3BC074028183553BC074028183533BC97401BC563BD27402818557E8000000003BDB74019083C414EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E80200")) { sVersion = "0.32a"; sOptions = "fake EXE32Pack 1.3X"; } else if (PE.compareEP("558BEC6AFF68........68........64A1000000005064892500000000648F050000000083C40C5DEB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E80200")) { sVersion = "0.32a"; sOptions = "fake Microsoft Visual C++"; } else if (PE.compareEP("558BEC538B5D08568B750C578B7D1085F65F5E5B5DEB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A586BC003E802000000295A83C40458")) { sVersion = "0.32a"; sOptions = "fake MSVC++ 6.0 DLL"; } else if (PE.compareEP("558BEC538B5D08568B750C5E5B5DEB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A586BC003E802000000295A83C4045874047502EB02EB")) { sVersion = "0.32a"; sOptions = "fake MSVC++ 7.0 DLL Method 3"; } else if (PE.compareEP("558BEC5657BF010000008B750C85F65F5E5DEB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A586BC003E802000000295A83C40458740475")) { sVersion = "0.32a"; sOptions = "fake MSVC++ DLL Method 4"; } else if (PE.compareEP("E9A6000000B07B4000786040007C60400000000000B03F000012624000'NeoLite Executable File Compressor\r\nCopyright (c) 1998'2C31")) { sVersion = "0.32a"; sOptions = "fake Neolite 2.0"; } else if (PE.compareEP("9C60E8000000005DB8B38540002DAC8540002BE88DB5D3FEFFFF8B0683F80074118DB5DFFEFFFF8B0683F8010F84F1010000619DEB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874")) { sVersion = "0.32a"; sOptions = "fake nSPack 1.3"; } else if (PE.compareEP("FC5550E8000000005DEB01E360E803000000D2EB0B58EB014840EB0135FFE0E761585DEB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A58")) { sVersion = "0.32a"; sOptions = "fake PC-Guard 4.XX"; } else if (PE.compareEP("E8000000005B83EB05EB04'RND!'85C07302F70550E808000000EAFF58EB18EB010FEB02CD20EB03EACD205858EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB")) { sVersion = "0.32a"; sOptions = "fake PE Crypt 1.02"; } else if (PE.compareEP("EB03CD20C71EEB03CD20EA9CEB02EB01EB01EB60EB03CD20EBEB01EBE803000000E9EB04584050C3EB03CD20EBEB03CD2003619D83C404EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83")) { sVersion = "0.32a"; sOptions = "fake PE Lock NT 2.04"; } else if (PE.compareEP("9C60E80200000033C08BC483C004938BE38B5BFC81EB0730400087DD619DEB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A586BC003E802")) { sVersion = "0.32a"; sOptions = "fake PEBundle 0.2-3.X"; } else if (PE.compareEP("9C60E80200000033C08BC483C004938BE38B5BFC81EB0730400087DD83BD9C38400001619DEB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E80200000029")) { sVersion = "0.32a"; sOptions = "fake PEBundle 2.0X-2.4X"; } else if (PE.compareEP("EB06682EA80000C39C60E80200000033C08BC483C004938BE38B5BFC81EB3F904000619DEB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A")) { sVersion = "0.32a"; sOptions = "fake PECompact 1.4X"; } else if (PE.compareEP("60E82B000000'\r\n\r\n\r\nRegistAred to: NON-COMMERCIAL!!\r\n\r\n\r'005861EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C4087404")) { sVersion = "0.32a"; sOptions = "fake PESHiELD 0.25"; } else if (PE.compareEP("B8........6A0068........64FF350000000064892500000000669C605083C40461669D648F050000000083C408EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB")) { sVersion = "0.32a"; sOptions = "fake PEtite 2.1"; } else if (PE.compareEP("60E801000000E883C404E801000000E95D81EDFF22400061EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A586BC003E802000000295A83")) { sVersion = "0.32a"; sOptions = "fake PEX 0.99"; } else if (PE.compareEP("60E8000000005D81ED0600000064A02300000083C50661EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A586BC003E802000000295A83C4")) { sVersion = "0.32a"; sOptions = "fake SVKP 1.11"; } else if (PE.compareEP("60BE00908B008DBE0080B4FF5783CDFFEB3A9090909090908A064688074701DB75078B1E83EEFC11DB72EDB80100000001DB75078B1E83EEFC11DB11C001DB730B75198B1E83EEFC11DB7210586190EB05E8EB0440")) { sVersion = "0.32a"; sOptions = "fake UPX 0.89.6-1.02/1.05-1.24"; } else if (PE.compareEP("53558be833dbeb$$e800000000582d........506033c9505850508be851fd2e2b84..........8bf02e03b4..........8bf8")) { sVersion = "0.32a"; sOptions = "fake WWPack32 1.X"; } else if (PE.compareEP("60E8000000005D81EDF31D4000B97B0900008DBD3B1E40008BF7AC902C8AC0C078900462EB010061EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E80200")) { sVersion = "0.32a"; sOptions = "fake Yoda's Cryptor 1.2"; } else if (PE.compareEP("60EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB0181E80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB0181E80A000000E8EB0C0000E8")) { sVersion = "0.1-0.2"; } else if (PE.compareEP("60D1CB0FCAC1CAE0D1CA0FC8EB01F1")) { sVersion = "0.31"; } else if (PE.compareEP("EB05E8EB044000EBFAE80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB0181E80A000000E8EB0C0000E8F6FFFFFFE8F2FFFFFF83C40874047502EB02EB018150E802000000295A586BC003")) { sVersion = "0.32a"; } else if (PE.compareEP("558bec5657bf........8b75..85f65f5e5deb$$eb$$eb$$e8$$$$$$$$e8$$$$$$$$eb$$83c4")) { sVersion = "0.31a"; } bDetected = bDetected || Boolean(sVersion); return result(); } ================================================ FILE: db/PE/protector_MZ0oPE.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "MZ0oPE"); function detect() { if (PE.compareEP("EBCA890383C30487FE32C0AE75FD87FE803EFF75E2465B83C304538B1B803FFF75C98BE56168")) { sVersion = "1.0.6b"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_MaskPE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "MaskPE"); function detect() { if (PE.isSectionNamePresent(".MaskPE") && PE.compareEP("60")) { if (PE.isSignaturePresent(PE.getEntryPointOffset(), 0x100, "6160e8........8bc33e8b..40e8")) { sVersion = "2.0"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Maxtocode.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Maxtocode"); function detect() { if (PE.isNet()) { if (PE.isNetObjectPresent("Attick.dll") && PE.isNetObjectPresent("CheckRuntime")) { sVersion = "1.X"; sOptions = "Runtime"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "00'InfaceMax 'ffffff005f175920ffff00'toCode_interface'00")) { sVersion = "1.X"; bDetected = true; } else if (PE.isNetObjectPresent("MRuntime3.dll")) { sVersion = "3.X"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Metrowerks_CodeWarrior.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Metrowerks CodeWarrior"); function detect() { if (PE.compareEP("5589E55356578B750C8B5D1083FE01740583FE0275125356FF7508E86EFFFFFF09C0750431C0EB215356FF7508E8")) { // DLL sVersion = "2.0"; bDetected = true; } else if (PE.compareEP("5589E5535683EC4455B8FFFFFFFF505068........64FF35000000006489250000000068")) { // Console sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Morphnah.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Morphnah"); function detect() { if (PE.compareEP("558bec87e55de9$$$$$$$$558bec83ec..5356576064a1........8b40..8945..64a1........c740")) { sVersion = "1.0.7"; bDetected = true; } else if (PE.section[".nah"]) { if (PE.compareEP("60e8$$$$$$$$5d81ed........8bbd........8b8d........b8........01e88030..83f9..74..817f..........75..8b57")) { sVersion = "1.0.2"; bDetected = true; } else if (PE.compareEP("60e8$$$$$$$$5d81ed........31c04083f0..403d........75..be........eb..eb..8b85........83f8..75..31c001ee3d")) { sVersion = "1.0.3"; bDetected = true; } else if (PE.compareEP("eb$$608b4c....87d187d18b093bed")) { sVersion = "beta 2"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_N-Code.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "N-Code"); function detect() { if (PE.compareEP("9066be....6683fe..74..66b8....66be....6683fe..74..6683e8..66bb....6683c3..66436681fb....74..6683f8")) { sVersion = "0.2"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_N-Joy.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "N-Joy"); function detect() { if (PE.compareEP("558BEC83C4F0B8........E8....FFFF6A0068........6A0A6A00E8....FFFFE8....FFFF8D4000")) { switch (PE.readWord(PE.getEntryPointOffset() + 33)) { case 0xf5ef: sVersion = "1.0"; break; case 0xf57f: sVersion = "1.1"; break; case 0xeac7: sVersion = "1.2"; break; case 0xe723: sVersion = "1.3"; break; } bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_NET_Spider.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", ".NET Spider"); function detect() { if (PE.isNet() && PE.isSignatureInSectionPresent(0, "'Protected_By_Attribute'00'NETSpider.Attribute'")) { sVersion = "0.5-1.3"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_NTkrnl_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "NTkrnl Protector"); function detect() { if (PE.compareEP("68........e8") && PE.nLastSection >= 1) { if (PE.getNumberOfImports() == 1 && PE.getNumberOfImportThunks(0) == 2) { if (PE.getImportFunctionName(0, 0) == "LoadLibraryA" && PE.getImportFunctionName(0, 1) == "GetProcAddress") { if (PE.isSignatureInSectionPresent(1, "'http://www.ntcore.com '")) { sVersion = "0.1"; bDetected = true; } else if (PE.isSignatureInSectionPresent(1, "'http://www.ntkrnl.com'")) { sVersion = "0.15"; bDetected = true; } /* if (bDetected) { var nFind = PE.findString(PE.section[1].FileOffset, PE.section[1].FileSize, "Version "); if (nFind !== -1) { sVersion = PE.getString(nFind, 20); sVersion = sVersion.match(/Version ?(.*?) /)[1]; } } */ } } } if (PE.compareEP("68........e8........c3") && PE.compareEP("68########60e8$$$$$$$$5d4555c3")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_NetReactor.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // ---------------- // First version of detect made by ajax // https://www.eziriz.com/dotnet_reactor.htm meta("protector", ".NET Reactor"); function detect() { if (PE.section[".reacto"]) { if (PE.section[1].FileSize == 0 && PE.section[2].FileSize == 0 && PE.section[3].FileSize == 0) { sVersion = "2.0-2.1"; bDetected = true; } } else if (PE.compareEP("558becb90f0000006a006a004975f951535657b8........e8")) { sVersion = "2.X-3.X"; bDetected = true; } else if (PE.resource["__"] && PE.compareEP("e8$$$$$$$$8bff558bec83ec10")) { if (PE.compareEP("e8........e9........6a0c68")) { sVersion = "4.2"; bDetected = true; } else if (PE.compareEP("e8........e9........8bff558bec83ec208b45085657")) { sVersion = "4.5-4.7"; bDetected = true; } } else if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "558becb90f0000006a006a004975f951535657b8........e8")) { sVersion = "3.X"; bDetected = true; } else if (PE.section.length >= 2) { if (PE.section[1].Characteristics == 0xc0000040) { // .sdata if (PE.isSignatureInSectionPresent(1, "5266686E204D182276B5331112330C6D0A204D18229EA129611C76B505190158")) { sVersion = "4.8-4.9"; bDetected = true; } } } if (PE.isNetObjectPresent("NecroVM.Runtime")) return; if (PE.isSignatureInSectionPresent(0, "6D5F6973526561644F6E6C790B636F6D70617265496E666F0874657874496E666F076E756D496E666F0C6461746554696D65496E666F0863616C656E6461720A6D5F646174614974656D0963756C747572654944066D5F6E616D65116D5F757365557365724F76657272696465")) { sVersion = "6.X"; } var signatureToScan = String(); for (var i = 0; i < 5; i++) { signatureToScan += "'m_'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%00"; } if (PE.isSignatureInSectionPresent(0, signatureToScan)) { sOptions = sOptions.append("Control Flow"); sVersion = "6.X"; bDetected = true; } if (PE.isSignatureInSectionPresent(0, "'$$method0x'363030303331372D310024246D6574686F643078363030303333322D310024246D6574686F643078363030303333322D320024246D6574686F643078363030303334302D310024246D6574686F643078363030303334302D320024246D6574686F643078363030303335332D310024246D6574686F64")) { sVersion = "6.5"; bDetected = true; } if (PE.isNetGlobalCctorPresent()) { if (PE.isNetObjectPresent("BinaryReader") && PE.isNetObjectPresent("RSACryptoServiceProvider") && PE.isSignatureInSectionPresent(0, "2000690073002000740061006D00700065007200650064002E00")) { sOptions = sOptions.append("Anti-tamper"); bDetected = true; } else if (PE.isNetObjectPresent("kernel32") && PE.isSignatureInSectionPresent(0, "6B00650072006E0065006C002000")) { bDetected = true; } } if (PE.isNetObjectPresent("SuppressIldasmAttribute")) sOptions = sOptions.append("Anti-ILDASM"); if (PE.isSignatureInSectionPresent(0, "45007A006900720069007A0027007300200022002E004E00450054002000520065006100630074006F0072002200210020005400680069007300200061") && PE.isNetObjectPresent("DateTime")) { sOptions = sOptions.append("Demo"); bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_NetShield.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/AdvDebug/NetShield_Protector meta("protector", "NetShield"); function detect() { if (PE.isNet()) { if (PE.isSectionNamePresent("!Sugar") && PE.isNetGlobalCctorPresent()) { bDetected = true; if (PE.isNetObjectPresent("ConfusedByAttribute")) { sOptions = "Fake signs"; } if (PE.isNetObjectPresent("SuppressIldasmAttribute")) { sOptions = sOptions.append("Anti-ILDASM"); } if (PE.isNetObjectPresent("Form200")) { sOptions = sOptions.append("Anti-de4dot"); } } } return result(); } ================================================ FILE: db/PE/protector_Ningishzida.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Ningishzida"); function detect() { if (PE.compareEP("9C6096E8000000005D81ED........B9041B00008DBD........8BF7AC")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_NoobyProtect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "NoobyProtect"); function detect() { var impSection = PE.section[PE.getImportSection()]; if (impSection && impSection.Name == "SE") { sVersion = "Safengine"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_North_Star_PE_Shrinker.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "North Star PE Shrinker"); function detect() { if (PE.compareEP("9C60E8000000005DB8........2D........2BE88DB5") && !PE.isSectionNamePresent("nsp0")) { sVersion = "1.3"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_ORiEN.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "ORiEN"); function detect() { if (PE.compareEP("E95D010000CED1CE..'\r\n--------------------------------------------\r\n- ORiEN executable files protection system -\r\n------ Created by A. Fisun, 1994-2003 ------\r\n------- WWW: http://zalexf.narod.ru/ -------\r\n-------- e-mail: zalexf@hotmail.ru ---------\r\n--------------'")) { switch (PE.readByte(PE.getEntryPointOffset() + 8)) { case 0xCE: sVersion = "2.11"; break; case 0xCD: sVersion = "2.12"; break; } bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Obfuscar.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Obfuscar"); function detect() { if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "0691066120AA00000061D29C0617580A")) { sVersion = "1.0"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Obfuscator_NET_2009.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Obfuscator.NET 2009"); function detect() { if (PE.isNet()) { if (PE.isNetUStringPresent("Macrobject.Obfuscator")) { bDetected = true; } else if (PE.isNetUStringPresent("Obfuscated by Macrobject Obfuscator.NET UNREGISTRED")) { sOptions = "Unregistered"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Obsidium.2.sg ================================================ // Detect It Easy: detection rule file // Author: ajax // History: // 22:54 17.01.2013 add generic // 22:30 14.07.2013 improved generic meta("protector", "Obsidium"); function detect() { if (PE.isNet()) return; if (PE.compareEP("E8AB1C")) { sVersion = "1.0.0.59"; bDetected = true; } else if (PE.compareEP("E8AF1C0000")) { sVersion = "1.0.0.61"; bDetected = true; } else if (PE.compareEP("EB02....E8E71C0000")) { sVersion = "1.1.1.1"; bDetected = true; } else if (PE.compareEP("EB02....E8771E0000")) { sVersion = "1.2"; bDetected = true; } else if (PE.compareEP("EB02....E83F1E0000")) { sVersion = "1.2.0.0"; bDetected = true; } else if (PE.compareEP("E80E0000008B54240C8382B8000000")) { sVersion = "1.2.5.0"; bDetected = true; } else if (PE.compareEP("EB01..E829000000EB02....EB01..8B54240CEB04")) { sVersion = "1.2.5.8"; bDetected = true; } else if (PE.compareEP("E80E00000033C08B54240C8382B80000000DC36467FF36")) { sVersion = "1.2.X"; bDetected = true; } else if (PE.compareEP("EB04........E829000000EB02....EB01..8B54240CEB02")) { sVersion = "1.3.0.0"; bDetected = true; } else if (PE.compareEP("EB02....E825000000EB04........EB01..8B54240CEB01")) { sVersion = "1.3.0.4"; bDetected = true; } else if (PE.compareEP("EB01..E826000000EB02....EB02....8B54240CEB01")) { sVersion = "1.3.0.13"; bDetected = true; } else if (PE.compareEP("EB02....E828000000EB04........EB01..8B54240CEB")) { sVersion = "1.3.0.17"; bDetected = true; } else if (PE.compareEP("EB03......E82E000000EB04........EB04........8B")) { sVersion = "1.3.0.21"; bDetected = true; } else if (PE.compareEP("EB02....E826000000EB03......EB01..8B54240CEB04")) { sVersion = "1.3.0.37"; bDetected = true; } else if (PE.compareEP("EB02....E827000000EB02....EB03......8B54240CEB01")) { sVersion = "1.3.1.1"; bDetected = true; } else if (PE.compareEP("EB04........E82A000000EB03......EB04........8B54")) { sVersion = "1.3.2.2"; bDetected = true; } else if (PE.compareEP("EB01..E829000000EB02....EB03......8B54240CEB02")) { sVersion = "1.3.3.1"; bDetected = true; } else if (PE.compareEP("EB01..E82B000000EB02....EB02....8B54240CEB03")) { sVersion = "1.3.3.2"; bDetected = true; } else if (PE.compareEP("EB02....E829000000EB03......EB03......8B..240CEB")) { sVersion = "1.3.3.3"; bDetected = true; } else if (PE.compareEP("EB02....E829000000EB03......EB02....8B54240CEB03")) { sVersion = "1.3.3.4"; bDetected = true; } else if (PE.compareEP("EB04........E828000000EB01..............8B54240")) { sVersion = "1.3.3.6"; bDetected = true; } else if (PE.compareEP("EB02....E827000000EB03......EB01..8B54240CEB03")) { sVersion = "1.3.3.7"; bDetected = true; } else if (PE.compareEP("EB02....E82C000000EB04........EB04........8B5424")) { sVersion = "1.3.3.7"; bDetected = true; } else if (PE.compareEP("EB04........E828000000EB01..EB01..8B54240CEB04")) { sVersion = "1.3.3.8"; bDetected = true; } else if (PE.compareEP("EB02....E829000000EB03......EB01..8B54240CEB04")) { sVersion = "1.3.3.9"; bDetected = true; } else if (PE.compareEP("EB01..E82A000000EB04........EB02....8B54240CEB03")) { sVersion = "1.3.4.1"; bDetected = true; } else if (PE.compareEP("EB02....E826000000EB03......EB01..8B54240CEB02")) { sVersion = "1.3.4.2"; bDetected = true; } else if (PE.compareEP("EB03......E8........EB02....EB04........8B54240C")) { sVersion = "1.3.5.0"; bDetected = true; } else if (PE.compareEP("EB04........50EB04........E8........EB02....EB04........33C0")) { sVersion = "1.4.2.0"; bDetected = true; } else if (PE.compareEP("EB02....50EB04........E8........EB01..EB01..8B54240C")) { bDetected = true; } else if (PE.compareEP("EB04........50EB01..E8........EB02....EB01..33C0")) { bDetected = true; } else if (PE.compareEP("EB05..........50EB04........E8........EB02....EB04........33C0")) { bDetected = true; } else if (PE.compareEP("EB03......50EB02....E8........EB05..........EB04........33C0")) { bDetected = true; } else if (PE.compareEP("EB01..50EB01..E8........EB04........EB02....33C0")) { bDetected = true; } else if (PE.compareEP("EB01..50EB04........E8........EB03......EB03......33C0")) { bDetected = true; } else if (PE.compareEP("EB01..50EB01..E8........EB01..EB02....33C0")) { bDetected = true; } else if (PE.compareEP("EB01..50EB01..E8........EB05..........EB04........33C0")) { bDetected = true; } else if (PE.compareEP("EB05..........50EB02....E8........EB02....EB03......33C0")) { bDetected = true; } else if (PE.compareEP("EB01..50EB04........E8........EB04........EB01..33C0")) { bDetected = true; } else if (PE.compareEP("EB03......50EB04........E8........EB04........EB03......8B54240C")) { bDetected = true; } else if (PE.compareEP("EB04........50EB02....E8........EB03......EB02....8B54240C")) { bDetected = true; } else if (PE.compareEP("EB04........50EB05..........E8........EB01..EB02....33C0")) { bDetected = true; } else if (PE.compareEP("EB04........E8........EB01..EB01..8B54240C")) { bDetected = true; } else if (PE.compareEP("EB03......E8........EB04........EB01..8B54240C")) { bDetected = true; } else if (PE.compareEP("EB03......50EB02....E8........EB01..EB03......33C0")) { bDetected = true; } else if (PE.compareEP("EB04........50EB01..E8........EB02....EB04........33C0")) { bDetected = true; } else if (PE.compareEP("EB03......50EB03......E8........EB04........EB01..33C0")) { bDetected = true; } else if (PE.compareEP("EB04........50EB01..E8........EB03......EB04........33C0")) { bDetected = true; } else if (PE.compareEP("EB01..50EB01..E8........EB04........EB03......33C0")) { bDetected = true; } else if (PE.compareEP("EB03......50EB01..E8........EB03......EB02....33C0")) { bDetected = true; } else if (PE.compareEP("EB02....50EB02....E8........EB04........EB01..33C0")) { bDetected = true; } else if (PE.compareEP("EB04........50EB02....E8........EB03......EB05..........33C0")) { bDetected = true; } else if (PE.compareEP("EB01..50EB01..E8........EB02....EB03......33C0")) { bDetected = true; } else if (PE.compareEP("EB05..........50EB04........E8........EB04........EB03......33C0")) { bDetected = true; } else if (PE.compareEP("EB04........50EB01..E8........EB03......EB02....33C0")) { bDetected = true; } else if (PE.compareEP("EB05..........50EB02....E8........EB03......EB04........33C0")) { bDetected = true; } else if (PE.compareEP("EB04........50EB01..E8........EB04........EB04........33C0")) { bDetected = true; } else if (PE.compareEP("EB02....50EB01..E8........EB05..........EB01..33C0")) { bDetected = true; } else if (PE.compareEP("EB03......50EB04........E8........EB04........EB01..33C0")) { bDetected = true; } else if (PE.compareEP("EB03......50EB01..E8........EB01..EB02....33C0")) { bDetected = true; } else if (PE.compareEP("EB01..50EB05..........E8........EB05..........EB03......33C0")) { bDetected = true; } else if (PE.compareEP("EB03......50EB02....E8........EB04........EB02....33C0")) { bDetected = true; } else if (PE.compareEP("EB03......50EB02....E8........EB03......EB02....33C0")) { bDetected = true; } else if (PE.compareEP("EB01..50EB04........E8........EB01..EB05..........33C0")) { bDetected = true; } else if (PE.compareEP("EB05..........50EB01..E8........EB01..EB03......33C0")) { bDetected = true; } else if (PE.compareEP("EB05..........50EB04........E8........EB01..EB02....33C0")) { bDetected = true; } else if (PE.compareEP("EB04........50EB03......E8........EB04........EB03......33C0")) { bDetected = true; } else if (PE.compareEP("EB05..........50EB03......E8........EB01..EB01..33C0")) { bDetected = true; } else if (PE.compareEP("EB01..50EB03......E8........EB05..........EB03......33C0")) { bDetected = true; } else if (PE.compareEP("EB$$EB$$50EB$$E8$$$$$$$$EB$$B8........eb$$eb$$05........eb$$75..eb$$64ff30")) { bDetected = true; } else if (PE.compareEP("EB")) { var ep = PE.OffsetToVA(PE.getEntryPointOffset()); var byte = PE.readByte(PE.VAToOffset(ep) + 1); if (byte < 6) { ep = PE.getDisasmNextAddress(ep); byte = PE.readByte(PE.VAToOffset(ep)); if (byte == 0x50) { ep = PE.getDisasmNextAddress(ep); byte = PE.readByte(PE.VAToOffset(ep)); if (byte == 0xEB) { byte = PE.readByte(PE.VAToOffset(ep) + 1); if (byte < 6) { ep = PE.getDisasmNextAddress(ep); byte = PE.readByte(PE.VAToOffset(ep)); if (byte == 0xE8) { ep = PE.getDisasmNextAddress(ep + 5); byte = PE.readByte(PE.VAToOffset(ep)); if (byte == 0xEB) { byte = PE.readByte(PE.VAToOffset(ep) + 1); if (byte < 6) { ep = PE.getDisasmNextAddress(ep); if (PE.compare('8B54240C', PE.VAToOffset(ep)) || PE.compare('33C0', PE.VAToOffset(ep))) { sVersion = "1.4.X.X"; bDetected = true; } } } } } } } } } else if (PE.compareEP("eb08................eb03......50eb02")) { sVersion = "1.6b43"; bDetected = true; } else if (PE.compareEP("E84719")) { bDetected = true; } else if (PE.compareEP("EB$$E8....0000EB$$EB$$8B54240CEB")) { bDetected = true; } // Generic else if (PE.getEntryPointSection() == PE.nLastSection) { if (PE.compareEP("EB") && PE.getImportSection() >= 0 && PE.isOverlayPresent()) { bDetected = true; } } else if (PE.compareEP("EB")) { if (PE.compare("'ANTS'", PE.getEntryPointOffset() - 4)) { sOptions = "heuristic detection"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_OneVM.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/ZermangoLove/OneVM-Source-Code meta("protector", "OneVM"); function detect() { if (PE.isNet() && PE.isNetObjectPresent("Koi") && PE.isNetObjectPresent("OneVM.Runtime") && PE.isSignatureInSectionPresent(0, "72 .. .. .. .. 73 .. .. .. .. 7A") && // throw PE.isSignatureInSectionPresent(0, "%% 00 %% %% %% %% %% %% %% %% 00 %%")) { bDetected = true; if (PE.isNetUStringPresent("OneVM V2 BETA")) { sVersion = "2.0, beta"; } } return result(); } ================================================ FILE: db/PE/protector_Oreans_CodeVirtualizer.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Oreans CodeVirtualizer"); function detect() { if (PE.compareEP("eb$$e9$$$$$$$$e9$$$$$$$$565053e8$$$$$$$$584889c348ffc0482d........482d........4805........803b..75..c603..bb........68........68........5350e8")) { bDetected = true; } else if (PE.isSectionNamePresent(".vlizer")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PACE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://www.ilok.com/#!license-manager meta("protector", "PACE"); function detect() { if (PE.compareEP("833d..........75..E8........a3........e8$$$$$$$$56578b3d........8bc7e8........8bf085f674..5668........68........ff15")) { sVersion = "Eden wrapper"; bDetected = true; } if (PE.compareEP("558bec81ec........5356578d45..6a..5068........ff15........85c074..8b45..eb..8b75..6a..56ff15........85c075..66813e")) { sVersion = "InterLok"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PCShrink.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PCShrink"); function detect() { if (PE.compareEP("01AD........FFB5........6A40FF95")) { sVersion = "0.71 beta"; bDetected = true; } else if (PE.compareEP("9C60BD........01AD........FF..........6A..FF..........50502D........89..........5F8D")) { sVersion = "0.71"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PC_Guard.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PC Guard"); function detect() { if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "00000000000000000000000000000000fc5550e8000000005d60e80300000083")) { sVersion = "5.X"; bDetected = true; } } else if (PE.compareEP("fc5550e8000000005d60e8$$$$$$$$eb$$58eb$$40eb$$ffe0")) { sVersion = "5.04-5.05"; bDetected = true; } else if (PE.compareEP("fc5550e8$$$$$$$$5deb$$60e8")) { sVersion = "4.06"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PE-Armor.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PE-Armor"); function detect() { if (PE.compareEP("E8$$$$$$$$5D81ED050000008D753D56FF55318DB5860000005650FF552D898593000000")) { sVersion = "0.46"; bDetected = true; } else if (PE.compareEP("5652515355E81501000032....0000000000")) { sVersion = "0.49"; bDetected = true; } else if (PE.compareEP("60E8000000005D81ED........8DB5........555681C5........55C3")) { sVersion = "0.7X"; bDetected = true; } else if (PE.compareEP("558bec83c4..b8........e8$$$$$$$$5883ec..5de9$$$$$$$$60e8000000005d81ed........8db5........5556")) { sVersion = "0.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PE-Shield.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // Updated: DosX meta("protector", "PE-SHiELD"); function detect() { if (PE.compareEP("E9$$$$$$$$60E8$$$$$$$$5D83ED..EB$$8DB5........BA........8A3C1632FA80....80....88....4AEB")) { sVersion = "0.25"; bDetected = true; } else if (PE.compareEP("60E8$$$$$$$$5D83ED..EB$$8D....................8A....32..80....80....88......EB")) { sVersion = "0.25-0.26"; bDetected = true; } else if (PE.compareEP("60E8$$$$$$$$414e414b494e5d83ed..eb$$8d....................8a....32")) { sVersion = "0.2"; bDetected = true; } var peShieldSection = PE.section["PESHiELD"]; if (!bDetected) { if (PE.isImportPositionHashPresent(0, 0x3651f68d) && peShieldSection) { bDetected = true; } } else if (!peShieldSection) { sOptions = "modified"; } return result(); } ================================================ FILE: db/PE/protector_PEBundle.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PEBundle"); function detect() { if (PE.compareEP("9C60E802......33C08BC483C004938BE38B5BFC81EB........87DD")) { switch (PE.getEntryPointSignature(28, 2)) { case "6A04": sVersion = "0.2-2.0X"; break; case "01AD": sVersion = "2.0b5-2.3"; break; case "83BD": sVersion = "2.44"; break; case "80BD": sVersion = "3.XX"; break; } bDetected = true; if (!PE.isSectionNamePresentExp(/^(peb|PEB)undle$/)) { sOptions = "modified"; } } return result(); } ================================================ FILE: db/PE/protector_PECRYPT32.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PECRYPT32"); function detect() { if (PE.compareEP("e8000000005b83eb..eb$$85c073..f705................58eb$$56575550e8")) { sVersion = "1.02"; sOptions = "by random & killa"; bDetected = true; } else if (PE.compareEP("e8000000005b83eb..eb$$eb$$eb$$eb$$eb$$eb$$eb$$eb$$80bb..........74..83bb..........74..be........03f38bbb........eb")) { sVersion = "1.02"; sOptions = "by random & acpizer"; bDetected = true; } else if (PE.compareEP("e8000000005b83eb..8b83........538beb2bd82b9d........899d........5bbe........03f38b93........52ad0bc00f84........8983")) { sVersion = "0.0193c"; sOptions = "by random & acp"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PELock.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // Enhanced by: DosX meta("protector", "PELock"); function detect() { if (PE.isNet() || PE.is64()) return; // Doesn't support .NET or AMD64 files var bEnableNewEngine = true; // Need more researches if (bEnableNewEngine) { var da = "", clc = 0, stc = 0, movsx = 0, movzx = 0, sub = 0, imul = 0, bt = 0, bsf = 0; var ep = PE.OffsetToVA(PE.getEntryPointOffset()), count = 0; while (count < 1000) { count++; var da = PE.getDisasmString(ep); if (da.indexOf(' ') != -1) { da = da.slice(0, da.indexOf(' ')); } if (da == "CLC") { clc++; } if (da == "STC") { stc++; } if (da == "MOVSX") { movsx++; } if (da == "MOVZX") { movzx++; } if (da == "SUB") { sub++; } if (da == "IMUL") { imul++; } if (da == "BT" || da == "BTR" || da == "BTS" || da == "BTC") { bt++; } if (da == "BSF" || da == "BSR" || da == "BSWAP") { bsf++; } ep = PE.getDisasmNextAddress(ep); } if (clc > 0 && stc > 0 && movzx != 0 && (sub > imul || sub == 0 && imul == 0) && bt == 0 && bsf == 0) { bDetected = true; } } if (!bDetected) { if (PE.compareEP("6A6068........E8........BF94") || PE.isImportPositionHashPresent(0, 0xe1689d7c)) { sVersion = "2.X"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_PENinja.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PE Ninja"); function detect() { if (PE.compareEP("5D8BC581ED........2B85........2D710200008985........0FB6B5........8BFD")) { sOptions = "modified"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PESpin.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PESpin"); function detect() { if (!PE.is64()) { if (PE.compareEP("EB016860E8000000008B1C2483C312812BE8B10600FE4BFD822C24")) { switch (PE.readByte(PE.getEntryPointOffset() + 27)) { case 0x5C: sVersion = "0.1"; break; case 0xB7: sVersion = "0.3"; break; case 0x73: sVersion = "0.4"; break; case 0x83: sVersion = "0.7"; break; case 0xC8: sVersion = "1.0"; break; case 0x7D: sVersion = "1.1"; break; case 0x71: sVersion = "1.3, beta"; break; case 0xAC: sVersion = "1.3"; break; case 0x88: sVersion = "1.3X"; break; case 0x17: sVersion = "1.32"; break; case 0x77: sVersion = "1.33"; break; } bDetected = true; } } else if (PE.compareEP("554881EC900000008D6C2428488975..48897D..48895D..4C8945..4C894D..4C8955..4C895D..4C8965..4C896D..4C8975..4C897D..48894D..488955")) { sVersion = "1.2X"; bDetected = true; } else if (PE.compareEP("554881EC90000000488d6c24284889751848897d2048895d004c8945284c894d304c8955384c895d404c8965484c896d504c8975584c897d6048894d0848895510482bc94c8d05")) { sVersion = "1.23"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PETetris.2.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research meta("protector", "PETetris"); function detect() { if (PE.isSectionNamePresent("PETETRIS")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PE_Diminisher.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PE Diminisher"); function detect() { if (PE.compareEP("535152565755E8000000005D8BD581ED........2B95........81EA0B0000008995........80BD")) { sVersion = "0.1"; bDetected = true; } else if (PE.compareEP("5D8BD581ED........2B95........81EA0B......8995........80BD")) { sVersion = "0.1"; sOptions = "Alt"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PE_Encrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PE Encrypt"); function detect() { if (PE.compareEP("558BEC83C4D05356578D75FC8B442430250000FFFF8138'MZ'900074072D00100000EBF18945FC")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PE_Intro.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PE Intro"); function detect() { if (PE.compareEP("8B04249C60E8........5D81ED........80BD..........0F8548")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PE_Lock_NT.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PELOCKnt"); function detect() { if (PE.compareEP("EB03CD20EBEB01EB1EEB01EBEB02CD209CEB03CD")) { sVersion = "2.01"; bDetected = true; } else if (PE.compareEP("EB02C7851EEB03CD20EBEB01EB9CEB01EBEB02CD")) { sVersion = "2.02c"; bDetected = true; } else if (PE.compareEP("EB02C7851EEB03CD20C79CEB0269B160EB02EB01")) { sVersion = "2.03"; bDetected = true; } else if (PE.compareEP("EB$$1EEB$$9CEB$$EB$$60EB$$EB$$E8$$$$$$$$584050C3")) { sVersion = "2.04"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PE_Lock_Phantasm_by_Ding_Boy.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PE Lock Phantasm by Ding Boy"); function detect() { if (PE.compareEP("555756525153E8000000005D8BD581ED")) { sVersion = "0.07/0.8"; bDetected = true; } else if (PE.compareEP("5557565251536681C3EB02EBFC6681C3EB02EBFC")) { sVersion = "1.0/1.1"; bDetected = true; } else if (PE.compareEP("9C5557565251539CFAE8000000005D81ED")) { sVersion = "1.5b3"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PE_Password.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PE Password"); function detect() { if (PE.compareEP("E804......8BEC5DC333C05D8BFD81ED........81EF........83EF0589AD........8D9D........8DB5........4680")) { sVersion = "0.2"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PE_Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PE Protect"); function detect() { if (PE.compareEP("'\r\nPE-PROTECT 0.9 (C)o'", 64)) { sVersion = "0.9"; bDetected = true; } else if (PE.compareEP("525155576467A1300085C0780DE8........5883C007C6..C3")) { sVersion = "0.9"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PEncrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PEncrypt"); function detect() { if (PE.compareEP("609CBE........8BFEB9........BB78563412AD33C3ABE2FA9D61E9......FF")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("EB$$E8000000005D81ED........8DB5........E8330000008985")) { sVersion = "2.0"; bDetected = true; } else if (PE.compareEP("E8000000005D81ED........8DB5........8BFEB90F000000BB")) { sVersion = "3.0"; bDetected = true; } else if (PE.compareEP("E9......00F00FC6")) { sVersion = "3.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PEnguinCrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PEnguinCrypt"); function detect() { if (PE.compareEP("B8........55506764FF360000676489260000BD4B484342B804000000CC")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_PUNiSHER.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "PUNiSHER"); function detect() { if (PE.compareEP("EB0483A4BCCE60EB0480BC0411E800000000")) { sVersion = "1.5 demo"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Phoenix.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Phoenix"); function detect() { if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "0000010b160c..........0208..........0d0906085961d21304091e630861d21305070811051e62110460d19d081758")) { sVersion = "1.7-1.8"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "'?.resources'")) { sVersion = "1.X"; bDetected = true; } else if (PE.compareEP_NET("1b3002001c00000000000000280100000a280200000add01000000dc28070000")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Photo_Compiler.2.sg ================================================ // Detect It Easy: detection rule file // Author: A.S.L. 2019.10.20 meta("protector", "Photo Compiler"); function detect() { if (PE.compareEP("558bEC83C4F0B8") && PE.compareOverlay("'PK'")) { if (PE.isSignatureInSectionPresent(0, "'PhotoCompiler.Runtime'")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_PolyCrypt_PE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "JLabSoftware PolyCrypt PE"); function detect() { if (PE.compareEP("60e8$$$$$$$$918bf4adfec9803408..e2..c3")) { sVersion = "2004-2005"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Private_EXE_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Updated: DosX // https://github.com/NIKJOO/PEP meta("protector", "Private EXE Protector"); function detect() { if (PE.compareEP("558BEC83C4F4FC5357568B7424208B7C242466813E4A430F85A502000083C60A33DB")) { sVersion = "1.9.7"; bDetected = true; } else if (PE.compareEP("B8........B9..9001..BE........68........6801......C3")) { sVersion = "1.X"; bDetected = true; } else if (PE.compareEP("89....380000008B..0000000081..........89..0000000081..0400000081..0400000081..000000000F85D6FFFFFF")) { sVersion = "2.0"; bDetected = true; } else if (PE.compareEP("52ba........c702########....50....53....51....52....56..57....55....81ee")) { sVersion = "3.04"; bDetected = true; } else if (PE.compareEP("EB08....0000000000007.009C")) { sVersion = "4.0-4.12"; bDetected = true; } else if (PE.compareEP("EB08....0000000000007.0068")) { sVersion = "4.0-4.12"; bDetected = true; } else if (PE.compareEP("6064ff35........b9........89ce81c6........ba........bd........8b0683c6..8b1e89dffcf829c333dd31c3891e")) { sVersion = "4.X"; bDetected = true; } else if (PE.compareEP("51b9........c701........59ff35........c3")) { sVersion = "3.4.0"; bDetected = true; } else if (PE.compareEP("53bb........c703........5bff35........c3")) { sVersion = "3.4.0"; bDetected = true; } else if (PE.findSignature(PE.getEntryPointOffset(), 0xB00, "b900000000f3ae") != -1) { sVersion = "3.0.0-3.3.5"; bDetected = true; } else if (PE.findSignature(PE.getEntryPointOffset(), 0xB00, "b900000000f366") != -1) { sVersion = "3.0.0-3.3.5"; bDetected = true; } else if (PE.getNumberOfImports() == 1 && PE.getImportLibraryName(0) == "KERNEL32.DLL" && PE.getNumberOfImportThunks(0) == 1 && (PE.section[0].Characteristics == 0xc0000020 && PE.getEntryPointOffset() == 0x400 || PE.section[0].Characteristics == 0xe0000020 && PE.getEntryPointOffset() == 0x200 || PE.section[0].Characteristics == 0xe0000020 && PE.getEntryPointOffset() == 0x400 || PE.section[0].Characteristics == 0x60000020 && PE.getEntryPointOffset() == 0x400 || PE.section[0].Characteristics == 0xe0000080 && PE.getEntryPointOffset() == 0x400 || PE.section[0].Characteristics == 0xc0000040 && PE.getEntryPointOffset() == 0x400 || PE.section[0].Characteristics == 0xe0000060 && PE.getEntryPointOffset() == 0x400 || PE.section[0].Characteristics == 0xe0000040 && PE.getEntryPointOffset() == 0x400 || PE.section[0].Characteristics == 0xf0000040 && PE.getEntryPointOffset() == 0x400)) { sVersion = "2.00-2.25"; bDetected = true; } else if (PE.section.length >= 3) { if (PE.getNumberOfImports() == 1 && PE.getImportLibraryName(0) == "KERNEL32.DLL" && PE.getImportFunctionName(0, 0) == "ExitProcess") { if (PE.getAddressOfEntryPoint() == 0x1000 && PE.section[0].FileSize != 0x200 && PE.section[0].FileSize != 0x400 && PE.section[0].Characteristics == 0xe0000020) { bDetected = true; sVersion = "1.X"; } else if (PE.section[0].Characteristics == 0xe4000000 && PE.section[1].Characteristics == 0xC0000000 && PE.section[2].Characteristics == 0x50000040) { bDetected = true; sVersion = "1.7"; } } else if (PE.getNumberOfImports() == 1 || PE.getNumberOfImports() == 2) { if (PE.getImportLibraryName(0) == "KERNEL32.DLL") { if (PE.getNumberOfImportThunks(0) == 1) { var nSection = PE.nLastSection; if (PE.section[nSection].Name == ".rsrc") { nSection--; } if (PE.section[nSection].Characteristics == 0xE0000000 && PE.section[nSection - 1].Characteristics == 0xE0000000) { bDetected = true; sVersion = "2.X"; } } } } } if (!bDetected) { if (PE.isImportPositionHashPresent(0, 0xd89af68d)) { if (PE.isSectionNamePresent(".TRIAL!")) { sOptions = "demo"; bDetected = true; } else if (PE.isSectionNamePresent(".-PEP-")) { bDetected = true; } } } return result(); } ================================================ FILE: db/PE/protector_Protect_Disc.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Protect Disc"); function detect() { if (PE.compareEP("363e268ac060e8$$$$$$$$558bec83ec..b8........8b7d..2bf8e8")) { sVersion = "9.11.0"; sOptions = "Build " + getBuild(); bDetected = true; } else if (PE.compareEP("363e268ac060e8$$$$$$$$5f81ef........be........8b87........03c657568ca7")) { sVersion = "7.5.3"; sOptions = "Build " + getBuild(); bDetected = true; } return result(); } function getBuild() { return PE.readDword(PE.getEntryPointOffset() + 0x3e); } ================================================ FILE: db/PE/protector_Protection_Plus.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://www.softwarekey.com/blog/softwarekey-system-releases/protection-plus-4-6-0-8-and-instant-plus-3-2-0-4-released/ meta("protector", "Protection Plus"); function detect() { if (PE.compareEP("506029c064ff30e8........5d83ed..89e889a5........2b85........8985........8d85........508b0085c00f85")) { sVersion = "4.X"; bDetected = true; } else if (PE.isImportPositionHashPresent(0, 0x174efb84) && PE.compare("'{4A6E2EB8-0392-4258-9C91-65BB5FF8F1F9}'", PE.getEntryPointOffset() - 0x27)) { sName += " Wrapper"; sVersion = "4.6+"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_QrYPt0r.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "QrYPt0r"); function detect() { if (PE.compareEP("EB$$E8$$$$$$$$64FF3500000000")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_QuickBFC.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://www.abyssmedia.com/quickbfc/ meta("protector", "Quick Batch File Compiler"); function detect() { var textSection = PE.section[".text"]; if (PE.isSectionNamePresent(".didata") && textSection && PE.isResourceNamePresent("SRC") && PE.isSignaturePresent(textSection.FileOffset, textSection.FileSize, "'batfilerecord'")) { bDetected = true; } sLang = "Batch"; return result(); } ================================================ FILE: db/PE/protector_QuickPack_NT.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "QuickPack NT"); function detect() { if (PE.compareEP("4d5a90eb$$52e9$$$$$$$$e8$$$$$$$$5d8dad........8d9d........8d......506a..68........55ff53")) { sVersion = "0.1a"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_REVProt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "REVProt"); function detect() { if (PE.compareEP("e8$$$$$$$$31c064ff30648920648f05........83c4..60e8$$$$$$$$83c4..e8$$$$$$$$5d81ed........60b9")) { sVersion = "0.1a"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_RLP.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "RLP"); function detect() { if (PE.isSectionNamePresent(".rlp")) { sVersion = "0.7.3b"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_ReNET-pack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "ReNET-pack"); function detect() { if (PE.isNet() && PE.isSignatureInSectionPresent(0, "'Protected/Packed with ReNET-Pack by stx'")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_RobustObfuscator.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://robustify.xyz/ meta("protector", "Robust Obfuscator"); function detect() { if (PE.isNet() && PE.isNetGlobalCctorPresent() && PE.isSignatureInSectionPresent(0, "00 20 .. .. .. .. FE 0E .. .. 20 .. .. .. .. 20 .. .. .. .. 20 .. .. .. .. 61 20 .. .. .. .. 20 .. .. .. .. 5F 20 .. .. .. ..")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_SC_Obfuscator.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "SC Obfuscator"); function detect() { if (PE.compareEP("6033c98b1d........031d........8a041984c074..3c..74..34..880419413b0d........75..a1........0105........61ff25")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_SDProtector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "SDProtector"); function detect() { if (PE.compareEP("558BEC6AFF68........688888880864A1")) { if (PE.compareEP("5083EC08", 42)) { sVersion = "1.10"; } else if (PE.compareEP("1833C0", 77)) { sVersion = "1.16"; } else { sVersion = "1.1X"; } bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_SLVc0deProtector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "SLVc0deProtector"); function detect() { var nLastSection = PE.nLastSection; if (PE.section[nLastSection].Characteristics == 0xA0000020) { if ((PE.section[nLastSection].VirtualSize & 0xFF) && (PE.section[nLastSection].FileSize & 0xFF)) { if (PE.section[nLastSection].VirtualAddress == PE.getAddressOfEntryPoint()) { sVersion = "0.61"; bDetected = true; } } } else if (PE.compareEP("E80000000058C600EBC6400108FFE0E952")) { sVersion = "1.12"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_SVK_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "SVK Protector"); function detect() { if (PE.compareEP("60EB03C784E8EB03C7849AE8000000005D81ED10000000EB03C784E964A023000000EB")) { sVersion = "1.051"; bDetected = true; } else if (PE.compareEP("60E8........5D81ED06......64A023")) { sVersion = "1.11"; bDetected = true; } else if (PE.compareEP("60E8000000005D81ED06000000EB05B8........64A023")) { sVersion = "1.3X-1.4X"; bDetected = true; } else if (PE.compareEP("E8000000005D81ED06000000EB05B8........64A023")) { bDetected = true; } else if (PE.compareEP("60E8000000005D81ED0600000074..75........64a023")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Safedisc.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://ru.wikipedia.org/wiki/SafeDisc meta("protector", "SafeDisc"); function detect() { if (PE.compareEP("558bec60bb........33c98a0d........85c974..b8........2bc383e8..eb")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Safenet_RMS.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Safenet RMS (Sentinel)"); function detect() { if (PE.compareEP("558bec81ec........535657c785................c745..........c745..........c745..........c785................c745..........8b45..a3........833d..........74..e9")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Safengine_Shielden.2.sg ================================================ // Detect It Easy: detection rule file // Authors: hors, sendersu // If errors pls contact sendersu on cracklab.team meta("protector", "Safengine Shielden"); function detect() { if (PE.compareEP("E8........5361")) { if (PE.section[PE.nLastSection].FileSize == 0x1000 && PE.section[PE.nLastSection].VirtualSize == 0x1000) { sVersion = "2.X"; bDetected = true; } else if (PE.section[PE.nLastSection].FileSize == 0x2000 && PE.section[PE.nLastSection].VirtualSize == 0x2000) { bDetected = true; } } if (PE.compareEP("EB$$E9$$$$$$$$E8........'Safengine Shielden'")) { sVersion = "2.X"; bDetected = true; } if (PE.compareEP("E8........'Shielden'")) { var nOffset = PE.findString(PE.getEntryPointOffset(), 0x50, "Shielden v"); if (nOffset != -1) { sName = "Shielden" sVersion = PE.getString(nOffset + 10); bDetected = true; } } if (bDetected == 1) { // try to deduce specific version from payload (if present) var nOffset = PE.findString(0, PE.getSize(), "Safengine Shielden v") if (nOffset != -1) { sVersion = PE.getString(nOffset + 19) } } return result(); } ================================================ FILE: db/PE/protector_SecuROM.2.sg ================================================ // Detect It Easy: detection rule file // Authors: ELF_7719116, DosX meta("protector", "SecuROM"); function detect() { if (PE.section[PE.nLastSection].Name === ".securom") { sVersion = "pre-8.03.03"; bDetected = true; } else if (PE.section[".dsstext"]) { sVersion = "8.03.03+"; bDetected = true; } else if (PE.compareOverlay("'AddD'03")) { var nOffset = PE.getOverlayOffset(); sVersion = PE.getString(nOffset + 8); bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Secure_Shade.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Secure Shade"); function detect() { if (PE.compareEP("558bec81ec........535657be........8d7d..8d45..a5a5a5a56a..50a4e8........8b1d........595968........ffd3")) { sVersion = "1.8"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Shrink_Wrap.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Shrink Wrap"); function detect() { if (PE.compareEP("58608BE85533F6684801....E84901....EB")) { sVersion = "1.4"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Shrinker.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Shrinker"); function detect() { if (PE.compareEP("558BEC565775656800010000E8F1E6FFFF83C404")) { sVersion = "3.2"; bDetected = true; } else if (PE.compareEP("558BEC565775656800010000E8")) { sVersion = "3.3"; bDetected = true; } else if (PE.compareEP("558BEC5657756B6800010000E8110B000083C404")) { sVersion = "3.4"; bDetected = true; } else if (PE.compareEP("833D..........558BEC565775..68........e8........83....8b....a3........85F674..68")) { sVersion = "3.2"; bDetected = true; } else if (PE.compareEP("833D..........558BEC565775..68........e8........83....8b....a3........85F674..83")) { sVersion = "3.5"; bDetected = true; } else if (PE.compareEP("833DB4........558BEC5657756B6800010000E8..0B000083C4048B7508A3B4......85F67423837D0C03771D68FF")) { sVersion = "3.4"; bDetected = true; } else if (PE.compareEP("803D..........53568b7424..575575..85f674..68........8b3d........68........56ffd7")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_SimbiOZ.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "SimbiOZ"); function detect() { if (PE.compareEP("5060E8000000005D81ED0710400068800B00008D851F10400050E8840B0000")) { bDetected = true; } else if (PE.compareEP("57578D7C240450B800......AB585FC3")) { sVersion = "1.3"; bDetected = true; } else if (PE.compareEP("55508BC483C004C700........58C390")) { sVersion = "2.1"; bDetected = true; } else if (PE.compareEP("5560E8000000005D81ED........8D85........68........50E8")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Sixxpack.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Sixxpack"); function detect() { if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "00'actmp.dll'00'stub'00'Sixxpack'00")) { sVersion = "2.2"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "0021......'xpack!'00................'xpack'00")) { sVersion = "2.4"; bDetected = true; } else if (PE.isNetObjectPresent("Sixxpack")) { sVersion = "2.X"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_Skater.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Skater"); function detect() { if (PE.isNet()) { if (PE.compareEP_NET("4228070000066f09000006283800000a2a1b3004006f0000000d0000110272b9")) { sVersion = "2.X"; bDetected = true; } else if (PE.isSignatureInSectionPresent(0, "'RustemSoft.Skater'")) { bDetected = true; } } if (bDetected && PE.isSignatureInSectionPresent(0, "4F0062006600750073006300610074006F0072002000440065006D006F00")) { sOptions = "demo"; } return result(); } ================================================ FILE: db/PE/protector_Smart_Assembly.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Smart Assembly"); function detect() { if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "20ffffff005f175920ffff0000")) { sVersion = "3.X"; bDetected = true; } else if (PE.isNetObjectPresent("Powered by {smartassembly}")) { sVersion = "1.X-4.X"; bDetected = true; } else if (PE.isNetObjectPresent("Powered by SmartAssembly")) { sVersion = "5.X"; bDetected = true; } else if (PE.isNetObjectPresent("SmartAssembly.Attributes")) { bDetected = true; } else if ((nOffset = PE.findString(PE.section[0].FileOffset, PE.section[0].FileSize, "Powered by SmartAssembly ")) != -1) { sVersion = PE.getString(nOffset + 25); bDetected = true; } else { var nEPSection = PE.getEntryPointSection(); if (nEPSection != -1) { if ((nOffset = PE.findString(PE.section[nEPSection].FileOffset, PE.section[nEPSection].FileSize, "Powered by {smartassembly}")) != -1) { bDetected = true; } } } } return result(); } ================================================ FILE: db/PE/protector_SmokesCrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "SmokesCrypt"); function detect() { if (PE.compareEP("60B8........B8........8A140880F2..8814084183F9..75F1")) { sVersion = "1.2"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_SoftProtect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "SoftProtect"); function detect() { if (PE.compareEP("E8....00008D85....0000C70000000000E8....0000E8....00008D85....000050E8....000083")) { bDetected = true; } else if (PE.compareEP("EB01E360E803......D2EB0B58EB014840EB0135FFE0E76160E803")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_SoftSentry.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "SoftSentry"); function detect() { if (PE.compareEP("558BEC83EC..535657E9")) { if (PE.compareEP("50", 10)) { sVersion = "2.11"; } else if (PE.compareEP("B006", 10)) { sVersion = "3.0"; } bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Special_EXE_Password_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Special EXE Password Protector"); function detect() { if (PE.compareEP("60E8000000005D81ED0600000089AD8C0100008BC52B85FE75000089853E")) { sVersion = "1.0X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_SpicesNet.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // 25.11.2018 added 5.X Version - A.S.L - asl@onet.eu meta("protector", "Spices.Net"); function detect() { if (PE.isNet()) { if (PE.isNetObjectPresent("NineRays.Obfuscator")) { if (PE.isSignaturePresent(PE.section[1].FileOffset - 512, 512, "'Built using an evaluation version of 9Rays.Net Spices.Obfuscator.'")) { sOptions = "demo"; } bDetected = true; } if (!bDetected) { var spicesSignature = "'9Rays.Net Spices.Net Obfuscator'"; if (PE.isDll()) { if (PE.isSignatureInSectionPresent(1, spicesSignature) || PE.isSignatureInSectionPresent(0, spicesSignature)) { sVersion = "5.X"; sOptions = "DLL"; bDetected = true; } } } else { if (PE.isSignatureInSectionPresent(0, spicesSignature)) { sVersion = "5.X"; bDetected = true; } } } return result(); } ================================================ FILE: db/PE/protector_StarForce.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "StarForce"); function detect() { if (PE.compareEP("68........FF25....63")) { sVersion = "3.0"; bDetected = true; } else if (PE.compareEP("68........FF25....57")) { sVersion = "1.1"; sOptions = "ProActive"; bDetected = true; } else if (PE.compareEP("5768..0D01006800....00E850..FFFF68......0068......0068......0068......0068......00")) { sOptions = "Protection Driver"; bDetected = true; } else if (PE.compareEP("E8........000000000000")) { sVersion = "3.X"; bDetected = true; } else if (PE.compareEP("60e8000000005883c008") && PE.isSectionNamePresent(".brick")) { sVersion = "3.4"; bDetected = true; } else if (PE.compareEP("68........FF25........0000000000")) { sVersion = "3.X"; bDetected = true; } else if (PE.isLibraryPresent("protect.dll")) { sVersion = PE.getPEFileVersion(PE.getFileDirectory() + "/protect.dll"); if (!sVersion) { if (PE.isSectionNamePresent(".ps4")) { sVersion = "4.X-5.X"; bDetected = true; } else if (PE.isSectionNamePresent(".sforce3")) { sVersion = "3.X"; bDetected = true; } } } else { if (PE.isSectionNamePresent(".ps4")) { for (var i = 0; i < PE.getNumberOfImports(); i++) { if (PE.getNumberOfImportThunks(i) == 1 && (!PE.getImportFunctionName(i, 0) || PE.getImportFunctionName(i, 0) == "1")) { var sLibraryName = PE.getImportLibraryName(i); sVersion = PE.getPEFileVersion(PE.getFileDirectory() + "/" + sLibraryName); if (!sVersion) { sVersion = "4.X-5.X"; } sOptions = sLibraryName; bDetected = true; break; } } } } return result(); } ================================================ FILE: db/PE/protector_Ste@lth_PE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Ste@lth PE"); function detect() { if (PE.findSignature(PE.getSize() - 0x40, 0x40, "ba........b8........8902424242b8........89024a4a4affd2") != -1) { sVersion = "2.X"; bDetected = true; } else if (PE.findSignature(PE.getSize() - 0x40, 0x40, "b8........ba........8910404040ba........891048484850c3") != -1) { sVersion = "2.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Tages.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // http://www.tagesprotection.com/main.htm meta("protector", "TAGES"); function detect() { if (PE.compareEP("8925........e8$$$$$$$$6a..6a..c705................e8$$$$$$$$8b4424..0faf4424..506a..ff15........50ff15........c3")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Themida.2.sg ================================================ // Detect It Easy: detection rule file // Author: ajax // History: // 21:54 17.01.2013 add 1.X and 2.x // 20.09.2013 add 2.X for x64 meta("protector", "Themida/Winlicense"); function detectThemida() { var sResult = ""; if (PE.section.length >= 4) { var nEntryPointSection = PE.getEntryPointSection(); if (PE.getResourceSection() == 1 && PE.getImportSection() == 2) { if (PE.getAddressOfEntryPoint() == PE.section[nEntryPointSection].VirtualAddress) { if (PE.calculateEntropy(PE.section[0].FileOffset, PE.section[0].FileSize) >= 7.5) { if (nEntryPointSection == 3) { sResult = "1.X"; } else if (nEntryPointSection > 3) { sResult = "2.X"; } } } } } return sResult; } function detect() { if (PE.is64() && PE.compareEP("4883EC085053E801000000CC584889C348FFC0482D........482D........4805........803BCC75..C60300")) { sVersion = "2.X"; } else if (PE.isNet()) { if (PE.isSignatureInSectionPresent(0, "b8000000006011c0")) { sVersion = "1.9"; } else if (PE.isSignatureInSectionPresent(0, "83ec048053e80100")) { sVersion = "2.X"; } } else if (PE.compareEP("B8........600BC074..E8000000005805..0000008038E975")) { switch (PE.readByte(PE.getEntryPointOffset() + 9)) { case 0x58: sVersion = "1.0.X.X-1.8.0.0"; break; case 0x68: sVersion = "1.8.X-1.9.X"; break; } sOptions = "Compressed"; } else if (PE.compareEP("558BEC83C4D860E8000000005A81EA........8BDAC745D8000000008B45D8408945D8817DD880000000")) { sVersion = "1.0.X.X-1.8.X.X"; sOptions = "NoCompression"; } else if (PE.compareEP("8BC58BD460E8000000005D81ED........8995........89B5........8985........83BD")) { sVersion = "1.X"; sOptions = "NoCompression SecureEngine"; } else if (PE.compareEP("83EC045053E801000000CC588BD840")) { sVersion = "2.0.1.0-2.1.8.0"; } else if (PE.compareEP("51b9........85c974$$59e9$$$$$$$$83ec..5053............5889c3402d........2d........05........803b..75..c603..bb........68........68........5350")) { sVersion = "2.0.1.0-2.1.8.0"; } else if (PE.compareEP("83EC045053E801000000CC5889C3402D........2D........05........803BCC75..C60300")) { sVersion = "2.X"; } else if (PE.compareEP("E9$$$$$$$$8bc58bd460e8")) { sVersion = "1.1.X-1.2.X"; } else if (PE.compareEP("eb$$e9$$$$$$$$e9$$$$$$$$565053e8$$$$$$$$5889c3402d")) { bDetected = true; } else if (PE.isImportPositionHashPresent(0, 0x3ffccc8a) && PE.isImportPositionHashPresent(1, 0x4b2fc056)) { sVersion = "1.XX-2.XX"; } else if (PE.isSectionNamePresent(".themida")) { sVersion = "3.XX"; } else if (PE.isSectionNamePresent(".winlice")) { sVersion = "3.XX, Winlicense"; } else if (PE.section[0].Name == " " && PE.isImportPositionHashPresent(0, 0x3ffccc8a)) { sVersion = "~2.XX"; } else if (PE.section[0].Name == " " && PE.isImportPositionHashPresent(0, 0x3651f68d)) { bDetected = true; } else { var sThemidaVersion = detectThemida(); if (sThemidaVersion) { sVersion = sThemidaVersion; } } bDetected = bDetected || Boolean(sVersion) || Boolean(sOptions); if (bDetected && PE.isFunctionPresent("_CorExeMain")) sOptions = "DotNET"; return result(); } ================================================ FILE: db/PE/protector_Thinstall.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Thinstall(VMware ThinApp)"); function detect() { if (PE.compareEP("6A00FF1520504000E8D4F8FFFFE9E9ADFFFFFF8BC18B4C2404898829040000C7400C010000000FB64901D1E9894810C7401480000000C204008B442404C7410C010000008981290400000FB64001D1E8894110C741")) { sVersion = "2.403"; bDetected = true; } else if (PE.compareEP("558BECB8........BB........50E800000000582D..1A0000B9..1A0000BA..1B0000BE00100000BF..530000BD..1A000003E8817500..........7504........817508........81750C........817510")) { sVersion = "2.5XX"; bDetected = true; } else if (PE.compareEP("558BEC515356576A006A00FF15........50E887FCFFFF5959A1........8B40100305........8945FC8B45FCFFE05F5E5BC9C3000000")) { sVersion = "1.9X"; bDetected = true; } else if (PE.compareEP("B8EFBEADDE506A00FF15........E9..FFFFFF")) { switch (PE.readByte(PE.getEntryPointOffset() + 15)) { case 0xAD: sVersion = "2.0X"; break; case 0xB9: sVersion = "2.2X-2.308"; break; } bDetected = true; } else if (PE.compareEP("E8F2FFFFFF5068........68401B0000E842FFFFFFE99DFFFFFF000000000000")) { sVersion = "2.545"; bDetected = true; } else if (PE.compareEP("E80000000058BB....00002BC35068........68....000068")) { switch (PE.readWord(PE.getEntryPointOffset() + 7)) { case 0x80C1: sVersion = "2.547-2.600"; break; case 0x19AD: sVersion = "2.609"; break; case 0x1EAC: sVersion = "2.620-2.623"; break; case 0x1D34: sVersion = "2.628"; break; default: sVersion = "2.6XX"; } bDetected = true; } else if (PE.compareEP("9C60E80000000058BB........2BC35068........68........68........E8........E9")) { sVersion = "2.7XX"; bDetected = true; } else if (PE.compareEP("9C6068'StAl'68'ThIn'E80000000058BB........2BC35068")) { if (PE.compareEP("0028", 32)) { sVersion = "3.035-3.043"; } else if (PE.compareEP("002C", 32)) { sVersion = "3.049-3.080"; } else if (PE.compareEP("BAFE", 42)) { sVersion = "3.0XX"; } else if (PE.compareEP("2CFF", 42)) { sVersion = "3.10X"; } bDetected = true; } else if (PE.compareEP("b8........e8........482be08d50..4533c033c9e8........85c075..b9........ff15")) { sVersion = "5.0"; bDetected = true; } else if (PE.isOverlayPresent()) { if (PE.nLastSection >= 1 && PE.section[1].Name == ".res") { sVersion = "4.7.X"; bDetected = true; } } if (PE.compareEP("6a..6a..6a..e8$$$$$$$$8bff558bec837d....75..e8$$$$$$$$8bff558bec83ec..a1........8365")) { if (PE.compareOverlay("09050000")) { sVersion = "5.2.2"; bDetected = true; } } if (PE.compareEP("6a..6a..6a..e8$$$$$$$$558bec837d....75..e8$$$$$$$$558bec83ec..8365....8365....a1")) { if (PE.compareOverlay("09050000")) { sVersion = "5.2.4"; bDetected = true; } } if (bDetected) { var _sVersion = PE.getVersionStringInfo("ThinAppVersion"); if (_sVersion) { sVersion = _sVersion; } } return result(); } ================================================ FILE: db/PE/protector_UG2002_Cruncher.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "UG2002 Cruncher"); function detect() { if (PE.compareEP("60E8........5D81ED........E80D................................58")) { sVersion = "0.3b3"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_UPX_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "UPX Protector"); function detect() { if (PE.compareEP("EB..........8A064688074701DB75078B1E83EEFC11DB")) { sVersion = "1.0X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_UPolyX.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "UPolyX"); function detect() { if (PE.compareEP("81FD00FBFFFF83D1..8D142F83FDFC76..8A02428807474975")) { sVersion = "0.X"; bDetected = true; } else if (PE.compareEP("E2..FF..0000000000000000000000000000")) { sVersion = "0.1"; bDetected = true; } else if (PE.compareEP("558BEC..00BD46008B..B9..00000080....51")) { sVersion = "0.5"; bDetected = true; } else if (PE.compareEP("BB........83EC04891C24..B9..0000008033")) { sVersion = "0.5"; bDetected = true; } else if (PE.compareEP("E8000000005983C10751C3C3")) { sVersion = "0.5"; bDetected = true; } else if (PE.compareEP("EB01C3")) { sVersion = "0.5"; bDetected = true; } else if (PE.compareEP("83EC0489..2459....000000")) { sVersion = "0.5"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_UltraPro.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "UltraPro"); function detect() { if (PE.compareEP("A1........85C00F853B0600005556C705........01000000FF15")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("60E8070000006168....4000C383042418C32083B8ED2037EFC6B979379E61")) { sVersion = "0.75"; bDetected = true; } else if (PE.compareEP("83EC04C7042400......C300....000000000000000000000000....001000000002000001")) { sVersion = "1.03-1.10"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_VBox.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "VBox"); function detect() { if (PE.compareEP("ff7424..ff7424..ff7424..68........68........68........68........ff15")) { if (PE.isLibraryPresent("vboxp410.dll")) { sVersion = "4.10"; bDetected = true; } } if (PE.findSignature(PE.getEntryPointOffset(), 0x1000, "558bec83c4..5657be........8b45..8946..ff75..8f46..8b45..8946..56") !== -1) { sVersion = "4.20"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_VCasm-Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "VCasm-Protector"); function detect() { if (PE.compareEP("558BEC6AFF68........68........64A1000000005064892500000000E803000000")) { sVersion = "1.0X"; bDetected = true; } else if (PE.compareEP("EB..'[VProtect]'")) { if (PE.compareEP("..0A")) { sVersion = "1.0e"; } else if (PE.compareEP("..0B")) { sVersion = "1.1-1.2"; } else { sVersion = "1.X"; } bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_VMProtect.2.sg ================================================ // Detect It Easy: detection rule file // Authors: ajax, hypn0, DosX // https://vmpsoft.com/ meta("protector", "VMProtect"); function detect() { if (PE.isNet()) return; // Native files only var nNumberOfSections = PE.getNumberOfSections(); var sVMPSectionName; for (var i = nNumberOfSections - 1; i >= 0; i--) { if (i == PE.getRelocsSection() || i == PE.getResourceSection()) { continue; } if (PE.getSectionName(i)) { sVMPSectionName = PE.getSectionName(i); if (i > 0 && sVMPSectionName == ".vmp0") { bDetected = true; break; } else if (i > 1 && (sVMPSectionName.substr(sVMPSectionName.length - 1) == "1")) { var sCollision = PE.getSectionNameCollision("0", "1"); if (PE.isSectionNamePresent(sCollision + "1")) { bDetected = true; break; } } else if (i > 2 && (sVMPSectionName.substr(sVMPSectionName.length - 1) == "2")) { var sCollision = PE.getSectionNameCollision("1", "2"); if (PE.isSectionNamePresent(sCollision + "1") && PE.isSectionNamePresent(sCollision + "0")) { bDetected = true; break; } } else if (i > 3 && (sVMPSectionName.substr(sVMPSectionName.length - 1) == "3")) { var sCollision = PE.getSectionNameCollision("2", "3"); if (PE.isSectionNamePresent(sCollision + "2") && PE.isSectionNamePresent(sCollision + "1") && PE.isSectionNamePresent(sCollision + "0")) { bDetected = true; break; } } } break; } if (bDetected) { if (PE.is64()) { sVersion = "2.XX-3.XX"; } if (sVMPSectionName) { if (sVMPSectionName.substr(sVMPSectionName.length - 1) == "0") { sOptions = "min protection"; } } if (PE.isImportPositionHashPresent(-1, 0x1ff3103f)) { sVersion = "1.70"; } else if (PE.isImportPositionHashPresent(-1, 0x0c16df2d)) { sVersion = "1.70"; sOptions = "max protection"; } else if (PE.isImportPositionHashPresent(-1, 0x9d12b153)) { sVersion = "2.0.3-2.13"; } else if (PE.isImportPositionHashPresent(-1, 0x1e5500c1)) { sVersion = "3.0.0"; } else if (PE.isImportPositionHashPresent(-1, 0xc5fb6a4b)) { sVersion = "3.0.9"; } else if (PE.isImportPositionHashPresent(-1, 0x5caa99c7)) { sVersion = "3.2.0-3.5.0"; } } var bEnableNewEngine = true; // Need more researches if (bEnableNewEngine && !bDetected && PE.isDeepScan()) { var da = "", das = "", res = 0, jmp = 0; var ep = PE.OffsetToVA(PE.getEntryPointOffset()), count = 0; while (das.substr(0, das.indexOf('+')) != "MOV EDX, DWORD PTR [EAX*4 " && das.substr(0, das.indexOf('+')) != "MOV EBX, DWORD PTR [EAX*4 " && das.substr(0, das.indexOf('+')) != "MOV ECX, DWORD PTR [EAX*4 " && count < 1000) { count++; var byte = PE.readByte(PE.VAToOffset(ep)), da = PE.getDisasmString(ep), das = da; if (da.indexOf(' ') != -1) { da = da.substr(0, da.indexOf(' ')); } var fresh = 0; if ((byte == 0xFF && da == "JMP") || ((byte == 0xC3 || byte == 0xC2) && da == "RET")) { fresh = 1; break; } if (byte == 0xFF && da == "CALL") break; if (da.indexOf(' ') != -1) da = da.substr(0, da.indexOf(' ')); if (da == "CLC" || da == "CMC") { res++; } if (da == "PUSHFD") { res++; } if (da == "PUSHAL") { res++; } if (da == "XOR") { res++; } if (da == "NEG" || da == "NOT") { res++; } if (da == "SAR" || da == "SAL") { res++; } if (da == "JMP" || da == "CALL") { jmp++; } if (da == "BT" || da == "BTR" || da == "BTS" || da == "BTC") { res++; } if (da == "BSF" || da == "BSR" || da == "BSWAP") { res++; } if (da == "ROL" || da == "ROR" || da == "RCL" || da == "RCR") { res++; } ep = PE.getDisasmNextAddress(ep); } if (res > 10 && count < 200) { if (fresh == 1) { sVersion = "new"; } else { sVersion = "old"; } sOptions = "DS"; bDetected = true; } } // packer detection var kernel32Count = 0; for (var i = 0; i < PE.getNumberOfImports(); i++) { if (PE.getImportLibraryName(i) === "KERNEL32.dll") { kernel32Count++; } if (kernel32Count >= 2) { if (PE.is64() && PE.compare("4D 5A ?? 00 ?? 00 00 00 04 00 ?? 00 FF FF 00 00 B8 00 00 00 00 00 00 00 40 00 ?? 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 ?? ?? ?? 0E ?? B4 09 CD 21 B8 01 4C CD")) { bDetected = true; sOptions = sOptions.append("packed"); } break; } } return result(); } function detectVmp(sSectionName) { if (PE.section[sSectionName]) { var nCharacteristics = PE.section[sSectionName].Characteristics; if (nCharacteristics == 0x60000060 || nCharacteristics == 0xE0000060 || nCharacteristics == 0xE0000040 || nCharacteristics == 0x68000060 || nCharacteristics == 0xe2000060) return true; } return false; } function detectVmp2() { if (PE.section.length > 7) { var nCount = 5, nResource = PE.getResourceSection(), nRelocs = PE.getRelocsSection(); if (nResource > PE.section.length - nCount) nCount++; if (nRelocs > PE.section.length - nCount) nCount++; var nDetectCount = 0, nLastVMPSection = 0; for (var nSection = PE.section.length - nCount; nSection < PE.section.length; nSection++) { if (nSection == nResource || nSection == nRelocs) continue; if (PE.section[nSection].FileSize == 0 && PE.section[nSection].FileOffset == 0) nDetectCount++; if (PE.section[nSection].FileSize != 0 && PE.section[nSection].FileOffset != 0) nLastVMPSection = nSection; } if (nDetectCount >= 3) { if (PE.getEntryPointSection() == nLastVMPSection) { if (PE.section[nLastVMPSection].Characteristics == 0xE0000060) { if (PE.calculateEntropy(PE.section[nLastVMPSection].FileOffset, PE.section[nLastVMPSection].FileSize) > 7.6) { return true; } } else if (PE.section[nLastVMPSection].Characteristics & 0x20000000) { // Fix sent Deniskore var nSectionOffset = PE.section[nLastVMPSection].FileOffset, nSectionSize = PE.section[nLastVMPSection].FileSize, nOffset = nSectionOffset, nSize = nSectionSize, nCount = 0, nSignatureOffset = 0; while (nSize > 0) { nSignatureOffset = PE.findSignature(nOffset, nSize, "9c8d64"); if (nSignatureOffset == -1) break; nCount++; nOffset = nSignatureOffset + 3; nSize = nSectionSize - (nSignatureOffset - nSectionOffset); if (nCount >= 2) { return true; } } } } } } return false; } /* function detect_old() { if (PE.section[".vmp0"] && (PE.compareEP("68........E9") || PE.compareEP("68........E8"))) { sVersion = "1.60-2.05"; bDetected = true; } else if (detectVmp(".vmp0") || detectVmp(".vmp1") || detectVmp(".vmp2")) { bDetected = true; } else if (PE.compareEP("54c70424........9c60c74424..........c64424....887424..60")) { sVersion = "2.06"; bDetected = true; } else if (PE.compareEP("e8$$$$$$$$e9$$$$$$$$880424881c24c70424........9ce8")) { sVersion = "2.07"; bDetected = true; } else if (PE.compareEP("9ce8$$$$$$$$e8$$$$$$$$c74424..........e9$$$$$$$$e8$$$$$$$$c74424..........526068")) { sVersion = "2.12-13"; bDetected = true; } else if (PE.compareEP("9c9cc74424..........9cc74424..........9c528d6424..e9")) { sVersion = "2.12-13"; bDetected = true; } else if (PE.compareEP("68........e8$$$$$$$$41574150448ac350410f96c057415148c7c7")) { sVersion = "3.0X"; bDetected = true; } else { var collision = PE.getSectionNameCollision("0", "1"); if (collision) { if (PE.compareEP("68........E9") || PE.compareEP("68........E8")) { sVersion = "1.X"; bDetected = true; } else if (PE.compareEP("9cE9") || PE.compareEP("9cFF")) { sVersion = "2.X"; bDetected = true; } else if (detectVmp(collision + "0") && detectVmp(collision + "1")) { bDetected = true; } } if (!bDetected && detectVmp2()) { sVersion = "2.X"; bDetected = true; } } if (bDetected) { if (PE.section.length < 3 || (PE.section.length == 3 && PE.section[0].FileSize == 0)) { bDetected = false; } } } */ ================================================ FILE: db/PE/protector_VMProtect_NET.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://vmpsoft.com/ meta("protector", "VMProtect"); function detect() { if (PE.isNet() && PE.isNetGlobalCctorPresent() && PE.getNumberOfSections() >= 3 && PE.isNetObjectPresent("SuppressIldasmAttribute") && PE.isNetObjectPresent("kernel32") && PE.isNetObjectPresent("get_IsAttached") && PE.isNetObjectPresent("OpCodes")) { const chunk = "%% %% %% %% %% %% %% %% 00", // chunk size is 8 bytes scanBytes = PE.getSize() - PE.getOverlaySize(); var globalBigPattern = "00"; for (var i = 0; i < 12; i++) { globalBigPattern += chunk; } var firstSection = PE.section[0]; if (PE.isSignaturePresent(firstSection.FileOffset, scanBytes, "'' 00" + chunk) && PE.isSignaturePresent(firstSection.FileOffset, scanBytes, globalBigPattern)) { sVersion = "3.X"; bDetected = true; } if (bDetected) { if (PE.isSignaturePresent(firstSection.FileOffset, scanBytes, generateUnicodeSignatureMask("Program will be terminated."))) { // Unicode [global] string sOptions = "Resources protection"; } var sectionNameCollision = PE.getSectionNameCollision("0", "1"); if (sectionNameCollision === ".vmp") { sVersion = "2.X-3.X"; } else if (sectionNameCollision) { sOptions += (sOptions.length != 0 ? " + " : "") + "Custom sections"; } bDetected = bDetected && !PE.isNetObjectPresent("VMProtect"); // fake signature } } return result(); } function generateUnicodeSignatureMask(inputString) { var output = ""; for (var c = 0; c < inputString.length; c++) { output += (c != 0 ? "00" : "") + "'" + inputString[c] + "'"; } return output; } // Hello Ivan Permyakov and thanks for your contribution to Open Source! ================================================ FILE: db/PE/protector_VaySoft_PDF2EXE.2.sg ================================================ // Detect It Easy: detection rule file // Author: A.S.L meta("protector", "VaySoft PDF to EXE Converter"); function detect() { if (PE.compareEP("558BECB9")) { if (PE.compareOverlay("255B484220322A")) { sOptions = "PDF Adv.Xor Ovl."; sVersion = "6.82"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/protector_VbsToExe.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // sign by A.S.L - asl@onet.eu // fixed by adoxa meta("protector", "Vbs To Exe"); function detect() { if (PE.resource["D"]) { if (PE.compare("'2edecompile'", PE.resource["D"].Offset + 2)) { sVersion = "2.0.2.0"; bDetected = true; } else if (PE.resource["D"].Size == 14 && PE.isResourceNamePresent("B") && PE.isResourceNamePresent("F") && PE.isResourceNamePresent("I") && PE.isResourceNamePresent("N") && PE.isResourceNamePresent("O")) { sVersion = "2.0.2.0"; bDetected = true; } if (bDetected) { if (PE.isResourceNamePresent("P")) { sOptions = "Protected"; } } } sLang = "VBScript"; return result(); } ================================================ FILE: db/PE/protector_Virbox.2.sg ================================================ // Detect It Easy: detection rule file // Author: Vito <@ScalletaZ> meta("protector", "Virbox"); function detect() { if (PE.compare("'SENS'", 40)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_XCR.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "XCR"); function detect() { if (PE.compareEP("9371..EB$$EB$$8BD878$$EB$$9C33C0EB$$74$$EB$$6079..EB$$E8$$$$$$$$83C4..E8$$$$$$$$8D05........EB$$5D85ED75")) { sVersion = "0.13"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Xenocode_Postbuild.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Xenocode Postbuild"); function detect() { if (PE.isNetObjectPresent("Xenocode.Client.Attributes.AssemblyAttributes")) { sVersion = "2.X-3.X"; bDetected = true; } else if (PE.isSectionNamePresent(".xcpad") && PE.compareOverlay("'xvm'0001")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_XerinFuscator.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("protector", "XerinFuscator"); function detect() { if (PE.isNet()) { if (PE.isNetObjectPresent("XerinAtrribute")) { // At[rr]ibute <- developer mistake const sectionToCheck = PE.section[0].Name === ".text" ? PE.section[0] : PE.section[1], versionStringOffset = PE.findString(sectionToCheck.FileOffset, sectionToCheck.FileSize, "XerinFuscator v"); if (versionStringOffset != -1) { sVersion = PE.getString(versionStringOffset + 15, 0x15); bDetected = true; if (PE.isNetObjectPresent("Xerin.Runtime")) sOptions = "XVM"; } } else { if (PE.isNetUStringPresent("C# version only supports level 1 and 3") && PE.getNumberOfSections() > 1 && PE.section[0].Name !== ".text") { bDetected = true; } if (!bDetected && PE.isSectionNamePresent(".Xerin")) { sVersion = "Legacy"; bDetected = true; } } } return result(); } ================================================ FILE: db/PE/protector_Xtreamlok.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "Xtreamlok (SoftWrap)"); function detect() { if (PE.compareEP("9090eb$$525351565755e8000000005d81ed........e8$$$$$$$$6a..e9")) { sVersion = "1.X-3.X"; bDetected = true; } else if (PE.compareEP("90eb$$525351565755e8000000005d81ed........e8$$$$$$$$6a..e9")) { sVersion = "1.X-3.X"; bDetected = true; } else if (PE.compareEP("909090eb$$525351565755e8000000005d81ed........e8$$$$$$$$6a..e9")) { sVersion = "1.X-3.X"; bDetected = true; } else if (PE.compareEP("eb$$525351565755e8000000005d81ed........e8$$$$$$$$6a..e9")) { sVersion = "1.X-3.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Yano.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://yano.informer.com/ meta("protector", "Yano"); function detect() { if (PE.isNetObjectPresent("YanoAttribute")) { sVersion = "1.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Yodas_Protector.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Yoda's Protector"); function detect() { if (PE.compareEP("558BEC535657E8$$$$$$$$E8$$$$$$$$33C064FF30648920CCC3")) { sVersion = "1.01"; bDetected = true; } else if (PE.compareEP("E8$$$$$$$$BB........E8$$$$$$$$E8$$$$$$$$33c064ff306489204bccc3") && PE.section[PE.nLastSection].Name !== ".inq") { sVersion = "1.02-1.03"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Yummy_Game_SoftwareShield.2.sg ================================================ // Detect It Easy: detection rule file // Author: Levis meta("protector", "Yummy Game SoftwareShield"); function detect() { if (PE.compareEP("31C0E9B9FFFFFFC3")) { sVersion = "5.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_Zprotect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Zprotect"); function detect() { if (PE.section.length > 3) { if (PE.section[0].FileOffset == 0 && PE.section[0].FileSize == 0) { if (!PE.isDosStubPresent()) { if (PE.compare("6B65726E656C33322E646C6C000000005669727475616C416C6C6F6300000000", PE.section[1].FileOffset)) { sVersion = "1.X"; bDetected = true; } else if ((PE.getEntryPointSection() == 1) && (PE.calculateEntropy(PE.section[2].FileOffset, PE.section[2].FileSize) > 7.6)) { sVersion = "1.X"; bDetected = true; } } } } if (PE.compareEP("e8$$$$$$$$87..248d..........87..24e9$$$$$$$$60e9$$$$$$$$54e9")) { bDetected = true; } // TODO EP NFD return result(); } ================================================ FILE: db/PE/protector_bambam.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "bambam"); function detect() { if (PE.compareEP("6A14E89A050000....5368........E86CFDFFFF")) { sVersion = "0.01"; bDetected = true; } else if (PE.compareEP("4d5a90eb$$52e9$$$$$$$$eb$$64a1........eb$$8b48......eb$$05........eb$$668138")) { sVersion = "0.1"; bDetected = true; } else if (PE.getNumberOfImports() === 0 && PE.isImportPositionHashPresent(0, 0xb5b153cd)) { bDetected = true; } if (bDetected && !PE.isSectionNamePresent(".bedrock")) { sOptions = "modified"; } return result(); } ================================================ FILE: db/PE/protector_beria.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "Beria"); function detect() { if (PE.compareEP("83EC18538B1D0030....555657683007000033ED55FFD38BF03BF5740D89AE20070000E8880F0000EB0233F66A105589353040....FFD38BF03BF57409892EE83CFEFFFFEB0233F66A18558935D843....FFD38BF0")) { sVersion = "0.07"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_eXPressor.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://www.cgsoftlabs.ro/express.html meta("protector", "eXPressor"); function detect() { if (PE.compareEP("E935140000E931130000E998120000E9EF0C0000E94213")) { sVersion = "1.0"; } else if (PE.compareEP("E915130000E9F0120000E958120000E9AF0C0000E9AE02")) { sVersion = "1.1"; } else if (PE.compareEP("558BEC81EC....0000535657EB0C'ExPr-v.1.2.'")) { sVersion = "1.2"; } else if (PE.compareEP("558BEC83EC..535657EB0C'ExPr-v.1.3.'")) { sVersion = "1.3"; } else if (PE.compareEP("558BEC83EC..535657EB0C'ExPr-v.1.4.'")) { sVersion = "1.4"; } else if (PE.compareEP("8BEC83EC..5356578365....F3EB0C'eXPr-v.1.4.'")) { sVersion = "1.4"; } else if (PE.compareEP("558BEC83EC..5356578365..00F3EB0C'eXPr-v.1.4.'00")) { sVersion = "1.4.5.X"; } else if (PE.compareEP("558BEC81EC........53565783A5..........F3EB0C'eXPr-v.1.5.'00")) { sVersion = "1.5.0.X"; } else if (PE.compareEP("558BEC81EC........53565783A5..........F3EB0C'eXPr-v.1.6.'")) { sVersion = "1.6"; } else if (PE.compareEP("..68........E8$$$$$$$$....81EC........53565783A5..........F3EB0C'eXPr-v.1.6.'")) { sVersion = "1.6"; } else if (PE.compareEP("6a..68........E8$$$$$$$$....81EC........53565783A5..........F3EB0C'eXPr-v.1.6.'")) { sVersion = "1.6"; } else if (PE.compareEP("6a..6a..6a..6a..68........E8$$$$$$$$....81EC........53565783A5..........F3EB0C'eXPr-v.1.6.'")) { sVersion = "1.6"; } else if (PE.compareEP("EB0168EB01........83EC0C535657EB01..833D........007408EB01E9E956010000EB02")) { bDetected = true; } else if (PE.compareEP("68########eb$$eb$$558bec83ec..535657eb$$833d..........74")) { sVersion = "1.6.1"; } else if (PE.compareEP("68........C3")) { if (PE.section.length >= 3 && PE.section[0].FileSize == 0 && PE.section[2].Name == ".code") { sVersion = "1.5-1.6"; } } bDetected = bDetected || Boolean(sVersion); return result(); } ================================================ FILE: db/PE/protector_hmimys_Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "hmimys Protect"); function detect() { if (PE.compareEP("5E83C664AD50AD5083EE6CAD50AD50AD50AD50AD50E8")) { sVersion = "0.1"; bDetected = true; } else if (PE.compareEP("E8BA000000..00000000....00..............00......0000....00......00......00......00......00......00..00000000000000......000000000000000000......00......000000000000000000")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("ba........ffe2ba........b8........890283c2..b8........890283c2..ffe2")) { sVersion = "0.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_iPB_Protect.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "iPB Protect"); function detect() { if (PE.compareEP("558BEC6AFF68'KCUF'68'TIHS'64A100000000")) { sVersion = "0.1.3-0.1.7"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_kkryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "k.kryptor"); function detect() { if (PE.compareEP("eb$$60e8........5e8d....b9........4933c05102....d3c04979..33....5900")) { sVersion = "3"; bDetected = true; } return result(); } ================================================ FILE: db/PE/protector_tElock.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("protector", "tElock"); function detect() { if (PE.compareEP("668BC08D2424EB01EB60EB01EB9CE8000000005E83C6508BFE68")) { sVersion = "0.41X"; bDetected = true; } else if (PE.compareEP("C1EE00668BC9EB01EB60EB01EB9CE8000000005E83C6")) { switch (PE.readByte(PE.getEntryPointOffset() + 22)) { case 0x52: sVersion = "0.4X"; break; case 0x5E: sVersion = "0.5X"; break; } bDetected = true; } else if (PE.compareEP("E90000000060E8000000005883C008")) { sVersion = "0.60"; bDetected = true; } else if (PE.compareEP("60E8....0000C383")) { switch (PE.readWord(PE.getEntryPointOffset() + 2)) { case 0x10BD: sVersion = "0.70"; break; case 0x10ED: sVersion = "0.71"; break; case 0x1144: sVersion = "0.71b2"; break; case 0x1148: sVersion = "0.71b7"; break; case 0x11F9: sVersion = "0.80"; break; default: sVersion = "0.7X-0.84"; } bDetected = true; } else if (PE.compareEP("60E802000000CD20E8000000005E2BC9587402")) { sVersion = "0.85f"; bDetected = true; } else if (PE.compareEP("....E802000000E800E8000000005E2B")) { sVersion = "0.90"; bDetected = true; } else if (PE.compareEP("E9....FFFF")) { if (PE.compareEP("E97EE9")) { sVersion = "0.92a"; bDetected = true; } else if (PE.compareEP("E9D5E4")) { sVersion = "0.95"; bDetected = true; } else if (PE.compareEP("E959E4")) { sVersion = "0.96"; bDetected = true; } else if (PE.compareEP("E925E4")) { sVersion = "0.98b1"; bDetected = true; } else if (PE.compareEP("E91BE4")) { sVersion = "0.98b2"; bDetected = true; } else if (PE.compareEP("E999D7")) { sVersion = "0.98 Special Build"; bDetected = true; } else if (PE.compareEP("E95EDF")) { sVersion = "0.99"; bDetected = true; } else if (PE.compareEP("E93FDF")) { sVersion = "0.99c"; bDetected = true; } else if (PE.compareEP("E9E5E2")) { sVersion = "1.00"; bDetected = true; } } else if (PE.compareEP("668bc08d2424609ce8000000005dd14d")) { sVersion = "0.35"; bDetected = true; } return result(); } ================================================ FILE: db/PE/rar.6.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood includeScript("rar-file"); function detect() { detect_RAR(0); return result(); } ================================================ FILE: db/PE/sfx_12Ghosts_Zip2.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 // https://12ghosts-zip.apponic.com/ meta("sfx", "12Ghosts Zip2"); function detect() { if (PE.compareEP("E8$$$$$$$$558BEC83EC..A1........8365....8365....5357BF........3BC7BB........74")) { if (PE.isSignaturePresent(PE.getOverlayOffset(), 0x1000, "'BZh91'")) { sOptions = "BZIP2"; sVersion = "8.0"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_7z.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("sfx", "7-Zip"); function detect() { if (PE.compareOverlay("';!@Install@!UTF-8!'")) { sType = "installer"; var sManifest = PE.getManifest(); var aVersion = sManifest.match(/(\n?)version="(.*?)"/); if (aVersion) { sVersion = aVersion[2]; if (aVersion[1]) { sOptions = "new"; } } else if (aVersion = sManifest.match(/Archive v(\d.*?)<\/desc/)) { sVersion = aVersion[1]; } bDetected = true; } else if (PE.compareOverlay("'7z'BCAF271C")) { bDetected = true; } else if (PE.compareOverlay("efbbbf';!@Install@!UTF-8!'")) { sType = "installer"; bDetected = true; } if (bDetected) { if (PE.getVersionStringInfo("InternalName") == "7z.sfx" || PE.getVersionStringInfo("InternalName") == "7zS2.sfx") { sVersion = PE.getVersionStringInfo("FileVersion"); if (!sVersion) { sVersion = PE.getFileVersion().replace(/\.0\.0$/, ""); } } if (!sVersion && PE.section[".rdata"]) { var nVersionOffset = PE.findString(PE.section[".rdata"].FileOffset, PE.section[".rdata"].FileSize, "7-Zip version:"); if (nVersionOffset != -1) { sVersion = PE.getString(nVersionOffset + 16, 4); } } } return result(); } ================================================ FILE: db/PE/sfx_ARJSFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("sfx", "ARJSFX"); function detect() { if (PE.compareEP("a1........c1e0..a3........575133c0bf........b9........3bcf76..2bcffcf3aa595f64678b16....8b42..a3")) { if (PE.compareOverlay("c0ab........60ea")) { sName += "32"; bDetected = true; } } else if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { if (PE.compareOverlay("60ea")) { bDetected = true; } else { for (var i = 0; i < PE.resource.length; i++) { if (PE.resource[i].Type == 730) { // ARJDATA bDetected = true; break; } } } } else if (PE.compareEP("558bec83c4..e8$$$$$$$$e8........6a..e8........8905........e8........8905")) { for (var i = 0; i < PE.resource.length && !bDetected; i++) { if (PE.resource[i].Type == 1001) { if (PE.compare("60ea", PE.getResourceOffsetByNumber(i))) { bDetected = true; } } } } return result(); } ================================================ FILE: db/PE/sfx_ARQ.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "ARQ"); function detect() { if (PE.compareOverlay("67570402")) { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83....5356578965..ff15")) { bDetected = true; } else if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_Abbyy_Lingvo.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Abbyy Lingvo"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83c4..5356578965..ff15")) { if (PE.compare("'ArcUpdateABBYY'00", PE.getSize() - 15)) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_Active_Delivery.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Active Delivery"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec605356578965..ff15") && PE.section["actdlvry"] && PE.compare("'AD01'", PE.section["actdlvry"].FileOffset)) { bDetected = true; } return result(); } ================================================ FILE: db/PE/sfx_Cab.1.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood meta("sfx", "Microsoft Cabinet"); function detect() { var overlayOffset = PE.getOverlayOffset(); if (PE.compareOverlay("'wextract'", 16)) { // The version is probably for what's being installed, not what's doing // the installing; it does seem, though, the raw product version is for // the installer itself. Take a punt, anyway. overlayOffset = PE.findSignature(overlayOffset - 0xE00, 0xE00, "BD04EFFE00000100"); if (overlayOffset !== -1) { overlayOffset += 16; sVersion = PE.readWord(overlayOffset + 2) + "." + PE.readWord(overlayOffset) + "." + PE.readWord(overlayOffset + 6) + "." + PE.readWord(overlayOffset + 4); } bDetected = true; } else if (/sfxcab/.test(PE.getManifest())) { var rsrcSection = PE.section[".rsrc"]; // There's two version resources, locate the second. if (rsrcSection) { var overlayOffset = rsrcSection.FileOffset + rsrcSection.VirtualSize; overlayOffset = PE.findSignature(overlayOffset - 0x600, 0x600, "BD04EFFE00000100"); if (overlayOffset !== -1) { overlayOffset += 8; sVersion = PE.readWord(overlayOffset + 2) + "." + PE.readWord(overlayOffset) + "." + PE.readWord(overlayOffset + 6) + "." + PE.readWord(overlayOffset + 4); } } bDetected = true; } else if (/wextract/i.test(PE.getVersionStringInfo("InternalName"))) { sVersion = PE.getFileVersion().trim(); bDetected = true; } else if (PE.compareEP("558bec81ec........535657ff15........a3........ff15........a1........6625....3d") && PE.compare("'MSCF'00000000", 0x5000)) { bDetected = true; } else if (PE.compareEP("6a..68........e8........66813d............75..a1........81b8................75..") && PE.compareOverlay("'MSCF'00000000")) { bDetected = true; } else if (PE.compareEP("e9$$$$$$$$558bec81ec........830d..........5356576a..33dbbf........68........895d..881d")) { bDetected = true; } if (PE.getNumberOfResources() > 0) { if (PE.compare("'MSCF'00000000", PE.getResourceNameOffset("CABINET"))) { bDetected = true; } if (PE.compare("'MSCF'00000000", PE.getResourceNameOffset("IDR_CABFILE"))) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_Chilkat_ZIP_Self-Extractor.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Chilkat ZIP Self-Extractor"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15") && PE.compareOverlay("07d26cbf2159abaa0100000000")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/sfx_CoffeeCup_SFX.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "CoffeeCup"); function detect() { if (PE.compareEP("558bec83c4..33c08945..b8........e8........33c05568........64ff306489206a..68........6a") && PE.compareOverlay("'MPU'00")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/sfx_DelZip_SFX.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "DelZip"); function detect() { if (PE.compareEP("558bec83c4..33c08945..b8........e8........33c05568........64ff306489206a..68........6a") && PE.compareOverlay("'MPV'")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/sfx_Dimd_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Dimd"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15")) { if (PE.compareOverlay("........'DIMDMSCF'")) { sOptions = "CAB SFX"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_Envoy_Packager.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Envoy Packager"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15") && PE.compareOverlay("b297e169")) { sOptions = "1994 by Novell, Inc."; bDetected = true; } return result(); } ================================================ FILE: db/PE/sfx_GZip.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "GZip"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83....5356578965")) { for (var i = 0; i < PE.resource.length && !bDetected; i++) { if (PE.compare("1f8b08", PE.resource[i].Offset)) { bDetected = true; } } } else if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { if (PE.compareOverlay("1f8b08")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_GkSetup.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "GkSetup SFX"); function detect() { if (PE.findString(PE.getOverlayOffset(), Math.min(0x300, PE.getOverlaySize()), "/SFX") != -1) { if (PE.compareEP("e9$$$$$$$$5351525589e583ec..b8........e8........a1........83c0..24..31d229c489e18b1d")) { sOptions = "1998 by Gero Kuehn"; bDetected = true; } else if (PE.compareEP("5668........33f668........56ff15........56ff15........a3........e8........85c074..a1")) { sOptions = "1999 by Gero Kuehn"; bDetected = true; } } else if (PE.compareOverlay("'2.00'")) { if (PE.compareEP("5633f656ff15........a3........e8........85c074..a1........8b40..48")) { sVersion = "2.0"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_INFTool.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "INFTool"); function detect() { if (PE.compareEP("558bec83c4..e8$$$$$$$$e8........6a..e8........8905........e8........8905........c705")) { if (PE.findString(0, PE.getOverlayOffset(), "INFTool.pkg") !== -1) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_KRZIP_SFX.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "KRZIP"); function detect() { if (PE.compareEP("558bec83c4..53565733c08945..b8........e8........33c05568........64ff30648920a1........8378")) { if (PE.compareOverlay("''")) { sOptions = "by Kryloff Technologies, Inc."; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_LZH_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "LZH SFX"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50a1........648925........8b0d") && (PE.compareOverlay("....'-lh5-'") || PE.compareOverlay("........'-lh7-'"))) { sVersion = "2.60.w32.0031"; sOptions = "by Yoshi 1991 / mH 1995 / Micco 1997-99"; bDetected = true; } return result(); } ================================================ FILE: db/PE/sfx_Lyme_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Lyme SFX"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15") && PE.compareOverlay("789c")) { sOptions = "zlib"; bDetected = true; } return result(); } ================================================ FILE: db/PE/sfx_MP-ZipTool.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "MP-ZipTool SFX32"); function detect() { if (PE.compareEP("558bec83c4..33c08945..b8........e8........33c05568........64ff306489206a..68........6a")) { if (PE.compareOverlay("'MPU'0d")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_MPQ.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Blizzard MPQ"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83c4..5356578965..ff15")) { if (PE.compareOverlay("'MPQ'1a20")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_NanoZip.1.sg ================================================ // Detect It Easy: detection rule file // Author: LinXP meta("sfx", "NanoZip"); function detect() { if (PE.compareEP("60be........8dbe........5789e58d9c24........31c05039dc75") && PE.compareOverlay("AE01'NanoZip 0.09 alpha'")) { sVersion = "0.09a"; sOptions = "nz_w32c.sfx"; bDetected = true; } return result(); } ================================================ FILE: db/PE/sfx_PKSFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("sfx", "PKSFX"); function detect() { if (PE.compareEP("558bec6a..68........68........64a100000000506489250000000083c4..535657")) { if (PE.compareOverlay("'PK'090a")) { sVersion = "2.50"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_Paquet.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Paquet"); function detect() { if (PE.compareEP("558bec81c4........53565733c08985........8985........e8........e8")) { if (PE.compareOverlay("04'PBG'")) { sVersion = "1.5, 1998 by Guillaume Di Giusto"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_Quantum.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Quantum"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { for (var i = 0; i < PE.resource.length; i++) { if (PE.compare("'DS'00", PE.resource[i].Offset)) { bDetected = true; break; } } } return result(); } ================================================ FILE: db/PE/sfx_SZDD.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "SZDD"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83c4..5356578965..ff15")) { for (var i = 0; i < PE.resource.length; i++) { if (PE.resource[i].Type == 2128) { // FILE if (PE.compare("'SZDD'", PE.resource[i].Offset)) { bDetected = true; break; } } } } else if (PE.compareEP("a1........c1e0..a3........575133c0bf........b9........3bcf76..2bcffcf3aa595f")) { for (var i = 0; i < PE.resource.length; i++) { if (PE.resource[i].Type == "RT_RCDATA") { if (PE.compare("'SZDD'", PE.resource[i].Offset)) { sOptions = "1997 by Khaled Mardam-Bey"; bDetected = true; break; } } } } else if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) { for (var i = 0; i < PE.resource.length; i++) { if (PE.resource[i].Type == "RT_RCDATA") { if (PE.compare("'SZDD'", PE.resource[i].Offset)) { sOptions = "1997 by Klever Co."; bDetected = true; break; } } } } return result(); } ================================================ FILE: db/PE/sfx_Squeez_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Squeez SFX"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..33db895d..6a..ff15")) { if (PE.compareOverlay("'SQ5SFX'")) { sVersion = "6.0.0.0"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_WinACE.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("sfx", "WinACE"); function detect() { if (/WinACE|UNACE/i.test(PE.getVersionStringInfo("InternalName"))) { sVersion = PE.getVersionStringInfo("FileVersion"); bDetected = true; } return result(); } ================================================ FILE: db/PE/sfx_WinIMP.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "WinIMP"); function detect() { if (PE.compareEP("51526a..2eff15........506a..6a..2eff15........50e8........502eff15........5a59c3")) { if (PE.compareOverlay("'IMP'0a")) { sOptions = "1999 by Technelysium Pty Ltd"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_WinImage.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "WinImage"); function detect() { if (PE.compareEP("64a1........558bec6a..68........68........50a1........648925........8b0d........83ec..89018b15")) { if (PE.compareOverlay("'RsDl'")) { sOptions = "1998 by Gilles Vollant"; bDetected = true; } else if (PE.compare("'WSfxPK'0304", PE.getOverlayOffset() + 0xC)) { sVersion = "0.90"; sOptions = "1993-97 by Gilles Vollant"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_WinPatch.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "WinPatch Apply Program by Artistry, Inc."); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83....535657")) { if (PE.compareOverlay("'@Daisy@Lucy@xyzzy@'................1f8b08")) { sOptions = "1996-1998 (gzip)"; bDetected = true; } else if (PE.compareOverlay("'@Daisy@Lucy@xyzzy@'1f8b08")) { sOptions = "1996-1998 (gzip)"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_WinRAR.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("sfx", "WinRAR"); function detect() { if (PE.isNet()) return; // Doesn't support .NET var isPkOverlay = PE.compareOverlay("'PK'"); if (isPkOverlay || PE.compareOverlay("'Rar!'")) { if (PE.resource["STARTDLG"] && PE.resource["LICENSEDLG"] || PE.resource["INSTALL"] && PE.resource["SETUP"]) { if (isPkOverlay) { sOptions = "ZIP"; } bDetected = true; } } if (PE.compareEP("e8$$$$$$$$53bb........e8........85c074..33d28a1083fa..75..40eb")) { if (PE.compareOverlay("'Rar!'1a")) { bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_WinZip.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("sfx", "WinZip"); function detect() { if (PE.compareEP("ff15........b1..380874..b1..4080....74..380874..4080....75..80....74..4033")) { sVersion = "6.X"; bDetected = true; } else if (PE.compareEP("53ff15........b3..38..74..80c3..4033d28a083aca74..3acb74..408a083aca75")) { if (PE.findSignature(PE.getOverlayOffset(), Math.min(255, PE.getOverlaySize()), "504b0304") != -1) { sVersion = "2.2"; } else if (PE.compareEP("8A48014033D23ACA740A3ACB74068A4801", 16)) { sVersion = "8.X"; } bDetected = true; } else if (PE.compareEP("53ff15........b3..38..74..80c3..8a48..4033d23aca74..3acb74..8a48..40")) { sVersion = "8.X"; bDetected = true; } else if (PE.compareEP("e8$$$$$$$$558bec83ec..a1........8365....8365....5357bf........3bc7bb........74..85c374..f7d0")) { for (var i = 0; i < PE.resource.length && !bDetected; i++) { if (PE.resource[i].Type != "RT_DIALOG") { if (PE.findSignature(PE.resource[i].Offset, Math.min(PE.resource[i].Size, 0x1100), "'PK'0304") != -1) { bDetected = true; } } } if (PE.isSectionNamePresent("_winzip_")) { bDetected = true; } } if (PE.isSectionNamePresent("_winzip_")) { if (PE.findSignature(PE.getSectionFileOffset(PE.getSectionNumber("_winzip_")), 0x1000, "'PK'0304") != -1) { sVersion = "3.1"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_ZipCentral_SFX.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "ZipCentral SFX-32"); function detect() { if (PE.compareEP("558BEC83C4..33C089....B8........e8........33c05568........64....64....6a")) { if (PE.compareOverlay("'MPV*'")) { sVersion = "2.0"; sOptions = PE.getGeneralOptions(); bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_Zip_SFX.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "Zip SFX"); function detect() { if (PE.compareEP("558bec6a..68........68........64a1........50648925........83....5356578965..ff15")) { if (PE.findSignature(PE.getOverlayOffset(), Math.min(255, PE.getOverlaySize()), "'PK'0304") != -1) { bDetected = true; } } else if (PE.compareEP("558bec83c4..b8........e8........33c05568........64ff30648920e8")) { if (PE.resource.length) { if (PE.resource[0].Type == 784) { // ZIP bDetected = true; } } } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb")) { if (PE.compareOverlay("'PK'0304")) { sOptions = "by Intel"; bDetected = true; } } if (PE.compareEP("558bec83c4..5356e8$$$$$$$$e8........6a..e8........8905........e8........8905")) { if (PE.compareOverlay("'PK'0304")) { sOptions = "by C.Ghisler & Co."; bDetected = true; } } if (PE.compareEP("558becb8........e8........5356be........578d45..5633db5053ff15........85c00f84")) { if (PE.findSignature(PE.getOverlayOffset(), 0x1000, "'PK'0304") != -1) { sOptions = "by Symantec"; bDetected = true; } } if (PE.compareEP("83ec..5657ff15........8bf08d4424..50c74424..........ff15........8a068b3d........3c..75..56ffd7")) { if (PE.compareOverlay("'PK'0304")) { sName = "SymW32SFX"; sOptions = "by Symantec"; bDetected = true; } } if (PE.compareEP("558bec83ec..565733ffff15........8bf0897d..8d45..50ff15........8a063c..75..56ff15")) { if (PE.compareOverlay("'PK'0304")) { sName = "Symantec EasyZIP SFX"; bDetected = true; } } if (PE.compareEP("558bec83ec..56ff15........8bf08a003c..75..84c074..803e..74..46803e..75..803e..75..46eb")) { if (PE.findSignature(PE.getOverlayOffset(), 0x2000, "'PK'0304") != -1) { sOptions = "Squeez SFX by SpeedProject 1995-1998"; bDetected = true; } } if (PE.compareEP("6a..33c0505050ff15........50e8$$$$$$$$55b8........8bece8........53b9........5657be")) { if (PE.compareOverlay("'PK'0304")) { sOptions = "EasyZIP SFX by AKSoft 1995-1996"; bDetected = true; } } return result(); } ================================================ FILE: db/PE/sfx_rar.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "RAR"); function detect() { if (PE.compareEP("558bec83c4..535657e8........e8........33c05568........64ff30648920e8")) { for (var i = 0; i < PE.resource.length && !bDetected; i++) { if (PE.compare("'rar!'", PE.resource[i].Offset)) { bDetected = true; } } } return result(); } ================================================ FILE: db/PE/sign_tool_Windows_Authenticode.7.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // Rewritten by: DosX meta("sign tool", "Windows Authenticode"); function detect() { if (PE.isSigned()) { sVersion = "2.0"; sOptions = "PKCS #7"; bDetected = true; if (!PE.compareOverlay("00020200", 0x04)) { sOptions = sOptions.append("after overlay"); } } return result(); } ================================================ FILE: db/PE/tool_AHTeam_UPX_Mutanter.2.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research meta("tool", "AHTeam UPX Mutanter"); function detect() { if (PE.compareEP("94 bc 61 62 4d 00 b9 .. 00 00 00 80 34 0c .. e2")) { sOptions = "Method 2"; bDetected = true; } if (PE.compareEP("94 bc .. b9 4d 00 b9 .. 00 00 00 80 34 0c .. e2")) { sOptions = "Method 1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/tool_Microsoft_VisualStudio_NET.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("tool", "Microsoft Visual Studio"); function detect() { if (PE.isNet() && PE.isSignatureInSectionPresent(0, "590100'KMicrosoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator'")) { bDetected = true; } return result(); } ================================================ FILE: db/PE/tool_UPX-Patcher.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://github.com/DosX-dev/UPX-Patcher meta("tool", "UPX-Patcher"); function detect() { var dosxSection = PE.section[".dosx"], fishSectionByIndex = dosxSection ? PE.section[dosxSection + 1] : undefined; if (PE.getNumberOfSections() > 2 && fishSectionByIndex && dosxSection && fishSectionByIndex.Name === ".fish") { bDetected = true; var is64 = PE.is64(); if (!PE.isDll()) { if (PE.compareEP(is64 ? "53" : // push rbx (x64) "55" // push ebp (x86) )) { sOptions = (is64 ? "x64" : "x86") + " mode"; // Custom EP } else { bDetected = false; } } } return result(); } ================================================ FILE: db/PE/tool_UPXFreak.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("tool", "UPXFreak"); function detect() { if (PE.compareEP("BE........83C601FFE60000")) { sVersion = "0.1"; bDetected = true; } return result(); } ================================================ FILE: db/PE/tool_UPX_Inliner.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("tool", "UPX Inliner"); function detect() { if (PE.compareEP("9C60E8000000005DB8........2D........2BE88DB5D5FEFFFF8B0683F8007411")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db/PE/tool_UPX_Modifier.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("tool", "UPX Modifier"); function detect() { if (PE.compareEP("50BE........8DBE........5783CD")) { sVersion = "0.1X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/tool_UPX_lock.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("tool", "UPX lock"); function detect() { if (PE.compareEP("60E8000000005D81ED........60E82B030000")) { sVersion = "1.0-1.2"; bDetected = true; } return result(); } ================================================ FILE: db/PE/tool_UPX_scrambler.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("tool", "UPX Scrambler"); function detect() { if (PE.compareEP("E8000000005983C10751C3C3BE........83EC04893424B9800000008136........50B80400000050033424585883E903E2E9EBD6")) { sVersion = "3.06"; bDetected = true; } else if (PE.compareEP("66C705........7507E9..FEFFFF00")) { bDetected = true; } else if (PE.compareEP("9061BE........8DBE........5783CDFF")) { sVersion = "1.X"; bDetected = true; } else if (PE.compareEP("9061BE........8DBE........c787................5783CDFF")) { sVersion = "1.X"; bDetected = true; } return result(); } ================================================ FILE: db/PE/tool_UnoPiX.2.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("tool", "UnoPiX"); function detect() { if (PE.compareEP("60E8070000006168........C383042418C3")) { sVersion = "0.75"; bDetected = true; } if (PE.nLastSection >= 2) { var nVirtualSize = PE.section[PE.nLastSection].VirtualSize; if (nVirtualSize == 0x1000) { if (nVirtualSize == PE.section[PE.nLastSection].FileSize) { var nFlags = PE.section[PE.nLastSection].Characteristics; if (nFlags == 0xe0000040 && !PE.section[PE.nLastSection].Name && PE.getMajorLinkerVersion() == 0 && PE.getMinorLinkerVersion() == 0) { sVersion = "0.94"; bDetected = true; } } } } return result(); } ================================================ FILE: db/PE/tool_XVolkolak.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // https://n10info.blogspot.com/2018/03/xvolkolak-010.html meta("tool", "XVolkolak"); function detect() { if (PE.isNet()) return; // Doesn't support .NET var xvlkSectionsCounter = 0, resourceSectionsCounter = 0, isRwxSectionPresent = false; for (var i = 0; i < PE.getNumberOfSections(); i++) { var sectionToCheck = PE.section[i]; if (sectionToCheck.Name === ".xvlk") { xvlkSectionsCounter++; if (sectionToCheck.Characteristics & 0xe0000020) { isRwxSectionPresent = true; } } else if (/rsrc/i.test(sectionToCheck.Name)) { resourceSectionsCounter++; } } if (isRwxSectionPresent && xvlkSectionsCounter >= 2 && PE.getNumberOfSections() === (xvlkSectionsCounter + resourceSectionsCounter)) { sOptions = "unpacked"; bDetected = true; } return result(); } ================================================ FILE: db/PE/tool_de4dot.6.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev meta("tool", "de4dot"); function detect() { if (PE.isNet()) { if (PE.isNetObjectPresent("smethod_0") && ( PE.isNetObjectPresent("GClass0") || ( PE.isNetObjectPresent("Class0") && PE.isNetObjectPresent("Class1") ) )) { bDetected = true; sOptions = "deobfuscated"; } } return result(); } ================================================ FILE: db/PE/zip.6.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood includeScript("zip-file"); function detect() { detect_Zip(0); return result(); } ================================================ FILE: db/PNG/_PNG.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "PNG"); function detect() { sName = PNG.getFileFormatName(); sVersion = PNG.getFileFormatVersion(); sOptions = PNG.getFileFormatOptions(); if (sName) { bDetected = true; } return result(); } ================================================ FILE: db/PNG/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = PNG; var X = PNG; ================================================ FILE: db/PYC/_PYC.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "PYC"); function detect() { sName = PYC.getFileFormatName(); sVersion = PYC.getFileFormatVersion(); sOptions = PYC.getFileFormatOptions(); bDetected = true; return result(); } ================================================ FILE: db/PYC/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = PYC; var X = PYC; ================================================ FILE: db/PYC/packer_UPP.1.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq // https://github.com/KatzenTechnologies/UPP init("packer", "UPP"); function detect() { if (PYC.isConstPresent("UPP!1.10")) { sVersion = "1.10"; bDetected = true; } return result(); } ================================================ FILE: db/QtFramework ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Qt is tested twice - as a library and as a compiler (to distinguish C from C++). Detect it once here. // Coauthor: sendersu var aQt, ownName; if (typeof aQt === "undefined" && typeof PE !== "undefined") { ownName = PE.getFileBaseName() + "." + PE.getFileCompleteSuffix(); aQt = PE.isLibraryPresentExp(/^Qt(\d)?Core(d?)(\d)?/i); //special case - check own name if (!aQt) { aQt = ownName.match(/^Qt(\d)?Core(d?)(\d)?/i) if (aQt) aQt[0] = ownName; } } ================================================ FILE: db/RAR/_RAR.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "RAR"); function detect() { if (RAR.isVerbose()) { sName = RAR.getFileFormatName(); sVersion = RAR.getFileFormatVersion(); sOptions = RAR.getFileFormatOptions(); if (sName) { bDetected = true; } } return result(); } ================================================ FILE: db/RAR/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = RAR; var X = RAR; ================================================ FILE: db/RosASM ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // RosASM's PE DOS stub is tested twice - once to detect RosASM as a compiler and again // to prevent being detected as a linker (RosASM has no linker). Detect it once here. var bRosASM; if (typeof bRosASM === "undefined") { bRosASM = false; if (PE.compare("'RosAsm Assembler'", 0xb0)) { bRosASM = true; } else if (PE.compare("'MZ'90000300000004000000ffff0000b8000000000000004000000000000000000000000000000000000000000000000000000000000000........800000000e1fba0e00b409cd21b8014ccd21'This program cannot be run in DOS mode\r\n$'000000000000000000")) { bRosASM = true; } } ================================================ FILE: db/SpASM ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // SpASM's PE DOS stub is tested twice - once to detect SpASM as a compiler and // again to prevent being detected as a linker (SpASM has no linker). Detect it // once here. var bSpASM; if (typeof bSpASM === "undefined") { bSpASM = PE.compare("'MZ'80000000000004000000ffff0000b800000000000000400000000000000000000000000000000000000000000000000000000000000007786c16800000000e1fba0e00b409cd21b8014ccd21'Spindoz 32 spit PEfile made wizz SpAsm Assembler.$'"); } ================================================ FILE: db/TASM32 ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // TASM32 uses TLINK32 (Turbo Linker), which is the same linker used by // Borland C++ and Delphi. The TASM32 script runs after the Borland script // so that bBorlandC is available for exclusion. var bTASM32; if (typeof bTASM32 === "undefined") { bTASM32 = false; if (PE) { // TLINK32 leaves a characteristic DOS stub: // "This program must be run under Win32\r\n$" at file offset 0x50. // The four wildcard bytes cover the version-specific field. if (PE.compare("'This program must be run under Win'....0D0A24..00", 0x50)) { // Exclude Borland C++ (same linker, but has a distinct runtime stub // or C++-hook marker at the entry point detected by bBorlandC). if (!bBorlandC) { // Exclude Delphi / C++ Builder: both embed PACKAGEINFO and/or // DVCLAL resources, and Delphi uses a TLS directory. if (!PE.resource["PACKAGEINFO"] && !PE.resource["DVCLAL"]) { bTASM32 = true; } } } } } ================================================ FILE: db/ZIP/_ZIP.0.sg ================================================ // Detect It Easy: detection rule file // Author: horsicq meta("format", "ZIP"); function detect() { if (ZIP.isVerbose()) { sName = ZIP.getFileFormatName(); sVersion = ZIP.getFileFormatVersion(); sOptions = ZIP.getFileFormatOptions(); if (sName) { bDetected = true; } } return result(); } ================================================ FILE: db/ZIP/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing var File = ZIP; var X = ZIP; ================================================ FILE: db/_db_caching ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev function _forceCaching(fn) { var cacheStore = {}; return function () { var args = Array.prototype.slice.call(arguments), key = JSON.stringify(args); if (cacheStore.hasOwnProperty(key)) { return cacheStore[key]; } return cacheStore[key] = fn.apply(this, arguments); }; } var useBetaDieEngineCachingTechology = true; if (useBetaDieEngineCachingTechology) { var classNames = [ "Amiga", "APK", "Archive", "Binary", "COM", "DEX", "DOS4G", "DOS16M", "ELF", "IPA", "JAR", "LE", "LX", "MACH", "MACHOFAT", "MSDOS", "NE", "NPM", "PDF", "PE", "ZIP" ]; var methodsToWrap = [ "isSignaturePresent", "isSignatureInSectionPresent", "findSignature", "compare", "findString" ]; for (var i = 0; i < classNames.length; i++) { var className = classNames[i]; try { if (typeof this[className] === "object" || typeof this[className] === "function") { var cls = this[className]; for (var j = 0; j < methodsToWrap.length; j++) { var methodName = methodsToWrap[j]; if (typeof cls[methodName] === "function") { cls[methodName] = _forceCaching(cls[methodName]); } } } } catch (e) { _error(e.message); } } try { if (typeof this.PE !== "undefined" && typeof this.PE.isNetObjectPresent === "function") { this.PE.isNetObjectPresent = _forceCaching(this.PE.isNetObjectPresent); } } catch (e) { _error(e.message); } } ================================================ FILE: db/_debug ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Debugging functions to help with development // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev // Just a debug function function _debug(messageText) { messageText = "-> " + messageText; _log("Debug: " + messageText); _setResult("dev-output", messageText, "", ""); } // Handle exceptions and log them function _error(exceptionText) { var exceptionText = "Error: " + exceptionText; if (sName) { exceptionText += ", last define() is '" + sName + "' with type '" + sType + "'"; } _log("Exception: " + exceptionText); throw exceptionText; } ================================================ FILE: db/_init ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing includeScript("_debug"); includeScript("_runtime_helpers"); includeScript("language"); var bDetected, sType, sName, sVersion, sOptions, sLang, sLangVersion; /** * Initializes the detection process with the given parameters. * * @param {string} sType - The type of the item to detect. * @param {string} sName - The name of the item to detect. * @param {string} [sVersion] - The version of the item to detect. Optional. * @param {string} [sOptions] - Additional options for detection. Optional. * @param {string} [sLang] - The programming language of the item to detect. Optional. * @param {string} [sLangVersion] - The version of the programming language. Optional. */ function meta( sTypeInput, // (*) type sNameInput, // (*) name sVersionInput, // version sOptionsInput, // options sLangInput, // language sLangVersionInput // language version ) { if (!sTypeInput) _error("No input detection type."); sType = sTypeInput; sName = sNameInput ? sNameInput : String(); sVersion = sVersionInput ? sVersionInput : String(); sOptions = sOptionsInput ? sOptionsInput : String(); sLang = sLangInput ? sLangInput : String(); sLangVersion = sLangVersionInput ? sLangVersionInput : String(); bDetected = false; } function init() { meta.apply(null, arguments); } /** * Processes the detection result and resets the detection variables. * * If a detection has been made (bDetected is true), this function sets the result * using the _setResult function with the provided type, name, version, and options. * After setting the result, it resets the detection flag (bDetected) to false. * * Regardless of whether a detection was made, it resets the sName, sVersion, and sOptions * variables to empty strings. */ function result() { if (bDetected) { sVersion = sVersion ? sVersion : String(); sOptions = sOptions ? sOptions : String(); if (sName) { _setResult(sType, sName, sVersion, sOptions); if (sLang) { if (sLangVersion) { _setLang(sLang, sLangVersion); } else { _setLang(sLang); } } } else { _error("No input detection name."); } } sName = sVersion = sOptions = sLang = sLangVersion = ''; var resultValue = bDetected; bDetected = false; return resultValue; } ================================================ FILE: db/_runtime_helpers ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing /** * Attaches new strings to `this`, separating everything with a comma and no space. * @param {String...} the open list of strings to append. */ String.prototype.append = function () { var str = String(this); var separator = ", "; if (arguments.length > 0) { if (str.length > 0) { str += separator; } str += Array.prototype.join.call(arguments, separator); } return str; } /** * Append a string with a custom separator. * @param {String} stringToAppend - String to append. * @param {String} [separator=", "] - Separator string. * @returns {String} The new string. * @global * @example * sOptions = sOptions.appendS("debug","::"); */ String.prototype.appendS = function (stringToAppend, separator) { var str = String(this); var sep = (typeof separator === "string") ? separator : ", "; if (stringToAppend) { if (str.length > 0) { str += sep; } str += stringToAppend; } return str; } String.prototype.addIfNone = function (substring) { var str = String(this); if (substring && str.indexOf(substring) < 0) { str += substring; } return str; } // Some ECMA6 functions that should be removed if DIE transitions to it if(!String.prototype.startsWith) String.prototype.startsWith = function (s, min) { // the default case-sensitive version of startsWith var m = (typeof min == "number") ? Math.min(s.length, min) : 0; if (s.length > this.length - m) return false; return this.slice(m, s.length) == s; } String.prototype.startsWithCI = function (s, min) { // case-insensitive version of startsWith // the built-in clearly just checks for arguments length instead of max being undefined, so we copy that... if(arguments.length < 2) return this.toLowerCase().startsWith(s.toLowerCase()); else return this.toLowerCase().startsWith(s.toLowerCase(), min); } if(!String.prototype.endsWith) String.prototype.endsWith = function (s, max) { // the default case-sensitive version of endsWith var m = (typeof max == "number") ? Math.min(this.length, max) : this.length; if (s.length > m) return false; if(!s.length) return true; return this.slice(m - s.length, m) == s; } String.prototype.endsWithCI = function (s, max) { // the case-insensitive version of endsWith // the built-in clearly just checks for arguments length instead of max being undefined, so we copy that... if(arguments.length < 2) return this.toLowerCase().endsWith(s.toLowerCase()); else return this.toLowerCase().endsWith(s.toLowerCase(), max); } if (!String.prototype.repeat) String.prototype.repeat = function (num) { if (typeof num !== "number") return this; var s = this; for (var i = 1; i < num; i++) s += this; return s; } /** * Pad the start of a line with spaces or the character given. * @param {String or Number} The width desired. * @param {Number} [nPad=" "] The padding string. Loops. * @returns {String} The new string. * @global * @example * var a = 12; ...; if("aba12" === a.padStart(5,"ab")) ... */ if (!String.prototype.padStart) String.prototype.padStart = function (targetLength, padString) { var s = this.valueOf(); targetLength >>= 0; // truncate if number or convert non-number to 0; padString = String(padString || ' '); if (s.length >= targetLength) { return String(s); } targetLength -= s.length; if (targetLength > padString.length) { padString += padString.repeat(Math.ceil(targetLength / padString.length)); // append to original to ensure we are longer than needed } return padString.slice(0, targetLength) + String(s); } if (!Number.prototype.padStart) Number.prototype.padStart = function (targetLength, padString) { var s = this.valueOf().toString(); targetLength >>= 0; // truncate if number or convert non-number to 0; padString = String(padString || ' '); if (s.length >= targetLength) return s; targetLength -= s.length; if (targetLength > padString.length) { padString += padString.repeat(Math.ceil(targetLength / padString.length)); // append to original to ensure we are longer than needed } return padString.slice(0, targetLength) + s; } if(!Number.prototype.clamp) Number.prototype.clamp = function (min, max) { return Math.min(Math.max(this, min), max) } if(!String.prototype.replaceAll) String.prototype.replaceAll = function (s, r) { if (typeof s != 'string' || typeof r != 'string') return '?' + s; var o = ''; for (var i = 0; i < this.length; i++) { if (this.slice(i, i + s.length) == s) { o += r; i += s.length - 1 } else o += this[i]; } return o; } if (!Array.prototype.includes) { Array.prototype.includes = function (searchElement, fromIndex) { if (this == null) throw new TypeError('"this" is null or not defined'); var o = Object(this); var len = o.length >>> 0; if (len === 0) return false; var n = fromIndex | 0; var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); while (k < len) { var element = o[k]; if (element === searchElement || (typeof element === 'number' && typeof searchElement === 'number' && isNaN(element) && isNaN(searchElement))) { return true; } k++; } return false; }; } if (!String.prototype.includes) String.prototype.includes = function (search, start) { if (typeof start !== 'number') start = 0; if (start + search.length > this.length) return false; return this.indexOf(search, start) !== -1; }; ================================================ FILE: db/archive-file ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Common routines for handling archives. meta("archive"); var Archive = { nFiles: 0, // number of files in archive nDirs: 0, // number of directories in archive nSize: 0, // total unpacked size of all files nPacked: 0, // total packed size of all files // Add an entry, updating the counts and sizes. add: function(nSize, nPacked, bDir) { if (bDir) { this.nDirs++; } else { this.nFiles++; this.nSize += nSize; this.nPacked += nPacked; } }, // Return the contents according to what was found - "P%,F files,D dirs". contents: function() { var sContents = ""; if (this.nSize != 0) { sContents = (this.nPacked / this.nSize * 100).toFixed(1) + "%"; } if (this.nFiles != 0) { sContents = sContents.append(this.nFiles + (this.nFiles == 1 ? " file" : " files")); } if (this.nDirs != 0) { sContents = sContents.append(this.nDirs + (this.nDirs == 1 ? " dir" : " dirs")); } return sContents; } } ================================================ FILE: db/arj ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Detect an ARJ archive. // Info from http://www.fileformat.info/format/arj/corion.htm includeScript("archive-file"); sName = "ARJ"; function detect_ARJ(bFile, bShowOptions) { var nOffset, nSize; if (bFile) { nOffset = 0; nSize = File.getSize(); } else { nOffset = File.getOverlayOffset() + 8; nSize = File.getOverlaySize(); } if (nSize >= 64) { if (File.compare("60EA", nOffset)) { sVersion = File.readByte(nOffset + 5); bDetected = true; } if (bDetected && bShowOptions) { // Options switch (File.readByte(nOffset + 7)) // Host OS { case (0): sOptions = sOptions.append("MS-DOS"); break; case (1): sOptions = sOptions.append("PRIMOS"); break; case (2): sOptions = sOptions.append("UNIX"); break; case (3): sOptions = sOptions.append("AMIGA"); break; case (4): sOptions = sOptions.append("MAC-OS"); break; case (5): sOptions = sOptions.append("OS/2"); break; case (6): sOptions = sOptions.append("APPLE GS"); break; case (7): sOptions = sOptions.append("ATARI ST"); break; case (8): sOptions = sOptions.append("NeXT"); break; case (9): sOptions = sOptions.append("VAX VMS"); break; } if (File.readByte(nOffset + 8) & 0x01) // password { sOptions = sOptions.append("encrypted"); } switch (File.readByte(nOffset + 9)) // Compression method { case (0): sOptions = sOptions.append("stored"); break; case (1): sOptions = sOptions.append("compressed most"); break; case (2): sOptions = sOptions.append("compressed"); break; case (3): sOptions = sOptions.append("compressed faster"); break; case (4): sOptions = sOptions.append("compressed fastest"); break; } } } } ================================================ FILE: db/bytecodeparsers ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Author: Kae /* A collection of binary (bytecodes, disassemblers) parsers intended for sanity checks. Each parser must have these parameters (len optional): {UInt} [p=0] - pointer (file offset) from where to begin {Int} [len=BCParseUntilReasonable] - either the block length or one of the constants above. Not all parsers will support all constants (EoF is implied anyway, and there may not be end markers in a format) but the ToReasonable must be present. It must return a list [n, e, 0, ...] where: - n: BCInvalidFormat, or the first value is the number of commands parsed,or the number of notes read. If n is BCInvalidFormat, the other return list values may be absent; - e: -1 or the position after the end marker; - 0: [reserved] - any custom useful data, such as tags, may be added as well (values [3...]). */ /* beautify ignore:start */ //Put these in the length parameter when you're unsure how long the tested block is BCParseToReasonable = 0; // the default idea of the parser BCParseToEoF = -1; // physical file end BCParseToEndMarker = -2; // logical block end (like an end-block bytecode, RET in disassembly...) BCInvalidFormat = -1; const debug = 0; // -= PC98xx MUAP parsing =- function MUAP98CmdStr(ch, o, recurse) { if (typeof recurse != 'number') recurse = 0; if (recurse > 2) return '…'; const C = [/*0~2: FM:*/'FM1: ', 'FM2: ', 'FM3: ', /*3~5:*/'SSGA: ', 'SSGB: ', 'SSGC: ', /*6~8,11~17: FM:*/'FM4: ', 'FM5: ', 'FM6: ', /*9,10:*/'RHY: ', 'PCM: ', 'FM7: ',/*12~14: either YM3438 or YM2203*/'FM8: ', 'FM9: ', 'FM10: ', 'FM11: ', 'FM12: '], notes = ['C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B', 'C'], c = X.U8(o), cht = ch == 9 ? 'rhy' : ch == 10 ? 'pcm' : 3 <= ch && ch <= 5 ? 'ssg' : 'fm', ifop = ['=', '>', '<', '!=' /*the rest always denote FP*/]; var t; if (cht == 'fm' && c < 0x40) return C[ch] + 'note "' + Hex(c) + '" ' + notes[c % 12] + (1 + Util.divu64(c, 12)) + ' ~' + X.U8(o + 1); else if (cht == 'ssg' && c < 0x10) return C[ch] + 'key-on "' + Hex(c) + '" ' + ' ~' + X.U8(o + 1); else switch (c) { case 0xFF: return C[ch] + 'rest'; case 0xFE: return C[ch] + 'reset & play'; case 0xFD: return C[ch] + 'reset & stop'; case 0xFC: return '-= ' + C[ch] + 'End. =-'; case 0xFB: return C[ch] + "wait on '"; case 0xFA: return C[ch] + (ch == 9 || ch == 10 ? 'x9 nop' : '3ch 4harm play ' + outArray(X.readBytes(o + 1, 8), 16)); case 0xF9: return C[ch] + (ch == 9 || ch == 10 ? 'rhy cmd end' : 'same freq play'); case 0xF8: return C[ch] + 'add freq ' + outArray(X.readBytes(o + 1, 3), 16); case 0xF7: return C[ch] + 'loop @' + Hex(o - X.I16(o + 1)) + ' x' + Hex(X.U8(o + 3)); case 0xF6: return C[ch] + (cht == 'ssg' ? 'noise freq ' : 'pan ') + Hex(X.U8(o + 1)); case 0xF5: return C[ch] + 'Timer-A tempo ' + Hex(X.U16(o + 1)); case 0xF4: return C[ch] + 'set length ' + Hex(X.U8(o + 1)) + ', ratio ' + Hex(X.U8(o + 2)); case 0xF3: return 'wait all channels'; case 0xF2: return C[ch] + (ch == 9 || ch == 10 ? 'DSP mode, level, delay' + outArray(X.readBytes(o + 1, 3), 16) : cht == 'ssg' ? 'set start decay data' + outArray(X.readBytes(o + 1, 3), 16) : 'nop'); case 0xF1: return C[ch] + 'R' + Hex(X.U8(o + 1)) + ' = ' + Hex(X.U8(o + 2)); case 0xF0: return C[ch] + (ch == 9 || ch == 10 ? 'Rhythm Key On ' : 'set system detune ') + Hex(X.U8(o + 1)); case 0xEF: return C[ch] + (ch == 9 || ch == 10 ? 'Rhythm Dump ' : 'hard LFO speed ') + Hex(X.U8(o + 1)); case 0xEE: return C[ch] + (ch == 9 || ch == 10 ? 'Rhythm pan/vol ' : 'hard LFO AMD,PMD,AMon') + outArray(X.readBytes(o + 1, 2), 16); case 0xED: return C[ch] + (ch == 9 || ch == 10 ? 'x2 nop' : '3ch 4harm mode ' + outArray(X.readBytes(o + 1, 2), 16)); case 0xEC: return C[ch] + 'key display mask on/off & colour ' + Hex(X.U8(o + 1)); case 0xEB: return C[ch] + (ch == 9 || ch == 10 ? 'PCM Tone ' : cht == 'ssg' ? 'mixer mode ' : 'tone ') + Hex(X.U8(o)); case 0xEA: return C[ch] + '@jump ' + Hex(o + X.I16(o + 1)); case 0xE9: return C[ch] + '@call ' + Hex(o + X.I16(o + 1)) + ' ("' + MUAP98CmdStr(ch, o + X.I16(o + 1), recurse + 1) + '"...)'; case 0xE8: return C[ch] + '@ret'; case 0xE7: return C[ch] + 'Source Line symbolic info ' + Hex(X.U16(o + 1)); case 0xE6: return C[ch] + (ch == 9 || ch == 10 || cht == 'ssg' ? 'x27 nop' : 'USR Tone'); case 0xE5: return C[ch] + 'Play Stack init'; case 0xE4: return C[ch] + '@if x' + ((X.U8(o + 1) & 0xF) - 6) + ' ' + ifop[X.U8(o + 1) >> 4] + ' ' + X.U8(o + 2) + ' jump ' + Hex(t = o + 2 + X.I16(o + 3)) + ' ("' + MUAP98CmdStr(ch, t, recurse + 1) + '"...)'; case 0xE3: return C[ch] + '@if x' + ((X.U8(o + 1) & 0xF) - 6) + ' ' + ifop[X.U8(o + 1) >> 4] + ' ' + X.U8(o + 2) + ' call ' + Hex(t = o + 2 + X.I16(o + 3)) + ' ("' + MUAP98CmdStr(ch, t, recurse + 1) + '")...'; case 0xE2: return C[ch] + 'change vol data ' + Hex(X.U8(o + 1)); case 0xE1: return C[ch] + 'tie'; case 0xE0: return C[ch] + 'loopcnt clear'; case 0xDF: return C[ch] + 'slur'; case 0xDE: return C[ch] + 'set ratio ' + Hex(X.U8(o + 1)); case 0xDD: return C[ch] + 'cmt len ' + Hex(X.U8(o + 1)); case 0xDC: return C[ch] + 'init Skip_data ' + outArray(X.readBytes(o + 1, 3), 16); case 0xDB: return C[ch] + 'cmt: ' + Hex(X.U8(o + 1)) + ' ' + Hex(X.U8(o + 2)) + ': "' + X.SC(o + 4, X.U8(o + 3), 'SJIS') + '"'; case 0xDA: return C[ch] + 'set X: ' + outArray(X.readBytes(o + 1, 3), 16); case 0xD9: return C[ch] + 'set LFO pars. ' + outArray(X.readBytes(o + 1, 6), 16); case 0xD8: return C[ch] + 'LFO start(p,a)/stop ' + Hex(X.U8(o + 1)); //LFO start(pmd,amd)/stop case 0xD7: return C[ch] + 'vol += ' + Hex(X.U8(o + 1)); case 0xD6: return C[ch] + 'vol -= ' + Hex(X.U8(o + 1)); case 0xD5: return C[ch] + (ch == 9 || ch == 10 ? 'PCM play ' : cht == 'ssg' ? 'Start vol/Attack rate ' : 'x3 nop ') + X.U16(o); case 0xD4: return C[ch] + (ch == 9 || ch == 10 ? 'PCM addr ' + X.U32(o + 1) : 'x5 nop'); case 0xD3: var t = (X.U8(o + 1) & 0xF) - 6; return C[ch] + '@if ' + (t >= 0 ? 'x' + t : 'lpcnt') + ' ' + ifop[X.U8(o + 1) >> 4] + ' ' + X.U8(o + 2) + ' exit ' + Hex(o + 5 + X.U16(o + 3)); case 0xD2: return C[ch] + 'Play Stack +1'; case 0xD1: return C[ch] + 'fade out'; case 0xD0: return C[ch] + 'ssg||pcm ' + Hex(X.U8(o + 1)); case 0xCF: return C[ch] + 'channel change ' + Hex(X.U8(o + 1)); case 0xCE: return C[ch] + (ch == 9 || ch == 10 ? 'set last tone,vol,pan' : cht == 'ssg' ? 'set last tone,vol' : '?? FM: CEh ??'); default: return C[ch] + 'unk. cmd ' + Hex(c); } } /** Packen/ぱっくん Software MUAP98/みゅあっぷ Object bytecode detector. If < 0, consider invalid. * The custom data returned is the comment field or "". */ function parseMUAP98(p, len, ch) { len = len || BCParseToReasonable; p = p || 0; const p0 = p, max = (len == BCParseToReasonable) ? Math.min(0x10000, X.Sz(), p + 0x400) : (len == BCParseToEoF || len == BCParseToEndMarker) ? Math.min(0x10000, X.Sz()) : p + len; var cht = (ch == 9) ? 'rhy' : ch == 10 ? 'pcm' : 3 <= ch && ch <= 5 ? 'ssg' : 'fm', c, notes = 0, stop = false, cmtlen = -1, cmt = "", /*stack depths:*/ lpd = 1, calld = ifd = mp = ic = 0; var visited = []; for (var i = p0; i < max; i++) visited[i] = false; function re(p, t) { if (debug > 1) _l2r('muap98', p, 'ch' + ch + ': ' + t); return [BCInvalidFormat, p, 0]; } while (p0 <= p && p < max && !stop) { if (ifd < 0) sus++; visited[p] = true; if (p > mp) mp = p; //_log(Hex(p,4)+': '+MUAP98CmdStr(ch,p)); c = X.U8(p); if (c < 0x40) { if (c > 15 && cht == 'ssg') return re(p, '!badSSGnote'); if (!X.U8(p + 1)) ic++; //actually happens... notes++; p += 2; } else if (c < 0xCE) return re(p, '!badcmd' + Hex(c)); else switch (c) { case 0xFF: p++; break; //keyoff and rest for note length case 0xFE: lpd = 0; p++; break; //reset & restart case 0xFD: p++; stop = true; break; //reset & stop playback case 0xFC: stop = true; p++; if (mp < p) mp = p; break; //channel end playback case 0xFB: p++; break; /*wait on '*/ case 0xF9: if (ch != 9) notes++; p++; break; //FM/SSG: same frequency play; RHY/PCM: rhythm cmd end case 0xF8: p += 4; break; //add frequency case 0xF7: t = p - X.I16(p + 1); if (!isWithin(t, 0x18, max) || Math.abs(t - p) < 2) return re(p, 'loop@' + Hex(t)); if (!isWithin(t, p0, max)) sus++; p += 4; break; //loop N times case 0xF6: p += 2; break; //pan case 0xF5: if (!isWithin(X.U16(p + 1), 0x10, 0xFFF/*dox: C18 max*/)) return re(p, '!badtempo'); //Timer-A tempo p += 3; break; case 0xF4: p += 3; break; //length/ratio change case 0xF3: p++; break; //wait all channels: 小節位置を調整する。演奏しているチャネル全てにこのデータが来るまで待機する。 case 0xF2: p += 4; break; //RHY/PCM: DSP mode, level, delay; FM/SSG: a 4-byte nop case 0xF1: p += 3; break; //set reg data case 0xF0: //set system detune; RHY/PCM: Rhythm Key on if (ch == 9 || ch == 10) { notes++; if (!X.U8(p + 1)) re(p, 'RHY F0: 0') } p += 2; break; case 0xDF/*slur*/: case 0xD2/*Play Stack +1*/: case 0xD1/*fade out*/: p++; break; case 0xFA: p += 9; break; // 3ch 4harm play; RHY/PCM: a 9-byte nop case 0xEF: p += 2; break; //hard LFO speed; RHY/PCM: Rhythm Dump case 0xEE: p += 3; break; //hard LFO AMD, PMD, AMon; RHY/PCM: set Rhythm pan/vol case 0xED: p += 2; break; //3ch 4harm mode; RHY/PCM: a 2-byte nop case 0xEC: p += 2; break; //key display mask on/off & colour case 0xEB: p += 2; break; //tone number change case 0xEA: //@jump, @call t = p + X.I16(p + 1); if (!isWithin(t, 0x18, max) || Math.abs(t - p) < 2) return re(p, '!' + MUAP98CmdStr(ch, p, 1)); if (t < p0) ic++; if (visited[t]) stop = true; p = t; break; case 0xE9: t = p + X.I16(p + 1); if (!isWithin(t, 0x18, max) || Math.abs(t - p) < 2) return re(p, '!' + MUAP98CmdStr(ch, p, 1)); if (t < p0) ic++; calld++; p += 3; break; case 0xE8: calld--; if (calld < 0) return re(p, '!RetW/oSub'); p++; break; //@ret case 0xE7: p += 3; break; //Source Line symbolic information case 0xE6: /* if(cht == 'fm') { TODO } */ p += 27; break; //FM: set USR Tone parameter; SSG, RHY, PCM: a 27-byte nop case 0xE5: p++; break; //Play Stack init case 0xE4: case 0xE3: //if @jump, if @call t = p + 2 + X.I16(p + 3); if (!isWithin(t, 0x18, max) || Math.abs(t - p) < 2 || (X.U8(p + 1) >> 4) > 3) return re(p, '!' + MUAP98CmdStr(ch, p, 1)); if (t < p0) ic++; if (c == 0xE3) calld++; if (c == 0xE4) { if (visited[t]) stop = true; p = t } else p += 5; break; case 0xE2: p += 2; break; //change vol data case 0xE1: p++; break; //tie case 0xE0: lpd = 0; p++; break; //loop ctr clear case 0xDE: p += 2; break; //change ratio only case 0xDD: cmtlen = X.U8(p + 1); p += 2; break; //doesn't seem to be of any use... case 0xDC: p += 4; break; //init Skip_data case 0xDB: cmt = cmt.appendS(X.SC(p + 4, X.U8(p + 3), 'SJIS'), ' / '); p += X.U8(p + 3) + 4; break; case 0xDA: p += 4; break; //set X Value case 0xD9: p += 7; break; //set LFO parameters case 0xD8: p += 2; break; //LFO start(pmd,amd)/stop case 0xD7: case 0xD6: p += 2; break; //increase/decrease vol case 0xD5: p += 3; if (ch == 9 || ch == 10) notes++; break; //SSG: Start vol/Attack rate; RHY/PCM: PCM play; FM: a 3-byte nop case 0xD4: p += 5; break; //RHY/PCM: set PCM address; FM/SSG: a 5-byte nop case 0xD3: p += 5; break; //@if... exit current loop case 0xD0: re(p, 'ssg/pcm:' + Hex(X.U8(p + 1))); p += 2; break; //SSG||PCM mode case 0xCF: ch = X.U8(p + 1); cht = (ch == 9) ? 'rhy' : ch == 10 ? 'pcm' : 3 <= ch && ch <= 5 ? 'ssg' : 'fm'; p += 2; break; //send channel change case 0xCE: p++; break; //SSG:set last mixer mode, vol, env; RHY/PCM:set last tone/vol/pan (from before sfx) } } return [notes, p, 0, cmt, mp, ic]; } // -= MDX/MXDRV command explainer, useful for loggers =- function MDXCmdStr(ch, o) { const C = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W']; const notes = ['D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B', 'B#', 'C', 'C#', 'D']; var c = X.U8(o); if (c < 0x80) return C[ch] + ': rest ' + (c + 1); else if (c <= 0xDF) { c -= 0x80; if (ch > 8) return C[ch] + ': smp#' + c; else return C[ch] + ': ' + notes[c % 12] + (Util.divu64(c, 12)) + ' ~' + (X.U8(o + 1) + 1); } else switch (c) { case 0xFF: return C[ch] + ': bpm ' + X.U8(o + 1); case 0xFE: return C[ch] + ': R ' + YM2151RegStr(X.U8(o + 1), X.U8(o + 2)); case 0xFD: return C[ch] + ': voicedata ' + X.U8(o + 1); case 0xFC: return C[ch] + ': pan ' + X.U8(o + 1); case 0xFB: if (X.U8(o + 1) & 0x80) return C[ch] + ': @vol ' + (X.U8(o + 1) & 0x7F); else return C[ch] + ': vol ' + X.U8(o + 1); case 0xFA: return C[ch] + ': vol-'; case 0xF9: return C[ch] + ': vol+'; case 0xF8: return C[ch] + ': staccato ' + X.U8(o + 1); case 0xF7: return C[ch] + ': legato'; case 0xF6: return C[ch] + ': rep.' + X.U8(o + 1) + ' [' + (X.U8(o + 2) ? '/' + X.U8(o + 2) : '') + '...'; case 0xF5: return C[ch] + ': ...]rep.,ret→' + Hex(o + X.I16(o + 1, _BE)); case 0xF4: return C[ch] + ': .../rep.esc→' + Hex(o + X.I16(o + 1, _BE)); case 0xF3: return C[ch] + ': detune ' + X.I16(o + 1, _BE) / 0x40; case 0xF2: return C[ch] + ': portamento ' + X.I16(o + 1, _BE) / 0x4000 + ' ↓'; case 0xF1: if (X.U8(o + 1)) return C[ch] + ': loop from ' + Hex(o + 3 + X.I16(o + 1, _BE)) + '.'; else return C[ch] + ' ends.'; case 0xF0: return C[ch] + ': delay key-on ' + X.U8(o + 1); case 0xEF: return C[ch] + ': sync send on ch' + X.U8(o + 1); case 0xEE: return C[ch] + ': sync wait on ch' + X.U8(o + 1); case 0xED: return C[ch] + ': noise/smp freq ' + X.U8(o + 1); case 0xEC: if (X.U8(o + 1) == 0x80) return C[ch] + ': pitch LFO off'; else if (X.U8(o + 1) == 0x81) return C[ch] + ': pitch LFO on'; else return C[ch] + ': LFO pitch wf ' + X.U8(o + 1) + ' freq ' + X.U16(o + 2, _BE) + ' amp ' + X.U16(o + 4, _BE); case 0xEB: if (X.U8(o + 1) == 0x80) return C[ch] + ': vol LFO off'; else if (X.U8(o + 1) == 0x81) return C[ch] + ': vol LFO on'; else return C[ch] + ': LFO vol wf ' + X.U8(o + 1) + ' freq ' + X.U16(o + 2, _BE) + ' amp ' + X.U16(o + 4, _BE); case 0xEA: if (X.U8(o + 1) == 0x80) return C[ch] + ': OPM LFO off'; else if (X.U8(o + 1) == 0x81) return C[ch] + ': OPM LFO on'; else return C[ch] + ': LFO OPM syn/wf ' + X.U8(o + 1) + ' lfrq ' + X.U8(o + 2) + ' PMD ' + X.U8(o + 3) + ' AMD ' + X.U8(o + 4) + ' P/AMS ' + X.U8(o + 5); case 0xE9: return C[ch] + ': LFO key-on dly ' + X.U8(o + 1); case 0xE8: return C[ch] + ': PCM8 on'; case 0xE7: return C[ch] + ': Fadeout' + (X.U8(o + 1) == 1 ? '' : Hex(X.U8(o + 1))) + ' spd ' + X.U8(o + 2); default: return C[ch] + ': unknown command ' + Hex(X.U8(o)); } } // -= Yamaha YM2151 FM Operator Type-M (OPM) related functionality =- function isYM2151Reg(a) { //The OPM doesn't use these registers so we break off if we hit one: return [0, 2, 3, 4, 5, 6, 7, 9, 0xA, 0xB, 0xC, 0xD, 0xE, 0x10, 0x13, 0x15, 0x16, 0x17, 0x1A, 0x1C, 0x1D, 0x1E, 0x1F].indexOf(a) < 0; } function YM2151RegStr(a, b) { //from https://retrocdn.net/images/9/9c/YM2151_Application_Manual.pdf // & https://cx5m.file-hunter.com/fmunit.htm - this one contains errors! if (!isYM2151Reg(a)) return '!bad#' + Hex(a); if (a == 1) if ((b & 2) == b) return 'LFOR'; else return 'TEST' + Bin(b); if (a == 8) return 'keyon ch' + (b & 7) + ' slot' + Bin((b >> 3) & 0xF); if (a == 0xF) return 'noise' + ['off', 'on'][b >> 7] + ' freq' + Hex(b >> 0x1F); if (a == 0x11) return 'CLKA MSB freq' + Hex(b); if (a == 0x12) return 'CLKA LSB freq' + Hex(b & 3); if (a == 0x13) return 'CLKB freq' + Hex(b); if (a == 0x14) return 'Clk CSM' + (b >> 7) + ' FResetBA' + Bin((b >> 4) & 3, 2) + ' IRQEnBA' + Bin((b >> 2) & 3, 2) + ' LoadBA' + Bin(b & 3, 2); if (a == 0x18) return 'LowOscFreq ' + Hex(b); if (a == 0x19) return ['Amp', 'Phase'][b >> 7] + 'Mod depth' + Hex(b & 0x7F); if (a == 0x1B) return 'LFOWave ctl' + (b >> 6) + ' ' + ['saw', 'sqr', 'tri', 'noise'][b & 3]; if (a <= 0x27) return 'Ch ' + (a & 0x7) + ' ctl ' + (b & 0x80 ? 'R' : '') + (b & 0x40 ? 'L' : '') + ' FB' + ((b >> 3) & 7) + ' con' + (b & 7); if (a <= 0x2F) { o = ((b >> 4) & 7); return 'KC/prep note-on ch' + (a & 0x7) + ' ' + (o ? ['C#', 'D', 'D#', '', 'E', 'F', 'F#', '', 'G', 'G#', 'A', '', 'A#', 'B', 'C', ''][b & 0xF] + o : '--'); } if (a <= 0x37) return 'KF/prep p.bend ch' + (a & 0x7) + ' kf' + (b >> 2); if (a <= 0x3F) return 'ModSensy. ch' + (a & 0x7) + ' phase' + ((b >> 4) & 7) + ' amp' + (b & 3); if (a <= 0x47) return 'OP1 ch' + (a & 0x7) + ' dt1:' + ((b >> 4) & 7) + ' mul' + (b & 0xF); if (a <= 0x4F) return 'OP3 ch' + (a & 0x7) + ' dt1:' + ((b >> 4) & 7) + ' mul' + (b & 0xF); if (a <= 0x57) return 'OP2 ch' + (a & 0x7) + ' dt1:' + ((b >> 4) & 7) + ' mul' + (b & 0xF); if (a <= 0x5F) return 'OP4 ch' + (a & 0x7) + ' dt1:' + ((b >> 4) & 7) + ' mul' + (b & 0xF); if (a <= 0x67) return 'OP1 ch' + (a & 0x7) + ' TL' + (b & 0x7F); if (a <= 0x6F) return 'OP3 ch' + (a & 0x7) + ' TL' + (b & 0x7F); if (a <= 0x77) return 'OP2 ch' + (a & 0x7) + ' TL' + (b & 0x7F); if (a <= 0x7F) return 'OP4 ch' + (a & 0x7) + ' TL' + (b & 0x7F); if (a <= 0x87) return 'OP1 ch' + (a & 0x7) + ' KeyScl' + (b >> 6) + ' atk' + (b & 0x1F); if (a <= 0x8F) return 'OP3 ch' + (a & 0x7) + ' KeyScl' + (b >> 6) + ' atk' + (b & 0x1F); if (a <= 0x97) return 'OP2 ch' + (a & 0x7) + ' KeyScl' + (b >> 6) + ' atk' + (b & 0x1F); if (a <= 0x9F) return 'OP4 ch' + (a & 0x7) + ' KeyScl' + (b >> 6) + ' atk' + (b & 0x1F); if (a <= 0xA7) return 'OP1 ch' + (a & 0x7) + ' AMS' + ['off', 'on'][b >> 7] + ' dcy1R:' + (b & 0x1F); if (a <= 0xAF) return 'OP3 ch' + (a & 0x7) + ' AMS' + ['off', 'on'][b >> 7] + ' dcy1R:' + (b & 0x1F); if (a <= 0xB7) return 'OP2 ch' + (a & 0x7) + ' AMS' + ['off', 'on'][b >> 7] + ' dcy1R:' + (b & 0x1F); if (a <= 0xBF) return 'OP4 ch' + (a & 0x7) + ' AMS' + ['off', 'on'][b >> 7] + ' dcy1R:' + (b & 0x1F); if (a <= 0xC7) return 'OP1 ch' + (a & 0x7) + ' dt2:' + (b >> 6) + ' dcy2R:' + (b & 0x1F); if (a <= 0xCF) return 'OP3 ch' + (a & 0x7) + ' dt2:' + (b >> 6) + ' dcy2R:' + (b & 0x1F); if (a <= 0xD7) return 'OP2 ch' + (a & 0x7) + ' dt2:' + (b >> 6) + ' dcy2R:' + (b & 0x1F); if (a <= 0xDF) return 'OP4 ch' + (a & 0x7) + ' dt2:' + (b >> 6) + ' dcy2R:' + (b & 0x1F); if (a <= 0xE7) return 'OP1 ch' + (a & 0x7) + ' dcy2L:' + (b >> 4) + ' rel:' + (b & 0xF); if (a <= 0xEF) return 'OP3 ch' + (a & 0x7) + ' dcy2L:' + (b >> 4) + ' rel:' + (b & 0xF); if (a <= 0xF7) return 'OP2 ch' + (a & 0x7) + ' dcy2L:' + (b >> 4) + ' rel:' + (b & 0xF); return 'OP4 ch' + (a & 0x7) + ' dcy2L:' + (b >> 4) + ' rel:' + (b & 0xF); } /** OPM/YM2151 register log detector. If <= 0, consider invalid. * no custom data or end marker to be expected. */ function parseYM2151RegLog(p, len) { //ref https://retrocdn.net/images/9/9c/YM2151_Application_Manual.pdf len = len || BCParseToReasonable; p = p || 0; var max = (len == BCParseToEoF) ? X.Sz() : Math.min(X.Sz(), p + 0x2000), notes = 0, ic = 0, confirmed = false, v = [0, 0, 0, 0, 0], chinits = [], r, x; for(var i=0; i < 8; chinits[i++]=0); function re(p, t) { if(debug>1)_l2r('opm', p, t); return [BCInvalidFormat,p,0]; } function iC() { if(debug>0)_l2r('opm', p-2, Hex(r)+' - '+Hex(x)+': invalid value'); ic++; } while(!X.U8(p) && p < 0x800) p++; //skip zeroes unless too many if(!X.U8(p)) return [BCInvalidFormat,p,0]; //sanity, heuristics, just reasonable they'd cut off the meaningless zeroes while (p < max && ic < 10) { r = X.U8(p++); if (!r) continue; x = X.U8(p++); if (!isYM2151Reg(r)) iC(); if(debug>1)_logIt(YM2151RegStr(r,x)); /* The working YM2151 regs are: 01: TEST | 08: x111 1222: (SM)KON, CH № | 0F: 1xx2 2222: NE, NFRQ 10: CLKA1 | 11: xxxx xx11: CLKA2 | 12: CLKAB 14: 1x22 3344: CSM, FLAG RESET B&A, IRQ-EN B&A, LOAD B&A 18: LFRQ | 19: PMD/AMD | 1B: 11xx xx22: CT, W | 20~27: 1122 23333: RL, FB, CONECT 28~2F: x111 2222: KC { OCT, NOTE } | 30~37: 1111 11xx: KF | 38~3F: x111 xx22: PMS, AMS 40~5F: x111 2222: DT1, MUL | 60~7F: x111 1111: TL | 80~9F: 11x2 2222: KS, AR A0~BF: 1xx2 2222: AMS-EN, D1R | C0~DF: 11x2 2222: DT2, D2R | E0~FF: 1111 2222: D1L, RR */ if (r <= 0x27) { if (r == 1) { if (x & 0xFD) break; } else if (r == 8) { if (x & 0x78) { notes += bitCount((x >> 3) & 0xF); v[0]++; } else if (x & 0x80) iC(); // TODO check if the notes played are initialised properly. It won't sound right if not so expect goodness! // if(chinits[r & 7] > 5) chok[r & 7]++ // adapt to bitCount! } else if (r == 0xF) { if (x & 0x60) iC(); } else if (r == 0x11) { if (x > 3) iC(); } else if (r == 0x14) { if (x & 0x40) iC(); } else if (r == 0x1B) { if (x & 0x3C) iC(); } } else if (r <= 0x2F) { if ((x & 0x80) || [3,7,0xB,0xF].indexOf(x&0xF) >= 0) iC(); } else if (r <= 0x37) {} //{ if (x & 3) iC(); } // should be a filter but some tunes want it that way else if (r <= 0x3F) { if (x & 0x8C) iC(); } else if (r <= 0x7F) { if (x & 0x80) iC(); v[1]++; chinits[r & 7]++; } // TL set else if (r <= 0x9F) { if (x & 0x20) iC(); v[2]++; chinits[r & 7]++; } // KS/AR set else if (r <= 0xBF) { if (x & 0x60) iC(); v[3]++; chinits[r & 7]++; } // AMS/D1R set else if (r <= 0xDF) { if (x & 0x20) iC(); v[4]++; chinits[r & 7]++; } // DT2/D2R set else { v[4]++; chinits[r & 7]++; } // D1L/RR set if(!confirmed) if(p > 0x1000) if (ic >= 40 || notes < 20 || v[0] < 24 || v[1] < 24 || v[2] < 24 || v[3] < 24 || v[4] < 24) return [BCInvalidFormat]; // false positives can be pretty long! else confirmed = true } var chok = 0; for (var i=0; i < 8; i++) if (chinits[i] > 5) chok++; if(debug>0)_logIt(outArray([notes, v, chok, p], 16)) if (confirmed && chok > 0) return [notes, p, chok]; return [BCInvalidFormat, p, chok]; } // -= Yamaha YM2612(OPN2) related functionality =- function isYM2612Reg(a) { //The OPN2 doesn't have these registers: return !( a < 0x22 || a == 0x23 || a > 0xB7/*B6*/ || isWithin(a, 0x2C,0x2F) // || (isWithin(a, 0x30, 0xAF) && (a & 3) == 3) // per-op registers from 3x to Ax must not have x3,x7, xB, xF. Some files do tho'. ); } /** Mega Drive GYM bytecode detector. Returns BCInvalidFormat in resut[0] if invalid; * no custom data or end marker to be expected. */ function parseMDGYM(p, len) { //ref https://plutiedev.com/ym2612-registers //& https://github.com/ValleyBell/libvgm/blob/master/player/gymplayer.cpp len = len || BCParseToReasonable; p = p || 0; var tmr; if(debug>0){ tmr = new CheckpointTimer(); tmr.init(300); } var max = (len == BCParseToEoF) ? X.Sz() : Math.min(X.Sz(), p+0x2000), notes = 0, v = [0, 0, 0, 0, 0], ir = 0, //notes, validation, invalid registers c, r, x, doPSGFreq2nd = false; function re(p, t) { if (debug>0)_l2r('gym', p, t); return [BCInvalidFormat, p, 0]; } while(!X.U8(p) && p < 0x800) p++; //skip zeroes unless too many while (p < max && ir < 10) switch (c = X.U8(p++)) { case 0: doPSGFreq2nd = false; break; case 1: case 2: r = X.U8(p++); if(c == 2 && r < 0x21) return; x = X.U8(p++); if (!isYM2612Reg(r)) { ir++; if(debug>0)_l2r('gym',p-2,c + ': R ' + Hex(r)) } if (r == 0x28 && (x >> 4)) { notes += bitCount(x >> 4); if(debug>0)_l2r('gym',p-2,'#') } else if (r == 0x2A) v[4]++; //PCM else if ((r & 0xF0) == 0x30) { v[0]++; if(debug>0)_l2r('gym',p-2,'ML/DT') } // MUL/DT set else if ((r & 0xF0) == 0x40 && X.U8(p) > 0) { v[1]++; if(debug>0)_l2r('gym',p-2,'TL') } // TL set else if ((r & 0xF0) == 0x50) { v[2]++; if(debug>0)_l2r('gym',p-2,'AR/RS') } // AR/RS set else if ((r & 0xF0) == 0x60) { v[3]++; if(debug>0)_l2r('gym',p-2,'DR/AM') }// DR/AM set else if(debug>0)_l2r('gym',p-2,c+': R '+Hex(r)) // can't check other reg pushes for validity break; case 3: r = X.U8(p++); if(debug>0)_l2r('gym',p-2,'PSG'); if(r & 0x80) doPSGFreq2nd = (!(r&0x10) && r < 0xE0); else if(doPSGFreq2nd && r < 0x40) doPSGFreq2nd = false; else return [BCInvalidFormat, p, 0]; break; default: return re(p-1, '!cmd' + Hex(c)); } if(debug>0)tmr.next('GYM: end of tested area @'+Hex(p)+' ir='+ir) if(debug>0)_l2r('gym',p,outArray([notes, v], 16)); if ((!notes || v[0] < 8 || v[1] < 8 || v[2] < 8 || v[3] < 8) && v[0]+v[1]+v[2]+v[3]+v[4] < 100) return [BCInvalidFormat, p, 0]; return [notes, p, 0]; } // -= AdLib/Sound Blaster YM3812/OPL2 related functionality =- //ref https://web.archive.org/web/20050205055453/http://www.gamedev.net/reference/articles/article446.asp //The AdLib/OPL2 uses these registers: function isYM3812Reg(a) { return isWithinRanges(a, [1,2,3,4,8,0xBD, [0x20,0x35]]) || ( isWithinRanges(a, [[0x40,0x55], [0x60,0x75], [0x80,0x95], [0xE0,0xF5]] ) && [6,7,14,15].indexOf(a & 0x1F) < 0 || isWithinRanges(a, [[0xA0,0xA8], [0xB0,0xB8], [0xC0,0xC8]])); } var __adlibnote = []; for(var _0=0; _0 < 9; _0++) __adlibnote.push([-1,-1,-1]); //channel: key-on, octave, F-num function YM3812CmdStr(o, recurse) { const C = ['1.1:','2.1:','3.1:', '1.2:','2.2:','3.2:','!6:','!7:', '4.1:','5.1:','6.1:', '4.2:','5.2:','6.2:','!E:','!F:', '7.1:','8.1:','9.1:', '7.2:','8.2:','9.2:'], wf = ['sine', '/ ̄\\_', '/ ̄\\/ ̄\\', '/|_/|_'], //notes = ['C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B', 'C'], //TODO? parse the F-number c = X.U8(o); var t; if (c >= 0xE0) return C[c & 0x1F] + 'wf ' + wf[X.U8(o + 1)]; else if (c >= 0xC0) return ((c & 0xF) + 1) + ':fb/conn' + Hex(X.U8(o + 1)); else if (c == 0xBD) return 'AMdepth/VD/Rhy ' + Hex(X.U8(o + 1)); else if (c >= 0xB0) return ((c & 0xF) + 1) + 'oct/F_msb/key-on ' + Hex(X.U8(o + 1)); else if (c >= 0xA0) return ((c & 0xF) + 1) + 'F_lsb ' + Hex(X.U8(o + 1)); else if (c >= 0x80) return C[c & 0x1F] + 'S/R ' + Hex(X.U8(o + 1)); else if (c >= 0x60) return C[c & 0x1F] + 'A/D ' + Hex(X.U8(o + 1)); else if (c >= 0x40) return C[c & 0x1F] + 'level ' + Hex(X.U8(o + 1)); else if (c >= 0x20) return C[c & 0x1F] + 'AM/vib/envgen/keyscale/MFmul ' + Hex(X.U8(o + 1)); else if (c == 8) return 'CSM/keysplit ' + Hex(X.U8(o + 1)); else if (c == 4) return 'tmrctl ' + Hex(X.U8(o + 1)); else if (c == 3) return 'tmr2 ' + Hex(X.U8(o + 1)); else if (c == 2) return 'tmr1 ' + Hex(X.U8(o + 1)); else if (c == 4) return 'test/wfctl ' + Hex(X.U8(o + 1)); } /** AdLib/OPL2 bytecode detector. If <= 0, consider invalid. * no custom data or end marker to be expected. */ function parseYM3812RegLog(p, len) { len = len || BCParseToReasonable; p = p || 0; var max = (len == BCParseToEoF) ? X.Sz() - 2 : Math.min(X.Sz() - 2, p + 0x2000), notes = 0, v = [0, 0, 0, 0], c, r, x, tmr; if(debug>0){ tmr = new CheckpointTimer(); tmr.init(300); } function re(p, t) { if(debug>1)_l2r('adlib',p,t); return [BCInvalidFormat, p, 0]; } while(!X.U8(p) && p < 0x800) p++; //skip zeroes unless too many if(!X.U8(p)) return [BCInvalidFormat,p,0]; //sanity, heuristics, just reasonable they'd cut off the meaningless zeroes while (p < max) { r = X.U8(p++); x = X.U8(p++); if (!isYM3812Reg(r)) return re(p - 2, 'R ' + Hex(r) + ' : '+Hex(x)); if (r == 0x28 && (x >> 4)) notes += bitCount(x >> 4); if ((r & 0xF0) == 0x30) v[0]++; // MUL/DT set if ((r & 0xF0) == 0x40 && X.U8(p) > 0) v[1]++; // TL set if ((r & 0xF0) == 0x50) v[2]++; // AR/RS set if ((r & 0xF0) == 0x60) v[3]++; // DR/AM set } if(debug>0) tmr.next('OPM chiptune: end of parsed data'); if(debug>0)_logIt(outArray([notes, v, p], 16)) if (!notes || v[0] < 24 || v[1] < 24 || v[2] < 24 || v[3] < 24) return [BCInvalidFormat, p, 0]; return [notes, p, 0]; } /* beautify ignore:end */ ================================================ FILE: db/cab ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Detect a Cab archive. // Author: Jason Hood includeScript("archive-file"); sName = "Microsoft Cabinet File"; function detect_Cab(nOffset, nSize) { if (nSize > 48) { if (File.compare("'MSCF'00000000", nOffset)) { bDetected = true; sVersion = File.readByte(nOffset + 0x19) + ".0" + File.readByte(nOffset + 0x18); var nFilesOffset = nOffset + File.readDword(nOffset + 0x10); var nFiles = File.readWord(nOffset + 0x1C); var nPacked = File.readDword(nOffset + 8); if (File.readByte(nOffset + 0x1E) & 4) { nOffset += File.readDword(nOffset + 0x24) + 4; } switch (File.readByte(nOffset + 0x2A) & 15) { case 1: sOptions = sOptions.append("MSZip"); break; case 2: sOptions = sOptions.append("Quantum"); break; case 3: sOptions = sOptions.append("LZX"); break; } // Packed size is not stored directly, so assume the first // folder's data is first and just skip the names. nPacked -= File.readDword(nOffset + 0x24); while (nFiles--) { Archive.add(File.readDword(nFilesOffset), nPacked, File.readByte(nFilesOffset + 14) & 16); nFilesOffset = File.findByte(nFilesOffset + 16, 256, 0) + 1; nPacked = 0; } sOptions = sOptions.append(Archive.contents()); return 1; } } return 0; } ================================================ FILE: db/chunkparsers ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Various systems' DOS chunk format parser functions. // They return info or the number -1 if it's not the right format. // Author: Kaens (TG @kaens) /* beautify ignore:start */ includeScript("read"); /** * If it's an Amiga hunk file, parses it and tries to be strict in case of garbage past EoF. * @param {Int} baseofs - base offset from which to start parsing * @returns {Array} [nTotalSize,aBlockInfo,c] where: * - nTotalSize: -1 if the file is not an Atari DOS "binary save", otherwise the total expected size (including baseofs); * - aBlockInfo: an Array with separate block types, offsets, and sizes, its length reflecting the number of hunks */ function parseAmigaHunks(baseofs) { //TODO check types, check reslibs, break off if invalid if (typeof baseofs === "undefined") baseofs = 0; if (!X.c("000003F3", baseofs)) return [-1, []]; //is it an Amiga hunk file? var p = baseofs + 4, x = sz = i = reslibs = 0, info = [], load = true; //library strings: while (p < X.Sz()) { x = X.U32(4, _BE); p += 4; if (!reslibs && x) load = false; if (x) reslibs++; else break; p += 4 * x; } var hunks = X.U32(p + 8, _BE) - X.U32(p + 4, _BE) + 1; p += 12; //sOption(hunks+' hunks') for (i = 0; i < hunks && p < X.Sz(); i++, p += 4) { //traverse hunks: var t = X.U32(p, _BE), add = (t >> 30) == 3 ? 4 : 0; t &= 0x3FFFFFFF; t <<= 2; t += add; //_log('@'+Hex(p)+' hunk#'+i+' = '+Hex(t)); info.push([0/*TODO*/, sz, t]); sz += t; } sz += p; if (!info.length) return [-1, []]; else return [sz, info]; } /** * If it's an Atari DOS block file, parses it and tries to be strict in case of garbage past EoF. * @param {Int} [baseofs] - base offset from which to start parsing * @returns {Array} [nTotalSize,aBlockInfo] where: * - nTotalSize: -1 if the file is not an Atari DOS "binary save", otherwise the total expected size (including baseofs); * - aBlockInfo: an Array of arrays with each block's offsets and sizes, its length reflecting the number of blocks */ function parseAtariBinary(baseofs) { if (typeof baseofs !== "number") baseofs = 0; if (!X.c("FFFF", baseofs) || X.Sz() < baseofs + 6) return [-1, []]; var hksz = 0, RAM = [], hkinfo = [], p = 2 + baseofs; while (p + 4 <= X.Sz() && p < 65520) { var ptr = X.U16(p); if (!hkinfo.length && ptr == 0xFFFF) { p += 2; ptr = X.U16(p); } // the subsequent blocks don't have to have a sig var eptr = X.U16(p + 2); if (eptr < ptr || (ptr <= 0xD7FF && eptr >= 0xD000)) break; //_l2r('atrbin',p,'@'+Hex(ptr)+':'+outArray(hkinfo,16)) hksz = eptr + 1 - ptr; if (p + hksz > X.Sz()) if (!hkinfo.length) break; if (!hksz) break; RAM.push(ptr, hksz); if (findIntersections(RAM, true).length) break; p += 4; hkinfo.push([p, hksz]); p += hksz; } if (!hkinfo.length) return [-1, []]; else return [p, hkinfo]; } ================================================ FILE: db/duration ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Convert a time in seconds to a string: // less than 10 seconds: N.NNs // less than a minute: NN.Ns // otherwise: NmNNs // Author: Jason Hood function duration(nSeconds) { if (nSeconds < 60) { return nSeconds.toFixed(nSeconds < 10 ? 2 : 1) + "s"; } nSeconds = Math.round(nSeconds); return Math.floor(nSeconds / 60) + "m" + ("0" + Math.floor(nSeconds % 60)).slice(-2) + "s"; } ================================================ FILE: db/language ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev function _isLangPresent(languageName) { return _isResultPresent("language", languageName) || _isResultPresent("~language", languageName); } function _isLangDetected() { return _getNumberOfResults("language") || _getNumberOfResults("~language"); } function _setLang(languageName, version) { // if "C/C++" already detected if (_isLangPresent("C/C++") && (languageName == "C" || languageName == "C++")) { _removeResult("language", "C/C++"); } // if "C" or "C++"" detected if (languageName == "C/C++" && (_isLangPresent("C") || _isLangPresent("C++"))) { return null; } // False-positive detection of C if (_isLangPresent("C") && languageName !== "C") { _removeResult("language", "C"); } // False-positive detection of C++ if (_isLangPresent("C++") && languageName !== "C++") { _removeResult("language", "C++"); } // If the language already detected if (_isLangDetected() && (languageName == "C/C++" || languageName == "C++" || languageName == "C")) { return null; } if (File.isVerbose() && !_isLangPresent(languageName)) { var isHeurResult = (version == "HEUR"); _setResult((isHeurResult ? "~" : "") + "language", languageName, (version && !isHeurResult ? version : ""), ""); } } ================================================ FILE: db/python ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev function getPythonVersionByDll(dllFileName) { // python = 💩 var version = ""; var startIndex = dllFileName.indexOf("python"); if (startIndex !== -1) { startIndex += 6; var endIndex = dllFileName.indexOf(".", startIndex); if (endIndex === -1) { endIndex = dllFileName.length; } version = dllFileName.substring(startIndex, endIndex); } if (version !== "") { if (version.length === 1) { return version + ".0"; } else if (version.length === 2) { return version[0] + "." + version[1]; } else { return version[0] + "." + version.substring(1); } } else { return null; } } ================================================ FILE: db/rar-file ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Detect a RAR archive. // Author: Jason Hood includeScript("archive-file"); sName = "RAR"; function detect_RAR(bFile) { var nOffset, nSize; if (bFile) { nOffset = 0; nSize = File.getSize(); } else { nOffset = File.getOverlayOffset(); nSize = File.getOverlaySize(); } if (nSize >= 64) { if (File.compare("'Rar!'1A07", nOffset)) { switch (File.readByte(nOffset + 6)) { case 0: sVersion = "4"; break; case 1: sVersion = "5"; break; } bDetected = true; } else if (File.compare("'RE~^'", nOffset)) { sVersion = "1.4"; bDetected = true; } if (sVersion == "4") { var nOptions = File.readByte(nOffset + 10); if (nOptions & 8) { sOptions = "solid"; } if (nOptions & 0x80) { sOptions += (sOptions !== String() ? ", " : "") + "encrypted"; } else { var nDelta = 0; nOffset += 7 + File.readWord(nOffset + 12); while (File.readByte(nOffset + 2) != 0x74) { nDelta = File.readWord(nOffset + 5) + File.readDword(nOffset + 7); if (!nDelta) { break; } nOffset += nDelta; } while (File.readByte(nOffset + 2) == 0x74) { var nLen = File.readDword(nOffset + 7); Archive.add(File.readDword(nOffset + 11), nLen, (File.readByte(nOffset + 3) & 0xE0) == 0xE0); nDelta = File.readWord(nOffset + 5) + nLen; if (!nDelta) { break; } nOffset += nDelta; } sOptions = sOptions.append(Archive.contents()); } } } } ================================================ FILE: db/read ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // If you want to change the style, please consider yourself unsure! // Supplemental read functions. Also common wrappers for info output, array processors, comparers, search algos, logging. // Author: Kaens (TG @kaens) /* beautify ignore:start */ // don't make the following var or const; they need to be global constants _BE = true; _LE = false; // endianness for read_int16+ // little-endian = reversed notation (Intel, ZX Spectrum), // big-endian = direct notation (TCP/IP, Motorola, Amiga) // For the BitReader Object, BE is MSB and LE is LSB (intuitively) CS_ALL = true; CS_BEST = false; // charStat needall FINT_QUICK = FINT_FAST = FINT_1 = FXSEC1 = true; // findIntersections: find just one for the speed's sake TOEOF = -1; // use for the size parameter in findSignature // The encoding tables start with 7F, not 80! 7F is undefined in many charsets but it's good to have something // The N(on)B(reakable)SP(ace) and S(oft)HY(phen) are kept as actual A0 and AD characters in this file CP437 = "⌂"+ "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒ"+ "áíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐"+ "└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀"+ "αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "; CP866 = "⌂"+ //DOS Cyrillic 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ'+ 'абвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐'+ '└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀'+ 'рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ '; CP1251 = "⌂"+ "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—・™љ›њќћџ"+ " ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕї"+ "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"+ "абвгдежзийклмнопрстуфхцчшщъыьэюя"; CP1252 = "⌂"+ //aka. Western aka. ISO-8859-1 "€・‚ƒ„…†‡ˆ‰Š‹Œ・Ž・・‘’“”•–—˜™š›œ・žŸ"+ " ¡¢£¤¥¦§¨©ª«¬・®¯°±²³´µ¶·¸¹º»¼½¾¿"+ "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß"+ "àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"; KOI8R = "⌂"+ //aka. RFC 1489, Morse code based '─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷'+ '═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©'+ 'юабцдефгхийклмнопярстужвьызшэщчъ'+ 'ЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ'; JISX0201 = "⌂"+ "→-‚ƒ„…†‡ˆ‰Š‹Œ↑޳™‘’“”•–—˜™š›œ¢žŸ"+ //decided to mix it with cp1252 "→。「」、・ヲァィゥェォャュョッーアイウエカキクケコサシスセソタ"+ "チツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙゚"+ "àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"; CPAmiga = "⫽"+ // alternatively, "▒" "абвгдежзийклмнопрстуфхцчшщъыьэюя"+ //0x80~0x9F display Cyrillics, just to fill the void " ¡¢£¤¥¦§¨©ª«¬–®¯°±²³´µ¶·¸¹º»¼½¾¿"+ // Filling the void is important because we still want to see "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß"+ // differences in neighbouring values, for non-reading purposes "àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"; CPRISCOS = "⌂"+ "€Ŵŵ◰﯀Ŷŷ�⇦⇨⇩⇧…™‰•‘’‹›“”„–—−Œœ†‡fifl"+ " ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿"+ "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß"+ "àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"; CPATASCII = ['▶', '🖤','├','▊','┘','┤','┐','╱','╲','◤','▛','◥','▙','▟','▆',' ̄', '▜','♣','┌','─','┼','◘','▀','▐','┬','┴','▐','└','\n','↑','↓','←','→', '█','!','”','#','$','%','&','’','(',')','*','+',',','ー','.', '/','𝟶','𝟷','𝟸','𝟹','𝟺','𝟻','𝟼','𝟽','𝟾','𝟿',':',';','<','=','>','?', '@','𝙰','𝙱','𝙲','𝙳','𝙴','𝙵','𝙶','𝙷','𝙸','𝙹','𝙺','𝙻','𝙼','𝙽','𝙾', '𝙿','𝚀','𝚁','𝚂','𝚃','𝚄','𝚅','𝚆','𝚇','𝚈','𝚉','【','\\','】','^','_', '♦','𝚊','𝚋','𝚌','𝚍','𝚎','𝚏','𝚐','𝚑','𝚒','𝚓','𝚔','𝚕','𝚖','𝚗','𝚘', '𝚙','𝚚','𝚛','𝚜','𝚝','𝚞','𝚟','𝚠','𝚡','𝚢','𝚣','♠','-','↰','◁','▷']; //arrow up then NW (🢰) not included for UTF limitations CPAtariST = "⌂"+ "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥ßƒ"+ "áíóúñѪº¿⌐¬½¼¡«»ãõØøœŒÀÃÕ¨´†¶©®™"+ "ijIJאבגדהוזחטיכלמנסעפצקרשתןךםףץ§∧∞"+ "αβΓπΣσµτΦΘΩδ∮φ∈∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²³¯"; CPFullCPETshifted = [ //all 256 ch. Commodore PET 2001 version. PETSCII UNSHIFTED and 8032 are different. // Multiple rather approximate values, until Unicode fonts catch up; ref.Wiki // It's an array because of unicode shenanigans representing some characters with multiple codepoints "\x00","\x01","_","⛔️","\x04","⚪","\x06","🔔","⇪","\t","\x0A","↘","⇪","\x0D","↘️","💥", "\x10","⬇️","↩️","⇱","⌫","🗑️","🗯️","\x17","⇆","↟","?","⎋","🟥","➡️","🟩","🟦", " ", "!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "\\", "]", "↑", "←", " ", "!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "▧", "\x80", "🟣", "💥", "🚀", "🕶️", "[F1]", "[F3]", "[F5]", "[F7]", "[F2]", "[F4]", "[F6]", "[F8]", "↵", "⇪", "🕶️", "⬛️", "⬆️", "↪️", "🗑", "🗯", "🟫", "🌸","🧪" , "⚫️", "🟢", "🔷", "🔳", "🟪", "⬅️", "🟨", "🧪", "\xA0", "▌", "▄", "▔", "▁", "▏", "░", "▕", "▄", "▒", "▕", "├", "▗", "└", "┐", "▂", "┌", "┴", "┬", "┤", "▎", "▍", "▕", "▔", "▔", "▃", "✓", "▖", "▝", "┘", "▘", "▚", "─", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "┼", "▏", "│", "▓", "█", "\xA0", "▌", "▄", "▔", "▁", "▏", "░", "▕", "▄", "▒", "▕", "├", "▗", "└", "┐", "▂", "┌", "┴", "┬", "┤", "▎", "▍", "▕", "▔", "▔", "▃", "✓", "▖", "▝", "┘", "▘", "▚"]; CPSpeccy = ['©', //too SPECIAL with all the tokens-for-characters, gotta use an array ' ',' ▀','▀ ','▀▀',' ▄',' █','▀▄','▄█', '▄ ','▄▀','█ ','█▀','▄▄','▄█','█▄','██', //80~F '𝘼','𝘽','𝘾','𝘿','𝙀','𝙁','𝙂','𝙃','𝙄','𝙅','𝙆','𝙇','𝙈','𝙉','𝙊','𝙋', //90~F '𝙌','𝙍','𝙎','𝚉𝚇¹²⁸','⏯︎','𝚁𝙽𝙳','𝙸𝙽𝙺𝙴𝚈$','π', '𝙵𝙽 ','𝙿𝙾𝙸𝙽𝚃 ','𝚂𝙲𝚁𝙴𝙴𝙽$ ','𝙰𝚃𝚃𝚁 ','𝙰𝚃 ','𝚃𝙰𝙱 ','𝚅𝙰𝙻$ ','𝙲𝙾𝙳𝙴' , //A0~F '𝚅𝙰𝙻 ','𝙻𝙴𝙽 ','𝚂𝙸𝙽 ','𝙲𝙾𝚂 ','𝚃𝙰𝙽 ','𝙰𝚂𝙽 ','𝙰𝙲𝚂 ','𝙰𝚃𝙽 ', '𝙻𝙽 ','𝙴𝚇𝙿 ','𝙸𝙽𝚃 ','𝚂𝚀𝚁 ','𝚂𝙶𝙽 ','𝙰𝙱𝚂 ','𝙿𝙴𝙴𝙺 ','𝙸𝙽 ', //B0~F '𝚄𝚂𝚁 ','𝚂𝚃𝚁$ ','𝙲𝙷𝚁$ ','𝙽𝙾𝚃 ','𝙱𝙸𝙽 ','𝙾𝚁 ','𝙰𝙽𝙳 ','≤', '≥','≠','𝙻𝙸𝙽𝙴 ','𝚃𝙷𝙴𝙽 ','𝚃𝙾 ','𝚂𝚃𝙴𝙿 ','𝙳𝙴𝙵 𝙵𝙽 ','𝙲𝙰𝚃 ', //C0~F '𝙵𝙾𝚁𝙼𝙰𝚃 ','𝙼𝙾𝚅𝙴 ','𝙴𝚁𝙰𝚂𝙴 ','𝙾𝙿𝙴𝙽 # ','𝙲𝙻𝙾𝚂𝙴 # ','𝙼𝙴𝚁𝙶𝙴 ','𝚅𝙴𝚁𝙸𝙵𝚈 ', '𝙱𝙴𝙴𝙿 ','𝙲𝙸𝚁𝙲𝙻𝙴 ','𝙸𝙽𝙺 ','𝙿𝙰𝙿𝙴𝚁 ','𝙵𝙻𝙰𝚂𝙷 ','𝙱𝚁𝙸𝙶𝙷𝚃 ','𝙸𝙽𝚅𝙴𝚁𝚂𝙴 ','𝙾𝚅𝙴𝚁 ','𝙾𝚄𝚃 ', //D0~F '𝙻𝙿𝚁𝙸𝙽𝚃 ','𝙻𝙻𝙸𝚂𝚃 ','𝚂𝚃𝙾𝙿 ','𝚁𝙴𝙰𝙳 ','𝙳𝙰𝚃𝙰 ','𝚁𝙴𝚂𝚃𝙾𝚁𝙴 ','𝙽𝙴𝚆 ', '𝙱𝙾𝚁𝙳𝙴𝚁 ','𝙲𝙾𝙽𝚃𝙸𝙽𝚄𝙴 ','𝙳𝙸𝙼 ','𝚁𝙴𝙼 ','𝙵𝙾𝚁 ','𝙶𝙾 𝚃𝙾 ','𝙶𝙾 𝚂𝚄𝙱 ','𝙸𝙽𝙿𝚄𝚃 ','𝙻𝙾𝙰𝙳 ', //E0~F '𝙻𝙸𝚂𝚃 ','𝙻𝙴𝚃 ','𝙿𝙰𝚄𝚂𝙴 ','𝙽𝙴𝚇𝚃 ','𝙿𝙾𝙺𝙴 ','𝙿𝚁𝙸𝙽𝚃 ','𝙿𝙻𝙾𝚃 ', '𝚁𝚄𝙽 ','𝚂𝙰𝚅𝙴 ','𝚁𝙰𝙽𝙳𝙾𝙼𝙸𝚉𝙴 ','𝙸𝙵 ','𝙲𝙻𝚂','𝙳𝚁𝙰𝚆 ','𝙲𝙻𝙴𝙰𝚁 ','𝚁𝙴𝚃𝚄𝚁𝙽', '𝙲𝙾𝙿𝚈']; //F0~F Chars0to1F = "・☺☻♥♦♣♠•◘○◙♂♀♪♫☼▶◀↕‼¶§▬↨↑↓→←∟↔▲▼"; //#0 is a small dot from Japanese; could've used ␀ but readability Chars0to1FLF = "・☺☻♥♦♣♠•◘○\x0A♂♀♪♫☼▶◀↕‼¶§▬↨↑↓→←∟↔▲▼"; Chars0to1FCRLF = "・☺☻♥♦♣♠•◘○\x0A♂♀\x0D♫☼▶◀↕‼¶§▬↨↑↓→←∟↔▲▼"; Chars0to1FSpeccy = "\x00\x01\x02\x03\x04\x05,📝︎///⬅➡⬇⬆⌫\x0A№\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; //not mixing... Chars0to1FATASCII = "♥├◨┘┤┐/╲◢▗◣▝▘ ̄▂▖♣┌─┼•▄▎┬┴▌└␛↑↓←→"; Chars0to1FATASCII2 = "áùÑÉçôòì£ïüäöúóöÜâûîéèñêȧàȦ␛↑↓←→"; Chars0to1FATASCII_PL = "ŹąźćŚėöÖ£üߣłŃÓ√ĘśäÜĆĄŻÄż␛↑↓←→"; Chars0to1FAtariX = "áùÑÉçôòì£ïüäÖúóöÜâûîéèñêȧàȦË↑↓←→"; Chars0to1FPETSCII = "\x00\x01_⛔️\x04⚪\x06🔔⇪\t\x0A↘⇪\x0D↘️💥\x10↓🔲⇱⌫🗑️🗯️\x17⇆↟?⎋🟥→🟩🟦"; //took the ctrl codes that meant something for each char /** * Decode a 1-byte-per-character encoding from a byte array using the 129-byte-long table given, * as well as a table to display the first 32 characters. * @param {number[]} ansi - an array of uint8 (returned by readBytes). * @param {string[]} dectbl - a decoding table[0x81], String or Array; just make a const here in db/read for that * @param {boolean} [zstop = true] - whether to stop reading on 0 (ASCIIZ behaviour) * @param {string[]} [tbl01F = Chars0to1FCRLF] - which table to use for the first 32 characters * @returns {String} a string value usable with js, or an empty line if the decoding table wasn't found. * @example * 𝑓([7, 0x7F, 0, 0x32], true, Chars0to1FSpeccy, CPSpeccy]) === "📝︎©" ("2" will be lost) * @example * 𝑓("\x07\x7F\x00\x32", false, Chars0to1FSpeccy, CPSpeccy]) === "📝︎© 2" */ function decEncoding(ansi, dectbl, zstop, tbl01F) { if(typeof dectbl === 'undefined') return ''; if(typeof zstop === 'undefined') zstop = true; if(dectbl.length > 129) { // full 256-byte tables :) Nothing fancy, no control bytes. var s = ""; for(var i=0; i < ansi.length; i++) { if(!ansi[i] && zstop) break; else s += dectbl[ansi[i]] } return s } if(typeof tbl01F === 'undefined') if(dectbl == CPSpeccy) tbl01F = Chars0to1FSpeccy; else if(dectbl == CPATASCII) tbl01F = Chars0to1FATASCII; else tbl01F = Chars0to1FCRLF; var s = "", bit8 = 0; for(var i=0; i < ansi.length; i++) { if (!ansi[i] && zstop) break; else if(ansi[i] < 0x80) switch(ansi[i]) { // 7-bit variation processing case 0x0E: if(dectbl == JISX0201 || dectbl == KOI8R) bit8 = 0x80; else s += tbl01F[0xE]; break; case 0x0F: if(dectbl == JISX0201 || dectbl == KOI8R) bit8 = 0; else s += tbl01F[0xF]; break; case 0x5C: if(dectbl == JISX0201) s += '¥'; else s += '\\'; break; case 0x5E: if(dectbl == CPSpeccy) s += '↑'; else s += '^'; break; case 0x60: if(dectbl == CPSpeccy) s += '£'; else if(dectbl == CPPETSCIIshifted) s += ' '; else s += '`'; break; case 0x7B: if(dectbl == CPATASCII) if(tbl01F == Chars0to1FATASCII2) s += 'Ä'; else if(tbl01F == Chars0to1FATASCII_PL) s += ' '; //the Poles didn't need the spades without the other 3 :D else s += '♠'; else s += '{'; break; case 0x7D: if(dectbl == CPATASCII) s += '↖'; else s += '}'; break; //arrow N-NW (🢰) not included for UTF limitations case 0x7E: if(dectbl == JISX0201) s += '‾'; else if(dectbl == CPATASCII) s += '◀'; else s += '~'; break; case 0x7F: if(dectbl != JISX0201) s += dectbl[0]; else s += String.fromCharCode(bit8+ansi[i]); break; default: if(!bit8 && ansi[i] >= 0 && ansi[i] < 0x20) s += tbl01F[ansi[i]]; else s += String.fromCharCode(bit8+ansi[i]); } else s += dectbl[ansi[i]-0x7F]; } return s; } /** * Decode a 1-byte encoding from file using the 129-byte-long table given, as well as a table to display * the first 32 characters. Analogous to decEncoding but reads the file directly. * @param {number} ofs - the offset to start from. * @param {number} len - the amount of bytes to read. * @param {string[]} dectbl - a decoding table[0x81[, String or Array; just make a const here in db/read for that * @param {boolean} [zstop = true] - whether to stop reading on 0 (ASCIIZ behaviour) * @param {array} [tbl01F = Chars0to1FCRLF] - which table to use for the first 32 characters * @returns {string} a string value usable with js, or an empty line if the decoding table wasn't found. */ function decAnsi(ofs, len, dectbl, zstop, tbl01F) { return decEncoding(X.readBytes(ofs,len), dectbl, zstop, tbl01F); } /** * Checks for whether a value fits the limits using <=, as opposed to isInside. * @param {number} a - the value to check. * @param {number} mina * @param {number} maxa * @returns {boolean} * @example * 𝑓(20, 10, 40) === true; 𝑓(20,10,20) === true */ function isWithin(a, mina, maxa) { return mina <= a && a <= maxa; } /** * Checks for whether a value fits the limits using <, as opposed to isWithin. Useful for floats. * @param {number} a - the value to check. * @param {number} mina * @param {number} maxa * @returns {boolean} * @example * 𝑓(20.1, 10.0, 40.0) === true; 𝑓(20.1, 10.0, 20.0) === false */ function isInside(a, mina, maxa) { return mina < a && a < maxa; } /** * isWithin but for a list of ranges. Useful for heuristic byte-has-a-possible-value checks * @param {Array} a - Can contain either values like [min,max] or singular values to compare (strictly) against * @returns {boolean} */ function isWithinRanges(a, rr) { if (isNaN(a) || !Array.isArray(rr)) return; var i = 0, found = false; for (; i < rr.length; i++) { if (Array.isArray(rr[i])) { if (!rr[i].length) return; if (rr[i].length > 1) { if (rr[i][0] <= a && a <= rr[i][1]) { found = true; break } } else if (a === rr[i][0]) { found = true; break } } else if (a === rr[i]) { found = true; break} } return found } /** * Derive a string hexadecimal value, zero-padded. * @param {number} a - the numerical value. * @param {number} [padz=2] - how many characters to zero-pad to. * @returns {string} The hex value, capital letters A~F, ending with "h". */ function Hex(a, padz) { if(typeof a === 'undefined') return "!Hex("+a+")"; if(typeof padz === 'undefined') padz = 2; var minus=""; if(a<0) { a = -a; minus = "-" } var r = a.toString(16).toUpperCase(); var pads=""; if(r.length < padz) pads = Array(1 + padz - r.length).join('0'); return minus+pads+r+"h"; } /** * Derive a string binary value, zero-padded. * @param {number} a - the numerical value. * @param {number} [padz=4] - how many characters to zero-pad to. * @returns {string} The bin value, characters '0' or '1', ending with "b". */ function Bin(a, padz) { if(typeof a === 'undefined') return "!Bin("+a+")"; if(typeof padz === 'undefined') padz = 4; var minus = ""; if(a < 0) { a = -a; minus = "-" } var r = a.toString(2); var pads=""; if(r.length < padz) pads = Array(1 + padz - r.length).join('0'); return minus+pads+r+"b"; } /** * Derive a string octal value, zero-padded. * @param {number} a - the numerical value. * @param {number} [padz=3] - how many characters to zero-pad to. * @returns {string} The octal value, characters 0~7, ending with "o". */ function Oct(a, padz) { if(typeof a === 'undefined') return "!Oct("+a+")"; if(typeof padz === 'undefined') padz = 3; var minus = ""; if(a < 0) { a = -a; minus = "-" } var r = a.toString(8); var pads=""; if(r.length < padz) pads = Array(1 + padz - r.length).join('0'); return minus+pads+r+"o"; } /** * Read a variable-length quantity, an unsigned integer like in MIDI files, from the file. * @param {number} ofs - the offset to start from. * @returns {Array} [length,value] - if length (in physical bytes) = 0, the value had a problem. * @example * //For file containing '81 80 01 81 83 7F': * 𝑓(0) === 0x4001; 𝑓(3) === 0x41FF **/ function readVarUInt(ofs) { if(ofs < 0 || ofs >= File.getSize()) return [0,0]; var t = 0, wb = 1, r = 1, o = ofs; var b = X.U8(o++); t = (t << 7) | (b&0x7F); var b_ = b; while(b_) { b_ >>= 1; wb++ } for(; r < 16 && (b&0x80); r++) { b = X.U8(o++); t = (t << 7) | (b&0x7F); } if(wb > 64) return [0,0xFFFFFFFFFFFFFFFF]; // sizeof(target) in bits. A 64bit value should be enough, right? else if(b&0x80) return [0,-1]; //EOF else return [r,t]; } function readFloat80(ofs, e) { if (e != _BE) e = _LE; // Normalize into little-endian order var b = []; if (e == _LE) { for (var i = 0; i < 10; i++) b[i] = X.U8(ofs + i); } else { for (var i = 0; i < 10; i++) b[9 - i] = X.U8(ofs + i); } // Mantissa: 8 bytes, little-endian var mantissa = 0; for (var i = 0; i < 8; i++) { mantissa += b[i] * Math.pow(256, i); } // Exponent+sign: 2 bytes, little-endian var expWord = b[8] + (b[9] << 8); var sign = (expWord & 0x8000) ? -1 : 1; var exponent = expWord & 0x7FFF; if (exponent === 0 && mantissa === 0) return 0.0; if (exponent === 0x7FFF) { if (mantissa === 0) return sign * Infinity; return NaN; } // Bias 16383 var eVal = exponent - 16383; // Integer bit is explicit (bit 63 of mantissa) var intBit = Math.floor(mantissa / Math.pow(2, 63)); var frac = (mantissa % Math.pow(2, 63)) / Math.pow(2, 63); return sign * (intBit + frac) * Math.pow(2, eVal); } /** * This object facilitates reading a file as a sequence of bits * @constructor {number} [nOffset = 0] - initialise: provide the file offset * @param {number} nBits - bits to read, autolimits to 32 (so read little by little!) * @returns {number} read value as integer, -1 if EoF reached * @example * var bits = new BitReader(10); // First create an instance with the file object * var value = bits.read(5); // Then call the readBits method with the number of bits you want * bits.init(10); // Or put the reader towards a different place * p = bits.offset; // Receive the current bit-file offset * bits.seek(10); // Set the bit-file's offset, in bytes, without changing state * bits.bseek(14); // Set the bit-file's offset in bits * bits.consume(2); // Skip some bytes without changing state **/ function BitReader(nOffset, nEndian) { this.n = 0; // the number of bits in the buffer this.buf = 0; // the bit buffer this.offset = nOffset ? nOffset : 0; // the file offset this.endian = nEndian ? nEndian : _LE; // for different mechanics of bitstreaming; ogg/flac use _BE // Change the pointer, which will reinit the reader, but not the logger this.init = function(nOffset) { this.ofs = nOffset ? nOffset : 0; this.n = this.buf = 0 } // Read b bits from the file this.read = function(nBits) { if(nBits > 64) nBits = 64; if(nBits < 0) return 0; if(this.endian === _LE) { while(this.n < nBits) { // while the buffer is not enough this.buf |= Util.shlu64(File.read_uint8(this.offset++),this.n); // read a byte and append it to the buffer this.n += 8; // increase the bit number by 8 } var v = this.buf & (Util.shlu64(1,nBits) - 1); // extract the desired bits from the buffer this.buf = Util.shru64(this.buf,nBits); // shift the buffer to the right } else { while(this.n < nBits) { this.buf = Util.shlu64(this.buf,8) | File.read_uint8(this.offset++); // shift the buffer to the left and append a byte this.n += 8; } var v = Util.shru64(this.buf,this.n - nBits); // extract the desired bits from the most significant part of the buffer this.buf &= Util.shru64((Util.shlu64(1,this.n)-1),nBits); // clear the extracted bits from the buffer } this.n -= nBits; // decrease the bit number by b return v; // return the value even if the file is exhausted } // Skip some bytes without changing state: this.consume = function(nBytes) { this.offset += nBytes; } // Set the bit-file's offset, in bytes, without changing state: this.seek = function(nOfs) { this.offset = nOfs; } // Set the bit-file's offset in bits: this.bseek = function(nOfs) { this.offset = nOfs - (nOfs%8); this.buf = this.n = 0; this.read(nOfs%8); } } /** * Count set bits in an integer. * @param {number} n */ function bitCount(n) { var c = 0; n = !!n; while(n) { if(n&1) c++; n >>= 1 } return c; } /** * Check a file slice for being all one of a lineup of specified characters. * @param {number} ofs - the offset to start from. * @param {number} len - the amount of bytes to check. * @param {Array | number} [bl = 0x00] - the list of possible uint8 codes, or just one uint8. * @returns {number} - offset if a byte in the slice doesn't belong to the list. If you go beyond EoF or all good, -1. * @example * //For '00 01 02 01' at offset 6 in the file: * 𝑓(6, 4, [0,1]) === 8; 𝑓(6, 4, 1) === 6 */ function firstNotOf(ofs, len, bl) { if(ofs+len > X.Sz()) return -1; var c = i = 0; if(Array.isArray(bl)) { for(i = 0; i < bl.length; i++) if(typeof bl[i] !== 'number' || bl[i] < 0 || bl[i] % 1 != 0) break; if(i < bl.length) throw new Error('firstNotOf cannot parse: '+outArray(bl)); } else if(typeof bl === 'number' && bl > 0 && (bl % 1) == 0 || typeof bl === 'string') bl = [bl]; else bl = [0]; len = Math.min(len, X.Sz()-ofs); // and now test the slice for(i = 0; i < len; i++) if(!bl.includes(X.U8(ofs+i))) break; return i < len? ofs+i : -1; } //A subcase of firstNotOf for whether a slice is all zeroes. function isAllZeroes(ofs, len) { return firstNotOf(ofs, len) < 0 } /** * If the string was too long and has been read incompletely, adds an ellipsis after the last * complete word, to avoid cut-off words. If `space characters' are not detected, * replaces the last character with an ellipsis. Does NOT do the trim() unless the whole string fits the limit. * Mostly usable for lengthy multiline comments/messages. * @param {string} a - the original incomplete string. * @param {number} trim - the buffer size; if a.length == trim, we decide it was cropped. * @param {number} [mintrim = 78] - don't try searching for spaces below this point. * @returns {string} - the resulting string. * @example * // Full string fits the limits, no need to search for a good cut-off place, and it's trimmed for pretty: * 𝑓(" 12345 7890, 34 678. 1 3'56789", 35, 15) === "12345 7890, 34 678. 1 3'56789" * @example * // The length is a full match, but it might be trimmed right along that length, so a good cut-off place is found: * 𝑓(" 12345 7890, 34 678. 1 3'56789", 30, 15) === " 12345 7890, 34 678. 1 3…" * @example * // The length is a full match and last 5 characters don't have spaces, so it's treated as trimmed but it's not cut: * 𝑓(" 12345 7890, 34 678. 1 3'56789", 30, 25) === " 12345 7890, 34 678. 1 3'56789…" * @example * // Just another example of a well-trimmed line, in which you need a lot less info that it has to offer: * 𝑓(" 12345 7890, 34 678. 1 3'56789", 16, 10).trim() === "12345 7890, 34…" */ function addEllipsis(a, trim, mintrim) { if(!trim) trim = 0xA0; if(!mintrim) mintrim = 78; if(a.length < trim || mintrim > trim) return a.trim(); const spaces = " .,:;!\\/'\"=&\x09\x0D\x0A\x1A\x26。、。,,・"; var i = trim, c = 0, ci = -1; while(i >= mintrim && c < 2) { if(spaces.indexOf(a[i]) >= 0) { c++; while(spaces.indexOf(a[i]) >= 0) i--; if(ci < 0) ci = i+1 } while(spaces.indexOf(a[i]) < 0 && i >= 0) i-- } if((i < mintrim && c < 2) //we conclude this language doesn't really have that many spaces... || !c) //...or none at all in the trimmable slice... return a.slice(0,trim)+'…'; else //this language has some spaces, and we can use the last one to trim return a.slice(0,Math.max(ci),mintrim)+'…'; } /** * sOptions.appendS a string (optionally prefixed) if the space-trimmed string is not empty. * @param {variant} a - the string to output (safe to accidentally drop a non-string in) * @param {String} [prefix=''] - what to put in front of the output string * @param {String} [suffix=''] - what to put after the output string * @param {String} [sep=', '] - what to put between the previous string and this addition * @example * //for sOptions === ' ch:2': * 𝑓('hello world ', 'msg:"', '"', ', '); //sOptions === 'ch:2, msg:"hello world\"' */ function sOptionT(a, prefix, suffix, sep) { if (typeof prefix === 'undefined') prefix = ""; if (typeof suffix === 'undefined') suffix = ""; if (typeof sep === 'undefined') sep = ', '; if ((""+a).trim() != "") sOptions = sOptions.appendS(prefix+(""+a).trim()+suffix, sep); } /** * sOptions.appendS a string (optionally prefixed) if the string is not empty. * @param {variant} a - the string to output (safe to accidentally drop a non-string in) * @param {string} [prefix = ''] - what to put in front of the output string * @param {string} [suffix = ''] - what to put after the output string * @param {string} [sep = ', '] - what to put between the previous string and this addition * @example * //for sOptions === ' ch:2': * 𝑓('hello world ', 'msg:"', '"', ', ') === 'ch:2, msg:"hello world\"' */ function sOption(a, prefix, suffix) { if (typeof prefix === 'undefined') prefix = ""; if (typeof suffix === 'undefined') suffix = ""; if (typeof sep === 'undefined') sep = ', '; if ((""+a) != "") sOptions = sOptions.appendS(prefix+(""+a)+suffix, sep); } /** * A more verbose (but still concise) way of outputting the calculated size(s), derived using different algorithms, * taking into account and visualising the difference from the actual file size. * If some of the reported sizes match, the value will only be displayed once. * It's still a good idea to add "/malformed!short" to the version string — it's visible without isVerbose. * @param {...number} sizes - numerical values * @example * // If a file is 100 bytes long: * outSz(90,100,105) === "90(+10)/100/105(-5!)" * // The "!)" thus indicates the file is too short compared to the algorithmic estimation. */ function outSz() { if(!arguments.length || typeof arguments[0] === 'undefined') return "?"; var sizes = [], origs = []; for(i = 0; i < arguments.length; i++) if(arguments[i] >= 0) if(!origs.length || origs.indexOf(arguments[i]) < 0) { origs.push(arguments[i]); sizes.push( arguments[i] < X.Sz() ? arguments[i]+"(+"+(X.Sz()-arguments[i])+")" : arguments[i] > X.Sz() ? arguments[i]+"(-"+(arguments[i]-X.Sz())+"!)" : arguments[i] ) } else; else sizes.push("?"); return sizes.join("/"); } /** * Converts an array to a better-looking line than the usual flat thing DiE's _log would output. * @param {Array} a - Array to process consisting of any information including arrays * @param {Int} [base = 10] - If an integer value is found, in which base to display it * @param {Int} [zeropad] - If an integer value is found, how many zeroes to pad it with (smart by default) * @returns {String} A beautiful output! * @example * 𝑓([ 1, [5, [10,30]], [[23],'test'] ], 2) == "[0001, [0101, [1010, 11110]], [[10111], "test"]]" * 𝑓([ 1, [5, [10,30]], [[23],'test'] ], 2, 8) == "[00000001, [00000101, [00001010, 00011110]], [[00010111], "test"]]" * 𝑓([ 1, [5, [10,30]], [[23],'test'] ], 16) == "[01, [05, [0A, 1E]], [[17], "test"]]" */ function outArray(a,base,pad) { if(typeof base !== 'number' || base % 1 !== 0) base = 10; if(typeof pad !== 'number' || pad % 1 !== 0) //not integer if(typeof pad === 'undefined') switch(base) { case 8: pad = 3; break; case 16: pad = 2; break; case 2: pad = 4; break; default: pad = 0 } if(typeof a === 'number') return a.toString(base).toUpperCase().padStart(pad,'0'); if(typeof a === 'string') return '"'+a+'"'; for(var i=0, s = []; i < a.length; i++) { if(Array.isArray(a[i])) s.push(outArray(a[i],base,pad)); else if(typeof a[i] === 'number' && a[i] % 1 === 0) //integer s.push(a[i].toString(base).toUpperCase().padStart(pad,'0')); else if(typeof a[i] === 'string') s.push('"'+a[i]+'"'); else s.push(a[i]); } return '['+s.join(', ')+']'; // put '[ ' and ' ]' for an even more spaced output } //_l2r('WELP','tests','A:'+outArray(X.readBytes(0,5),16)+' B:'+outArray([...Array(5)].map((_, i) => X.U8(i)),16)) /** * A shorthand for the situation where you compare the file suffix to what you'd expect. * Use as the option to Binary.isHeuristicScan(). * @param {String} a - the expected file suffix, case-insensitive, no heading period unlike Python * @returns {bool} if a match is reached */ function extIs(a) { return File.getFileSuffix().toLowerCase() == a.toLowerCase() } /** * slashTag formats a string in a way that's useful when a tag has two versions (for ex. in different languages). * It will either show both with "/" in between, or one of them if the other one's an empty string, or an empty string if both are empty. * @param {String} a - the first of the two * @param {String} b - the second of the two * @returns {String} */ function slashTag(a, b) { if(a == b) return a; else if(a != "" && b == "") return a; else if(a == "" && b != "") return b; else if(a != "" && b != "") return a+"/"+b; else return ""; } /** * createOrderlyHuffmanTable is just for detections but it does return the table for further checks. Or it returns false. * @param {Array} lent - the lengths table * @param {string} btl - bit table length * @param {BitReader} br - a BitReader object pointing somewhere at the right position for this. The provided BitReader WILL change state. * @returns {Array | false} */ function createOrderlyHuffmanTable(lent, btl, br) { var md = 32, Md = reall = code = 0; var _t = [], fi = [], li = [], ni = []; for(i = 0; i < 33; i++) fi[i] = 0xFFFF; for(i = 0; i < btl; i++) { len = lent[i]; if(len) { if(len < md) md = len; if(len > Md) Md = len; if(fi[len] == 0xFFFF) { fi[len] = li[len] = i } else { ni[li[len]] = i; li[len] = i } reall++ } } if(!Md) return false; for(d = md; d <= Md; d++) { if(fi[d] != 0xFFFF) ni[li[d]] = btl; for(i = fi[d]; i < btl; i = ni[i]) { //insert HuffmanCode: var j = 0, le = _t.length; for(var cb = d; cb >= 0; cb--) { var cob = (cb && ( ( (code>>(Md-d)) >> (cb-1) ) & 1 ) ) ? 1 : 0; if(j != le) { if(!cb || (!_t[j][0] && !_t[j][1])) return false; //[0] is left, [1] is right, [2] is value if(!_t[j][cob]) _t[j][cob] = j = le; else j = _t[j][cob]; } else { _t.push([ (cb&&!cob)?le+1:0, (cb&&cob)?le+1:0, cb?0:i ]); j++; le++ } } code += 1 << (Md-d) } } return _t; } /** * Outputs time in seconds as short human-readable, with a "h:mm:ss" alternative when < 1 day. * Millenia, centuries and years as sidereal years, a "month" duration is 1/12 of such year. * @param {number} s - seconds * @returns {string} * @example * 𝑓(123456789) === "31Y10M4w21h33m9s"; 𝑓(1234567) === "2w6h56m7s"; 𝑓(12345) === "3:25:45" */ function secondsToTimeStr(s) { const mul = [/*millenia*/315581497635,/*centuries*/3155814976,/*yrs*/31558150,/*mns*/2629846,/*wks*/604800,86400,3600,60]; var r = "", ss = s%mul[7], mm = Util.div64(s%mul[6],mul[7]), hh = Util.div64(s%mul[5],mul[6]), dd = Util.div64(s%mul[4],mul[5]), ww = Util.div64(s%mul[3],mul[4]), mn = Util.div64(s%mul[2],mul[3]), yy = Util.div64(s%mul[1],mul[2]), cc = Util.div64(s%mul[0],mul[1]), mi = Util.div64(s,mul[0]); if(s < 86400) { r = mm.padStart(2,'0')+":"+ss.padStart(2,'0'); if(hh) r = hh+":"+r; return r } if(ss) r = ss+"s"+r; if(mm) r = mm+"m"+r; if(hh) r = hh+"h"+r; if(dd) r = dd+"d"+r; if(ww) r = ww+"w"+r; if(mn) r = mn+"M"+r; if(yy) r = yy+"Y"+r; if(cc) r = cc+"C"+r; if(mi) r = mi+"Mil"+r; return r } /** * Examines a sequence and gives a generalised idea of what sort of characters a string is (mostly) made of. * Parse the result using indexOf. * Could be useful for validating structured files with human-filled fields. * @param {String/Number[]} s - your string in question, or a List of charcodes. * @param {Boolean} [needall=CS_BEST] - if true, you have "allascallt allnum" for a line of spaces, else just "allt ". * @returns {String} - at least one or a combo of these, optional prefix "all" (otherwise treat as "mostly"): * '?': wrong type; 'empty': 0 length; '00': zeroes; 't ': tabs/spaces; 'ctl': 0-1Fh & 7Fh; 'num': numerical; * 'asc': 20h-7Eh; 'xsc': zeroes+tabs+♫+FFh+crlf+ascii; 'foreign': 00,t, ,crlf, 80h+; 'any': decision cannot be made. * @example * 𝑓("-123 456.789") === "allnum"; 𝑓("-123 456.789", CS_ALL) === "allnumallascallxscallforeign" */ /* beautify preserve:start */ function charStat() { if(!arguments.length) return "?"; if(typeof arguments[0] === "undefined" || typeof arguments[0] === "number") return "?"; str = arguments[0]; if(arguments.length < 2) needall = false; else needall = !!arguments[1]; if(str == "" || str == []) return "empty"; var i, s = [], c = [ /*[0]00*/0, /*[1]t */0, /*[2]asc*/0, /*[3]xsc*/0, /*[4]num*/0, /*[5]ctl*/0, /*[6]foreign*/0 ], o = [0,0,0,0,0,0,0,0]; if(typeof str === "string") for(i = 0; i < str.length; i++) s.push(str.charCodeAt(i)); else s = str; for(i=0;i 0x7F) c[6]++ } for(i = 0; i < c.length; i++) o[i] = Util.div64(c[i]*100,s.length); r = ""; //_log((typeof str)+" "+s+" {"+c+"} <"+o+">") if(!needall) { if(o[0] > 70) { if(o[0] === 100) r += "all"; r += "00" } else if(o[1] > 70) { if(o[1] === 100) r += "all"; r += "t " } else if(o[4] > 70) { if(o[4] === 100) r += "all"; r += "num"; } else if(o[2] > 70) { if(o[2] === 100) r += "all"; r += "asc"; } else if(o[3] > 70) { if(o[3] === 100) r += "all"; r += "xsc"; } else if(o[5] > 70) { if(o[5] === 100) r += "all"; r += "ctl"; } else if(o[6] > 70) { if(o[6] === 100) r += "all"; r += "foreign"; } } else { if(o[0] > 70) { if(o[0] === 100) r += "all"; r += "00"; } if(o[1] > 70) { if(o[1] === 100) r += "all"; r += "t "; } if(o[4] > 70) { if(o[4] === 100) r += "all"; r += "num"; } if(o[2] > 70) { if(o[2] === 100) r += "all"; r += "asc"; } if(o[3] > 70) { if(o[3] === 100) r += "all"; r += "xsc"; } if(o[5] > 70) { if(o[5] === 100) r += "all"; r += "ctl"; } if(o[6] > 70) { if(o[6] === 100) r += "all"; r += "foreign"; } } if(r == "") return "any"+o; else return r; } // PATCHING FUNCTIONALITY; promised to become native // May be useful in some ugly cases for quickly pre-processing the file contents which are then detected. var patcheddata = []; function rpU8(adr) { //read patched data or passthrough, U8 for(var i=0; i < patcheddata.length; i++) if(patcheddata[i][0] == adr) return patcheddata[i][1]; return X.U8(adr) } function rpU16be(adr) { //read patched data or passthrough, U16 BE return (rpU8(adr) << 8) | rpU8(adr+1) } function rpU32be(adr) { //read patched data or passthrough, U32 BE return (rpU8(adr) << 24) | (rpU8(adr+1) << 16) | (rpU8(adr+2) << 8) | rpU8(adr+3) } function wpU8(adr,val) { //add to patches, U8 for(var i=0; i < patcheddata.length; i++) if(patcheddata[i][0] == adr) { patcheddata[i][1] = val; return } patcheddata.push([adr,val]) } function wpU16be(adr,val) { //add to patches, U16 BE wpU8(adr,(val>>8)&0xFF); wpU8(adr+1,val&0xFF) } function wpU32be(adr,val) { //add to patches, U32 BE wpU8(adr,(val>>24)&0xFF); wpU8(adr+1,(val>>16)&0xFF); wpU8(adr+2,(val>>8)&0xFF); wpU8(adr+3,val&0xFF) } function patchLength() { return patcheddata.length } function patchClear() { patcheddata = [] } /** * Discovers gaps in an unsorted array of pairs of [offset, length], with a minimum-to-report gap as optional parameter. * Useful for extra checks in file resource formats, without signatures but not sparse, so you can tell whether the resource blocks have no spaces in-between and don't overlap, using this and findIntersections. * @param {Array of arrays[2]} lst - List to process consisting of ranges * @param {UInt} [mingap=1] - Minimum gap, default to at least 1 byte between the ranges. Change for aligned data * @returns {Array of arrays[2]} Sorted list of gap ranges in the same format * @example * // We have data defined in 10..20, 25..30, 40..50: * 𝑓([ [10,10], [25,5], [40,10] ]) === [ [20,5], [30,10] ] */ function findGaps(lst, mingap) { var i, r = []; /* tests for input typing follow */ if(!Array.isArray(lst) || lst.length < 2) return r; for(i = 0; i < lst.length; i++) if(!Array.isArray(lst[i]) || lst[i].length != 2 || typeof lst[i][0] !== 'number' || typeof lst[i][1] !== 'number') return r; if(typeof mingap !== 'number') mingap = 1; function sf(a, b) { if(a[0] != b[0]) return a[0]-b[0]; else return a[1]-b[1] } var a = lst.sort(sf); for(i = 1; i < a.length; i++) if((t=a[i-1][0]+a[i-1][1]) < a[i][0] && a[i][0]-t-mingap >= 0) r.push([t, a[i][0]-t]) return r; } /** * Discovers intersections in an unsorted array of pairs of [offset, length], considering all possible pairs. * Useful for extra checks in file resource formats, without signatures but not sparse, so you can tell whether the resource blocks don't overlap and have no spaces in-between, using this and findGaps. * @param {Array of arrays[2]} lst - List to process consisting of ranges defined as [offset,length] * @param {Boolean} [detectone=false] - Stop searching after finding even one intersection * @returns {Array of arrays[2]} Sorted list of intersection ranges in the same format; if length > 0, intersection present * @example * 𝑓([ [10,20], [15,10], [23,30] ]) = [[15,10], [23,2], [23,7]] * 𝑓([ [10,20], [15,10], [23,30] ], true) = [[15,10]] */ function findIntersections(lst,detectone) { var i, t, r = []; /* tests for input typing follow */ if(!Array.isArray(lst) || lst.length < 2) return r; for(i=0; i < lst.length; i++) if(!Array.isArray(lst[i]) || lst[i].length != 2 || typeof lst[i][0] !== 'number' || typeof lst[i][1] !== 'number') return r; function sf(a, b) { if(a[0] != b[0]) return a[0]-b[0]; else return a[1]-b[1] } var a = lst.sort(sf); var found = false; for(i=1; i < a.length && !found; i++) for(j=0; j < i && !found; j++) if((t=a[j][0]+a[j][1]) > a[i][0]) { if(detectone) found = true; //_log(' item#'+j+' ['+lst[j][0]+' -> '+lst[j][1]+'] intersects with item#'+i+' ['+lst[i][0]+' -> '+lst[i][1]+']') r.push([a[i][0], a[i][0]+a[i][1] <= t ? a[i][1] : t-a[i][0]]) } return r.sort(sf); } /** * Finds several signatures one after the other, using an array of pairs of [signature, range] and starting from a specified offset. The range to search across is in the 0-th element of aList. * @param {UInt} nOffset - Where to start searching from (or 0 if bad data). * @param {UInt} nLength - Maxlength: the same as in findSignature. (It has to be at least the length of the signature.) * @param {Array of arrays[2]} aList - List to process consisting of pairs of [signature, range]. * @param {UInt} [nStep=1] - In case subsequent searches fail, skip this many bytes before searching for more (this handles alignments too). If 0, stop if not found immediately. * @returns -1 if not found, offset otherwise. * @example * //on your common Windows EXE file: * 𝑓(0, 0x400, [ ["'MZ'",0], ["'PE'0000",0x200] ]) */ function findMultiple(nOffset, nLength, aList, nStep) { var r, lst = aList || [], ofs = ofs0 = nOffset || 0, max = Math.min(X.Sz(), ofs+(nLength||0)), st = nStep || 1; if(!lst.length) return -1; for(i = 0; i < lst.length && ofs <= max; i++) { if(ofs >= max) return -1; r = X.fSig(ofs, lst[i][1], lst[i][0]); //_l2r('FMP',ofs,'['+i+'] st:'+st+' max:'+Hex(max)+' r '+lst[i][0]+' ~ '+Hex(lst[i][1])+' = '+Hex(r)); if(r < 0) { if(!st) return -1; ofs0 += st; ofs = ofs0; i = -1; } else { ofs = r+lst[i][1]; if(!i) ofs0 = r; } } return ofs0; } // Heuristic considerations for whether the sample name will be interesting enough to an average user. // // The optional "ctx" is context, an array of other sample names (or other tokens) known so far. // For example, if the file's just starting and you're on the fence whether "loop" is good to know or not, // it'll give you the chance to put it there just in case, but not if the other names are "boring" or "useless".) // Try not to use it but also feel free to use it! Fun takes priority. // // Please add conditions liberally! function funSampleName(n, ctx) { var fun = 1, bore = 0; //by default, we're curious about the new line just a little n = n.toString(); if(n.trim() == '') return false; if(n.endsWithCI('.wav') || n.endsWithCI('.smp') || n.endsWithCI('.ins') || n.endsWithCI('.iff')) bore++; if(n.startsWithCI('ST-') || n.startsWithCI('df0:')) bore++; if(/^\d+$/.test(n)) bore++; if(n.startsWith('#')) fun += 5; if(/^\s*(unnamed|dr[u]?m\d*|loop\s*\d*|strings?\s*\d*|bass\s*\d*|guitar\s*\d*|snare\s*\d*|piano)\s*$/i.test(n) || /^\s*(trumpet\s*\d*|bells\s*|synth\s*[0-9iv]*|shaker|banjo|lead|syn\d+|\w*\s*hihat|organ\s*\d*)\s*$/i.test(n) || /^\s*(voice\s*\d+|crash|cymbal\s*\d*|wonderpad\s*[0-9iv]+|tambourine\s*[0-9iv]*|tamb\d+)\s*$/i.test(n) || /^\s*((hard|echo)\s?tom|splash|cymbhit|orchm(in|aj)|orch\s?hit|chimes?|kick|scratch)\s*$/i.test(n) || /^\s*((ghost\s?|brass\s?)pad\s*(min|maj|\(sus4\))?|blip|bleep|hhc|hho|clv|bd|sd|pad)\s*$/i.test(n) || /^\s*(m(aj|in)or\s*[0-9iv]*|sawsynth|synbrass|hihat\sclosed)\s*$/i.test(n)) bore++; //_setResult('fsn',n,'fun='+fun+' bore='+bore,'') return fun > bore; } const b64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function toBase64(buf) { var r = '', i = 0, indexOfLastCompleteTriple = buf.length - (buf.length%3); for (i = 0; i < indexOfLastCompleteTriple; i += 3) { r += b64Chars[buf[i] >> 2]; r += b64Chars[((buf[i] & 3) << 4) | ((buf[i+1] & 0xF0) >> 4)]; r += b64Chars[((buf[i+1] & 0xF) << 2) | ((buf[i+2] & 0xC0) >> 6)]; r += b64Chars[buf[i+2] & 0x3F] } if (i < buf.length) { var i1 = buf[i], i2 = (i+1 < buf.length) ? buf[i+1] : 0; r += b64Chars[i1 >> 2]; r += b64Chars[((i1 & 0x03) << 4) | ((i2 & 0xF0) >> 4)]; if (i+1 < buf.length) { r += b64Chars[((i2 & 0x0F) << 2)]; } else r += '='; r += '='; } return r } // A simple array1's contents == array2's contents? kinda thing, goes deep function compareArrays(arr1, arr2) { var l = Math.min(arr1.length, arr2.length); if (arr1.length+arr2.length == 0) return true; if (l == 0 || arr1.length != arr2.length) return false; for (var i = 0; i < l; ++i) { if (Array.isArray(arr1[i])) { // an element of arr1 is an Array too? if (!Array.isArray(arr2[i])) return false; if (!compareArrays(arr1[i], arr2[i])) return false; // go deeper } else if (Array.isArray(arr2[i])) return false; else if (arr1[i] !== arr2[i]) return false; } return true } // Simply plops the buffer contents into the log stream with a suitable MIME header function _logBase64(buf) { var fn = File.getFileBaseName()+'.'+File.getFileCompleteSuffix(); _log('MIME-Version: 1.0\nContent-Type: application/octet-stream; name="'+fn+'.dec"\n'+ 'Content-Transfer-Encoding: base64\nContent-Disposition: attachment; filename="'+fn+'.dec"\n'); _log(buf); } // Same but no header and in hex function _logHex(buf) { var o = ''; for(i=0; i < buf.length; i++) { if(!(i % 16)) o += (i? ' |\n': '')+i.toString(16).padStart(6,'0')+' |'; if(!(i % 8)) o += ' '; o += ' '+buf[i].toString(16).padStart(2,'0'); } _log('-8<---'); _log(o); _log('--->8-') } // Same but as text put through CP866 for clarity of eyeballing. // That is, the zeros are spaces, and the control characters and i18n are mapped to an old DOS encoding that has all the characters. function _logText(buf) { _log('-8<---['+(typeof buf)+' '+(buf.length)+' bytes]---'); if(typeof buf === 'object') { var bf = buf, i = 0; for(; i < buf.length; i++) if(bf[i] == 0) bf[i] = 0x20 } _log(decEncoding((typeof buf === 'undefined'? X.readBytes(0,X.Sz(),true): bf), CP866, Chars0to1F)); _log('--->8-') } // Debug logger to results. function _l2r(name, pos, issue) { _setResult('debug', issue, '@'+Hex(pos), name) } // Returns the current line of the callee (ie. where you call this function from) function _currentLine() { const e = new Error(); const stackLine = e.stack.split("\n")[1]; const match = stackLine.match(/:(\d+)?$/); return match ? parseInt(match[1], 10) : null; } // Simply logs the calling function and the current line. All hail the printf debugging! function _logIt(msg) { if (typeof msg === "undefined") msg = ""; const callerLine = new Error().stack.split("\n")[1] || "", fnmatch = callerLine.match(/^(\w+)@/), // extract function name fnName = fnmatch ? fnmatch[1] : "", lineMatch = callerLine.match(/:(\d+)(?!.*:)/), lineNum = lineMatch ? lineMatch[1] : "?"; _log(fnName + (lineNum == "?" ? "" : ": " + lineNum) + (!msg.length ? "" : ": " + msg)); } /** A class that'll help profile overly long scripts until Qt offers better tools! * Counts timings between the timer.next calls, outputs if too many milliseconds passed. * @example * var timer = new CheckpointTimer(); * timer.init(100); * heavycode1(); * timer.next('after heavycode1:'); * heavycode2(); * timer.next('after heavycode2:') */ function CheckpointTimer() { this.last = 0; this.min = 100; // milliseconds this.init = function(min) { this.last = new Date().getTime(); if (typeof min == 'number' && min >= 0) this.min = min; } this.next = function(msg) { var now = new Date().getTime(); var delta = now - this.last; if (delta >= this.min) _setResult('prof', msg, '', delta + " ms passed. " +(X.isOverlay()?' overlay':'')+(X.isResource()?' resource':'')+(X.isFilePart()?' file_part':'')+" Hex at [0]: " +X.getSignature(0,32)); this.last = now; } } /* beautify ignore:end */ ================================================ FILE: db/shell-script ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Retrieve the interpreter from a #! script. var sInterpreter; if (typeof sInterpreter === "undefined") { sInterpreter = ""; var sLine = Binary.getString(0); // Make the expression a little easier to deal with by translating // something like "/usr/bin/env perl" to just "/usr/bin/perl". sLine = sLine.replace(/\/env\s+/, "/"); var aMatch = sLine.match(/#!.*\/(.+?)(?:\.exe)?\s/); if (aMatch) { sInterpreter = aMatch[1]; } } // Check for a particular interpreter. function isInterpreter(sString) { if (sInterpreter == sString) { // Found it, so blank it out to stop "script.2" picking it up again. sInterpreter = ""; return 1; } return 0; } ================================================ FILE: db/soundchips ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Author: Kae // Provides user-readable lists, aid for logging, info useful for statistical/sanity-based detection I guess? // The following is a list of popular sound chips and their aliases in single strings separated by ", " SoundChips = [ 'AY-3-8910, AY8910, PSG', 'AY8930', 'AY-3-8912', 'AY-3-8913', 'YM2149, SSG', 'YM6630, Sunsoft 5B', 'YM3439, SSGC', 'YMZ284, SSGL', 'YMZ294, SSGLP', 'YMZ705, SSGS', 'YM2151, OPM, IC101, #IT-21-51-00', //FM-chip 'YM3012, IC102, #IT-30-12-00', //stereo DAC 'YM2148, IC103, #IT-21-46-00', //MIDI handling 'YM22702, IC104, #IT-22-70-20', //ROM 'YM2164, OPP', 'SN76489, DCSG', 'SN76489A', 'SN76496', 'YM3526, OPL', 'YM3812, OPL2', 'YMF262, OPL3', 'YMF278, OPL4', 'YM2413, OPLL', 'Konami VRC7', //only used for audio in "Lagrange Point" 'Y8950, MSX-AUDIO', 'YM2203, OPN', 'YM2608, OPNA', 'YM2612, OPN2', 'YM2610, OPNB', 'YM2610B', 'NEC D7759, uPD7759', 'NEC D7759C', 'Sharp LR35902, DMG-CPU, GameBoy DMG', 'Hudson Soft HuC6280', 'Ricoh 2A03, RP2A03, NES APU', 'Namco C140', 'Namco C219', 'Ensoniq ES5506', 'Ensoniq ES5505' ]; ================================================ FILE: db/vgmcodingutils ================================================ // Detect-It-Easy signature file // Various parser helpers from vgmstream, modified for DiE. // Author: Kaens (TG @kaens) /* beautify ignore:start */ includeScript("read"); /** Read values from an 'old' XMA2 RIFF "XMA2" chunk (XMA2WAVEFORMAT), starting from an offset *after* chunk type+size. * Useful as custom X360 headers commonly have it lurking inside. * @param Int p - offset * @return [channels, sample rate, loop flag, raw samples, start loop sample, end loop sample] */ function xma2_parse_xma2_chunk(p) { //ref vgmstream coding_utils.c var hkver = X.U8(p), strm = X.U8(p+1), lpst = X.U32(p+4, _BE), lped = X.U32(p+8, _BE), lp = X.U8(p+3) > 0 || lped, sr = X.U32(p+0xC, _BE), smp = X.U32(p+(hkver == 3 ? 0x14 : 0x1C), _BE), ch = 0, ofs = hkver == 3? 0x20 : 0x28; for(var i=0; i < strm; i++) ch += X.U8(p+ofs+i*4); return [ch, sr, lp, smp, lpst, lped] } /** Read values from a 'new' XMA2 RIFF "fmt" chunk (XMA2WAVEFORMATEX), starting from an offset *after* chunk type+size. * Useful as custom X360 headers commonly have it lurking inside. Only parses the extra data (before is a normal WAVEFORMATEX). * @param Int p - offset * @param Int e - endianness * @return [loop flag, samples, start loop sample, end loop sample] */ function xma2_parse_fmt_chunk_extra(p, e) { var smp = X.U32(p+0x18, e), lpst = X.U32(p+0x28, e), lped = X.U32(p+0x2C, e), lp = X.U8(p+0x30) || lped; //source bugfix: if(lpst+128-512 == 0 && lped+128-512+256 >= smp+128-512) lp = false; return [lp, smp, lpst, lped] } /* beautify ignore:end */ ================================================ FILE: db/wxWidgets ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // wxWidgets is tested twice - as a library and as a compiler (to distinguish C // from C++). Detect it once here. var aWx; if (typeof aWx === "undefined") { aWx = PE.isLibraryPresentExp(/^wx.*?(univ)?(\d+)(u)?(d)?/i); if (!aWx) { if (PE.isResourceNamePresent("WXWINDOWMENU")) { aWx = 1; } } } ================================================ FILE: db/zip-file ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Detect a zip archive. // Author: Jason Hood includeScript("archive-file"); sName = "Zip"; function detect_Zip(bFile) { var nOffset = 0; if (bFile) { // Don't know what this is, but I happened to have a file that started // with it. if (File.compare("'PK00'")) { nOffset = 4; } if (Binary.compare("'PK'0708", nOffset)) { sOptions = "extended"; bDetected = true; return; } } else { if (File.compareOverlay("'PK'0304")) { nOffset = File.getOverlayOffset(); } else { var nSize = File.getSize(); if (nSize < 64) { return; } nSize -= 11; nOffset = nSize; if (!File.compare("'PK'0506'", nOffset)) { if (nSize < 4096) { nOffset = 0; } else { nOffset -= 4096; nSize = 4096; } nOffset = File.findSignature(nOffset, nSize, "'PK'0506"); if (nOffset == -1) { return; } var nBase = File.readDword(nOffset + 16); nOffset -= File.readDword(nOffset + 12); if (!File.compare("'PK'0102", nOffset)) { return; } nOffset += File.readDword(nOffset + 0x2a) - nBase; } } } if (File.compare("'PK'0304", nOffset)) { bDetected = true; if (File.findString(nOffset, 0x40, "META-INF/MANIFEST.MF") != -1) { sOptions = sOptions.append("JAR"); // Java archive } if (File.findString(nOffset, 0x40, "classes.dex") != -1) { sOptions = sOptions.append("APK"); // Android application package file } var nVer = 0; var bEncrypted = 0; do { var v = File.readByte(nOffset + 4); if (v > nVer) { nVer = v; } if (!bEncrypted && (File.readByte(nOffset + 6) & 1)) { bEncrypted = 1; } var nPacked = File.readDword(nOffset + 0x12); var nName = File.readWord(nOffset + 0x1A); Archive.add(File.readDword(nOffset + 0x16), nPacked, nPacked == 0 && File.readByte(nOffset + 0x1E + nName - 1) == 0x2F); nOffset += 0x1E + nName + File.readWord(nOffset + 0x1C) + nPacked; } while (File.compare("'PK'0304", nOffset)); if (bEncrypted) { sOptions = "encrypted"; } sOptions = sOptions.append(Archive.contents()); sVersion = (nVer / 10).toFixed(1); } } ================================================ FILE: db/zlib ================================================ // Detect It Easy: DiE-JS framework file // Don't change anything unless you're sure about what you're doing // Detect a ZLIB. // Author: LinXP function detect_zlib(bFile, nOffset) { var sInfo = "ZLIB compression"; if (bFile.compare("7801", nOffset)) { if (bFile.isVerbose()) { sInfo += " fastest" } sOptions = sOptions.append(sInfo); return true; } else if (bFile.compare("785E", nOffset)) { if (bFile.isVerbose()) { sInfo += " fast" } sOptions = sOptions.append(sInfo); return true; } else if (bFile.compare("789C", nOffset)) { if (bFile.isVerbose()) { sInfo += " normal" } sOptions = sOptions.append(sInfo); return true; } else if (bFile.compare("78DA", nOffset)) { if (bFile.isVerbose()) { sInfo += " best" } sOptions = sOptions.append(sInfo); return true; } } ================================================ FILE: db_compress.cmd ================================================ :: Detect It Easy databases compressor for Windows (NTFS) :: Coded by DosX, https://github.com/DosX-dev @echo off call :compact_it "db" call :compact_it "db_extra" call :compact_it "db_custom" call :compact_it "dbs_min" exit /b 0 :compact_it set "path_to_dir=%~1" if not exist "%path_to_dir%" ( echo "%path_to_dir%" not found! exit /b 1 ) pushd "%path_to_dir%" "%windir%\system32\compact.exe" "*" /C /S /F /I /A /Q /EXE:LZX >nul if "%errorlevel%" == "0" ( echo [V] "%path_to_dir%" compressed! ) else ( echo [X] "%path_to_dir%" unable to compress! ) popd set "path_to_dir=" exit /b 0 ================================================ FILE: db_custom/.vscode/about.txt ================================================ This directory is responsible for correct recognition of *.sg files by Visual Studio Code. You can delete it if you don't need it. ================================================ FILE: db_custom/.vscode/settings.json ================================================ { "files.associations": { "*.sg": "javascript" } } ================================================ FILE: db_extra/.vscode/about.txt ================================================ This directory is responsible for correct recognition of *.sg files by Visual Studio Code. You can delete it if you don't need it. ================================================ FILE: db_extra/.vscode/settings.json ================================================ { "files.associations": { "*.sg": "javascript" } } ================================================ FILE: db_extra/COM/packer_packers.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Packer"); function detect() { if (Binary.compare("bf....be....b9....fdf3a5fceb$$8bf7bf....adad8be8b2..e9")) { sOptions = "by B. Vorontsov"; bDetected = true; } else if (Binary.compare("565056fd8bfc83ef..b9....be....f3a447ffe7")) { sOptions = "1997 by CyberWare"; bDetected = true; } else if (Binary.compare("be....bd....558bce8d72..bf....d1e9fd57f3a58d75..fcf9bf....c3")) { sOptions = "1997 by JES //CORE"; bDetected = true; } else if (Binary.compare("be....bd....558bce8d72..bf....d1e9fd57f3a58d75..fcf98bfdc3")) { sVersion = "1.2b"; sOptions = "1997 by JES //CORE"; bDetected = true; } else if (Binary.compare("508cc890ba....05....3b06....72..b4..ba....cd21b8....cd21")) { sOptions = "1996 by LostSoul"; bDetected = true; } return result(); } ================================================ FILE: db_extra/COM/patcher_patchers.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("patcher", "Patcher"); function detect() { if (Binary.compare("bc....8cc88ec08ed8fcbe....b9....8ae180e4..ac32c48844..e2")) { sName = "Patch engine"; sOptions = "by SoNiC //UTG"; bDetected = true; } else if (Binary.compare("e9$$$$b80300cd10b409ba....cd21e8$$$$1eb8....8ed833c98a0e....fec95133d2fec68916....b4..b2..cd21")) { sName = "ByteHunter patch engine"; sOptions = "by nOP & THE_q //Phrozen Crew"; bDetected = true; } else if (Binary.compare("e9$$$$0e588ec08ed88d16....68....9d9c582d....72..33dbb9")) { sName = "GPatch"; sVersion = "1.2b" sOptions = "by JES //C.O.R.E. team"; bDetected = true; } else if (Binary.compare("e9$$$$0e588ec08ed8e8$$$$68....9d9c582d....73..8d3e....fbc3")) { sName = "GPatch"; sVersion = "1.0c" sOptions = "by JES //C.O.R.E. team"; bDetected = true; } else if (Binary.compare("e9$$$$e8$$$$50558becc746......5d0733ffb9....fcb8....f3abc3")) { sName = "Cracker"; sOptions = "by NightIce //ByTe Enf0rcerZ"; bDetected = true; } else if (Binary.compare("eb$$c8......e8$$$$6a..07bf....268a1d263a1d74..268a1db8....99e8....f7d0f7d2b9")) { sName = "AutoCRK"; sVersion = "1.2x (uncrypted)"; sOptions = "1995 by MACHiNE GUNgsTeR //BANG!"; bDetected = true; } else if (Binary.compare("eb$$8bfc83ef..83ec..be....b9....57f3a45fffe7")) { sName = "AutoCRK"; sVersion = "1.2x (crypted)"; sOptions = "1995 by MACHiNE GUNgsTeR //BANG!"; bDetected = true; } else if (Binary.compare("c8......e8$$$$6a..07bf....268a1d263a1d74..268a1db8....99")) { sName = "AutoCRK"; sVersion = "1.15"; sOptions = "1995 by MACHiNE GUNgsTeR //BANG!"; bDetected = true; } else if (Binary.compare("e9$$$$ba....8bda438a2780fc..75..e8....3c..74..2e8b1e....83fb..75..e9")) { sName = "CRK2COM"; sVersion = "1.10b"; sOptions = "1993"; bDetected = true; } else if (Binary.compare("'/MG/'eb$$c8......e8$$$$6a..07bf....268a1d263a1d74..268a1db8....99")) { sName = "AutoCRK"; sVersion = "1.20"; sOptions = "by MACHiNE GUNgsTeR //BANG!"; bDetected = true; } else if (Binary.compare("e9$$$$e8$$$$bb....b9....8a0734..880743e2..c3")) { sName = "Crack Engine"; sVersion = "0.2"; sOptions = "by Prizna //PSP"; bDetected = true; } else if (Binary.compare("'SNT'1af8b409ba....cd2133f6bd....b8....ba....cd21a3....72..33c933d28bd8")) { sName = "SNT patch"; sOptions = "//SNT"; bDetected = true; } else if (Binary.compare("eb$$0e1fb409ba....cd21be....e8....803e......74..b4..ba....cd21eb..b4..ba....cd21b8....cd21")) { sOptions = "by WOLVERiNE"; bDetected = true; } else if (Binary.compare("bc....5406b8....cd21891e....8c06....b8....ba....cd21b8....ba....cd21071eb9....ba....b7..b8....cd10")) { sOptions = "by Randall Flagg of Razor 1911"; bDetected = true; } else if (Binary.compare("e9$$$$b8....cd10ba....e8....ba....b8....cd2173..ba....e8....ba....e8....b44ccd2193ba....e8")) { sOptions = "by Nostromo"; bDetected = true; } else if (Binary.compare("e9$$$$ba....b409cd21c706........c706........c706........c706........be....33c98a0e....80f9..74..5651")) { sName += " #1"; sOptions = "by Drink Or Die (Dark Knight)"; bDetected = true; } else if (Binary.compare("e9$$$$ba....b409cd2133c0cd16b4..33dbcd10feccb2..cd10c706........c706........c706........c706")) { sName += " #2"; sOptions = "by Dark Knight"; bDetected = true; } else if (Binary.compare("b409ba....eb$$cd21b409ba....eb$$cd21b409ba....eb$$cd21b409ba....eb")) { sOptions = "by Mr. KIM"; bDetected = true; } else if (Binary.compare("9090ba....8bfab409cd21c606......ba....b8....cd2172..93b8....33c933d2cd2172")) { sOptions = "by SkorpyoN Team"; bDetected = true; } else if (Binary.compare("9090ba....b409cd21b401cd1674..33c0cd1633c0cd163c..0f84")) { sOptions = "by +DzA kRAker"; bDetected = true; } else if (Binary.compare("9090ba....8bfab409cd21b401cd1674..33c0cd1633c0cd163c..75")) { sOptions = "by +DzA kRAker"; bDetected = true; } else if (Binary.compare("ba....b409cd21ba....b409cd21ba....b8....cd21ba....0f82....a3....ba....b409cd218b1e")) { sName = "MkPatch"; sVersion = "1.0"; sOptions = "by eGIS!"; bDetected = true; } return result(); } ================================================ FILE: db_extra/ELF/protector_ELFCrypt.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "ELFCrypt"); function detect() { if (ELF.compareEP("eb0206c6609cbe")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/MSDOS/cryptor_Cryptors.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Cryptor"); function detect() { if (MSDOS.compareEP("b2..33f6b9....2e30144649e3..eb..b8....ffe0")) { sOptions = "by Rainor'99"; bDetected = true; } else if (MSDOS.compareEP("1e8ccb8edbbb....8177......8177......8177......8177......8177......1f0eeb")) { sOptions = "by Papaev V.V., Moscow"; bDetected = true; } else if (MSDOS.compareEP("50e8$$$$5b9c5825....509d8ccb81c3....81eb....53bb....53cb")) { sOptions = "1990-92 by Sergdesign"; bDetected = true; } else if (MSDOS.compareEP("81c3....eb$$85fa85e8eb$$81c3....eb$$bb....81eb....81c3....f981e9....39f5ba....81ea....85de")) { sOptions = "by eGIS! //CORE"; bDetected = true; } else if (MSDOS.compareEP("bd....8cdb83c3..8cd805....8ed88ec033ffbe....b9....ba....0bc975..0bd274..4ae8....eb..561e")) { sOptions = "1994 by FalCoN"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$e8$$$$bf....e9$$$$31d2eb$$eb$$e9$$$$8edae9$$$$e8$$$$8715e9$$$$52eb$$31f6e8$$bb....eb$$8737e9$$$$56e9$$$$e9$$$$e8$$$$bf....bb....2e8a1789d8")) { sOptions = "by Matrix Technologies"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$eb$$bf....e9$$$$29f6e8$$$$e9$$$$8edee8$$$$8735e8$$$$56e9$$$$e9$$$$31ede9$$$$bb....e9$$$$e8$$$$e9$$$$e8$$$$e9$$$$e9$$$$e8$$$$e8$$$$e8$$$$872f")) { sOptions = "by Matrix Technologies"; bDetected = true; } else if (MSDOS.compareEP("e8$$$$33ed83ed..2ed0....5e0e8bfe81e7....f7df03fe2e893526a1....8ec0263b06....74..f92eff35")) { sOptions = "by DREAMMASTER"; bDetected = true; } else if (MSDOS.compareEP("eb$$e8$$$$eb$$e4210c..e62133c08ed80e50558becc746......5dfa8f06....8f06....fb9c580d....509d")) { sOptions = "by RaZoR 1911"; bDetected = true; } else if (MSDOS.compareEP("e9$$$$e80000fa9cfc505393584c4c3bc35b74..9de8....32e480c4..3065..47e2")) { sName += ' N1'; sOptions = "by ZeroCoder //XG"; bDetected = true; } else if (MSDOS.compareEP("3beb81c5....fc23eb13ec85fd1e0e33e985ee01ed23ee1f0e81d1....84e931dd073efe0e....e9")) { sOptions = "1996 by RAM Scanner //CiD"; bDetected = true; } else if (MSDOS.compareEP("b8....15....72..d4..8ac4..c3....8ed8b9....f7d32e871e....ff77..ff378becc747......8c0f")) { sOptions = "by Thunderbyte"; bDetected = true; } else if (MSDOS.compareEP("b8....15....72..d4..8ac4..c3..8ed8b9....f7d32e871e....ff77..ff378becc747......8c0f")) { sOptions = "by Thunderbyte"; bDetected = true; } else if (MSDOS.compareEP("2e8c1e....2e8e06....33ff33f6b9....0e1f030e....f3a406b8....500e07cb")) { sOptions = "1994 by Paragon Technology Systems"; bDetected = true; } else if (MSDOS.compareEP("87dbb8....15....72$$8cd315....72..d4..8ac483c3..8ed8b9....f7d32e87")) { sOptions = "1997 by Thunderbyte"; bDetected = true; } else if (MSDOS.compareEP("50e8$$$$5b83c3..1e06530e1f83c3..90b0..b9....2e3007fec043e2")) { sOptions = "by Dr. Motorhead"; bDetected = true; } return result(); } ================================================ FILE: db_extra/MSDOS/packer_FCP_IV.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "protector"); function detect() { if (MSDOS.compareEP("bc....c3") && MSDOS.compare("'FCP/IV'", MSDOS.getEntryPointOffset() - 6)) { sOptions = "by FCP/IV"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/archive_Resources.6.sg ================================================ // Detect It Easy: detection rule file // Author: Jason Hood , based on an idea by hypn0 meta("archive", "Resources"); function detect() { if (PE.getAddressOfEntryPoint() == 0) { bDetected = true; for (var i = 0; i <= PE.nLastSection && !bDetected; i++) { // IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_CNT_CODE if (PE.section[i].Characteristics & 0x20000020) { bDetected = false; } } } return result(); } ================================================ FILE: db_extra/PE/compiler_EP.MSC.4.sg ================================================ // Detect It Easy: detection rule file meta("compiler", "EP:Microsoft C/C++"); function detect() { if (PE.compareEP("64a100000000558bec6aff68........68........506489250000000083ec..5356578965")) { sVersion = "3.0-5.0"; bDetected = true; } else if (PE.compareEP("64a100000000558bec6aff68........68........508b45..6489250000000083ec..85c05356578965")) { sVersion = "3.10"; bDetected = true; } else if (PE.compareEP("535657bb........8b7c....553bfb75..011d")) { sVersion = "3.0-3.10"; bDetected = true; } else if (PE.compareEP("53b8........8b5c....565785db5575..833d..........75..33c0")) { sVersion = "3.0-5.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/compiler_EP.MSVC.4.sg ================================================ // Detect It Easy: detection rule file meta("compiler", "Microsoft Visual C/C++"); function detect() { if (PE.compareEP("8bff558bec837d....75..e8........ff75..8b4d..8b55..e8")) { sVersion = "2008-2010"; } else if (PE.compareEP("8bff558bec83ec..538b5d..83fb..75..5657e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc7")) { sVersion = "2010, 10"; } else if (PE.compareEP("8bff558bec837d....0f84........ff75..ff75..e8........59595d")) { sVersion = "2010, 10 (30319, 40219)"; } else if (PE.compareEP("837c24....8b4424..a3........75..68........6a")) { sVersion = "2010, 10 (40219)"; } else if (PE.compareEP("558bec8b45..83f8..75..68........ff15")) { sVersion = "2010, 10 (40219)"; } else if (PE.compareEP("8bff558bece8$$$$$$$$8bff558bec83ec..c745..........c745..........813d")) { sVersion = "2008, 9.0"; } else if (PE.compareEP("8bff558bec83ec..837d....75..5657e8........b8........be........8bf8")) { sVersion = "2008 SP1"; } else if (PE.compareEP("8bff558bece8........5de9")) { sVersion = "2008 SP1"; } else if (PE.compareEP("8bff558bec837d....75..e8........8b45..508b4d..518b55..52e8")) { sVersion = "2008"; sOptions = "MSVCRTD"; } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc7")) { sVersion = "2008-2010"; } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....57bf........3bc7")) { sVersion = "2005-2010"; } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5657bf........be........3bc7")) { sVersion = "2010, 10.10"; } else if (PE.compareEP("8bff558bec837d....75..e8........5de9........8bff55")) { sOptions = "Patched"; // ~~~~ } else if (PE.compareEP("558bec6a..68........68........64a100000000506489250000000083ec..5356578965")) { sVersion = "6.0 (1720-9782)"; } else if (PE.compareEP("558bec538b5d..568b75..85f6578b7d")) { sVersion = "2002 (2148)"; } else if (PE.compareEP("558bec538b5d..568b75..578b7d..85f675")) { sVersion = "6.0 (1720-8966)"; } else if (PE.compareEP("8b4424..83e8..74..4875..8b4424..50a3........ff15")) { sVersion = "2003, 7.1 (3077)"; } else if (PE.compareEP("558bec8b45..83f8..56570f84........33ff3bc7")) { sVersion = "2003, 7.1 (3052)"; } else if (PE.compareEP("558bec518b45..8945..837d....74..837d")) { sVersion = "2002"; } else if (PE.compareEP("558bec568b75..83fe..74..83fe..75..a1")) { sVersion = "2002"; } else if (PE.compareEP("6a..68........e8........bf........8bc7e8........8965..8bf4893e56ff")) { sVersion = "2003, 7.1 (3052-9782)"; } else if (PE.compareEP("6a..68........e8........66813d............75..a1")) { sVersion = "2002"; } else if (PE.compareEP("6a..68........e8........33c0408945..8b75..33ff")) { sVersion = "2003"; } else if (PE.compareEP("8bff558bec538b5d..568b75..85f6578b7d")) { sVersion = "2003"; } else if (PE.compareEP("fff589e566f7c6....80c3..80eb..81ec........66c1eb..6689ed")) { sVersion = "2003"; sOptions = "Driver"; } else if (PE.compareEP("6689ff5589e581ec........814d..........0f82........538d45")) { sVersion = "2003"; sOptions = "Driver"; } else if (PE.compareEP("8bff558bec837d....75..e8........5de9")) { sVersion = "2005"; } else if (PE.compareEP("8bff558bec8b45..83e8..566a..5e0f84")) { sVersion = "2003-2005"; } else if (PE.compareEP("8bff558bec8b45..5633f64685c0")) { sVersion = "2005"; } else if (PE.compareEP("8bff558beca1........85c0b9........74..3bc175..a1")) { sVersion = "2005"; sOptions = "Driver"; } else if (PE.compareEP("8bff558bec83ec..53568b75..8b46..5733ff897d")) { sVersion = "2005"; sOptions = "Driver"; } else if (PE.compareEP("e8$$$$$$$$558bec83ec..a1........8365....8365....5357")) { sVersion = "2005"; } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........85c074..3d........75..568d")) { sVersion = "2005"; } else if (PE.compareEP("5355568b74....85f657b8........75..8b0d")) { sVersion = "5.0"; } else if (PE.compareEP("558bec6a..68........68........64a100000000506489250000000083c4..535657")) { sVersion = "5.0-6.0 (1720-9049)"; } else if (PE.compareEP("535657bb........8b7c....553bfb74..85ff")) { sVersion = "3.10"; } else if (PE.compareEP("558bec837d....0f84........ff75..ff75..ff75..e8........83c4")) { sVersion = "2012"; } else if (PE.compareEP("8bff558bec837d....74..8b55..51e8$$$$$$$$8bff558bec83ec..a1........33c58945..5633f657")) { sVersion = "2013, 12.1 (40116)"; } else if (PE.compareEP("558bec837d....75..e8$$$$$$$$558bec83ec..8365....8365....a1........5657bf........be........3bc7")) { sVersion = "2013"; } else if (PE.compareEP("8bff558bec83ec..a1........33c58945..568b75..5783fe")) { sVersion = "2013"; } else if (PE.compareEP("558bec837d....75..e8$$$$$$$$558bec83ec..a1........8365....8365....5357bf........3bc7bb")) { sVersion = "2005"; } else if (PE.compareEP("558bec837d....75..e8$$$$$$$$558bec83ec..a1........8365....8365....5657bf........be........3bc7")) { sVersion = "2012, update 4"; } else if (PE.compareEP("8bff558bec837d....75..e8$$$$$$$$8bff558bec83ec..a1........8365....8365....57bf........3bc7")) { sVersion = "2005 (50727)"; } else if (PE.compareEP("8b4424..83e8..74..4875..568b7424..56ff15")) { sVersion = "2005 (50727.1)"; } else if (PE.compareEP("837c24....75..e8$$$$$$$$8bff558bec83ec..a1........85c0")) { sVersion = "2005 (50727)"; } else if (PE.compareEP("8bff56e8........85c07c..e8$$$$$$$$e8$$$$$$$$8bff558bec83ec..a1........8365....8365....57bf........3bc7")) { sVersion = "2005 (50727)"; } else if (PE.compareEP("558bece8$$$$$$$$558bec83ec..c745..........c745..........813d")) { sVersion = "2005 (50727)"; } else if (PE.compareEP("558bec81ec........8b45..89..........83............0f84........83")) { sVersion = "6.0"; } else if (PE.compareEP("558bec51c745..........837d....75..833d..........75..33c0e9")) { sVersion = "6.0 (1720-8799)"; } else if (PE.compareEP("558bec83ec..8365....5356578b3d........6a..5933c0")) { sVersion = "6.0 (8168)"; sOptions = "Driver"; } else if (PE.compareEP("558bec83ec..5356578b3d........8d45..33db")) { sVersion = "6.0 (1720)"; sOptions = "Driver"; } else if (PE.compareEP("558bec81ec........837d....75..8d85........c785")) { sVersion = "6.0 (1735)"; } else if (PE.compareEP("8b4424..5383f8..5674..33c93bc10f84........83f8..0f84........6a..585e5b")) { sVersion = "6.0 (8168-8797)"; } else if (PE.compareEP("837c24....8b4424..a3........c705................75..e8........b8........c2")) { sVersion = "2008, SP1"; } else if (PE.compareEP("8bff558bec837d....75..e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc7")) { sVersion = "2008, SP1 (21022, 30729)"; } else if (PE.compareEP("8bff558bec837d....0f84........ff75..8b4d..8b55..e8........595d")) { sVersion = "2008 (21022)"; } else if (PE.compareEP("837c24....0f84$$$$$$$$e8$$$$$$$$558bec83ec..a1........8365....8365....5357bf........3bc7")) { sVersion = "2005"; } else if (PE.compareEP("837c24....75..e8$$$$$$$$558bec83ec..a1........8365....8365....5357bf........3bc7")) { sVersion = "2005"; } else if (PE.compareEP("e8$$$$$$$$558bec83ec..8365....8365....a1........5657bf........be........3bc7")) { sVersion = "2013-2017"; } else if (PE.compareEP("8bff558bec837d....75..e8$$$$$$$$8bff558bec83ec..8365....8365....a1........5657bf........be........3bc7")) { sVersion = "2017, 15.0 (24610)"; } else if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..8365....8365....a1........5657bf........be........3bc7")) { sVersion = "2017, 15.0"; } else if (PE.compareEP("e8$$$$$$$$8b0d........5657bf........be........3bcf74..85ce75..e8")) { sVersion = "2017, 15.5-6"; } else if (PE.compareEP("5355568b7424..85f657b8........74..8b7c24..8b5c24..83fe..74")) { sVersion = "1997, 5.XX"; } else if (PE.compareEP("535657bb........8b7c24..553bfb0f85........011d")) { sVersion = "3.1"; } bDetected = bDetected || Boolean(sVersion) || Boolean(sOptions); if (sVersion) sVersion += ", by EP"; return result(); } ================================================ FILE: db_extra/PE/cryptor_3dcrypter.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "3dCrypter"); function detect() { if (PE.compareEP("684c124000e8eeffffff0000000000003000000038000000000000003848ee54")) { sVersion = "mod Zion-92"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_404crypter.1.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "404Crypter"); function detect() { if (PE.isNET()) { if (PE.isNetObjectPresent("Z.resources") && PE.isNetObjectPresent("First")) { bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/cryptor_ABC_Cryptor.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "ABC Cryptor"); function detect() { if (PE.compareEP("68FF6424F0685858585890FFD4508B40F205B095F6950F850181BBFF")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_AR_Crypt_Private.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "AR Crypt Private"); function detect() { if (PE.compareEP("b8........5033c0c3") && PE.compareEP("b8########6033db33c9b8........3d........74")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_Aase_Crypter.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "Aase Crypter"); function detect() { if (PE.compareEP("558BEC83C4F053B8A03E0010E893DEFFFF68F8420010E879DFFFFF6800430010")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_AcidCrypt.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "AcidCrypt"); function detect() { if (PE.compareEP("60B9........BA........BE........0238404E75FA8BC28A1832DFC0CB")) { bDetected = true; } else if (PE.compareEP("BE........0238404E75FA8BC28A1832DFC0CB")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_AlmafuerteCrypter.1.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "AlmafuerteCrypter"); function detect() { if (PE.compareEP("649068f4134000e8ecffffff000000003000000040000000000000003b2d72e4")) { sVersion = "mod Zion-92"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_Anslym_Crypter.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "Anslym Crypter"); function detect() { if (PE.compareEP("558BEC83C4F05356B838170510E85A45FBFF33C05568211C051064FF30648920")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_App_Encryptor.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "App Encryptor"); function detect() { if (PE.compareEP("60E8000000005D81ED1F1F4000B97B0900008DBD671F40008BF7AC")) { bDetected = true; } else if (PE.compareEP("E997000000'\r\nSilent Team App Protector'")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_BasicCrypt1.1.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "BasicCrypt"); function detect() { if (PE.compareEP("68b0114000e88bfbffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f4010000641b400000000000308c4000408c4000980b000000904000b41040")) { sOptions = "sudo"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_BopCrypt.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "BopCrypt"); function detect() { if (PE.compareEP("60BD........E8....0000")) { sVersion = "1.00"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_ChainskiCrypter.1.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "ChainskiCrypter"); function detect() { if (PE.isNetObjectPresent("Chainski")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_CodeCrypter.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "CodeCrypter"); // ??????????? function detect() { if (PE.compareEP("5058535B90BB........FFE390CCCCCC558BEC5DC3")) { sVersion = "0.31"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_Crypter.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "Crypter"); // ???????????? function detect() { if (PE.compareEP("68FF6424F06858585858FFD4508B40F205B095F6950F850181BBFF68")) { sVersion = "3.1"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_Cryptic.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Cryptic"); function detect() { if (PE.compareEP("B8........BB........B900100000BA........03D803C803D13BCA74068031..41EBF6FFE3")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_DCrypt_Private.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "DCrypt Private"); function detect() { if (PE.compareEP("B9........E8000000005868........83E80B0F1800D00048E2FBC3")) { sVersion = "0.9b"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_DataAnubis.1.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "DataAnubis"); function detect() { if (PE.isNetObjectPresent("_Lambda$__R20-1") && PE.isNetObjectPresent("_Lambda$__R97-1")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_Fly-Crypter.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "Fly-Crypter"); function detect() { if (PE.compareEP("53565755BB2C....44BE00304444BF20....44807B28007516833F0074118B1789D033D289178B")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("558BEC83C4F053B818224444E87FF7FFFFE80AF1FFFFB809000000E85CF1FFFF8BD885DB7505")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_FreeCryptor.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "FreeCryptor"); function detect() { if (PE.compareEP("8B0424409083C007803890907402EBFF")) { if (PE.compareEP("68", 16)) { sVersion = "0.1 build 001"; } else if (PE.compareEP("9068", 16)) { sVersion = "0.1 build 002"; } bDetected = true; } else if (PE.compareEP("33D2901E68........0FA01F8B029050548F0290908E642408FFE2585033D25283F8019B408A10891424")) { sVersion = "0.2 build 002"; bDetected = true; } else if (PE.compareEP("90909b591e909b9033d29b68........9b9b0fa01f8b0a9b51548f0290909b")) { sVersion = "0.3 build 3"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_INCrypter.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "INCrypter"); function detect() { if (PE.compareEP("6064A1300000008B400C8B400C8D5820C70300000000E8000000005D81ED")) { sVersion = "0.3"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_Open_Source_Code_Crypter.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "Open Source Code Crypter"); // ???????? function detect() { if (PE.compareEP("558BECB9090000006A006A004975F9535657B8........E828F8FFFF33C05568")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_STUD.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "ScanTime UnDetectable"); function detect() { if (PE.compareEP("682C114000E8F0FFFFFF00000000000030000000380000000000000037BB71ECA4E1984C9BFE8F0FFA6A07F6")) { sVersion = "RC4 1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_SexCrypt.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev meta("cryptor", "sex"); function detect() { if (PE.isSignatureInSectionPresent(0, "'SexCrypt'....324485..4202....3842849322100493..7726374558429100005400000000002900390045....049003200539......44..000000219840")) bDetected = true; return result(); } ================================================ FILE: db_extra/PE/cryptor_Sexe_Crypter.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "Sexe Crypter"); function detect() { if (PE.compareEP("558BEC83C4EC53565733C08945ECB8........E830FAFFFF33C05568........64FF306489")) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_Simple_UPX_Cryptor.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "Simple UPX Cryptor"); function detect() { if (PE.compareEP("60B8........B9....0000803408..E2FA6168........C3")) { if (PE.compareEP("1800", 7)) { sOptions = "multi layer encryption"; } else if (PE.compareEP("01", 8)) { sOptions = "single layer encryption"; } sVersion = "30.4.2005"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_The_Best_Cryptor.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "The Best Cryptor by FsK"); function detect() { if (PE.findSignature(PE.getSize() - 0x100, 0x100, "8b042483e8..68........ffd0b8........3d..............30..40eb..b8........3d..............30..40eb") != -1) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_ass-crypter.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "ass-crypter"); function detect() { if (PE.compareEP("558BEC83C4EC53........8945ECB898400010E8ACEAFFFF33C055687851001064........206A0A6888510010A1E097001050E8D8EAFFFF8BD853A1E097001050E812EBFFFF8BF853A1E097001050E8DCEAFFFF8B")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_darkeye.1.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "DarkEye"); function detect() { if (PE.isNetObjectPresent("BasicCryptorFromDebil")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptor_njCrypter.2.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research & ILK // i like coffee meta("cryptor", "njCrypter"); function detect() { if (PE.isNET()) { bDetected = true; if (validateReferences( isPositive = true, references = [ "System.IO", "System.Security.Cryptography", "System.Text", "System.Reflection", "Stub", "cMain", "Decrypt", "bSalt" ] )) { bDetected = false; return null; // end } } return result(); } // validateReferences by DosX function validateReferences(isPositive, references) { for (var i = 0; i < references.length; i++) { var sign = "00'" + references[i] + "'00"; if (isPositive == true) { if (!PE.isSignatureInSectionPresent(0, sign)) { return true; } } else { // negative if (PE.isSignatureInSectionPresent(0, sign)) { return true; } } } return false; } ================================================ FILE: db_extra/PE/cryptor_unknown_malware_cryptor.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "Unknown malware cryptor"); function detect() { if (PE.compareEP("51578bcf47fc5f5955eb")) { sVersion = "AA"; bDetected = true; } else if (PE.compareEP("558bec81c4........565753508d8424........ff15")) { sVersion = "AB"; bDetected = true; } else if (PE.compareEP("833d..........e9$$$$$$$$0f85........5058807c")) { sVersion = "AC"; bDetected = true; } else if (PE.compareEP("833d..........75$$ff35........e8$$$$$$$$558bec81ec")) { sVersion = "AC"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptors_1.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("cryptor", "Unknown cryptor"); function detect() { if (PE.compareEP("bb........8b338b4b..b8........eb$$31064975..83c3..833b..75..eb$$9b")) { sName = "Cryptor by Merix //UCF"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/cryptors_2.2.sg ================================================ // Detect It Easy: detection rule file meta("cryptor", "unknwown cryptor"); // ???????????? function detect() { if (PE.compareEP("909090909090609ce8000000005dd14d..816d..........d709d8ab")) { sOptions = "by TMG"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/insatller_Avast_installer.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Avast installer"); function detect() { bDetected = PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc7") && PE.compareOverlay("'ASWsetupFPkgFil3'"); return result(); } ================================================ FILE: db_extra/PE/installer_Adobe_Flash_Player_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Adobe Flash Player"); function detect() { if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc7")) { for (var i = 0; i < PE.getNumberOfResources() && !bDetected; i++) { if (PE.resource[i].Type == "RT_RCDATA") { if (PE.compare("02010000", PE.resource[i].Offset)) { bDetected = true; } } } } return result(); } ================================================ FILE: db_extra/PE/installer_Blizzard_PrePatch.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Blizzard PrePatch"); function detect() { if (PE.compareEP("558bec6a..68........68........64a100000000506489250000000083ec..5356578965")) { if (PE.compareOverlay("'MPQ'1a")) { sVersion = "2.XX"; bDetected = true; } } else if (PE.compareEP("e8$$$$$$$$e8$$$$$$$$a1........85c075..538b1d........5657be........bf........8d6424")) { if (PE.compareOverlay("'MPQ'1a")) { sVersion = "2.70"; bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/installer_Box_Stub.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "Box Stub"); function detect() { if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774..85c374")) { if (PE.findSignature(PE.getOverlayOffset(), Math.min(0x110, PE.getOverlaySize()), "'7z'bcaf") !== -1) { sOptions = "7zip"; bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/installer_BulletProofSoft_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("installer", "BulletProofSoft"); function detect() { if (PE.compareEP("558bec6a..68........68........64a100000000506489250000000083ec..5356578965")) { if (PE.compareOverlay("1f8b08", 0x3000)) { bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/installer_DockerDesktopInstaller.1.sg ================================================ // Detect It Easy: detection rule file // Author: A.S.L. 2022.01.30 // Exeinfo Pe - don't detect this big file over 500 MB meta("installer", "Docker Desktop Installer .NET sfx 7zip"); function detect() { if (PE.isNET()) { if ((PE.isNetObjectPresent("Docker Desktop Installer")) && (PE.getAddressOfEntryPoint() == 0x400000) // EP=0000 && (PE.section[".rsrc"].FileSize > 0x01000000)) // over 400 MB { sVersion = "4.x"; bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/installer_Enigma_Installer.1.sg ================================================ // Detect It Easy: detection rule file // sign by A.S.L - asl@onet.eu - 21.06.2015 meta("installer", "Enigma"); function detect() { for (var i = 0; i < PE.resource.length; i++) { if (PE.resource[i].Name == '/CFG/CONFIG') { if (PE.resource[i + 1].Name == '/CFG/PRIVACY_POLICY') { bDetected = 2; break; } } } // MS C++ v9.0 stub and Resources found if (PE.compareEP("E8....0100E9") && (bDetected == 2)) { bDetected = true; sVersion = "v1.0"; } return result(); } ================================================ FILE: db_extra/PE/installer_Hamrick_Software_installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: A.S.L meta("installer", "Hamrick Software - VueScan Installer"); function detect() { if (PE.compareOverlay("BDA6EEE9F9EDEFEDE5ED")) { if (PE.compareEP("E8....0000")) { bDetected = true; } else if (PE.compareEP("4883ec..e8$$$$$$$$48895c24..55488bec4883ec..488b05........48bb................483bc375..33c0")) { bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/installer_Kingsoft_Installer.1.sg ================================================ // Detect It Easy: detection rule file // Author: A.S.L 2024.10.28 meta("installer", "Kingsoft"); function detect() { if (PE.compareEP("E8") || PE.compareEP("60")) { // MSV C++ or UPX if (PE.compareOverlay("'zzd.'")) { sOptions = "7z archive"; bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/installer_QT_installer.1.sg ================================================ // Detect It Easy: detection rule file meta("installer", "QT installer"); function detect() { if (PE.compareOverlay("'qres'")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/installer_SHIROUZU_Hiroaki_installer.1.sg ================================================ // Detect It Easy: detection rule file format // Author: A.S.L. 2025.06.15 // Exeinfo Pe - don't detect this installer meta("installer", "SHIROUZU Hiroaki and FastCopy Lab Installer 1996-2024"); function detect() { if (PE.compareEP("E8....0000E9")) { if (PE.compareOverlay("0A'======================================================================'0A'IP2:'")) { sVersion = "5.X - .zlib ovl"; bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/installer_Store_Installer.1.sg ================================================ // Detect It Easy: detection rule file meta("installer", "Store Installer"); function detect() { if (PE.isNET()) { if (PE.getVersionStringInfo("InternalName") == "StoreInstaller.exe") { sVersion = PE.getVersionStringInfo("FileVersion"); bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/installer_TrueCrypt-VeraCrypt_installer.1.sg ================================================ // Detect It Easy: detection rule file format // Author: A.S.L. 2019.05 updated 2025.01.31 meta("installer", "TrueCrypt or VeraCrypt installer"); function detect() { if (PE.compareEP("E8....0000E9") && PE.compareOverlay("..'CINSTRT'")) { sVersion = "1.X-7.X"; bDetected = true; } else { // VeraCrypt only, TrueCrypt closed if (PE.compareEP("558BEC83EC0C56") && PE.compareOverlay("'VCINSTRT'")) { sVersion = "1.26 2025"; bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/joiner_Anskya_Binder.2.sg ================================================ // Detect It Easy: detection rule file meta("joiner", "Anskya Binder"); function detect() { if (PE.compareEP("BE........BB........33ED83EE04392E7411")) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/joiner_Blade_Joiner.1.sg ================================================ // Detect It Easy: detection rule file meta("joiner", "Blade Joiner"); function detect() { if (PE.compareEP("558BEC81C4E4FEFFFF53565733C08945F08985")) { sVersion = "1.5"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/joiner_DJoin.1.sg ================================================ // Detect It Easy: detection rule file meta("joiner", "DJoin"); function detect() { if (PE.compareEP("C605........00C605........00................00........00..........00")) { sVersion = "0.7 public"; sOptions = "RC4 encryption"; bDetected = true; } else if (PE.compareEP("C605........00................00........00..........00")) { sVersion = "0.7 public"; sOptions = "xor encryption"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/joiner_ExeJoiner.1.sg ================================================ // Detect It Easy: detection rule file meta("joiner", "ExeJoiner"); function detect() { if (PE.compareEP("68........6804010000E83903000005........C6005C680401000068")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/keygen_keygens.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("keygen", "Keygen"); function detect() { if (PE.compareEP("6a..e8........a3........c705................c705................c705................c705................c705................a1........a3........6a..ff35........e8........a3........a3........68")) { sOptions = "by Dimedrol //CORE"; bDetected = true; } else if (PE.compareEP("606a..e8........a3........6a..6a..6a..e8........506a..e8........50")) { sOptions = "by promethee //ECLIPSE"; bDetected = true; } else if (PE.compareEP("6a..e8........a3........68........6a..6a..6a..6a..68........6a..6a..6a..68........6a..6a..6a..6a..e8........a3........6a")) { sOptions = "by Duelist //CORE"; bDetected = true; } else if (PE.compareEP("6a..e8........a3........6a..68........6a..6a..50e8........50e8........c3")) { sOptions = "2000 by Duelist //CORE"; bDetected = true; } else if (PE.compareEP("6a..e8........a3........33c066b8....6a..68........6a..50ff35........e8........e8........c8......53575633c0668b45..663d....75..eb")) { sOptions = "by //oDDiTy"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/library_DS.Flexlm.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("library"); function detect() { var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; var nOffset = PE.findSignature(0, nSize, "'@(#) F'"); if (nOffset != -1) { sName = File.cleanString(PE.getString(nOffset, 200).match(/\w\S*/i)); sVersion = File.cleanString(PE.getString(nOffset, 200).match(/\d\S*/i)); if (sVersion && sVersion.length < 32) { bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/library_DS.RLM.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("library", "Reprise License Manager (RLM)"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); if (nSize > 50000000) nSize = 50000000; var nOffset = PE.findString(0, nSize, "Reprise License Manager (RLM)"); if (nOffset !== -1) { sVersion = PE.getString(nOffset, 200).match(/\d\S*\w/i); bDetected = true; nOffset = PE.findSignature(0, nSize, "44894c24..4c894424..48895424..48894c24..b8........e8........482be0488b05........4833c448898424........48c78424................48c78424................48c78424................c74424..........c74424..........488b8424........4805........48894424..c74424..........c74424..........c74424..........c78424................4883bc24..........74..488b8424........c7"); //v8.0-9.1 x64 if (nOffset !== -1) { sOptions = "rlm_pubkey at " + nOffset; } } return result(); } ================================================ FILE: db_extra/PE/packer_BobPack.2.sg ================================================ // Detect It Easy: detection rule file meta("packer", "BobPack"); function detect() { if (PE.compareEP("60E8000000008B0C2489CD83E90681ED........E83D0000008985........89C2B85D0A00008D0408E8E40000008B700401D6E876000000E851010000E80101")) { sVersion = "1.00"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/packer_Feokt.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("packer", "Feokt run-time"); function detect() { if (PE.compareEP("8925........bf........31c0b9........29f9fcf3aa9bdbe350669bd93c249b")) { sOptions = "by Max Feoktistov"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/packer_IMPostor_Pack.2.sg ================================================ // Detect It Easy: detection rule file meta("packer", "IMPostor Pack"); function detect() { if (PE.compareEP("BE........83C601FFE600000000....000000000000000000......00..02....00100000000200")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/packer_Native_UD_Packer.2.sg ================================================ // Detect It Easy: detection rule file meta("packer", "Native UD Packer"); function detect() { if (PE.compareEP("31C031DB31C9EB0E6A006A006A006A00FF15........FF15........89C768")) { sVersion = "1.1"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/packer_TomatoX.2.sg ================================================ // Detect It Easy: detection rule file // Author: KDSS-Research meta("packer", "TomatoX"); function detect() { if (PE.isSectionNamePresent(".tomato")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/packer_bbfb.2.sg ================================================ // Detect It Easy: detection rule file // Author: sendersu /* If errors pls contact sendersu on cracklab.team */ // https://www.flashbackrecorder.com/ meta("packer", "Blueberry/FLASHBACK"); function detect() { if (PE.findString(0, PE.getSize(), "BB FlashBack Movie") != -1) { if (PE.compare("'FBPE'", PE.getSize() - 4)) { bDetected = true; } sVersion = PE.getFileVersion(); } return result(); } ================================================ FILE: db_extra/PE/patcher_Patch.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("patcher", "Patch"); function detect() { if (PE.compareEP("e8$$$$$$$$558bec81c4........5657536a..e8........a3........c745..........6a..68........6a..e8")) { for (var i = 0; i < PE.resource.length; i++) { if (PE.resource[i].Type == "RT_RCDATA") { if (PE.compare("a28ff4c4", PE.resource[i].Offset)) { sVersion = "2.0"; bDetected = true; break; } } } } return result(); } ================================================ FILE: db_extra/PE/protection_DS.Key-Lok_II_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "Key-Lok II dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nOffset = 0; var endOffset = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); while (true) { nOffset = PE.findString(nOffset, endOffset - nOffset, "\\.\\"); if (nOffset == -1) break; nOffset += 4; if (PE.compare("'KeyDongle_0'", nOffset)) { bDetected = true; break; } } return result(); } ================================================ FILE: db_extra/PE/protection_DS.Novex_dongle.4.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "Novex/Guardant dongle reference"); function detect() { // I'm (adoxa) guessing this don't occur in the overlay, so don't search it (avoid wasting time on big installers). if (PE.findString(0, PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(), "\\\\.\\NVKEY") != -1) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protection_DS.Rockey4_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "Rockey4 dongle reference"); function detect() { // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers). var nOffset = 0; var endOffset = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(); while (true) { nOffset = PE.findString(nOffset, endOffset - nOffset, "\\.\\"); if (nOffset == -1) break; nOffset += 4; if (PE.compare("'ROCKEY'", nOffset) || PE.compare("'rockey'", nOffset)) { bDetected = true; break; } } return result(); } ================================================ FILE: db_extra/PE/protection_DS.Wizzkey_dongle.5.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protection", "Wizzkey dongle reference"); function detect() { // I'm (adoxa) guessing this doesn't occur in the overlay, so don't search it (avoid wasting time on big installers). if (PE.findString(0, PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize(), "\\\\.\\WIZZKEYRL") != -1) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_ARM_Protector.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "ARM Protector"); function detect() { if (PE.compareEP("E8040000008360EB0C5DEB05")) { switch (PE.readDword(PE.nEP + 42)) { case 0xAB3: sVersion = "0.5"; break; case 0xBA1: sVersion = "0.6"; break; default: sVersion = "0.1b-0.3b"; } bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_ASPR_Stripper.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "ASPR Stripper"); function detect() { if (PE.compareEP("BB........E9........609CFCBF........B9........F3AA9D61C3558BEC")) { sVersion = "2.X"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Adept_Protector.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Adept Protector"); function detect() { if (PE.isNET()) { var nOffset = PE.findString(PE.section[0].FileOffset, PE.section[0].FileSize, "ByAdeptProtector"); if (nOffset != -1) { if (PE.compare("'Smashed'", nOffset - 7)) { sOptions = "Evaluation"; } else if (PE.compare("'STAThreadAttribute'", nOffset + 17)) { sVersion = "2.1"; } bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/protector_Alex_Protector.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Alex Protector"); function detect() { if (PE.compareEP("60E8000000005D81ED06104000E824000000")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("60E801000000C783C40433C9E8010000006883C404E8010000006883C404")) { sVersion = "0.4 beta 1"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Alloy.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Alloy"); function detect() { if (PE.compareEP("9C60E802......33C08BC483C004938BE38B5BFC81EB........87DD6A0468001000006800..00006A00FF95........0B")) { sVersion = "4.x"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Apex-c.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Apex-c"); function detect() { if (PE.compareEP("68........B9FFFFFF0001D0F7E2720148E2F7B9FF0000008B34248036FD46E2FAC3")) { sVersion = "BLT Apex 4.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_BitShape_PE_Crypt.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "BitShape PE Crypt"); function detect() { if (PE.compareEP("60E8000000005D81ED........B97B0900008DBD........8BF7AC")) { sVersion = "1.5"; bDetected = true; } else if (PE.compareEP("E8000000005B83EB05EB04'RND!'EB02CD20EB")) { sVersion = "1.0-1.02"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_BlindSpot.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "BlindSpot"); function detect() { if (PE.compareEP("558BEC81EC500200008D85B0FEFFFF5356A3........578D85B0FDFFFF680001000033F65056FF15........5668800000006A0356568D85B0FDFFFF680000008050FF15........56566800080000508945FCFF15")) { sVersion = "1.00"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Break_Into_Pattern.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Break-Into-Pattern"); function detect() { if (PE.compareEP("E9$$$$$$$$EB14")) { sVersion = "0.1"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_CDS_SS.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "CDS SS"); function detect() { if (PE.compareEP("60E8000000005D81ED........FF742420E8D30300000BC00F84130300008985........668CD8A804740CC785")) { sVersion = "1.0 beta1"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_CodeSafe.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "CodeSafe"); function detect() { if (PE.compareEP("83EC10535657E8C40100", 23)) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_DEF.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "DEF"); function detect() { if (PE.compareEP("BE........6A..59807E070074118B460C05........8B56103010404A75FA83C628E2E4")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_DirTy_CrYpt0r.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "DirTy CrYpt0r"); function detect() { if (PE.compareEP("b8........32dbfec33018403d........7e..68........e8")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_EP.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "EP"); // ????????????? function detect() { if (PE.compareEP("5083C0178BF09733C033C9B124AC86C4ACAA86C4AAE2F600B8400003003C40D2338B661450708B8D3402448B1810487003BA")) { sVersion = "1.0"; bDetected = true; } else if (PE.compareEP("6A..60E90101")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_EXECrypt.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "EXECrypt"); function detect() { if (PE.compareEP("909060E8000000005D81ED........B91500000083C10483C101EB05EBFE83C756EB00EB00")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_EXERefactor.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "EXERefactor"); function detect() { if (PE.compareEP("558BEC81EC900B0000535657E9588C0100'USCATION'")) { sVersion = "0.1"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Embed_PE.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Embed PE"); function detect() { if (PE.compareEP("83EC506068........E8....0000")) { switch (PE.readWord(PE.nEP + 10)) { case 0x992F: sVersion = "1.13"; break; case 0xFFCB: sVersion = "1.24"; break; default: sVersion = "1.X"; break; } bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_EncryptPE.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "EncryptPE"); function detect() { if (PE.compareEP("609C64FF3500000000E8")) { switch (PE.readDword(PE.nEP + 10)) { case 0x179: sVersion = "1.2003.3.18-1.2003.5.18"; break; case 0x17a: sVersion = "2.2004.6.16-2.2006.6.30"; break; case 0x173: sVersion = "2.2006.7.10-2.2006.10.25"; break; case 0x21b: sVersion = "2.2007.04.11"; break; } bDetected = true; } // else if (PE.compareEP("807c24....0f85........60be........8dbe........5783cd..eb")) { // sOptions = "Delphi file protected"; // bDetected = true; // } return result(); } ================================================ FILE: db_extra/PE/protector_ExeSafeguard.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "ExeSafeguard"); function detect() { if (PE.isSignatureInSectionPresent(PE.nLastSection, "C05DEB4EEB47DF694E58DF5974F3EB01DF75EE9A599C81C1E2FFFFFFEB01DF9DFFE1E851E8EBFFFFFF")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_ExeSmasher.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "ExeSmasher"); function detect() { if (PE.compareEP("9CFE03..60BE........8DBE..10FFFF5783CDFFEB10")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Exe_Locker.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Exe Locker"); function detect() { if (PE.compareEP("E800000000608B6C242081ED05000000")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_FakeNinja.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "FakeNinja"); function detect() { if (PE.compareEP("64A118000000EB02C3118B4030EB010F0FB6400283F80174FEEB01E890C0FFFFEB03BDF4B564A1300000000")) { sVersion = "2.8"; sOptions = "Anti-Debug"; bDetected = true; } else if (PE.compareEP("BA........FFE2........FF35........E840")) { sVersion = "2.8"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_FixupPak.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "FixupPak"); function detect() { if (PE.compareEP("55E8000000005D81ED....0000BE00..000003F5BA0000....2BD58BDD33C0AC3C00743D3C01740E")) { sVersion = "1.20"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Fuck_n_Joy.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Fuck n Joy"); function detect() { if (PE.compareEP("60E8000000005D81ED........FF742420E88C0200000BC00F842C0100008985")) { sVersion = "1.0c"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Fusion.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Fusion"); function detect() { if (PE.compareEP("68........68........E80903000068........E8C7020000")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_GuardantStealth.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Guardant Stealth"); function detect() { if (PE.getNumberOfImports() == 1) { if (PE.getImportLibraryName(0) == "NOVEX32.dll") { bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/protector_ICrypt.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "ICrypt"); function detect() { if (PE.compareEP("558BEC83C4EC53565733C08945ECB8703B0010E83CFAFFFF33C055686C3C00")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_ID_Application_Protector_NoNamePacker.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "ID Application Protector (NoNamePacker)"); function detect() { if (PE.compareEP("60E8000000005D81ED........B9........81E9........89EA81C2........8D3A89FE31C0E9D3020000CCCCCCCCE9CA020000'C:\\Windows\\SoftWareProtector\\'")) { sVersion = "1.2"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_KGCrypt.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "KGCrypt"); function detect() { if (PE.compareEP("E8........5D81ED........64A1........84C074..64A1........0BC074")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_MZ-Crypt.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "MZ-Crypt"); function detect() { if (PE.compareEP("60E8000000005D81ED251440008BBD771440008B8D7F144000EB28837F1C07751E8B770C03B57B14")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Minke.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Minke"); function detect() { if (PE.compareEP("558BEC83C4F053..........10E87AF6FFFFBE........33C05568........64FF30648920E8FAF8FFFFBA")) { sVersion = "1.0.1"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Morphine.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Morphine"); function detect() { if (PE.compareEP("FF25........8BC0FF25........8BC0")) { sVersion = "1.2-1.3"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_NecroVM.Virt.2.sg ================================================ // Detect It Easy: detection rule file // NecroVM by DosX function detect() { if (PE.isNet()) { if (PE.getString(0x2e, 13) == "It's NecroVM!" && PE.isSignatureInSectionPresent(0, "5F00'VmLoad'00'mscorlib'")) { var nOffset = PE.findString(0x1f0, 16, "v"), version = ""; if (nOffset != -1) { version = PE.getString(nOffset + 1, 0x1ff - nOffset); } _setResult("packer", "NecroVM Compressor", version, "LZMAT"); return ""; // There is no point in analyzing anything further } const references = ["System.Reflection", "System.Security.Cryptography", "System.Runtime.InteropServices"]; for (var i = 0; i < references.length; i++) if (!PE.isSignatureInSectionPresent(0, "00'" + references[i] + "'00")) // 00'keyValue'00 return ""; const vmCore = "NecroVM.Runtime"; // Virtual machine namespace if (PE.isSignatureInSectionPresent(0, "50??'" + vmCore + "'") && PE.isNetObjectPresent(vmCore) && // check for core PE.isSignatureInSectionPresent(0, "'info'00'flags'00'nativeEntry'00'nativeSizeOfCode'")) { if (PE.isSignatureInSectionPresent(0, "0005'_'00'_'00")) // code isolation _setResult("protection", "NecroVM Code Container", "", ""); if (PE.isSignatureInSectionPresent(0, "2000690073002000740061006d00700065007200650064002e00")) // check for anti-tamper _setResult("protection", "NecroVM Anti-Tamper", "", ""); var options = "Virtualization" if (PE.isSignatureInSectionPresent(0, "00'm_1'")) { options += " + Obfuscation" } _setResult("protector", "NecroVM", "2.X", options); } } return result(); } ================================================ FILE: db_extra/PE/protector_NoodleCrypt.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "NoodleCrypt"); function detect() { if (PE.compareEP("EB019AE8..000000EB019AE8....0000EB019AE8....0000EB01")) { sVersion = "2.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_PE-Admin.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "PE-Admin"); function detect() { if (PE.compareEP("609C64FF3500000000E879010000900000000000000000000000................0000000000000000000000000000000000000000")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_PENightMare.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "PENightMare"); function detect() { if (PE.compareEP("60E9........EF4003A7078F071C375D43A704B92C3A")) { sVersion = "2 Beta"; bDetected = true; } else if (PE.compareEP("60E8000000005DB9........8031154181F9")) { sVersion = "1.3"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_PE_Quake.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PE Quake"); function detect() { if (PE.compareEP("e8$$$$$$$$5d81ed........8d75..56ff55..8db5........5650ff55..8985........6a..68")) { sVersion = "0.06"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Pe123.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Pe123"); function detect() { if (PE.compareEP("8BC0609CE801000000C353E87200000050E81C0300008BD8FFD35BC3")) { sVersion = "2006.4.12"; bDetected = true; } else if (PE.compareEP("8BC0EB013460EB012A9CEB02EAC8E80F000000EB033D2323EB014AEB015BC3")) { sVersion = "2006.4.4"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_PolyEnE.2.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("protector", "PolyEnE"); function detect() { if (PE.compareEP("6083ec..c70424........5868........8b0c2483c4..fff051ff15........50eb")) { bDetected = true; } else if (PE.compareEP("6068........8b04..83c4..83ec..c70424........595051ff15........eb")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_PwdProtect.2.sg ================================================ // Detect It Easy: detection rule file // Made by KDSS-Research meta("protector", "PwdProtect"); function detect() { if (PE.isSectionNamePresent(".pwdprot")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_QQProtect.2.sg ================================================ // Detect It Easy: detection rule file // Author: DosX // E-Mail: collab@kay-software.ru // GitHub: https://github.com/DosX-dev // Telegram: @DosX_dev init("protector", "QQProtect"); function detect() { if (PE.isResourceNamePresent("QQPROTECT")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Sepanta.2.sg ================================================ // Detect It Easy: detection rule file // Author: sendersu // If errors pls contact sendersu on cracklab.team meta("protector", "Sepanta"); function detect() { if (PE.isOverlayPresent()) { if (PE.findString(PE.getOverlayOffset(), 4096, "") != -1 || PE.findString(PE.getOverlayOffset(), 4096, "") != -1) { bDetected = true; } } return result(); } ================================================ FILE: db_extra/PE/protector_Soft_Defender.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Soft Defender"); function detect() { if (PE.compareEP("74$$74$$78$$68A2AF470159E8")) { // 07 1F 0F bDetected = true; if (PE.compareEP("BA010000", 72)) { sVersion = "1.0-1.1"; } else if (PE.compareEP("BE010000", 73)) { sVersion = "1.12"; } else { sVersion = "1.X"; } } return result(); } ================================================ FILE: db_extra/PE/protector_TheHypers.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "TheHypers"); function detect() { if (PE.compareEP("558BEC83EC148BFCE8$$$$$$$$5EE80D000000'kernel32.dll'00")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_WinKript.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "WinKript"); function detect() { if (PE.compareEP("33C08BB8........8B90........85FF74..33C950EB..8A0439C0C8..34..880439413BCA72..58")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Wind_of_Crypt.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Wind of Crypt"); function detect() { if (PE.compareEP("558BEC83C4EC53........8945ECB8........E828EAFFFF33C05568")) { sVersion = "1.0"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_Xtreme-Protector.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "Xtreme-Protector"); function detect() { if (PE.compareEP("B8........B9........5051E805000000E94A010000608B7424248B7C2428FCB2808A0646880747BB0200000")) { sVersion = "1.06"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/protector_muckis_protector.2.sg ================================================ // Detect It Easy: detection rule file meta("protector", "mucki's protector"); function detect() { if (PE.compareEP("BE........B9........8A06F6D0880646E2F7E9")) { bDetected = true; } else if (PE.compareEP("E8240000008B4C240CC70117000100C781B80000000000000031C0894114894118806A00")) { sVersion = "II"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/sfx_ADS_Self_Extractor.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("sfx", "ADS Self-Extractor"); function detect() { if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774")) { bDetected = PE.compareOverlay("7b00320030003700320036003300370037002d00"); } else if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15")) { bDetected = PE.findSignature(PE.getOverlayOffset(), Math.min(0x100, PE.getOverlaySize()), "7b00320030003700320036003300370037002d00") !== -1; } return result(); } ================================================ FILE: db_extra/PE/sfx_CipherWall.1.sg ================================================ // Detect It Easy: detection rule file meta("sfx", "CipherWall"); function detect() { if (PE.compareEP("9061BE........8DBE0000FEFFC787C0200200")) { sVersion = "1.5"; switch (PE.getEPSignature(19, 14)) { case "0B6E5B9B5783CDFFEB0E90909090": sOptions = "Decryptor Console"; break; case "F989C76A5783CDFFEB0E90909090": sOptions = "Decryptor GUI"; break; } bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/tool_UPX_shit.2.sg ================================================ // Detect It Easy: detection rule file meta("tool", "UPX shit"); function detect() { if (PE.compareEP("E2FA94FFE06100000000000000")) { sVersion = "0.0.1"; bDetected = true; } else if (PE.compareEP("94BC......00B9..00000080340C..E2FA94FFE061")) { sVersion = "0.0.1"; bDetected = true; } else if (PE.compareEP("B8....4300B915000000803408..E2FAE9D6FFFFFF")) { sVersion = "0.06"; bDetected = true; } else if (PE.compareEP("E8000000005E83C614AD89C7AD89C1AD300747E2FBADFFE0C3")) { sVersion = "0.1"; bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/tool_UPXcrypter.2.sg ================================================ // Detect It Easy: detection rule file meta("tool", "UPXcrypter"); function detect() { if (PE.compareEP("BF......0081FF......007410812F..00000083C704BB05....00FFE3BE......00FFE600000000")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/PE/virus_Win9x_CIH.1.sg ================================================ // Detect It Easy: detection rule file // Author: hypn0 meta("virus", "Win9x.CIH"); function detect() { if (PE.compareEP("558d4424f833db648703e8000000005b8d4b425150500f014c24fe5b83c31cfa")) { bDetected = true; } return result(); } ================================================ FILE: db_extra/about.txt ================================================ "db_extra" contains detection rules and scripts that were not approved for inclusion in the main database. Some of these rules may trigger only a few positive detections across the entire internet. Using this default database is NOT RECOMMENDED as it is not optimized or actively maintained. ================================================ FILE: dbs_min/db/.vscode/about.txt ================================================ This directory is responsible for correct recognition of *.sg files by Visual Studio Code. You can delete it if you don't need it. ================================================ FILE: dbs_min/db/.vscode/settings.json ================================================ { "files.associations": { "*.sg": "javascript" } } ================================================ FILE: dbs_min/db/ACE ================================================ function detect_ACE(e){var i,e=e?(i=0,File.getSize()):(i=File.getOverlayOffset(),File.getOverlaySize()) if(48X.Sz()?o.addIfNone("!short"):o)&&(sVersion=sVersion.appendS("/malformed"+o,"/")),X.isVerbose()&&(sOptionT(addEllipsis(meta),'info:"','"'),sOption(outSz(d),"sz:"))}else if(X.c("'AT8X'")&&isWithin(t0p=X.U32(28),36,64)&&X.c("0000",t0p+4)&&isWithin(t0sz=X.U32(t0p),(t0hdsz=X.U32(t0p+20))+X.U32(t0p+t0hdsz),4096)&&isWithin(t0sec=X.U16(t0p+10),1,40)&&X.U32(t0p+t0hdsz)==8+8*t0sec){if(sName="Atari VAPI/ATX disk image (.ATX)",sVersion="v"+X.U16(4),bDetected=1,X.isVerbose()){for(a=0,d=t0p,sec=0;a<40&&d'")&&X.c("''",(S=X.U16(17,_LE))-8))sName="Bally Arcade/Astrocade BASIC tape (.BIN)",bDetected=1,X.isVerbose()&&sOption(outSz(S),"sz:") else if(X.c("0E0000800E..FFFE........FFFFFFFF020000000200..FFFFFFFFFE")&&0<=[31,47].indexOf(X.U8(5))&&0<=[31,127].indexOf(X.U8(353)))sName="Casio Loopy (big-endian) cartridge (.BIN)",bDetected=1 else if(X.c("4C....4C....01'CBM::::::::'")&&X.c("FF",13118)&&X.c("FF",14720))sName="Commodore Plus/4 cartridge (.BIN)",bDetected=1 else if(X.c("000003",8)&&X.c("'DMC '",256)&&X.c("' GM 00000000-00'",352))sName="AtGames/中娛/愛勝 Firecore digital media cartridge (.BIN)",bDetected=1 else if(X.c("F50400")&&X.c("04",2048)&&X.c("8383",2056)&&4096==F.Sz())sName="Entex Adventure Vision cartridge (.BIN)",bDetected=1 else if(!X.c("55..40..40....00")&&!X.c("5512521252B0")||X.U8(1)!=X.U8(3)||8192!=X.Sz()&&16384!=X.Sz())if(X.c("BBA56EB3E9C5A7A4CCB3D7B2CFA8CEA5CCAAA3A46FB1EFB9BBA56EB3E9C569B6E6A6F4A5F3A6CFA456A675A47BB5'r(vereese gnniee)rB'A1CFA4D5B2B6C442A1CFA473BDB6C4CEA9F3A7EFA7BBA56EB3E9C5ECAD6CA97BB5A1A65DB370AD57A4EFB96EB3E9C5BAAAEAC277A950BBD1B8A3B0EAC277A9'rTdamera kybU inet diMrceoeltcorinscC ro.pa dnF nuethcE tnreatniemtnC ro.pA llr gith seresvrde .iLecsn esip reimttde'002E",8192)||X.c("1E00E32AE401E501 E601E7011B48E801 E901EAC401300EEB 01B426ECEED26401 EF26F00108604E30 F201F301F4010128"))sName="Funtech Super Acan cartridge (.BIN)",bDetected=1 else if(!(X.c("AA04FFFF68FF")||X.c("AA4E840D196900")||X.c("AA544E85706A90")||X.c("AA54E9A7640202")||X.c("AAC0BA69004DCC")||X.c("AA694169146914"))||!isWithin(X.Sz(),8192,32768)||4095&X.Sz())if(X.c("'ZPJ'")&&X.c("0003....0003",24)&&"allnum"==charStat(X.SA(3,3))&&charStat(X.SA(6,13),!0).indexOf(!1)){if(sName="Konami Picno image (.BIN)",bDetected=1,sOption(charStat(X.SA(3,3))),X.isVerbose()){for(u=X.SA(3,13);u.length&&"+"==u[u.length-1];)u=u.slice(0,u.length-1) sOption(u)}}else if(X.c("'Copyright LeapFrog '00..01010000000080",256))sName="Leapfrog Leapster Learning Game System image (.BIN)",bDetected=1,sVersion=X.fSig(1,4096,"'Lil ducked. The jet zipped past her head. Dust flew, Lil sneezed, and Leap turned red. Then Lil got up, about to yell. Leap gasped, \"Look, Lil! Your tooth! It fell!\"'")?"Approved Content":"unapproved content" else if(7&X.Sz()||!(0<=(u=X.fSig(0,4096,"1FA6DEBACC137D74")))||7&u){if(X.c("00000000'Root-CPCA00000108-CP00000110'00000000000000000000000000000000000000000000000000000000000000000000000000",10324))sName="iQue (N64 for China) CMD (.CMD)",bDetected=1 else if(X.c("803712400000000F80....00000014")&&X.c("AD0000",4112)&&X.c("FF",4126))sName="iQue (N64 for China) Z64 image (.Z64)",bDetected=1 else if(X.c("'C64 CARTRIDGE '")&&64<=(d=X.U32(16,_BE))&&X.c("'CHIP'",d)){for(bDetected=1,sName="Commodore 64 cartridge (.CRT)",sVersion="v"+X.U8(20)+"."+X.U8(21).padStart(2,"0"),o="";dX.Sz()){if(d+16+D<=X.Sz()){d+=D+16,o=o.addIfNone("!badchunk") continue}!X.isVerbose()&&d+h>X.Sz()&&(o=o.addIfNone("!short"))}d+=h}if(""!=o&&(sVersion=sVersion.appendS("malformed"+o,"/")),X.isVerbose()){switch(sOption(X.SC(32,32,"Shift_JIS")),X.U16(22,_BE)){case 0:U="normal cartridge" break case 1:U="Action Replay" break case 2:U="KCS Power Cartridge" break case 3:U="Final Cartridge III" break case 4:U="Simons Basic" break case 5:U="Ocean type 1" break case 6:U="Expert Cartridge" break case 7:U="Fun Play, Power Play" break case 8:U="Super Games" break case 9:U="Atomic Power" break case 10:U="Epyx Fastload" break case 11:U="Westermann Learning" break case 12:U="Rex Utility" break case 13:U="Final Cartridge I" break case 14:U="Magic Formel" break case 15:U="C64 Game System/System 3" break case 16:U="WarpSpeed" break case 17:U="Dinamic" break case 18:U="Zaxxon, Super Zaxxon (SEGA)" break case 19:U="Magic Desk/Domark/HES Australia" break case 20:U="Super Snapshot 5" break case 21:U="Comal-80" break case 22:U="Structured Basic" break case 23:U="Ross" break case 24:U="Dela EP64" break case 25:U="Dela EP7x8" break case 26:U="Dela EP256" break case 27:U="Rex EP256" break case 28:U="Mikro Assembler" break case 29:U="reserved" break case 30:U="Action Replay 4" break case 31:U="StarDOS" break case 32:U="EasyFlash" break default:U="?"}sOption("hw.type: "+U+" /EXROM:"+(X.U8(24)?"inactive":"active")+" /GAME:"+(X.U8(25)?"inactive":"active")+" sz:"+outSz(d))}}}else sName="Microsoft MSX tape image (.CAS)",bDetected=1 else sName="Hartung Game Master cartridge (.BIN)",bDetected=1 else sName="Epoch ゲームポケコン/Game Pocket Computer cartridge (.BIN)",bDetected=1 if(!bDetected&&(function(){if(!(X.Sz()<204800)&&X.c("0100",82)&&isWithin(n=X.U8(0),1,63)){c=X.SC(1,n,"CP1252") var e=charStat(c,!0) if(!(e.indexOf("allxsc")<0)&&n==X.U8(1144)&&c==X.SC(1145,X.U8(1144),"CP1252")){var e=X.U32(64,_BE),a=X.U32(68,_BE) if(isWithin(e,204800,2097152)&&(!a||12*e/512==a)&&(a||!X.U32(76,_BE))){switch(S=84+e+X.U32(68,_BE),discszt=Util.divu64(e,1024)+"k",X.U8(80)){case 0:discszt+=" GCR CLV ssdd" break case 1:discszt+=" GCR CLV dsdd" break case 2:discszt+=" MFM CAV dsdd" break case 3:discszt+=" MFM CAV dshd" break default:discszt+=" unk.type"}return 1}}}})()&&(sName="Apple DiskCopy 4.2 disk image (.DC42)",sVersion=discszt,bDetected=1,X.isVerbose())&&(sOption(c),sOption(outSz(S),"sz:")),!bDetected)if(X.c("'ACT Apricot disk image'1A04")&&isAllZeroes(24,88)){sName="Jonathan Marsters's ACT/Apricot PC ApriDisk image (.DSK)",bDetected=1 var g=sec=0,E=!1,O=by="" for(d=128;dsec&&(sec=u),(u=X.U16(d+14)+1)>g&&(g=u) break case 3810328578:O=X.SA(d+z,h) break case 3810328579:by=X.SA(d+z,h) break default:E=!0}if(E)break if(d+=z+h,3810328578==k)break}X.isVerbose()?(sOption(O),sOption(by,"by: "),sOption("cyl:"+g+" sec:"+sec+" sz:"+outSz(d))):d>X.Sz()&&(sVersion="malformed!short")}else(X.c("'EXTENDED CPC DSK File'0D0A'Disk-Info'0D0A")||X.c("'MV - CPCEMU Disk-File'0D0A'Disk-Info'0D0A")||X.c("'MV - CPC'"))&&isWithin(a=X.U8(48),20,84)&&isWithin(sd=X.U8(49),1,2)&&X.c("'Track-Info'0D0A000000",256)&&(sName="Amstrad CPC disk image (.DSK)",bDetected=1,X.c("'E'")?(trksz=0,sVersion="extended"):trksz=X.U16(50)+1,X.isVerbose())&&(sOption(X.SA(34,14)),sOption("trk:"+a+(trksz?" trksz:"+trksz:"")+" sides:"+sd)) if(!bDetected&&(function(){if(X.c("'EALIB'")){p=X.U16(5) d=7 for(var e=0;eX.U32(8)&&X.U32(8)<=X.Sz()&&(sName="FCSX zlib format (.FCS)",bDetected=1,X.isVerbose())&&(sOptions="Zlib @10h, unp.sz:"+X.U32(4)+" sz:"+outSz(X.U32(8))),(function(){var e,a,s,r,i,t,c return!X.c("00000000")||(e=X.U32(4),a=X.U32(8),s=X.U32(12),r=X.U32(16),i=X.U32(20),t=X.U32(24),c=X.U32(28),[16,48,144].indexOf(e)<0)||r*i*t*c!=s||(S=a+s)>X.Sz()||a<32?void 0:!(16==e&&!isWithin(s,524288,745472)||48==e&&!isWithin(s,1441792,3145728)||144==e&&!isWithin(s,1179648,1310720))&&(info=(info="disc:"+(16==e?"640/720k":48==e?"1.44M":144==e?"1.2M":"?")+" ("+(s/1024).toFixed(1)+"k)").append("hd:"+t+" cyl:"+c+" sec:"+i+" sz:"+outSz(S)),1)})()&&(sName="EPSON's PC-98 disk image (.FDI)",bDetected=1,X.isVerbose())&&sOption(info),bDetected||(X.c("EB0A9090'IPL1'0000001EA08405B48ECD1BA8",4096)&&X.c("E9D102' NEC 'CADFB0BFC5D9BADDCBDFADB0C08CC592E8836683428358834E8B4E93AE8381836A8385815B8376838D834F8389838020CADEB0BCDEAEDD' 2.'....' Copyright (C) NEC Corporation 1985,'",5120)?(sName="NEC PS-98 hard disk image (.HDI)",bDetected=1):((X.c("EB1C904E")||X.c("EB2790B1")||X.c("EB279028")||X.c("EB3C9027")||X.c("EB3C904E"))&&X.c("000401010002C000D004FE0200080002000000",11)||X.c("EB..90")&&1261568==X.Sz())&&(sName="NEC PC-98 disk image (.HDM)",bDetected=1)),(function(){if(!(X.Sz()<273)){for(var e=0,a=0;a<15;++a){if(a<9&&X.U8(a)<32)return e+=X.U8(a)}if((e=105+257*e&65535)==X.U16(15))if(S=X.U16(11),addr=X.U16(9),alsz=X.U16(13),!(!isWithin(alsz,256,65280)||!isWithin(S,256,65280)||addr<16384||65536X.Sz()&&(sVersion="malformed!short")),!bDetected)if(X.c("'HXCPICFE'")&&isWithin(i=X.U8(10),1,2)&&isWithin(baud=1e3*X.U16(12),15e4,3e6)&&(t=X.U8(17))<=1){if(sName="HxC PIC/HFE disk image (.HFE)",sVersion="rev."+X.U8(8),bDetected=1,X.isVerbose()){var B=["ISO IBM MFM","Amiga MFM","ISO IBM FM","emulated FM","unk."],L=["IBM PC DD","IBM PC HD","Atari ST DD","Atari ST HD","Amiga DD","Amiga HD","Amstrad CPC DD","generic Shugart DD","IBM PC ED","MSX2 DD","Commodore 64 DD","emulated Shugart"],a=X.U8(9),v=X.U8(16),u=X.U8(11),S=512,W=0 for(d=512,trkenc=3>7 if(p&=127,!isWithin(p,0,79))return var l=X.U8(e+14) if(!isWithin(l,1,10))return for(a=a||S,A||(0==d&&sus++,128&X.U8(e)&&sus++),f=0;f<195;f++){if(u=X.U8(e+15+f),k[f]&u)return k[f]|=u}firstNotOf(e+220,11,[32,255])<0&&(t[0]+=10),firstNotOf(e+232,4,[255])<0&&(t[0]+=4),255==X.U8(e+250)&&t[0]++,255==X.U8(e+251)&&t[0]++,C.push(X.SA(e+1,10).trim()+":"+b[d]),21==d&&(subdir++,u=512*(l+10*(S+2*p))+1,X.U8(u))&&C.push("/"+X.SA(u,10)+"..."),s||(e+=256)}else end=!0 9<++_sec&&(_sec=0,1==++_side)&&(_side=0,_trk++),e=512*(_sec+10*(_side+2*_trk))}return 5a[0]&&(a=arguments[s]) return a}(i,t,c,n)[1]+"/"+(a?"DS":"SS"),1)}}}if(!bDetected&&_()&&(sName="ZX Microdrive cartridge image (.MDR)",bDetected=1,X.isVerbose())&&(sOption(name),sOption((X.isDeepScan()?"blks:"+blk+" ":"")+"sz:"+outSz(S))),!bDetected&&G()&&(sName="Miles Gordon Technology floppy image (.MGT,.SAD)",sVersion=sv,bDetected=1,X.isVerbose())&&(sOption((subdir?"≈":"")+(A-erased-subdir)+(erased?"+"+erased+" erased":"")+(subdir?"+"+subdir+"subdirs":""),"files:"),A&&sOption("("+addEllipsis(C.join("; "))+")"),sus)&&sOption("possibly malformed (level "+sus+")"),!bDetected)if(X.c("'NES'1A")&&15>4)+(240&flg7),fvsunisystem=0<(1&flg7),fplaychoice10=0<(2&flg7),fv20_=8==(12&flg7),fv20=!1,szprgmsb=16384*((15&flg9)<<8),szchrmsb=8192*((240&flg9)<<4),ex=region=tv="",S=16+trainer+szprg+szprgmsb+szchr+szchrmsb,fv20=fv20_?S>4,2&flg7){case 0:sVersion+=" #NES/Famicom/Dendy" break case 1:switch(sVersion+=" #Nintendo Vs. System (",15&flg13){case 0:sVersion+="RP2C03B)" break case 1:sVersion+="RP2C03G)" break case 2:sVersion+="RP2C04-0001)" break case 3:sVersion+="RP2C04-0002)" break case 4:sVersion+="RP2C04-0003)" break case 5:sVersion+="RP2C04-0004)" break case 6:sVersion+="RC2C03B)" break case 7:sVersion+="RC2C03C)" break case 8:sVersion+="RC2C05-01)" break case 9:sVersion+="RC2C05-02)" break case 10:sVersion+="RC2C05-03)" break case 11:sVersion+="RC2C05-04)" break case 12:sVersion+="RC2C05-05)" break default:sVersion+="unk.PPU)"}break case 2:sVersion+=" #Nintendo Playchoice 10" break default:switch(15&flg13){case 0:sVersion+=" #NES/Famicom/Dendy" break case 1:sVersion+=" #Nintendo Vs. System" break case 2:sVersion+=" #Nintendo Playchoice 10" break case 3:sVersion+=" #Famiclone+DecimalMode" break case 4:sVersion+=" #NES/Famicom+EPSM/plug-through" break case 5:sVersion+=" #V.R. VT01 red/cyan" break case 6:sVersion+=" #V.R. Technology VT02" break case 7:sVersion+=" #V.R. Technology VT03" break case 8:sVersion+=" #V.R. Technology VT09" break case 9:sVersion+=" #V.R. Technology VT32" break case 10:sVersion+=" #V.R. Technology VT369" break case 11:sVersion+=" #UMC UM6578" break case 12:sVersion+=" #Famicom Network System" break default:sVersion+=" #(reserved)"}}switch(3&flg12){case 0:region="NA/JP/SK/TW: NTSC NES" break case 1:region="WE/AU: Licenced PAL NES" break case 2:region="Multiple" break default:region="EU/RU/ZH/IN/AF: Dendy"}switch(63&flg15){case 0:break case 1:ex="Std. Sontrollers" break case 2:ex="NES Four Score/Satellite + 2 Std. Controllers" break case 3:ex="Famicom 4P Adapter" break case 4:ex="Vs. System (1P via $4016)" break case 5:ex="Vs. System (1P via $4017)" break case 6:ex="(obsolete MAME behaviour)" break case 7:ex="Vs. Zapper" break case 8:ex="Zapper ($4017)" break case 9:ex="2 Zappers" break case 10:ex="Bandai Hyper Shot Lightgun" break case 11:ex="Power Pad Side A" break case 12:ex="Power Pad Side B" break case 13:ex="Family Trainer Side A" break case 14:ex="Family Trainer Side B" break case 15:ex="Arkanoid Vaus Controller (NES)" break case 16:ex="Arkanoid Vaus Controller (Famicom)" break case 17:ex="2 Vaus Controllers + Famicom Data Recorder" break case 18:ex="Konami Hyper Shot Controller" break case 19:ex="Coconuts Pachinko Controller" break case 20:ex="Exciting Boxing Punching Bag (Blowup Doll)" break case 21:ex="Jissen Mahjong Controller" break case 22:ex="Party Tap" break case 23:ex="Oeka Kids Tablet" break case 24:ex="Sunsoft Barcode Battler" break case 25:ex="Miracle Piano Keyboard" break case 26:ex="Pokkun Moguraa (Whack-a-Mole Mat & Mallet)" break case 27:ex="Top Rider (Inflatable Bicycle)" break case 28:ex="Double-Fisted" break case 29:ex="Famicom 3D System" break case 30:ex="Doremikko Keyboard" break case 31:ex="R.O.B. Gyro Set" break case 32:ex='Famicom Data Recorder ("silent" keyboard)' break case 33:ex="ASCII Turbo File" break case 34:ex="IGS Storage Battle Box" break case 35:ex="Family BASIC Keyboard + Famicom Data Recorder" break case 36:ex="Dongda PEC-586 Keyboard" break case 37:ex="Bit Corp. Bit-79 Keyboard" break case 38:ex="Subor Keyboard" break case 39:ex="Subor Keyboard + Mouse (3x8-bit)" break case 40:ex="Subor Keyboard + Mouse (24-bit)" break case 41:ex="SNES Mouse ($4017.d0)" break case 42:ex="Multicart" break case 43:ex="2 SNES Controllers" break case 44:ex="RacerMate Bicycle" break case 45:ex="U-Force" break case 46:ex="R.O.B. Stack-Up" break case 47:ex="City Patrolman Lightgun" break case 48:ex="Sharp C1 Cassette Interface" break case 49:ex="Std. Controller w/swapped ←→/↑↓/BA" break case 50:ex="Excalibor Sudoku Pad" break case 51:ex="ABL Pinball" break case 52:ex="Golden Nugget Casino extra buttons" break default:ex="(unknown)"}S=16+trainer+szprg+szprgmsb+szchr+szchrmsb}else{switch(sVersion=12&flg7||!X.c("0000 0000",12)?4==(12&flg7)?"archaic iNES":"iNES v0.7 or archaic":"iNES",szprgram=(szprgram=8192*X.U8(8))||8192,3&(flg10=X.U8(10))){case 0:tv="NTSC" break case 2:tv="PAL" break default:tv="NTSC/PAL"}fbusconflicts=X.c("0000 0000",X.Sz()-4)?(fprgram=0<(16&flg10),0<(32&flg10)):fprgram=!1,region="n/a"}X.isVerbose()&&(sOption(tv,"tv: "),sOption(region,"region: "),sOption(mapper,"mapper: "),sOption(ex,"expansion: "),fplaychoice10&&sOption("PlayChoice-10"),trainer&&sOption("trainer"),fstorage&&sOption("battery-backed RAM"),sOption(outSz(S),"sz:"))}else if(X.c("'MNIB-1541-RAW'..000002..04..06..08..0A"))bDetected=1,sVersion="v"+X.U8(13),sName="Markus Brenner's MNIB/Peter Rittwage's C64PP NIBTools disk image (.NIB)" else if(X.c("01'CD001'01''",339968))p=X.c("'NERO'",X.Sz()-8)?1:X.c("'NER5'",X.Sz()-12)?2:0,sName=(p?"Nero AG's ":"")+"optical disc image (.NRG)",p&&(sVersion="Nero AG/v"+p),X.isVerbose()&&(sOptions=X.SA(340008,32).trim()),bDetected=1 else if(X.c("0D04..00'host_date='")&&X.fSig(0,128,"'KryoFlux DiskSystem'"))sName="SPS's KryoFlux DiskSystem disk sector (.RAW)",bDetected=1 else if(X.c("'CAPS'0000000C1CD573BA'DATA'")&&X.c("'PACK'",X.U32(16,_BE)+20)&&(sName="SPS's KryoFlux CT Raw disk image (.RAW)",bDetected=1,X.isVerbose())){for(d=12,a=unpsz=0;dX.Sz()||655364=S+4){for(f=0;f>=3:r=2,e=16;e<688;e+=4){var i=X.U32(e) if(i){if(!X.c("'TRK'",i))return var t=0 for(q=i+4;tX.Sz())return S=a+mtdsz}return 1}})()){sName="SuperCard Pro disk image (.SCP)",bDetected=1 var M,y,I=(I=X.U8(3))?"v"+(I>>4)+" rev."+(15&I):"v.?",P=X.U8(4),B=(X.U8(5),X.U8(6)),L=X.U8(7),i=(r=X.U8(8),1&r?4&r?"360":"300":"300/360"),v=8&r?"normalised":"preservation",t=16&r?"read/write":"read-only",H=32&r,K=X.U8(10)?1==X.U8(10)?"bottom":"top":"double" if(H&&(I="app v"+(X.U8(S+40)>>4)+"."+(15&X.U8(S+40))+"h/w v"+(X.U8(S+41)>>4)+"."+(15&X.U8(S+41)),X.c("'FPCS'",S+44)||(I+="/malformed!noendtag"),S+=48),sVersion=I,X.isVerbose()){switch(15&P){case 0:y="CBM" break case 1:y="Amiga" break case 2:y="Apple ][" break case 3:y="Atari ST" break case 4:y="Atari 800" break case 5:y="Mac 800" break case 6:y="360k/720k" break case 7:y="1.44M" break default:y="unk."}switch(P>>4){case 0:M="Commodore" break case 1:M="Atari" break case 2:M="Apple" break case 3:M="PC" break case 4:M="Tandy" break case 5:M="Texas Inst." break case 6:M="Roland" break case 8:M="(other)" break default:M="unk."}sOption("type "+y+" by "+M),sOption("trk:"+B+"-"+L+" side:"+K),sOption(t),sOption(v,"quality:"),sOption(i,""," rpm"),sOption(outSz(S),"sz:")}}if(!bDetected)if(X.c("EC..A50000")&&X.c("EC00",256)&&X.c("55AA55AA55AA55AAFFFFFFFFFFFFFFFF0000",272)&&X.c("FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF",1024)&&X.c("4199015564F0FFFF 201B0C824118EA61 F00107F60301EE1B 0C834118EA617001 07760301EE15140500",17968))sName="GamePark GP32 SmartMedia card (.SMC)",bDetected=1 else if(X.c("'RSY'000300")){if(sName="Jorge 'Ijor' Cwik's Pasti disk image (.STX)",bDetected=1,sVersion="v3"+(2==X.U8(11)?" new":0==X.U8(11)?" old":""),X.isVerbose()){for(sOption(X.U8(10),"trk.total:"),f=0,d=16;fX.Sz()||charStat(X.readBytes(d,4),1).indexOf("allxsc")<0||k.length<2||k.toUpperCase()!=k)break d+=8,"CRTR"===k&&sOption(X.SA(d,32),"in:"),d+=h}S=d,sOption(outSz(S),"sz:")}}else if(/^C64S?\s*tape.*file/.test(X.SA(0,32))){if(sName="C64 cassette tape (.T64)",bDetected=1,sVersion="v"+X.U8(32)+"."+X.U8(33).padStart(2,"0"),X.isVerbose()){for(var A=[],j=X.U16(34,_LE),J=X.U16(36,_LE),f=0;fX.Sz()&&(sVersion+="/malformed!short")}else if(X.c("'ZXTape!'1A")){sVersion="v"+X.U8(8)+"."+X.U8(9).padStart(2,"0"),bDetected=1 var Y=end=!1,e=0,o="",c="",x="",$="",Q="",ee="",ae="",se="",re="",ie="",O="",U="",te="",C=[],ce=["B","N","S","C"] for(d=10;!end&&d>8)<0)break switch(d+=6,k){case 0:info=info.appendS(X.SA(d,h),"/") break case 1:man=man.appendS(X.SA(d,h)," ") break case 5:switch(gear="Acorn ",X.U8(d)>>4){case 0:gear+="BBC Model A" break case 1:gear+="Electron" break case 2:gear+="BBC Model B" break case 3:gear+="BBC Master" break case 4:gear+="Atom"}switch(15&X.U8(d)){case 0:kb="any" break case 1:kb="target PC" break case 2:kb="host PC"}break case 9:c=X.SA(d,h) break case 257:case 258:case 259:case 260:case 272:case 273:case 274:case 275:case 276:case 277:case 278:case 279:case 288:case 305:P=P.addIfNone("#tape") break case 304:switch(X.U8(d)){case 0:u="unit" break case 1:u="tape" break case 2:u="disc" break case 3:u="vtape" break case 4:u="cartridge"}1X.Sz()&&(o=o.addIfNone("!short")),""!=o&&(sVersion=sVersion.appendS("/malformed"+o,"/"))}if(!bDetected&&(function(){if(X.c("'IWAD'")||X.c("'PWAD'")){var e=0,a=_LE if((lumpn=X.I32(4,a))<0||lumpn>X.I32(4,_BE)){if(!(0<(lumpn=X.I32(4,_BE))))return e++,a=_BE}var s=0,r=X.I32(8,a),i=r if(isWithin(r,12,X.Sz())){e++ for(var t=[],c=Math.min(lumpn,64);sX.Sz())return var n=X.I32(i,a),o=X.I32(i+4,a) if(n<0||o<0||!isWithin(n,12,X.Sz()))return X.c("'ENDOFWAD'",i+8)&&e++,t.push([n,o,X.readBytes(i+8,8)])}for(t=t.sort(function(e,a){return e[0]-a[0]}),s=0;st[s+1][0])return}return I=2<=e?"Atari Jaguar":"PC",1}}})()&&(sName="iD Software's Where's All the Data resource pack (.WAD)",bDetected=1,sVersion=X.c("'I'")?"initial":"patch",sVersion+="#"+I),!bDetected&&X.c("'WOZ'..FF0A0D0A ........ 'INFO'")&&isWithin(X.U8(3),49,50)){for(sName="Apple II Applesauce disk image (.WOZ)",sVersion="v"+X.SA(3,1),d=12,meta=o="";dX.Sz()?o.addIfNone("!short"):o)&&(sVersion=sVersion.appendS("/malformed"+o,"/")),X.isVerbose()&&(sOptionT(addEllipsis(meta),'info:"','"'),sOption(outSz(d),"sz:"))}return!bDetected&&(function(){if((extIs("z80")||extIs("slt"))&&!(X.Sz()<1380)){nv=0,co=!0,joystick=U="" const k=X.U8(12) 255==k&&(k=1) var e=X.U16(6),a=128&X.U8(37),s=30 if(e)switch(nv=1,U="ZX Spectrum 48k",co=0<(32&k),X.U8(29)>>6&&3){case 0:joystick="cursor" break case 1:joystick="Kempston" break case 2:joystick="SinclairI2-L" break case 3:joystick="SinclairI2-R"}else{switch(xblk=X.U16(30)){case 23:nv=2 break case 54:case 55:nv=3 break default:return}switch(s+=xblk+2,nv){case 2:switch(X.U8(29)>>6&&3){case 0:joystick="cursor" break case 1:joystick="Kempston" break case 2:joystick="SinclairI2-L" break case 3:joystick="SinclairI2-R"}break case 3:switch(X.U8(29)>>6&&3){case 0:joystick="cursor" break case 1:joystick="Kempston" break case 3:joystick="SinclairI2-R" break case 2:joystick=X.c("030F0308 03040302 0301",64)?"Sinclair2-L":"custom"}break default:return}var r=X.U8(34),i=X.U8(83) if(r<7)switch(nv){case 2:switch(r){case 0:U="ZX Spectrum "+(a?"16k":"48k") break case 1:U="ZX Spectrum "+(a?"16":"48")+"k & Interface1" break case 2:U="ZX Spectrum "+(a?"16":"48")+"k & SamRam" break case 3:U="ZX Spectrum "+(a?"+2":"128k") break case 4:U="ZX Spectrum "+(a?"+2":"128k")+" & Interface1" break default:return}break case 3:var t=["MGT EPSON DISCiPLE","MGT HP DISCiPLE","MGT +D"],i=[0,1,16].indexOf(i) switch(r){case 0:U="ZX Spectrum "+(a?"16k":"48k") break case 1:U="ZX Spectrum "+(a?"16":"48")+"k & Interface1" break case 2:U="ZX Spectrum "+(a?"16":"48")+"k & SamRam" break case 3:if(i<0)return U="ZX Spectrum "+(a?"16":"48")+"k & "+t[i]+" MGT" break case 4:U="ZX Spectrum "+(a?"+2":"128k") break case 5:U="ZX Spectrum "+(a?"+2":"128k")+" & Interface1" break case 6:if(i<0)return U="ZX Spectrum "+(a?"+2":"128k")+" & "+t[i]+" MGT" break default:return}break default:return}else switch(r){case 7:case 8:U="ZX Spectrum "+(a?"+2A":"+3") break case 9:U="Pentagon 128+" break case 10:U="Scorpion ZS-256" break case 11:U="Didaktik-Kompakt" break case 12:U="ZX Spectrum +2" break case 13:U="ZX Spectrum +2A" break case 14:U="Timex Sinclair TC-2048" break case 15:U="Timex Sinclair TC-2068" case 128:U="Timex Sinclair TS-2068" break default:return}68&X.U8(37)?U+=" + Fuller Box":4&X.U8(37)&&(U+=" + Melodik")}if(pgs=[],co){var c=1==nv?49152:16384 for(d=s,f=unpsz=0;dX.Sz()||1=b+d)return!1 i++}else switch(f[j][2]){case 16:if(!i)return!1 s.read(2) break case 17:for(t=s.read(3)+3;t;t--);break case 18:for(t=s.read(7)+11;t;t--);break default:return!1}if(s.offset>X.Sz())return!1}a=2,c=!0}}else{s.init(e) var n=s.read(8),p=(n|=s.read(8)<<8,s.read(8)) if(n!=(65535^(p|=s.read(8)<<8)))return 0 if(s.consume(n),s.offset>X.Sz())return!1 c&&(a=1)}}while(!c) return!(1==a&&s.offset>=X.Sz())&&a}function checkZlib(e){if(e+6>X.Sz())return!1 var s=X.U8(e++) if(8!=(15&s)||112<(240&s))return!1 var a=2,r=X.U8(e++) if(32&r){if(e+8>6],0))}function detect(){if(bad="",10<=X.Sz()&&X.c("1FA1")&&checkDeflate(2)&&(sName="Gzip hack: Quasijarus Strong Compression (Z.)",bDetected=1),!bDetected&&X.c("1F8B")){switch(method=X.U8(2)){case 0:sVersion="store",bad=bad.addIfNone("!badalgo") break case 1:sVersion="compress",bad=bad.addIfNone("!badalgo") break case 2:sVersion="pack",bad=bad.addIfNone("!badalgo") break case 3:sVersion="lz",bad=bad.addIfNone("!badalgo") break case 8:sVersion="deflate" break default:return!1}if(f=X.U8(3),fs=[],1&f&&fs.push("ASCII_FLAG"),2&f&&fs.push("HEADER_CRC"),4&f&&fs.push("EXTRA_FIELD"),8&f&&fs.push("ORIG_NAME"),16&f&&fs.push("COMMENT"),32&f&&fs.push("ENCRYPTED"),192&f&&fs.push("RESERVED"),(ts=X.I32(5,_LE))<=0)return!1 if(X.isVerbose()){switch(X.U8(8)){case 2:sOption("best") break case 4:sOption("fast")}switch(X.U8(9)){case 0:s="FAT FS (MS-DOS, OS/2, NT/Win32" break case 1:s="Amiga" break case 2:s="(Open)VMS" break case 3:s="Unix" break case 4:s="VM/CMS" break case 5:s="Atari TOS" break case 6:s="HPFS (OS/2, NT)" break case 7:s="Macintosh" break case 8:s="Z-System" break case 9:s="CP/M" break case 10:s="TOPS-20" break case 11:s="NTFS (NT)" break case 12:s="QDOS" break case 13:s="Acorn RISCOS" break case 255:s="unknown OS" break default:s="?"}sOption(s,"OS code:")}p=10,4&f&&(p+=4+X.U16(p+2,_LE)),8&f&&(s=X.SA(p,1024),p+=s.length+1,X.isVerbose())&&sOption(s,'filename:"','"'),16&f&&(s=X.SA(p,1024),p+=s.length+1,X.isVerbose())&&sOptionT(s,"cmt:"),2&f&&(p+=2),checkDeflate(p)?(sName="GZIP (.gz)",bDetected=1,X.isVerbose()&&sOption(X.U32(X.Sz()-4,_LE),"unp.sz:")):X.isHeuristicScan()&&(sName="GZIP (.gz)",bDetected=1)}if(!bDetected&&X.isDeepScan()&&X.isHeuristicScan()&&7'0A")){bDetected=1 for(var e=8;e>12&15 break case 2:case 4:sVersion=(e/100).toFixed(2)}bDetected=1}return result()}includeScript("cab"),meta("archive","CAB") ================================================ FILE: dbs_min/db/Binary/archive_DAA.1.sg ================================================ function detect(){return Binary.compare("'DAA'0000000000000000000000004C")&&(bDetected=1),result()}meta("archive","Direct Access Archive (.DAA)") ================================================ FILE: dbs_min/db/Binary/archive_DCP.1.sg ================================================ function detect(){var e return Binary.compare("DE AD C0 DE 4A 55 4E 4B")&&(e=Binary.getString(58,5).trim(),/^[12]\d{3}$/.test(e))&&(sVersion=e,bDetected=1),result()}meta("archive","DCP") ================================================ FILE: dbs_min/db/Binary/archive_DXA.1.sg ================================================ function detect(){return Binary.compare("f70ee9a")?(sOptions="Arcanum Knights",sVersion="xored",bDetected=1):Binary.compare("e94c..69")&&(sOptions="Labyrinth of Touhou 2",sVersion="xored",bDetected=1),result()}meta("archive","DXA") ================================================ FILE: dbs_min/db/Binary/archive_DatPack.1.sg ================================================ function detect(){return Binary.compare("07'DatPack'f75b3500e701")&&(bDetected=1),result()}meta("archive","DatPack") ================================================ FILE: dbs_min/db/Binary/archive_DotBundle.sg ================================================ function detect(){return Binary.compare("3C70726F6A6563743E0D0A20203C6D61696E65786520706174683D")&&(bDetected=1),result()}meta("archive","DotBundle Project") ================================================ FILE: dbs_min/db/Binary/archive_EdgeDataPak.1.sg ================================================ function detect(){return Binary.compare("'.EDP'0001")&&(bDetected=1),result()}meta("archive","EdgeDataPak (.EDP)") ================================================ FILE: dbs_min/db/Binary/archive_Flatpak.1.sg ================================================ function detect(){var e return Binary.compare("66 6C 61 74 70 61 6B")&&(e=Binary.getString(24,33).trim(),/^[a-zA-Z0-9\/._-]{33}/.test(e))&&(X.isVerbose()&&(sVersion=e),bDetected=1),result()}meta("archive","Flatpak") ================================================ FILE: dbs_min/db/Binary/archive_GhidraZipFile.1.sg ================================================ function detect(){return Binary.compare("aced000577..2e30212634e92c200000000100")&&(sOptions=File.cleanString(Binary.getString(20)),bDetected=1),result()}meta("archive","Ghidra Zip File") ================================================ FILE: dbs_min/db/Binary/archive_GodotPCK.1.sg ================================================ function detect(){return Binary.compare("'GDPC'0100000003000000..000000")&&(bDetected=1),result()}meta("archive","Godot Pack") ================================================ FILE: dbs_min/db/Binary/archive_HIP.1.sg ================================================ function detect(){return Binary.compare("'HIPA'00000000'PACK'00000090")&&(sVersion=Binary.getString(88)).match(/^[A-Za-z]{3}\s[A-Za-z]{3}\s\d{1,2}\s\d{2}:\d{2}:\d{2}\s\d{4}$/)&&(sVersion="Build date: "+sVersion,bDetected=1),result()}meta("archive","HIP archive") ================================================ FILE: dbs_min/db/Binary/archive_IFP.1.sg ================================================ function detect(){var e return Binary.compare("'ANP3'")&&(e=Binary.getString(3,1).trim(),/^[0-9]{1}/.test(e))&&(X.isVerbose()&&(sVersion=e),bDetected=1),result()}meta("archive","Animation file") ================================================ FILE: dbs_min/db/Binary/archive_IPW.1.sg ================================================ function detect(){return Binary.compare("'DT1'00c3030000")&&(bDetected=1),result()}meta("archive","Peril WAD") ================================================ FILE: dbs_min/db/Binary/archive_InnoSetup.1.sg ================================================ function detect(){return Binary.compare("'idska32'1a")&&(bDetected=1),result()}meta("archive","Inno Setup") ================================================ FILE: dbs_min/db/Binary/archive_JAM.1.sg ================================================ function detect(){return bDetected=Binary.compare("'LJAM'0000000002000000"),result()}meta("archive","JAM") ================================================ FILE: dbs_min/db/Binary/archive_LAB.1.sg ================================================ function detect(){return Binary.compare("'LABN'00000100")&&(bDetected=1),result()}meta("archive","LucasArts Binary Archive") ================================================ FILE: dbs_min/db/Binary/archive_LRZ.1.sg ================================================ function detect(){if(9<=Binary.getSize()&&Binary.compare("'LRZI'")){switch(bDetected=1,sVersion=Binary.read_uint8(4)+"."+Binary.read_uint8(5),Binary.read_uint8(49)){case 3:break case 4:sOption("BZIP2") break case 5:sOption("LZO") break case 6:sOption("LZMA") break case 7:sOption("GZIP") break case 8:sOption("ZPAQ") break default:bDetected=0}switch(Binary.read_uint8(22)){case 0:break case 1:sOption("encrypted") break default:bDetected=0}switch(Binary.read_uint8(21)){case 0:break case 1:sOption("md5") break default:bDetected=0}}return result()}meta("archive","Long Range ZIP (.LRZ)") ================================================ FILE: dbs_min/db/Binary/archive_LZOP.1.sg ================================================ function detect(){return 9<=Binary.getSize()&&(bDetected=Binary.compare("89'LZO'000D0A1A0A")),result()}meta("archive","LZOP compressed data") ================================================ FILE: dbs_min/db/Binary/archive_MCS.1.sg ================================================ function detect(){var e return Binary.compare("'AHFFMACS0200'")&&(e=Binary.getString(15,12).trim(),/^[A-Z/!]{12}/.test(e))&&(X.isVerbose()&&(sOptions=e),bDetected=!0),result()}meta("archive","MCS") ================================================ FILE: dbs_min/db/Binary/archive_MS-WIM.1.sg ================================================ function detect(){if(9<=Binary.getSize())if(Binary.compare("'MSWIM'000000")){switch(Binary.isVerbose()&&(sOptions="{"+Binary.read_UUID(24)+"}"),bDetected=1,Binary.read_uint16(18)){case 0:sOption("No compression") break case 2:sOption("XPRESS compression") break case 4:sOption("LZX compression") break case 8:sOption("LZMS compression") break default:bDetected=0}sOption("Part Number:"+Binary.read_uint16(40)+"/"+Binary.read_uint16(42))}else Binary.compare("'WLPWM'000000")&&(sName+=", wimlib",bDetected=1) return result()}meta("archive","Windows Imaging Format (.WIM)") ================================================ FILE: dbs_min/db/Binary/archive_MWD.1.sg ================================================ function detect(){var t return Binary.compare("44 41 57 4D")&&(t=Binary.getString(24,29).trim(),/^[A-Z][a-z]+, \d{1,2}(?:st|nd|rd|th) [A-Z][a-z]+ \d{4}$/.test(t))&&(sOptions="Creation date: "+t,bDetected=1),result()}meta("archive","Medievil WAD") ================================================ FILE: dbs_min/db/Binary/archive_P2L.1.sg ================================================ function detect(){var e return Binary.compare("'PSMLST PSM'")&&(e=Binary.getString(11,4).trim(),/^[0-9\.]{4}$/.test(e))&&(sVersion=e,bDetected=1),result()}meta("archive","PSM Soundsystem (.P2L)") ================================================ FILE: dbs_min/db/Binary/archive_PAK.1.sg ================================================ function detect(){var e return Binary.compare("'DPAK'0000010018000000")?(sVersion="Lego Creator",bDetected=1):Binary.compare("'PACK'7faf000080")?bDetected=1:Binary.compare("'RWPACK'0000000080")?(sOptions="PAK Compiler (Raymond Wilson 2008)",bDetected=1):Binary.compare("'MUDGE4'2e30")&&(e=(sVersion=Binary.getString(8)).match(/(\d{2})\/(\d{2})\/(\d{4}).*Copyright\s+(.+?)(?:\x00|$)/i))&&(sVersion=e[1]+"/"+e[2]+"/"+e[3]+", "+e[4].trim(),bDetected=1),result()}meta("archive","PAK") ================================================ FILE: dbs_min/db/Binary/archive_PBP.1.sg ================================================ function detect(){var t return Binary.compare("00 50 42 50")&&(t=Binary.getString(41,3).trim(),/^[A-Z]{3}/.test(t))&&(X.isVerbose()&&(sOptions=t),bDetected=1),result()}meta("archive","PlayStation Update Package") ================================================ FILE: dbs_min/db/Binary/archive_PEA.1.sg ================================================ function detect(){if(10<=Binary.getSize()&&Binary.compare("EA")&&Binary.compare("0000'POD'00",10)&&(sVersion="v"+Binary.read_uint8(1)+"."+Binary.read_uint8(2),bDetected=1)&&Binary.isVerbose())switch(Binary.read_uint8(3)){case 0:sOption("NOALGO") break case 1:sOption("ADLER32") break case 2:sOption("CRC32") break case 3:sOption("CRC64") break case 16:sOption("MD5") break case 17:sOption("RIPEMD160") break case 18:sOption("SHA1") break case 19:sOption("SHA256") break case 20:sOption("SHA512") break case 21:sOption("WHIRLPOOL") break case 22:sOption("SHA3_256") break case 23:sOption("SHA3_512") break case 24:sOption("BLAKE2S") break case 25:sOption("BLAKE2B") break default:bDetected=0}return result()}meta("archive","PeaZip (.PEA)") ================================================ FILE: dbs_min/db/Binary/archive_PKG.1.sg ================================================ function detect(){var e return Binary.compare("7F 50 4B 47")&&(e=Binary.getString(48,48).trim(),/^[A-Z0-9]{6,7}-[A-Z0-9]{9}_00-[A-Z0-9]{16,18}$/.test(e))&&(X.isVerbose()&&(sOptions="ContentID: "+e),bDetected=1),result()}meta("archive","System Software Update Packages") ================================================ FILE: dbs_min/db/Binary/archive_PSARC.1.sg ================================================ function detect(){return Binary.compare("50534152000100037a6c6962")&&(sVersion="1.3",sOptions="zlib",bDetected=1),result()}meta("archive","PSARC") ================================================ FILE: dbs_min/db/Binary/archive_PUP.1.sg ================================================ function detect(){return Binary.compare("'SCEUF'0000....000000")?(sVersion="PS3/PS Vita",bDetected=1):Binary.compare("'SLB2'..0000000000....02")&&(sVersion="PS4/PS5",bDetected=1),result()}meta("archive","PlayStation Update Package") ================================================ FILE: dbs_min/db/Binary/archive_RVZ.1.sg ================================================ function detect(){var e return Binary.compare("'RVZ'")&&(e=Binary.getString(88,6).trim(),/^[A-Z0-9]{6}$/.test(e))&&(X.isVerbose()&&(sOptions="GameID: "+e),bDetected=1),result()}meta("archive","RVZ") ================================================ FILE: dbs_min/db/Binary/archive_STK.1.sg ================================================ function detect(){var e return 64 X.Sz()) return -1 for (var n = 0; n < s; n++)r = r >> 8 ^ z[255 & r ^ X.U8(e + n)] return r } function r(e, s, r) { return void 0 === File.crc16 ? d(e, s, r) : (_log("Please remove the CRC16 implementation from archives.ancient.sg!"), File.crc16(e, s, r)) } var s = found = !1 function e() { if (!(!X.c("1F1E") && !X.c("1F1F") || X.Sz() < 6)) { if (old = X.c("1F1F")) unpsz = X.U16(2, _LE) << 16 | X.U16(4, _LE) else if (unpsz = X.U32(2, _BE), !(t = X.U8(6)) || 24 < t || 6 + t > X.Sz()) return if (!(unpsz > u || old && !unpsz)) { if (old) { var e = 6, o = [], c = X.U16(e, _LE) if (e += 2, 1024 <= c) return for (i = 0; i < c; i++)(t = X.U8(e++)) < 255 ? o[i] = t : (o[i] = X.U16(e, _LE), e += 2) var a = !0 return function e(s, r, n) { a && (c < s ? a = !1 : o[s] ? 24 < ++r || (e(s + o[s], r, n <<= 1), c <= s + 1) ? a = !1 : e(s + o[s + 1], r, 1 | n) : r || (a = !1)) }(0, 0, 0), a } return 1 } } } function n() { var r, s = X.U32(0, _BE), e = X.readBytes(0, 3), n = X.SA(0, 4) if ((function () { if (134810120 <= s && s <= 134810126 && 134810121 != s) return gen = 2 if (8 <= (255 & s) && (255 & s) <= 14 && e[0] != e[1] && e[0] != e[2] && e[1] != e[2]) return gen = 1 switch (n.slice(0, 3)) { case "1AM": return gen = 3, 1 case "2AM": return gen = 6, 1 }switch (n) { case "S300": return gen = 3, 1 case "S310": return gen = 4, 1 case "S400": return gen = 5, 1 case "S401": return gen = 6, 1 case "S403": case "Z&G!": case "ZULU": return gen = 7, 1 case "S404": case "AYS!": return gen = 8, 1 default: return } })()) return r = [], sz = unpsz = -1, 2 != gen || o() || (gen = 1), o() ? (names = [["?", "?"], ["SC", "v2.69-81"], ["SC", "v2.92-99"], ["S300", "v3.00"], ["S310", "v3.10-11b"], ["S400", "pre-v4.00"], ["S401", "v4.01"], ["S403", "v4.02a"], ["S404", "v4.10"]][gen], 1) : void 0 function t(e) { for (var s = 0; s < 4; s++) { if (r[s] = e >> 24, r[s] < 8 || 14 < r[s]) return e <<= 8 } } function o() { switch (gen) { case 1: if (p = 18, X.Sz() < p) return for (r[0] = s, i = 1; i < 3; i++)if (r[i] = X.U8(i + 15), r[i] < 4 || 7 < r[i]) return var e = X.U32(4, _BE) if (!e) return if (!(unpsz = X.U32(8, _BE)) || e > unpsz || 1048576 < unpsz) return if (!(sz = X.U32(12, _BE)) || sz > e) return break case 2: t(s) case 4: case 5: case 6: if (p = 12, X.Sz() < p) return if (!(unpsz = X.U32(4, _BE))) return if (sz = X.U32(8, _BE)) break return case 3: if (p = 16, X.Sz() < p) return if (t(X.U32(4, _BE)), !(unpsz = X.U32(8, _BE))) return if (sz = X.U32(12, _BE)) break return case 7: case 8: if (p = 16, X.Sz() < p + 2) return if (!(unpsz = X.U32(8, _BE))) return if ((sz = X.U32(12, _BE) + 2) < 2) return break default: return }return !((sz += p) > X.Sz() || sz > u || unpsz > u) } } return (function (e) { if (found) return 1 if (!(4 <= e || s || X.c("'XPKF'", 0) && X.Sz() < 44 || (sz = X.U32(4, _BE), type = X.SA(8, 4), unpsz = X.U32(12, _BE), !sz) || !unpsz || sz > u || unpsz > u || (flags = X.U8(32), xhdrs = 1 & flags, haspass = 2 & flags, hdrsz = 4 & flags ? 38 + X.U16(36, _BE) : 36, 0 + sz + 8 > X.Sz()))) { for (cccc = [[/ACCA/, "André Osterhues's Code Compression Algorithm (XPK-ACCA.)"], [/ARTM/, "Arithmetic encoding compressor (XPK-ARTM.)"], [/BLZW/, "LZW-compressor by Bryan Ford (XPK-BLZW.)"], [/BZIP/, "bzip by Julian Seward (XPK-BZIP."], [/BZP2/, "bzip2 by Julian Sadler (XPK-BZP2.)"], [/CBR[01]/, "RLE-compressor by Bilbo 1st of Hypenosis (XPK-CBR0.,XPK-CBR1.)"], [/CRM2/, "Crunch-Mania by Thomas Schwarz, LZH-mode (XPK-CRM2.)"], [/CRMS/, "Crunch-Mania by Thomas Schwarz, sampled LZH-mode (XPK-CRMS.)"], [/CYB[12]/, "XpkCybPrefs container by Alexis Nasr (XPK-CYB1.,XPK-CYB2.)"], [/GZIP/, "DEFLATE by Jean-loup Gailly (XPK-GZIP.)"], [/DLTA/, "Delta encoding by Stephan Fuhrmann (XPK-DLTA.)"], [/FAST/, "Fast LZ77 compressor by Christian von Roques (XPK-FAST.)"], [/FBR2/, "FBR2 CyberYAFA compressor (XPK-FBR2.)"], [/FRLE/, "RLE-compressor by Jorma Oksanen (XPK-FRLE.)"], [/HFMN/, "Huffman compressor (XPK-HFMN.)"], [/HUFF/, "Huffman compressor by Marc Zimmermann (XPK-HUFF.)"], [/ILZR/, "Incremental Lempel-Ziv-Renau compressor (XPK-ILZR.)"], [/IMPL/, "File Imploder by Peter Struijk (XPK-IMPL.)"], [/LHLB/, "LZRW-compressor by Gunther Nikl (XPK-LHLB.)"], [/LIN1/, "LIN1 LINO packer (XPK-LIN1.)"], [/LIN3/, "LIN3 LINO packer (XPK-LIN3.)"], [/LIN2/, "LIN2 LINO packer (XPK-LIN2.)"], [/LIN4/, "LIN4 LINO packer (XPK-LIN4.)"], [/LZBS/, "LZBS CyberYAFA compressor (XPK-LZBS.)"], [/LZCB/, ": LZ-compressor (XPK-LZCB.)"], [/LZW2/, "LZW2 CyberYAFA compressor (XPK-LZW2.)"], [/LZW3/, "LZW3 CyberYAFA compressor (XPK-LZW3.)"], [/LZW4/, "LZW4 CyberYAFA compressor (XPK-LZW4.)"], [/LZW5/, "LZW5 CyberYAFA compressor (XPK-LZW5.)"], [/ELZX/, "LZX-compressor by Piotr Kasprzyk (XPK-ELZX.)"], [/SLZX/, "LZX-compressor with delta encoding by Piotr Kasprzyk (XPK-SLZX.)"], [/MASH/, "LZRW-compressor by Zdenek Kabelac (XPK-MASH.)"], [/NONE/, "Null compressor by Dirk Stöcker (XPK-NONE.)"], [/NUKE/, "LZ77-compressor by Christian von Roques (XPK-NUKE.)"], [/DUKE/, "LZ77-compressor by Christian von Roques, with delta encoding (XPK-DUKE.)"], [/PWPK/, "Power Peak's PowerPacker by Nico François (XPK-PWPK.)"], [/PPMQ/, "PPM compressor by Charles Bloom (XPK-PPMQ.)"], [/(FRHT|RAKE)/, "LZ77-compressor (XPK-FRHT.,XPK-RAKE.)"], [/RDCN/, "Ross data compression (XPK-RDCN.)"], [/RLEN/, "RLE-compressor (XPK-RLEN.)"], [/SDHC/, "Sample delta Huffman compressor (XPK-SDHC.)"], [/SHR[I3]/, "LZ-compressor with arithmetic encoding by Matthias Meixner (XPK-SHR3.,XPK-SHRI)"], [/SLZ3/, "SLZ3 CyberYAFA compressor by Niels Fröhling (XPK-SLZ3.)"], [/SMPL/, "Huffman compressor with delta encoding (XPK-SMPL.)"], [/SQSH/, "Squash compressor for sampled sounds by John Hendrikx (XPK-SQSH.)"], [/SASC/, "LZ-compressor with arithmetic and delta encoding (XPK-SASC.)"], [/SHSC/, "Context modeling compressor by Peter Kunath (XPK-SHSC.)"], [/TDCS/, "LZ77-compressor by Niels Fröhling (XPK-TDCS.)"], [/ZENO/, "LZW-compressor (XPK-ZENO.)"], [/BLFH/, "Blowfish encryption by Bruce Schneider (XPK-BLFH.)"], [/BZIP/, "Encapsulated Bzip v1 (XPK-BZIP.)"], [/CAST/, "CAST encryption by Dirk Pauli (XPK-CAST.)"], [/ENCO/, "Unsafe encryption (XPK-ENCO.)"], [/DHUF/, "Huffman compressor (lost) (XPK-DHUF.)"], [/DMCB/, "68881/2 fp-based arithmetic compressor (XPK-DMCB.)"], [/DMCD/, "68881/2 fp-based arithmetic compressor (XPK-DMCD.)"], [/DMCI/, "Arithmetic compressor (lost) (XPK-DMCI.)"], [/DMCU/, "68881/2 fp-based arithmetic compressor (XPK-DMCU.)"], [/FEAL/, "FEAL-N encryption by Christian von Roques (XPK-FEAL.)"], [/IDEA/, "IDEA encryption (XPK-IDEA.)"], [/L2XZ/, "LZMA2 compressor (XPK-L2XZ.)"], [/LZ40/, "LZ4 compressor (XPK-LZ40.)"], [/LZMA/, "LZMA2 compressor (XPK-LZMA.)"], [/NUID/, "IDEA encryption + NUKE (XPK-NUID.)"], [/SHID/, "IDEA encryption + SHRI (XPK-SHID.)"], [/TLTA/, "TLTA encoder (lost) (XPK-TLTA.)"]], found = -1, i = 0; i < cccc.length && found < 0; i++)cccc[i][0].test(type) && (found = i) if (!(found < 0)) { if (a = a.appendS(cccc[found][1], "/n"), X.Sz() < 36) o = o.addIfNone("!short") else { for (c = 0, i = 0; i < 36; i++)c ^= X.U8(0 + i) c && (o = o.addIfNone("!badhdr")) } return sz += 8, 1 } } s = !0 })() ? (sName = X.isVerbose() ? "Amiga eXtended PacKer Format container by Dirk Stöcker et al. (XPKF.)" : "XPK container (XPKF.)", sVersion = sversion + ("" != o ? "malformed" + o : ""), bDetected = 1, X.isVerbose() && (sOptions = a + "; payload at:" + Hex(hdrsz) + " unp.sz:" + unpsz + " sz:" + outSz())) : 4 < X.Sz() && X.c("'ACCA'") ? _setResult("archive", "André Osterhues's Code Compression Algorithm (ACCA.)", "", "") : 2 < X.Sz() && X.c("FF1F") && _setResult("archive", "Compact by Colin L. McMaster (.C)", "", ""), X.Sz() < 3 || !X.c("1F9D") || (t = X.U8(2), sversion = 128 & t ? "new" : "old", (t &= 127) < 9) || 16 < t || _setResult("archive", "Compress by Spencer Thomas (.Z)", sversion, ""), !bDetected && (function () { if (!(X.Sz() < 20) && (X.c("'CrM!'") || X.c("'CrM2'") || X.c("'Crm!'") || X.c("'Crm2'") || X.c("18051973") || X.c("'CD'B3B9") || X.c("'DCS!'") || X.c("'Iron'") || X.c("'MSS!'") || X.c("'mss!'")) && (unpsz = X.U32(6, _BE)) && !(unpsz > u) && !((sz = X.U32(10, _BE) + 14) < 15 || sz > X.Sz() || sz > u)) { switch (hdr = X.SA(0, 4)) { case "s": case "CD³¹": case "Iron": case "MSS!": hdr = "CrM2" break case "mss!": hdr = "Crm2" break case "DCS!": hdr = "CrM!" }var e = "m" == hdr[2], s = "2" == hdr[3] return sversion = ["std", "std sampled", "LZH", "LZH sampled"][(s ? 2 : 0) + (e ? 1 : 0)], 1 } })() && (sName = "Crunch-Mania by Thomas Schwarz (CRM.)", sVersion = sversion, X.isVerbose() && (sOptions = "unp.sz:" + unpsz + " sz:" + outSz()), bDetected = 1), !bDetected && (function () { if (X.c("'DMS!'") && !(X.Sz() < 56) && !(6 < X.U16(50, _BE))) { o = "", d(4, 50, 0) != X.U16(54, _BE) && (o = o.addIfNone("!badhdr")) var e = X.U16(10, _BE) if (!(32 & e)) { sversion = "", 2 & e && (sversion = "obfuscated"), p = 56 for (var s = tsz = acsz = lasttrksz = trks = mintrk = prevtrk = 0, r = [0, 0, 256, 16384, 16384, 4096, 8192]; p + 20 < X.Sz();) { if (!X.c("'TR'", p)) return if ((ctrk = X.U16(p + 2, _BE)) < prevtrk) break if (X.isDeepScan() && d(p, 18, 0) != X.U16(p + 18, _BE)) { o = o.addIfNone("!badtrkhdr") break } var n = X.U8(p + 13) if (6 < n) return var s = Math.max(s, r[n]), t = X.U8(p, 12), n = ((2 <= n && n <= 4 || 5 <= n && 4 & t) && (tsz = Math.max(tsz, X.U16(p + 8, _BE))), X.U16(p + 6, _BE)) if (p + 20 + n > X.Sz()) return if (X.isAggressiveScan() && d(p + 20, n, 0) != X.U16(p + 16, _BE)) { o = o.addIfNone("!badtrkcrc") break } if (ctrk < 80 && (ctrk >= trks && (lasttrksz = X.U16(p + 10, _BE)), mintrk > ctrk && (mintrk = ctrk), ctrk > trks && (trks = ctrk), prevtrk = ctrk), p += n + 20, acsz += n, p > X.Sz()) { o = o.addIfNone("!short") break } if (79 <= ctrk && ctrk < 32768) break if (o) break } e = 16 & e ? 22528 : 11264 return mintrk >= trks && (o = o.addIfNone("!badtrknum")), unpsz = (trks - mintrk) * e + lasttrksz, sz = p, (o = sz > u ? o.addIfNone("!badcalcsize") : o) && (sversion += "/malformed" + o), 1 } } })() && (sName = "Disk Masher System (DMS.)", sVersion = sversion, X.isVerbose() && (sOptions = "unp.sz:" + unpsz + " sz:" + outSz(sz)), bDetected = 1), !bDetected && (function () { if (X.c("1F9E") || X.c("1F9F")) { var e = X.c("1F9E") if (a = sversion = "", e) { if (2 < X.Sz()) { for (var s = [0, 0, 1, 3, 8, 12, 42, 16], r = [], n = btl = k = 0, e = new BitReader(2); n < 8; n++)for (; k < s[n]; k++)r[btl++] = n + 1 if (!(s = createOrderlyHuffmanTable(r, btl, e))) return } sversion = "v1.x = gzip v0.5" } else { if (X.Sz() < 5) return if (32768 & (t = X.U16(2, _LE))) return if (192 & (t2 = X.U8(4))) return for (var s = [1 & t, t >> 1 & 3, t >> 3 & 7, t >> 6 & 15, t >> 10, t2], i = 62, n = 0; n < 6; n++)i -= s[n] var o = 256, c = 7 for (n = 0; n < 6; n++)o -= s[n] << c-- if (o < i || 2 * i < o) return createOrderlyHuffmanTable() || (sversion = "v2.x") } return 1 } })() && (sName = "Freeze/Melt by Leonid A. Broukhis (.F,.lzc)", sVersion = sversion, bDetected = 1), !bDetected && (function () { switch (hdr = X.SA(0, 4)) { case "ATN!": case "EDAM": case "IMP!": case "M.H.": add = 7 break case "BDPI": add = 1768 break case "CHFI": add = 4068 break case "RDC9": case "Dupa": case "FLT!": case "PARA": add = 0 break default: return }if (unpsz = X.U32(4, _BE), sz = X.U32(8, _BE), sversion = "", !(!unpsz || !sz || 1 & sz || sz < 12 || sz + 50 > X.Sz() || unpsz > u || sz > u)) { if (X.isDeepScan()) { for (crc = X.U32(sz + 46, _BE), i = 0; i < sz + 46; i += 2)add += X.U16(i, _BE); (4294967295 & add) != crc && (sversion = "malformed!CRC") } return sz += 50, 1 } })() && (sName = "File Imploder by Peter Struijk (FImp.)", sVersion = sversion, X.isVerbose() && (sOptions = "unp.sz:" + unpsz + " sz:" + outSz()), bDetected = 1), !bDetected && (function () { if (!(X.Sz() < 12) && /[\x01\x02\x03]LOB/.test(X.SA(0, 4))) { var e = X.U8(0) if ((method = X.U8(4)) && !(6 < method) && (unpsz = 0, 1 !== e || (unpsz = File.read_uint24(5, _BE)) && !(unpsz > u))) { if (sz = 12 + X.U32(8, _BE), 2 === method) { var s = 2 for (i = 0; i < s; i += 2) { if (sz + s > X.Sz()) return if (t1 = X.U8(sz + i), t2 = X.U8(sz + i + 1), t1 != t2 && 1024 < (s = s < (t1 = t1 < t2 ? t2 : t1) + i + 4 ? t1 + i + 4 : s)) return } sz += s } return sversion = ["BMC: RLE", "HUF: Huffman", "LZW: 12-bit fixed code", "LZB: 9 to 12-bit fixed LZW", "MSP: LZ variant", "MSS: LZSS variant"][method - 1] + ["", "/double", "/triple"][e - 1] + (sz > X.Sz() ? "/malformed!short" : ""), 1 } } })() && (sName = "LOB's File Compressor aka. Multipak (LOB.)", sVersion = sversion, X.isVerbose() && (sOptions = (unpsz ? "unp.sz:" + unpsz + " " : "") + "sz:" + outSz()), bDetected = 1), bDetected || ((function () { if (X.c("'ziRCONia'0E00") && !(X.Sz() < 24)) { var e = X.U16(12, _LE), s = X.U32(18, _LE) if (!((unpsz = X.U32(14, _LE)) > u || s + 4 * e > X.Sz())) { for (o = "", sz = 0, i = 0; i < e; i++) { var r = X.U32(s + 4 * i, _LE) if (r + 20 > X.Sz()) return r = r + X.U32(r + 4, _LE) + 8 * X.U16(r + 12, _LE) + 20 sz < r && (sz = r) } return 1 } } })() ? (sName = "Music Module Compressor by Emmanuel 'Zirconia' Giasson (MMCMP.)", nV = X.U16(10, _LE).toString(16).toUpperCase(), sVersion = "v" + nV[0] + "." + nV.slice(1, 3), X.isVerbose() && (sOptions = "unp.sz:" + unpsz + " sz:" + outSz()), bDetected = 1) : X.c("'MMS '00") && (sName = "C(ompression)KIT by Mad Man Software (C4-,C4A,C`A)", bDetected = 1)), !bDetected && e() && (sName = "Pack (.z)", old && (sVersion = "old"), X.isVerbose() && (sOptions = "unp.sz:" + unpsz), bDetected = 1), !bDetected && (function () { if (!(X.Sz() < 16) && (X.c("'PP11'") || X.c("'PP20'") || X.c("'PX20'") || X.c("'CHFC'") || X.c("'DEN!'") || X.c("'DXS9'") || X.c("'H.D.'") || X.c("'RVV!'"))) { var e = !1 if (sversion = "", X.c("'PX20'")) { if (X.Sz() < 18) return e = !0, sversion = "obfuscated" } e = X.U32(e ? 6 : 4, _BE) return 151587081 == e || 151652874 == e || 151653131 == e || 151653388 == e || 151653389 == e ? !(X.isDeepScan() && (t = X.U32(X.Sz() - 4, _BE), !(unpsz = t >> 8) || unpsz > u || 32 <= (255 & t))) : void 0 } })() ? (sName = "Power Peak's PowerPacker by Nico François (PP.)", sVersion = sversion, X.isDeepScan() && X.isVerbose() && (sOptions = "unp.sz:" + unpsz), bDetected = 1) : !bDetected && X.c("'SFHD'") ? _setResult("archive", "PowerPlayer Music Cruncher by Stephan Fuhrmann (PMC.)", "v1.0", "lh.library-based, unp.sz:" + X.U32(4, _BE) + " sz:" + outSz(X.U32(8, _BE) + 12)) : !bDetected && X.c("'SFCD'") && _setResult("archive", "PowerPlayer Music Cruncher by Stephan Fuhrmann (PMC.)", "v2.x", "LZRW-compressor, unp.sz:" + X.U32(4, _BE) + " sz:" + outSz(X.U32(8, _BE) + 12)), !bDetected && (function () { var e, s return !(!(X.c("'RNC'01") || X.c("'RNC'02") || X.c("'...'01")) || (unpsz = X.U32(4, _BE), sz = X.U32(8, _BE), !unpsz) || !sz || unpsz > u || sz > u) && (e = !1, sversion = "", X.c("'RNC'01") ? X.Sz() <= 18 ? sversion = "old" : (s = X.U8(18), 128 & X.U8(sz + 11) ? !(3 & s) && 124 & s && X.Sz() >= sz + 18 && (File.isHeuristicScan() || X.isDeepScan() && r(18, sz, 0) == X.U16(14, _BE)) ? (sversion = "new", e = !0) : sversion = "old" : sversion = "new") : X.c("'RNC'02") ? X.Sz() <= 18 ? sversion = "old" : (s = X.U8(18), 128 & X.U8(sz + 10) ? 48 != (48 & s) && X.Sz() >= sz + 18 && (File.isHeuristicScan() || X.isDeepScan() && r(18, sz, 0) == X.U16(14, _BE)) ? (sversion = "new", e = !0) : sversion = "old" : sversion = "new") : X.c("'...'01") && (version = "new"), s = "o" == sversion[0] ? 12 : 18, o = "", s + sz > X.Sz() && (o = "!short"), X.isDeepScan() && "n" == sversion[0] && !e && r(18, sz, 0) != X.U16(14, _BE) && (o = o.addIfNone("!badcrc")), sz += s, o && (sversion += "/malformed" + o), 1) })() ? (sName = "Rob Northen Compressor (RNC" + X.U8(3) + ".)", sVersion = sversion, X.isDeepScan() && X.isVerbose() && (sOptions = "unp.sz:" + unpsz + " sz:" + sz), bDetected = 1) : !bDetected && File.isHeuristicScan() && 4 <= X.Sz() && X.c("1FA0") && _setResult("archive", "SCO Compress LZH (SCO.)", "", ""), !bDetected && X.c("'SQSH'") && (sName = "Squash compressor by John Hendrikx (SQSH.)", sOption = "12-bit LZW", bDetected = 1), !bDetected && n() && (sName = "StoneCracker by Jouni 'Mr. Spiv' Korhonen (" + names[0] + ".)", sVersion = names[1], bDetected = 1, X.isVerbose()) && (sOptions = (0 <= unpsz ? "unp.sz:" + unpsz + " " : "") + (0 <= sz ? "sz:" + outSz() : "")), bDetected || X.Sz() < 12 || !X.c("'TPWM'") || !(unpsz = X.U32(4, _BE)) || unpsz > u || (sName = "Turbo Packer by Wolfgang Meyerle (TPWM.)", X.isVerbose() && (sOptions = "unp.sz:" + unpsz), bDetected = 1), bDetected || !X.c("'Vice'") && (!X.c("'Vic2'") || (unpsz = X.U32(4), sz = 12 + X.U32(8, _BE), !unpsz) || unpsz > u || sz < 1036 || sz > u) || (sName = "Huffman compressor with RLE (" + X.SA(0, 4) + ".)", bDetected = 1, X.isVerbose() && 50 == X.U8(3) && (sOptions = "unp.sz:" + unpsz + " sz:" + sz)), result() } meta("archive", ""), debug = 0 ================================================ FILE: dbs_min/db/Binary/archive_btoa.1.sg ================================================ function detect(){return"'xbtoa Begin'"==Binary.getString(0,11)&&(bDetected=1),result()}meta("archive","btoa") ================================================ FILE: dbs_min/db/Binary/archive_cad.DWG.1.sg ================================================ function detect(){if(9<=Binary.getSize())switch(bDetected=1,Binary.getString(0,6)){case"AC1001":sVersion="R2.22" break case"AC1002":sVersion="R2.50" break case"AC1003":sVersion="R2.60" break case"AC1004":sVersion="R9" break case"AC1006":sVersion="R10" break case"AC1009":sVersion="R11/12" break case"AC1012":sVersion="R13" break case"AC1014":sVersion="R14" break case"AC1015":sVersion="R2000" break case"AC1018":sVersion="R2004" break case"AC1021":sVersion="R2007" break case"AC1024":sVersion="R2010" break case"AC1027":sVersion="R2013" break case"AC1032":sVersion="R2018" break default:return}return result()}meta("archive","AutoCAD Drawing (.DWG)") ================================================ FILE: dbs_min/db/Binary/archive_gp7bank.1.sg ================================================ function detect(){return!!(X.c("'AMARCHIVE'..000000")&&X.c("'Samples.xml'00",37)&&X.c("'=(_wcsz=X.U32(0,_LE))&&X.c("00 02 02 00 30",4)){if(_wcp=9,!((_wca=X.U8(_wcp++))<128))if(128<_wca)for(_wcc=128^_wca,_wci=_wca=0;_wci<_wcc;_wci++)_wca=(_wca<<8)+X.U8(_wcp++) else _wca=-1 if(0<_wca&&_wca+_wcp<=_wcsz&&X.c("06 09 2A 86 48 86 F7 0D 01 07 02",_wcp))return!0}return!1}function detect(){if(!isWinCert()){var e,t,es,rs,G=0,Y=0,l=0,U=0,j=0,i=0,E=0,k=0,K=-1,F="",p="",_="",r="",a="",c="",O="" if(X.c("'[1tracker module]'0D0A"))sName="Shiru's 1tracker module (.1TM)",bDetected=1,0<=(j=X.fStr(1,64,"Engine="))&&(i=X.fStr(j+7,64,"."),sVersion="for "+X.SA(j+7,i-j-7)),X.isVerbose()&&(0<=(j=X.fStr(i,128,"Title="))&&(i=X.fSig(j+6,64,"0D0A"),sOption(X.SA(j+6,i-j-6))),0<=(j=X.fStr(i,128,"Author="))&&(i=X.fSig(j+7,64,"0D0A"),sOption(X.SA(j+7,i-j-7),"by: ")),0<=(j=X.fStr(i,128,"Speed=")))&&(i=X.fSig(j+7,64,"0D0A"),sOption(X.SA(j+7,i-j-7),"spd:")) else if(X.c("'_A2module_'")&&isWithin(nV=X.U8(14),1,14))bDetected=1,bad=!1,sName="subz3ro's AdLib Tracker II module (.A2M)",sVersion="/┤DLiB TR/┤CK3R ][ v"+nV,ptn=X.U8(15),(bad=!ptn||64ptn)&&(ptn=E) if(G=asg1+300,apn1=X.fSig(asg1,1024,"'APN1'"),ch=ptn_=-1,0ch&&(ch=ch_),G+=16+4*ch_*X.U16(G+2,_BE) K=G}else bad=bad.addIfNone("!noptns");(bad=16ptn)&&(ptn=E) for(ch=-1,ptns=[],Y=0,G=308;Y<255;Y++)(ch_=X.U16(G,_BE))>ch&&(ch=ch_),ptnsz=ch_*X.U16(G+2,_BE),G+=4,ptnsz&&((E=X.SC(G,12,"CP437").trim()).length&&"Empty"!=E&&ptns.push(E),G+=12+4*ptnsz) K=G,(bad=16d3&&(d3=d2) if((G=d3)=2662+2048*X.U8(35)){if(sName="Electronic Arts' ASYLUM Music Format module (.AMF)",bDetected=1,sVersion="v"+X.SA(21,3),X.isVerbose()){spd0=X.U8(32),bpm0=X.U8(33),smp=X.U8(34),ptn=X.U8(35),ord=X.U8(36) var G=294,B=0 for(smps=[],Y=0;Y>5,sch=1+(31&X.U8(9)),smp=X.U8(10),ptn=X.U16(11),ord=X.U16(13),vmch=X.U8(15),xtra=X.U16(16),G=xtra+18,S=[],Y=B=0;Ymptn&&(mptn=E) for(mptn++,G+=2*ord,Y=0;Y>8)+"."+(255&bpm0),spd0=Math.max(1,X.U8(G++)),G+=3,flg=X.U16(G),G+=2):(bpm0=Math.max(32,X.U8(G++)),spd0=Math.max(1,X.U8(G++)),flg=X.U8(G++)),ch=flg>>6&1?"2":"1",linfreqtbl=64&flg?" lnr.freq.tbl.":"",midiused=128&flg?" MIDI used":"",sOptionT(F),inss=[],smps=[],S=[],B=allsmpcsz=smp=shd=0,Y=0;YX.Sz()&&(bad=bad.addIfNone("!short")),Y=0;Yptn&&(ptn=o) break case"WLEN":for(Y=0;Y>2;Y+=4)X.U32(G+Y,_BE)&&ins++}G+=hksz}sOptionT(E),sOptionT(p,"by: "),sOptionT(d,"on: "),sOption(id,"in: "),sOption(addEllipsis(_.trim(),160)),sOption("ch:"+ch+" ord:"+ord+" ptn:"+ptn+" ins:"+ins+" sz:"+outSz(G))}}else if(X.c("'ADRVPACK'"))sName="Petter A. Urkedal's AProSys module (.APS)",bDetected=1 else if(X.c("'ARP.'"))sName="Major Tom's Player 2 module (.ARP)",bDetected=1 else if(X.c("'ACTIONAMICS SOUND TOOL'",62))sName="Michael Kleps's Actionamics Sound Tool module (.AST)",bDetected=1,sVersion="v"+X.SA(86,3) else if(X.c("08'AST '")&&isWithin(X.U8(9),4,8)&&X.U16(10)<=1001){if(sName="Patrice 'Cagliostro' Bouchand's All Sound Tracker module (.AST)",sVersion="v"+X.SA(5,4),bDetected=1,X.isVerbose()){for(L=X.U16(10),a=X.SC(12,L+1,"CP850"),G=13+L,s="",Y=0;Y>3 break case"BLOK":ptn++ break case"INST":ins++ break case"SAMP":smp++}G+=hksz}sOption("ord:"+ord+" ptn:"+ptn+(ins?" syn:"+ins:"")+(smp?" smp:"+smp:"")+" sz:"+outSz(K))}}else if(X.c("'BBSONG'00'0001'00")){sName="Shiru's Beepola module (.BBSONG)",bDetected=1 var is=!(G=12) for(ord=orn=ptn=svgptn=svgwarp=phains=0,bad=F=auth=engine="";G=X.Sz());){if(58!=X.U8(G++)){G-- break}switch(E=X.SA(G,254),G+=E.length+1,E){case"INFO":for(;GX.Sz()&&(bad=bad.addIfNone("!short")),fl>>=1,ins++ fl=X.U32(G),G+=4 for(trk=0,trkend=!1,Y=0;Y<32;Y++){if(1&fl)for(trk++,trkend=!1,q=0;G>=1}trkend||(bad=bad.addIfNone("!short"),G=-1)}}else bad=bad.addIfNone("!badtags") ""!=bad&&(sVersion=sVersion.appendS("malformed"+bad,"/")),sOptionT(F),sOptionT(author,"by: "),sOption("spd:"+spd+(X.isDeepScan()?" trk:"+trk+" ins:"+ins+" sz:"+outSz(G):""))}}else if(384'1ADEE0")&&(!X.U8(19)&&X.c("'CUD-FM-File - SEND A POSTCARD -'",1537)||X.U8(19)&&X.c("'YsComp'07'CUD1997'1A04",32)))sName="Daniel Eshcbach/CUD's Boom Tracker 4 module (.CFF)",sVersion="v"+X.U8(16),bDetected=1,X.U8(19)&&(sVersion+="/LZW-packed"),X.isVerbose()&&sOption(outSz(32+X.U16(17)),"sz:") else if(X.c("'CHIPv1.0'")){for(sName="Dmitry 'Alone Coder' Bystrov's Chip Tracker module (.CHI)",bDetected=1,sVersion="v"+X.SA(5,1),bad="",X.Sz()<=256&&(bad=bad.addIfNone("!badsz")),ptn=smp=0,tempo=X.U8(40),ord=X.U8(41)+1,lp=X.U8(48),Y=0;Yptn&&(ptn=G),31msgp&&(msgp=E),Y+=2 K=X.fSig(msgp,TOEOF,"FFFF")+2,bDetected=1,bad=0,sName="Jens Christian 'JCH/Vibrants' Huus's Edlib Tracker module (.D00,.D01)",sVersion="v"+X.U8(7),(bad=1X.Sz()?bad.addIfNone("!short"):bad)&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose()&&(F=X.SA(16,44).trim(),sOption(F),sOption(titles.join("; "),F||1!=F.length?"":"songs:"),""!=F||titles.length||sOptionT(X.SA(216,28)),1>4)+"."+(15&nV),co=X.U8(26),sVersion!=X.SA(20,4).toLowerCase()&&(sVersion+='/"'+X.SA(20,4)+'"'),co&&(sVersion=sVersion.appendS("co.ptn","/")),X.isVerbose()){for(sOptionT(decAnsi(610,32,CPAmiga,!0)),r=[],ch=X.U8(25),ord=X.U8(47)+1,ptn=X.U8(46)+1,smp=A=0,Y=0;Y<31;Y++)(slen=X.U32(176+4*Y,_BE))&&(smp++,A+=slen) for(Y=0;Y<31;Y++)r.push(decAnsi(642+30*Y,30,CPAmiga,!0).trim()) if(K=1572,co)for(Y=0;YX.Sz()&&!X.isVerbose()&&(sVersion=sVersion.appendS("malformed!short","/")),sOptionT(addEllipsis(r.filter(funSampleName).join(" "),256,160),'by/msg: "','"'),sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(K))}}else if(X.c("000003F3")&&X.c("70FF'NuUNCLEART'",32)&&X.U8(20)&&X.U32(44,_BE)&&X.U32(48,_BE)&&X.U32(56,_BE)){if(sName="Dave 'Uncle Tom' Lowe module (.DL)",bDetected=1,X.isVerbose()){if(smpip=32+X.U32(60,_BE),smpiep=32+X.U32(64,_BE),smp=smpiep?Math.floor((smpiep-smpip)/14):0,F=X.SA(32+X.U32(80,_BE),256),auth=X.SA(32+X.U32(84,_BE),256),cmt=X.SA(32+X.U32(88,_BE),256),loadsz=32+X.U32(92,_BE),K=32+X.U32(96,_BE),sza=Hex(X.Sz()-K),smpsz=32+X.U32(100,_BE),songsz=32+X.U32(104,_BE),sfx=32+X.U32(108,_BE),k=1,d1=32+X.U32(76,_BE))for(a1=d1;;){if(a1+=16,!(d1=X.U32(a1,_BE)))break if(!(d1-=X.U8(a1+3)))break k++}sOptionT(F),1>1 break case"PATT":var ns=nV<3?9:8 for(u=G,ptn=X.U16(u),trk=X.U8(u+2),u+=3,32<(ch=(ch=trk)<1?1:ch)&&(ch=32),Y=0;Ymptn&&(mptn=E) for(ord=X.U8(38),ptn=X.U8(40),G=X.U16(176)<<4,inss=[],mp=0,Y=ins=0;Ymp&&(mp=Q+X.U16(G+38)) G=176+2*X.U8(39)+2*ptn-2,G=X.U16(G)<<4,G+=2+X.U16(X.U16(G)),K=Math.max(mp,G),sOptionT(X.SC(4,32,"CP437")),sOption(addEllipsis(inss.filter(funSampleName).join(" "),160),'ins/msg:"','"'),sOption("ord:"+(rord==ord?"":rord+"/")+ord+" ptn:"+(mptn==ptn?"":mptn+"/")+ptn+" ins:"+ins+" sz:"+outSz(K))}}else if(X.c("'RIFF'........'DSMFSONG'")&&X.U16(54)<=128&&X.U16(56)<=128&&X.U16(60)<=256&&X.U16(62)<=16){if(sName="Carlos Hasan's Digital Sound Interface Kit module (.DSM)",bDetected=1,sVersion="RIFF",X.isVerbose()){for(sOptionT(X.SC(20,28,"CP437")),K=X.U32(4)+8,G=12,smp=0;GX.Sz()&&(sVersion+="/malformed!badchunk"),sOption("ch:"+Math.max(1,X.U16(62))+" spd0:"+X.U8(66)+" bpm0:"+X.U8(67)+" ord:"+X.U16(56)+"("+X.U16(52)+"-"+X.U16(54)+") ptn:"+X.U16(60)+" smp:"+X.U16(58)+"/"+smp+" sz:"+outSz(K))}}else if(X.c("'DSm'1A20"))sName="The Loom Syndicate's Dynamic Studio module (.DSM)",bDetected=1,X.isVerbose()&&(sOptionT(X.SA(5,20)),sOptionT(X.SA(25,20),"by: ")) else if(X.c("'DSFmt1'0D0A"))sName="Audio Simulation's DreamStation module (.DSS)",bDetected=1,sVersion="v1.0",X.isVerbose()&&4<=(pt=(pt=X.fSig(0,TOEOF,"F0E40001")+4)<4?X.fSig(0,TOEOF,"F0E40000")+4:pt)&&(pa=X.fSig(pt,TOEOF,"0D0A"),E=X.SA(pt,pa-pt),pa+=2,pc=X.fSig(pa,TOEOF,"0D0A"),p=X.SA(pa,pc-pa),pc+=2,_=X.SA(pc,X.Sz()-pc),sOption(E),sOption(p,"by: "),sOption(_)) else if(X.c("'DS2F0'....'Default'"))sName="Audio Simulation's DreamStation II module (.DS2)",bDetected=1,sVersion="v2",X.isVerbose()&&(ts=X.U8(98),E=X.SA(99,ts),pa=98+ts+1,as=X.U8(pa),p=X.SA(pa+1,as),pc=pa+as+1,cs=X.U8(pc),_=X.SA(pc+1,cs),sOption(E),sOption(p,"by: "),sOption(_)) else if(X.c("'MMU2'00"))sName="Great Valley Products' Digital Sound Studio module (.DSS)",bDetected=1,sVersion="v1-3.0",X.isVerbose()&&(sOptionT(X.SA(10,32)),sOption("ord:"+X.I16(1436,_BE))) else if(X.c("'DTL'00")&&X.c("0000001000",22))sName="Larry Tipton's Drum Traker module (.DTL)",bDetected=1,X.isVerbose()&&sOptionT(X.SA(4,20)) else if(X.c("'D.T.'00"))0<=(sv=["S.Q.","VERS"].indexOf(X.SA(42,4)))&&(sName="Softjee's Digital Tracker module (.DTM)",bDetected=1,X.isVerbose())&&(0==sv?sOptionT(X.SA(22,20)):sOptionT(X.SA(22,24))) else if(X.c("'DeFy DTM'"))sName="DeFy AdLib Tracker module (.DTM)",bDetected=1,sVersion="v"+X.SA(9,3),X.isVerbose()&&(sOptionT(X.SA(13,20)),sOptionT(X.SA(33,20),"by: ")) else if(X.c("'SONG'........'NAME'"))sName="Horst Beham Jr.'s DigiTrekker module (.DTM)",bDetected=1,X.isVerbose()&&sOptionT(X.SA(16,20)) else if(X.c("48E7F1FE610000964CDF7F8F'NuH'E70010610000'$L'DF0800'NuH'E7F1FE610001844CDF7F8F'NuH'E70010610000'NL'DF0800'NuG'FAFFC651EB05',Q'EB05'PQ'EB05'tQ'EB059833FC000F00DFF09633FC00FF00DFF09E33FC000000DFF0A833FC000000DFF0B833FC000000DFF0C833FC000000DFF0D8'NuG'FAFF80177C00010524177C00010548177C0001056C177C00010590'NuG'FAFF'bJ+'00BA670E'S+'00B96608177C000600B9'Nu`'0003180006"))sName="David Whittaker's SFX module (.DW)",bDetected=1 else if(X.c("' PWD'03")&&X.c("'Master'",14))sName="Daniel Werner/ExperimentalScene's DarkWave Studio module (.DWP)",bDetected=1 else if(X.c("'EASO'"))sName="Morten Grouleff's EarAche module (.EA,.EAS)",bDetected=1 else if(X.c("'FORM'.... ....'EMODEMIC'")&&X.c("'PATT'",pt=20+X.U32(16,_BE))&&X.c("'8SMP'",q=pt+8+X.U32(pt+4,_BE))){for(sName="Bo Lincoln's Quadra Composer module (.EMOD)",bDetected=1,sVersion="v"+X.U16(20,_BE),(smp=X.U8(63))&&(smps=[]),K=X.U32(4,_BE)+8,Y=A=0,G=64;Y"===(E=X.SA(22,20))?"":E),smp&&sOptionT(addEllipsis(smps.join(" "),192,160),'smp/msg: "','"'),smps=void 0,sOption("bpm:"+X.U8(62)+" ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(K)))}else if(X.c("'E.M.S. V6.0'..00010000")&&isWithin(X.U8(11),49,54))sName="Sean 'Odie' Connolly's Electronic Music System module (.EMS)",bDetected=1,sVersion="v6."+X.SA(10,2),X.isVerbose()&&(a1=X.U32(14,_BE),a2=X.U32(18,_BE),a3=X.U32(22,_BE),G=lb0=34,G+=a1,lb4=G,G+=a2,lb8=G,G+=a3,insp=G,K=G+X.U32(30,_BE),sOption("sz:"+outSz(K))) else if(X.c("'ENF '....'scor'")){for(sName="Musitek SmartScore Extended Notation Format sheet music (.ENF)",bDetected=1,G=6,staf=brln=0,hkhd="dumm";Gmp&&(mp=ordp),(ptnp=G+X.U16(G+2))>mp&&(mp=ptnp),(smpp=G+X.U16(G+4))>mp&&(mp=smpp),(ornp=G+X.U16(G+6))>mp&&(mp=ornp),(svd=ofs+X.U16(G+6))>mp&&(mp=svd),KX.Sz())return!1 ord=lp=xpos=ptn=0 for(G=ordp;Gptn&&(ptn=o),ord++}if(254mp-ofs&&(mp=ofs+E),E<30)return!1 if(1==k&&mp>X.Sz())return!1 if(notes=-1,GX.Sz()&&!X.isVerbose()){bad+="!short" break}}bad&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose()&&(sOptionT(F),sOptionT(by,"by: "),sOptionT(txt),sOption((1X.U16(47)){if(bDetected=1,nV=X.U8(49),sName="Daniel Potter/Digital Infinity's Farandole Composer module (.FAR)",sVersion="v"+(nV>>4)+"."+(15&nV),ch=X.readBytes(50,16).filter(function(s){return 1==s}).length,X.isVerbose()){for(sOptionT(X.SC(4,40,"CP437")),msgsz=X.U16(96),r=[],Y=0,G=98;Y>3]&1<<(7&Y)&&smp++ for(Y=0;Y>6,smpp=X.U32(32,_BE),smpsz=X.U32(36,_BE),smp=wf=0,sszs=[],G=40,Y=0;Y<10;Y++,G+=6)(E=X.U16(G,_BE)<<1)&&smp++,sszs.push(E) for(Y=10;Y<90;Y++)sszs.push(X.U8(G++)<<1) for(Y=89;10<=Y&&!sszs[Y];Y--);wf=Y-9,sszs=void 0,sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" wf:"+wf+" sz:"+outSz(smpp+smpsz))}}else if(X.c("'FC14'")&&192>6,smpp=X.U32(32,_BE),wfp=X.U32(36,_BE),smp=10,rsmp=msmp=wf=0,sszs=[],G=40,Y=0;Y<10;Y++,G+=6)sszs.push(X.U16(G,_BE)<<1) for(K=0,Y=10;Y<90;Y++)K+=E=X.U8(G++)<<1,sszs.push(E) for(Y=89;10<=Y&&!sszs[Y];Y--);for(wf=Y-9,K+=X.U32(36,_BE),G=smpp,Y=0;Y<10;Y++)if(rsmp++,sszs[Y]&&X.c("'SSMP'")){for(mszs=[],G+=4,msmp++,smp--,rsmp--,l=0;l<20;l++,G+=20)mszs.push(X.U16(G+4,_BE)<<1) for(l=0;l<20;l++)mszs[l]&&rsmp++ smp++}sszs=void 0,mszs=void 0,sOption("ord:"+ord+" ptn:"+ptn+" smp:"+rsmp+(smp!=rsmp?"("+smp+")":"")+(msmp?" ssmp:"+msmp:"")+" wf:"+wf+" sz:"+outSz(K))}}else if(X.c("'FMK!'")&&244==X.U8(60)&&isWithin(X.U8(61),1,2)){if(sName="Sami Wilenius's FM-Kingtracker module (.FMK)",sVersion=[,"v1.00~03","v1.06+"][X.U8(61)],bDetected=1,X.isVerbose()){for(text=!0,Y=0;Y<56;Y++)if(X.U8(Y+4)<32){text=!1 break}text&&(sOptionT(X.SA(4,28)),sOptionT(X.SA(32,28),"by: ")),sOption("ord:"+X.U8(74)+" ptn:"+X.U8(76)+" ins:"+X.U8(75))}}else if(X.c("'FMTracker'....'The FM Tracker!'"))sName="Davey W. Taylor's FM Tracker module (.FMT)",bDetected=1,sVersion="v"+X.U8(9)+"."+X.U8(10),X.isVerbose()&&sOptionT(X.SA(31,32)) else if(X.c("'JSR_FMT~"))sName="Jean-Sebastien 'XorJS' Royer's FM-Tracker module (.FMT)",bDetected=1 else if(X.c("'FMTRK'1A"))sName="Morten Stenshorne/Sagitta Software's FM Tracker module (.FMT)",bDetected=1,X.isVerbose()&&sOptionT(X.SA(16,32)) else if(X.c("000003F3")&&X.U8(20)&&X.c("70FF4E75'F.PLAYER'",32)&&X.I32(64,_BE)){if(sName="Paul van der Valk's Future Player module (.FP)",bDetected=1,X.isVerbose()){for(sOptionT(X.SA(X.I32(44,_BE)+32,256)),k=1,G=72;(E=X.U32(G,_BE))&&k++,G+=8,E;);1=82+32*X.U8(5)+4*X.U8(80)){if(sName="Jörg W.Schmidt/MAXON's Face the Music module (.FTM)",sVersion="v"+X.U8(4),bDetected=1,X.isVerbose()){for(smp=X.U8(5),msr=X.U16(6,_BE),bpm0=(1766278.163/X.U16(8,_BE)).toFixed(0),fl=X.U8(13),fx=X.U8(80),gvol0=X.U8(12),G=82+32*smp,realsmp=0,Y=0;Yptn&&(ptn=pt),G+=2 ptn++,nn=4==v?5:4,songsz=718+smprecs*smpinfosz+ptn*rows*trk*nn,K=songsz+smpsz,statln="trk:"+trk+" ord:"+ord+" ptn:"+ptn+" smp:"+smp+(lp?" lp:"+lp:"")+" sz:"+outSz(K)}else{for(E=X.SA(8,32).trim(),d=X.U16(202,_BE)+"-"+X.U8(201).padStart(2,"0")+"-"+X.U8(200).padStart(2,"0"),_=X.SA(40,160).trim(),tracker=X.SA(204,24),pn=songhk=spd=bpm=ord=lp=mptn=ptn=ins=smp=trk=0,K=-1,xc=[],v<6&&(spd=X.U16(228,_BE),bpm=X.U16(230,_BE));pn"==(e=decEncoding(e,CP437,!0,Chars0to1F)))?"":e}sName="Hudson Entertainment System multitrack tune (.HES)",bDetected=1,sVersion="v"+X.U8(4),startsong=X.U8(5),reqaddr=X.U16(6),dtsz=X.U32(20),dtaddr=X.U32(24),X.isVerbose()&&(E=p=_="",G=64,32<=X.U8(G)&&(sOptionT(fs()),sOptionT(fs(),"by:"),sOptionT(fs())),sOption("from:"+startsong+" sz:"+outSz(dtaddr+dtsz)))}else if(X.c("'GTI5'"))sName="Lasse 'Faust' Öörni's GoatTracker 2 Instrument (.INS)",bDetected=1 else if(X.c("'ISM!V1.2'"))sName="Hans Bergstedt's Sound Invasion Music System/In Stereo! module (.IS)",bDetected=1,sVersion="v"+X.SA(5,3),X.isVerbose()&&sOptionT(X.SA(36,25)) else if(X.c("'IS20DF10STBL'"))sName="Hans Bergstedt's Sound Invasion Music System/In Stereo! module (.IS20)",bDetected=1,sVersion="v2.0" else if(X.c("'IXS!'"))sName="Sahara Surfers' iXalance module (.IXS)",bDetected=1,sVersion="compressed",X.isVerbose()&&(sOptionT(X.SA(24,32)),sOption(outSz(56+X.U32(16)),"sz:")) else if((X.c("'MUSE'DEADBEAF")||X.c("'MUSE'DEADBABE"))&&X.U32(16)+24==X.U32(8))sName="Jazz Jackrabbit 2 container (.J2B)/Galaxy Sound System module",sVersion="compressed",bDetected=1,X.isVerbose()&&sOption("sz:"+X.U32(8)) else if(X.c("'NuJ.FLOGEL'",34))sName="Janko Mrsic-Flogel's module (.JMF)",bDetected=1,X.isVerbose()&&(E=X.SA(84,256),pn=84+E.length+1,p=X.SA(pn,256),pn+=p.length+1,_=X.SA(pn,256),sOptionT(E),sOptionT(p,"by: "),sOptionT(_)) else if(X.c("2B7C.... ........ 2B7C.... ........ 2B7C.... ........ 2B7C.... ........ 303C00FF 32004EB9 ........ 4E75")&&46<=X.I32(2,_BE)){if(sName="Steve Turner's module (.JPO)",bDetected=1,X.isVerbose()){for(ofs=X.U32(2,_BE),p1=G=X.U32(18,_BE)-ofs+46,d1=10;G<=Math.min(X.Sz(),1048576)&&61695!=(E=X.U16(G,_BE));)G+=2,(d0=E)>d1&&(d1=d0) for(0<(K=X.fSig(p1+d1,TOEOF,"FF"))&&K++,G=X.U32(10,_BE)-ofs+46,k=0;G>2)-1,smpsz=X.U32(d0+4,_BE),1>1)+(1&steps),packed=X.readBytes(G,slen),G+=slen,s=_=0;s>4)&&(G++,notes++),2&bits&&G++,4&bits&&(ctl=X.U8(G++),14<=v)&&(bits|=-8&ctl),8&bits&&(G+=2),128&bits&&G++,1&s&&_++ if(maxwt=0,12<=v)for(maxwt=X.U8(G++),Y=0;Y>4,Y+=40,smp=synsmp=smpsz=0,d7=3;d3;d3--,Y+=58)(E=X.U32(Y,_BE))?E>d7&&(d7=E,smpsz+=X.U16(Y+4,_BE)<<1,smp++):synsmp++ steps=X.U32(48,_BE)-X.U32(44,_BE)>>2,K=songsz+smpsz,1X.Sz()){bad+="!short" break}}bad&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose()&&(sOptionT(F),sOptionT(by,"by: "),sOptionT(txt),sOption(outSz(K),"sz:"))}else if(X.c("'SMF2CLIP'"))sName="MIDI Clip File (.midi2)",sVersion="v2.0",bDetected=1 else if(X.c("'MKJamz'"))sName="MK-Jamz module (.MKJ)",bDetected=1 else if(X.c("'MLEDMODL'000000")&&X.c("'VERS'",X.U32(8,_BE)+12)){for(sName="Musicline Editor module (.ML)",bDetected=1,G=4,_=E="",ch=smp=ins=ptn=k=0;G>8)+"."+((240&v)>>4)+(15&v) break case"TUNE":for(k++,E=E.appendS(X.SC(G,hksz,"CP1252").trim(),"; "),tmp0=X.U16(G+32,_BE),spd0=X.U8(G+34,_BE),groove=X.U8(G+35,_BE),ch=X.U8(G+39),chsz=0,hksz=40,Y=0;Y=(K=X.U32(4,_BE)+8)){if(sName="Multi-track Container module (.MTC)",bDetected=1,X.isVerbose()){for(name=auth=_="",G=8,k=0;G>4)+"."+(15&v),X.isVerbose()){for(sOptionT(X.SA(4,20)),trk=X.U16(24),ptn=X.U8(26),ord=X.U8(27)+1,csz=X.U16(28),nos=X.U8(30),bpt=X.U8(32),smpsz=0,Y=88;Y<88+37*nos;Y+=37)smpsz+=X.U32(Y) pxc=194+37*nos+192*trk+32*(ptn+1)*2,_=X.SA(pxc,csz),K=pxc+csz+smpsz,_.length"),sOptionT(_),sOption("trk:"+(trk+1)+" ord:"+(ord+1)+" ptn:"+(ptn+1)+" smp:"+nos+" sz:"+outSz(K))}}else if(X.c("'MT20'")&&388<=X.Sz()&&2==X.U8(9)&&X.U16(112)<64&&X.U16(106)<=256){for(sName="MadTracker 2 module (.MT2)",nV=X.U8(8),bDetected=1,sVersion="v"+X.U8(9)+"."+nV.toString(16).padStart(2,"0"),bad="",ord=X.U16(106),loop=X.U16(108),ptn=X.U16(110),trk=X.U16(112),flags=X.U32(118),ins=X.U16(122),smp=X.U16(124),hasdrums=0!=X.U16(382),dptn=hasdrums?X.U16(384):0,G=388+(hasdrums?274:0),addp=G+X.U32(G-4),r="",vst2=0,igskip=0,smpszs=[],insszs=[],inss=[],smps=[],extsmp=[];Gaddp)bad=bad.addIfNone("!badaddsz") else if(G>X.Sz())bad=bad.addIfNone("!short") else{for(Y=0;Y>=1)<0&&(fl=-fl)}if(G>X.Sz())bad=bad.addIfNone("!short") else for(Y=0;Y<255;Y++)!r&&inss.length<3&&""!=(E=X.SC(G,32,"CP1252")).trim()&&inss.push(E),32==(dtlen=X.U32(G+32))&&(dtlen+=396),1X.Sz())bad=bad.addIfNone("!short") else{for(Y=0;Y<256;Y++)r||(E=X.SA(G,32),YX.Sz())bad=bad.addIfNone("!short") else for(Y=0;Y=X.U16(6))sName="idSoft's DOOM music module (.MUS)",bDetected=1,X.isVerbose()&&sOption(outSz(X.U16(4)),"sz:") else if(X.c("'MXM'00")&&isWithin(X.U32(4),1,256)&&X.U32(8)=hksz?-1:X.I32(pn+4*Y,_LE))<0&&(curtime=12e4),playtime+=curtime/1e3 break case"auth":apn=0,g=X.SC(pn,256,"UTF8"),apn+=g.length+1,p=X.SC(pn+apn,256,"UTF8"),apn+=p.length+1,_=X.SC(pn+apn,256,"UTF8"),apn+=_.length+1,_+=", rip: "+X.SC(pn+apn,256,"UTF8") break case"taut":if(X.isDeepScan())for(apn=0;apnk&&(k=d3,ord=d6),(X.c("2000",12)||X.c("FE",14))&&(k=7),d1=256,Gptn&&(ptn=E),G+=4 if(G>1 break case"PAOR":tracker=X.SC(G,hksz,"CP850") break case"END ":end=1}if(G+=hksz,end)break}""!=bad&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose()&&(sOptionT(F),sOption(tracker,"in: "),sOption("trk:"+trk+" ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(X.U32(4)+8)))}else if(X.c("'PLM'1A..10")&&isWithin(ch=X.U8(54),1,32)&&X.Sz()>=4*((smp=X.U8(92))+(ptn=X.U8(93))+(ord=X.U16(94,_LE)))&&firstNotOf(60,32,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])<0){for(sName="Alex 'Statix' Evans' Disorder Tracker 2 module (.PLM)",bDetected=1,G=X.U8(4),ofs=rsmp=0,rptn=[],ptns=[],smps=[],mp=[0,"unk"],bad="",Y=0;Ymp[0]&&(mp=[E,"ptn"]),(E=X.SC(E+7,25,"CP437").trim()).length&&ptns.push(E) for(Y=0;Ymp[0]&&(mp=[E,"smp"]),E&&(X.c("'PLS'1A",E)||(bad=bad.addIfNone("!badsmpsig:"+X.SA(E,4))),isWithin(X.I8(E+50),-1,15)||(bad=bad.addIfNone("!badsmppan")),64X.Sz()&&(bad=bad.addIfNone("!short")),K=Math.max(mp[0],G),mp[1]){case"ptn":K=mp[0]+X.U32(mp[0],_LE) break case"smp":K=mp[0]+X.U8(mp[0]+4)+X.U32(mp[0]+67,_LE)}bad.length&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose()&&(sOptionT(X.SC(6,48,"CP437")),sOption(addEllipsis(smps.filter(funSampleName).join(" "),224),'smp/msg:"','"'),sOption("ch:"+X.U8(54)+" bpm0:"+X.U8(58)+" spd0:"+X.U8(59)+" ord:"+ord+" ptn:"+(rptn!=ptn?rptn+"/":"")+ptn+" smp:"+(rsmp!=smp?rsmp+"/":"")+smp+" sz:"+outSz(K)))}else if(X.c("'PLX'")&&X.U8(3)<=2&&X.U8(4)&&X.U16(7)>3)&&sOption(k,"×"),d3=X.U32(44,_BE),d0=X.U32(48,_BE),ins=d3-d2>>6,d3=ins,synsmp=0,smp=0,B=0,d7=3;d3;)(ts=X.U32(d2,_BE))?ts>10,sOption("ptn:"+ptn+" ins:"+ins+" smp:"+smp+" syn.smp:"+synsmp+" songsz:"+songsz+" sz:"+outSz(K))}}else if(X.c("'PSF'")){if(0<(nV=X.U8(3))){switch(bDetected=1,sName="Neil Corlett's Portable Sound Format module (.",nV){case 1:sName+="PSF,.PSF1,.MINIPSF,.MINIPSF1)",sVersion="Playstation" break case 2:case 3:sName+="PSF2,.MINIPSF2)",sVersion="Playstation 2" break case 17:sName+="SSF,.MINISSF)",sVersion="Saturn" break case 18:sName+="DSF,.MINIDSF)",sVersion="Dreamcast" break case 33:sName+="USF,.MINIUSF)",sVersion="Ultra64" break case 34:sName+="GSF,.MINIGSF)",sVersion="Gameboy" break case 35:sName+="SNSF,.MINISNSF)",sVersion="Super Nintendo" break case 36:sName+="2SF,.MINI2SF)",sVersion="Nintendo DS" break case 37:sName+="NCSF,.MININCSF)",sVersion="Nintendo DS Nitro Sound" break case 65:sName+="QSF,.MINIQSF)",sVersion="Capcom Q-Sound" break default:sName+="*SF,.MINI*SF)",sVersion="unk.console"}if(sVersion="v"+Hex(nV)+" "+sVersion,X.isVerbose())if(ptags=X.U32(8,_LE)+21,sig2=!1,(sig2=21X.Sz())bad=bad.addIfNone("!short") else for(Y=0;Y<255&&GX.Sz())bad=bad.addIfNone("!short") else for(Y=0;Y<256;Y++)(E=X.U8(G++))&&(""!=(E=X.SC(G,128,"CP1252").trim())&&vsts.push(E),G+=128,E=X.I32(G),G+=4+4*E) for(m=[],Y=0;Y<128;Y++)(E=X.U8(G++))&&mach++,m[Y]=E E=oldt=0 for(Y=0;Y<128;Y++)if(m[Y]){for(E=X.I32(G+8),G+=12,tn=X.SA(8===E?G+256:G,16),tpn=8===E?X.SA(G,256):"",ts=tn+tpn,nonascii=!1,q=0;qX.Sz()&&(bad=bad.addIfNone("!short")),(G+=1275)>X.Sz()&&(bad=bad.addIfNone("!noP0")),(G+=64)>X.Sz()&&(bad=bad.addIfNone("!noP1")),Gj+maxdesc&&(i=j+maxdesc,cutoff=!0),tmp=X.readBytes(j,i-j),Y=0;desc.lengthX.Sz());)ins++,16==nV?G+=11:33==nV?(nmlen=X.U8(G++),insns.push(X.SA(G,nmlen)),G+=nmlen,rm=X.U8(G),riff=128&rm,(midi=7==(7&rm))?G+=7:G+=24,riff&&(G+=X.U16(G)+2)):bad=bad.addIfNone("!badver") if(ord=X.U8(G++),G+=ord,(!ord||128X.Sz()&&(bad=bad.addIfNone("!short")) if(mptn)for(G=mptn,end=!1;!end&&G>1,tagdata=!1,E=p=d="",next=0,Y=0;Y>> Chunk Start <<<'00",9)){if(sName="Eduard Müller's Renoise module (.RNS)",bDetected=1,sV=X.SA(3,4),sVersion="v"+sV,sV<"05"?sVersion+="/RN<1.1.1":"05"===sV?sVersion+="/RN1.1.1":sV<"015"?sVersion+="/RN<1.2.7":"015"===sV?sVersion+="/RN1.2.7":sV<"018"?sVersion+="/RN<1.5.2":"018"===sV?sVersion+="/RN1.5.2":sVersion+="/RN>1.5.2",X.isVerbose())for(G=9;G>> Chunk Start <<<'00",G);){if(G+=20,X.c("'Header V00 '00",G)){sOptionT(X.SC(G+20,20,"CP1252")),sOptionT(X.SC(G+40,20,"CP1252"),"by: "),sOptionT(X.SC(G+60,20,"CP1252"),"style: ") break}if(X.c("'Header V01 '00",G)){G+=20,K=X.U32(G),sOptionT(X.SC(G+4,K,"CP1252")),G+=K+4,K=X.U32(G),sOptionT(X.SC(G+4,K,"CP1252"),"by: "),G+=K+4,K=X.U32(G),sOptionT(X.SC(G+4,K,"CP1252"),"style: ") break}if(X.c("Header V02 '00",G)){G+=20,K=X.U32(G),sOptionT(X.SC(G+4,K,"CP1252")),G+=K+4,K=X.U32(G),sOptionT(X.SC(G+4,K,"CP1252"),"by: "),G+=K+4,K=X.U32(G),sOptionT(X.SC(G+4,K,"CP1252"),"style: "),G+=K+4+5,K=X.U32(G),sOptionT(X.SC(G+4,K,"CP1252")) break}if(-1==(G=X.fSig(G+1,TOEOF,"''>>> Chunk End <<<'00")))break G+=20}}else if(extIs("xrns")&&X.c("'PK'0304"))sName="Eduard Müller's Renoise module (.XRNS)",sType="~audio",sVersion="xml",bDetected=1 else if(extIs("xrdp")&&0<=X.fStr(0,256,"X.Sz()||X.U32(24)>X.Sz())&&(bad+="!short"),X.U32(16)>X.Sz()-7&&(bad+="!badmetadata"),bad.length&&(sVersion+="/malformed"+bad),X.isVerbose())switch(p=_=s=g=ti=y="",nv){case 0:case 1:case 2:0<(G=X.U32(16))&&sOptionT(X.SC(G,64,"Shift_JIS").replace("\\","¥")),(pk=X.U32(12))&&(sVersion+=" compressed",sOption("Please send this file over Telegram to @kaens, the detection author! It's unique and needs research")) break case 3:if(6<(ptags=X.U32(16))&&X.c("'[S98]'",ptags)){for(ptags+=5,bUTF8=X.c("EFBBBF",ptags),tags=bUTF8?X.SC(ptags,512,"UTF8"):X.SC(ptags,512,"Shift_JIS"),tagl=tags.split("\n"),Y=0;Y"'!=tagr&&(E=tagr.substr(1,tagr.length-2)) break case"AUTHOR":'""'!=tagr&&(p=tagr.substr(1,tagr.length-2)) break case"DATE":'""'!=tagr&&(dt=tagr.substr(1,tagr.length-2)) break case"TYPE":sVersion="t."+tagr break case"TIME":tm=tagr}bad&&(sVersion+="/malformed"),sOption(E),sOption(p,"by: "),sOption(dt,"'"),sOption(tm,"len: "),E=parseAtariBinary(G+2),sOption(E[1].length,"binblks:"),sOption(outSz(E[0]),"sz:")}}else if(X.c("'SC68 Music-file / (c) (BeN)jamin Gerard / SasHipA-Dev '00'SC68'........'SCFN'")){if(sName="SC 68000 programmatic chiptune (.SC68)",bDetected=1,X.isVerbose()){for(hdrl=X.SA(0,256).length+1,G=hdrl,cp=p=E="",P="",df=-1,k=0,ef=!1,mn=[];Gk&&(bad=bad.addIfNone("!badstartsong")),dataOfs=X.U16(6,_BE),(1==v2&&118!=dataOfs||2==v2&&124!=dataOfs)&&(bad=bad.addIfNone("!baddatap")),loadAddr=X.U16(8,_BE),"R"==v1&&isWithin(loadAddr,1,2023)&&(bad=bad.addIfNone("!badloadp")),initAddr=X.U16(10,_BE),"R"!=v1||isWithinRanges(initAddr,[[2024,40959],[49152,53247]])||(bad=bad.addIfNone("!badinitp")),flags=X.U16(118,_BE),"R"==v1&&flags>>1&1&&0>1:(!(3<=v2)||1&(a2=X.U8(122))||isWithinRanges(a2,[[0,65],[128,223]])||sidn++,!(4<=v2)||1&(a3=X.U8(123))||a2==a3||isWithinRanges(a3,[[0,65],[128,223]])||sidn++) var W=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] switch(flags>>4&3){case 1:W[0]=1 break case 2:W[0]=2 break case 3:W[0]=3}if(3<=v2)switch(flags>>6&3){case 1:W[1]=1 break case 2:W[1]=2 break case 3:W[1]=3 break default:W[1]=W[0]}if(78==v2)for(Y=2,q=124;Y>4&3){case 1:W[Y]=1 break case 2:W[Y]=2 break case 3:W[Y]=3 break default:W[Y]=W[0]}else if(4<=v2)switch(flags>>8&3){case 1:W[2]=1 break case 2:W[2]=2 break case 3:W[2]=3 break default:W[2]=W[0]}for(1>2){case 1:sVersion+="/PAL" break case 2:sVersion+="/NTSC" break case 3:sVersion+="/PAL&NTSC"}0"==(E=X.SC(22,32,"CP1252"))&&(E=""),sOptionT(E),""==(p=X.SC(54,32,"CP1252"))&&(p=""),sOptionT(p,"by: "),""==(_=X.SC(86,32,"CP1252"))&&(_=""),sOptionT(_))}else if(X.c("00 FF00FF00 9100FF00 FF008000 92..00967F 01",7)&&X.c("9908",5442))sName="Tony 'Nissimo' Willams' Sound Images module (.SIG)",sVersion="gen.2",bDetected=1 else if(X.c("0100FEFF09000000'ALIM3'"))sName="Ruben Ramos 'baktery' Salvador's Skale Tracker module (.SKM)",bDetected=1,X.isVerbose()&&sOptionT(X.SA(25)) else if(X.c("'mptn&&(mptn=E+1) ordc++,ords.push(q),G++}for(ch=3,ordc==6*k?(sVersion+=" stereo",ch=6):ordc!=3*k&&(bad=bad.addIfNone("!badordcnt")),bad.length&&(sVersion=sVersion.appendS("malformed"+bad,"/")),ins=2<=nV?X.U8(G++):31,inss=[],Y=0;Y>1) for(Y=0;Y<(1==nV?0:2==nV?3:4);Y++)G+=1+2*X.U8(G) for(ptn=X.U8(G++),Y=0;YX.Sz()&&(sVersion+="malformed"),X.isVerbose()&&(start=X.U16(6,_LE),loop=X.U16(8,_LE),delay=X.U16(10,_LE),sOption("len:"+Hex(len)+" start:"+Hex(start)+" loop:"+Hex(loop)+" delay:"+delay)) else if(X.c("'RJP'3.'SMOD'"))sName="Richard Joseph's module (.SNG)",bDetected=1,sVersion="v"+X.SA(3,1) else if(X.c("'SYNC'")||X.c("'SYNB'"))sName="Synder SNG-player module (.SNG)",bDetected=1,sVersion="ver."+X.SA(3,1),X.isVerbose()&&sOption(X.SA(16,512)) else if(X.c("'SYND'....'S0'"))sName="Synder Tracker module (.SNG)",bDetected=1,sVersion="ver."+X.SA(3,1) else if(X.c("'SYND'")||X.c("'SYNF'")||X.c("'SYNH'"))sName="Synder SNG-player Stereo module (.SNG)",bDetected=1,sVersion="ver."+X.SA(3,1),X.isVerbose()&&sOption(X.SA(16,512)) else if(isWithin(E=(X.U8(0)+1<<4)+(X.U8(1)+1<<7)+869,870,X.Sz())&&(/df\d:/.test(X.SA(E,4))||/[sS]amples/.test(X.SA(E,7)))){if(sName="AJ [Activas]'s ZoundMonitor module (.SNG + Samples/)",bDetected=1,X.isVerbose()){for(ptn=X.U8(1)+1,ord=X.U8(3)+1,spd=X.U8(4),G=5,smp=0;G<815;G+=54)X.U8(G+4)&&smp++ sOption("spd:"+spd+" ord:"+ord+" ptn:"+ptn+" smp:"+smp+" len "+secondsToTimeStr(1+Util.divu64(spd*ord*32,50))+" sz:"+outSz(E+101))}}else if(X.c("'RJP'3. 0000 0000"))sName="Richard Joseph's module instruments (.INS)",bDetected=1,sVersion="v"+X.SA(3,1) else if(X.c("'SNES-SPC700 Sound File Data'")){if(sName="Nintendo SNES SPC chiptune (.SPC)",bDetected=1,sVersion="v0."+X.U8(36),X.isVerbose()){if(id666inhdr=26==X.U8(35),g=_=p=E="",dumper="",emu="",preferBin=!1,id666inhdr){switch(E=X.SA(46,32),g=X.SA(78,32),dumper=X.SA(110,16),dumpdate=X.SA(158,11),48<=(emu=X.U8(210))&&emu<=57&&(emu-=48),emu){case 1:emu="ZSNES" break case 2:emu="Snes9x" break case 3:emu="ZST2SPC" break case 4:emu="ETC" break case 5:emu="SNEShout" break case 6:emu="ZSNESW" break default:emu=""}_=X.SA(126,32),slen=X.SA(169,3),lp=X.SA(172,4),(slen+lp+dumpdate).length<5?(chnDis=X.U8(209),bin=1==chnDis&&""==emu||preferBin):p=/[0-9/]*/.test(slen+lp+dumpdate)?(songlen=Number(slen),X.SA(177,32)):(bin=!0,songlen=X.U8(169)<<16+X.U8(170)<<8+X.U8(171),X.SA(176,32))}else E=X.SA(48,20) sOption(E),sOption(g,"for: "),sOption(p,"by: "),sOption(_),""!=emu&&(sVersion+=" "+emu)}}else if(X.c("'STK1.0SONG'")&&0<=[1,2,3].indexOf(X.U8(52))&&X.U8(53)<=X.U8(58)&&X.U8(54)<=X.U8(53)&&X.U8(56)<=63&&X.U8(57)<=5){switch(sName="Julien 'Targhan' Nevo's STarKos module (.SKS)",bDetected=1,bad="",X.U8(57)){case 0:hz=13 break case 1:hz=25 break case 2:hz=50 break case 3:hz=100 break case 4:hz=150 break case 5:hz=300 break default:hz=0,bad=bad.addIfNone("!badRepFreq")}for("-"!=(xpos=X.I8(55).toString())[0]&&(xpos="+"+xpos),spd0=X.U8(56),ord=1+X.U16(58),ptn=-1,rows=ptnxpos=0,G=60,Y=0;Y<4*ord;Y++)Y%4==3?rows+=X.U8(G)+1:(E=X.U8(G),ptn>1&&ptnxpos++),G+=2 ptn++,insns=[] for(ins=0;GX.Sz()?bad.addIfNone("!short"):bad)&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose()&&(sOptionT(X.SA(20,32)),sOptionT(X.SA(10,10),"by: "),sOption("spd0:"+spd0+("+0"!=xpos?" xpos:"+xpos:"")+" ord:"+ord+" ptn:"+ptn+"+"+sptn+" ins:"+ins+(ptnxpos?" ptn.xpos:"+ptnxpos:"")+" smp.ch:"+X.U8(52)+" rep.freq:"+hz+"Hz loop:"+(X.U8(54)?Hex(X.U8(54))+"-":"")+Hex(X.U8(53))+(X.isDeepScan()?" notes:"+notecnt:" rows:"+rows)+" sz:"+G))}else if(!X.U8(0)&&X.c("'SK10'",128)&&0<=[1,2,3].indexOf(X.U8(134))&&0<=[13,25,50,100,150,300].indexOf(X.U16(135))&&X.U16(24)==X.U16(64)){for(sName="STarKos module (.BIN)",sVersion="compiled/ofs:80h",bDetected=1,crc=0,Y=0;Y<67;Y++)crc+=X.U8(Y);(crc&=65535)!=X.U16(67)&&(sVersion+="/malformed!badCRC"),X.isVerbose()&&(sOption(X.SA(1,8).trim()+"."+X.SA(9,3).trim()),sOption(X.U16(135)+"Hz"),sOption(Hex(X.U16(132)),"base:"),sOption(outSz(X.U24(64)+188),"sz:"))}else X.c("'Nu!SOPROL!'",34)&&(sName="Holger Gehrmann's Sound Programming Language/SOPROL module (.SPL)",bDetected=1,X.isVerbose())&&(E=X.SA(88,256),p=X.SA(88+E.length+1,256),_=X.SA(88+E.length+p.length+2,256),sOptionT(E),sOptionT(p,"by: "),sOptionT(_)) if(/SPM[\x01-\x02]/.test(X.SA(0,4))&&(sName="Emmanuel Marty & Michael Lavaire's Stonetracker module (.SPM)",sVersion="v"+X.U8(3),bDetected=1,X.isVerbose())&&sOptionT(decAnsi(4,32,CPAmiga)),/SPS[\x01-\x02]{2}/.test(X.SA(0,5))&&X.c("'psn'",6+32*(smp=X.U8(5)))){if(sName="Emmanuel Marty & Michael Lavaire's Stonetracker sample bank (.SPS)",sVersion="v"+X.U8(3),bDetected=1,X.isVerbose()){for(Y=smpsz=0,smps=[];Y>8*Y&255 sVersion+="v"+aV.join(".") break case"BVER":if((nB=X.U32(G,_LE))!=nV){for(aV=[],Y=0;Y<4;Y++)aV[3-Y]=nB>>8*Y&255 sVersion+="/v"+aV.join(".")}break case"NAME":E=X.SA(G,hksz) break case"BPM ":bpm=X.U32(G,_LE) break case"SPED":spd=X.U32(G,_LE) break case"TIME":tme=X.U32(G,_LE) break case"SNAM":blk++ break case"PDTA":ptn++}G+=hksz}sOptionT(E),0maxlen&&(unplen=maxlen),done=!1,ofs=0,left=unplen;!done&&o=j?(E+=X.SA(G+o,j),o+=j,left-=j):done=!0 break case 1:if(j=X.U8(G+o),o++,dw=X.SA(G+o,4),o+=4,left>=4*j&&o=4*j&&o=j?left-=j:done=!0 break case-1:done=!0 break default:sVersion+="/malformed",done=!0}}else F=X.SC(G+o,hksz,"CP1252") break case-1:ch=X.I32(G,_BE) break case-2:1024<(len=X.I32(G,_BE))&&(len="malformed") break case-3:case-4:case-5:break case-7:extsmp=!0 break case 10:case 11:case 12:pro=!0 break case-6:bpm=Math.round(1.24*Math.min(X.I32(G,_BE),800)) break case-12:hksz=0 break case-10:case-11:case-13:case-14:case-15:case-17:case-18:case-19:case-20:case-21:hksz+=X.I32(G,_BE) break default:_l2r("symmod",G,hkhd+"/"+hkhx+" ("+Hex(hksz,8)+"): ?!?!?!?!?!")}G+=hksz}sOption(F),sOption("ch:"+ch+" bpm:"+bpm+" len:"+len+(done?"sz:"+outSz(G):"")),extsmp&&sOption("extsmp"),pro&&(sVersion+="/Pro")}}else if(X.c("'Synth'")&&!X.c("'esi'",5))sName="C. 'Mr Soundwave' Herbst & B. MIkic/BrainTrace Design's Synthesis module (.SYN)",bDetected=1,X.c("'Synth'",7950)?(sVersion="v"+X.SA(7955,3),X.isVerbose()&&(sOptionT(X.SA(7986,27)),sOptionT(X.SA(8014,256)))):(sVersion="v"+X.SA(5,3),X.isVerbose()&&(sOptionT(X.SA(36,27)),sOptionT(X.SA(64,256)))) else if(X.c("'SYNTRACKER-SONG:'00"))sName="Bastian 'flink'/'twiCe' Spiegel's SynTracker module (.SYNMOD)",bDetected=1,X.isVerbose()&&(t1=X.SC(20,32,"CP1252"),sOptionT(t1,"title/inst: "),t2=X.SC(52,32,"CP1252"),sOptionT(t2),t3=X.SC(84,32,"CP1252"),sOptionT(t3)) else if(X.c("'T0AST'")){function a(){if(1==nV)G=474 else{if(2!=nV)return G=842}if(drummode=X.U8(G++),chipmode=X.U8(G++),chs=X.U8(G++),ch=0,16>7&15)).padStart(2,"0")+"-"+(d1>>11&31).padStart(2,"0"),d2="20"+(127&d2).padStart(2,"0")+"-"+(1+(d2>>7&15)).padStart(2,"0")+"-"+(d2>>11&31).padStart(2,"0"),auth=decEncoding(k.slice(19,82),CP1251),F=decEncoding(k.slice(83,148),CP1251),cmt=decEncoding(k.slice(147,532),CP1251),Y=ptn=0;Yptn&&(ptn=k[Y+531]+1);(K=2244057==n?G:-1)<0&&(sVersion=sVersion.appendS("malformed:"+Hex(n),"/")),sOptionT(F),sOptionT(auth,"by: "),sOptionT(cmt),sOption("on: "+d1+(d1!=d2?" to "+d2:"")),sOption("spd:"+spd1+"/"+spd2+" ord:"+(lp?lp+"-":"")+ord+" ptn:"+ptn+" intlv:"+intlv+" saves:"+saves+(X.isDeepScan()?" sz:"+outSz(K):""))}}else if(902<=X.Sz()&&isWithin(X.U8(37),1,4)&&0<(bin=parseAtariBinary())[0]&&X.c("0E158D",6)&&X.c("8D150E",26)&&X.U16(29)==bin[1][0][1]&&(X.c("'TMC SONG FILE 2.0'",9)||X.c("D4CDC3A0 D3CFCEC7A0 C6C9CCC5A0 B2AEB0",9))){for(sName="Marcin 'Jaskier' Lewandowski's Theta Music Composer (.TM2)",sVersion="v2.0",bDetected=1,bad="",ins=0,p0=65536,G=134;G<262&&!((E=(X.U8(G+640)<<8|X.U8(G))-X.U16(2)+6)<0);G++)0E&&(p0=E),255!=X.U8(E)&&ins++):bad=bad.addIfNone("!badinsp")) for(ptn=0,G=262;G<518&&!((E=(X.U8(G+256)<<8|X.U8(G))-X.U16(2)+6)<0);G++)0E&&(p0=E),255!=X.U8(E)&&ptn++):bad=bad.addIfNone("!badptnp")) for(ord=(p0-902)/17,G=902,pt=-1;G=pt&&(pt=X.U8(q)+1) if(isWithin(X.U8(G+16),65,127)&&(bad=bad.addIfNone("!badord")),X.I8(G+16)<=0)break}if(bad.length&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose()){for(G=38,E="";G<134;G+=32)E=E.appendS(decAnsi(G,32,CPATASCII,0,Chars0to1FATASCII).trim()," | ") sOption(E),E=(E=X.U8(31))?isWithin(E,1,63)?"stereo":isWithin(E,64,127)?"RMT stereo":"quadro":"mono",sOption("ch:"+E+" spd0:"+X.U8(36)+" ticks:"+X.U8(37)+" ord:"+ord+" ptn:"+ptn+(pt!=ptn?"/"+pt:"")+" ins:"+ins+" sz:"+outSz(bin[0]))}}else if(X.c("0000050F0000050F0000050F0000050F0000050F0000050F0000050F0000050F0000050F0000050F0000050F0000050F",20)&&X.c("FFFF001000000030000000",385))sName="N.J. Luuring Jr.'s The Musical Enlightenment module (.TME)",bDetected=1 else if(12288<=X.Sz()&&X.c("'TRK01/TV.ES.'")){if(sName="Adam Davidson & Ramjet & Toxic Volume's RamTracker module (.TRK)",bDetected=1,X.isVerbose()){for(sOptionT(X.SC(15,32,"CP850")),sOptionT(X.SC(47,32,"CP850"),"by: "),G=1107,ptn=-1,ord=0;!(254<=(E=X.U8(G++))||G>X.Sz());)ord++,ptn>bw+1,G=8;Gmptn&&(mptn=E) if(G+=2,E=0,1==bw)for(;55537!=X.U16(G,_BE)&&GE&&(E=q),(q=X.U8(G++))>E&&(E=q) else for(;55537!=(q=X.U16(G,_BE))&&GE&&(E=q) ptnp=G,ptn=G-pp-2>>bw+5,K=G+=2+(E+1<<2),G=o=k=0,a2=pp+2 s:for(;G32*X.U8(47)+80){for(sName="Marc 'MAS' Schallehn's UltraTracker module (.ULT)",bDetected=1,nV=X.U8(14)-48,sVersion="v"+["<1.4","1.4","1.5","1.6"][nV-1],bad="",msgn=X.U8(47),G=48+32*msgn,smp=X.U8(G++),smpsz=0,smps=[],Y=0;YX.Sz()&&(bad=bad.addIfNone("!short")),K=G+smpsz,""!=bad&&(sVersion=sVersion.appendS("/malformed"+bad,"/")),X.isVerbose()){for(sOptionT(X.SC(15,32,"CP437")),specialmsg=23==msgn&&297221==K&&7==ch&&20==ord&&29==ptn&&17==smp&&1572==notes,G=48,Y=0,r=[];Yptn&&(ptn=E+1) d1="20"+(127&d1).padStart(2,"0")+"-"+(1+(d1>>7&15)).padStart(2,"0")+"-"+(d1>>11&31).padStart(2,"0"),d2="20"+(127&d2).padStart(2,"0")+"-"+(1+(d2>>7&15)).padStart(2,"0")+"-"+(d2>>11&31).padStart(2,"0")}else d1=d2=spd1=spd2=intlv=saves="?",lp=0 auth=decEncoding(k.slice(39,103),CP1251),F=decEncoding(k.slice(103,167),CP1251),cmt=decEncoding(k.slice(167,551),CP1251),K=7231953==n?G:-1,sOptionT(F),sOptionT(auth,"by: "),sOptionT(cmt),sOption("on: "+d1+(d1!=d2?" to "+d2:"")),sOption("spd:"+spd1+"/"+spd2+" ord:"+(lp?lp+"-":"")+ord+" ptn:"+ptn+" intlv:"+intlv+" saves:"+saves+" sz:"+outSz(K))}}else if(X.c("'Vgm '")&&X.Sz()>=(eof=X.U32(4)+4)&&(nV=X.U32(8))&&nV<768&&(!X.U32(20)||X.c("'Gd3 '",X.U32(20)+20))){if(bDetected=1,bad="",nV=1e3*(nV>>12)+100*(nV>>8&15)+10*(nV>>4&15)+(15&nV),sName="Video Game Music chiptune stream (.VGM)",eoh=X.U32(52)+52,(nV<150||52==eoh)&&(eoh=64),150<=nV&&eoh<64&&(bad="!dataofs"),sVersion="v"+(nV/100).toFixed(2),X.isVerbose()){if(tags=[],20<(gd3p=X.U32(20,_LE)+20)&&"Gd3 "===X.SA(gd3p,4)){for(sVersion+="/Gd3 v"+X.readBytes(gd3p+4,4).join("")/100,taglen=X.U32(gd3p+8,_LE),(gd3p+=12)+taglen>X.Sz()&&(bad=bad.addIfNone("!tagsz")),Y=0;Y<11&&gd3p<=X.Sz();)0<=(tpos=X.fSig(gd3p,TOEOF,"0000"))?(tags[Y]=X.SU16(gd3p,taglen),gd3p+=2*tags[Y].length+2):(tags[Y]="",gd3p+=2),Y++ Y<11?bad=bad.addIfNone("!tagnum"):tagn=Math.max(0,Y-1),sOption(slashTag(tags[0],tags[1])),sOption(slashTag(tags[6],tags[7]),"by: "),sOption(slashTag(tags[2],tags[3]),"for: "),sOption(slashTag(tags[4],tags[5]),"on: "),sOption(tags[8],"date: "),sOption(tags[9],"ripper: "),sOption(tags[10],"notes: ")}for((smp=X.U32(24))||(bad=bad.addIfNone("!badlen")),lp=X.U32(28)+28,lpsmp=X.U32(32),(lp>=eof||lpsmp>smp)&&(lp=0,bad=bad.addIfNone("!badloop")),rate=X.U32(36),100=eoh||xhdr&&chips[Y][0]>xhdr);Y++)if(clk=X.U32(chips[Y][0]),b30=Util.shru64(clk,30),b31=b30>>1,b30&=1,clk&=1073741823,!(nVX.Sz()){bad=bad.addIfNone("!short") break}if(ihdsz=(ihdsz=X.U32(G))||263,instp=X.U8(G+26),(inst=X.SC(G+4,22,"CP437").trim()).length&&insns.push(inst),smpn=X.U16(G+27),smphdsz=X.U32(G+29),1==madewith?(madewith|=16,245==ihdsz?(mVlsw="1.00.00.A5",tracker="ModPlug Tracker 1.0 alpha"):263==ihdsz?(mVlsw="1.00.00.B3",tracker="ModPlug Tracker 1.0 beta"):madewith=16):smpn||(263==ihdsz&&!smphdsz&&2&madewith?madewith|=16:29!=ihdsz&&512&madewith?madewith&=-513:160&madewith&&33!=ihdsz&&(madewith=0),33!=ihdsz?madewith&=~J:40X.Sz()){bad=bad.addIfNone("!short") break}260<=V&&(sflags=[]) var Us=0 if(smpn){for(anyInsSmp=!0,midichecks&&(madewith&=-260),263==ihdsz&&!instp||(madewith&=~J),16&madewith||!(madewith&J)||(4&vef||255!=vls||255!=vle)&&(4&pef||255!=pls||255!=ple)||(madewith=-3&madewith|16),l=0;l>1):slen,G+=40,160&madewith&&258&madewith&&!(16&madewith)&&(22<$||C.slice($).indexOf(" ")<0)&&(madewith=-33&madewith|144),3==(3&I)&&2&madewith&&(madewith|=4)}smpsz+=Us,260<=V&&(X.c("'OggS'",G)&&(isOXM=!0),G+=Us)}}if(!smpReserved&&2&madewith&&-1>8)+"."+(255&V)+bad+(anyADPCM?"/ADPCMpacked":"")}else if(X.c("'FORM' 0000000E 'XDIRINFO' 00000002 .... 'CAT ' ........ 'XMIDFORM' ........ 'XMID'"))bDetected=1,sName="Extended MIDI chiptune (.XMI,.C55,.PCS)",X.isVerbose()&&(1<(k=X.U8(20))&&sOption(k,"×"),sOption(outSz(30+X.U32(26,_BE)),"sz:")) else if(X.c("'ofTAZ!'"))sName="Davey W. Taylor's Extra Simple Music module (.XSM)",bDetected=1 else if(/YM\d!/.test(X.SA(0,4))||X.c("'YM3b!'")||/YMT\dLeOnArD!/.test(X.SA(0,12))||X.c("'MIX1LeOnArD!'")){switch(bDetected=1,bad="",frm=smp=voc=loop=ddn=0,sName="ST-Sound chiptune stream (.YM)",sV=X.SA(0,4).replace(/!/g,"")){case"YM1":sVersion="YM1" break case"YM2":sVersion="MADMAX specific" break case"YM3":sVersion="YM-Atari" break case"YM3b":sVersion="YM-Atari+loopinfo",loop=X.U32(X.Sz()-4,_LE) break case"YM4":sVersion="YM-Atari extended" break case"YM5":case"YM6":sVersion="Generic YM2149 extended" break case"MIX1":sVersion="Atari Remix digital" break case"YMT1":case"YMT2":sVersion="YM-Tracker"}if(0<=["YM2","YM3","YM3b"].indexOf(sV)&&(frm=Util.divu64(X.Sz()-4,14)),0<=["YM5","YM6","YMT1","YMT2","MIX1"].indexOf(sV)){if("LeOnArD!"!=X.SA(4,8)&&(bad=bad.addIfNone("!badsig")),0<=["YM6!","YMT1","YMT2"].indexOf(sV)&&"End!"!=X.SA(X.Sz()-4)&&(bad=bad.addIfNone("!badfilesz")),0<=["YM5","YM6"].indexOf(sV)){for(ddn=X.U16(20,_BE),loop=X.U32(28,_BE),G=X.U16(32,_BE)+34,Y=0;Y=X.Sz()){bad=bad.addIfNone("!tooshort") break}}else if("MIX1"===sV)for(G=24,smp=X.U32(16,_BE),mixblk=X.U32(20,_BE),Y=0;Y=X.Sz()?bad=bad.addIfNone("!nodata"):(E=G,0<=(t_=X.fSig(G,TOEOF,"00")-G)&&(G+=t_+1,p=G,a_=X.fSig(G,TOEOF,"00")-G,G+=a_+1,_=G,c_=X.fSig(G,TOEOF,"00")-G,G+=c_+1,0<=["YM5","YM6"].indexOf(sV))&&(X.c("'End!'",G+((frm=X.U32(12,_BE))<<4))||(bad=bad.addIfNone("!badframes"),sOption("frm/frames: "+(frm<<4)+"/"+(X.Sz()-G-4))))),X.isVerbose()&&(sOptionT(X.SA(E,t_)),sOptionT(X.SA(p,a_),"by: "),sOptionT(X.SA(_,c_)))}X.isVerbose()&&(voc&&sOption(voc,"voc:"),smp&&sOption(outSz(G+smp),"sz:"),ddn&&sOption(ddn,"digidrums:"),frm)&&sOption("len:"+frm+" sz:"+outSz(G+(frm<<4)+4)),""!=bad&&(sVersion=sVersion.appendS("malformed"+bad,"/"))}else if(X.c("'YMST'")&&(sName="Nicolas 'Mr.Styckx' Pomarede's MYST ST-YM module (.YMST,.YM)",bDetected=1,X.isVerbose())){for(Y=0,G=4;Y<48&&(G+=8,X.U16(G-8,_BE));Y++);E=G,0<=(t_=X.fSig(G,TOEOF,"00")-G)&&(G+=t_+1,p=G,a_=X.fSig(G,TOEOF,"00")-G,G+=a_+1,_=G,c_=X.fSig(G,TOEOF,"00")-G,X.isVerbose())&&(sOptionT(X.SA(E,t_)),sOptionT(X.SA(p,a_),"by: "),sOptionT(X.SA(_,c_)))}if(!bDetected&&(function(){if(X.c("'ZXAYAMAD'")&&!(3X.Sz()))){for(titles=[],Y=0;YX.Sz()))){for(titles=[],Y=0;Y>4){case 0:X.isHeuristicScan()||(s=!0) break case 1:if(!t[b-16])return G++,notes++ break case 2:break case 3:t[b-48]=!0,G+=11 break case 5:break case 6:G++}}if(!X.isHeuristicScan()){if(!s&&e>8)+"."+(255&nV),""!=bad&&(sVersion+="/malformed"+bad),X.isVerbose())&&(tp&&sOptionT(addEllipsis(X.SC(tp,256,"CP437"))),ap&&sOptionT(addEllipsis(X.SC(ap,256,"CP437")),"by: "),cp&&sOptionT(addEllipsis(X.SC(cp,256,"CP437"))),257<=nV&&255==X.U8(K)&&K++,sOption("ch:"+ch+" ins:"+ins+" sz:"+outSz(K))),!bDetected&&(function(){if(!(X.Sz()<90||!X.c("02011313 1412010B")||1X.Sz()?void 0:1}})()&&(sName="Oregan Developments' Digital Symphony module (.DSYM)",sVersion="v"+X.U8(8),bDetected=1,X.isVerbose())&&(sOptionT(F),sOption("ch:"+ch+" ord:"+ord+" ptn:"+ptn+" smp:"+smp)),!bDetected&&(function(){if(!(!X.c("'DFM'1A")||1=regcmdcnt);)creg=(128&E)<<1|regmap[127&E],reginit[creg]=!0,261==creg&&(opl3en=X.U8(G+1)),G+=2 reginit[261]&&1&opl3en&&(hw=2)}-1===(hw=["YM3812 (OPL2)","YM3812 (Dual OPL2)","YMF262 (OPL3)"].indexOf(hw))&&(hw="YMF262(portshift)")}return 1}})()&&(sName="DOSBox Raw OPL chiptune (.DRO)",sVersion=sVersion.appendS(hw,"#"),bDetected=1,X.isVerbose())&&sOption("len: "+secondsToTimeStr(Util.divu64(lenMS+500,1e3))+" via: "+db+" packed:"+co+" sz:"+outSz(dtofs+dtsz)),!bDetected&&(function(){if(!(X.Sz()<2303)&&X.c("'Funk'")&&(K=X.U32(8),isWithin(K,2303,1048576))){switch(E=X.U32(4),sV=X.SA(12,4),bad="",sus=0,sversion=/F2\d\d/.test(sV)?"R2 GOLD "+(1980+(E>>9&127))+"-"+(E>>5&15).padStart(2,"0")+"-"+(31&E).padStart(2,"0")+" ":"R1",/F[2vk]\d\d/.test(sV)?ch=X.SA(14,2):(sversion+="b",ch=8,sus++),E>>20&15){case 1:case 2:E="IBM" break case 3:E="Intel 386" break case 4:E="Intel 486" break case 5:E="Pentium" break case 6:E="Linux" break case 7:E="FreeBSD" break case 8:E="N/A" break default:E="unk.system"}switch(sversion+="#"+E,E>>16&15){case 0:E="SB 2.0" break case 1:E="SB Pro" break case 2:E="GUS+ch.pan" break case 3:E="SB compatible" break case 4:E="SB 16" break case 5:E="GUS" break case 6:E="conversion" break case 7:E="Pro Audio Spectrum" break case 8:E="Voxware /dev/dsp 8 bit" break case 9:E="Voxware /dev/dsp 16 bit" break case 15:E="unk.soundcard" break default:E="soundcard N/A"}for(sversion+=":"+E,!X.isVerbose()&&X.Sz()ptn&&(ptn=E) for(ptn++,255!=(lp=X.U8(16))&&lp>ord&&(bad+="!badloop"),smp=sus=0,smps=[],Y=400;Y<2239;Y+=32){if(!isWithin(X.U8(Y),1,79))return if(X.U32(Y+24)&&smp++,charStat(X.readBytes(Y+1,19),1).indexOf("allasc")<0&&sus++,3>=1)>>6,bpm&=63,bpm=Z?125-bpm:125+bpm,sOptionT(addEllipsis(smps.filter(funSampleName).join(" ")),'smp/msg:"','"'),sOption("ch:"+ch+" bpm0:"+bpm+" ord:"+(255!=lp?lp+"~":"")+ord+" ptn:"+ptn+" smp:"+smp+" "+bits+"bit sz:"+outSz(K))),!bDetected&&(function(){if(X.c("'PRT'")&&isWithin(ins=X.U8(64),1,64)&&isWithin(nV=X.U8(3),10,50)&&(!(nV<30)||(ptn=[X.U8(61)])[0]&&(ord=[X.U8(62)])[0]&&!((lp=[X.U8(60)])[0]>ord[0]))&&(k=1,G=90,ptnp=[],k=30<=nV?X.U8(G++):k)){30<=nV&&(ord=[],lp=[],ptn=[]) var s,e=[] for(Y=0;YG}})()&&(sName="Manfred 'Pink' Linzner's PreTracker module (.PRT)",bDetected=1,sVersion=nV<25?"v<0.3":25==nV?"v0.3~0.866":26==nV?"v0.87~0.92":isWithin(nV,27,29)?"v.[0.93~1.5)":30==nV?"v1.5+":"v.TODO",X.isVerbose())&&(sOptionT(X.SA(20,20)),1=ord)return lp=31&E}break}if(!isWithin(f,-36,36)||100=ptn&&(ptn=c+1)}if(ord){for(q=X.U16(r),smp=q-r>>1,G=r;G>1,G=i;GE&&(tmp[0]=E),tmp[1]<1&&(tmp[1]=E),l=0;l<3;l++,G+=2){if(!isWithin(E=X.U16(G),n,m))return d.includes(E)||d.push(E)}}if(d.sort(function(s,e){return s-e}),Util.divu64(d[0]-n,7)==ptn){for(Y=1;Y>12,wtv=4095&cwtv,fmtv=X.U16(42),gvol=X.U8(48),spd=X.U8(49),tmp=X.U8(50),mvol=X.U8(51),uc=X.U8(52),usept=0<(X.U8(53)&&252),r2=X.U16(54),special=X.U16(62),ch=4,Y=0;Y<32;Y++)255!=X.U8(64+Y)&&(ch=Y+1) switch(E=Hex(cwtv),sv=E.substr(1,1)+"."+E.substr(2,2).padStart(2,"0"),tv){case 520&tv:tracker="Akord" break case 1:X.c("'SCLUB2.0'",54)?tracker="Sound Club 2":4896!=cwtv||special||15&ord||uc||-81&fl||!usept?4896!=cwtv||special||uc||fl||usept?4896!=cwtv||special||uc||8!=fl||usept?(ss=!0,4896==cwtv?tracker="Psi's Scream Tracker 3.20-21":(tracker="Psi's Scream Tracker",fmttrkstr=!0)):tracker="J.Lim's Impulse Tracker < 1.03":tracker=64==gvol&&48==mvol?"PlayerPRO":"Velvet Studio":(tracker=mvol?(lswv="1.16","ModPlug Tracker/OpenMPT 1.17"):(lswv="1.00.00.A0","ModPlug Tracker 1.0 alpha"),keepmidims=trknc=!0) break case 2:fmttrkstr=8211!=cwtv,tracker=fmttrkstr?"Imago Orpheus":"PlayerPRO",trknc=!0 break case 3:tracker=13088==cwtv?"Impulse Tracker 1.03":532>8)+"."+(255&wtv).toString(16).padStart(2,"0"),trknc=!0 break case 4:var s,e tracker=16640==cwtv?"BeRoTracker":(isSchism=!0,(s=(e=734016+(wtv<4095?wtv-80:r2))-(365*(t=Util.div64(1e4*e+14780,3652425))+Util.div64(t,4)-Util.div64(t,100)+Util.div64(t,400)))<0&&(s=e-(365*--t+Util.div64(t,4)-Util.div64(t,100)+Util.div64(t,400))),e=Util.div64(100*s+52,3060),"Schism Tracker "+(t+Util.div64(e+2,12)).padStart(4,"0")+"-"+((e+2)%12+1).padStart(2,"0")+"-"+(s-Util.div64(306*e+5,10)+1).padStart(2,"0")),trknc=!0 break case 5:cwtv>>8==87?(tracker="NESMusa",fmttrkstr=!0):r2||16!=uc||1==X.U8(65)?tracker=21575!=cwtv?(19464192<=(v=wtv<<16)&&(v|=r2),"OpenMPT "+(lswv=(t=v.toString(16).toUpperCase().padStart(7,"0")).slice(0,1)+"."+t.slice(1,3)+"."+t.slice(3,5)+"."+t.slice(5,7))):"Dumbo's Graoumf Tracker":(tracker="Liquid Tracker",fmttrkstr=!0) break case 6:tracker="BeRoTracker" break case 7:tracker="BeRo's CreamTracker" break default:51712==cwtv&&(tracker="Camoto")}var t if(!(2<=sus)){for(fmttrkstr&&(tracker+=" "+sv),charset=""!=lswv?"CP1252":"CP437",G=96+ord+2*smp,max=K=0,Y=0;Ymax&&(max=r,K=max+X.U16(r))}if(K%16&&(K+=16-K%16),usept){var i=!1 for(G+=2*ptn,Y=0;YX.Sz()?bad=bad.addIfNone("!short"):(P=X.U8(si),A=X.U32(si+16),""!=(E=X.SC(si+48,28,charset).trim())&&smps.push(E),P<2&&(A&&(anysmp=!0,I=X.U8(31),anyADPCM||4!=X.U8(si+20)||6&I||(anyADPCM=!0)),gus|=X.U16(si+40)),1===X.U8(si)&&(sofs=X.U16(si+14)<<4)>max&&(4&I&&(A*=2),max=sofs,Kseqr)return Y|=1 break case"PATT":Y|=16 break case"MACR":Y|=256,mcr=X.U8(G+8) break default:if(Y<17)return eof=1}return K=G,1}})()&&(sName="Tero 'kometbomb' Lindeman's ProtoTracker module (.SONG)",bDetected=1,sVersion=sVersion="v"+v,X.isVerbose())&&(sOption(F),sOption("trk:"+trk+(fxc?" fx:"+fxc:"")+(mcr?" mcr:"+mcr:"")+" sz:"+outSz(K))),!bDetected&&(function(){if(X.c("'+SNT'")){for(Y=smp=0,G=4;Y<32;Y++){if(7>=1)f&U&&G++}var i for(Y=0;Y>=1)f&U&&(G+=4)}return 1}}function n(){switch(X.U8(G++)){case 1:if(1X.Sz()||1&G||(songp=G+8,!X.c("'mdt'",G))||((G+=X.I32(G+4,_BE))>X.Sz()||1&G)||!X.c("'msm'",G)||(G+=X.I32(G+4,_BE))>2,songsz=songp-8,k=X.I16(songp+4,_BE)-X.I16(songp+2,_BE)>>2,G=X.I16(songp,_BE),ord=X.I16(songp+6,_BE)-G-X.I32(songp+G+12,_BE),!1)||(sName="Anders 'Zonix' 0land's Music & Player module (.HOT)",bDetected=1,sVersion="v"+X.SA(3,1),X.isVerbose()&&(1ord))&&trk&&ptn&&isWithin(ins,1,256)&&spd0&&tmp0){if(titlesz=X.U16(G,_LE),titlep=G+2,G+=2+titlesz,s<258?(origssz=X.U16(G,_LE),origsp=G+2,G=p1=G+2+origssz,G=origsp+origssz):origssz=0,cmtsz=X.U16(G,_LE),cmtp=G+2,G+=2+cmtsz,6<=s&&(G=(G+=256<=s?2*ord:ord)+3*ch),smps=[],inss=[],smpsz=0,6<=s){for(Y=0;YX.Sz())){for(k=1,seqtest=X.fSig(seqp+18+9,TOEOF,"0000000000 FFFF")-seqp;32X.Sz())return if(!X.c("FFFF",G-2)&&1<++once)return if(Gn)return}isFLT8=r&&8==chn wowsmpsz if((maybeWOW=restartpos?!1:maybeWOW)||(wowsmpsz=0),2<=i&&(tracker+="/Audio Sculpture"),ord=X.U8(950)){if(ol=X.readBytes(952,128),128=ptn&&(ptn=m+1,Y=iptn&&(iptn=ptn+1)}var s=-2&X.Sz(),f=(wowsmpsz&&wowsmpsz+t+8*ptn*256==s?h(t+4*ptn*256)<16&&(chn=8):ptn!=optn&&64ptn&&t+a+iptn*chn*256==s&&(ptn=iptn),maybeWOW&&8===chn&&(tracker="Mod's Grave",isGenericMCh=!0),(restartpos>=ord||120==restartpos&&4===chn)&&(restartpos=0),!0) leftPan=extPan=maxPan=0 if(!isNoiseTracker){for(isNoiseTracker=isMdKd&&!hasEmptySmpwVol&&!hasLongSmp,G=t,m=0;mmaxPan&&(maxPan=b),b<128?leftPan=!0:143=ord&&(tracker="Sami 'Psi/Future Crew' Tammilehto's Scream Tracker"),!((K=t+ptn*chn*256)>X.Sz())){G=20,smp=0,songsz=K,ib=0,smps=[] for(var U=0;G<950;G+=30)isHMNT||(E=X.readBytes(G,22,!0),(E=decEncoding(E,CPAmiga).trim()).length&&smps.push(E)),(a=2*X.U16(G+22,_BE))&&smp++,X.c("'ADPCM'",K)&&(U++,a=5+(a+1>>1)+16),K+=a if(X.c("8BBEB4BA 8BADBEBC B4BAAD",K)){for(var u=[];K=ord)){G=22 var s=ib=0 smp=synwf=0,smps=[] for(var e=0;e<31;G+=30,++e)if(X.U8(G)){""!=(E=X.SC(G,20,"IBM850").trim())&&""!=E&&smps.push(E) var t=2*X.U16(G+22,_BE) if(s+=t,240&X.U8(G+24)&&ib++,64t&&ib++,40=synwf&&(synwf=t+1)}for(ptn=0,G=958,ord=X.U8(956),e=0;eptn)return return K=1468+64*ptn*4+smpsz,1}})()&&(sName=tracker+" module (.ST26,.ICE)",sVersion="v2.6",bDetected=1,X.isVerbose())&&(sOptionT(decAnsi(0,20,CPAmiga)),sOptionT(addEllipsis(smps.join(" "),128),'smps/msg:"','"'),sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+K)),!bDetected&&(function(){if(X.c("'MVM'00")&&X.U8(4)&&X.U8(5)&&!(1e4mach||n>mach||i==n)return t=t.filter(function(){return t.indexOf(i)<0&&t.indexOf(n)<0})}return t.length?void 0:1}})()&&(sName="Gargaj/Conspiracy's MVX Module (.MVM)",bDetected=1,X.isVerbose())&&sOption("bpm0:"+X.U8(4)+" ticks:"+X.U8(5)+" rows:"+X.U32(6)+" machines:"+mach),!bDetected&&(function(){if(/MED[\x02-\x04]/.test(X.SA(0,4))){switch(nV=X.U8(3)){case 2:sVersion="v1.12" break case 3:sVersion="v2.00" break case 4:sVersion="v2.10+"}if(k=1,G=K=ptn=ord=trk=midi=syhy=smp=realsmp=0,smps=[],cs=bad="",!(nV<3)){var s=X.U8(4) for(G=5;s;){if(1&s)for(var e=X.U8(G++);e;)smp+=1&e,e>>=1 s>>=1}for(Y=0;Yptn)return for(extsmp=!(8&X.U8(G+3)),tmp0=X.U16(G,_BE)+"//"+X.U16(G+4,_BE),G+=26,Y=0;Y<16;Y++)if(64X.Sz())return function t(){var s=X.U32(G,_BE) G+=4 for(var e=0;e<32;e++)2147483648&(s=s<0?-s:s)&&(midi++,G++),s<<=1}for(3===nV&&(t(),t()),Y=0;YX.Sz()&&(bad="!short"),1}})()&&(sName="OctaMED module (.MED)",bDetected=1,""!=bad&&(sVersion+="/malformed"+bad),X.isVerbose())){for(sOptionT(cs);""==smps[smps.length];)delete smps[smps.length] smps.length&&sOption("["+smps.join(",")+"]","smps:"),sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+(realsmp!=smp?"("+realsmp+")":"")+(extsmp?"(ext.)":"")+(syhy?" synth+hybrid:"+syhy:"")+(midi?" midi:"+midi:"")+" trk:"+trk+" tmp0:"+tmp0+" mvol:"+mvol+" sz:"+outSz(K))}if(!bDetected&&(function(){if(X.c("'MMD'")&&!((nV=X.U8(3)-48)<0||3X.Sz()||(sec=G=0,(sngp=X.U32(G+8,_BE))<52)||4294966535X.Sz()||(pj=X.U32(pj,_BE))>X.Sz()||(pj=nV<1?X.U8(pj+4):X.U16(pj+4,_BE))>ch&&(ch=pj) if(nV<2){if(ord[0]=X.U16(G+2,_BE),256X.Sz())continue for(playseqtp=X.U32(G+4,_BE),nplayseq=X.U16(G+18,_BE),secs=[],l=0;lX.Sz())){k=Y+1 break}sngp=X.U32(expp,_BE)}return 63<(smp=X.U8(G+283))?void 0:1}}})()&&(sName=C,sVersion=sversion,bDetected=1,X.isVerbose())&&(""!=songname&&""!=songname&&sOption(songname),sOptionT(anno),sOptionT(iinfo,"ins0:"),1>7,s>>4&7){case 0:spd="50Hz" break case 1:spd="100Hz" break case 2:spd="150Hz" break case 3:spd="200Hz" break default:bad++,spd="?Hz"}if(999<(ord=4095&X.U16(6,_BE))&&bad++,(!ord||1024=ord&&bad++:chn=4+(X.U8(8)>>2),!(1X.Sz()&&bad++,1}}})()&&("ahx"===fmt?(sName="Abyss' Highest eXperience module (.AHX)",sVersion=X.U8(3)?"v2.0+":"v1.00~1.27"):sName="Hively Tracker module (.HVL)",bDetected=1,bad&&(sVersion+="/malformed"+bad),X.isVerbose())){for(""!=F&&sOption(F),sub&&sOption(sub,"×"),n=0,G=14+2*sub+8*ord,_=trk*trl,trk0saved||(_+=trl),hp=!1,Y=0;Y<_;Y++)(note=X.U8(G+3*Y)>>2)&&n++,60X.Sz())return e=Math.max(e,E),t=Math.min(t,E),ptn.includes(E)||ptn.push(E)}if(!(t%2||2"+Hex(q))}G+=hksz+align*(1&hksz)}return!(K>2,k=d0/3,a1=G=songp,d5=0;d0--;)for(G=songp+X.U32(a1,_BE),a1+=4;Gd5&&(d5=E) for(K=songp+d5;135!=(E=X.U8(K++)););return 1}}}}}})()&&(sName="Rob Hubbard ST module (.RHO)",sVersion="v1.1",bDetected=1,X.isVerbose())&&(1X.Sz()||(orntp=X.U16(6,_LE))>X.Sz()||64!=X.U16(smptp,_LE)||64!=X.U16(orntp,_LE))){for(ptn=0,Y=0;Y=X.Sz()){if(!X.isHeuristicScan())return bad="/malformed!short"}return K=l+2,delay=X.U8(0),loop=X.U8(1),1}}})()&&(sName="A.'Andrew Strikes Code' Sendetskii/Power of Sound's ASC/Advanced Sound Master module (.ASC)",sVersion="v1.x-2.x"+bad,bDetected=1,X.isVerbose())&&(8<(pt=X.fSig(8,128,"'ASM COMPILATION OF '")+19)&&(pa=X.fSig(pt+19,32,"' BY '"),sOptionT(X.SA(pt,pa-pt)),sOptionT(X.SA(pa+4,20),"by: ")),sOption("ord:"+ord+" ptn:"+ptn+" delay:"+delay+" loop:"+loop+" sz:"+outSz(K))),!bDetected&&(function(){if(!(X.Sz()<8||(ptntp=X.U16(1,_LE),ord=X.U8(7),ptntp-ord!=8&&ptntp-ord!=71)||(smptp=X.U16(3,_LE))>X.Sz()||(orntp=X.U16(5,_LE))>X.Sz()||64!=X.U16(smptp,_LE)||64!=X.U16(orntp,_LE))){for(ptn=0,Y=0;Y=X.Sz()){if(!X.isHeuristicScan())return bad="/malformed!short"}return K=l+2,delay=X.U8(0),1}}})()&&(bDetected=1,sVersion="v0.x"+bad,sName="Andrei 'Andrew Strikes Code' Sendetskii/Titus's Advanced Sound Master module (.AS0)",X.isVerbose())&&(7<(pt=X.fSig(7,128,"'ASM COMPILATION OF '")+19)&&(pa=X.fSig(pt+19,32,"' BY '"),sOptionT(X.SA(pt,pa-pt)),sOptionT(X.SA(pa+4,18),"by: ")),sOption("ord:"+ord+" ptn:"+ptn+" delay:"+delay+" sz:"+outSz(K))),!bDetected&&(function(){if(!(X.Sz()<296)){G=41 var s,e=X.U16(5),t=X.U16(G-2)-e for(Y=0;Y<14;Y++){if((s=X.U16(G)-e)-t<6||(s-t-2)%4||s>X.Sz())return G+=2,t=s}for(t=X.U16(G)-e,G+=2,Y=0;Y<15;Y++){if((s=X.U16(G)-e)-t<3||s>X.Sz()||s-t!=2+X.U8(t+1))return G+=2,t=s}for(K=s+2+X.U8(s+1),t=X.U16(G)-e,G+=2,Y=1;Y<96;Y++){if((s=X.U16(G)-e)-t<3||s>X.Sz())return G+=2,t=s}if(ord=X.U8(G++),!((lp=X.U8(G++))>ord)){for(Y=0;Y>4)+"."+(15&X.U8(4)),X.isVerbose())&&(dly=X.U8(0),ptn=X.U8(293),lp=X.U8(294),sOptionT(X.SA(7,32)),sOption("ord:"+(0X.Sz())){for(B=smp=0,Y=0;Y<15;Y++)if(255!=X.U8(32+32*Y)){if(sn=X.readBytes(32+32*Y,24),charStat(sn,CS_ALL).indexOf("xsc")<0)return if(slen=X.U16(56+32*Y,_BE)<<1,lp=X.U16(58+32*Y,_BE),lpl=X.U16(58+32*Y,_BE),T=X.U16(62+32*Y,_BE),lpl>slen||lp-1>slen||lpl-1>slen)return if(96ptn&&(ptn=G) return K+=48*ptn,1}}})()&&(bDetected=1,sName="Brian Postma's SoundMon module (.BP)",sVersion=old?"old":"v"+X.SA(28,1),""!=(bad=X.Sz()B)&&(ord=X.U8(111))&&!(40ptn&&(ptn=pt)}return ptn++,(U=1024*ptn)+204>X.Sz()?void 0:(K=smpdescs+U+204,1)}}})()&&(sName="Andreas Fuchs's FuchsTracker module (.FUCHS)",bDetected=1,X.isVerbose())&&sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(K)),!bDetected&&(function(){if(!(X.Sz()<444)&&X.c("000000",240)){for(smps=[],U=G=l=B=0;U<15;U++,G+=16){if(8388607<(o=X.U32(G,_BE))||1&o)return if(65535<(j=X.U16(G+4,_BE)<<1))return if(X.U8(G+6))return if(64j)return if(1&X.U16(G+14,_BE))return B+=j,j&&smps.push([o,j])}if(!(B<=4)){for(smps.sort(function(s,e){return s[0]-e[0]}),U=0;Usmps[U+1][0])return if(ord=X.U8(243),isWithin(ord,1,100)){for(ptn=0,ords=[],Y=0;Y<100;Y++){if(1023&(G=X.U16(244+2*Y,_BE)))return Y>=10)>ptn&&63!=G&&(ptn=G)}if(!(64<++ptn||(m=notes=badnotes=badled=0,end=!1,nps=[],(G=444)+1024*ptn>Math.min(X.Sz(),65532)))){for(Y=0;Yord+1)return}if(16ptn&&(ptn=E) if(!(ptn<1||(ptnp=G+ofs,(ptn1=oldp=X.U16(ptnp))>X.Sz()))){for(Y=0;GX.Sz())return if(Y&&256X.Sz())return for(;G=X.Sz())){for(numofpos=X.U8(1),loop=X.U8(2),j1=65535,Y=l=0;Y<16;Y++){if((Q=X.U16(3+2*Y))>X.Sz())return if(lX.Sz())return op&&j1>op&&(j1=op)}if(!(j1<103||l<103||65534X.Sz()||l+3*X.U8(l)+2!=j1)){for(Y=l=0;Y<16;Y++){if((op=X.U16(35+2*Y,_LE))>X.Sz())return lX.Sz()+1)){for(l=99;l<=ptntp&&X.U8(l)<255;)l++ return l+1==ptntp?(ord=l-99,!(loop>ord)):void 0}}}})()&&(sName="Golden Disk ProTracker module (.PT1)",sVersion="v1.x/compiled",bDetected=1,X.isVerbose())&&(sOptionT(X.SA(69,30)),sOption("tempo:"+tempo+" ord:"+ord+" len:"+len)),!bDetected&&(function(){if(!(X.Sz()<132)&&(tmp=X.U8(0),isWithin(tmp,2,15))){var s=X.Sz()+512*X.isHeuristicScan() if(ord=X.U8(1),lp=X.U8(2),!(!ord||lp>ord||131+ord>s-2)&&(smp0=X.U16(3),!((orn0=X.U16(67))-smp0>s+2||orn0mps&&(mps=E),E&&(smp++,!isWithin(E,101,s-2)))return for(mp=0;Y<48;Y++,G+=2)if((E=X.U16(G))>mp&&(mp=E),E&&++orn<=2&&!isWithin(E,Math.max(mps,orn0),s))return for(G=131,ptn=Y=0;Y<=255;Y++,G++){if(G>X.Sz()-2)return if(255==(o=X.U8(G)))break o>ptn&&(ptn=o)}if(ptn++,G++,ord==Y&&ptnp==G){for(rptn=0;G"),sOption("tmp:"+tmp+" ord:"+(lp?lp+"-":"")+ord+" ptn:"+ptn+" smp:"+smp+" orn:"+orn+" sz:"+outSz(K))),!bDetected&&ks(0)&&(sName="Golden Disk ProTracker module (.PT3)",sVersion=sv,bDetected=1,tsmode=5<=nv&&(32!=X.U8(98)||X.c("'Vortex Tra'",K)||X.c("'ProTracker 3'",K)),X.isVerbose()&&(info1="tmp0:"+tmp0+" ord:"+(lp?lp+"-":"")+ord+" ptn:"+(rptn!=ptn?rptn+"/":"")+ptn+" smp:"+(rsmp!=smp?smp+"/":"")+rsmp+" orn:"+(rorn!=orn?rorn+"/":"")+orn+" notes:"+notes),sz1=K,ord1=ord,tmp1=tmp0,(tsmode=!tsmode||ks(K)&&ord1==ord&&tmp1==tmp0?tsmode:!1)&&(E=X.fSig(K,512,"'02TS'"))>K&&X.SA(E-6,4)===X.SA(E-12,4)&&(sz1==X.U16(E-8,_LE)?(sVersion+="[TurboSound:"+X.SA(E-6,4)+"]",K=E+4):7<=nv?sVersion+="/TurboSound":bad=bad.addIfNone("badTSver")),bad.length&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose())){switch(X.c("'by ",63)&&(sOptionT(decAnsi(30,32,CPSpeccy)),sOptionT(decAnsi(66,32,CPSpeccy),"by: ")),sOptionT(tracker,"in: "),ttn){case 0:sOption("tuning 0: 1625000Hz PT3.3") break case 1:sOption("tuning 1: Sound Tracker") break case 2:sOption("tuning 2: ASM/PSC 1.75MHz") break case 3:sOption("tuning 3: RS 1625000Hz") break case 4:sOption("tuning 4: Ivan Roshchin's Natural Cmaj/Am") break default:sOption("tuning "+ttn+"/custom")}sOption((tsmode?"chip#1: ":"")+info1),tsmode&&sOption("chip#2: ptn:"+(rptn!=ptn?rptn+"/":"")+ptn+" smp:"+(rsmp!=smp?smp+"/":"")+rsmp+" orn:"+(rorn!=orn?rorn+"/":"")+orn+" notes:"+notes),sOption(outSz(K),"sz:")}if(bDetected||!Fs(1)&&!Fs(0)||(sName="Viktor 'KVA' Kuźmin's Pro Sound Creator module (.PSC)",sVersion=sv+"/compiled",bDetected=1,X.isVerbose()&&(ftitle&&sOptionT(decAnsi(25,20,CPSpeccy,!1,Chars0to1FSpeccy)),fby&&sOptionT(decAnsi(49,20,CPSpeccy,!1,Chars0to1FSpeccy),"by: "),sOption("ord:"+(0=X.Sz()||X.U16(146)<=X.U16(82))){for(G=212,ptn=0;G<468&&Gord)){var e=X.U16(ptnp)-(6*ptn+ptnp+2) if(!(e<0||X.U16(82)-e>=X.Sz()||ptnp>=X.U16(82)-e||X.U16(146)-e>=X.Sz())){var t=65535,r=0,i=0 for(G=82;G<146;G+=2)i=Math.max(i,X.U16(G)) for(;G<212;G+=2)t=Math.min(t,X.U16(G)),r=Math.max(r,X.U16(G)) return i-e>=Math.min(65534,X.Sz())||s<=t-e||s<=r-e||i<=ptnp||i+3+5*(X.U8(i-e+2)+1)!=t?void 0:!((K=i+3+2*(X.U8(i-e+2)+1)-e)ord)&&ord){var t=X.U16(3,_LE) if(isWithin(t,e+2+2*ord,s)){var r=X.U16(5,_LE) if(isWithin(r,10,s)){var i=X.U16(7,_LE) if(isWithin(i,10,s)&&!((K=i+30)>X.Sz())){var n=[],a=[] for(Y=0;Y=K))&&(Y=postp-membase,b=X.U8(Y))){for(ord=0,ptn=0;b;){if(K<=Y+7)return ord++,ptn<(E=127&b)&&(ptn=E),Y+=2,b=X.U8(Y),ptn<(E=127&b)&&(ptn=E),Y+=2,b=X.U8(Y),ptn<(E=127&b)&&(ptn=E),Y+=3,b=X.U8(Y)}if(ptn++,(G=X.U16(smptp-membase+2))-ptntp==2*ptn&&(G=12,(len=Y+7)==K)){for(E=X.U16(12),Y=1;Y<=orntp-smptp>>1;Y++){if(G+=2,(j3=X.U16(G))-E!=98&&(1337!=K||10!=ord||11!=ptn))return E=j3}for(Y=1;Y<=ptntp-orntp>>1;Y++){if(G+=2,(j3=X.U16(G))-E!=34)return E=j3}return 1}}})()&&(sName="Jiří 'George' Koudelka's Scalex Qjeta Tracker module (.SQT)",sVersion="compiled",bDetected=1,sOption("ord:"+ord+" ptn:"+ptn+" sz:"+outSz(K))),!bDetected&&X.isDeepScan()&&(function(){if(!(X.Sz()<6||0==(tempo=X.U8(0))||32X.Sz()||(orntp=X.U16(3,_LE))<126||orntp>X.Sz()||(ptntp=X.U16(5,_LE))<126||ptntp>X.Sz()||(ord=X.U8(postp)+1,0==(j2=ptntp-orntp)))){if(fID=!1,0X.Sz())){for(;l;){if(l--,0X.Sz()||X.U8(j1-1)<255)){for(bad=0;;){if(131<=X.U8(j1)<=142&&j1++,65535<++j1)return if(j1>X.Sz()){if(X.isHeuristicScan()){bad=1 break}return}if(255==X.U8(j1)||j1==X.Sz())break}return len=255==X.U8(j1)?j1+1:X.Sz(),fID&&"SOUND TRACKER COMPILATION OF "!=X.SA(ptntp-55,29)&&"KSA SOFTWARE COMPILATION OF "!=X.SA(ptntp-55,28)?void 0:1}}}})()&&(sName="Jarosław 'BZYK' Burczyński's Sound Tracker module (.STC,.ZXS)",sVersion="v1.x",bDetected=1,bad&&(sVersion+="/malformed"+bad),K=X.U16(25,_LE),i_d=X.SA(7,18),r=0<=["SONG BY ST COMPILE","SONG BY MB COMPILE","SONG BY ST-COMPILE","SOUND TRACKER v1.1","S.T.FULL EDITION ","SOUND TRACKER v1.3"].indexOf(i_d)?"":i_d,K!=X.Sz()&&(K=len,X.isVerbose()&&sOption("ord:"+ord+" ptn:"+ptn),32<=(255&K)<=127)&&(r+=String.fromCharCode(255&K),32<=K>>8<=127)&&(r+=String.fromCharCode(K>>8)),X.isVerbose())&&(sOptionT(r,"msg: "),sOption("ord:"+ord+" ptn:"+ptn+" sz:"+outSz(K))),!bDetected&&X.isDeepScan()&&ss()&&(sName="S.T. Music's Recompiler v2 rebuilt STC module (.ST3)",sVersion="v3.0",bDetected=1,bad&&!X.isVerbose()&&(sVersion+="/malformed"+bad),X.isVerbose())&&(fID&&(sOptionT(decAnsi(9,55,CPSpeccy,!1,Chars0to1FSpeccy)),X.c("'KSA SOFTWARE COMPILATION OF '",9)||sOption(X.SA(9,28),"in: ")),sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" delay:"+X.U8(0)+" @"+Hex(base)+" sz:"+outSz(K))),!bDetected&&X.isDeepScan()&&(function(){if(!((a0=X.fSig(0,65535,"41FA.... ....FFD4 43FA.... 228841FA ....D1E8 FFD843FA"))<0||1&a0||a0>X.Sz())&&(bad="",G=X.U16(a0+2,_BE),!((msgp=a0+G+2)X.Sz()))&&!((playp=X.fSig(a0+16,a0+msgp-6,"4E7548E7FFFE"))<0||1&playp)&&(smpd=X.U16(a0+2+G-2,_BE),ordp=X.U16(a0+2+G-6,_BE),ptnp=X.U16(a0+2+G-10,_BE),smpd)&&ordp&&ptnp&&!(a0+2+G+smpd>X.Sz()||a0+2+G+ordp>X.Sz()||smpd<=ordp&&1!=smpd)){if(ptn=ordp-ptnp>>6,ord=0,smps=[],1==smpd){if(ord++,(pt=a0+2+G+ordp)+4>X.Sz())return K=pt,1 for(pt+=4,E=1,K=ordp-ptnp;EX.Sz()||!E)return 1 K+=4}K-=4,ord--}else{if(ord=smpd-ordp>>2,smpd+=a0+2+G,sdsz=X.U16(smpd+2,_BE),smp=sdsz>>5,smpd+sdsz>X.Sz()||sdsz%32)return if(!sdsz)for(;;sdsz+=32){if(sdsz+36>X.Sz())return if(stp=X.U32(smpd+sdsz+4,_BE),U=X.U32(smpd+sdsz+8,_BE),endp=X.U32(smpd+sdsz+12,_BE),stp>U||U>=endp)break smp++,""!=(E=decAnsi(smpd+sdsz+16,16,CPAmiga).trim())&&smps.push(E)}for(mendp=0,Y=0;Ymendp&&(mendp=endp),""!=(E=decAnsi(smpd+32*Y+16,16,CPAmiga))&&smps.push();(K=smpd+sdsz+4+mendp)>X.Sz()&&(bad=bad.addIfNone("!short"))}return 1}})()&&(sName="SIDMon module (.SID1,.SMN,.SID)",sVersion="v1",bDetected=1,""!=bad&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose())&&("SID-MON BY R.v.VLIET (c) 1988"!=(E=decAnsi(msgp,256,CPAmiga).trim())&&sOptionT(E),sOptionT(addEllipsis(smps.join(","),200),"smps:"),sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(K))),!bDetected&&(function(){if(!(X.Sz()<90)&&X.c("'SIDMON II - THE MIDI VERSION'",58)&&(ord=X.U8(2)+1,spd0=X.U8(3),smp=X.U16(4,_BE),ofs=58+X.U32(6,_BE),songlenlen=X.U32(10,_BE),90==(ofs+=songlenlen))){for(G=14,Y=0;Y<10;Y++){if(1048575<(E=X.U32(G,_BE))||!E)return switch(Y){case 0:var s=[ofs,E] break case 1:if(E!=s[1])return var e=[ofs,E] break case 2:if(E!=e[1])return break case 3:if(E%32)return break case 7:if(E!=smp)return var t=[ofs,E] break case 8:trk=E>>1 break case 9:var r=[ofs,E]}if(G+=4,(ofs+=E)>X.Sz())return}for(1&(ofs=r[0]+r[1])&&ofs++,smpsz=0,smps=[],G=t[0];G>=6,1}})()&&(sName="SIDMon II module (.SID2)",bDetected=1,X.isVerbose())&&(sOptionT(X.SA(7,32)),sOptionT(X.SA(39,32),"in: "),sOptionT(addEllipsis(smps.join(","),256),'smp/msg:"','"'),sOption("trk:"+trk+" ord:"+ord+" smp:"+smp+" sz:"+outSz(K))),!bDetected&&(function(){if(!(X.Sz()<17||31<(smp=X.U16(0,_BE))||(ordp=X.U32(2,_BE))<8*smp+2||128<(ptndp=X.U32(6,_BE))-ordp||255!=X.U8(ptndp-1)||65535<(smpdp=X.U32(10,_BE))||ptndp<=ordp+1||smpdp<=ordp||ordp>X.Sz()||ptndp>X.Sz())){for(l=B=0;lA)return if((lsz=X.U16(8*l+20,_BE)<<1)>A+2||lst+lsz>A+2||lst&&lsz<=2)return if((lst||2=ptn&&(ptn=E+1)}return K=B+smpdp,1}}})()&&(sName="Digital Illusions Creative Entertainment packed module (.DI)",bDetected=1,K>X.Sz()&&!X.isVerbose()&&(sVersion="malformed!short"),X.isVerbose())&&sOption("ord:"+(ptndp-ordp-1)+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(K)),!bDetected&&(function(){if(X.c("'IM10'",60)&&!(256X.Sz())){for(inss=[],smps=[],smp=Y=0;Y>1,rho=rhy=0 var r=oldrhy=0,i=16777215 if(0=rhy&&E<128&&(rhy=E+1),rho++ if(0X.Sz())&&(bad=bad.addIfNone("!extrapOOB"+Hex(extra))) else bad=bad.addIfNone("!"+Hex(extra)+" out of "+Hex(extrap-1)) return 1}function n(s,e){return 13*ch?void 0:(bad=sus?"suspicious"+sus:"",1)}})()&&(sName="Packen/ぱっくん Software MUAP98/みゅあっぷ Object chiptune (.O,.OX+TONES.DTA)",bDetected=1,bad.length&&(sVersion=bad),X.isVerbose())&&(sOptionT(r),sOption("ch:"+ch+(X.isDeepScan()?" notes:"+notes+" sz:"+outSz(K):""))),!bDetected&&X.isDeepScan()&&(function(){if(X.c("6000.... 6000.... 6000.... 6000.... 6000.... 41FA.... ........ 4E7541FA")){for(a2=64,d4=8;9240!=X.U16(a2,_BE)&&(a2+=2,--d4););if(d4){for(smp=d3=X.U8(a2-1)+1,a2=54,d4=5;16890!=X.U16(a2,_BE)&&(a2+=2,--d4););if(d4){a2+=2,a4=a2,d4=a2+X.U16(a2,_BE)+2,53756==X.U16(a4+2,_BE)&&(d4+=64),a3=d4-2,d5=0,a2=a3 do{if(65536<(d1=X.U32(a3,_BE)))return}while(d1+=6,d5+=d1,a3+=d1,--d3) if(20081==X.U16(a3,_BE)){a3=0,a0=130+a3,d0=10 do{if(16875==X.U16(a0,_BE)){a0+=2 break}}while(a0+=2,--d0) if(d0){for(d1=0,d2=X.U16(a0,_BE),a3+=d2;a3+=18,d1++,X.U16(a3,_BE););d2=a2-a3 do{if(132!=(b=X.U8(a3))&&133!=b){if(a3++,--d2<0)break}else d0++,a3++,d2--}while(0<=d2) return songsz=d4,K=d4+d5,steps=d0,k=d1,1}}}}}})()&&(sName="Rob Hubbard's module (.RH)",sVersion="v1.4",bDetected=1,X.isVerbose())&&(1=ord&&(bad=bad.addIfNone("!badloop")),!(charStat(X.readBytes(0,12),1).indexOf("allxsc")<0))){for(G=80,Y=mp=0;Ymp&&(mp=pt)}if(!(Y=X.Sz()))){for(Y=0;Ymsmpp&&(msmpp=smpp,mssz=A),smp++}for(Y=0;YX.Sz()?(K=-1,bad=bad.addIfNone("!short")):K=Math.max(msmpp+mssz,G),1):void 0}}}function e(s){for(var e=!0;G+4X.Sz())return}while([17914,17401,16889].indexOf(E>>16)<0) for(initp=G-2,a0+=284,d1=0;d1<128;d1++){if(X.c("7F7F7F7F",a0)||X.c("FFFF",a0))return a0+=2}k=IntAddress=0,Twin=!1 do{if(E=X.U16(G,_BE),(G+=2)>X.Sz())return}while([28672,29184].indexOf(E)<0) if(28672===E)k=1 else{for(;!k&&G>3):X.c("43EA",G)?(E=X.I16(G+2,_BE),k=X.I16(E,_BE)-E>>3):G+=2}if(!k||G>=X.Sz())return}return 1})()&&(sName="Sean Conran module (.SCR)",sVersion="v1.2",bDetected=1,Twin&&(sVersion+="/Megatwins"),X.isVerbose())&&1X.Sz())&&(a0=a1=a3=d1+2,!((d1=X.I16(6,_BE))<=0||1&d1||d1>X.Sz()))&&!((d1=X.I16(12,_BE))<=0||1&d1||d1>X.Sz())&&X.c("3F006100",a1)&&X.c("3D7C",a1+6)&&X.c("41FA",a1+12)){for(d0=127;d0;){if(X.c("D040D040 D04041FA",a0)){a0+=8,a1=a0+X.I16(a0,_BE) break}if(a0+=2,!--d0||a0>X.Sz())return}k=0 s:for(;;){for(d2=4;d2;){if(d0=64512&X.U16(a1,_BE),(a1+=2)>X.Sz())return if(d0){k-- break s}d2--}k++}for(k++,d5=d6=0,d0=128;d0;){if(E=X.U16(a0,_BE),(a0+=2)>X.Sz())return if(16890===E)break d0--}if(d0){for(smpi1=a0+X.U16(a0,_BE),a0=12+X.I16(12,_BE),d0=128;d0&&(d0--,!X.c("D040D040 41FA",a0));)if((a0+=2)>X.Sz())return for((!d0||(a0+=6,1&(d0=X.I16(a0,_BE)))||(a0+=d0,X.I16(a0,_BE)))&&(a0=0),smpi2=a0,a0=smpi1;;){if(d0=X.U32(a0,_BE),(a0+=4)>X.Sz())return if(!d0)break if(d0>>16){a0-=4 break}}if(a0-=8,smp1=a0-smpi1>>2,d0=smpi2){for(a0=d0;;){if(d0=X.U32(a0,_BE),(a0+=4)>X.Sz())return if(!d0)break if(d0>>16){a0+=4 break}}a0-=8,smp2=a0-smpi2>>2}else smp2=0 d3=smp1,a2=smpi1+X.I32(smpi1,_BE),d1=X.I32(a2,_BE),d2=X.U16(a2+8,_BE),Y=d4=0 do{if(++Y===smp1)break if((a2=smpi1+X.I32(smpi1+(Y<<2),_BE))<20||a2>X.Sz())return if(d4=X.I32(a2,_BE),!(d1>d4)){if(d1!=d4)d6=d4!=X.I32(a2+4,_BE)?X.U16(a2+10,_BE):0,d5=X.U16(a2+8,_BE) else if(d5=X.U16(a2+8,_BE),d2>d5)continue d1=d4,d2=d5}}while(YX.Sz())return if(d4=X.I32(a2,_BE),!(d1>d4)){if(d1!=d4)d6=d4!=X.I32(a2+4,_BE)?X.U16(a2+10,_BE):0,d5=X.U16(a2+8,_BE) else if(d5=X.U16(a2+8,_BE),d2>d5)continue d1=d4,d2=d5}}while(YX.Sz()){if(!X.isHeuristicScan())return bad=!0}return 47===X.U8(s)?(K=s+1,songsz=K-smpsz):(K=s,bad=!0),1}})()&&(sName="Andrew Parton's module (.BYE)",sVersion="v1.2",bDetected=1,bad&&(sVersion+="/malformed"),X.isVerbose())&&sOption("smp:"+smp+" songsz:"+songsz+" smpsz:"+smpsz+" sz:"+outSz(K)),!bDetected&&X.isDeepScan()&&(function(){for(Y=G=0;Y<4;Y++){if(!X.c("6000",G))return if(G+=2,(d2=X.I16(G,_BE))<=0||1&d2)return G+=2}if(X.c("6000",G)){if(G+=2,(d2=X.I16(G,_BE))<=0||1&d2)return if(G+=2,!X.c("6000",G))return if(G+=2,(d2=X.I16(G,_BE))<=0||1&d2)return if(G+=d2,!X.c("48E7FFFE 6100",G))return if(G=(G+=6)+X.I16(G,_BE),!X.c("4DF9 00DFF000",G))return sV="new"}else{if(!X.c("303C0000 662233C0",G))return sV="old"}if("new"===sV){for(a2=special=28,a0=X.I16(2,_BE),F=X.SA(special,X.fStr(special,a0-a2," ")-a2).trim();E=X.U16(a0,_BE),a0+=2,17914!=E||a0>X.Sz(););if(a2=a0,(a0+=X.I16(a0,_BE))>X.Sz()-2){if(!X.isHeuristicScan())return bad=!0}d0=X.I16(a0,_BE),k=d0>>2,a0+=d0+X.I16(a0-2,_BE) do{if(a0>X.Sz()-2){if(!X.isHeuristicScan())return bad=!0}}while(E=X.I16(a0,_BE),a0+=2,1010!=E) K=a0,a='title: "'+F+'" sz:'+outSz(K)}else{for(special=0,a2=16,a0=2,a0+=X.U16(a0,_BE);E=X.I16(a0,_BE),a0+=2,6512!=E||a0>X.Sz(););for(a1=a0-4,a1+=X.I16(a1,_BE);E=X.I16(a0,_BE),a0+=2,16890!=E||a0>X.Sz(););for(a0+=X.I16(a0,_BE),k=a1-a0>>4;E=X.U16(a2,_BE),a2+=2,49916!=E||a0>X.Sz(););for(a2+=4,smpip=a2+X.U16(a2,_BE);E=X.U16(a2,_BE),a2+=2,18426!=E||a0>X.Sz(););for(a0=a2,a2+=X.U16(a2,_BE),songsz=a2;E=X.U16(a0,_BE),a0+=2,18938!=E||a0>X.Sz(););for(;E=X.U16(a0,_BE),a0+=2,18938!=E||a0>X.Sz(););for(a0+=X.U16(a0,_BE),smp=(a0-smpip)/44,d1=0,a1=smpip,a3=21747;0<=(d2=X.I32(a1+32,_BE))&&d1<=d2&&(d1=d2,a3=a1),a1+=44,a0>a1;);d0=X.U16(a3+40,_BE),d1+=d0+d0,smpsz=d1,K=songsz+smpsz,a="smp:"+smp+" songsz:"+Hex(songsz)+" smpsz:"+Hex(smpsz)+" sz:"+outSz(K)}return 1})()&&(sName="Ashley Hogg's module (.ASH)",sVersion=sV,bDetected=1,bad&&(sVersion+="/malformed"),X.isVerbose())&&(1X.Sz()){if(X.isHeuristicScan()){bad=!0 break}return}}while(!X.c("102F00",K+G-3)) return K+=G,ord=Math.floor((K-G)/100),1}})()&&(sName="Cinemaware module (.CIN)",bDetected=1,bad&&(sVersion="malformed"),X.isVerbose())&&sOption("ord:"+ord+" sz:"+outSz(K)+" (sans ext.samples)"),!bDetected&&(function(){if(!(X.Sz()<3e3)){if(X.c("6000.... 6000")||X.c("4EF9.... ....4EF9")||X.c("4EB9.... ....4EF9")){G=8 for(var s=!1;X.c("42280030 42280031 42280032",G)&&(s=!0),G+=2,!s&&G<408;);}if(s){if(X.isVerbose()){for(G=q=d0=d5=0,d7=2048,org=0,smpi=0,songst=0,bad=!1;d7&&GX.Sz())return bad=!0,1 for(smp=synsmp=0,G=smpi;!X.U32(G+28,_BE);G+=32)a2=X.U32(G,_BE)-org,2===(a24=X.U16(a2+4,_BE))||16===a24?smp++:synsmp++}return 1}}})()&&(sName="Ivo Zoer & Ron Klaren's CustomMade module (.CM)",bDetected=1,X.isVerbose())&&(1>16)){if(fmt=1,X.U32(24,_BE)){for(k=0,G=X.U16(0,_BE);G>=2}else fmt=0,k=X.I16(2,_BE)-8>>5 for(bad="",K=0,a1=d2;a1d2?E:d2)>K&&(K=d2),a2+=6 return K>X.Sz()&&(bad=bad.addIfNone("!short")),a2>=X.Sz()?bad=bad.addIfNone("!badsmpinfo"):K+=254,1}})()&&(sName='Dave "Uncle Art" Lowe New module (.DLN)',bDetected=1,sVersion="f."+fmt,""!=bad&&(sVersion+="/malformed"+bad),X.isVerbose())&&(1>=9:d6=8,ruch=d6,d1=X.I16(a0,_BE),songsz=d2=d1<d2&&(d2=d0,d5=X.U16(a0+d4-2,_BE)),a0X.Sz())return bad=bad.addIfNone("!short"),1 K=G+=A}for(Y=0;Ysofs+E&&(minpp=sofs+E) if(G>X.Sz()){bad=bad.addIfNone("!short") break}k++}return 1}}}}}}})()&&(sName="David Whittaker's module (.DW)",sVersion=old?"old":"new",bDetected=1,""!=bad&&(sVersion+="/malformed"+bad),X.isVerbose())&&(1>=2,smp=d1,d1=X.I32(a1-4,_BE)-org,K=d0+d1,smpsz=K-songsz,a1=songpos,a2=a1+len,ptn=0;E=X.U8(a1),ptn>31)return if(d1=(t_=d1)+1&4294967294,a1=32+d1,X.c("'SNX1'",a1)){if(a1+=4,(d1=X.U32(a1,_BE))>>31)return a1+=4,d1=d1+1&4294967294,a1+=d1}else format="Electronic Arts' Simple Musical Score" insinfp=a1,realsmp=[],ins=0 do{if(!X.c("'INS1'",a1))return if(a1+=4,(d1=X.U32(a1,_BE))>>31)return if(a1+=4,63<(d1=d1+1&4294967294)>>24)return if(X.U8(a1+1))return}while(realsmp.push(X.U8(a1)),a1+=d1,ins++,!X.c("'TRAK'",a1)) for(K=a1,trk=0;KX.Sz())return if(-1!=X.I16(d2,_BE)){if(X.I32(d2,_BE)||X.I16(d2+4,_BE))return if(E=X.U8(d2+6),!isWithin(E,128,130))return}d1--}0<(K=X.fSig(d2,512,"FFFF"))&&(K+=2),fmt=1,ext="tiny"}else{for(d3=20,d1=4;d1;){if((d2=X.I32(a0,_BE))<=0||1&d2)return a0+=4,d3+=d2,d1--}if(d3>=X.Sz())return for(a0+=4,d1=4;d1;){if(!(32768&(E=X.U16(a0,_BE))))return if(65535!=E&&132>16)return a0+=X.I32(a1,_BE),a1+=4,d1--}if(!X.U8(a0))return if(0<(K=X.fSig(a0,512,"0000"))){for(;a0X.Sz()&&(bad=bad.addIfNone("!short")),G=i+X.I16(i+6,_BE),ptn=0;Gptn&&(ptn=d1) for(ptn++,X.I16(G,_BE)||(G+=2),X.I16(G,_BE)!=ptn&&(bad=bad.addIfNone("!badptn")),q=a0+32,smp=d1=X.I16(q,_BE),q+=16,d7=0;d1&&qX.Sz())){a2=X.I32(4,_BE),d6=d7=0,d0=X.I16(36,_BE) do{if(a1>X.Sz())return}while(a1=X.I16(a2,_BE),a2+=2,226===X.U8(a1)&&(128&X.U8(a1+1)?d7++:d6++),0<=--d0) return d7>=d6?void 0:(ptn=X.I16(40,_BE)+1,smp=X.I16(50,_BE),a0=X.I32(24,_BE)+10*smp,smpsz=X.I32(a0-10,_BE)+2*X.I16(a0-6,_BE),K=s+smpsz,k=X.I16(48,_BE),1)}}})()&&(sName="Jochen 'Mad Max' Hippel's module (.HIPC)",sVersion="packed",bDetected=1,X.isVerbose())&&(1X.Sz()||a1>X.Sz())return if(128!=d1&&(E=X.I16(a1,_BE),a1+=2,16890===E)&&0<=(d2=X.I16(a1,_BE))&&!(1&d2)&&(a0=a1+d2),X.c("'MMME'",a0)){d0=2 break}if(X.c("'TFMX'",a0)){if(512<=X.I16(a0+4,_BE))d0=0 else if(X.I16(a0+16,_BE)){for(d0=X.I16(a0+4,_BE),a1=a0+32,d6=d7=0;226===X.U8(a1)&&(128&X.U8(a1+1)?d6++:d7++),a1+=64,0<=--d0;);d0=d6>d7?2:5}else d0=0 break}if(X.c("'COSO'",a0)){if(!X.I16(a0+48))return if(!X.I32(a0+24))return if(X.c("'TFMX'",a0+32)){a2=a0+X.I32(a0+4,_BE),d6=d7=0,d0=X.I16(a0+36,_BE) do{if(X.I16(a0+64,_BE)?(a1=a0+X.I16(a2,_BE),a2+=2):(a1=a0+X.I32(a2,_BE),a2+=4),a1>X.Sz())return}while(226===X.U8(a1)&&(128&X.U8(a1+1)?d7++:d6++),0<=--d0) d0=d7>=8,G=a1+1,r=[];E&&G>=8,G=a1+1,r=[];E&&GX.Sz())return B+=j}return 255<(ord=X.U16(6+40*smp,_BE))?void 0:(ptns=6+40*smp+2,!(255<(ptn=X.U16(ptns+6*ord,_BE)))&&(ptn0=X.U32(ptns+2,_BE),ptns+=6*ord,trkdtsz=X.U32(ptns-4,_BE)-ptn0,addlns=4*X.U8(ptns-5)*8,K=ptns+2+2*ptn+B+trkdtsz+addlns,1))}})()&&(sName="JamCracker/Pro module (.JAM,.JC)",bDetected=1,bad="",X.isHeuristicScan()&&(K+19==X.Sz()&&(sVersion="v1.0a (Xag)",X.isVerbose()&&sOptionT(X.SA(K,19)),K+=19),X.c("'BeEp'")||(bad=bad.addIfNone("!badsig"))),""!=(bad=K>X.Sz()?bad.addIfNone("!short"):bad)&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose())&&sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(K)),!bDetected&&X.isHeuristicScan()&&(function(){if(2==X.U16(0,_LE)&&X.c("00FF01FF02FF03FF04FF05FF06FF07FF08FF09FF0AFFFD00",54)&&!(!(seqt=X.U16(4,_LE))||seqt<30||seqt>=X.Sz()||!(inst=X.U16(6,_LE))||inst<=seqt||inst>=X.Sz())){for(ins=X.Sz()-inst>>4,mptn=65535,ch=0,trk=[],Y=0;Y<11;Y++)if(G=X.U16(10+2*Y,_LE),trk[Y]=G){if(ch++,G<=seqt||G>=inst)return G>1,Y=0;Y<5;Y++)if(trk[Y]){if(G=X.U16(seqt+2*Y,_LE),65023!=X.U16(G-1,_LE))return if(G<=seqt||G>=inst)return}return Y=X.U16(2,_LE),tmr=(1193810/(Y||65535)).toFixed(2),1}})()&&(sName="Johannes Bjerregaard Adlib module (.JBM)",bDetected=1,X.isVerbose())&&sOption("tmr:"+tmr+" ch:"+ch+" ptn:"+ptn+" ins:"+ins),!bDetected&&(function(){if(X.c("'SONG'",60)&&660ptn&&(ptn=E) ptn++,K=ordp+130+1024*ptn+smpsz,31==msmp&&(K+=6),(lp=X.U8(ordp+1))>ord&&(sVersion=sVersion.appendS("malformed!badloop","/")),sOption("tmp0:"+tmp0+" ord:"+ord+" ptn:"+ptn+" smp:"+smp+(lp?" loop:"+lp:"")+" sz:"+outSz(K))}if(!bDetected&&(function(){if(fmt="",smp=smpp=0,K=-1,k=1,X.c("6000")){G=0,d1=3 do{if(!X.c("6000",G))return if((E=X.I16(G+2,_BE))<=0||E%2)return}while(G+=4,d1--) if(G=p0=6+X.I16(6,_BE),X.c("4A406B00",G)){if(!X.c("000641FA",G+4))return if(G=(G+=8)+(X.I16(G,_BE)+4),!X.c("00017FFF",G))return fmt="second" var s=G=p0+8+X.I16(p0+8,_BE) for(G+=8,k=0,d2=X.I32(G+10,_BE);G=X.Sz())););if(G>X.Sz())return if(K=G,G=s,d1=X.U32(G,_BE),(d2=X.U32(G+18,_BE))<=d1)G+=d1 else if(d3=d2-X.I32(G+22,_BE),35944==(K=d2+d3+G)&&--k,K>X.Sz())return}else{if(G-=4,X.c("C0FC",G))G+=2 else for(Y=0;Y<16&&GX.Sz())return for(mulu=X.I16(G,_BE),q=(G+=800)+900;GX.Sz())return for(fmt="old",G=p0;G=X.Sz())););if(G>X.Sz())return for(K=G,G=10+X.I16(10,_BE);GX.Sz()||!X.c("'FORM' 00?????? '8SVXVHDR'",G))return for(;G=X.Sz())););if(G>X.Sz())return K=G,fmt="harald"}else{if(512<(G=X.U16(0,_BE))||G<4||G%2)return for(G+=2,Y=2;Y>=1,1==--k||!X.c("0000",d3-6)&&X.c("7F00",d3-4)||k--,smp0p=X.U16(G,_BE) var t=hi=X.U24(smp0p+15,_BE) for(smp=A=0;GX.Sz())return if(smp++,pp=X.U16(G,_BE),t>(sofs=X.U24(pp+15,_BE))&&(t=sofs),hi<=sofs&&(hi=sofs,A=X.I16(pp+18,_BE),X.c("'BODY'",sofs-8)||(sofs=X.U32(pp+20,_BE))>hi&&(hi=sofs,A=2*X.U16(pp+24,_BE))),hi>X.Sz())return pptrks&&(trks=k_) if(1024!=U&&0!=trks&&!(1536+192*trks+192>X.Sz())){for(U=0;U<=trks;U++)for(j=0;j<64;j++)if(36X.Sz())&&(sVersion="malformed!short"),!bDetected&&(function(){if(trk=X.U16(0,_BE),d2=X.U16(2,_BE),d3=X.U16(4,_BE),smp=X.U16(6,_BE),G=8,trk&&!(4>16||!E)return trks.push(E),mpptn&&(ptn=l)}if(ptn++,!((tempo=X.U8(64))<3||30smplm||smpst<49152||smplm<49152)return if((smplp<49152||smplp>smplm||smpst>smplp||49152ord&&(ord=Y),ptn.indexOf(o)<0&&ptn.push(o)}if(ord++,ptn=ptn.length,nonz=!1,!((lp=X.U8(1))>ord)){for(smp=opl=smpsz=0,Y=0;Y<32;Y++){if(X.U8(2+13*Y+12)||X.U32(418+16*Y)||X.U8(930+13*Y+12))return var s=X.U32(418+16*Y+4),e=X.U32(418+16*Y+8),t=X.U32(418+16*Y+12) if(1048575ptnend&&(ptnend=G+M),i=0;GX.Sz());){for(a1=2;a1<=46&&!(!(E=X.U16(a1,_BE))||1&E||E>X.Sz()||d0<=E);a1+=2);if(a1<48)break fmt=3840==(3840&X.U16(E,_BE))?2:1 break}if(!fmt){if(X.I16(0,_BE)||X.I16(128,_BE)||!X.c("00000CBE",132)||!X.c("000308BE",3254)||!X.c("000309BE",3258))return fmt=3}if(smpsz=smp=0,k=1,3==fmt){if((K=X.U32(2234,_BE)+2)<2236||K>X.Sz())return for(t0=X.U32(0,_BE),Y=4;Y<128;Y+=4){if(t1=X.U32(Y,_BE),(E=t1-t0)<0)return smpsz+=E,E&&smp++,t0=t1}if(smpsz+=128,7382==K&&19290==smpsz)k=16 else for(k=0,a1=1726;d0=X.U32(a1,_BE),a1+=4,65280!=X.U16(d0,_BE)&&(k++,a1>1,Y=X.U16(2,_BE);Y>16),s.push(65535&a2),t("33FC0001"),a2+=4,rel=X.U32(a2,_BE),r("41F9"),s.push(a2>>16),s.push(65535&a2),d1=X.I32(a2,_BE),r("B1FC"),d0=X.U32(a2,_BE),k=d0=d0-d1>>4,r("41F9"),s.push(a2>>16),s.push(65535&a2),r("B1FC"),s.push(a2>>16),s.push(65535&a2),r("303C"),t("48E7FFFE ........ 6100"),s.push(a2>>16),s.push(65535&a2),r("41F9"),s.push(a2>>16),s.push(65535&a2),d2=X.U32(a2,_BE),r("B1FC"),d3=X.U32(a2,_BE),(d3=d4=d3-d2)%24) if(d3=Util.divu64(d3,24),e){if(e=(d4+=4)%24,d4=Util.divu64(d4,24),e)return i("@d436 error 5"),0 if(d3=d4,X.c("4654443C",2008))for(a3=1904,d4=2;0<=d4;d4--)a3-=4,wpU32be(a3+4,rpU32be(a3))}if(s.push(d3>>16),s.push(65535&d3),r("4BF9"),d5=rpU32be(a2)-rel,a2>X.Sz())return i("@d464 a2 too high"),0 if(X.isDeepScan()){s.push(d5>>16),s.push(65535&d5),s.push(0),a5=20178,s.push(a5>>16),s.push(65535&a5),a3=(s[0]<<16)+s[1] s:for(;a3>16!=223&&(wpU32be(a3,a3_-rel),a3+=4) break case 13305:a3+=2,(a3_=rpU32be(a3))>>16==223||wpU32be(a3,a3_-rel),a3+=4,(a3_=rpU32be(a3))>>16!=223&&(wpU32be(a3,a3_-rel),a3+=4) break default:if((a3+=2)>=d5)break s}if(d4=d3,a2=(s[10]<<16)+s[11],a2=rpU32be(a2),a2_=rpU32be(a2)-rel,wpU32be(a2,a2_),d2=a2_,d5=a2_+2*rpU32be(a2+4),a2+=24,a2_=rpU32be(a2),128<(d3-=2))return i("@d51a badsmp:"+Hex(d3)),0 for(;0<=d3;)a2_-=rel,wpU32be(a2,a2_),d5<=a2_&&(d5=a2_+2*rpU32be(a2+4)),d2>a2_&&(d2=a2_),a2+=24,a2_=rpU32be(a2),d3-- if(s.push(a2>>16),s.push(65535&a2),a2=rpU32be((s[4]<<16)+s[5]),a3=(s[6]<<16)+s[7],a3_=rpU32be(a3),d3=Util.divu64(a3_-a2,24),s.push(d3),smp=d3+d4,d4=d3,a2_=rpU32be(a2),128 80h"),0 for(;0a2_&&(d2=a2_),a2+=24,a2_=rpU32be(a2),d4-- for(a2>(s[19]<<16)+s[20]&&(s[19]=a2>>16,s[20]=65535&a2),d0<<=2,a2=rpU32be((s[2]<<16)+s[3]),a2_=rpU32be(a2),d3=0;4294967295!=a2_&&d3d3){if(d5>X.Sz())return i("@d5ce error 1C"),0 for(a2=d2,a1=(s[19]<<16)+s[20];rpU16be(a1)==d0&&(a1+=6,wpU32be(a1,rpU32be(a1)-rel)),(a1+=2)!=a2&&a1X.Sz())return i("@d5ee error 1C"),0 for(a2=d3;a2>16&&(a1+=6,a1_=rpU32be(a1)-rel,wpU32be(a1,a1_),d3K&&(K=a3),a3>X.Sz())return if(X.c("FF02",a3+6))k++ else{if((E=X.U32(a3+2,_BE))>X.Sz())return smp++,d3+=E,d0X.Sz()||K>X.Sz()?void 0:(smpsz=d3,1)}})()&&(sName="Michel Pernot's Silmarils module (.MOK)",bDetected=1,bad="",33")),""!=(bad=3232"):bad)&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose())&&(1=ord||1<(looping=X.U8(24))))){for(nV=X.U16(6),G=156,K=-1,bad="",maxptn=maxtrk=64,maxtml=128,ptn=X.U32(G),trk=X.U32(G+4),G+=8,1<=nV&&(maxptn=X.I32(G),maxtrk=X.I32(G+4),maxtml=X.I32(G+8),G+=12),G+=16*maxptn+maxtrk*maxtml,trks=[],Y=0;Y<64;Y++)""!=(E=X.SA(G,64).trim())&&trks.push(E),G+=64 for(ptns=[],Y=0;Y<64;Y++)""!=(E=X.SA(G,64).trim())&&ptns.push(E),G+=64 if(ins=X.U32(G),!((G+=4)>X.Sz())){for(inss=[],totalops=0,Y=0;YX.Sz()&&(bad=bad.addIfNone("!short")),1}}})()&&(sName="Buzzic module (.buz2)",bDetected=1,sVersion="v2."+nV.padStart(2,"0"),X.isVerbose())&&sOption("bpm:"+bpm+" trk:"+trk+" ptn:"+ptn+" ins:"+ins+" g.vol:"+Math.round(100*gvol)+"% ops:"+totalops+" sz:"+outSz(K)),!bDetected&&(function(){if(X.c("000200")&&X.c("FF000F",X.U16(4,_BE)+1)){for(K=X.U16(16,_BE)+2,Y=10,oldp=X.U16(8,_BE);Y<32;Y+=2)if(16!=Y){if((G=X.U16(Y,_BE))<=oldp||G+1>X.Sz())return if(!X.c("FF",G+1))return oldp=G}return 1}})()&&(sName="Infogrames (RobHubbard2) module (.DUM&.INS)",bDetected=1,X.isVerbose())&&sOption(outSz(K),"sz:"),!bDetected&&(function(){if(X.c("6000")&&!((d2=X.U16(2,_BE))<=0||d2%2)){for(a1=2,a0=4,Y=0;Y<3;Y++){if(!X.c("6000",a0))return if(E=X.U16(a0+2,_BE),a0+=4,E<=0||E%2)return}if(a1+=d2,X.c("6000",a0)){for(Y=0;Y<3;Y++){if(!X.c("6000",a0))return if(E=X.U16(a0+2,_BE),a0+=4,E<=0||E%2)return}if(X.c("6000",a0))return}else{if(!X.c("6100",a1))return a1+=4}return X.c("41F9",a1)?(a1+=6,!!X.c("43F9",a1)):void 0}})()&&(sName="M.Cannon & J.Dunn's Special FX module (.JD)",bDetected=1),!bDetected&&(function(){if(!(X.Sz()<2300)&&(X.c("00000000")||X.c("0101")||X.c("00000101")||X.c("6000"))){for(var s=0,e=140,t=X.Sz()-4;s=X.Sz())){for(;0X.Sz()&&(bad=bad.addIfNone("!short"),a=2),!(a=a||(K=e,n)?a:1))for(;t>=3),0X.Sz()||a0%2||(a0+=X.U16(a0,_BE))%2||!X.c("005800B0",a0+4)||(sName="Tronic Delta Packer module (.DP)",bDetected=1,sOption("in:TronicTracker(?)")),!bDetected&&(function(){if(X.U16(0)&&(smp=X.U8(2))&&!((ord=X.U8(3))<2||!(d2=smpsz=X.U32(4,_BE))||d2%2||d2>X.Sz()||524288d2)return if(64X.Sz()||d2!=d0+X.I32(a0-16,_BE)?void 0:(K=a0+smpsz,1)}}})()&&(sName="Andrew Bailey & David Hanlon's Digital Sonix & Chrome module (.DSC)",bDetected=1,X.isVerbose())&&(1mtln&&(mtln=tln),dur>mdur&&(mdur=dur),G+=15,insev+=E=X.U16(G),G+=2+14*E+15,volev+=E=X.U16(G),G+=2+6*E+15,pitev+=E=X.U16(G),G+=2+6*E}return K=G,1}}})()&&(sName="Ad Lib's AdLib Visual Composer pianoroll (.ROL)",bDetected=1,X.isVerbose())&&("\\roll\\default"!=(_=X.SA(4,40))&&sOption(_),sOption("ch:"+(ch!=voices?ch+"/":"")+voices+" rhythm:"+X.U16(44)+"/"+X.U16(46)+" bpm0:"+bpm0.toFixed(1)+" len:"+mdur+" notes:"+notev+" ins.ev:"+insev+" ins.ev:"+insev+" vol.ev:"+volev+" pitchev:"+pitev+" sz:"+outSz(K))),!bDetected&&(function(){if(!(X.Sz()<428)&&X.c("'GYMX'")){for(Y=4;Y<424;Y++)if(isWithin(X.U8(Y),1,10)||isWithin(X.U8(Y),14,31))return return(unpsz=X.U32(424))<=2&&parseMDGYM(428,X.isDeepScan()?BCParseToEoF:BCParseToReasonable)<=0?void 0:1}})()&&(sName="Sega Genesis/Mega Drive YM2612 chiptune (.GYM)",bDetected=1,unpsz<=2&&(sVersion=sVersion.append("unpacked")),X.isVerbose())&&(sOptionT(X.SC(4,32,"CP1252")),sOptionT(X.SC(36,32,"CP1252"),"for: "),sOptionT(X.SC(68,32,"CP1252"),"at: "),sOptionT(X.SC(100,32,"CP1252"),"emu: "),sOptionT(X.SC(132,32,"CP1252"),"by: "),sOptionT(X.SC(164,256,"CP1252")),2=p1)){var s=G for(E=Math.min(X.Sz(),131072);G=X.Sz()||E<=G)&&(fmt="old",X.c("177C0000",G-8)&&(fmt="new",G-=6),X.c("00BFE001",G-6))){if(G=base,k=1,d0=0,X.c("1740",G+6)||X.c("1740",G+4)){for(;G=songsz)););}else{for(G=base+2;GK||d2%2||1023&(d2-=704)||(ptn=d2>>=10,d2--,G=444,X.U8(G))||(ord=d1=X.I8(G+1))<0)){for(G+=4,d2<<=10,d3=0;d1;G+=2,d1--){if(1023&(E=X.I16(G,_BE)))return d3d3;)d4=X.U32(a3,_BE),a3+=d4,d3+=d4,smp++ if(k=1,nv=0,sv="",X.U32(28,_BE))switch(K){case 95960:k=2 case 54544:sv="v4.0" break case 81906:sv="v5.0"}else switch(K){case 126446:k=3,sv="v3.0" break case 136612:k=2,sv="v3.0" break case 154704:k=2 case 103808:sv="v3.2"}for(G=64,ptn=0;G<576;G+=2)X.U16(G,_BE)&&ptn++ return 1}})()&&(sName="Holger Gehrmann's Soundcontrol module (.SCT)",sVersion=sv,bDetected=1,X.isVerbose())&&(sOptionT(F),1X.Sz())){for(lastfound=!(k=16),G=19;4<=G;G--){if(15<(E=X.U8(G)))return !lastfound&&E&&(k=G-4,lastfound=!0)}for(m=X.U32(20,_BE),G=24;G<276;G+=4){if(2097152<(E=X.U32(G,_BE))||KE&&(m=E)}if(276==m){if(X.isDeepScan()){for(G=276,smp=smpsz=0;G>=2,smpp[d1]=G,d4=X.U16(G+2,_BE)<<1,smpsz+=d4-38,smp++,G+=d4):G+=2}if(!smp||32>4,r=(1&X.U8(G))<<4|X.U8(G+1)>>4 if(12X.Sz()||E%2)return if(E=X.I16(6,_BE)+6,X.c("49FA....1940....4E75 43FA.... 49FA.... 41FA.... 45FA",E)&&X.c("'FORM'66",E+28)&&(E=X.I16(10,_BE)+10,X.c("49FA....4CFA00FF",E))&&X.c("103A.... 660C 1940.... 6100... .6000",E+10)&&X.c("2A4C DAD8 22CD 2A4C DAD8 22CD 2A4C DAD8 22CD",E+52)&&(E=X.I16(14,_BE)+14,X.c("70002A7C 00DFF0A8 3A803B40",E))&&X.c("1A801B40 00011B40 00021B40",E+26)&&(initp=X.I16(2,_BE)+2,X.c("43FA....49FA....41FA....45FA",initp))&&X.c("'FORM'66",initp+18)){for(a0=0,G=initp;G>3,G=a0,smp=0;GX.Sz())){for(a0=0;G>=2,1}}}})()&&(sName="Illusions/Microdeal Quartet module (SQT.)",sVersion="PSG synth",bDetected=1,X.isVerbose())&&(1ped0||lp0>ped0)return if(G=16+12*k,!X.c("'OVTB'",G))return if(ord=X.I32(G+4,_BE),ped0>ord)return if(G+=24+(ord<<4),!X.c("'NTBL'",G-16))return if(ntbl=X.I32(G-12,_BE),G+=ntbl<<2,!X.c("'INST'",G-8))return for(ptn=Util.divu64(ntbl,16),ins=X.I32(G-4,_BE),inss=[],Y=0;YX.Sz()||!X.c("00000028",G))return if(spd0=X.U16(G+40,_BE),irqps0=X.U16(G+50,_BE),lp0=X.U16(G+48,_BE),!isWithin(spd0,2,16)||!isWithin(irqps0,16,120))return;(1==(k=(X.I32(G+4,_BE)-40)/12)||X.I16(G+60,_BE)<0)&&(k=1) var s=[0] for(Y=0;Y<8;Y++){if(E=X.I32(G,_BE),G+=4,E<=0||E%2||EX.Sz())return for(Y=0;Y>2,d0=X.I32(l+4,_BE),d1=2*X.I16(l+2,_BE)+d0,smp=1;Yd1&&(d1=d4),smp++) for(songsz=d0-s,K=d1-s,Y=0;Y<262144&&!X.c("4E75",Y-2);Y+=2);return specialmsg="",2!=(d1=X.U8(Y-3))&&(specialmsg=X.SC(Y,256,CPAmiga)),1}}}}}}}}})()&&(sName="Jeroen 'WAVE' Tel's module (.JT)",bDetected=1,X.isVerbose())&&(""!=specialmsg&&sOption(specialmsg),1X.Sz())&&X.c("FFFFFFFF00000000",smpp+204)&&212==X.U32(smpp+68,_BE)){for(smp=0,G=smpp+72,Y=0;Y<16&&G=ptn&&o<254)return if(o<128&&!(E=X.U8(241+Y)))return if(15A)return if([1048575,15794175,4294967295].indexOf(slpe)<0&&(slpe>A||slpeord||(ord++,1<(floop=X.U32(36516))))){for(Y=0;YMath.min(X.Sz(),18944))return if(1trk)return var e=X.I8(G+130) if(e<0&&-e>trk)return e=X.U8(G+131) if(127trk)return e||susv++,t||susv++ e=X.U8(G+133) if(3trk)return s=X.I8(G+140) if(s<0&&-s>trk)return t=X.U8(G+141),e=X.U8(G+142),s=X.U8(G+143) if(127trk)return e=X.I8(G+145) if(e<0&&e>trk)return s=X.U8(G+146),t=X.U8(G+147) if(1273*ins)){for(Y=18948;Y<20100;Y++)if(127ptn)return 0ord||(ord++,1<(floop=X.U32(37028))))){for(Y=0;YMath.min(X.Sz(),18944))return if(1trk)return var e=X.I8(G+130) if(e<0&&-e>trk)return e=X.U8(G+131) if(127trk)return e||susv++,t||susv++ e=X.U8(G+133) if(3trk)return s=X.I8(G+140) if(s<0&&-s>trk)return t=X.U8(G+141),e=X.U8(G+142),s=X.U8(G+143) if(127trk)return e=X.I8(G+145) if(e<0&&e>trk)return s=X.U8(G+146),t=X.U8(G+147) if(127trk||t<0&&-t>trk)return}if(!(susv>3*ins)){for(Y=19460;Y<20612;Y++)if(127ptn)return 0X.Sz()&&(vd=-1,sus++),241!=X.U8(vd-2)&&241!=X.U8(vd-3)&&(vd=-1,sus++),G+=2),X.c("0014",G)||X.c("0022",G)){if(m=Math.min(1048575,X.Sz()-2),crypt)K=X.fSig(ofs+20,m,"'protected by cryptmdx v1.00 (c)1995 H.Yano'00")+43,usedch=ch,bpm0=0 else{var e=chn=oldchn=X.U16(G,_BE)+ofs if(!isWithin(chn,G,m))return s(chn,"!chn"+Hex(G)+"-"+Hex(m)),0 ch=(chn-ofs-2)/2,usedch=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],notes=vdn=mp=0,vds=[] var t=bpm0=-1,r=[],i=[0,1] if(X.isDeepScan())for(visited=[],Y=0;Ymp&&(mp=G),U==ch?chn=isWithin(vd,oldchn+2,X.Sz())?vd:m:(chn=X.U16(G,_BE)+ofs,isWithin(chn,oldchn+2,m)&&(241==X.U8(chn-2)||241==X.U8(chn-3))||(chn=oldchn,usedch[U-1]=!1),isWithin(chn,oldchn+2,m)||(s(chn,"!p="+Hex(G)+",ch["+U+"] not between "+Hex(oldchn+2)+" and "+Hex(m)),sus+=2),241!=X.U8(chn-2)&&241!=X.U8(chn-3)&&(bad=bad.addIfNone("!badchnend@"+Hex(chn-2)+"="+Hex(X.U24(chn-3,_BE))),X.isDeepScan()||sus++)) var n=clk=0 if(X.isDeepScan())for(t=oldchn,stop=!1;!stop&&t!=chn&&tmp&&(mp=t) var a=X.U8(t++) if(a<128)clk+=a+1 else if(a<=223)n++,notes++,usedch[U-1]=!0,clk+=X.U8(t++)+1 else switch(a){case 255:bpm0<0&&(bpm0=X.U8(t)),t++ break case 254:p=X.U8(t),b=X.U8(t+1),isYM2151Reg()?8==p&&200&b?(n++,notes++,usedch[7&b]=!0):isWithin(p,96,127)&&(i[0]=!0):(sus++,bad=bad.addIfNone("!OPMreg@"+Hex(t-2))),t+=2 break case 253:E=X.U8(t++),vds.indexOf(E)<0&&vds.push(E) break case 252:t++ break case 251:E=X.U8(t++),isWithin(E,22,127)&&(bad=bad.addIfNone("!FB@"+Hex(t-2)+"="+Hex(E)),sus++),i[0]=1 break case 250:case 249:case 247:case 238:case 232:break case 248:(E=X.U8(t++))||(bad=bad.addIfNone("!F8@"+Hex(t-1)),sus++) break case 246:X.U8(t+1)?t++:t+=2 break case 245:246!=X.U8(t+X.I16(t,_BE)-1)&&(bad=bad.addIfNone("!F5→F6@"+Hex(t)),sus++),t+=2 break case 244:245!=X.U8(t+X.I16(t,_BE)+1)&&(bad=bad.addIfNone("!F4→F5@"+Hex(t)),sus++),t+=2 break case 243:case 242:t+=2 break case 241:X.U8(t)?(r[U]=t+2+X.I16(t,_BE),isWithin(r[U],e,m)||(bad=bad.addIfNone("!loopOOB@"+Hex(t-1)),sus++),visited[r[U]]?(stop=!0,t+=2):t=r[U]):t++,0mp&&(mp=t)}if(n&&(usedch[U-1]=!0),oldchn=chn,8mp&&(mp=G) o.sort(function(s,e){return s-e}),vds.length&&(bad+="!missingInst"+outArray(vds,16)),K=mp+27}K=X.isDeepScan()?mp:-1,vd==X.Sz()&&(K=vd)}return 1}}}})()&&(sName="Konami's X68k Music Data eXtended module (.MDX)",bDetected=1,""!=pdxfn&&(sVersion=sVersion.appendS("+ "+pdxfn," ")),9smp||1048576<(A=X.U32(t+50))||64A||X.U32(t+61)>A){e=!0 break}t+=65}}smps=[] var r=0 for(rsmp=0,Y=0;Ytrkc&&(trkc=E) for(Y=0;Yrptn&&(rptn=e[Y]+1) if(e=void 0,!(rptn>ptn||(lp=X.U8(G++))>=ord)){if(bpm=X.U16(G),G+=2,4&s&&(bpm=5*bpm/2),128&s&&(G+=512),16&s&&(G+=576),32&s?(actch=X.U16(G)<<16,G+=2):actch=-1,trk=0,2&s)for(;trkA+2)return smpsz+=A}if(!(smpsz<=4)){ord=X.SA(1,1)<"4"?(X.U8(5)>>1)-1:X.U8(5),G=16+16*smp var s=X.U32(8,_BE),e=X.U32(12,_BE),t=X.U32(16,_BE),r=0 if(G!=e&&(s-=r=e-G,e-=r,t-=r),isWithin(s,G,X.Sz())&&isWithin(e,G,X.Sz())&&isWithin(t,G,X.Sz())){for(Y=G=0;YG&&(G=Q-r,A=X.U16(24+16*Y,_BE))}return K=4+t+G+(A<<1),1}}}})()&&(sName="Jarno 'Guru' Paananen's The Player module (."+X.SA(0,2)+"X,."+X.SA(0,4)+")",sVersion="v"+X.SA(1,1)+"."+X.SA(2,2),bDetected=1,X.isVerbose())&&sOption("ord:"+ord+" ptn:"+ptn+" smp:"+smp+" sz:"+outSz(K)),!bDetected&&Vs()&&(sName="Jarno 'Guru' Paananen's The Player module (.P"+sv[0]+"X,.P"+sv[0]+sv[2]+"A)",sVersion="v"+sv+"A",bDetected=1,dtsmp&&(sVersion=sVersion.appendS("deltasmp","/")),pksmp&&(sVersion=sVersion.appendS("packedsmp","/")),X.isVerbose())&&sOption("ord:"+ord+" ptn:"+(mptn!=ptn?mptn+"/":"")+ptn+" smp:"+smp+(0K&&(K=E) if(!(((K+=64)-6800)%3)){if(k=11792==K?5:10112==K?3:1,ptn=Util.divu64(Util.divu64(K-6800,3),X.U8(41)+1),bad="",1024bpm&&(mbpm=bpm),Mbpm(endpos=X.U32(G+96)))return if((looppos=X.U32(G+104))>endpos)return if(!isWithin(E=X.U16(G+146),1,16))return if(ch=ptn||!X.U16(o+2)||-121&X.U16(o+2))return "Empty"!==(E=X.SC(G+114,32,"CP1250"))&&""!==E.trim()&&titles.push(E.trim()),ord.push(endpos)}for(G+=64*ptn*5,Y=0;YX.Sz()?void 0:(G+=256,1)}})()&&(sName="Reinier 'Rhino' van Vliet's Jaytrax/Syntrax module (.JXS)",sVersion="v."+X.U32(0),bDetected=1,X.isVerbose())&&(1startpos?"("+looppos+"-)":"")+endpos,sOption("ch:"+ch+" bpm:"+mbpm+(mbpm!=Mbpm?"-"+Mbpm:"")+" ord:"+ord+" ptn:"+ptn+" ins:"+ins+" smp:"+smp+" sz:"+outSz(G))),!bDetected&&(function(){if(33==X.U8(0)&&128==X.U8(9)&&(ord=X.U16(1))&&(ins=X.U16(3))&&(smp=X.U16(5))&&!(smp>ins)&&(ptn=X.U16(7))&&isWithin(mvol=X.U8(10),1,32)&&isWithin(spd=X.U8(11),1,32)&&isWithin(tmp=X.U8(12),32,160)&&!(charStat(X.readBytes(13,26),1).indexOf("allxsc")<0)){for(G=39;G<103;G++)if(64=ptn)return if(255==X.U8(G-1)){var s for(rins=0,rsmp=0,bad="",Y=0;YX.U8(G+2)||X.U8(G+3)>X.U8(G+4))return G+=5+3*X.U8(G)}rins++}}for(Y=smpsz=0;Y>2|s[1]>>4 if(63&s[0]&&(notes++,debug)&&e>msmp&&(bad=bad.addIfNone("!missingsmp#"+e)),!1&s[1]){k++ break}}while((a0+=3)slen+2&&(S(42+30*U,"!smp "+U+" LpLen "+sll+" > sSz "+slen),bad=bad.addIfNone("!sLpLen>sSz")),slen&&sls>=slen&&(S(46+30*U,"!smp "+U+" LpStart "+sls+" >= sSz "+slen),bad=bad.addIfNone("!sLpStart>=sSz")),sls&&!sll&&(S(42+30*U,"!smp "+U+" LpStart "+sls+" LpSz 0"),bad=bad.addIfNone("!sLpStart0LpSz")),sls&&!slen&&(S(46+30*U,"!smp "+U+" LpStart "+sls+" sSz 0"),bad=bad.addIfNone("!sLpStart0SSz"))}if(B<8||!allvols)return S(20,"!smps too small or no smpvols"),0 if(!(128<(ord=X.U8(470))||220<(restartp=X.U8(471)))){for(restartp&&!/jjk55/.test(X.SA(0,6))||(restartp=120),bpm0=125,120!=restartp&&(bpm0=(88672375/(6100*(240-restartp))).toFixed(2),r=1=badptn&&(badptn=ptn+1),k&&ord_++}if(ord_++,(songszoffptn=600+1024*offptn)>X.Sz())return S(songszoffptn,"!patterns cut off"),0 for(e=tnDxx=notes=0,Y=0;Y>4),p=((15&k[0])<<8)+k[1],d=15&k[2] if(0<=usedptns.indexOf(Y)&&(15=offptn&&64Math.max(512,128*ptn))return S("!badbytes:"+e),0 nDxx&&nDxx<3&&(r=6),tnDxx+=nDxx}if(tnDxx>ptn+32&&6==r&&(r=5),X.isDeepScan())switch(r){case 0:tracker="Karsten Obarski's Ultimate ST 1.0~21" break case 1:tracker="Karsten Obarski's Ultimate ST 1.8~2.0" break case 2:tracker="The Exterminator's ST 2.0 / D.O.C.'s ST II" break case 3:tracker="Il Scuro/Defjam's ST III / Alpha Flight ST IV / D.O.C.'s' ST IV / VI" break case 4:tracker="D.O.C.'s' ST IX" break case 5:tracker="Tip/The New Masters' Master ST 1.0" break case 6:tracker="D.O.C.'s ST 2.0~2" break default:tracker="???"}K=600+1024*ptn+B var c=Math.abs(K-X.Sz()),m=Math.abs(ord-ord_),f=ord||1e-4,l=0 return(20X.Sz()&&l++,restartp||l++,ord&&ord_&&!(badptn>ptn+2)||l++,.8X.Sz()&&(bad=bad.addIfNone("!short")),l&&(bad=bad.addIfNone("!sus+"+l)),1)}}function b(s){for(var e=0,t=0;tord)||(smpp=X.U32(6))>X.Sz())){for(G=10,Y=0;Y=ptn)return for(ptnpt=G,G+=4*ptn,Y=smpsz=0;Ysmpp-3)return if(ptnend=Y>=ptn-1?smpp:ptnp+X.U32(ptnpt+4*Y+4),!isWithin(ptnend-G,3,4096))return for(i=0;GX.Sz()||16384E&&(p0=E)}}if(!ins)return s(p0,"!0inst"),0 if([0,9].indexOf(15&X.U8(166))<0)return s(p0,"!0ptnptr"),0 for(ptn=t0=0,G=166;G<294;G++){if(E=(X.U8(G+128)<<8)+X.U8(G)-X.U16(2)+6,p0>E&&(p0=E),E<0||E<=t0)return s(E,"!-ptnptr"),0 if((t0=E)&&!isWithin(E,416,bin[1][0][1]+6))return s(E,"!ptnptr"),0 E&&255!=X.U8(E)&&ptn++}for(ord=p0-422>>4,G=423,pt=-1,ic=0;G=pt&&(pt=X.U8(G)+1)) return 1}})()&&(sName="Marcin 'Jaskier' Lewandowski's Theta Music Composer module (.TMC,.TM4,.TM8)",sVersion="v1.x",bDetected=1,ic&&(sVersion=sVersion.appendS("malformed!"+ic+"ptns","/")),X.isVerbose())&&(sOption(decAnsi(6,30,CPATASCII,Chars0to1FATASCII_PL)),sOption("spd0:"+spd0+" ticks:"+ticks+" ord:"+ord+" ptn:"+(pt!=ptn?pt+"/":"")+ptn+" ins:"+ins+" sz:"+outSz(bin[0]))),!bDetected&&gs()&&(sName="Radik 'Raster' Štěrba's Raster Music Tracker module (.RMT)",sVersion="v"+v,bDetected=1,X.isVerbose())&&(1ptn&&(ptn=pt) if(ic>ptn<<2)return n("PTFault: "+ic+" bad notes"),0 for(Y=8096;Y<8128;Y++)e[Y]&&e[Y]<26&&(e[Y]+=96) return a=decEncoding(e.slice(8096,8112),CPAmiga),composer=decEncoding(e.slice(8112,8128),CPAmiga),e=void 0,1}function i(s){return t[R++]=X.U8(s),3X.Sz())||1&s||1&e||1&t?void 0:X.c("014F",s-2)&&X.c("014F",e-2)&&X.c("014F",t-2)&&(K=t,E="",X.Sz()>t&&0<(G=X.fSig(t,4096,"00")-t+1)&&(E=decAnsi(t,G,CPFullCPETshifted,!0).trim(),K+=G),1)})()&&(sName="COMPUTE!'s Enhanced SidPlayer tune (.MUS+.STR+.WDS)",bDetected=1,X.isVerbose())&&sOption((E.length?'"'+addEllipsis(E,256,160)+'"':"").append("sz:"+outSz(K))),!bDetected&&As()&&(sName="Ultima 6 Adlib module (.M)",sOption("unpsz:"+unpsz+" sz:"+outSz(K)),bDetected=1),!bDetected&&(function(){if(isWithin(X.U16(0,_BE),4,16)&&isWithin(X.U16(2,_BE),8,32)&&isWithin(X.U16(4,_BE),4,48)&&isWithin(X.U8(6),1,4)&&X.c("0400000000",7)&&(X.c("'WT'",12)||!X.U32(12,_BE))&&isWithin(X.U8(23),3,119)&&!(76<(E=X.U32(24,_BE))||3&E)){K=16 var s=Math.min(X.Sz(),65535) for(k=0,G=28;G=ord||charStat(X.readBytes(768,128),1).indexOf("allasc")<0)){for(K=16384,Y=0;Y<8;Y++){if(X.U8(192+4*Y))return if(!isWithin(X.U8(192+4*Y+1),128,192))return if(!isWithin(bnk=X.U8(192+4*Y+2),88,95))return if(!isWithin(sec=X.U8(192+4*Y+3),1,128))return X.U16(192+4*Y) var s=sec<<8 bnk&=7,K+=s}if(!(K>X.Sz())){for(K+=1024,F=X.SC(257,30,"CP1251").trim(),Y=smp=0;Y<16;Y++)if(1ptn&&(ptn=X.U8(G+1))}for(ptn++,ord=G-16>>3,d2=G,G=4112+48*ptn;G=ptn&&(ptn=o+1)}for(ord_<0&&(ord_=1),G=smp=Y=0;Y<31;Y++,G+=8)(A=X.U16(G,_BE))&&(smp++,B+=A) for(B<<=1,G=382,Y=m=0;Y<4*s;Y++,G+=2)m=Math.max(m,X.U16(G,_BE)) if(G+=m,1==ptn)for(E=X.U16(G-2,_BE),G+=2;G sz"),0 w+=ofs,142!=(y=X.U8(w))&&9 sz"),0 w+=ofs,(y=X.U8(w))||z++,142!=y&&9 sz"),0 w+=ofs,(y=X.U8(w))||z++,142!=y&&9>=1,s=ordp,!((smp=ordp-smpp)<=0||64>=2,e=X.U16(6),ord=e-s-1,isWithin(ord,1,256))&&!(X.Sz()<12+ord+1+36*smp+34*orn+3-1)){for(n=(r=6)+2*orn+4*smp,p=X.Sz()+1-n,(n+=186)>X.Sz()+1-ord-1-3&&(n=X.Sz()+1-ord-1-3)%2&&--n;rX.Sz()+1-ord-1-3)){for(var p=X.Sz()+1-n,d=0,c=0;c=12+2*orn&&!((r-2*orn)%6)}function l(s){var e=X.U8(s),s=X.U8(s+1) if(!(32X.Sz()&&!X.isVerbose()&&(bad+="!short"),bad.length&&(sversion=sversion.appendS("malformed"+bad+(sus?"sus"+sus:""),"/")),_setResult("~audio","Konami's MXDRV PCM resource (.PDX)",sversion,X.isVerbose()?"entries:"+en+" sz:"+outSz(K):"")),X.Sz()<12||X.U32(0,_LE)||!(numnotes=X.U32(4,_LE))||8192X.Sz()?"no panning effects":"",_setResult("~audio","Ken Silverman's Digital Music module (.KDM)",sversion,X.isVerbose()?"trk:"+numtracks+" notes:"+numnotes:"")),(function(){if(!(X.Sz()<111104||63<(lp=X.U8(0)))){for(ptn=0,Y=1;Y<100;Y++){if(31<(pt=X.U8(Y)))return pt>ptn&&(ptn=pt)}if(ptn++,tmp=X.U8(100),(ord=X.U8(101))&&!(100ord)){for(F=X.readBytes(102,28),Y=0;Y<28;Y++)if(F[Y]<32||127ptn&&(ptn=pt)}for(ptn++;G<166;G++){var s=X.U8(G) if(s<4||64X.Sz()-10?void 0:X.c("4BFA.... 08AD 0000",Z+2))&&_setResult("~audio","Jeroen 'WAVE' Tel & Charles Deenen's Maniacs of Noise module (.MON)","",""),(function(){if(!(X.Sz()<128)){for(oldp=smp=0,Y=0;Y<128;Y+=8){if((G=X.U16(Y,_BE))>X.Sz())return if(G){if(GX.Sz())return for(s+=pcnum=X.U32(G),G+=4+4*pcnum,pbnum=X.U32(G),pbs+=pbnum,G+=4+5*pbnum,cn=0;cn<7;cn++)ccnum=X.U32(G),ccs+=ccnum,G+=4+4*ccnum}if(G>X.Sz())return}if(!(!notes||ccs>50*notes||pbs>3*notes||s>3*notes||maxtimeX.Sz()||1048576<(size=X.U32(G))||(G+=4+size)>X.Sz())){if(spsize=X.U32(G),G+=4,spsize<8192){for(Y=G+4,q=4*X.U32(G),E=Math.min(X.Sz,G+4+q);Yptn&&(ptn=E) if(!(32K&&(K=sz1),1max&&(e=X.U32(si+16),4&X.U8(si+31)&&(e*=2),max=s,KX.Sz())return X.isHeuristicScan()&&(bad=bad.addIfNone("!badptnp"),1) X.U16(G)===ptnsz&&(fmt=0)}for(Y=0,G=ptntp;YX.Sz()&&X.isHeuristicScan())return bad=bad.addIfNone("!badptnp"),1 if(0==fmt&&2112X.Sz()&&e++,2X.Sz())return q=X.readBytes(e+32,26,!0),""!=(q=decEncoding(q,CP437,!1).trim())&&insnlst.push(q),KX.Sz()&&(bad=bad.addIfNone("!short")),q=X.readBytes(e+20,26,!0),""!=(q=decEncoding(q,CP437,!1).trim())&&smpnlst.push(q),KX.Sz())return KG+8*T&&G+8*T<=minp&&(G+=2+8*T,r)&&!T&&(tracker=4&special?"UNMO3 <= 2.4.0.1":"UNMO3")):r&&special<=1&&!X.U16(G)&&(tracker="UNMO3 <= 2.4",G+=2) var m=0 if((128&flags||8&special)&&(G+=4896),G>X.Sz())return for(var f=hasPluginChunks=hasMPTM=!1;G+9X.Sz()||G>=msgofs)break G+=8+hksz}535!==cwtv||512!==cmwt||nreserved||f||(tracker=hasMPTM||0X.Sz())bad=bad.addIfNone("!short") else{X.c("'IMPS'",p[Y])||(bad=bad.addIfNone("!badsmp")) var u=X.U8(p[Y]+18),z=X.U8(p[Y]+46),E=X.U32(p[Y]+48),k=X.U32(p[Y]+72) if(S={ofs:0,slen:0,bits:2&u?16:8,chn:1,en:"LE",codec:"sPCM",bps:0,length:0},G=k,S.ofs=k,S.slen=E,64===z)G+=12 else if(128===z)e=readVarUInt(G),extsmp.push(X.SA(G+1,e[1])),G+=e[0]+e[1] else if(X.c("'fLaC'",k))S.codec="FLAC" else if(X.c("'OggS'",k))S.codec="Ogg" else{switch(S.codec=1&z?"sPCM":"uPCM",4&u&&532<=cwtv&&(S.chn=2),8&u?S.codec=4&z?"IT215":"IT214":2&u||255!=z?(2&z&&(S.en="BE"),4&z&&(S.codec="dPCM"),8&z&&(S.codec="8d16")):S.codec="ADPCM",S.codec){case"sPCM":case"uPCM":case"dPCM":case"fPCM":case"MT2":case"fPCM15":case"fPCM23":case"fPCMn":case"sPCMn":S.bps=S.bits break case"8d16":S.bps=16 break case"ADPCM":S.bps=4 break case"uLaw":case"aLaw":S.bps=8 break default:S.bps=0}S.bps?(S.length=E*S.chn*(S.bps>>3),G+=S.length):b=!0,Ss[Y]=S}K<(t=tX.Sz())){X.U16(e,_LE) var F=X.U16(e+2,_LE) if(e+=4,!(!F||1024X.Sz())){G=e+4 for(var _,O=[],B=0;BX.Sz()){_=3599,bad=bad.addIfNone("!short") break}clen=Math.min(g,32768>>(S.bits>>4)) var D=defW for(bit_buf=v=0;clen&&GdefW){bad=bad.addIfNone("!badITsmp"),g=0 break}if(A=R(D),topbit=1<=topbit+lowerB&&A<=topbit+upperB){D<=(A-=topbit-1+lowerB)&&A++,D=A continue}}else if(A&topbit){D=1+(255&A) continue}clen--,g--}}else readdef=10,_log("IT @"+Hex(G)+" malformed sample?") G>X.Sz()&&(bad=bad.addIfNone("!short"))}}}else"FLAC"!==S.codec&&"Ogg"!==S.codec&&("AMS"===S.codec&&1==S.chn?(sOption("\n!!! Please send this file to the detector dev!!! Poor fella hasn't any to test on"),l=X.U32(G+4,_LE),X.U8(G+8),S.length=l+9):"8d16"===S.codec&&1==S.chn&&16==S.bps?sOption("\n!!! Please send this file to the detector dev!!! Poor fella hasn't any to test on"):"MDL"===S.codec&&1==S.chn&&S.bps<=16?(l=X.U32(G),S.length=4+l):"DMF"===S.codec&&1==S.chn&&S.bps<=16?sOption("\n!!! Please send this file to the detector dev!!! Poor fella hasn't any to test on"):"uLaw"!==S.codec&&"aLaw"!==S.codec||16!=S.bps||(S.length=S.slen*S.chn)) KX.Sz())break switch(G+=6,e){case"...C":var C=0 switch(M){case 2:C=X.U16(G,_LE) break case 3:C=X.U24(G,_LE) break case 4:C=X.U32(G,_LE) break default:C=X.U8(G)}C>ch&&(ch=C) break case".VWC":A=0 switch(M){case 1:A=X.U8(G) break case 2:A=X.U16(G,_LE) break case 3:A=X.U24(G,_LE) break case 8:A=X.U64(G,_LE) break default:A=X.U32(G,_LE)}A&&(mVcw=i(A.toString(16).toUpperCase().padStart(7,"0"))) break case"VWSL":A=0 switch(M){case 1:A=X.U8(G) break case 2:A=X.U16(G,_LE) break case 3:A=X.U24(G,_LE) break case 8:A=X.U64(G,_LE) break default:A=X.U32(G,_LE)}A&&(mVlsw=i(A.toString(16).toUpperCase().padStart(7,"0"))) break case"AUTH":auth=X.SC(G,M,"UTF8")}G+=M}K>1:e>>2,i=0;i>1),fes=0,2&flagbyte&&(fes=I(32)),hasstartpos=4&hd,hassz=8&hd,hasid=idbytes,hasdesc=128&hd,hasmap=hasid||hasstartpos||hassz||hasdesc,4&flagbyte&&(e=I(16),G+=e*(twochar?2:1)),8&flagbyte&&(G+=5),entries=I(64),hasmap&&(e=I(64)),G>X.Sz())?void 0:(rposMapBegin=hasmap?e:G-posstart,1)})()&&(hasmap||fes))for(G=posstart+rposMapBegin,Y=0;Y>12){case 0:f?tracker="BeRoTracker":532!==cwtv||512!==cmwt||9!==flags||special||X.U16(62)||ins||ptn+1!==ord||128!==gvol||100!==mvol||1!==spd||128!==sep||pwd||msglen||msgofs||nreserved?532!==cwtv||512!==cmwt||X.U16(62)||nreserved?532===cwtv&&532===cmwt&&"CHBI"===sreserved?tracker="ChibiTracker":532===cwtv&&532===cmwt&&special<=1&&!pwd&&!nreserved&&4==(4262&flags)&&1>8)+"."+(255&cwtv).toString(16).padStart(2)):tracker="Unknown":(mVlsw="1.00.00.A5",tracker="ModPlug Tracker 1.00a5",0):tracker="OpenSPC conversion" break case 1:var x,P,y=4095&cwtv tracker=y<=80?"Schism Tracker 0."+y.toString(16):((P=(y=734016+(y<4095?y-80:nreserved))-(365*(x=Util.div64(1e4*y+14780,3652425))+Util.div64(x,4)-Util.div64(x,100)+Util.div64(x,400)))<0&&(P=y-(365*--x+Util.div64(x,4)-Util.div64(x,100)+Util.div64(x,400))),y=Util.div64(100*P+52,3060),"Schism Tracker "+(x+Util.div64(y+2,12)).padStart(4,"0")+"-"+((y+2)%12+1).padStart(2,"0")+"-"+(P-Util.div64(306*y+5,10)+1).padStart(2,"0")) break case 4:tracker="pyIT "+((3840&cwtv)>>8)+"."+(255&cwtv).toString(16) break case 6:tracker="BeRoTracker" break case 7:tracker=32767===cwtv&&533===cmwt?"munch.py":"ITMCK "+(cwtv>>8&15)+"."+(cwtv>>4&15)+"."+(15&cwtv) break case 13:tracker=56043==cwtv?"spc2it":53710==cwtv?"itwriter":"unknown"}}}"?"!=mVlsw?(charset="CP1252",sV="?"==mVcw?mVlsw:mVcw!=mVlsw?"cw:"+mVcw+"/lsw:"+mVlsw:mVcw):(charset="CP437","?"!=mVcw&&(sV=mVcw)) var H=0 for(Y=0;YX.Sz()-2)return d("!badptnp+"+Hex(ptnp)),0 if((lp=X.U8(s+102))>ord-1)return d("!badlp"),0 for(orn=smp=mp=0,s||(ptnp0=ptnp),G=s+105;Gptn&&(ptn=o/3)}if(ptn++,!Y||Y!=ord)return d("!realord:"+Y+" != ord:"+ord),0 for(E=X.readBytes(s,10),tracker="",nv=0<=charStat(E,1).indexOf("allasc")?"ProTracker"==(E=decEncoding(E,CPSpeccy))?(tracker="Pro Tracker",sv="v"+X.SA(s+11,4).trim(),X.U8(s+13)-48):(sv="Vortex Tra"==E?(tracker="Vortex Tracker ][","v"+X.SA(s+18,4).trim()):(tracker='"'+X.SA(s,14)+'"',"v3.x"),7):(tracker="hacked Pro Tracker",sv="v3.x",7),Y=notes=0;Y<3*ptn&&Gs&&!isWithin(y,ptnp,e)&&(bad=bad.addIfNone("!badsmp")),t.push(k))):k<32?(E+=2,k=X.U8(E++),y=X.U16(105+k)+s,t.indexOf(k)<0&&(y>s&&!isWithin(y,ptnp,e)&&(bad=bad.addIfNone("!badsmp")),t.push(k))):k<64||(k<80?(k&=15,r.indexOf(k)<0&&(r.push(k),mp<(y=X.U16(s+169+2*k)+s))&&(mp=y)):k<176?(notes++,eol=!0):176!=k&&(177==k?a+=X.U8(E++):k<192?E+=2:192==k?eol=!0:k<208||(208==k?eol=!0:k<240?(k=(31&k)<<1,y=X.U16(s+105+k)+s,t.indexOf(k)<0&&(y>s&&!isWithin(y,ptnp,e)&&(bad=bad.addIfNone("!badsmp1")),t.push(k))):(k&=15,r.indexOf(k)<0&&(r.push(k),mp<(y=X.U16(s+169+2*k)))&&(mp=y),k=X.U8(E++),y=X.U16(s+105+k)+s,t.indexOf(k)<0&&(y>s&&!isWithin(y,ptnp,e)&&(bad=bad.addIfNone("!badsmp2")),t.push(k)))))) if(a++,E+=z,z=0,256Math.min(i+64,X.Sz()-5)||e<=n||e<=a||n-a<8||(n-a)%6!=2)){for(G=t+4,smp=0;GX.Sz())){if(0=ord)return lp=X.U8(G-1) break}ptn=Math.max(ptn,X.U8(G-1)+1)}return K=G+3,dly=X.U8(73),ftitle=0<=charStat(X.readBytes(0,24),!0).indexOf("allasc"),fby=0<=charStat(X.readBytes(46,23),!0).indexOf("allasc"),1}}}}}}function ss(){if(!(X.Sz()<8||(orntp=X.U16(5))>X.Sz()-6||(ptntp=X.U16(7),(j1=ptntp-orntp)<=0)||(smptp=X.U16(3),(j2=orntp-smptp)<=0)||(ordp=X.U16(1),(j3=smptp-ordp)>X.Sz())||(j4=ordp-9)<=0)){if(j4%130){if(j4<55||(j4-55)%130)return fID=!0}else fID=!1 if(smp=X.U8(smptp),isWithin(smp,1,16)&&(G=130*smp+9+(fID?55:0),ordp==G)&&(ord=X.U8(G))){for(ptn=Y=0;YX.Sz()&&(bad=bad.addIfNone("!short")),!(65536>7,G=t;Gd0){if(smp||(d5=E),E<=d5&&(d5=a4=E),smp++,(G+=10)>a4)break}else synsmp++,G+=10 for(Y=smp+synsmp,K=0,G=smpp;Y--&&GX.Sz()))for(;Y<60;Y++)if(X.c("47FA....D7FA",s+2*Y))return ofsdiff=s+2*(Y+1)+X.I16(s+2*Y+2,_BE),1}})()&&(s=modp+1,!(10<(k=X.U8(s++)+1)))){for(spd0=X.U8(s++),spds=[],Y=0;Y<10;Y++)E=X.U8(s++),spds.indexOf(E)<0&&spds.push(E) s++ var e=ofsdiff+X.U32(s,_BE),t=ofsdiff+X.U32(s+4,_BE),r=(Math.abs(e-t),[]),i=[],n=[] for(Y=0,ord=[],s+=620;Y>1 if(!(s>X.Sz())){for(ordp=s,otsz=Math.min(e,t)-s>>1,Y=0;Y=X.Sz()||s+63>=msmpp)break if(255!=d)if(a){if((a+=ofsdiff)>X.Sz())break aMsmpp&&aX.Sz())){var S=G,U=Math.min(196608+S,X.Sz()) for(l+=S,b+=S,f+=S,len=0>2,128) var u=X.U32(l,_BE)-512+S if(pt=ptn,(trkst=u-f>>4)<0&&(trkst=0),s<0)switch(Math.max(b,l,mip)){case b:K=b+4*ins break case mip:for(G=mip;G=trkst))&&(d[Y]!=c[Y]||d[Y]||d[Y+1]);Y++);return k=k||1,1}}}function Vs(){if(!(X.Sz()<7)&&(z=sig=X.c("'P50A'")||X.c("'P60A'")||X.c("'P61A'")?4:0,smpp=X.U16(z,_BE)+z,ptn=X.U8(z+2))&&!(127X.Sz())&&(pksmp&&(z+=4),!(smppX.Sz()))){smpsz=notes=0 var s=vols=0 for(Y=0,G=z+4;Ysmp)return var e=128&X.U8(G+2) if(15<(127&X.U8(G+2))||64smpp)return if(Y=mptn=0,(function(){for(;255!=(E=X.U8(z+4+6*smp+8*ptn+Y))&&Y<128;Y++){if(E>ptn-1)return E>mptn&&(mptn=E)}return 1})())v=6 else{if(!(function(){for(;255!=(E=X.U8(z+4+6*smp+8*ptn+Y))&&Y<128;Y++){if(E%2||E>2*ptn)return E>mptn&&(mptn=E)}return mptn>>=1,1})())return v=5}if(Y&&128!=Y){if(ord=Y,mptn++,6==v)if(t())sv="6.0" else{if(!(function(){for(Y=ord+z+5+6*smp+8*ptn;Ysmp)return Y+=2 continue case 112:if((31&X.U8(Y+1))>smp)return Y+=1 continue case 224:Y+=2 continue case 96:Y+=1 continue}if(128==(128&E)){if((E<<4&16|X.U8(Y+1)>>4)>smp)return Y+=3}else{if((E<<4&16|X.U8(Y+1)>>4)>smp)return Y+=2}}return 1})())return sv="6.1"}else t()&&(sv="5.0") return 1}}}function t(){for(Y=ord+z+5+6*smp+8*ptn;Y>4)>smp)return 2<=E&¬es++,Y+=2}return 0X.Sz()||eX.Sz()||t>X.Sz()||r>X.Sz()?void 0:1}}function As(){if(!(X.Sz()<421)&&isWithin(unpsz=X.U16(0),782,2849)&&X.c("00000007",2)){var s,e,t=0,r=Math.min(X.Sz(),unpsz),i=new BitReader(4),n=!1,a=0,o=9,p=258,d=[],c=defdictsz=4096,m=[],f=258 for(Y=0;Y=unpsz)return l[t++]=255&e break case 257:n=!0 break default:S=b=void 0 for(var b=e=unpsz)return l[t++]=255&d.pop()}else{for(;d.length;){if(t>=unpsz)return l[t++]=s,d.pop()}if(e!=p)return}f>1),t*i)))),result())}meta("audio","Interplay ACM waveform audio (.ACM)") ================================================ FILE: dbs_min/db/Binary/audio_ADX.1.sg ================================================ function detect(){if(!X.c("8000"))return!1 if(!isWithin(p=X.U16(2,_BE)+4,20,X.Sz()))return!1 if(!X.c("'(c)CRI'",p-6))return!1 if(fmt=X.U8(4),[2,3,4].indexOf(fmt)<0)return!1 if(X.U8(5)%18||4!=X.U8(6))return!1 if(8<(ch=X.U8(7)))return!1 switch(nV=X.U8(18),bDetected=1,sVersion="",nV){case 3:sVersion="v3" break case 4:sVersion="v4" break case 5:sVersion="v4NL"}switch(fmt){case 2:sVersion+=" fixed-coefficient" break case 4:sVersion+=" exponential-scale"}return 0maxb)&&(malformed+="!badblksz"),br=new BitReader(p+10,_BE),rate=br.read(20),ch=1+br.read(3),bps=1+br.read(5),smp=br.read(36),smplen=smp/rate break case 1:hk="PADDING" break case 2:switch(hk="APP",s=File.read_ansiString(p,4)){case"ATCH":hk+=":Flacfile" break case"BSOL":hk+=":beSolo" break case"BUGS":hk+=":Bugs Player" break case"Cues":hk+=":GoldWave" break case"Fica":hk+=":CUE Splitter" break case"Ftol":hk+=":flac-tools" break case"MOTB":hk+=":MOTB MetaCzar" break case"MPSE":hk+=":MP3 Stream Editor" break case"MuML":hk+=":MusicML" break case"RIFF":hk+=":Sound Devices RIFF c.s" break case"SFFL":hk+=":Sound Font FLAC" break case"SONY":hk+=":Sony Creative Software" break case"SQEZ":hk+=":flacsqueeze" break case"TtWv":hk+=":TwistedWave" break case"UITS":hk+=":UITS Embedding tools" break case"aiff":hk+=":FLAC AIFF c.s" break case"imag":hk+=":flac-image file" break case"peem":hk+=":Parseable Embedded Extensible Metadata" break case"qfst":hk+=":QFLAC Studio" break case"riff":hk+=":FLAC RIFF c.s (OpenMPT?)" break case"tune":hk+=":TagTuner" break case"w64 ":hk+=":FLAC Wave64 chunks" break case"xbat":hk+=":XBAT" break case"xbat":hk+=":xmcd" break default:hk+=":<"+s+">"}break case 3:hk="SEEKTABLE",seekt=p,hk+="#"+Math.floor(mdsz,18) break case 4:hk="VORBIS_COMMENT" break case 5:for(hk="CUESHEET",xa=xna=0,trkn=File.read_uint8(p+395),u=p+396,i=0;i>3),sz>3),sz>8,sOption("ch:"+e+" len "+secondsToTimeStr(t)+" s/r:"+X.U32(12)+"Hz "+["not looped","looped"][+(0!=X.U32(32))]+" sz:"+outSz(X.U32(4)))),result()}meta("audio","Nintendo DS RIFF IMA-ADPCM stream (.STRM,.BIN,.LBIN)") ================================================ FILE: dbs_min/db/Binary/audio_SOU.1.sg ================================================ function detect(){return Binary.compare("'SOU'2000000000")&&(bDetected=1),result()}meta("audio","SOU") ================================================ FILE: dbs_min/db/Binary/audio_STRM.1.sg ================================================ function detect(){if(!(!X.c("'STRM'FE")&&!X.c("'STRM'FF")||X.U8(4)==X.U8(5)||X.U8(5)<254)&&X.c("'HEAD'",16)){var e,t,U=255==X.U8(4)?_LE:_BE,o=16+X.U32(20,U) if(!(1X.Sz()))if(X.c("'DATA'",o)&&X.U32(40,U)==o+8&&X.U32(8,U)==o+X.U32(o+4,U))return bDetected=1,sVersion=["PCM8s","PCM16","IMA-ADPCM"][X.U8(24)]+"/"+(U==_LE?"le":"be"),X.isVerbose()&&(e=X.U8(26),t=(X.U32(36,U)/X.U16(28,U)).toFixed(0),sOption("ch:"+e+" len "+secondsToTimeStr(t)+" s/r:"+X.U16(28,U)+"Hz "+["not looped","looped"][X.U8(25)]+" sz:"+outSz(X.U32(o+4,U)+o))),result()}}meta("audio","Nintendo DS multi-channel stream (.STRM)") ================================================ FILE: dbs_min/db/Binary/audio_STRM.2.sg ================================================ function detect(){if(X.c("'STRM'E8030000")&&X.U32(16)&&!(X.U32(24)<31)&&(sz=X.U32(16))==X.U32(24)){if(bDetected=1,X.isVerbose()){var e=Math.min(sz,X.Sz()),s=X.U32(8),r=0 if(X.isDeepScan())for(p=30;p>4&4095,i=X.U32(p+2,_BE)>>5&8191 if(4095!=t||i<=8)break p+=i}pX.Sz()?bad=bad.addIfNone("!short"):sz=p)}return bDetected=1,""!=bad&&(sVersion=sVersion.appendS("malformed"+addEllipsis(bad,128,64),"/")),X.isVerbose()&&(sOption(addEllipsis(info.join("; "),512,256)),sOption(outSz(sz),"sz:")),result()}meta("audio","Creative (Sound Blaster) Voice waveform (.VOC)") ================================================ FILE: dbs_min/db/Binary/audio_WAV.1.sg ================================================ function detect(){var e,s,a=12,i=_BE,r=[],o=[],n=cue=0,c=nRate=nChannels=nBPS=0,V=-1,b=-1,k=0,S=0,t=4,C="",A="",M="",l="",P="",u="",d="",I="",D=[!1,!1,!1] if(!(X.Sz()<36)){if(X.c("'RIFF'........'WAVE'"))i=_LE else{if(!X.c("'RIFX'........'WAVE'"))return i=_BE}if(!((b=8+X.U32(4,i))<12)){for(b-8>=X.Sz()&&X.c("'NXBF'",36)&&(b=X.Sz());a>2==X.U32(48,i)?b=X.Sz():X.Sz()-b-16<=2304&&X.c("'cont'",b)&&(b+=8+X.U32(b+4,i)) break case 18:sVersion="Videologic Mediaspace ADPCM" break case 19:sVersion="Sierra ADPCM" break case 20:sVersion="Antex G.723 ADPCM" break case 21:sVersion="DSP Solutions DIGISTD" break case 22:sVersion="DSP Solutions DIGIFIX" break case 23:sVersion="Dialogic OKI ADPCM" break case 24:sVersion="Media Vision ADPCM" break case 25:sVersion="HP CU" break case 26:sVersion="HP Dynamic Voice" break case 32:sVersion=4==nBPS?"Yamaha AICA ADPCM":"Yamaha ADPCM" break case 33:sVersion="SONARC Speech Compression" break case 34:sVersion="DSP Group True Speech" break case 35:sVersion="Echo Speech Corp." break case 36:sVersion="Virtual Music Audiofile AF36" break case 37:sVersion="Audio Processing Tech." break case 38:sVersion="Virtual Music Audiofile AF10" break case 39:sVersion="Aculab Prosody 1612" break case 40:sVersion="Merging Tech. LRC" break case 48:sVersion="Dolby AC2" break case 49:sVersion="Microsoft GSM610" break case 50:sVersion="MSN Audio" break case 51:sVersion="Antex ADPCM" break case 52:sVersion="Control Resources VQLPC" break case 53:sVersion="DSP Solutions DIGIREAL" break case 54:sVersion="DSP Solutions DIGIADPCM" break case 55:sVersion="Control Resources CR10" break case 56:sVersion="Natural MicroSystems VBX ADPCM" break case 57:sVersion="Crystal Semiconductors IMA ADPCM" break case 58:sVersion="Echo Speech ECHOSC3" break case 59:sVersion="Rockwell ADPCM" break case 60:sVersion="Rockwell DIGITALK" break case 61:sVersion="Xebec Multimedia" break case 64:sVersion="Antex G.721 ADPCM" break case 65:sVersion="Antex G.728 CELP" break case 66:sVersion="Microsoft MSG723" break case 67:sVersion="IBM AVC ADPCM" break case 69:sVersion="ITU-T G.726" break case 80:sVersion="Microsoft MPEG" break case 81:sVersion="RT23 or PAC" break case 82:sVersion="InSoft RT24" break case 83:sVersion="InSoft PAC" break case 85:sVersion="MP3" break case 89:sVersion="Cirrus" break case 96:sVersion="Cirrus Logic" break case 97:sVersion="ESS Tech. PCM" break case 98:sVersion="Voxware Inc." break case 99:sVersion="Canopus ATRAC" break case 100:sVersion="APICOM G.726 ADPCM" break case 101:sVersion="APICOM G.722 ADPCM" break case 102:sVersion="Microsoft DSAT" break case 103:sVersion="Microsoft DSAT-DISPLAY" break case 105:sVersion=4==nBPS?"XBOX IMA ADPCM":"Voxware Byte Aligned",b-8==X.Sz()?b-=8:b-4==X.Sz()?b-=4:b+8==X.Sz()&&(b+=8) break case 112:sVersion="Voxware ACB" break case 113:sVersion="Voxware AC10" break case 114:sVersion="Voxware AC16" break case 115:sVersion="Voxware AC20" break case 116:sVersion="Voxware MetaVoice" break case 117:sVersion="Voxware MetaSound" break case 118:sVersion="Voxware RT29HW" break case 119:sVersion="Voxware VR12" break case 120:sVersion="Voxware VR18" break case 121:sVersion="Voxware TQ40" break case 122:sVersion=extIs("med")?4==nBPS?"4-bit MS-IMA ADPCM":3==nBPS?"3-bit MS-IMA ADPCM":"Voxware SC3/med":"Voxware SC3" break case 123:sVersion="Voxware SC3" break case 128:sVersion="Soundsoft" break case 129:sVersion="Voxware TQ60" break case 130:sVersion="Microsoft MSRT24" break case 131:sVersion="AT&T G.729A" break case 132:sVersion="Motion Pixels MVI-MV12" break case 133:sVersion="DataFusion G.726" break case 134:sVersion="DataFusion GSM610" break case 136:sVersion="Iterated Systems Audio" break case 137:sVersion="Onlive" break case 138:sVersion="Multitude, Inc. FT SX20" break case 139:sVersion="Infocom IT’S A/S G.721 ADPCM" break case 140:sVersion="Convedia G729" break case 141:sVersion="Congruency, Inc. (not specified)" break case 145:sVersion="Siemens SBC24" break case 146:sVersion="Sonic Foundry Dolby AC3 APDIF" break case 147:sVersion="MediaSonic G.723" break case 148:sVersion="Aculab Prosody 8kbps" break case 151:sVersion="ZyXEL ADPCM" break case 152:sVersion="Philips LPCBB" break case 153:sVersion="Studer Professional Audio Packed" break case 160:sVersion="Maiden PhonyTalk" break case 161:sVersion="Racal Recorder GSM" break case 162:sVersion="Racal Recorder G720.a" break case 163:sVersion="Racal G723.1" break case 164:sVersion="Racal Tetra ACELP" break case 176:sVersion="NEC AAC NEC Corporation" break case 255:sVersion="AAC" break case 256:sVersion="Rhetorex ADPCM" break case 257:sVersion="IBM u-Law" break case 258:sVersion="IBM a-Law" break case 259:sVersion="IBM ADPCM" break case 273:sVersion="Vivo G.723" break case 274:sVersion="Vivo Siren" break case 288:sVersion="Philips Speech Processing CELP" break case 289:sVersion="Philips Speech Processing GRUNDIG" break case 291:sVersion="Digital G.723" break case 293:sVersion="Sanyo LD ADPCM" break case 304:sVersion="Sipro Lab ACEPLNET" break case 305:sVersion="Sipro Lab ACELP4800" break case 306:sVersion="Sipro Lab ACELP8V3" break case 307:sVersion="Sipro Lab G.729" break case 308:sVersion="Sipro Lab G.729A" break case 309:sVersion="Sipro Lab Kelvin" break case 310:sVersion="VoiceAge AMR" break case 320:sVersion="Dictaphone G.726 ADPCM" break case 336:sVersion="Qualcomm PureVoice" break case 337:sVersion="Qualcomm HalfRate" break case 341:sVersion="Ring Zero Systems TUBGSM" break case 352:sVersion="Microsoft Audio1" break case 353:sVersion="Windows Media Audio V2 V7 V8 V9 / DivX audio (WMA) / Alex AC3 Audio" break case 354:sVersion="Windows Media Audio Professional V9" break case 355:sVersion="Windows Media Audio Lossless V9" break case 356:sVersion="WMA Pro over S/PDIF" break case 368:sVersion="UNISYS NAP ADPCM" break case 369:sVersion="UNISYS NAP ULAW" break case 370:sVersion="UNISYS NAP ALAW" break case 371:sVersion="UNISYS NAP 16K" break case 372:sVersion="MM SYCOM ACM SYC008 SyCom Technologies" break case 373:sVersion="MM SYCOM ACM SYC701 G726L SyCom Technologies" break case 374:sVersion="MM SYCOM ACM SYC701 CELP54 SyCom Technologies" break case 375:sVersion="MM SYCOM ACM SYC701 CELP68 SyCom Technologies" break case 376:sVersion="Knowledge Adventure ADPCM" break case 384:sVersion="Fraunhofer IIS MPEG2AAC" break case 400:sVersion="Digital Theater Systems DTS DS" break case 512:sVersion="Creative Labs ADPCM" break case 514:sVersion="Creative Labs FASTSPEECH8" break case 515:sVersion="Creative Labs FASTSPEECH10" break case 528:sVersion="UHER ADPCM" break case 533:case 534:sVersion="Ulead DV ACM" break case 544:sVersion="Quarterdeck Corp." break case 560:sVersion="I-Link VC" break case 576:sVersion="Aureal Semiconductor Raw Sport" break case 577:sVersion="ESST AC3" break case 592:sVersion="Interactive Products HSX" break case 593:sVersion="Interactive Products RPELP" break case 608:sVersion="Consistent CS2" break case 624:sVersion="ATRAC3/Sony SCX" break case 625:sVersion="Sony SCY" break case 626:sVersion="Sony ATRAC3" break case 627:sVersion="Sony SPC" break case 640:sVersion="TELUM Telum Inc." break case 641:sVersion="TELUMIA Telum Inc." break case 645:sVersion="Norcom Voice Systems ADPCM" break case 768:b-8==X.Sz()&&(b-=8),sVersion=4==nBPS&&nBlockSize==1024*nChannels&&12==b&&1==nChannels?"DVI IMA":"Fujitsu FM TOWNS SND" break case 769:case 770:case 771:case 772:case 773:case 774:case 775:case 776:sVersion="Fujitsu (not specified)" break case 848:sVersion="Micronas Semiconductors, Inc. Development" break case 849:sVersion="Micronas Semiconductors, Inc. CELP833" break case 1024:sVersion="Brooktree Digital" break case 1025:sVersion="Intel Music Coder (IMC)" break case 1026:sVersion="Ligos Indeo Audio" break case 1104:sVersion="QDesign Music" break case 1280:sVersion="On2 VP7 On2 Technologies" break case 1281:sVersion="On2 VP6 On2 Technologies" break case 1365:sVersion="Level-5 4-bit ADPCM" var p=b+4*(X.U16(22,i)-1) p>3)/nRate/nChannels*1e4)/10,V=new Date(s).toISOString().substr(11,8)) break case"cue":for(var E=a+4,f="",R=0;EX.Sz())return}r+=e}if(datap){var c=nRate=nChannels=nBPS=0,o=-1,p=8+X.U32(4,a),f=xsz=chlo=chtp=0 if(iswem=extIs("wem")||extIs("bnk"),info=[],lp=prefetch=!1,xma2p)c=357,info=xma2_pase_xma2_chunk(xma2p),nChannels=info[0],nRate=info[1],lp=info[2],f=info[3] else{if(n<16)return c=X.U16(fmtp,_LE),nChannels=X.U16(fmtp+2,_LE),nRate=X.U32(fmtp+4,_LE),nBlockSize=X.U16(fmtp+12,_LE),nBPS=X.U16(fmtp+14,_LE),6==(xsz=16>8&15,chlo>>=12)}switch(358==c&&(info=xma2_parse_fmt_chunk_extra(r,_BE),lp=info[0],f=info[1]),smplp&&34<=i&&1==X.U32(r+28)&&0==X.U32(r+40)&&(lp=!0),c){case 1:sVersion="older Wwise, PCM",prefetch=1 break case 2:sVersion="newer Wwise IMA:platform ADPCM",prefetch=1,xsz==12+46*nChannels?sVersion+=":DSP+coefs":10==xsz&&wiihp?sVersion+=":WiiH_DSP":nBlockSize==260*nChannels&&(sVersion+=":PTADPCM") break case 105:sVersion="older Wwise IMA",prefetch=1 break case 353:sVersion="Microsoft WMAv2",prefetch=1 break case 354:sVersion="Microsoft WMAPro",prefetch=1 break case 357:sVersion="Microsoft XMA2",prefetch=1 break case 358:sVersion="fmt-chunk Microsoft XMA2",prefetch=1 break case 12345:sVersion="Opus NX",prefetch=1 break case 12352:sVersion="Opus",prefetch=1 break case 12353:sVersion="Wwise 2019.2.3 Opus_WEM/WW",prefetch=1 break case 33553:sVersion="Wwise 2019.1 PTADPCM",prefetch=1 break case 43712:sVersion="AAC" break case 65520:sVersion="DSP",prefetch=1 break case 65531:sVersion="HEVAG" break case 65532:sVersion="ATRAC9",prefetch=1 break case 65534:sVersion="PCM for Wwise Authoring",prefetch=1 break case 65535:sVersion="Vorbis",prefetch=1 break default:return void(iswem&&_setResult("audio","Wwise: unknown format ",Hex(c,4),""))}if(datap+t>X.Sz()){if(datap+t<20480&&65536>>19&3 if(1==e)return null 1>>17&3 if(0==a)return null;--a var i=r>>>12&15 if(0==i||15==i)return null;--i var t,s,o,u,l=r>>>10&3 return 3==l?null:(t=r>>>9&1,r=r>>>6&3,i=2==e?this.aRatev1[14*a+i]:this.aRatev2[14*(2==a)+i],l=this.aFreq[3*e+l],s=2==a?384/l:1==a||2==e?1152/l:576/l,-(o=1)==(u=Binary.findString(n,40,"Xing"))&&(u=Binary.findString(n,40,"Info"),o=0),-1!=u&&1&X.U8(u+7)?(s*=X.U32(u+8,_BE),n=o?-1:-2):X.c("'VBRI'",n+32)?(s*=X.U32(u+46,_BE),n=-1):n+=2==a?4*Math.floor(12e3*i/l+t):Math.floor(125*i*s+t),[this.aVersion[e],this.aLayer[a],i,l,this.aCh[r],s,n])}} function detect(){if(128<=X.Sz()){X.c("'TAG'",X.Sz()-128)&&(sOptions="ID3v1") var n=0,r=0 X.c("'ID3'")?(n=X.U8(6)<<21|X.U8(7)<<14|X.U8(8)<<7|X.U8(9),n+=10,""==sOptions?sOptions="ID3v2":sOptions+="&2",r=1):X.c("'WAVEfmt '........55",8)&&(n=Binary.findString(50,50,"data")+8) var e=null,a=MP3.header(n) if(null==a&&(r&&(n=Binary.findSignature(n,768,"FFFB"),a=MP3.header(n)),null==a))return"" if(0>8&255|(255&v)<<8).toString(16)) break case 108:for(tag="actors",q=p+2;qX.Sz()?void 0:(sz=p,sVersion=200==idx?"easyRPG"+(v.length?" v"+v.slice(0,4):""):"RPG_RT",1)}}})()&&(sName="RPGMaker 2000/2003 save data (.LSD)",bDetected=1,bad.length&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose())&&(sOption("on: "+dt.slice(0,19)),sOption(heronm+" lv."+herolv+" "+herohp+"HP","preview: "),0<=ch1fsi&&sOption(ch1fs),0<=ch2fsi&&sOption(ch2fs),0<=ch3fsi&&sOption(ch3fs),0<=ch4fsi&&sOption(ch4fs),sOption(info,"info: "),sOption(outSz(sz),"sz:")),!bDetected&&(function(){if(s()&&X.c("0A")&&(bad="",X.c("'LcfMapTree'",1))&&(i=readVarUInt(11),isWithin(i[0],1,5))){for(p=11+i[0]+1,len=i[1],title="",maps=[],idx=i=0;p=len)break if(idx=readVarUInt(p),!isWithin(idx[0],1,3))return if(p+=idx[0],idx=idx[1],sz=readVarUInt(p),!isWithin(sz[0],1,5)||!sz[1])return p+=sz[0],sz=sz[1],1===idx&&(t=X.SC(p,sz,"SJIS"),title.length?maps.push(aid+"."+t):title=t),p+=sz}for(i=0;iX.Sz()?void 0:1}})()&&(sName="RPGMaker 2000/2003 map tree data (.LMT)",bDetected=1,bad.length&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose())&&(sOption("for: "+title),sOption(addEllipsis(maps.join("\r"),49152),len+" maps:"),sOption(outSz(sz),"sz:")),!bDetected&&(function(){if(s()&&X.c("0B")&&X.c("0B",12)&&(bad="",X.c("'LcfDataBase'",1))){var e=[] for(chars=[],idx=i=0,p=12;pX.Sz()?void 0:1}})()&&(sName="RPGMaker 2000/2003 map unit (.LMU)",bDetected=1,bad.length&&(sVersion=sVersion.appendS("malformed"+bad,"/")),X.isVerbose())&&(0<=id&&sOption(id,"id:"),bgf&&sOption(bg,'bg:"','"'),sOption(outSz(sz),"sz:")),result()}meta("game") ================================================ FILE: dbs_min/db/Binary/data_overlay_null_padding.1.sg ================================================ function detect(){if(!Binary.isOverlay())return result() var e=Binary.getSize() Binary.isZeroFilled(0,e)&&_setResult("overlay","null padding","","")} ================================================ FILE: dbs_min/db/Binary/data_overlays.6.sg ================================================ function detect(){var e return Binary.isOverlay()&&(Binary.compare("'aWAW'")?(sName="CreateInstall data",bDetected=1):Binary.compare("';!@Install@!UTF-8!'")?(sName="7-zip Installer data",bDetected=1):Binary.compare("00'TMSAMVOH'")?(sName="ActiveMark protector data",bDetected=1):Binary.compare("....................'MSCF'00")?(sName="Actual Installer data",bDetected=1):Binary.compare("'10JP'")?(sName="Adveractive Installer data",bDetected=1):Binary.compare("'EWETAR DATA FILE!! VER 1.00 <<<>>>'")?(sName="Aeco Systems installer data",bDetected=1):Binary.compare("c0ab........60ea")?(sName="ARJSFX32 data",bDetected=1):Binary.compare("67570402")?(sName="ARQ archive",bDetected=1):Binary.compare("0b0bafaf0b0ba4")?(sName="AutoPlay Media Studio installer data",bDetected=1):Binary.compare("'wwgT)'")||Binary.compare("..120100....0000")?(sName="ClickTeam installer data",bDetected=1):Binary.compare("'CK16'")?(sName="CrypKey Installer archive",bDetected=1):Binary.compare("........'DIMDMSCF'")?(sName="Dimd SFX data",sOptions="CAB",bDetected=1):Binary.compare("'[metadata]'")?(sName="distutils installer data",bDetected=1):Binary.compare("b297e169")?(sName="Envoy Packager data",bDetected=1):Binary.compare("'EPSF'")?(sName="Eschalon Installer archive",bDetected=1):Binary.compare("........'SPIS'1a'LH5'")?(sName="GPInstall data",sOptions="SPIS LH5",bDetected=1):Binary.compare("'zlb'1A")||Binary.compare("'idska32'1A")?(sName="Inno Setup Installer data",bDetected=1):Binary.compare("'Inno Setup Messages'")?(sName="Inno Setup uninstall data",bDetected=1):Binary.compare("'1CNT'")?(sName="LucasArts Update Installer data",bDetected=1):Binary.compare("'MPU'0d")?(sName="MP-ZipTool SFX32 data",bDetected=1):Binary.compare("'MPQ'1a20")?(sName="MPQ archive",bDetected=1):Binary.compare("'PK??NOS_PO'")||Binary.compare("'NOS_PO'")?(sName="NOS Installer data",bDetected=1):Binary.compare("970300000201")?(sName="Pantaray QSetup data",sVersion="10.X",bDetected=1):Binary.compare("370700000201")?(sName="Pantaray QSetup data",sVersion="11.X",bDetected=1):Binary.compare("04'PBG'")?(sName="Paquet archive",bDetected=1):Binary.compare("'PB'................................'7z'")?(sName="Paquet Builder",sOptions="7zip",bDetected=1):Binary.compare("'qres'")?(sName="QT installer data",bDetected=1):Binary.compare("4B2A9A")||Binary.compare("4B2A84")?(sName="RTPatch archive",bDetected=1):Binary.compare("e0e0e1e1e2e2e3e3e4e4e5e5e6e6e7e7")?(sName="Setup Factory installer data",sVersion="8.X, 9.X",bDetected=1):Binary.compare("e0e1e2e3e4e5e6")?(sName="Setup Factory installer data",sVersion="4.X, 5.X",bDetected=1):Binary.compare("67155234ff4d3642")?(sName="STATICSUP installer data",bDetected=1):Binary.compare("'ESIV'")||Binary.compare("'SIVM'",61440)?(sName="Vise Installer data",bDetected=1):Binary.compare("'RsDl'")?(sName="WinImage SFX data",bDetected=1):Binary.compare("'IMP'0a")?(sName="IMP archive",bDetected=1):Binary.compare("'@Daisy@Lucy@xyzzy@'................1f8b08")||Binary.compare("'@Daisy@Lucy@xyzzy@'1f8b08")?(sName="WinPatch Apply Program data",sOptions="gzip",bDetected=1):Binary.compare("'***messages***'")?(sName="WinRAR Installer data",bDetected=1):Binary.compare("fffe2a002a002a006d0065007300730061006700650073002a002a002a00")?(sName="WinRAR Installer data",sVersion="5.X",bDetected=1):Binary.compare("'MPV*'")?(sName="ZipCentral SFX-32 data",bDetected=1):Binary.compare("'[20/20]'")?(sName="PCInstall data",bDetected=1):Binary.compare("'ISSetupStream'")?(sName="InstallShield data",sVersion="18.X",bDetected=1):Binary.compare("'FWS'")||Binary.compare("'CWS'")?(sName="Adobe Flash",bDetected=1):Binary.compare("'Smart Install Maker v'")?(sName="Smart Install Maker data",sVersion=Binary.getString(Binary.getOverlayOffset()+23),bDetected=1):Binary.compare("....0000dcedbd")?(sName="PackageForTheWeb data",sOptions="InstallShield",bDetected=1):Binary.compare("'00000000000000BD00000000000000010000000000000001'",6560)?(sName="Autodesk Self-Extract data",bDetected=1):Binary.compare("c0dececb8d8d8d8d")?(sName="Ghost Installer archive",sOptions="xored MSCF, mask: 8D",bDetected=1):Binary.compare("02060a0405fd59")?(sName="CreateInstall data",sVersion="2003.3.5",bDetected=1):Binary.compare("'RWMV'")?(sName="VMWare Installation Launcher data",bDetected=1):Binary.compare("........'GRCSETUPINFORMATION'")?(sName="Codegear Installer data",bDetected=1):Binary.compare("'xvm'0003")?(sName="Spoon Studio data",bDetected=1):Binary.compare("2f30ee1f5e4ee51e")?(sName="Advanced Installer data",sOptions="MS Compound-like format",bDetected=1):Binary.compare("'^OPT'")?-1!=(e=Binary.findString(Binary.getOverlayOffset(),80,"^ARC"))&&Binary.compare("1f8b08",e+4)&&(sName="Adobe SVG Installer",sOptions="gzip",bDetected=1):Binary.compare("07d26cbf2159abaa0100000000")?(sName="Chilkat ZIP Self-Extractor data",bDetected=1):Binary.compare("'IST'00")?(sName="Dolphin Virtual Machine data",sVersion="5.0",bDetected=1):Binary.compare("'@._P-DATA_.@'")?(sName="CodeFusion Wizard data",bDetected=1):Binary.compare("'ASWsetupFPkgFil3'")?(sName="avast! Antivirus installer data",bDetected=1):Binary.compare("5b3e")?-1!=(e=Binary.findSignature(Binary.getOverlayOffset(),1280,"'PK'0304"))&&(sName="InstallAnywhere data",sOptions="zip",bDetected=1):Binary.compare("........efbeadde'NullsoftInst'")?(sName="NSIS data",bDetected=1):Binary.compare("................fec1cd666ebccf01fec1cd666ebccf0100..............78da")?(sName="Internet Download Manager installer data",sOptions="zlib",bDetected=1):Binary.compare("d513e4e801000000")?(sName="Install4j installer data",bDetected=1):Binary.compare("efbbbf';!@Install@!UTF-8!'")?(sName="7-zip Installer data",bDetected=1):Binary.compare("'UM'030a00")?(sName="Sony Windows installer data",bDetected=1):Binary.compare("7b00320030003700320036003300370037002d00")||-1!=Binary.findSignature(Binary.getOverlayOffset(),Math.min(256,Binary.getOverlaySize()),"7b00320030003700320036003300370037002d00")?(sName="ADS Self Extractor data",bDetected=1):Binary.compare("276327631226097513180178")?(sName="Chaos Software installer data",bDetected=1):Binary.compare("'OWS9G1'",11)?(sName="Gentee installer data",bDetected=1):Binary.compare("'SQ5SFX'")?(sName="Squeez SFX data",bDetected=1):Binary.compare("'Inno Setup Setup Data'")?(sName="Inno Setup data",bDetected=1):-1!=Binary.findSignature(Binary.getOverlayOffset(),Math.min(256,Binary.getOverlaySize()),"'MSCF00000000'")?(sName="CAB archive",bDetected=1):-1!=Binary.findSignature(Binary.getOverlayOffset(),Math.min(256,Binary.getOverlaySize()),"'ISc('")?(sName="InstallShield archive",bDetected=1):Binary.compare("'ExcelsiorII1'")?(sName="Excelsior installer data",bDetected=1):Binary.compare("'InstallShield'00")?(sName="InstallShield data",sOptions="2.X-3.X",bDetected=1):Binary.compare("'wwwwI'874712")?(sName="Multimedia Fusion installer data",bDetected=1):Binary.compare("'PIMPFILE'00")?(sName="PIMP installer data",bDetected=1):Binary.compare("'tiz1'........78da")?(sName="Tarma installer data",sOptions="zlib",bDetected=1):Binary.compare("'XXataDfOnigeB'")?(sName="I-D Media installer data",bDetected=1):Binary.compare("'This is the end of the executable'")?(sName="SwiftView installer data",bDetected=1):Binary.compare("1f8b08",12288)?(sName="BulletProofSoft installer data",sOptions="gzip",bDetected=1):Binary.compare("'AddD'03")?(sName="SecuROM data",e=Binary.getOverlayOffset(),sVersion=Binary.getString(e+8),bDetected=1):Binary.compare("'NB02'")?(sName="CodeView 3.14 debug information",bDetected=1):Binary.compare("'NB09'")?(sName="CodeView 4.10 debug information",bDetected=1):Binary.compare("'NB11'")?(sName="CodeView 5.0 debug information",bDetected=1):Binary.compare("'NB10'")?(sName="PDB 2.0 file link",bDetected=1):Binary.compare("'RSDS'")?(sName="PDB 7.0 file link",bDetected=1):Binary.compare("'[(*|*)]MZ'")?(sName="Mioplanet installer executable+data",bDetected=1):Binary.compare("'MPV'")?(sName="DelZip SFX data",bDetected=1):Binary.compare("'MPU'00")?(sName="CoffeeCup SFX data",bDetected=1):Binary.compare("''")?(sName="KRZIP archive",bDetected=1):Binary.compare("..........87000001........5d0000800000")?(sName="Smart Install Maker data",bDetected=1):Binary.compare("'RS'")?(sName="AOLSetup data",bDetected=1):Binary.compare("'TGCF'")?(sName="Setup-Specialist archive",bDetected=1):Binary.compare("a3484bbe986c4aa9")?(sName="AutoIt compiled script",sVersion="2.XX-3.XX",bDetected=1):Binary.compare("'MSCF'00000000")?(sName="CAB archive",bDetected=1):Binary.compare("'PK'0304")?(sName="ZIP archive",bDetected=1):Binary.compare("'$_BIM_CONFIG_START_$")?(sName="Bytessence Install Maker data",bDetected=1):Binary.compare("........'.eh_frame'00")?(sName="BitRock installer data",bDetected=1):Binary.compare("09050000")?(sName="ThinApp data",bDetected=1):Binary.compare("BDA6EEE9F9EDEFEDE5ED")?(sName="Hamrick Software XOR-ed ZIP",bDetected=1):Binary.compare("000000000000000038e8020000000000")?(sName="Box Stub installer data",bDetected=1):Binary.compare("a7870800")||Binary.compare("a7870800")?(sName="Install Factory data",bDetected=1):Binary.compare("a6d6b210")?(sName="Sax Software archive",bDetected=1):Binary.compare("'Win_Sfx_For_Windows_'")?(sName="XZIP-SFX data",sOptions="by Netzip",bDetected=1):"[GeneralOptions]"==X.SU16(2,16)?(sName="Advanced Installer data",bDetected=1):Binary.compare("d90e0100889f")&&(sName="Winlicense xored EXE (0xC5 xor mask)",bDetected=1)),result()}meta("data","") ================================================ FILE: dbs_min/db/Binary/debug_data_debugData.1.sg ================================================ function detect(){var r=Binary.getSize() if(21243===Binary.readWord(0))return a=Binary.readByte(2),e=Binary.readByte(3),a=(10*(a>>4)+(15&a)).toString(),e=(10*(e>>4)+(15&e)).toString(),_setResult(sType,"Borland",e+"."+a,"TDS"+(Binary.readWord(14)?" "+Binary.readWord(14)+" symbols":"")),!0 if(Binary.compare("'FB09'"))return _setResult(sType,"Borland","","Delphi TDS"),!0 if(Binary.compare("'FB0A'"))return _setResult(sType,"Borland","","C++ TDS"),!0 var e=Binary.readDword(r-4) if(16>2)){for(;a>0&&sOption("hiDef"),(128&a)>>2&&sOption("compressed"),!Binary.getSize()==Binary.read_uint32(5))&&sOption("wrong size!")}else Binary.compare("'WBND'")?(bDetected=1,sName="Microsoft XACT Wave Bank (.XWB)"):Binary.compare("'SDBK'")?(bDetected=1,sName="Microsoft XACT Sound Bank (.XSB)"):Binary.compare("'XGSF'")&&(bDetected=1,sName="Microsoft XACT Global Settings File (.XGS)") return result()}meta("format","") ================================================ FILE: dbs_min/db/Binary/format_OBC.1.sg ================================================ function detect(){var t return Binary.compare("'OBC Copyright MDO'20")&&(t=Binary.getString(18,5).trim(),/^[12]\d{3}$/.test(t))&&(sVersion=t,sOptions=File.cleanString(Binary.getString(84,14)),bDetected=1),result()}meta("format","Compiled DEV7 object (.OBC)") ================================================ FILE: dbs_min/db/Binary/format_OpenSSH.1.sg ================================================ function detect(){return Binary.compare("2d2d2d2d2d424547494e20'OPENSSH PRIVATE KEY'2d2d2d2d2d")&&(bDetected=1),result()}meta("format","OpenSSH Private Key") ================================================ FILE: dbs_min/db/Binary/format_P7X.1.sg ================================================ function detect(){return Binary.compare("'PKCX0'82")&&(sOptions="PKCX0",bDetected=1),result()}meta("format","P7X") ================================================ FILE: dbs_min/db/Binary/format_PAT.1.sg ================================================ function detect(){return Binary.compare("000000..00000..10000")&&(bDetected=1),result()}meta("format","Gimp Pattern") ================================================ FILE: dbs_min/db/Binary/format_PDB.1.sg ================================================ function detect(){if(Binary.compare("'BSJB'0100")?(sVersion="1.0",bDetected=1):Binary.compare("'Microsoft C/C++ program database 2.00\r\n'1A4A470000")?(sVersion="2.0",bDetected=1):Binary.compare("'Microsoft C/C++ MSF 7.00\r\n'1A4453000000")&&(sVersion="7.0",bDetected=1),bDetected){var r,e={"'$'11'@P:Microsoft.VisualBasic'00":"VB.NET","%%%%%%%%%%'.cs'00":"C#","'$'11'@P:FSharp.Core'00":"F#","'std::'%%%%%%":"C++"} for(r in e)if(Binary.isSignaturePresent(0,9437184,r)){sLang=e[r] break}}return result()}meta("format","Microsoft Program Database (.PDB)") ================================================ FILE: dbs_min/db/Binary/format_PEM.1.sg ================================================ function detect(){return Binary.compare("2d2d2d2d2d424547494e20'CERTIFICATE'2d2d2d2d2d")?(sVersion="Certificate",bDetected=1):Binary.compare("2d2d2d2d2d424547494e20'PRIVATE KEY'2d2d2d2d2d")?(sVersion="Private Key",bDetected=1):Binary.compare("2d2d2d2d2d424547494e20'RSA PRIVATE KEY'2d2d2d2d2d")?(sVersion="RSA Private Key",bDetected=1):Binary.compare("2d2d2d2d2d424547494e20'ENCRYPTED PRIVATE KEY'2d2d2d2d2d")?(sVersion="Encrypted Private Key",bDetected=1):Binary.compare("2d2d2d2d2d424547494e20'PUBLIC KEY'2d2d2d2d2d")?(sVersion="Public Key",bDetected=1):Binary.compare("2d2d2d2d2d424547494e20'CERTIFICATE REQUEST'2d2d2d2d2d")?(sVersion="Certificate Signing Request (CSR)",bDetected=1):Binary.compare("2d2d2d2d2d424547494e20'PKCS7'2d2d2d2d2d")?(sVersion="PKCS7/CMS Message",bDetected=1):Binary.compare("2d2d2d2d2d424547494e20'X509 CRL'2d2d2d2d2d")&&(sVersion="Certificate Revocation List (CRL)",bDetected=1),result()}meta("format","Privacy-Enhanced Mail (.PEM)") ================================================ FILE: dbs_min/db/Binary/format_PGP.1.sg ================================================ function detect(){return Binary.compare("2d2d2d2d2d424547494e20'PGP'205349474e41545552452d2d2d2d2d")&&(bDetected=1),result()}meta("format","GPG") ================================================ FILE: dbs_min/db/Binary/format_POL.1.sg ================================================ function detect(){return Binary.compare("5052656701000000")&&(bDetected=1),result()}meta("format","Registry Policy File") ================================================ FILE: dbs_min/db/Binary/format_PRI.1.sg ================================================ function detect(){return Binary.compare("'mrm_pri2'00000100")&&(bDetected=1),result()}meta("format","PRI") ================================================ FILE: dbs_min/db/Binary/format_PS-X.1.sg ================================================ function detect(){var e return Binary.compare("'PS-X EXE'")&&(e=Binary.getString(76,48).trim())&&(X.isVerbose()&&(sOptions="Region: "+e),bDetected=1),result()}meta("format","PlayStation executable (PS1)") ================================================ FILE: dbs_min/db/Binary/format_PSM2CFG.1.sg ================================================ function detect(){var t return Binary.compare("'PSM2CFG'")&&(t=Binary.getString(17,4).trim(),/^[0-9\.]{4}$/.test(t))&&(sVersion=t,bDetected=1),result()}meta("format","PSM2CFG") ================================================ FILE: dbs_min/db/Binary/format_RARREG.1.sg ================================================ function detect(){return Binary.compare("'RAR registration data'0d0a")&&(bDetected=1),result()}meta("format","RAR registration data (.RARREG)") ================================================ FILE: dbs_min/db/Binary/format_RCK.1.sg ================================================ function detect(){return Binary.compare("'RKET'00000000")&&(bDetected=1),result()}meta("format","RCK") ================================================ FILE: dbs_min/db/Binary/format_RCO.1.sg ================================================ function detect(){return Binary.compare("0050524600010000")&&(bDetected=1),result()}meta("format","Resource Container (.RCO)") ================================================ FILE: dbs_min/db/Binary/format_RGS.1.sg ================================================ function detect(){return Binary.compare("'HKCR'0d0a7b0d0a09")&&(sVersion="Windows Registry Script",bDetected=1),result()}meta("format","InstallShield") ================================================ FILE: dbs_min/db/Binary/format_RedShirt.1.sg ================================================ function detect(){return Binary.compare("'REDSHIRT'00")?(sVersion="v1.0",bDetected=1):Binary.compare("'REDSHRT2'00")&&(sVersion="v2.0",bDetected=1),result()}meta("format","RedShirt") ================================================ FILE: dbs_min/db/Binary/format_SDI.1.sg ================================================ function detect(){return Binary.compare("'$SDI0001'0000000000000000")&&(bDetected=1),result()}meta("format","System Deployment Image (.SDI)") ================================================ FILE: dbs_min/db/Binary/format_SFK.1.sg ================================================ function detect(){return Binary.compare("'SFPK'0100000040")&&(bDetected=1),result()}meta("format","SFK") ================================================ FILE: dbs_min/db/Binary/format_SHBIN.1.sg ================================================ function detect(){var t return Binary.compare("'DVLB'")&&(t=Binary.getString(12,4).trim(),/^[A-Z]{4}/.test(t))&&(X.isVerbose()&&(sOptions=t),bDetected=1),result()}meta("format","Shader Binary") ================================================ FILE: dbs_min/db/Binary/format_SLN.1.sg ================================================ function detect(){var t return Binary.compare("efbbbf0d0a'Microsoft Visual Studio Solution File'")&&(t=Binary.getString(59,5).trim(),/^\d+\.\d{2}$/.test(t))&&(sVersion=t,bDetected=1),result()}meta("format","Visual Studio solution file") ================================================ FILE: dbs_min/db/Binary/format_SLNX.1.sg ================================================ function detect(){return Binary.compare("''0d0a2020")&&(bDetected=1),result()}meta("format","SLNX") ================================================ FILE: dbs_min/db/Binary/format_SSHPublicKey.1.sg ================================================ function detect(){return Binary.compare("'ssh-ed25519'20")?(sOptions="ed25519",bDetected=1):Binary.compare("'ssh-rsa'20")&&(sOptions="RSA",bDetected=1),result()}meta("format","SSH Public Key") ================================================ FILE: dbs_min/db/Binary/format_SystemErr.1.sg ================================================ function detect(){var t return Binary.compare("'System_Err'")&&(t=Binary.getString(11,32).trim(),/^[ A-Za-z0-9\-\:\\\.]{1,}$/.test(t))&&(X.isVerbose()&&(sOptions=t),bDetected=1),result()}meta("format","System_Err") ================================================ FILE: dbs_min/db/Binary/format_TLB.1.sg ================================================ function detect(){return Binary.compare("'MSFT'020001000000000009040000")&&(bDetected=1),result()}meta("format","Microsoft Type Library") ================================================ FILE: dbs_min/db/Binary/format_TOT.1.sg ================================================ function detect(){var r return Binary.compare("?? ** 00'")&&Binary.isSignaturePresent(0,32,"00 00 '(c)'")&&(bDetected=1,-1!==(r=Binary.findSignature(0,64,"'Version ' %% 2E %%"))&&(sVersion=Binary.getString(r+8,4)),-1!==(r=Binary.findSignature(0,64,"'19' %% %%")))&&(sVersion+=(sVersion?", ":"")+Binary.getString(r,4)),result()}meta("format","TOT") ================================================ FILE: dbs_min/db/Binary/format_TPU.1.sg ================================================ function detect(){return Binary.compare("'TPUQ'00000000")&&(bDetected=1),result()}meta("format","Turbo Pascal Unit (.TPU)") ================================================ FILE: dbs_min/db/Binary/format_UCM.1.sg ================================================ function detect(){return Binary.compare("'UCM1'02000000")&&(sVersion="1.0",sOptions=Binary.getString(8),bDetected=1),result()}meta("format","UCM") ================================================ FILE: dbs_min/db/Binary/format_UPC.1.sg ================================================ function detect(){var t return Binary.compare("'UPC'")&&(t=Binary.getString(13,3).trim(),/^[A-Z]{3}$/.test(t))&&(X.isVerbose()&&(sOptions=t),bDetected=1),result()}meta("format","UPC") ================================================ FILE: dbs_min/db/Binary/format_UPF.1.sg ================================================ function detect(){var t return Binary.compare("'UPF'")&&(t=Binary.getString(13,3).trim(),/^[A-Z]{3}$/.test(t))&&(X.isVerbose()&&(sOptions=t),bDetected=1),result()}meta("format","UPF") ================================================ FILE: dbs_min/db/Binary/format_UPI.1.sg ================================================ function detect(){var t return Binary.compare("'UPI'")&&(t=Binary.getString(13,3).trim(),/^[A-Z]{3}$/.test(t))&&(X.isVerbose()&&(sOptions=t),bDetected=1),result()}meta("format","UPI") ================================================ FILE: dbs_min/db/Binary/format_VDI.1.sg ================================================ function detect(){if(512<=Binary.getSize()&&Binary.compare("7F10DABE",64)){sVersion="v"+Binary.read_uint16(68)+"."+Binary.read_uint16(70) var i=Binary.getString(0).match(/<<< (.*?)\ >>>/) if(i&&(sOptions='"'+sOptions.append(i[1])+'"',bDetected=1),bDetected&&Binary.isVerbose()){switch(Binary.read_uint16(76)){case 1:sOption("Normal dynamically") break case 2:sOption("Preallocated fixed size") break case 3:sOption("Dynamically growing for undo/commit changes") break case 4:sOption("Dynamically growing for differencings")}sOption("Size:"+Binary.bytesCountToString(Binary.read_uint64(368)))}}return result()}meta("format","Virtual Disk Image (.VDI)") ================================================ FILE: dbs_min/db/Binary/format_VM2.1.sg ================================================ function detect(){return Binary.compare("'Sony PS2 Memory Card Format 1.2.0.0'000000000000020200100000")&&(sVersion="1.2.0.0",bDetected=1),result()}meta("format","PS2 Memory Card") ================================================ FILE: dbs_min/db/Binary/format_VTF.1.sg ================================================ function detect(){return Binary.compare("'VTF'0007000000")&&(bDetected=1),result()}meta("format","Valve Texture") ================================================ FILE: dbs_min/db/Binary/format_VVD.1.sg ================================================ function detect(){return Binary.compare("'IDSV'04000000")&&(bDetected=1),result()}meta("format","VVD") ================================================ FILE: dbs_min/db/Binary/format_W3D.1.sg ================================================ function detect(){return Binary.compare("'IFX'000800000011000000")&&(bDetected=1),result()}meta("format","Shockwave 3D") ================================================ FILE: dbs_min/db/Binary/format_WASM.1.sg ================================================ function detect(){return Binary.compare("00'asm'010000000")&&(bDetected=1),result()}meta("format","WebAssembly (.WASM)") ================================================ FILE: dbs_min/db/Binary/format_WBFS.1.sg ================================================ function detect(){return Binary.compare("'WBFS'00....000915000001000000")&&(sOptions=File.cleanString(Binary.getString(512,6)),bDetected=1),result()}meta("format","Wii Backup File System") ================================================ FILE: dbs_min/db/Binary/format_XBE.1.sg ================================================ function detect(){return Binary.compare("'XBEH'000000000000000000000000")&&(sOptions="unsigned",bDetected=1),result()}meta("format","Xbox Executable (.XBE)") ================================================ FILE: dbs_min/db/Binary/format_XBF.1.sg ================================================ function detect(){var t return Binary.compare("'XBF'")&&(t=Binary.getString(68,32).trim(),/^[A-Z0-9]{32}/.test(t))&&(X.isVerbose()&&(sOptions=t),bDetected=1),result()}meta("format","XBF") ================================================ FILE: dbs_min/db/Binary/format_XCG.1.sg ================================================ function detect(){var t return Binary.compare("'xcg File'")&&(t=Binary.getString(9,4).trim(),/^[0-9/.]{4}$/.test(t))&&(sVersion=t,bDetected=1),result()}meta("format","XCG (Graphics)") ================================================ FILE: dbs_min/db/Binary/format_XCI.1.sg ================================================ function detect(){var t return Binary.compare("'xci File'")&&(t=Binary.getString(9,4).trim(),/^[0-9/.]{4}$/.test(t))&&(sVersion=t,bDetected=1),result()}meta("format","XCI") ================================================ FILE: dbs_min/db/Binary/format_XCR.1.sg ================================================ function detect(){var t return Binary.compare("'xcr File'")&&(t=Binary.getString(9,4).trim(),/^[0-9/.]{4}$/.test(t))&&(sVersion=t,bDetected=1),result()}meta("format","XCR") ================================================ FILE: dbs_min/db/Binary/format_XCS.1.sg ================================================ function detect(){var t return Binary.compare("58 43 53")&&(t=Binary.getString(4,2).trim(),/^[A-Z]{2}$/.test(t))&&(sVersion=t,bDetected=1),result()}meta("format","XPAT Compiled Script (.XCS)") ================================================ FILE: dbs_min/db/Binary/format_XDelta.1.sg ================================================ function detect(){return Binary.compare("d6c3c4000502")&&(bDetected=1),result()}meta("format","XDelta") ================================================ FILE: dbs_min/db/Binary/format_XEX.1.sg ================================================ function detect(){return Binary.compare("'XEX2'000000..00")&&(bDetected=1),result()}meta("format","Xbox Executable File (.XEX)") ================================================ FILE: dbs_min/db/Binary/format_ZZDATA.1.sg ================================================ function detect(){return Binary.compare("'DIRINFO'000000000000000000")&&(sVersion="CD-I",bDetected=1),result()}meta("format","ZZDATA") ================================================ FILE: dbs_min/db/Binary/format_ZinsSAV.1.sg ================================================ function detect(){return Binary.compare("'ZinsSAV'000001")&&(bDetected=1),result()}meta("format","Captain Zins Save") ================================================ FILE: dbs_min/db/Binary/format_bin.AAALogo.1.sg ================================================ function detect(){return 90<=Binary.getSize()&&Binary.compare("2CA46774")&&(bDetected=1),result()}meta("format","AAA Logo") ================================================ FILE: dbs_min/db/Binary/format_bin.COL.1.sg ================================================ function detect(){var e=0,r=[],t=0,a="" for(p=0;pX.Sz()){if(!X.c("'COLL'",--p))break a=a.addIfNone("!badchunk")}if(e=8+X.U32(p+4,_LE),p+e>X.Sz())return var i=X.SA(p+8,8) if(!i.length)break if(charStat(i,1).indexOf("allasc")<0)return r.push(X.SA(p+8,8))}if(t)return a.length&&(sVersion=sVersion.appendS("malformed"+a,"/")),X.isVerbose()&&(sOption(addEllipsis(r.join(","))),sOption(outSz(p),"sz:")),bDetected=1,result()}meta("format","RenderWare collision data (.COL)") ================================================ FILE: dbs_min/db/Binary/format_bin.GuitarPro.1.sg ================================================ function detect(){if(31X.Sz())return var m=X.SA(z,4),b=(X.U16(z+4,_BE),X.U32(z+6,_BE)) if(!isWithin(b,z,X.Sz())||!/\w{3,}/.test(m)||0<=_.indexOf(b))return _.push(b),OX.Sz())return b=X.U32(z,_BE),X.U8(z+4),X.U24(z+5,_BE) if(!isWithin(b,z,X.Sz())||0<=_.indexOf(b))return _.push(b),Of||X.fSig(f,i,"0d0a'ANNIVERSARY'")>f||X.fSig(f,i,"0d0a'CALADRURI'")>f||X.fSig(f,i,"0d0a'CALURI'")>f||X.fSig(f,i,"0d0a'CLIENTPIDMAP'")>f||X.fSig(f,i,"0d0a'FBURL'")>f||X.fSig(f,i,"0d0a'GENDER'")>f||X.fSig(f,i,"0d0a'PRONOUNS'")>f||X.fSig(f,i,"0d0a'KIND'")>f||X.fSig(f,i,"0d0a'MEMBER'")>f||X.fSig(f,i,"0d0a'RELATED'")>f||X.fSig(f,i,"0d0a'XML'")>f)&&(a=4),(+S<(a=X.fSig(f,i,"0d0a'CATEGORIES:'")>f||X.fSig(f,i,"0d0a'CLASS:'")>f||X.fSig(f,i,"0d0a'IMPP'")>f||X.fSig(f,i,"0d0a'NAME'")>f||X.fSig(f,i,"0d0a'NICKNAME'")>f||X.fSig(f,i,"0d0a'PRODID'")>f||X.fSig(f,i,"0d0a'PROFILE'")>f||X.fSig(f,i,"0d0a'SORT-STRING'")>f?Math.max(a,3):a)||4==a&&"4.0"==S&&(X.fSig(f,i,"0d0a'LABEL'")>f||X.fSig(f,i,"0d0a'SORT-STRING'")>f))&&sOption("version-incompatible fields"),sOption(outSz(d),"sz:")),result()}meta("format","vCard/Virtual Contact File (.VCF,.vcard)") ================================================ FILE: dbs_min/db/Binary/format_bin.WindowsIconCacheDB.1.sg ================================================ function detect(){if(20<=Binary.getSize()&&Binary.compare("..000000'Win4'"))switch(bDetected=1,Binary.read_uint16(12)){case 6e3:sOption("Vista (Build 6000)") break case 6001:sOption("Vista (Build 6001)") break case 7600:sOption("Windows 7 (Build 7600)") break case 7601:sOption("Windows 7 (Build 6701)") break case 10586:sOption("Windows 10 (Build 10586)") break default:sOption("Unknown version")}return result()}meta("format","Windows IconCacheDB") ================================================ FILE: dbs_min/db/Binary/format_database.SQLite.1.sg ================================================ function detect(){if(Binary.compare("'SQLite format 3'00")){bDetected=1 var e=Binary.read_uint32(68,_BE),a=Binary.read_uint32(96,_BE),r=Binary.read_uint32(24,_BE),t=a/1e6>>0,i=(a-1e6*t)/1e3>>0 switch(sVersion=t+"."+i+"."+(a-1e6*t-1e3*i>>0),Binary.read_uint32(56,_BE)){case 1:sOption("UTF-8") break case 2:sOption("UTF-16LE") break case 3:sOption("UTF-16BE") break default:return}e&&Binary.isVerbose()&&sOption("AppID: "+e),r&&Binary.isVerbose()&&sOption("Changes: "+r)}return result()}meta("format","SQLite 3 database (.SQLITE)") ================================================ FILE: dbs_min/db/Binary/format_databases.1.sg ================================================ function detect(){return Binary.compare("00010000'Standard Jet DB'00")&&(sName="Microsoft Access database (.MDB)",bDetected=1),!bDetected&&(function(){switch(nv=X.U8(0),v5=!1,nv){case 2:sv="FoxBase 1.0" break case 3:sv="FoxBase 2.x / dBASE III, no memo file" break case 4:sv="dBASE IV, no memo file" break case 5:sv="dBASE V, no memo file" break case 7:sv="VISUAL OBJECTS v1.x for dBase III, no memo file" break case 48:sv="Visual FoxPro (possibly with DBC)" break case 49:sv="Visual FoxPro with auto increment" break case 50:sv="Visual FoxPro with varchar/varbinary" break case 67:sv="dBASE IV SQL Table, no memo file / Flagship .dbv memo var size" break case 100:sv="dBASE IV SQL System, no memo file" break case 131:sv="FoxBase 2.x / dBASE III+ with memo file" break case 135:sv="VisualObjects 1.x with memo file" break case 139:sv="dBASE IV with memo file" break case 140:sv="dBASE V with memo file" break case 142:sv="dBASE IV with SQL table" break case 179:sv=".dbv with memo table" break case 203:sv="dBASE IV SQL Table with memo file" break case 229:sv="Clipper SIX with memo file" break case 245:sv="FoxPro 2 with memo file" break case 251:sv="FoxPro 2, no memo file" break default:return}if(2==nv){if(!(recc=X.U16(1)))return if(!(recsz=X.U16(6)))return hdrsz=521,rectp=8,enc="IBM437"}else{if((y=X.U8(1))<80?y+=2e3:y+=1900,m=X.U8(2),d=X.U8(3),X.c("000000",1))upd="never" else{if(!isWithin(y,1970,2100)||!isWithin(m,1,12)||!isWithin(d,1,31))return upd=y+"-"+m.padStart(2,"0")+d.padStart(2,"0")}if(!(recc=X.U32(4)))return if(hdrsz=X.U16(8),recsz=X.U16(10),hdrsz<32||!recsz)return if(res0=X.U24(12),res1=X.readBytes(15,13),res2=X.U32(28),0<=[4,140].indexOf(nv))rectp=68,enc="CP"+X.SA(34,3),isWithin(t=X.SA(37,1),"0","9")&&(enc+=t),"CPKOI8"==enc&&(enc+=X.SA(38,1)),v5=!0 else switch(rectp=32,X.U8(29)){case 2:enc="CP850" break case 3:enc="CP1252" break case 4:enc="CP10000" break case 100:enc="CP852" break case 101:enc="CP865" break case 102:enc="CP866" break case 103:enc="IBM861" break case 106:enc="IBM737" break case 107:enc="IBM857" break case 150:enc="CP10007" break case 151:enc="CP10029" break case 152:enc="CP10006" break case 200:enc="CP1250" break case 201:enc="CP1251" break case 202:enc="CP1254" break case 203:enc="CP1253" break default:enc="IBM437"}}for(validC=["C","N","L","D","M","F","B","G","P","Y","T","I","V","X","@","O","+","0"],fldc=0,totalfldsz=1,p=rectp,old=[0,1];13!=X.U8(p)&&pfldsz)return fldc++,p+=2==nv?16:v5?48:32,0<=charStat(e.slice(0,e.indexOf(0)),1).indexOf("foreign")&&"IBM437"==enc&&(enc="CP1251")}if(totalfldsz-recsz==0){if(del=0,X.isDeepScan())for(p=hdrsz,i=0;ip+hksz){bad=bad.addIfNone("!short") break}switch(shd){case"INFO":var e=X.U16(q,_BE),a=X.U16(q+2,_BE),n=X.U16(q+6,_LE),m=X.U8(q+8) emaxh&&(maxh=a),nmaxdpi&&(maxdpi=n),mmaxgm&&(maxgm=m) break case"INCL":break case"TXTa":case"TXTz":X.isVerbose()&&(sOptions=sOptions.addIfNone("text&layoutinfo,"))}(q+=ssz)%2&&q++}break default:bad=bad.addIfNone("!badchunk<"+hkhd+">@"+Hex(p-8))}(p+=hksz)%2&&p++}}return sOptions.length&&","==sOptions[sOptions.length-1]&&(sOptions=sOptions.slice(0,sOptions.length-1)),bDetected=1,""!=bad&&(sVersion=sVersion.appendS("malformed"+addEllipsis(bad,128,64),"/")),X.isVerbose()&&(X.isDeepScan()&&(sOption((minw!=i?"["+minw+"~"+i+"]":minw)+"×"+(minh!=maxh?"["+minh+"~"+maxh+"]":minh)),sOption(mindpi!=maxdpi?"["+mindpi+"~"+maxdpi:mindpi,"","dpi"),sOption("gamma "+(mingm!=maxgm?"["+(mingm/10).toFixed(1)+"~"+(maxgm/10).toFixed(1)+"]":(mingm/10).toFixed(1)))),sOption(outSz(sz),"sz:")),result()}meta("format","DjVu document (.DJVU)") ================================================ FILE: dbs_min/db/Binary/format_doc.HLP.1.sg ================================================ function detect(){return Binary.compare("3f5f0300")&&(bDetected=1),result()}meta("format","MS Help") ================================================ FILE: dbs_min/db/Binary/format_doc.PDF.1.sg ================================================ function detect(){if(/^\%PDF-\d+\.\d+/.test(File.read_ansiString(0,10))){sVersion=File.getString(5,3),bDetected=1 var t=0 for(i=8;i<15;i++)128&File.read_uint8(i)&&t++ t&&(sOptions="binary data")}return result()}meta("format","PDF") ================================================ FILE: dbs_min/db/Binary/format_doc.RTF.1.sg ================================================ function detect(){if(/^{\\rtf1?/.test(File.read_ansiString(0,6))){bDetected=1 for(var e=4;eFile.getSize()){sVersion+="!short" break}switch(e+=8,hkhd){case"IEND":i=!0 break case"IHDR":s=File.read_uint32(e,_BE),h=File.read_uint32(e+4,_BE),a=1<=Binary.readDword(2)){switch(Binary.readDword(14)){case 40:sVersion="3" break case 108:sVersion="4" break case 124:sVersion="5"}if(sVersion){switch(Binary.readDword(30)){case 1:case 2:sOptions="RLE" break case 4:sOptions="JPEG" break case 5:sOptions="PNG"}(nHeight=~~Binary.readDword(22))<0&&(nHeight=-nHeight,sOptions=sOptions.append("top-down")),sOptions=sOptions.append(Binary.readDword(18)+"x"+nHeight,Binary.readWord(28)+"bpp")}bDetected=1}return result()}meta("image","Windows Bitmap") ================================================ FILE: dbs_min/db/Binary/image_CUR.1.sg ================================================ function detect(){if(40<=X.Sz()&&X.c("00000200")){var s,n,r=X.U16(4),t=0,i=0,e=0,p=6+16*r if(6===p||p>X.Sz())return!1 for(var o=0;oX.Sz()-22)return!1 p+=sz_ var u=X.U8(6+16*o) t=File.getSize()){a+="!short" break}if(44==l){if(imgs++,!File.read_uint16(p+4)||!File.read_uint16(p+6)){a+="!badimg" break}for(p+=8,e=File.read_uint8(p++),p++,128&e&&(r=1<<1+(7&e),p+=3*r,_log(" local palettes skipped @"+Hex(p))),s=File.read_uint8(p++);s&&p=File.getSize()){a+="!short" break}}}59!=l&&(a+="!badEoS"),imgs?(1X.Sz())return!1 for(var n,r,e,a=0,s=0,c=0,_=68719476735,o=68719476735,u=68719476735,f=0;fX.Sz()-22)return!1 if(i+=sz_,0===n){var h=X.U32(18+16*f,_LE) if(X.c("89'PNG\r\n'1A0A........'IHDR'",h))n=X.I32(h+16,_BE),r=X.I32(h+20,_BE) else{if(!X.c("28000000",h))return!1 n=Math.abs(X.I32(h+4,_LE)),r=Math.abs(X.I32(h+8,_LE))}}else r=X.U8(7+16*f) _=Math.min(n,_),o=Math.min(r,o),u=Math.min(e,u),a=Math.max(n,a),s=Math.max(r,s),c=Math.max(e,c)}if(!a||!s)return!1 sOption((_!=a||o!=s?_+"x"+o+" ~ ":"")+a+"x"+s),sOption((u!=c?u+"~":"")+c+"bpp"),1sz&&(sz=t+Binary.read_uint64(p+8)) sOption("sz:"+outSz(sz))}}else Binary.compare("734213004D00")&&(bDetected=1,sName="Basis Universal GPU Texture (.BASIS)",Binary.isVerbose()) return result()}meta("image","") ================================================ FILE: dbs_min/db/Binary/image_LBM.1.sg ================================================ function detect(){if(File.compare("'FORM'")&&(File.compare("'ILBM'",8)||File.compare("'PBM '",8))){for(sz=File.read_uint32(4,_BE)+8,File.getSize()>3&&(s++,e+="!bpline"+p+">3&&sOption(p,"scanline:"),sOption(r+"x"+o,"res:"," dpi"),X.U16(70)*X.U16(72)&&sOption(X.U16(70)+"x"+X.U16(72),"screen:"),i||sOption(128+(n*t*u>>3),"sz:")),bDetected=1}return result()}meta("image","ZSoft PiCture eXchange file (.PCX)") ================================================ FILE: dbs_min/db/Binary/image_PSD.1.sg ================================================ function detect(){if(32<=Binary.getSize()&&Binary.compare("'8BPS'")){switch(bDetected=1,File.read_uint16(4,_BE)){case 1:sName+=" (.PSD)",sVersion="v1.0" break case 2:sName+=" BIG (.PSB)",sVersion="v2.0" break default:bDetected=0}var e=Binary.read_uint16(12,_BE),a=Binary.read_uint32(14,_BE),t=Binary.read_uint32(18,_BE),i=Binary.read_uint16(22,_BE),n=Binary.read_uint16(24,_BE) switch(sOption(t+"x"+a),n){case 0:sOption("Bitmap") break case 1:sOption("Gray-scale") break case 2:sOption("Indexed") break case 3:sOption("RGB") break case 4:sOption("CMYK") break case 7:sOption("Multichannel") break case 8:sOption("Duotone") break case 9:sOption("Lab") break default:bDetected=0}sOption(e*i+"-bit")}return result()}meta("image","Adobe Photoshop") ================================================ FILE: dbs_min/db/Binary/image_PVR.1.sg ================================================ function detect(){return 52<=Binary.getSize()&&Binary.compare("'PVR'03")&&(bDetected=1,sName="PowerVR PVR texture (.PVR)",Binary.isVerbose())&&(sOption(Binary.read_uint32(24)+"x"+Binary.read_uint32(28)),sOption(["PVRTC 2bpp RGB","PVRTC 2bpp RGBA","PVRTC 4bpp RGB","PVRTC 4bpp RGBA","PVRTC-II 2bpp","PVRTC-II 4bpp","ETC1","BC1\\DXT1","DXT2","BC2\\DXT3","DXT4","BC3\\DXT5","BC4","BC5","BC6","BC7","UYVY","YUY2","BW1bpp","R9G9B9E5 Shared Exponent","RGBG8888","GRGB8888","ETC2 RGB","ETC2 RGBA","ETC2 RGB A1","EAC R11","EAC RG11","ASTC_4x4","ASTC_5x4","ASTC_5x5","ASTC_6x5","ASTC_6x6","ASTC_8x5","ASTC_8x6","ASTC_8x8","ASTC_10x5","ASTC_10x6","ASTC_10x8","ASTC_10x10","ASTC_12x10","ASTC_12x12","ASTC_3x3x3","ASTC_4x3x3","ASTC_4x4x3","ASTC_4x4x4","ASTC_5x4x4","ASTC_5x5x4","ASTC_5x5x5","ASTC_6x5x5","ASTC_6x6x5","ASTC_6x6x6"][Binary.read_uint64(8)]),Binary.read_uint32(16)?sOption("Linear RGB"):sOption("Standard RGB")),result()}meta("image","") ================================================ FILE: dbs_min/db/Binary/image_QOI.1.sg ================================================ function detect(){if(14<=Binary.getSize()&&Binary.compare("'qoif'")){switch(bDetected=1,sOptions=sOptions.append(Binary.read_uint32(4,_BE)+"x"+Binary.read_uint32(8,_BE)),File.read_uint8(12)){case 3:sOption("RGB") break case 4:sOption("RGBA") break default:return}switch(File.read_uint8(13)){case 0:sOption("sRGB with linear alpha") break case 1:sOption("all channels linear") break default:return}}return result()}meta("image","Quite OK Image (.QOI)") ================================================ FILE: dbs_min/db/Binary/image_SMDH.1.sg ================================================ function detect(){return Binary.compare("'SMDH'00000000")&&(bDetected=1),result()}meta("image","SMDH") ================================================ FILE: dbs_min/db/Binary/image_TGA.1.sg ================================================ function detect(){if(X.Sz()<18)return!1 bad="" var e=X.U8(0),s=X.U8(1),a=0,r=X.U8(2),o=X.U8(16),n="",t="none" if((o<1||17<=o)&&24!=o&&32!=o)return!1 switch(r){case 1:if(!s)return n="pseudo",X.isVerbose()&&sOption("colormap") break case 2:X.isVerbose()&&sOption("RGB"),a="24bit" break case 3:X.isVerbose()&&sOption("monochrome") break case 9:if(!s)return t="rle",n="pseudo",X.isVerbose()&&sOption("RLE colormap") break case 10:t="rle",X.isVerbose()&&sOption("RLE RGB"),a="24bit" break case 11:t="rle",X.isVerbose()&&sOption("RLE monochrome") break case 32:if(!s)return t="hdr",n="pseudo",X.isVerbose()&&sOption("H/d/RLE colormap") break case 33:if(!s)return t="hdrq",n="pseudo",X.isVerbose()&&sOption("H/d/RLE 4-pass colormap") break default:return}var f=0,u=X.U16(3),c=X.U16(5),b=X.U8(7),d=X.U16(8),U=X.U16(10),l=X.U16(12),m=X.U16(14),S=X.U8(17) if(!l||!m||4096X.Sz())return if(p=18,e&&X.SC(p,e,"CP437"),p+=e,s)switch(a>6==2?2:1 if("hdr"!=t&&"hdrq"!=t){for(var O=0;Ol&&(base++,ofs=base),p>X.Sz()){if(!X.isHeuristicScan())return bad=bad.addIfNone("!short")}return ea=0,X.isHeuristicScan()&&(sigsz=15,found=!1,ext=X.fSig(p,4096,"'TRUEVISION-XX.'00"),(found=k(ext)?!0:found)||(sigsz=18,k(ext=X.fSig(p,4096,"'TRUEVISION-XFILE.'00"))&&(found=!0)),found||k(ext=X.fSig(X.Sz()-20,21,"'TRUEVISION-XFILE.'00"))&&(found=!0),found)?(sVersion=sV,p=ext+sigsz):sVersion="v1.X",X.isVerbose()&&(sOption(l+"x"+m+" ("+d+","+U+")"),sOption(o,"bpp:"),o<24&&sOption(a,"colours:"),ea&&(sOption(gamma,"gamma:"),sOptionT(auth,"by:"),sOption(timestamp,"on:"),sOption(sw,"in:"),sOption(xmsg,'msg:"','"')),"rle"==t&&!X.isDeepScan()||sOption(outSz(p),"sz:")),bad&&(sVersion+="/malformed"+bad),bDetected=1,result()}function k(e){if(!(e<=p)){ea=X.U32(e-8),esz=X.U16(ea) var s=X.U32(e-4) if(!(p>e-8||ea&&p>ea||s&&p>s||(s||ea)&&ea==s||ea&&ea+esz>e||s&&ea&&eas)){if(ea?(sV=495==esz?"v2.0":"v2.X",auth=X.SC(ea+2,41,"CP437"),xmsg=X.SC(ea+43,324,"CP437"),timestamp=X.U16(ea+371)+"-"+X.U16(ea+369)+"-"+X.U16(ea+367)+" "+X.U16(ea+373)+":"+X.U16(ea+375)+":"+X.U16(ea+377),sw=X.SC(ea+426,41,"CP437").trim()+" v"+Math.floor(X.U16(ea+467)/100).toString()+"."+(X.U16(ea+467)%100).toString()+X.SC(ea+469,1,"CP437"),gamma=(X.U16(ea+478)/X.U16(ea+480)).toFixed(1)):sV="v2.X",s){var a=X.U16(s),r=10*a+2 if(eea)return for(i=0;iBinary.getSize()&&(e=Binary.getSize()),Binary.isSignaturePresent(0,e,n)||e!=Binary.getSize())return Binary.isSignaturePresent(Binary.getSize()-e,e,n)}meta("protector","javascript-obfuscator") ================================================ FILE: dbs_min/db/Binary/rom_32X.1.sg ================================================ function detect(){return Binary.compare("'SEGA SSF '",256)&&(bDetected=1),result()}meta("rom","Mega Drive (Mega Everdrive extensions)") ================================================ FILE: dbs_min/db/Binary/script_text.Shell.1.sg ================================================ function detect(){return isInterpreter("sh")&&(bDetected=1),result()}meta("script","Shell"),includeScript("shell-script") ================================================ FILE: dbs_min/db/Binary/shellcode.pe_to_shellcode.1.sg ================================================ function detect(){bDetected=0 var B=["4D5A4552E8000000005B4883EB09534881C3","4D5A4552E8000000005883E8095005","558BEC51518D45F85350E8AA0100005984C0750883C8FFE9A400000056578B7D08B84D5A00006639070F858C0000008B773C03F7813E50450000757F8D86A000000033DB391875046AFDEB71FF76345750E8FB00000083C40C84C075046AFCEB5C399E80000000742357FFB684000000FFB680000000FF75FCFF75F8E86F00000083C41484C075046AFBEB318D86C0000000391874095750E82800000059598B4628B90020000003C766854E167408536A0157FFD0EB07FFD0EB036AFE585F5E5BC9C204008B44240456578B7C24108B008B74380C85F674128B0E85C9740C6A006A0157FFD183C60475EE5FB0015EC3538B5C241855568B7424185703F3EB3C03C350FF5424188BE885ED74408B7E1003FBEB1F79050FB7C1EB058D430203C185C074295055FF54242085C0741F890783C7048B0F85C975DB83C6148B460C85C075BD85F60F95C05F5E5D5BC332C0EBF78B4424045355568B08034C241457EB478B410483F808723F8D68F8D1ED6A005B74320FB7545908668BC266C1E80C6685C074216683F803752B8B44241881E2FF0F00002B44241C03D6035424180102433BDD72CE0349048B3185F675B3B0015F5E5D5BC332C0EBF7565768029FE66AE88B0100008BF05985F67431688DBDC13F56E87C0000008BF8595985FF741E68FF1F7CC956E869000000595985C0740D8B4C240C894104B0018939EB0232C05F5EC353568B74240C83CAFF8A1E84DB743B8A7C24105784FF750A8D43BF3C19770380C3206A085F8BCA0FBEC3D1E933C28BD181F22083B8ED24010F44D1D0FB83EF0175E3468A1E84DB75CB5FF7D25E8BC25BC351515355568B742418B84D5A00005766390675618B463C8B44307885C074568B54301C33FF8B4C30188954241C8B5430208B443024894C241085C974388D1C328D2C308B4C241C0FB745006A018D048103C6894424188B0303C650E84FFFFFFF59593B44242074164783C50283C3043B7C241072CE33C05F5E5D5B5959C38B4424148B0003C6EBEF56578B7C240C83CAFF33F60FB7076685C0745B5355807C2418000FB7C8894C241475108D41BF6683F819770783C120894C2414668B5C24146A085D8BC233CAD1E88BD081F22083B8ED80E1010F44D066D1EB66895C241483ED0174068B4C2414EBD9460FB704776685C075A95D5BF7D25F8BC25EC364A1300000005356578B780C83C7148B37EB288D46F885C074258B581885DB741E8378300074126A00FF7030E85AFFFFFF59593B442410740C8B363BF775D433C05F5E5BC38BC3EBF800000000000000","4D5A4552E800000000594883E909488BC14805","56488BF44883E4F04883EC20E805000000488BE65EC348895C2408574883EC30488BF9488D4C2420E83702000084C0750883C8FFE9BD000000B84D5A00006639070F85AA00000048635F3C4803DF813B504500000F8597000000488D8BB0000000833900750AB8FDFFFFFFE9860000004C8B4330488BD7E86201000084C07507B8FCFFFFFFEB6F83BB9000000000742A0F28442420488D4C2420488B93900000004C8BC7660F7F442420E89300000084C07507B8FBFFFFFFEB3C488D8BD00000008339007408488BD7E8330000008B4328B9002000004803C766854B16740E4533C0488BCF418D5001FFD0EB09FFD0EB05B8FEFFFFFF488B5C24404883C4305FC348895C2408574883EC208B01488BFA488B5C10184885DB741B4C8B0B4D85C974134533C0488BCF418D500141FFD14883C30875E5488B5C2430B0014883C4205FC3488BC44889580848896810488970184889782041564883EC208BDA498BF04903D84C8BF1EB4A8BC84803CE41FF16488BE84885C074628B7B104803FEEB2679050FB7D1EB07488D56024803D14885D27447488BCD41FF56084885C0743B4889074883C708488B0F4885C975D24883C3148B430C85C075AF4885DB0F95C0488B5C2430488B6C2438488B742440488B7C24484883C420415EC332C0EBE148895C240848897C2410448B09498BD84C03CA4C8BDA33FF458B114585D27459418379040872F1418B51044C8BC74883EA0848D1EA7435430FB74C41080FB7C166C1E80C6685C074236683F80A752681E1FF0F0000498BC34103CA482BC34903CB49FFC04801014C3BC272CB418B41044C03C8EBA332C0EB02B001488B5C2408488B7C2410C348895C24084889742410574883EC20488BD9B9029FE66AE8FD010000488BF84885C07432BA8DBDC13F488BC8E893000000488BF04885C0741DBAFF1F7CC9488BCFE87E0000004885C0740B48894308B001488933EB0232C0488B5C2430488B7424384883C4205FC3448A09448ADA4C8BD14183C8FFEB414584DB750C418D41BF3C1977044180C120BA08000000418BC8410FBEC14133C0D1E9448BC14181F02083B8ED2401440F44C141D0F94883EA0175DB49FFC2458A0A4584C975BA41F7D0418BC0C3488BC448895808488968104889701848897820415441564157B84D5A0000448BFA4C8BC16639010F85870000004863413C8B8C088800000085C97478498D040833FF8B68184885ED746A448B4820448B50244D03C8448B601C4D03D0410FB702458B194D03D883CAFF498D3484EB2741BE080000008BCA0FBEC333C2D1E98BD181F22083B8ED24010F44D1D0FB4983EE0175E249FFC3418A1B84DB75D2F7D2413BD7742D48FFC74983C2024983C104483BFD72A833C0488B5C2420488B6C2428488B742430488B7C2438415F415E415CC3428B04064903C0EBDC48895C240848897C2410440FB7094183C8FF33FF8ADA448BD74C8BD9EB4684DB750F418D41BF6683F8197705664183C120BA08000000418BC8410FB7C14133C0D1E9448BC14181F02083B8ED2401440F44C16641D1E94883EA0175DA49FFC2470FB70C53664585C975B4488B5C240841F7D0488B7C2410418BC0C348895C240848896C24104889742418574883EC2065488B0425600000008BE9488B78184883C720488B1F483BDF7430488D43F04885C07427488B70304885F6741E488B48604885C9740B33D2E834FFFFFF3BC57405488B1BEBD0488BC6EB0233C0488B5C2430488B6C2438488B7424404883C4205FC300000000000000000000000000"],C=Binary.getSize() 16384]*>/im.test(e)&&(bDetected=1),sLang="HTM",result()}meta("source","HTML") ================================================ FILE: dbs_min/db/Binary/source_text.Pascal.1.sg ================================================ function detect(){var e=Binary.getHeaderString() return/^\s*program\s.*\s*uses\s/im.test(e)&&(bDetected=1),sLang="Pascal",result()}meta("source","Pascal") ================================================ FILE: dbs_min/db/Binary/source_text.XML.1.sg ================================================ function detect(){var e=Binary.getHeaderString() return/^(?:\xef\xbb\xbf)?<\?xml/.test(e)&&((e=e.match(/version="(.*?)"/))&&(sVersion=e[1]),bDetected=1),result()}meta("source","XML") ================================================ FILE: dbs_min/db/Binary/source_text.c.1.sg ================================================ function detect(){var e=Binary.getHeaderString() if((/^#ifndef (\w+).*\s+^#define \1/m.test(e)||/#\s*pragma (?:once|hdrstop)/.test(e))&&(sOptions="header",bDetected=1),/^(?:class\b|virtual\b|public:|private:|template\b)/m.test(e))/\sdef\s/.test(e)||(sName="C++",bDetected=1) else{var t=e.match(/^#include ["<].*?[>"]/gm) if(t){bDetected=1 for(var s=0;s@1Fq1Fx0F6,00F7,b(F8ZRu(XP2FzE,@r42fzWBxG!='")&&(sOptions="1997 by GyikSoft",bDetected=1),result()}meta("converter","COM2TXT") ================================================ FILE: dbs_min/db/COM/converter_COMT.1.sg ================================================ function detect(){return Binary.compare("'ENC.COM.B&F='")&&(sVersion="0.1d",sOptions="(com2text) by Alex Pruss",bDetected=1),result()}meta("converter","COMT") ================================================ FILE: dbs_min/db/COM/converter_CRX2COM.1.sg ================================================ function detect(){return Binary.compare("e9$$$$8b1e....c1....81c3....e8....b4..ba....cd21bb....e8....b4..ba....cd21b8....ba....cd2173")&&(bDetected=1),result()}meta("converter","CRX2COM") ================================================ FILE: dbs_min/db/COM/converter_E2C.1.sg ================================================ function detect(){return Binary.compare("be....bf....b9....57f3a5c3")?(sVersion="1.00-1.02",bDetected=1):Binary.compare("be....bf....b9....fc57f3a5c3")&&(sVersion="1.02a",bDetected=1),result()}meta("converter","E2C (EXE2COM) by The DoP") ================================================ FILE: dbs_min/db/COM/converter_EXE2COM.1.sg ================================================ function detect(){return Binary.compare("e9$$$$bf....be....a5a48cda83c2..50b9....ad970115e2")?(sVersion="1.0",sOptions="by D'B",bDetected=1):Binary.compare("e9$$$$e800005b508cc005....8b0e....03c889....8b0e")?(sVersion="1.0",sOptions="by Microsoft",bDetected=1):Binary.compare("b3..b9....33d2be....8bfeac32c3aa434932e403d0e3..eb..3b16....75..be....8bc6b1..d3e88cdb03c30344..a3....8cc805")?(sOptions="CRC check",bDetected=1):Binary.compare("e8$$$$bf....be....a5a48cda83c2..0116....81c2....8ed2bc....eb")?(sOptions="by //ViP",bDetected=1):Binary.compare("e9$$$$bf....be....a5a48cda83c2..50b4..bb....cd21580116....81c2....8ed2")?(sOptions="0-Relocs by dR.No //ViP",bDetected=1):Binary.compare("e9$$$$bf....be....a5a48cda83c2..0116....81c2....8ed2bc....eb..ea")?(sOptions="0-Relocs by Sage //UCF",bDetected=1):Binary.compare("e9$$$$e800005b81eb....8db7....bf....b9....f3a58db7....538ccf83c7..ad")?(sVersion="2.0",sOptions="by Paul Shpilsher",bDetected=1):Binary.compare("e9$$$$8cca81c2....3b16....76..ba....b409cd21cd20")?(sOptions="generic, type 1",bDetected=1):Binary.compare("be....8b043d....74..ba....b409cd21cd208bc6b1..d3e88cdb03c303....a3....8cc805....a3....8b44")?(sOptions="by RaskY",bDetected=1):Binary.compare("bf....be....b9....fcf3a4068ccb83c3..011e....011e....b9....8b54..03d381c2....8ec28b3c")||Binary.compare("bf....be....b9....fcf3a48ccb011e....011e....eb00bf....be....b9....bb....bd....fa")?(sVersion="1.0",sOptions="by Milkov",bDetected=1):Binary.compare("eb$$be....8bc6b1..d3e88cdb03c30344..89048cc805....8be88b44..b1..d3e803c50344..bb....8b1f")?(sOptions="by JauMing Tseng",bDetected=1):Binary.compare("e8$$$$bf....be....a5a48cda83c2..50b4..bb....cd21b9....ad970115e2")?(sVersion="1.0d",sOptions="1994 by D'B",bDetected=1):Binary.compare("e9$$$$92be....bf....fca5a48ccb83c3..b9....ad97011de2")?(sOptions="1996 by EM-Phaser",bDetected=1):Binary.compare("b430cd213c..73..33c00650cb")?(sOptions="by JVP",bDetected=1):Binary.compare("bf....be....b9....f3a48cd805....0344..8ccb9305....8be60364..8b4c..e3..5f5a")?(sName="CC",sVersion="2.61 beta",sOptions="EXE2COM",bDetected=1):Binary.compare("e8$$$$bf....be....a5a48cda83c2..50b4..bb....cd21580116....81c2....8ed2bc....eb")?(sOptions="by unknown",bDetected=1):Binary.compare("e9$$$$e9$$$$8cca81c2....3b16....76..ba....b409cd21cd20")?(sOptions="generic, type 2",bDetected=1):Binary.compare("be....8b043d4d5a74$$8bc6b1..d3e88cdb03c30344..a3....8cc8")&&(sOptions="by BuZZ Soft",bDetected=1),result()}meta("converter","EXE2COM") ================================================ FILE: dbs_min/db/COM/converter_EXETools_EXE2COM.1.sg ================================================ function detect(){return Binary.compare("e9$$$$e800005d8bcd83ed..bf....be....2bcff3a4b9....be....03f5e3..8cdb035e..ad8bf8011de2")?(sVersion="2.0, 2.1",bDetected=1):Binary.compare("68....68....68....68....68....68....5fbe....b9....f3a4c3")&&(sOptions="com header from EXETools 2.1",bDetected=1),result()}meta("converter","EXETools EXE2COM") ================================================ FILE: dbs_min/db/COM/converter_FIXCRK.1.sg ================================================ function detect(){return Binary.compare("'ROMANOID'32e4b0..cd104c5abf....c606......bd....e8....c606......bf....bd....e8....bd....c606......bf")&&(sOptions="by romanoid",bDetected=1),result()}meta("converter","FIXCRK") ================================================ FILE: dbs_min/db/COM/converter_FromBAT.1.sg ================================================ function detect(){return Binary.compare("e9$$$$be....bf....bb....c604..b9....fe04803c..77..c644....b80629cd21be....3c..74..8a04880743e2")&&(sOptions="1991 by Clockwork Software",bDetected=1),Binary.compare("e9$$$$fcbe....bf....bb....c604..b9....fe04803c..77..c644....b80629cd21be....3c..74..8a04880743e2")&&(sName="BatchMaster",sOptions="1993 by Clockwork Software",bDetected=1),result()}meta("converter","FromBAT") ================================================ FILE: dbs_min/db/COM/converter_MAKEBOO.1.sg ================================================ function detect(){return Binary.compare("'XPHPD[0GG0G,0G51G31GB'27'(G+(G:u'27'0g?(G>(GE1G@arwIV_F*=US@<1|_,5wXNg-7muTu(4'")&&(sOptions="executable2text",bDetected=1),result()}meta("converter","MAKEBOO") ================================================ FILE: dbs_min/db/COM/converter_NetCode.1.sg ================================================ function detect(){return Binary.compare("'T_OOWW3=XXWX5 2PY5w3P_-l.P-KD1Ep-OLPZ-pJP-pw40PQX5fsPu'")?(sVersion="1.11",sOptions="by JauMing Tseng //Nide",bDetected=1):Binary.compare("':?7%00%CCPY-@=PZ5+")&&(sVersion="1.40",sOptions="by JauMing Tseng //Nide",bDetected=1),result()}meta("converter","NetCode") ================================================ FILE: dbs_min/db/COM/converter_NetRun.1.sg ================================================ function detect(){return Binary.compare("'XPPPYZIQD[L-f6-g41GDSXu'17'@,~P^P_O,!(GU(GZ(Gnu5'")&&(sVersion="3.10",bDetected=1),result()}meta("converter","NetRun") ================================================ FILE: dbs_min/db/COM/converter_TurboBAT.1.sg ================================================ function detect(){return Binary.compare("ba....b4..909006b8....8ec0b9....268a26....80e4..26a0....24..3ac4")?(sVersion="3.10",bDetected=1):Binary.compare("e9$$$$fcbd....8b6e..8b66..8b5e..b4..cd21a1....8946..b8....50c646....8b5e..ffe3")?bDetected=1:Binary.compare("9090909090909006b8....8ec0b9....268a26....80e4..26a0....24..3ac474..26a0....24")?(sOptions="unregistered",bDetected=1):Binary.compare("ba....b4..cd2106b8....8ec0b9....268a26....80e4..26a0....24..3ac474..26a0....24")&&(sVersion="3.16-9u",bDetected=1),result()}meta("converter","TurboBAT") ================================================ FILE: dbs_min/db/COM/converter_Vacsina.4.sg ================================================ function detect(){return Binary.compare("e9$$$$e8....5b508cc005....8b0e....894f..8b0e....03c8894f..8b0e....894f..8b0e....03c8894f..8b3e....8b16")&&(bDetected=1),result()}meta("converter","Vacsina EXE2COM") ================================================ FILE: dbs_min/db/COM/converter_XCK2COM.1.sg ================================================ function detect(){return Binary.compare("e9$$$$be....e8....ad89c15156e8....be....e8")&&(bDetected=1),result()}meta("converter","XCK2COM") ================================================ FILE: dbs_min/db/COM/cryptor_Anti-Lamer_Cryptor.2.sg ================================================ function detect(){return Binary.compare("e9$$$$fa8cd3ba....8ed233d28ed38bdafb33c08ec026f716....eb")&&(sVersion="1.0",sOptions="1999 by Ozzman //iHC",bDetected=1),result()}meta("cryptor","Anti-Lamer Cryptor") ================================================ FILE: dbs_min/db/COM/cryptor_CSCRYPT.2.sg ================================================ function detect(){return Binary.compare("e9$$$$e8000059eb$$cceb$$e4..bb....ba....eb$$81eb....0c..2bcb")&&(sVersion="3.30",sOptions="by Christian Schwarz",bDetected=1),result()}meta("cryptor","CSCRYPT") ================================================ FILE: dbs_min/db/COM/cryptor_EXINCT.2.sg ================================================ function detect(){return Binary.compare("e8$$$$ba....b8....cd218bd8b8....33c933d2cd2191b4..cd218bdc8b072d....89078bf05603f183ee..8904")&&(sOptions="by Razor 1911",bDetected=1),result()}meta("cryptor","EXINCT") ================================================ FILE: dbs_min/db/COM/cryptor_J0B_cryptor.2.sg ================================================ function detect(){return(Binary.compare("e9$$$$fabe....8d0e....2bcee8$$$$5051ba....8bda301cac32c35183c4..b9")||Binary.compare("e9$$$$be....e8$$$$5052ac8a26....28e00ac0"))&&(sOptions="1996",bDetected=1),result()}meta("cryptor","J0B cryptor") ================================================ FILE: dbs_min/db/COM/cryptor_PU-Cryptor.2.sg ================================================ function detect(){return Binary.compare("e9$$$$fce8$$$$068cc8a3....b0..bf....b9....263005fec047e2")?(sOptions="1994",bDetected=1):Binary.compare("e9$$$$fcb0..bf....b9....300547e2")?(sOptions="1992",bDetected=1):(Binary.compare("e9$$$$fcb0..bf....b9....263005fec047e2")||Binary.compare("e9$$$$fcbc....e8$$$$068cc8a3....b0..bf....b9....263005fec047e2")||Binary.compare("e9$$$$bc....fce8$$$$068cc8a3....b0..bf....b9....263005fec047e2"))&&(sOptions="1994",bDetected=1),result()}meta("cryptor","PU-Cryptor") ================================================ FILE: dbs_min/db/COM/cryptor_Phrozen_Crew_cryptor.2.sg ================================================ function detect(){return Binary.compare("e9$$$$eb$$be....8b3c83ef..578bf781c6....83c6..bf....a5a55f83ef..5733f6bd....33c9300a414f8bf175..5f83ff..74")&&(sOptions="1998",bDetected=1),result()}meta("cryptor","Phrozen Crew cryptor") ================================================ FILE: dbs_min/db/COM/cryptor_SDW.2.sg ================================================ function detect(){return Binary.compare("e9$$$$545b3bdc75..eb$$9c5b81cb....539d9c5825....75..e8")?(sVersion="1.7X",sOptions="by MANtiC0RE",bDetected=1):Binary.compare("e9$$$$545b3bdc75..eb$$9c5b81cb....539d9c5825....74..50584c4c5b33c3")?(sVersion="1.78",sOptions="by MANtiC0RE",bDetected=1):Binary.compare("e9$$$$ac2d....04..89c5e8....f514..f9362633f6")?(sVersion="1.79",sOptions="by MANtiC0RE",bDetected=1):Binary.compare("e9$$$$e9$$$$e4..e8....e4..e9$$$$26fb78")?(sVersion="1.7",sOptions="by MANtiC0RE",bDetected=1):(Binary.compare("b8....bd....2e8a76..80f6..80ee..2e8876..83c5..4874..eb")||Binary.compare("be....31d281c2....2e8034..83ee..83c2..74..31c005....50c3"))&&(sVersion="1.80",sOptions="by MANtiC0RE",bDetected=1),result()}meta("cryptor","Shadow Com Cryptor (SDW)") ================================================ FILE: dbs_min/db/COM/cryptor_Sydex.2.sg ================================================ function detect(){return Binary.compare("eb$$ba....b8....bb....33ed8bf8434f505952494748542053..4445582c..414c4c")||Binary.compare("e9$$$$ba....b8....bb....33ed8bf8434f505952494748542053..4445582c..414c4c")?(sOptions="1987 by Sydex and C.P.Guzis",bDetected=1):Binary.compare("e9$$$$33c09e8bd88bc88bd08be88bf08bf88cc88ed88ec08ed08d26....8d36")&&(sOptions="1986,1987 by Sydex and C.P.Guzis",bDetected=1),result()}meta("cryptor","Sydex cryptor") ================================================ FILE: dbs_min/db/COM/cryptor_UComCry.1.sg ================================================ function detect(){return Binary.compare("e9$$$$6006fae4640c40e664b8....8ec026c706")&&(sOptions="by UniquE",bDetected=1),result()}meta("cryptor","UComCry") ================================================ FILE: dbs_min/db/COM/cryptor_USCC.2.sg ================================================ function detect(){return Binary.compare("e9$$$$60bb....b9....300f43e2")&&(sVersion="1.4",sOptions="by UniquE",bDetected=1),result()}meta("cryptor","Shitty COM Cryptor") ================================================ FILE: dbs_min/db/COM/cryptor_cryptors.2.sg ================================================ function detect(){var e return Binary.compare("e9$$$$60c704....c644....b9....bf....ac32018bd64a")?(sVersion="0.04",sOptions="by SkullC0DEr",bDetected=1):Binary.compare("e9$$$$60c704....c644....e8$$$$5f83c7..33dbb9....8a043201")?(sName="crypt 95-97",sOptions="type 2 by SkullC0DEr",bDetected=1):Binary.compare("e800005dbf....e8$$$$fa065733ff57078d76..b9....8004..46e2")?(sOptions="by Synopsis",bDetected=1):Binary.compare("eb$$fdbf....ba....33c01e8ed8a3....1fb1..525e3bfa74..ac3205aae2..eb")?(sOptions="by Min-Jei-Chen",bDetected=1):Binary.compare("e8$$$$eb$$8cca8eda8ec2be....bf....b9....eb$$ad2ea3....2e3136....8bc18bdef7e3eb$$2e3106....2e3116....2ea1....abe2")?(sOptions="by PHOENiX",bDetected=1):Binary.compare("5053515756b8....508bf0b9....b0..8bfe0004f71404..46e2")?(sOptions="by FalCoN'AleX",bDetected=1):Binary.compare("40429c58f6c4..74..eb....b4..be....bf....b9....68....68....68....57f3a4c3")?(sOptions="by Terrible BloodSucker //FDs Group",bDetected=1):Binary.compare("e9$$$$e80000fa9cfc505393584c4c3bc35b74..9de8....32e480c4..3065..47e2")?(sName+=" N1",sOptions="by ZeroCoder //XG",bDetected=1):Binary.compare("be....b9....ac03d8e2..81fb....74..cd19be....8bfeb9....8a26....ac32c1aae2")?(sOptions="by Kai",bDetected=1):Binary.compare("eb$$c606......f873..e9$$$$be....bf....0633c08ec0bb....fa268b07268917a3")?(sName+=" N2",sOptions="by ZeroCoder //XG",bDetected=1):Binary.compare("e9$$$$e800002e9c589e72..fa9cfc505393584c4c3bc35b74..9de8....32e480c4")?(sOptions="by Digital Information Pirates Group (DiPG)",bDetected=1):Binary.compare("'PHROZEN'fa'CREW'0d....fbfdbe....ac300481fe....77..94")?(sOptions="by Phrozen Crew",bDetected=1):Binary.compare("0e1fb9....be....80....301c46e2..eb")?(sOptions="by Dwolf //ROK",bDetected=1):Binary.compare("2e8036....28eb00c3")?(sName+=" #2",sOptions="by Misha",bDetected=1):Binary.compare("be....e8$$$$5d8bce8d72..bf....fd5747acaa86c4ac32c4aae2..8d75..fcf98d7e..c3")?(sOptions="by TGT",bDetected=1):Binary.compare("e9$$$$33dbb9....d1e941b8....8b97....33c28987....924343e2..68....c3")?(sOptions="by hijaq",bDetected=1):Binary.compare("e9$$$$0e179c58f6c4..75..b9....b8....2bc8bf....be....8a0551b9....8ae0862432c44ee2..88054759e2..e9")?(sOptions="1996 by WildRover",bDetected=1):Binary.compare("668d3e....66b9........678137....6683c7..e2..e9")?(sOptions="by PCY group",bDetected=1):Binary.compare("e9$$$$66b8........66a3....be....8bfeb9....fcad35....f7d0abe2..68....c3")?(sOptions="by Evil Genius //rPG",bDetected=1):Binary.compare("e9$$$$9cfafc1e06bb....b44acd21b448bb....cd218ec0be....b9....51bf....57f3a5061fb9....5e8bfe")?(sOptions="by AliS S0fT //VCrT",bDetected=1):Binary.compare("eb$$e8$$$$eb$$e4210c..e62133c08ed80e50558becc746......5dfa8f06....8f06....fb9c580d....509d")?(sVersion="#2",sOptions="by RAZOR 1911",bDetected=1):Binary.compare("'SNOWPANTHER'e9$$$$................8db7....bf....b9....f3a58db7....538ccf83c7..ad09c074..91ad")?(sName+=" #1",sOptions="by Snow Panther //DTG",bDetected=1):Binary.compare("fcbe....bf....b9....90ba....c606......90ac0fb61e....03da8a2732c4aafe06....803e......75..c606")?(sOptions="by pASkuda",bDetected=1):Binary.compare("e9$$$$50538bdc8cd0bc....8ed49090909090909090909090909090909033e48ed4bc....909090909090909090909090909090908ed08be35b58c606")?(sOptions="by Crack Soft",bDetected=1):Binary.compare("e9$$$$16179c58f6c4..74..faeb..e8$$$$58")?(sVersion="1.0",sOptions="1999 by Alex",bDetected=1):Binary.compare("e8$$$$33ed83ed..2ed0....5e0e8bfe81e7....f7df03fe2e893526a1....8ec0263b06....74..f92eff35")?(sOptions="by DREAMMASTER",bDetected=1):Binary.compare("b8....ffe0")?(e=Binary.readWord(1)-256,Binary.compare("be....8be88bd88bf883c5..908bd04a5287d687fe5981e9....52",e)&&(sOptions="by BlackLight, MANtiCORE",bDetected=1)):Binary.compare("'FALCON//TULACREW'0d....e9$$$$be....b9....33c0f7d03004eb..04..32e046e2")?(sOptions="by FALCON //UCL",bDetected=1):Binary.compare("bb....b9....be....301c02df86df46e2")?(sName+=" #1",sOptions="by dR.No",bDetected=1):Binary.compare("be....b9....b8....bb....33c34086c44b86fb93300446e2")?(sName+=" #2",sOptions="by dR.No",bDetected=1):Binary.compare("a3....eb$$5351525756b9....fa8bdc8cd2bc....03e1d1e94c4c5886e9d3c033c186e9f7d050e2")?(sOptions="by venus soft.",bDetected=1):Binary.compare("e9$$$$3aac....3a29fc1aa8....80cd..1e0e0e1f0726fe06....ba....be....81f6....80f9")?(sName+=" #1",sOptions="by LiGHt DRUiD //SOS",bDetected=1):Binary.compare("e9$$$$fd1e0e81de....89f63bf23aaf....03f423f61bf40a2d80f9..18dd0e071f03f433f081e6")?(sName+=" #2",sOptions="by LiGHt DRUiD //SOS",bDetected=1):Binary.compare("fcbe....8bfeac3206....8006......84c0aa75..be....e8")?(sOptions="by Sludge Vohaul //DAT",bDetected=1):Binary.compare("'[HPA]'b5..8bf98be9be....57f3a4c3")?(sOptions="by Hungarian Pirates Alliance [HPA]",bDetected=1):Binary.compare("bc....bb....b4..cd21bb....b9....8037..43e2..b409ba....cd21b8....cd21891e")?(sOptions="by .EXEcutor //SOS",bDetected=1):Binary.compare("e9$$$$e800005b8bcc8cd2fa33c08ec08ed0bc....588947..90588947..900e8bc305....508ed28be1fb")?(sOptions="1998 by Demon Magister Protection",bDetected=1):Binary.compare("eb$$2ea3....8cc82e0306....502eff36....cb")?(sOptions="1991 by YMI",bDetected=1):Binary.compare("53515256570633c08ec0fa26a1....268b16....fb075052b8....06508cca33c08ec058fa26a3....268916....fb07")?(sOptions="1991 by Elisoft",bDetected=1):Binary.compare("b8....5650c3")?(e=Binary.readWord(1)-256,Binary.compare("bf....8bdeb9....8b0533c689074747434346e2..c3",e)&&(sOptions="by PC0R$AiR //UCL",bDetected=1)):Binary.compare("908cc8515a54e9$$$$36c0e0..eb$$eb$$6a..e8$$$$58eb$$e8$$$$58eb$$e8$$$$eb$$2eeb$$eb$$665eeb$$eb$$7c")||Binary.compare("0f011e....fbe9$$$$e90000c0c3..f8eb$$6a..c0e9..e800000f23dae8000059665e36e8")?(sName="Rowdy's Strong Protection {MtE}",bDetected=1):Binary.compare("fa499033c0fbe9$$$$e800005eeb")?(sName="Rowdy's Strong Protection",bDetected=1):Binary.compare("e9$$$$5060bf....c706........c605..e8....5e5681c6....b9....5756ffe7")?(sOptions="1998 by StrangeLion",bDetected=1):Binary.compare("e8$$$$5f87f757b9....ac34..aae2..c3")?(sName="Wumpus soft lab cryptor",bDetected=1):Binary.compare("e8$$$$5eb9....ac32c12e8844..e2..e9")?(sOptions="by MXL //RIP",bDetected=1):Binary.compare("e9$$$$8d36....fd8d0e....81e9....d1e9add1c835....8944..e2..ff26")?(sOptions="1989 by Sydex",bDetected=1):Binary.compare("e9$$$$bb....b4..b0..8b0e....8a1728c230e28857..43fec0e2")?(sOptions="1999 by SLine",bDetected=1):Binary.compare("'(C)1997'00'by'00'PSH'0d0a..005b..3139287a..2850..81c6....33db8bfeb9....ad35")?(sOptions="1997 by PSH",bDetected=1):Binary.compare("e9$$$$bf....be....b9....b0..2e8a1c32c132d82e881d4647e2..e9")?(sName="SAGE-crypt",bDetected=1):Binary.compare("e9$$$$fcb0..bf....b9....263005fec047e2..b9....be....e8")?(sName="PU-Disk encryption",sOptions="1992",bDetected=1):Binary.compare("e9$$$$bb....8a073c..74..e8$$$$50515234..3c..74..b4..8ad0cd21e9")?(sOptions="1999 by Leon",bDetected=1):Binary.compare("fa'SNOW'fa'PANTHER'fabc....bf....8bf7b9....b3..ac34..d2c02ac3d2c832c3fec3aae2")?(sName+=" #2",sOptions="by Snow Panther //DTG",bDetected=1):Binary.compare("e9$$$$c704....c644....b9....5683c6..8bfeb2..b6..ac32c202d6aae2..c3")?(sOptions="1997 by Ment0R //UCL",bDetected=1):Binary.compare("eb$$bb....8b0f03d981c3....8be38cc88ed88ec08ed0b8....ba....cd21b3..ccb3..cc")?(sOptions="1993 by The Shadow Lord",bDetected=1):Binary.compare("eb$$ccbe....bb....b2..bf....cc8b0d8bc103c7cc05....83c7..8be0cc")?(sOptions="by The Shadow Lord",bDetected=1):Binary.compare("eb$$bb....001f4beb$$001f4beb")?(sName="Crypt.Trivial.173",sOptions="1998 by SMT",bDetected=1):Binary.compare("'SFINKS_SOFT___'fafcb430cd21fb33c0502ec606......0783e9..3be175..26c706........b9")?(sOptions="by SFINKS SOFT",bDetected=1):Binary.compare("e8$$$$1e33c08ed8f716....eb$$f716....1f5ebf....57b9....ac34..aae2")?(sOptions="by R!SC",bDetected=1):Binary.compare("e9$$$$6033edbe....b4..bd....bf....ac32c4aa80c4..fec43bf575..33c0b9....f3ab61bf....ffe7")?(sOptions="by DarkGrey //DSA",bDetected=1):Binary.compare("'(C)1997'00'by'00'PSH'............................bc....6081c6....33db8bfeb9....ad35....c1c0..03d8abe2")?(sOptions="1997 by PSH",bDetected=1):Binary.compare("eb$$bf....33dbba....fcbe....8bcfccad")?(sName+=" #3",sOptions="by Misha /ACE",bDetected=1):Binary.compare("e9$$$$061e33c08ed8be....8904be....89041e071fb8....bf....268905be....b9....8a04263205")&&(sOptions="by SafeSoft",bDetected=1),result()}meta("cryptor","Cryptor") ================================================ FILE: dbs_min/db/COM/driver_DIGPAK.1.sg ================================================ function detect(){return Binary.compare("e9$$$$8cc88ed88ec0e8$$$$1e56be....33c08ed8c5340bf674")?(sOptions="1992 by The Audio Solutions",bDetected=1):Binary.compare("e9$$$$8cc88ed88ec0c706........c706........c706........b8....50e8$$$$558bec061e5657fc")&&(sOptions="1991 by The Audio Solutions",bDetected=1),result()}meta("driver","DIGPAK") ================================================ FILE: dbs_min/db/COM/driver_MIDPAK.1.sg ================================================ function detect(){return Binary.compare("e9$$$$bb....d1ebd1ebd1ebd1eb43b8....cd21fa8cc88ed0bc....fb8ed88ec0c706")&&(sOptions="1992 by The Audio Solutions",bDetected=1),result()}meta("driver","MIDPAK") ================================================ FILE: dbs_min/db/COM/immunizer_ARF_AV_Inject.1.sg ================================================ function detect(){return Binary.compare("e9$$$$b8....50558bec83c4..061e90c746......c746......c646....c746......c746......8b5e..8dbf....b9")&&(sVersion="2.4",sOptions="1995 by ARF Enterprises",bDetected=1),result()}meta("immunizer","ARF/AV Inject") ================================================ FILE: dbs_min/db/COM/immunizer_CPAV.1.sg ================================================ function detect(){return Binary.compare("e9$$$$e9$$$$e8$$$$5b81eb....5051525657558beb2ec686......268e06....061fb9....bf....8bc7fcf2ae26803d..75")&&(sVersion="1993",bDetected=1),result()}meta("immunizer","Central Point Anti-Virus immunizer") ================================================ FILE: dbs_min/db/COM/immunizer_F-XLOCK.1.sg ================================================ function detect(){return Binary.compare("e8$$$$505351521e8e1e....33db8b07433d....74..75..43833f..75..4343")&&(sVersion="1.16",bDetected=1),result()}meta("immunizer","F-XLOCK") ================================================ FILE: dbs_min/db/COM/immunizer_IMMUN.1.sg ================================================ function detect(){return Binary.compare("e9$$$$5053515256571e06e8....5e81ee....2e8936....8bfe81c7....2e8b1d2bfb83c7..81ef....8befb430cd21")&&(sVersion="1.2r",sOptions="1993 by J.Bleuel",bDetected=1),result()}meta("immunizer","IMMUN") ================================================ FILE: dbs_min/db/COM/immunizer_TAV.1.sg ================================================ function detect(){return Binary.compare("e9$$$$e9$$$$e800005b81eb....5051525657558beb2ec686......268e06....061f")&&(sOptions="by CARMEL Software Engineering",bDetected=1),result()}meta("immunizer","Turbo Anti-Virus") ================================================ FILE: dbs_min/db/COM/immunizer_VSS.1.sg ================================================ function detect(){return Binary.compare("e9$$$$e8$$$$5b81eb....1e065051525354555657061e8bebb430cd2186e03d....73..e9")&&(sVersion="1993 by Ralph Roth",bDetected=1),result()}meta("immunizer","Viren Schutz Schild") ================================================ FILE: dbs_min/db/COM/other_XLOADER.2.sg ================================================ function detect(){return Binary.compare("fc8cdb33c08ec0b8....26a3....268c0e....5052faba....b0..ee42ec")&&(sVersion="2.00",sOptions="by CyberMan + ST!LLS0N",bDetected=1),result()}meta("other","XLOADER") ================================================ FILE: dbs_min/db/COM/other_integrity_checker.1.sg ================================================ function detect(){return Binary.compare("e9$$$$505351521ea1....8ed829db43833f..75..434389dab8....cd211fb9....ba....72..89c3b4..cd21")&&(sOptions="1990-92 by D.A. Martynoff",bDetected=1),result()}meta("other","integrity checker") ================================================ FILE: dbs_min/db/COM/packer_4kZIP.2.sg ================================================ function detect(){return Binary.compare("fcb1..e8$$$$8736....b8....d3e0482306....66d32e....280e....77..506633c0ac8a0e....80c1..66d3e0")&&(sOptions="by pascal //Digital Nightmare",bDetected=1),result()}meta("packer","4kZIP") ================================================ FILE: dbs_min/db/COM/packer_AVPACK.2.sg ================================================ function detect(){return Binary.compare("eb$$8cda0316....3916....73..b409ba....cd21c3")&&(sVersion="1.22",sOptions="Andrei Volkov",bDetected=1),result()}meta("packer","AVPACK") ================================================ FILE: dbs_min/db/COM/packer_COMPACK.2.sg ================================================ function detect(){return Binary.compare("BE....E8....5D83C5..55505351520E070E1F8BCE8D72..BF....D1E9FD57F3A5")?(sVersion="4.5",bDetected=1):Binary.compare("BE....E8....5D83C5..55505351520E070E1F8D72..bf....b9....90fd57f3a58d75..fcf98bfdc3")?(sVersion="4.5?",bDetected=1):Binary.compare("BE....E8....5D83C5..555053510E070E1F8BCE8D72..BF....D1E9FD57F3A5")?(sVersion="5.1",bDetected=1):Binary.compare("BE....E8....5D83C5..550e1f0e07505351528bce8d72..bf....d1e9fd57f3a58d75..fcf98bfdc3")?(sVersion="4.5",bDetected=1):Binary.compare("be....0e530e520e070e1fe800005d8bce8d72..bf....d1e9fd57f3a58d75..fcf98d7e..c3")||Binary.compare("be....505351520e070e1fe800005d8bce8d72..bf....d1e9fd57f3a58d75..fcf98d7e..c3")?(sVersion="4.4",sOptions="1990",bDetected=1):Binary.compare("BE....E8....5D83C5..558bce8d72..bf....d1e9fd57f3a58d75..fcf98bfdc3")&&(sVersion="4.5?",bDetected=1),result()}meta("packer","COMPACK") ================================================ FILE: dbs_min/db/COM/packer_Cheat_packer.2.sg ================================================ function detect(){return Binary.compare("eb$$b9....ba....bf....bb....b8....be....83ec..8becfc8866..32e48976..8bf703c18bf83bfe76..fd574e4f")&&(sOptions="1993 by TWIN of TRSi",bDetected=1),result()}meta("packer","Cheat packer") ================================================ FILE: dbs_min/db/COM/packer_Compressor.2.sg ================================================ function detect(){return Binary.compare("eb$$8cc8488ec026813e........72..05....8ec0be....ba....33ffb9....b0..f3aa")&&(sVersion="1.0",bDetected=1),result()}meta("packer","Compressor") ================================================ FILE: dbs_min/db/COM/packer_CyberWare_Packer.2.sg ================================================ function detect(){return Binary.compare("565056fd8bfc83ef..b9....be....fea447ffe7")&&(sOptions="1997",bDetected=1),result()}meta("packer","CyberWare Packer") ================================================ FILE: dbs_min/db/COM/packer_Diet.2.sg ================================================ function detect(){return Binary.compare("bf....3bfc72$$fdbe....b9....f3a5fc8bf7bf....adad8be8b2..e9")?(sVersion="1.00",sOptions="modified",bDetected=1):Binary.compare("bf....3bfc72$$be....b9....fdf3a5fc8bf7bf....adad8be8b2..e9")?(sVersion="1.00, 1.00d",bDetected=1):Binary.compare("......bf....b9....3bfc72$$fdf3a5fc8bf7bf....adad8be8b2..e9")?(sVersion="1.02b, 1.10a",bDetected=1):Binary.compare("......bf....b9....3bfc72$$31dbeb$$fdf3a5fc8bf7bf....adad8be8b2..e9")?(sVersion="1.20",bDetected=1):Binary.compare("f99ceb$$55061e575652515350e8$$$$59b1..d3e98cc803c18ed88ec0")&&(sVersion="1.44/1.45",bDetected=1),result()}meta("packer","Diet") ================================================ FILE: dbs_min/db/COM/packer_EXC.2.sg ================================================ function detect(){return Binary.compare("e9$$$$e8$$$$5f81fc....72..8745..a3....8a45..a2....fc8db5....bd....8cca")&&(sVersion="1.0.0",sOptions="by Kris Heidenstrom",bDetected=1),result()}meta("packer","EXC") ================================================ FILE: dbs_min/db/COM/packer_ICE.1.sg ================================================ function detect(){return Binary.compare("eb$$be....8bfe8b0e....8b16....b8....50fcad33c2ab8bd0e2")&&(sVersion="1.0",bDetected=1),result()}meta("packer","ICE") ================================================ FILE: dbs_min/db/COM/packer_LGLZ.2.sg ================================================ function detect(){return Binary.compare("bf....3bfc72$$be....b9....fdf3a4fc8bf746bf....e8")&&(sVersion="1.03/04",sOptions="1996",bDetected=1),result()}meta("packer","LGLZ") ================================================ FILE: dbs_min/db/COM/packer_PKLITE.2.sg ================================================ function detect(){return Binary.compare("B8....BA....3bc473..8bc42d....25....8bf8b9....be....fcf3a58bd8b1..d3eb8cd903d95333db53cb")?(sVersion="1.12, 1.20",bDetected=1):Binary.compare("B8....BA....3bc473..8bc42d....9025....8bf8b9....90be....fcf3a58bd8b1..d3eb8cd903d95333db53cb")?(sVersion="1.15",bDetected=1):Binary.compare("50B8....BA....3bc473..8bc42d....25....8bf8b9....be....fcf3a58bd8b1..d3eb8cd903d95333db53cb")?(sVersion="1.50",bDetected=1):Binary.compare("B8....BA....8cdb03d83b1e....73..83eb..fa8ed3bc....fb83eb..8ec353b9....33ff57be....fcf3a5cb")?(sVersion="1.00, 1.03",sOptions="exe2com",bDetected=1):Binary.compare("ba....a1....2d....8ccb81c3....3bc377..05....3bc377..b4..ba....cd21cd20")?(sVersion="1.00c",bDetected=1):Binary.compare("ba....b8....05....3b06....73..2d....fa8ed0fb2d....8ec050b9....33ff57be....fcf3a5cb")?(sVersion="1.1X",bDetected=1):Binary.compare("B8....BA....3bc473..8bc42d....25....8bf8b9....be....fcf3a58bd8b1")&&(sVersion="1.12, 1.15, 1.20",bDetected=1),result()}meta("packer","PKLITE") ================================================ FILE: dbs_min/db/COM/packer_PRO-PACK.2.sg ================================================ function detect(){return Binary.compare("83ec..8becbe....fce8....05....8bc8e8....8bd003c605....8bf8e8....ad88....32e489....8bf703c18bf83bfe76")?(sVersion="2.08-2.19",bDetected=1):Binary.compare("83ec..8becbe....fce8....05....8bc8e8....8bd003c605....8bf8e8....8946..895e..ad8866..32e48976..8bf703c18bf83bfe76")?(sVersion="2.08-2.19",sOptions="-m1, locked",bDetected=1):Binary.compare("be....fce8....05....8bc8e8....8bd003c605....8bf883c6..ad32e48bee8bf703c18bf83bfe76")?(sVersion="2.14",sOptions="-m2",bDetected=1):Binary.compare("be....fce8....05....8bc8e8....8bd003c605....8bf8e8....5350ad32e48bee8bf703c18bf83bfe76")&&(sVersion="2.08-2.19",sOptions="-m2",bDetected=1),result()}meta("packer","PRO-PACK") ================================================ FILE: dbs_min/db/COM/packer_SCRE2B.2.sg ================================================ function detect(){return Binary.compare("8cda0116....ff2e....00")&&(sVersion="1.02",sOptions="by Graeme W. McRae",bDetected=1),result()}meta("packer","SCRE2B") ================================================ FILE: dbs_min/db/COM/packer_SCRNCH.2.sg ================================================ function detect(){return Binary.compare("eb$$bb....b44acd2181eb....73..ba....b9....e9")?(sVersion="1.02",sOptions="1988 by Graeme W. McRae",bDetected=1):Binary.compare("bb....b44acd2181eb....73..ba....b9....e9$$$$0e1fb440bb....cd21b8....cd21")?(sVersion="1.00",sOptions="1988 by Graeme W. McRae",bDetected=1):Binary.compare("bb....b44acd2181eb....73..ba....b9....e9$$$$b440bb....cd21b8....cd21")&&(sVersion="1.01",sOptions="1988 by Graeme W. McRae",bDetected=1),result()}meta("packer","SCRNCH") ================================================ FILE: dbs_min/db/COM/packer_SHRINK.2.sg ================================================ function detect(){return Binary.compare("509cfcbe....bf....57b9....f3a48b0e....be....bf....f3a4c3")&&(sVersion="1.0",sOptions="by Thomas G. Hanlin",bDetected=1),result()}meta("packer","SHRINK") ================================================ FILE: dbs_min/db/COM/packer_Scramb.2.sg ================================================ function detect(){return(Binary.compare("e9$$$$e8$$$$5b0e1f81eb....8bc305....508bc803d12bfac3")||Binary.compare("e9$$$$e8....5b0e1f81eb....8bc305....508bc803d12bfac3"))&&(sVersion="1.20",sOptions="by B.U.G.",bDetected=1),result()}meta("packer","Scramb") ================================================ FILE: dbs_min/db/COM/packer_Six-2-Four.2.sg ================================================ function detect(){return Binary.compare("'[ESP]'b5..8bf98be9be....57f3a4c3")?(sVersion="1.1",sOptions="Boogie //ESP",bDetected=1):Binary.compare("'PULP'83c4..fcbf....be....b5..57f3a5c3")&&(sVersion="1.0",sOptions="Kimmy //Pulp",bDetected=1),result()}meta("packer","Six-2-Four") ================================================ FILE: dbs_min/db/COM/packer_TPACK.2.sg ================================================ function detect(){return Binary.compare("03'TUSCON'030d0a005868....60e9")?(sVersion="0.5c",sOptions="1996 by Max //TUSCON",bDetected=1):Binary.compare("68....fd60be....bf....b9....f3a48bf7bf....fc46e9")&&(sVersion="0.55c",sOptions="1996 by Max //TUSCON",bDetected=1),result()}meta("packer","TPACK") ================================================ FILE: dbs_min/db/COM/packer_Triplex.2.sg ================================================ function detect(){return Binary.compare("bd....be....5553525a5b505351520e1f0e078bce8d72..bf....d1e9fd57f3a5")&&(sOptions="1994",bDetected=1),result()}meta("packer","Triplex") ================================================ FILE: dbs_min/db/COM/packer_UPX.2.sg ================================================ function detect(){return Binary.compare("b9....be....bf....fdf3a4fcf7e19387f783ee..19ed57")?(sVersion="0.50",sOptions="dos/com",bDetected=1):Binary.compare("81fc....77..cd20b9....be....bf....bb....fdf3a4fc87f783ee")?(sVersion="0.81-1.20",sOptions="dos/com",bDetected=1):Binary.compare("b9....be....bf....bd....fdf3a4fcf7e19387f783c6..57e9")&&(sVersion="0.30-0.40",sOptions="dos/com",bDetected=1),result()}meta("packer","UPX") ================================================ FILE: dbs_min/db/COM/packer_X-PACK.2.sg ================================================ function detect(){return Binary.compare("bd....be....bf....b8....99fcfa33c9e9$$$$8bd9ffd5")&&(sOptions="by Jari Kytojoki",bDetected=1),result()}meta("packer","X-PACK") ================================================ FILE: dbs_min/db/COM/packer_XE.2.sg ================================================ function detect(){return Binary.compare("be....56bf....b9....fc56f3a55fe9")&&(sVersion="1.42",bDetected=1),result()}meta("packer","XE") ================================================ FILE: dbs_min/db/COM/packer_XPACK.2.sg ================================================ function detect(){return Binary.compare("e9$$$$fa8bece8....06bf....57e8....06b8....50be....bf....cb")?(sVersion="1.67",bDetected=1):Binary.compare("e9$$$$fa8bece8....fb06bf....57e8....06b8....50be....bf....cb")?(sVersion="1.67.1",bDetected=1):Binary.compare("e9$$$$8cc805....8ec0bf....8bf7fcb9....f3a506b8....50cb")?(sVersion="1.65",bDetected=1):Binary.compare("e9$$$$8cc8a3....05....8ec0bf....8bf7fcb9....f3a506b8....50cb")&&(sVersion="1.4",bDetected=1),result()}meta("packer","XPACK/LZCOM") ================================================ FILE: dbs_min/db/COM/packer_aPACK.2.sg ================================================ function detect(){return Binary.compare("be....bf....8bcffc57f3a4c3")?(sVersion="0.98-0.99 small",bDetected=1):Binary.compare("8cc880c4..8ec0fcb9....be....8bfe57f3a55fbe....0668....1e078ed8cb")?(sVersion="0.82b-0.94b",bDetected=1):Binary.compare("8cc805....8ec0598ed051be....bf....5057fcb2..bd....50a4ffd5")?(sVersion="0.61",bDetected=1):Binary.compare("8cc805....8ec0598ed051be....bf....5057fcb6..bd....ffd5")?(sVersion="0.58-0.74",bDetected=1):Binary.compare("8cc880c4..8ec0fcb9....be....8bfe57f3a55fbe....06ba....521e078ed8cb")&&(sVersion="0.82-0.94",bDetected=1),result()}meta("packer","aPACK") ================================================ FILE: dbs_min/db/COM/packer_com_RLE_packer.2.sg ================================================ function detect(){return Binary.compare("60be....bf....8b0e....f3a4be....bf....57b9....f3a4c3")?(sOptions="by NOP/PC",bDetected=1):Binary.compare("fc8cc833ff05....8ec006be....b9....57f3a40e07cb")&&(bDetected=1),result()}meta("packer","com RLE packer") ================================================ FILE: dbs_min/db/COM/packer_envelope.2.sg ================================================ function detect(){return Binary.compare("60ba....3bd472$$be....8bfeb9....bb....fcad33c343abe2")&&(sOptions="by ROWDY, St.Petersburg",bDetected=1),result()}meta("packer","envelope") ================================================ FILE: dbs_min/db/COM/protector_ABK-Scrambler.2.sg ================================================ function detect(){return Binary.compare("b430cd2186e03d....73..cd209c06b8....50cf")&&(bDetected=1),result()}meta("protector","ABK-Scrambler") ================================================ FILE: dbs_min/db/COM/protector_ACE_Scrambler.2.sg ================================================ function detect(){return(Binary.compare("2c..fec024..34..fec824..34..bb....0c..eb$$24..0c..81eb....f6d8eb$$2c..fec0ffe3")||Binary.compare("24..0c..f6d8eb$$fec8bb....04..0c..f6d804..fec0f6d881eb....24..f6d8fec034..0c..04..2c..ffe3")||Binary.compare("34..fec834..0c..24..04..fec0bb....0c..2c..0c..81eb....eb$$fec0f6d82c..fec0f6d80c..ffe3")||Binary.compare("24..fec82c..bb....fec8f6d8eb$$04..81eb....0c..fec0fec80c..34..ffe3")||Binary.compare("24..eb$$04..bb....f6d834..fec8fec0eb$$0c..81eb....34..24..34..eb$$ffe3")||Binary.compare("34..fec804..24..0c..04..bb....0c..04..f6d881eb....0c..fec8f6d824..0c..ffe3")||Binary.compare("f6d834..2c..bb....0c..34..fec004..34..fec004..81eb....2c..34..24..eb$$04..2c..04..ffe3")||Binary.compare("fec0eb$$24..34..bb....f6d834..fec024..fec0f6d834..81eb....f6d80c..eb$$04..ffe3"))&&(sOptions="1996",bDetected=1),result()}meta("protector","A.C.E. Scrambler") ================================================ FILE: dbs_min/db/COM/protector_AVAST-Protect.2.sg ================================================ function detect(){return Binary.compare("eb$$8cc82e0306....502eff36....cb")&&(sOptions="1999 by P.Baudis",bDetected=1),result()}meta("protector","AVAST-Protect") ================================================ FILE: dbs_min/db/COM/protector_AdFlt.2.sg ================================================ function detect(){return Binary.compare("68....9c0fa00fa860fd6a..0fa1be....ad6664ff36....648b16....643106....6664ff36....648916....adff36")?(sVersion="2.0",sOptions="by EliCZ",bDetected=1):Binary.compare("9c0fa06660fd6a..0fa1be....ad6664ff36....648b16....668f06....643106....6664ff36....648916....668f06....adff36")&&(sOptions="by EliCZ",bDetected=1),result()}meta("protector","AdFlt") ================================================ FILE: dbs_min/db/COM/protector_Adys_COM-Scrambler.2.sg ================================================ function detect(){return Binary.compare("33c08ed88ec0fcfabe....8bfead2ea3....ad2ea3....b8....ab8cc8ab")&&(sOptions="1993",bDetected=1),result()}meta("protector","Ady`s COM-Scrambler") ================================================ FILE: dbs_min/db/COM/protector_Anti-hack_encryption_system.2.sg ================================================ function detect(){return Binary.compare("eb$$bd....33c08ec026c706........268c0e....8b46..26a3....268c0e....0e07")&&(sOptions="by Rezaul Kabir //Shuvro",bDetected=1),result()}meta("protector","Anti-hack encryption system") ================================================ FILE: dbs_min/db/COM/protector_BIN-Lock.2.sg ================================================ function detect(){return Binary.compare("eb$$31c08ec026c706........268c0e....26c706........268c0e....2ec706........2e8c0e....cccd01eb")&&(sVersion="1.00",sOptions="by Hit-BBS Programmers crew",bDetected=1),result()}meta("protector","BIN-Lock") ================================================ FILE: dbs_min/db/COM/protector_Best_Protection_Kit-B.2.sg ================================================ function detect(){return Binary.compare("eb$$fc8c06....e421a2....b0..e621fb33c08ed08be0be....8d3e....b9")?(sOptions="1993 by Eric Zmiro",bDetected=1):Binary.compare("eb$$fc8c06....e421a2....b0..e621fbf433c08ed08be0be....8d3e....b9")&&(sOptions="1992 by Eric Zmiro",bDetected=1),result()}meta("protector","Best Protection Kit-B") ================================================ FILE: dbs_min/db/COM/protector_BinCOD.2.sg ================================================ function detect(){return Binary.compare("e9$$$$60fa6a000726ff36....26ff36....26c706........26c706........fbb9....bf....03f9ac")&&(sVersion="1.1",sOptions="by SierraMan",bDetected=1),result()}meta("protector","BinCOD") ================================================ FILE: dbs_min/db/COM/protector_Budokan.1.sg ================================================ function detect(){return Binary.compare("bf....b9....8bc1fd3305abe2..e9")&&(sOptions="by Electronic Arts, Inc.",bDetected=1),result()}meta("protector","Budokan") ================================================ FILE: dbs_min/db/COM/protector_C-crypt.2.sg ================================================ function detect(){return Binary.compare("e9$$$$e800005d83ed..55d9d09c5825....509d5057bf....b0..aa5f58665166b9........cc")&&(sVersion="1.02",sOptions="by De'FeinD //uCT",bDetected=1),result()}meta("protector","C-crypt") ================================================ FILE: dbs_min/db/COM/protector_CC#3.2.sg ================================================ function detect(){return Binary.compare("e9$$$$e800005d33db8bc3bf....893f81c3....532eff36....1f1e568d76..8bfbb9....f2a4c6")&&(sOptions="by ZeroCoder //XG",bDetected=1),result()}meta("protector","CC#3") ================================================ FILE: dbs_min/db/COM/protector_CC.2.sg ================================================ function detect(){return Binary.compare("b8....ba....3be073..b409ba....cd21b8....cd218bdc81eb....83e3..fcbe....8bfbb9....f3a48bc3b1..d3e88cc903c15033c050cb")?(sVersion="1.0",sOptions="1991 by B.Vorontsov",bDetected=1):Binary.compare("ba....b430cd213c..73..33c00650cbb9....b8....eb$$05....fc80c4..eb")?(sVersion="2.61 Beta",sOptions="by UniHackers",bDetected=1):Binary.compare("e9$$$$b9....be....8bfe5156b4..ac32c4c0c4..02e1aae2..bf....5e59f3a4be....56c3")?(sVersion="1.01",sOptions="by B.Vorontsov",bDetected=1):Binary.compare("bf....be....b9....fdf3a5fc8bf7bf....adad8be8b2..e9")&&(sVersion="1998",sOptions="by B.Vorontsov",bDetected=1),result()}meta("protector","CC") ================================================ FILE: dbs_min/db/COM/protector_CC286.2.sg ================================================ function detect(){return Binary.compare("e9$$$$eb$$e800005d81ed....eb$$bf....eb$$b0..eb$$e664eb$$b0..eb$$aaeb$$4f8d9e....eb$$538bdf")&&(sVersion="2.1",sOptions="by Dark Stalker //UCF",bDetected=1),result()}meta("protector","CC286x2") ================================================ FILE: dbs_min/db/COM/protector_CCC.2.sg ================================================ function detect(){return(Binary.compare("e9$$$$e800005b8b4c..501736890e....8b47..1347..3347..2b47..36a3....83c6..b9....8b7f..037f..ac363006")||Binary.compare("e9$$$$e800005b8b4c..501736890e....8b47..3347..36a3....83c6..b9....8b7f..037f..ac363006"))&&(sOptions="by ZeroCoder //XG",bDetected=1),result()}meta("protector","CCC") ================================================ FILE: dbs_min/db/COM/protector_CHECKPRG.2.sg ================================================ function detect(){return Binary.compare("33c0be....8bd8b9....bf....ba....474a74..ac320503d8e2")&&(sOptions="1992 by Jordi Mas Hernandez",bDetected=1),result()}meta("protector","CHECKPRG") ================================================ FILE: dbs_min/db/COM/protector_CNT.2.sg ================================================ function detect(){return Binary.compare("'CNT'58e8$$$$5e8b4c..bf....ac3306....3306")&&(sOptions="by C0NTRiVER",bDetected=1),result()}meta("protector","CNT") ================================================ FILE: dbs_min/db/COM/protector_COM-Protect.2.sg ================================================ function detect(){return Binary.compare("e9$$$$8b1e....83eb..b8....5053b430cd215b9ceb")?(sOptions="1995 by Mr.Wicked",bDetected=1):Binary.compare("e9$$$$565699521fe8....5d8d86....0e508f06....8f06....83c6..565f0e1fb9....b8....a3")?(sOptions="1994 by SiAC",bDetected=1):Binary.compare("2e8006......eb00c3")&&(sOptions="1994 by Misha //UCF",bDetected=1),result()}meta("protector","COM-Protect") ================================================ FILE: dbs_min/db/COM/protector_COM-Protection.2.sg ================================================ function detect(){return Binary.compare("e9$$$$eb$$86c08ec086dbeb$$05....87db8b2e....97eb$$aaaaeb$$aaaaeb$$bb....03ddb9....03cd87cbb8")&&(sOptions="by JAM //UCF",bDetected=1),result()}meta("protector","COM-Protection") ================================================ FILE: dbs_min/db/COM/protector_COMCRYPT.2.sg ================================================ function detect(){return Binary.compare("e9$$$$b9....be....89f70e1f0e07bb....fcad31d8abe2")?(sOptions="1997 by HPA",bDetected=1):Binary.compare("e9$$$$eb$$5053575152061e572e8b36....81c6....8a5c..2e881e....8a5c")?(sVersion="1.0b",bDetected=1):Binary.compare("e9$$$$b9....be....89f7fcac04..aae2..b8....bf....abb0..aab8....5033c0c3")?(sOptions="1997 by HPA",bDetected=1):Binary.compare("b8....ffe0")&&Binary.compare("bb....b9....33c02e802f..43e2",Binary.readWord(1)-256)&&(sOptions="by Stone",bDetected=1),result()}meta("protector","ComCrypt") ================================================ FILE: dbs_min/db/COM/protector_COMPROTECT.2.sg ================================================ function detect(){return Binary.compare("b8....15....72..8ac4bb....50515253555657061e50b8....58eb")&&(sVersion="2.10",sOptions="1988-95 by Ralph Roth",bDetected=1),result()}meta("protector","COMPROTECT (RCP)") ================================================ FILE: dbs_min/db/COM/protector_COP.2.sg ================================================ function detect(){return Binary.compare("bf....be....b9....ac3206....aae2")&&(sVersion="1.0",sOptions="by Jack A. Orman",bDetected=1),result()}meta("protector","COP") ================================================ FILE: dbs_min/db/COM/protector_CodeLock.2.sg ================================================ function detect(){return Binary.compare("e9$$$$bb....535856535981e9....31ff575a5dbe....e9")?(sVersion="4.0",sOptions="1993 by Dr. Detergent",bDetected=1):Binary.compare("e9$$$$b430cd213c037d$$068e06....061f31c0505e565fae")&&(sVersion="3.0",sOptions="1993 by Dr. Detergent",bDetected=1),result()}meta("protector","CodeLock") ================================================ FILE: dbs_min/db/COM/protector_Codesafe.2.sg ================================================ function detect(){return Binary.compare("e9$$$$5033c08ec02ef606......74..26ff36....061e07e8....07268f06....fb2e8c1e....26ff36....268f06")&&(sOptions="by EliaShim Ltd",bDetected=1),result()}meta("protector","Codesafe") ================================================ FILE: dbs_min/db/COM/protector_ComProt.2.sg ================================================ function detect(){return Binary.compare("e9$$$$e800005e8bee81ed....8db6....b9....f61446e2")&&(sVersion="1.0b",bDetected=1),result()}meta("protector","ComProt") ================================================ FILE: dbs_min/db/COM/protector_ComProtector.2.sg ================================================ function detect(){return Binary.compare("e9$$$$b9....bb....bf....2e8a0734..fec8c0c0..2e88052e000d2e002d4743e2")?(sVersion="1.0",sOptions="1998 by Marco Ruhmann",bDetected=1):Binary.compare("e9$$$$b9....e800005b83c3..90fa8bd48be133c02e030e....2ec007..0f23f82e2b0e....2e300f0f23d8")&&(sVersion="1.1",sOptions="1998 by Marco Ruhmann",bDetected=1),result()}meta("protector","ComProtector") ================================================ FILE: dbs_min/db/COM/protector_Comlock.2.sg ================================================ function detect(){return Binary.compare("e9$$$$eb$$bb....be....81c6....03f3bf....b9....f3a42e8a87....be....8bc82e300446ffc0e2")||Binary.compare("e9$$$$eb$$bb....be....81c6....03f3bf....b9....f3a42e8a87....be....8bcb2e300446fec0e2")?(sVersion="0.10",bDetected=1):Binary.compare("e9$$$$eb$$bb....be....81c6....03f3bf....b9....f3a42e8a87....8bcbbe....2e3004fec046e2")&&(sVersion="0.1X",bDetected=1),result()}meta("protector","Comlock by Trouble Makers") ================================================ FILE: dbs_min/db/COM/protector_CrAcKeR.2.sg ================================================ function detect(){return Binary.compare("eb$$be....8bfe5633c0be....ac02e081fe....72..5eac34..aa81fe....72")&&(sVersion="0.2a",sOptions="by Deu$",bDetected=1),result()}meta("protector","CrAcKeR") ================================================ FILE: dbs_min/db/COM/protector_Crack2EXE.1.sg ================================================ function detect(){return Binary.compare("b9....bf....8035..47e2..be....8034..46803c..75..be....e8....be....e8....be....e8....bd")?(sName+="/486",sVersion="0.02 Alfa",sOptions="1996 by Professor Nimnul",bDetected=1):Binary.compare("b9....bf....8035..47e2..d7aa6de9")&&(sVersion="0.02",sOptions="(crypted) 1996 by Professor Nimnul",bDetected=1),result()}meta("protector","Crack2exe") ================================================ FILE: dbs_min/db/COM/protector_CryptCom.2.sg ================================================ function detect(){return Binary.compare("e9$$$$be....56b9....c704....c644....8134....4646e2..31f631c9c3")?(sVersion="2.0",sOptions="by Nowhere Man",bDetected=1):Binary.compare("bf....57be....90b9....f3a4c3")&&(sVersion="1.1",sOptions="by Frank Baumgartner",bDetected=1),result()}meta("protector","CryptCom") ================================================ FILE: dbs_min/db/COM/protector_Crypto-King.2.sg ================================================ function detect(){return Binary.compare("bf....be....57b9....f3a4c3")&&(sVersion="1.08",bDetected=1),result()}meta("protector","Crypto-King") ================================================ FILE: dbs_min/db/COM/protector_DCFR.2.sg ================================================ function detect(){return Binary.compare("b8....ba....3bc4eb$$72$$5250b9....bb....8b0733c140890743e2")&&(sVersion="0.0.4",bDetected=1),result()}meta("protector","DCFR") ================================================ FILE: dbs_min/db/COM/protector_DS-CRP.2.sg ================================================ function detect(){var e return Binary.compare("b8....50c3")&&(e=Binary.readWord(1)-256+8,Binary.compare("e800005d81ed....9c32e4509d9c5880e4..80fc..74..b4..509d9c5880e4..74..9deb",e)&&(sVersion="1.30"),sOptions="by Dark Stalker //UCF",bDetected=1),result()}meta("protector","DS-CRP") ================================================ FILE: dbs_min/db/COM/protector_Deeper.2.sg ================================================ function detect(){return Binary.compare("90e9$$$$e8000059fa8bdc36c747......36837f....75..fb66fafb8be981ed....81e9....be....8dbe....668b05668904")&&(sVersion="1.0c",bDetected=1),Binary.compare("90e9$$$$e80000fa8bdc36c747......36837f....75..fb598be981ed....81e9....be....8dbe....668b05668904")&&(sVersion="1.0a",bDetected=1),result()}meta("protector","Deeper") ================================================ FILE: dbs_min/db/COM/protector_E2C-Scrambler.2.sg ================================================ function detect(){return Binary.compare("e9$$$$fabc....c1ea..8ccd03ea8ec5bf....be....b9....bb....fdac320702c1d2c002c5aa4381fb....75..bb....e2")&&(sOptions="1999 by Amokk //FTW",bDetected=1),result()}meta("protector","E2C-Scrambler") ================================================ FILE: dbs_min/db/COM/protector_E2C1.2.sg ================================================ function detect(){return Binary.compare("bc....33c050b8....50ba....b8....cd21b8....cd21bf....be....b9....9081ff....74..8a050204aa46e2..eb")&&(sOptions="1990 by Erik Labs",bDetected=1),result()}meta("protector","E2C protection") ================================================ FILE: dbs_min/db/COM/protector_EPW.2.sg ================================================ function detect(){return Binary.compare("e9$$$$06571e565552515350bb....81c3....2e8b078ccb03c305....50b8....50cb")&&(sVersion="1.2",sOptions="by Aland D. Jones",bDetected=1),result()}meta("protector","EPW") ================================================ FILE: dbs_min/db/COM/protector_EXETools.2.sg ================================================ function detect(){return Binary.compare("68....68....68....be....bf....57b9....f3a4c3")?(sVersion="2.1 /E",bDetected=1):Binary.compare("e9$$$$e800005d8bcd83ed..bf....be....2bcff3a4b9....be....03f5")?(sVersion="2.1",bDetected=1):Binary.compare("68....bf....8bf757b9....51b4..ac32c4c0c4..02e102f0aae2..33c0595e5f57eb")?(sVersion="2.0",bDetected=1):Binary.compare("68....68....68....be....bf....57b9....f3a4c3")&&(sVersion="2.1 /E",bDetected=1),result()}meta("protector","EXETools by Dismember") ================================================ FILE: dbs_min/db/COM/protector_Encriptor.2.sg ================================================ function detect(){return Binary.compare("eb$$b9....be....bf....acd0c8aae2..be....bf....acaa")&&(sVersion="1.00c",sOptions="by Dark Stalker //UCF",bDetected=1),result()}meta("protector","Encriptor") ================================================ FILE: dbs_min/db/COM/protector_Entropy_Coder.2.sg ================================================ function detect(){return Binary.compare("be....bf....b9....fdf3a447fcffe7")&&(sOptions="by Sergey Lukashev",bDetected=1),result()}meta("protector","Entropy Coder") ================================================ FILE: dbs_min/db/COM/protector_ExOM.2.sg ================================================ function detect(){return Binary.compare("'EXOM'fabd....ffe5")&&(sVersion="0.0X",sOptions="by Abdelaziz BELBACHiR",bDetected=1),result()}meta("protector","ExOM") ================================================ FILE: dbs_min/db/COM/protector_FCRYPT.2.sg ================================================ function detect(){return Binary.compare("e9$$$$505351be....bf....8befb9....fcacd0c032c1d0c032c1aae2..595b58ffe5")&&(sVersion="2.10b",sOptions="1992-93 by Chip & Dale SoftGroup",bDetected=1),result()}meta("protector","FCRYPT") ================================================ FILE: dbs_min/db/COM/protector_GOAT.2.sg ================================================ function detect(){return(Binary.compare("5156505253813c....75$$424a81c3....8bdb595e585a5bb4..ba....cd21b8....cd21474f")||Binary.compare("50565351b8....807c....74$$8bc0585e5b59b4..ba....cd21b8....cd21474f4154")||Binary.compare("56515052807c....75$$81c2....8bc05e59585ab4..ba....cd21b8....cd21474f4154"))&&(sOptions="1996 by Martin Overton",bDetected=1),result()}meta("protector","GOAT") ================================================ FILE: dbs_min/db/COM/protector_Guardian_Angel.2.sg ================================================ function detect(){return Binary.compare("e9$$$$06fcbe....eb$$ba....eb$$eb$$eb$$8a04eb$$eb$$eb$$d0c8eb$$2ad0eb$$32c6eb$$d1c2eb$$8804eb$$eb$$eb$$4681fe....74")||Binary.compare("e9$$$$06fcbe....8be8e4210c..eb$$e6218bc5ba....8be8e4210c..eb$$e6218bc58a0ceb")||Binary.compare("e9$$$$06fcbb....eb$$eb$$eb$$b9....8be8e42102..eb$$e6218bc58a17eb")||Binary.compare("e9$$$$06fcbb....8be8e4210c..eb$$e6218bc5ba....eb$$eb$$eb$$8a0f")||Binary.compare("e9$$$$06fcbe....eb$$......eb$$8a..8be8e4210c..eb$$e6218bc5fe")?(sVersion="1.0",bDetected=1):Binary.compare("e9$$$$06fcbf....8be8e4210c..eb$$e6218bc5bb....eb$$8a05eb$$eb$$eb$$fe")?(sVersion="1.0",sOptions="registered",bDetected=1):Binary.compare("e9$$$$e800005d81ed....9c588bc825....509d9c5825....3d....75..eb")?(sVersion="1.0b",bDetected=1):Binary.compare("e9$$$$06fcbb....eb$$ba....eb$$eb")&&(sVersion="1.0",bDetected=1),result()}meta("protector","Guardian Angel") ================================================ FILE: dbs_min/db/COM/protector_HDKPROTC.2.sg ================================================ function detect(){return Binary.compare("e9$$$$4851442ea1....2d....8bd805....8bf0bf....b9....f3a48bcbd1e9b8....8bf08bf8066a..07268b2e")&&(sVersion="1.1",bDetected=1),result()}meta("protector","HDKPROTC") ================================================ FILE: dbs_min/db/COM/protector_HackStop.2.sg ================================================ function detect(){return Binary.compare("fabe....ffe6")?(sVersion="1.17cr",bDetected=1):Binary.compare("fabd....ffe5")?(sVersion="1.13cs",bDetected=1):Binary.compare("fabb....ffe3")&&(sVersion="1.14s",bDetected=1),result()}meta("protector","HackStop") ================================================ FILE: dbs_min/db/COM/protector_IntroC0der.1.sg ================================================ function detect(){return Binary.compare("be....b9....8bfeac32c1d2c032c5aae2")&&(sOptions="1995 by SkullC0der",bDetected=1),result()}meta("protector","IntroC0der") ================================================ FILE: dbs_min/db/COM/protector_Keygen_crypt.2.sg ================================================ function detect(){return Binary.compare("e9$$$$e800005d8d7e..575eb9....ad35....abe2")&&(sVersion="1.00",sOptions="by Majestic",bDetected=1),result()}meta("protector","KeyGen Crypt") ================================================ FILE: dbs_min/db/COM/protector_Khrome_Crypt.2.sg ================================================ function detect(){return Binary.compare("b9....b8....eb$$05....fc80c4..eb$$eb$$f4")&&(sVersion="0.3",sOptions="1997 by Teraphy",bDetected=1),result()}meta("protector","Khrome Crypt") ================================================ FILE: dbs_min/db/COM/protector_LAME_GG.2.sg ================================================ function detect(){return Binary.compare("e9$$$$e8$$$$5eb9....314c..33c08ee003c605....faeb$$648b1e....899c....648b1e....899c....64a3....648c0e")&&(sOptions="1999",bDetected=1),result()}meta("protector","LAME GG (PROPHECY protection)") ================================================ FILE: dbs_min/db/COM/protector_LAMPROT.2.sg ================================================ function detect(){return Binary.compare("e9$$$$8b0e....be....bf....f3a4b9....bb....8a0734..880743e2..33c033c933db33d233ff33f668....c3")&&(sOptions="by gds //FH",bDetected=1),result()}meta("protector","LAMPROT") ================================================ FILE: dbs_min/db/COM/protector_Lock-Master.2.sg ================================================ function detect(){return Binary.compare("e9$$$$eb$$31c0061e502d....501f0726ff77..26ff77..8f87....8f87....ffb7....ffb7....585b29c353bb....5a1f07")&&(sVersion="9.0",sOptions="by Andrew Kacy",bDetected=1),result()}meta("protector","Lock-Master") ================================================ FILE: dbs_min/db/COM/protector_MASK.2.sg ================================================ function detect(){return Binary.compare("e8$$$$5557cd03fc4d41534bfa8bec836e....8b6e..fb49e8....5b81eb....50d6515256")?(sVersion="2.0",sOptions="1995 by JosB M. L. Lopes.",bDetected=1):Binary.compare("e8$$$$5557cd03fc4d41534bfa8bec8346....ff76..5d49e8....5b81eb....50d6515256")?(sVersion="2.4",sOptions="1995 by JosB M. L. Lopes.",bDetected=1):Binary.compare("e8$$$$5557cd03fc4d41534bfd50fa8bc4f7dcbc....9449fbd651521f5256")?(sVersion="2.5",sOptions="1995 by JosB M. L. Lopes.",bDetected=1):Binary.compare("e8$$$$5557cd03fc4d41534bfa8bec836e....ff76..5d49e800005b81eb")&&(sVersion="2.3",sOptions="1995 by JosB M. L. Lopes.",bDetected=1),result()}meta("protector","MASK") ================================================ FILE: dbs_min/db/COM/protector_MCLock.2.sg ================================================ function detect(){return(Binary.compare("e9$$$$909090fa29c08ec026c606......26c606......268c0e....26c606......26c606......268c0e....fbcd01")||Binary.compare("e9$$$$eb00e9$$$$909090fa29c08ec026c606......26c606......268c0e....26c606......26c606......268c0e....fbcd01"))&&(sVersion="1.2, 1.3",bDetected=1),result()}meta("protector","MCLock") ================================================ FILE: dbs_min/db/COM/protector_MESS.2.sg ================================================ function detect(){return Binary.compare("....................b9....f326ace3..eb$$ba....b409cd21cd20")&&(sVersion="1.07",bDetected=1),result()}meta("protector","MESS") ================================================ FILE: dbs_min/db/COM/protector_MSCC.2.sg ================================================ function detect(){return Binary.compare("e9$$$$0e07be....bf....b9....f3a4b9....be....accc9803d8e2")&&(sVersion="1.0a",sOptions="1997 by Mad $cientist",bDetected=1),result()}meta("protector","MSCC") ================================================ FILE: dbs_min/db/COM/protector_MegaShield.2.sg ================================================ function detect(){return Binary.compare("90b8....e72133d252be....bd....b9....ad03d0d3c233c2d3ca2bd0e2")&&(sVersion="1.01a",sOptions="by t-REX //PSA",bDetected=1),result()}meta("protector","MegaShield") ================================================ FILE: dbs_min/db/COM/protector_Microxor.2.sg ================================================ function detect(){return Binary.compare("e8$$$$bf....5e57b9....300ca4e2..c3")&&(sOptions="2000 by Jibz",bDetected=1),result()}meta("protector","MiCRoXoR") ================================================ FILE: dbs_min/db/COM/protector_NH.2.sg ================================================ function detect(){return Binary.compare("be....bf....57b9....f3a4c3")&&(bDetected=1,sOptions="by MANtiC0RE"),result()}meta("protector","NH") ================================================ FILE: dbs_min/db/COM/protector_NoAV.2.sg ================================================ function detect(){return Binary.compare("e9$$$$68....60be....66b8........668706....b9....51c1e9..41be....5156bf....e8")&&(sOptions="by VAG",bDetected=1),result()}meta("protector","NoAV") ================================================ FILE: dbs_min/db/COM/protector_Nodebug.2.sg ================================================ function detect(){return Binary.compare("e8$$$$b430cd21b4..03f897d6405e50978b4d..ac32c1aae2")&&(sVersion="1.0 part 1",sOptions="by JVP",bDetected=1),result()}meta("protector","Nodebug") ================================================ FILE: dbs_min/db/COM/protector_PCOM.2.sg ================================================ function detect(){return Binary.compare("be....b9....2e8a0434..2e880446e2")&&(sVersion="2.8b2, 2.8b3 -e -i",sOptions="1999",bDetected=1),result()}meta("protector","PCOM") ================================================ FILE: dbs_min/db/COM/protector_PCRYPT.2.sg ================================================ function detect(){return Binary.compare("'PCRYPT'ff'v3.51'00e9")&&(sVersion="3.51",sOptions="1997 by MERLiN //DTG",bDetected=1),result()}meta("protector","PCRYPT") ================================================ FILE: dbs_min/db/COM/protector_PCVault-Protect.2.sg ================================================ function detect(){return Binary.compare("be....fcac3c..75..e9....ac3c..74..e9....eb")&&(sOptions="1993 by E. Johnson",bDetected=1),result()}meta("protector","PCVault-Protect") ================================================ FILE: dbs_min/db/COM/protector_PROTECT.2.sg ================================================ function detect(){var e=Math.min(65536,Binary.getSize()) return-1!=Binary.findSignature(0,e,"0c02e9......e421e9......88e0..........eb....e621e9......88c4........e9......e621eb")?(sVersion="5.5",bDetected=1):-1!=Binary.findSignature(0,e,"e42150e9......e621e9......58e621e9......b0ffeb")||Binary.compare("e9$$$$ba....81f2")||Binary.compare("e9$$$$bb....81c3....eb")||Binary.compare("e9$$$$be....81ee....bb....d1cb8b04")||Binary.compare("e9$$$$bf....81ef....eb")||Binary.compare("e9$$$$be....81ee....bb....d1cb8b04")||Binary.compare("e9$$$$bf....81f7")||Binary.compare("e9$$$$ba....81c2....eb")||Binary.compare("e9$$$$bd....81f5....eb")||Binary.compare("e9$$$$bd....d1cd")||Binary.compare("e9$$$$bb....81f3")?(sVersion="5.0",bDetected=1):Binary.compare("e9$$$$1efd2efe")?(sVersion="5.5",bDetected=1):Binary.compare("e9$$$$e800005d81ed....33c08ed88bf0bf....b9....fcf3a5fd87fe8cc08ed833c08ec04f4f")?(sVersion="4.0",bDetected=1):Binary.compare("e9$$$$1eb430cd213c..73..cd20be....e8....e8....1f8cd88ec0")?(sVersion="6.0",bDetected=1):Binary.compare("e8$$$$501e060e550e1f33c08ec0fafc26a1....5026a1....50")?(sVersion="3.0/3.1",bDetected=1):Binary.compare("b8....50b8....50e9$$$$c606......eb$$8cc6060b01c3")?(sVersion="2.0",sOptions="1993",bDetected=1):Binary.compare("b8....50e9$$$$c606......eb$$8cc6060701c3eb")&&(sVersion="1.0",sOptions="1993",bDetected=1),result()}meta("protector","PROTECT! COM") ================================================ FILE: dbs_min/db/COM/protector_PTP.2.sg ================================================ function detect(){return Binary.compare("'PTP50'fafafcb430cd21fb585c582bc05257502ec606")?(sVersion="5.0",bDetected=1):Binary.compare("'PTP40'fafafcb430cd21fb585c582bc05257502ec606")&&(sVersion="4.0",bDetected=1),result()}meta("protector","PTP") ================================================ FILE: dbs_min/db/COM/protector_PassCOM.2.sg ================================================ function detect(){return Binary.compare("e9$$$$be....bf....b9....8ae1ac32c402e1aae2..68....c3")&&(sVersion="2.0",bDetected=1),result()}meta("protector","PassCOM") ================================================ FILE: dbs_min/db/COM/protector_Propellerhead_encryption.2.sg ================================================ function detect(){return Binary.compare("e9$$$$b430cd2180fc..72..90e9....90bb....81c3....53b0..04..51b9....e9")&&(sOptions="1997",bDetected=1),result()}meta("protector","Propellerhead encryption") ================================================ FILE: dbs_min/db/COM/protector_ProtEXE.2.sg ================================================ function detect(){return Binary.compare("e9$$$$9c5053515256571e0655fabe....8a64..8b54..8bda81c3....8c4f..908b0f894c..8a4f..884c..8bfe8bca83e9..fcac")&&(sVersion="3.0",sOptions="1996",bDetected=1),result()}meta("protector","ProtEXE (com)") ================================================ FILE: dbs_min/db/COM/protector_R-Crypt.2.sg ================================================ function detect(){return Binary.compare("e9$$$$68....60bf....b9....b0..2e3005fec047e2..61c706........c606")?(sVersion="0.91",bDetected=1):Binary.compare("e9$$$$68....60bf....b9....b0..2e300547fec0e2..61c706........c606")?(sVersion="0.93",bDetected=1):Binary.compare("e9$$$$bf....57b9....c705....c645....8135....4747e2..33ffc3")&&(sVersion="0.92",bDetected=1),result()}meta("protector","R-Crypt") ================================================ FILE: dbs_min/db/COM/protector_RCC.2.sg ================================================ function detect(){var e return Binary.compare("fabc....ffe4")?(e=Binary.readWord(2)-256,Binary.compare("83c4..bc....60e8$$$$e8$$$$50b8....58eb",e)&&(sVersion="0.51/386",bDetected=1)):Binary.compare("90bd....ffe5")?(e=Binary.readWord(2)-256,Binary.compare("faf7dc87ec83c4..81c4....f7dc83ec..87ecbc....50535251061eb9....b0..e6",e)&&(sVersion="1.08h",bDetected=1)):Binary.compare("fcbe....bf....5657b9....f3a55e5f33db33d2")?(sVersion="1.08h",bDetected=1):Binary.compare("e9$$$$9c505351525657551e06fcb8....cd21")&&(sName="RCC/286",sVersion="1.10",bDetected=1),result()}meta("protector","RCC II") ================================================ FILE: dbs_min/db/COM/protector_RSCC.2.sg ================================================ function detect(){return Binary.compare("b1..32ff82c7..b2..b5..b3..81c2....d0c203d133d1f7d232d13097")?(sVersion="1.03",bDetected=1):Binary.compare("....82........81......32..80....2b..81")||Binary.compare("....80........81......30..80....30..80")||Binary.compare("32ed80c5..b2..b6..29ff81cf....32c980")||Binary.compare("29ff81f7....33d281f2....31c981c9....f81015a64975..fa53f889ea8944")||Binary.compare("2aed80cd..28c982c1..2ad282ca..bb....81c2....f7da03d102d128174383")||Binary.compare("28ed82cd..2aff82cf..32db80f3..b1..33c081c0....05....d0c033c1f7d002c1f83187")?(sVersion="1.04",bDetected=1):Binary.compare("30c982f1..29d281ca....be....32ed82f5..81c2....d0c2f7da33d1")||Binary.compare("32ff82c7..b3..30ed80c5..b1..f88197........4343e2")?(sVersion="1.03",bDetected=1):Binary.compare("f5bb....b8....bf....2e8037..81ff....4374..4875..90b5..1f9b")?(sVersion="1.20",bDetected=1):Binary.compare("33d281f2....2bdb81f3....b9....3197....83c3..497f..2a142cca3aca")?(sVersion="1.04",bDetected=1):Binary.compare("2bc981c1....29d281f2....33db81c3....81c2....291783c3..497f..ab")||Binary.compare("b9....2bdb81cb....f880b7......434975..55fc532245..ef57f9")?(sVersion="1.03",bDetected=1):(Binary.compare("bf....8bf7b9....b4..8a0532c480c4..aae2")||Binary.compare("b9....be....8bfeadd1c034..86c42ae003c7abe2")||Binary.compare("fc50be....bf....57b9....f3a4c3")||Binary.compare("eb$$fcbe....bf....57b9....f3a4bf....be....b9....c3"))&&(sVersion="1.0X",sOptions="mutated COM like RSCC",bDetected=1),result()}meta("protector","RSCC") ================================================ FILE: dbs_min/db/COM/protector_SCC.2.sg ================================================ function detect(){return Binary.compare("fd53565b0fa1be....ad648b16....643106....648916....adff36....643306")&&(sOptions="by The Cleric //LZ0",bDetected=1),result()}meta("protector","SCC") ================================================ FILE: dbs_min/db/COM/protector_SCRAM.2.sg ================================================ function detect(){return Binary.compare("'SCRAM'b430cd213c..77..cd20bc....b9....8bfcb2..584cf6d82ac2d2c8feca32d181ff....73..eb")&&(sVersion="0.8a1",sOptions="1997 by bushwoelie & ACP",bDetected=1),result()}meta("protector","SCRAM!") ================================================ FILE: dbs_min/db/COM/protector_Scrambler.2.sg ================================================ function detect(){return Binary.compare("eb$$fafc31ff8ec726ff36....26ff36....8d36....b9....f3a4b9....cd00")&&(sVersion="1.00",bDetected=1),result()}meta("protector","Scrambler") ================================================ FILE: dbs_min/db/COM/protector_Scrypt!.2.sg ================================================ function detect(){return Binary.compare("e9$$$$e8$$$$e800005a5f578bf78bce33dbb7..acfec0f6d032c7aa86fb43c1c3..331e....331e....331e....331e")?(sVersion="0.4",sOptions="by DarkGrey //DTG",bDetected=1):Binary.compare("e9$$$$e8$$$$5d81ed....b9....be....03f58bfeb4..ac32c4f6d4aae2")&&(sVersion="0.4",sOptions="1998 by DarkGrey //DTG",bDetected=1),result()}meta("protector","Scrypt!") ================================================ FILE: dbs_min/db/COM/protector_Scrypt.2.sg ================================================ function detect(){return Binary.compare("e9$$$$e800005d8d5e..eb$$53eb$$66bd........e9$$$$b8....eb$$cc")&&(sVersion="1.0",sOptions="1998 by hijaq //BAC",bDetected=1),result()}meta("protector","SCRYPT") ================================================ FILE: dbs_min/db/COM/protector_SelfCrypt.2.sg ================================================ function detect(){return Binary.compare("8cc88ed833ffbe....bb....8a048a1132c288043c..74..4683ff..7d..47eb")?(sOptions="1999 by MCS",bDetected=1):(Binary.compare("e8$$$$eb$$8cca8eda8ec2be....bf....b9....2ec706........31c0ada3....3136....8bc18bdef7e33106....3116....a1....abe2")||Binary.compare("e8$$$$eb$$8cca8eda8ec2be....bf....b9....ad2ea3....2e3136....8bc18bdef7e32e3106....2e3116....2ea1....abe2"))&&(sVersion="1994 by PHOENiX",bDetected=1),result()}meta("protector","SelfCrypt") ================================================ FILE: dbs_min/db/COM/protector_SelfProtect386.2.sg ================================================ function detect(){return Binary.compare("'=SYRIUS=DIRE=SERVICE='071a")&&(bDetected=1),result()}meta("protector","SelfProtect386") ================================================ FILE: dbs_min/db/COM/protector_SnoopStop.2.sg ================================================ function detect(){return Binary.compare("90e9$$$$eb$$55e80000598be981ed....66608d9e....8d8e....2bcb2e8a0734..34..34..fec0f6d0")&&(sVersion="1.15",sOptions="1998 by Trills and Technologies",bDetected=1),result()}meta("protector","SnoopStop") ================================================ FILE: dbs_min/db/COM/protector_SoftGuard.1.sg ================================================ function detect(){return Binary.compare("e9$$$$8cc88ed88c06....8cc73bc774..8bfc368b052ea3....368b45..2ea3....a1....a3....a1....a3....a1....b1")&&(sOptions="1984-86",bDetected=1),result()}meta("protector","Softguard") ================================================ FILE: dbs_min/db/COM/protector_Steplock.2.sg ================================================ function detect(){return Binary.compare("e9$$$$0e1fb9....030e....be....d204282c46e2")&&(sVersion="1.00A",sOptions="by Morten Pedersens",bDetected=1),result()}meta("protector","Steplock") ================================================ FILE: dbs_min/db/COM/protector_TCEC.2.sg ================================================ function detect(){return Binary.compare("1aff5fb9....f326ace3..eb")&&(sVersion="3.60",sOptions="by ThE CLERiC! //LZ0, EVD",bDetected=1),result()}meta("protector","TCEC") ================================================ FILE: dbs_min/db/COM/protector_UnPackStop.2.sg ================================================ function detect(){var e return Binary.compare("68....c3")&&(e=Binary.readWord(1)-256,Binary.compare("8bc450be....bf....eb$$b8....501f58eb",e))&&(sVersion="0.95",sOptions="by Szaszi (Szabo Laszlo)",bDetected=1),result()}meta("protector","UnPackStop") ================================================ FILE: dbs_min/db/COM/protector_UniCrypt.1.sg ================================================ function detect(){return Binary.compare("8cc805....50b8....50cb")&&(sVersion="1.01",sOptions="1998 by V.Slinchuk",bDetected=1),result()}meta("protector","UniCrypt") ================================================ FILE: dbs_min/db/COM/protector_Venus.2.sg ================================================ function detect(){return Binary.compare("b9....fa8bdc8cd2bc....03e1d1e94c4c5886e9d3c033c186e9f7d050e2")&&(bDetected=1),result()}meta("protector","Venus crypt") ================================================ FILE: dbs_min/db/COM/protector_XORCOPY.2.sg ================================================ function detect(){return Binary.compare("e9$$$$b8....bb....ba....3107434039d375..c606......c606......c606......31c031db31d2e9")&&(sVersion="1.0",sOptions="1995 by DeiMoS",bDetected=1),result()}meta("protector","XORCOPY") ================================================ FILE: dbs_min/db/COM/protector_XcomOR.2.sg ================================================ function detect(){return Binary.compare("'MMX'e8$$$$83c5..8306......b8....5050ffe0")?(sVersion="0.XX",bDetected=1):Binary.compare("'MMX'668136............eb$$668136............eb")?(sVersion="0.99i, 0.99h",bDetected=1):Binary.compare("'MMX'b409ba....cd21e8$$$$1e6a..1f8136........8136........8b1e....a1....501f813f....75")?bDetected=1:Binary.compare("'MMX'b8....ba....87ecbc....eb$$50b409cd2187e533edeb$$4f030de8")?(sName="XcomOR/486 by madmax",bDetected=1):Binary.compare("'MMX'b8....ba....87ecbc....eb$$50b409cd2187e533ede8$$$$1e6a..1f")?(sVersion="0.99f",bDetected=1):Binary.compare("e8$$$$8006......b4..5050c3bf....57bb....8b4d..81")?(sVersion="0.99a",bDetected=1):Binary.compare("'MMX'eb$$4feb$$8b0dba....83c2..90eb")&&(bDetected=1),result()}meta("protector","XcomOR by madmax") ================================================ FILE: dbs_min/db/COM/protector_XoReR.2.sg ================================================ function detect(){return Binary.compare("e9$$$$ba....b9....51b0..e660fab430cd213c..73..33c00650cbbf....8b36....59e2")?(sVersion="2.l",sOptions="by dR.No //ViP",bDetected=1):Binary.compare("e9$$$$be....8bfeb9....33db80c3..ac32c3aae2")?(sVersion="1.0",sOptions="by dR.No //ViP",bDetected=1):Binary.compare("e9$$$$b8....e721b8....cd21b430cd218b2e....8b1e....bf....b9....b430cd2132..73..be....bf....b9....fcac300547e2")?(sVersion="1.0 [2nd pass]",sOptions="by dR.No //ViP",bDetected=1):Binary.compare("e9$$$$ba....b9....51b8....e721b430cd213c..73..33c00650cb")&&(sVersion="2.0",sOptions="1998 by dR.No //ViP",bDetected=1),result()}meta("protector","XoReR") ================================================ FILE: dbs_min/db/COM/protector_XorCom.2.sg ================================================ function detect(){return Binary.compare("e9$$$$fcbe....bf....57b9....ac34..aae2..c3")&&(sVersion="1.0",sOptions="by tFF",bDetected=1),result()}meta("protector","XorCom") ================================================ FILE: dbs_min/db/COM/protector_aPatch.2.sg ================================================ function detect(){return Binary.compare("e8$$$$fde8$$$$ffc75e83ee..e8$$$$5d8176......c646....eb")&&(sVersion="0.05-0.33",bDetected=1),result()}meta("protector","aPatch") ================================================ FILE: dbs_min/db/COM/protector_acBBS_protection.2.sg ================================================ function detect(){return Binary.compare("e9$$$$bf....b9....870581f0....86e0faeb$$e8$$$$501e33c08ed8eb$$8706....eb$$8706....8706....1f58c3")&&(sOptions="1994 by p.q.",bDetected=1),result()}meta("protector","acBBS protection p1") ================================================ FILE: dbs_min/db/COM/protector_com-crypt.2.sg ================================================ function detect(){return Binary.compare("b8....ffe0")?(sOffset=Binary.readWord(1),Binary.compare("5756bf....b8....abb8....abb0..aa89feb9....31dbad01c329cb89d8abe2",sOffset-256)?(sOptions="by BlackLight, MANtiCORE",bDetected=1):Binary.compare("be....562ec704....2ec744......2ec644....b9....8a0434..880446",sOffset-256)&&(sName="com-crypt on BASIC",sOptions="by BlackLight, MANtiCORE",bDetected=1)):Binary.compare("e8$$$$b7..538b4f..8a47..c0c8..880743e2")&&(sOptions="by Frenzy",bDetected=1),result()}meta("protector","com-crypt") ================================================ FILE: dbs_min/db/COM/protector_fds-cp.2.sg ================================================ function detect(){return Binary.compare("8cca2e8916....b4..8b2e....8b1e....8edaa3....8c06....891e....892e....eb")&&(sVersion="0.04a",bDetected=1),result()}meta("protector","fds-cp") ================================================ FILE: dbs_min/db/COM/protector_mCrypt.2.sg ================================================ function detect(){return Binary.compare("e9$$$$1e06be....bf....b9....0e1f0e07e8$$$$33c0fa5083c4..83ec..58fb0bc075..c3")&&(sVersion="0.1a",sOptions="1998 by //UFO CREW",bDetected=1),result()}meta("protector","mCrypt") ================================================ FILE: dbs_min/db/COM/protector_protection.2.sg ================================================ function detect(){return Binary.compare("33db9090b9....fcad03d8e2..b9....be....8bfefcad33c3ab43e2")&&(sOptions="by ROWDY, St.Petersburg",bDetected=1),result()}meta("protector","protection") ================================================ FILE: dbs_min/db/COM/protector_spirit.2.sg ================================================ function detect(){return Binary.compare("e9$$$$b430cd21f6d12ea6e8....b462cd21e8....3636fb969034..c3")?(sVersion="1.X",bDetected=1):(Binary.compare("e9$$$$aee8$$$$e4210c..fbe62190b8....fb5026509087c1")||Binary.compare("e9$$$$369f9f1c..e9$$$$e8$$$$e421f80c..e6218d06....fc505089c1fb")||Binary.compare("e9$$$$f8d72606b435cd2107e8$$$$1c..1c..33d226f6da12ddfcf905....f8f5f6ea"))&&(sVersion="1.5",bDetected=1),result()}meta("protector","$pirit") ================================================ FILE: dbs_min/db/COM/protector_sticker.2.sg ================================================ function detect(){return Binary.compare("be....8bc6b1..d3e88cdb03c30344..a3....8cc805....a3....8b44..b1..d3e8")&&(sOptions="1994 by TigraSoft",bDetected=1),result()}meta("protector","sticker") ================================================ FILE: dbs_min/db/COM/protector_x3.2.sg ================================================ function detect(){return(Binary.compare("e8$$$$5ebf....57b9....ac34..aae2..c3")||Binary.compare("ba....2e408b142633f6402681c6....2e1ad3"))&&(sVersion="1.4",sOptions="by MANtiC0RE",bDetected=1),result()}meta("protector","x3") ================================================ FILE: dbs_min/db/COM/self-displayer_ACiDDRAW.1.sg ================================================ function detect(){return(Binary.compare("e9$$$$b8....cd10b4..b9....cd10e8....ba....90e8....3d....75..e9....3d....75..e9....3d....75..e9....3d....75..eb")||Binary.compare("eb$$b8....cd10b4..b9....cd10e8....ba....90e8....3d....75..e9....3d....75..e9....3d....75..e9....3d....75..eb"))&&(sVersion="1.2",bDetected=1),result()}meta("self-displayer","ACiDDRAW") ================================================ FILE: dbs_min/db/COM/self-displayer_ANS2ALL.1.sg ================================================ function detect(){return Binary.compare("e9$$$$e8$$$$b8....cd103c..75..80fb..73..58b8....cd21fcb8....8ec0be....bf....b9....f3a4fa")&&(sVersion="1.3",sOptions="by ZeroCoder //XG",bDetected=1),Binary.compare("e9$$$$2bc9b6..b2..b7..b4..cd212ad22af6b7..b4..cd10b6..32d2b7..b4..cd101e33c050")&&(sOptions="by ZeroCoder //XG",bDetected=1),result()}meta("self-displayer","ANS2ALL") ================================================ FILE: dbs_min/db/COM/self-displayer_ASC2COM.1.sg ================================================ function detect(){return Binary.compare("e9$$$$e8$$$$33c0cd333d....75..c606......b8....cd338916....c3")?(sVersion="2.02",sOptions="1992 by MorganSoft",bDetected=1):Binary.compare("e8$$$$e8$$$$b401b7..b9....cd10c3f8bb....8b073d....75..c3")?(sVersion="1.10B",sOptions="1989 by MorganSoft",bDetected=1):Binary.compare("e9$$$$e8$$$$50535157bb....803f..74..33c98a0f438bfbb8....e3")?(sVersion="2.01 Compressed",sOptions="1992 by MorganSoft",bDetected=1):Binary.compare("e9$$$$e8$$$$e8$$$$b4..b7..b9....cd10c3")&&(sOptions="1989 by MorganSoft",bDetected=1),result()}meta("self-displayer","ASC2COM") ================================================ FILE: dbs_min/db/COM/self-displayer_DOC2COM.1.sg ================================================ function detect(){return Binary.compare("fc8b0e....498b36....8bfeac3204aae2")&&(sOptions="by Jerry DePyper",bDetected=1),result()}meta("self-displayer","DOC2COM") ================================================ FILE: dbs_min/db/COM/self-displayer_DOC2PAGE.1.sg ================================================ function detect(){return Binary.compare("e9$$$$fc8a0e....32ede3..bf....b0..f3ae74..e8....ba....cd21ba....cd21e9")&&(sOptions="by Th. Edel",bDetected=1),result()}meta("self-displayer","DOC2PAGE") ================================================ FILE: dbs_min/db/COM/self-displayer_GTXT.1.sg ================================================ function detect(){return Binary.compare("bb....b4..b1..8a070ac074..247f3c..75..438a070ac0")&&(sVersion="1.1",sOptions="by EGans 05/08/86",bDetected=1),result()}meta("self-displayer","GTXT") ================================================ FILE: dbs_min/db/COM/self-displayer_HYPDOC.1.sg ================================================ function detect(){return Binary.compare("e9$$$$e8....e8....e8....2ec606......2ec606......b9....2e8a26....b0..e8....2ec606......2ec606......2e8b3e....0e07")&&(sVersion="1.0",bDetected=1),result()}meta("self-displayer","HYPDOC") ================================================ FILE: dbs_min/db/COM/self-displayer_List.1.sg ================================================ function detect(){return Binary.compare("bc....1e2bc0508926....b430cd213c")?(sOptions="by Vernon D. Buerg",bDetected=1):Binary.compare("bc....1e2bc0508926....e8$$$$b430cd213c")?(sVersion="6.00",sOptions="1985 by Vernon D. Buerg",bDetected=1):Binary.compare("bc....1e2bc0508926....b430cd21a2")&&(sVersion="6.2a",sOptions="1987 by Vernon D. Buerg",bDetected=1),result()}meta("self-displayer","List") ================================================ FILE: dbs_min/db/COM/self-displayer_MakeRead.1.sg ================================================ function detect(){return Binary.compare("e9$$$$c706........c606......c606......e8....bf....893e....bf....893e....b4..b0..0106....578bc78b3e....fcab")&&(sVersion="1.8",sOptions="1987",bDetected=1),result()}meta("self-displayer","MakeRead") ================================================ FILE: dbs_min/db/COM/self-displayer_ONLINE-HELP.1.sg ================================================ function detect(){return Binary.compare("e9$$$$8cc805....2ea3....be....ac3c..74..72..3c..72..3c..77..4e33c033dbba....8a1c80eb..80fb..77")&&(sOptions="1990 by Clockwork Software",bDetected=1),result()}meta("self-displayer","ONLINE-HELP") ================================================ FILE: dbs_min/db/COM/self-displayer_PFL2COM.1.sg ================================================ function detect(){return Binary.compare("eb$$be....bf....53bb....8a1780fa..74..80fa..75..c706")&&(sOptions="by C.P.White 1987-90",bDetected=1),result()}meta("self-displayer","PFL2COM") ================================================ FILE: dbs_min/db/COM/self-displayer_RELETTER.1.sg ================================================ function detect(){return Binary.compare("e9$$$$bc....bf....bb....8a0784c075..e9....438a073c..74..3c..74..89da438a073c..74")&&(sVersion="1.0",sOptions="1993 by Hans J. Baer",bDetected=1),result()}meta("self-displayer","RELETTER") ================================================ FILE: dbs_min/db/COM/self-displayer_SHOWV20.1.sg ================================================ function detect(){return Binary.compare("e9$$$$b8....2b06....a3....e8$$$$bf....cd1125....3d....74..bf....893e....c3")&&(sName+="V20",sOptions="1992-93 by Simple Software Co.",bDetected=1),Binary.compare("e9$$$$b8....2b06....a3....e8$$$$50a0....a2....58c3")&&(sOptions="1992-93 by Simple Software Co.",bDetected=1),result()}meta("self-displayer","SHOW") ================================================ FILE: dbs_min/db/COM/self-displayer_TXT2COM.1.sg ================================================ function detect(){return Binary.compare("e8$$$$c706........803e......75..8d36....e8....e8....e8....e8....e8....ffa7")||Binary.compare("e9$$$$c706........803e......75..8d36....e8....e8....e8....e8....e8....ffa7")?(sVersion="1.1",sOptions="1987 by Keith P. Graham",bDetected=1):Binary.compare("8d26....e8$$$$b4..cd103c..74..c706........c706........3c..74..3c..74..8d16....b409cd21cd20c706")&&(sVersion="2.06",sOptions="1989 by Keith P. Graham",bDetected=1),result()}meta("self-displayer","TXT2COM") ================================================ FILE: dbs_min/db/COM/self-displayer_TXTmaker.1.sg ================================================ function detect(){return Binary.compare("eb$$b4..33dbcd1080fc..74..b0..eb$$b44ccd21")&&(sVersion="1.22",sOptions="1991 by Jack A. Orman",bDetected=1),result()}meta("self-displayer","TXTmaker") ================================================ FILE: dbs_min/db/COM/self-displayer_Txt2Exe.1.sg ================================================ function detect(){return Binary.compare("bf....033e....b9....2b0e....d1e9b8....f3abb4..cd1030e4a3....b8....cd10b8....8a1e....cd10")&&(sVersion="3.1b",sOptions="2001 by BlackLight",bDetected=1),result()}meta("self-displayer","Txt2Exe") ================================================ FILE: dbs_min/db/COM/self-displayer_readme.com.1.sg ================================================ function detect(){return Binary.compare("bb....b8....cd21be....fcbf....f6c2..74..f6c2..74..bf....ac3c..74..b4")&&(bDetected=1),result()}meta("self-displayer","README.COM") ================================================ FILE: dbs_min/db/COM/sfx_LHA.1.sg ================================================ function detect(){return Binary.compare("eb$$fcbc....8cc805....8ec0eb$$bb....e8....061fb430cd218bd81e3c..72..368e06....33c08bf8b9....f2aeae")?(sVersion="2.05L, 2.10-2.13, 2.55",bDetected=1):Binary.compare("eb$$00fcbc....8cc805....8ec0eb$$bb....e8....061fb430cd218bd81e3c..72..368e06....33c08bf8b9....f2aeae")&&(sVersion="2.13S",bDetected=1),result()}meta("sfx","LHA SFX") ================================================ FILE: dbs_min/db/COM/sfx_PKZip.1.sg ================================================ function detect(){return Binary.compare("b9....bf....2bcf32c0f3aab430cd21a3....8da5....8926....b8....e8")&&(sVersion="2.04g",bDetected=1),Binary.compare("b9....bf....2bcf32c0f3aa8da5....83e4..8926....b430cd21a3....8cd8")&&(sVersion="2.50",sOptions="1999 by PKWARE Inc.",bDetected=1),result()}meta("sfx","PKZip mini-sfx") ================================================ FILE: dbs_min/db/COM/simple_ansi_viewer.1.sg ================================================ function detect(){return Binary.compare("b8....bb....b9....0e1fba....cd21b8004ccd21")&&(bDetected=1),result()}meta("self-displayer","simple ANSI viewer") ================================================ FILE: dbs_min/db/COM/simple_self-displayer.1.sg ================================================ function detect(){return Binary.compare("b8....8ec0b4..b9....cd102bc92bffb8....51b9....f3ab59be....2bdb2bed2bd28bfdac")&&(bDetected=1),result()}meta("self-displayer","simple self-displayer") ================================================ FILE: dbs_min/db/COM/virus.1.sg ================================================ function detect(){return Binary.compare("e9$$$$fa8bece800005b81eb....2ef687......74..8db7....bc....31343124464c75")?(sName="Cascade.1701",bDetected=1):Binary.compare("e9$$$$89e5fae800005b81eb....2ef687......74..8db7....bc....31343124464c75")&&(sName="Cascade.1704",bDetected=1),result()}meta("virus","") ================================================ FILE: dbs_min/db/CurIcoBPP ================================================ function getCurIcoBPP(r){var a=0 return r=Binary.readDword(r+12),40==Binary.readDword(r)?a=Binary.readWord(r+14):Binary.compare("89'PNG\r\n'1A0A",r)&&(a=32),a} ================================================ FILE: dbs_min/db/DEX/_DEX.0.sg ================================================ function detect(){return DEX.isVerbose()&&(sName=DEX.getOperationSystemName(),sVersion=DEX.getOperationSystemVersion(),sOptions=DEX.getOperationSystemOptions(),bDetected=1),result()}meta("operation system","Android") ================================================ FILE: dbs_min/db/DEX/_DEX2.0.sg ================================================ function detect(){return sName=DEX.getFileFormatName(),sVersion=DEX.getFileFormatVersion(),sOptions=DEX.getFileFormatOptions(),bDetected=1,result()}meta("format","DEX") ================================================ FILE: dbs_min/db/DEX/_init ================================================ var File=DEX,X=DEX ================================================ FILE: dbs_min/db/DEX/compiler_dexlib2.4.sg ================================================ function detect(){return 237496182==DEX.getMapItemsHash()&&(bDetected=1),result()}meta("compiler","dexlib2") ================================================ FILE: dbs_min/db/DEX/library_UnicomSDK.4.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcom/unicom/dcLoader/Utils;"),result()}meta("library","UnicomSDK") ================================================ FILE: dbs_min/db/DEX/obfuscator_ProGuard.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcom/google/android/gms/common/ProGuardCanary;"),result()}meta("obfuscator","ProGuard") ================================================ FILE: dbs_min/db/DEX/protector_AESObfuscator.2.sg ================================================ function detect(){return bDetected=DEX.isDexStringPresent("AESObfuscator.java"),sLang="Java",result()}meta("protector","AESObfuscator") ================================================ FILE: dbs_min/db/DEX/protector_APKProtect.2.sg ================================================ function detect(){return bDetected=DEX.isDexStringPresent("APKProtect"),result()}meta("protector","APKProtect") ================================================ FILE: dbs_min/db/DEX/protector_AlibabaProtection.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcom/ali/mobisecenhance/StubApplication;"),result()}meta("protector","AlibabaProtection") ================================================ FILE: dbs_min/db/DEX/protector_AllatoriObfuscator.2.sg ================================================ function detect(){return bDetected=DEX.isDexStringPresent("ALLATORIxDEMO"),sVersion=bDetected?"Demo":"",result()}meta("protector","Allatori") ================================================ FILE: dbs_min/db/DEX/protector_ApkEncryptor.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcn/beingyi/sub/utils/Native;"),result()}meta("protector","ApkEncryptor") ================================================ FILE: dbs_min/db/DEX/protector_AppSolid.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lweb/apache/sax/app;"),result()}meta("protector","AppSolid") ================================================ FILE: dbs_min/db/DEX/protector_BaiduProtection.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcom/baidu/protect/StubApplication;"),result()}meta("protector","BaiduProtection") ================================================ FILE: dbs_min/db/DEX/protector_BangcleProtection.2.sg ================================================ function detect(){return bDetected=DEX.isDexStringPresent("apkFilePath"),result()}meta("protector","BangcleProtection") ================================================ FILE: dbs_min/db/DEX/protector_EasyProtector.2.sg ================================================ function detect(){return bDetected=DEX.isDexStringPresent("com.easyprotector.android"),result()}meta("protector","EasyProtector") ================================================ FILE: dbs_min/db/DEX/protector_Jiagu.2.sg ================================================ function detect(){return bDetected=DEX.isDexStringPresent("/.jiagu"),result()}meta("protector","Jiagu") ================================================ FILE: dbs_min/db/DEX/protector_Kiwi.2.sg ================================================ function detect(){return bDetected=DEX.isDexStringPresent("Kiwi__Version__Obfuscator"),result()}meta("protector","Allatori") ================================================ FILE: dbs_min/db/DEX/protector_LIAPP.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcom/lockincomp/liapp/LiappClassLoader;"),result()}meta("protector","LIAPP") ================================================ FILE: dbs_min/db/DEX/protector_MedusaH.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcom/seworks/medusah/MedusahDex;"),result()}meta("protector","Medusah") ================================================ FILE: dbs_min/db/DEX/protector_ModGuard.2.sg ================================================ function detect(){return DEX.isDexStringPresent("ModGuard - Protect Your Piracy v1.2 by ill420smoker")?sVersion="v1.2":DEX.isDexStringPresent("ModGuard - Protect Your Piracy v1.3 by ill420smoker")&&(sVersion="v1.3"),result()}meta("protector","ModGuard") ================================================ FILE: dbs_min/db/DEX/protector_NQShield.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcom/nqshield/Common;"),result()}meta("protector","NQShield") ================================================ FILE: dbs_min/db/DEX/protector_NagaPTProtection.2.sg ================================================ function detect(){return bDetected=DEX.isDexStringPresent("LIBRARY_DDOG")||DEX.isDexStringPresent("LIBRARY_FDOG"),result()}meta("protector","NagaPTProtection") ================================================ FILE: dbs_min/db/DEX/protector_PangXie.2.sg ================================================ function detect(){return bDetected=DEX.isDexStringPresent("PangXie")||DEX.isDexStringPresent("nsecure"),result()}meta("protector","Jiagu") ================================================ FILE: dbs_min/db/DEX/protector_QDBH.2.sg ================================================ function detect(){return bDetected=DEX.isDexStringPresent("/qdbh"),result()}meta("protector","QDBH") ================================================ FILE: dbs_min/db/DEX/protector_SecNeo.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcom/secneo/apkwrapper/ApplicationWrapper;"),result()}meta("protector","SecNeo") ================================================ FILE: dbs_min/db/DEX/protector_TencentProtection.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcom/tencent/StubShell/TxAppEntry;"),result()}meta("protector","TencentProtection") ================================================ FILE: dbs_min/db/DEX/protector_VDog.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcom/vdog/Common;"),result()}meta("protector","Vdog") ================================================ FILE: dbs_min/db/DEX/protector_Yidun.2.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("La/_;"),result()}meta("protector","Yidun") ================================================ FILE: dbs_min/db/DEX/tool_ApkToolPlus.6.sg ================================================ function detect(){return bDetected=DEX.isDexItemStringPresent("Lcom/linchaolong/apktoolplus/jiagu/utils/ApkToolPlus;"),result()}meta("tool","ApkToolPlus") ================================================ FILE: dbs_min/db/DOS16M/_DOS16M.0.sg ================================================ function detect(){return DOS16M.isVerbose()&&(sName=DOS16M.getOperationSystemName(),sVersion=DOS16M.getOperationSystemVersion(),sOptions=DOS16M.getOperationSystemOptions(),bDetected=1),result()}meta("operation system","DOS16M") ================================================ FILE: dbs_min/db/DOS16M/_init ================================================ var File=DOS16M,X=DOS16M ================================================ FILE: dbs_min/db/DOS16M/compiler_Watcom.2.sg ================================================ function detect(){return bDetected=1,result()}meta("compiler","Watcom C") ================================================ FILE: dbs_min/db/DOS4G/_DOS4G.0.sg ================================================ function detect(){return DOS4G.isVerbose()&&(sName=DOS4G.getOperationSystemName(),sVersion=DOS4G.getOperationSystemVersion(),sOptions=DOS4G.getOperationSystemOptions(),bDetected=1),result()}meta("operation system","DOS4G") ================================================ FILE: dbs_min/db/DOS4G/_init ================================================ var File=DOS4G,X=DOS4G ================================================ FILE: dbs_min/db/DOS4G/compiler_Watcom.2.sg ================================================ function detect(){return bDetected=1,result()}meta("compiler","Watcom C") ================================================ FILE: dbs_min/db/ELF/Borland_Kylix.4.sg ================================================ function detect(){return(ELF.isSectionNamePresent("borland.ressym")||ELF.isSectionNamePresent("borland.reshash")||ELF.isSectionNamePresent("borland.resdata")||ELF.isSectionNamePresent("borland.resspare"))&&(bDetected=1),sLang="Pascal/C/C++",result()}meta("compiler","Borland Kylix") ================================================ FILE: dbs_min/db/ELF/Free_Pascal.4.sg ================================================ function detect(){var e,t,i,c return ELF.compareEP("5989e38d44....83e4..8915........a3........890d........891d........e8........8925........31ede8........c3")?(sVersion="2.6.0",bDetected=1):ELF.compareEP("31ED5989E3")||ELF.isSectionNamePresent(".fpc.resources")?bDetected=1:ELF.isSectionNamePresent(".fpcdata")?(bDetected=1,e=ELF.getSectionNumber(".fpcdata"),t=ELF.getSectionFileOffset(e),0<(i=ELF.getSectionFileSize(e))&&-1!=(c=ELF.findString(t,4,"FPC "))&&(sVersion=ELF.getString(c+4))):ELF.isSectionNamePresent(".data")&&(e=ELF.getSectionNumber(".data"),t=ELF.getSectionFileOffset(e),256<=(i=ELF.getSectionFileSize(e)))&&-1!=(c=ELF.findString(t+i-256,256,"FPC "))&&(sVersion=ELF.getString(c+4),bDetected=1),sLang="Pascal",result()}meta("compiler","Free Pascal") ================================================ FILE: dbs_min/db/ELF/HP_C++.4.sg ================================================ function detect(){return ELF.isSectionNamePresent(".HP.init")&&(bDetected=1),sLang="C++",result()}meta("compiler","HP C++") ================================================ FILE: dbs_min/db/ELF/IBM_AIX_kernel_loader.4.sg ================================================ function detect(){return 4<=ELF.getNumberOfPrograms()&&ELF.getProgramFileSize(1)<=256&&-1!=ELF.findString(ELF.getProgramFileOffset(1),Math.min(256,ELF.getProgramFileSize(1)),"IBM,RPA-Client-Config")&&(bDetected=1),-1!=ELF.findString(ELF.getProgramFileOffset(0),Math.min(256,ELF.getProgramFileSize(0)),"PowerPC")&&(sVersion="PowerPC"),result()}meta("boot","IBM AIX kernel loader") ================================================ FILE: dbs_min/db/ELF/Oracle_Solaris_Studio.4.sg ================================================ function getOSSVersion(){var e=ELF.getSectionNumber(".comment") if(-1!=e){var t=ELF.getSectionFileOffset(e),e=ELF.getSectionFileSize(e),n=ELF.findString(t,e,"Sun WorkShop") if(-1!=n)return ELF.getString(n+13,100) if(-1!=(n=ELF.findString(t,e,"acomp: Sun C")))return ELF.getString(n+13,100) if(-1!=ELF.findString(t,e,"SUNWCC.h"))return"5.X"}return""}function detect(){var e return ELF.compareEP("bc1020..e003....1300....e022....a203a0..1300....e222....1300....e222....a52c20..a404a0..a40440122700....e804....80a520")&&(ELF.isSectionNamePresent(".SUNW_version")&&(bDetected=1),e=getOSSVersion())&&(bDetected=1,sVersion=e),sLang="C/C++",result()}meta("compiler","Oracle Solaris Studio") ================================================ FILE: dbs_min/db/ELF/_ELF.0.sg ================================================ function detect(){return ELF.isVerbose()&&(sName=ELF.getOperationSystemName(),sVersion=ELF.getOperationSystemVersion(),sOptions=ELF.getOperationSystemOptions(),bDetected=1),result()}meta("operation system","Unix") ================================================ FILE: dbs_min/db/ELF/_init ================================================ var File=ELF,X=ELF ================================================ FILE: dbs_min/db/ELF/compiler_DMD.4.sg ================================================ function getVersion(){var e=ELF.getSectionNumber(".comment") if(-1!=e){e=ELF.findString(ELF.getSectionFileOffset(e),ELF.getSectionFileSize(e),"DMD v") if(-1!=e)return ELF.getString(e+5,20)}return ""}function detect(){var e=getVersion() return e&&(bDetected=1,sVersion=e),sLang="D",result()}meta("compiler","DMD") ================================================ FILE: dbs_min/db/ELF/compiler_FASM.4.sg ================================================ function detect(){if(0==ELF.getElfHeader_shstrndx()&&0==ELF.getElfHeader_shnum()&&ELF.getElfHeader_shentsize()){sVersion="1.X",bDetected=1 for(var e=0;ei[n])return t if(r[n]>16&255)+"."+(e>>8&255)+"."+(255&e)}function detect(){return MACH.isLibraryPresent("QtCore")&&(sVersion=getVersion(),bDetected=1),result()}meta("library","QT") ================================================ FILE: dbs_min/db/MACH/library_WebKit.3.sg ================================================ function detect(){return MACH.isLibraryPresent("WebKit")&&(bDetected=1),result()}meta("library","WebKit") ================================================ FILE: dbs_min/db/MACH/library_java.3.sg ================================================ function detect(){return(MACH.isLibraryPresent("libjava.dylib")||MACH.isLibraryPresent("libjvm.dylib"))&&(bDetected=1),sLang="Java",result()}meta("library","Java Runtime") ================================================ FILE: dbs_min/db/MACH/packer_UPX.2.sg ================================================ function detect(){var e return 2==MACH.getNumberOfSections()&&-1!=(e=MACH.findString(0,MACH.getSize(),"$Id: UPX"))&&(sVersion=MACH.getString(e+9,4),bDetected=1),result()}meta("packer","UPX") ================================================ FILE: dbs_min/db/MACH/packer_Virbox.2.sg ================================================ function detect(){return-1!=MACH.getSectionNumber("__vdata")&&(sVersion="Virbox Protector",bDetected=1),result()}meta("packer","Virbox") ================================================ FILE: dbs_min/db/MACHOFAT/_MACHOFAT.0.sg ================================================ function detect(){return MACHOFAT.isVerbose()&&(sName=MACHOFAT.getOperationSystemName(),sVersion=MACHOFAT.getOperationSystemVersion(),sOptions=MACHOFAT.getOperationSystemOptions(),bDetected=1),result()}meta("operation system","macOS") ================================================ FILE: dbs_min/db/MACHOFAT/_init ================================================ var File=MACHOFAT,X=MACHOFAT ================================================ FILE: dbs_min/db/MACHOFAT/converter_lipo.2.sg ================================================ function detect(){return bDetected=1,result()}meta("converter","lipo") ================================================ FILE: dbs_min/db/MFC ================================================ var aMFC aMFC||!PE||(aMFC=PE.isLibraryPresentExp(/^MFC(\d+?)(u?)(d?)\.dll/i))||PE.section[".data"]&&PE.isSignatureInSectionPresent(PE.section[".data"].Number,"'CMFCComObject'")&&(aMFC=1) ================================================ FILE: dbs_min/db/MSDOS/ACE.6.sg ================================================ function detect(){return detect_ACE(0),result()}includeScript("ACE") ================================================ FILE: dbs_min/db/MSDOS/Adys_COM2EXE.1.sg ================================================ function detect(){return MSDOS.compare("'Ady'27",28)&&(bDetected=1),result()}meta("converter","Ady`s COM2EXE") ================================================ FILE: dbs_min/db/MSDOS/Adys_Glue.2.sg ================================================ function detect(){return MSDOS.compareEP("2E........0E1FBF....33DB33C0AC")?(sVersion="1.10",bDetected=1):MSDOS.compareEP("2E8C06....0E0733C08ED8BE....BF....FCB9....56F3A51E075F")&&(sVersion="0.10",bDetected=1),result()}meta("protector","Ady`s Glue") ================================================ FILE: dbs_min/db/MSDOS/Anti-hack_encryption_system.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$bd....33c08ec026c706........268c0e....8b46..26a3....268c0e....0e07")&&(sOptions="by Rezaul Kabir //Shuvro",bDetected=1),result()}meta("protector","Anti-hack encryption system") ================================================ FILE: dbs_min/db/MSDOS/Aztec_C-86.4.sg ================================================ function detect(){return MSDOS.compareEP("bd....85ed75..8cdd2e8c1e....8b1e....2bdd81fb....76..8d9e....8cc02bd8b4..cd21bb....8ec5")?(sVersion="3.40",sOptions="1988",bDetected=1):MSDOS.compareEP("bd....85ed75..b8....e9....2e8c1e....8ec5268c1e....bd....83c5..d1ddb1..d3ed81e5....8cc2")?(sVersion="3.40b",sOptions="1986",bDetected=1):MSDOS.compareEP("bd....85ed75..8cdd8b1e....2bdd81fb....76..8d9e....8cc02bd8b4..cd21bb....8ec5268c1e....b1..d3e3")||MSDOS.compareEP("bd....85ed75..b8....50e8....8ec5268c1e....bd....83c5..d1ddb1..d3ed81e5....8cc203ea268b1e....d3eb")||MSDOS.compareEP("bd....85ed75..b8....509a........8ec5268c1e....bd....83c5..d1ddb1..d3ed81e5....8cc203ea268b1e....d3eb")||MSDOS.compareEP("bd....85ed75..b0..e9....2e8c1e....8ec5268c1e....bd....83c5..d1ddb1..d3ed81e5....8cc203ea268b1e....d3eb")?(sVersion="5.2a",sOptions="1992",bDetected=1):(MSDOS.compareEP("b8....8ed82e80........ba....75..e8....3d....75..e9$$$$8cc38edb2e891e....be....8a0c80f9..74..80f9..7e")||MSDOS.compareEP("eb$$3d....74..eb$$2ec606......502e891e....2e890e....2e8916....8cd82ea3....8cc02ea3....2e8936"))&&(sVersion="3.20X",bDetected=1),result()}meta("compiler","Aztec C-86") ================================================ FILE: dbs_min/db/MSDOS/BlackWolf_Protection.2.sg ================================================ function detect(){return MSDOS.compareEP("061e0e0e071fbe....b9....871481c2....53e8")&&(sOptions="1996 by p.q.",bDetected=1),result()}meta("protector","BlackWolf Protection") ================================================ FILE: dbs_min/db/MSDOS/Black_fist.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$061ee8....1f072ea1....2e8b1e....8cd12e2b0e....fa8ed1fb5053cb")&&(sOptions="1993",bDetected=1),result()}meta("packer","BlacK FiST") ================================================ FILE: dbs_min/db/MSDOS/Borland_C.4.sg ================================================ function detect(){var e,D=0 return MSDOS.compareEP("FB")&&(D=1),MSDOS.compareEP("BA....2E8916....B430CD218B2E02008B1E2C008EDA",D)?(e=MSDOS.readWord(MSDOS.getEntryPointOffset(D+1)),D=MSDOS.addressToOffset(e),bDetected=1):MSDOS.compareEP("8CCA2E8916....B430CD218B2E02008B1E2C008EDAA3")&&(e=MSDOS.readWord(MSDOS.getEntryPointOffset(22)),D=MSDOS.addressToOffset(0,e-120),bDetected=1),-1!=(D=MSDOS.findString(D,64," - Copyright "))&&(sVersion=MSDOS.getString(D+13,4),MSDOS.compare("43",D-1)?(sName="Turbo C","(c) "==sVersion&&(sVersion=MSDOS.getString(D+17,4))):MSDOS.compare("'Turbo'",D-9)?sName="Turbo C/C++":"1991"==sVersion?sVersion="3.1":"1994"==sVersion&&(sVersion="4.X"),bDetected=1),MSDOS.compareEP("b4..cd103c..74..b8....cd10ba....2e8916....8b2e....8b1e....8eda8c06....891e....892e....a1")||MSDOS.compareEP("ba....2e8916....b430cd218b2e....8b1e....8edaa3....8c06....891e....892e....e8")?(sVersion="1991",bDetected=1):MSDOS.compareEP("ba....2e8916....b430cd218b2e....8b1e....8edaa3....8c06....891e....892e....c43e....8bc78bd8")?(sVersion="1988",bDetected=1):MSDOS.compareEP("BA....2E89......B4..CD218B......8B......8EDAA3....8C......89......89......C7..........E8....C4......8bc78bd8b9....26........75")||MSDOS.compareEP("BA....2E89......B4..CD218B......8B......8EDAA3....8C......89......89......8cd22bea8b3e....81ff....73..bf....893e....b1")?(sName="Turbo C",sVersion="1988",bDetected=1):MSDOS.compareEP("BA....2E89......B4..CD218B......8B......8EDAA3....8C......89......53E8....0733FF2BDB8BC3B9....FCF2AEE3..4326......75..80")?(sName="Turbo C",sVersion="1990",bDetected=1):MSDOS.compareEP("FBBA....2E89......B430CD218B......8B......8EDAA3....8C......89......89......C706........E8....C4......8BC78BD8B9....2681")||MSDOS.compareEP("FB8cca2E89......B430CD218B......8B......8EDAA3....8C......89......89......C706........E8....C4......8BC78BD8B9....2681")||MSDOS.compareEP("BA....2E89......B430CD218B......8B......8EDAA3....8C......89......89......C706........8ec333c0b9....8bf88bd82681......75")?(sName="Turbo C",sVersion="1987",bDetected=1):MSDOS.compareEP("8cca2E89......B430CD218B......8B......8EDAA3....8C......89......89......C706")?(sName="Turbo C",sVersion="1988",bDetected=1):MSDOS.compareEP("8cca2E89......B430CD218B......8B......8EDAA3....8C......89......89......E8")?(sName="Turbo C",sVersion="1990",bDetected=1):MSDOS.compareEP("8cd8bb....8edb8cd38bccfa8e16....bc....fbe8....fa8ed38be1fbea")&&(sName="Turbo C",sVersion="1988",bDetected=1),sLang=-1!==sName.indexOf("C++")?"C":"C++",result()}meta("compiler","Borland C/C++") ================================================ FILE: dbs_min/db/MSDOS/Borland_Pascal.4.sg ================================================ function detect(){if(MSDOS.compareEP("9AFFFF00009AFFFF00005589E531C09AFFFF0000")?(sVersion="7.0*",bDetected=1):MSDOS.compareEP("B8....BB....8ED08BE38CD88EC00E1FA1....25....A3....E8....833E......75")?(sVersion="7.0*",sOptions="Protected Mode",bDetected=1):MSDOS.compareEP("B8....8ED88C......8CD38CC02BD88BC405....C1....03D8B4..CD210E")?(sVersion="7.0*",bDetected=1):MSDOS.compareEP("9a########ba....8eda8c06....33ed8bc405....b1..d3e88cd203c2a3....a3")?(sVersion="7.0",bDetected=1):MSDOS.compareEP("9a########ba....8eda8c06....33ede8....e8....8bc405....b1..d3e88cd203c2a3....a3....0306....a3....a3....a3....a3....8e06....26a1....a3....c706")?(sVersion="6.0",bDetected=1):MSDOS.compareEP("9a########06ba....8eda268b3e....8ec25b8bef83ed..1eb8....8ed8b9....2bc8d1e1")||MSDOS.compareEP("9a########ba....8eda8c06....8bc405....a3....8c16....05....b1..d3e88cd203c2a3....a3")||MSDOS.compareEP("9a########ba....8edae8....8c06....33ed8bc405....b1..d3e88cd203c2c706")||MSDOS.compareEP("9a########5589e50ee8$$$$5589e583ec..31c0")?(sVersion="6.0-7.0",bDetected=1):MSDOS.compareEP("9a########ba....8eda8c06....8bc405....b1..d3e88cd203c2a3....a3....26a1....2d....a3....c706")?(sVersion="4.0-6.0",sOptions="1987",bDetected=1):MSDOS.compareEP("9a########54583bc475..9c585080cc..509d9c589d80e4..75..bb....e8....b8....cd21ba....8eda")?(sVersion="6.0-7.0",sOptions="1992 by Borland & Eagle Performance Software",bDetected=1):(MSDOS.compareEP("9a........5589e5bf....0e57e8$$$$f9")||MSDOS.compareEP("9a########b8....8ed88c06....cb")||MSDOS.compareEP("9a########ba....8eda8c06....b430cd2186c43d....73..0e1f")||MSDOS.compareEP("31ed9a########2e8e1e....b451cd21891e....803e......74..f706........74..e8"))&&(sName="Turbo Pascal",sVersion="6.0-7.0",bDetected=1),MSDOS.compareEP("9a########f860f972..8bdc36c51f83c3..807f....74..807f"))sName="Turbo Pascal",sVersion="6.0-7.0",bDetected=1 else if(MSDOS.compareEP("9A0000")){var e=MSDOS.readWord(MSDOS.getEntryPointOffset(3)),e=MSDOS.addressToOffset(e) if(-1!=(e=MSDOS.findSignature(e,Math.min(1024,MSDOS.getSize()-e),"'Portions Copyr ight (c) 1983,9'..' Borland'"))){switch(MSDOS.getString(e+29,1)){case"0":sVersion="5.0",sName="Turbo Pascal" break case"1":sVersion="6.0",sName="Turbo Pascal" break case"2":sVersion="7.0"}bDetected=1}}return sLang="Pascal",result()}meta("compiler","Borland Pascal") ================================================ FILE: dbs_min/db/MSDOS/Borland_RTM.0a.sg ================================================ function getBLVersion(){var e="",r=MSDOS.findString(0,MSDOS.getSize(),"RTM loader version") return e=-1!=r?(e=MSDOS.getString(r+19)).substr(0,e.indexOf(" ")):e}function detect(){var e return MSDOS.compareEP("b8....8ed8b8....bb....8ed08be38926....0626......8ec0263b......74..e9")&&(sVersion="1.0-1.5",bDetected=1),bDetected&&(e=getBLVersion())&&(sVersion=e),result()}meta("extender","Borland RTM DPMI loader") ================================================ FILE: dbs_min/db/MSDOS/Borland_TDS.5.sg ================================================ function detect(){var e,t return MSDOS.compareOverlay("FB52")&&(t=MSDOS.getOverlayOffset(),e=MSDOS.readByte(t+2),t=MSDOS.readByte(t+3),e=(10*(e>>4)+(15&e)).toString(),t=(10*(t>>4)+(15&t)).toString(),sVersion=t+"."+e,sOptions="TDS",bDetected=1),result()}meta("debug","Borland TLINK Symbol Table Present") ================================================ FILE: dbs_min/db/MSDOS/Borland_TLINK.5.sg ================================================ function detect(){var e=MSDOS.readWord(30) return 251==(255&e)&&(sVersion=((e>>8)/16).toFixed(1),bDetected=1),result()}meta("linker","Borland TLINK") ================================================ FILE: dbs_min/db/MSDOS/CSCRYPT_Pro.2.sg ================================================ function detect(){return MSDOS.compareEP("8d36....565f81ef....b8....81ef....81c0....81f7....2e2935474781c6....e9")&&(sVersion="3.30/386",sOptions="1995-97 by Christian Schwarz",bDetected=1),result()}meta("protector","CSCRYPT Pro") ================================================ FILE: dbs_min/db/MSDOS/Concurrent_Small_C.4.sg ================================================ function detect(){return MSDOS.compareEP("b8....8ed826a1....2d....80fc..72..9090b8....b1..d3e0fa8cdb8ed38be050fbb8....2d....d3e08bd8fec7fec73b..72..9090")&&(sVersion="1.0",sOptions="1996 by Andy Yuen",bDetected=1),sLang="C",result()}meta("compiler","Concurrent Small C") ================================================ FILE: dbs_min/db/MSDOS/CopyQM_SFX.1.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$b8....8ec0a1....26a3....268c1e")&&MSDOS.compareOverlay("'TX'")&&(sVersion="3.24",sOptions="1996 by Sydex",bDetected=1),result()}meta("sfx","CopyQM SFX") ================================================ FILE: dbs_min/db/MSDOS/Crypt_(Dismember).2.sg ================================================ function detect(){return MSDOS.compareEP("1E8CDA83....8EDA8EC2BB....BA....85D274..B4..33FF33F6B9....AC32C4C0....02..2E........AAE2")?(sVersion="1.3",bDetected=1):MSDOS.compareEP("0E179C58F6....74..E9....1EB0..E6..8CDA83....8EDA8EC2BB....BA....85D274..B4..33FF33F6B9")||MSDOS.compareEP("0E179C58F6....74..EB$$b0..e6..33c9e2..b430cd213c..73..33c00650cb")?(sVersion="1.7",bDetected=1):(MSDOS.compareEP("fa061e8cdd83c5..2e012e....2e012e....e8....e8....1f072e8e16....2e8b26....fb2eff2e")||MSDOS.compareEP("e9$$$$bf....8bf7acad918ae157ac32c4f6d0d0c412e1aae2"))&&(sVersion="2.0",bDetected=1),result()}meta("cryptor","Cryptor by Dismember") ================================================ FILE: dbs_min/db/MSDOS/Crypt_(LightShow).2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$eb$$8cc8fa8ed0bc....fb8cc0bb....83e8..8ed833f64b8ccd8cc02ea3....33c08ec026a1....2ea3....26a1")?(sVersion="1.21",bDetected=1):MSDOS.compareEP("eb$$8cc883e8..8ed833f68ccb8cc02ea3....2bc08ec08bf8b9....26ff36....26ff36....26894d..26895d..b9")?(sVersion="1.15",bDetected=1):MSDOS.compareEP("e9$$$$eb$$8cc8fa8ed0bc....8cc0bb....83e8..8ed833f64b8ccd8cc02ea3....5333c08ec0268c0e....26c706........1f")?(sVersion="1.20",bDetected=1):MSDOS.compareEP("eb$$8cc8fa8ed0bc....fb8cc0bb....83e8..8ed833f64b8ccd8cc02ea3....33c08ec026a1....2ea3....26a1")?bDetected=1:MSDOS.compareEP("eb$$2e8b36....2e8974..8ccb8cc02e8944..2bc08ec08ed88bf82e8b4c..81c1....6a..ff36....ff36....894d..895d")&&(sVersion="1.11",sOptions="1994",bDetected=1),result()}meta("protector","Crypt by LightShow //ECLIPSE") ================================================ FILE: dbs_min/db/MSDOS/DAEMON_Protect.2.sg ================================================ function detect(){return MSDOS.compareEP("60609C8CC932C9E30C520F014C24FE5A83C20C8B1A9D61")&&(sVersion="0.6.7",bDetected=1),result()}meta("protector","DAEMON Protect") ================================================ FILE: dbs_min/db/MSDOS/DOS32_loader.0a.sg ================================================ function detect(){return MSDOS.compareEP("8cd88ccb2bd88bc4b1..d3e803d843b4..cd218e06....8cd80e1fa3....a3....a3....fc33c033ffeb")&&(sVersion="3.3",sOptions="1995 by Adam Seychell",bDetected=1),result()}meta("loader","DOS32 loader") ================================================ FILE: dbs_min/db/MSDOS/DOS_16M.0a.sg ================================================ function detect(){return MSDOS.compareEP("bf....8ed781c4....be....2bf73689......8bc6b1..d3e04836a3....be....468936....8cc32bdef7dbb44acd21368c......1607fcbf....b9....2bcf33c0")?(sOptions="1991 by Rational Systems, Inc.",bDetected=1):MSDOS.compareEP("bf....8ec78ed7bc....368c......ff36....268f......be....ac8ad8b7..88388b3e....4f8ec726a1....36f726....4836a3....8e06....33c08bc8f7d18bf8f2ae26")?(sOptions="1994 by Tenberry Software Inc.",bDetected=1):MSDOS.compareEP("bf....8ec78ed7bc....368c1e....ff36....368f06....be....ac8ad8b7..88388b3e....4f8ec726a1....36f726....4836a3....8e06....33c08bc8f7d18bf8f2ae26")?(sOptions="1995 by Tenberry Software",bDetected=1):MSDOS.compareEP("bf....8ec78ed7bc....368c1e....ff36....368f06....be....ac8ad8b7..883816078b3e....4f8ec726a1....36f726....4836a3....8e06....33c08bc8f7d18bf8f2ae26")?(sOptions="1994 by Rational Systems, Inc.",bDetected=1):MSDOS.compareEP("bf....8ec78ed7bc....368c1e....1607be....ac98508b3e....4f8ec726a1....c1e0..4836a3....8e06....33c08bc8f7d18bf8f2ae26")?(sOptions="1993 by Rational Systems, Inc.",bDetected=1):MSDOS.compareEP("bf....8ed781c4....be....2bf7368926....368926....8bc6b1..d3e04836a3....be....468936....8cc32bdef7dbb4..cd21")?(sOptions="1989 by Rational Systems, Inc.",bDetected=1):MSDOS.compareEP("BF....8ED781C4....BE....2BF78BC6B1..D3E04836A3....368926....BE....468936....8CC32BDEF7DBB4..CD21368C")&&(sOptions="1987-1992 by Rational Systems, Inc.",bDetected=1),result()}meta("extender","DOS/16M DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/DOS_32A.0a.sg ================================================ function detect(){return MSDOS.compareEP("fb0e1f8c1e....8c06....8c16....26a1....a3....fce8....e8....e8....8cd0268b36....05")?(sVersion="R9-07.0101.2011",sOptions="1996-98, 2002 by Narech Koumar (Supernar Systems, Ltd.)",bDetected=1):MSDOS.compareEP("0e1f8cc08cd3a3....2bd88bc4d1e8d1e8")?(sVersion="R8-07.0101.0076",sOptions="1996-98, 2002 by Narech Koumar (Supernar Systems, Ltd.)",bDetected=1):MSDOS.compareEP("0e1f8c1e....8c06....8c16....26a1....a3....fbfce8")&&(sVersion="04-20-06",sOptions="1996-2006 by Narech Koumar (Supernar Systems, Ltd.)",bDetected=1),result()}meta("extender","DOS/32A DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/Digital_Research_C.4.sg ================================================ function detect(){return MSDOS.compareEP("eb$$0e17bc....a1....8cdb0e1f891e....a3....8cc80306....a3....b9....2bdb8bf3bf....8cc803050306")&&(sVersion="1.1",sOptions="1983",bDetected=1),sLang="C",result()}meta("compiler","Digital Research C") ================================================ FILE: dbs_min/db/MSDOS/Disk_eXPress.1.sg ================================================ function detect(){return MSDOS.compareOverlay("be9b8710415302")&&MSDOS.compareEP("fca3....891e....49890e....bb....8c1f83e4..8967..b8....50")&&(sOptions="1991-93 by Albert J. Shan",bDetected=1),result()}meta("sfx","Disk eXPress") ================================================ FILE: dbs_min/db/MSDOS/EMMXXXX0_check.0a.sg ================================================ function detect(){return MSDOS.compareEP("b8....cd213c..73..0e1fba....b409cd210633c050cb8cd88ccbfabc....8ed3fbfc8ec3bf....be....b9....fc")&&(bDetected=1),result()}meta("extender","EMMXXXX0 check by Symantec") ================================================ FILE: dbs_min/db/MSDOS/EXETools_COM2EXE.1.sg ================================================ function detect(){return MSDOS.compareEP("e800005d83ed..8cda2e8996....83c2..8eda8ec22e0196....60bb....ba....85d274..b4..33ff33f6b9....ac")&&(bDetected=1),result()}meta("converter","EXETools COM2EXE") ================================================ FILE: dbs_min/db/MSDOS/EXE_Manager.2.sg ================================================ function detect(){return MSDOS.compareEP("b4301e06cd212ea3....bf....b9....33c02e....47e2..2e3b06....74..b8....cd1033c050cb")?(sVersion="3.0",sOptions="1994 by Solar Designer",bDetected=1):MSDOS.compareEP("1e54583bc475..b43006cd212ea3....bf....8befb9....33c02e030547e2")&&(sVersion="4.0",sOptions="1996 by Solar Designer",bDetected=1),result()}meta("protector","EXE Manager") ================================================ FILE: dbs_min/db/MSDOS/EXE_Packer.2.sg ================================================ function detect(){return(MSDOS.compareEP("1E068CC383....2E........B9....8CC88ED88BF14E8BFE")||MSDOS.compareEP("EB$$1E068CC383....0E1F011E....011E....BE....B9....FCAD3BC174"))&&(sVersion="7.0",bDetected=1),result()}meta("packer","EXE Packer") ================================================ FILE: dbs_min/db/MSDOS/EXE_encryption.2.sg ================================================ function detect(){return MSDOS.compareEP("501e068cc88ed88ec0e8....5b81eb....2ae4be....03f3882446fec40ae475..8b87....ba....f7e28987")&&(sOptions="1992 by E.Akulow",bDetected=1),result()}meta("protector","EXE encryption") ================================================ FILE: dbs_min/db/MSDOS/Eliashim's_CodeTrack.1.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$502e8c06....33c08ec02ef606......74..26ff36")&&(bDetected=1),result()}meta("protector","Eliashim's CodeTrack") ================================================ FILE: dbs_min/db/MSDOS/File_Shield.1.sg ================================================ function detect(){return MSDOS.compareEP("50b430cd213c..7d..e9....e8$$$$b8....bb....b9....ba....cd212ec706........81fb....75..2ec706........2e8916")?(sVersion="1.2",sOptions="by McAfee",bDetected=1):MSDOS.compareEP("501eeb$$2ea1....2e8b1e....2e8b0e....ba....2e8916....e8$$$$535051cd12")&&(sVersion="1.5",sOptions="by McAfee",bDetected=1),result()}meta("immunizer","File Shield") ================================================ FILE: dbs_min/db/MSDOS/Fitted_Modula-2.4.sg ================================================ function detect(){return MSDOS.compareEP("9a########558bec2e8e1e....a1....d1c873..8be55dca0000")&&(sVersion="2.0a",sOptions="1988",bDetected=1),result()}meta("compiler","Fitted Modula-2") ================================================ FILE: dbs_min/db/MSDOS/GFX_to_EXE.1.sg ================================================ function detect(){return MSDOS.compareEP("eb$$2ea1....3c..74..be....bd....8ccabf....83e7..bb....c1eb..03d32e8b1e....2e8b0e....8eda3c..75..30253c")&&(sVersion="2.0",sOptions="by t-Rex",bDetected=1),result()}meta("converter","GFX to EXE") ================================================ FILE: dbs_min/db/MSDOS/GamBit_Pro_Library.1.sg ================================================ function detect(){return MSDOS.compareEP("ba....2e8916....b430cd218b2e....8b1e....8edaa3....8c06")&&MSDOS.compareOverlay("'RS'000102")&&(sOptions="1994 by Nikita Ltd.",bDetected=1),result()}meta("installer","GamBit Pro Library") ================================================ FILE: dbs_min/db/MSDOS/GameWizard_DOS_Extender.0a.sg ================================================ function detect(){return MSDOS.compareEP("b430cd2186c43d....73..ba....e8....ba....b1..d3ea8cc803d08edafa8ed2bc....fb2e8916....2e8c06....368c0e....2e8c16....e8")&&(bDetected=1),result()}meta("extender","GameWizard DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/Graphic_WorkShop.1.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$2ec706........b8....a9....74..25....bb....2bd8432e011e....e8")&&(sVersion="6.0-7.1",sOptions="by Alchemy Mindworks Inc.",bDetected=1),result()}meta("self-displayer","Graphic WorkShop") ================================================ FILE: dbs_min/db/MSDOS/Guardian_Angel.2.sg ================================================ function detect(){return(MSDOS.compareEP("068cc88ed88ec0fc......8be8e4210c..eb")||MSDOS.compareEP("068CC88ED88EC0FCBF....EB")||MSDOS.compareEP("068CC88ED88EC0FCBB....EB")||MSDOS.compareEP("068CC88ED88EC0FCBE....EB"))&&(sVersion="1.0",bDetected=1),result()}meta("protector","Guardian Angel") ================================================ FILE: dbs_min/db/MSDOS/H+BEDV_SelfCheck.1.sg ================================================ function detect(){return MSDOS.compareEP("1e0e1ffcbe....33d233dbb9....ac3287....3084....0294....80d6..fec3e2..3b16....75..b8....cd213d....8bc374..b430cd21ba")?(sVersion="1.74-2.41",sOptions="1993-94 by H+BEDV Datentechnik GmbH",bDetected=1):MSDOS.compareEP("1e0e1fb8....cd213d....8bc374..b430cd21ba....3c..b8....72..fcbe....33d233dbb9....ac3287....3084....0294....80d6..fec3e2")&&(sVersion="1.10",sOptions="1993 by H+BEDV Datentechnik GmbH",bDetected=1),result()}meta("immunizer","H+BEDV SelfCheck") ================================================ FILE: dbs_min/db/MSDOS/Header_Changer.2.sg ================================================ function detect(){return MSDOS.compareEP("8cdb81c3....53bb....53501e068cdb81c3....53bb")&&(sOptions="by Shay Lev Ary",bDetected=1),result()}meta("other","Header Changer") ================================================ FILE: dbs_min/db/MSDOS/Hi-Tech_C.4.sg ================================================ function detect(){return MSDOS.compareEP("fcba....b1..d3ea8cc803c28ed88ed0268b1e....4b2bd8b8....f7c3....75..d3e38bc38be0be....b9....2bce32c0")&&(sVersion="3.06",sOptions="1984-87 by HI-TECH Software",bDetected=1),sLang="C",result()}meta("compiler","Hi-Tech C") ================================================ FILE: dbs_min/db/MSDOS/HyperLOCK_386.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$fabf....b0..b9....2e8a2581ff....72..2e3005472ac4")&&(sVersion="1.00",sOptions="1993 by Jayeson Lee-Steere",bDetected=1),result()}meta("protector","HyperLOCK 386") ================================================ FILE: dbs_min/db/MSDOS/IBM_PC_Pascal.4.sg ================================================ function detect(){return MSDOS.compareEP("b8....8ed88c06....fa8ed0268b1e....2bd881fb....7e..bb....d1e3")?(sVersion="2.00",sOptions="1984",bDetected=1):MSDOS.compareEP("b8....8ed88bd08c06....268b1e....891e....2bd8f7c3....75..b1..d3e3")?(sVersion="2.05",sOptions="1987",bDetected=1):MSDOS.compareEP("ba....b4..b0..8cc98ed9cd21")?(sVersion="2.00",sOptions="1984",bDetected=1):MSDOS.compareEP("b8....8ed88c06....ba....d1eab9....2bcad1ea")?(sVersion="1.00",sOptions="1981",bDetected=1):MSDOS.compareEP("2e8e1e....8cd08cdb2bc3d1e0")&&(sVersion="2.02",sOptions="1987",bDetected=1),sLang="Pascal",result()}meta("compiler","IBM PC Pascal") ================================================ FILE: dbs_min/db/MSDOS/John_Socha_Library.3.sg ================================================ function detect(){return MSDOS.compareEP("bb....8edb2e891e....8d06....25....fa8ed38be0fb26a1....a3....b430cd21a2....8826....3c..73..8d16....b409cd2133c05006cb")&&(sVersion="1986 Peter Norton Computing, Inc.",bDetected=1),result()}meta("library","John Socha Library") ================================================ FILE: dbs_min/db/MSDOS/Khrome_Crypt.2.sg ================================================ function detect(){return MSDOS.compareEP("B9....B8....EB..80....EB..EB..EB..66..........66")&&(sVersion="0.3",bDetected=1),result()}meta("protector","Khrome Crypt") ================================================ FILE: dbs_min/db/MSDOS/LSI_C.4.sg ================================================ function detect(){return(MSDOS.compareEP("b8....8ed0bc....368c......b430cd2136......8a......32ff438e......161f33ffb9....32c0fceb")||MSDOS.compareEP("b8....8ec00617bc....268c......b430cd2126a3....fcbe....8a0e....32edbf....f3a426......47"))&&(bDetected=1),result()}meta("compiler","LSI C-86") ================================================ FILE: dbs_min/db/MSDOS/L_O_V_E__FORTH.4.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$fc2e8c1e....8cc88ec08ed8bb....e8....bb....e8....bb....e8....bb....e8....8bec2b2e")?(sVersion="1.29",sOptions="1988-92 by Homer Seywerd, Wolodymyr R. Elehew and Peter Cav",bDetected=1):MSDOS.compareEP("fcbb....e8$$$$8b8f....09c974..8cd88cda0387....0397....1e068ed88ec28bf98bf14f4efdf3a4")&&(sVersion="1.20",sOptions="1988-92 by Homer Seywerd, Wolodymyr R. Elehew and Peter Cav",bDetected=1),result()}meta("compiler","L.O.V.E. FORTH") ================================================ FILE: dbs_min/db/MSDOS/Lahey_Fortran.4.sg ================================================ function detect(){return MSDOS.compareEP("EA########dbe3fcb8....8ed88c06....54583bc474..c606......d92e....eb")&&(sOptions="1984-91 by Lahey Computer Systems Inc.",bDetected=1),sLang="Fortran",result()}meta("compiler","Lahey Fortran") ================================================ FILE: dbs_min/db/MSDOS/Lattice_C.4.sg ================================================ function detect(){return MSDOS.compareEP("fab8....8ed8b8....8ed0bc....90fb")||MSDOS.compareEP("fab8....8ed8b8....8ed02e8b26....fbb8....a3....8c06....26a1....a3....be")?(sVersion="3.0",bDetected=1):MSDOS.compareEP("fab8....8ed8b8....8ed0b8....8be02e8c06....fbbb....b4..cd2173..e9")||MSDOS.compareEP("fab8....8ed8b8....8ed0bc....fb8cd88cc92bc1b1..d3c0a3....8126........25....a3....33c0")?(sVersion="3.00",bDetected=1):MSDOS.compareEP("fab8....8ed8b8....8ed0bc....fbb8....a3....8c06....26a1....a3")||MSDOS.compareEP("fab8....8ed8b8....8ed0b8....8be0fbbb....b4..cd21ba....72")?(sVersion="2.00",bDetected=1):MSDOS.compareEP("fab8....8ed8b8....8ed0bc....fbb430cd210ac075..b8....a3....8c06")||MSDOS.compareEP("fa8cc78cd68bccba....8ec2268e16....bc....fb8ec75651501e06")?(sVersion="2.1",bDetected=1):MSDOS.compareEP("fcb8....8ed88926....8306......06fa8ed081c4....fbc706........c606......33c0a2....a2....b8....2d....a3....03c4")?(sVersion="6.0",bDetected=1):MSDOS.compareEP("fcb8....8ed88926....8306......fa8ed081c4....fbc706........b8....a3....a3....bb....2bd8")?(sVersion="6.0",MSDOS.compareEP("891e....03dc",43)&&(sOptions="overlay"),bDetected=1):MSDOS.compareEP("8cc88ed8ba....b409cd21b8....8ed8ba....b409cd21bb....8b178b4f..8ed9b409cd21b8....cd21cb")?(sVersion="3.30",sOptions="driver",bDetected=1):MSDOS.compareEP("fa8cdeb9....8ed98926....8c16....8936....8bec8b46..a3....8b46..a3....fbfca1....0bc075..40a3....8cd8")||MSDOS.compareEP("8bec8b5e..8b46..2ea3....2e891e....c746......8b46..8b5e..8cc78cd68bccba....8ec2268e16....bc....8bd0")?(sVersion="3.00",sOptions="overlay",bDetected=1):MSDOS.compareEP("b8....8ed88ed0268b1e....2bd8f7c3....75..b1..d3e3eb..bb....8be3891e....b8....a3....0633c0508bec")?(sVersion="1.00",bDetected=1):MSDOS.compareEP("fab8....8ed88ed08c06....268b1e....2bd8f7c3....75..b1..d3e3eb..bb....8be3fb891e....b8....a3....0633c0508bec")?(sVersion="1.02",bDetected=1):MSDOS.compareEP("fc508cc00bc05874..b8....8ed88cc0a3....2906....8b1e....b4..cd2126a1....a3....8cc0a3....c706........268a1e")||MSDOS.compareEP("eb$$fafcb8....8ed88cc0a3....2906....a3....c706........8b1e....b4..cd2126a1....a3....268a1e....26c606")?(sVersion="3.30",bDetected=1):MSDOS.compareEP("e8$$$$fc268b36....bf....2e8c06....8ec732c0b430cd21fc8cd93c..73..b0..26a2....33ed33db8edb8b07d1e8")||MSDOS.compareEP("e8$$$$8cc78cd68bcc83c1..2e8c06....ba....8ec2268e16....bc....5651501e57b8....8ed833ff26f685......75")?(sVersion="2.00",bDetected=1):MSDOS.compareEP("fabe....8b14b8....8ed8b8....8ed0bc....8916....fbb430cd210ac075..b8....a3....8c06....803e......7c")?(sVersion="2.1",bDetected=1):MSDOS.compareEP("fafcb8....8ed88f06....8f06....8becc446..a3....8c06....8b46..2b46..a3....8b46..a3....8e46..8b5e..b8....8ed0")?(sVersion="2.1",sOptions="overlay",bDetected=1):(MSDOS.compareEP("fab8....8ed8b8....8ed0b8....8be0fbbb....b44acd21ba....73..e9")||MSDOS.compareEP("fab8....8ed8b8....8ed0bc....fb8c06....268e06....8c06....c706........b8....a3"))&&(sVersion="2.1-3.0",bDetected=1),sLang="C",result()}meta("compiler","Lattice C") ================================================ FILE: dbs_min/db/MSDOS/Logitech_Modula-2.4.sg ================================================ function detect(){return MSDOS.compareEP("8cdb83c3..8cc88ec0bf....33c0268a05473c..74..3c..74..03f08b0c03cb890ceb..26c5358cd903cb8ed983c7..eb..b8....03c350b8....5033c0")&&(sVersion="3.00",sOptions="Aug 1987",bDetected=1),result()}meta("compiler","Logitech Modula-2") ================================================ FILE: dbs_min/db/MSDOS/Meridian_Ada.4.sg ================================================ function detect(){return MSDOS.compareEP("b8....8ed89a........558bec5583ec..168d46..509a........894e..895e..83fb..75..83f9..75")?(MSDOS.compareEP("9a",43)?sVersion="1993":MSDOS.compareEP("33c050ba....521ebe....569a",43)&&(sVersion="1991"),bDetected=1):(MSDOS.compareEP("b8....8ed89a########04..2bc0f3508a46..83e0")||MSDOS.compareEP("b8....8ed89a########515006b8....8ec0b9....b8....8bf8fcf3ab075859cb")||MSDOS.compareEP("b8....8ed89a########e8$$$$c8......57561eb8....8ed868....9a")||MSDOS.compareEP("b8....8ed89a########8c06....8c16....8926....a1....a3....8b16....8916....8c06....9a"))&&(sVersion="1988",bDetected=1),result()}meta("compiler","Meridian Adavantage ADA") ================================================ FILE: dbs_min/db/MSDOS/Meridian_Pascal.4.sg ================================================ function detect(){return MSDOS.compareEP("b8....501f9a########8926....8926....8c16....8c16....8c06....8c06....9a........c706")&&(sOptions="1985-1988 by Meridian Software Systems, Inc.",bDetected=1),MSDOS.compareEP("b8....8ed89a########8c06....8c16....8926....a1....a3....a1....a3....a1....a3")?(sOptions="1985-1988 by Meridian Software Systems, Inc.",bDetected=1):MSDOS.compareEP("b8....8ed89a########558bec5583ec..8c06....8c16....8926....cd..8946..f646")&&(sOptions="1985 by Meridian Software Systems, Inc.",bDetected=1),sLang="Pascal",result()}meta("compiler","Meridian Pascal") ================================================ FILE: dbs_min/db/MSDOS/MetaWare_High_C.4.sg ================================================ function detect(){return MSDOS.compareEP("b8....50b8....50cbeb$$bd....2e8e1e....26a1....a3....8cd805....268b1e....3bc376..2bd8b1..d3e3eb..26a3....938cc02bd8b44acd212bdb8cd8fa8ed08be3fbc706........c706")?(sVersion="1983-1986",bDetected=1):MSDOS.compareEP("eb$$33ed2e8e1e....26a1....a3....26a1....2d....bb....fa8ed08be3fbc706........c706........bb....3bc373..2bd8b1..d3e3011e....011e....2e8e1e....9c0654582bc4d1f8")?(sVersion="1983-1988",bDetected=1):MSDOS.compareEP("eb$$fa6633e42e8e16....bc....6633f66633ff6633c92e8e1e....be....2e8e06....bf....b9....e8")?(sVersion="1983-1990",bDetected=1):MSDOS.compareEP("eb$$bd....2e8e1e....26a1....a3....26a1....2d....bb....fa8ed08be3fbc706........c706........bb")||MSDOS.compareEP("eb$$bd....2e8e1e....26a1....a3....268b......b1..4b891e....b8....05....3bc376..8bc3ba....2bc2d3e0")?(sVersion="1983-1986",bDetected=1):MSDOS.compareEP("eb$$bd....2e8e1e....268b1e....b1..4b891e....b8....05....3bc376..8bc350a3....a3....2bd8b1..d3c38cc12bc1")&&(sVersion="1983-1985",bDetected=1),sLang="C",result()}meta("compiler","MetaWare High C") ================================================ FILE: dbs_min/db/MSDOS/MetaWare_Professional_Pascal.4.sg ================================================ function detect(){return MSDOS.compareEP("b8000050b8....50cbeb..e8....2bc050e8....c3....bd....2e8e")||MSDOS.compareEP("eb$$bd....2e8e1e....26a1....a3....26a1....2d....bb....fa8ed08be3fb")||MSDOS.compareEP("eb$$bd....2e8e1e....26a1....2d....bb....fa8ed08be3fb")?(sVersion="1983-1986",bDetected=1):MSDOS.compareEP("eb$$33ed2e8e1e....26a1....a3....8cd805....268b1e....3bc376..2bd8b1..d3e3eb")&&(sVersion="1983-1988",bDetected=1),sLang="Pascal",result()}meta("compiler","MetaWare Professional Pascal") ================================================ FILE: dbs_min/db/MSDOS/Micro_Focus_Cobol.4.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$e9$$$$e8....8edac606......b8....0306....8ed28be08c0e....4a8bc28706....2bd0e8")&&(sVersion="1981, 1985 by Micro Focus Ltd",bDetected=1),MSDOS.compareEP("e8....51e8$$$$8bf0e8$$$$061e5657558bece8....72..a1....8be55d5f5e1f07c3")&&(sVersion="4.5",bDetected=1),sLang="Cobol",result()}meta("compiler","Micro Focus Cobol") ================================================ FILE: dbs_min/db/MSDOS/Micro_Focus_DOS_extender.0a.sg ================================================ function detect(){return MSDOS.compareEP("eb$$b8....8ed854583bc475..0f01e0a8..74..e8....75..2e800e......eb..c8......0f014e..80")&&(sVersion="1993 by Micro Focus Ltd",bDetected=1),result()}meta("extender","Micro Focus DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/Microsoft_Basic.4.sg ================================================ function detect(){return MSDOS.compareEP("eb$$0e1fb8....e8....8eda938a170ad274..b4..cd2143eb..b8....cd21")?(sVersion="7.10",bDetected=1):(MSDOS.compareEP("9a########591fa1....1e510e1ffc3d....74..e9....b430cd213c..73..e9$$$$ba....0e1fb409cd21b8....cd21")||MSDOS.compareEP("e9$$$$8cc88ed8e8....8a170ad274..b4..cd2143eb..b2..b4..cd21"))&&(sVersion="5.60",sOptions="1986",bDetected=1),sLang="Basic",result()}meta("compiler","Microsoft Basic") ================================================ FILE: dbs_min/db/MSDOS/Microsoft_C.4.sg ================================================ function detect(){return MSDOS.compareEP("b430cd213c..73..33c00650cbbf....8b36....2bf781fe....72..be....fa8ed781c4....fb73..161f")?(sName+=" Quick C",sVersion="2.5X",sOptions="1990",bDetected=1):MSDOS.compareEP("fc8cc02ea3....8ed8a1....2ea3....2ea3....be....ac32e403f0c6....b8....8ec02680........75")?(sName+=" Quick C",sVersion="2.51a",sOptions="1990",bDetected=1):MSDOS.compareEP("b430cd213c..73..b8....50e8....92b409cd21cd20bf")||MSDOS.compareEP("b430cd213c..73..b8....50900ee8....92b409cd21cd20bf")||MSDOS.compareEP("b430cd213c..73..b8....509a........92b409cd21cd20bf....8b36....2bf781fe....72..be....fa8ed781c4....fb73..33c050")?(sName+=" C/C++",sVersion="1986",bDetected=1):MSDOS.compareEP("b430cd213c..73..cd20bf....8b36....2bf776..8bc405....d1d8b1..d3e83bf072..8bf0fa8ed781c4....fb73")?(sName+=" Quick C",sVersion="1987-89",bDetected=1):MSDOS.compareEP("bf....8b36....2bf781fe....72..be....fa8ed781c4....fb73..e9....81e4....3689......3689......8bc6b1")?(sName+=" C/C++",sVersion="1985",bDetected=1):MSDOS.compareEP("fab8....8ed88ed0268b1e....2bd8f7c3....75..b1..d3e3eb..bb....8be3fb891e....b8....a3....0633c0508bec")?(sName+=" C/C++",sVersion="1.04",bDetected=1):MSDOS.compareEP("b430cd213c..73..cd20bf....8b36....2bf781fe....72..be....fa8ed781c4....fb73")&&(sName+=" Quick C",MSDOS.compareEP("81",54)?(sVersion="1.0",sOptions="1987"):MSDOS.compareEP("83",54)?(sVersion="2.00",sOptions="1989"):MSDOS.compareEP("8b",54)&&(sVersion="2.X",sOptions="1989"),bDetected=1),result()}meta("compiler","Microsoft") ================================================ FILE: dbs_min/db/MSDOS/Microsoft_C_Library.3.sg ================================================ function detect(){return MSDOS.compareEP("fa8cc78cd68bccba....8ec2268e16....bc....fb8ec75651501e062e8c06....b8....8ed8e8....b8....8ec08cc8262b06....26a3....803e")?(sVersion="1986",bDetected=1):MSDOS.compareEP("bf....8b36....2bf781fe....72..be....fa8ed781c4....fb73..161f0ee8....33c0500ee8....b8....cd21")?(sVersion="1985",bDetected=1):MSDOS.compareEP("061e33c08ed88b1e....a1....8ec0268b47..3d....75..ba....1f07e9....1f07be....ac0ac074..e8....72")&&(sName+=" (possibly)",sVersion="1986",bDetected=1),result()}meta("library","Microsoft C Library") ================================================ FILE: dbs_min/db/MSDOS/Microsoft_Fortran.4.sg ================================================ function detect(){return MSDOS.compareEP("b430cd213c..73..9a########558becb8....501eb8....50b8....509a")&&(sVersion="1987",bDetected=1),sLang="Fortran",result()}meta("compiler","Microsoft Fortran") ================================================ FILE: dbs_min/db/MSDOS/Microsoft_Quick_Basic.4.sg ================================================ function detect(){return MSDOS.compareEP("1e071e2e8e1e....b430cd2150812e........8b36....ad91ade3..3d....72..3d....73..ba....eb..0bc075..c706........c706........33c99a")?bDetected=1:MSDOS.compareEP("e9$$$$8cda83c2..8edaa1....0e1ffc3d....74..e9....b430cd213c..73..e9$$$$ba....0e1fb409cd21b8....cd21")?(sVersion="2.0",bDetected=1):MSDOS.compareEP("9a########591fa1....1e510e1ffc")?(sVersion="3.0",bDetected=1):MSDOS.compareEP("eb$$0e1fb8....509a........8eda938a170ad274..b4..cd2143eb")?(sVersion="4.5",bDetected=1):MSDOS.compareEP("9a########591fa0....1e51063c..74")?(sVersion="1.0",bDetected=1):MSDOS.compareEP("bf....a1....2ea3....2bc73d....72..b8....fa8ed781c4....fb969f2e8826....9683e4")?(sVersion="4.0",bDetected=1):MSDOS.compareEP("9a########06ba....8eda268b3e....8ec257b9....be....bf....0e1ffcf3a4b1")?(sVersion="1.0",bDetected=1):MSDOS.compareEP("b8....8ed88c06....fa8ed0bc....fbb430cd21a3....3c..75..06b4..cd218c06....b9")&&(sVersion="4.X",bDetected=1),sLang="Basic",result()}meta("compiler","Microsoft Quick Basic") ================================================ FILE: dbs_min/db/MSDOS/Microsoft_Quick_Pascal.4.sg ================================================ function detect(){return MSDOS.compareEP("b0..9a########50b430cd213c..73..cd20b8....8ed88c06....c706........8c0e....58545b3bdc74..0ac074..be....e8....32c0e9")&&(sVersion="1.0-1.08",sOptions="1989",bDetected=1),sLang="Pascal",result()}meta("compiler","Microsoft QuickPascal") ================================================ FILE: dbs_min/db/MSDOS/Microsoft_RTL.3.sg ================================================ function detect(){return MSDOS.compareEP("b430cd213c..73..cd208cc18cd32bd981c3....b4..cd2172..8cd6bf....2bf7b1..d3e6fa8ed703e6fb")?bDetected=1:MSDOS.compareEP("1e068cc88ed88cc0a3....83c0..a3....b430cd213c..73..b8....8ed8b8....ea........e8....e8....e8....8e")?(sVersion="1992",bDetected=1):MSDOS.compareEP("b430cd213c..73..cd20bf....b8....03c405....b1..d3e88bf0fa8ed781c4....fb73..161f9a........33c0509a")?(sVersion="1987",bDetected=1):MSDOS.compareEP("2e8c06....2e8c1e....bb....8edb1ee8....1f8b1e....0bdb74..8cd18bd4fa8ed3bc....fb5351521ee8....1f5a")||MSDOS.compareEP("2e8c1e....bb....8edb1ee8....1f8b1e....0bdb74..8cd18bd4fa8ed3bc....fb5351521ee8....1f5a")||MSDOS.compareEP("1eb8....8ed8b430cd213c..73..ba....e8....0633c050cb")||MSDOS.compareEP("1e069a########502e8c06....2ea1....2e0b06....75..26a1....2ea3....26a1....2ea3....58cb")?(sVersion="1990",bDetected=1):MSDOS.compareEP("b8....cd212e8816....b2..b8....cd21b4..cd218edbb8....83e8..8ec033f633ffb9....fcf3a5bb")||MSDOS.compareEP("b4..cd218edbb8....83e8..8ec033f633ffb9....fcf3a5bb")?(sVersion="1992",bDetected=1):MSDOS.compareEP("8cd03d....75..8cd83d....75..8ccab8....e8....e9....8cdb8ccab8....e8....eb..908cd83d")?(sVersion="1990",bDetected=1):MSDOS.compareEP("b430cd213c..73..cd20bf....8b36....2bf781fe....72..be....fa8ed781c4....fb73..161f")?(sVersion="1988",bDetected=1):(MSDOS.compareEP("b4..cd213c..73..33c00650cb86e03d....b0..72..bf....8b36....2bf781fe....72..be")||MSDOS.compareEP("bf....8edffa8ed781c4....fb33dbb8....cd210bdb74..881e....883e....8816....8836....b8"))&&(sVersion="1992",bDetected=1),result()}meta("library","Microsoft RTL") ================================================ FILE: dbs_min/db/MSDOS/Microsoft_RTL_(Clipper).3.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$1e06fc8cc88ed88c06....b430cd2186e0a3....e8....891e....890e....b8....bb....e8....071fc3")&&(sVersion="1988",bDetected=1),result()}meta("library","Microsoft RTL (CLIPPER 5.01)") ================================================ FILE: dbs_min/db/MSDOS/MultiLoop_Protection.2.sg ================================================ function detect(){return MSDOS.compareEP("1e06b8....8ec0b0..b9....be....2e300404..46e2")&&(sOptions="1992 by J&A",bDetected=1),result()}meta("protector","MultiLoop Protection") ================================================ FILE: dbs_min/db/MSDOS/Netware_loader.1.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$b8....cd213c..72..a1....3d....75..a1....3d....75..e9$$$$1e8cc88ed833c08ec0268b1e....891e")&&(bDetected=1),result()}meta("loader","Netware loader") ================================================ FILE: dbs_min/db/MSDOS/PDC_Prolog.4.sg ================================================ function detect(){return MSDOS.compareEP("b8....8ed88cc6bb....8ec3bb....268b178ec6b9....8bdad3eb8cd003d88cc02bd843b44acd2173..b0..b44ccd21")&&(sOptions="1992 by Prolog Development Center",bDetected=1),sLang="Visual Prolog",result()}meta("compiler","PDC Prolog") ================================================ FILE: dbs_min/db/MSDOS/PK_sig.1.sg ================================================ function detect(){return MSDOS.compareEP("c706....'PK'8cd805....50b8....50cb")&&(bDetected=1),result()}meta("other","PK signature") ================================================ FILE: dbs_min/db/MSDOS/PROPACK_SFX.1.sg ================================================ function detect(){return MSDOS.compareEP("558bec83ec..8c5e..e8....be....e8....b80030cd21ba....0e3c..72..a1....8ec033ff33c0b9....f2aeae75..fec0af75..5a8bd7061f")&&(sVersion="2.18",bDetected=1),result()}meta("sfx","PROPACK SFX") ================================================ FILE: dbs_min/db/MSDOS/Pacific_C.4.sg ================================================ function detect(){return(MSDOS.compareEP("fcb8....8ed826a1....488bd881eb....ba....3bd372..8bda2bc3b9....d3e048488ed38be0")||MSDOS.compareEP("fcc516....b8....8ed88ed0268b1e....4b2bd8b8....f7c3")||MSDOS.compareEP("fc8d16....b8....8ed826a1....488bd881eb....ba....3bd372..8bda2bc3b9....d3e048488ed38be0"))&&(sVersion="7.51",sOptions="1984-91 by HI-TECH Software",bDetected=1),sLang="C",result()}meta("compiler","Pacific C") ================================================ FILE: dbs_min/db/MSDOS/Panda_immunizer.1.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$5d81ed....2e8c8e....2e8c86....fc268e06....33ff32c0b9....f2ae26803d..75..83c7..2e89be")&&(sOptions="by Panda Software",sVersion="2.10s",bDetected=1),result()}meta("immunizer","Artemis Professional") ================================================ FILE: dbs_min/db/MSDOS/Pascal_MT+86.4.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$8cc82e0306....2e0306....2e0306....2e0306....3b06....76..2ea1....2d....2ea3....3d....7f..1ee8")?(sVersion="3.1",sOptions="1982 by Digital Research, Inc.",bDetected=1):MSDOS.compareEP("e8$$$$8cc82e0306....2e0306....2e0306....2e0306....3b06....76..1ee8")&&(sVersion="3.01",sOptions="1982 by Digital Research, Inc.",bDetected=1),sLang="Pascal",result()}meta("compiler","Pascal/MT+86") ================================================ FILE: dbs_min/db/MSDOS/Phar_Lap.0a.sg ================================================ function detect(){return MSDOS.compareEP("eb$$8cd88ec0b8....8ed8c706........b8....2d....3bc476..c706........8f06....8f06....58a3....a3....a3....8cd88d1e....8ed0")?(sVersion="1986-93 (C5S2S2P6)",bDetected=1):MSDOS.compareEP("eb$$8cd88ec0b8....8ed8bb....8cc02bd881c3....b44acd2173..e9....8d06....05....8cdb8ed38be0fcb8....8ec033c033db33c9")?(sVersion="1986-91 (C5S2S2PJ)",bDetected=1):MSDOS.compareEP("b8....50b8....50cb")?(sVersion="1986-91 (C3S2S2P8)",bDetected=1):MSDOS.compareEP("eb$$bd....2e8e1e....26a1....a3....268b1e....b1..8cdab8....05....3bc376..8bc32bc23d....76..b8....d3e0bb....891e....c706")||MSDOS.compareEP("eb$$33ed2e8e1e....26a1....a3....8d06....a3....9d06....a3....8d06....a3....8cd88d1e....8ed08be3bb....26891e....8cc02bd8")?(sVersion="1986-89 (C5S2S2P6)",bDetected=1):MSDOS.compareEP("eb$$33ed2e8e1e....26a1....a3....268b1e....b1..4b891e....b8....05....3bc376..8bc3ba....2bc2d3e0c706........c706")?(sVersion="1986-89 (C5S2S2P7)",bDetected=1):MSDOS.compareEP("b8....8ed8b8....cd21a3....3c..7d..b4..ba....8edaba....cd2106b8....50cb")&&(sVersion="1986-89 (C5S2S2PN)",bDetected=1),result()}meta("extender","Phar Lap DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/RAR.6.sg ================================================ function detect(){detect_RAR(0)}includeScript("rar-file") ================================================ FILE: dbs_min/db/MSDOS/REC_small.1.sg ================================================ function detect(){return MSDOS.compareEP("8cd81ee8$$$$83c0..5fb9....81ef....87ef408ed82bdbb2..0017424383fb..75..e2")?(sVersion="1.2",sOptions="by Ralf Roth",bDetected=1):MSDOS.compareEP("8cd81ee8$$$$5d83c0..81ed....b9....408ed82bdbb2..0017fec24383fb..75..e2")?(sVersion="1.01",sOptions="by Ralf Roth",bDetected=1):MSDOS.compareEP("8cd81ee8000083c0..5db9....81ed....408ed82bdbb2..0017fec24383fb..75..e2")?(sVersion="1.02",sOptions="by Ralf Roth",bDetected=1):MSDOS.compareEP("b9....8cd883c0..fa8bdc8cd7bc....44408ed02be4b2..8bec0056..424483fc..75..e2")&&(sVersion="1.05",sOptions="by Ralf Roth",bDetected=1),result()}meta("protector","REC.small") ================================================ FILE: dbs_min/db/MSDOS/REC_small_AV.1.sg ================================================ function detect(){return MSDOS.compareEP("eb$$8cd81ee8$$$$83c0..5fb9....81ef....87ef408ed82bdbb2..0017424383fb..75..e2")?(sVersion="1.03",sOptions="by Ralf Roth",bDetected=1):MSDOS.compareEP("eb$$8cd81ee8$$$$83c0..5fb9....81ef....87ef408ed82bdbb2..001702d34383fb..75..e2")&&(sVersion="4.01",sOptions="by Ralf Roth",bDetected=1),result()}meta("immunizer","REC.small") ================================================ FILE: dbs_min/db/MSDOS/RLE_com-packer.2.sg ================================================ function detect(){return MSDOS.compareEP("60be....bf....8b0e....f3a4be....bf....57b9....f3a4c3")&&(sOptions="by NOP/PC",bDetected=1),result()}meta("packer","RLE com-packer") ================================================ FILE: dbs_min/db/MSDOS/RM_FORTRAN.4.sg ================================================ function detect(){return MSDOS.compareEP("fc1eb8....8ed89a........81ec....8becc706........c706........33ffbe....b8....8ec0b9....f3a5897e..b8....ab8cdb8ec3bb")&&(bDetected=1),sLang="Fortran",result()}meta("compiler","RM/FORTRAN") ================================================ FILE: dbs_min/db/MSDOS/RTLink_VM_Manager.0a.sg ================================================ function detect(){return MSDOS.compareEP("9a########1e069a........2e8c06....8cc88ed852ba....b0..9a........5afcb8....2b06....d1e0")&&(bDetected=1),result()}meta("extender",".RTLink VM Manager") ================================================ FILE: dbs_min/db/MSDOS/RTPatch_SFX.1.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$8ccb8edb8c06....a3....8cc00106....0106....fd26a1....bb....b1..d3eb2bc38ec0bf....83e7..8bf7b9....d1e9f3a5fc")&&(sVersion="3.20",bDetected=1),result()}meta("sfx","RTPatch SFX") ================================================ FILE: dbs_min/db/MSDOS/Realia_Cobol.4.sg ================================================ function detect(){return MSDOS.compareEP("9a########9a########3c..75..8ed38be22bdb2bd2cb")&&(sVersion="4.X",sOptions="1984-92 by Realia, Inc.",bDetected=1),sLang="Cobol",result()}meta("compiler","Realia Cobol") ================================================ FILE: dbs_min/db/MSDOS/Realia_SPITBOL.4.sg ================================================ function detect(){return MSDOS.compareEP("2e8c1e....fc8ccaa1....0e1ffe06....a3....0116....b9....be....ad0bc074..03c28944..e2..8e06....bf....b1..b0..f3ae")&&(sVersion="3.6",sOptions="1983-84 by Realia, Inc.",bDetected=1),result()}meta("compiler","Realia SPITBOL") ================================================ FILE: dbs_min/db/MSDOS/SHOW_IT.1.sg ================================================ function detect(){return MSDOS.compareEP("bf....32db2e8a150ad274..b4..cd214780fa..75..fec380fb..75..32db53b4..cd16b4..cd165b75")&&(sVersion="1.2",sOptions="converted to exe",bDetected=1),result()}meta("self-displayer","SHOW IT") ================================================ FILE: dbs_min/db/MSDOS/Self_UnStuffer.2.sg ================================================ function detect(){return MSDOS.compareEP("86e303e9ace3$$1000e3$$00e40ec400e3")&&MSDOS.compareOverlay("0101'Aladdin'")&&(sVersion="1.1",sOptions="by Aladdin Systems, Inc.",bDetected=1),result()}meta("sfx","Self UnStuffer") ================================================ FILE: dbs_min/db/MSDOS/Small_C.4.sg ================================================ function detect(){return MSDOS.compareEP("b8....8ed826a1....2d....80fc..72..b8....b1..d3e0fa8cdb8ed38be050fbb8....2d....d3e08bd8fec73bdc72..b8....50e8")?(sVersion="2.2",sOptions="1982-88 by J. E. Hendrix",bDetected=1):MSDOS.compareEP("b8....8ed826a1....2d....3d....72..b8....b1..d3e0fa8cdb8ed38be050fbb8....2d....d3e08bd881c3....3bdc72..b8....cd21")&&(sVersion="2.1",sOptions="1982-88 by J. E. Hendrix",bDetected=1),sLang="C",result()}meta("compiler","Small C") ================================================ FILE: dbs_min/db/MSDOS/StonyBrook_Pascal.4.sg ================================================ function detect(){return MSDOS.compareEP("31ED9A........5589E581EC....B8....0E509A........BE....1E0EBF....1E071FFC")?(sVersion="7.0",bDetected=1):MSDOS.compareEP("31ed9a........5589e5b8....50ff1e")?(sVersion="6.13",bDetected=1):MSDOS.compareEP("31ed9a........5589e581ec....16078dbe....b9....31c0fcf3ab1e07")?(sVersion="6.12",bDetected=1):MSDOS.compareEP("31ed9a........5589e59a........c706........c706........e8")?(sVersion="6.1G",bDetected=1):MSDOS.compareEP("31ed9a........5589e583ec..9a........9a")&&(sVersion="6.14",bDetected=1),sLang="Pascal",result()}meta("compiler","StonyBrook Pascal+") ================================================ FILE: dbs_min/db/MSDOS/Sydex_SFX.1.sg ================================================ function detect(){return MSDOS.compareEP("b8....8ec0b430cd2186e0ba....3d....72..a1....26a3....bf....8a1d32ff47883926893e....268c1e....8cd88cc3")&&(sOptions="1994 by Sydex, Inc.",bDetected=1),MSDOS.compareEP("b8....8ec0e8....ba....3d....b8....72..e8....26a3....26890e....268916....8cd88cc381c3....2bd88ec0b4..cd21")&&MSDOS.compareOverlay("'SXD'00")&&(sOptions="1997 by Sydex, Inc.",bDetected=1),result()}meta("sfx","Sydex SFX") ================================================ FILE: dbs_min/db/MSDOS/Topspeed_Modula.4.sg ================================================ function detect(){return MSDOS.compareEP("e90000fc2bedbc....b8....8ed88c06....26a1....a3....54583bc4b8....75..b430cd213c..74..3c..77..b8....8cdbe8....86c4a3....8e06")?(sVersion="2.0",bDetected=1):MSDOS.compareEP("1eba....8eda8b0e....8b36....ff36....5053a1....48ba....8eda890e....8936....a3....c706........2ea1....a3")||MSDOS.compareEP("1eba....8eda8b0e....8b36....ff36....50a1....48ba....8eda890e....8936....a3....58c706........c706")||MSDOS.compareEP("1eba....8eda8b0e....8b36....ff36....50a1....48ba....8eda890e....8936....a3....c706........58c706")||MSDOS.compareEP("fc1eba....8eda8b0e....8b36....ff36....50a1....ba....8eda890e....8936....a3....58c706........c706")?(sName+=" RTL",sOptions="1989 by JPI",bDetected=1):MSDOS.compareEP("ea########2e8c1e....fc2ef706........74..e8....eb..b8....ba....0e1fcd212bc02ef706........74")?(sVersion="2.0",sOptions="by JPI",bDetected=1):MSDOS.compareEP("ea########2e8c1e....fc2bc08cd3ba....8ec2bf....b9....f3ab423bd372..508becffe0")?(sVersion="1.17",sOptions="by JPI",bDetected=1):MSDOS.compareEP("ea########8cdb2e8e1e....891e....fc2ef706........74..2bc02e8e1e....ff36....8cd3ba....8ec2bf....b9....f3ab423b..72")&&(sOptions="by JPI",bDetected=1),sLang="Modula",result()}meta("compiler","Topspeed Modula") ================================================ FILE: dbs_min/db/MSDOS/UR_FORTH.4.sg ================================================ function detect(){return MSDOS.compareEP("fc2e8c06....2e8e1e....e8$$$$b430cd213c..73..e8")&&(sVersion="1.03",sOptions="1986-88 by Laboratory Microsystems, Inc.",bDetected=1),result()}meta("compiler","UR/FORTH") ================================================ FILE: dbs_min/db/MSDOS/Unknown_cryptors.2.sg ================================================ function detect(){return MSDOS.compareEP("fa8cde8ccf8edf8ec783c7..bb....8b1f83c3..b1..d3eb2bfbe8")?(sVersion="#01",bDetected=1):MSDOS.compareEP("e9$$$$b9....b3..be....bf....acfec332c3aae2")?(sVersion="#02",sOptions="exe 0-relocs crypt",bDetected=1):MSDOS.compareEP("3ec606......90eb$$2e8a36....8ec08cd8be....bf....2e033e....26a3....26893e....26a3....26c706........0e07")?(sVersion="#03",bDetected=1):MSDOS.compareEP("9090e9$$$$8cd88be8b8....8be08ccb8edb8ec3bf....892de8....8cc88ed88ec01e33db8edbbb....81eb....8b071f1ebb")?(sVersion="#04",bDetected=1):MSDOS.compareEP("eb$$be....bf....2e89352eff26")?(sOptions="protector",sVersion="#05",bDetected=1):MSDOS.compareEP("bf....b8....fa8ed08be7fb1e1eb8....0e500e501efc8cd08ec0be....8cc806b9....578ed8f3a5cb")?(sOptions="Russ",sVersion="#06",bDetected=1):MSDOS.compareEP("........0e1f8b0e....8bf14e89f78cdb031e....8ec3fdf3a453b8....50cb")?(sOptions="Aidstest",sVersion="#07",bDetected=1):MSDOS.compareEP("e9$$$$e8$$$$bb....e8$$$$29c9e8$$$$e8$$$$e9$$$$8ed9e9$$$$870feb$$e8$$$$eb$$51eb$$eb$$29dbe8$$$$bf....e9$$$$e8$$$$871de8$$$$53eb$$b3..b7..bf....2e8a05")?(sOptions="by Matrix Technologies",sVersion="#08",bDetected=1):MSDOS.compareEP("bd....50060ee8$$$$065733ff570e1f07be....b9....8004..46e2..b1..ac268a1d04..aa80eb..885c..e2")?(sOptions="SYN!",sVersion="#09",bDetected=1):MSDOS.compareEP("e9$$$$eb$$bf....e9$$$$26f6e8$$$$e9$$$$8edee8$$$$8735e8$$$$56e9")?(sOptions="by Matrix Technologies",sVersion="#10",bDetected=1):MSDOS.compareEP("b3..060e1f8b0e....8bf14e89f78cdb031e....8ec3fdf3a453b8....50cb")?(sOptions="Aidstest",sVersion="#11",bDetected=1):MSDOS.compareEP("e8$$$$eb$$8cca8eda8ec2be....bf....b9....2ec706........31c0ada3....3136....8bc18bdef7e33106....3116....a1....abe2")&&(sVersion="#12",bDetected=1),result()}meta("cryptor","Unknown cryptor") ================================================ FILE: dbs_min/db/MSDOS/Upper_Deck_Forth.4.sg ================================================ function detect(){return MSDOS.compareEP("fc2e8c06....b8....cd213c..73..b4..2e8e1e....ba....cd212eff36....33c050cb")&&(sVersion="2.00",sOptions="1990, 1991 by Upper Deck Systems",bDetected=1),result()}meta("compiler","Upper Deck Forth") ================================================ FILE: dbs_min/db/MSDOS/Visual_Cobol.4.sg ================================================ function detect(){return MSDOS.compareEP("9a########061fbe....b9....ac3cff75..e2..ad8ed88b0e....8ed08be1eb")&&(sVersion="3.3",sOptions="1993 by mbp Software & Systems",bDetected=1),sLang="Cobol",result()}meta("compiler","Visual COBOL (XO)") ================================================ FILE: dbs_min/db/MSDOS/WWPACK_mutator.2.sg ================================================ function detect(){return MSDOS.compareEP("8cc981c1....51b9....510606b1..51b1..8cd383eb..5351fc8cd5b8....8cca03d0be....33ff4d8ec58edab1..f3a54a4879")?(sVersion="1.0",sOptions="by Barthazi Andras",bDetected=1):MSDOS.compareEP("8cc981c1....51b9....5106068ccab8....03d0b1..518cd383eb..53b1..51fc8cd5be....33ff4d8ec58eda4ab9....50")?(sOptions="by MR WiCKED",bDetected=1):MSDOS.compareEP("81ce....1bf78a....80fa..2a95....fc03f633f281e6....1e10ea0e1f00d20e0732b4....21da2efe06")?(sOptions="1996 by van Hauser",bDetected=1):MSDOS.compareEP("8ccab8....03d08cc981c1....51b9....510606b1..518cd383eb..53b1..51fc8cd5be....33ff4d8ec58eda4ab9....50")||MSDOS.compareEP("8cd383eb..8cc981c1....51b9....510606b1..51fc8cd5b1..5351b8....8cca")||MSDOS.compareEP("8cc981c1....51b9....51b1..068cd30651b1..b8....8cca03d0fc")||MSDOS.compareEP("8cc981c1....51b9....510606fc8cd5b1..51b1..8cd383eb..5351")||MSDOS.compareEP("8cc981c1....51b9....fc8cd5510606b1..51b1..8cd383eb..5351")?(sVersion="3.04a",sOptions="by Boogie",bDetected=1):MSDOS.compareEP("f9be....81ee....2e80b4......eb")?(sVersion="1.1c",bDetected=1):MSDOS.compareEP("061e0e0e071fb430cd2186e03d....73..cd20eb$$eb$$5055528cd2fa50b8....58eb")?(sOptions="REC by R0SE",bDetected=1):MSDOS.compareEP("8cc98cd383eb..81c1....51b9....510606b1..518ccafc8cd5b1..5351b8")?(sVersion="1.0",sOptions="by Barthazi Andras",bDetected=1):MSDOS.compareEP("......81......2e80..")&&(sOptions="by unknown",bDetected=1),result()}meta("protector","WWPACK mutation engine") ================================================ FILE: dbs_min/db/MSDOS/Whitesmiths_C.4.sg ================================================ function detect(){return MSDOS.compareEP("be....8cd18cd83bc175..a3....e9....8bde8a0f81e1....03d9d1e941ff3783eb..e2..8bf48cd936890e....8cd18ed98c06....8c06")?(sVersion="3.3",sOptions="1988 by Whitesmiths, Ltd. and Cosmic, Sarl",bDetected=1):MSDOS.compareEP("be....8cdb8cd03bc374..8a0c81e1....03f1d1e941ff3483ee..e2..8bf4b9....8ed9")&&(sVersion="3.2",sOptions="1987 by Whitesmiths, Ltd",bDetected=1),sLang="C",result()}meta("compiler","Whitesmiths C (dos86)") ================================================ FILE: dbs_min/db/MSDOS/Window_book.1.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$e8$$$$fc5e8cda8b1e....bd....8edd8ec5b9....bf....2bcf33c02ea3....41d1e9f3ab891e....8916....8ec2bb....03dd")?-1!=MSDOS.findSignature(MSDOS.getOverlayOffset(),2e3,"1a1a7bf7")&&(sVersion="4.20",bDetected=1):MSDOS.compareEP("e9$$$$e8$$$$fc5e8cdaa1....bd....8edd8ec5a3....b9....bf....2bcf33c02ea3....d1e9f3ab8916....8ec2bb....a1....03c7")&&-1!=MSDOS.findSignature(MSDOS.getOverlayOffset(),2e3,"1a1a7bf7")&&(bDetected=1),result()}meta("other","Window book") ================================================ FILE: dbs_min/db/MSDOS/Wizardy_protection.1.sg ================================================ function detect(){return MSDOS.compareEP("2eff16....e9")&&(bDetected=1),result()}meta("protector","Wizardy protection") ================================================ FILE: dbs_min/db/MSDOS/WordPerfect_EXEPack.2.sg ================================================ function detect(){return MSDOS.compareEP("958cc005....0e1fa3....0306....8ec08b0e....8bf94f8bf7fdf3a48b16....50b8....50cb")&&(bDetected=1),result()}meta("packer","WordPerfect EXEPack") ================================================ FILE: dbs_min/db/MSDOS/XOPEN+_Protection.2.sg ================================================ function detect(){return MSDOS.compareEP("8cca8cdd8eda81ea....8916....ba....8eddea")&&(sOptions="1994",bDetected=1),result()}meta("protector","XOPEN+ Protection") ================================================ FILE: dbs_min/db/MSDOS/Zbikowski_C.4.sg ================================================ function detect(){return(MSDOS.compareEP("ba....8cd32bdab1..d3e3fa8ed203e3fbfc8b1e....8bc32bc2a9....74..8bda80c7..33c0eb..b1..d3e02d....36a3")||MSDOS.compareEP("ba....8cd32bdab1..d3e3fa8ed203e3fbbe....8b1e....36891e....33ff8bc70bdb74..b9....8ec3f2ae"))&&(sOptions="1983 by Mark Zbikowski (Microsoft Corp.)",bDetected=1),sLang="C",result()}meta("compiler","Zbikowski C") ================================================ FILE: dbs_min/db/MSDOS/Zip.6.sg ================================================ function detect(){detect_Zip(0)}includeScript("zip-file") ================================================ FILE: dbs_min/db/MSDOS/Zortech(Symantec)_C.4.sg ================================================ function detect(){return MSDOS.compareEP("fafcb8....8ed88c......268b......891e....8bd82b1e....891e....268b1e....2bd881fb....72..bb....8bd003d342b1..d3e38ed08be381eb....80ff..73..ba....e9....fbb430cd21a3")?(sVersion="2.10 - 3.0r1*, 4.0",bDetected=1):MSDOS.compareEP("fafcb8....8ed88ed08ec0bc....33c050e8....eb")?(sVersion="2.10 - 3.0r1, 4.0",bDetected=1):MSDOS.compareEP("fafcb8....8ed0bc....b8....8ed88c06....660fb7c066c1e0..ba")||MSDOS.compareEP("fafcb8....8ed88ed0bc....2e8c06....33d21e2e8e1e....be....8a0e....32ede3")||MSDOS.compareEP("fafcb8....8ed8bb....81c3....8ed08be3fb8becbe....268a0c4632ed8bd9")?(sVersion="3.0",sOptions="1991",bDetected=1):MSDOS.compareEP("fafcb8....8ed88ed0bc....b4..cd214b891e....8cc0a3....b8....cd21")||MSDOS.compareEP("fafcb8....8ed833c08ed88bf8bb....b9....b8....8905")?(sVersion="2.10 - 3.0r1, 4.0",bDetected=1):MSDOS.compareEP("fab8....8ed8a3....8c06....268b......891e....8bd82b1e....891e....268b......891e....2bd881fb....72..bb....8bd003d34289")?(sVersion="2.0",bDetected=1):MSDOS.compareEP("fab8....8ed88c06....268b1e....891e....8bd82b1e....891e....268b1e....2bd881fb....72..bb....8bd0")?(sVersion="2.00",sOptions="1989 by Walter Bright",bDetected=1):MSDOS.compareEP("fab8....dbe38ed88c06....8bd82b1e....891e....268b1e....2bd881fb....72..bb....8bd003d342b1..d3e38ed08be381eb....81fb....77")||MSDOS.compareEP("eb$$fab8....05....b9....d3e88cc903c18ed88c06....268b1e....891e....8bd82b1e....891e....268b1e....2bd8")?(sVersion="4.0",bDetected=1):(MSDOS.compareEP("e8$$$$fc06b8....cd21bf....8cc98ed9be....b9....f3")||MSDOS.compareEP("fafcb8....8ed8bb....81c3....8ed08be38becfb8cc0a3....be....268b04a3....8b36")||MSDOS.compareEP("fafcb8....8ed88c06....8ed0bc....fbba....e8....b8....cd2186c4"))&&(bDetected=1),sLang="C",result()}meta("compiler","Zortech/Symantec C") ================================================ FILE: dbs_min/db/MSDOS/Zurenava_DOS_Extender.0a.sg ================================================ function detect(){return MSDOS.compareEP("be....bf....b9....56fcf3a55fe9")&&(sVersion="0.45",bDetected=1),result()}meta("extender","Zurenava DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/_LE.0.sg ================================================ function detect(){return MSDOS.isLE()&&(bDetected=1),result()}meta("type","LE") ================================================ FILE: dbs_min/db/MSDOS/_LX.0.sg ================================================ function detect(){return MSDOS.isLX()&&(bDetected=1),result()}meta("type","LX") ================================================ FILE: dbs_min/db/MSDOS/_MSDOS.0.sg ================================================ function detect(){return MSDOS.isVerbose()&&(sName=MSDOS.getOperationSystemName(),sVersion=MSDOS.getOperationSystemVersion(),sOptions=MSDOS.getOperationSystemOptions(),"Unknown"===sName&&(sName="DOS-like"),bDetected=1),result()}meta("operation system","MS-DOS") ================================================ FILE: dbs_min/db/MSDOS/_NE.0.sg ================================================ function detect(){return MSDOS.isNE()&&(bDetected=1),result()}meta("type","NE") ================================================ FILE: dbs_min/db/MSDOS/_init ================================================ var File=MSDOS,X=MSDOS MSDOS.getBaseOffset=function(e){return 0==arguments.length&&(e=0),(MSDOS.readWord(8)<<4)+e},MSDOS.addressToOffset=function(e,t){return 1==arguments.length&&(t=0),t+=e<<4,MSDOS.getBaseOffset(1048575&t)},MSDOS.AddressToOffset=function(){MSDOS.addressToOffset.apply(this,arguments)},MSDOS.getEntryPointOffset=function(e){return 0==arguments.length&&(e=0),MSDOS.addressToOffset(MSDOS.readWord(22),MSDOS.readWord(20))+e},MSDOS.getNEOffset=function(e){return 0==arguments.length&&(e=0),MSDOS.readDword(60)+e} ================================================ FILE: dbs_min/db/MSDOS/anti-tracing_add-on.1.sg ================================================ function detect(){return MSDOS.compareEP("fc33d28ec2bf....abab8ccb33ff81eb....53bb....531e0733dbcb")&&(bDetected=1),result()}meta("protector","anti-tracing add-on") ================================================ FILE: dbs_min/db/MSDOS/compiler_ASIC-Basic.4.sg ================================================ function detect(){return(MSDOS.compareEP("b8....8ed88ec033dbb4..cd108916....cc901ebf....8cc82d....8ed833c98a0e....83f9..72..b9....26be....fc")||MSDOS.compareEP("b8....8ed88ec033dbb4..cd108916....1ebf....8cc82d....8ed833c98a0e....83f9..72..b9....26be....fc"))&&(sVersion="5.0",sOptions="1994 by David Visti of 80_20 Software",bDetected=1),result()}meta("compiler","ASIC-Basic") ================================================ FILE: dbs_min/db/MSDOS/compiler_Ada89.4.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$8cda8cc939d173$$1e0e1fb4..b0..ba....cd21b4..b0..ba....cd211f8cd9b8....8b1e....8ed88ec0")&&(sOptions="1989 by RR Software, Inc.",bDetected=1),result()}meta("compiler","Ada89") ================================================ FILE: dbs_min/db/MSDOS/compiler_ApBasic.4.sg ================================================ function detect(){return MSDOS.compareEP("eb$$8cc02ea3....268b36....8cc88ed88ec08cc82e0106....2e0106....2ea1....2e8b16....33db2e")?(sVersion="1.2",sOptions="1987-89 by Comptech Software, Inc.",bDetected=1):MSDOS.compareEP("eb$$8cc02ea3....268b36....8cc88ed88ec08cc82e0106....2e0106....e8....2ea1....2e8b16....33db2e")&&(sOptions="1991 by Comptech Software, Inc.",bDetected=1),result()}meta("compiler","ApBasic") ================================================ FILE: dbs_min/db/MSDOS/compiler_BAT2EXEC.4.sg ================================================ function detect(){return MSDOS.compareEP("eb$$fcbd....8b....8b......8b......b44acd21a1....8986....8b9e....ffe3")?(sVersion="1.5",bDetected=1):MSDOS.compareEP("fcbd....8b....8b......8b......b44acd21a1....8986....8b9e....ffe3")&&(sVersion="1.2",bDetected=1),result()}meta("compiler","BAT2EXEC") ================================================ FILE: dbs_min/db/MSDOS/compiler_BSTAR_FORTH.4.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$8c0e....8c0e....a1....a3....e8....a3....a1....a3....e8....a3....a1....a3....e8....e8....8b0e....e3..1e8e06....a1")&&(sVersion="0.0",bDetected=1),result()}meta("compiler","BSTAR_FORTH(16)") ================================================ FILE: dbs_min/db/MSDOS/compiler_BatLite.4.sg ================================================ function detect(){return MSDOS.compareEP("eb$$e8....bb....8bf3031e....891e....81fb....73..bb....8bfb891e....031e....81c3....8be3b1..d3eb43")&&(sOptions="1991-95 by Pieter A. Hintjens (COM2EXE converted)",bDetected=1),result()}meta("compiler","BatLite") ================================================ FILE: dbs_min/db/MSDOS/compiler_BetterBASIC.4.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$fa2ec706........2e8c1e....b8....05....b1..d3e805....bb....83c3..d3eb8cc98ed1bc....2ec706........03c88ed903cb8ec1")&&(sOptions="1984-86 by Summit Software Technology Inc.",bDetected=1),result()}meta("compiler","BetterBASIC") ================================================ FILE: dbs_min/db/MSDOS/compiler_CII-C.4.sg ================================================ function detect(){return(MSDOS.compareEP("eb$$dbe3fcb8....8ed88c06....26a1....3b06....76..2b06....8cdf81c7....3bf873..8bc7be....3bf0")||MSDOS.compareEP("dbe3fcb8....8ed88c06....26a1....3b06....76..2b06....be....3bf073..2bc63b06....72..3b06")||MSDOS.compareEP("eb$$dbe3fcb8....8ed88c06....26a1....3b06....76..2b06....be....3bf073..2bc63b06....72..3b06")||MSDOS.compareEP("eb$$dbe3fcb8....8ed88c06....9c58a9....75..26a1....3b06....76..2b06....8cdf81c7....3bf8"))&&(bDetected=1),sLang="C",result()}meta("compiler","CII-C") ================================================ FILE: dbs_min/db/MSDOS/compiler_Easy!-C.4.sg ================================================ function detect(){return MSDOS.compareEP("9c55568ccd83c5..8db6....56be....56cb")&&(sOptions="1993 by Flight Technologys",bDetected=1),sLang="C",result()}meta("compiler","Easy!-C") ================================================ FILE: dbs_min/db/MSDOS/compiler_GRASP.4.sg ================================================ function detect(){return MSDOS.compareEP("8cd88ec0b8....8ed88c06....8c16....8926....26a1....3b06....77..e9....2b06....8cdf81c7....3bf873..8bc7")?(sVersion="4.00e - 5.0",sOptions="1993 by John Bridges",bDetected=1):MSDOS.compareEP("8cd88ec0b8....8ed88c06....26a1....3b06....77..e9....2b06....8cdf81c7....3bf873..8bc7")&&(sVersion="4.0b",sOptions="1991 by John Bridges",bDetected=1),result()}meta("compiler","GRASP Interpreter") ================================================ FILE: dbs_min/db/MSDOS/compiler_MegaBasic.4.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$1eff36....ff36....8cc88ed88ec02e8f06....2e8f06....2e8f06....2e8c0e....b430cd213c..ba....73..e8....2eff36....33c050cb")&&(sVersion="4.00",sOptions="1991-94 by Kristofer Sweger",bDetected=1),sLang="Basic",result()}meta("compiler","MegaBasic") ================================================ FILE: dbs_min/db/MSDOS/compiler_MegaBasic1.4.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$b9....33f633ff1607fcf3a5368c1e....a1....161fa3....e8....bc....b430cd21a2....0ac074..86e0")?(sVersion="5.40",sOptions="1985-87 by Christopher Cochran",bDetected=1):MSDOS.compareEP("e8$$$$b8....cd21360806....84c074..8bf886e08bd0d40a86c4360906....86c48ac48ae6d50a")?(sVersion="5.812",sOptions="1994 by Christopher Cochran",bDetected=1):MSDOS.compareEP("e8$$$$b430cd21360806....0ac074..86e08bd0d40a86c4360906....86c48ac48ae6d50a")?(sVersion="5.73",sOptions="1992 by Christopher Cochran",bDetected=1):(MSDOS.compareEP("e9$$$$b9....33f633ff1607fcf3a5368c1e....161fe8....bc....b430cd21a2....0ac074..86e0")||MSDOS.compareEP("e9$$$$b9....33f633ff1607fcf3a5268c1e....161fe8....bc....0e1fba....b8....cd21ba....b8"))&&(sOptions="1985 by Christopher Cochran",bDetected=1),sLang="Basic",result()}meta("compiler","MegaBasic") ================================================ FILE: dbs_min/db/MSDOS/compiler_PCC.4.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$368c1e....a1....8cd32bc377..e9....483d....72..b8....b1..d3e03bc473..e9....368b1e....36031e....83c3..3be375..8be0368926....b430cd213c..72..36c606......c606")?(sVersion="1.2",sOptions="by Mark DeSmet (C Ware Corporation)",bDetected=1):MSDOS.compareEP("e9$$$$368c1e....a1....8cd32bc377..e9....483d....72..b8....b1..d3e03bc473..e9....368b1e....36031e....83c3..3be375..8be0368926....b430cd213c..72..36c606......36a2....c606")?(sVersion="3.X",sOptions="1984-86 by Mark DeSmet (C Ware Corporation)",bDetected=1):MSDOS.compareEP("e9$$$$368c1e....a1....8cd32bc377..e9....483d....72..b8....b1..d3e03bc473..e9....8be0c606......c606......b9....be....468a84....3c..74..3c..75..b8....50")?(sVersion="2.X",sOptions="1984-86 by Mark DeSmet (C Ware Corporation)",bDetected=1):MSDOS.compareEP("e9$$$$368c1e....a1....36a3....a1....8cd32bc377..e9....483d....72..b8....b1..d3e03bc473..e9....368b1e....36031e....83c3..3be375..8be0368926")&&(sVersion="3.1",sOptions="1984-86 by Mark DeSmet (C Ware Corporation)",bDetected=1),sLang="C",result()}meta("compiler","PCC (DeSmet C)") ================================================ FILE: dbs_min/db/MSDOS/compiler_Power_C.4.sg ================================================ function detect(){return MSDOS.compareEP("b8....05....b1..d3e88cca03c28b0e....8cdb8ed8891e....890e....8ec0ba....1e8cc88ed8b8....cd21588ed8bf....33c0")&&(sVersion="2.0.X",sOptions="1989-91 by Mix Software",bDetected=1),sLang="C",result()}meta("compiler","Power C") ================================================ FILE: dbs_min/db/MSDOS/compiler_SP-FORTH.4.sg ================================================ function detect(){return MSDOS.compareEP("b8....8ed88bec81c5....c746......e8$$$$8b46..25....0d....cd218b46..83ed..8946..c3")&&(sVersion="2.5.13",bDetected=1),MSDOS.compareEP("b8....8ed88bec81c5....c746......e8$$$$e8$$$$8bc583ed..8946..c3")&&(sVersion="2.5.X",sOptions="1994",bDetected=1),result()}meta("compiler","SP-FORTH") ================================================ FILE: dbs_min/db/MSDOS/compiler_Symantec_BASIC.4.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$1e060e1f9a........8c06....33c08ec026a1....a3....26a1....a3....ba....b0..9a........fa26c706........268c0e....fb071fc3")&&(sVersion="1.1a",sOptions="1993",bDetected=1),sLang="Basic",result()}meta("compiler","Symantec BASIC") ================================================ FILE: dbs_min/db/MSDOS/compiler_Topspeed_C.4.sg ================================================ function detect(){return(MSDOS.compareEP("8cc1e3$$1eba....8eda8b0e....8b36....ff36....50a1....ba....8eda890e....8936....a3....58")||MSDOS.compareEP("8cc1e3$$1eba....8eda8b0e....8b36....ff36....50a1....48ba....8eda890e....8936....a3....c706........58"))&&(sVersion="2.0",sOptions="1989 by JPI",bDetected=1),sLang="C",result()}meta("compiler","Topspeed C") ================================================ FILE: dbs_min/db/MSDOS/compiler_Turbo_Basic.4.sg ================================================ function detect(){return(MSDOS.compareEP("2E8C......2EC706........E8....E8")||MSDOS.compareEP("faba....8ec28ed2bc....fb8bfc32edbe....8a0e....8bc12bf94f81e7....268c1e....8be78ec2fcf3a48eda8bf7bb....9150"))&&(sVersion="1.0",sOptions="1987",bDetected=1),result()}meta("compiler","Turbo Basic") ================================================ FILE: dbs_min/db/MSDOS/compiler_Turbo_Prolog.4.sg ================================================ function detect(){return MSDOS.compareEP("fab8....8ed8b8....a3....8ed0bc....fb8c06....268e06....8c06....b8....a3....9a")&&(sVersion="2.0",sOptions="1986-88",bDetected=1),sLang="Prolog",result()}meta("compiler","Turbo Prolog") ================================================ FILE: dbs_min/db/MSDOS/compiler_WATCOM.4.sg ================================================ function detect(){var e,c return MSDOS.compareEP("E9....'WATCOM C'")||MSDOS.isSignaturePresent(0,Math.min(2048,MSDOS.getSize()),"'WATCOM C'")?bDetected=1:MSDOS.isLE()?(c=MSDOS.getNEOffset(),e=MSDOS.readDword(c+128),c=MSDOS.readDword(c+28),MSDOS.compare("EB..'WATCOM C'",e+c)&&(bDetected=1)):MSDOS.compareEP("e9$$$$fbb9....8ec126bb....83c3..80e3..26891e....268c1e....01e383c3..80e3..8ed189dc26891e....89dad1ea")?(sName="Open Watcom C/C++16",sVersion="2002 by Sybase, Inc.",bDetected=1):MSDOS.compareEP("e9$$$$fbb9....8ec1bb....83c3..80e3..26891e....268c1e")?(sName="Open Watcom C/C++16",sVersion="1988-2002 by Sybase, Inc.",bDetected=1):MSDOS.compareEP("8cd8bb....8edb8b1e....0bdb74..8cd18bd4fa8ed3bc....fb50535152a3....e8....5a595b580bdb74..fa8ed18be2fb")?(sName+="/C++",sVersion="1990 by WATCOM Systems Inc.",bDetected=1):MSDOS.compareEP("eb$$2e8c06....2e8c16....2e8926....fa8cc88ed0bc....fb2ec706........b8....cd213c..72..2e830e......e8....8bd8")?(sName+="/C++",sVersion="1991 by WATCOM Systems Inc.",bDetected=1):MSDOS.compareEP("eb$$2e8c06....2e8c16....2e8926....2ea1....2e0306....fa8ed0bc....fbb8....b1..d3e874..33c054593bcc75..9cb9")?(sVersion="1992 by WATCOM Systems Inc.",bDetected=1):MSDOS.compareEP("eb$$33ed2e8e1e....26a1....a3....8d06....a3....8d06....a3....8d06....a3....8cd88d1e....8ed08be3bb....26891e")?(sName+=" 386",sVersion="1990 by WATCOM Systems Inc.",bDetected=1):MSDOS.compareEP("eb$$2e8c06....2e8c16....2e8926....2ea3....2e8916....2e891e....fa8cc88ed0bc....fbe8....8bd8e8....2ea2....fa")?(sVersion="1990 by WATCOM Systems Inc.",bDetected=1):MSDOS.compareEP("faba....8eda8916....8c06....8c0e....b8....a3....b8....a3....8ed28be0fb0633c9518becbe....268b04a3....8ec28e1e")?(sVersion="1988 by WATCOM Systems Inc.",bDetected=1):MSDOS.compareEP("eb$$2e8c06....2e8c16....2e8926....2ea3....2e8916....2e891e....2e8c1e....fa8cc88ed0bc....fbe8....8bd8fa2e8e16")?(sVersion="1992 by WATCOM Systems Inc.",bDetected=1):MSDOS.compareEP("EB....00'*** NULL assignment detected'00'")&&(sName="Open Watcom C/C++16",sVersion="2.0",bDetected=1),sLang=-1!==sName.indexOf("C++")?"C":"C++",result()}meta("compiler","WATCOM C") ================================================ FILE: dbs_min/db/MSDOS/compiler_WPFORTH.4.sg ================================================ function detect(){return MSDOS.compareEP("bd....bc....b8....0e5b81c3....8ed3ffe0")&&(sVersion="1.0",sOptions="1993 by Albert Chan",bDetected=1),result()}meta("compiler","WPFORTH") ================================================ FILE: dbs_min/db/MSDOS/compiler_djgpp.4.sg ================================================ function detect(){return MSDOS.compare("'go32stub'",512)?(sVersion="2",bDetected=1):MSDOS.isSignaturePresent(0,Math.min(8192,MSDOS.getSize()),"'StubInfoMagic!!'")&&(sVersion="1",bDetected=1),result()}meta("compiler","djgpp") ================================================ FILE: dbs_min/db/MSDOS/compiler_muLISP-87.4.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$eb$$8cc88ed88ed0bc....a3....b8....cd21891e....8c06....a0....5084c075..b8....8ec026803e......75..26c416....8cc1")?(sName+="-87",sOptions="1983-1989 by Soft Warehouse, Inc.",bDetected=1):MSDOS.compareEP("e9$$$$eb$$8cc88ed88ed0bc....a3....b8....cd21891e....8c06....b8....cd21891e....8c06....ba....b8....cd21a0....5084c0")&&(sName+="-90",sOptions="1983-1990 by Soft Warehouse, Inc.",bDetected=1),sLang="LISP",result()}meta("compiler","muLISP") ================================================ FILE: dbs_min/db/MSDOS/converter_EXE2COM.1.sg ================================================ function detect(){return MSDOS.compareEP("b3..b9....33d2be....8bfeac32c3aa494332e403d0e3..eb")?(sVersion="9.50a",bDetected=1):MSDOS.compareEP("e9$$$$92be....bf....fca5a48ccb83c3..b9....ad97011de2")?(sOptions="1996 by EM-Phaser",bDetected=1):MSDOS.compareEP("e9$$$$e9$$$$8cca81c2....3b16....76..ba....b409cd21cd20")?(sOptions="generic, type 2",bDetected=1):MSDOS.compareEP("e9$$$$bf....be....a5a48cda83c2..50b4..bb....cd21580116....81c2....8ed2")&&(sOptions="0-Relocs by dR.No //ViP",bDetected=1),result()}meta("converter","EXE2COM") ================================================ FILE: dbs_min/db/MSDOS/converter_FromBAT.1.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$be....bf....bb....c604..b9....fe04803c..77..c644....b80629cd21be....3c..74..8a04880743e2")&&(sOptions="1991 by Clockwork Software",bDetected=1),result()}meta("converter","FromBAT") ================================================ FILE: dbs_min/db/MSDOS/converter_GRABBER.1.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$fc8cdb8cc88ed8a3....8ec3891e....8b1e....b1..d3e383c3..b44acd2173..eb")?(sVersion="6.30-6.31",sOptions="1991 by G. A. Monroe",bDetected=1):MSDOS.compareEP("eb$$fc8cdbb8....8ed8a3....8ec3891e....8b1e....b1..d3e383c3..b44acd2172..b8")?(sVersion="6.32",sOptions="1991 by G. A. Monroe",bDetected=1):MSDOS.compareEP("e9$$$$fc8cdb8cc88ed88ec0891e....e8")?(sVersion="3.70-3.87",sOptions="1991 by G. A. Monroe",bDetected=1):MSDOS.compareEP("eb$$fc8cdbb8....8ed88ec3891e....a3....8b1e....b1..d3e383c3..b44acd2173..b4")&&(sVersion="3.91-3.94",sOptions="1991-92 by G. A. Monroe",bDetected=1),result()}meta("converter","GRABBER") ================================================ FILE: dbs_min/db/MSDOS/converter_com2exe.2.sg ================================================ function detect(){return MSDOS.compareEP("b8....50c3")?(sVersion="9.50",bDetected=1):MSDOS.compareEP("16179c58f6c4..74..faeb")?(sName="COM -> EXE",sOptions="1993 by R.Roth",bDetected=1):MSDOS.compareEP("fcbe....bf....b9....f3a568....c3")?(sVersion="2.1",sOptions="1997 by X-HACKS Group",bDetected=1):MSDOS.compare("02000000fffff0fffeff....0001f0ff1c00000000000000",8)?(sOptions="by Stefan Esser",bDetected=1):MSDOS.compare("040000100010f0fffeff00000001f0ff..000000",8)?(sOptions="by MasterBall Systems",bDetected=1):MSDOS.compare("02000000fffff0fffeff00000001f0ff1c0000000000924b",8)?(sOptions="by Tnarchistic KA0T",bDetected=1):MSDOS.compare("0200....fffff0fffeff00000001f0ff1c00000000000000",8)?(sOptions="by Fabrice Bellard",bDetected=1):MSDOS.compare("02000000fffff0fffeff00000001f0ff1c00000020202020",8)?(sOptions="by cINOgEN",bDetected=1):MSDOS.compare("0500aaaafffff0fffeff00000001f0ff1c00000000000000",8)?(sOptions="by COMSEC",bDetected=1):MSDOS.compare("0400aaaaffff0000feff00000001f0ff4000000053545542",8)?(sOptions="by DblStar Software",bDetected=1):MSDOS.compare("0200aaaafffff0fffeff00000001f0ff0000454c49544500",8)?(sOptions="by Elite x",bDetected=1):MSDOS.compare("02000010fffff0fffeff00000001f0ff1c00000000000000",8)?(sOptions="by HENDRX",bDetected=1):MSDOS.compare("02000000fffff0fffeff00000001f0ff1c0000004d455353",8)?(sOptions="MESS /E",bDetected=1):MSDOS.compare("0200aaaafffff0ff000000000001f0ff1c00000050484158",8)?(sOptions="by PHaX",bDetected=1):MSDOS.compare("2000aa00ffffaaaa00aa00000001f0ff0000000000000000",8)?(sOptions="SCRb2e",bDetected=1):MSDOS.compare("02008f0daaaaf0fffeff00000001f0ff1c0000000000524f",8)?(sOptions="by Rose",bDetected=1):MSDOS.compare("0200d70dfffff0fffeff00000001f0ff1c00005472696c6c",8)?(sOptions="by Trills nT",bDetected=1):MSDOS.compare("02000000fffff0ff000000000001f0ff1c00000000000000",8)?(sOptions="UNP x",bDetected=1):MSDOS.compare("04000100fffff0fffeffaaaaaa0200001c000000aa020000",8)?(sVersion="1.0",sOptions="Comvert",bDetected=1):MSDOS.compare("18000000fffff0fffeff00000001f0ff1c00000020202020",8)?(sOptions="WWPACK",bDetected=1):MSDOS.compare("0200....fffff0ff648400000001f0ff1c00000000000000",8)&&(sOptions="by unknown",bDetected=1),result()}meta("converter","com2exe") ================================================ FILE: dbs_min/db/MSDOS/cryptor_EXE-Cryptor.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$1e062e8c06....fc0e1fe8$$$$8cc9bb....83c5..5e2ead1e2e81")?(sOptions="1993-1995 by Rolle&Schild",bDetected=1):MSDOS.compareEP("e9$$$$1e062e8c06....fc0e1ffa8bec8c4e..c746......fe0e")?(sOptions="1993 by Rolle&Schild",bDetected=1):MSDOS.compareEP("e9$$$$1e062e8c06....fc0e1ffa8bec8c4e..c746......fe0e....f972..ba....0e1fbb....8b0e")?(sOptions="1992 by RKT-LANDMARK",bDetected=1):MSDOS.compareEP("e9$$$$1e062e8c06....fc0e1f8926....8306......fa8c0e....fe0e....f972..ba....0e1fbb")&&(sOptions="by RKT-LANDMARK",bDetected=1),result()}meta("cryptor","EXE-Cryptor") ================================================ FILE: dbs_min/db/MSDOS/cryptor_TUCCRYP.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$2e8c06....8cca8ec28edab4..ba....cd218cda2ea1....2bd08edabb....2e8b0e....b2..51b9....8a0732c28807fec280")?(sVersion="2+",sOptions="George Stark",bDetected=1):MSDOS.compareEP("eb$$2e8c06....8cca8ec28edab4..ba....cd218cda2ea1....2bd08edabb....2ea1....ba....f7e28bc8")&&(sName="TUC cryPack",sVersion="1.0",sOptions="George Stark",bDetected=1),result()}meta("cryptor","TUCCRYP") ================================================ FILE: dbs_min/db/MSDOS/cryptor_deep-CRyPTer.2.sg ================================================ function detect(){return MSDOS.compareEP("..E9....E8....598BE981......81......BE....8D......66....66....8D......8BD78BDF")&&(sVersion="0.1c",bDetected=1),result()}meta("cryptor","deep-CRyPTer") ================================================ FILE: dbs_min/db/MSDOS/dos_extender.0a.sg ================================================ function detect(){return MSDOS.compareEP("0e1f8cc6b4..50bb....cd2173..58cd2172..03de8bebb8....cd21065356b8....cd2f0bc075")?(sVersion="1991",bDetected=1):MSDOS.compareEP("0e1f06b4..50bb....cd2173..58cd2172..8cc003d88bebb8....cd210653b8....cd2f0bc075")&&(sVersion="1992",bDetected=1),result()}meta("extender","dos extender by Doug Huffman") ================================================ FILE: dbs_min/db/MSDOS/dos_extender1.0a.sg ================================================ function detect(){return MSDOS.compareEP("fafc0e1fe8....8cc0660fb7c066c1e0..6667a3........66b8........66c1e0..6667a3........66670905........66670905")&&(sVersion="1994 by TRAN (Thomas Pytel)",bDetected=1),result()}meta("extender","DOS protected mode extender") ================================================ FILE: dbs_min/db/MSDOS/dos_extender2.0a.sg ================================================ function detect(){return MSDOS.compareEP("bc....bb....438cc02bd8b4..cd2173..9a........0e1feb")?(sVersion="1986-90 by Ergo Computing, Inc.",bDetected=1):MSDOS.compareEP("b8....8ed0bc....bb....8cc02bd843b4..cd21b8....8ed8c606......b8....8ed88cc0a3")&&(sVersion="1986-91 by Ergo Computing, Inc.",bDetected=1),result()}meta("extender","DOS extender") ================================================ FILE: dbs_min/db/MSDOS/extender_Blinker.0a.sg ================================================ function detect(){return MSDOS.isNE()?MSDOS.compare("'BLINKER'",MSDOS.getBaseOffset(24))&&(bDetected=1,0<(nOffset=MSDOS.getNEOffset(-4608)))&&-1!=(nOffset=MSDOS.findString(nOffset,4608,"Blinker "))&&(sVersion=MSDOS.getString(nOffset+8,4)):(MSDOS.compareEP("e8$$$$558bec5053515256571e06fc8cc88ed8e8....bf....8845..8c")||MSDOS.compareEP("e8$$$$1e06fc8cc88ed8e8....bf....8845..8c1e....c41e....891d"))&&(bDetected=1),result()}meta("extender","Blinker") ================================================ FILE: dbs_min/db/MSDOS/extender_CWSDPMI.0a.sg ================================================ function detect(){return MSDOS.compareEP("8b2e....ba....8eda8c06....2bea8b3e....81c7....b1..d3ef473bef72..bf....3bef77..8bfd8bdfd3e7")?(sVersion="0.90+ (r4)",sOptions="1997 by Charles W. Sandmann",bDetected=1):MSDOS.compareEP("e8$$$$8b2e....ba....8eda8c06....2bea8b3e....81c7....b1..d3ef473bef72..bf....3bef77..8bfd8bdfd3e7")?(sVersion="0.90+ (6b)",sOptions="2001 by Charles W. Sandmann",bDetected=1):MSDOS.compareEP("ba....8eda8cd32bdac1e3..8ed203e38c06....fcb430cd213c0373..b0..ba....e9")&&(sName+=" (ELFstub)",sVersion="1.00",bDetected=1),result()}meta("extender","CWSDPMI") ================================================ FILE: dbs_min/db/MSDOS/extender_CauseWay_DOS_Extender.6.sg ================================================ function detect(){return MSDOS.compareEP("fa161f26a1....83e8..8ed0fb061607be....8bfeb9....f3a407368c......8bd88cca3603......368b......fd8bc53d....76")?(sVersion="3.1X-3.4X",bDetected=1):MSDOS.compareEP("eb$$8be88cc60e1f8cc005....0106....b8....cd213c..73..b8....cd21803e......74..8cc005....0306....268b16....3bc273..8ec0a1....33ff")&&(sVersion="2.64, 3.25",bDetected=1),result()}meta("extender","CauseWay DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/extender_DOS32.0a.sg ================================================ function detect(){return MSDOS.compareEP("0e1ffc9c5b8bc380f4..509d9c583ae775..ba....b409cd21b44ccd218c06....26a1....a3")?(sVersion="3.3",sOptions="1995 by Adam Seychell",bDetected=1):MSDOS.compareEP("0e1f068c06....26a1....a3....8ec06633ff6633c96649fc32c0f2ae26380575..83c7")?(sVersion="3.0",sOptions="by Adam Seychell",bDetected=1):MSDOS.compareEP("0e1ffc9c5b8bc380f4..509d9c5838fc75..ba....b409cd21b44ccd21")&&(sVersion="3.5c rev6",sOptions="1995 by Adam Seychell",bDetected=1),result()}meta("extender","DOS32") ================================================ FILE: dbs_min/db/MSDOS/extender_DOS4G.0a.sg ================================================ function detect(){return MSDOS.isSignaturePresent(0,Math.min(1024,MSDOS.getSize()),"'DOS/4G'")?bDetected=1:(MSDOS.isSignaturePresent(0,Math.min(1024,MSDOS.getSize()),"'DOS4GW'")||MSDOS.isSignaturePresent(MSDOS.getNEOffset()-1024,1024,"'dos4gw'"))&&(sName+="W",bDetected=1),result()}meta("extender","DOS/4G") ================================================ FILE: dbs_min/db/MSDOS/extender_DOSX16.0a.sg ================================================ function detect(){return MSDOS.compareEP("eb$$b430cd213c0372..b8....ba....2bc2268b1e....2bd8b1..d3e08bc881fb....72..1e068eda8ec333f6")?bDetected=1:MSDOS.compareEP("eb$$b430cd213c0372..b8....ba....2bc2268b1e....81eb....2bd8b1..d3e08bc881fb....72..1e068eda8ec333f6")?(sVersion="type 1",sOptions="CodeView",bDetected=1):MSDOS.compareEP("eb$$b430cd213c0372..e8$$$$56571e060e1fb8....cd213c0372..77..80fc..72..b452cd2126a1....3d")?(sVersion="type 2",sOptions="CodeView",bDetected=1):MSDOS.compareEP("eb$$8cc8fa8ed0bc....fb0e1f8c06....c406....a3....8c06....e8....b8....b1..d3e805....a3....e8")?(sVersion="type 3",sOptions="CodeView",bDetected=1):MSDOS.compareEP("eb$$b8....8ed88c06....8ed0bc....50bb....b44acd21588ec0")&&(sVersion="type 4",bDetected=1),result()}meta("extender","DOSX16") ================================================ FILE: dbs_min/db/MSDOS/extender_EMX.0a.sg ================================================ function detect(){return MSDOS.compareEP("b8....8ed88c06....e8....e8....e8....e8")?(sVersion="0.8f-0.9d",bDetected=1):MSDOS.compareEP("b8....8ed88cd88ed0bc....e8....3c..72..26a1")&&(sVersion="0.8f",bDetected=1),result()}meta("extender","EMX DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/extender_Go32Stub.0a.sg ================================================ function detect(){return MSDOS.compareEP("0e1f8c1e....8c06....fcb430cd21")?(sVersion="2.0",bDetected=1):(MSDOS.compareEP("68....1fbd....9081ed....8c06....fcb430cd21")||MSDOS.compareEP("ba....8eda8cd32bdac1e3..8ed203e3bd....81ed....8c06....fcb430cd21")||MSDOS.compareEP("fc0e1fb4..bb....b9....ba....cd21061e07bf....b9....30c0f3aa07e9"))&&(sVersion="2.02T",bDetected=1),result()}meta("extender","Go32Stub DOS-Extender") ================================================ FILE: dbs_min/db/MSDOS/extender_PMODE.0a.sg ================================================ function detect(){return MSDOS.compare("'PMODE/W v'",85)?(sVersion=MSDOS.getString(94,4),bDetected=1):MSDOS.compareEP("fc1607bf....8bf757b9....f3a5061e071f5fbe....060ea4ad8be8b2..1eb8....50cb")&&(sVersion="1.12-1.33",sOptions="1994-1997 by Daredevil and Tran.",bDetected=1),result()}meta("extender","PMODE/W") ================================================ FILE: dbs_min/db/MSDOS/extender_PRO32.0a.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$8cc82ea3....fa6633f68eeeb8....8ed8b9....66658b0466890483c6..e2..6633c0bb")&&(sVersion="1.7",sOptions="1996-99 by Dieter Pawelczak",bDetected=1),result()}meta("extender","PRO32 Protected Mode DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/extender_RSX.0a.sg ================================================ function detect(){return MSDOS.compareEP("8cc2b8....8ed88ec08ed0bc....8916....e8....b44ccd21")&&(bDetected=1),result()}meta("extender","RSX DPMI DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/extender_Stub-386.0a.sg ================================================ function detect(){return MSDOS.compareEP("0e1f8c06....b430cd213c..73..b8....eb..c606......c606......c606......c606......9a")&&(sOptions="1997 by LADsoft",bDetected=1),result()}meta("extender","Stub-386 DPMI DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/extender_TMTSTUB.0a.sg ================================================ function detect(){return MSDOS.compareEP("b462cd218bc38ccb538edb8c0e....8c0e....8c0e....2bd8bd....03ddc1e5..b44acd2173..ba....e9")&&(sVersion="0.31",sOptions="32bit WDOSX-based DOS-extender and loader by Rustam Gadeyev",bDetected=1),result()}meta("extender","TMTSTUB DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/extender_WDOSX.0a.sg ================================================ function detect(){return MSDOS.compare("'WDOSX'",52)&&(sVersion=MSDOS.getString(58,4),sOptions="1996-1999 by Michael Tippach",bDetected=1),result()}meta("extender","WDos/X") ================================================ FILE: dbs_min/db/MSDOS/extender_WDOSX32.0a.sg ================================================ function detect(){return MSDOS.compareEP("bc....fcbf....ba....e8....b8....abe8....ba....e8....b0..aabe....bf....89faac3c..75..e8....57444f53584c45")&&(bDetected=1),result()}meta("extender","WDOSX32") ================================================ FILE: dbs_min/db/MSDOS/extender_XMLOD.0a.sg ================================================ function detect(){return MSDOS.compareEP("8cd805....8ed88ed0bc....90908d06....ffd0")?(sOptions="1991 by IGC, Inc.",bDetected=1):MSDOS.compareEP("fa8cd805....8ed88ed0bc....90908d1e....c1eb..03c333f6268b5c")&&(sVersion="1992",bDetected=1),result()}meta("extender","XMLOD DOS-Extender") ================================================ FILE: dbs_min/db/MSDOS/extender_Xtender.0a.sg ================================================ function detect(){return MSDOS.compareEP("0e1fe8$$$$e8$$$$b8....9c5b80e7..539d9c5980e5..80fd..74..4080cf..539d9c5980e5..74..40668bdc66")&&(sVersion="1.04.36037",sOptions="by vyc/sophtXS",bDetected=1),result()}meta("extender","Xtender DOS Extender") ================================================ FILE: dbs_min/db/MSDOS/immunizer_CPAV.1.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$5b81eb....50515256578beb1e2ec6........268e......061fb9....bf....8bc7eb")&&(sVersion="1992-1993",bDetected=1),result()}meta("immunizer","Central Point Anti-Virus") ================================================ FILE: dbs_min/db/MSDOS/immunizer_F-XLOCK.1.sg ================================================ function detect(){return MSDOS.compareEP("505050535152561e8bdc8cd805....368947..36c747......8e1e....33db8b07433d....74..75..43833f..75..4343")&&(sVersion="1.16",bDetected=1),result()}meta("immunizer","F-XLOCK") ================================================ FILE: dbs_min/db/MSDOS/immunizer_Oyster.1.sg ================================================ function detect(){return MSDOS.compareEP("061e55565752515350e8$$$$508cc805....8ed858c3")&&(sVersion="3.01 1991-95 by BEST",bDetected=1),result()}meta("immunizer","Oyster") ================================================ FILE: dbs_min/db/MSDOS/immunizer_PGPROT.1.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$2ea3....2e8c1e....2e8c06....0e1f8cc00106....0106....26ff36....0732c033ffb9....f2ae26803d..75..47")&&(bDetected=1),result()}meta("immunizer","PGPROT Antivirus Vaccine") ================================================ FILE: dbs_min/db/MSDOS/immunizer_Palladix.1.sg ================================================ function detect(){return MSDOS.compareEP("2e8c1e....b8....cd2172..3c..72..b8....cd218cc08ed88bd3b8....cd218cc88ed8b8....ba....cc8cc88ed88ec0be....8bfe")&&(bDetected=1),result()}meta("immunizer","Palladix Virus Protector") ================================================ FILE: dbs_min/db/MSDOS/immunizer_TTW.1.sg ================================================ function detect(){return MSDOS.compareEP("ab33c08bd88bc889c28bf889c6db52..e9")&&(sOptions="1994-95 by TTW Inc.",bDetected=1),MSDOS.compareEP("d88b....c2....89c6071fcb")&&(sOptions="1994-95 by TTW Inc.",bDetected=1),result()}meta("immunizer","TTW") ================================================ FILE: dbs_min/db/MSDOS/joiner_TurboChainer.1.sg ================================================ function detect(){return MSDOS.compareEP("ba....8eda8cd32bdad1e3d1e3d1e3d1e3fa8ed203e3fbb8....8ed81efc8d06....83c0..501ebe....8cc08ed8075f8b0c32ed5146f3a4591f")&&(sVersion="1.03",bDetected=1),result()}meta("joiner","TurboChainer") ================================================ FILE: dbs_min/db/MSDOS/joiner_V-Load.1.sg ================================================ function detect(){return MSDOS.compareEP("33f62ef606......74..0e588bd881e3....75..b1..d3e02bf0d3ee065b0e582bc3b1..bb....8bd3d3eb81e2")&&(sVersion="0.9c1",bDetected=1),result()}meta("joiner","V-Load") ================================================ FILE: dbs_min/db/MSDOS/library_ParsecCollection.1.sg ================================================ function detect(){return MSDOS.compareOverlay("0D0A41205041525345432050726F64756374696F6E")&&(sOptions="EOF",bDetected=1),result()}meta("library","Parsec Collection") ================================================ FILE: dbs_min/db/MSDOS/loader_32stub.0a.sg ================================================ function detect(){return MSDOS.compareEP("8cc88ed88c1e....8c06....8c06....8c06....8bdc83c3..d1ebd1ebd1ebd1eb8cd003d82b1e....b8....cd21")&&(sOptions="by Borland",bDetected=1),result()}meta("loader","32stub for PE files") ================================================ FILE: dbs_min/db/MSDOS/mbp_SHRINK.2.sg ================================================ function detect(){return MSDOS.compareEP("061e508cc005....2e0106....2e0106....8bd02e0306....2ea3....2e8b3e....8ed80355..8955..8b3d0bff74")&&(sOptions="by mbp Software & Systems",bDetected=1),result()}meta("packer","mbp SHRINK") ================================================ FILE: dbs_min/db/MSDOS/other_AutoHack.1.sg ================================================ function detect(){return MSDOS.compareEP("0e1fb409ba....cd21fa8e06....be....8b0e....83f9..74..fdd1e1")&&(bDetected=1),result()}meta("other","AutoHack addition") ================================================ FILE: dbs_min/db/MSDOS/other_Coderunner.1.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$e8$$$$fc5e8cdaa1....bd....8edd8ec5a3....b9....bf....2bcf33c02ea3....41d1e9f3ab8916")||MSDOS.compareEP("e9$$$$e8$$$$fc5e8cda8b1e....bd....8edd8ec5b9....bf....2bcf33c02ea3....41d1e9f3ab891e")?(sOptions="1989 by Micro Systems Software, Inc.",bDetected=1):MSDOS.compareEP("e9$$$$e8$$$$fc5e8cdaa1....bd....8edd8ec5a3....b9....bf....2bcf33c02ea3....d1e9f3ab8916")&&(sOptions="1992 by OP",bDetected=1),result()}meta("other","CodeRunneR") ================================================ FILE: dbs_min/db/MSDOS/other_DemoMaker.2.sg ================================================ function detect(){return MSDOS.compareEP("be....ad8ed833f6b8....8ec0bf....b9....ac3c..75..3a0474..e2..b8....8ed8b409ba....cd21b8....cd21")&&(sVersion="1.55",sOptions="1993-94 by R.Janorkar",bDetected=1),result()}meta("other","DemoMaker") ================================================ FILE: dbs_min/db/MSDOS/overlay_overlays.6.sg ================================================ function detect(){if(MSDOS.compareOverlay("....'-lh'..2d")||MSDOS.compareOverlay("....'-lz'..2d"))switch(sName="LHA archive",MSDOS.readByte(MSDOS.getOverlayOffset()+5)){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 100:case 115:bDetected=1}else MSDOS.compareOverlay("60ea")?(sName="ARJ archive",bDetected=1):MSDOS.compareOverlay("'ZOO'............'Archive'")?(bDetected=1,sName="ZOO archive"):MSDOS.compareOverlay("4c0103")?(bDetected=1,sName="COFF executable"):MSDOS.compareOverlay("0101'Aladdin'")?(sName="Self UnStuffit data",sVersion="1.1",sOptions="by Aladdin Systems, Inc.",bDetected=1):MSDOS.compareOverlay("7f'ELF'010101")?(sName="ELF executable",bDetected=1):MSDOS.compareOverlay("................'BSA'")?(sName="BSN archive",bDetected=1):MSDOS.compareOverlay("'W4'")?(sName="W4 executable",bDetected=1):MSDOS.compareOverlay("fef2fc")?(sName="FOXPRO archive",bDetected=1):MSDOS.compareOverlay("'SXD'00")?(sName="Sydex archive",bDetected=1):MSDOS.compareOverlay("'RS'000102")?(sName="GamBit Pro Library archive",bDetected=1):MSDOS.compareOverlay("'PK'0304")&&(sName="ZIP archive",bDetected=1) return result()}meta("overlay","") ================================================ FILE: dbs_min/db/MSDOS/packer_32LiTe.2.sg ================================================ function detect(){return MSDOS.compareEP("1E060E1F0E07BE....BF....8BCFFC57F3A48CC80106....C333FF")&&(bDetected=1),result()}meta("packer","32LiTe") ================================================ FILE: dbs_min/db/MSDOS/packer_AINEXE.2.sg ================================================ function detect(){return MSDOS.compareEP("a1....2d....8ed0bc....8cd836a3....05....36a3....2ea1....8ad4b1..d2eafec9d3e08cd336")?(sVersion="2.1",bDetected=1):MSDOS.compareEP("0e07b9....be....33fffcf3a4a1....2d....8ed0bc....8cd836......05....36......2e")?(sVersion="2.3",bDetected=1):MSDOS.compareEP("a1....2d....8ed0bc....8cd836a3....05....36a3....2ea1....8ad4b1..d2ead3e08cd3368b2e....2e032e....fdfeca")&&(sVersion="2.22",bDetected=1),result()}meta("packer","AINEXE") ================================================ FILE: dbs_min/db/MSDOS/packer_AVPACK.2.sg ================================================ function detect(){return MSDOS.compareEP("501E0E1F160733F68BFEB9....FCF3A506BB....53CB")?(sVersion="1.20",bDetected=1):(MSDOS.compareEP("EB$$501E0E1F160733F68BFEB9....FCF3A506BB....53CB")||MSDOS.compareEP("e9$$$$8cda0316....8bda0316....3b16....76..ba....b409cd21cd208cd28bccfa8ed3bc....fb5251501e53b8"))&&(bDetected=1),result()}meta("packer","AVPACK") ================================================ FILE: dbs_min/db/MSDOS/packer_Amisetup.1.sg ================================================ function detect(){return MSDOS.compareEP("b8....50b8....501e8cc88ed8e8$$$$9c5b81e3....539d9c5b81e3....81fb....74..c3")&&(sOptions="by Robert Muchsel",bDetected=1),result()}meta("packer","Amisetup loader") ================================================ FILE: dbs_min/db/MSDOS/packer_COMPACK.2.sg ================================================ function detect(){return MSDOS.compareEP("BE....E8....5D83....55505351520E070E1F8BCE")?(sVersion="4.5",bDetected=1):MSDOS.compareEP("BD....50068CCB03DD8CD24B8EDBBE....BF....8EC2B9....F3A54A4D75")&&(sVersion="5.1",bDetected=1),result()}meta("packer","COMPACK") ================================================ FILE: dbs_min/db/MSDOS/packer_CRYPACK.2.sg ================================================ function detect(){return MSDOS.compareEP("EB..061E8CD805....8ED833DB0E0733FFBE....8A0726....32C48807473BFE")&&(sVersion="3.0",bDetected=1),result()}meta("packer","CRYPACK") ================================================ FILE: dbs_min/db/MSDOS/packer_Compress-EXE.2.sg ================================================ function detect(){return MSDOS.compareEP("9c508cdb53530e1f83c3..33ff8ec38bd3015d..015d..b9....be....fc32e4ac3c..77")&&(sVersion="1.0",sOptions="1990 by W.ZhongHua",bDetected=1),result()}meta("packer","Compress-EXE") ================================================ FILE: dbs_min/db/MSDOS/packer_DIET.2.sg ================================================ function detect(){return MSDOS.compareEP("BF....3BFC72..B44CCD21BE....B9....FDF3A5FC")?(sVersion="1.00/1.00d",bDetected=1):MSDOS.compareEP("FC061E0E8CC801......BA....03............................00000000")?(sVersion="1.00d",bDetected=1):MSDOS.compareEP("fc061e0e8cc80106....ba....03c28bd805....8edb8ec033f633ffb9....f3a54b484a79..8ec38ed8be....ad8be8b2..ea")?(sVersion=MSDOS.compareEP("64",55)?"1.10a/1.20":"1.00",bDetected=1):MSDOS.compareEP("BE....BF....B9....3BFC72..B44CCD21FDF3A5FC")?(sVersion="1.02b/1.10a/1.20",bDetected=1):MSDOS.compareEP("F89C061E5756525153500EFC8CC8BA....03D052")?(sVersion="1.44/1.45f",bDetected=1):MSDOS.compareEP("F99CEB$$061e5756525153500efc8cc82e0106....ba....03c28bd805....8edb8ec033f633ff")?(sVersion="1.43/1.44",bDetected=1):MSDOS.compareEP("F99CEB$$061e5756525153500efc8cc8ba....03d052ba....52ba....03c28bd805....8edb")?(sVersion="1.45f",bDetected=1):MSDOS.compareEP("061e0efc8cc80106....ba....03c28bd805....8edb8ec033f633ffb9....f3a54b484a79")?(sVersion="1.44b",bDetected=1):MSDOS.compareEP("bd....1e068ccb03dd8cd24b8edbbe....bf....8ec2b9....f3a54a4d")&&(sVersion="1.45d",bDetected=1),result()}meta("packer","DIET") ================================================ FILE: dbs_min/db/MSDOS/packer_DSHIELD.2.sg ================================================ function detect(){return MSDOS.compareEP("06E8....5E83EE..16179C58B9....25....2E")&&(bDetected=1),result()}meta("packer","DSHIELD") ================================================ FILE: dbs_min/db/MSDOS/packer_DexEXE.2.sg ================================================ function detect(){return MSDOS.compareEP("8b2e....2e8c0e....2e8c0e....83ed..8ed5bc....501eba....f91bea8ec58cc805....8ed80e06fc33f68bfe8adeb1..d3e2d2ebb8....74..b9....f3a5")&&(sVersion="2.1",sOptions="by Kaljevic Dejan",bDetected=1),result()}meta("packer","DexEXE") ================================================ FILE: dbs_min/db/MSDOS/packer_EXECUTRIX.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$0e1fa3....8c1e....8c1e....268b......89......8ccbb8....05....05....2bc3a3....8cd01e5b2bc3a3....b430cd21")&&(sOptions="by Knowledge Dynamics Corp",bDetected=1),result()}meta("packer","EXECUTRIX-COMPRESSOR") ================================================ FILE: dbs_min/db/MSDOS/packer_EXEPACK.2.sg ================================================ function detect(){if(MSDOS.compareEP("8cc005....0e1fa3....0306....8ec08b0e....8bf94f8bf7fdf3a4")){switch(MSDOS.readByte(18)<<8|MSDOS.readByte(20)){case 16:sVersion="3.65" break case 39184:sVersion="4.00" break case 5392:sVersion="4.03" break case 18:case 274:sVersion="4.06" break case 20:case 11536:case 31760:sVersion="4.00 - 4.06" break case 33808:sVersion="4.0x (possibly)"}bDetected=1}else MSDOS.compareEP("428cc005....0e1fa3....0306....8ec08b0e....8bf94f8bf7fdf3a4")||MSDOS.compareEP("..52428be88cc005....0e1fa3....0306....8ec0..0e....8bf94f8bf7fdf3a4")?(0==MSDOS.readByte(18)&&16==MSDOS.readByte(20)&&(sVersion="3.65"),bDetected=1):MSDOS.compareEP("8be88cc0......0e1fa3....0306....8ec08b0e........4f8bf7fdf3a4")?(16==MSDOS.readByte(20)?sVersion="3.69":0==MSDOS.readByte(18)&&18==MSDOS.readByte(20)&&(sVersion="5.31.009"),bDetected=1):MSDOS.compareEP("8be88cc0......0e1fa3....0306....06b8....06008b....8bf7fdf3a450b8....50cb")?(sVersion="5.31.009",bDetected=1):MSDOS.compareEP("8bc6f7d0d3e88cda2bd073..8cd82bd2d3e003f08eda8bc7")&&(sVersion="3.65",bDetected=1) return result()}meta("packer","EXEPACK") ================================================ FILE: dbs_min/db/MSDOS/packer_ExeLITE.2.sg ================================================ function detect(){return MSDOS.compareEP("fc8cc80106....ba....03c28bd805....8edb8ec033ff33f6b9....f3a5484b4a75..8ec38ed8be")?(sVersion="1.00",bDetected=1):MSDOS.compareEP("b8....bb....0e5a03c20e5053cb")&&(bDetected=1),result()}meta("packer","ExeLITE") ================================================ FILE: dbs_min/db/MSDOS/packer_LGLZ.2.sg ================================================ function detect(){return MSDOS.compareEP("fc1e060e8cc80106....ba....03c28bd805....8edb8ec033f633ffb9....f3a54b484a79..8ec38ed8be....ad95b2..ea")&&(sVersion="1.04",sOptions="by G.Lyapko",bDetected=1),result()}meta("packer","LGLZ") ================================================ FILE: dbs_min/db/MSDOS/packer_LZEXE.2.sg ================================================ function detect(){return MSDOS.compareEP("060e1f8b0e....8bf14e89f78cdb03......8ec3fdf3a453b8....50cb")?(sVersion="0.91, 1.0",bDetected=1):MSDOS.compareEP("060e1f8b0e....8bf14e89f78cdb03......8ec3b4..31edfdac01c5aae2")?(sVersion="0.90",bDetected=1):MSDOS.compareEP("50060e1f8b0e....8bf14e89f78cdb03......8ec3fdf3a453b8....50cb")||MSDOS.compareEP("50060e1f8b36....83e6..8bfe8bced1e9418cdb031e....8ec3fdf3a553b8....50cb")?(sVersion="0.91c",bDetected=1):MSDOS.compareEP("50060e1f8b0e....8bf14e8cdb89f703......8ec3fdf3a4b8....5350cb")?(sVersion="0.91",sOptions="1990",bDetected=1):MSDOS.compareEP("0e1f068b0e....8bf14e89f78cdb031e....8ec3fdf3a453b8....50cb")?(sVersion="1.0",bDetected=1):MSDOS.compareEP("0e1f8b0e....89ce504e8cdb0689f7031e....fd8ec3f3a453b8....50cb")?(sVersion="?.?",bDetected=1):MSDOS.compareEP("060e1f8b0e....8bf14e8bfe8cdb031e....8ec3fdf3a453b8....50cb")||MSDOS.compareEP("060e1f8b0e....8bf14e89f78cdb031e....fd8ec3f3a453b8....50cb")?(sVersion="1.0a",bDetected=1):MSDOS.compareEP("8cd805....2e0106....2eff2e")&&(sVersion="1.00a",sOptions="suspicious, look like a trick",bDetected=1),result()}meta("packer","LZEXE") ================================================ FILE: dbs_min/db/MSDOS/packer_MSLite.1.sg ================================================ function detect(){return MSDOS.compareEP("538cd315....8beceb$$b8....ffe0")&&(sVersion="2.3",sOptions="1998 by A.Cheng //Mercury Soft",bDetected=1),result()}meta("packer","MSLite") ================================================ FILE: dbs_min/db/MSDOS/packer_Optlink.2.sg ================================================ function detect(){return MSDOS.compareEP("87c0eb$$fc8c..83c2..5216070e1f0116....0116....33f633ffb9....f3a506b8....50cb")||MSDOS.compareEP("87c006571e56525153509cfc8cc283c2..16070e1f0116....0116....33f633ffb9....f3a506b8....50bd....cb")||MSDOS.compareEP("87c0eb$$8cda83c2..5216070e1f0116....0116....33f633ffb9....f3a506b8....50cb")||MSDOS.compareEP("87c0fc8cda83c2..16070e1f0116....0116....33f633ffb9....f3a506b8....50bd....cb")?(sVersion="1.0",bDetected=1):MSDOS.compareEP("87c0555657525153509cfc8cda83c2..16070e1f0116....0116....33f633ffb9....f3a506b8....50bd....cb")?(sOptions="prepacked",sVersion="1.0",bDetected=1):MSDOS.compareEP("bf....8edffa8ed781c4....fbb430cd21a2....8826....3c..73..8d16....b409cd2133c05006cb")?(sVersion="1.0",bDetected=1):MSDOS.compareEP("87c08cda83c2..16070e1f0116....0116....33f633ffb9....f3a506b8....50bd....cb")&&(bDetected=1),result()}meta("packer","Optlink") ================================================ FILE: dbs_min/db/MSDOS/packer_PGMPAK.2.sg ================================================ function detect(){return MSDOS.compareEP("fa1e1750b430cd213c..73..b44ccd21fcbe....bf....e8....e8....bb....ba....8ac38bf3")&&(sVersion="0.13",bDetected=1),MSDOS.compareEP("1e1750b430cd213c..73..b44ccd21fcbe....bf....e8....e8....bb....ba....8ac38bf3")&&(sVersion="0.15",bDetected=1),result()}meta("packer","PGMPAK") ================================================ FILE: dbs_min/db/MSDOS/packer_PKEXE.2.sg ================================================ function detect(){return MSDOS.compareEP("fa50535152565755061e8cc88bd88ed80106....0106....0306....33f68ec006e8")&&(sOptions="1994 by D.Usov",bDetected=1),result()}meta("packer","PKEXE") ================================================ FILE: dbs_min/db/MSDOS/packer_PKLITE.2.sg ================================================ function detect(){var e return MSDOS.compare("'PKLITE'",30)||MSDOS.compare("'PKlite'",30)?(e=MSDOS.readByte(29),sVersion=(7&e)+"."+("0"+MSDOS.readByte(28)).slice(-2),8&e&&(sOptions="Extra compression"),16&e&&(sOptions=sOptions.append("Multi-segment file")),bDetected=1):MSDOS.compareEP("1FB409BA....CD21B8....CD21")?(sVersion="1.50",sOptions="CRC check",bDetected=1):MSDOS.compareEP("50B8....BA....05....3B060200")?(sVersion="1.50",bDetected=1):MSDOS.compareEP("B8....BA....05....3B060200")?(sVersion="1.12-1.13",bDetected=1):MSDOS.compareEP("b8....ba....05....2d....fa8ed0fb2d....8ec050b9....33ff57be....fc565706518cc88ec0")?(sVersion="1.12",sOptions="extra compression",bDetected=1):MSDOS.compareEP("ba....b8....05....3B06....73..2d....fa8ed0fb2d....8ec050b9....33ff57be....fcf3a5cb")||MSDOS.compareEP("b8....05....3B06....72..cd20b9....2d....8ed02d....8ec006ba....be....33ff571e571feb")?(sVersion="1.1X",bDetected=1):MSDOS.compareEP("B8....BA....3bc473..8bc42d....25....8bf8b9....be....fcf3a58bd8b1..d3eb8cd903d95333db53cb")?(sVersion="1.12, 1.20",bDetected=1):MSDOS.compareEP("50532b06....0a06....8b1e....5b58b8....ba....8cdb03d83b1e....73..83eb..fa8ed3bc....fb")?(sVersion="1.05",bDetected=1):MSDOS.compareEP("8cd805....ba....903b06....72..b409ba....cd21cd20")?(sVersion="1.15",bDetected=1):MSDOS.compareEP("B8....BA....8cdb03d83b1e....73..83eb..fa8ed3bc....fb83eb..8ec353b9....33ff57be....fcf3a5cb")?(sVersion="1.03-1.05",bDetected=1):MSDOS.compareEP("B8....BA....8cdb03d83b1e....73..83eb..fa8ed3bc....fb83eb..908ec353b9....33ff57be....90fcf3a5cb")?(sVersion="1.03",sOptions="type 2",bDetected=1):MSDOS.compareEP("2e8c1e....8b1e....8cda81c2....3bda72..81eb....83eb..fa8ed3bc....fbfdbe....8bfe8ccab9....03d1")?(sVersion="1.00c",bDetected=1):MSDOS.compareEP("b8....ba....3b06....73..2d....8ed02d....518ec050b9....33ff57be....fcf3a5")&&(sName+=" [hacked] by Shay Lev Ary",bDetected=1),result()}meta("packer","PKLITE") ================================================ FILE: dbs_min/db/MSDOS/packer_PKTINY.2.sg ================================================ function detect(){return MSDOS.compareEP("2ec606......2ec606......2ec606......e9")&&(sVersion="1.0",sOptions="by Thomas Monkemeier",bDetected=1),result()}meta("packer","PKTINY") ================================================ FILE: dbs_min/db/MSDOS/packer_PMWLite.2.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$fc1633c033db8ec026c406....26813e........75..26813e........74..26891e....26891e....07c3")&&(sVersion="1.33",sOptions="by Daredevil & Tran",bDetected=1),result()}meta("packer","PMWLite") ================================================ FILE: dbs_min/db/MSDOS/packer_PRO-PACK.2.sg ================================================ function detect(){return MSDOS.compareEP("0e8cd38ec38cca8eda8b......8bf183....8bfed1..fdf3a553b8....508b")?(sVersion="2.13-2.14",bDetected=1):MSDOS.compareEP("8cd38ec38cca8eda8b0e....8bf183ee..8bfed1..fdf3a553b8....508b......cb")&&(sVersion="2.08",bDetected=1),result()}meta("packer","PRO-PACK") ================================================ FILE: dbs_min/db/MSDOS/packer_Pack.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$2e8c1e....2e8c06....8cc383c3..2e891e....8cc88ed8505351525657061eb462cd212e891e....b4..33db4bcd21")&&(sVersion="1.0",sOptions="1987 by K.Kokkonen",bDetected=1),result()}meta("packer","Pack") ================================================ FILE: dbs_min/db/MSDOS/packer_Packers.2.sg ================================================ function detect(){return MSDOS.compareEP("fd1e0e81de....89f63bf23ab0....03f433f003f333f781d6....0e28de1a72..00d62250..1250..81e6....07")?(sOptions="by mARQUIS dE sOIRPE //mDS/uCF",bDetected=1):MSDOS.compareEP("e800005e83c6..90b9....8cd805....2ec43c8cc303d88ec326010583c6..e2")&&(sName="relocation packer",sOptions="by The DoP",bDetected=1),result()}meta("packer","Packer") ================================================ FILE: dbs_min/db/MSDOS/packer_RERP.2.sg ================================================ function detect(){return MSDOS.compareEP("fc1e068cc383c3..0e1fbe....b9....ad3bc175..ad3bc174..03c38ec0ad8bf826011deb")&&(sVersion="0.02",bDetected=1),result()}meta("packer","RERP") ================================================ FILE: dbs_min/db/MSDOS/packer_RIXEPACK.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$fc2e8c1e....8cc88ed8a3....8cc34b8ec326031e....81eb....0306....05....3bc3")&&(sOptions="1986, 1990 by RIX SoftWorks, Inc.",bDetected=1),result()}meta("packer","RIXEPACK") ================================================ FILE: dbs_min/db/MSDOS/packer_RJcrush.2.sg ================================================ function detect(){return MSDOS.compareEP("06FC8CC8BA....03D052BA....52BA....03C28BD805....8EDB8EC033F633FFB9")&&(sVersion="1.00",bDetected=1),result()}meta("packer","RJcrush") ================================================ FILE: dbs_min/db/MSDOS/packer_Relpack.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$2e8c1e....2e8c06....8cc383c3..8cc88ed8be....fcad3d........ad3d........03c38ec0ad")&&(sVersion="1.0",sOptions="by TurboPower Software",bDetected=1),result()}meta("packer","Relpack") ================================================ FILE: dbs_min/db/MSDOS/packer_SCRNCH.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$bb....b44acd2181eb....73..ba....b9....e9$$$$0e1fb440bb....cd21b8....cd21")&&(sVersion="1.02",sOptions="by Graeme W. McRae",bDetected=1),result()}meta("packer","SCRNCH") ================================================ FILE: dbs_min/db/MSDOS/packer_SEA-AXE.2.sg ================================================ function detect(){return MSDOS.compareEP("fcbc....0e1fe8....26a1....8b1e....2bc38ec0b1..d3e38bcbbf....8bf7f3a5bf....0657cb")?bDetected=1:MSDOS.compareEP("fcbc....0e1fa3....e8....a1....8b1e....2bc38ec0b1..d3e38bcbbf....8bf7f3a5bf....0657cb")&&(sVersion="2.0",bDetected=1),result()}meta("packer","SEA-AXE") ================================================ FILE: dbs_min/db/MSDOS/packer_Scramb.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$e8$$$$5b0e1f81eb....8bc305....508bc803d12bfac3")&&(sVersion="1.20",bDetected=1),result()}meta("packer","Scramb") ================================================ FILE: dbs_min/db/MSDOS/packer_Shrinker.2.sg ================================================ function detect(){return MSDOS.compareEP("bb....ba....81c3....b8....b1..d3e803c38cd9498ec12603......2bc872..fa8ed3bc....fb")&&(sVersion="3.0",sOptions="1997 by A.S.M.",bDetected=1),result()}meta("packer","Shrinker") ================================================ FILE: dbs_min/db/MSDOS/packer_TSCRUNCH.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$061e55575652515350161f0e078bf4bf....b9....fcf3a4b430cd213c0373..be....e9")&&(sOptions="by Clarion software",bDetected=1),result()}meta("packer","TSCRUNCH") ================================================ FILE: dbs_min/db/MSDOS/packer_Tenth_Planet.2.sg ================================================ function detect(){return MSDOS.compareEP("50068cca8edabe....fcad95ad9303da8ec38b0c8bf14e8bfefdf3a4b8....0650cb")&&(sOptions="1996",bDetected=1),result()}meta("packer","Tenth Planet Soft packer") ================================================ FILE: dbs_min/db/MSDOS/packer_TinyProg.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$eb$$83ec..83e4..8bec50be....0336....8cd28cd803....33c275..fc8ec233ff")||MSDOS.compareEP("e8$$$$eb$$83ec..83e4..8bec50be....0336....8cd28cd803....33c275..fc8ec233ff")?(sVersion="3.X",bDetected=1):MSDOS.compareEP("eb$$83ec..83e4..8bec50be....0336....8cd28cd803....33c275..fc8ec233ff")?(sVersion="3.X",sOptions="modified",bDetected=1):MSDOS.compareEP("83ec..83e4..8bec50be....0336....8cd28cd803....33c275..fc8ec233ff")?(sVersion="3.X",bDetected=1):MSDOS.compareEP("e9$$$$2ec606......e9$$$$83ec..83e4..8bec50be............8cd28cd803....33c275..fc8ec233ff")&&(sVersion="3.X",sOptions="modified",bDetected=1),result()}meta("packer","TinyProg") ================================================ FILE: dbs_min/db/MSDOS/packer_Tinyprot.2.sg ================================================ function detect(){return MSDOS.compareEP("061e575650535152bd....0e1f8cc005....8ec0be....8b44..8cc103c18944..06b8....cd21891e....8c06....b8....cd21891e....8c06....07ba....b8....45cd21cd01")?bDetected=1:MSDOS.compareEP("18..00..eb$$83ec..83e4..8bec50be....0336....8cd28cd80344..33c275..fc")&&(sVersion="1.0c-e",sOptions="1996 by I.Hakszer",bDetected=1),result()}meta("packer","TinyProt") ================================================ FILE: dbs_min/db/MSDOS/packer_UCEXE.2.sg ================================================ function detect(){return MSDOS.compareEP("501e0e1ffc33f6e8....160733f633ffb9....f3a506b8....50cb")?(sVersion="2.3",sOptions="1996 by A.Cadach",bDetected=1):MSDOS.compareEP("501e0e1ffc2bf6e8....16072bf68bfeb9....f3a406b8....50cb")?(sVersion="2.4",sOptions="1996 by A.Cadach",bDetected=1):MSDOS.compareEP("501e0e1ffc160733f633ffb9....f3a506b8....50cb")&&(sVersion="3.0",sOptions="1996 by A.Cadach",bDetected=1),result()}meta("packer","UCEXE") ================================================ FILE: dbs_min/db/MSDOS/packer_UPX.2.sg ================================================ function getUPXVersion(e){var t="",e=MSDOS.findString(0,e,"$Id: UPX") return t=-1!==e?MSDOS.getString(e+9,4):t}function detect(){return(sVersion=getUPXVersion(Math.min(8192,MSDOS.getSize())))?bDetected=1:(MSDOS.compareEP("..............fcb430cd213c03")?(sVersion="3.X",bDetected=1):MSDOS.compareEP("B9....BE....89F71EA9....8CC805....8ED805....8EC0FDF3A5FC2E........73..92AFAD0E0E")?(sVersion="0.82",bDetected=1):MSDOS.compareEP("8CCBB9....BE....89F71EA9....8D......8ED805....8EC0FDF3A5FC")?(sVersion="0.20-0.60",bDetected=1):MSDOS.isSignaturePresent(0,Math.min(128,MSDOS.getSize()),"'UPX!'")?bDetected=1:MSDOS.compareEP("f99cb9....be....89f71ea9....8cc805....8ed805....8ec0fdf3a5fc2e........73..92afad0e0e")?(sVersion="?.??",bDetected=1):MSDOS.compareEP("8ccb8dbf....57b9....ba....be....89f71e1ea9....8d87....8daf....8ed88ec5fdf3a5fc")&&(sVersion="0.05",bDetected=1),bDetected&&(sUPXVersion=getUPXVersion(MSDOS.getSize()))&&(sVersion=sUPXVersion)),result()}meta("packer","UPX") ================================================ FILE: dbs_min/db/MSDOS/packer_WWPACK.2.sg ================================================ function detect(){return MSDOS.compare("'WWP'",28)?(MSDOS.compareEP("B8....8CCA03D08CC981C1....51")?MSDOS.compareEP("6A..06068CD383....536A..FC",14)?(sVersion="3.00",sOptions="Extractable"):MSDOS.compareEP("33C9B1..510606BB....538CD3",14)?(sVersion="3.02",sOptions="Extractable"):MSDOS.compareEP("BB....53",20)?sVersion="3.03":MSDOS.compareEP("B1..518CD3",20)&&(sVersion="3.05c4",sOptions="Modified"):MSDOS.compareEP("BE....BA....BF....B9....8CCD8EDD81ED....06068BDD2BDA8BD3FC")?(sVersion="3.00",sOptions="Relocations pack"):MSDOS.compareEP("BE....BF....B9....8CCD81ED....8BDD81EB....8BD3FCFA1E8EDB011533C02EAC")?(sVersion="3.02",sOptions="Relocations pack"):MSDOS.compareEP("0305....B8....8CCA03D08CC981C1....51B9....510606B1..518CD3")&&(sVersion="3.05c4",MSDOS.compareEP("1A",3)?sOptions="Extractable":MSDOS.compareEP("1B",3)&&(sOptions="Unextractable"),MSDOS.compareEP("C0",2)?sOptions=sOptions.append("Password check","Virus shield"):MSDOS.compareEP("80",2)?sOptions=sOptions.append("Password check"):MSDOS.compareEP("40",2)&&(sOptions=sOptions.append("Virus shield"))),bDetected=1):MSDOS.compareEP("BE....BF....B9....8CCD81ED....8BDD81EB....8BD3FCFA")?(sVersion="3.04/3.05",sOptions="Relocations pack",bDetected=1):MSDOS.compareEP("b8....8cca03d08cc981c1....51b9....510606b1..518cd383eb..53b1")?(sVersion="3.05beta P",bDetected=1):MSDOS.compareEP("b8....8cca03d08cc981c1....51b9....510606fc8cd5b1..51b1..8cd3")||MSDOS.compareEP("b8....8cca03d08cc981c1....51b9....510606b1..51fc8cd5b1..8cd3")?(sVersion="3.0x P",bDetected=1):MSDOS.compareEP("b8....8cca03d08cc981c1....51b9....510606bb....538cd383eb..53b1")?(sVersion="3.03 PU",bDetected=1):MSDOS.compareEP("b8....8cca03d08cc981c1....5133c9b1..510606bb....538cd383eb..53b1")?(sVersion="3.02, 3.02a P",bDetected=1):MSDOS.compareEP("b8....8cca03d0fc8cd58cc981c1....51b9....510606b1..51b1..8cd383eb..53514d")?(sVersion="3.04 PR",sOptions="Relocations pack",bDetected=1):MSDOS.compareEP("fa1e8ed8b8....cd218ed98bd3b8....cd211fe800005a83c2..87d4ffe4")?(sVersion="3.05 PU",bDetected=1):MSDOS.compareEP("b8....8cca03d08cc981c1....516a..06068cd383eb..536a..fc8cd5be....33ff")?(sVersion="3.0 P",bDetected=1):MSDOS.compareEP("be....ba....bf....b9....8ccd8edd81ed....06068bdd2bda8bd3fc8ec3")?(sVersion="3.0",sOptions="Relocations pack",bDetected=1):MSDOS.compareEP("ba....faf9............72..0633c98ec1bf....ab8bc6ab07e8....5a")?(sVersion="3.03 PU",sOptions="Relocations pack modified",bDetected=1):MSDOS.compareEP("faba....f8bb....b9....73..0633c98ec1bf....ab8bc6ab07e8....5a")?(sVersion="3.03 PU",sOptions="Relocations pack",bDetected=1):MSDOS.compareEP("b8....8cca03d08ccd81c5....55b9....510606b1..518cd383eb..53b1..51fc8cd5be....33ff")&&(sVersion="3.05c PU",bDetected=1),result()}meta("packer","WWPACK") ================================================ FILE: dbs_min/db/MSDOS/packer_XPACK.2.sg ================================================ function detect(){return MSDOS.compareEP("8becfa33c08ed0bc....2e8f06....2e8f06....eb$$0ebb....535feb$$178be5fb48d1e8eb")&&(sVersion="1.52",bDetected=1),MSDOS.compareEP("e90000e9$$$$2ec706........8beceb$$2ec606......eb009a")&&(sVersion="1.0j",bDetected=1),MSDOS.compareEP("b8....15....8beceb$$b8....ffe0")&&(sVersion="1.65, 1.66",bDetected=1),MSDOS.compareEP("b8....15....813e........e8$$$$e8$$$$eb$$1e0e1f8beceb")&&(sVersion="1.67.l",bDetected=1),MSDOS.compareEP("b8....15....eb$$b8....ffe0")&&(sVersion="1.67j",bDetected=1),MSDOS.compareEP("8beceb$$b8....ffe0")&&(sVersion="1.65b2",bDetected=1),MSDOS.compareEP("e9$$$$8beceb$$b8....ffe0")&&(sVersion="1.44",bDetected=1),result()}meta("packer","XPACK") ================================================ FILE: dbs_min/db/MSDOS/packer_ZIPSCRUB.2.sg ================================================ function detect(){return(MSDOS.compareEP("8cc88ed88cc381c3....891e....8bc30306....8ec08b0e....8bf14e8bfefdf3a450b8....50cb")||MSDOS.compareEP("8cc88ed88cc381c3....8bc30306....8ec08b0e....8bf14e8bfefdf3a450b8....50cb"))&&(bDetected=1),result()}meta("packer","ZIPSCRUB relocations compressor") ================================================ FILE: dbs_min/db/MSDOS/packer_aPACK.2.sg ================================================ function detect(){return MSDOS.compareEP("1E068CCBBA....03DAFC33F633FF4B8EDB8D......8EC0B9....F3A54A75..8EC38ED833FFBE....05....0E50")?(sVersion="0.90-0.99,XE_1.3-1.4",bDetected=1):MSDOS.compareEP("1E068CCBBA....03DA8D87....FC33F633FF484B8EC08EDBB9....F3A54A75..8EC38ED833FFBE....05....0E50")?(sVersion="0.82",bDetected=1):MSDOS.compareEP("8cc88ed805....8ec050be....33fffcb2..bd....33c950a4ffd5")?(sVersion="0.94",sOptions="-m -d",bDetected=1):MSDOS.compareEP("8cc880c4..8ec0fcb9....be....8bfe57f3a55fbe....06ba....521e078ed8cb")?(sVersion="0.82-0.94",sOptions="converted to exe",bDetected=1):MSDOS.compareEP("1e060e1f0e07be....bf....8bcffc57f3a4c3")?(sVersion="0.98, 0.99",sOptions="-t",bDetected=1):MSDOS.compareEP("1e068cc88ed805....8ec050be....33fffcb6..bd....ffd5")?(sVersion="0.69-0.74",sOptions="-t",bDetected=1):MSDOS.compareEP("be....bf....8bcffc57f3a4c3")?(sVersion="0.98-0.99 small",bDetected=1):MSDOS.compareEP("1e068cc88ed805....8ec050be....33fffcb6..bd....8bde83e6..c1eb..8cd803c38ed8")?(sVersion="0.73-0.74 big",bDetected=1):MSDOS.compareEP("0e1f0e07be....bf....8bcffc57f3a4c3")?(sVersion="0.98",bDetected=1):MSDOS.compareEP("1e068cc88ed805....8ec050be....33fffcb2..bd....33c950a4")?(sVersion="0.96",sOptions="-m",bDetected=1):MSDOS.compareEP("1e06ba....8ccb03dafc33f633ff4b8edb8d87....8ec0b9....f3a54a75..8ec38ed833ffbe....05....0e506a..cb")?(sVersion="0.90-0.99",bDetected=1):MSDOS.compareEP("8cc88ed805....8ec050be....33fffcb6..bd....ffd5")?(sVersion="0.73-0.82",sOptions="-d",bDetected=1):MSDOS.compareEP("1e068cc88ed805....8ec0be....33fffcb6..bd....ffd5")?(sVersion="0.58",sOptions="type 2",bDetected=1):MSDOS.compareEP("1e068cc88ed805....8ec050be....33fffc8cc82e0106....b2..bd....33c9")&&(sVersion="0.98, 0.99",sOptions="-m -h",bDetected=1),result()}meta("packer","aPACK") ================================================ FILE: dbs_min/db/MSDOS/patcher_Patchers.1.sg ================================================ function detect(){return MSDOS.compareEP("b409ba....cd21ba....cd21b8....ba....cd2173..b409ba....cd21ba....cd21cd20a3....b409ba....cd21")?(sName="CrAcKeR",sVersion="0.2a",sOptions="by Deu$",bDetected=1):MSDOS.compareEP("b409ba....eb$$cd21b409ba....eb$$cd21b409ba....eb$$cd21b409ba....eb")&&(sOptions="by Mr. KIM",bDetected=1),result()}meta("patcher","Patcher") ================================================ FILE: dbs_min/db/MSDOS/protector_$pirit.2.sg ================================================ function detect(){return MSDOS.compareEP("E8....F9E8....B4..CD212D....13F2E8....2A01F5E9")||MSDOS.compareEP("ACB4..CD2106B4..CD21079FE8....FC90")||MSDOS.compareEP("123fe8$$$$e4..900c..36e6..ba....f9525289d126b8....36b5..3ecd16fd5a")?(sVersion="1.5",bDetected=1):MSDOS.compareEP("ac03d9e8$$$$e4..fb0c..fbe6..90ba....5252fd89d1b8....30ed2ecd16905a87d190b8....fb86cdf530ed3ecd16f95ac3")?(sOptions="$UPD 2.1 1996 by Night $pirit",bDetected=1):MSDOS.compareEP("1c..3a1fe8....f5e8....fde8....04..9035....f8f6dff9d0d5fdfbfcc3")||MSDOS.compareEP("e8$$$$e4210c1ae6212eb9....2e51f85189c9f8b8....b5..2ecd163659fdfd87c986cd3eb5..2eb8....f9cd1659c3")?bDetected=1:(MSDOS.compareEP("e8$$$$ba....f8ec0c..36eef5b8....50f950269089c128edf9b8....cd165887c1b8....f886e93e30ed36cd1658fdc3")||MSDOS.compareEP("e8$$$$ba....fbec0c..eeb9....51512efd89c9fdb8....b5..3ecd165987c9b8....86e9b5..f8cd1659f9c3")||MSDOS.compareEP("e8$$$$e4212e0c..e6212eb9....5151fd89c93eb5..fcb8....fbcd162e5987c926b8....fd")||MSDOS.compareEP("e8$$$$26e421f80c..e621f98d1e....53365389d93e30edb8....cd165b")||MSDOS.compareEP("91221db4..cd21d2d1e9$$$$b4..cd21a6e8")||MSDOS.compareEP("b4..cd21b4..cd21e8$$$$ba....ec900c..26ee8d0e....51fd51")||MSDOS.compareEP("95e8$$$$fbba....3eecfc0c..3eeefb8d0e....51512687c9b8....28ed26cd162e59fdfb87c9b8....fd88e9f8b5..cd1626592ec3"))&&(sVersion="1.5",bDetected=1),result()}meta("protector","$pirit") ================================================ FILE: dbs_min/db/MSDOS/protector_ABKprot.2.sg ================================================ function detect(){return MSDOS.compareEP("B430CD2186E03D....73..9C8CC0065B595153BA....87F256CF0E1F0E07")&&(sVersion="1.0",bDetected=1),result()}meta("protector","ABKprot") ================================================ FILE: dbs_min/db/MSDOS/protector_AEP.2.sg ================================================ function detect(){return MSDOS.compareEP("E8$$$$E4212EA3....33C08BD85DB9....50B8....E6210FA9E6..538BDFE42123D84B0FA14B66")&&(sVersion="1.00",bDetected=1),result()}meta("protector","AEP") ================================================ FILE: dbs_min/db/MSDOS/protector_ALEC.2.sg ================================================ function detect(){return MSDOS.compareEP("c1ed..1346..2e391cb9....f981c1....bb....81c3....2ec007..431346..4975..8e0000d518de3701e2c8......330ce8")||MSDOS.compareEP("b9....81c1....bb....81c3....71..908a24402e802f..4372..90")?(sVersion="1.3",sOptions="1996 by rANDOM //UCF",bDetected=1):MSDOS.compareEP("b9....81c1....84221a24bf....81c7....2e3856..408422")&&(sVersion="1.6",sOptions="1996 by rANDOM //UCF",bDetected=1),result()}meta("protector","ALEC") ================================================ FILE: dbs_min/db/MSDOS/protector_ANTI-TRACE.2.sg ================================================ function detect(){return MSDOS.compareEP("2ec606......eb$$e9$$$$8cd805....50b8....5033c0cb")&&(sVersion="1.0",sOptions="by Oren Maurice",bDetected=1),result()}meta("protector","ANTI-TRACE") ================================================ FILE: dbs_min/db/MSDOS/protector_AVAST_CRC-Check.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$8cc82e0306....502eff36....CB")&&(sVersion="7.70",sOptions="1999",bDetected=1),result()}meta("protector","AVAST CRC-CHECK") ================================================ FILE: dbs_min/db/MSDOS/protector_Aluwain.2.sg ================================================ function detect(){return MSDOS.compareEP("8BEC1EE8....9D5E")&&(sVersion="8.09",bDetected=1),result()}meta("protector","Aluwain") ================================================ FILE: dbs_min/db/MSDOS/protector_Anti-LAME.2.sg ================================================ function detect(){return MSDOS.compareEP("060e07bb....31c09090b9....268a0730e0268807fec443e2..078cc005....05....50b8....50b8....50c3")&&(sOptions="by [ptPower",bDetected=1),result()}meta("protector","Anti-LAME") ================================================ FILE: dbs_min/db/MSDOS/protector_Antilame.2.sg ================================================ function detect(){return MSDOS.compareEP("fd2ad01e03fa33fe81d7....2efe06....12d30e0e0780f6..1f85fe33ff1216....b2..81d2....84e2ba....d1c232f7")&&(sVersion="1.0b",sOptions="by Phantomlord",bDetected=1),result()}meta("protector","Antilame") ================================================ FILE: dbs_min/db/MSDOS/protector_Bitlok.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$b430cd213c..72..2e8c1e....8cdb83c3..2e011e....0e1feb$$33c0eb$$bf....eb$$b9....eb$$51eb$$2bcf")?(sVersion="3.1",sOptions="by Yellow Rose Software Workgroup",bDetected=1):MSDOS.compareEP("fa8ccc8ed4bc....9c51525657550e1f2e8c06....2ec606......0e07be....b9....b0..e3")?(sName="BITLOK-7NT",sVersion="11/13/93-04/22/95",sOptions="by Mr. Lei (Yellow Rose Co.)",bDetected=1):MSDOS.compareEP("fa8ccc8ed4bc....9c51525657550e1f2e8c06....0e07be....b9....b0..e3")&&(sName="BITLOK-7NT",sVersion="05/21/93",sOptions="by Mr. Lei (Yellow Rose Co.)",bDetected=1),result()}meta("protector","BITLOK") ================================================ FILE: dbs_min/db/MSDOS/protector_Bunny.2.sg ================================================ function detect(){return MSDOS.compareEP("fae9$$$$8cc02ea3....8cd82ea3....8cd02ea3....8bc42ea3....8cc88ed88ec08ed0bc....e8")&&(sVersion="4.1",sOptions="1993 by M.Bunjes",bDetected=1),result()}meta("protector","Bunny") ================================================ FILE: dbs_min/db/MSDOS/protector_CC.2.sg ================================================ function detect(){return MSDOS.compareEP("b8....ba....3be073..b409ba....cd21b8....cd218bdc81eb....83e3..fcbe....8bfbb9....f3a48bc3b1..d3e88cc903c15033c050cb")?(sVersion="1.0",sOptions="1991 by B.Vorontsov",bDetected=1):MSDOS.compareEP("ba....b430cd213c..73..33c00650cbb9....b8....eb$$05....fc80c4..eb")&&(sVersion="2.61 Beta",sOptions="by UniHackers",bDetected=1),result()}meta("protector","CC") ================================================ FILE: dbs_min/db/MSDOS/protector_CEPexe.2.sg ================================================ function detect(){return MSDOS.compareEP("8cdd0e070e1fbf....be....b9....fcf3a41f5f8f..8f....8f....8c....8f....8f....595f5e8cc88ec08ed8ea")&&(bDetected=1),result()}meta("protector","CEPexe") ================================================ FILE: dbs_min/db/MSDOS/protector_CERBERUS.2.sg ================================================ function detect(){return MSDOS.compareEP("9C2BED8C....8C....FAE4..88....1607BF....8EDD9BF5B9....FCF3A5")&&(sVersion="2.0",bDetected=1),result()}meta("protector","CERBERUS") ================================================ FILE: dbs_min/db/MSDOS/protector_COMCRYPT.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$b9....be....89f70e1f0e07bb....fcad31d8abe2")?bDetected=1:MSDOS.compareEP("e9$$$$eb$$5053575152061e572e8b36....81c6....8a5c..2e881e....8a5c")&&(sVersion="1.0b",bDetected=1),result()}meta("protector","COMCRYPT") ================================================ FILE: dbs_min/db/MSDOS/protector_COMPROTECT.2.sg ================================================ function detect(){return MSDOS.compareEP("b8....15....72..8ac4bb....50515253555657061e50b8....58eb")&&(sVersion="2.10",sOptions="1988-95 by Ralph Roth (converted to exe)",bDetected=1),result()}meta("protector","COMPROTECT") ================================================ FILE: dbs_min/db/MSDOS/protector_CONVOY.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$2e8c06....2ea3....b8....cd2f3c..75..b8....ba....0e1fcd21b8....cd21")?(sOptions="1993 by ELIAS Copy-Protection System",bDetected=1):MSDOS.compareEP("e9$$$$2e8c06....2ea3....e8$$$$5056571e062e8b3e....2e8106........2e893e....0e0733c08ed833f6b9")&&(sVersion="3.2",sOptions="1993 by ELIAS Copy-Protection System",bDetected=1),result()}meta("protector","CONVOY++") ================================================ FILE: dbs_min/db/MSDOS/protector_CRYPTEXE.2.sg ================================================ function detect(){return MSDOS.compareEP("EB..8BDCEB..EA........01EA83FC..74..EB")||MSDOS.compareEP("eb$$8bdceb$$bc....eb$$83fc..74..eb$$cd20eb$$8be3")?(sVersion="1.04",bDetected=1):MSDOS.compareEP("2e8c1e....eb$$fa50b8....58eb$$eb$$8bdceb$$bc....eb$$83fc..eb$$74..fa")&&(sVersion="1.01b",sOptions="1996 by DoP",bDetected=1),result()}meta("protector","CRYPTEXE") ================================================ FILE: dbs_min/db/MSDOS/protector_China Locker.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$fc2e891e....2e890e....2e8916....2e8936....2e893e....2e8c16....2e8926....2e8c1e....90909090")&&(sVersion="1995.02.02",sOptions="by China Locker Software",bDetected=1),result()}meta("protector","China Locker") ================================================ FILE: dbs_min/db/MSDOS/protector_Ciphator.2.sg ================================================ function detect(){return MSDOS.compareEP("9393E8$$$$586A..0E68....CF")&&(sVersion="4.6",bDetected=1),result()}meta("protector","Ciphator") ================================================ FILE: dbs_min/db/MSDOS/protector_Codesafe.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$5033c08ec02ef606......74..26ff36....061e07e8....07268f06....fb2e8c1e....26ff36....268f06")&&(sOptions="by EliaShim Ltd",bDetected=1),result()}meta("protector","Codesafe") ================================================ FILE: dbs_min/db/MSDOS/protector_ComProtector.2.sg ================================================ function detect(){return MSDOS.compareEP("E9....E8....5E8BEE81......8D......B9....F61446E2..4B")?(sVersion="1.0b",bDetected=1):MSDOS.compareEP("E9....B9....BB....BF....2E....34..FEC8C0....2E....2E....2E....4743E2")&&(sVersion="1.0",bDetected=1),result()}meta("protector","ComProtector") ================================================ FILE: dbs_min/db/MSDOS/protector_ComprEXE.2.sg ================================================ function detect(){return MSDOS.compareEP("fc1e068cdd83c5..89e8ba....8b1e....29d3538ed88ec331f631ffb9....f3a540434a75..b8....50cb")&&(sVersion="1.0",sOptions="by Tom Torfs",bDetected=1),result()}meta("protector","ComprEXE") ================================================ FILE: dbs_min/db/MSDOS/protector_Copy_Protector.2.sg ================================================ function detect(){return(MSDOS.compareEP("2EA2....5351521E06B4..1E0E1FBA....CD211F")||MSDOS.compareEP("E9....505351521E0657E8....5F83EF..B4..1E0E1F"))&&(sVersion="2.0",bDetected=1),result()}meta("protector","Copy Protector") ================================================ FILE: dbs_min/db/MSDOS/protector_Copylock_PC.2.sg ================================================ function detect(){return(MSDOS.compareEP("0e1fb9....bf....8135....83c7..e2")||MSDOS.compareEP("0e1f8c1e....8c06....1e07bf....33f6")||MSDOS.compareEP("0e1fb9....bf........83c7..e2")||MSDOS.compareEP("0e1fb9....bf............83c7..e2")||MSDOS.compareEP("0e1f8cc0a3....90909090909090909090a1"))&&(sOptions="1990 by Rob Northen Computing",bDetected=1),result()}meta("protector","Copylock PC") ================================================ FILE: dbs_min/db/MSDOS/protector_CrAcKeR.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$be....8bfe5633c0be....ac02e081fe....72..5eac34..aa81fe....72")&&(sVersion="0.2a",sOptions="by Deu$",bDetected=1),result()}meta("protector","CrAcKeR") ================================================ FILE: dbs_min/db/MSDOS/protector_CrackStop.2.sg ================================================ function detect(){return MSDOS.compareEP("B4..BB....B9....8BECCD21FAFC03....05....FFE0")?(sVersion="1.X",bDetected=1):MSDOS.compareEP("bd....be....ffe6")&&(sVersion="1.0b",bDetected=1),result()}meta("protector","CrackStop") ================================================ FILE: dbs_min/db/MSDOS/protector_Cruncher.2.sg ================================================ function detect(){return MSDOS.compareEP("2E........2E......B430CD213C0373..BB....8EDB8D......B409CD210633C050CB")&&(sVersion="1.0",bDetected=1),result()}meta("protector","Cruncher") ================================================ FILE: dbs_min/db/MSDOS/protector_CryExe.2.sg ================================================ function detect(){return MSDOS.compareEP("E9$$$$E9$$$$E9$$$$BB....E8$$$$31EDEB$$8EDDEB$$872FE8$$$$E8$$$$55E9$$$$E9$$$$31C0EB$$EB$$E8")&&(sVersion="4.0",bDetected=1),result()}meta("protector","CryExe") ================================================ FILE: dbs_min/db/MSDOS/protector_CryptCom.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$be....56b9....c704....c644....8134....4646e2..31f631c9c3")&&(sVersion="2.0",sOptions="by Nowhere Man",bDetected=1),result()}meta("protector","CryptCom") ================================================ FILE: dbs_min/db/MSDOS/protector_CrypteXeC.2.sg ================================================ function detect(){return(MSDOS.compareEP("FD25....E8....3EBA....EC0C..26EE..B9....5151..87C9")||MSDOS.compareEP("06b4..cd2107e8....acac3ee8....d7e9"))&&(sVersion="1.01",bDetected=1),result()}meta("protector","CrypteXeC") ================================================ FILE: dbs_min/db/MSDOS/protector_Crypto-box.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$9c50520e538bec2e892e....1e06b8....8bf80e07b8....8ed82e8b1e....8b078bf0")&&(bDetected=1),result()}meta("protector","Crypto-box") ================================================ FILE: dbs_min/db/MSDOS/protector_DCREXE.2.sg ================================================ function detect(){return(MSDOS.compareEP("e8$$$$52e8$$$$5a83c2..ffe2")||MSDOS.compareEP("e8$$$$53e8$$$$5b83c3..ffe3"))&&(sVersion="2.0",sOptions="by LuCe",bDetected=1),result()}meta("protector","DCREXE") ================================================ FILE: dbs_min/db/MSDOS/protector_DMC.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$2e8c16....2e8926....2ea3....8cc88ed0bc....2ea1....505351525657551e060e1f8c06....a1")&&(sVersion="3.5",sOptions="by Adlersparre & Associates",bDetected=1),result()}meta("protector","DMC") ================================================ FILE: dbs_min/db/MSDOS/protector_Deeper.2.sg ================================================ function detect(){return MSDOS.compareEP("90e9$$$$e8000059fa8bdc36c747......36837f....75..fb66fafb8be981ed....81e9....be....8dbe....668b05668904")&&(sVersion="1.0c",bDetected=1),MSDOS.compareEP("90e9$$$$e80000fa8bdc36c747......36837f....75..fb598be981ed....81e9....be....8dbe....668b05668904")&&(sVersion="1.0a",bDetected=1),result()}meta("protector","Deeper") ================================================ FILE: dbs_min/db/MSDOS/protector_E-PROT.2.sg ================================================ function detect(){return MSDOS.compareEP("81f8....be....90bd....2e8076....454e75")&&(sVersion="1.0.3",sOptions="2000 by MasterBall Systems, Inc.",bDetected=1),result()}meta("protector","E-PROT 386+") ================================================ FILE: dbs_min/db/MSDOS/protector_EEXE.2.sg ================================================ function detect(){return MSDOS.compareEP("B430CD213C0373..BA1F000E1FB409CD21B8FF4CCD21")?(sVersion="1.12",sOptions="1994 by F.P.Budzyn",bDetected=1):MSDOS.compareEP("b430cd213c..73..0e1fb409ba....cd21b8....cd21")?(sOptions="1994 by F.P.Budzyn",bDetected=1):MSDOS.compareEP("33c08ed806be....bf....b9....fcf3a5b4..cd21")&&(sVersion="1.11",sOptions="1994 by F.P.Budzyn",bDetected=1),result()}meta("protector","EEXE") ================================================ FILE: dbs_min/db/MSDOS/protector_EPW.2.sg ================================================ function detect(){return MSDOS.compareEP("06571e5655525153502e8c......8cc005....2ea3....8ed8a1")?(sVersion="1.2",bDetected=1):MSDOS.compareEP("06571E5655525153502E8C0608008CC083")?(sVersion="1.30",bDetected=1):MSDOS.compareEP("e9$$$$06571e565552515350bb....81c3....2e8b078ccb03c305....50b8....50cb")&&(sVersion="1.20",bDetected=1),result()}meta("protector","EPW") ================================================ FILE: dbs_min/db/MSDOS/protector_ETS.1.sg ================================================ function detect(){return MSDOS.compareEP("60061eeb$$bf....8cc82e8985....2e8b8d....8ec02e8bbd....e8")&&(sVersion="1.0",sOptions="by Da BLoB / MAFiA",bDetected=1),result()}meta("protector","ETS (ENCRYPT THE SHiT)") ================================================ FILE: dbs_min/db/MSDOS/protector_EXE-Crypt.2.sg ================================================ function detect(){return MSDOS.compareEP("90eb$$2e8c......2e89......8cc88ed0bc....1e060e1f8cc005....8ec01ee8....1f8cc3be....2e8b......83....74")&&(sVersion="1.00",bDetected=1),result()}meta("protector","EXE-Crypt") ================================================ FILE: dbs_min/db/MSDOS/protector_EXE-Protect.2.sg ================================================ function detect(){return MSDOS.compareEP("e800005d81ed....1e06..1fb4..8db6....b9....8a1446cd21909090")&&(sOptions="by Phrozen Crew",bDetected=1),result()}meta("protector","EXE-Protect") ================================================ FILE: dbs_min/db/MSDOS/protector_EXEGUARD.2.sg ================================================ function detect(){return MSDOS.compareEP("BA....BF....EB$$E8$$$$53BB....EB$$EB$$5B0E075051535653BB....EB")&&(sVersion="1.3",bDetected=1),result()}meta("protector","EXEGUARD") ================================================ FILE: dbs_min/db/MSDOS/protector_EXEHigh.2.sg ================================================ function detect(){return MSDOS.compareEP("8cca8b2e....8eda8c06....8cda2bea8b3e....81ff....73..bf....893e....81c7....033e....b1..d3ef47d3e7fa")&&(sVersion="1.01",sOptions="by NoddegamrA",bDetected=1),result()}meta("protector","EXEHigh") ================================================ FILE: dbs_min/db/MSDOS/protector_EXETools.2.sg ================================================ function detect(){return(MSDOS.compareEP("e800005d83ed..1e8cda83c2..8eda8ec2bb....ba....85d274..b4..33ff33f6b9....ac32c4c0c4")||MSDOS.compareEP("68....68....68....be....bf....57b9....f3a4c3"))&&(sVersion="2.1 /E",bDetected=1),result()}meta("protector","EXETools") ================================================ FILE: dbs_min/db/MSDOS/protector_Encriptor.2.sg ================================================ function detect(){return MSDOS.compareEP("EB..B9....BE....BF....ACD0C8AAE2..BE....BF....ACAA")&&(sVersion="1.00c",bDetected=1),result()}meta("protector","Encriptor") ================================================ FILE: dbs_min/db/MSDOS/protector_Enkryptonator.2.sg ================================================ function detect(){return MSDOS.compareEP("1e1eb430cd21b4..3c..73..cd21be....e8....e8....e8....1f07e9")&&(bDetected=1),result()}meta("protector","Enkryptonator") ================================================ FILE: dbs_min/db/MSDOS/protector_ExeCode.2.sg ================================================ function detect(){return MSDOS.compareEP("E9$$$$FA8CC302DF5033C02E8C16....2E8926....8ED0BC....BE....B9....33FF2EC706........32DBB0..E664AC")?(sVersion="1.0",sOptions="1995 by Balazs Scheidler",bDetected=1):MSDOS.compareEP("E9$$$$8be8ba....b409cd212ea1....8cc303c3b1..2e8b1e....f7c3....74..83c3..d3eb2e891e....be....bf....b9....f3a5")&&(sVersion="1.0 unregistered",sOptions="1995 by Balazs Scheidler",bDetected=1),result()}meta("protector","ExeCode") ================================================ FILE: dbs_min/db/MSDOS/protector_ExeLock.2.sg ================================================ function detect(){return MSDOS.compareEP("068CC88EC0BE....26....34..26....4681......75..40B3..B3..F3")?(sVersion="1.0",bDetected=1):MSDOS.compareEP("ba....bf....eb$$e8$$$$53bb....eb$$eb$$5beb$$0633c08ec0b8....26a3....268c0e....075052faba....b0..ee")&&(sVersion="1.0X",sOptions="by ST!LLS0N",bDetected=1),result()}meta("protector","EXELock666") ================================================ FILE: dbs_min/db/MSDOS/protector_FACRYPT.2.sg ================================================ function detect(){return MSDOS.compareEP("B9....B3..33D2BE....8BFEAC32C3AA494332E403D0E3")&&(sVersion="1.0",bDetected=1),result()}meta("protector","FACRYPT") ================================================ FILE: dbs_min/db/MSDOS/protector_FSE.2.sg ================================================ function detect(){return MSDOS.compareEP("607d..7a..d1ce89f68bf601fb8bf731f781c7....f8f8")?(sVersion="0.6",bDetected=1):MSDOS.compareEP("60d1cef533de33c8c7c6....d1cee9$$$$fbf98bd029c131db")||MSDOS.compareEP("607d..7a..d1ce89f68bf601fb8bf731f781c7....f8e8")?(sVersion="0.6+",bDetected=1):MSDOS.compareEP("60b3..b7..7e..f5d1c2fb81e9....c7c0....bd....81c5....d1ce33c4fd79..e9")?(sVersion="0.5",bDetected=1):MSDOS.compareEP("eb$$6025....eb$$eb$$8cc0fa66c1cc..eb$$44bc....eb$$2ea3....66c1cc..e9")?(sVersion="0.4+",bDetected=1):MSDOS.compareEP("60fff08fc603f6b1..b5..fff18fc2f8e9")?(sVersion="0.55",bDetected=1):MSDOS.compareEP("60cefd33db81c3....81f3....81c3....fd45eb")?(sVersion="0.5c",bDetected=1):MSDOS.compareEP("607c..79..81ef....cc7f..8bc82bc103d431db81c3....fb81ea....e9")?(sVersion="0.5c02",bDetected=1):MSDOS.compareEP("6033f131c731f78bd9be....d1cf31c1c7c3....d1c3fd8bf8fb33c7bf....d1c7")?(sVersion="0.5c04",bDetected=1):MSDOS.compareEP("60be....c7c5....c7c3....c7c2....81f2....2e319a....33d62e8bba....31ef")?(sVersion="0.5s",bDetected=1):MSDOS.compareEP("6031fbce29f6c7c7....d1c333dfe8....76..c8......e8")?(sVersion="0.6",bDetected=1):MSDOS.compareEP("60fdd1c3f533ebc7c3....87d389d79705....7c..e9")||MSDOS.compareEP("6072..fbe9$$$$03cee9$$$$b9....d1c981f1....8bd9d1cf")?(sVersion="0.61+",bDetected=1):MSDOS.compareEP("6089f731fffbb8....03e9c7c1....47f9fceb")||MSDOS.compareEP("60be....c7c3....2e3198....81c3....81c6....8bfe01df75..e9")?(sVersion="0.62",bDetected=1):MSDOS.compareEP("60fff08fc2f9bf....fb31da8bf42bdef5f971..03f0c7c3....87dd")||MSDOS.compareEP("60c7c6....b8....bf....bb....2e81b1........81f6....81c3....81c7....05....75..543e51")?(sVersion="0.63",bDetected=1):(MSDOS.compareEP("60fc81f3....f5be....fde9$$$$2be84a8bd129d9")||MSDOS.compareEP("6033d9c7c1....7c..c7c6....75..76..bd....2bcd31c2")||MSDOS.compareEP("60c7c5....c7c6....bf....31f62e31ab")||MSDOS.compareEP("60c7c7....c7c3....c7c5....2e31ab....2e31bb....81c5"))&&(sVersion="0.5",bDetected=1),result()}meta("protector","FSE by ZeNiX Yang //pCE'98") ================================================ FILE: dbs_min/db/MSDOS/protector_GA-Header.2.sg ================================================ function detect(){return MSDOS.compareEP("8cd02ea3....2e8926....8cc88ed0bc....061e0e1fbe....b8....8ec0bf....b9")&&(sVersion="1.00",bDetected=1),result()}meta("protector","GA-Header") ================================================ FILE: dbs_min/db/MSDOS/protector_GOAT.1.sg ================================================ function detect(){return sOptions="1996 by Martin Overton //ChekWARE",(MSDOS.compareEP("5051568bc033c0904149813c....75..83f9..75..0bc033c058595eb8")||MSDOS.compareEP("515056528bc233d2f7e04149813c....75..3d....73..0bc933d259585e5ab8")||MSDOS.compareEP("1650525351564a33db74..434b813c....74..81f9....75..0bd2b8....8ed85e585a5b5917b8"))&&(bDetected=1),result()}meta("protector","GOAT") ================================================ FILE: dbs_min/db/MSDOS/protector_HACKSTOP.2.sg ================================================ function detect(){return MSDOS.compareEP("FABD....FFE56A49480C..E4..3F983F")?(sVersion="1.00",bDetected=1):MSDOS.compareEP("B430CD2186E03D....73..B42FCD21B0..B44CCD2150B8....58EB")?(sVersion="1.10/1.11",bDetected=1):MSDOS.compareEP("B430CD2186E03D000373..B42FCD21B42ACD21B42CCD21B0FFB44CCD2150B8....58EB")?(sVersion="1.10p1",bDetected=1):MSDOS.compareEP("B430CD2186E03D....73..B4..CD21B0..B44CCD2153BB....5BEB")?(sVersion="1.11c",bDetected=1):MSDOS.compareEP("B430CD2186E03D....73..B0..B4..CD2150B8....58EB$$EB$$b8....CD2150B2..B8....CD21")?(sVersion="1.00",bDetected=1):MSDOS.compareEP("521eb430cd2186e03d....73..cd200e1fb4..e8")?(sVersion="1.11f-1.12s",bDetected=1):MSDOS.compareEP("FABD....D4854E32EBEB")?(sVersion="1.13",bDetected=1):MSDOS.compareEP("fabd....ffe5")?(sVersion="1.13cs",sOptions="converted to exe",bDetected=1):MSDOS.compareEP("52B8....1ECD2186E03D....73..CD200E1FB409E8....24..EA")?(sVersion="1.13",bDetected=1):MSDOS.compareEP("FABE....050C00071D4A461E16FDAC44........F16D84D33D....CFAFFB34DB33..........D0D6....92B4249E")?(sVersion="1.17",bDetected=1):MSDOS.compareEP("52BA....5AEB..9A........30CD21......FD02....CD200E1F52BA....5AEB")?(sVersion="1.18",bDetected=1):MSDOS.compareEP("52BA....5AEB..9A........30CD21......D602....CD200E1F52BA....5AEB")?(sVersion="1.19s",bDetected=1):MSDOS.compareEP("52B430CD2152FA..FB3D....EB..CD200E1FB409E8")?(sVersion="1.11f",sOptions="modified",bDetected=1):MSDOS.compareEP("53bb....5beb$$eb$$9c1e52b430cd2186c43d....73..cd200e1f53bb....5beb")?(sVersion="1.20",bDetected=1):MSDOS.compareEP("1e52B8....cd2186c43d....73..cd2052ba....5aeb")?(sVersion="1.18s",bDetected=1):MSDOS.compareEP("5d1eb430cd2186e03d....73..cd200e1fb409e8")?(sVersion="1.11gs",bDetected=1):MSDOS.compareEP("e8$$$$3adb74..b8014ccd21eb..b430cd21fa8bec8b46..05....ffe0")?(sVersion="1.17 regged",bDetected=1):MSDOS.compareEP("521ee9$$$$0e1fb409e8$$$$5acd211f5a53bb....5beb$$eb$$e8$$$$e8$$$$52ba....5aeb")?(sVersion="1.11f",bDetected=1):MSDOS.compareEP("b8....521ecd2186e03d....73..cd200e1fb4..e8$$$$5acd211f5a53bb....5beb")?(sVersion="1.12cs",bDetected=1):MSDOS.compareEP("50b8....58eb$$eb$$9c1e52b430cd2186c43d....73..cd200e1f50")?(sVersion="1.19/386",bDetected=1):MSDOS.compareEP("9c5751e8$$$$e8$$$$5fb9....b8....2e87052e3185....47d1c8e2")?(sVersion="1.20/386",bDetected=1):MSDOS.compareEP("b430cd2186e03d....73..b0..b44ccd2150b8....58eb")&&(sVersion="0.97.6-0.99b",bDetected=1),result()}meta("protector","HackStop") ================================================ FILE: dbs_min/db/MSDOS/protector_HASP.2.sg ================================================ function detect(){return(MSDOS.compareEP("e9$$$$e800005d81ed....2ea3....8cd82ea3....05....2ea3....2e0306....2ea3....2e833e......75..e8")||MSDOS.compareEP("e9$$$$e800005d81ed....2ea3....8cd82ea3....83c0..2ea3....2e0306....2ea3....2e833e......75..e8"))&&(bDetected=1),result()}meta("protector","HASP Key Envelope") ================================================ FILE: dbs_min/db/MSDOS/protector_HEALTH.2.sg ================================================ function detect(){return MSDOS.compareEP("1EE8....2E8C06....2E893E....8BD7B8....CD218BD80E1FE8....0657A1....26")&&(sVersion="5.1",bDetected=1),result()}meta("protector","HEALTH") ================================================ FILE: dbs_min/db/MSDOS/protector_HaSPeX-Protect.2.sg ================================================ function detect(){return MSDOS.compareEP("fa8cc88ed88cd38bd48ed0bc....b9....8bf44444fdad35....50eb")&&(sOptions="1996",bDetected=1),result()}meta("protector","HaSPeX-Protect") ================================================ FILE: dbs_min/db/MSDOS/protector_Hardlock.2.sg ================================================ function detect(){return MSDOS.compareEP("2ec6........be....bf....b9....2ea1....d1e92e8b1d2e31052e030402e12bc6d0c403c34683ef")&&(sOptions="dongle envelope by Aladdin",bDetected=1),result()}meta("protector","Hardlock") ================================================ FILE: dbs_min/db/MSDOS/protector_Inertia.2.sg ================================================ function detect(){return(MSDOS.compareEP("505351525657551e060eb8....500e5805....5031c050cb")||MSDOS.compareEP("505351525657551e8cc88ed8be....8cc3011e....8cc92bcb83e9..33db8cc005....8ed8"))&&(bDetected=1),result()}meta("protector","Inertia encryption") ================================================ FILE: dbs_min/db/MSDOS/protector_Int01-Destroyer.2.sg ================================================ function detect(){return MSDOS.compareEP("fc33d28ec2bf....abab8cca33ff81ea....52ba....521e0733d2cb")&&(sOptions="1994",bDetected=1),result()}meta("protector","Int01-Destroyer") ================================================ FILE: dbs_min/db/MSDOS/protector_Ironthorn.2.sg ================================================ function detect(){return MSDOS.compareEP("9ce80000581e5704..bf....5feb$$ffd0")&&(sVersion="1.0:2000",sOptions="modified HackStop 1.19 by ReDragon",bDetected=1),result()}meta("protector","Ironthorn") ================================================ FILE: dbs_min/db/MSDOS/protector_JAM.2.sg ================================================ function detect(){return MSDOS.compareEP("50061607BE....8BFEB9....FDFAF32EA5FB06BD....55CB")&&(sVersion="2.21",bDetected=1),result()}meta("protector","JAM") ================================================ FILE: dbs_min/db/MSDOS/protector_JmCryptExe.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$e9$$$$1e068cd805....8ed88ec02e0106....2e0106....8be82ea1....2e8b0e")?(sVersion="0.7i",bDetected=1):MSDOS.compareEP("e9$$$$e9$$$$2e8c1e....e8$$$$530633db8ec3bb....268e47..bb....26813f....74..e9")?(sVersion="0.7",bDetected=1):MSDOS.compareEP("e9$$$$2e8c1e....8cc88ed806a1....8ec08b1e....b4..cd210773..e9")&&(sVersion="0.7?",bDetected=1),result()}meta("protector","JmCryptExe") ================================================ FILE: dbs_min/db/MSDOS/protector_Joke.2.sg ================================================ function detect(){return MSDOS.compareEP("bb....e8....bd....2863..53454ee8....9893928a80....52cb")&&(sOptions="by SEN",bDetected=1),result()}meta("protector","Joke fileheader") ================================================ FILE: dbs_min/db/MSDOS/protector_KeyMaker.2.sg ================================================ function detect(){return MSDOS.compareEP("fc0e1f8706....871e....870e....8716....8736....873e....872e....268b07a3....8cc0a3....8cc88ec08edaf3a5")&&(sVersion="3.0",sOptions="1998 by TIME Software",bDetected=1),result()}meta("protector","KeyMaker") ================================================ FILE: dbs_min/db/MSDOS/protector_Kvetch.2.sg ================================================ function detect(){return MSDOS.compareEP("bb....ba....0e1f068cd005....8ec00efc8bcbd1e133ffd1e18bf7d1e1f3a5b8....0650cb")?(sVersion="1.X",sOptions="1992 by Tal Nevo",bDetected=1):MSDOS.compareEP("ba....bb....060e0e1f8cd005....8ec08bcbd1e1d1e1d1e133ff8bf7fcf3a506b8....50cb")&&(sVersion="1.02c",sOptions="1992 by Tal Nevo",bDetected=1),result()}meta("protector","Kvetch") ================================================ FILE: dbs_min/db/MSDOS/protector_LOCK.2.sg ================================================ function detect(){return MSDOS.compareEP("b430cd21faba....2e8006......80ea..2e8816....e8$$$$2ec606......fbbf....b9....0e072e8a0534..aae2")&&(sVersion="1.1",sOptions="by Psycho //ENiAC",bDetected=1),result()}meta("protector","LOCK") ================================================ FILE: dbs_min/db/MSDOS/protector_LOCK91.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$8cc88ed88ec08cd8a3....a1....2906....e421500c..24..e621e8")&&(sOptions="dongle envelope",bDetected=1),result()}meta("protector","LOCK91") ================================================ FILE: dbs_min/db/MSDOS/protector_LamerStop.2.sg ================================================ function detect(){return MSDOS.compareEP("E8....05....CD2133C08EC026......2E......26......2E......BA....FA")&&(sVersion="1.0c",bDetected=1),result()}meta("protector","LamerStop") ================================================ FILE: dbs_min/db/MSDOS/protector_LockTite+.2.sg ================================================ function detect(){return MSDOS.compareEP("8cc88ed88cc381c3....8bc30306....8ec08b0e....8bf14e8bfefdf3a450b8....50cb")&&(bDetected=1),result()}meta("protector","LockTite+") ================================================ FILE: dbs_min/db/MSDOS/protector_MEGALITE.2.sg ================================================ function detect(){return MSDOS.compareEP("B8....BA....05....3B2D73..72..B409BA....CD21CD90")&&(sVersion="1.20a",bDetected=1),result()}meta("protector","MEGALITE") ================================================ FILE: dbs_min/db/MSDOS/protector_MESS.2.sg ================================================ function detect(){return MSDOS.compareEP("....................B9....F3..ACE3..EB..BA....B409CD21CD20..............................B430CD213C0277")?(sVersion="1.07",bDetected=1):MSDOS.compareEP("........FAB9....F326ACE3..EB$$1E0E1FBA....81EA....B409CD211FB44CCD21")?(sVersion="1.20",bDetected=1):MSDOS.compareEP("........FA545b3bdc75..eb$$9c5b81cb....5381e3....75..9d9c5825....75..1e0e1f")?(sVersion="1.29",bDetected=1):MSDOS.compareEP("........FAb9....f326ace3..eb$$1e0e1fba....b409cd211fb44ccd21")?(sVersion="1.X",bDetected=1):MSDOS.compareEP("'MESS'b9....83c4..f326ace3..eb$$ba....b409cd21cd20")?(sVersion="1.07",bDetected=1):MSDOS.compareEP("'MESS'fa545b3bdc75..eb$$9c5b81cb....539d9c5825....75..1e0e1fba....b409cd211f")?(sVersion="1.25",bDetected=1):MSDOS.compareEP("'MESS'b9....83c4..f326ace3..eb")&&(sVersion="1.14",bDetected=1),result()}meta("protector","MESS") ================================================ FILE: dbs_min/db/MSDOS/protector_Maker.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$558bec9ceb$$505351525657061eb8....cd210653eb$$b8....cd2106531e1e0e1f8ccab1..eb")&&(sVersion="3.0",sOptions="1992 by PST",bDetected=1),result()}meta("protector","Maker (CDAT)") ================================================ FILE: dbs_min/db/MSDOS/protector_Mandrake.2.sg ================================================ function detect(){return MSDOS.compareEP("b8....8ed8b8....8ec0e8$$$$bb....b9....b8....2bc1568bf0268a3488305ee2..b4..b7..cd10")&&(sOptions="by H.P.G. Soft",bDetected=1),result()}meta("protector","Mandrake") ================================================ FILE: dbs_min/db/MSDOS/protector_MutaWWP.2.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$5e8bd683ea..83c6..060e1e0e1f33ff8cd383eb..8ec3b9....f3a45805....500e5333c951cb")&&(sVersion="1.0",sOptions="by Stefan Esser",bDetected=1),result()}meta("protector","MutaWWP") ================================================ FILE: dbs_min/db/MSDOS/protector_Mutate.2.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$58e9$$$$2ec606......eb$$1eeb$$50eb$$33c0f872..eb")?(sVersion="1.1 (16,20.05.1996)",sOptions="1996 by PReDaToR 666",bDetected=1):MSDOS.compareEP("33c0eb$$83e8..e9$$$$2e802e......eb$$1eeb$$50eb$$33c0f872..eb")?(sVersion="1.1 (18.05.1996)",sOptions="1996 by PReDaToR 666",bDetected=1):MSDOS.compareEP("e9$$$$f8e9$$$$2e8006......eb$$1eeb$$50e9$$$$33c0f873..e9")&&(sVersion="1.1 (20.05.1996)",sOptions="1996 by PReDaToR 666",bDetected=1),result()}meta("protector","Mutate") ================================================ FILE: dbs_min/db/MSDOS/protector_NOCLIP.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$ff26....9c5053518cd8a3")&&(sVersion="4.X",sOptions="by TD Technologia Digital",bDetected=1),result()}meta("protector","NOCLIP") ================================================ FILE: dbs_min/db/MSDOS/protector_NOTA.2.sg ================================================ function detect(){return MSDOS.compareEP("eb$$061e33c08ed8be....0e07bf....b9....fcf3a41f8cd3be....8bd48ed6bc....8bf436c744......36c744......8ed38be2ba....e8")&&(sVersion="1.1",sOptions="1990 by Novitex",bDetected=1),result()}meta("protector","NOTA") ================================================ FILE: dbs_min/db/MSDOS/protector_NTShell.2.sg ================================================ function detect(){return MSDOS.compareEP("2e8c1e....8cca8eda8ec2fa8ed2bc....fbe80000eb$$b9....5e8bfeeb")?(sVersion="4.0",sOptions="by Mr. ZhouHui",bDetected=1):MSDOS.compareEP("2e8c06....8cc88ed8fa8ed0bc....fbff36....268b1e....8ec333ffb9")&&(sVersion="2.01",sOptions="by Mr. ZhouHui",bDetected=1),result()}meta("protector","NTShell") ================================================ FILE: dbs_min/db/MSDOS/protector_Nodebug.2.sg ================================================ function detect(){return MSDOS.compareEP("fcbe....b9....31d22ead01c2e2")&&(sVersion="1.0 part 2",sOptions="by JVP",bDetected=1),result()}meta("protector","Nodebug") ================================================ FILE: dbs_min/db/MSDOS/protector_Novex.2.sg ================================================ function detect(){return MSDOS.compareEP("0e1f06b8....bb....0e07cd012ea1....263947..070675..2ec606......eb..06f8b8....cd212e891e....2e8c06....b8")&&(bDetected=1),result()}meta("protector","Novex Key Envelope") ================================================ FILE: dbs_min/db/MSDOS/protector_Overlay.2.sg ================================================ function detect(){return MSDOS.compareEP("fa8cc283c2..2e0116....8cc82bc22e8b0e....8bea8bf8be....8bc103c903c881c1....03c18ad983e3..2e0387")&&(sVersion="3.0",bDetected=1),result()}meta("protector","Overlay") ================================================ FILE: dbs_min/db/MSDOS/protector_PACKWIN.2.sg ================================================ function detect(){return MSDOS.compareEP("8cc0fa8ed0bc....fb060e1f2e8b0e....8bf14e8bfe8cdb2e031e....8ec3fdf3a453b8....50cb")&&(sVersion="1.0",sOptions="by Yellow Rose",bDetected=1),result()}meta("protector","PACKWIN") ================================================ FILE: dbs_min/db/MSDOS/protector_PC-Guard.2.sg ================================================ function detect(){return MSDOS.compareEP("b8....fcfdb9....be....f82e180cf5fcfc74..fccc")?(sVersion="3.05 PRO",sOptions="1994/97 by Ceklic Blagoje //COMSEC",bDetected=1):MSDOS.compareEP("2bdb81cb....f8fdbf....2bd281ca....f52e291dfcf7d3fdfccc")?(sVersion="3.05",sOptions="1994/97 by Ceklic Blagoje //COMSEC",bDetected=1):(MSDOS.compareEP("bb....f5b9....fcfdbe....fdfc2e190cfcfdf8f7d9d1d9f8f8")||MSDOS.compareEP("be....fcb9....fdf5f5ba....fc2e102cf8d1d1d1c9f7d9")||MSDOS.compareEP("33db81c3....f8fdbe....f8f5fcba....f52e111cfcfd72"))&&(sVersion="3.XX",sOptions="by Ceklic Blagoje //COMSEC",bDetected=1),result()}meta("protector","PC-Guard") ================================================ FILE: dbs_min/db/MSDOS/protector_PCOM.2.sg ================================================ function detect(){return MSDOS.compareEP("be....b9....2e8a0434..2e880446e2")&&(sVersion="2.8b2, 2.8b3 -e -i",sOptions="1999",bDetected=1),result()}meta("protector","PCOM") ================================================ FILE: dbs_min/db/MSDOS/protector_PROTECT.2.sg ================================================ function detect(){for(var e,c=[0,0,0,0,0,0],r=0,a=MSDOS.OffsetToVA(MSDOS.getEntryPointOffset()),t=0;t<80;){t++ var s=MSDOS.readByte(MSDOS.VAToOffset(a)) if(253!=s&&30!=s&&14!=s&&7!=s&&31!=s&&252!=s||(c[r]=s,r++),6==r)break a=MSDOS.getDisasmNextAddress(a)}return(compareArrays([253,30,14,14,7,31],c)||compareArrays([253,30,14,7,14,31],c)||compareArrays([252,30,14,31,14,7],c)||compareArrays([252,30,14,14,31,7],c)||compareArrays([30,253,14,7,14,31],c)||compareArrays([30,253,14,14,7,31],c)||compareArrays([30,252,14,31,14,7],c)||compareArrays([30,252,14,14,31,7],c))&&(sVersion="5.5",bDetected=1),MSDOS.compareEP("1e0e0e1f07")||MSDOS.compareEP("1e0e0e071f")||MSDOS.compareEP("1e0e1f0e07")?186!=(e=MSDOS.readByte(MSDOS.getEntryPointOffset()+5))&&187!=e&&189!=e&&190!=e&&191!=e&&232!=e||(sVersion="5.0",sOptions="type 1",bDetected=1):MSDOS.compareEP("5053515657061e0e1f")?(sVersion="5.0",sOptions="type 2",bDetected=1):MSDOS.compareEP("0e071e0e1f")?186!=(e=MSDOS.readByte(MSDOS.getEntryPointOffset()+5))&&187!=e&&189!=e&&190!=e&&191!=e||(sVersion="4.1",bDetected=1):MSDOS.compareEP("8cdb0e0e1f07b9....e800005e81c6....89f7ac34..aae2")?(sVersion="4.0",bDetected=1):MSDOS.compareEP("2ea3....8cd82ea3....8cc82ea3....2e892e....33c08ed8fafcbe....0e07")?(sVersion="3.1",bDetected=1):MSDOS.compareEP("2ea3....8cd82ea3....8cc82ea3....2e892e....33c08ec0fafc26a1....2ea3....26a1")?(sVersion="3.0",bDetected=1):MSDOS.compareEP("e8$$$$1e068cc88ed88ec0be....8bfeb9....ac")?(sVersion="2.0",bDetected=1):MSDOS.compareEP("e8$$$$1e068cc88ed88ec02ec606")?(sVersion="1.0",bDetected=1):MSDOS.compareEP("8cd805....50b8....501e068cda83c2..b9....be....0e1fad8bd8ad03c28ec0260117e2")?(sOptions="relocpacker",sVersion="1.0",bDetected=1):MSDOS.compareEP("1eb430cd213c..73..cd20be....e8....e8")&&(sVersion="6.0",bDetected=1),result()}meta("protector","PROTECT! EXE"),includeScript("read") ================================================ FILE: dbs_min/db/MSDOS/protector_PVAC.2.sg ================================================ function detect(){return MSDOS.compareEP("33c08ed806be....bf....b9....fcf3a5bf....b2..fa8926....bc....8bf42e8a0402c2a3....a3....8cdb")&&(sVersion="1.04",sOptions="(1993) by Fernando Papa Budzyn",bDetected=1),result()}meta("protector","PVAC") ================================================ FILE: dbs_min/db/MSDOS/protector_PassEXE.2.sg ================================================ function detect(){return MSDOS.compareEP("061E0E0E071FBE....B9....871481......EB..C7......840087......FB1F584A")&&(sVersion="2.0",bDetected=1),result()}meta("protector","PassEXE") ================================================ FILE: dbs_min/db/MSDOS/protector_Pksmart.2.sg ================================================ function detect(){return MSDOS.compareEP("ba....8cc88bc803c281c1....51b9....511e8cd38d6f..55b1..51fc4bbe....33ff8ed88ec3b1..f3a5484a79..0e078edb33f633ffcb")&&(sVersion="1.0b",sOptions="by Alex",bDetected=1),result()}meta("protector","Pksmart") ================================================ FILE: dbs_min/db/MSDOS/protector_ProtEXE.2.sg ================================================ function detect(){for(var e=MSDOS.getEntryPointOffset(),r=0;r<20;){switch(r++,MSDOS.readByte(e)){case 233:var c,e=32767<(c=MSDOS.readWord(e+1))?e-(65535-c)+2:e+c+3 break case 232:e=32767<(c=MSDOS.readWord(e+1))?e-(65535-c)+2:e+c+3 break case 235:e=127<(c=MSDOS.readByte(e+1))?e-(255-c)+1:e+c+2}var t=MSDOS.readByte(e) if((187==t||190==t||191==t)&&MSDOS.compare("0600",e+1)){sVersion="3.10-3.11",bDetected=1 break}if(187!=t&&190!=t&&191!=t&&233!=t&&232!=t&&235!=t)break}return MSDOS.compareEP("9c9c5825....509d9c5825....3d....74..9c5825....0d....509d9c5825....74..ba....b0..eb")?(sVersion="2.11",bDetected=1):MSDOS.compareEP("9c505351525657551e06fcb8....cd2184c075..cd20a8..04..eb$$eb$$ba....ec0c..eb")&&(sVersion="3.0",sOptions="by T.Torfs",bDetected=1),result()}meta("protector","ProtEXE") ================================================ FILE: dbs_min/db/MSDOS/protector_Protector.2.sg ================================================ function detect(){return MSDOS.compareEP("'FCP/IV'bc....c3",-6)&&(sOptions="by FCP/IV (Future Crew)",bDetected=1),result()}meta("protector","Protector") ================================================ FILE: dbs_min/db/MSDOS/protector_Quadru-Lock.2.sg ================================================ function detect(){return MSDOS.compareEP("9c508cda5252bb....8cc8488ed805....8ec0b9....8bf12bf38bfefdf3a44050ffd1")&&(bDetected=1),result()}meta("protector","Quadru-Lock") ================================================ FILE: dbs_min/db/MSDOS/protector_R-Crypt.2.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$68....60bf....b9....b0..2e3005fec047e2..61c706........c606")&&(sVersion="0.91, 0.93",bDetected=1),result()}meta("protector","R-Crypt") ================================================ FILE: dbs_min/db/MSDOS/protector_REC.2.sg ================================================ function detect(){return MSDOS.compareEP("061eb430cd213c..73..33c00650cbbf....8b36....2bf781fe....eb$$52ba....5aeb")?(sVersion="0.33-0.35",bDetected=1):MSDOS.compareEP("061e52b8....1ecd2186e03d....73..cd200e1fb4..e8$$$$5acd21")?(sVersion="0.24-0.32",bDetected=1):MSDOS.compareEP("061eb430cd213c..73..33c00650cb")?(sVersion="0.40c2",bDetected=1):MSDOS.compareEP("061e53bb....5beb$$eb$$eb$$2ec606")&&(sVersion="0.40.5, 0.40.6",bDetected=1),result()}meta("protector","REC") ================================================ FILE: dbs_min/db/MSDOS/protector_RHC.2.sg ================================================ function detect(){return MSDOS.compareEP("8cd8ba....8eda8ec2a3....b8....cd10b8....8ec0be....bb....b9....518bfbb9....b4..acabe2")&&(sVersion="1.99.test",sOptions="1999 by Rowdy",bDetected=1),result()}meta("protector","RHC") ================================================ FILE: dbs_min/db/MSDOS/protector_ROSETINY.2.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$53bb....5beb$$eb$$582d....50061e5751e8$$$$e8$$$$5fb9....b8....2e87052e3145..47d1c8e2")?bDetected=1:MSDOS.compareEP("eb$$5053b430cd2186e03d....73..cd2006502bc08ec08506....b8....eb")&&(sVersion="0.95",bDetected=1),result()}meta("protector","RoseTiny") ================================================ FILE: dbs_min/db/MSDOS/protector_SSI-Lock.2.sg ================================================ function detect(){return MSDOS.compareEP("1e0e1fba....b4..cd211f2bc00650cb")?(sVersion="3.0 (overlay)",sOptions="1991, 1992 by Software Security, Inc.",bDetected=1):MSDOS.compareEP("2e8c06....2e8c1e....0e1f8c06....892e....893e....8936....8916....890e....891e....a3....9c5825....a3....fb0e1f")&&(sVersion="3.0",sOptions="1991, 1992 by Software Security, Inc.",bDetected=1),result()}meta("protector","SSI-Lock") ================================================ FILE: dbs_min/db/MSDOS/protector_Secure.2.sg ================================================ function detect(){var e return MSDOS.compareEP("8CC805....50B8....50B0..068CD20683....50B0..52FC508CD28CCDBB....03EB4A8EDD8EC24DB9....33FFBE....AD35....ABE2")||MSDOS.compareEP("8CC805....50B8....50CB")?(sVersion="2.1b",bDetected=1):MSDOS.compareEP("e8$$$$fa4c904c81f3....56be....5eeb$$eb$$81f3....444490fb5bf7c2....eb$$53b9....eb")?(sVersion="0.29",bDetected=1):MSDOS.compareEP("e8")&&(e=MSDOS.readWord(MSDOS.getEntryPointOffset()+1)+MSDOS.getEntryPointOffset()+3,-1!=MSDOS.findSignature(e,MSDOS.getSize()-e,"2e8037..43e2f9"))&&(sVersion="0.19",bDetected=1),result()}meta("protector","Secure") ================================================ FILE: dbs_min/db/MSDOS/protector_SelfChk.2.sg ================================================ function detect(){return MSDOS.compareEP("1e1eb430cd21b44c3c..73..cd21be....e8....e8....b8....1f07e9....0e0e1f07fcc3")&&(sVersion="1.21",sOptions="1999 by Tsahi Chitin",bDetected=1),result()}meta("protector","SelfChk") ================================================ FILE: dbs_min/db/MSDOS/protector_Shrink.2.sg ================================================ function detect(){return MSDOS.compareEP("509CFCBE....BF....57B9....F3A48B......BE....BF....F3A4C3")?(sVersion="1.0",bDetected=1):MSDOS.compareEP("E9....509CFCBE....8BFE8CC805....8EC00657B9")&&(sVersion="2.0",bDetected=1),result()}meta("protector","Shrink") ================================================ FILE: dbs_min/db/MSDOS/protector_SnoopStop.2.sg ================================================ function detect(){return MSDOS.compareEP("..E9....EB..20......73..20....411A05")&&(sVersion="1.15",bDetected=1),result()}meta("protector","SnoopStop") ================================================ FILE: dbs_min/db/MSDOS/protector_SuckStop.2.sg ================================================ function detect(){return MSDOS.compareEP("EB......BE....B430CD21EB..9B")?(sVersion="1.11",bDetected=1):MSDOS.compareEP("'KAOT'58eb$$be....b430cd21eb$$3c..77..cd204e75..6a..0e6a..fec3cf")?(sVersion="1.11r",sOptions="1997 by KA0T //N0Ps",bDetected=1):MSDOS.compareEP("'KAOT'5ceb$$be....b430cd21eb$$3c..77..cd204e75..c706........1e6a..0fa1")?(sVersion="1.10r",sOptions="1997 by KA0T //N0Ps",bDetected=1):MSDOS.compareEP("'KAOT'5ceb$$be....b430cd21eb$$3c..77..cd204e75..6a..0e6a..fec3cf")?(sOptions="1997 by KA0T //N0Ps",bDetected=1):MSDOS.compareEP("3a324a1d....fb37fb1d....1d....be....81ee....6a..593a32")&&(sVersion="1.0",sOptions="1997 by KA0T //N0Ps",bDetected=1),result()}meta("protector","SuckStop") ================================================ FILE: dbs_min/db/MSDOS/protector_TCEC.2.sg ================================================ function detect(){return MSDOS.compareEP("e4640c..e66466fae800005d81ed....b8....8bd48da6....b9....8bdc2ec00f..2e30072e000f44e2")?(sVersion="3.59r5",sOptions="by ThE CLERiC! //LZ0, EVD",bDetected=1):MSDOS.compareEP("54434543b9....83c4..33c0509df326ace3..eb")&&(sVersion="3.55",sOptions="by ThE CLERiC! //LZ0, EVD",bDetected=1),result()}meta("protector","TCEC") ================================================ FILE: dbs_min/db/MSDOS/protector_TraceLock.2.sg ================================================ function detect(){return MSDOS.compareEP("1e06e8$$$$0e0e1f07b4..b9....be....8bfefcac32c4d2c802e1aae2..b8....35....8706....c3")&&(sVersion="0.9",bDetected=1),result()}meta("protector","TraceLock") ================================================ FILE: dbs_min/db/MSDOS/protector_Trap.2.sg ================================================ function detect(){return MSDOS.compareEP("e800005b83c3..908bd3e8$$$$5b2e803f..74..90908bdab9....eb")?(sVersion="1.21",sOptions="by Christoph Gabler",bDetected=1):MSDOS.compareEP("8cd0bb....8ed333c98ed0b9....eb$$e2..33d2")?(sVersion="1.18",sOptions="by Christoph Gabler",bDetected=1):MSDOS.compareEP("8cd0bb....8ed333d28ed0b9....eb$$e2..33d2")?(sVersion="1.X",sOptions="by Christoph Gabler",bDetected=1):MSDOS.compareEP("b9....eb$$e2$$eb..90cd20e2")?(sVersion="1.15",sOptions="by Christoph Gabler",bDetected=1):MSDOS.compareEP("e800005b83c3..908bd3e8$$$$5b2e803f..74..90908bdab9....2ec0")?(sVersion="1.20",sOptions="1998 by Christoph Gabler",bDetected=1):MSDOS.compareEP("05....eb$$bb....81ebfa..85f9eb$$eb$$39fbeb")?(sVersion="1.22",sOptions="by Christoph Gabler",bDetected=1):MSDOS.compareEP("81ea....eb$$b9....81c1....39d0bb....85c3b9....f505....bb....ba....81c2")?(sVersion="1.23",sOptions="by Christoph Gabler",bDetected=1):MSDOS.compareEP("eb$$39c281c3....eb$$81c3....39cc81ea....39e2b9....85da39e9eb")?(sVersion="1.24",sOptions="by Christoph Gabler",bDetected=1):MSDOS.compareEP("8cd1ba....8ed233d28ed18bcaeb")?(sVersion="1.13",sOptions="by Christoph Gabler",bDetected=1):MSDOS.compareEP("e8$$$$5d81ed....458cd68bfc0f23c70f23ceb0..e6..fa0e17")?(sVersion="1.26b1",sOptions="2000 by Christoph Gabler",bDetected=1):MSDOS.compareEP("8cd1ba....8ed233d28ed18bcab9....eb")&&(sVersion="1.14",sOptions="by Christoph Gabler",bDetected=1),result()}meta("protector","Trap") ================================================ FILE: dbs_min/db/MSDOS/protector_Un2pack.2.sg ================================================ function detect(){return MSDOS.compareEP("9cba....2d....81e1....81f3....b4..9db8....ba....8cdb03d83b1e....73..83eb..fa8ed3bc")&&(sVersion="2.0",sOptions="1994 by The CCS-Productions",bDetected=1),result()}meta("protector","Un2pack") ================================================ FILE: dbs_min/db/MSDOS/protector_UnPackStop.2.sg ================================================ function detect(){var e return MSDOS.compareEP("3670..b8....81c0....bb....43e8....5f83c7..0e570656cbbe....eb")?(sVersion="0.9X",sOptions="by Szaszi (Szabo Laszlo)",bDetected=1):MSDOS.compareEP("68....c3")?(e=MSDOS.readWord(MSDOS.getEntryPointOffset()+1)-32,MSDOS.compare("bf....e2..a541b9....2e31154747e2",e)?(sVersion="0.95",sOptions="by Szaszi (Szabo Laszlo)",bDetected=1):MSDOS.compare("b9....39fe2e31154747eb",e)&&(sVersion="0.95 freeware",sOptions="by Szaszi (Szabo Laszlo)",bDetected=1)):MSDOS.compareEP("4e46555dbb....70..b8....81c0....4c44cd213efc268b2e....8ec5")||MSDOS.compareEP("b8....40bb....4be8$$$$be....eb$$5f83c7..0e570656cb")?(sVersion="0.94",sOptions="by Szaszi (Szabo Laszlo)",bDetected=1):MSDOS.compareEP("424a5159bb....4bb8....404a42cd2190fc")&&(sVersion="0.96",sOptions="by Szaszi (Szabo Laszlo)",bDetected=1),result()}meta("protector","UnPackStop") ================================================ FILE: dbs_min/db/MSDOS/protector_XDOC.2.sg ================================================ function detect(){return MSDOS.compareEP("2e8c16....eb00ea....ffff")&&(sVersion="1.20",bDetected=1),result()}meta("protector","XDOC") ================================================ FILE: dbs_min/db/MSDOS/protector_aPatch.2.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$fde8$$$$ffc75e83ee..e8$$$$5d8176......c646....eb$$ffe5")&&(sVersion="0.05-0.33",bDetected=1),result()}meta("protector","aPatch") ================================================ FILE: dbs_min/db/MSDOS/protector_cramble.2.sg ================================================ function detect(){return MSDOS.compareEP("E9....609CFC..................01..012A..FF")&&(sVersion="0.2b3",bDetected=1),result()}meta("protector","cramble") ================================================ FILE: dbs_min/db/MSDOS/protector_iLUCRYPT.2.sg ================================================ function detect(){return MSDOS.compareEP("8becfac746......4c4cc3fbbf....b8....2e3105d1c84f")?(sVersion="4.01X",sOptions="by Christian Schwarz",bDetected=1):MSDOS.compareEP("bf....b8....2e3105d1c84f81ff....73..b7..df53..961e")&&(sVersion="4.017",sOptions="by Christian Schwarz",bDetected=1),result()}meta("protector","iLUCRYPT") ================================================ FILE: dbs_min/db/MSDOS/protector_nbuild.2.sg ================================================ function detect(){return MSDOS.compareEP("B9....BB....C0....80....43E2")&&(sVersion="1.0",bDetected=1),result()}meta("protector","nbuild") ================================================ FILE: dbs_min/db/MSDOS/runtime_VROOMM.4.sg ================================================ function detect(){return MSDOS.compareOverlay("46424f56")&&(bDetected=1),result()}meta("runtime","VROOMM (Virtual Real-time Object-Oriented Memory)") ================================================ FILE: dbs_min/db/MSDOS/self-displayer_ANS2ALL.1.sg ================================================ function detect(){return MSDOS.compareEP("eb$$be....bf....b9....8ccd81ed....8bdd83eb..8bd3fcfa909090909090")&&(sVersion="0.9beta",sOptions="by ZeroCoder //XG",bDetected=1),result()}meta("self-displayer","ANS2ALL") ================================================ FILE: dbs_min/db/MSDOS/self-displayer_GIFEXE.1.sg ================================================ function detect(){return MSDOS.compareEP("ba....2e8916....b430cd218b2e....8b1e....8edaa3....8c06")&&MSDOS.compareOverlay("'GIF87a'")&&MSDOS.isSignaturePresent(MSDOS.getSize()-6,6,"'GIFEXE'")&&(sVersion="1.0",sOptions="1990, 1991 by Steve Enns and Dan Magosse",bDetected=1),result()}meta("self-displayer","GIFEXE") ================================================ FILE: dbs_min/db/MSDOS/self-displayer_RELETTER.1.sg ================================================ function detect(){return MSDOS.compareEP("e9$$$$bc....bf....bb....8a0784c075..e9....438a073c..74..3c..74..89da438a073c..74")&&(sVersion="1.0",sOptions="1993 by Hans J. Baer (converted to exe)",bDetected=1),result()}meta("self-displayer","RELETTER") ================================================ FILE: dbs_min/db/MSDOS/self-displayer_SimplyWare.1.sg ================================================ function detect(){var e return MSDOS.compareEP("b8....8ed88c06....fa8ed0bc....fbb430cd21a3....0650b434cd218c06....8bc3485b86df81fb")&&(e=MSDOS.getOverlayOffset(),-1!=MSDOS.findSignature(e-4096,4096,"'Simply Docs Viewer'")?(sName="Simply Docs Viewer",sVersion="3.0",sOptions="1990-94 by SimpleWare",bDetected=1):MSDOS.compareOverlay("'Simply Help!'")&&(sName="Simply Help! TSR Viewer",sOptions="1990-94 by SimpleWare",bDetected=1)),result()}meta("self-displayer","") ================================================ FILE: dbs_min/db/MSDOS/self-displayer_TXT2COM.1.sg ================================================ function detect(){return MSDOS.compareEP("e8$$$$c706........803e......75..8d36....e8....e8....e8....e8....e8....ffa7")?(sVersion="1.1",sOptions="1987 by Keith P. Graham",bDetected=1):MSDOS.compareEP("8d26....e8$$$$b4..cd103c..74..c706........c706........3c..74..3c..74..8d16....b409cd21cd20c706")&&(sVersion="2.06",sOptions="1989 by Keith P. Graham",bDetected=1),result()}meta("self-displayer","TXT2COM + generic com2exe") ================================================ FILE: dbs_min/db/MSDOS/self-displayer_TXTmaker.1.sg ================================================ function detect(){return MSDOS.compareEP("eb$$b4..33dbcd1080fc..74..b0..eb$$b44ccd21")&&(sVersion="1.22",sOptions="1991 by Jack A. Orman",bDetected=1),result()}meta("self-displayer","TXTmaker") ================================================ FILE: dbs_min/db/MSDOS/self-displayer_Txt2Exe.1.sg ================================================ function detect(){return MSDOS.compareEP("8cc88ed88cc08ed0bc....b4..cd10a2....3c..74..268a1e....0e07")&&(sVersion="4.01",sOptions="1996 by Wang Lisan",bDetected=1),result()}meta("self-displayer","Txt2Exe") ================================================ FILE: dbs_min/db/MSDOS/self-displayer_self-displayer.1.sg ================================================ function detect(){return MSDOS.compareEP("b8....cd10b409ba....eb$$cd21b409ba....eb$$cd21b409ba....eb")&&(sOptions="1997 //d4c",bDetected=1),result()}meta("self-displayer","Unknown") ================================================ FILE: dbs_min/db/MSDOS/sfx_ARC.1.sg ================================================ function detect(){return MSDOS.compareEP("8CC88CDB8ED88EC089......2BC3A3....89......BE....B9....BF....BA....FCAC32C28AD8")?(sVersion="1.10",sOptions="1986-89 by Wayne Chin and Vernon D. Buerg",bDetected=1):MSDOS.compareEP("558bec83ec..32c02ea2....2ea2....2ea2....8cd78ec78d7e..be....fcac3c..74..3c..76..3c..75..ac")||MSDOS.compareEP("558bec83ec..a1....2ea3....2ec606......8cd78ec78d7e..be....fcac3c..74..3c..76..3c..75..ac")?(sOptions="1988-89 by NoGate Consulting",bDetected=1):MSDOS.compareEP("bb....8edb8c06....c706........8cd02bc3b9....d3e003c4fa8ed38be0fb05....b9....d3e8408cd303c3a3")&&(sVersion="7.1",sOptions="1990 by System Enhancement Associates (SEA), Inc.",bDetected=1),result()}meta("sfx","ARC SFX") ================================================ FILE: dbs_min/db/MSDOS/sfx_ARJ.1.sg ================================================ function detect(){return MSDOS.compare("'RJSX'",28)?(sVersion="old",bDetected=1):MSDOS.isSignaturePresent(0,Math.min(1e3,MSDOS.getSize()),"'aRJsfX'")&&(bDetected=1),result()}meta("sfx","ARJ") ================================================ FILE: dbs_min/db/MSDOS/sfx_ChSFX.1.sg ================================================ function getChSFXVersion(){var e="",$=MSDOS.findString(0,Math.min(256,MSDOS.getSize()),"ChSFX") return e=-1!=$?(e=MSDOS.getString($+6)).replace(/\s+$/,""):e}function detect(){return(MSDOS.compareEP("ba....e8$$$$1e0e1fe8$$$$52568bf2fcb4..eb$$ac0ac075")||MSDOS.compareEP("8d16....e8$$$$1e0e1fe8$$$$52568bf2fcb4..eb$$ac0ac075"))&&(sVersion=getChSFXVersion(),bDetected=1),result()}meta("sfx","CHZ SFX (ChSFX)") ================================================ FILE: dbs_min/db/MSDOS/sfx_EXARJ.1.sg ================================================ function detect(){return MSDOS.compareEP("fcbb....e8....b430cd218bd8063c..72..8e06....33c08bf8b9....f2aeae75..40af061f8bd775..e8")&&(sOptions="1994 by Jakub Jelinek",bDetected=1),result()}meta("sfx","EXARJ small") ================================================ FILE: dbs_min/db/MSDOS/sfx_ICE.1.sg ================================================ function detect(){return MSDOS.compareEP("eb$$be....8bfe8b0e....8b16....b8....50fcad33c2ab8bd0e2")&&(sVersion="1.0",bDetected=1),result()}meta("sfx","ICE SFX") ================================================ FILE: dbs_min/db/MSDOS/sfx_LH.1.sg ================================================ function detect(){return MSDOS.compare("'LH'27's SFX '",36)&&(bDetected=1),result()}meta("sfx","LH") ================================================ FILE: dbs_min/db/MSDOS/sfx_LHA.1.sg ================================================ function detect(){return MSDOS.compareEP("eb$$fcbc....8cc805....8ec0eb$$bb....e8....061fb430cd218bd81e3c..72..368e06....33c08bf8b9....f2aeae")?(sVersion="2.05L, 2.10-2.13, 2.55",bDetected=1):MSDOS.compareEP("eb$$fcbc....8cc805....8ec0e8....bb....e8....061fb430cd218bd81e3c..72..368e06....33c08bf8")?(sVersion="2.13",bDetected=1):MSDOS.compareEP("eb$$00fcbc....8cc805....8ec0eb$$bb....e8....061fb430cd218bd81e3c..72..368e06....33c08bf8b9....f2aeae")?(sVersion="2.13S",sOptions="converted to exe",bDetected=1):MSDOS.compareEP("e9$$$$fcbc....8cc805....8ec0b8....cd21be....268816....26c706........ac")&&(sVersion="1.13L",sOptions="converted to exe",bDetected=1),result()}meta("sfx","LHA SFX") ================================================ FILE: dbs_min/db/MSDOS/sfx_LHarc.1.sg ================================================ function detect(){return MSDOS.compareEP("eb$$fcbc....bb....e8....8cc82e0306....8ed88ec005....2e3b06....76..bb....e9....bf....33d28bc2b9....d1e873..35....e2..abfec275..be....bf....b8....ba....2e3a24")?(sVersion="1.13S, 1.13L",bDetected=1):MSDOS.compareEP("e9$$$$fcbc....bb....e8....8cc805....8ec0b8....cd21be....268816....26c706........ace8....74..263a06")?(sVersion="1.14c",bDetected=1):MSDOS.compareEP("e9$$$$fcbc....e8....9090908cc805....8ec0b8....cd21be....268816....26c706........ace8....74..263a06")?bDetected=1:MSDOS.compareEP("eb$$0d....fcbc....bb....e8....8cc82e0306....8ed88ec005....2e3b06....76..bb....e9")&&(sVersion="1.14c",bDetected=1),result()}meta("sfx","LHarc SFX") ================================================ FILE: dbs_min/db/MSDOS/sfx_PKSFX.1.sg ================================================ function detect(){return MSDOS.compareEP("b430cd213c..73..cd20bf....8b36....2bf776..8bc405....d1d8b1..d3e83bf0")&&MSDOS.compareOverlay("1a")&&(sOptions="ARC",bDetected=1),result()}meta("sfx","PKSFX") ================================================ FILE: dbs_min/db/MSDOS/sfx_PKZIP-SFX.1.sg ================================================ function detect(){return MSDOS.compareEP("fc2e8c......a1....8ccb81c3....3bc372..2d....2d....fabc....8ed0fb2d....a3....8ec0e8....a1")&&(sVersion="1.1(1989-90)",bDetected=1),result()}meta("sfx","PKZIP-SFX") ================================================ FILE: dbs_min/db/MSDOS/sfx_PKZIP_mini-sfx.1.sg ================================================ function detect(){return MSDOS.compareEP("b9....bf....2bcf32c0f3aab430cd21a3....8926....e8....b8....e8....e8")&&(sVersion="2.04c(1992)",bDetected=1),MSDOS.compareEP("b8....a3....bf....b9....2bcf32c0f3aab430cd21a3....a1....a3....e8....b8")&&(sVersion="1.1(1990)",bDetected=1),result()}meta("sfx","PKZIP mini-sfx") ================================================ FILE: dbs_min/db/MSDOS/sfx_SFX.1.sg ================================================ function detect(){return MSDOS.compareEP("fc1e8a1e....16070e1f33d2e8....bd....885e..8f46..bf....33d28bc2b9....d1e873..35....e2..abfec275..be....e8")&&(sVersion="3.33",sOptions="(LHA archive) by LARC",bDetected=1),result()}meta("sfx","SFX") ================================================ FILE: dbs_min/db/MSDOS/sfx_ZOO.1.sg ================================================ function detect(){return MSDOS.compareEP("ba....2e8916....8b2e....8eda8c06....b8....8cda05....83c3..8ed28be0e8")&&MSDOS.compareOverlay("'ZOO'............'Archive'")&&(bDetected=1),result()}meta("sfx","ZOO SFX") ================================================ FILE: dbs_min/db/MSDOS/unknown_immunizer.1.sg ================================================ function detect(){return MSDOS.compareEP("be....e9$$$$501e06b8....cd21fc80fc..75..3c..75..b4..cd213c")?(sOptions="type 1",bDetected=1):MSDOS.compareEP("be....8e06....8cdd31ff8bc7b9....f2aeae75..af061f")&&(sOptions="type 2",bDetected=1),result()}meta("immunizer","unknown immunizer") ================================================ FILE: dbs_min/db/MSDOS/virus.1.sg ================================================ function detect(){return MSDOS.compareEP("e8....5e83ee..b8....cd213d....75..0e1f81c6....bf....b9....fcf3a4061f06b8....50cb")?(sName="TaiPan.438",bDetected=1):MSDOS.compareEP("e9$$$$9090be....8bfee8$$$$5081c7....b9....b8....902e31054790e2")&&(sName="Burglar.1150",bDetected=1),result()}meta("virus","") ================================================ FILE: dbs_min/db/NE/_NE.0.sg ================================================ function detect(){return NE.isVerbose()&&(sName=NE.getOperationSystemName(),sVersion=NE.getOperationSystemVersion(),sOptions=NE.getOperationSystemOptions(),bDetected=1),result()}meta("operation system","Windows") ================================================ FILE: dbs_min/db/NE/_init ================================================ var File=NE,X=NE ================================================ FILE: dbs_min/db/NE/compiler_Borland_C++.1.sg ================================================ function detect(){return NE.compareEP("53510633c0509a........5807595b9a........0bc075..e9")?(sOptions="1994 type 1",bDetected=1):NE.compareEP("893e....56571e510656e3..1e33c050519a........91e3")?(sOptions="1994 type 2",bDetected=1):NE.compareEP("53510633c050e8....5807595b9a........0bc075..e9")?(sOptions="1993 type 1",bDetected=1):NE.compareEP("b8....8ed853510633c0509a........5807595b9a........0bc075..e9")?(sOptions="1993 type 2",bDetected=1):NE.compareEP("893e....56571e510656e3..1e33c05051900ee8....91e3")&&(sOptions="1991",bDetected=1),result()}meta("compiler","Borland C++") ================================================ FILE: dbs_min/db/NE/compiler_Borland_Pascal.1.sg ================================================ function detect(){return NE.compareEP("9a........9a........9a........9a........9a........5589e56a..9a........ff36....bf....1e5768....9a")&&(sVersion="7.1",bDetected=1),result()}meta("compiler","Borland Pascal") ================================================ FILE: dbs_min/db/NE/compiler_Watcom_C.1.sg ================================================ function detect(){return NE.compareEP("e9$$$$9a........0bc074..8c06....5756065352891e....8c06....2bc0509a")||NE.compareEP("e9$$$$b9....51b9....51b9....51b9....5153508cd18bdc83c3..8cd2b8....ea")||NE.compareEP("e9$$$$535152565706558becb9....51b9....51b9....51b9....5153508cd18bdc83c3..8cd2b8....9a")?(sOptions="1991",bDetected=1):NE.compareEP("e9$$$$9a........0bc075..e9....8c06....575606535253be....8936....8c1e....268a078804")?(sOptions="1993",bDetected=1):NE.compareEP("eb$$9a........09c075..e9....8c06....5756065352891e....8c06....29c0509a")||NE.compareEP("eb$$5351525657065589e553508cd189e383c3..8cd23eb8....9a")?(sName="Watcom C/C++16",sOptions="1995",bDetected=1):NE.compareEP("e9$$$$535152565706558bec53508cd18bdc83c3..8cd2b8")?(sOptions="1992",bDetected=1):NE.compareEP("eb$$535152565706558bec53508cd18bdc83c3..8cd2b8")?(sName="Open Watcom C/C++16 for OS/2",sOptions="2002",bDetected=1):NE.compareEP("eb$$9a........0bc075$$8c06....575606535253be")&&(sName="Open Watcom C/C++16 for Windows",sOptions="2002",bDetected=1),sLang=-1!==sName.indexOf("C++")?"C":"C++",result()}meta("compiler","Watcom C") ================================================ FILE: dbs_min/db/NE/game_engine_DirectorPlayer.1.sg ================================================ function detect(){return NE.compareOverlay("140002004d11650000000200c0252500")&&(sVersion="1.0-3.0",bDetected=1),result()}meta("game engine","Director Player") ================================================ FILE: dbs_min/db/NE/installer_CoktelVisionInstaller.1.sg ================================================ function detect(){return NE.compareOverlay("65000300ea010400fa0c0300e6010400")&&(bDetected=1),result()}meta("installer","Coktel Vision") ================================================ FILE: dbs_min/db/NE/installer_Setup-Specialist.1.sg ================================================ function detect(){return NE.compareEP("eb$$53510633c0509a........5807595b9a........0bc075..e9")?(sOptions="1995-1998 by Thilo-Alexander Ginkel",bDetected=1):NE.compareEP("eb$$53510633c050900ee8....5807595b9a........0bc075..e9")&&(sOptions="1995-1997 by Thilo-Alexander Ginkel",bDetected=1),result()}meta("installer","Setup-Specialist") ================================================ FILE: dbs_min/db/NE/library_MS_RTL.4.sg ================================================ function detect(){return NE.compareEP("fca3....891e....49890e....bb....8c1f83e4..8967..b8....508967..f7d0508967..8967..8926....1e68....1e68....9a")?(sOptions="1990 type 1",bDetected=1):NE.compareEP("558bec508bc416509a........5886e0a3....1e68....1e68....9a")?(sOptions="1988 type 1",bDetected=1):NE.compareEP("fc8926....8926....8c1e....49890e....a3....891e")?(sOptions="1988 type 2",bDetected=1):NE.compareEP("fc8926....49890e....a3....891e....1e68....1e68....9a")?(sOptions="1988 type 3",bDetected=1):NE.compareEP("c8......57561eb8....8ed89a")?(sOptions="1990 type 2",bDetected=1):NE.compareEP("c8......5756bb....8ec326a3....9a")&&(sOptions="1990 type 3",bDetected=1),result()}meta("library","MS RTL") ================================================ FILE: dbs_min/db/NE/sfx_ARC_SFX.1.sg ================================================ function detect(){return NE.compareEP("a3....891e....890e....8b0e....bb....e8....72..8b0e....bb....e8....73..b9....890e....bb....e8")&&(sOptions="1991 by SEA, Inc.",bDetected=1),result()}meta("sfx","ARC SFX") ================================================ FILE: dbs_min/db/NE/sfx_PKZIP-SFX.1.sg ================================================ function detect(){return NE.compareEP("fca3....891e....49890e....bb....8c1f83e4..8967..b8....508967..f7d0508967..8967..8926....508bc416509a")&&(sOptions="1989-91 by PKWARE Inc.",bDetected=1),result()}meta("sfx","PKZIP-SFX") ================================================ FILE: dbs_min/db/NE/sfx_Sydex_SFX.1.sg ================================================ function detect(){return NE.compareEP("b8....8ec0e8....ba....3d....72..e8....26a3....26890e....268916....68....1ee8....83c4..ba....85c074")&&(sOptions="1995 by Sydex, Inc.",bDetected=1),result()}meta("sfx","Sydex SFX") ================================================ FILE: dbs_min/db/NPM/_NPM.0.sg ================================================ function detect(){return NPM.isVerbose()&&(sType="operation system",sName=NPM.getOperationSystemName(),sVersion=NPM.getOperationSystemVersion(),sOptions=NPM.getOperationSystemOptions(),bDetected=1),result()}meta("format","NodeJS package") ================================================ FILE: dbs_min/db/NPM/_init ================================================ var File=NPM,X=NPM ================================================ FILE: dbs_min/db/NPM/language_JavaScript.5.sg ================================================ function detect(){return NPM.isArchiveRecordPresentExp("(.*?).js")&&(bDetected=1),result()}meta("language","JavaScript") ================================================ FILE: dbs_min/db/NPM/language_TypeScript.5.sg ================================================ function detect(){return NPM.isArchiveRecordPresentExp("(.*?).ts")&&(bDetected=1),result()}meta("language","TypeScript") ================================================ FILE: dbs_min/db/NPM/package_PackageName.1.sg ================================================ function detect(){var e=NPM.getPackageJsonRecord("name") return e&&(sName=e,sVersion=NPM.getPackageJsonRecord("version"),bDetected=1),result()}meta("package","") ================================================ FILE: dbs_min/db/PDF/_PDF.0.sg ================================================ function detect(){return sName=PDF.getFileFormatName(),sVersion=PDF.getFileFormatVersion(),sOptions=PDF.getFileFormatOptions(),bDetected=1,result()}meta("format","PDF") ================================================ FILE: dbs_min/db/PDF/_init ================================================ var File=PDF,X=PDF ================================================ FILE: dbs_min/db/PDF/converter_markdown-pdf.3.sg ================================================ function detect(){return PDF.compare("'%PDF-1.4'0A'1 0 obj'0A'<<'0A'/Title ('FEFF')'0A'/Creator ('FEFF')'0A'/Producer ('FEFF00'Q'00't'00' '00'5'00'.'00'5'00'.'00'1)'")&&(sVersion="11.0.0",bDetected=1),result()}meta("converter","markdown-pdf") ================================================ FILE: dbs_min/db/PDF/converter_mdpdf.3.sg ================================================ function detect(){return PDF.compare("'%PDF-1.4'0A'%'D3EBE9E10A'1 0 obj'0A'<> '0D'endobj'")&&_setResult("protector","RTSN_secure","1.0","")}meta("format","pdf") ================================================ FILE: dbs_min/db/PDF/format_Tools.2.sg ================================================ function detect(){for(var e=PDF.getStringValuesByKey("/Creator"),t=0;tr.VirtualSize)for(var t=(t=r.FileOffset+r.VirtualSize)+511&-512;!detect_Cab(t,r.FileSize,e)&&t>r.FileOffset&&!_isStop();)t-=512}return result()}includeScript("cab") ================================================ FILE: dbs_min/db/PE/Microsoft.6.sg ================================================ function detect(){var i="",r="",v="",e="",s="",o="",n="",c="",A="",p="",t="",C="",E="",a="",P="",h="",$="",m="",O="",l="",y="" function R(){return PE.findString(PE.section[0].FileOffset,PE.getSize(),".NETCoreApp,Version=v")}function V(i){i=(i=(i=PE.getString(i).split("=")[1])&&"v"!==i[0]&&7>> Update DIE Engine to 3.20 and higher for using Heuristic-analyzer by DosX <<<"),!0)}function stubForWrongEnvironment(){return"undefined"==typeof PE?(stdout(">>> Wrong environment! 'PE' is undefined. Check DIE-engine for correct installation <<<"),!0):(PE.isHeuristicScan()&&PE.isVerbose()&&!_getNumberOfResults("operation system")&&stdout(">>> Script is running outside the environment! Are you in debug mode? <<<"),!1)}function stdout(e){if("object"==typeof console)console.warn(e) else if("object"==typeof File)_setResult("~warning",e,"","") else{if("function"!=typeof _error)throw e _error(e)}}function initializeCache(){var e,t={isArchX86:isArchX86,isCppClrLikeApp:isCppClrLikeApp,isVbNetStandardLibraryPresent:isVbNetStandardLibraryPresent,isJscriptNetStandardLibraryPresent:isJscriptNetStandardLibraryPresent,firstEpAsmInstruction:getFirstEpAsmInstruction,is64bit:PE.is64,isDotNet:PE.isNet,isDynamicLinkLibrary:PE.isDll,isNetGlobalCctorPresent:PE.isNetGlobalCctorPresent,isRichSignaturePresent:PE.isRichSignaturePresent,numberOfSections:PE.getNumberOfSections,numberOfRichIDs:PE.getNumberOfRichIDs,numberOfUnmanagedResources:PE.getNumberOfResources,numberOfUnmanagedImports:PE.getNumberOfImports,numberOfUnmanagedExports:PE.getNumberOfExports,indexOfImportsSection:PE.getImportSection,indexOfExportsSection:PE.getExportSection,nameOfNetAssemblyName:PE.getNetAssemblyName,nameOfNetModuleName:PE.getNetModuleName} for(e in t){var i=t[e] i?PE_Cached[e]=i():stdout(">>> PE API function '"+e+"' is undefined! <<<")}}function unloadCache(){PE_Cached=void 0}function scanForObfuscations_NET(){log(logType.nothing,"Scanning for obfuscation...") var e="",t=!1,i=!1,i=(PE_Cached.isDynamicLinkLibrary||(PE_Cached.isVbNetStandardLibraryPresent?isAllNetReferencesMissing(["Main","main","MAIN","MyApplication"])&&(i=!0):isAllNetReferencesMissing(["Main","main","main@","
$","mainCRTStartup","wWinMainCRTStartup","_WinMainCRTStartup"])&&(i=!0),i&&log(logType.net,'No "Main" method found')),i&&(e="Modified managed EP"),!1),n=(!PE_Cached.isNetGlobalCctorPresent||PE_Cached.isCppClrLikeApp||isUnpackagedWindowsAppSdkLinked()||(log(logType.net,"Global constructor detected!"),i=!0),i&&(e=addOption(e,"CLR constructor")),!1),r=["~","Strings","US","GUID","Blob"] if(!PE_Cached.isDynamicLinkLibrary&&1.0123456789" if(PE_Cached.numberOfSections>(PE_Cached.isCppClrLikeApp?10:6)||!PE.section[".text"])o=!0 else for(var l=0;l'00**")+8),m=!1 if((PE.compare("00**00**00",E)||PE.compare("00****00****00****00",E)||PE.compare("00******00******00******00",E)||PE.compare("00********00********00********00",E)||PE.compare("00****00****00",E)||PE.compare("00****00**00",E)||PE.compare("00**00****00",E))&&(log(logType.net,"Short names detected! (mask)"),m=!0),!m&&PE.compare("00**00",E))for(var h=0,S="QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm",l=1;l"),l=0;l nul")||validateNetUnicodeString('/C ping 1.1.1.1 -n 1 -w 3000 > Nul & Del "')||validateNetUnicodeString(P.ldloc_s+P.ldc_i4_0+P.ldloc_s+P.ldc_i4_0+P.ldelem_u4+P.ldloc_s+P.ldc_i4_0+P.ldelem_u4+P._unknown+P.stelem_i4+P.ldloc_s+P.ldc_i4_1+P.ldloc_s+P.ldc_i4_1+P.ldelem_u4+P.ldloc_s+P.ldc_i4_1+P.ldelem_u4+P._unknown+P.stelem_i4+P.ldloc_s+P.ldc_i4_2+P.ldloc_s+P.ldc_i4_2+P.ldelem_u4+P.ldloc_s+P.ldc_i4_2+P.ldelem_u4+P._unknown+P.stelem_i4+P.ldloc_s+P.ldc_i4_3+P.ldloc_s+P.ldc_i4_3+P.ldelem_u4+P.ldloc_s+P.ldc_i4_3+P.ldelem_u4+P._unknown+P.stelem_i4+P.ldloc_s+P.ldc_i4_4+P.ldloc_s+P.ldc_i4_4+P.ldelem_u4+P.ldloc_s+P.ldc_i4_4+P.ldelem_u4+P._unknown+P.stelem_i4)||validateNetByteCode(P.ldloc_s+P._unknown+P.shr_un+P.ldloc_s+P.ldc_i4_s+P.shl+P.or+P.stloc_s+P.ldloc_s+P._unknown+P.shr_un+P.ldloc_s+P.ldc_i4_s+P.shl+P.or+P.stloc_s+P.ldloc_s+P._unknown+P.shr_un+P.ldloc_s+P.ldc_i4_s+P.shl+P.or+P.stloc_s))&&(log(logType.net,"Anti-tamper detected!"),i=!0),i&&(e=addOption(e,"Anti-tamper")),!1),i=PE.findSignature(PE.getDosStubOffset()+PE.getDosStubSize(),PE.getSize()-PE.getOverlaySize(),"00''00"),O=(-1!==i&&-1!==(O=PE.findSignature(i+10,PE.getSize()-PE.getOverlaySize(),"''"))&&0!==PE.readByte(O+8)&&(log(logType.net,"Fake detected! Offset: 0x"+Number(O).toString(16)),p=!0),p&&(e=addOption(e,"Fake .cctor name")),!1),N=(-1===i&&(log(logType.net,"It seems that the .cctor is missing. Bad PE format!"),O=!0),O&&(e=addOption(e,"Bad .cctor format")),!1),w=[P.add,P.sub,P.mul,P.div,P.xor,P.shr,P.shl,P.or,P.not,P.and],V=[P.ldc_i4+P.ldc_i4+"%s"+P.stloc,P.ldc_i4+P.ldc_i4+"%s"+P.ldsfld,P.ldc_i4+P.ldc_i4+"%s"+P.ldc_i4+P.add,P.ldloc_1+P.ldc_i4+P.ldc_i4+"%s"+P.ldc_i4+P.ldc_i4,P.ldloc+P.ldc_i4+P.ldc_i4+P.ldc_i4+"%s"+P.stelem_i1,P.ldc_i4+P.ldc_i4+"%s"+P.br_s],A=0;A