Lines 26 and 27 end up poking the following (hand disassembled):
3B8: 20 EA 03 JSR $03EA
3BB: A2 02 LDX #$02
3BD: AD 00 E0 CHECK LDA $E000
3C0: C9 4C CMP #$4C
3C2: F0 07 BEQ GO
3C4: CA DEX
3C5: 9D 80 C0 STA $C080,X
3C8: 10 F3 BPL CHECK
3CA: 02
3CB: A2 14 GO LDX #$14
3CD: 4C 12 D4 JMP $D412
3F2: B8 03
3F4: A6