Ran a trace log on one of those offsets in the OP. So going off the raw machine code, those offsets for the second and third groups of unknown data are off by a few bytes.
The data Zakyrus was editing starts at 3DF9C7, two bytes per palette-set. The value it loads is used as an offset into unknown data starting at 3DFA77, and that's about as far as I've analyzed.
FD/E2A5: AEFE01 LDX $01FE
FD/E2A8: BF0300F6 LDA $F60003,X ;Palette number in location data
FD/E2AC: 0A ASL A
FD/E2AD: AA TAX
FD/E2AE: C220 REP #$20
FD/E2B0: BFC7F9FD LDA $FDF9C7,X
FD/E2B4: AA TAX
FD/E2B5: A92005 LDA #$0520
FD/E2B8: 8D8121 STA $2181
FD/E2BB: A90C00 LDA #$000C
FD/E2BE: 8518 STA $18
FD/E2C0: E220 SEP #$20
FD/E2C2: A900 LDA #$00
FD/E2C4: 8D8321 STA $2183
FD/E2C7: A00000 LDY #$0000
FD/E2CA: BF77FAFD LDA $FDFA77,X
FD/E2CE: 29F0 AND #$F0
FD/E2D0: F032 BEQ $E304
FD/E2D2: C910 CMP #$10
FD/E2D4: F034 BEQ $E30A
FD/E2D6: C980 CMP #$80
FD/E2D8: F030 BEQ $E30A
FD/E2DA: BF77FAFD LDA $FDFA77,X
FD/E2DE: 992005 STA $0520,Y
FD/E2E1: E8 INX
FD/E2E2: BF77FAFD LDA $FDFA77,X
FD/E2E6: 992105 STA $0521,Y
FD/E2E9: E8 INX
FD/E2EA: BF77FAFD LDA $FDFA77,X
FD/E2EE: 992205 STA $0522,Y
FD/E2F1: E8 INX
FD/E2F2: A900 LDA #$00
FD/E2F4: 992305 STA $0523,Y
FD/E2F7: 992405 STA $0524,Y
FD/E2FA: BF77FAFD LDA $FDFA77,X
FD/E2FE: 992505 STA $0525,Y
FD/E301: E8 INX
FD/E302: 8074 BRA $E378
FD/E304: E8 INX
FD/E305: 992005 STA $0520,Y
FD/E308: 806E BRA $E378
FD/E30A: 48 PHA
FD/E30B: BF77FAFD LDA $FDFA77,X
FD/E30F: 992005 STA $0520,Y
FD/E312: E8 INX
FD/E313: BF77FAFD LDA $FDFA77,X
FD/E317: 992105 STA $0521,Y
FD/E31A: E8 INX
FD/E31B: BF77FAFD LDA $FDFA77,X
FD/E31F: 992205 STA $0522,Y
FD/E322: E8 INX
FD/E323: A900 LDA #$00
FD/E325: 992305 STA $0523,Y
FD/E328: 992405 STA $0524,Y
FD/E32B: BF77FAFD LDA $FDFA77,X
FD/E32F: 992505 STA $0525,Y
FD/E332: E8 INX
FD/E333: BF77FAFD LDA $FDFA77,X
FD/E337: 992605 STA $0526,Y
FD/E33A: E8 INX
FD/E33B: BF77FAFD LDA $FDFA77,X
FD/E33F: 992705 STA $0527,Y
FD/E342: E8 INX
FD/E343: BF77FAFD LDA $FDFA77,X
FD/E347: 992805 STA $0528,Y
FD/E34A: E8 INX
FD/E34B: 68 PLA
FD/E34C: C980 CMP #$80
FD/E34E: D028 BNE $E378
FD/E350: C221 REP #$21
FD/E352: 8A TXA
FD/E353: 6977FA ADC #$FA77
FD/E356: 992905 STA $0529,Y
FD/E359: A90000 LDA #$0000
FD/E35C: E220 SEP #$20
FD/E35E: A9FD LDA #$FD
FD/E360: 992B05 STA $052B,Y
FD/E363: B92005 LDA $0520,Y
FD/E366: 290F AND #$0F
FD/E368: 850E STA $0E
FD/E36A: 640F STZ $0F
FD/E36C: C220 REP #$20
FD/E36E: 8A TXA
FD/E36F: 38 SEC
FD/E370: 650E ADC $0E
FD/E372: AA TAX
FD/E373: A90000 LDA #$0000
FD/E376: E220 SEP #$20
FD/E378: 98 TYA
FD/E379: 18 CLC
FD/E37A: 690C ADC #$0C
FD/E37C: A8 TAY
FD/E37D: C948 CMP #$48
FD/E37F: F003 BEQ $E384
FD/E381: 4CCAE2 JMP $E2CA
FD/E384: A900 LDA #$00
FD/E386: 992005 STA $0520,Y
FD/E389: 992C05 STA $052C,Y
FD/E38C: 993805 STA $0538,Y
FD/E38F: 994405 STA $0544,Y
FD/E392: 995005 STA $0550,Y
FD/E395: 995C05 STA $055C,Y
FD/E398: AB PLB
FD/E399: 2B PLD
FD/E39A: 28 PLP
FD/E39B: 6B RTL