Offending code is at 0x5d4, moves 0x7F to 0xA10007 (unknown io port).