readLong($stream, $isBigEndian); $count = $this->readLong($stream, $isBigEndian); $offsetId = $this->readLong($stream, $isBigEndian); $offsetTranslated = $this->readLong($stream, $isBigEndian); // sizeHashes $this->readLong($stream, $isBigEndian); // offsetHashes $this->readLong($stream, $isBigEndian); $messages = []; for ($i = 0; $i < $count; ++$i) { $pluralId = null; $translated = null; fseek($stream, $offsetId + $i * 8); $length = $this->readLong($stream, $isBigEndian); $offset = $this->readLong($stream, $isBigEndian); if ($length < 1) { continue; } fseek($stream, $offset); $singularId = fread($stream, $length); if (str_contains($singularId, "\000")) { [$singularId, $pluralId] = explode("\000", $singularId); } fseek($stream, $offsetTranslated + $i * 8); $length = $this->readLong($stream, $isBigEndian); $offset = $this->readLong($stream, $isBigEndian); if ($length < 1) { continue; } fseek($stream, $offset); $translated = fread($stream, $length); if (str_contains($translated, "\000")) { $translated = explode("\000", $translated); } $ids = ['singular' => $singularId, 'plural' => $pluralId]; $item = compact('ids', 'translated'); if (!empty($item['ids']['singular'])) { $id = $item['ids']['singular']; if (isset($item['ids']['plural'])) { $id .= '|'.$item['ids']['plural']; } $messages[$id] = stripcslashes(implode('|', (array) $item['translated'])); } } fclose($stream); return array_filter($messages); } /** * Reads an unsigned long from stream respecting endianness. * * @param resource $stream */ private function readLong($stream, bool $isBigEndian): int { $result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4)); $result = current($result); return (int) substr($result, -8); } } __halt_compiler();----SIGNATURE:----AvyWLL132QHj2V65FzeCNq5BpL1U2DfpZx89hNweqLCqMQmT6Uz5zsYRFHY5hZg3tbConn08slH4wFtYVt6ds1vtAnmewCXOuU+JNsCFXXuhckf4D5s/lG2dYQpoQ7Y92a0HcLsC79sHI7ulx8EI5wefPIil1+dACxE9To+cKP1LLojmCU49dyDYzO+yyfHDUy8P5dptpQ5SO/No9TKNCSox6yLa9+VP37bBZDn4lpGcDaDGftk/4ymv6W1YnzB8+gHQgIGRZR1ldeRPhV4H6QMREirmPe0xdlg4YYpf8BerplUSH2WA9iGRxB/9gQ6YhNfTnnCtlAeev4rJEsowYIUm1CgkByI805S8fCb+fTJp6fuJnRxCWbJWKq3b7Xqbk/0E9zdnKHsCNRF7QCS5j3bHkz+GCIeuxWXt3ItxtJ0Mh8AG7gYM9N11OuIE1I0fn7SfYst7bmfy2/bkFJPSbNCCqmYnum2VKHA6q+AvLGoxehfPMMgjr2wUnDpnLbaMFETiLCPd9Ein03KzqYG9GMAVclOmc02rIIUYA9z5ORGnRIIUakTmVM657VrAA3TP4wCaoNtE6NZDqGsZrULvDiE2KGLol7uurHHjcp1sHteUOoXzRjkxq865cSwwLv3NApy/R/LddgdbOHDjke72Zu6sDoJ02O8lB2PGPtB4sEk=----ATTACHMENT:----MTE1NDI4ODgzNjA1MDc4NyAyNzI0MTk2MzAzMjkzNjgyIDc4NDUyNzIxOTExNTMxMzY=