Skip to content

Instantly share code, notes, and snippets.

@msuiche
Created May 15, 2017 11:58
Show Gist options
  • Save msuiche/a4fb08f69a2d246f2d6c10777e538855 to your computer and use it in GitHub Desktop.
Save msuiche/a4fb08f69a2d246f2d6c10777e538855 to your computer and use it in GitHub Desktop.
010 Template for t.wnry
//------------------------------------------------
//--- 010 Editor v7.0 Binary Template
//
// File:
// Authors:
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
typedef struct {
char Signature[8]; // WANACRY!
uint32 Part1Size; // Always 0x100
char DataPart1[Part1Size];
uint32 Part2Signature;
uint64 Part2Size;
char DataPart2[Part2Size];
} _WANNACRY_THEADER;
local char magic[8];
ReadBytes(magic, 0, 8);
if (Strncmp(magic, "WANACRY!", 8) == 0) {
FSeek(0);
_WANNACRY_THEADER Header;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment