Pergunta de entrevista da empresa Blue Star

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