Based on https://github.com/agrippa1994/DX9-Overlay-API