Question d’entretien chez Blue Star

Reverse engineer this section of disassembled code. What is this function doing?