This piece is in closed simple binary. The A section is a parallel symmetric period because each phrase is four measures long and have the same opening measure. The first cadence is a PAC in the tonic key of E major and the second cadences modulates to B major. The prevalence of A sharps in the previous measures solidifies this. The A section repeats before moving to the B section. The A section is expository material.
The key change is the only way to initially sense the B section. This piece has little structural division with the bass consistently doing single line eight notes and no dynamics. The rhythm and melodic contour is basically the same for the first phrase. I have a real hard time interpreting this part. With only two lines it's hard to distinguish chords, and after listening to it several times I have a strong feeling that the piece has modulated to C sharp major, which is foreign to both E major and B major. I have a hard time hearing where exactly this occurs, but I feel the half cadence in measure 12 resolve in measure 13 and a very strong PAC in measure 16. The next period immediately goes back to E major with a quote of the A melody down an octave in measure 17, but the rest of this period is new material, which reaches a half cadence after four bars before a PAC in the final measure. The B section then repeats again, and serves as development of the A section.