I raked my brains and bothered all the venerable NVSE modders on trying to get this working, and I just can't. C++ Is a horrific language, and there's no readily available debugger for interacting with the ASM code. Throws an error about the stack.
Workaround for buggy PipBoy light. Now when you open the PipBoy menu, the light is toggled off, which prevents the game thinking it's still on despite the PipBoy not showing the light.