The actual problem was a wrong interface number. My only guess is that there is some sort of error correction that differs in behavior on Windows and on Linux. On Linux it corrected the interface number from 0 to 1 (which was the actual interface I was sending data through) so the program worked but on Windows it corrected the endpoint number in the wrong interface and this is why it said endpoint 0x82 in the log and this is also why it did not work.