>>335 そこ見当違いのことしてる。
多分これが正解。
IdCoderHeader.pas
function DecodeHeader(Header: string):string;
(略)
    begin
     s := '';             ←追加
     while Length(substring) >= 4 do
     begin
       a4[1] := b64(substring[1]);