patterns: Added pattern for Windows 11 Notepad Window State bin file (#228)

* Add files via upload

* Update README.md

* Update README.md

* Add files via upload

* Update Notepad-WindowState.hexpat

* Update and rename Notepad-WindowState.hexpat to notepadwindowstate.hexpat

* Rename Notepad-WindowState.hexpat.bin to notepad-windowstate.hexpat.bin

* Update README.md
This commit is contained in:
ogmini
2024-03-15 16:53:40 -04:00
committed by GitHub
parent 9af8d7e693
commit eaeea8d093
3 changed files with 51 additions and 0 deletions

View File

@@ -78,6 +78,7 @@ Everything will immediately show up in ImHex's Content Store and gets bundled wi
| NBT | | [`patterns/nbt.hexpat`](patterns/nbt.hexpat) | Minecraft NBT format |
| NE | | [`patterns/ne.hexpat`](patterns/ne.hexpat) | NE header and Standard NE fields |
| nes | | [`patterns/nes.hexpat`](patterns/nes.hexpat) | .nes file format |
| NotepadWindowState | | [`patterns/notepad-windowstate.hexpat`](patterns/notepad-windowstate.hexpat) | Windows 11 Notepad - Window State .bin file |
| NRO | | [`patterns/nro.hexpat`](patterns/nro.hexpat) | Nintendo Switch NRO files |
| NTAG | | [`patterns/ntag.hexpat`](patterns/ntag.hexpat) | NTAG213/NTAG215/NTAG216, NFC Forum Type 2 Tag compliant IC |
| OGG | `audio/ogg` | [`patterns/ogg.hexpat`](patterns/ogg.hexpat) | OGG Audio format |

View File

@@ -0,0 +1,50 @@
#pragma author ogmini https://github.com/ogmini
#pragma description Windows 11 Notepad Window State file %localappdata%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\WindowState
#include <std/string.pat>
#include <type/leb128.pat>
#include <std/time.pat>
#include <std/core.pat>
using ul = type::uLEB128;
using int = u32;
struct Tab
{
u128 GUID;
};
struct WindowState
{
char HeaderIdentifier[2]; // NP
ul SequenceNumber;
ul BytesToCRC32;
u8 Delim[1];
ul NumberTabs;
Tab Tabs[NumberTabs];
ul ActiveTab;
int CoordTopLeftX;
int CoordTopLeftY;
int CoordBottomRightX;
int CoordBottomRightY;
int WindowSizeWidth;
int WindowSizeHeight;
u8 Delim2[1];
int CRC32;
u8 SlackSpace[while(!std::mem::eof())];
};
// -- Declaration --
WindowState state @ 0x0;