Since no one answered, I will explain what I did.
announcement 1. The file labels I mentioned above are enough to manipulate IPTC.
ad 2. During manual IPTC manipulation at the byte level, you can easily corrupt the file if you accidentally delete or overwrite existing bytes, especially if these are markers (headers of any part of the JPEG file).
ad 3. You need to find and increase App13 and the corresponding 8BIM and IPTC tokens with the length of the new metadata field (content size + 5 bytes for the IPTC header). For example, to add a new field No. 09, you must find the 8BIM IPTC segment (38 42 49 4D 04 04 00 00 00 00 XX XX) and increase XX XX bytes with the new word size. Then increase the segment App13 segment (find the last FF ED XX XX segment to 8BIM) and finally, at the end of 8BIM (you know the end thanks to the segment length bytes) you simply add a new IPTC field, for example 1C 02 09 00 05 - adds metadata field No. 09 of length 5. The next 5 bytes will be considered the contents of the field = word to be added.
Yes, this is a bit chaotic, but it works :-)
source share