I can tell you how to write a wav file - that's not too hard. But I don't think it will work as you might expect.
If you've just opened the File as a byte[] and try to write that to a WAV, you're just going to get a lot of horrible noise, and not the sound you expect. The sound format IMA is a compressed sound format - and you'd need to know how to un-compress that stream into 'raw' sound. This 'raw' sound is what a WAV file is. it's just a header that describes what the raw data represents - such as playback speed and bytes per sample.
https://alvas.net/ can handle this for you, saving you the hard work.
If however, you really want to try and write your own decoder, have a look here:
https://wiki.multimedia.cx/index.php?title=IMA_ADPCM
I can't find the original source I used (many years ago) for creating a WAV file, but here's an old blog that seems to contain enough information.
https://m8051.blogspot.com/2010/08/wave-sound-file-in-pcm-format-long-lost.html
Good luck!