If I recall well there's an open source project called libimobiledevice (https://libimobiledevice.org) that does just that. I haven't integrated their code into my build chain though. It's made for Linux and I don't know if it could compile on Windows, it's likely some porting would be needed (when they say "cross-platform" you usually have to understand "cross-POSIX platform"). But perhaps there are Win32 binaries available somewhere - that's the toolset most jailbreak tools use under the hood. Please post back if you give it a try, I'll be interested in your feedback.