maZer.GTi: did you post this tools somewhere?
Im Sorry for delay, i hope you can read my code.
First you need to take a look on
function explodeKennfeldPaket($thisKennfeldPaket)
This will cut the header and footer from kp file
After that you should take a look on
function filterKennfeld($thisKennfeld)
This function is very difficult but ill try to help so much i can.
But this will not work with the newest .kp format. The newest one is compressed and crypted