I've been able to encode the files themselves, but the first portion of the attachment in Base64 appears to be specific to InfoPath. This is even documented in the URL below and I found some VB code, but I don't have the background to understand it.
I have an example below. I just need to figure out what to encode for the "unknown" section. If I can figure out what to encode.
I Used the decoder at https://www.browserling.com/tools/base64-decode to decode the "unknown" section below and it decodes to "U ".
If I can figure out what this is supposed to be, I think I'll have everything I need.
[standard] [unknown] [standard] [filename] [standard]
x0lGQRQAAAABAAAAAAAA AFUBAAAJ AAAA dABlAHMAdAAuAHAAbgBn AAAA
https://blogs.msdn.microsoft.com/infopath/2004/03/18/infopath-file-attachment-control/