Thanks for sharing!
There is a bug in `rvatoffset` function.
As you map file 'as is', without mapping sections like Windows Loader does (
LoadLibraryExW with LOAD_LIBRARY_AS_DATAFILE flag, for example), you need to align some values in your `rvatoffset` function using file / section alignment.