I did something similar decades ago: ran on debug with and without the dongle, then compared the execution path to identify where exactly it deviated. Then replaced the "jump" with "nop" to prevent it from branching out when the dongle was absent. This was with an early version of Visual C++ and I knew only a little 8086 Assembly.