Originally from https://code.google.com/p/pefile/