I wrote the tests like you asked for. I also minimized the diff so that half of the application-specific hacks are identified as no longer needed gone.
Before the first published version, I had a version where I implemented many more functions. It didn't work and the diff was 3x as long. It used to be implemented in a more regular way, but it might not have been legal to publish. It involved returning `S_OK` from `SLGetLicensingStatusInformation` and `SLConsumeRight`, which may violate DMCA anti-circumvention laws. On the other hand, this MR does not bypass DRM but merely slows them down, and since threads are nondeterministic, the software vendor must have intended to allow this for slow computers. Compared to my current version, the unpublished version contained questionable uses of `LocalAlloc`. Furthermore I don't really understand the `sppc` module beyond what I need to get my software working.
For making it less application-specific, would you have removed the `IsMSOffice()` check altogether? I added it to reduce the risk of regressions, but now I realize something else. I've never seen a 3rd-party application rely on `sppc` for license checks, as they all use their own. This means `sppc` is already related to Microsoft products, and Microsoft products tend to be around Microsoft Office.