So, everything in USB is named from the perspective of the host. You have endpoints, which define logical pipes down which data can flow. There are IN endpoints, which means that data flowing down them goes “IN” the host, and “OUT” endpoints, which means that data flowing down them is going “OUT” of the host.
So, if you’re building a USB device, you basically need to remember that “IN” actually means out (from the perspective of the device) and vice versa.
Also, if you’re writing a USB device simulation, and you’ve got a function called “OnReadTransfer”, this means that the host is making a request to read data from you. Which means that you, as a device have to write data. Down your IN endpoint. Obviously.