First functional version, all features implemented as planned
Fixed key being used before being opened in winapi_read_var