I'm looking for a way to emulate a network adapter on windows and be able to use the packets in a program. The program will then send them over alternate means. I just need to create a virtual network adapter that gives me access to packets. Is there a pre-written custom driver for this or would I need to write my own? I read something about TAP driver for windows, but I'm not sure if it is what I need.
Yes, for a standalone virtual interface, the most common method is indeed the TAP driver – originally made by OpenVPN to imitate the Linux built-in 'tap' interface type. It's open-source, but you'll probably want to use the official distribution as it's digitally-signed (a requirement nowadays).
The other approach is to build a custom driver doing the same thing. I believe that's what VirtualBox does for its "Host-only networking" feature (which is, also, a virtual interface sending all packets to software).
If all you need is layer3 (IP) packets, you can also try implementing the app as a Windows VPN provider, although this is only available for UWP apps – but doesn't require a driver.
You don't need to emulate anything.
You already have an adapter in your computer that you may use. This is the Microsoft Loopback Adapter, also known under the name of localhost.
If you are writing a program, here are a couple of references to get you started: